@serpel/cli 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +98 -2
- package/dist/THIRD_PARTY_LICENSES.txt +173 -0
- package/dist/index.js +491 -0
- package/package.json +60 -3
package/dist/index.js
ADDED
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var $S=Object.create;var Fc=Object.defineProperty;var IS=Object.getOwnPropertyDescriptor;var CS=Object.getOwnPropertyNames;var AS=Object.getPrototypeOf,DS=Object.prototype.hasOwnProperty;var RS=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Et=(e,t)=>{for(var r in t)Fc(e,r,{get:t[r],enumerable:!0})},TS=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of CS(t))!DS.call(e,n)&&n!==r&&Fc(e,n,{get:()=>t[n],enumerable:!(i=IS(t,n))||i.enumerable});return e};var ES=(e,t,r)=>(r=e!=null?$S(AS(e)):{},TS(t||!e||!e.__esModule?Fc(r,"default",{value:e,enumerable:!0}):r,e));var ik=RS((r6,Vf)=>{var mc=process||{},nk=mc.argv||[],pc=mc.env||{},fR=!(pc.NO_COLOR||nk.includes("--no-color"))&&(!!pc.FORCE_COLOR||nk.includes("--color")||mc.platform==="win32"||(mc.stdout||{}).isTTY&&pc.TERM!=="dumb"||!!pc.CI),hR=(e,t,r=e)=>i=>{let n=""+i,o=n.indexOf(t,e.length);return~o?e+gR(n,t,r,o)+t:e+n+t},gR=(e,t,r,i)=>{let n="",o=0;do n+=e.substring(o,i)+r,o=i+t.length,i=e.indexOf(t,o);while(~i);return n+e.substring(o)},rk=(e=fR)=>{let t=e?hR:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Vf.exports=rk();Vf.exports.createColors=rk});var kt=class extends Error{constructor(t,r,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},ct=class extends kt{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};var Ot=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,i)=>{if(!this.argChoices.includes(r))throw new ct(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,i):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function _o(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}import{EventEmitter as NS}from"node:events";import Zc from"node:child_process";import Pt from"node:path";import So from"node:fs";import ee from"node:process";import{stripVTControlCharacters as LS}from"node:util";import{stripVTControlCharacters as OS}from"node:util";var _n=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){let r=t.commands.filter(n=>!n._hidden),i=t._getHelpCommand();return i&&!i._hidden&&r.push(i),this.sortSubcommands&&r.sort((n,o)=>n.name().localeCompare(o.name())),r}compareOptions(t,r){let i=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return i(t).localeCompare(i(r))}visibleOptions(t){let r=t.options.filter(n=>!n.hidden),i=t._getHelpOption();if(i&&!i.hidden){let n=i.short&&t._findOption(i.short),o=i.long&&t._findOption(i.long);!n&&!o?r.push(i):i.long&&!o?r.push(t.createOption(i.long,i.description)):i.short&&!n&&r.push(t.createOption(i.short,i.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let i=t.parent;i;i=i.parent){let n=i.options.filter(o=>!o.hidden);r.push(...n)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(i=>_o(i)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((i,n)=>Math.max(i,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(n)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((i,n)=>Math.max(i,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((i,n)=>Math.max(i,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((i,n)=>Math.max(i,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(n)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let i="";for(let n=t.parent;n;n=n.parent)i=n.name()+" "+i;return i+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0){let i=`(${r.join(", ")})`;return t.description?`${t.description} ${i}`:i}return t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let i=`(${r.join(", ")})`;return t.description?`${t.description} ${i}`:i}return t.description}formatItemList(t,r,i){return r.length===0?[]:[i.styleTitle(t),...r,""]}groupItems(t,r,i){let n=new Map;return t.forEach(o=>{let a=i(o);n.has(a)||n.set(a,[])}),r.forEach(o=>{let a=i(o);n.has(a)||n.set(a,[]),n.get(a).push(o)}),n}formatHelp(t,r){let i=r.padWidth(t,r),n=r.helpWidth??80;function o(d,m){return r.formatItem(d,i,m,r)}let a=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],s=r.commandDescription(t);s.length>0&&(a=a.concat([r.boxWrap(r.styleCommandDescription(s),n),""]));let c=r.visibleArguments(t).map(d=>o(r.styleArgumentTerm(r.argumentTerm(d)),r.styleArgumentDescription(r.argumentDescription(d))));if(a=a.concat(this.formatItemList("Arguments:",c,r)),this.groupItems(t.options,r.visibleOptions(t),d=>d.helpGroupHeading??"Options:").forEach((d,m)=>{let f=d.map(h=>o(r.styleOptionTerm(r.optionTerm(h)),r.styleOptionDescription(r.optionDescription(h))));a=a.concat(this.formatItemList(m,f,r))}),r.showGlobalOptions){let d=r.visibleGlobalOptions(t).map(m=>o(r.styleOptionTerm(r.optionTerm(m)),r.styleOptionDescription(r.optionDescription(m))));a=a.concat(this.formatItemList("Global Options:",d,r))}return this.groupItems(t.commands,r.visibleCommands(t),d=>d.helpGroup()||"Commands:").forEach((d,m)=>{let f=d.map(h=>o(r.styleSubcommandTerm(r.subcommandTerm(h)),r.styleSubcommandDescription(r.subcommandDescription(h))));a=a.concat(this.formatItemList(m,f,r))}),a.join(`
|
|
3
|
+
`)}displayWidth(t){return OS(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,r,i,n){let a=" ".repeat(2);if(!i)return a+t;let s=t.padEnd(r+t.length-n.displayWidth(t)),c=2,u=(this.helpWidth??80)-r-c-2,d;return u<this.minWidthToWrap||n.preformatted(i)?d=i:d=n.boxWrap(i,u).replace(/\n/g,`
|
|
4
|
+
`+" ".repeat(r+c)),a+s+" ".repeat(c)+d.replace(/\n/g,`
|
|
5
|
+
${a}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;let i=t.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,o=[];return i.forEach(a=>{let s=a.match(n);if(s===null){o.push("");return}let c=[s.shift()],l=this.displayWidth(c[0]);s.forEach(u=>{let d=this.displayWidth(u);if(l+d<=r){c.push(u),l+=d;return}o.push(c.join(""));let m=u.trimStart();c=[m],l=this.displayWidth(m)}),o.push(c.join(""))}),o.join(`
|
|
6
|
+
`)}};var Xe=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let i=PS(t);this.short=i.shortFlag,this.long=i.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,i)=>{if(!this.argChoices.includes(r))throw new ct(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,i):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Nh(this.name().replace(/^no-/,"")):Nh(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}},xo=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(t,r){let i=r.attributeName();if(!this.dualOptions.has(i))return!0;let n=this.negativeOptions.get(i).presetArg,o=n!==void 0?n:!1;return r.negate===(o===t)}};function Nh(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function PS(e){let t,r,i=/^-[^-]$/,n=/^--[^-]/,o=e.split(/[ |,]+/).concat("guard");if(i.test(o[0])&&(t=o.shift()),n.test(o[0])&&(r=o.shift()),!t&&i.test(o[0])&&(t=o.shift()),!t&&n.test(o[0])&&(t=r,r=o.shift()),o[0].startsWith("-")){let a=o[0],s=`option creation failed due to '${a}' in option flags '${e}'`;throw/^-[^-][^-]/.test(a)?new Error(`${s}
|
|
7
|
+
- a short flag is a single dash and a single character
|
|
8
|
+
- either use a single dash and a single character (for a short flag)
|
|
9
|
+
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):i.test(a)?new Error(`${s}
|
|
10
|
+
- too many short flags`):n.test(a)?new Error(`${s}
|
|
11
|
+
- too many long flags`):new Error(`${s}
|
|
12
|
+
- unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}function jS(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let i=0;i<=e.length;i++)r[i]=[i];for(let i=0;i<=t.length;i++)r[0][i]=i;for(let i=1;i<=t.length;i++)for(let n=1;n<=e.length;n++){let o;e[n-1]===t[i-1]?o=0:o=1,r[n][i]=Math.min(r[n-1][i]+1,r[n][i-1]+1,r[n-1][i-1]+o),n>1&&i>1&&e[n-1]===t[i-2]&&e[n-2]===t[i-1]&&(r[n][i]=Math.min(r[n][i],r[n-2][i-2]+1))}return r[e.length][t.length]}function Jc(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 i=[],n=3,o=.4;return t.forEach(a=>{if(a.length<=1)return;let s=jS(e,a),c=Math.max(e.length,a.length);(c-s)/c>o&&(s<n?(n=s,i=[a]):s===n&&i.push(a))}),i.sort((a,s)=>a.localeCompare(s)),r&&(i=i.map(a=>`--${a}`)),i.length>1?`
|
|
13
|
+
(Did you mean one of ${i.join(", ")}?)`:i.length===1?`
|
|
14
|
+
(Did you mean ${i[0]}?)`:""}var tr=class e extends NS{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=>ee.stdout.write(r),writeErr:r=>ee.stderr.write(r),outputError:(r,i)=>i(r),getOutHelpWidth:()=>ee.stdout.isTTY?ee.stdout.columns:void 0,getErrHelpWidth:()=>ee.stderr.isTTY?ee.stderr.columns:void 0,getOutHasColors:()=>Uh()??(ee.stdout.isTTY&&ee.stdout.hasColors?.()),getErrHasColors:()=>Uh()??(ee.stderr.isTTY&&ee.stderr.hasColors?.()),stripColor:r=>LS(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let r=this;r;r=r.parent)t.push(r);return t}command(t,r,i){let n=r,o=i;typeof n=="object"&&n!==null&&(o=n,n=null),o=o||{};let[,a,s]=t.match(/([^ ]+) *(.*)/),c=this.createCommand(a);return n&&(c.description(n),c._executableHandler=!0),o.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(o.noHelp||o.hidden),c._executableFile=o.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 _n,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...t},this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,r){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
15
|
+
- specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new Ot(t,r)}argument(t,r,i,n){let o=this.createArgument(t,r);return typeof i=="function"?o.default(n).argParser(i):o.default(i),this.addArgument(o),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r?.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,t&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let i=t??"help [command]",[,n,o]=i.match(/([^ ]+) *(.*)/),a=r??"display help for command",s=this.createCommand(n);return s.helpOption(!1),o&&s.arguments(o),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 i=["preSubcommand","preAction","postAction"];if(!i.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
|
|
16
|
+
Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,i){this._exitCallback&&this._exitCallback(new kt(t,r,i)),ee.exit(t)}action(t){let r=i=>{let n=this.registeredArguments.length,o=i.slice(0,n);return this._storeOptionsAsProperties?o[n]=this:o[n]=this.opts(),o.push(this),t.apply(this,o)};return this._actionHandler=r,this}createOption(t,r){return new Xe(t,r)}_callParseArg(t,r,i,n){try{return t.parseArg(r,i)}catch(o){if(o.code==="commander.invalidArgument"){let a=`${n} ${o.message}`;this.error(a,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let i=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'
|
|
17
|
+
- already used by option '${r.flags}'`)}this._initOptionGroup(t),this.options.push(t)}_registerCommand(t){let r=n=>[n.name()].concat(n.aliases()),i=r(t).find(n=>this._findCommand(n));if(i){let n=r(this._findCommand(i)).join("|"),o=r(t).join("|");throw new Error(`cannot add command '${o}' as already have command '${n}'`)}this._initCommandGroup(t),this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),i=t.attributeName();t.defaultValue!==void 0&&this.setOptionValueWithSource(i,t.defaultValue,"default");let n=(o,a,s)=>{o==null&&t.presetArg!==void 0&&(o=t.presetArg);let c=this.getOptionValue(i);o!==null&&t.parseArg?o=this._callParseArg(t,o,c,a):o!==null&&t.variadic&&(o=t._collectValue(o,c)),o==null&&(t.negate?o=!1:t.isBoolean()||t.optional?o=!0:o=""),this.setOptionValueWithSource(i,o,s)};return this.on("option:"+r,o=>{let a=`error: option '${t.flags}' argument '${o}' is invalid.`;n(o,a,"cli")}),t.envVar&&this.on("optionEnv:"+r,o=>{let a=`error: option '${t.flags}' value '${o}' from env '${t.envVar}' is invalid.`;n(o,a,"env")}),this}_optionEx(t,r,i,n,o){if(typeof r=="object"&&r instanceof Xe)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let a=this.createOption(r,i);if(a.makeOptionMandatory(!!t.mandatory),typeof n=="function")a.default(o).argParser(n);else if(n instanceof RegExp){let s=n;n=(c,l)=>{let u=s.exec(c);return u?u[0]:l},a.default(o).argParser(n)}else a.default(n);return this.addOption(a)}option(t,r,i,n){return this._optionEx({},t,r,i,n)}requiredOption(t,r,i,n){return this._optionEx({mandatory:!0},t,r,i,n)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(t=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,void 0)}setOptionValueWithSource(t,r,i){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=i,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(t)!==void 0&&(r=i.getOptionValueSource(t))}),r}_prepareUserArgs(t,r){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},t===void 0&&r.from===void 0){ee.versions?.electron&&(r.from="electron");let n=ee.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}t===void 0&&(t=ee.argv),this.rawArgs=t.slice();let i;switch(r.from){case void 0:case"node":this._scriptPath=t[1],i=t.slice(2);break;case"electron":ee.defaultApp?(this._scriptPath=t[1],i=t.slice(2)):i=t.slice(1);break;case"user":i=t.slice(0);break;case"eval":i=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(t,r){this._prepareForParse();let i=this._prepareUserArgs(t,r);return this._parseCommand([],i),this}async parseAsync(t,r){this._prepareForParse();let i=this._prepareUserArgs(t,r);return await this._parseCommand([],i),this}_prepareForParse(){this._savedState===null?(this.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.
|
|
18
|
+
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(t,r,i){if(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",o=`'${t}' does not exist
|
|
19
|
+
- if '${i}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
20
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
21
|
+
- ${n}`;throw new Error(o)}_executeSubCommand(t,r){r=r.slice();let i=[".js",".ts",".tsx",".mjs",".cjs"];function n(u,d){let m=Pt.resolve(u,d);if(So.existsSync(m))return m;if(i.includes(Pt.extname(d)))return;let f=i.find(h=>So.existsSync(`${m}${h}`));if(f)return`${m}${f}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=t._executableFile||`${this._name}-${t._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=So.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=Pt.resolve(Pt.dirname(u),a)}if(a){let u=n(a,o);if(!u&&!t._executableFile&&this._scriptPath){let d=Pt.basename(this._scriptPath,Pt.extname(this._scriptPath));d!==this._name&&(u=n(a,`${d}-${t._name}`))}o=u||o}let s=i.includes(Pt.extname(o)),c;ee.platform!=="win32"?s?(r.unshift(o),r=Lh(ee.execArgv).concat(r),c=Zc.spawn(ee.argv[0],r,{stdio:"inherit"})):c=Zc.spawn(o,r,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,t._name),r.unshift(o),r=Lh(ee.execArgv).concat(r),c=Zc.spawn(ee.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{ee.on(d,()=>{c.killed===!1&&c.exitCode===null&&c.kill(d)})});let l=this._exitCallback;c.on("close",u=>{u=u??1,l?l(new kt(u,"commander.executeSubCommandAsync","(close)")):ee.exit(u)}),c.on("error",u=>{if(u.code==="ENOENT")this._checkForMissingExecutable(o,a,t._name);else if(u.code==="EACCES")throw new Error(`'${o}' not executable`);if(!l)ee.exit(1);else{let d=new kt(1,"commander.executeSubCommandAsync","(error)");d.nestedError=u,l(d)}}),this.runningCommand=c}_dispatchSubcommand(t,r,i){let n=this._findCommand(t);n||this.help({error:!0}),n._prepareForParse();let o;return o=this._chainOrCallSubCommandHook(o,n,"preSubcommand"),o=this._chainOrCall(o,()=>{if(n._executableHandler)this._executeSubCommand(n,r.concat(i));else return n._parseCommand(r,i)}),o}_dispatchHelpCommand(t){t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,r)=>{t.required&&this.args[r]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(i,n,o)=>{let a=n;if(n!==null&&i.parseArg){let s=`error: command-argument value '${n}' is invalid for argument '${i.name()}'.`;a=this._callParseArg(i,n,o,s)}return a};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((i,n)=>{let o=i.defaultValue;i.variadic?n<this.args.length?(o=this.args.slice(n),i.parseArg&&(o=o.reduce((a,s)=>t(i,s,a),i.defaultValue))):o===void 0&&(o=[]):n<this.args.length&&(o=this.args[n],i.parseArg&&(o=t(i,o,i.defaultValue))),r[n]=o}),this.processedArgs=r}_chainOrCall(t,r){return t?.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let i=t,n=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[r]!==void 0).forEach(o=>{o._lifeCycleHooks[r].forEach(a=>{n.push({hookedCommand:o,callback:a})})}),r==="postAction"&&n.reverse(),n.forEach(o=>{i=this._chainOrCall(i,()=>o.callback(o.hookedCommand,this))}),i}_chainOrCallSubCommandHook(t,r,i){let n=t;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(o=>{n=this._chainOrCall(n,()=>o(this,r))}),n}_parseCommand(t,r){let i=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(i.operands),r=i.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let a;return a=this._chainOrCallHooks(a,"preAction"),a=this._chainOrCall(a,()=>this._actionHandler(this.processedArgs)),this.parent&&(a=this._chainOrCall(a,()=>{this.parent.emit(o,t,r)})),a=this._chainOrCallHooks(a,"postAction"),a}if(this.parent?.listenerCount(o))n(),this._processArguments(),this.parent.emit(o,t,r);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,r);this.listenerCount("command:*")?this.emit("command:*",t,r):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(r=>r._name===t||r._aliases.includes(t))}_findOption(t){return this.options.find(r=>r.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(r=>{r.mandatory&&t.getOptionValue(r.attributeName())===void 0&&t.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(i=>{let n=i.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});t.filter(i=>i.conflictsWith.length>0).forEach(i=>{let n=t.find(o=>i.conflictsWith.includes(o.attributeName()));n&&this._conflictingOption(i,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],i=[],n=r;function o(u){return u.length>1&&u[0]==="-"}let a=u=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(u)?!this._getCommandAndAncestors().some(d=>d.options.map(m=>m.short).some(m=>/^-\d$/.test(m))):!1,s=null,c=null,l=0;for(;l<t.length||c;){let u=c??t[l++];if(c=null,u==="--"){n===i&&n.push(u),n.push(...t.slice(l));break}if(s&&(!o(u)||a(u))){this.emit(`option:${s.name()}`,u);continue}if(s=null,o(u)){let d=this._findOption(u);if(d){if(d.required){let m=t[l++];m===void 0&&this.optionMissingArgument(d),this.emit(`option:${d.name()}`,m)}else if(d.optional){let m=null;l<t.length&&(!o(t[l])||a(t[l]))&&(m=t[l++]),this.emit(`option:${d.name()}`,m)}else this.emit(`option:${d.name()}`);s=d.variadic?d:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let d=this._findOption(`-${u[1]}`);if(d){d.required||d.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${d.name()}`,u.slice(2)):(this.emit(`option:${d.name()}`),c=`-${u.slice(2)}`);continue}}if(/^--[^=]+=/.test(u)){let d=u.indexOf("="),m=this._findOption(u.slice(0,d));if(m&&(m.required||m.optional)){this.emit(`option:${m.name()}`,u.slice(d+1));continue}}if(n===r&&o(u)&&!(this.commands.length===0&&a(u))&&(n=i),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&i.length===0){if(this._findCommand(u)){r.push(u),i.push(...t.slice(l));break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){r.push(u,...t.slice(l));break}else if(this._defaultCommandName){i.push(u,...t.slice(l));break}}if(this._passThroughOptions){n.push(u,...t.slice(l));break}n.push(u)}return{operands:r,unknown:i}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let i=0;i<r;i++){let n=this.options[i].attributeName();t[n]=n===this._versionOptionName?this._version:this[n]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){this._outputConfiguration.outputError(`${t}
|
|
22
|
+
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
23
|
+
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
24
|
+
`),this.outputHelp({error:!0}));let i=r||{},n=i.exitCode||1,o=i.code||"commander.error";this._exit(n,o,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in ee.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()}`,ee.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new xo(this.options),r=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&r(i.attributeName())&&t.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(n=>!r(n)).forEach(n=>{this.setOptionValueWithSource(n,i.implied[n],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let i=a=>{let s=a.attributeName(),c=this.getOptionValue(s),l=this.options.find(d=>d.negate&&s===d.attributeName()),u=this.options.find(d=>!d.negate&&s===d.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:u||a},n=a=>{let s=i(a),c=s.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${s.envVar}'`:`option '${s.flags}'`},o=`error: ${n(t)} cannot be used with ${n(r)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let n=[],o=this;do{let a=o.createHelp().visibleOptions(o).filter(s=>s.long).map(s=>s.long);n=n.concat(a),o=o.parent}while(o&&!o._enablePositionalOptions);r=Jc(t,n)}let i=`error: unknown option '${t}'${r}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,i=r===1?"":"s",n=t.length,o=this.parent?` for '${this.name()}'`:"",a=t.join(", "),s=`error: too many arguments${o}. Expected ${r} argument${i} 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(o=>{n.push(o.name()),o.alias()&&n.push(o.alias())}),r=Jc(t,n)}let i=`error: unknown command '${t}'${r}`;this.error(i,{code:"commander.unknownCommand"})}version(t,r,i){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",i=i||"output the version number";let n=this.createOption(r,i);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${t}
|
|
25
|
+
`),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let i=this.parent?._findCommand(t);if(i){let n=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${n}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(i=>_o(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}helpGroup(t){return t===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){return t===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,this)}optionsGroup(t){return t===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){return this._name=Pt.basename(t,Pt.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),i=this._getOutputContext(t);r.prepareContext({error:i.error,helpWidth:i.helpWidth,outputHasColors:i.hasColors});let n=r.formatHelp(this,r);return i.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(t){t=t||{};let r=!!t.error,i,n,o;return r?(i=s=>this._outputConfiguration.writeErr(s),n=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(i=s=>this._outputConfiguration.writeOut(s),n=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:r,write:s=>(n||(s=this._outputConfiguration.stripColor(s)),i(s)),hasColors:n,helpWidth:o}}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let i=this._getOutputContext(t),n={error:i.error,write:i.write,command:this};this._getCommandAndAncestors().reverse().forEach(a=>a.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let o=this.helpInformation({error:i.error});if(r&&(o=r(o),typeof o!="string"&&!Buffer.isBuffer(o)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(o),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(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(ee.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let i=["beforeAll","before","after","afterAll"];if(!i.includes(t))throw new Error(`Unexpected value for position to addHelpText.
|
|
26
|
+
Expecting one of '${i.join("', '")}'`);let n=`${t}Help`;return this.on(n,o=>{let a;typeof r=="function"?a=r({error:o.error,command:o.command}):a=r,a&&o.write(`${a}
|
|
27
|
+
`)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Lh(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,i="127.0.0.1",n="9229",o;return(o=t.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?n=o[3]:i=o[3]):(o=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],i=o[3],n=o[4]),r&&n!=="0"?`${r}=${i}:${parseInt(n)+1}`:t})}function Uh(){if(ee.env.NO_COLOR||ee.env.FORCE_COLOR==="0"||ee.env.FORCE_COLOR==="false")return!1;if(ee.env.FORCE_COLOR||ee.env.CLICOLOR_FORCE!==void 0)return!0}var LN=new tr;var nr=["starter","pro"],zN=["payg",...nr];var ri={payg:{projectsPerWorkspace:1,rankKeywordsPerProject:50,aiPromptsPerProject:10,crawlPagesPerRun:250,dailyMonitoring:!1,agentSpending:!1},starter:{projectsPerWorkspace:5,rankKeywordsPerProject:200,aiPromptsPerProject:25,crawlPagesPerRun:1e3,dailyMonitoring:!1,agentSpending:!0},pro:{projectsPerWorkspace:20,rankKeywordsPerProject:500,aiPromptsPerProject:50,crawlPagesPerRun:1e3,dailyMonitoring:!0,agentSpending:!0}},xn={starter:{label:"Starter",lookupKey:"starterMonthly",monthlyPriceCents:1900,monthlyCredits:2e3},pro:{label:"Pro",lookupKey:"proMonthly",monthlyPriceCents:4900,monthlyCredits:6e3}},zh={payg:"No subscription",starter:xn.starter.label,pro:xn.pro.label};var $o=["error","warning","notice"],lt={error:"Error",warning:"Warning",notice:"Notice"};var Mh={owner:"Owner",editor:"Editor",viewer:"Viewer"};var rr=["projects:read","projects:write","keywords:read","keywords:write","audit:read","audit:write","rankings:read","rankings:write","tasks:read","tasks:write","export:read","billing:read","billing:write","codebase:read","codebase:write","recommendations:read","recommendations:write","mcp:read"],US=["mcp:read"],BN=rr.filter(e=>!US.includes(e)),Io={"projects:read":"Read projects","projects:write":"Create and edit projects","keywords:read":"Read keyword lists","keywords:write":"Research keywords and edit lists","audit:read":"Read crawls and issues","audit:write":"Start crawls","rankings:read":"Read rankings","rankings:write":"Track keywords and start rank checks","tasks:read":"Read tasks","tasks:write":"Create and edit tasks","export:read":"Export data","billing:read":"Read balance and usage","billing:write":"Top up balance","codebase:read":"Read codebase snapshots","codebase:write":"Upload codebase snapshots","recommendations:read":"Read recommendations","recommendations:write":"Accept, dismiss and complete recommendations","mcp:read":"Use the MCP server (read-only)"},ii=["crawl","rank_check","ai_check","monitoring","search_sync","analytics_sync","codebase_snapshot","recommendation_generate"],Co=["queued","running","succeeded","failed","cancelled"],_t={crawl:"Website crawl",rank_check:"Rank check",ai_check:"AI visibility",monitoring:"Monitoring",search_sync:"Search data sync",analytics_sync:"Web analytics sync",codebase_snapshot:"Codebase snapshot",recommendation_generate:"Generate recommendations"},We={queued:"Queued",running:"Running",succeeded:"Completed",failed:"Failed",cancelled:"Cancelled"};var FN=[...ii,"reportEmail","keywordResearch"],Wc={..._t,reportEmail:"Report email",keywordResearch:"Keyword research"},Ao=7,ir=90;var Vh={amazonSes:"Amazon SES",smtp:"SMTP"},or=["open","in_progress","done"],Hc={open:"Open",in_progress:"In progress",done:"Done"},qt=["high","medium","low"],oi={high:"High",medium:"Medium",low:"Low"};var Kc={resolved:"Resolved",partially_resolved:"Partially resolved",still_present:"Still present"},Sn=["desktop","mobile"],Me={desktop:"Desktop",mobile:"Mobile"},Do=["manual","daily","every_3_days","weekly"],Bh={manual:"Manual only",daily:"Daily",every_3_days:"Every 3 days",weekly:"Weekly"};var Ro=["manual","weekly"],Fh={manual:"Manual only",weekly:"Weekly"},To=["auto","always","never"],Jh={auto:"Automatic for empty pages",always:"Always render",never:"Never render"},ai=["slack","discord","custom"];var si=["chat_gpt"],qc={chat_gpt:"ChatGPT"},zS="google_ai_overview",JN=[...si,zS],ZN={...qc,google_ai_overview:"Google AI Overview"},ci={projectsPerWorkspace:ri.pro.projectsPerWorkspace,crawlPagesPerRun:ri.pro.crawlPagesPerRun,aiPromptsPerProject:ri.pro.aiPromptsPerProject,rankKeywordsPerProject:ri.pro.rankKeywordsPerProject,codebaseSnapshotsPerProjectPerDay:20},jt=ci.aiPromptsPerProject,WN=ci.projectsPerWorkspace,Zh=ci.codebaseSnapshotsPerProjectPerDay;var ar=["google","bing"],Gt={google:"Google Search Console",bing:"Bing Webmaster Tools"},Eo=["query","page"];var li=["posthog","plausible","google_analytics"],xt={posthog:"PostHog",plausible:"Plausible Analytics",google_analytics:"Google Analytics 4"};var ui=["google","bing","posthog","plausible"],Xt={google:"Google (Search Console and Analytics)",bing:"Bing Webmaster Tools",posthog:"PostHog",plausible:"Plausible Analytics"};var Wh={search:"AI search",training:"Training",user:"User request"};var di=[10,20,30,50,100];var Hh={informational:"Informational",navigational:"Navigational",commercial:"Commercial",transactional:"Transactional"};var Oo=["issues","keywords","rankings","tasks"],Po=["csv","json"];var Ye=ci.crawlPagesPerRun,Yt=5e3,Kh=700,$n=Kh,Gc=100,pi=500,mi=ci.rankKeywordsPerProject;var qh="Europe/Berlin";var Gh=[{code:"DE",name:"Germany",locationCode:2276,languages:["de","en"],keywordDataLanguages:["de"]},{code:"AT",name:"Austria",locationCode:2040,languages:["de","en"],keywordDataLanguages:["de"]},{code:"CH",name:"Switzerland",locationCode:2756,languages:["de","fr","it","en"],keywordDataLanguages:["de","fr","it"]},{code:"US",name:"United States",locationCode:2840,languages:["en","es"],keywordDataLanguages:["en","es"]},{code:"GB",name:"United Kingdom",locationCode:2826,languages:["en"],keywordDataLanguages:["en"]},{code:"IE",name:"Ireland",locationCode:2372,languages:["en"],keywordDataLanguages:["en"]},{code:"FR",name:"France",locationCode:2250,languages:["fr"],keywordDataLanguages:["fr"]},{code:"BE",name:"Belgium",locationCode:2056,languages:["nl","fr","de"],keywordDataLanguages:["nl","fr","de"]},{code:"NL",name:"Netherlands",locationCode:2528,languages:["nl","en"],keywordDataLanguages:["nl"]},{code:"ES",name:"Spain",locationCode:2724,languages:["es"],keywordDataLanguages:["es"]},{code:"IT",name:"Italy",locationCode:2380,languages:["it"],keywordDataLanguages:["it"]},{code:"PT",name:"Portugal",locationCode:2620,languages:["pt"],keywordDataLanguages:["pt"]},{code:"PL",name:"Poland",locationCode:2616,languages:["pl"],keywordDataLanguages:["pl"]},{code:"CZ",name:"Czechia",locationCode:2203,languages:["cs"],keywordDataLanguages:["cs"]},{code:"SE",name:"Sweden",locationCode:2752,languages:["sv"],keywordDataLanguages:["sv"]},{code:"DK",name:"Denmark",locationCode:2208,languages:["da"],keywordDataLanguages:["da"]},{code:"FI",name:"Finland",locationCode:2246,languages:["fi"],keywordDataLanguages:["fi"]},{code:"RO",name:"Romania",locationCode:2642,languages:["ro"],keywordDataLanguages:["ro"]},{code:"HU",name:"Hungary",locationCode:2348,languages:["hu"],keywordDataLanguages:["hu"]},{code:"GR",name:"Greece",locationCode:2300,languages:["el","en"],keywordDataLanguages:["el","en"]},{code:"TR",name:"Turkey",locationCode:2792,languages:["tr"],keywordDataLanguages:["tr"]},{code:"CA",name:"Canada",locationCode:2124,languages:["en","fr"],keywordDataLanguages:["en","fr"]},{code:"MX",name:"Mexico",locationCode:2484,languages:["es"],keywordDataLanguages:["es"]},{code:"BR",name:"Brazil",locationCode:2076,languages:["pt"],keywordDataLanguages:["pt"]},{code:"AR",name:"Argentina",locationCode:2032,languages:["es"],keywordDataLanguages:["es"]},{code:"CO",name:"Colombia",locationCode:2170,languages:["es"],keywordDataLanguages:["es"]},{code:"CL",name:"Chile",locationCode:2152,languages:["es"],keywordDataLanguages:["es"]},{code:"AU",name:"Australia",locationCode:2036,languages:["en"],keywordDataLanguages:["en"]},{code:"NZ",name:"New Zealand",locationCode:2554,languages:["en"],keywordDataLanguages:["en"]},{code:"IN",name:"India",locationCode:2356,languages:["en","hi"],keywordDataLanguages:["en","hi"]},{code:"PK",name:"Pakistan",locationCode:2586,languages:["en"],keywordDataLanguages:["en"]},{code:"SG",name:"Singapore",locationCode:2702,languages:["en"],keywordDataLanguages:["en"]},{code:"MY",name:"Malaysia",locationCode:2458,languages:["en","ms"],keywordDataLanguages:["en","ms"]},{code:"ID",name:"Indonesia",locationCode:2360,languages:["id","en"],keywordDataLanguages:["id","en"]},{code:"PH",name:"Philippines",locationCode:2608,languages:["en"],keywordDataLanguages:["en"]},{code:"JP",name:"Japan",locationCode:2392,languages:["ja"],keywordDataLanguages:["ja"]},{code:"KR",name:"South Korea",locationCode:2410,languages:["ko"],keywordDataLanguages:["ko"]},{code:"AE",name:"United Arab Emirates",locationCode:2784,languages:["en","ar"],keywordDataLanguages:["en","ar"]},{code:"SA",name:"Saudi Arabia",locationCode:2682,languages:["ar","en"],keywordDataLanguages:["ar","en"]},{code:"EG",name:"Egypt",locationCode:2818,languages:["ar","en"],keywordDataLanguages:["ar","en"]},{code:"ZA",name:"South Africa",locationCode:2710,languages:["en"],keywordDataLanguages:["en"]},{code:"NG",name:"Nigeria",locationCode:2566,languages:["en"],keywordDataLanguages:["en"]},{code:"KE",name:"Kenya",locationCode:2404,languages:["en"],keywordDataLanguages:["en"]}],Xh={de:"German",en:"English",fr:"French",it:"Italian",es:"Spanish",nl:"Dutch",pt:"Portuguese",pl:"Polish",cs:"Czech",sv:"Swedish",da:"Danish",fi:"Finnish",ro:"Romanian",hu:"Hungarian",el:"Greek",tr:"Turkish",hi:"Hindi",ms:"Malay",id:"Indonesian",ja:"Japanese",ko:"Korean",ar:"Arabic"},Yh=Gh.map(e=>e.code),Qh=Object.keys(Xh);function MS(e){let t=e.toUpperCase();return Gh.find(r=>r.code===t)}function eg(e){return MS(e)?.name??e.toUpperCase()}function tg(e){return Xh[e.toLowerCase()]??e}function ut(e){if(!e)return null;let t=e.split(",").map(r=>r.trim()).filter(Boolean);return t.length===0?null:t.slice(0,Math.min(2,Math.max(1,t.length-1))).join(", ")}var VS=[{code:"rendering_recommended",severity:"notice",category:"rendering",title:"Page probably needs JavaScript rendering",why:"The delivered HTML contains almost no text, but there are traces of a JavaScript framework. Without rendering, the crawler can\u2019t reliably check the title, headings, text and links of this page. That\u2019s why Serpel reports no missing-content issues for it, rather than producing false positives.",fix:"Turn on JavaScript rendering in the project settings (\u201CAutomatic for empty pages\u201D or \u201CAlways render\u201D) if the render service is available. The most reliable approach for all crawlers is to deliver title, headings, text and links in the HTML on the server (server-side rendering or static generation).",heuristic:!0},{code:"js_only_content",severity:"warning",category:"rendering",title:"Content only appears via JavaScript",why:"Most of the text only appears on the page after JavaScript runs. Google renders JavaScript with a delay, while many other crawlers and most AI crawlers don\u2019t run it at all and then see the page as almost empty.",fix:"Deliver the main text in the HTML on the server (server-side rendering, static generation or pre-rendering). Only load content via JavaScript that isn\u2019t important for ranking.",heuristic:!1},{code:"js_only_links",severity:"notice",category:"rendering",title:"Internal links only created via JavaScript",why:"A large share of the internal links isn\u2019t in the delivered HTML but is only created by JavaScript. Crawlers without JavaScript then don\u2019t find the linked pages, and link equity isn\u2019t passed on.",fix:"Put important internal links into the delivered HTML as regular <a href> elements, for example in the navigation, and don\u2019t rely on onclick alone for navigation.",heuristic:!1},{code:"js_meta_changed",severity:"notice",category:"rendering",title:"Title, description or H1 change through JavaScript",why:"The delivered HTML and the rendered DOM contain different values. Depending on method and timing, search engines see one version or the other, and other crawlers only see the raw HTML.",fix:"Set the title, meta description and H1 to their final value in the delivered HTML so that JavaScript doesn\u2019t need to change them.",heuristic:!1},{code:"rendered_canonical_differs",severity:"warning",category:"rendering",title:"Canonical differs in the rendered DOM",why:"The canonical in the delivered HTML and the canonical after JavaScript runs name different URLs, or only one of them exists. Conflicting signals can lead Google to ignore the canonical or pick the wrong version.",fix:"Set the canonical only in the delivered HTML and make sure JavaScript doesn\u2019t change, add or remove it.",heuristic:!1},{code:"rendered_robots_differs",severity:"warning",category:"rendering",title:"Meta robots differs in the rendered DOM",why:"The robots directive (for example noindex) differs between the delivered HTML and the rendered DOM. If noindex is already in the HTML, Google often doesn\u2019t render the page at all and misses a correction made by JavaScript. If JavaScript adds noindex, the result depends on when rendering happens.",fix:"Set meta robots only in the delivered HTML or the X-Robots-Tag header and don\u2019t change it with JavaScript.",heuristic:!1},{code:"render_failed",severity:"notice",category:"rendering",title:"Page couldn\u2019t be rendered",why:"The render service couldn\u2019t load the page or hit a timeout. The analysis for this page therefore relies on the delivered HTML only; content that only appears via JavaScript is missing from the check.",fix:"Check whether the page loads completely in the browser and whether scripts or requests take very long or fail. The exact message is in the details of the occurrence.",heuristic:!1},{code:"javascript_errors",severity:"notice",category:"rendering",title:"JavaScript errors while rendering",why:"Errors occurred in the browser console while rendering the page. Faulty scripts can cause content, links or navigation not to appear even though the page looks complete in the source.",fix:"Open the page in the browser\u2019s developer tools, check the console and fix the reported errors. The first messages are in the details of the occurrence.",heuristic:!1}],BS=[{code:"hreflang_invalid_code",severity:"warning",category:"international",title:"hreflang with invalid language or region code",why:"For hreflang, Google only accepts ISO 639-1 language codes, optionally with an ISO 3166-1 alpha 2 region code, plus \u201Cx-default\u201D. Invalid values such as \u201Cen-uk\u201D, \u201Cen_US\u201D or \u201Cde-EU\u201D are ignored, and the language version isn\u2019t assigned.",fix:"Correct the code, for example \u201Cen-GB\u201D instead of \u201Cen-uk\u201D and \u201Cen-US\u201D instead of \u201Cen_US\u201D. The language code always comes before the region code; a region on its own isn\u2019t valid.",heuristic:!1},{code:"hreflang_missing_self",severity:"warning",category:"international",title:"hreflang without self-reference",why:"Every language version must include itself in its own hreflang list. Without the self-reference, Google may evaluate the group of language versions incompletely or not at all.",fix:"Add an entry with the page\u2019s own language code and its own absolute URL to this page\u2019s hreflang list.",heuristic:!1},{code:"hreflang_missing_return",severity:"warning",category:"international",title:"hreflang without return link",why:"hreflang only applies if both pages reference each other. If page A points to page B, B must also point to A. Without the return link, Google ignores the annotation.",fix:"Add an hreflang entry back to the referring page on the affected page. The most reliable approach is to output the same complete list on every language version.",heuristic:!1},{code:"hreflang_target_not_ok",severity:"warning",category:"international",title:"hreflang points to an unsuitable page",why:"An hreflang target must respond with status 200, be indexable and declare itself as its canonical. Targets with an error status, a redirect, noindex or a canonical pointing to another URL are ignored by Google.",fix:"Only point to language versions that respond directly with status 200, aren\u2019t set to noindex and canonicalize to themselves. Otherwise adjust the target or remove the entry.",heuristic:!1},{code:"hreflang_duplicate_language",severity:"warning",category:"international",title:"hreflang language code used several times with different URLs",why:"The same language or region code may only appear once in a list. Several targets for the same code are contradictory, and Google can\u2019t reliably use any of them.",fix:"Keep exactly one URL per language and region code and remove the other entries.",heuristic:!1},{code:"hreflang_conflicting_sources",severity:"warning",category:"international",title:"hreflang annotations conflict between HTML, header and sitemap",why:"hreflang can be in the HTML, the HTTP header and the XML sitemap. If the annotations for the same page differ, it\u2019s unclear which one applies, and Google may ignore them altogether.",fix:"Use exactly one source for hreflang, or make sure all sources list the same language codes and URLs for every page.",heuristic:!1},{code:"hreflang_x_default_missing",severity:"notice",category:"international",title:"hreflang without \u201Cx-default\u201D",why:"The \u201Cx-default\u201D entry names the page for users whose language or region isn\u2019t covered, such as a country selector. Without it, Google decides itself which version these users see.",fix:"Add an hreflang entry \u201Cx-default\u201D with the URL of the default version or the language selector, on all language versions.",heuristic:!1},{code:"hreflang_relative_url",severity:"warning",category:"international",title:"hreflang with relative URL",why:"hreflang references must be full URLs with protocol and domain. Relative paths like \u201C/de/\u201D aren\u2019t recognized as a language version by Google.",fix:"Enter the full, absolute URL in href, for example \u201Chttps://example.com/de/\u201D.",heuristic:!1}],FS=[{code:"soft_404",severity:"error",category:"availability",title:"Soft 404: error page with status code 200",why:"The page shows the content of an error page or is practically identical to the website\u2019s 404 page, but responds with status 200. Google treats such pages as soft 404 and doesn\u2019t index them; they also waste crawl budget.",fix:"Return status code 404 or 410 for content that doesn\u2019t exist. If the page exists, add its actual content; if it no longer exists, redirect it with a 301 to a topically relevant page.",heuristic:!1},{code:"soft_404_possible",severity:"warning",category:"availability",title:"Possible soft 404 page",why:"The page has traits of an error page, for example a note like \u201Cnot found\u201D in the title, very little text or a redirect to the homepage. But it doesn\u2019t respond with 404. Google often treats such pages as soft 404. The assessment is a probability; the confidence is shown in the details.",fix:"Check the page. If it\u2019s actually empty or switched off, return 404 or 410 or redirect it to a topically relevant page. If it\u2019s intended, add content and a meaningful title.",heuristic:!0}],JS=[{code:"structured_data_errors",severity:"warning",category:"structured_data",title:"Structured data with errors",why:"Required fields are missing from the structured data or values are invalid. Google can\u2019t create rich results such as stars, prices, breadcrumbs or events from it.",fix:"Add the required fields named in the details and correct invalid values. Then test the result in Google\u2019s Rich Results Test.",heuristic:!1},{code:"structured_data_warnings",severity:"notice",category:"structured_data",title:"Structured data without recommended fields",why:"The structured data is valid, but fields recommended by Google are missing. Rich results are possible, but with more complete data they\u2019re shown more often and are more informative.",fix:"Add the recommended fields named in the details, as long as the information is visibly present on the page.",heuristic:!1}],ZS=[{code:"lcp_needs_improvement",severity:"notice",category:"web_vitals",title:"Largest Contentful Paint needs improvement",why:"The Largest Contentful Paint (LCP) is between 2.5 and 4 seconds. Google rates up to 2.5 seconds as good. The value shows how quickly visitors see the main content and is part of the page experience assessment.",fix:'Optimize the largest visible element, usually an image or a text block: compress and resize images, load the LCP image with high priority (fetchpriority="high") and without lazy loading, and reduce server response time and blocking resources.',heuristic:!1},{code:"lcp_poor",severity:"warning",category:"web_vitals",title:"Largest Contentful Paint is poor",why:"The Largest Contentful Paint (LCP) is over 4 seconds. Google rates that as poor. Visitors wait too long for the main content and leave more often.",fix:'Optimize the largest visible element, usually an image or a text block: compress and resize images, load the LCP image with high priority (fetchpriority="high") and without lazy loading, and reduce server response time and blocking resources.',heuristic:!1},{code:"inp_needs_improvement",severity:"notice",category:"web_vitals",title:"Interaction to Next Paint needs improvement",why:"The Interaction to Next Paint (INP) is between 200 and 500 milliseconds. Google rates up to 200 milliseconds as good. The page reacts noticeably late to clicks and input.",fix:"Shorten long JavaScript tasks, split up heavy computations, remove unnecessary third-party scripts and keep event handlers short.",heuristic:!1},{code:"inp_poor",severity:"warning",category:"web_vitals",title:"Interaction to Next Paint is poor",why:"The Interaction to Next Paint (INP) is over 500 milliseconds. Google rates that as poor. The page responds sluggishly to clicks, taps and input.",fix:"Shorten long JavaScript tasks, split up heavy computations, remove unnecessary third-party scripts and keep event handlers short.",heuristic:!1},{code:"cls_needs_improvement",severity:"notice",category:"web_vitals",title:"Cumulative Layout Shift needs improvement",why:"The Cumulative Layout Shift (CLS) is between 0.1 and 0.25. Google rates up to 0.1 as good. Content visibly jumps while loading, causing misclicks and frustration.",fix:"Give images, videos and ad slots fixed dimensions (width and height or aspect-ratio), reserve space for content that loads later and load web fonts so that no text shift occurs.",heuristic:!1},{code:"cls_poor",severity:"warning",category:"web_vitals",title:"Cumulative Layout Shift is poor",why:"The Cumulative Layout Shift (CLS) is over 0.25. Google rates that as poor. The page shifts heavily while loading, causing misclicks and frustration.",fix:"Give images, videos and ad slots fixed dimensions (width and height or aspect-ratio), reserve space for content that loads later and load web fonts so that no text shift occurs.",heuristic:!1},{code:"web_vitals_unavailable",severity:"notice",category:"web_vitals",title:"Core Web Vitals couldn\u2019t be measured",why:"The PageSpeed Insights request failed or the quota is exhausted. The crawl was still fully analysed; only the measurements for load time, stability and responsiveness are missing.",fix:"The measurement is retried on the next crawl. The exact cause is in the details. If you run Serpel yourself, add a PageSpeed API key (PAGESPEED_API_KEY) to raise the quota.",heuristic:!1,siteLevel:!0}],WS=[{code:"broken_external_link",severity:"warning",category:"links",title:"External link points to a broken URL",why:"The linked target responds with an error or is unreachable. Visitors end up in a dead end, and the page looks less maintained and trustworthy.",fix:"Replace the link with a working target, for example the source\u2019s new address, or remove it. The affected targets are listed with each occurrence.",heuristic:!1},{code:"external_link_redirect",severity:"notice",category:"links",title:"External links point to redirecting URLs",why:"The linked addresses redirect. That costs load time, and the redirect may eventually disappear so that the link goes nowhere.",fix:"Use the final address shown in the details directly as the link target.",heuristic:!1},{code:"broken_resource",severity:"warning",category:"availability",title:"Embedded resource is unreachable",why:"An embedded image, stylesheet or script responds with an error. The page is therefore displayed incompletely or incorrectly: images don\u2019t appear and scripts fail.",fix:"Correct the resource path or restore the resource. The affected addresses are listed with each occurrence.",heuristic:!1},{code:"resource_redirect",severity:"notice",category:"redirects",title:"Embedded resources are redirected",why:"Images, stylesheets or scripts are loaded through a redirect. Every redirect lengthens the page\u2019s load time.",fix:"Use the final address of the resource directly as the source.",heuristic:!1},{code:"canonical_header_conflict",severity:"warning",category:"indexing",title:"Canonical in HTTP header conflicts with canonical in HTML",why:"The Link header names a different canonical URL than the canonical tag in the HTML. With conflicting signals, Google may ignore both and choose itself.",fix:"Use only one source for the canonical or make sure the header and the HTML name the same absolute URL.",heuristic:!1},{code:"internal_link_tracking_parameters",severity:"warning",category:"links",title:"Internal links with tracking parameters",why:"Internal links with parameters like utm_source, gclid or sessionid create many URL variants for each page. That dilutes signals, wastes crawl budget and splits visits into new sessions in web analytics. These parameters were removed during the crawl so pages aren\u2019t counted multiple times.",fix:"Remove tracking parameters from all internal links. Use events in your web analytics for internal clicks instead of parameters, and set a canonical to the clean URL on the target pages.",heuristic:!1},{code:"internal_nofollow_link",severity:"notice",category:"links",title:"Internal links with nofollow",why:'With rel="nofollow" on internal links, pages pass no link equity to the target and don\u2019t improve its discoverability. That\u2019s rarely intended internally.',fix:"Remove nofollow from internal links that search engines should follow. Keep it only on links that shouldn\u2019t be counted on purpose, such as logins or shopping carts.",heuristic:!1},{code:"link_anchor_empty",severity:"warning",category:"links",title:"Links without anchor text",why:"Anchor text tells search engines and screen readers where a link leads. Links with no text, no image alt text and no aria-label don\u2019t pass on this information.",fix:"Add meaningful link text. For image links, set an alt text; for icons, an aria-label.",heuristic:!1},{code:"link_anchor_generic",severity:"notice",category:"links",title:"Links with generic anchor text",why:"Texts like \u201Cclick here\u201D, \u201Cmore\u201D or \u201Cread more\u201D tell neither visitors nor search engines what the target page is about. Descriptive anchor text strengthens the topic of the linked page.",fix:"Write the link text so that it describes the target, for example \u201CView pricing and plans\u201D instead of \u201Cclick here\u201D.",heuristic:!0}],HS=[{code:"open_graph_missing",severity:"notice",category:"social",title:"Open Graph tags are missing or incomplete",why:"Open Graph controls the title, description and preview image when the page is shared on social networks or messengers. Without them, random or no previews appear.",fix:"Add the meta tags og:title, og:description, og:image and og:url to the <head>. The preview image should be at least 1200 by 630 pixels.",heuristic:!1},{code:"twitter_card_missing",severity:"notice",category:"social",title:"Twitter card (X) is missing",why:"Without twitter:card, X shows shared links only as a plain preview, even if Open Graph tags are present. The large preview image is only available with the card tag.",fix:'Add <meta name="twitter:card" content="summary_large_image"> and, if needed, twitter:title, twitter:description and twitter:image.',heuristic:!1},{code:"page_too_large",severity:"warning",category:"performance",title:"HTML document too large",why:"Google only reads the first 2 megabytes of an HTML file. Everything after that, including links and structured data, isn\u2019t evaluated. Very large documents also load slowly.",fix:"Reduce the HTML: move inline CSS, JavaScript and Base64 images into separate files, split very long lists across several pages and remove unnecessary markup.",heuristic:!1},{code:"response_truncated",severity:"warning",category:"performance",title:"Response exceeds the crawler\u2019s size limit",why:"The response was larger than the 5 megabyte limit and was cut off. The analysis of this page is incomplete, and search engines also read only part of it.",fix:"Reduce the HTML significantly, for example by moving inline CSS, JavaScript and data into separate files or by splitting the page.",heuristic:!1},{code:"heading_level_skipped",severity:"notice",category:"headings",title:"Heading level skipped",why:"The headings jump, for example, from H2 to H4. A clean outline helps screen readers, search engines and readers understand the structure of the page.",fix:"Use heading levels in order without gaps (H1, H2, H3) and choose the level by structure, not by the font size you want.",heuristic:!1},{code:"heading_empty",severity:"warning",category:"headings",title:"Empty heading",why:"A heading without text carries no information but appears in the outline and is announced by screen readers.",fix:"Add text to the heading or remove the element. For plain spacing, use CSS instead of headings.",heuristic:!1},{code:"image_missing_dimensions",severity:"notice",category:"images",title:"Images without width and height",why:"Without fixed dimensions, the browser reserves no space before loading. The page jumps as soon as the image appears and worsens the Cumulative Layout Shift.",fix:"Set the width and height attributes on every img to the original dimensions or define an aspect-ratio in CSS.",heuristic:!1},{code:"lcp_image_lazy_loaded",severity:"warning",category:"images",title:"Most important image is lazy loaded",why:'The largest image in the visible area, probably the LCP element, has loading="lazy". The browser then loads it late, and the Largest Contentful Paint gets noticeably worse.',fix:'Remove loading="lazy" from images in the visible area and set fetchpriority="high" on the most important image. Lazy loading only belongs on images further down the page.',heuristic:!0},{code:"render_blocking_resources",severity:"notice",category:"performance",title:"Render-blocking resources in the head",why:"Scripts without async or defer and many stylesheets in the <head> hold up the first visible rendering of the page. That worsens First Contentful Paint and Largest Contentful Paint.",fix:"Load scripts with defer or async, include only critical CSS as blocking and load other stylesheets later or combine them.",heuristic:!0}],ng=[...VS,...BS,...FS,...JS,...ZS,...WS,...HS];var Xc={availability:"Availability",redirects:"Redirects",meta:"Title and description",headings:"Headings",indexing:"Indexing",crawling:"robots.txt and sitemap",links:"Linking",images:"Images",security:"HTTPS",content:"Content",performance:"Response time",mobile:"Mobile display",structured_data:"Structured data",ai_search:"AI search",rendering:"JavaScript rendering",international:"Multilingual (hreflang)",web_vitals:"Core Web Vitals",social:"Social previews"},KS=[{code:"http_4xx",severity:"error",category:"availability",title:"Internal URL returns a 4xx status code",why:"Search engines and visitors land on an error page. The URL can\u2019t rank, and link equity pointing to it is lost.",fix:"Restore the content or redirect the URL with a 301 to the most relevant working page. Update internal links to point directly to the new target.",heuristic:!1},{code:"http_5xx",severity:"error",category:"availability",title:"Internal URL returns a server error (5xx)",why:"Server errors prevent crawling. If they persist, Google reduces its crawl rate and may remove pages from the index.",fix:"Check the server and application logs for the time shown and fix the cause. Then run the crawl again.",heuristic:!1},{code:"request_failed",severity:"error",category:"availability",title:"URL can\u2019t be fetched (timeout or connection error)",why:"The page didn\u2019t respond or the connection failed. If the crawler can\u2019t fetch it, a search engine can\u2019t reliably index it either.",fix:"Check availability, DNS, TLS certificate and response time of the URL. Very slow pages should respond completely within 10 seconds.",heuristic:!1},{code:"broken_internal_link",severity:"error",category:"links",title:"Internal link points to a broken URL",why:"Broken links send visitors into dead ends and waste crawl budget. The linking page passes link equity to an error page.",fix:"Change the link target to a working URL or remove the link. The affected link targets are listed with each occurrence.",heuristic:!1},{code:"redirect_loop",severity:"error",category:"redirects",title:"Redirect loop",why:"The redirect goes in circles. Neither browsers nor search engines ever reach any content.",fix:"Correct the redirect rules so that every URL points to a target with status 200 in at most one step.",heuristic:!1},{code:"redirect_chain",severity:"warning",category:"redirects",title:"Redirect chain with several hops",why:"Every additional hop costs load time and crawl budget. Google only follows chains up to a limit.",fix:"Redirect the original URL directly to the final target and update internal links to point to the final target.",heuristic:!1},{code:"redirect_temporary",severity:"notice",category:"redirects",title:"Temporary redirect (302/307)",why:"Temporary redirects signal that the old URL will come back. That\u2019s the wrong signal for permanent moves.",fix:"If the redirect is meant to be permanent, change it to 301 or 308.",heuristic:!1},{code:"internal_link_to_redirect",severity:"notice",category:"links",title:"Internal links point to redirecting URLs",why:"Links to redirects create unnecessary extra hops for visitors and crawlers.",fix:"Point the internal links directly to the redirect target.",heuristic:!1},{code:"title_missing",severity:"error",category:"meta",title:"Title is missing",why:"The title is one of the most important on-page signals and usually the headline in search results. Without a title, Google generates one itself.",fix:"Add a unique, descriptive title with the main topic of the page, ideally 30 to 60 characters.",heuristic:!1},{code:"title_duplicate",severity:"warning",category:"meta",title:"Same title on several pages",why:"Identical titles make it hard for search engines to pick the right page for a query and look interchangeable in search results.",fix:"Write a separate title for every indexable page that describes its specific content.",heuristic:!1},{code:"title_too_long",severity:"notice",category:"meta",title:"Title is probably too long",why:"Google truncates titles by pixel width, roughly from about 60 characters. Important terms at the end then aren\u2019t shown.",fix:"Shorten the title or move the most important terms to the beginning. The character limit is a rule of thumb, not a hard limit.",heuristic:!0},{code:"title_too_short",severity:"notice",category:"meta",title:"Title is very short",why:"Very short titles don\u2019t use the space available in search results and often describe the content too vaguely.",fix:"Extend the title with the specific topic or offer of the page.",heuristic:!0},{code:"meta_description_missing",severity:"warning",category:"meta",title:"Meta description is missing",why:"Without a description, Google picks a text snippet itself. A good description can improve the click-through rate in search results.",fix:"Add a meta description that summarizes the benefit of the page in 70 to 160 characters.",heuristic:!1},{code:"meta_description_duplicate",severity:"warning",category:"meta",title:"Same meta description on several pages",why:"Duplicate descriptions are often ignored by Google and give searchers no way to tell the pages apart.",fix:"Write a separate description for every indexable page.",heuristic:!1},{code:"meta_description_too_long",severity:"notice",category:"meta",title:"Meta description is probably too long",why:"Long descriptions are cut off in search results, roughly from about 160 characters.",fix:"Shorten the description and put the key message first.",heuristic:!0},{code:"meta_description_too_short",severity:"notice",category:"meta",title:"Meta description is very short",why:"Very short descriptions barely use the space in search results and are more often replaced by a snippet Google picks itself.",fix:"Extend the description with the benefit and specific content of the page.",heuristic:!0},{code:"h1_missing",severity:"warning",category:"headings",title:"H1 heading is missing",why:"The H1 names the main topic of the page for visitors and search engines.",fix:"Add exactly one visible H1 that describes the main topic of the page.",heuristic:!1},{code:"h1_multiple",severity:"notice",category:"headings",title:"Multiple H1 headings",why:"Multiple H1s are technically allowed but often dilute the weight of the main topic.",fix:"Check whether one H1 carries the main topic and demote the others to H2.",heuristic:!1},{code:"noindex",severity:"notice",category:"indexing",title:"Page is set to noindex",why:"The page isn\u2019t added to the search index. That\u2019s only right if you want to exclude it on purpose.",fix:"Check whether the exclusion is intended. If not, remove noindex from the meta robots tag or the X-Robots-Tag header.",heuristic:!1},{code:"nofollow_page",severity:"notice",category:"indexing",title:"Page tells search engines not to follow links (nofollow)",why:"With page-level nofollow, the page passes no signals to the pages it links to.",fix:"Remove nofollow from the meta robots tag or the X-Robots-Tag unless it was set on purpose.",heuristic:!1},{code:"canonical_missing",severity:"notice",category:"indexing",title:"No canonical tag",why:"A self-referencing canonical helps search engines map variants with parameters or different spellings to the right URL.",fix:"Add a canonical tag with the page\u2019s own absolute URL on indexable pages.",heuristic:!1},{code:"canonical_multiple",severity:"warning",category:"indexing",title:"Multiple canonical tags",why:"If the canonical declarations conflict, Google ignores all of them.",fix:"Keep exactly one canonical tag in the head of the page.",heuristic:!1},{code:"canonical_to_other",severity:"notice",category:"indexing",title:"Canonical points to a different URL",why:"The page reports another URL as the authoritative version. Only the target should then rank.",fix:"Check whether that\u2019s intended. If the page is standalone, set the canonical to its own URL.",heuristic:!1},{code:"canonical_target_error",severity:"warning",category:"indexing",title:"Canonical target is unreachable or redirects",why:"A canonical pointing to an error page or a redirect is a conflicting signal and is often ignored.",fix:"Point the canonical to a URL that responds directly with status 200 and is indexable.",heuristic:!1},{code:"canonical_invalid",severity:"warning",category:"indexing",title:"Canonical tag is invalid",why:"An empty or unresolvable canonical can\u2019t be evaluated.",fix:"Enter a complete, absolute URL in the href attribute.",heuristic:!1},{code:"robots_txt_missing",severity:"notice",category:"crawling",title:"No robots.txt found",why:"Without a robots.txt, everything may be crawled. That\u2019s allowed, but it lacks the usual place for the sitemap reference.",fix:"Create a file at /robots.txt, at least with a reference to the XML sitemap.",heuristic:!1,siteLevel:!0},{code:"robots_txt_error",severity:"error",category:"crawling",title:"robots.txt responds with a server error",why:"If robots.txt keeps returning a 5xx status, Google treats the entire website as if it were blocked.",fix:"Make sure /robots.txt responds with status 200 (or 404 if there is none).",heuristic:!1,siteLevel:!0},{code:"start_url_blocked",severity:"error",category:"crawling",title:"Start URL blocked by robots.txt",why:"The robots.txt forbids crawling the homepage. Search engines then see no content.",fix:"Remove the relevant Disallow rule if the website should be indexed.",heuristic:!1,siteLevel:!0},{code:"blocked_by_robots",severity:"notice",category:"crawling",title:"Internally linked URL blocked by robots.txt",why:"The URL is linked internally but may not be crawled. Blocked URLs can still end up in the index without content.",fix:"Check whether the block is intended. For pages that should stay out permanently, noindex is often the better tool.",heuristic:!1},{code:"sitemap_missing",severity:"notice",category:"crawling",title:"No XML sitemap found",why:"A sitemap helps search engines find all important URLs, especially deeply linked and new pages.",fix:"Create an XML sitemap with all indexable URLs and reference it in robots.txt.",heuristic:!1,siteLevel:!0},{code:"sitemap_invalid",severity:"warning",category:"crawling",title:"Sitemap can\u2019t be read",why:"The sitemap can\u2019t be fetched or isn\u2019t valid XML. Search engines can\u2019t use it then.",fix:"Check availability, content type and XML syntax of the sitemap.",heuristic:!1,siteLevel:!0},{code:"sitemap_url_not_ok",severity:"warning",category:"crawling",title:"Sitemap contains broken, redirecting or non-indexable URLs",why:"A sitemap should only contain canonical, indexable URLs with status 200. Faulty entries reduce trust in the sitemap.",fix:"Remove the affected URLs from the sitemap or replace them with their target addresses.",heuristic:!1},{code:"orphan_page",severity:"warning",category:"links",title:"Page only found via the sitemap (no internal links)",why:"Pages without internal links receive no link equity and are hardly found by visitors.",fix:"Link the page from topically relevant pages or the navigation.",heuristic:!0},{code:"deep_page",severity:"notice",category:"links",title:"High click depth",why:"Pages that can only be reached after many clicks from the homepage are crawled less often and are often seen as less important.",fix:"Shorten the click path with links from the navigation, category pages or hub pages.",heuristic:!0},{code:"image_missing_alt",severity:"warning",category:"images",title:"Images without alt attribute",why:"Alt text describes images for screen readers and search engines. Without an alt attribute, this information is missing entirely.",fix:'Add meaningful alt text. For purely decorative images, set an empty alt="".',heuristic:!1},{code:"https_missing",severity:"error",category:"security",title:"Website isn\u2019t reachable over HTTPS",why:"HTTPS is a ranking signal and a prerequisite for browsers not marking the page as insecure.",fix:"Set up a valid TLS certificate and redirect all HTTP URLs to HTTPS with a 301.",heuristic:!1,siteLevel:!0},{code:"http_not_redirected",severity:"warning",category:"security",title:"HTTP version doesn\u2019t redirect to HTTPS",why:"If the page is reachable over both HTTP and HTTPS, duplicate versions arise and visitors can land on an unencrypted version.",fix:"Redirect http:// permanently (301) to the HTTPS variant.",heuristic:!1,siteLevel:!0},{code:"internal_http_link",severity:"warning",category:"security",title:"Internal links to HTTP URLs",why:"Links to the unencrypted variant cause extra redirects and can expose duplicate versions.",fix:"Switch internal links to https://, ideally as relative or protocol-relative paths.",heuristic:!1},{code:"mixed_content",severity:"warning",category:"security",title:"HTTPS page loads resources over HTTP (mixed content)",why:"Browsers block insecure scripts and stylesheets on HTTPS pages. The page may therefore display incorrectly.",fix:"Load all images, scripts, stylesheets and frames over HTTPS.",heuristic:!1},{code:"duplicate_content",severity:"warning",category:"content",title:"Identical text content on several URLs",why:"Multiple URLs with identical text compete with each other. Search engines then pick a version themselves.",fix:"Merge the pages, redirect duplicates with a 301 or set a canonical to the main version.",heuristic:!0},{code:"near_duplicate_content",severity:"notice",category:"content",title:"Very similar text content",why:"The texts differ only slightly. That can be intended, for example with variants, but often points to interchangeable pages.",fix:"Check whether the pages offer unique value. Differentiate the content or consolidate it with a canonical.",heuristic:!0},{code:"thin_content",severity:"notice",category:"content",title:"Little text content",why:"Pages with very little text rarely answer search queries comprehensively. Word count alone says nothing about quality, though.",fix:"Check whether the page covers the topic sufficiently and add helpful content if needed.",heuristic:!0},{code:"slow_response",severity:"notice",category:"performance",title:"Slow server response",why:"Long response times hurt the user experience and limit how many pages Google crawls per visit.",fix:"Check caching, database queries and server resources for the affected URLs.",heuristic:!0},{code:"viewport_missing",severity:"warning",category:"mobile",title:"Viewport tag is missing",why:'Without <meta name="viewport">, smartphones show the page scaled down in desktop width. Google evaluates the mobile version of a page.',fix:'Add <meta name="viewport" content="width=device-width, initial-scale=1"> to the <head>.',heuristic:!1},{code:"html_lang_missing",severity:"notice",category:"content",title:"Language not specified in the HTML",why:"The lang attribute tells browsers, screen readers and translation services which language the page is written in.",fix:'Set the language on the html element, for example <html lang="en">.',heuristic:!1},{code:"structured_data_invalid",severity:"warning",category:"structured_data",title:"Structured data can\u2019t be read",why:"A JSON-LD block with syntax errors is ignored completely by search engines. Rich results such as breadcrumbs, ratings or FAQ are then lost.",fix:'Check the contents of the <script type="application/ld+json"> for missing commas, quotation marks or brackets and test it in Google\u2019s Rich Results Test.',heuristic:!1},{code:"search_crawler_blocked",severity:"error",category:"crawling",title:"Search engine crawler blocked by robots.txt",why:"The robots.txt forbids Googlebot or Bingbot from fetching the homepage. New and changed content then no longer reaches the index.",fix:"Remove the Disallow rule for the blocked crawler from robots.txt or limit it to the paths that should really be blocked.",heuristic:!1,siteLevel:!0},{code:"ai_search_crawler_blocked",severity:"warning",category:"ai_search",title:"AI search crawler blocked by robots.txt",why:"Crawlers such as OAI-SearchBot, Claude-SearchBot or PerplexityBot fetch content for AI search. If they\u2019re blocked, the website can\u2019t appear as a source in ChatGPT, Claude or Perplexity.",fix:"Allow the search crawlers in robots.txt. Training crawlers such as GPTBot or ClaudeBot can be blocked separately.",heuristic:!1,siteLevel:!0},{code:"llms_txt_missing",severity:"notice",category:"ai_search",title:"llms.txt is missing",why:"The llms.txt summarises for language models which pages of a website matter. It\u2019s a young proposal, not a standard: coding agents and some tools read it, but no major AI search provider has confirmed using it.",fix:"Create a short Markdown file at /llms.txt with a name, a description and links to the most important pages.",heuristic:!1,siteLevel:!0}],rg=[...KS,...ng],qS=Object.fromEntries(rg.map(e=>[e.code,e])),XN=rg.map(e=>e.code);function Yc(e){let t=qS[e];return t||{code:e,severity:"notice",category:"content",title:e,why:"",fix:"",heuristic:!1}}var YN={titleMaxChars:60,titleMinChars:15,descriptionMaxChars:160,descriptionMinChars:70,deepPageDepth:4,thinContentWords:150,slowResponseMs:2e3,nearDuplicateHammingDistance:3,duplicateMinWords:50,titleMaxPixels:580,descriptionMaxPixels:985,titleFontPixels:20,descriptionFontPixels:14,pageMaxBytes:2*1024*1024,shellMaxWords:50,jsOnlyMinWords:50,jsOnlyShare:.5,jsOnlyLinkMin:3,renderBlockingScripts:1,renderBlockingStyles:4,softNotFoundHigh:.85,softNotFoundPossible:.5,externalLinkExamples:25};var GS=/^(?=.{1,253}$)(?!-)[a-z0-9-]{1,63}(?<!-)(\.(?!-)[a-z0-9-]{1,63}(?<!-))+$/;function ig(e){let t=e.trim();if(!t)throw new Error("Enter a domain.");let r=/^[a-z][a-z0-9+.-]*:\/\//i.test(t)?t:`https://${t}`,i;try{i=new URL(r)}catch{throw new Error(`\u201C${e}\u201D isn\u2019t a valid domain.`)}if(i.protocol!=="https:"&&i.protocol!=="http:")throw new Error("Only http and https URLs are allowed.");if(i.username||i.password)throw new Error("Credentials in the URL aren\u2019t allowed.");if(i.port&&i.port!=="80"&&i.port!=="443")throw new Error("Only the standard ports 80 and 443 are supported.");let n=i.hostname.toLowerCase().replace(/\.$/,"");if(/^\d{1,3}(\.\d{1,3}){3}$/.test(n)||n.startsWith("["))throw new Error("Enter a domain name instead of an IP address.");if(!GS.test(n))throw new Error(`\u201C${e}\u201D isn\u2019t a valid public domain.`);if(n==="localhost"||n.endsWith(".localhost")||n.endsWith(".local")||n.endsWith(".internal"))throw new Error("Local or internal hostnames can\u2019t be analysed.");let o=n.startsWith("www.")?n.slice(4):n,a=i.pathname&&i.pathname!==""?i.pathname:"/",s=`${i.protocol}//${n}${a}${i.search}`;return{domain:o,host:n,startUrl:s}}var p={};Et(p,{$brand:()=>pl,$input:()=>Ld,$output:()=>Nd,INVALID:()=>Pe,NEVER:()=>dl,TimePrecision:()=>Kd,ZodAny:()=>jm,ZodArray:()=>zm,ZodBase64:()=>Ts,ZodBase64URL:()=>Es,ZodBigInt:()=>Fr,ZodBigIntFormat:()=>js,ZodBoolean:()=>Br,ZodCIDRv4:()=>Ds,ZodCIDRv6:()=>Rs,ZodCUID:()=>_s,ZodCUID2:()=>xs,ZodCatch:()=>sf,ZodCodec:()=>so,ZodCompileAsyncError:()=>pt,ZodCompileUnsupportedError:()=>q,ZodCreditCard:()=>Cm,ZodCustom:()=>co,ZodCustomStringFormat:()=>Fn,ZodDate:()=>to,ZodDefault:()=>ef,ZodDiscriminatedUnion:()=>Vm,ZodE164:()=>Os,ZodEmail:()=>vs,ZodEmoji:()=>ws,ZodEnum:()=>zr,ZodError:()=>pD,ZodExactOptional:()=>zs,ZodFile:()=>Gm,ZodFirstPartyTypeKind:()=>kf,ZodFunction:()=>yf,ZodGUID:()=>bs,ZodIBAN:()=>Am,ZodIPv4:()=>Cs,ZodIPv6:()=>As,ZodISODate:()=>ln,ZodISODateTime:()=>cn,ZodISODuration:()=>dn,ZodISOTime:()=>un,ZodInstanceOf:()=>wf,ZodIntersection:()=>Bm,ZodIssueCode:()=>hD,ZodJWT:()=>Ps,ZodKSUID:()=>Is,ZodLazy:()=>ff,ZodLiteral:()=>qm,ZodMAC:()=>Im,ZodMap:()=>Hm,ZodNaN:()=>lf,ZodNanoID:()=>ks,ZodNever:()=>Lm,ZodNonOptional:()=>Ms,ZodNull:()=>Om,ZodNullable:()=>Qm,ZodNumber:()=>Vr,ZodNumberFormat:()=>Jn,ZodObject:()=>ro,ZodOptional:()=>oo,ZodPipe:()=>ao,ZodPrefault:()=>nf,ZodPreprocess:()=>uf,ZodPromise:()=>gf,ZodReadonly:()=>df,ZodRealError:()=>Ze,ZodRecord:()=>Ur,ZodSet:()=>Km,ZodString:()=>Mr,ZodStringFormat:()=>ie,ZodSuccess:()=>af,ZodSymbol:()=>Tm,ZodTemplateLiteral:()=>mf,ZodTransform:()=>Xm,ZodTuple:()=>Jm,ZodType:()=>Z,ZodULID:()=>Ss,ZodURL:()=>eo,ZodUUID:()=>Ct,ZodUndefined:()=>Em,ZodUnion:()=>io,ZodUnknown:()=>Nm,ZodVoid:()=>Um,ZodXID:()=>$s,ZodXor:()=>Mm,_ZodString:()=>ys,_default:()=>tf,_function:()=>Ub,any:()=>hb,array:()=>no,base64:()=>qv,base64url:()=>Gv,bigint:()=>ub,boolean:()=>Rm,catch:()=>cf,check:()=>zb,cidrv4:()=>Hv,cidrv6:()=>Kv,clone:()=>te,codec:()=>Pb,coerce:()=>xf,compile:()=>Vd,config:()=>le,core:()=>Mt,creditCard:()=>Yv,cuid:()=>zv,cuid2:()=>Mv,currencyCode:()=>ib,custom:()=>Mb,date:()=>yb,decode:()=>bm,decodeAsync:()=>km,deepPartial:()=>Qb,describe:()=>Vb,discriminatedUnion:()=>xb,e164:()=>Xv,email:()=>Dv,emoji:()=>Lv,encode:()=>vm,encodeAsync:()=>wm,endsWith:()=>Cr,enum:()=>Ls,exactOptional:()=>Ym,file:()=>Rb,flattenError:()=>xi,float32:()=>ab,float64:()=>sb,formatError:()=>Si,fromJSONSchema:()=>Xb,function:()=>Ub,getDiscriminatedOption:()=>ud,getErrorMap:()=>yD,globalRegistry:()=>_e,gt:()=>$t,gte:()=>Ke,guid:()=>Rv,hash:()=>ob,hex:()=>rb,hostname:()=>nb,httpUrl:()=>Nv,iban:()=>Qv,includes:()=>$r,input:()=>tw,instanceof:()=>Fb,int:()=>hs,int32:()=>cb,int64:()=>db,intersection:()=>Fm,invertCodec:()=>jb,ipv4:()=>Jv,ipv6:()=>Wv,iso:()=>lo,json:()=>Zb,jwt:()=>eb,keyof:()=>vb,ksuid:()=>Fv,lazy:()=>hf,length:()=>Un,literal:()=>Db,locales:()=>Ji,looseObject:()=>kb,looseRecord:()=>$b,lowercase:()=>xr,lt:()=>St,lte:()=>He,mac:()=>Zv,map:()=>Ib,maxLength:()=>Ln,maxSize:()=>rn,memoizer:()=>Bi,meta:()=>Bb,mime:()=>Dr,minLength:()=>zt,minSize:()=>It,multipleOf:()=>nn,nan:()=>Ob,nanoid:()=>Uv,nativeEnum:()=>Ab,negative:()=>is,never:()=>Ns,nonnegative:()=>as,nonoptional:()=>of,nonpositive:()=>os,normalize:()=>Rr,null:()=>Pm,nullable:()=>Qi,nullish:()=>Tb,number:()=>Dm,object:()=>bb,optional:()=>Vn,output:()=>nw,overwrite:()=>mt,parse:()=>fm,parseAsync:()=>hm,partialRecord:()=>Sb,pipe:()=>gs,positive:()=>rs,prefault:()=>rf,preprocess:()=>Wb,prettifyError:()=>yl,promise:()=>Lb,properties:()=>Ar,property:()=>ss,readonly:()=>pf,record:()=>Wm,refine:()=>vf,regex:()=>_r,regexes:()=>tt,registry:()=>Ea,safeDecode:()=>xm,safeDecodeAsync:()=>$m,safeEncode:()=>_m,safeEncodeAsync:()=>Sm,safeParse:()=>gm,safeParseAsync:()=>ym,set:()=>Cb,setErrorMap:()=>gD,size:()=>Nn,slugify:()=>Pr,startsWith:()=>Ir,strictObject:()=>wb,string:()=>Yi,stringFormat:()=>tb,stringbool:()=>Jb,success:()=>Eb,superRefine:()=>bf,symbol:()=>mb,templateLiteral:()=>Nb,toJSONSchema:()=>ds,toLowerCase:()=>Er,toUpperCase:()=>Or,toZod:()=>fi,transform:()=>Us,treeifyError:()=>gl,trim:()=>Tr,tuple:()=>Zm,uint32:()=>lb,uint64:()=>pb,ulid:()=>Vv,undefined:()=>fb,union:()=>Jr,unknown:()=>Mn,uppercase:()=>Sr,url:()=>jv,util:()=>_,uuid:()=>Tv,uuidv4:()=>Ev,uuidv6:()=>Ov,uuidv7:()=>Pv,validate:()=>$i,validateAsync:()=>Ii,void:()=>gb,withParser:()=>Oa,xid:()=>Bv,xor:()=>_b});var Mt={};Et(Mt,{$ZodAny:()=>nd,$ZodArray:()=>sd,$ZodAsyncError:()=>Fe,$ZodBase64:()=>Ju,$ZodBase64URL:()=>Zu,$ZodBigInt:()=>va,$ZodBigIntFormat:()=>Yu,$ZodBoolean:()=>Ni,$ZodCIDRv4:()=>Bu,$ZodCIDRv6:()=>Fu,$ZodCUID:()=>Ru,$ZodCUID2:()=>Tu,$ZodCatch:()=>Id,$ZodCheck:()=>oe,$ZodCheckBigIntFormat:()=>ru,$ZodCheckEndsWith:()=>hu,$ZodCheckGreaterThan:()=>na,$ZodCheckIncludes:()=>mu,$ZodCheckLengthEquals:()=>lu,$ZodCheckLessThan:()=>ta,$ZodCheckLowerCase:()=>du,$ZodCheckMaxLength:()=>su,$ZodCheckMaxSize:()=>iu,$ZodCheckMimeType:()=>vu,$ZodCheckMinLength:()=>cu,$ZodCheckMinSize:()=>ou,$ZodCheckMultipleOf:()=>tu,$ZodCheckNumberFormat:()=>nu,$ZodCheckOverwrite:()=>bu,$ZodCheckProperties:()=>yu,$ZodCheckProperty:()=>gu,$ZodCheckRegex:()=>uu,$ZodCheckSizeEquals:()=>au,$ZodCheckStartsWith:()=>fu,$ZodCheckStringFormat:()=>yr,$ZodCheckUpperCase:()=>pu,$ZodCodec:()=>Ui,$ZodCreditCard:()=>Hu,$ZodCustom:()=>Od,$ZodCustomStringFormat:()=>Gu,$ZodCyclicError:()=>$a,$ZodDate:()=>ad,$ZodDefault:()=>_d,$ZodDiscriminatedUnion:()=>dd,$ZodE164:()=>Wu,$ZodEmail:()=>Su,$ZodEmoji:()=>Au,$ZodEncodeError:()=>tn,$ZodEnum:()=>gd,$ZodError:()=>hl,$ZodExactOptional:()=>wd,$ZodFile:()=>vd,$ZodFunction:()=>Td,$ZodGUID:()=>_u,$ZodIBAN:()=>Ku,$ZodIPv4:()=>zu,$ZodIPv6:()=>Mu,$ZodISODate:()=>Nu,$ZodISODateTime:()=>ju,$ZodISODuration:()=>Uu,$ZodISOTime:()=>Lu,$ZodIntersection:()=>pd,$ZodJWT:()=>qu,$ZodKSUID:()=>Pu,$ZodLazy:()=>zi,$ZodLiteral:()=>yd,$ZodMAC:()=>Vu,$ZodMap:()=>fd,$ZodNaN:()=>Cd,$ZodNanoID:()=>Du,$ZodNever:()=>id,$ZodNonOptional:()=>Sd,$ZodNull:()=>td,$ZodNullable:()=>kd,$ZodNumber:()=>ya,$ZodNumberFormat:()=>Xu,$ZodObject:()=>zg,$ZodObjectJIT:()=>cd,$ZodOptional:()=>wa,$ZodPipe:()=>ka,$ZodPrefault:()=>xd,$ZodPreprocess:()=>Ad,$ZodPromise:()=>Ed,$ZodReadonly:()=>Dd,$ZodRealError:()=>Je,$ZodRecord:()=>md,$ZodRegistry:()=>Ta,$ZodSet:()=>hd,$ZodString:()=>Tn,$ZodStringFormat:()=>ne,$ZodSuccess:()=>$d,$ZodSymbol:()=>Qu,$ZodTemplateLiteral:()=>Rd,$ZodTransform:()=>bd,$ZodTuple:()=>ba,$ZodType:()=>F,$ZodULID:()=>Eu,$ZodURL:()=>Cu,$ZodUUID:()=>xu,$ZodUndefined:()=>ed,$ZodUnion:()=>Li,$ZodUnknown:()=>rd,$ZodVoid:()=>od,$ZodXID:()=>Ou,$ZodXor:()=>ld,$brand:()=>pl,$constructor:()=>g,$input:()=>Ld,$output:()=>Nd,Doc:()=>Rn,INVALID:()=>Pe,JSONSchema:()=>Iv,JSONSchemaGenerator:()=>ps,NEVER:()=>dl,TimePrecision:()=>Kd,URL_BAD_FORMAT:()=>$u,URL_UNPARSEABLE:()=>Ti,ZodCompileAsyncError:()=>pt,ZodCompileUnsupportedError:()=>q,_any:()=>dp,_array:()=>vp,_base64:()=>Qa,_base64url:()=>es,_bigint:()=>ip,_boolean:()=>np,_catch:()=>eD,_check:()=>uv,_cidrv4:()=>Xa,_cidrv6:()=>Ya,_coercedBigint:()=>op,_coercedBoolean:()=>rp,_coercedDate:()=>gp,_coercedNumber:()=>Gd,_coercedString:()=>Jd,_creditCard:()=>Wd,_cuid:()=>Ja,_cuid2:()=>Za,_custom:()=>wp,_date:()=>hp,_decode:()=>Jo,_decodeAsync:()=>Wo,_default:()=>XA,_discriminatedUnion:()=>zA,_e164:()=>ts,_email:()=>Na,_emoji:()=>Ba,_encode:()=>Fo,_encodeAsync:()=>Zo,_endsWith:()=>Cr,_enum:()=>ZA,_file:()=>bp,_float32:()=>Yd,_float64:()=>Qd,_gt:()=>$t,_gte:()=>Ke,_guid:()=>La,_iban:()=>Hd,_includes:()=>$r,_int:()=>Xd,_int32:()=>ep,_int64:()=>ap,_intersection:()=>MA,_ipv4:()=>qa,_ipv6:()=>Ga,_isoDate:()=>Hi,_isoDateTime:()=>Wi,_isoDuration:()=>qi,_isoTime:()=>Ki,_jwt:()=>ns,_ksuid:()=>Ka,_lazy:()=>iD,_length:()=>Un,_literal:()=>HA,_lowercase:()=>xr,_lt:()=>St,_lte:()=>He,_mac:()=>Zd,_map:()=>FA,_max:()=>He,_maxLength:()=>Ln,_maxSize:()=>rn,_mime:()=>Dr,_min:()=>Ke,_minLength:()=>zt,_minSize:()=>It,_multipleOf:()=>nn,_nan:()=>yp,_nanoid:()=>Fa,_nativeEnum:()=>WA,_negative:()=>is,_never:()=>mp,_nonnegative:()=>as,_nonoptional:()=>YA,_nonpositive:()=>os,_normalize:()=>Rr,_null:()=>up,_nullable:()=>GA,_number:()=>qd,_optional:()=>qA,_overwrite:()=>mt,_parse:()=>mr,_parseAsync:()=>fr,_pipe:()=>tD,_positive:()=>rs,_promise:()=>oD,_properties:()=>Ar,_property:()=>ss,_readonly:()=>nD,_record:()=>BA,_refine:()=>kp,_regex:()=>_r,_safeDecode:()=>Ko,_safeDecodeAsync:()=>Go,_safeEncode:()=>Ho,_safeEncodeAsync:()=>qo,_safeParse:()=>hr,_safeParseAsync:()=>gr,_set:()=>JA,_size:()=>Nn,_slugify:()=>Pr,_startsWith:()=>Ir,_string:()=>Fd,_stringFormat:()=>zn,_stringbool:()=>$p,_success:()=>QA,_superRefine:()=>_p,_symbol:()=>cp,_templateLiteral:()=>rD,_toLowerCase:()=>Er,_toUpperCase:()=>Or,_transform:()=>KA,_trim:()=>Tr,_tuple:()=>VA,_uint32:()=>tp,_uint64:()=>sp,_ulid:()=>Wa,_undefined:()=>lp,_union:()=>LA,_unknown:()=>pp,_uppercase:()=>Sr,_url:()=>Zi,_uuid:()=>Ua,_uuidv4:()=>za,_uuidv6:()=>Ma,_uuidv7:()=>Va,_void:()=>fp,_xid:()=>Ha,_xor:()=>UA,base64Charset:()=>pa,base64urlCharset:()=>ji,canParseURL:()=>Iu,clone:()=>te,compile:()=>Vd,compileFn:()=>Pa,config:()=>le,createStandardJSONSchemaMethod:()=>jr,createToJSONSchemaMethod:()=>Cp,decode:()=>V$,decodeAsync:()=>F$,describe:()=>xp,encode:()=>M$,encodeAsync:()=>B$,extractDefs:()=>an,finalize:()=>sn,flattenError:()=>xi,formatError:()=>Si,getDiscriminatedOption:()=>ud,globalConfig:()=>be,globalRegistry:()=>_e,handleUnrepresentable:()=>ye,initializeContext:()=>on,isBackEdge:()=>Ca,isRecursiveSchema:()=>Ia,isValidBase64:()=>Pi,isValidBase64URL:()=>ma,isValidCIDRv6:()=>da,isValidCreditCard:()=>fa,isValidIBAN:()=>ha,isValidIPv6:()=>Oi,isValidJWT:()=>ga,locales:()=>Ji,memoizer:()=>Bi,mergeValues:()=>vr,meta:()=>Sp,parse:()=>Vo,parseAsync:()=>Bo,parseURLObject:()=>Ng,prettifyError:()=>yl,process:()=>re,processSchema:()=>re,regexes:()=>tt,registry:()=>Ea,safeDecode:()=>Z$,safeDecodeAsync:()=>H$,safeEncode:()=>J$,safeEncodeAsync:()=>W$,safeParse:()=>j$,safeParseAsync:()=>N$,standardProps:()=>sa,stripTabAndNewline:()=>Ei,toDotPath:()=>hg,toJSONSchema:()=>ds,toZod:()=>fi,treeifyError:()=>gl,urlHostnameOk:()=>la,urlProtocolOk:()=>ua,util:()=>_,validate:()=>$i,validateAsync:()=>Ii,validateURL:()=>ca,version:()=>wu,withParser:()=>Oa});var _={};Et(_,{BIGINT_FORMAT_RANGES:()=>bi,CONSTANT_CATCH:()=>zo,Class:()=>tl,NUMBER_FORMAT_RANGES:()=>vi,aborted:()=>Oe,allowsEval:()=>il,assert:()=>t$,assertEqual:()=>XS,assertIs:()=>QS,assertNever:()=>e$,assertNotEqual:()=>YS,assignProp:()=>ke,attachSchema:()=>Uo,base64ToUint8Array:()=>lg,base64urlToUint8Array:()=>w$,cached:()=>ur,captureStackTrace:()=>No,cleanEnum:()=>b$,cleanRegex:()=>Lt,clone:()=>te,cloneDef:()=>i$,codePointLength:()=>An,constantCatch:()=>ll,createTransparentProxy:()=>u$,defineLazy:()=>nl,defineLazyInternal:()=>H,derived:()=>S$,esc:()=>Ee,escapeRegex:()=>et,explicitlyAborted:()=>sl,extend:()=>m$,finalizeIssue:()=>Be,floatSafeRemainder:()=>hi,getElementAtPath:()=>o$,getEnumValues:()=>cr,getLengthableOrigin:()=>ki,getParsedType:()=>l$,getSizableOrigin:()=>wi,hexToUint8Array:()=>_$,hide:()=>_i,installLazyProp:()=>A$,isObject:()=>Cn,isPlainObject:()=>Qe,issue:()=>pr,joinValues:()=>y,jsonStringifyReplacer:()=>lr,members:()=>cl,merge:()=>h$,mergeDefs:()=>dt,normalizeParams:()=>T,nullish:()=>jo,numKeys:()=>c$,objectClone:()=>n$,omit:()=>p$,optionalKeys:()=>al,own:()=>en,parsedType:()=>S,partial:()=>g$,pick:()=>d$,prefixIssues:()=>Ve,primitiveTypes:()=>ol,promiseAllObject:()=>a$,propertyKeyTypes:()=>yi,randomString:()=>s$,rawShape:()=>dr,required:()=>y$,safeExtend:()=>f$,shallowClone:()=>gi,slugify:()=>rl,stringifyPrimitive:()=>x,toZod:()=>fi,uint8ArrayToBase64:()=>ug,uint8ArrayToBase64url:()=>k$,uint8ArrayToHex:()=>x$,unwrapMessage:()=>sr});function XS(e){return e}function YS(e){return e}function fi(){return e=>e}function QS(e){}function e$(e){throw new Error("Unexpected value in exhaustive check")}function t$(e){}function cr(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function y(e,t="|"){return e.map(r=>x(r)).join(t)}function lr(e,t){return typeof t=="bigint"?t.toString():t}var el=class{constructor(t){this._getter=t,this._value=void 0}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function ur(e){return new el(e)}function jo(e){return e==null}function Lt(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function hi(e,t){let r=e/t,i=Math.round(r),n=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-i)<n?0:r-i}var og=Symbol("evaluating");function nl(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==og)return i===void 0&&(i=og,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function n$(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function ke(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function dr(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function Nt(e){return dr(e._zod.def)??e._zod.def.shape}function ag(e,t,r){Object.defineProperty(e,t,{get(){let i=r();return ke(this,t,i),i},enumerable:!0,configurable:!0})}function sg(e,t,r){t in e?ke(e,t,r):e[t]=r}function In(e,t,r,i){let n=Nt(t);for(let o of r){let a=Object.getOwnPropertyDescriptor(n,o);a.enumerable&&(a.get?ag(e,o,()=>{let s=t._zod.def.shape[o];return i?i(s,o):s}):sg(e,o,i?i(a.value,o):a.value))}}function r$(e,t){for(let r of Reflect.ownKeys(t)){let i=Object.getOwnPropertyDescriptor(t,r);i.enumerable&&(i.get?ag(e,r,()=>t[r]):sg(e,r,i.value))}}function dt(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function i$(e){return dt(e._zod.def)}function o$(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function a$(e){let t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{let n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}function s$(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function Ee(e){return JSON.stringify(e)}function rl(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var No="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Cn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var il=ur(()=>{if(be.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Qe(e){if(Cn(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Cn(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function gi(e){return Qe(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function c$(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var l$=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}`)}},yi=new Set(["string","number","symbol"]),ol=new Set(["string","number","bigint","boolean","symbol","undefined"]);function et(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function te(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function T(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 u$(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function x(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function al(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var vi={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]},bi={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function d$(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o={};return In(o,e,Lo(e,t)),te(e,dt(r,{shape:o,checks:[]}))}function Lo(e,t){let r=Nt(e),i=[];for(let n of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,n)?.enumerable)throw new Error(`Unrecognized key: "${String(n)}"`);t[n]&&i.push(n)}return i}function p$(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=new Set(Lo(e,t)),a={};return In(a,e,Reflect.ownKeys(Nt(e)).filter(s=>!o.has(s))),te(e,dt(r,{shape:a,checks:[]}))}function m$(e,t){if(!Qe(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let n=Nt(e);for(let o of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return te(e,dt(e._zod.def,{shape:cg(e,t)}))}function cg(e,t){let r={};return In(r,e,Reflect.ownKeys(Nt(e))),r$(r,t),r}function f$(e,t){if(!Qe(t))throw new Error("Invalid input to safeExtend: expected a plain object");return te(e,dt(e._zod.def,{shape:cg(e,t)}))}function h$(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r={};In(r,e,Reflect.ownKeys(Nt(e))),In(r,t,Reflect.ownKeys(Nt(t)));let i=dt(e._zod.def,{shape:r,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return te(e,i)}function g$(e,t,r,i="partial"){let o=t._zod.def.checks;if(o&&o.length>0)throw new Error(`.${i}() cannot be used on object schemas containing refinements`);let s=r?new Set(Lo(t,r)):void 0,c={};return In(c,t,Reflect.ownKeys(Nt(t)),e&&((l,u)=>s&&!s.has(u)?l:new e({type:"optional",innerType:l}))),te(t,dt(t._zod.def,{shape:c,checks:[]}))}function y$(e,t,r){let i=r?new Set(Lo(t,r)):void 0,n={};return In(n,t,Reflect.ownKeys(Nt(t)),(o,a)=>i&&!i.has(a)?o:new e({type:"nonoptional",innerType:o})),te(t,dt(t._zod.def,{shape:n}))}function Oe(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 sl(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 Ve(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function sr(e){return typeof e=="string"?e:e?.message}function Uo(e,t,r){var i;for(let n=t;n<e.length;n++)(i=e[n]).schema??(i.schema=r)}function Be(e,t,r){var i;let n=e.inst?._zod?.traits;n?.has("$ZodType")&&(n.has("$ZodCheck")?(i=e).schema??(i.schema=e.inst):e.schema=e.inst);let o=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:sr(e.inst?._zod.def?.error?.(e))??sr(o?.(e))??sr(t?.error?.(e))??sr(r.customError?.(e))??sr(r.localeError?.(e))??"Invalid input",s={};for(let c of Object.keys(e))c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__"||(s[c]=e[c]);return s.path??(s.path=[]),s.message=a,t?.reportInput&&(s.input=e.input),s}function wi(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var v$=/[\uD800-\uDBFF]/;function An(e){let t=e.length;if(!v$.test(e))return t;let r=t;for(let i=0;i<t-1;i++)(e.charCodeAt(i)&64512)===55296&&(e.charCodeAt(i+1)&64512)===56320&&(r--,i++);return r}function ki(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function S(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 pr(...e){let[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function b$(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function lg(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function ug(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function w$(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return lg(t+r)}function k$(e){return ug(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function _$(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function x$(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var tl=class{constructor(...t){}};function cl(e,t){for(let r in t){let i=Object.getOwnPropertyDescriptor(t,r);i.get?Object.defineProperty(e,r,{...i,enumerable:!1}):$$(e,r,i.value)}}function en(e,t,r,i=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:i,value:r}),r}function _i(e,t,r){return en(e,t,r,!1)}function S$(e,t){for(let r in e){let i=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return en(this,r,i(this))},set(n){en(this,r,n)}})}return t}function $$(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:en(this,t,r.bind(this))},set(i){en(this,t,i)}})}function I$(e,t){let r=Object.getPrototypeOf(e);return t in r?void 0:r}var Qc,Qt=!1,C$={configurable:!0,get(){Qt=!0}};function H(e,t,r){let i=Object.getPrototypeOf(e._zod);if(t in i&&Qc!==e._zod){Qc=void 0;return}Qc=e._zod,Object.defineProperty(i,t,{configurable:!0,get(){Object.defineProperty(this,t,C$);let n=Qt;Qt=!1;try{let o=r(this);return Qt?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o}),Qt=Qt||n,o}catch(o){throw delete this[t],Qt=Qt||n,o}},set(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})}function A$(e,t,r,i){let n=I$(e,t);n&&Object.defineProperty(n,t,{configurable:!0,get(){let o={configurable:!0,writable:!0,enumerable:i,value:void 0};return Object.defineProperty(this,t,o),o.value=r(this),Object.defineProperty(this,t,o),o.value},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:i,value:o})}})}var zo="~constantCatch";function ll(e){let t=()=>e;return t[zo]=!0,t}var dg,dl=Object.freeze({status:"aborted"}),ul={value:void 0,enumerable:!1},pg="captureStackTrace"in Error?Error:null;function D$(e){let t=pg;if(t){let r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0}catch{return pg=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function g(e,t,r,i){let n={};function o(m){this.def=m,this.constr=d,this.traits=new Set}o.prototype=n;let a=r,s=a&&new WeakSet;function c(m,f){if(m._zod){if(m._zod.traits.has(e))return}else{ul.value=new o(f);try{Object.defineProperty(m,"_zod",ul)}finally{ul.value=void 0}}if(m._zod.traits.add(e),t(m,f),s){let w=Object.getPrototypeOf(m),D=m._zod.constr.prototype,A=w;for(;A&&A!==D;)A=Object.getPrototypeOf(A);let C=A??w;s.has(C)||(s.add(C),cl(C,a))}let h=d.prototype;for(let w in h)Object.prototype.hasOwnProperty.call(h,w)&&(w in m||(m[w]=h[w].bind(m)))}let l=i?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(m){let f=i?.Parent?D$(u):this;c(f,m);let h=f._zod.deferred;if(h){for(let D of h)D();f._zod.deferred=void 0}let w=globalThis.__zod_globalConfig?.postProcessor;return w&&w(f),f}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:m=>i?.Parent&&m instanceof i.Parent?!0:m?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var pl=Symbol("zod_brand"),Fe=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},tn=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(dg=globalThis).__zod_globalConfig??(dg.__zod_globalConfig={});var be=globalThis.__zod_globalConfig;function le(e){return e&&Object.assign(be,e),be}function R$(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,lr,2)),e.message}function T$(e){this._zod.message=e}var E$={get:R$,set:T$,enumerable:!0,configurable:!0},fl={value:void 0,enumerable:!1},mg=new WeakSet([Object.prototype,Error.prototype]),fg=(e,t)=>{e.name="$ZodError",fl.value=t,Object.defineProperty(e,"issues",fl),fl.value=void 0,Object.defineProperty(e,"message",E$);let r=Object.getPrototypeOf(e);mg.has(r)||(mg.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let i=()=>this.message;return Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0})}}))},hl=g("$ZodError",fg),Je=g("$ZodError",fg,void 0,{Parent:Error});function O$(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0}):e[t]=r()),e[t]}function xi(e,t=r=>r.message){let r={},i=[];for(let n of e.issues)n.path.length>0?O$(r,n.path[0],()=>[]).push(t(n)):i.push(t(n));return{formErrors:i,fieldErrors:r}}function Si(e,t=r=>r.message){let r={_errors:[]},i=(n,o=[])=>{for(let a of n.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let s=[...o,...a.path];if(s.length===0)r._errors.push(t(a));else{let c=r,l=0;for(;l<s.length;){let u=s[l],d=l===s.length-1;if(u==="_errors"){d&&c._errors.push(t(a)),l++;continue}Object.prototype.hasOwnProperty.call(c,u)||Object.defineProperty(c,u,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let m=c[u];d&&m._errors.push(t(a)),c=m,l++}}}};return i(e),r}function gl(e,t=r=>r.message){let r={errors:[]},i=(n,o=[])=>{var a;for(let s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>i({issues:c},[...o,...s.path]));else if(s.code==="invalid_key")i({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")i({issues:s.issues},[...o,...s.path]);else{let c=[...o,...s.path];if(c.length===0){r.errors.push(t(s));continue}let l=r,u=0;for(;u<c.length;){let d=c[u],m=u===c.length-1;typeof d=="string"?(l.properties??(l.properties={}),Object.prototype.hasOwnProperty.call(l.properties,d)||Object.defineProperty(l.properties,d,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),l=l.properties[d]):(l.items??(l.items=[]),(a=l.items)[d]??(a[d]={errors:[]}),l=l.items[d]),m&&l.errors.push(t(s)),u++}}};return i(e),r}function hg(e){let t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function yl(e){let t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${hg(i.path)}`);return t.join(`
|
|
28
|
+
`)}function Mo(e,t){return{callee:t?.callee??e,Err:t?.Err}}var mr=e=>{let t=(r,i,n,o)=>{let a=n?{...n,async:!1}:{async:!1},s=r._zod.run({value:i,issues:[]},a);if(s instanceof Promise)throw new Fe;if(s.issues.length){let c=new(o?.Err??e)(s.issues.map(l=>Be(l,a,le())));throw No(c,o?.callee??t),c}return s.value};return t},Vo=mr(Je),fr=e=>{let t=async(r,i,n,o)=>{let a=n?{...n,async:!0}:{async:!0},s=r._zod.run({value:i,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let c=new(o?.Err??e)(s.issues.map(l=>Be(l,a,le())));throw No(c,o?.callee??t),c}return s.value};return t},Bo=fr(Je),hr=e=>(t,r,i)=>{let n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Fe;return o.issues.length?gg(e,o.issues,n):{success:!0,data:o.value}},j$=hr(Je);function gg(e,t,r){let i;return{success:!1,get error(){return i||(i=new e(t.map(n=>Be(n,r,le()))),t=void 0,r=void 0),i},set error(n){i=n,t=void 0,r=void 0}}}var gr=e=>async(t,r,i)=>{let n=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?gg(e,o.issues,n):{success:!0,data:o.value}},N$=gr(Je),L$=Symbol.for("zod.compile.invalid"),U$=Symbol.for("zod.compile.fallback"),$i=((e,t,r)=>{let i=e._zod.bag.validator;if(i!==void 0){if(i(t)!==L$)return!0;if(i.definite===!0&&r===void 0)return!1}return z$(e,t,r)});function z$(e,t,r){let i=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},n=e._zod.bag.fallbackRun,o;if(n?(i[U$]=!0,o=n({value:t,issues:[]},i)):o=e._zod.run({value:t,issues:[]},i),o instanceof Promise)throw new Fe;return o.issues.length===0}var Ii=async(e,t,r)=>{let i=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},n=e._zod.run({value:t,issues:[]},i);return n instanceof Promise&&(n=await n),n.issues.length===0},Fo=e=>{let t=mr(e),r=(i,n,o,a)=>{let s=o?{...o,direction:"backward"}:{direction:"backward"};return t(i,n,s,Mo(r,a))};return r},M$=Fo(Je),Jo=e=>{let t=mr(e),r=(i,n,o,a)=>t(i,n,o,Mo(r,a));return r},V$=Jo(Je),Zo=e=>{let t=fr(e),r=async(i,n,o,a)=>{let s=o?{...o,direction:"backward"}:{direction:"backward"};return await t(i,n,s,Mo(r,a))};return r},B$=Zo(Je),Wo=e=>{let t=fr(e),r=async(i,n,o,a)=>await t(i,n,o,Mo(r,a));return r},F$=Wo(Je),Ho=e=>(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return hr(e)(t,r,n)},J$=Ho(Je),Ko=e=>(t,r,i)=>hr(e)(t,r,i),Z$=Ko(Je),qo=e=>async(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return gr(e)(t,r,n)},W$=qo(Je),Go=e=>async(t,r,i)=>gr(e)(t,r,i),H$=Go(Je);var tt={};Et(tt,{anyString:()=>Jl,base64:()=>jl,base64url:()=>Nl,bigint:()=>Wl,boolean:()=>Hl,browserEmail:()=>tI,cidrv4:()=>Ol,cidrv6:()=>Pl,creditCard:()=>Xo,cuid:()=>bl,cuid2:()=>wl,currencyCode:()=>Ml,date:()=>Vl,datetime:()=>Fl,domain:()=>Ul,duration:()=>Il,e164:()=>zl,email:()=>Al,emoji:()=>Dl,extendedDuration:()=>K$,guid:()=>Cl,hex:()=>Yl,hostname:()=>Ll,html5Email:()=>Y$,httpProtocol:()=>Ci,iban:()=>Yo,idnEmail:()=>eI,integer:()=>Ai,ipv4:()=>Rl,ipv6:()=>Tl,ksuid:()=>xl,lowercase:()=>Gl,mac:()=>El,md5_base64:()=>oI,md5_base64url:()=>aI,md5_hex:()=>iI,nanoid:()=>Sl,nanoidOfLength:()=>$l,null:()=>Kl,number:()=>Ut,rfc5322Email:()=>Q$,sha1_base64:()=>cI,sha1_base64url:()=>lI,sha1_hex:()=>sI,sha256_base64:()=>dI,sha256_base64url:()=>pI,sha256_hex:()=>uI,sha384_base64:()=>fI,sha384_base64url:()=>hI,sha384_hex:()=>mI,sha512_base64:()=>yI,sha512_base64url:()=>vI,sha512_hex:()=>gI,string:()=>Zl,time:()=>Bl,ulid:()=>kl,undefined:()=>ql,unicodeEmail:()=>yg,uppercase:()=>Xl,uuid:()=>Dn,uuid4:()=>q$,uuid6:()=>G$,uuid7:()=>X$,xid:()=>_l});var bl=/^[cC][0-9a-z]{6,}$/,wl=/^[0-9a-z]+$/,kl=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,_l=/^[0-9a-vA-V]{20}$/,xl=/^[A-Za-z0-9]{27}$/,Sl=/^[a-zA-Z0-9_-]{21}$/;function $l(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Il=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,K$=/^[-+]?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)?)??$/,Cl=/^([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})$/,Dn=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)$/,q$=Dn(4),G$=Dn(6),X$=Dn(7),Al=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Y$=/^[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])?)*$/,Q$=/^(([^<>()\[\]\\.,;:\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,}))$/,yg=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,eI=yg,tI=/^[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])?)*$/,nI="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Dl(){return new RegExp(nI,"u")}var Rl=/^(?:(?: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])$/,Tl=/^(([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}|:))$/,El=e=>{let t=et(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Ol=/^((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])$/,Pl=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,jl=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Nl=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Ll=/^(?=.{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])?)*\.?$/,Ul=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Ci=/^https?$/,zl=/^\+[1-9]\d{6,14}$/,Xo=/^\d(?:[ -]?\d){11,18}$/,Ml=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,Yo=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,vg="(?:(?:\\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])))";function rI(e){return new RegExp(`^${e}$`)}var Vl=rI(vg);function vl(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}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Bl(e){return new RegExp(`^${vl(e)}$`)}function Fl(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${vl({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,i=e.local?`${r}|${vl({precision:e.precision})}`:r;return new RegExp(`^${vg}T(?:${i})$`)}var Jl=/^[\s\S]{0,}$/,Zl=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Wl=/^-?\d+n?$/,Ai=/^-?\d+$/,Ut=/^-?\d+(?:\.\d+)?$/,Hl=/^(?:true|false)$/i,Kl=/^null$/i;var ql=/^undefined$/i;var Gl=/^[^A-Z]*$/,Xl=/^[^a-z]*$/,Yl=/^[0-9a-fA-F]*$/;function Di(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Ri(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var iI=/^[0-9a-fA-F]{32}$/,oI=Di(22,"=="),aI=Ri(22),sI=/^[0-9a-fA-F]{40}$/,cI=Di(27,"="),lI=Ri(27),uI=/^[0-9a-fA-F]{64}$/,dI=Di(43,"="),pI=Ri(43),mI=/^[0-9a-fA-F]{96}$/,fI=Di(64,""),hI=Ri(64),gI=/^[0-9a-fA-F]{128}$/,yI=Di(86,"=="),vI=Ri(86);var oe=g("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Ql=e=>{let t=e.value;return!jo(t)&&t.size!==void 0},eu=e=>{let t=e.value;return!jo(t)&&t.length!==void 0},Qo={number:"number",bigint:"bigint",object:"date"},ta=g("$ZodCheckLessThan",(e,t)=>{oe.init(e,t);let r=Qo[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:Qo[typeof i.value]??r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),na=g("$ZodCheckGreaterThan",(e,t)=>{oe.init(e,t);let r=Qo[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:Qo[typeof i.value]??r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tu=g("$ZodCheckMultipleOf",(e,t)=>{oe.init(e,t),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"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):hi(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})}}),nu=g("$ZodCheckNumberFormat",(e,t)=>{oe.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[n,o]=vi[t.format];e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:i,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:i,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:i,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>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),ru=g("$ZodCheckBigIntFormat",(e,t)=>{oe.init(e,t);let[r,i]=bi[t.format];e._zod.check=n=>{let o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),iu=g("$ZodCheckMaxSize",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=Ql),e._zod.check=i=>{let n=i.value;n.size<=t.maximum||i.issues.push({origin:wi(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ou=g("$ZodCheckMinSize",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=Ql),e._zod.check=i=>{let n=i.value;n.size>=t.minimum||i.issues.push({origin:wi(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),au=g("$ZodCheckSizeEquals",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=Ql),e._zod.check=i=>{let n=i.value,o=n.size;if(o===t.size)return;let a=o>t.size;i.issues.push({origin:wi(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),su=g("$ZodCheckMaxLength",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=eu),e._zod.check=i=>{let n=i.value,o=n.length;if((typeof n=="string"&&o>t.maximum?An(n):o)<=t.maximum)return;let s=ki(n);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),cu=g("$ZodCheckMinLength",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=eu),e._zod.check=i=>{let n=i.value,o=n.length;if((typeof n=="string"&&o>=t.minimum&&o<t.minimum*2?An(n):o)>=t.minimum)return;let s=ki(n);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),lu=g("$ZodCheckLengthEquals",(e,t)=>{var r;oe.init(e,t),(r=e._zod.def).when??(r.when=eu),e._zod.check=i=>{let n=i.value,o=n.length,a=typeof n=="string"&&o>=t.length&&o<=t.length*2?An(n):o;if(a===t.length)return;let s=ki(n),c=a>t.length;i.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),yr=g("$ZodCheckStringFormat",(e,t)=>{var r,i;oe.init(e,t),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),uu=g("$ZodCheckRegex",(e,t)=>{yr.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})}}),du=g("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Gl),yr.init(e,t)}),pu=g("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Xl),yr.init(e,t)}),mu=g("$ZodCheckIncludes",(e,t)=>{oe.init(e,t);let r=et(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position},}${r}`:r);t.pattern=i,e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),fu=g("$ZodCheckStartsWith",(e,t)=>{oe.init(e,t);let r=new RegExp(`^${et(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),hu=g("$ZodCheckEndsWith",(e,t)=>{oe.init(e,t);let r=new RegExp(`.*${et(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function ea(e,t,r){e.issues.length&&t.issues.push(...Ve(r,e.issues))}var gu=g("$ZodCheckProperty",(e,t)=>{oe.init(e,t),e._zod.check=r=>{let i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>ea(n,r,t.property));ea(i,r,t.property)}}),yu=g("$ZodCheckProperties",(e,t)=>{oe.init(e,t),_i(e,Symbol.iterator,function*(){yield e});let r;e._zod.check=i=>{if(i.value==null){i.issues.push({expected:"object",code:"invalid_type",input:i.value,inst:e});return}r??(r=Reflect.ownKeys(t.shape).map(a=>[a,t.shape[a]]));let n=i.value,o;for(let[a,s]of r){let c=s._zod.run({value:n[a],issues:[]},{});c instanceof Promise?(o??(o=[]),o.push(c.then(l=>ea(l,i,a)))):ea(c,i,a)}if(o)return Promise.all(o).then(()=>{})}}),vu=g("$ZodCheckMimeType",(e,t)=>{oe.init(e,t);let r=new Set(t.mime);e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),bu=g("$ZodCheckOverwrite",(e,t)=>{oe.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var Rn=class{constructor(t=[],r={}){this.content=[],this.indent=0,this.args=t,this.closed=r}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
|
|
29
|
+
`).filter(a=>a),n=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let t=Function,r=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
30
|
+
${r.join(`
|
|
31
|
+
`)}
|
|
32
|
+
};`)(...Object.values(this.closed))}};var wu={major:4,minor:6,patch:5};var F=g("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wu;let i=e._zod.def.checks,n=e._zod.traits.has("$ZodCheck")?[e,...i??[]]:i?.length?[...i]:[];for(let o of n)for(let a of o._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(s,c,l)=>{if(s.memo)return s;let u=Oe(s),d;for(let m of c){if(m._zod.def.when){if(sl(s)||!m._zod.def.when(s))continue}else if(u)continue;let f=s.issues.length,h=m._zod.check(s);if(h instanceof Promise&&l?.async===!1)throw new Fe;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,s.issues.length!==f&&(Uo(s.issues,f,e),u||(u=Oe(s,f)))});else{if(s.issues.length===f)continue;Uo(s.issues,f,e),u||(u=Oe(s,f))}}return d?d.then(()=>s):s},a=(s,c,l)=>{if(Oe(s))return s.aborted=!0,s;let u=o(c,n,l);if(u instanceof Promise){if(l.async===!1)throw new Fe;return u.then(d=>e._zod.parse(d,l))}return e._zod.parse(u,l)};e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return u instanceof Promise?u.then(d=>a(d,s,c)):a(u,s,c)}let l=e._zod.parse(s,c);if(l instanceof Promise){if(c.async===!1)throw new Fe;return l.then(u=>o(u,n,c))}return o(l,n,c)}}},{get"~standard"(){return _i(this,"~standard",sa(this))},set"~standard"(e){en(this,"~standard",e)}}),jg=(e,t)=>e.issues.length?{issues:e.issues.map(r=>Be(r,t,le()))}:{value:e.value};async function bI(e,t){let r={async:!0};return jg(await e._zod.run({value:t,issues:[]},r),r)}function sa(e){return{validate:t=>{let r={async:!1};try{let i=e._zod.run({value:t,issues:[]},r);if(!(i instanceof Promise))return jg(i,r)}catch{}return bI(e,t)},vendor:"zod",version:1}}var Tn=g("$ZodString",(e,t)=>{F.init(e,t),e._zod.pattern=t.pattern??Jl,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ne=g("$ZodStringFormat",(e,t)=>{yr.init(e,t),Tn.init(e,t)}),_u=g("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Cl),ne.init(e,t)}),xu=g("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Dn(i))}else t.pattern??(t.pattern=Dn());ne.init(e,t)}),Su=g("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Al),ne.init(e,t)}),$u=1,Ti=2;function Iu(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function ca(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?Iu(e)||Ti:Ng(e,t)}function Ng(e,t){if(!t.normalize&&t.protocol?.source===Ci.source&&!/^https?:\/\//i.test(e))return $u;try{if(typeof URL<"u"){let r=URL;if(typeof r.parse=="function")return r.parse(e)??Ti}return new URL(e)}catch{return Ti}}var wI=/[\t\n\r]/g;function Ei(e){return e.replace(wI,"")}function la(e,t){return t.lastIndex=0,t.test(e.hostname)}function ua(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var Cu=g("$ZodURL",(e,t)=>{ne.init(e,t),e._zod.check=r=>{try{let i=r.value.trim(),n=ca(i,t);if(n===$u){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(n===Ti){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}if(n===!0){r.value=Ei(i);return}t.hostname&&!la(n,t.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&&!ua(n,t.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?n.href:Ei(i);return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Au=g("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Dl()),ne.init(e,t)}),Du=g("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?Sl:$l(t.length)),ne.init(e,t)}),Ru=g("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=bl),ne.init(e,t)}),Tu=g("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=wl),ne.init(e,t)}),Eu=g("$ZodULID",(e,t)=>{t.pattern??(t.pattern=kl),ne.init(e,t)}),Ou=g("$ZodXID",(e,t)=>{t.pattern??(t.pattern=_l),ne.init(e,t)}),Pu=g("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=xl),ne.init(e,t)}),ju=g("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Fl(t)),ne.init(e,t)}),Nu=g("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Vl),ne.init(e,t)}),Lu=g("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Bl(t)),ne.init(e,t)}),Uu=g("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Il),ne.init(e,t)}),zu=g("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Rl),ne.init(e,t)}),kI=/^[0-9a-fA-F:.]+$/;function Oi(e){return kI.test(e)?Iu(`http://[${e}]`):!1}var Mu=g("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Tl),ne.init(e,t),e._zod.check=r=>{Oi(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),Vu=g("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=El(t.delimiter)),ne.init(e,t)}),Bu=g("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ol),ne.init(e,t)});function da(e){let t=e.split("/");if(t.length!==2)return!1;let[r,i]=t;if(!i)return!1;let n=Number(i);return`${n}`!==i||n<0||n>128?!1:Oi(r)}var Fu=g("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Pl),ne.init(e,t),e._zod.check=r=>{da(r.value)||r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function Pi(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var pa=/^[0-9a-zA-Z+/]*={0,2}$/,Ju=g("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=pa),ne.init(e,t),e._zod.check=r=>{Pi(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),ji=/^[A-Za-z0-9_-]*$/;function ma(e){if(!ji.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Pi(r)}var Zu=g("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ji),ne.init(e,t),e._zod.check=r=>{ma(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Wu=g("$ZodE164",(e,t)=>{t.pattern??(t.pattern=zl),ne.init(e,t)}),_I=/[- ]/g;function xI(e){let t=e.length,r=1,i=0;for(;t;){let n=e.charCodeAt(--t)-48;r^=1,i+=r?[0,2,4,6,8,1,3,5,7,9][n]:n}return i%10===0}function fa(e){return Xo.test(e)?xI(e.replace(_I,"")):!1}var Hu=g("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=Xo),ne.init(e,t),e._zod.check=r=>{fa(r.value)||r.issues.push({code:"invalid_format",format:"credit_card",input:r.value,inst:e,continue:!t.abort})}});function SI(e){let t=0,r=e.length;for(let i=4;i<r;i++){let n=e.charCodeAt(i);t=(n>=65?t*100+(n-55):t*10+(n-48))%97}for(let i=0;i<4;i++){let n=e.charCodeAt(i);t=(n>=65?t*100+(n-55):t*10+(n-48))%97}return t===1}function ha(e){return Yo.test(e)?SI(e):!1}var Ku=g("$ZodIBAN",(e,t)=>{t.pattern??(t.pattern=Yo),ne.init(e,t),e._zod.check=r=>{ha(r.value)||r.issues.push({code:"invalid_format",format:"iban",input:r.value,inst:e,continue:!t.abort})}});function ga(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var qu=g("$ZodJWT",(e,t)=>{ne.init(e,t),e._zod.check=r=>{ga(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Gu=g("$ZodCustomStringFormat",(e,t)=>{ne.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})}}),ya=g("$ZodNumber",(e,t)=>{F.init(e,t),e._zod.pattern=Ut,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:String(n):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),Xu=g("$ZodNumberFormat",(e,t)=>{nu.init(e,t),ya.init(e,t)}),Ni=g("$ZodBoolean",(e,t)=>{F.init(e,t),e._zod.pattern=Hl,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),va=g("$ZodBigInt",(e,t)=>{F.init(e,t),e._zod.pattern=Wl,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Yu=g("$ZodBigIntFormat",(e,t)=>{ru.init(e,t),va.init(e,t)}),Qu=g("$ZodSymbol",(e,t)=>{F.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),ed=g("$ZodUndefined",(e,t)=>{F.init(e,t),e._zod.pattern=ql,e._zod.values=new Set([void 0]),e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),td=g("$ZodNull",(e,t)=>{F.init(e,t),e._zod.pattern=Kl,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),nd=g("$ZodAny",(e,t)=>{F.init(e,t),e._zod.parse=r=>r}),rd=g("$ZodUnknown",(e,t)=>{F.init(e,t),e._zod.parse=r=>r}),id=g("$ZodNever",(e,t)=>{F.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),od=g("$ZodVoid",(e,t)=>{F.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),ad=g("$ZodDate",(e,t)=>{F.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});function wg(e,t,r){e.issues.length&&t.issues.push(...Ve(r,e.issues)),t.value[r]=e.value}var sd=g("$ZodArray",(e,t)=>{F.init(e,t);let r=be.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),i;i.value=r?r.alloc(e,i,Array(o.length),n):Array(o.length);let a=[],s=n?.abortEarly;for(let c=0;c<o.length;c++){let l=o[c],u=t.element._zod.run({value:l,issues:[]},n);if(u instanceof Promise)a.push(u.then(d=>wg(d,i,c)));else if(wg(u,i,c),s&&u.issues.length!==0&&Oe(u))break}return a.length?Promise.all(a).then(()=>i):i}});function aa(e,t,r,i,n,o){let a=r in i,s=o==="optional";if(!(!a&&s&&n==="optional")){if(e.issues.length){if(n!==void 0&&s&&!a)return;t.issues.push(...Ve(r,e.issues))}if(!a&&n===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?(a||n==="defaulted"&&!s)&&(t.value[r]=void 0):t.value[r]=e.value}}var $I=[];function Lg(e){let t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),i=r.length?r:$I,n=i.length?[...t,...i]:t;for(let a of n)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);let o=al(e.shape);return{...e,allKeys:n,symbolKeys:i,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function Ug(e,t,r,i,n,o,a){let s=[],c=n.keySet,l=n.catchall._zod,u=l.def.type,d=l.optin,m=l.optout,f=0;for(let h in t){if(a&&r.issues.length!==f){if(Oe(r,f))break;f=r.issues.length}if(c.has(h))continue;if(h==="__proto__"){u==="never"&&s.push(h);continue}if(u==="never"){s.push(h);continue}let w=l.run({value:t[h],issues:[]},i);w instanceof Promise?e.push(w.then(D=>aa(D,r,h,t,d,m))):aa(w,r,h,t,d,m)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o,continue:!0}),e.length?Promise.all(e).then(()=>r):r}var zg=g("$ZodObject",(e,t)=>{F.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),i=r?.get?r.get.raw:t.shape??{};if(i){let l=()=>{let u={...i};return Object.defineProperty(t,"shape",{value:u}),l.raw=u,u};l.raw=i,Object.defineProperty(t,"shape",{get:l})}let n=ur(()=>Lg(t));H(e,"propValues",l=>{let u=l.def.shape,d={};for(let m in u){let f=u[m]._zod;if(f.values){Object.prototype.hasOwnProperty.call(d,m)||ke(d,m,new Set);for(let h of f.values)d[m].add(h);f.optin!==void 0&&d[m].add(void 0)}}return d});let o=Cn,a=t.catchall,s,c=be.memoizer;c?.attach(e),e._zod.parse=(l,u)=>{s??(s=n.value);let d=l.value;if(!o(d))return l.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),l;l.value=c?c.alloc(e,l,{},u):{};let m=[],f=s.shape,h=u?.abortEarly,w=l.issues.length;for(let D of s.allKeys){if(h&&l.issues.length!==w){if(Oe(l,w))break;w=l.issues.length}if(D==="__proto__")continue;let A=f[D],C=A._zod.optin,j=A._zod.optout,W=A._zod.run({value:d[D],issues:[]},u);W instanceof Promise?m.push(W.then(K=>aa(K,l,D,d,C,j))):aa(W,l,D,d,C,j)}return a?Ug(m,d,l,u,n.value,e,h===!0):m.length?Promise.all(m).then(()=>l):l}}),cd=g("$ZodObjectJIT",(e,t)=>{zg.init(e,t);let r=e._zod.parse,i=ur(()=>Lg(t)),n=be.memoizer,o=f=>{let h=i.value,w=h.symbolKeys,D=new Rn(["payload","ctx"],{shape:f,inst:e,memo:n,syms:w}),A=K=>`shape[${K}]._zod.run({ value: input[${K}], issues: [] }, ctx)`,C=(K,G)=>`
|
|
33
|
+
let ${K}_ab = false;
|
|
34
|
+
for (let i = 0; i < ${K}.issues.length; i++) {
|
|
35
|
+
const iss = ${K}.issues[i];
|
|
36
|
+
iss.path = iss.path ? [${G}, ...iss.path] : [${G}];
|
|
37
|
+
payload.issues.push(iss);
|
|
38
|
+
if (iss.continue !== true) ${K}_ab = true;
|
|
39
|
+
}
|
|
40
|
+
if (${K}_ab && ctx && ctx.abortEarly) {
|
|
41
|
+
payload.value = newResult;
|
|
42
|
+
return payload;
|
|
43
|
+
}`;D.write("const input = payload.value;");let j=Object.create(null),W=0;for(let K of h.allKeys)j[K]=`key_${W++}`;D.write(n?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let K of h.allKeys){if(K==="__proto__")continue;let G=j[K],fe=typeof K=="symbol"?`syms[${w.indexOf(K)}]`:Ee(K),Kt=`${fe} in input`,pe=f[K],Te=pe?._zod?.optin,he=Te!==void 0,ze=pe?._zod?.optout==="optional";if(D.write(`const ${G} = ${A(fe)};`),he&&ze){let st=Te==="optional"?`${G}_present`:`${G}.value !== undefined || ${G}_present`;D.write(`
|
|
44
|
+
const ${G}_present = ${Kt};
|
|
45
|
+
if (!${G}.issues.length || ${G}_present) {
|
|
46
|
+
if (${G}.issues.length) {${C(G,fe)}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (${st}) {
|
|
50
|
+
newResult[${fe}] = ${G}.value;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
`)}else he?(D.write(`
|
|
55
|
+
if (${G}.issues.length) {${C(G,fe)}
|
|
56
|
+
}
|
|
57
|
+
`),Te==="defaulted"?D.write(`newResult[${fe}] = ${G}.value;`):D.write(`
|
|
58
|
+
if (${G}.value !== undefined || ${Kt}) {
|
|
59
|
+
newResult[${fe}] = ${G}.value;
|
|
60
|
+
}
|
|
61
|
+
`)):D.write(`
|
|
62
|
+
const ${G}_present = ${Kt};
|
|
63
|
+
if (${G}.issues.length) {${C(G,fe)}
|
|
64
|
+
}
|
|
65
|
+
if (!${G}_present && !${G}.issues.length) {
|
|
66
|
+
payload.issues.push({
|
|
67
|
+
code: "invalid_type",
|
|
68
|
+
expected: "nonoptional",
|
|
69
|
+
input: undefined,
|
|
70
|
+
path: [${fe}]
|
|
71
|
+
});
|
|
72
|
+
if (ctx && ctx.abortEarly) {
|
|
73
|
+
payload.value = newResult;
|
|
74
|
+
return payload;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (${G}_present) {
|
|
79
|
+
newResult[${fe}] = ${G}.value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
`)}return D.write("payload.value = newResult;"),D.write("return payload;"),D.compile()},a,s=Cn,c=!be.jitless,u=c&&il.value,d=t.catchall,m;e._zod.parse=(f,h)=>{m??(m=i.value);let w=f.value;return s(w)?c&&u&&h?.async===!1&&h.jitless!==!0?(a||(a=o(t.shape)),f=a(f,h),d?Ug([],w,f,h,m,e,h?.abortEarly===!0):f):r(f,h):(f.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),f)}});function kg(e,t,r,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let n=e.filter(o=>!Oe(o));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>Be(a,i,le())))}),t)}var Li=g("$ZodUnion",(e,t)=>{F.init(e,t),H(e,"optin",i=>i.def.options.some(n=>n._zod.optin==="defaulted")?"defaulted":i.def.options.some(n=>n._zod.optin!==void 0)?"optional":void 0),H(e,"optout",i=>i.def.options.some(n=>n._zod.optout==="optional")?"optional":void 0),H(e,"values",i=>{if(i.def.options.every(n=>n._zod.values))return new Set(i.def.options.flatMap(n=>Array.from(n._zod.values)))}),H(e,"pattern",i=>{if(i.def.options.every(n=>n._zod.pattern)){let n=i.def.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>Lt(o.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,n)=>{if(r)return r(i,n);let o=!1,a=[];for(let s of t.options){let c=s._zod.run({value:i.value,issues:[]},n);if(c instanceof Promise)a.push(c),o=!0;else{if(c.issues.length===0)return c;a.push(c)}}return o?Promise.all(a).then(s=>kg(s,i,e,n)):kg(a,i,e,n)}});function _g(e,t,r,i){let n=[];for(let o=0;o<e.length;o++)e[o].issues.length===0&&n.push(o);return n.length===1?(t.value=e[n[0]].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>Be(a,i,le())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1,matches:n}),t)}var ld=g("$ZodXor",(e,t)=>{Li.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,n)=>{if(r)return r(i,n);let o=!1,a=[];for(let s of t.options){let c=s._zod.run({value:i.value,issues:[]},n);c instanceof Promise?(a.push(c),o=!0):a.push(c)}return o?Promise.all(a).then(s=>_g(s,i,e,n)):_g(a,i,e,n)}});function ud(e,t){let r=e._zod,i=r.bag.optionsMap;i||(i=Mg(r.def),r.bag.optionsMap=i);let n=i.get(t);if(n===null)throw new Error(`Ambiguous discriminator value "${String(t)}"`);return n}function Mg(e){let t=new Map;for(let r of e.options){let i=r._zod.propValues?.[e.discriminator];if(!i||i.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let n of i)if(t.has(n)){if(n!==void 0)throw new Error(`Duplicate discriminator value "${String(n)}"`);t.set(n,null)}else t.set(n,r)}return t}var dd=g("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Li.init(e,t);let r=e._zod.parse;H(e,"propValues",n=>{let o={},a=0;for(let s of n.def.options){let c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${n.def.options.indexOf(s)}"`);c[n.def.discriminator]?.has(void 0)&&a++;for(let[l,u]of Object.entries(c)){Object.prototype.hasOwnProperty.call(o,l)||ke(o,l,new Set);for(let d of u)o[l].add(d)}}return!n.def.unionFallback&&a>1&&o[n.def.discriminator]?.delete(void 0),o}),t.options.forEach((n,o)=>{let a=dr(n._zod.def);if(a&&!Object.prototype.hasOwnProperty.call(a,t.discriminator))throw new Error(`Invalid discriminated union option at index "${o}"`)});let i=ur(()=>Mg(t));e._zod.parse=(n,o)=>{let a=n.value;if(!Cn(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;let s=a?.[t.discriminator],c=i.value.get(s);return c&&(s!==void 0||o.direction!=="backward")?c._zod.run(n,o):t.unionFallback||o.direction==="backward"?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()).filter(l=>i.value.get(l)!==null),input:a,path:[t.discriminator],inst:e}),n)}}),pd=g("$ZodIntersection",(e,t)=>{F.init(e,t),e._zod.parse=(r,i)=>{let n=r.value,o=t.left._zod.run({value:n,issues:[]},i),a=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([c,l])=>xg(r,c,l)):xg(r,o,a)}});function vr(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(Qe(e)&&Qe(t)){let r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};Object.prototype.hasOwnProperty.call(n,"__proto__")&&delete n.__proto__;for(let o of i){if(o==="__proto__")continue;let a=vr(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n[o]=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 i=0;i<e.length;i++){let n=e[i],o=t[i],a=vr(n,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function xg(e,t,r){let i=new Map,n,o=new Map,a=(l,u)=>{let d;if(l.code==="unrecognized_keys"&&!l.path?.length)n??(n=l),d=l.keys;else if(l.code==="invalid_key"&&l.origin==="record"&&l.path?.length===1){let m=String(l.path[0]);o.has(m)||o.set(m,l),d=[m]}else return!1;for(let m of d)i.has(m)||i.set(m,{}),i.get(m)[u]=!0;return!0};for(let l of t.issues)a(l,"l")||e.issues.push(l);for(let l of r.issues)a(l,"r")||e.issues.push(l);let s=[...i].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(s.length){let l=n?s.filter(u=>n.keys.includes(u)):[];l.length&&e.issues.push({...n,keys:l});for(let u of s)!l.includes(u)&&o.has(u)&&e.issues.push(o.get(u))}let c=vr(t.value,r.value);if(!c.valid){if(Oe(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var ba=g("$ZodTuple",(e,t)=>{F.init(e,t);let r=t.items,i=be.memoizer;i?.attach(e),e._zod.parse=(n,o)=>{let a=n.value;if(!Array.isArray(a))return n.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=i?i.alloc(e,n,[],o):[];let s=[],c=Sg(r,"optin"),l=Sg(r,"optout");if(!t.rest){if(a.length<c)return n.issues.push({code:"too_small",minimum:c,inclusive:!0,input:a,inst:e,origin:"array"}),n;a.length>r.length&&n.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:a,inst:e,origin:"array"})}let u=new Array(r.length),d=t.rest?o?.abortEarly:void 0,m=!1;for(let f=0;f<r.length;f++){let h=r[f]._zod.run({value:a[f],issues:[]},o);h instanceof Promise?s.push(h.then(w=>{u[f]=w})):(u[f]=h,d&&!m&&h.issues.length&&(m=Oe(h)))}if(t.rest&&!m){let f=r.length-1,h=a.slice(r.length),w=n.issues.length;for(let D of h){if(d&&n.issues.length!==w){if(Oe(n,w))break;w=n.issues.length}f++;let A=t.rest._zod.run({value:D,issues:[]},o);A instanceof Promise?s.push(A.then(C=>$g(C,n,f))):$g(A,n,f)}}return s.length?Promise.all(s).then(()=>Ig(u,n,r,a,l)):Ig(u,n,r,a,l)}});function Sg(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function $g(e,t,r){e.issues.length&&t.issues.push(...Ve(r,e.issues)),t.value[r]=e.value}function Ig(e,t,r,i,n){for(let o=0;o<r.length;o++){let a=e[o],s=o<i.length;if(!s&&o>=n&&r[o]._zod.optin==="optional"){t.value.length=o;break}if(a.issues.length){if(!s&&o>=n){t.value.length=o;break}t.issues.push(...Ve(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(r[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}var md=g("$ZodRecord",(e,t)=>{F.init(e,t);let r=be.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let o=i.value;if(!Qe(o))return i.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),i;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){i.value=r?r.alloc(e,i,{},n):{};let c=new Set;for(let u of s)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){if(c.add(typeof u=="number"?u.toString():u),u==="__proto__")continue;let d=t.keyType._zod.run({value:u,issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(h=>Be(h,n,le())),input:u,path:[u],inst:e});continue}let m=d.value;if(m==="__proto__")continue;let f=t.valueType._zod.run({value:o[u],issues:[]},n);f instanceof Promise?a.push(f.then(h=>{h.issues.length&&i.issues.push(...Ve(u,h.issues)),i.value[m]=h.value})):(f.issues.length&&i.issues.push(...Ve(u,f.issues)),i.value[m]=f.value)}let l;for(let u in o)if(!c.has(u))if(t.mode==="loose"){if(u==="__proto__")continue;i.value[u]=o[u]}else l=l??[],l.push(u);l&&l.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:l,continue:!0})}else{i.value=r?r.alloc(e,i,{},n):{};let c;for(let l of Reflect.ownKeys(o)){if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,l))continue;let u=t.keyType._zod.run({value:l,issues:[]},n);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&Ut.test(l)&&u.issues.length){let h=t.keyType._zod.run({value:Number(l),issues:[]},n);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");h.issues.length===0&&(u=h)}if(u.issues.length){t.mode==="loose"?i.value[l]=o[l]:s?(c=c??[],c.push(l)):i.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(h=>Be(h,n,le())),input:l,path:[l],inst:e});continue}let m=u.value;if(m==="__proto__")continue;let f=t.valueType._zod.run({value:o[l],issues:[]},n);f instanceof Promise?a.push(f.then(h=>{h.issues.length&&i.issues.push(...Ve(l,h.issues)),i.value[m]=h.value})):(f.issues.length&&i.issues.push(...Ve(l,f.issues)),i.value[m]=f.value)}c&&c.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c,continue:!0})}return a.length?Promise.all(a).then(()=>i):i}}),fd=g("$ZodMap",(e,t)=>{F.init(e,t);let r=be.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let o=i.value;if(!(o instanceof Map))return i.issues.push({expected:"map",code:"invalid_type",input:o,inst:e}),i;let a=[];i.value=r?r.alloc(e,i,new Map,n):new Map;let s=n?.abortEarly,c=i.issues.length;for(let[l,u]of o){if(s&&i.issues.length!==c){if(Oe(i,c))break;c=i.issues.length}let d=t.keyType._zod.run({value:l,issues:[]},n),m=t.valueType._zod.run({value:u,issues:[]},n);d instanceof Promise||m instanceof Promise?a.push(Promise.all([d,m]).then(([f,h])=>{Cg(f,h,i,l,o,e,n)})):Cg(d,m,i,l,o,e,n)}return a.length?Promise.all(a).then(()=>i):i}});function Cg(e,t,r,i,n,o,a){e.issues.length&&(yi.has(typeof i)?r.issues.push(...Ve(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(s=>Be(s,a,le()))})),t.issues.length&&(yi.has(typeof i)?r.issues.push(...Ve(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(s=>Be(s,a,le()))})),r.value.set(e.value,t.value)}var hd=g("$ZodSet",(e,t)=>{F.init(e,t);let r=be.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let o=i.value;if(!(o instanceof Set))return i.issues.push({input:o,inst:e,expected:"set",code:"invalid_type"}),i;let a=[];i.value=r?r.alloc(e,i,new Set,n):new Set;let s=n?.abortEarly,c=i.issues.length;for(let l of o){if(s&&i.issues.length!==c){if(Oe(i,c))break;c=i.issues.length}let u=t.valueType._zod.run({value:l,issues:[]},n);u instanceof Promise?a.push(u.then(d=>Ag(d,i))):Ag(u,i)}return a.length?Promise.all(a).then(()=>i):i}});function Ag(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var gd=g("$ZodEnum",(e,t)=>{F.init(e,t);let r=cr(t.entries),i=new Set(r);e._zod.values=i,H(e,"pattern",n=>{let o=cr(n.def.entries).filter(a=>yi.has(typeof a));return new RegExp(o.length?`^(${o.map(a=>et(a.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(n,o)=>{let a=n.value;return i.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),yd=g("$ZodLiteral",(e,t)=>{F.init(e,t);let r=new Set(t.values);e._zod.values=r,H(e,"pattern",i=>{let n=i.def.values;return new RegExp(n.length?`^(${n.map(o=>typeof o=="string"?et(o):o?et(o.toString()):String(o)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(i,n)=>{let o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),vd=g("$ZodFile",(e,t)=>{F.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),bd=g("$ZodTransform",(e,t)=>{F.init(e,t),e._zod.optin="optional",be.memoizer?.guard(e),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new tn(e.constructor.name);let n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new Fe;return r.value=n,r}});function Dg(e,t){return e.value=t.issues.length?void 0:t.value,e}var wa=g("$ZodOptional",(e,t)=>{F.init(e,t),H(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",H(e,"values",r=>{let i=r.def.innerType._zod.values;return i?new Set([...i,void 0]):void 0}),H(e,"pattern",r=>{let i=r.def.innerType._zod.pattern;return i?new RegExp(`^(${Lt(i.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;let n=t.innerType._zod.run({value:r.value,issues:[]},i);return n instanceof Promise?n.then(o=>Dg(r,o)):Dg(r,n)}return t.innerType._zod.run(r,i)}}),wd=g("$ZodExactOptional",(e,t)=>{wa.init(e,t),H(e,"values",r=>r.def.innerType._zod.values),H(e,"pattern",r=>r.def.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),kd=g("$ZodNullable",(e,t)=>{F.init(e,t),H(e,"optin",r=>r.def.innerType._zod.optin),H(e,"optout",r=>r.def.innerType._zod.optout),H(e,"pattern",r=>{let i=r.def.innerType._zod.pattern;return i?new RegExp(`^(${Lt(i.source)}|null)$`):void 0}),H(e,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),_d=g("$ZodDefault",(e,t)=>{F.init(e,t),e._zod.optin="defaulted",H(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Rg(o,t)):Rg(n,t)}});function Rg(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var xd=g("$ZodPrefault",(e,t)=>{F.init(e,t),e._zod.optin="defaulted",H(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),Sd=g("$ZodNonOptional",(e,t)=>{F.init(e,t),H(e,"values",r=>{let i=r.def.innerType._zod.values;return i?new Set([...i].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,i)=>{let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Tg(o,e)):Tg(n,e)}});function Tg(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 $d=g("$ZodSuccess",(e,t)=>{F.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new tn("ZodSuccess");let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}});function Eg(e,t,r,i){return t.issues.length?(e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(n=>Be(n,i,le()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Id=g("$ZodCatch",(e,t)=>{F.init(e,t),H(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),H(e,"optout",r=>r.def.innerType._zod.optout),H(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run({value:r.value,issues:[]},i);return n instanceof Promise?n.then(o=>Eg(r,o,t,i)):Eg(r,n,t,i)}}),Cd=g("$ZodNaN",(e,t)=>{F.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),ka=g("$ZodPipe",(e,t)=>{F.init(e,t),H(e,"values",r=>r.def.in._zod.values),H(e,"optin",r=>r.def.in._zod.optin),H(e,"optout",r=>r.def.out._zod.optout),H(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>ra(a,t.in,i)):ra(o,t.in,i)}let n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>ra(o,t.out,i)):ra(n,t.out,i)}});function ra(e,t,r){return e.issues.some(i=>i.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var Ui=g("$ZodCodec",(e,t)=>{F.init(e,t),H(e,"values",r=>r.def.in._zod.values),H(e,"optin",r=>r.def.in._zod.optin),H(e,"optout",r=>r.def.out._zod.optout),H(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(r,i);return o instanceof Promise?o.then(a=>ia(a,t,i)):ia(o,t,i)}else{let o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>ia(a,t,i)):ia(o,t,i)}}});function ia(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(o=>oa(e,o,t.out,r)):oa(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>oa(e,o,t.in,r)):oa(e,n,t.in,r)}}function oa(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}var Ad=g("$ZodPreprocess",(e,t)=>{ka.init(e,t)}),Dd=g("$ZodReadonly",(e,t)=>{F.init(e,t),H(e,"propValues",r=>r.def.innerType._zod.propValues),H(e,"values",r=>r.def.innerType._zod.values),H(e,"optin",r=>r.def.innerType?._zod?.optin),H(e,"optout",r=>r.def.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(Og):Og(n)}});function Og(e){return e.memo||(e.value=Object.freeze(e.value)),e}function II(e){let t=e._zod.def,r=t.pattern,i=!!t.format?.includes("int"),n,o;for(let s of t.checks??[]){let c=s._zod.def;c.pattern&&(r=c.pattern),i||(i=!!c.format?.includes("int"));let l=c.minimum??c.length,u=c.maximum??c.length;l!==void 0&&(n===void 0||l>n)&&(n=l),u!==void 0&&(o===void 0||u<o)&&(o=u)}if(r)return r.source;if(n!==void 0&&o!==void 0&&n>o)return"(?!)";if(n!==void 0||o!==void 0)return Zl({minimum:n,maximum:o}).source;let a=e._zod.pattern;return(i&&a===Ut?Ai:a)?.source}function ku(e){let t=e._zod.def,r=e._zod.pattern?.source,i=t.innerType??e._zod.innerType;if(i){let n=i._zod.pattern?.source,o=ku(i);return r&&n&&o&&o!==n?r.replace(Lt(n),()=>Lt(o)):r}if(t.options){let n=t.options.map(ku);if(n.every(Boolean))return`^(${n.map(o=>Lt(o)).join("|")})$`}return II(e)}var Rd=g("$ZodTemplateLiteral",(e,t)=>{F.init(e,t);let r=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){let n=ku(i);if(!n)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);r.push(Lt(n))}else if(i===null||ol.has(typeof i))r.push(et(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),Td=g("$ZodFunction",(e,t)=>(F.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...i){let n=e._def.input?Vo(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?Vo(e._def.output,o):o},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...i){let n=e._def.input?await Bo(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await Bo(e._def.output,o):o},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new ba({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),Ed=g("$ZodPromise",(e,t)=>{F.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),zi=g("$ZodLazy",(e,t)=>{F.init(e,t),nl(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),H(e,"pattern",r=>r.innerType?._zod?.pattern),H(e,"propValues",r=>r.innerType?._zod?.propValues),H(e,"optin",r=>r.innerType?._zod?.optin??void 0),H(e,"optout",r=>r.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),Od=g("$ZodCustom",(e,t)=>{oe.init(e,t),F.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{let i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>Pg(o,r,i,e));Pg(n,r,i,e)}});function Pg(e,t,r,i){if(!e){let n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(pr(n))}}var $a=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},jd="~memo",Bg=[];function Fg(e){return e!==null&&typeof e=="object"}function Pd(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var Jg=new WeakMap,br=0,Sa=1,Mi=2;function Vi(e,t,r){let i=Jg.get(e);if(i!==void 0)return i?Mi:br;if(t.has(e))return Mi;t.add(e);let n=br,o=u=>{if(n!==Mi&&u?._zod){let d=Vi(u,t,r);d>n&&(n=d)}},a=(u,d)=>{let m=br;for(let f of Reflect.ownKeys(u)){let h=Object.getOwnPropertyDescriptor(u,f);if(d&&!h.enumerable)continue;let w=h.get?Sa:h.value?._zod?Vi(h.value,t,r):br;w>m&&(m=w)}return m},s=u=>{u>n&&(n=u)},c=e._zod.def,l=c.type;switch(l){case"object":{let u=dr(c);s(u?a(u,!0):Sa),o(c.catchall);break}case"array":o(c.element);break;case"tuple":for(let u of c.items)o(u);o(c.rest);break;case"record":case"map":o(c.keyType),o(c.valueType);break;case"set":o(c.valueType);break;case"union":for(let u of c.options)o(u);break;case"intersection":o(c.left),o(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":o(c.innerType);break;case"pipe":o(c.in),o(c.out);break;case"function":o(c.input),o(c.output);break;case"lazy":{let u=c._cachedInner??(r?e._zod.innerType:void 0);s(u?Vi(u,t,!1):Sa);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let u in c){let d=Object.getOwnPropertyDescriptor(c,u);if(!d||d.get)continue;let m=d.value;if(!(!m||typeof m!="object")){if(m._zod)o(m);else if(Array.isArray(m))for(let f of m)o(f)}}}return t.delete(e),CI(e,n)}function CI(e,t){return t!==Sa&&Jg.set(e,t===Mi),t}function Ia(e){return Vi(e,new Set,!0)!==br}function AI(e,t){let r=e.buckets.get(t);return r||(r=new WeakMap,e.buckets.set(t,r)),r}var _a,xa=[],DI={alloc(e,t,r){let i=_a;if(!i)return r;_a=void 0;let n={value:r,issues:null};return i.set(t.value,n),xa.push(n),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,i=(n,o)=>{if(o.direction!=="backward"&&Ca(o,n.value))throw new $a;return r(n,o)};e._zod.parse=i,e._zod.run===r&&(e._zod.run=i)})},attach(e){var t;let r,i=!1,n,o;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let a=e._zod.parse,s=(c,l)=>{if(r===void 0){let A=Vi(e,new Set,!1);if(A===br)return e._zod.parse=a,e._zod.run===s&&(e._zod.run=a),a(c,l);A===Mi||i?r=!0:i=!0}let u=c.value;if(!Fg(u))return a(c,l);let d=l[jd];d||(d={buckets:new WeakMap,backEdges:void 0},l[jd]=d);let m;n===l?m=o:(m=AI(d,e),n=l,o=m);let f=m.get(u);if(f)return c.value=f.value,f.issues?f.issues.length&&c.issues.push(...Pd(f.issues)):(c.memo=!0,d.backEdges??(d.backEdges=new WeakSet),d.backEdges.add(f.value)),c;_a=m;let h=xa.length,w=a(c,l);_a=void 0;let D=xa.length>h?xa.pop():void 0;return w instanceof Promise?w.then(A=>(D&&(D.issues=A.issues.length?Pd(A.issues):Bg),A)):(D&&(D.issues=w.issues.length?Pd(w.issues):Bg),w)};e._zod.parse=s,e._zod.run===a&&(e._zod.run=s)})}};function Bi(){return DI}function Ca(e,t){let r=e[jd]?.backEdges;return r!==void 0&&Fg(t)&&r.has(t)}var Ji={};Et(Ji,{ar:()=>Zg,az:()=>Wg,be:()=>Kg,bg:()=>qg,bn:()=>Gg,ca:()=>Xg,ckb:()=>Yg,cs:()=>Qg,da:()=>ey,de:()=>ty,el:()=>ny,en:()=>Aa,eo:()=>ry,es:()=>iy,fa:()=>oy,fi:()=>ay,fr:()=>sy,frCA:()=>cy,gu:()=>ly,he:()=>uy,hi:()=>dy,hr:()=>py,hu:()=>my,hy:()=>hy,id:()=>gy,is:()=>yy,it:()=>vy,ja:()=>by,ka:()=>wy,kh:()=>ky,km:()=>Da,kn:()=>_y,ko:()=>xy,lt:()=>$y,mk:()=>Iy,ms:()=>Cy,ne:()=>Ay,nl:()=>Dy,nn:()=>Ry,no:()=>Ty,ota:()=>Ey,pl:()=>Py,ps:()=>Oy,pt:()=>jy,ptBR:()=>Ny,ro:()=>Ly,ru:()=>zy,sk:()=>My,sl:()=>Vy,sv:()=>By,ta:()=>Fy,tg:()=>Jy,th:()=>Zy,tk:()=>Wy,tr:()=>Hy,ua:()=>Ky,uk:()=>Ra,ur:()=>qy,uz:()=>Gy,vi:()=>Xy,yo:()=>ev,zhCN:()=>Yy,zhTW:()=>Qy});var RI=()=>{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"},map:{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",mac:"\u0639\u0646\u0648\u0627\u0646 MAC",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",credit_card:"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",currency_code:"\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",iban:"IBAN",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}\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 ${x(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 o=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"} ${o} ${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"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=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 ${o} ${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 ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${r[o.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${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 Zg(){return{localeError:RI()}}var TI=()=>{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"},map:{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",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",credit_card:"kredit kart\u0131 n\xF6mr\u0259si",currency_code:"valyuta kodu",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, daxil olan ${s}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${x(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[o.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${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 Wg(){return{localeError:TI()}}function Hg(e,t,r,i){let n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}var EI=()=>{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"},map:{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",mac:"MAC \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",credit_card:"\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, \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 ${x(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 o=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=Hg(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} ${o}${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 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=Hg(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} ${o}${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 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${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 Kg(){return{localeError:EI()}}var OI=()=>{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"},map:{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",mac:"MAC \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",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, \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 ${x(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 o=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 ${o}${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 ${o}${n.maximum.toString()}`}case"too_small":{let o=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 ${o}${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 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${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 qg(){return{localeError:OI()}}var PI=()=>{let e={string:{unit:"\u0985\u0995\u09CD\u09B7\u09B0",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},file:{unit:"\u09AC\u09BE\u0987\u099F",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},array:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},set:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},map:{unit:"\u098F\u09A8\u09CD\u099F\u09CD\u09B0\u09BF",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"}};function t(n){return e[n]??null}let r={regex:"\u0987\u09A8\u09AA\u09C1\u099F",email:"\u0987\u09AE\u09C7\u0987\u09B2 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",url:"URL",emoji:"\u0987\u09AE\u09CB\u099C\u09BF",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u09A4\u09BE\u09B0\u09BF\u0996 \u0993 \u09B8\u09AE\u09AF\u09BC",date:"ISO \u09A4\u09BE\u09B0\u09BF\u0996",time:"ISO \u09B8\u09AE\u09AF\u09BC",duration:"ISO \u09B8\u09AE\u09AF\u09BC\u0995\u09BE\u09B2",ipv4:"IPv4 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",ipv6:"IPv6 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",mac:"MAC \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",cidrv4:"IPv4 \u09B0\u09C7\u099E\u09CD\u099C",cidrv6:"IPv6 \u09B0\u09C7\u099E\u09CD\u099C",base64:"base64-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",base64url:"base64url-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",json_string:"JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",e164:"E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",credit_card:"\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",currency_code:"\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",iban:"IBAN",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${o}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${s}`}case"invalid_value":return n.values.length===1?`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${x(n.values[0])}`:`\u0985\u09AC\u09C8\u09A7 \u0985\u09AA\u09B6\u09A8: ${y(n.values," | ")} \u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 \u098F\u0995\u099F\u09BF \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${n.origin??"\u09AE\u09BE\u09A8"} ${o}${n.maximum.toString()} ${a.unit??"\u098F\u09B2\u09BF\u09AE\u09C7\u09A8\u09CD\u099F"} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${n.origin??"\u09AE\u09BE\u09A8"} ${o}${n.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${n.origin} ${o}${n.minimum.toString()} ${a.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${n.origin} ${o}${n.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${o.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0985\u09AC\u09C8\u09A7 \u09A8\u09AE\u09CD\u09AC\u09B0: ${n.divisor} \u098F\u09B0 \u0997\u09C1\u09A3\u09BF\u09A4\u0995 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`;case"unrecognized_keys":return`\u0985\u099A\u09C7\u09A8\u09BE \u0995\u09C0${n.keys.length>1?"\u0997\u09C1\u09B2\u09CB":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u0995\u09C0`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0985\u09AC\u09C8\u09A7 \u09A1\u09BF\u09B8\u0995\u09CD\u09B0\u09BF\u09AE\u09BF\u09A8\u09C7\u099F\u09B0 \u09AE\u09BE\u09A8\u0964 \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F";case"invalid_element":return`${n.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u09AE\u09BE\u09A8`;default:return"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F"}}};function Gg(){return{localeError:PI()}}var jI=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{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",mac:"adre\xE7a MAC",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",credit_card:"n\xFAmero de targeta de cr\xE8dit",currency_code:"codi de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, s'ha rebut ${s}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${x(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${y(n.values," o ")}`;case"too_big":{let o=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 ${o} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${o} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${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 Xg(){return{localeError:jI()}}var NI=()=>{let e={string:{unit:"\u067E\u06CC\u062A",verb:"\u0628\u06CE\u062A"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u0628\u06CE\u062A"},array:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},set:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},map:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"}};function t(n){return e[n]??null}let r={regex:"regex",email:"\u0626\u06CC\u0645\u06D5\u06CC\u06B5",url:"\u0628\u06D5\u0633\u062A\u06D5\u0631 (URL)",emoji:"\u0626\u06CC\u0645\u06C6\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0695\u06CE\u06A9\u06D5\u0648\u062A \u0648 \u06A9\u0627\u062A",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",time:"\u06A9\u0627\u062A",duration:"\u0645\u0627\u0648\u06D5",ipv4:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv4",ipv6:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv6",mac:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC MAC",cidrv4:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv4",cidrv6:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv6",base64:"\u062F\u06D5\u0642\u06CC base64",base64url:"\u062F\u06D5\u0642\u06CC base64url",json_string:"\u062F\u06D5\u0642\u06CC JSON",e164:"\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",credit_card:"\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",currency_code:"\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",iban:"IBAN",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},i={nan:"NaN",string:"\u0646\u0648\u0648\u0633\u06CC\u0646",number:"\u0698\u0645\u0627\u0631\u06D5",boolean:"boolean",array:"array",object:"object",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",integer:"\u0698\u0645\u0627\u0631\u06D5",float:"\u0698\u0645\u0627\u0631\u06D5",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a,c=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(u=>s.endsWith(u))?"\u06CC\u06D5":"\u06D5",l=/^[a-zA-Z]+$/.test(s);return a==="null"||a==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${o} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${s}${l?"":c}`}case"invalid_value":return n.values.length===1?`\u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0648\u0633\u062A\u06D5: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${x(n.values[0])} \u0628\u06CE\u062A`:`\u0647\u06D5\u06B5\u0628\u0698\u0627\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 \u06CC\u06D5\u06A9\u06CE\u06A9 \u0628\u06CE\u062A \u0644\u06D5 ${y(n.values,"|")}`;case"too_big":{let o=t(n.origin);return o?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${n.maximum.toString()} ${o.unit} ${o.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${n.maximum.toString()} \u0628\u06CE\u062A`}case"too_small":{let o=t(n.origin);return o?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${n.minimum.toString()} ${o.unit} ${o.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${n.minimum.toString()} \u0628\u06CE\u062A`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u062F\u06D5\u0633\u062A\u067E\u06CE\u0628\u06A9\u0627\u062A \u0628\u06D5 "${o.prefix}"`:o.format==="ends_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u06A9\u06C6\u062A\u0627\u06CC\u06CC\u0628\u06CE\u062A \u0628\u06D5 "${o.suffix}"`:o.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${o.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:o.format==="regex"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0644\u06D5\u06AF\u06D5\u06B5 \u067E\u0627\u062A\u06CE\u0631\u0646\u06CC ${o.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${r[o.format]??n.format} \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`}case"not_multiple_of":return`\u0698\u0645\u0627\u0631\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u062F\u06D5\u0628\u06CE\u062A \u0686\u06D5\u0646\u062F \u0647\u06CE\u0646\u062F\u06D5 \u0628\u06CE\u062A \u0628\u06C6 ${n.divisor}`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648: ${y(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A \u0644\u06D5 ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0628\u06D5\u0647\u0627\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648 \u0647\u06D5\u06CC\u06D5. \u0628\u06D5\u0647\u0627\u06CC \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648: ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u06CC\u06D5\u06A9\u06AF\u0631\u062A\u0646\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A";case"invalid_element":return`${n.origin} \u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`;default:return"\u062A\u06CE\u06A9\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A"}}};function Yg(){return{localeError:NI()}}var LI=()=>{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"},map:{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",mac:"MAC 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",credit_card:"\u010D\xEDslo kreditn\xED karty",currency_code:"k\xF3d m\u011Bny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, obdr\u017Eeno ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${x(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${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 Qg(){return{localeError:LI()}}var UI=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{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-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${s}`:`Ugyldigt input: forventede ${o}, fik ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${x(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin),s=i[n.origin]??n.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${o} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin),s=i[n.origin]??n.origin;return a?`For lille: forventede ${s} ${a.verb} ${o} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${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 ey(){return{localeError:UI()}}var zI=()=>{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"},map:{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",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",currency_code:"W\xE4hrungscode",iban:"IBAN",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${s}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${x(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${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 ty(){return{localeError:zI()}}var MI=()=>{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",credit_card:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",currency_code:"\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",iban:"IBAN",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, \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 ${x(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 o=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 ${o}${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 ${o}${n.maximum.toString()}`}case"too_small":{let o=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 ${o}${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 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[o.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 ny(){return{localeError:MI()}}var VI=()=>{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(o){return e[o]??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",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};function n(o,a){return o==="number"&&typeof a=="number"&&!Number.isFinite(a)?String(a):i[o]??o}return o=>{switch(o.code){case"invalid_type":{let a=n(o.expected),s=S(o.input),c=n(s,o.input);return`Invalid input: expected ${a}, received ${c}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${x(o.values[0])}`:`Invalid option: expected one of ${y(o.values,"|")}`;case"too_big":{let a=o.exact?"exactly ":o.inclusive?"<=":"<",s=t(o.origin);return s?`Too big: expected ${o.origin??"value"} to have ${a}${o.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${a}${o.maximum.toString()}`}case"too_small":{let a=o.exact?"exactly ":o.inclusive?">=":">",s=t(o.origin);return s?`Too small: expected ${o.origin} to have ${a}${o.minimum.toString()} ${s.unit}`:`Too small: expected ${o.origin} to be ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${r[a.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${y(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`Invalid discriminator value. Expected ${o.options.map(s=>`'${s}'`).join(" | ")}`:o.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function Aa(){return{localeError:VI()}}var BI=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{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",mac:"MAC-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",credit_card:"kreditkarta numero",currency_code:"valuta kodo",iban:"IBAN",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${s}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${x(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${o}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${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 ry(){return{localeError:BI()}}var FI=()=>{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",mac:"direcci\xF3n MAC",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",credit_card:"n\xFAmero de tarjeta de cr\xE9dito",currency_code:"c\xF3digo de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${x(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${o}${n.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function iy(){return{localeError:FI()}}var JI=()=>{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"},map:{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",mac:"MAC \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",credit_card:"\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",currency_code:"\u06A9\u062F \u0627\u0631\u0632",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o} \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 ${x(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 o=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 ${o}${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 ${o}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[o.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${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 oy(){return{localeError:JI()}}var ZI=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},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",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",currency_code:"valuuttakoodi",iban:"IBAN",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${s}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${x(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${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 ay(){return{localeError:ZI()}}var WI=()=>{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:"expression r\xE9guli\xE8re",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",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne de caract\xE8res encod\xE9e en base64",base64url:"cha\xEEne de caract\xE8res encod\xE9e en base64url",json_string:"cha\xEEne de caract\xE8res JSON",e164:"num\xE9ro au format E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne de caract\xE8res",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:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instance de ${n.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${s} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${x(n.values[0])} attendu`:`Option invalide : une valeur parmi ${y(n.values,"|")} attendue`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${i[n.origin]??"valeur"} doit ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[n.origin]??"valeur"} doit \xEAtre ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${i[n.origin]??"valeur"} doit ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${i[n.origin]??"valeur"} doit \xEAtre ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne de caract\xE8res invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${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 sy(){return{localeError:WI()}}var HI=()=>{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"},map:{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",mac:"adresse MAC",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",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${s}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${x(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u2264":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u2265":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${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 cy(){return{localeError:HI()}}var KI=()=>{let e={string:{unit:"\u0A85\u0A95\u0ACD\u0AB7\u0AB0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},file:{unit:"\u0AAC\u0ABE\u0AAF\u0A9F",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},array:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},set:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},map:{unit:"\u0A8F\u0AA8\u0ACD\u0A9F\u0ACD\u0AB0\u0AC0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"}};function t(n){return e[n]??null}let r={regex:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F",email:"\u0A88\u0AAE\u0AC7\u0A87\u0AB2 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",url:"URL",emoji:"\u0A87\u0AAE\u0ACB\u0A9C\u0AC0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96 \u0A85\u0AA8\u0AC7 \u0AB8\u0AAE\u0AAF",date:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96",time:"ISO \u0AB8\u0AAE\u0AAF",duration:"ISO \u0A85\u0AB5\u0AA7\u0ABF",ipv4:"IPv4 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",ipv6:"IPv6 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",mac:"MAC \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",cidrv4:"IPv4 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",cidrv6:"IPv6 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",base64:"base64-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",base64url:"base64url-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",json_string:"JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",e164:"E.164 \u0AA8\u0A82\u0AAC\u0AB0",credit_card:"\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",currency_code:"\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",iban:"IBAN",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${o}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${s}`}case"invalid_value":return n.values.length===1?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${x(n.values[0])}`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB5\u0ABF\u0A95\u0AB2\u0ACD\u0AAA: ${y(n.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${n.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${o}${n.maximum.toString()} ${a.unit??"\u0A8F\u0AB2\u0ABF\u0AAE\u0AC7\u0AA8\u0ACD\u0A9F"} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${n.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${o}${n.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${n.origin} ${o}${n.minimum.toString()} ${a.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${n.origin} ${o}${n.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${o.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA8\u0A82\u0AAC\u0AB0: ${n.divisor} \u0AA8\u0ACB \u0A97\u0AC1\u0AA3\u0ABE\u0A82\u0A95 \u0AB9\u0ACB\u0AB5\u0ACB \u0A9C\u0ACB\u0A88\u0A8F`;case"unrecognized_keys":return`\u0A93\u0AB3\u0A96\u0AC0 \u0AB6\u0A95\u0ABE\u0AA4\u0ABE \u0AA8\u0AB9\u0AC0\u0A82 \u0AA4\u0AC7 \u0A95\u0AC0${n.keys.length>1?"\u0A93":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A95\u0AC0`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA1\u0ABF\u0AB8\u0ACD\u0A95\u0ACD\u0AB0\u0ABF\u0AAE\u0ABF\u0AA8\u0AC7\u0A9F\u0AB0 \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF. \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F";case"invalid_element":return`${n.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF`;default:return"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F"}}};function ly(){return{localeError:KI()}}var qI=()=>{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,i=l=>{let u=r(l);return u?u.label:l??e.unknown.label},n=l=>`\u05D4${i(l)}`,o=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"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",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"},mac:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA MAC",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"},credit_card:{label:"\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9",gender:"m"},currency_code:{label:"\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2",gender:"m"},iban:{label:"IBAN",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"\u05E7\u05DC\u05D8",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 u=l.expected,d=c[u??""]??i(u),m=S(l.input),f=c[m]??e[m]?.label??m;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${x(l.values[0])}`;let u=l.values.map(f=>x(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 ${u[0]} \u05D0\u05D5 ${u[1]}`;let d=u[u.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 ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let u=a(l.origin),d=n(l.origin??"value");if(l.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${u?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let h=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(l.origin==="array"||l.origin==="set"){let h=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",w=l.inclusive?`${l.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${w}`.trim()}let m=l.inclusive?"<=":"<",f=o(l.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${l.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${l.maximum.toString()}`}case"too_small":{let u=a(l.origin),d=n(l.origin??"value");if(l.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${u?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let h=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(l.origin==="array"||l.origin==="set"){let h=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let D=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${D}`}let w=l.inclusive?`${l.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${w}`.trim()}let m=l.inclusive?">=":">",f=o(l.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${l.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${l.minimum.toString()}`}case"invalid_format":{let u=l;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.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 ${u.pattern}`;let d=s[u.format],m=d?.label??u.format,h=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${m} \u05DC\u05D0 ${h}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${y(l.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function uy(){return{localeError:qI()}}var GI=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},file:{unit:"\u092C\u093E\u0907\u091F\u094D\u0938",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F\u092F\u093E\u0901",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"}};function t(n){return e[n]??null}let r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0908\u092E\u0947\u0932 \u092A\u0924\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0924\u093F\u0925\u093F \u0914\u0930 \u0938\u092E\u092F",date:"ISO \u0924\u093F\u0925\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u092A\u0924\u093E",ipv6:"IPv6 \u092A\u0924\u093E",mac:"MAC \u092A\u0924\u093E",cidrv4:"IPv4 \u0936\u094D\u0930\u0947\u0923\u0940",cidrv6:"IPv6 \u0936\u094D\u0930\u0947\u0923\u0940",base64:"Base64-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",base64url:"Base64URL-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",e164:"E.164 \u0938\u0902\u0916\u094D\u092F\u093E",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return n.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${x(n.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u094B\u0902 \u092E\u0947\u0902 \u0938\u0947 \u090F\u0915 ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin??"\u092E\u093E\u0928"} \u092E\u0947\u0902 ${o}${n.maximum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin??"\u092E\u093E\u0928"} ${o}${n.maximum} \u0939\u094B`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin} \u092E\u0947\u0902 ${o}${n.minimum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin} ${o}${n.minimum} \u0939\u094B`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${o.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${o.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${o.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${o.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: \u092F\u0939 ${n.divisor} \u0915\u093E \u0917\u0941\u0923\u091C \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u0902\u091C\u0940${n.keys.length>1?"\u092F\u093E\u0901":""}: ${y(n.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u0902\u091C\u0940: ${n.origin} \u092E\u0947\u0902`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${n.origin} \u092E\u0947\u0902`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function dy(){return{localeError:GI()}}var XI=()=>{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",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",currency_code:"kod valute",iban:"IBAN",jwt:"JWT",template_literal:"unos"},i={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 o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, a primljeno je ${s}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${x(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${o}${n.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${o}${n.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${r[o.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 ${i[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[n.origin]??n.origin}`;default:return"Neispravan unos"}}};function py(){return{localeError:XI()}}var YI=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{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",mac:"MAC 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",credit_card:"hitelk\xE1rtyasz\xE1m",currency_code:"p\xE9nznemk\xF3d",iban:"IBAN",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${x(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${n.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${o}${n.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[o.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${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 my(){return{localeError:YI()}}function fy(e,t,r){return Math.abs(e)===1?t:r}function wr(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 QI=()=>{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"},map:{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",mac:"MAC \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",credit_card:"\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",currency_code:"\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",iban:"IBAN",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, \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 ${x(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 o=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=fy(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 ${wr(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${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 ${wr(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=fy(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 ${wr(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${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 ${wr(n.origin)} \u056C\u056B\u0576\u056B ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[o.format]??n.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${y(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${wr(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 ${wr(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function hy(){return{localeError:QI()}}var eC=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{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",mac:"alamat MAC",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",credit_card:"nomor kartu kredit",currency_code:"kode mata uang",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${o}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${x(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${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 gy(){return{localeError:eC()}}var tC=()=>{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"},map:{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",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",credit_card:"kreditkortan\xFAmer",currency_code:"gjaldmi\xF0ilsk\xF3\xF0i",iban:"IBAN",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${x(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${o}${n.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${r[o.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${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 yy(){return{localeError:tC()}}var nC=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{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",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",currency_code:"codice valuta",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${s}`:`Input non valido: atteso ${o}, ricevuto ${s}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${x(n.values[0])}`:`Opzione non valida: atteso uno tra ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${r[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${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 vy(){return{localeError:nC()}}var rC=()=>{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"},map:{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",mac:"MAC\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",credit_card:"\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",currency_code:"\u901A\u8CA8\u30B3\u30FC\u30C9",iban:"IBAN",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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: ${o}\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: ${x(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 o=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"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(n.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${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 by(){return{localeError:rC()}}var iC=()=>{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"},map:{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",mac:"MAC \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",credit_card:"\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",currency_code:"\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",iban:"IBAN",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={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 o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, \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 ${x(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 o=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} ${o}${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 ${o}${n.maximum.toString()}`}case"too_small":{let o=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} ${o}${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 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.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 "${o.prefix}"-\u10D8\u10D7`:o.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 "${o.suffix}"-\u10D8\u10D7`:o.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 "${o.includes}"-\u10E1`:o.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 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${n.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${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 wy(){return{localeError:iC()}}var oC=()=>{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"},map:{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",mac:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 MAC",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",credit_card:"\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",currency_code:"\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",iban:"IBAN",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o} \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 ${x(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 o=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"} ${o} ${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"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=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} ${o} ${n.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${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 Da(){return{localeError:oC()}}function ky(){return Da()}var aC=()=>{let e={string:{unit:"\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},file:{unit:"\u0CAC\u0CC8\u0C9F\u0CCD\u200C\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},array:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},set:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},map:{unit:"entries",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"}};function t(n){return e[n]??null}let r={regex:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD",email:"email \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",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 \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95\u0CA6 \u0CB8\u0CAE\u0CAF",date:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95",time:"ISO \u0CB8\u0CAE\u0CAF",duration:"ISO \u0C85\u0CB5\u0CA7\u0CBF",ipv4:"IPv4 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",ipv6:"IPv6 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",mac:"MAC \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",cidrv4:"IPv4 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",cidrv6:"IPv6 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",base64:"base64-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",base64url:"base64url-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",json_string:"JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",e164:"E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",credit_card:"\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",currency_code:"\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",iban:"IBAN",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${s}`}case"invalid_value":return n.values.length===1?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${x(n.values[0])}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C86\u0CAF\u0CCD\u0C95\u0CC6: \u0C87\u0CB5\u0CC1\u0C97\u0CB3\u0CB2\u0CCD\u0CB2\u0CBF \u0C92\u0C82\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin??"value"} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${o}${n.maximum.toString()} ${a.unit??"\u0C85\u0C82\u0CB6\u0C97\u0CB3\u0CC1"}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin??"value"} \u0C8E\u0C82\u0CA6\u0CC1 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${o}${n.minimum.toString()} ${a.unit}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin} \u0C8E\u0C82\u0CA6\u0CC1 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0CAA\u0CCD\u0CB0\u0CBE\u0CB0\u0C82\u0CAD\u0CBF\u0CB8\u0CAC\u0CC7\u0C95\u0CC1 "${o.prefix}"`:o.format==="ends_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0C95\u0CCA\u0CA8\u0CC6\u0C97\u0CCA\u0CB3\u0CCD\u0CB3\u0CAC\u0CC7\u0C95\u0CC1 "${o.suffix}"`:o.format==="includes"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C92\u0CB3\u0C97\u0CCA\u0C82\u0CA1\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 "${o.includes}"`:o.format==="regex"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0CAE\u0CBE\u0CA6\u0CB0\u0CBF\u0C97\u0CC6 \u0CB9\u0CCA\u0C82\u0CA6\u0CBF\u0C95\u0CC6\u0CAF\u0CBE\u0C97\u0CAC\u0CC7\u0C95\u0CC1 ${o.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6: \u0CAC\u0CB9\u0CC1\u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6\u0CAF\u0CBE\u0C97\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 ${n.divisor}`;case"unrecognized_keys":return`\u0C97\u0CC1\u0CB0\u0CC1\u0CA4\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CA6 \u0C95\u0CC0 ${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0C95\u0CC0 \u0C87\u0CA8\u0CCD ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CA4\u0CBE\u0CB0\u0CA4\u0CAE\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF. \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD";case"invalid_element":return`\u0CB0\u0CB2\u0CCD\u0CB2\u0CBF \u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF ${n.origin}`;default:return"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD"}}};function _y(){return{localeError:aC()}}var sC=()=>{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"},map:{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",mac:"MAC \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",credit_card:"\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",currency_code:"\uD1B5\uD654 \uCF54\uB4DC",iban:"IBAN",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${x(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 o=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\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} ${o}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${o}${a}`}case"too_small":{let o=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\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} ${o}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[o.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${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 xy(){return{localeError:sC()}}var Fi=e=>e.charAt(0).toUpperCase()+e.slice(1);function Sy(e){let t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}var cC=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(n,o,a,s){let c=e[n]??null;return c===null?c:{unit:c.unit[o],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",mac:"MAC 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",credit_card:"kredito kortel\u0117s numeris",currency_code:"valiutos kodas",iban:"IBAN",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${o}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${x(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${y(n.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[n.origin]??n.origin,a=t(n.origin,Sy(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${Fi(o??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`${Fi(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.maximum.toString()} ${a?.unit}`}case"too_small":{let o=i[n.origin]??n.origin,a=t(n.origin,Sy(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${Fi(o??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`${Fi(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${r[o.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${y(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[n.origin]??n.origin;return`${Fi(o??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function $y(){return{localeError:cC()}}var lC=()=>{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"},map:{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",mac:"MAC \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",credit_card:"\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${x(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 o=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 ${o}${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 ${o}${n.maximum.toString()}`}case"too_small":{let o=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 ${o}${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 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${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 Iy(){return{localeError:lC()}}var uC=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{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",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",currency_code:"kod mata wang",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${s}`:`Input tidak sah: dijangka ${o}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${x(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${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 Cy(){return{localeError:uC()}}var dC=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},file:{unit:"\u092C\u093E\u0907\u091F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"}};function t(n){return e[n]??null}let r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0907\u092E\u0947\u0932 \u0920\u0947\u0917\u093E\u0928\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u092E\u093F\u0924\u093F \u0930 \u0938\u092E\u092F",date:"ISO \u092E\u093F\u0924\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u0920\u0947\u0917\u093E\u0928\u093E",ipv6:"IPv6 \u0920\u0947\u0917\u093E\u0928\u093E",mac:"MAC \u0920\u0947\u0917\u093E\u0928\u093E",cidrv4:"IPv4 \u0926\u093E\u092F\u0930\u093E",cidrv6:"IPv6 \u0926\u093E\u092F\u0930\u093E",base64:"base64-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",base64url:"base64url-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",e164:"E.164 \u0928\u092E\u094D\u092C\u0930",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return n.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${x(n.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u0939\u0930\u0942 \u092E\u0927\u094D\u092F\u0947 \u090F\u0915 ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${n.origin??"\u092E\u093E\u0928"} \u092E\u093E ${o}${n.maximum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${n.origin??"\u092E\u093E\u0928"} ${o}${n.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${n.origin} \u092E\u093E ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${n.origin} ${o}${n.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${o.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: ${n.divisor} \u0915\u094B \u0917\u0941\u0923\u091C \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u091E\u094D\u091C\u0940${n.keys.length>1?"\u0939\u0930\u0942":""}: ${y(n.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u091E\u094D\u091C\u0940: ${n.origin} \u092E\u093E`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${n.origin} \u092E\u093E`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function Ay(){return{localeError:dC()}}var pC=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{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",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",currency_code:"valutacode",iban:"IBAN",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${o}, ontving ${s}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${x(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${y(n.values,"|")}`;case"too_big":{let o=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"} ${o}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin),s=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${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 Dy(){return{localeError:pC()}}var mC=()=>{let e={string:{unit:"teikn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"element",verb:"\xE5 innehalde"},set:{unit:"element",verb:"\xE5 innehalde"},map:{unit:"element",verb:"\xE5 innehalde"}};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-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tal",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventa instanceof ${n.expected}, fekk ${s}`:`Ugyldig input: forventa ${o}, fekk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventa ${x(n.values[0])}`:`Ugyldig val: forventa eitt av ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventa ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`For stor(t): forventa ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventa ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventa ${n.origin} til \xE5 ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 slutte med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tal: m\xE5 vere eit multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjende n\xF8klar":"Ukjend 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 Ry(){return{localeError:mC()}}var fC=()=>{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"},map:{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-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${s}`:`Ugyldig input: forventet ${o}, fikk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${x(n.values[0])}`:`Ugyldig valg: forventet en av ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${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 Ty(){return{localeError:fC()}}var hC=()=>{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"},map:{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",mac:"MAC 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",credit_card:"i'tib\xE2r kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${x(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=n;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[o.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${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 Ey(){return{localeError:hC()}}var gC=()=>{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"},map:{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",mac:"\u062F MAC \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",credit_card:"\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",currency_code:"\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o} \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 ${x(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 o=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 ${o}${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 ${o}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[o.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${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 Oy(){return{localeError:gC()}}var yC=()=>{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"},map:{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",mac:"adres MAC",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",credit_card:"numer karty kredytowej",currency_code:"kod waluty",iban:"IBAN",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, otrzymano ${s}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${x(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${y(n.values,"|")}`;case"too_big":{let o=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 ${o}${n.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[o.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${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 Py(){return{localeError:yC()}}var vC=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"o intervalo de endere\xE7os IPv4",cidrv6:"o intervalo de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},n={string:{name:"texto",articles:i.masculine},number:{name:"n\xFAmero",articles:i.masculine},int:{name:"n\xFAmero inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"n\xFAmero bigint",articles:i.masculine},symbol:{name:"s\xEDmbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tuplo",articles:i.masculine},record:{name:"registo",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"ficheiro",articles:i.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"fun\xE7\xE3o",articles:i.feminine}};function o(a,s){let c=n[a]??{name:`valor "${a}"`,articles:i.masculine};return`${c.articles[s]} ${c.name}`}return a=>{switch(a.code){case"invalid_type":{let s=o(a.expected,"indefinite"),c=S(a.input),l=o(c,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${l}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${x(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${y(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",c=t(a.origin);return c?`Demasiado grande: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",c=t(a.origin);return c?`Demasiado pequeno: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${c.unit??"elementos"}`:`Demasiado pequeno: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${y(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(c=>`'${c}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function jy(){return{localeError:vC()}}var bC=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"a faixa de endere\xE7os IPv4",cidrv6:"a faixa de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},n={string:{name:"texto",articles:i.masculine},number:{name:"n\xFAmero",articles:i.masculine},int:{name:"n\xFAmero inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"n\xFAmero bigint",articles:i.masculine},symbol:{name:"s\xEDmbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tupla",articles:i.feminine},record:{name:"registro",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"arquivo",articles:i.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"fun\xE7\xE3o",articles:i.feminine}};function o(a,s){let c=n[a]??{name:`valor "${a}"`,articles:i.masculine};return`${c.articles[s]} ${c.name}`}return a=>{switch(a.code){case"invalid_type":{let s=o(a.expected,"indefinite"),c=S(a.input),l=o(c,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${l}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${x(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${y(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",c=t(a.origin);return c?`Grande demais: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${c.unit??"elementos"}`:`Grande demais: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",c=t(a.origin);return c?`Pequeno demais: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${c.unit??"elementos"}`:`Pequeno demais: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${y(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(c=>`'${c}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function Ny(){return{localeError:bC()}}var wC=()=>{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",credit_card:"num\u0103r de card de credit",currency_code:"cod valutar",iban:"IBAN",jwt:"JWT",template_literal:"intrare"},i={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 o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${s}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${x(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Prea mic: a\u0219teptat ca ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${n.origin} s\u0103 fie ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${r[o.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 Ly(){return{localeError:wC()}}function Uy(e,t,r,i){let n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}var kC=()=>{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"},map:{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",mac:"MAC \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",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, \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 ${x(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 o=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=Uy(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 ${o}${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 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=Uy(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 ${o}${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 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${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 zy(){return{localeError:kC()}}var _C=()=>{let e={string:{unit:"znakov",verb:"ma\u0165"},file:{unit:"bajtov",verb:"ma\u0165"},array:{unit:"prvkov",verb:"ma\u0165"},set:{unit:"prvkov",verb:"ma\u0165"},map:{unit:"polo\u017Eiek",verb:"ma\u0165"}};function t(n){return e[n]??null}let r={regex:"regul\xE1rny 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:"d\xE1tum a \u010Das vo form\xE1te ISO",date:"d\xE1tum vo form\xE1te ISO",time:"\u010Das vo form\xE1te ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64",base64url:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64url",json_string:"re\u0165azec vo form\xE1te JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditnej karty",currency_code:"k\xF3d meny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${n.expected}, obdr\u017Ean\xE9 ${s}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${o}, obdr\u017Ean\xE9 ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${x(n.values[0])}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE1 jedna z hodn\xF4t ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${n.origin??"hodnota"} mus\xED ma\u0165 ${o}${n.maximum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${n.origin??"hodnota"} mus\xED by\u0165 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je pr\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED ma\u0165 ${o}${n.minimum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED by\u0165 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${o.includes}"`:o.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED by\u0165 n\xE1sobkom ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1me kl\xFA\u010De: ${y(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xFA\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 My(){return{localeError:_C()}}var xC=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{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",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",credit_card:"\u0161tevilka kreditne kartice",currency_code:"koda valute",iban:"IBAN",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${s}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${x(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${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 Vy(){return{localeError:xC()}}var SC=()=>{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"},map:{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-adress",ipv6:"IPv6-adress",mac:"MAC-adress",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",credit_card:"kreditkortsnummer",currency_code:"valutakod",iban:"IBAN",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${s}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${x(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${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 By(){return{localeError:SC()}}var $C=()=>{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"},map:{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",mac:"MAC \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",credit_card:"\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",currency_code:"\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, \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 ${x(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 o=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"} ${o}${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"} ${o}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=n.inclusive?">=":">",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} ${o}${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} ${o}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${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 Fy(){return{localeError:$C()}}var IC=()=>{let e={string:{unit:"\u0430\u043B\u043E\u043C\u0430\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},file:{unit:"\u0431\u0430\u0439\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},array:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},set:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},map:{unit:"\u0441\u0430\u0431\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0443\u0440\u0443\u0434",email:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 email",url:"URL",emoji:"\u044D\u043C\u043E\u04B7\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0441\u0430\u043D\u0430\u0432\u0443 \u0432\u0430\u049B\u0442\u0438 ISO",date:"\u0441\u0430\u043D\u0430\u0438 ISO",time:"\u0432\u0430\u049B\u0442\u0438 ISO",duration:"\u0434\u0430\u0432\u043E\u043C\u043D\u043E\u043A\u0438\u0438 ISO",ipv4:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv4",ipv6:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv6",mac:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 MAC",cidrv4:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv4",cidrv6:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv6",base64:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64",base64url:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64url",json_string:"\u0441\u0430\u0442\u0440\u0438 JSON",e164:"\u0440\u0430\u049B\u0430\u043C\u0438 E.164",credit_card:"\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",currency_code:"\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0443\u0440\u0443\u0434"},i={nan:"NaN",number:"\u0440\u0430\u049B\u0430\u043C",string:"\u0441\u0430\u0442\u0440",array:"\u043C\u0430\u0441\u0441\u0438\u0432",object:"\u043E\u0431\u044A\u0435\u043A\u0442",date:"\u0441\u0430\u043D\u0430"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${o} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442, ${s} \u0433\u0438\u0440\u0438\u0444\u0442\u0430 \u0448\u0443\u0434`}case"invalid_value":return n.values.length===1?`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${x(n.values[0])} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:`\u0418\u043D\u0442\u0438\u0445\u043E\u0431\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u044F\u043A\u0435 \u0430\u0437 ${y(n.values,"|")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${n.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${o}${n.maximum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${n.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${o}${n.maximum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${n.origin} \u0431\u043E\u044F\u0434 ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${n.origin} \u0431\u043E\u044F\u0434 ${o}${n.minimum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${o.prefix}" \u043E\u0493\u043E\u0437 \u0448\u0430\u0432\u0430\u0434`:o.format==="ends_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${o.suffix}" \u0430\u043D\u04B7\u043E\u043C \u0451\u0431\u0430\u0434`:o.format==="includes"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 "${o.includes}"-\u0440\u043E \u0434\u0430\u0440 \u0431\u0430\u0440 \u0433\u0438\u0440\u0430\u0434`:o.format==="regex"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 \u043D\u0430\u043C\u0443\u043D\u0430\u0438 ${o.pattern} \u043C\u0443\u0432\u043E\u0444\u0438\u049B\u0430\u0442 \u043A\u0443\u043D\u0430\u0434`:`${r[o.format]??n.format}-\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`}case"not_multiple_of":return`\u0420\u0430\u049B\u0430\u043C\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 ${n.divisor} \u0431\u0435 \u0431\u0430\u049B\u0438\u044F \u0442\u0430\u049B\u0441\u0438\u043C \u0448\u0430\u0432\u0430\u0434`;case"unrecognized_keys":return`\u041A\u0430\u043B\u0438\u0434${n.keys.length>1?"\u04B3\u043E\u0438":"\u0438"} \u043D\u043E\u043C\u0430\u044A\u043B\u0443\u043C: ${y(n.keys,", ")}`;case"invalid_key":return`\u041A\u0430\u043B\u0438\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442\u0438 \u0434\u0438\u0441\u043A\u0440\u0438\u043C\u0438\u043D\u0430\u0442\u043E\u0440: ${n.options.map(a=>`'${a}'`).join(" | ")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442";case"invalid_element":return`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${n.origin}`;default:return"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442"}}};function Jy(){return{localeError:IC()}}var CC=()=>{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"},map:{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",mac:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",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)",credit_card:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",currency_code:"\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",iban:"IBAN",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o} \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 ${x(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 o=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${o} ${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${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",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${o} ${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${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${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 Zy(){return{localeError:CC()}}var AC=()=>{let e={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"ba\xFDt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function t(n){return e[n]??null}let r={regex:"giri\u015F",email:"e-po\xE7ta salgysy",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 sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen \u015Fifrlenen setir",base64url:"base64url bilen \u015Fifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartyny\u0148 nomeri",currency_code:"wal\xFDuta kody",iban:"IBAN",jwt:"JWT",template_literal:"\u015Fablon"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return`N\xE4dogry baha: gara\u015Fylan ${o} \xFDerine ${s} alyndy`}case"invalid_value":return n.values.length===1?`N\xE4dogry baha: ${x(n.values[0])} bolmaly`:`N\xE4dogry sa\xFDlaw: a\u015Fakdakylardan biri bolmaly: ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Has uly: gara\u015Fyl\xFDan ${n.origin??"baha"} ${o} ${n.maximum.toString()} ${a.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${n.origin??"baha"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Has ki\xE7i: gara\u015Fyl\xFDan ${n.origin} ${o} ${n.minimum.toString()} ${a.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`N\xE4dogry setir: "${o.prefix}" bilen ba\u015Flamaly`:o.format==="ends_with"?`N\xE4dogry setir: "${o.suffix}" bilen gutarmaly`:o.format==="includes"?`N\xE4dogry setir: "${o.includes}" saklamaly`:o.format==="regex"?`N\xE4dogry setir: ${o.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xE4dogry san: ${n.divisor} bilen galyndysyz b\xF6l\xFCnmeli`;case"unrecognized_keys":return`Tanalma\xFDan a\xE7ar${n.keys.length>1?"lar":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde n\xE4dogry a\xE7ar`;case"invalid_union":return"N\xE4dogry baha";case"invalid_element":return`${n.origin} i\xE7inde n\xE4dogry baha`;default:return"N\xE4dogry baha"}}};function Wy(){return{localeError:AC()}}var DC=()=>{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"},map:{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",mac:"MAC 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",credit_card:"kredi kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${x(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[o.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${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 Hy(){return{localeError:DC()}}var RC=()=>{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"},map:{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",mac:"\u0430\u0434\u0440\u0435\u0441\u0430 MAC",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",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, \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 ${x(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 o=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} ${o}${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 ${o}${n.maximum.toString()}`}case"too_small":{let o=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} ${o}${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 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${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 Ra(){return{localeError:RC()}}function Ky(){return Ra()}var TC=()=>{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"},map:{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",mac:"\u0627\u06CC\u0645 \u0627\u06D2 \u0633\u06CC \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",credit_card:"\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",currency_code:"\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",iban:"IBAN",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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: ${o} \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: ${x(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 o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${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 ${o}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${o}${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 ${o}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${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 qy(){return{localeError:TC()}}var EC=()=>{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",credit_card:"kredit karta raqami",currency_code:"valyuta kodi",iban:"IBAN",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${s}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${x(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[o.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${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 Gy(){return{localeError:EC()}}var OC=()=>{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"},map:{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",mac:"\u0111\u1ECBa ch\u1EC9 MAC",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",credit_card:"s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",currency_code:"m\xE3 ti\u1EC1n t\u1EC7",iban:"IBAN",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, 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 ${x(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 o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${r[o.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${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 Xy(){return{localeError:OC()}}var PC=()=>{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"},map:{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",mac:"MAC\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",credit_card:"\u4FE1\u7528\u5361\u53F7",currency_code:"\u8D27\u5E01\u4EE3\u7801",iban:"IBAN",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${x(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${r[o.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${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 Yy(){return{localeError:PC()}}var jC=()=>{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"},map:{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",mac:"MAC \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",credit_card:"\u4FE1\u7528\u5361\u865F",currency_code:"\u8CA8\u5E63\u4EE3\u78BC",iban:"IBAN",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${x(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 o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${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 Qy(){return{localeError:jC()}}var NC=()=>{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"},map:{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",mac:"\xE0d\xEDr\u1EB9\u0301s\xEC MAC",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",credit_card:"n\u1ECDmba kaadi gbese",currency_code:"koodu ow\xF3",iban:"IBAN",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=S(n.input),s=i[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 ${o}, \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 ${x(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${y(n.values,"|")}`;case"too_big":{let o=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} ${o}${n.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.maximum}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${a.verb} ${o}${n.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.minimum}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${r[o.format]??n.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${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 ev(){return{localeError:NC()}}var tv,Nd=Symbol("ZodOutput"),Ld=Symbol("ZodInput"),Ta=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let i={...this.get(r)??{}};delete i.id;let n={...i,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Ea(){return new Ta}(tv=globalThis).__zod_globalRegistry??(tv.__zod_globalRegistry=Ea());var _e=globalThis.__zod_globalRegistry;var Pe=Symbol.for("zod.compile.invalid"),nv=Symbol.for("zod.compile.fallback"),pt=class extends Error{constructor(t="z.compile does not support async refinements, transforms, or checks"){super(t),this.name="ZodCompileAsyncError"}},q=class extends Error{constructor(t,r=!0){super(`z.compile does not support ${t}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=r}};function UC(e,t){try{return Pa(e,{assertOnly:!0})}catch{return t}}function Vd(e,t){try{let r=Pa(e),i=Oa(e,r);return i._zod.bag.validator=UC(e,r),i}catch(r){if(t?.strict)throw r;return e}}function Oa(e,t){if(Ia(e))throw new q("a schema whose subtree contains a reference cycle");let r=te(e),i=e._zod.run,n=i.__originalRun??i,o=(a,s)=>{if(s?.async||s?.direction==="backward"||s?.skipChecks||s?.[nv]||s&&Ca(s,a.value))return n(a,s);let c=t(a.value);return c!==Pe?(a.value=c,a):(s&&(s[nv]=!0),n(a,s))};return o.__originalRun=n,r._zod.bag.fallbackRun=n,r._zod.bag.validator=t,r._zod.run=o,i.__originalRun||zC(r,e,t),r}function zC(e,t,r){let i=e,n=t;if(typeof n.safeParse=="function"){let o=n.safeParse;i.safeParse=(a,s)=>{let c=r(a);return c!==Pe?{success:!0,data:c}:o(a,s)}}if(typeof n.parse=="function"){let o=n.parse;i.parse=(a,s)=>{let c=r(a);return c!==Pe?c:o(a,s)}}}function Pa(e,t){let r=!0;try{r=Ia(e)}catch{}if(r)throw new q("a schema whose subtree contains a reference cycle");let i={constants:new Map,constantCounter:0,varCounter:0,definite:!0},n=new Rn(["input"]),o=ce(n,i,e,"input",!t?.assertOnly);n.write(o===null?"return true;":`return ${o};`);let a=["INVALID",...i.constants.keys()],s=[Pe,...i.constants.values()],c=n.content.join(`
|
|
83
|
+
`),l=t?.debug?a.length>0?`// Constants: ${a.join(", ")}
|
|
84
|
+
${c}`:c:"",u=Function,d=`return (input) => {
|
|
85
|
+
${c}
|
|
86
|
+
}`,m;try{m=new u(...a,d)(...s)}catch(f){throw new q(`this schema (generated code failed to evaluate: ${f.message})`)}return t?.debug&&(m.code=l),m.definite=i.definite,m}function V(e,t){for(let[i,n]of e.constants)if(n===t)return i;let r=`c${e.constantCounter++}`;return e.constants.set(r,t),r}function Pn(e,t){return e.definite=!1,V(e,t)}function U(e){return`v${e.varCounter++}`}function MC(e,t){let r=e._zod.run({value:t,issues:[]},{});if(r&&typeof r.then=="function")return Pe;let i=r;return i.issues.length===0?i.value:Pe}function Ie(e,t,r,i,n=!0){let o=e.content.length,a=t.constants.size,s=t.constantCounter,c=t.varCounter;try{return ce(e,t,r,i,n)}catch(l){if(!(l instanceof q)||!l.islandable)throw l;if(e.content.length=o,t.constants.size>a){let u=Array.from(t.constants.keys()).slice(a);for(let d of u)t.constants.delete(d)}return t.constantCounter=s,t.varCounter=c,VC(e,t,r,i)}}function VC(e,t,r,i){t.definite=!1;let n=V(t,r),o=V(t,MC),a=U(t);return e.write(`const ${a} = ${o}(${n}, ${i});`),e.write(`if (${a} === INVALID) return INVALID;`),a}var BC=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function FC(e,t,r,i){let n=r._zod.def.checks;if(!n||n.length===0)return i;let o=i;for(let a of n){let s=a._zod.def;if(s.when&&!BC.has(s.check))throw new q('check with a custom "when" condition');switch(s.check){case"greater_than":JC(e,t,s,o);break;case"less_than":ZC(e,t,s,o);break;case"multiple_of":WC(e,t,s,o);break;case"number_format":cv(e,s,o);break;case"min_length":{let c=En(s.minimum,"min_length"),l=Ud(e,t,o,`${o}.length >= ${c} && ${o}.length < ${s.minimum*2}`);e.write(`if (${l} < ${c}) return INVALID;`);break}case"max_length":{let c=En(s.maximum,"max_length"),l=Ud(e,t,o,`${o}.length > ${c}`);e.write(`if (${l} > ${c}) return INVALID;`);break}case"length_equals":{let c=En(s.length,"length_equals"),l=Ud(e,t,o,`${o}.length >= ${c} && ${o}.length <= ${s.length*2}`);e.write(`if (${l} !== ${c}) return INVALID;`);break}case"min_size":e.write(`if (${o}.size < ${En(s.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${o}.size > ${En(s.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${o}.size !== ${En(s.size,"size_equals")}) return INVALID;`);break;case"string_format":o=lv(e,t,s,o);break;case"custom":o=YC(e,t,a,o);break;case"bigint_format":HC(e,s,o);break;case"mime_type":KC(e,t,s,o);break;case"property":GC(e,t,s,o);break;case"properties":qC(e,t,s,o);break;case"overwrite":{let c=U(t);XC(e,t,a,o,c),o=c;break}default:throw new q(`check type ${s.check}`)}}return o}function Ud(e,t,r,i){let n=V(t,An),o=U(t);return e.write(`const ${o} = typeof ${r} === "string" && ${i} ? ${n}(${r}) : ${r}.length;`),o}function En(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new q(`${t} bound of type ${typeof e}`);return`${e}`}function sv(e,t){if(typeof t=="bigint")return`${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new q("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new q("comparison check with Invalid Date bound");return V(e,t)}throw new q(`comparison check bound of type ${typeof t}`)}function JC(e,t,r,i){let n=r.inclusive?"<":"<=";e.write(`if (${i} ${n} ${sv(t,r.value)}) return INVALID;`)}function ZC(e,t,r,i){let n=r.inclusive?">":">=";e.write(`if (${i} ${n} ${sv(t,r.value)}) return INVALID;`)}function WC(e,t,r,i){if(typeof r.value=="bigint"){if(r.value===BigInt(0))throw new q("multiple_of check with a zero divisor");e.write(`if (${i} % ${r.value}n !== 0n) return INVALID;`)}else{let n=V(t,hi);e.write(`if (${n}(${i}, ${En(r.value,"multiple_of")}) !== 0) return INVALID;`)}}function cv(e,t,r){let i=t.format;switch(i){case"safeint":e.write(`if (!Number.isSafeInteger(${r})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${r}) || ${r} < -2147483648 || ${r} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${r}) || ${r} < 0 || ${r} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${r}) || ${r} < -3.4028234663852886e38 || ${r} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${r})) return INVALID;`);break;default:throw new q(`number format ${i}`)}}function HC(e,t,r){let i=t.format;if(i)switch(i){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break;default:throw new q(`bigint format ${i}`)}}function KC(e,t,r,i){let n=r.mime;if(n&&n.length>0){let o=V(t,new Set(n));e.write(`if (!${o}.has(${i}.type)) return INVALID;`)}}function qC(e,t,r,i){if(r.when)throw new q('check with a custom "when" condition');e.write(`if (${i} == null) return INVALID;`);let n=r.shape;for(let o of Reflect.ownKeys(n)){let a=typeof o=="symbol"?V(t,o):Ee(o),s=U(t);e.write(`const ${s} = ${i}[${a}];`),Ie(e,t,n[o],s,!1)}}function GC(e,t,r,i){let n=`${i}[${JSON.stringify(r.property)}]`;ce(e,t,r.schema,n)}function XC(e,t,r,i,n){let o=r._zod.def.tx;if(!o)throw new q("overwrite check without a transform function");if(jn(o))throw new pt("z.compile: async overwrite transforms are not supported");let a=V(t,o);e.write(`const ${n} = ${a}(${i});`)}function zd(){throw new Fe}function Bd(e){this.issues.push(e)}function YC(e,t,r,i){let n=r._zod.def;if(n.fn){if(jn(n.fn))throw new pt("z.compile: async .refine() predicates are not supported");let o=Pn(t,n.fn),a=V(t,zd),s=U(t);return e.write(`const ${s} = ${o}(${i});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`),i}if(r._zod.check){if(jn(r._zod.check))throw new pt("z.compile: async .superRefine() / check functions are not supported");let o=r._zod.check,s=Pn(t,l=>{let u={value:l,issues:[],addIssue:Bd};return o(u)instanceof Promise&&zd(),u.issues.length===0?u.value:Pe}),c=U(t);return e.write(`const ${c} = ${s}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),c}throw new q("custom check without a predicate or check function")}var QC=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function lv(e,t,r,i,n=!0){let o=r.format;if(o==="base64"){let l=V(t,Pi);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(o==="base64url"){let l=V(t,ma);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(o==="jwt"){let l=V(t,ga),u=V(t,r.alg??null);return e.write(`if (!${l}(${i}, ${u})) return INVALID;`),i}if(o==="ipv6"){let l=V(t,Oi);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(o==="cidrv6"){let l=V(t,da);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(o==="credit_card"){let l=V(t,fa);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(o==="iban"){let l=V(t,ha);return e.write(`if (!${l}(${i})) return INVALID;`),i}let a=r;if(o==="url"||o==="httpurl"||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let l=V(t,ca),u=V(t,r),d=U(t),m=U(t);if(e.write(`const ${d} = ${i}.trim();`),e.write(`const ${m} = ${l}(${d}, ${u});`),e.write(`if (typeof ${m} === "number") return INVALID;`),a.hostname!==void 0){let w=V(t,la);e.write(`if (!${w}(${m}, ${u}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let w=V(t,ua);e.write(`if (!${w}(${m}, ${u}.protocol)) return INVALID;`)}if(!n)return null;let f=U(t),h=a.normalize?`${m}.href`:`${V(t,Ei)}(${d})`;return e.write(`const ${f} = ${h};`),f}let s=r.fn;if(s){if(jn(s))throw new q(`async string format ${o}`);let l=V(t,s);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(QC.has(o)&&r.pattern){let l=V(t,r.pattern);return e.write(`${l}.lastIndex = 0;`),e.write(`if (!${l}.test(${i})) return INVALID;`),i}let c=r.format;switch(c){case"regex":throw new q("regex format without a pattern");case"lowercase":e.write(`if (${i} !== ${i}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${i} !== ${i}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${i}.includes(${Ee(r.includes)})) return INVALID;`);break;case"starts_with":{let l=r.prefix;e.write(`if (${i}.slice(0, ${l.length}) !== ${Ee(l)}) return INVALID;`);break}case"ends_with":{let l=r.suffix;e.write(`if (${i}.slice(-${l.length}) !== ${Ee(l)}) return INVALID;`);break}default:throw new q(`string format ${c}`)}return i}function ce(e,t,r,i,n=!0){let o=r._zod.def,a=o.type;if(o.coerce)throw new q(`coercion (z.coerce.${a}())`);let s=n||!!o.checks?.length,c;switch(a){case"string":c=eA(e,t,r,i,s);break;case"number":c=tA(e,r,i);break;case"boolean":c=nA(e,i);break;case"bigint":c=rA(e,r,i);break;case"symbol":c=iA(e,i);break;case"undefined":c=oA(e,i);break;case"null":c=aA(e,i);break;case"any":case"unknown":c=i;break;case"never":e.write("return INVALID;"),c=i;break;case"void":c=sA(e,i);break;case"nan":c=cA(e,i);break;case"date":c=lA(e,i);break;case"object":c=uA(e,t,r,i,s);break;case"optional":c=dA(e,t,r,i,s);break;case"nullable":c=fA(e,t,r,i,s);break;case"array":c=hA(e,t,r,i,s);break;case"literal":c=gA(e,t,r,i);break;case"enum":c=yA(e,t,r,i);break;case"readonly":{let l=iv(e,t,r,i),u=U(t);e.write(`const ${u} = Object.freeze(${l});`),c=u;break}case"success":iv(e,t,r,i),c="true";break;case"default":case"prefault":c=vA(e,t,r,i);break;case"nonoptional":c=bA(e,t,r,i);break;case"tuple":c=wA(e,t,r,i);break;case"union":c=kA(e,t,r,i);break;case"intersection":c=SA(e,t,r,i);break;case"record":c=$A(e,t,r,i);break;case"map":c=CA(e,t,r,i);break;case"set":c=AA(e,t,r,i);break;case"file":c=DA(e,i);break;case"template_literal":c=RA(e,t,r,i);break;case"lazy":c=TA(e,t,r,i);break;case"pipe":c=EA(e,t,r,i);break;case"custom":c=OA(e,t,r,i);break;case"transform":c=NA(e,t,r,i);break;case"catch":c=jA(e,t,r,i);break;default:throw new q(`schema type ${a}`)}return c===null?null:FC(e,t,r,c)}function eA(e,t,r,i,n=!0){e.write(`if (typeof ${i} !== "string") return INVALID;`);let o=r._zod.def;return o.format===void 0?i:lv(e,t,o,i,n)}function tA(e,t,r){e.write(`if (typeof ${r} !== "number" || !Number.isFinite(${r})) return INVALID;`);let i=t._zod.def;return i.check==="number_format"&&i.format&&cv(e,{format:i.format},r),r}function nA(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function rA(e,t,r){e.write(`if (typeof ${r} !== "bigint") return INVALID;`);let i=t._zod.def;if(i.format)switch(i.format){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break}return r}function iA(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function oA(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function aA(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function sA(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function cA(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function lA(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function uA(e,t,r,i,n=!0){let o=r._zod.def;e.write(`if (typeof ${i} !== "object" || ${i} === null || Array.isArray(${i})) return INVALID;`);let a=o.shape,s=Object.keys(a),c=Object.getOwnPropertySymbols(a),l=c.length?[...s,...c]:s,u=C=>typeof C=="symbol"?V(t,C):Ee(C),d=C=>typeof C=="symbol"?`[${u(C)}]`:Ee(C),m=a;if(s.includes("__proto__"))throw new q('object shape key "__proto__"');let f=new Map;for(let C of l){let j=m[C],W=u(C),K=U(t);if(e.write(`const ${K} = ${i}[${W}];`),j._zod.optin!==void 0){let G=U(t);e.write(`let ${G} = (() => {`),e.indented(fe=>{let Kt=Ie(fe,t,j,K);fe.write(`return ${Kt};`)}),e.write("})();"),j._zod.optout==="optional"?(e.write(`if (${G} === INVALID) {`),e.indented(fe=>{fe.write(`if (${W} in ${i}) return INVALID;`),fe.write(`${G} = undefined;`)}),e.write("}")):e.write(`if (${G} === INVALID) return INVALID;`),f.set(C,G)}else{mA(j)&&e.write(`if (!(${W} in ${i})) return INVALID;`);let G=Ie(e,t,j,K,n);G!==null&&f.set(C,G)}}let h=o.catchall,w="none";if(h){let C=h._zod.def.type;if(C==="never"){let j=s.map(W=>`k !== ${Ee(W)}`).join(" && ")||"true";e.write(`for (const k in ${i}) {`),e.indented(W=>{W.write(`if (${j}) return INVALID;`)}),e.write("}")}else(C==="unknown"||C==="any")&&!h._zod.def.checks?.length?w="passthrough":w="schema"}let D=U(t),A=l.some(C=>rv(m[C])||Md(m[C]));if(!n){if(w==="schema"){let C=s.length>0?V(t,new Set(s)):null;e.write(`for (const k in ${i}) {`),e.indented(j=>{j.write('if (k === "__proto__") continue;'),C&&j.write(`if (${C}.has(k)) continue;`);let W=U(t);j.write(`const ${W} = ${i}[k];`),Ie(j,t,h,W,!1)}),e.write("}")}return null}if(A){e.write(`const ${D} = {};`);for(let C of l){let j=u(C),W=f.get(C);Md(m[C])?e.write(`if (${j} in ${i}) ${D}[${j}] = ${W};`):rv(m[C])?e.write(`if (${W} !== undefined || ${j} in ${i}) ${D}[${j}] = ${W};`):e.write(`${D}[${j}] = ${W};`)}}else{let C=l.map(j=>`${d(j)}: ${f.get(j)}`).join(", ");e.write(`const ${D} = { ${C} };`)}if(w!=="none"){let C=s.length>0?V(t,new Set(s)):null;e.write(`for (const k in ${i}) {`),e.indented(j=>{if(j.write('if (k === "__proto__") continue;'),C&&j.write(`if (${C}.has(k)) continue;`),w==="passthrough")j.write(`${D}[k] = ${i}[k];`);else{let W=U(t);j.write(`const ${W} = ${i}[k];`);let K=Ie(j,t,h,W);j.write(`${D}[k] = ${K};`)}}),e.write("}")}return D}function dA(e,t,r,i,n=!0){let o=r._zod.def;if(pA(r))return ce(e,t,o.innerType,i,n);if(o.innerType._zod.optin==="defaulted"){let s=U(t),c=U(t);return e.write(`let ${s};`),e.write(`if (${i} === undefined) {`),e.indented(l=>{l.write(`const ${c} = (() => {`),l.indented(u=>{let d=ce(u,t,o.innerType,i);u.write(`return ${d};`)}),l.write("})();"),l.write(`if (${c} !== INVALID) ${s} = ${c};`)}),e.write("} else {"),e.indented(l=>{let u=ce(l,t,o.innerType,i);l.write(`${s} = ${u};`)}),e.write("}"),s}let a=n?U(t):null;return a&&e.write(`let ${a};`),e.write(`if (${i} !== undefined) {`),e.indented(s=>{let c=ce(s,t,o.innerType,i,n);a&&c!==null&&s.write(`${a} = ${c};`)}),e.write("}"),a}function pA(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function mA(e){return e._zod.optin===void 0&&On(e)}function On(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?On(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?On(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(On):!0;case"intersection":return!t.left||!t.right?!0:On(t.left)&&On(t.right);case"pipe":return t.in?On(t.in):!0;default:return!0}}function Md(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function rv(e){return(e._zod.optin!=="defaulted"||e._zod.optout==="optional")&&kr(e)}function kr(e){let t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?kr(t.innerType):!0;case"union":return t.options?t.options.some(kr):!0;case"intersection":return!t.left||!t.right||kr(t.left)||kr(t.right);case"pipe":return t.out?kr(t.out):!0;default:return!0}}function fA(e,t,r,i,n=!0){let o=r._zod.def,a=n?U(t):null;return a&&e.write(`let ${a} = null;`),e.write(`if (${i} !== null) {`),e.indented(s=>{let c=ce(s,t,o.innerType,i,n);a&&c!==null&&s.write(`${a} = ${c};`)}),e.write("}"),a}function hA(e,t,r,i,n=!0){let o=r._zod.def;e.write(`if (!Array.isArray(${i})) return INVALID;`);let a=n?U(t):null,s=U(t),c=U(t);return a&&e.write(`const ${a} = new Array(${i}.length);`),e.write(`for (let ${s} = 0; ${s} < ${i}.length; ${s}++) {`),e.indented(l=>{l.write(`const ${c} = ${i}[${s}];`);let u=Ie(l,t,o.element,c,n);a&&u!==null&&l.write(`${a}[${s}] = ${u};`)}),e.write("}"),a}function gA(e,t,r,i){let o=r._zod.def.values;if(o.length!==1){let s=V(t,new Set(o));return e.write(`if (!${s}.has(${i})) return INVALID;`),i}let a=o[0];if(typeof a=="number"&&Number.isNaN(a)){let s=V(t,new Set(o));return e.write(`if (!${s}.has(${i})) return INVALID;`),i}if(typeof a=="string")e.write(`if (${i} !== ${Ee(a)}) return INVALID;`);else if(typeof a=="number"||typeof a=="boolean")e.write(`if (${i} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${i} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${i} !== undefined) return INVALID;`);else if(typeof a=="bigint")e.write(`if (${i} !== ${a}n) return INVALID;`);else throw new q(`literal type ${typeof a}`);return i}function yA(e,t,r,i){let n=r._zod.values;if(!n)throw new q("enum schema without enumerated values");let o=V(t,n);return e.write(`if (!${o}.has(${i})) return INVALID;`),i}function iv(e,t,r,i){let n=r._zod.def;return ce(e,t,n.innerType,i)}function vA(e,t,r,i){let n=r._zod.def,a=Object.getOwnPropertyDescriptor(r._zod.def,"defaultValue")?()=>r._zod.def.defaultValue:void 0;if(r._zod.def.type==="prefault"){if(!a)return ce(e,t,n.innerType,i);let c=V(t,a),l=U(t);return e.write(`let ${l} = ${i};`),e.write(`if (${i} === undefined) ${l} = ${c}();`),ce(e,t,n.innerType,l)}let s=U(t);if(a){let c=V(t,a),l=V(t,gi);e.write(`let ${s};`),e.write(`if (${i} === undefined) {`),e.indented(u=>{u.write(`${s} = ${l}(${c}());`)}),e.write("} else {"),e.indented(u=>{let d=ce(u,t,n.innerType,i);u.write(`${s} = ${d} === undefined ? ${l}(${c}()) : ${d};`)}),e.write("}")}else e.write(`let ${s};`),e.write(`if (${i} !== undefined) {`),e.indented(c=>{let l=ce(c,t,n.innerType,i);c.write(`${s} = ${l};`)}),e.write("}");return s}function bA(e,t,r,i){let n=r._zod.def,o=ce(e,t,n.innerType,i),a=U(t);return e.write(`const ${a} = ${o};`),e.write(`if (${a} === undefined) return INVALID;`),a}function wA(e,t,r,i){let n=r._zod.def,o=n.items,a=n.rest;e.write(`if (!Array.isArray(${i})) return INVALID;`);let s=ov(o,"optin"),c=ov(o,"optout");a?e.write(`if (${i}.length < ${s}) return INVALID;`):e.write(`if (${i}.length < ${s} || ${i}.length > ${o.length}) return INVALID;`);let l=U(t);e.write(`const ${l} = [];`);for(let u=0;u<o.length;u++){let d=o[u];if(u>=c)e.write(`if (${l}.length === ${u}) {`),e.indented(m=>{m.write(`if (${u} < ${i}.length) {`),m.indented(f=>{let h=U(t);f.write(`const ${h} = ${i}[${u}];`);let w=Ie(f,t,d,h);f.write(`${l}[${u}] = ${w};`)}),m.write("} else {"),m.indented(f=>{if(Md(d)){f.write(`${l}.length = ${u};`);return}let h=U(t),w=U(t);f.write(`const ${h} = undefined;`),f.write(`const ${w} = (() => {`),f.indented(D=>{let A=Ie(D,t,d,h);D.write(`return ${A};`)}),f.write("})();"),f.write(`if (${w} === INVALID || ${w} === undefined) ${l}.length = ${u};`),f.write(`else ${l}[${u}] = ${w};`)}),m.write("}")}),e.write("}");else{let m=U(t);e.write(`const ${m} = ${i}[${u}];`);let f=Ie(e,t,d,m);e.write(`${l}[${u}] = ${f};`)}}if(a){let u=U(t),d=U(t);e.write(`for (let ${u} = ${o.length}; ${u} < ${i}.length; ${u}++) {`),e.indented(m=>{m.write(`const ${d} = ${i}[${u}];`);let f=Ie(m,t,a,d);m.write(`${l}[${u}] = ${f};`)}),e.write("}")}return l}function ov(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function kA(e,t,r,i){let n=r._zod.def,o=n.options;if(n.discriminator)return _A(e,t,n,i);if(n.inclusive===!1)throw new q("exclusive unions (z.xor)");if(o.length===0)return e.write("return INVALID;"),i;if(o.length===1)return ce(e,t,o[0],i);if(o.every(c=>c._zod.def.type==="literal"&&!c._zod.def.checks?.length)){let c=new Set(o.flatMap(u=>u._zod.def.values)),l=V(t,c);return e.write(`if (!${l}.has(${i})) return INVALID;`),i}let s=U(t);e.write(`let ${s};`);for(let c=0;c<o.length;c++){let l=o[c];c===0?e.write(`${s} = (() => {`):e.write(`if (${s} === INVALID) ${s} = (() => {`),e.indented(u=>{let d=ce(u,t,l,i);u.write(`return ${d};`)}),e.write("})();")}return e.write(`if (${s} === INVALID) return INVALID;`),s}function _A(e,t,r,i){if(r.unionFallback)throw new q("discriminated union with unionFallback");if(r.options.length===0)return e.write("return INVALID;"),i;let n=U(t),o=U(t);e.write(`const ${n} = ${i}?.[${Ee(r.discriminator)}];`),e.write(`let ${o};`);let a=!0,s=new Set;for(let c of r.options){let l=c._zod.propValues?.[r.discriminator];if(!l||l.size===0)throw new q("discriminated union option without static discriminator values");for(let m of l){if(s.has(m))throw new q(`duplicate discriminator value ${String(m)}`);s.add(m)}let u=Array.from(l,m=>xA(t,n,m)),d=a?"if":"else if";e.write(`${d} (${u.join(" || ")}) {`),e.indented(m=>{let f=ce(m,t,c,i);m.write(`${o} = ${f};`)}),e.write("}"),a=!1}return e.write("else { return INVALID; }"),o}function xA(e,t,r){if(typeof r=="string")return`${t} === ${Ee(r)}`;if(typeof r=="number")return Number.isNaN(r)?`Number.isNaN(${t})`:`${t} === ${r}`;if(typeof r=="boolean")return`${t} === ${r}`;if(r===null)return`${t} === null`;if(r===void 0)return`${t} === undefined`;if(typeof r=="bigint")return`${t} === ${r}n`;if(typeof r=="symbol"){let i=V(e,r);return`${t} === ${i}`}throw new q(`literal discriminator value ${String(r)}`)}function SA(e,t,r,i){let n=r._zod.def;t.definite=!1;let o=Ie(e,t,n.left,i),a=Ie(e,t,n.right,i),s=V(t,vr),c=U(t);return e.write(`const ${c} = ${s}(${o}, ${a});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function $A(e,t,r,i){let n=r._zod.def,o=V(t,Qe);e.write(`if (!${o}(${i})) return INVALID;`);let a=U(t),s=U(t),c=U(t);e.write(`const ${a} = {};`);let l=n,u=l.partial?void 0:n.keyType._zod.values;if(u){let f=[];for(let w of u){if(!(typeof w=="string"||typeof w=="number"||typeof w=="symbol"))throw new q(`record key value ${String(w)}`);let D=typeof w=="number"?w.toString():w;if(D==="__proto__")throw new q('record key "__proto__"');f.push(D);let A=V(t,w),C=ce(e,t,n.keyType,A),j=U(t);e.write(`const ${j} = ${i}[${IA(t,D)}];`);let W=Ie(e,t,n.valueType,j);e.write(`${a}[${C}] = ${W};`)}let h=V(t,new Set(f));return e.write(`for (const ${s} in ${i}) {`),e.indented(w=>{w.write(`if (${h}.has(${s})) continue;`),l.mode==="loose"?w.write(`if (${s} !== "__proto__") ${a}[${s}] = ${i}[${s}];`):w.write("return INVALID;")}),e.write("}"),a}let d=n.keyType._zod.def;if(!(d.type==="string"&&d.format===void 0&&!d.coerce&&(d.checks?.length??0)===0)){let f=n.mode==="loose",h=Pa(n.keyType);h.definite===!1&&(t.definite=!1);let w=V(t,h),D=V(t,Ut),A=U(t);return av(e,t,i,s,C=>{C.write(`let ${A} = ${w}(${s});`),C.write(`if (${A} === INVALID && typeof ${s} === "string" && ${D}.test(${s})) ${A} = ${w}(Number(${s}));`),f?C.write(`if (${A} === INVALID) { ${a}[${s}] = ${i}[${s}]; continue; }`):C.write(`if (${A} === INVALID) return INVALID;`),C.write(`if (${A} === "__proto__") continue;`);let j=U(t);C.write(`const ${j} = ${i}[${s}];`);let W=Ie(C,t,n.valueType,j);C.write(`${a}[${A}] = ${W};`)}),a}return av(e,t,i,s,f=>{f.write(`const ${c} = ${i}[${s}];`);let h=Ie(f,t,n.valueType,c);f.write(`${a}[${s}] = ${h};`)},"return INVALID;"),a}function av(e,t,r,i,n,o){let a=V(t,Object.prototype.propertyIsEnumerable),s=U(t),c=U(t),l=U(t);e.write(`const ${s} = Object.getOwnPropertySymbols(${r});`),e.write(`const ${c} = Object.getOwnPropertyNames(${r});`),e.write(`for (let ${l} = 0; ${l} < ${c}.length; ${l}++) {`),e.indented(u=>{u.write(`const ${i} = ${c}[${l}];`),u.write(`if (${i} === "__proto__" || !${a}.call(${r}, ${i})) continue;`),n(u)}),e.write("}"),e.write(`for (let ${l} = 0; ${l} < ${s}.length; ${l}++) {`),e.indented(u=>{u.write(`const ${i} = ${s}[${l}];`),u.write(`if (!${a}.call(${r}, ${i})) continue;`),o?u.write(o):n(u)}),e.write("}")}function IA(e,t){return typeof t=="string"?Ee(t):V(e,t)}function CA(e,t,r,i){let n=r._zod.def;e.write(`if (!(${i} instanceof Map)) return INVALID;`);let o=U(t),a=U(t),s=U(t);return e.write(`const ${o} = new Map();`),e.write(`for (const [${a}, ${s}] of ${i}) {`),e.indented(c=>{let l=ce(c,t,n.keyType,a),u=ce(c,t,n.valueType,s);c.write(`${o}.set(${l}, ${u});`)}),e.write("}"),o}function AA(e,t,r,i){let n=r._zod.def;e.write(`if (!(${i} instanceof Set)) return INVALID;`);let o=U(t),a=U(t);return e.write(`const ${o} = new Set();`),e.write(`for (const ${a} of ${i}) {`),e.indented(s=>{let c=ce(s,t,n.valueType,a);s.write(`${o}.add(${c});`)}),e.write("}"),o}function DA(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function RA(e,t,r,i){e.write(`if (typeof ${i} !== "string") return INVALID;`);let n=r._zod.pattern;if(n){let o=V(t,n);e.write(`${o}.lastIndex = 0;`),e.write(`if (!${o}.test(${i})) return INVALID;`)}return i}function TA(e,t,r,i){let n=r._zod.def,o=Pn(t,n.getter),a=V(t,{parser:null});e.write(`if (!${a}.parser) {`),e.indented(c=>{c.write(`const inner = ${o}();`),c.write(`${a}.parser = function(input) {`),c.indented(l=>{l.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),l.write("return result.issues.length === 0 ? result.value : INVALID;")}),c.write("};")}),e.write("}");let s=U(t);return e.write(`const ${s} = ${a}.parser(${i});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function EA(e,t,r,i){let n=r._zod.def,o=ce(e,t,n.in,i);if(n.transform){if(jn(n.transform))throw new pt("z.compile: async transforms in pipes are not supported");let a=n.transform,c=Pn(t,u=>{let d={value:u,issues:[],addIssue:Bd},m=a(u,d);return m instanceof Promise?Pe:d.issues.length===0?m:Pe}),l=U(t);return e.write(`const ${l} = ${c}(${o});`),e.write(`if (${l} === INVALID) return INVALID;`),ce(e,t,n.out,l)}else return ce(e,t,n.out,o)}function jn(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function OA(e,t,r,i){let n=r._zod.def;if(n.fn){if(jn(n.fn))throw new pt("z.compile: async custom predicates are not supported");let o=Pn(t,n.fn),a=V(t,zd),s=U(t);e.write(`const ${s} = ${o}(${i});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`)}else throw new q("custom schema without a predicate function");return i}function PA(e,t,r){let i=e._zod.run({value:r,issues:[]},{});if(i&&typeof i.then=="function")return Pe;let n=i;return n.issues.length===0?n.value:t()}function jA(e,t,r,i){let n=r._zod.def;if(!n.catchValue[zo])throw new q("catch with a callback (only a constant catch value compiles)",!1);let o=U(t);e.write(`let ${o} = (() => {`),e.indented(l=>{let u=Ie(l,t,n.innerType,i);l.write(`return ${u};`)}),e.write("})();");let a=V(t,n.innerType),s=Pn(t,n.catchValue),c=V(t,PA);return e.write(`if (${o} === INVALID) {`),e.indented(l=>{l.write(`${o} = ${c}(${a}, ${s}, ${i});`),l.write(`if (${o} === INVALID) return INVALID;`)}),e.write("}"),o}function NA(e,t,r,i){let n=r._zod.def;if(n.transform){if(jn(n.transform))throw new pt("z.compile: async transforms are not supported");let o=n.transform,s=Pn(t,l=>{let u={value:l,issues:[],addIssue:Bd},d=o(l,u);return d instanceof Promise?Pe:u.issues.length===0?d:Pe}),c=U(t);return e.write(`const ${c} = ${s}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),c}return i}function ja(e){return e.checks&&(e.checks=[...e.checks]),e}function Fd(e,t){return new e(ja({type:"string",...T(t)}))}function Jd(e,t){return new e(ja({type:"string",coerce:!0,...T(t)}))}function Na(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...T(t)})}function La(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...T(t)})}function Ua(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...T(t)})}function za(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...T(t)})}function Ma(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...T(t)})}function Va(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...T(t)})}function Zi(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...T(t)})}function Ba(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...T(t)})}function Fa(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...T(t)})}function Ja(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...T(t)})}function Za(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...T(t)})}function Wa(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...T(t)})}function Ha(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...T(t)})}function Ka(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...T(t)})}function qa(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...T(t)})}function Ga(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...T(t)})}function Zd(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...T(t)})}function Xa(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...T(t)})}function Ya(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...T(t)})}function Qa(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...T(t)})}function es(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...T(t)})}function ts(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...T(t)})}function Wd(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,...T(t)})}function Hd(e,t){return new e({type:"string",format:"iban",check:"string_format",abort:!1,...T(t)})}function ns(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...T(t)})}var Kd={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Wi(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...T(t)})}function Hi(e,t){return new e({type:"string",format:"date",check:"string_format",...T(t)})}function Ki(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...T(t)})}function qi(e,t){return new e({type:"string",format:"duration",check:"string_format",...T(t)})}function qd(e,t){return new e(ja({type:"number",checks:[],...T(t)}))}function Gd(e,t){return new e(ja({type:"number",coerce:!0,checks:[],...T(t)}))}function Xd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...T(t)})}function Yd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...T(t)})}function Qd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...T(t)})}function ep(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...T(t)})}function tp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...T(t)})}function np(e,t){return new e({type:"boolean",...T(t)})}function rp(e,t){return new e({type:"boolean",coerce:!0,...T(t)})}function ip(e,t){return new e({type:"bigint",...T(t)})}function op(e,t){return new e({type:"bigint",coerce:!0,...T(t)})}function ap(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...T(t)})}function sp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...T(t)})}function cp(e,t){return new e({type:"symbol",...T(t)})}function lp(e,t){return new e({type:"undefined",...T(t)})}function up(e,t){return new e({type:"null",...T(t)})}function dp(e){return new e({type:"any"})}function pp(e){return new e({type:"unknown"})}function mp(e,t){return new e({type:"never",...T(t)})}function fp(e,t){return new e({type:"void",...T(t)})}function hp(e,t){return new e({type:"date",...T(t)})}function gp(e,t){return new e({type:"date",coerce:!0,...T(t)})}function yp(e,t){return new e({type:"nan",...T(t)})}function St(e,t){return new ta({check:"less_than",...T(t),value:e,inclusive:!1})}function He(e,t){return new ta({check:"less_than",...T(t),value:e,inclusive:!0})}function $t(e,t){return new na({check:"greater_than",...T(t),value:e,inclusive:!1})}function Ke(e,t){return new na({check:"greater_than",...T(t),value:e,inclusive:!0})}function rs(e){return $t(0,e)}function is(e){return St(0,e)}function os(e){return He(0,e)}function as(e){return Ke(0,e)}function nn(e,t){return new tu({check:"multiple_of",...T(t),value:e})}function rn(e,t){return new iu({check:"max_size",...T(t),maximum:e})}function It(e,t){return new ou({check:"min_size",...T(t),minimum:e})}function Nn(e,t){return new au({check:"size_equals",...T(t),size:e})}function Ln(e,t){return new su({check:"max_length",...T(t),maximum:e})}function zt(e,t){return new cu({check:"min_length",...T(t),minimum:e})}function Un(e,t){return new lu({check:"length_equals",...T(t),length:e})}function _r(e,t){return new uu({check:"string_format",format:"regex",...T(t),pattern:e})}function xr(e){return new du({check:"string_format",format:"lowercase",...T(e)})}function Sr(e){return new pu({check:"string_format",format:"uppercase",...T(e)})}function $r(e,t){return new mu({check:"string_format",format:"includes",...T(t),includes:e})}function Ir(e,t){return new fu({check:"string_format",format:"starts_with",...T(t),prefix:e})}function Cr(e,t){return new hu({check:"string_format",format:"ends_with",...T(t),suffix:e})}function ss(e,t,r){return new gu({check:"property",property:e,schema:t,...T(r)})}function Ar(e,t){return new yu({check:"properties",shape:e,...T(t)})}function Dr(e,t){return new vu({check:"mime_type",mime:e,...T(t)})}function mt(e){return new bu({check:"overwrite",tx:e})}function Rr(e){return mt(t=>t.normalize(e))}function Tr(){return mt(e=>e.trim())}function Er(){return mt(e=>e.toLowerCase())}function Or(){return mt(e=>e.toUpperCase())}function Pr(){return mt(e=>rl(e))}function vp(e,t,r){return new e({type:"array",element:t,...T(r)})}function LA(e,t,r){return new e({type:"union",options:t,...T(r)})}function UA(e,t,r){return new e({type:"union",options:t,inclusive:!1,...T(r)})}function zA(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...T(i)})}function MA(e,t,r){return new e({type:"intersection",left:t,right:r})}function VA(e,t,r,i){let n=r instanceof F,o=n?i:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...T(o)})}function BA(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...T(i)})}function FA(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...T(i)})}function JA(e,t,r){return new e({type:"set",valueType:t,...T(r)})}function ZA(e,t,r){let i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...T(r)})}function WA(e,t,r){return new e({type:"enum",entries:t,...T(r)})}function HA(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...T(r)})}function bp(e,t){return new e({type:"file",...T(t)})}function KA(e,t){return new e({type:"transform",transform:t})}function qA(e,t){return new e({type:"optional",innerType:t})}function GA(e,t){return new e({type:"nullable",innerType:t})}function XA(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():gi(r)}})}function YA(e,t,r){return new e({type:"nonoptional",innerType:t,...T(r)})}function QA(e,t){return new e({type:"success",innerType:t})}function eD(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:ll(r)})}function tD(e,t,r){return new e({type:"pipe",in:t,out:r})}function nD(e,t){return new e({type:"readonly",innerType:t})}function rD(e,t,r){return new e({type:"template_literal",parts:t,...T(r)})}function iD(e,t){return new e({type:"lazy",getter:t})}function oD(e,t){return new e({type:"promise",innerType:t})}function wp(e,t,r){let i=T(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function kp(e,t,r){return new e({type:"custom",check:"custom",fn:t,...T(r)})}function _p(e,t){let r=uv(i=>(i.addIssue=n=>{if(typeof n=="string")i.issues.push(pr(n,i.value,r._zod.def));else{let o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),"input"in o||(o.input=i.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),i.issues.push(pr(o))}},e(i.value,i)),t);return r}function uv(e,t){let r=new oe({check:"custom",...T(t)});return r._zod.check=e,r}function xp(e){let t=new oe({check:"describe"});return t._zod.onattach=[r=>{let i=_e.get(r)??{};_e.add(r,{...i,description:e})}],t._zod.check=()=>{},t}function Sp(e){let t=new oe({check:"meta"});return t._zod.onattach=[r=>{let i=_e.get(r)??{};_e.add(r,{...i,...e})}],t._zod.check=()=>{},t}function $p(e,t){let r=T(t),i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(f=>typeof f=="string"?f.toLowerCase():f),n=n.map(f=>typeof f=="string"?f.toLowerCase():f));let o=new Set(i),a=new Set(n),s=e.Codec??Ui,c=e.Boolean??Ni,l=e.String??Tn,u=new l({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),m=new s({type:"pipe",in:u,out:d,transform:((f,h)=>{let w=f;return r.case!=="sensitive"&&(w=w.toLowerCase()),o.has(w)?!0:a.has(w)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:h.value,inst:m,continue:!1}),{})}),reverseTransform:((f,h)=>f===!0?i[0]||"true":n[0]||"false"),error:r.error});return m._zod.bag.truthy=i,m._zod.bag.falsy=n,m._zod.bag.case=r.case??"insensitive",m}function zn(e,t,r,i={}){let n=T(i),o={check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...n};return r instanceof RegExp&&(o.pattern=r),new e(o)}function Gi(e,...t){for(let r of t)for(let i of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,i)&&ke(e,i,r[i]);return e}function on(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??_e,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function ye(e,t,r,i,n){let o=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:i.path,message:n}):t.unrepresentable;if(o==="any")return!1;if(o===void 0||o==="throw")throw new Error(n);return Object.assign(r,o),!0}function re(e,t,r={path:[],schemaPath:[]}){var i;let n=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let u={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,u);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,u)}let d=e._zod.parent;d&&(a.ref||(a.ref=d),re(d,t,u),t.seen.get(d).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Gi(a.schema,c),t.io==="input"&&je(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function dv(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function an(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let i=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=i.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.`);i.set(s,a[0])}}let n=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(a[0])?.id,m=e.external.uri??(h=>h);if(d)return{ref:m(d)};let f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${m("__shared")}#/${s}/${dv(f)}`}}let c="#",l=`${c}/${s}/`;if(a[1]===r&&!a[1].schema.id)return{ref:c};let u=a[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:l+dv(u)}},o=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 u=s.schema;for(let d in u)delete u[d];u.$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>
|
|
87
|
+
|
|
88
|
+
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]){o(a);continue}if(e.external){let l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}s.count>1&&e.reused==="ref"&&o(a)}e.external&&(e.sharedDefsExtractedFor=e.external)}function fv(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let r=[];for(let i of t){if(!i||typeof i!="object")return;fv(i);let n=Object.keys(i);if(n.length!==1||n[0]!=="type")return;let o=i.type;for(let a of Array.isArray(o)?o:[o]){if(typeof a!="string")return;r.includes(a)||r.push(a)}}delete e.anyOf,e.type=r.length===1?r[0]:r}var hv=new Set(["type","properties","required","additionalProperties"]),pv=["oneOf","anyOf"];function mv(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function Ip(e){let t=[];for(let o of e){if(typeof o!="object"||o.type!=="object")return null;for(let a in o)if(!hv.has(a))return null;t.push(o)}let r={},i=new Set;for(let o of t){for(let a in o.properties){if(Object.prototype.hasOwnProperty.call(r,a))continue;let s=[];for(let l of t){let u=l.properties?.[a]??mv(l);u!=null&&(s.some(d=>JSON.stringify(d)===JSON.stringify(u))||s.push(u))}let c=s.length===1?s[0]:Ip(s)??{allOf:s};ke(r,a,c)}for(let a of o.required??[])i.add(a)}let n={type:"object",properties:r};if(i.size&&(n.required=[...i]),t.every(o=>o.additionalProperties===!1))n.additionalProperties=!1;else{let o=[];for(let a of t){let s=mv(a);s&&!o.some(c=>JSON.stringify(c)===JSON.stringify(s))&&o.push(s)}o.length===1?n.additionalProperties=o[0]:o.length>1&&(n.additionalProperties={allOf:o})}return n}function aD(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let n of hv)if(n in e)return;let r=t.filter(n=>pv.some(o=>Array.isArray(n[o]))),i=null;if(!r.length)i=Ip(t);else{let n=r[0],o=pv.find(c=>Array.isArray(n[c]));if(Object.keys(n).length!==1)return;let a=t.filter(c=>c!==n),s=n[o].map(c=>Ip([...a,c]));if(s.some(c=>!c))return;i={[o]:s}}i&&(delete e.allOf,Gi(e,i))}function sn(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let c=e.seen.get(s);if(c.ref===null)return;let l=c.def??c.schema,u={...l},d=c.ref;if(c.ref=null,d){i(d);let f=e.seen.get(d),h=f.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(h)):Gi(l,h),Gi(l,u),s._zod.parent===d)for(let D in l)D==="$ref"||D==="allOf"||D in u||delete l[D];if(h.$ref&&f.def)for(let D in l)D==="$ref"||D==="allOf"||D in f.def&&JSON.stringify(l[D])===JSON.stringify(f.def[D])&&delete l[D]}let m=s._zod.parent;if(m&&m!==d){i(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??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let s of[...e.seen.entries()].reverse())i(s[0]);if(e.target!=="openapi-3.0")for(let s of e.seen.entries())fv(s[1].def??s[1].schema);for(let s of e.deferred)s();if(e.intersections.length){let s=new Map;for(let c of e.seen.values())for(let l of[c.schema,c.def]){let u=l?.allOf;if(!Array.isArray(u))continue;let d=s.get(u);d?d.push(l):s.set(u,[l])}for(let c of e.intersections)for(let l of s.get(c)??[])aD(l)}}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)}Gi(n,r.defId?r.schema:r.def??r.schema);let o=e.metadataRegistry.get(t)?.id;o!==void 0&&n.id===o&&delete n.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,ke(a,c.defId,c.def))}e.external&&(e.sharedEmitDoneFor=e.external),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:jr(t,"input",e.processors),output:jr(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function je(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return je(i.element,r);if(i.type==="set")return je(i.valueType,r);if(i.type==="lazy")return je(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault"||i.type==="catch")return je(i.innerType,r);if(i.type==="intersection")return je(i.left,r)||je(i.right,r);if(i.type==="record"||i.type==="map")return je(i.keyType,r)||je(i.valueType,r);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:je(i.in,r)||je(i.out,r);if(i.type==="object"){for(let n in i.shape)if(je(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(let n of i.options)if(je(n,r))return!0;return!1}if(i.type==="tuple"){for(let n of i.items)if(je(n,r))return!0;return!!(i.rest&&je(i.rest,r))}return!1}var Cp=(e,t={})=>r=>{let i=on({...r,processors:t});return re(e,i),an(i,e),sn(i,e)},jr=(e,t,r={})=>i=>{let{libraryOptions:n,target:o}=i??{},a=on({...n??{},target:o,io:t,processors:r});return re(e,a),an(a,e),sn(a,e)};var Nr=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r)},Lr=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r)},gv=(e,t)=>{Nr(e,"minimum",t),Lr(e,"maximum",t)},wv=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},kv=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},_v=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t]},xv=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},yv=(e,t)=>Nr(e,"minimum",t.minimum),vv=(e,t)=>Lr(e,"maximum",t.maximum),bv=e=>(t,r)=>{xv(t,r.format);let[i,n]=e[r.format];Nr(t,"minimum",i),Lr(t,"maximum",n)},sD={greater_than:(e,t)=>Nr(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Lr(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>wv(e,t.value),number_format:bv(vi),bigint_format:bv(bi),min_length:yv,max_length:vv,length_equals:(e,t)=>gv(e,t.length),min_size:yv,max_size:vv,size_equals:(e,t)=>gv(e,t.size),string_format:(e,t)=>{xv(e,t.format),t.pattern&&kv(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>_v(e,t.mime)};function ve(e){let t={},r=e._zod.def,i=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(let o of i)sD[o._zod.def.check]?.(t,o._zod.def);let n=e._zod.bag;n.minimum!==void 0&&Nr(t,"minimum",n.minimum),n.exclusiveMinimum!==void 0&&Nr(t,"exclusiveMinimum",n.exclusiveMinimum),n.maximum!==void 0&&Lr(t,"maximum",n.maximum),n.exclusiveMaximum!==void 0&&Lr(t,"exclusiveMaximum",n.exclusiveMaximum),n.multipleOf!==void 0&&wv(t,n.multipleOf),n.format!==void 0&&(t.format??(t.format=n.format),n.format.includes("int")&&(t.isInt=!0)),n.mime&&_v(t,n.mime);for(let o of n.patterns??[])kv(t,o);return t}var cD={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},lD=new Map([[pa,jl],[ji,Nl]]),Sv=e=>lD.get(e)??e,Rp=(e,t,r,i)=>{let n=r;n.type="string";let{minimum:o,maximum:a,format:s,patterns:c,contentEncoding:l,laxFormat:u}=ve(e);if(typeof o=="number"&&(n.minLength=o),typeof a=="number"&&(n.maxLength=a),s&&(n.format=cD[s]??s,n.format===""&&delete n.format,(s==="time"||u)&&delete n.format),l&&(n.contentEncoding=l),c&&c.size>0){let d=[...c].map(Sv);d.length===1?n.pattern=d[0].source:d.length>1&&(n.allOf=[...d.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},Tp=(e,t,r,i)=>{let n=r,{minimum:o,maximum:a,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=ve(e);n.type=u?"integer":"number";let d=typeof l=="number"&&l>=(o??Number.NEGATIVE_INFINITY),m=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";if(d?f?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l:typeof o=="number"&&(n.minimum=o),m?f?(n.maximum=c,n.exclusiveMaximum=!0):n.exclusiveMaximum=c:typeof a=="number"&&(n.maximum=a),s){let h=new Set;for(let A of s)Number.isFinite(A)&&A!==0?h.add(Math.abs(A)):ye(e,t,n,i,`A multipleOf divisor of ${A} cannot be represented in JSON Schema`);let[w,...D]=h;w!==void 0&&(n.multipleOf=w),D.length&&(n.allOf=[...n.allOf??[],...D.map(A=>({multipleOf:A}))])}},Ep=(e,t,r,i)=>{r.type="boolean"},Op=(e,t,r,i)=>{ye(e,t,r,i,"BigInt cannot be represented in JSON Schema")},Pp=(e,t,r,i)=>{ye(e,t,r,i,"Symbols cannot be represented in JSON Schema")},jp=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Np=(e,t,r,i)=>{ye(e,t,r,i,"Undefined cannot be represented in JSON Schema")},Lp=(e,t,r,i)=>{ye(e,t,r,i,"Void cannot be represented in JSON Schema")},Up=(e,t,r,i)=>{r.not={}},zp=(e,t,r,i)=>{},Mp=(e,t,r,i)=>{},Vp=(e,t,r,i)=>{ye(e,t,r,i,"Date cannot be represented in JSON Schema")},Bp=(e,t,r,i)=>{let n=e._zod.def,o=cr(n.entries);if(o.length===0){r.not={};return}o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},Fp=(e,t,r,i)=>{let n=e._zod.def;if(n.values.length===0){r.not={};return}let o=[];for(let a of n.values)if(a===void 0){if(ye(e,t,r,i,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(ye(e,t,r,i,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),o.every(a=>typeof a=="boolean")&&(r.type="boolean"),o.every(a=>a===null)&&(r.type="null"),r.enum=o},Jp=(e,t,r,i)=>{ye(e,t,r,i,"NaN cannot be represented in JSON Schema")},Zp=(e,t,r,i)=>{let n=r,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},Wp=(e,t,r,i)=>{let n=r;n.type="string",n.format="binary",n.contentEncoding="binary";let{minimum:o,maximum:a,mime:s}=ve(e);o!==void 0&&(n.minLength=o),a!==void 0&&(n.maxLength=a),s&&(s.length===0?n.not={}:s.length===1?n.contentMediaType=s[0]:n.anyOf=s.map(c=>({contentMediaType:c})))},Hp=(e,t,r,i)=>{r.type="boolean"},Kp=(e,t,r,i)=>{ye(e,t,r,i,"Custom types cannot be represented in JSON Schema")},qp=(e,t,r,i)=>{ye(e,t,r,i,"Function types cannot be represented in JSON Schema")},Gp=(e,t,r,i)=>{ye(e,t,r,i,"Transforms cannot be represented in JSON Schema")},Xp=(e,t,r,i)=>{ye(e,t,r,i,"Map cannot be represented in JSON Schema")},Yp=(e,t,r,i)=>{ye(e,t,r,i,"Set cannot be represented in JSON Schema")},Qp=(e,t,r,i)=>{let n=r,o=e._zod.def,{minimum:a,maximum:s}=ve(e);typeof a=="number"&&(n.minItems=a),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=re(o.element,t,{...i,path:[...i.path,"items"]})};function Xi(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?Xi(t.out):t.type==="catch"?Xi(t.innerType):e._zod.optin}var em=(e,t,r,i)=>{let n=r,o=e._zod.def,a=o.shape;if(Object.getOwnPropertySymbols(a).length&&ye(e,t,n,i,"Symbol keys cannot be represented in JSON Schema"))return;n.type="object",n.properties={};for(let l in a)ke(n.properties,l,re(a[l],t,{...i,path:[...i.path,"properties",l]}));let c=[];for(let l of Object.keys(a)){let u=o.shape[l];(t.io==="input"?Xi(u)===void 0:u._zod.optout===void 0)&&c.push(l)}c.length>0&&(n.required=c),o.catchall?._zod.def.type==="never"?n.additionalProperties=!1:o.catchall?o.catchall&&(n.additionalProperties=re(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},ls=(e,t,r,i)=>{let n=e._zod.def,o=n.inclusive===!1,a=n.options.map((s,c)=>re(s,t,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=a:r.anyOf=a},tm=(e,t,r,i)=>{let n=e._zod.def,o=re(n.left,t,{...i,path:[...i.path,"allOf",0]}),a=re(n.right,t,{...i,path:[...i.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,c=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];r.allOf=c,t.intersections.push(c)},nm=(e,t,r,i)=>{let n=r,o=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=o.items.map((w,D)=>re(w,t,{...i,path:[...i.path,a,D]})),l=o.rest?re(o.rest,t,{...i,path:[...i.path,s,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null,u=o.items.length;for(;u>0;){let w=o.items[u-1];if(!(t.io==="input"?Xi(w)!==void 0:w._zod.optout==="optional"))break;u--}let d=o.items.length,m=!o.rest;t.target==="draft-2020-12"?(n.prefixItems=c,m?n.items=!1:l&&(n.items=l),u>0&&(n.minItems=u),m&&(n.maxItems=d)):t.target==="openapi-3.0"?(n.items={anyOf:c},l&&n.items.anyOf.push(l),u>0&&(n.minItems=u),m&&(n.maxItems=d)):(n.items=c,m?n.additionalItems=!1:l&&(n.additionalItems=l),u>0&&(n.minItems=u),m&&(n.maxItems=d));let{minimum:f,maximum:h}=ve(e);typeof f=="number"&&(n.minItems=f),typeof h=="number"&&(n.maxItems=h)};function Ap(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);let h=e.get(t)?.def;if(!h)return t;let w=Ap(e,h,r);return w===h?t:w}for(let h of["anyOf","oneOf"]){let w=t[h];if(!Array.isArray(w))continue;let D=w.map(A=>Ap(e,A,r));D.some((A,C)=>A!==w[C])&&(t={...t,[h]:D})}let i=Array.isArray(t.type)?t.type:[t.type],n=!i.includes("string")&&i.some(h=>h==="number"||h==="integer"),o=t.enum??(t.const!==void 0?[t.const]:void 0);if(!n&&!o?.some(h=>typeof h=="number"))return t;let{minimum:a,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:m,...f}=t;return f.enum?f.enum=f.enum.map(h=>typeof h=="number"?String(h):h):typeof f.const=="number"&&(f.const=String(f.const)),n&&(f.type="string",o||(f.pattern=(i.includes("number")?Ut:Ai).source)),f}var Dp=new WeakMap;function uD(e){let t=new Map;for(let i of e.seen.values())i.def&&!t.has(i.schema)&&t.set(i.schema,i);let r=new Map;for(let i of Dp.get(e)??[]){let n=e.seen.get(i),o=(n?.def??n?.schema)?.propertyNames;if(!o||o===!0||r.has(o))continue;let a=Ap(t,o,new Set);a!==o&&r.set(o,a)}if(r.size)for(let i of e.seen.values())for(let n of[i.schema,i.def]){let o=n&&r.get(n.propertyNames);o&&(n.propertyNames=o)}}var rm=(e,t,r,i)=>{let n=r,o=e._zod.def;n.type="object";let a=o.keyType,s=ve(a).patterns;if(o.mode==="loose"&&s&&s.size>0){let u=re(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(let d of s)ke(n.patternProperties,Sv(d).source,u)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){n.propertyNames=re(o.keyType,t,{...i,path:[...i.path,"propertyNames"]});let u=Dp.get(t);u||(u=[],Dp.set(t,u),t.deferred.push(()=>uD(t))),u.push(e)}n.additionalProperties=re(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]})}let c=a._zod.values,l=t.io==="input"&&Xi(o.valueType)!==void 0;if(c&&!o.partial&&!l){let u=[...c].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(n.required=u.map(String))}},im=(e,t,r,i)=>{let n=e._zod.def,o=re(n.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},om=(e,t,r,i)=>{let n=e._zod.def;re(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},am=Symbol();function $v(e,t,r,i,n){let o=!1,a=JSON.stringify(e,(s,c)=>typeof c!="bigint"?c:(o=!0,null));return o?(ye(t,r,i,n,"BigInt defaults cannot be represented in JSON Schema"),am):JSON.parse(a)}var sm=(e,t,r,i)=>{let n=e._zod.def;re(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType;let a=$v(n.defaultValue,e,t,r,i);a!==am&&(r.default=a)},cm=(e,t,r,i)=>{let n=e._zod.def;re(n.innerType,t,i);let o=t.seen.get(e);if(o.ref=n.innerType,t.io!=="input")return;let a=$v(n.defaultValue,e,t,r,i);a!==am&&(r._prefault=a)},lm=(e,t,r,i)=>{let n=e._zod.def;re(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{ye(e,t,r,i,"Dynamic catch values are not supported in JSON Schema");return}r.default=a},um=(e,t,r,i)=>{let n=e._zod.def,o=n.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?o?n.out:n.in:n.out;re(a,t,i);let s=t.seen.get(e);s.ref=a},dm=(e,t,r,i)=>{let n=e._zod.def;re(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},pm=(e,t,r,i)=>{let n=e._zod.def;re(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},us=(e,t,r,i)=>{let n=e._zod.def;re(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},mm=(e,t,r,i)=>{let n=e._zod.innerType;re(n,t,i);let o=t.seen.get(e);o.ref=n},cs={string:Rp,number:Tp,boolean:Ep,bigint:Op,symbol:Pp,null:jp,undefined:Np,void:Lp,never:Up,any:zp,unknown:Mp,date:Vp,enum:Bp,literal:Fp,nan:Jp,template_literal:Zp,file:Wp,success:Hp,custom:Kp,function:qp,transform:Gp,map:Xp,set:Yp,array:Qp,object:em,union:ls,intersection:tm,tuple:nm,record:rm,nullable:im,nonoptional:om,default:sm,prefault:cm,catch:lm,pipe:um,readonly:dm,promise:pm,optional:us,lazy:mm};function ds(e,t){if("_idmap"in e){let i=e,n=on({...t,processors:cs}),o={};for(let c of i._idmap.entries()){let[l,u]=c;re(u,n)}let a={},s={registry:i,uri:t?.uri,defs:o};n.external=s;for(let c of i._idmap.entries()){let[l,u]=c;an(n,u),ke(a,l,sn(n,u))}if(Object.keys(o).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:o}}return{schemas:a}}let r=on({...t,processors:cs});return re(e,r),an(r,e),sn(r,e)}var ps=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=on({processors:cs,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 re(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)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,an(this.ctx,t);let i=sn(this.ctx,t),{"~standard":n,...o}=i;return o}};var Iv={};var Zr={};Et(Zr,{ZodAny:()=>jm,ZodArray:()=>zm,ZodBase64:()=>Ts,ZodBase64URL:()=>Es,ZodBigInt:()=>Fr,ZodBigIntFormat:()=>js,ZodBoolean:()=>Br,ZodCIDRv4:()=>Ds,ZodCIDRv6:()=>Rs,ZodCUID:()=>_s,ZodCUID2:()=>xs,ZodCatch:()=>sf,ZodCodec:()=>so,ZodCreditCard:()=>Cm,ZodCustom:()=>co,ZodCustomStringFormat:()=>Fn,ZodDate:()=>to,ZodDefault:()=>ef,ZodDiscriminatedUnion:()=>Vm,ZodE164:()=>Os,ZodEmail:()=>vs,ZodEmoji:()=>ws,ZodEnum:()=>zr,ZodExactOptional:()=>zs,ZodFile:()=>Gm,ZodFunction:()=>yf,ZodGUID:()=>bs,ZodIBAN:()=>Am,ZodIPv4:()=>Cs,ZodIPv6:()=>As,ZodISODate:()=>ln,ZodISODateTime:()=>cn,ZodISODuration:()=>dn,ZodISOTime:()=>un,ZodInstanceOf:()=>wf,ZodIntersection:()=>Bm,ZodJWT:()=>Ps,ZodKSUID:()=>Is,ZodLazy:()=>ff,ZodLiteral:()=>qm,ZodMAC:()=>Im,ZodMap:()=>Hm,ZodNaN:()=>lf,ZodNanoID:()=>ks,ZodNever:()=>Lm,ZodNonOptional:()=>Ms,ZodNull:()=>Om,ZodNullable:()=>Qm,ZodNumber:()=>Vr,ZodNumberFormat:()=>Jn,ZodObject:()=>ro,ZodOptional:()=>oo,ZodPipe:()=>ao,ZodPrefault:()=>nf,ZodPreprocess:()=>uf,ZodPromise:()=>gf,ZodReadonly:()=>df,ZodRecord:()=>Ur,ZodSet:()=>Km,ZodString:()=>Mr,ZodStringFormat:()=>ie,ZodSuccess:()=>af,ZodSymbol:()=>Tm,ZodTemplateLiteral:()=>mf,ZodTransform:()=>Xm,ZodTuple:()=>Jm,ZodType:()=>Z,ZodULID:()=>Ss,ZodURL:()=>eo,ZodUUID:()=>Ct,ZodUndefined:()=>Em,ZodUnion:()=>io,ZodUnknown:()=>Nm,ZodVoid:()=>Um,ZodXID:()=>$s,ZodXor:()=>Mm,_ZodString:()=>ys,_default:()=>tf,_function:()=>Ub,any:()=>hb,array:()=>no,base64:()=>qv,base64url:()=>Gv,bigint:()=>ub,boolean:()=>Rm,catch:()=>cf,check:()=>zb,cidrv4:()=>Hv,cidrv6:()=>Kv,codec:()=>Pb,creditCard:()=>Yv,cuid:()=>zv,cuid2:()=>Mv,currencyCode:()=>ib,custom:()=>Mb,date:()=>yb,describe:()=>Vb,discriminatedUnion:()=>xb,e164:()=>Xv,email:()=>Dv,emoji:()=>Lv,enum:()=>Ls,exactOptional:()=>Ym,file:()=>Rb,float32:()=>ab,float64:()=>sb,function:()=>Ub,guid:()=>Rv,hash:()=>ob,hex:()=>rb,hostname:()=>nb,httpUrl:()=>Nv,iban:()=>Qv,instanceof:()=>Fb,int:()=>hs,int32:()=>cb,int64:()=>db,intersection:()=>Fm,invertCodec:()=>jb,ipv4:()=>Jv,ipv6:()=>Wv,json:()=>Zb,jwt:()=>eb,keyof:()=>vb,ksuid:()=>Fv,lazy:()=>hf,literal:()=>Db,looseObject:()=>kb,looseRecord:()=>$b,mac:()=>Zv,map:()=>Ib,meta:()=>Bb,nan:()=>Ob,nanoid:()=>Uv,nativeEnum:()=>Ab,never:()=>Ns,nonoptional:()=>of,null:()=>Pm,nullable:()=>Qi,nullish:()=>Tb,number:()=>Dm,object:()=>bb,optional:()=>Vn,partialRecord:()=>Sb,pipe:()=>gs,prefault:()=>rf,preprocess:()=>Wb,promise:()=>Lb,readonly:()=>pf,record:()=>Wm,refine:()=>vf,set:()=>Cb,strictObject:()=>wb,string:()=>Yi,stringFormat:()=>tb,stringbool:()=>Jb,success:()=>Eb,superRefine:()=>bf,symbol:()=>mb,templateLiteral:()=>Nb,transform:()=>Us,tuple:()=>Zm,uint32:()=>lb,uint64:()=>pb,ulid:()=>Vv,undefined:()=>fb,union:()=>Jr,unknown:()=>Mn,url:()=>jv,uuid:()=>Tv,uuidv4:()=>Ev,uuidv6:()=>Ov,uuidv7:()=>Pv,void:()=>gb,xid:()=>Bv,xor:()=>_b});var ms={};Et(ms,{endsWith:()=>Cr,gt:()=>$t,gte:()=>Ke,includes:()=>$r,length:()=>Un,lowercase:()=>xr,lt:()=>St,lte:()=>He,maxLength:()=>Ln,maxSize:()=>rn,mime:()=>Dr,minLength:()=>zt,minSize:()=>It,multipleOf:()=>nn,negative:()=>is,nonnegative:()=>as,nonpositive:()=>os,normalize:()=>Rr,overwrite:()=>mt,positive:()=>rs,properties:()=>Ar,property:()=>ss,regex:()=>_r,size:()=>Nn,slugify:()=>Pr,startsWith:()=>Ir,toLowerCase:()=>Er,toUpperCase:()=>Or,trim:()=>Tr,uppercase:()=>Sr});var Cv=new WeakSet([Object.prototype,Error.prototype]);function fs(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let i=r(this);return Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0})}})}var Av=(e,t)=>{hl.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);Cv.has(r)||(Cv.add(r),fs(r,"format",i=>n=>Si(i,n)),fs(r,"flatten",i=>n=>xi(i,n)),fs(r,"addIssue",i=>n=>{i.issues.push(n),i.message=JSON.stringify(i.issues,lr,2)}),fs(r,"addIssues",i=>n=>{i.issues.push(...n),i.message=JSON.stringify(i.issues,lr,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},pD=g("ZodError",Av),Ze=g("ZodError",Av,void 0,{Parent:Error});var fm=mr(Ze),hm=fr(Ze),gm=hr(Ze),ym=gr(Ze),vm=Fo(Ze),bm=Jo(Ze),wm=Zo(Ze),km=Wo(Ze),_m=Ho(Ze),xm=Ko(Ze),Sm=qo(Ze),$m=Go(Ze);function fD(){be.localeError||le(Aa())}function Bn(){be.memoizer||le({memoizer:Bi()})}var Z=g("ZodType",(e,t)=>(fD(),F.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(_.mergeDefs(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return te(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(vf(e,t))},superRefine(e,t){return this.check(bf(e,t))},overwrite(e){return this.check(mt(e))},optional(){return Vn(this)},exactOptional(){return Ym(this)},nullable(){return Qi(this)},nullish(){return Vn(Qi(this))},nonoptional(e){return of(this,e)},array(){return no(this)},or(e){return Jr([this,e])},and(e){return Fm(this,e)},transform(e){return gs(this,Us(e))},default(e){return tf(this,e)},prefault(e){return rf(this,e)},catch(e){return cf(this,e)},pipe(e){return gs(this,e)},readonly(){return pf(this)},describe(e){let t=this.clone();return _e.add(t,{description:e}),t},meta(...e){if(e.length===0)return _e.get(this);let t=this.clone();return _e.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return _.hide(this,"~standard",{...sa(this),jsonSchema:{input:jr(this,"input"),output:jr(this,"output")}})},set"~standard"(e){_.own(this,"~standard",e)},parse:function e(t,r){return fm(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await hm(this,t,r,{callee:e})},safeParse(e,t){return gm(this,e,t)},async safeParseAsync(e,t){return ym(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){_.own(this,"spa",e)},validate(e,t){return $i(this,e,t)},validateAsync(e,t){return Ii(this,e,t)},encode:function e(t,r){return vm(this,t,r,{callee:e})},decode:function e(t,r){return bm(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await wm(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await km(this,t,r,{callee:e})},safeEncode(e,t){return _m(this,e,t)},safeDecode(e,t){return xm(this,e,t)},async safeEncodeAsync(e,t){return Sm(this,e,t)},async safeDecodeAsync(e,t){return $m(this,e,t)},toJSONSchema(e){return Cp(this,{})(e)},get description(){return _e.get(this)?.description},get _def(){return this._zod.def}}),ys=g("_ZodString",(e,t)=>{Tn.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Rp(e,r,i,n)},_.derived({format:e=>ve(e).format??null,minLength:e=>ve(e).minimum??null,maxLength:e=>ve(e).maximum??null},{regex(...e){return this.check(_r(...e))},includes(...e){return this.check($r(...e))},startsWith(...e){return this.check(Ir(...e))},endsWith(...e){return this.check(Cr(...e))},min(...e){return this.check(zt(...e))},max(...e){return this.check(Ln(...e))},length(...e){return this.check(Un(...e))},nonempty(...e){return this.check(zt(1,...e))},lowercase(e){return this.check(xr(e))},uppercase(e){return this.check(Sr(e))},trim(){return this.check(Tr())},normalize(...e){return this.check(Rr(...e))},toLowerCase(){return this.check(Er())},toUpperCase(){return this.check(Or())},slugify(){return this.check(Pr())}})),Mr=g("ZodString",(e,t)=>{Tn.init(e,t),ys.init(e,t)},{email(e){return this.check(Na(vs,e))},url(e){return this.check(Zi(eo,e))},jwt(e){return this.check(ns(Ps,e))},emoji(e){return this.check(Ba(ws,e))},guid(e){return this.check(La(bs,e))},uuid(e){return this.check(Ua(Ct,e))},uuidv4(e){return this.check(za(Ct,e))},uuidv6(e){return this.check(Ma(Ct,e))},uuidv7(e){return this.check(Va(Ct,e))},nanoid(e){return this.check(Fa(ks,e))},cuid(e){return this.check(Ja(_s,e))},cuid2(e){return this.check(Za(xs,e))},ulid(e){return this.check(Wa(Ss,e))},base64(e){return this.check(Qa(Ts,e))},base64url(e){return this.check(es(Es,e))},xid(e){return this.check(Ha($s,e))},ksuid(e){return this.check(Ka(Is,e))},ipv4(e){return this.check(qa(Cs,e))},ipv6(e){return this.check(Ga(As,e))},cidrv4(e){return this.check(Xa(Ds,e))},cidrv6(e){return this.check(Ya(Rs,e))},e164(e){return this.check(ts(Os,e))},datetime(e){return this.check(Wi(cn,e))},date(e){return this.check(Hi(ln,e))},time(e){return this.check(Ki(un,e))},duration(e){return this.check(qi(dn,e))}});function Yi(e){return Fd(Mr,e)}var ie=g("ZodStringFormat",(e,t)=>{ne.init(e,t),ys.init(e,t)}),cn=g("ZodISODateTime",(e,t)=>{ju.init(e,t),ie.init(e,t)}),ln=g("ZodISODate",(e,t)=>{Nu.init(e,t),ie.init(e,t)}),un=g("ZodISOTime",(e,t)=>{Lu.init(e,t),ie.init(e,t)}),dn=g("ZodISODuration",(e,t)=>{Uu.init(e,t),ie.init(e,t)}),vs=g("ZodEmail",(e,t)=>{Su.init(e,t),ie.init(e,t)});function Dv(e){return Na(vs,e)}var bs=g("ZodGUID",(e,t)=>{_u.init(e,t),ie.init(e,t)});function Rv(e){return La(bs,e)}var Ct=g("ZodUUID",(e,t)=>{xu.init(e,t),ie.init(e,t)});function Tv(e){return Ua(Ct,e)}function Ev(e){return za(Ct,e)}function Ov(e){return Ma(Ct,e)}function Pv(e){return Va(Ct,e)}var eo=g("ZodURL",(e,t)=>{Cu.init(e,t),ie.init(e,t)});function jv(e){return Zi(eo,e)}function Nv(e){return Zi(eo,{protocol:Ci,hostname:Ul,..._.normalizeParams(e)})}var ws=g("ZodEmoji",(e,t)=>{Au.init(e,t),ie.init(e,t)});function Lv(e){return Ba(ws,e)}var ks=g("ZodNanoID",(e,t)=>{Du.init(e,t),ie.init(e,t)});function Uv(e){return Fa(ks,e)}var _s=g("ZodCUID",(e,t)=>{Ru.init(e,t),ie.init(e,t)});function zv(e){return Ja(_s,e)}var xs=g("ZodCUID2",(e,t)=>{Tu.init(e,t),ie.init(e,t)});function Mv(e){return Za(xs,e)}var Ss=g("ZodULID",(e,t)=>{Eu.init(e,t),ie.init(e,t)});function Vv(e){return Wa(Ss,e)}var $s=g("ZodXID",(e,t)=>{Ou.init(e,t),ie.init(e,t)});function Bv(e){return Ha($s,e)}var Is=g("ZodKSUID",(e,t)=>{Pu.init(e,t),ie.init(e,t)});function Fv(e){return Ka(Is,e)}var Cs=g("ZodIPv4",(e,t)=>{zu.init(e,t),ie.init(e,t)});function Jv(e){return qa(Cs,e)}var Im=g("ZodMAC",(e,t)=>{Vu.init(e,t),ie.init(e,t)});function Zv(e){return Zd(Im,e)}var As=g("ZodIPv6",(e,t)=>{Mu.init(e,t),ie.init(e,t)});function Wv(e){return Ga(As,e)}var Ds=g("ZodCIDRv4",(e,t)=>{Bu.init(e,t),ie.init(e,t)});function Hv(e){return Xa(Ds,e)}var Rs=g("ZodCIDRv6",(e,t)=>{Fu.init(e,t),ie.init(e,t)});function Kv(e){return Ya(Rs,e)}var Ts=g("ZodBase64",(e,t)=>{Ju.init(e,t),ie.init(e,t)});function qv(e){return Qa(Ts,e)}var Es=g("ZodBase64URL",(e,t)=>{Zu.init(e,t),ie.init(e,t)});function Gv(e){return es(Es,e)}var Os=g("ZodE164",(e,t)=>{Wu.init(e,t),ie.init(e,t)});function Xv(e){return ts(Os,e)}var Cm=g("ZodCreditCard",(e,t)=>{Hu.init(e,t),ie.init(e,t)});function Yv(e){return Wd(Cm,e)}var Am=g("ZodIBAN",(e,t)=>{Ku.init(e,t),ie.init(e,t)});function Qv(e){return Hd(Am,e)}var Ps=g("ZodJWT",(e,t)=>{qu.init(e,t),ie.init(e,t)});function eb(e){return ns(Ps,e)}var Fn=g("ZodCustomStringFormat",(e,t)=>{Gu.init(e,t),ie.init(e,t)});function tb(e,t,r={}){return zn(Fn,e,t,r)}function nb(e){return zn(Fn,"hostname",Ll,e)}function rb(e){return zn(Fn,"hex",Yl,e)}function ib(e){return zn(Fn,"currency_code",Ml,e)}function ob(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,n=tt[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return zn(Fn,i,n,t)}var Vr=g("ZodNumber",(e,t)=>{ya.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Tp(e,r,i,n),e.isFinite=!0},_.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=ve(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=ve(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:e=>{let{isInt:t,multipleOf:r}=ve(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>ve(e).format??null},{gt(e,t){return this.check($t(e,t))},gte(e,t){return this.check(Ke(e,t))},min(e,t){return this.check(Ke(e,t))},lt(e,t){return this.check(St(e,t))},lte(e,t){return this.check(He(e,t))},max(e,t){return this.check(He(e,t))},int(e){return this.check(hs(e))},safe(e){return this.check(hs(e))},positive(e){return this.check($t(0,e))},nonnegative(e){return this.check(Ke(0,e))},negative(e){return this.check(St(0,e))},nonpositive(e){return this.check(He(0,e))},multipleOf(e,t){return this.check(nn(e,t))},step(e,t){return this.check(nn(e,t))},finite(){return this}}));function Dm(e){return qd(Vr,e)}var Jn=g("ZodNumberFormat",(e,t)=>{Xu.init(e,t),Vr.init(e,t)});function hs(e){return Xd(Jn,e)}function ab(e){return Yd(Jn,e)}function sb(e){return Qd(Jn,e)}function cb(e){return ep(Jn,e)}function lb(e){return tp(Jn,e)}var Br=g("ZodBoolean",(e,t)=>{Ni.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ep(e,r,i,n)});function Rm(e){return np(Br,e)}var Fr=g("ZodBigInt",(e,t)=>{va.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Op(e,r,i,n)},_.derived({minValue:e=>ve(e).minimum??null,maxValue:e=>ve(e).maximum??null,format:e=>ve(e).format??null},{gte(e,t){return this.check(Ke(e,t))},min(e,t){return this.check(Ke(e,t))},gt(e,t){return this.check($t(e,t))},lt(e,t){return this.check(St(e,t))},lte(e,t){return this.check(He(e,t))},max(e,t){return this.check(He(e,t))},positive(e){return this.check($t(BigInt(0),e))},negative(e){return this.check(St(BigInt(0),e))},nonpositive(e){return this.check(He(BigInt(0),e))},nonnegative(e){return this.check(Ke(BigInt(0),e))},multipleOf(e,t){return this.check(nn(e,t))}}));function ub(e){return ip(Fr,e)}var js=g("ZodBigIntFormat",(e,t)=>{Yu.init(e,t),Fr.init(e,t)});function db(e){return ap(js,e)}function pb(e){return sp(js,e)}var Tm=g("ZodSymbol",(e,t)=>{Qu.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Pp(e,r,i,n)});function mb(e){return cp(Tm,e)}var Em=g("ZodUndefined",(e,t)=>{ed.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Np(e,r,i,n)});function fb(e){return lp(Em,e)}var Om=g("ZodNull",(e,t)=>{td.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>jp(e,r,i,n)});function Pm(e){return up(Om,e)}var jm=g("ZodAny",(e,t)=>{nd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>zp(e,r,i,n)});function hb(){return dp(jm)}var Nm=g("ZodUnknown",(e,t)=>{rd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Mp(e,r,i,n)});function Mn(){return pp(Nm)}var Lm=g("ZodNever",(e,t)=>{id.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Up(e,r,i,n)});function Ns(e){return mp(Lm,e)}var Um=g("ZodVoid",(e,t)=>{od.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Lp(e,r,i,n)});function gb(e){return fp(Um,e)}var to=g("ZodDate",(e,t)=>{ad.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Vp(e,r,i,n),e.min=(r,i)=>e.check(Ke(r,i)),e.max=(r,i)=>e.check(He(r,i))},_.derived({minDate:e=>{let{minimum:t}=ve(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=ve(e);return t?new Date(t):null}},{}));function yb(e){return hp(to,e)}var zm=g("ZodArray",(e,t)=>{Bn(),sd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Qp(e,r,i,n),e.element=t.element},{min(e,t){return this.check(zt(e,t))},nonempty(e){return this.check(zt(1,e))},max(e,t){return this.check(Ln(e,t))},length(e,t){return this.check(Un(e,t))},unwrap(){return this.element}});function no(e,t){return vp(zm,e,t)}function vb(e){let t=e._zod.def.shape;return Ls(Object.keys(t))}var ro=g("ZodObject",(e,t)=>{Bn(),cd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>em(e,r,i,n),_.installLazyProp(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return Ls(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(_.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(_.mergeDefs(this._zod.def,{catchall:Mn()}))},loose(){return this.clone(_.mergeDefs(this._zod.def,{catchall:Mn()}))},strict(){return this.clone(_.mergeDefs(this._zod.def,{catchall:Ns()}))},strip(){return this.clone(_.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return _.extend(this,e)},safeExtend(e){return _.safeExtend(this,e)},merge(e){return _.merge(this,e)},pick(e){return _.pick(this,e)},omit(e){return _.omit(this,e)},partial(...e){return _.partial(oo,this,e[0])},exactPartial(...e){return _.partial(zs,this,e[0],"exactPartial")},required(...e){return _.required(Ms,this,e[0])}});function bb(e,t){let r={type:"object",shape:e??{},..._.normalizeParams(t)};return new ro(r)}function wb(e,t){return new ro({type:"object",shape:e,catchall:Ns(),..._.normalizeParams(t)})}function kb(e,t){return new ro({type:"object",shape:e,catchall:Mn(),..._.normalizeParams(t)})}var io=g("ZodUnion",(e,t)=>{Li.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ls(e,r,i,n),e.options=t.options});function Jr(e,t){return new io({type:"union",options:e,..._.normalizeParams(t)})}var Mm=g("ZodXor",(e,t)=>{io.init(e,t),ld.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ls(e,r,i,n),e.options=t.options});function _b(e,t){return new Mm({type:"union",options:e,inclusive:!1,..._.normalizeParams(t)})}var Vm=g("ZodDiscriminatedUnion",(e,t)=>{io.init(e,t),dd.init(e,t)});function xb(e,t,r){return new Vm({type:"union",options:t,discriminator:e,..._.normalizeParams(r)})}var Bm=g("ZodIntersection",(e,t)=>{pd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>tm(e,r,i,n)});function Fm(e,t){return new Bm({type:"intersection",left:e,right:t})}var Jm=g("ZodTuple",(e,t)=>{Bn(),ba.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>nm(e,r,i,n)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new oo({type:"optional",innerType:t}))})}});function Zm(e,t,r){let i=t instanceof F,n=i?r:t,o=i?t:null;return new Jm({type:"tuple",items:e,rest:o,..._.normalizeParams(n)})}var Ur=g("ZodRecord",(e,t)=>{Bn(),md.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>rm(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});function Wm(e,t,r){return!t||!t._zod?new Ur({type:"record",keyType:Yi(),valueType:e,..._.normalizeParams(t)}):new Ur({type:"record",keyType:e,valueType:t,..._.normalizeParams(r)})}function Sb(e,t,r){return new Ur({type:"record",keyType:e,valueType:t,..._.normalizeParams(r),partial:!0})}function $b(e,t,r){return new Ur({type:"record",keyType:e,valueType:t,mode:"loose",..._.normalizeParams(r)})}var Hm=g("ZodMap",(e,t)=>{Bn(),fd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Xp(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(It(...r)),e.nonempty=r=>e.check(It(1,r)),e.max=(...r)=>e.check(rn(...r)),e.size=(...r)=>e.check(Nn(...r))});function Ib(e,t,r){return new Hm({type:"map",keyType:e,valueType:t,..._.normalizeParams(r)})}var Km=g("ZodSet",(e,t)=>{Bn(),hd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Yp(e,r,i,n),e.min=(...r)=>e.check(It(...r)),e.nonempty=r=>e.check(It(1,r)),e.max=(...r)=>e.check(rn(...r)),e.size=(...r)=>e.check(Nn(...r))});function Cb(e,t){return new Km({type:"set",valueType:e,..._.normalizeParams(t)})}var zr=g("ZodEnum",(e,t)=>{gd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Bp(e,i,n,o),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{let o={};for(let a of i)if(r.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new zr({...t,checks:[],..._.normalizeParams(n),entries:o})},e.exclude=(i,n)=>{let o={...t.entries};for(let a of i)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new zr({...t,checks:[],..._.normalizeParams(n),entries:o})}});function Ls(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new zr({type:"enum",entries:r,..._.normalizeParams(t)})}function Ab(e,t){return new zr({type:"enum",entries:e,..._.normalizeParams(t)})}var qm=g("ZodLiteral",(e,t)=>{yd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Fp(e,r,i,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Db(e,t){return new qm({type:"literal",values:Array.isArray(e)?e:[e],..._.normalizeParams(t)})}var Gm=g("ZodFile",(e,t)=>{vd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Wp(e,r,i,n),e.min=(r,i)=>e.check(It(r,i)),e.max=(r,i)=>e.check(rn(r,i)),e.mime=(r,i)=>e.check(Dr(Array.isArray(r)?r:[r],i))});function Rb(e){return bp(Gm,e)}var Xm=g("ZodTransform",(e,t)=>{Bn(),bd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Gp(e,r,i,n),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new tn(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(_.issue(o,r.value,t));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=r.value),a.inst??(a.inst=e),r.issues.push(_.issue(a))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function Us(e){return new Xm({type:"transform",transform:e})}var oo=g("ZodOptional",(e,t)=>{wa.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>us(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Vn(e){return new oo({type:"optional",innerType:e})}var zs=g("ZodExactOptional",(e,t)=>{wd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>us(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Ym(e){return new zs({type:"optional",innerType:e})}var Qm=g("ZodNullable",(e,t)=>{kd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>im(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Qi(e){return new Qm({type:"nullable",innerType:e})}function Tb(e){return Vn(Qi(e))}var ef=g("ZodDefault",(e,t)=>{_d.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>sm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function tf(e,t){return new ef({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():_.shallowClone(t)}})}var nf=g("ZodPrefault",(e,t)=>{xd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>cm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function rf(e,t){return new nf({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():_.shallowClone(t)}})}var Ms=g("ZodNonOptional",(e,t)=>{Sd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>om(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function of(e,t){return new Ms({type:"nonoptional",innerType:e,..._.normalizeParams(t)})}var af=g("ZodSuccess",(e,t)=>{$d.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Hp(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Eb(e){return new af({type:"success",innerType:e})}var sf=g("ZodCatch",(e,t)=>{Id.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function cf(e,t){return new sf({type:"catch",innerType:e,catchValue:typeof t=="function"?t:_.constantCatch(t)})}var lf=g("ZodNaN",(e,t)=>{Cd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Jp(e,r,i,n)});function Ob(e){return yp(lf,e)}var ao=g("ZodPipe",(e,t)=>{ka.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>um(e,r,i,n),e.in=t.in,e.out=t.out});function gs(e,t){return new ao({type:"pipe",in:e,out:t})}var so=g("ZodCodec",(e,t)=>{ao.init(e,t),Ui.init(e,t)});function Pb(e,t,r){return new so({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function jb(e){let t=e._zod.def;return new so({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var uf=g("ZodPreprocess",(e,t)=>{ao.init(e,t),Ad.init(e,t)}),df=g("ZodReadonly",(e,t)=>{Dd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>dm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function pf(e){return new df({type:"readonly",innerType:e})}var mf=g("ZodTemplateLiteral",(e,t)=>{Rd.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Zp(e,r,i,n)});function Nb(e,t){return new mf({type:"template_literal",parts:e,..._.normalizeParams(t)})}var ff=g("ZodLazy",(e,t)=>{zi.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>mm(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});function hf(e){return new ff({type:"lazy",getter:e})}var gf=g("ZodPromise",(e,t)=>{Ed.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>pm(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Lb(e){return new gf({type:"promise",innerType:e})}var yf=g("ZodFunction",(e,t)=>{Td.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>qp(e,r,i,n)});function Ub(e){return new yf({type:"function",input:Array.isArray(e?.input)?Zm(e?.input):e?.input??no(Mn()),output:e?.output??Mn()})}var co=g("ZodCustom",(e,t)=>{Od.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Kp(e,r,i,n)});function zb(e){let t=new oe({check:"custom"});return t._zod.check=e,t}function Mb(e,t){return wp(co,e??(()=>!0),t)}function vf(e,t={}){return kp(co,e,t)}function bf(e,t){return _p(e,t)}var Vb=xp,Bb=Sp,wf=g("ZodInstanceOf",(e,t)=>{co.init(e,t)},{properties(e,t){return this.check(Ar(e,t))}});function Fb(e,t={}){let r=new wf({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,..._.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Jb=(...e)=>$p({Codec:so,Boolean:Br,String:Mr},...e);function Zb(e){let t=hf(()=>Jr([Yi(e),Dm(),Rm(),Pm(),no(t),Wm(Yi(),t)]));return t}function Wb(e,t){return new uf({type:"pipe",in:Us(e),out:t})}var hD={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 gD(e){le({customError:e})}function yD(){return le().customError}var kf;kf||(kf={});var lo={};Et(lo,{ZodISODate:()=>ln,ZodISODateTime:()=>cn,ZodISODuration:()=>dn,ZodISOTime:()=>un,date:()=>bD,datetime:()=>vD,duration:()=>kD,time:()=>wD});function vD(e){return Wi(cn,e)}function bD(e){return Hi(ln,e)}function wD(e){return Ki(un,e)}function kD(e){return qi(dn,e)}var O={...Zr,...ms,iso:lo},_D=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 xD(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 Hb(e,t){return e.map((r,i)=>i<t?r:r.optional())}function SD(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function $D(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let n=r[1]===void 0?void 0:SD(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 ID(e,t){return O.transform(i=>i).check(i=>{let n=i.value;if(typeof n!="object"||n===null||Array.isArray(n))return;let o=Object.getOwnPropertyNames(n);if(t.minProperties!==void 0&&o.length<t.minProperties&&i.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:n,inst:e,continue:!0}),t.maxProperties!==void 0&&o.length>t.maxProperties&&i.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:n,inst:e,continue:!0}),t.keySchema)for(let a of o){let s=t.keySchema.safeParse(a);s.success||i.issues.push({code:"invalid_key",origin:"record",issues:s.error.issues,input:a,path:[a],continue:!0})}}).pipe(e)}function _f(e,t){if(e===null)return"z";let r=typeof e;if(r!=="object"){if(r==="number"&&Number.isNaN(e))return null;let i=String(e);return`${r[0]}${i.length}:${i}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let o=[];for(let a of e){let s=_f(a,t);if(s===null)return null;o.push(s)}return`a${o.length}:[${o.join(",")}]`}let i=Object.keys(e).sort(),n=[];for(let o of i){let a=_f(e[o],t);if(a===null)return null;n.push(`${o.length}:${o}=${a}`)}return`o${n.length}:{${n.join(",")}}`}finally{t.delete(e)}}var CD=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),AD=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function uo(e){return typeof e!="object"||e===null?!1:Array.isArray(e)?e.some(uo):typeof e.$ref=="string"?!0:Object.entries(e).some(([t,r])=>CD.has(t)?uo(r):!AD.has(t)||typeof r!="object"||r===null?!1:Object.values(r).some(uo))}function Kb(e){return e===1?"element":"elements"}function DD(e,t){return O.transform(i=>i).check(i=>{let n=i.value;if(Array.isArray(n)){if(t.uniqueItems===!0){let o=new Map;for(let a=0;a<n.length;a++){let s=_f(n[a],new Set);if(s===null)continue;let c=o.get(s);if(c===void 0){o.set(s,a);continue}i.issues.push({code:"custom",message:`Array items must be unique: element at index ${a} duplicates the one at index ${c}`,input:n,path:[a],continue:!0})}}if(t.containsSchema){let o=t.minContains??1,a=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,s=0;for(let c of n)if(t.containsSchema.safeParse(c).success&&++s>=a)break;s<o&&i.issues.push({code:"custom",message:`Array must contain at least ${o} matching ${Kb(o)}; found ${s}`,input:n,continue:!0}),t.maxContains!==void 0&&s>t.maxContains&&i.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${Kb(t.maxContains)}`,input:n,continue:!0})}}}).pipe(e)}function qb(e,t){if(e!==!1)return e===void 0||e===!0?O.any():Ne(e,t)}var RD=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function Gb(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return O.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 O.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let o=$D(n,t),a=Ne(o,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 O.null();if(n.length===0)return O.never();if(n.length===1)return O.literal(n[0]);if(n.every(a=>typeof a=="string"))return O.enum(n);let o=n.map(a=>O.literal(a));return o.length<2?o[0]:O.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return O.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(o=>{let a={...e,type:o};return Gb(a,t)});return n.length===0?O.never():n.length===1?n[0]:O.union(n)}if(!r)return O.any();let i;switch(r){case"string":{let n=O.string();if(e.format){let o=e.format;o==="email"?n=n.check(O.email()):o==="uri"||o==="uri-reference"?n=n.check(O.url()):o==="uuid"||o==="guid"?n=n.check(O.uuid()):o==="date-time"?n=n.check(O.iso.datetime({offset:!0})):o==="date"?n=n.check(O.iso.date()):o==="time"?n=n.check(O.regex(RD)):o==="duration"?n=n.check(O.iso.duration()):o==="hostname"?n=n.check(O.hostname()):o==="ipv4"?n=n.check(O.ipv4()):o==="ipv6"?n=n.check(O.ipv6()):o==="mac"?n=n.check(O.mac()):o==="cidr"?n=n.check(O.cidrv4()):o==="cidr-v6"?n=n.check(O.cidrv6()):o==="base64"?n=n.check(O.base64()):o==="base64url"?n=n.check(O.base64url()):o==="e164"?n=n.check(O.e164()):o==="credit_card"?n=n.check(O.creditCard()):o==="iban"?n=n.check(O.iban()):o==="jwt"?n=n.check(O.jwt()):o==="emoji"?n=n.check(O.emoji()):o==="nanoid"?n=n.check(O.nanoid()):o==="cuid"?n=n.check(O.cuid()):o==="cuid2"?n=n.check(O.cuid2()):o==="ulid"?n=n.check(O.ulid()):o==="xid"?n=n.check(O.xid()):o==="ksuid"&&(n=n.check(O.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),i=n;break}case"number":case"integer":{let n=r==="integer"?O.number().int():O.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),i=n;break}case"boolean":{i=O.boolean();break}case"null":{i=O.null();break}case"object":{let n={},o=e.properties||{},a=new Set(e.required||[]),s=typeof e.additionalProperties=="object"?Ne(e.additionalProperties,t):void 0;for(let[d,m]of Object.entries(o)){let f=Ne(m,t);ke(n,d,a.has(d)?f:f.optional())}if(e.patternProperties){let d=e.patternProperties,m=Object.keys(d),f=[];for(let w of m){let D=Ne(d[w],t),A=O.string().regex(new RegExp(w));f.push(O.looseRecord(A,D))}let h=[];if(Object.keys(n).length>0&&h.push(O.object(n).passthrough()),h.push(...f),h.length===0)i=O.object({}).passthrough();else if(h.length===1)i=h[0];else{let w=O.intersection(h[0],h[1]);for(let D=2;D<h.length;D++)w=O.intersection(w,h[D]);i=w}if(e.additionalProperties===!1){let w=Object.keys(n),D=m.map(C=>new RegExp(C)),A=i;i=i.check(C=>{if(!Qe(C.value))return;let j=[];for(let W of Object.keys(C.value))w.includes(W)||D.some(K=>K.test(W))||j.push(W);j.length&&C.issues.push({code:"unrecognized_keys",keys:j,input:C.value,inst:A})})}}else{let d=O.object(n);e.additionalProperties===!1?i=d.strict():s?i=d.catchall(s):i=d.passthrough()}let c=e.propertyNames!==void 0&&e.propertyNames!==!0,l=typeof e.minProperties=="number"?e.minProperties:void 0,u=typeof e.maxProperties=="number"?e.maxProperties:void 0;if(c||l!==void 0||u!==void 0){let d;if(c){let m=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;d=Ne(m,t)}i=ID(i,{keySchema:d,minProperties:l,maxProperties:u})}break}case"array":{let n=e.prefixItems,o=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems=="number"?e.minItems:0,s=n.map(d=>Ne(d,t)),c=Hb(s,a),l=Array.isArray(o)?void 0:qb(o,t),u=O.tuple(c);i=l?u.rest(l):u,typeof e.minItems=="number"&&(i=i.check(O.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(O.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=typeof e.minItems=="number"?e.minItems:0,s=o.map(d=>Ne(d,t)),c=Hb(s,a),l=qb(e.additionalItems,t),u=O.tuple(c);i=l?u.rest(l):u,typeof e.minItems=="number"&&(i=i.check(O.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(O.maxLength(e.maxItems)))}else if(o!==void 0){let a=Ne(o,t),s=O.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=O.array(O.any());(e.uniqueItems===!0||e.contains!==void 0)&&(i=DD(i,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?Ne(e.contains,t):void 0,minContains:typeof e.minContains=="number"?e.minContains:void 0,maxContains:typeof e.maxContains=="number"?e.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${r}`)}return i}function Ne(e,t){if(typeof e=="boolean")return e?O.any():O.never();let r=Gb(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(l=>Ne(l,t)),c=O.union(s);r=i?O.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(l=>Ne(l,t)),c=O.xor(s);r=i?O.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:O.any();else{let s=i?r:Ne(e.allOf[0],t),c=i?0:1;for(let l=c;l<e.allOf.length;l++)s=O.intersection(s,Ne(e.allOf[l],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=O.nullable(r)),e.readOnly===!0&&(r=O.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of o)s in e&&(n[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(n[s]=e[s]);if(e.type==="object"&&e.$ref===void 0){e.propertyNames!==void 0&&!uo(e.propertyNames)&&(n.propertyNames=e.propertyNames);for(let s of["minProperties","maxProperties"])e[s]!==void 0&&(n[s]=e[s])}if(e.type==="array"&&e.$ref===void 0){e.contains!==void 0&&!uo(e.contains)&&(n.contains=e.contains);for(let s of["uniqueItems","minContains","maxContains"])e[s]!==void 0&&(n[s]=e[s])}for(let s of Object.keys(e))_D.has(s)||ke(n,s,e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function Xb(e,t){if(typeof e=="boolean")return e?O.any():O.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 i=xD(r,t?.defaultTarget),n=r.$defs||r.definitions||{},o={version:i,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??_e};return Ne(r,o)}var Yb=Symbol("z.visit/resolving");function po(e,t){let r=typeof t=="function"?t:(a,s)=>{let c=t[a._zod.def.type];return c?c(a,s):a},i=new Map;function n(a){let s=i.get(a);if(s===Yb)return new zi({type:"lazy",getter:()=>i.get(a)});if(s!==void 0)return s;i.set(a,Yb);let c=o(a),l=r(c,c!==a);return i.set(a,l),l}function o(a){let s=a._zod.def,c=s.type;switch(c){case"object":{let l=s.shape,u=Object.keys(l),d=!1,m={};for(let h of u){let w=n(l[h]);w!==l[h]&&(d=!0),m[h]=w}let f=s.catchall;return s.catchall&&(f=n(s.catchall),f!==s.catchall&&(d=!0)),d?te(a,{...s,shape:m,catchall:f}):a}case"array":{let l=n(s.element);return l===s.element?a:te(a,{...s,element:l})}case"tuple":{let l=s.items,u=!1,d=[];for(let f of l){let h=n(f);h!==f&&(u=!0),d.push(h)}let m=s.rest;return s.rest&&(m=n(s.rest),m!==s.rest&&(u=!0)),u?te(a,{...s,items:d,rest:m}):a}case"record":case"map":{let l=n(s.keyType),u=n(s.valueType);return l===s.keyType&&u===s.valueType?a:te(a,{...s,keyType:l,valueType:u})}case"set":{let l=n(s.valueType);return l===s.valueType?a:te(a,{...s,valueType:l})}case"union":{let l=s.options,u=!1,d=[];for(let m of l){let f=n(m);f!==m&&(u=!0),d.push(f)}return u?te(a,{...s,options:d}):a}case"intersection":{let l=n(s.left),u=n(s.right);return l===s.left&&u===s.right?a:te(a,{...s,left:l,right:u})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let l=n(s.innerType);return l===s.innerType?a:te(a,{...s,innerType:l})}case"pipe":{let l=n(s.in),u=n(s.out);return l===s.in&&u===s.out?a:te(a,{...s,in:l,out:u})}case"function":{let l=n(s.input),u=n(s.output);return l===s.input&&u===s.output?a:te(a,{...s,input:l,output:u})}case"lazy":{let l=s.getter,{_cachedInner:u,...d}=s;return te(a,{...d,getter:()=>n(l())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return a;default:return a}}return n(e)}function Qb(e){return po(e,{object:t=>t.partial(),union:t=>{let r=t._zod.def;return r.discriminator===void 0?t:Jr(r.options)}})}function TD(e,t){if(!t?.length)return e;let r=e._zod.def;return te(e,dt(r,{checks:[...r.checks??[],...t]}),{parent:!0})}function ew(e){return TD(e.out,e.checks)}function ED(e){return e.in._zod.traits.has("$ZodTransform")?ew(e):e.in}function tw(e){return po(e,{pipe:t=>ED(t._zod.def),default:(t,r)=>r?Vn(t._zod.def.innerType):t,catch:(t,r)=>r?t._zod.def.innerType:t})}function nw(e){return po(e,{pipe:t=>ew(t._zod.def),prefault:(t,r)=>r?t._zod.def.innerType:t})}var xf={};Et(xf,{bigint:()=>ND,boolean:()=>jD,date:()=>LD,number:()=>PD,string:()=>OD});function OD(e){return Jd(Mr,e)}function PD(e){return Gd(Vr,e)}function jD(e){return rp(Br,e)}function ND(e){return op(Fr,e)}function LD(e){return gp(to,e)}var Zn=80;function Vs(e){let t=e.trim().replace(/^[#\s]+/,"");return t||null}function rw(e){return`#${e}`}var UD=new Set(["discord.com","discordapp.com"]);function Sf(e){let t;try{t=new URL(e)}catch{return"custom"}let r=t.hostname.toLowerCase();return r==="hooks.slack.com"?"slack":(UD.has(r)||r.endsWith(".discord.com"))&&t.pathname.startsWith("/api/webhooks/")?"discord":"custom"}var Ce=p.uuid({message:"Invalid ID."}),Wn=p.string().transform(e=>e.toUpperCase()).pipe(p.enum(Yh,{message:"Unsupported country."})),Wr=p.string().transform(e=>e.toLowerCase()).pipe(p.enum(Qh,{message:"Unsupported language."})),Bs=p.string().trim().min(1,"Keyword can\u2019t be empty.").max(80,"Keywords can be at most 80 characters long.").refine(e=>e.split(/\s+/).length<=10,"Keywords can have at most 10 words.");function Cf(){return p.union([p.literal(""),p.null(),p.string().trim().max(500)]).transform(e=>e||null).refine(e=>e===null||/^https:\/\/[^\s/$.?#][^\s]*$/i.test(e),{message:"The webhook needs an https URL."}).refine(e=>{if(e===null)return!0;try{let t=new URL(e);return!t.username&&!t.password&&!["localhost","127.0.0.1","[::1]"].includes(t.hostname)}catch{return!1}},{message:"The webhook URL is invalid or points to a local target."})}var zD=Cf(),MD=Cf().refine(e=>e===null||Sf(e)==="slack",{message:"This isn\u2019t a Slack webhook URL. It starts with https://hooks.slack.com/."}),VD=Cf().refine(e=>e===null||Sf(e)==="discord",{message:"This isn\u2019t a Discord webhook URL. It starts with https://discord.com/api/webhooks/."}),iw=`The channel name can be at most ${Zn} characters long.`;function BD(e){return[...e].some(t=>{let r=t.charCodeAt(0);return r<32||r===127})}function ow(){return p.union([p.literal(""),p.null(),p.string().max(Zn*2,iw)]).transform(e=>e?Vs(e):null).refine(e=>e===null||e.length<=Zn,{message:iw}).refine(e=>e===null||!BD(e),{message:"The channel name can\u2019t contain line breaks or control characters."})}var FD=p.string().trim().min(3,"A prompt needs at least 3 characters.").max(500,"A prompt can be at most 500 characters long."),aw=p.coerce.number().int("Invalid location.").min(1e3,"Invalid location.").max(99999999,"Invalid location."),If=p.coerce.number().int().refine(e=>di.includes(e),{message:`Allowed values are ${di.join(", ")}.`}),qz=p.object({email:p.email("Enter a valid email address.").max(200),password:p.string().min(1,"Enter the password.").max(200)}),Af=p.string().trim().toLowerCase().max(200,"The email address is too long.").pipe(p.email("Enter a valid email address.")),sw=p.string().min(12,"The password must be at least 12 characters long.").max(200),cw=p.string().trim().min(32,"The link is invalid.").max(200,"The link is invalid."),Gz=p.object({name:p.string().trim().min(1,"Enter your name.").max(120),email:Af,password:sw,acceptTerms:p.literal(!0,{error:"Please accept the terms and the privacy policy."})}),Xz=p.object({token:cw}),Yz=p.object({email:Af}),Qz=p.object({token:cw,password:sw}),JD=["ordinary","extraordinary"],e4=p.object({email:Af,name:p.string().trim().min(1,"Enter your name.").max(120,"The name can be at most 120 characters long."),kind:p.enum(JD,{error:"Choose the type of cancellation."}),reason:p.string().trim().max(2e3,"The reason can be at most 2,000 characters long.").optional(),confirmed:p.literal(!0,{error:"Please confirm the cancellation."}),formToken:p.string().trim().min(1,"The form has expired. Please reload the page.").max(200,"The form has expired. Please reload the page."),website:p.string().max(200).default("")}).superRefine((e,t)=>{e.kind==="extraordinary"&&!e.reason&&t.addIssue({code:"custom",path:["reason"],message:"Please give the reason for the extraordinary cancellation."})}),Fs=p.object({limit:p.coerce.number().int().min(1).max(200).default(50),offset:p.coerce.number().int().min(0).default(0),q:p.string().trim().max(200).optional()}),lw=p.object({domain:p.string().trim().min(1,"Enter a domain.").max(300),name:p.string().trim().min(1).max(120).optional(),country:Wn.default("DE"),language:Wr.default("de")}),uw=p.object({name:p.string().trim().min(1).max(120),country:Wn,language:Wr,crawlMaxPages:p.coerce.number().int().min(1).max(Ye),rankDepth:If,rankDevice:p.enum(Sn),rankSchedule:p.enum(Do),rankScheduleHour:p.coerce.number().int().min(0).max(23),crawlSchedule:p.enum(Ro),renderMode:p.enum(To),aiOverviewTracking:p.boolean(),keywordMetricsAuto:p.boolean(),notificationWebhookUrl:zD,slackWebhookUrl:MD,discordWebhookUrl:VD,slackChannelLabel:ow(),discordChannelLabel:ow(),rankLocationCode:aw.nullable()}).partial(),dw=p.object({email:p.email().max(200),role:p.enum(["editor","viewer"]).default("viewer")}),$f={country:Wn.default("DE"),language:Wr.default("de"),limit:p.coerce.number().int().min(1).max(pi).default(Gc),projectId:Ce.optional(),refresh:p.boolean().optional()},pw=p.discriminatedUnion("mode",[p.object({mode:p.literal("keyword"),keyword:Bs,...$f}),p.object({mode:p.literal("list"),keywords:p.array(Bs).min(1,"Enter at least one keyword.").max($n,`At most ${$n} keywords per request.`),...$f}),p.object({mode:p.literal("domain"),domain:p.string().trim().min(3).max(253),...$f})]),mw=p.object({projectId:Ce,name:p.string().trim().min(1,"Enter a name.").max(100),description:p.string().trim().max(500).optional()}),fw=p.object({name:p.string().trim().min(1).max(100).optional(),description:p.string().trim().max(500).nullable().optional()}),hw=p.object({researchRunId:Ce.optional(),keywords:p.array(Bs).min(1).max(1e3)}),gw=p.object({csv:p.string().min(1,"The CSV file is empty.").max(2e6,"The CSV file is too large (max. 2 MB)."),fileName:p.string().trim().max(200).optional(),country:Wn.optional(),language:Wr.optional()}),yw=p.object({keywords:p.array(Bs).min(1,"Enter at least one keyword.").max(200),country:Wn.optional(),language:Wr.optional(),device:p.enum(Sn).optional(),locationCode:aw.nullable().optional()}),vw=p.object({country:Wn.default("DE"),q:p.string().trim().min(2,"Enter at least 2 characters.").max(100),limit:p.coerce.number().int().min(1).max(50).default(20)}),bw=p.object({domain:p.string().trim().min(3,"Enter a domain.").max(300)}),ww=p.object({email:p.string().trim().toLowerCase().max(200,"The email address is too long.").pipe(p.email("Enter a valid email address."))}),t4=p.object({recipientId:Ce.optional()}),n4=p.object({token:p.string().trim().regex(/^[a-f0-9]{48}$/,"The unsubscribe link is invalid.")}),kw=p.object({prompts:p.array(FD).min(1,"Enter at least one prompt.").max(jt),platform:p.enum(si).default("chat_gpt"),country:Wn.optional(),language:Wr.optional()}),_w=p.object({promptIds:p.array(Ce).max(jt).optional()}),r4=p.object({channel:p.enum(ai,{message:"Unknown target. Allowed values are slack, discord and custom."}).optional()}),xw=Fs.extend({projectId:Ce.optional(),unread:p.enum(["true","false"]).transform(e=>e==="true").optional()}),Sw=p.object({crawlId:Ce.optional(),baseCrawlId:Ce.optional()}),$w=p.object({maxPages:p.coerce.number().int().min(1).max(Ye).optional()}),Iw=p.object({keywordIds:p.array(Ce).max(500).optional()}),Cw=p.object({issueCode:p.string().trim().max(64).optional(),crawlId:Ce.optional(),title:p.string().trim().min(1).max(200).optional(),description:p.string().trim().max(5e3).optional(),priority:p.enum(qt).optional(),urls:p.array(p.string().trim().max(2048)).max(1e3).optional()}).refine(e=>!!e.title||!!e.issueCode,{message:"Enter a title or select an issue.",path:["title"]}),Aw=p.object({title:p.string().trim().min(1).max(200).optional(),description:p.string().trim().max(5e3).nullable().optional(),status:p.enum(or).optional(),priority:p.enum(qt).optional(),urls:p.array(p.string().trim().max(2048)).max(1e3).optional()}),i4=Fs.extend({status:p.enum(or).optional(),priority:p.enum(qt).optional()}),o4=p.object({crawlId:Ce.optional(),severity:p.enum($o).optional(),category:p.string().max(40).optional(),q:p.string().trim().max(200).optional()}),Dw=Fs.extend({crawlId:Ce.optional(),status:p.enum(["ok","redirect","client_error","server_error","failed","blocked"]).optional()}),a4=Fs.extend({projectId:Ce.optional(),status:p.enum(Co).optional(),type:p.enum(ii).optional()}),s4=p.object({days:p.coerce.number().int("The period must be a whole number of days.").min(1,"The period must be at least 1 day.").max(ir,`The period can be at most ${ir} days long.`).default(Ao),limit:p.coerce.number().int().min(1).max(200).default(50),offset:p.coerce.number().int().min(0).default(0)}),Rw=p.object({type:p.enum(Oo),format:p.enum(Po).default("csv"),crawlId:Ce.optional(),listId:Ce.optional()}),Tw=p.object({name:p.string().trim().min(1,"Enter a name.").max(80),scopes:p.array(p.enum(rr)).min(1,"Choose at least one permission."),projectIds:p.array(Ce).max(100).nullable().optional(),expiresInDays:p.coerce.number().int().min(1).max(365).nullable().optional()}),c4=p.object({clientName:p.string().trim().max(100).optional()}),l4=p.object({deviceCode:p.string().min(10).max(200)}),u4=p.object({userCode:p.string().trim().transform(e=>e.toUpperCase().replace(/[^A-Z0-9]/g,"")).pipe(p.string().length(8,"The code has 8 characters.")),approve:p.boolean(),scopes:p.array(p.enum(rr)).min(1).optional()}),d4=p.object({email:p.email().max(200),name:p.string().trim().min(1).max(120),password:p.string().min(12,"The password must be at least 12 characters long.").max(200),role:p.enum(["admin","member"]).default("member")}),p4=p.object({currentPassword:p.string().min(1).max(200),newPassword:p.string().min(12,"The password must be at least 12 characters long.").max(200)}),m4=p.object({password:p.string().min(1,"Enter your password.").max(200)}),Ew=p.object({name:p.string().trim().min(1,"Enter a name.").max(120,"The name can be at most 120 characters long."),email:p.string().trim().toLowerCase().max(200,"The email address can be at most 200 characters long.").pipe(p.email("Enter a valid email address."))}).partial().refine(e=>e.name!==void 0||e.email!==void 0,{message:"Enter a name or an email address."}),ZD=p.enum(ar,{message:"Unknown provider. Allowed values are google and bing."}),f4=p.object({apiKey:p.string().trim().min(16,"The API key is too short.").max(200,"The API key is too long."),siteUrl:p.string().trim().max(500).optional()}),h4=p.object({siteUrl:p.string().trim().min(1,"Select a property.").max(500)}),g4=p.object({provider:ZD,dimension:p.enum(Eo).default("query"),days:p.coerce.number().int().refine(e=>e===7||e===28||e===90,"Allowed values are 7, 28 or 90 days.").default(28),limit:p.coerce.number().int().min(1).max(500).default(100)}),Js=p.string().trim().max(300).refine(e=>{try{let t=new URL(e);return t.protocol==="https:"&&!t.username&&!t.password&&t.pathname.replace(/\/+$/,"")===""&&!t.search&&!t.hash}catch{return!1}},"Enter the base URL with https:// and no path, e.g. https://analytics.example.com.").transform(e=>new URL(e).origin),mo=p.string().trim().min(16,"The API key is too short.").max(300,"The API key is too long."),WD=p.enum(li,{message:"Unknown provider. Allowed values are posthog, plausible and google_analytics."}),y4=p.object({host:p.union([p.enum(["eu","us"]),Js]).default("eu"),projectId:p.string().trim().regex(/^\d{1,20}$/,"The PostHog project ID consists of digits only."),apiKey:mo}),v4=p.object({siteId:p.string().trim().toLowerCase().min(3).max(253).regex(/^[a-z0-9.-]+\.[a-z]{2,}$/,"The site ID is the domain as entered in Plausible, e.g. example.com."),host:Js.optional(),apiKey:mo}),b4=p.object({propertyId:p.string().trim().regex(/^\d{1,20}$/,"The property ID consists of digits only.")}),w4=p.object({provider:WD,days:p.coerce.number().int().refine(e=>e===7||e===28||e===90,"Allowed values are 7, 28 or 90 days.").default(28)}),k4=p.enum(ui,{message:"Unknown integration. Allowed values are google, bing, posthog and plausible."}),_4=p.object({apiKey:mo}),x4=p.object({host:p.union([p.enum(["eu","us"]),Js]).default("eu"),apiKey:mo}),S4=p.object({host:Js.optional(),apiKey:mo}),Ow=p.discriminatedUnion("operation",[p.object({operation:p.literal("rankCheck"),params:p.object({keywordCount:p.number().int().min(0).max(mi),depth:If,queued:p.boolean().optional()})}),p.object({operation:p.literal("aiCheck"),params:p.object({promptCount:p.number().int().min(0).max(jt),aiOverview:p.boolean().optional()})}),p.object({operation:p.literal("keywordResearch"),params:p.object({mode:p.enum(["keyword","domain","list"]),keywordCount:p.number().int().min(0).max($n).optional(),limit:p.number().int().min(1).max(pi).optional()})}),p.object({operation:p.literal("keywordListRefresh"),params:p.object({keywordCount:p.number().int().min(0).max(Yt),taskCount:p.number().int().min(0).max(Yt).optional()})}),p.object({operation:p.literal("keywordMetrics"),params:p.object({keywordCount:p.number().int().min(0).max(mi),taskCount:p.number().int().min(0).max(mi).optional()})}),p.object({operation:p.literal("crawl"),params:p.object({maxPages:p.number().int().min(0).max(Ye)})}),p.object({operation:p.literal("monitoring"),params:p.object({keywordCount:p.number().int().min(0).max(mi),rankDepth:If,promptCount:p.number().int().min(0).max(jt),aiOverview:p.boolean().optional(),queued:p.boolean().optional()})})]),$4=p.object({plan:p.enum(nr)}),I4=p.object({limit:p.coerce.number().int().min(1).max(100).default(50),offset:p.coerce.number().int().min(0).default(0)});function Pw(e){return e>=90?"Excellent":e>=75?"Good":e>=50?"Needs work":"Critical"}var O4=new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:qh});var jw=["rankCheck","aiCheck","keywordResearch","keywordListRefresh","keywordMetrics","crawl","monitoring"];var Nw="2026-10-c";var N4={"2026-10-a":1.1186,"2026-10-b":1.1186,[Nw]:1.1186};var HD=["mobile","desktop"],KD=["domcontentloaded","load","networkidle"];var Df={minTimeoutMs:2e3,defaultTimeoutMs:3e4,maxTimeoutMs:6e4,maxParallelPages:2,maxHtmlBytes:5*1024*1024,maxConsoleErrors:20,maxResources:300};var J4=p.object({url:p.string().trim().min(8).max(2048),userAgent:p.string().trim().min(1).max(500),locale:p.string().trim().regex(/^[a-z]{2,3}(-[A-Z]{2})?$/,"Use a locale like en-US.").optional(),viewport:p.enum(HD).default("mobile"),timeoutMs:p.number().int().min(Df.minTimeoutMs).max(Df.maxTimeoutMs).default(Df.defaultTimeoutMs),waitUntil:p.enum(KD).default("load")});var Lw=["lcp","inp","cls"],Rf={lcp:{good:2500,poor:4e3,unit:"ms"},inp:{good:200,poor:500,unit:"ms"},cls:{good:.1,poor:.25,unit:"score"}};function Tf(e,t){let r=Rf[e];return t>r.poor?"poor":t>r.good?"needs_improvement":"good"}var Zs=["strikingDistance","lowCtr","missingPage","cannibalization","conversionGap","underusedConverter","technicalBlocker","competitorGap"],Ef={strikingDistance:"Almost on page 1",lowCtr:"Low click-through rate",missingPage:"Missing page",cannibalization:"Competing pages",conversionGap:"Visitors who don\u2019t convert",underusedConverter:"Strong page with low reach",technicalBlocker:"Technical blocker",competitorGap:"Competitor ahead"},Ws=["open","accepted","dismissed","done","stale"],Uw=["open","accepted","dismissed","done"],Hs={open:"Open",accepted:"Accepted",dismissed:"Dismissed",done:"Done",stale:"Stale"};var Of={low:"Low",medium:"Medium",high:"High"};var Pf={small:"Small",medium:"Medium",large:"Large"};var zw={dataForSeo:"DataForSEO",searchConsole:"Google Search Console",posthog:"PostHog",plausible:"Plausible",googleAnalytics:"Google Analytics 4",codebase:"Codebase snapshot",crawl:"Website crawl"};var Mw=2*1024*1024,pn=2e3,fo=5e3,Ks=1;var qs=500;var Vw=["nextjs","unknown"],Bw=["app","pages","both"],Fw=["static","build","none"];var X4=p.object({events:p.array(p.string().trim().min(1,"An event name can\u2019t be empty.").max(200,"An event name is too long.")).max(10,`Choose at most ${10} events.`).transform(e=>[...new Set(e)])}),Y4=p.object({days:p.coerce.number().int().refine(e=>e===7||e===28||e===90,"Allowed values are 7, 28 or 90 days.").default(28),limit:p.coerce.number().int().min(1).max(500).default(100),provider:p.enum(["posthog","plausible","google_analytics"]).optional()});var GD=/^\/[\p{L}\p{N}\-._~%:[\]/]*$/u,jf=/^(?![A-Za-z]:)(?!\/)(?!(?:.*\/)?\.\.(?:\/|$))[^\\\u0000-\u001f]+$/,XD=/^[^\s\u0000-\u001f]+$/,Hr=e=>p.string().max(e).nullable(),mn=(e,t)=>p.array(p.string().max(t)).max(e),YD=p.object({route:p.string().min(1).max(500).regex(GD,"Invalid route."),sourceFile:p.string().min(1).max(500).regex(jf,"Invalid file path."),dynamic:p.boolean(),metadataSource:p.enum(Fw),title:Hr(300),description:Hr(600),canonical:Hr(2048),robots:Hr(200),h1:mn(20,300),h2:mn(50,300),structuredDataTypes:mn(30,100),internalLinks:mn(500,2048).refine(e=>e.every(t=>XD.test(t)),"Invalid internal link."),wordCount:p.number().int().min(0).max(5e6).nullable(),textExcerpt:p.string().max(qs).optional()}),QD=p.object({userAgent:p.string().min(1).max(200),allow:mn(200,500),disallow:mn(200,500)}),eR=p.object({schemaVersion:p.literal(Ks),generatedAt:p.iso.datetime({offset:!0}),cliVersion:p.string().min(1).max(40),git:p.object({commit:p.string().max(64).nullable(),branch:p.string().max(200).nullable(),dirty:p.boolean()}).nullable(),framework:p.object({name:p.enum(Vw),version:p.string().max(40).nullable(),router:p.enum(Bw).nullable()}),routes:p.array(YD).max(pn),sitemap:p.object({source:p.enum(["none","file","generator"]),urls:mn(fo,2048)}),robots:p.object({source:p.enum(["none","file","generator"]),rules:p.array(QD).max(50)}),product:p.object({name:Hr(200),description:Hr(1e3),readmeHeadings:mn(40,200)}),stats:p.object({filesScanned:p.number().int().min(0).max(1e7),routeCount:p.number().int().min(0).max(pn),durationMs:p.number().int().min(0).max(864e5)})});function tR(e){return new Set(e.routes.map(t=>t.route)).size===e.routes.length}var Zw=eR.refine(tR,{message:"Each route can only appear once.",path:["routes"]});var nR=[/-----BEGIN [A-Z ]*PRIVATE KEY-----/,/\bAKIA[0-9A-Z]{16}\b/,/\bASIA[0-9A-Z]{16}\b/,/\b(?:sk|rk|pk)_(?:live|test)_[A-Za-z0-9]{16,}\b/,/\bghp_[A-Za-z0-9]{30,}\b/,/\bgithub_pat_[A-Za-z0-9_]{40,}\b/,/\bglpat-[A-Za-z0-9_-]{20,}\b/,/\bxox[abprs]-[A-Za-z0-9-]{10,}\b/,/\bAIza[0-9A-Za-z_-]{35}\b/,/\bvsk_[A-Za-z0-9_]{16,}\b/,/\beyJ[A-Za-z0-9_-]{10,}\.eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/,/\bpostgres(?:ql)?:\/\/[^\s:@/]+:[^\s@/]+@/i,/\b(?:api[_-]?key|secret|password|passwd|token)\s*[:=]\s*["'][^"'\s]{12,}["']/i];function fn(e){return nR.some(t=>t.test(e))}function Gs(e,t=0){if(t>8)return null;if(typeof e=="string")return fn(e)?e.slice(0,40):null;if(Array.isArray(e)){for(let r of e){let i=Gs(r,t+1);if(i!==null)return i}return null}if(e!==null&&typeof e=="object")for(let r of Object.values(e)){let i=Gs(r,t+1);if(i!==null)return i}return null}var sM=p.object({limit:p.coerce.number().int().min(1).max(200).default(50),offset:p.coerce.number().int().min(0).default(0),status:p.enum([...Ws,"active"],{message:"Unknown status. Allowed values are open, accepted, dismissed, done, stale and active."}).optional(),rule:p.enum(Zs,{message:"Unknown rule."}).optional(),q:p.string().trim().max(200).optional()}),Ww=p.object({status:p.enum(Uw,{message:"Allowed values are open, accepted, dismissed and done."})}),cM=p.object({limit:p.coerce.number().int().min(1).max(100).default(20),offset:p.coerce.number().int().min(0).default(0)});var pM=8*1024,mM=1440*60;var Xs=1e5;var Hw=p.object({allowed:p.boolean().optional(),dailyCapCredits:p.number().int("The daily limit must be a whole number.").min(1,"The daily limit must be at least 1 credit.").max(Xs,`The daily limit can be at most ${Xs.toLocaleString("en-GB")} credits.`).nullable().optional()}).refine(e=>e.allowed!==void 0||e.dailyCapCredits!==void 0,{message:"Provide at least one setting."}),fM=p.object({clientId:p.string().trim().min(1).max(2e3),redirectUri:p.string().trim().min(1).max(2e3),codeChallenge:p.string().regex(/^[A-Za-z0-9_-]{43}$/,"Invalid PKCE code challenge."),codeChallengeMethod:p.literal("S256"),state:p.string().max(2e3).optional(),scope:p.string().max(500).optional(),resource:p.string().trim().max(2e3).optional(),workspaceId:p.uuid({message:"Invalid workspace."}),approve:p.boolean(),csrfToken:p.string().trim().min(32).max(128)});var P={ok:0,unexpected:1,usage:2,unauthorized:3,forbidden:4,notFound:5,conflict:6,provider:7,jobFailed:8,unreachable:9,waitTimeout:10,interrupted:130},z=class extends Error{code;exitCode;hint;details;constructor(t,r,i,n={}){super(r),this.name="CliError",this.code=t,this.exitCode=i,this.hint=n.hint??null,this.details=n.details}};function E(e,t){return new z("usage_error",e,P.usage,{hint:t})}var xe=class extends z{status;apiCode;constructor(t,r,i,n,o){super(r,i,iR(t,r),{details:n,hint:o}),this.name="ApiError",this.status=t,this.apiCode=r}},rR=new Set(["rate_limited","budget_exceeded","provider_error","provider_not_configured"]);function iR(e,t){return t==="validation_error"||t==="bad_request"?P.usage:e===401||t==="unauthorized"||t==="expired_token"||t==="access_denied"?P.unauthorized:e===403||t==="forbidden"?P.forbidden:e===404||t==="not_found"?P.notFound:e===409||t==="conflict"||e===402||t==="insufficient_credits"?P.conflict:e===429||e===502||e===503||rR.has(t)?P.provider:e===400?P.usage:P.unexpected}function Kw(e){switch(e){case 400:return"bad_request";case 401:return"unauthorized";case 403:return"forbidden";case 404:return"not_found";case 409:return"conflict";case 402:return"insufficient_credits";case 429:return"rate_limited";case 500:return"internal_error";default:return`http_${e}`}}function qw(e){return e instanceof z}var oR=new Intl.DateTimeFormat("en-GB",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),Xw=new Intl.NumberFormat("en-GB",{maximumFractionDigits:0}),aR=new Intl.NumberFormat("en-GB",{minimumFractionDigits:2,maximumFractionDigits:2}),Nf=new Intl.NumberFormat("en-GB",{minimumFractionDigits:1,maximumFractionDigits:1}),sR=new Intl.NumberFormat("en-GB",{minimumFractionDigits:2,maximumFractionDigits:4}),R="-";function I(e){if(!e)return R;let t=new Date(e);return Number.isNaN(t.getTime())?e:oR.format(t)}function b(e){return e==null?R:Xw.format(e)}function Y(e,t=2){return e==null?R:(t===1?Nf:aR).format(e)}function Ae(e){return e==null?R:`${sR.format(e)} USD`}function Le(e,t){return`${e.toUpperCase()}/${t.toLowerCase()}`}function Hn(e,t){return`${eg(e)} (${e.toUpperCase()}), ${tg(t)} (${t.toLowerCase()})`}function Ys(e){return e?`${e.error} E / ${e.warning} W / ${e.notice} N`:R}function Vt(e){return e?`${e.error} errors, ${e.warning} warnings, ${e.notice} notices`:R}var Kn={queued:"Queued",running:"Running",completed:"Completed",failed:"Failed",cancelled:"Cancelled"},Yw={seed:"Seed",suggestion:"Suggestion",related:"Related",site:"Domain",input:"Input"},Gw={LOW:"low",MEDIUM:"medium",HIGH:"high"};function Qs(e,t){if(e===null&&t===null)return R;let r=[];return e!==null&&r.push(Y(e)),t&&r.push(e!==null?`(${Gw[t]})`:Gw[t]),r.join(" ")}function ec(e,t){if(!e)return R;let r=Hh[e]??e;return t==="estimate"?`${r} (estimate)`:r}function ho(e){return e?e.status==="error"?"check failed":e.position===null?`not in top ${e.depth}`:String(e.position):"not checked yet"}function tc(e){if(e.change!==null&&e.change!==void 0)return e.change>0?`+${e.change}`:e.change<0?String(e.change):"0";let{latest:t,previous:r}=e;if(t?.status==="ok"&&r?.status==="ok"){if(t.position!==null&&r.position===null)return"new in top N";if(t.position===null&&r.position!==null)return"dropped out of top N"}return R}function ge(e){return e?"yes":"no"}var go=Mh;function Lf(e){return e==null?R:ge(e)}function ft(e){return e==null?R:`${e}/100 (${Pw(e)})`}function yo(e,t){if(e==null||t===null||t===void 0)return R;let r=t-e;return r>0?`+${r}`:String(r)}function nc(e){return!e||e.present===null?R:e.present?e.cited===!0?"cited":e.cited===!1?"not cited":R:"no AI Overview"}function rc(e,t){let r=Bh[e]??e;return e==="manual"?r:`${r} at ${t}:00`}function ic(e,t){let r=Fh[e]??e;return e==="weekly"&&t!==void 0?`${r}, Mondays at ${t}:00`:r}function hn(e){if(!e)return"none";try{return`configured (${new URL(e).host})`}catch{return"configured"}}function Uf(e){return e===null?"not in top N":String(e)}function Kr(e){return e==null?R:`${b(e)} ms`}function oc(e){if(e==null)return R;if(e<1e3)return`${b(e)} ms`;let t=Math.round(e/1e3);return t<60?`${t} s`:`${Math.floor(t/60)} min ${t%60} s`}function qr(e){return e?rw(e):null}function Se(e,t,r){return`${b(e)} ${e===1?t:r}`}function Gr(e){return Jh[e]??e}function zf(e){return e==null||!Number.isFinite(e)||e<0?R:e>=1024*1024?`${Nf.format(e/(1024*1024))} MB`:e>=1024?`${Nf.format(e/1024)} KB`:`${Xw.format(e)} bytes`}function ac(e){return e==null?"not checked":e>=200&&e<300?`present (HTTP ${e})`:e===404||e===410?`not present (HTTP ${e})`:`not reachable (HTTP ${e})`}var Mf=3e4;function cR(e){if(!e)return"";let t=new URLSearchParams;for(let[i,n]of Object.entries(e))n==null||n===""||t.set(i,String(n));let r=t.toString();return r?`?${r}`:""}var Qw={ECONNREFUSED:"connection refused",ENOTFOUND:"hostname not found",EAI_AGAIN:"DNS lookup failed",ECONNRESET:"connection reset",EHOSTUNREACH:"host unreachable",ENETUNREACH:"network unreachable",ETIMEDOUT:"connection timed out",UND_ERR_CONNECT_TIMEOUT:"connection timed out",UND_ERR_SOCKET:"connection reset",CERT_HAS_EXPIRED:"TLS certificate expired",DEPTH_ZERO_SELF_SIGNED_CERT:"self-signed TLS certificate",SELF_SIGNED_CERT_IN_CHAIN:"self-signed TLS certificate in the chain",UNABLE_TO_VERIFY_LEAF_SIGNATURE:"TLS certificate cannot be verified",ERR_TLS_CERT_ALTNAME_INVALID:"TLS certificate does not match the hostname"};function lR(e){let t=e;for(let r=0;r<4&&t;r++){let i=t.code;if(typeof i=="string"&&Qw[i])return Qw[i];if(t.message==="bad port")return"port is blocked for security reasons";t=t.cause}return"network error"}function uR(e){let t=e/1e3;return Number.isInteger(t)?`${t} s`:`${t.toFixed(1)} s`}var cc=class{baseUrl;token;timeoutMs;fetchImpl;userAgent;log;unauthorizedHint;constructor(t){this.baseUrl=t.baseUrl.replace(/\/+$/,""),this.token=t.token??null,this.timeoutMs=t.timeoutMs??Mf,this.fetchImpl=t.fetch??globalThis.fetch.bind(globalThis),this.userAgent=t.userAgent??"serpel",this.log=t.log??(()=>{}),this.unauthorizedHint=t.unauthorizedHint}get hasToken(){return this.token!==null}url(t,r){return`${this.baseUrl}/api/v1${t}${cR(r)}`}async send(t,r,i,n){let o=this.url(r,i.query),a={Accept:n,"User-Agent":this.userAgent};i.auth!==!1&&this.token&&(a.Authorization=`Bearer ${this.token}`),i.idempotencyKey&&(a["Idempotency-Key"]=i.idempotencyKey);let s;i.body!==void 0&&(a["Content-Type"]="application/json",s=JSON.stringify(i.body));let c=Date.now(),l=i.timeoutMs??this.timeoutMs;this.log(`> ${t} ${o}`);let u;try{u=await this.fetchImpl(o,{method:t,headers:a,body:s,redirect:"manual",signal:AbortSignal.timeout(l)})}catch(d){throw this.networkError(d,l)}if(this.log(`< ${u.status} ${u.statusText} (${Date.now()-c} ms)`),u.status>=300&&u.status<400){let d=u.headers.get("location");throw await u.body?.cancel().catch(()=>{}),new z("unexpected_redirect",`The API redirects ${d?`to ${d} `:""}(HTTP ${u.status}). Please check the API URL.`,P.unreachable,{hint:"Show the current setting: serpel config get api-url"})}if(!u.ok)throw await this.errorFromResponse(u);return u}networkError(t,r=this.timeoutMs){let i=t?.name;return i==="TimeoutError"||i==="AbortError"?new z("timeout",`The API at ${this.baseUrl} did not respond within ${uR(r)}.`,P.unreachable,{hint:"Try again later or check the API URL (serpel config get api-url)."}):new z("network_error",`API unreachable at ${this.baseUrl}: ${lR(t)}.`,P.unreachable,{hint:"Check the API URL and your network connection (serpel config get api-url)."})}async errorFromResponse(t){let r="";try{r=await t.text()}catch{r=""}let i=null;try{i=r?JSON.parse(r):null}catch{i=null}let n=t.status,o=i&&typeof i.error=="object"&&i.error?i.error:null,a=typeof o?.code=="string"?o.code:Kw(n),s=typeof o?.message=="string"&&o.message.trim()?o.message.trim():`Unexpected response from the API (HTTP ${n}${t.statusText?` ${t.statusText}`:""}).`,c;return n===401&&(c=this.unauthorizedHint),n===403&&(c="The token lacks the required permission (scope) or access to this project."),!o&&n===404&&(s=`Endpoint not found (HTTP 404): ${t.url||this.baseUrl}.`,c="Is the API URL correct? Show it with: serpel config get api-url"),new xe(n,a,s,o?.details,c)}async parseJson(t){if(t.status===204)return;let r=await t.text();if(r)try{return JSON.parse(r)}catch{throw new z("invalid_response","The API response is not valid JSON.",P.unexpected,{hint:"Is the API URL correct? Show it with: serpel config get api-url"})}}async request(t,r,i={}){let n=await this.send(t,r,i,"application/json");try{let o=await this.parseJson(n);return{status:n.status,body:o,headers:n.headers}}catch(o){throw o instanceof z?o:this.networkError(o)}}async get(t,r){let i=await this.request("GET",t,{query:r});return sc(i.body)}async list(t,r){let n=(await this.request("GET",t,{query:r})).body;if(!n||!Array.isArray(n.data))throw new z("invalid_response","The API did not return a list.",P.unexpected);let o=n.pagination??{limit:n.data.length,offset:0,total:n.data.length};return{data:n.data,pagination:o}}async post(t,r,i={}){let n=await this.request("POST",t,{...i,body:r??{}});return sc(n.body)}async postWithStatus(t,r){let i=await this.request("POST",t,{body:r??{}});return{status:i.status,data:sc(i.body)}}async patch(t,r){let i=await this.request("PATCH",t,{body:r});return sc(i.body)}async delete(t){await this.request("DELETE",t)}async download(t,r){let i=await this.send("GET",t,{query:r},"*/*");try{let n=new Uint8Array(await i.arrayBuffer());return{status:i.status,bytes:n,contentType:i.headers.get("content-type"),fileName:dR(i.headers.get("content-disposition"))}}catch(n){throw this.networkError(n)}}};function sc(e){return e&&typeof e=="object"&&"data"in e?e.data:e}function dR(e){if(!e)return null;let t=/filename\*\s*=\s*(?:UTF-8'')?([^;]+)/i.exec(e);if(t?.[1])try{return decodeURIComponent(t[1].trim().replace(/^"|"$/g,""))}catch{}return/filename\s*=\s*"?([^";]+)"?/i.exec(e)?.[1]?.trim()??null}var pR="https://serpel.app",lc={option:"Option --api-url",env:"Environment variable SERPEL_API_URL",config:"Config file",default:"Default value"},mR=new Set(["localhost","127.0.0.1","[::1]","::1"]);function vo(e){let t=e.trim();if(!t)throw E("The API URL must not be empty.");let r;try{r=new URL(t)}catch{throw E(`"${t}" is not a valid URL. Example: https://seo.example.com`)}if(r.protocol!=="https:"&&r.protocol!=="http:")throw E(`The API URL must start with https:// (found: ${r.protocol}).`);if(r.protocol==="http:"&&!mR.has(r.hostname.toLowerCase()))throw E("Unencrypted http:// is only allowed for localhost, 127.0.0.1 and [::1]. Please use https://.");if(r.username||r.password)throw E("Credentials in the API URL are not allowed.");if(r.search||r.hash)throw E("The API URL must not contain query parameters or fragments.");let i=r.pathname.replace(/\/+$/,"");return i=i.replace(/\/api\/v1$/i,""),`${r.protocol}//${r.host}${i}`}function ek(e,t,r){if(e!==void 0&&e!=="")return{url:vo(e),source:"option"};let i=t.SERPEL_API_URL;return i!==void 0&&i.trim()!==""?{url:vo(i),source:"env"}:r?{url:vo(r),source:"config"}:{url:pR,source:"default"}}import Xr from"node:fs";import gn from"node:path";function tk(e,t,r){let i=e.SERPEL_CONFIG_DIR?.trim();if(i)return gn.resolve(i);if(t==="win32"){let a=e.APPDATA?.trim()||gn.join(r,"AppData","Roaming");return gn.join(a,"serpel")}let n=e.XDG_CONFIG_HOME?.trim(),o=n&&gn.isAbsolute(n)?n:gn.join(r,".config");return gn.join(o,"serpel")}function dc(e,t,r){Xr.mkdirSync(gn.dirname(e),{recursive:!0,mode:448});let i=`${e}.${process.pid}.${Date.now()}.tmp`;try{Xr.writeFileSync(i,t,{encoding:"utf8",mode:r}),Xr.renameSync(i,e)}catch(n){throw Xr.rmSync(i,{force:!0}),n}try{Xr.chmodSync(e,r)}catch{}}var uc=class{dir;file;constructor(t){this.dir=t,this.file=gn.join(t,"config.json")}load(){let t;try{t=Xr.readFileSync(this.file,"utf8")}catch(r){if(r.code==="ENOENT")return{};throw new z("config_unreadable",`The configuration ${this.file} cannot be read.`,P.unexpected)}try{let r=JSON.parse(t.charCodeAt(0)===65279?t.slice(1):t);if(!r||typeof r!="object"||Array.isArray(r))throw new Error("not an object");return r}catch{throw new z("config_invalid",`The configuration ${this.file} is not valid JSON.`,P.unexpected,{hint:"Fix or delete the file and set the API URL again."})}}save(t){dc(this.file,`${JSON.stringify(t,null,2)}
|
|
89
|
+
`,384)}update(t){let r=this.load();return t(r),this.save(r),r}account(t){return this.load().accounts?.[t]??null}setAccount(t,r){this.update(i=>{i.accounts={...i.accounts??{},[t]:r}})}removeAccount(t){let r=this.load();r.accounts?.[t]&&(delete r.accounts[t],this.save(r))}};var Bf=ES(ik(),1);function ok(e,t,r){return!r||e.NO_COLOR!==void 0&&e.NO_COLOR!==""?!1:e.FORCE_COLOR!==void 0&&e.FORCE_COLOR!=="0"&&e.FORCE_COLOR!=="false"?!0:e.TERM==="dumb"?!1:!!t.isTTY}var Yr=class{constructor(t,r,i,n,o=new Set){this.stdout=t;this.stderr=r;this.secrets=o,this.json=n.json,this.verbose=n.verbose,this.c=Bf.default.createColors(!n.json&&ok(i,t,n.color)),this.errColors=Bf.default.createColors(ok(i,r,n.color))}stdout;stderr;json;verbose;c;errColors;secrets;addSecret(t){t&&t.length>=6&&this.secrets.add(t)}redact(t){let r=t;for(let i of this.secrets)r=r.split(i).join("***");return r}line(t=""){this.stdout.write(`${this.redact(t)}
|
|
90
|
+
`)}raw(t){this.stdout.write(this.redact(t))}info(t){this.stderr.write(`${this.redact(t)}
|
|
91
|
+
`)}hint(t){this.stderr.write(`${this.errColors.dim(this.redact(t))}
|
|
92
|
+
`)}warn(t){this.stderr.write(`${this.errColors.yellow("Warning:")} ${this.redact(t)}
|
|
93
|
+
`)}debug(t){this.verbose&&this.stderr.write(`${this.errColors.dim(this.redact(t))}
|
|
94
|
+
`)}printJson(t){this.stdout.write(`${this.redact(JSON.stringify(t,null,2))}
|
|
95
|
+
`)}errorJson(t,r,i){let n={code:t,message:r};i!==void 0&&(n.details=i),this.printJson({error:n})}errorText(t,r,i=[]){this.stderr.write(`${this.errColors.red("Error:")} ${this.redact(t)}
|
|
96
|
+
`);for(let n of i)this.stderr.write(` ${this.redact(n)}
|
|
97
|
+
`);r&&this.stderr.write(`${this.errColors.dim(this.redact(r))}
|
|
98
|
+
`)}heading(t){this.line(this.c.bold(t))}fields(t){let r=t.filter(([,n])=>n!=null&&n!==""),i=Math.max(0,...r.map(([n])=>n.length));for(let[n,o]of r)this.line(`${this.c.dim(`${n}:`.padEnd(i+1))} ${o}`)}table(t,r){let i=r.map(s=>t.map(c=>vR(yR(c.value(s)),c.max??60))),n=t.map((s,c)=>Math.max(s.header.length,...i.map(l=>(l[c]??"").length))),o=(s,c)=>t[c]?.align==="right"?s.padStart(n[c]??0):s.padEnd(n[c]??0),a=t.map((s,c)=>o(s.header,c)).join(" ");this.line(this.c.bold(a.trimEnd())),r.forEach((s,c)=>{let l=t.map((u,d)=>{let m=o(i[c]?.[d]??"",d);return u.color?u.color(m,s):m}).join(" ");this.line(l.trimEnd())})}paginationHint(t,r,i){let{offset:n,total:o,limit:a}=t;if(o===0||r===0||n===0&&r>=o)return;let s=n+1,c=n+r,l=`Showing ${s} to ${c} of ${o} entries.`;if(c<o){let u=i!==void 0?i+1:Math.floor(n/Math.max(1,a))+2;l+=` Use --page ${u} or --offset ${c} for more entries.`}this.hint(l)}};function yR(e){return e.replace(/[\r\n\t]+/g," ")}function vR(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-3))}...`}import Ff from"node:fs";import bR from"node:path";var Jf="serpel",nt="SERPEL_TOKEN";function hc(e){let t=(e??"").trim().toLowerCase();if(t===""||t==="auto")return"auto";if(t==="keyring"||t==="file")return t;throw new z("usage_error",`Invalid value for SERPEL_TOKEN_STORAGE: "${e}". Allowed values are auto, keyring and file.`,P.usage)}function wR(e){return e==="win32"?"Windows Credential Manager":e==="darwin"?"macOS Keychain":"System keyring (Secret Service)"}var fc=class{constructor(t){this.options=t;this.credentialsFile=bR.join(t.configDir,"credentials.json")}options;credentialsFile;keyringPromise=null;describe(t,r){return t==="keyring"?`${wR(this.options.platform)} (service ${Jf}, account ${r})`:this.credentialsFile}entry(t,r){return this.options.platform==="linux"?new t.Entry(Jf,r,{linux:{store:"secret-service"}}):new t.Entry(Jf,r)}keyring(){return this.options.mode==="file"?Promise.resolve(null):(this.keyringPromise??=this.options.loadKeyring().catch(()=>null),this.keyringPromise)}async save(t,r){let i="the @napi-rs/keyring package is not installed or not available for this platform",n=await this.keyring();if(n)try{let o=this.entry(n,t);if(o.setPassword(r),o.getPassword()!==r)throw new Error("read-back failed");return this.removeFromFile(t),{storage:"keyring",location:this.describe("keyring",t)}}catch(o){i=`access failed: ${kR(o)}`}if(this.options.mode==="keyring")throw new z("keyring_unavailable",`The keyring cannot be used (${i}).`,P.unexpected,{hint:"SERPEL_TOKEN_STORAGE=file allows storing the token in a file."});return this.options.mode==="auto"&&this.options.warn(`The system keyring is not available (${i}). The token is stored in ${this.credentialsFile} instead. The file is readable only by your user account; anyone who can read it anyway can access the API on your behalf.`),this.writeToFile(t,r),{storage:"file",location:this.credentialsFile}}async load(t,r){let i=r==="file"?["file","keyring"]:["keyring","file"];for(let n of i)if(n==="keyring"){let o=await this.keyring();if(!o)continue;try{let a=this.entry(o,t).getPassword();if(a)return{token:a,source:"keyring",location:this.describe("keyring",t)}}catch{}}else{let o=this.readFile()?.tokens[t];if(o)return{token:o,source:"file",location:this.credentialsFile}}return null}async remove(t){let r=!1,i=await this.keyring();if(i)try{r=this.entry(i,t).deletePassword()}catch{r=!1}let n=this.removeFromFile(t);return{keyring:r,file:n}}readFile(){let t;try{t=Ff.readFileSync(this.credentialsFile,"utf8")}catch{return null}if(this.options.platform!=="win32")try{let r=Ff.statSync(this.credentialsFile).mode&511;r&63&&this.options.warn(`${this.credentialsFile} is readable by other users (permissions ${r.toString(8)}). Please restrict it with "chmod 600".`)}catch{}try{let r=JSON.parse(t),i={};for(let[n,o]of Object.entries(r.tokens??{}))typeof o=="string"&&o&&(i[n]=o);return{version:1,tokens:i}}catch{return null}}writeToFile(t,r){let i=this.readFile()??{version:1,tokens:{}};i.tokens[t]=r,dc(this.credentialsFile,`${JSON.stringify(i,null,2)}
|
|
99
|
+
`,384)}removeFromFile(t){let r=this.readFile();return!r||!(t in r.tokens)?!1:(delete r.tokens[t],Object.keys(r.tokens).length===0?Ff.rmSync(this.credentialsFile,{force:!0}):dc(this.credentialsFile,`${JSON.stringify(r,null,2)}
|
|
100
|
+
`,384),!0)}};async function ak(e,t,r,i){let n=e[nt]?.trim();return n?{token:n,source:"env",location:`Environment variable ${nt}`}:t.load(r,i)}function kR(e){return(e instanceof Error?e.message:String(e)).split(`
|
|
101
|
+
`)[0]?.slice(0,200)??"unknown error"}var Qr="0.1.1";var sk=null;function Zf(e){sk=e}function ck(){return sk}var _R=new Set(["succeeded","failed","cancelled"]),dk=2e3,xR=3;async function pk(e,t,r){let i=r.now(),n=0;Zf(`Waiting cancelled. The job keeps running, check its status with: serpel jobs status ${t}`);try{for(;;){let o;try{o=await e.get(`/jobs/${encodeURIComponent(t)}`),n=0}catch(c){if(c instanceof z&&c.exitCode===P.unreachable&&n<xR){n+=1,await r.sleep(r.intervalMs*n);continue}throw c}let a=r.now()-i;if(r.onUpdate?.(o,a),_R.has(o.status))return o;if(r.timeoutMs!==void 0&&a>=r.timeoutMs)throw new z("wait_timeout",`Time limit of ${Math.round(r.timeoutMs/1e3)} s reached. Job ${t} has the status "${We[o.status]??o.status}" and keeps running.`,P.waitTimeout,{hint:`Check the status later: serpel jobs status ${t}`,details:{jobId:t,status:o.status}});let s=r.timeoutMs!==void 0?Math.max(0,r.timeoutMs-a):r.intervalMs;await r.sleep(Math.min(r.intervalMs,Math.max(s,10)))}}finally{Zf(null)}}function rt(e){if(e.status==="succeeded")return;let t=_t[e.type]??e.type;if(e.status==="cancelled")throw new z("job_cancelled",`${t} was cancelled (job ${e.id}).`,P.jobFailed,{details:{jobId:e.id,status:e.status}});let r=e.lastError?`: ${e.lastError}`:".";throw new z("job_failed",`${t} failed (job ${e.id})${r}`,P.jobFailed,{hint:`Details: serpel jobs status ${e.id}`,details:{jobId:e.id,status:e.status,attempts:e.attempts}})}function mk(e){let t=Math.floor(e/1e3),r=Math.floor(t/60),i=t%60;return`${String(r).padStart(2,"0")}:${String(i).padStart(2,"0")}`}function fk(e){let t=_t[e.type]??e.type,r=We[e.status]??e.status,i=`${t}: ${r}`;if(e.progress){let n=e.progress.total!==null?`/${e.progress.total}`:"";i+=` ${e.progress.current}${n}`,e.progress.message&&(i+=` (${e.progress.message})`)}return i}var lk="\x1B",uk=["-","\\","|","/"],gc=class{constructor(t){this.stream=t}stream;frame=0;active=!1;get enabled(){return!!this.stream.isTTY}update(t){if(!this.enabled)return;let r=uk[this.frame++%uk.length],i=Math.max(20,(this.stream.columns??80)-1),n=`${r} ${t}`.slice(0,i);this.stream.write(`\r${lk}[2K${n}`),this.active=!0}clear(){this.active&&(this.stream.write(`\r${lk}[2K`),this.active=!1)}};function hk(e,t,r,i){let n=e[t]?.trim();if(!n)return r;let o=Number(n);if(!Number.isFinite(o)||o<i)throw E(`Invalid value for ${t}: "${n}".`);return o}var yc=class{constructor(t,r,i=new Set){this.runtime=t;this.options=r;this.out=new Yr(t.stdout,t.stderr,t.env,{json:!!r.json,color:r.color!==!1,verbose:!!r.verbose},i);let n=tk(t.env,t.platform,t.homedir);this.config=new uc(n),this.tokens=new fc({configDir:n,mode:hc(t.env.SERPEL_TOKEN_STORAGE),platform:t.platform,loadKeyring:t.loadKeyring,warn:o=>this.out.warn(o)})}runtime;options;out;config;tokens;apiUrlCache=null;get json(){return this.out.json}apiUrl(){return this.apiUrlCache??=ek(this.options.apiUrl,this.runtime.env,this.config.load().apiUrl),this.apiUrlCache}async token(){let t=this.apiUrl().url,r=this.runtime.env[nt]?.trim()?null:this.config.account(t),i=await ak(this.runtime.env,this.tokens,t,r?.tokenStorage);return this.out.addSecret(i?.token),i}httpTimeoutMs(){return hk(this.runtime.env,"SERPEL_HTTP_TIMEOUT",Mf/1e3,1)*1e3}pollIntervalMs(){return hk(this.runtime.env,"SERPEL_POLL_INTERVAL_MS",dk,50)}createClient(t,r){return this.out.addSecret(t),new cc({baseUrl:this.apiUrl().url,token:t,timeoutMs:this.httpTimeoutMs(),fetch:this.runtime.fetch,userAgent:`serpel/${Qr} (node ${process.version}; ${this.runtime.platform})`,log:i=>this.out.debug(i),unauthorizedHint:r})}clientFor(t){let r=t.source==="env"?`The token from ${nt} is invalid, expired or revoked.`:"The stored token is invalid, expired or revoked. Please sign in again: serpel auth login";return this.createClient(t.token,r)}async client(){let t=await this.token();if(!t)throw new z("not_logged_in",`Not signed in to ${this.apiUrl().url}.`,P.unauthorized,{hint:`Sign in with "serpel auth login" or set a token through ${nt}.`});return this.clientFor(t)}async waitForJob(t,r,i){let n=new gc(this.runtime.stderr);try{return await pk(t,r,{intervalMs:this.pollIntervalMs(),timeoutMs:i!==void 0?i*1e3:void 0,sleep:this.runtime.sleep,now:this.runtime.now,onUpdate:(o,a)=>n.update(`${fk(o)} ${mk(a)}`)})}finally{n.clear()}}};function X(e,t=Number.MAX_SAFE_INTEGER){return r=>{let i=r.trim(),n=Number(i);if(!/^-?\d+$/.test(i)||!Number.isSafeInteger(n))throw new ct(`"${r}" is not an integer.`);if(n<e||n>t)throw new ct(t===Number.MAX_SAFE_INTEGER?`Allowed values start at ${e}.`:`Allowed values range from ${e} to ${t}.`);return n}}function it(e,t){return[...t??[],e]}function L(e,t,r){return new Xe(e,t).choices(r)}function ae(e){return e.option("--limit <n>","entries per page (1 to 200)",X(1,200),50).option("--page <n>","page number, starting at 1",X(1)).option("--offset <n>","number of entries to skip (instead of --page)",X(0))}function se(e){if(e.page!==void 0&&e.offset!==void 0)throw E("Please specify either --page or --offset, not both.");let t=e.page!==void 0?(e.page-1)*e.limit:e.offset??0;return{limit:e.limit,offset:t}}function ot(e,t){return e.option("--wait",`wait for ${t} to finish (progress on stderr)`).option("--timeout <seconds>","maximum wait time with --wait",X(1))}function at(e){if(e.timeout!==void 0&&!e.wait)throw E("--timeout can only be used together with --wait.")}function v(e,t){return async(...r)=>{let i=r[r.length-1],n=new yc(e.runtime,i.optsWithGlobals(),e.secrets),o=r.slice(0,Math.max(0,r.length-2)).map(a=>a===void 0?"":String(a));await t(n,o,i.opts())}}function B(e,t){let r=e.safeParse(t);if(r.success)return r.data;let i=r.error.issues.map(n=>`${n.path.length?`${n.path.map(String).join(".")}: `:""}${n.message}`);throw E(i.join(" "))}function Q(e,t,r,i,n){if(e.json){e.out.printJson(t);return}if(t.data.length===0){e.out.info(t.pagination.total>0?`No entries on this page (${t.pagination.total} in total).`:i);return}e.out.table(r,t.data),e.out.paginationHint(t.pagination,t.data.length,n?.page)}function yn(e,t){let r=e?.trim();return r?t.noMatch(r):t.empty}function k(e){return encodeURIComponent(e)}function $e(e){return{data:e,pagination:{limit:e.length,offset:0,total:e.length}}}function ue(e,t,r){if(!e.yes)throw E(t,`To confirm: ${r} --yes`)}function gk(e,t,r){return new Xe(e,t).choices(r).argParser((i,n)=>{if(!r.includes(i))throw new ct(`Allowed: ${r.join(", ")}.`);return[...n??[],i]})}function At(e){return[...new Set((e??[]).map(t=>t.trim()).filter(Boolean))]}var yk="/billing/agent-spending";function vk(e,t){if(e.json)return e.out.printJson(t);e.out.line(`Agents may spend credits: ${t.allowed?"yes":"no"}`),e.out.line(`Daily limit for agents: ${b(t.dailyCapCredits)} credits${t.customDailyCapCredits===null?" (default)":""}`),e.out.line(`Spent today: ${b(t.spentTodayCredits)} credits`),t.planAllowsAgentSpending?t.allowed||e.out.hint("Allow with: serpel agents allow"):e.out.hint("Paid agent tools require the Starter or Pro plan.")}async function SR(e){vk(e,await(await e.client()).get(yk))}async function Wf(e,t){let r=B(Hw,t);vk(e,await(await e.client()).patch(yk,r))}async function $R(e,t,r){await Wf(e,r.dailyLimit===void 0?{allowed:!0}:{allowed:!0,dailyCapCredits:r.dailyLimit})}async function IR(e){await Wf(e,{allowed:!1})}async function CR(e,t,r){let i=t[0]?Number(t[0]):void 0;if(r.reset&&i!==void 0)throw E("The limit and --reset are mutually exclusive.");if(!r.reset&&i===void 0)throw E("Pass the daily limit in credits or use --reset for the default.");await Wf(e,{dailyCapCredits:r.reset?null:i})}function bk(e,t){let r=e.command("agents").description("AI apps and agents: allow and limit Credit spending through the MCP server");r.command("status").description("Show whether agents may spend credits, the daily limit, and today's usage").action(v(t,i=>SR(i))),r.command("allow").description("Allow agents to spend credits in the Workspace (Starter or Pro plan required)").option("--daily-limit <credits>","set the daily limit in credits",X(1,Xs)).action(v(t,$R)),r.command("deny").description("Stop agents from spending credits").action(v(t,i=>IR(i))),r.command("daily-limit [credits]").description("Set the daily limit for agents in credits").option("--reset","reset to the default").action(v(t,CR))}var Hf="Cited: The AI answer links to a page on your domain as a source. Mentioned: The answer names your domain or your project name, cited answers count as well. AI Overview: Result of the Google search for the same prompt, \u201Ccited\u201D means the AI Overview links to your domain.";function AR(e){let t=e.aiOverviewPrompts;return t?t.checked===0?t.tracking?"not checked yet":"tracking is turned off in the project":`${b(t.cited)} of ${b(t.checked)} prompts cited${t.tracking?"":" (tracking has since been turned off)"}`:R}function Kf(e,t){e.out.fields([["Tracked prompts",b(t.prompts)],["Checked",`${b(t.checked)} of ${b(t.prompts)}`],["Cited",`${b(t.cited)} of ${b(t.checked)} answers`],["Mentioned",`${b(t.mentioned)} of ${b(t.checked)} answers`],["Google AI Overview",AR(t)],["Last check",I(t.lastCheckedAt)]])}function DR(e,t){if(e.out.line(),e.out.heading("Most frequent sources in AI answers"),t.topSources.length===0){e.out.line("No sources recorded yet.");return}e.out.table([{header:"Domain",value:r=>r.domain,max:50},{header:"Mentions",value:r=>b(r.count),align:"right"},{header:"Own domain",value:r=>r.isProjectDomain?"yes":"",color:r=>e.out.c.green(r)}],t.topSources)}function RR(e,t){let r=t.aiOverviewPrompts;if(r){if(e.out.line(),e.out.heading("Google AI Overview for your prompts"),r.checked===0){e.out.line(r.tracking?"No check yet. The Google search for each prompt runs with the next check.":"Tracking is turned off in the project (setting \u201CTrack AI Overview\u201D).");return}e.out.fields([["Tracking",r.tracking?"active":"turned off"],["Checked prompts",`${b(r.checked)} of ${b(t.prompts)}`],["With AI Overview",`${b(r.present)} of ${b(r.checked)}`],["Own domain cited",`${b(r.cited)} of ${b(r.present)}`],["Last check",I(r.lastCheckedAt)]])}}function TR(e,t){e.out.line(),e.out.heading("Google AI Overview for tracked keywords");let r=t.aiOverview;if(r.keywords===0){e.out.line("No ranking check with AI Overview data yet.");return}e.out.fields([["Keywords with data",b(r.keywords)],["With AI Overview",`${b(r.present)} of ${b(r.keywords)}`],["Own domain cited",`${b(r.cited)} of ${b(r.present)}`],["Last check",I(r.lastCheckedAt)]])}function ER(e,t){if(e.out.line(),e.out.heading("AI crawler access (robots.txt)"),!t.crawlerAccess)e.out.line("No data yet. The check runs with every crawl.");else{let{c:r}=e.out;e.out.table([{header:"Crawler",value:i=>i.userAgent},{header:"Provider",value:i=>i.vendor},{header:"Purpose",value:i=>Wh[i.purpose]??i.purpose},{header:"Access",value:i=>i.allowed?"allowed":"blocked",color:(i,n)=>n.allowed?r.green(i):r.yellow(i)}],t.crawlerAccess),e.out.line()}e.out.fields([["llms.txt",ac(t.llmsTxtStatus)],["Checked on",t.accessCheckedAt?I(t.accessCheckedAt):null]])}async function OR(e,t){let i=await(await e.client()).get(`/projects/${k(t.project)}/ai-visibility`);if(e.json){e.out.printJson(i);return}e.out.heading("AI visibility"),Kf(e,i),DR(e,i),TR(e,i),RR(e,i),ER(e,i),e.out.hint(Hf)}function wk(e,t){e.command("status").description("Summary: citations, mentions, most frequent sources, AI Overview per keyword and per prompt, AI crawlers and llms.txt").requiredOption("--project <id>","project ID").addHelpText("after",`
|
|
102
|
+
Examples:
|
|
103
|
+
serpel ai status --project <id>
|
|
104
|
+
serpel ai status --project <id> --json`).action(v(t,(r,i,n)=>OR(r,n)))}var PR=60,kk=365;function _k(e){return e?e.status==="error"?"check failed":Lf(e.cited):"not checked yet"}function xk(e){return!e||e.status==="error"?R:Lf(e.mentioned)}function Sk(e){return e?e.status==="error"?"check failed":e.present?e.cited?"cited":"not cited":"no AI Overview":R}function $k(e){return qc[e]??e}var Ik=[{header:"ID",value:e=>e.id,max:36},{header:"Prompt",value:e=>e.prompt,max:50},{header:"Platform",value:e=>$k(e.platform)},{header:"Market",value:e=>Le(e.country,e.language)}],jR=[...Ik,{header:"Cited",value:e=>_k(e.latest)},{header:"Mentioned",value:e=>xk(e.latest)},{header:"AI Overview",value:e=>Sk(e.aiOverview)},{header:"Checked",value:e=>I(e.latest?.checkedAt)}];function NR(e,t){if(e.out.line(),e.out.line(e.out.c.bold("Google AI Overview for the prompt")),t.length===0){e.out.line("No check has run for the Google AI Overview yet.");return}e.out.table([{header:"Checked",value:i=>I(i.checkedAt)},{header:"AI Overview",value:i=>Sk(i)},{header:"Cited URL",value:i=>i.status==="error"?i.error??R:i.citedUrl??R,max:60},{header:"Sources",value:i=>String(i.sources.length),align:"right"}],t);let r=t.at(-1);if(r?.answerExcerpt&&(e.out.line(),e.out.line(e.out.c.bold(`Excerpt of the latest AI Overview (${I(r.checkedAt)})`)),e.out.line(` ${r.answerExcerpt}`)),r&&r.sources.length>0){e.out.line(),e.out.line(e.out.c.bold("Sources of the latest AI Overview"));for(let i of r.sources)e.out.line(`- ${i.title?`${i.title}: `:""}${i.url}`)}}async function LR(e,t){let i=await(await e.client()).get(`/projects/${k(t.project)}/ai-prompts`);Q(e,$e(i),jR,`No tracked prompts yet. Add some with: serpel ai add --project ${t.project} --prompt "..."`),!e.json&&i.length>0&&e.out.hint(Hf)}async function UR(e,t){let r=At(t.prompt);if(r.length===0)throw E('Provide at least one prompt with --prompt "...".');let i={prompts:r};t.platform!==void 0&&(i.platform=t.platform),t.country!==void 0&&(i.country=t.country),t.language!==void 0&&(i.language=t.language),B(kw,i);let o=await(await e.client()).post(`/projects/${k(t.project)}/ai-prompts`,i);if(e.json){e.out.printJson(o);return}e.out.line(`${o.added.length} ${o.added.length===1?"prompt":"prompts"} added to tracking`+(o.skipped>0?`, ${o.skipped} skipped (already tracked or duplicate).`:".")),o.added.length>0&&e.out.table(Ik,o.added),e.out.hint(`Start a check: serpel ai run --project ${t.project} --wait`)}async function zR(e,t,r){ue(r,"The prompt is removed from tracking together with all earlier check results.",`serpel ai remove ${t}`);let i=await e.client(),n=await i.get(`/ai-prompts/${k(t)}/history`,{limit:1});await i.delete(`/ai-prompts/${k(t)}`);let o=n.prompt;if(e.json){e.out.printJson({removed:!0,id:o.id,prompt:o.prompt,projectId:o.projectId});return}e.out.line(`Prompt removed from tracking: ${o.prompt}`),e.out.fields([["ID",o.id]])}async function MR(e,t){try{return await e.get(`/projects/${k(t)}/ai-visibility`)}catch{return null}}async function VR(e,t){at(t);let r=At(t.promptId),i=r.length>0?{promptIds:r}:{};B(_w,i);let n=await e.client(),o=await n.post(`/projects/${k(t.project)}/ai-prompts/run`,i),a=`${o.promptCount} ${o.promptCount===1?"prompt":"prompts"}`;if(!t.wait){if(e.json){e.out.printJson(o);return}e.out.line(o.alreadyRunning?"An AI visibility check is already running for this project.":`AI visibility check started for ${a}.`),e.out.fields([["Job ID",o.job.id]]),e.out.hint(`Status: serpel jobs status ${o.job.id} --wait`);return}e.json||e.out.info(o.alreadyRunning?`An AI visibility check is already running for this project. Waiting for job ${o.job.id} ...`:`AI visibility check started (${a}). Job ID: ${o.job.id}. Waiting for it to finish ...`);let s=await e.waitForJob(n,o.job.id,t.timeout);rt(s);let c=await MR(n,t.project);if(e.json){e.out.printJson({job:s,promptCount:o.promptCount,alreadyRunning:o.alreadyRunning,summary:c});return}e.out.line("AI visibility check completed."),e.out.fields([["Job ID",s.id]]),c&&Kf(e,c),e.out.hint(`Results per prompt: serpel ai prompts --project ${t.project}`)}async function BR(e,t,r){let n=await(await e.client()).get(`/ai-prompts/${k(t)}/history`,{limit:r.limit});if(e.json){e.out.printJson(n);return}let o=n.prompt;e.out.heading(o.prompt),e.out.fields([["ID",o.id],["Project ID",o.projectId],["Platform",$k(o.platform)],["Market",Le(o.country,o.language)]]),e.out.line();let a=n.aiOverviewChecks??[];if(n.checks.length===0&&a.length===0){e.out.line("No check has run for this prompt yet.");return}FR(e,n.checks),NR(e,a)}function FR(e,t){if(e.out.line(e.out.c.bold("ChatGPT answers")),t.length===0){e.out.line("No check has run for ChatGPT yet.");return}e.out.table([{header:"Checked",value:i=>I(i.checkedAt)},{header:"Cited",value:i=>_k(i)},{header:"Mentioned",value:i=>xk(i)},{header:"Cited URL",value:i=>i.status==="error"?i.error??R:i.citedUrl??R,max:60},{header:"Sources",value:i=>String(i.sources.length),align:"right"}],t);let r=t.at(-1);if(r?.answerExcerpt&&(e.out.line(),e.out.line(e.out.c.bold(`Excerpt of the latest answer (${I(r.checkedAt)})`)),e.out.line(` ${r.answerExcerpt}`)),r&&r.sources.length>0){e.out.line(),e.out.line(e.out.c.bold("Sources of the latest answer"));for(let i of r.sources)e.out.line(`- ${i.title?`${i.title}: `:""}${i.url}`)}}function Ck(e,t){let r=e.command("ai").description("AI visibility: track prompts and check whether AI answers cite your domain");r.command("prompts").description("Tracked prompts with their latest result: cited, mentioned, Google AI Overview, time of the check").requiredOption("--project <id>","project ID").addHelpText("after",`
|
|
105
|
+
Examples:
|
|
106
|
+
serpel ai prompts --project <id>
|
|
107
|
+
serpel ai prompts --project <id> --json`).action(v(t,(i,n,o)=>LR(i,o))),r.command("add").description(`Add prompts to tracking (at most ${jt} per project)`).requiredOption("--project <id>","project ID").option("--prompt <prompt>","prompt as users ask it of an AI (repeat for several)",it).addOption(L("--platform <platform>","AI platform (API default: chat_gpt)",si)).option("--country <code>","target country (default: project setting)").option("--language <code>","language (default: project setting)").addHelpText("after",`
|
|
108
|
+
Examples:
|
|
109
|
+
serpel ai add --project <id> --prompt "Which home care service in Dortmund is recommended?"
|
|
110
|
+
serpel ai add --project <id> --prompt "best running shoes 2026" --prompt "running shoes for beginners" --country AT`).action(v(t,(i,n,o)=>UR(i,o))),r.command("remove").description("Remove a prompt with all its check results from tracking").argument("<promptId>","prompt ID (from ai prompts)").option("--yes","confirm removal (required)").addHelpText("after",`
|
|
111
|
+
Example:
|
|
112
|
+
serpel ai remove <promptId> --yes`).action(v(t,(i,n,o)=>zR(i,n[0]??"",o))),ot(r.command("run").description("Start a check for all or selected prompts (asynchronous, prints the job ID)").requiredOption("--project <id>","project ID").option("--prompt-id <id>","check only this prompt (repeatable)",it),"the check").addHelpText("after",`
|
|
113
|
+
The check queries the AI platform through the data provider and incurs costs. If \u201CTrack AI Overview\u201D
|
|
114
|
+
is enabled in the project, every prompt is also searched on Google.
|
|
115
|
+
|
|
116
|
+
Examples:
|
|
117
|
+
serpel ai run --project <id> --wait
|
|
118
|
+
serpel ai run --project <id> --prompt-id <promptId> --wait --timeout 300 --json`).action(v(t,(i,n,o)=>VR(i,o))),r.command("history").description("History of a prompt: ChatGPT and Google AI Overview with cited URL, sources and excerpt").argument("<promptId>","prompt ID (from ai prompts)").option("--limit <n>",`number of checks (1 to ${kk})`,X(1,kk),PR).addHelpText("after",`
|
|
119
|
+
Examples:
|
|
120
|
+
serpel ai history <promptId>
|
|
121
|
+
serpel ai history <promptId> --limit 10 --json`).action(v(t,(i,n,o)=>BR(i,n[0]??"",o))),wk(r,t)}import JR from"node:fs";var qf="-";async function Dt(e,t){let r;if(t===qf)r=await e.readStdin();else try{r=JR.readFileSync(t,"utf8")}catch(i){let n=i.code;throw E(n==="ENOENT"?`File not found: ${t}`:`File not readable: ${t}`)}return r.charCodeAt(0)===65279?r.slice(1):r}var ZR=["7","28","90"];function qe(e){return e.toLocaleString("en-GB")}function vc(e){return e===null?"-":`${(e*100).toLocaleString("en-GB",{maximumFractionDigits:1})}%`}function WR(e){if(e===null)return"-";let t=Math.round(e);return t>=60?`${Math.floor(t/60)} min ${t%60} s`:`${t} s`}function Rk(e){return e.configured&&e.connected&&(e.provider!=="google_analytics"||e.settings.propertyId!==null)}function HR(e){return e.configured?e.connected?Rk(e)?"connected":"property missing":"not connected":"not set up"}function Tk(e){let{settings:t}=e;if(!e.connected)return"-";if(e.provider==="posthog")return`Project ${t.projectId??"?"} (${t.host??"?"})`;if(e.provider==="plausible")return`${t.siteId??"?"} (${t.host??"?"})`;let r=e.availableProperties.find(i=>i.id===t.propertyId);return t.propertyName?r&&r.domains.length>0?`${t.propertyName} (${r.domains.join(", ")})`:t.propertyName:"no property"}async function Ek(e,t,r){let i=(await Dt(e.runtime,t)).trim();if(i.length<16)throw E("The API key is too short or missing.",r);return e.out.addSecret(i),i}async function Gf(e,t){return(await e.client()).get(`/projects/${k(t)}/analytics`)}async function KR(e,t){let r=await Gf(e,t.project);if(e.json){e.out.printJson($e(r));return}e.out.table([{header:"Provider",value:i=>xt[i.provider]},{header:"Status",value:i=>HR(i)},{header:"Connection",value:i=>Tk(i),max:60},{header:"Last fetched",value:i=>i.lastSyncedAt?I(i.lastSyncedAt):"-"}],r);for(let i of r)i.configurationHint&&e.out.hint(`${xt[i.provider]}: ${i.configurationHint}`),i.lastError&&e.out.warn(`${xt[i.provider]}: ${i.lastError}`)}function Ok(e,t,r){if(e.json){e.out.printJson(t);return}e.out.line(`${xt[t.provider]} connected: ${Tk(t)}.`),e.out.hint(`Show data: serpel analytics report --project ${r} --provider ${t.provider}`)}async function qR(e,t){if(!/^\d{1,20}$/.test(t.posthogProject))throw E("The PostHog project ID consists of digits only.","You can find it in PostHog under project settings.");let r=await Ek(e,t.apiKeyFile,"Create a personal API key in PostHog under settings (scope \u201CQuery: Read\u201D)."),n=await(await e.client()).post(`/projects/${k(t.project)}/analytics/posthog`,{host:t.host??t.region,projectId:t.posthogProject,apiKey:r});Ok(e,n,t.project)}async function GR(e,t){let r=await Ek(e,t.apiKeyFile,"Create an API key in Plausible under Account, API keys (type \u201CStats API\u201D)."),n=await(await e.client()).post(`/projects/${k(t.project)}/analytics/plausible`,{siteId:t.siteId,apiKey:r,...t.host?{host:t.host}:{}});Ok(e,n,t.project)}async function XR(e,t){let i=await(await e.client()).post(`/projects/${k(t.project)}/analytics/google_analytics/authorize`);if(e.json){e.out.printJson(i);return}e.out.line("Open this URL in the browser where you are signed in to the dashboard, and grant access:"),e.out.line(i.authorizationUrl),t.open&&await e.runtime.openUrl(i.authorizationUrl)&&e.out.info("Browser opened."),e.out.hint(`Then check: serpel analytics status --project ${t.project}`)}async function YR(e,t){let i=await(await e.client()).patch(`/projects/${k(t.project)}/analytics/google_analytics`,{propertyId:t.propertyId});if(e.json){e.out.printJson(i);return}e.out.line(`Property saved for Google Analytics: ${i.settings.propertyName??i.settings.propertyId}.`)}async function QR(e,t){let r=await e.client(),i=t.refresh?await r.post(`/projects/${k(t.project)}/analytics/google_analytics/properties`):(await Gf(e,t.project)).find(n=>n.provider==="google_analytics");if(!i?.connected)throw E("Google Analytics is not connected for this project.",`Connect it with: serpel analytics connect-google --project ${t.project}`);if(e.json){e.out.printJson($e(i.availableProperties));return}if(i.availableProperties.length===0){e.out.line("The connected Google account has no property.");return}e.out.table([{header:"ID",value:n=>n.id},{header:"Name",value:n=>n.name,max:50},{header:"Domains",value:n=>n.domains.length>0?n.domains.join(", "):"-",max:50},{header:"Selected",value:n=>n.id===i.settings.propertyId?"yes":""}],i.availableProperties),i.availableProperties.every(n=>n.domains.length===0)&&e.out.hint(`Load domains: serpel analytics properties --project ${t.project} --refresh`)}async function eT(e,t){if(ue(t,`The connection to ${xt[t.provider]} is deleted, along with the stored credentials.`,`serpel analytics disconnect --project ${t.project} --provider ${t.provider}`),await(await e.client()).delete(`/projects/${k(t.project)}/analytics/${t.provider}`),e.json){e.out.printJson({disconnected:!0,provider:t.provider});return}e.out.line(`${xt[t.provider]} disconnected.`)}function Ak(e,t,r){let{totals:i}=t;if(e.out.line(e.out.c.bold(`${xt[t.provider]}, ${t.startDate} to ${t.endDate}`)),e.out.fields([["Visitors",qe(i.visitors)],["From search engines",`${qe(t.searchVisitors)}${i.visitors>0?` (${vc(t.searchVisitors/i.visitors)})`:""}`],["Pageviews",qe(i.pageviews)],["Sessions",i.sessions===null?"-":qe(i.sessions)],["Bounce rate",vc(i.bounceRate)],["Avg. session duration",WR(i.averageSessionSeconds)],["Source",t.cached?`cached on ${I(t.fetchedAt)}`:"just fetched"]]),e.out.line(),t.topPages.length>0&&(e.out.table([{header:"Page",value:o=>o.path,max:60},{header:"Visitors",value:o=>qe(o.visitors),align:"right"},{header:"Views",value:o=>qe(o.pageviews),align:"right"}],t.topPages),e.out.line()),t.entryPages.length>0&&(e.out.table([{header:"Entry page",value:o=>o.path,max:60},{header:"Visitors",value:o=>qe(o.visitors),align:"right"},{header:"Entries",value:o=>qe(o.entries),align:"right"}],t.entryPages),e.out.line()),t.topSources.length>0&&e.out.table([{header:"Source",value:o=>o.source,max:40},{header:"Visitors",value:o=>qe(o.visitors),align:"right"},{header:"Search engine",value:o=>o.searchEngine?"yes":"no"}],t.topSources),t.devices.length>0){let o=t.devices.reduce((a,s)=>a+s.visitors,0);e.out.line(),e.out.table([{header:"Device",value:a=>a.device},{header:"Visitors",value:a=>qe(a.visitors),align:"right"},{header:"Share",value:a=>vc(o>0?a.visitors/o:null),align:"right"}],t.devices)}r&&t.daily.length>0&&(e.out.line(),e.out.table([{header:"Day",value:o=>o.date},{header:"Visitors",value:o=>qe(o.visitors),align:"right"},{header:"Views",value:o=>qe(o.pageviews),align:"right"},{header:"Sessions",value:o=>o.sessions===null?"-":qe(o.sessions),align:"right"},{header:"Bounce rate",value:o=>vc(o.bounceRate),align:"right"}],t.daily));let n=tT(t);n.length>0&&e.out.hint(`${xt[t.provider]} returns no values for ${n.join(", ")} in this period.`)}function tT(e){return e.totals.visitors===0&&e.totals.pageviews===0?[]:[[e.totals.sessions===null&&e.daily.every(r=>r.sessions===null),"sessions"],[e.totals.bounceRate===null&&e.daily.every(r=>r.bounceRate===null),"bounce rate"],[e.entryPages.length===0,"entry pages"],[e.devices.length===0,"devices"]].filter(([r])=>r).map(([,r])=>r)}async function Dk(e,t,r,i){return(await e.client()).get(`/projects/${k(t)}/analytics-report`,{provider:r,days:i})}async function nT(e,t){if(t.provider){let a=await Dk(e,t.project,t.provider,t.days);e.json?e.out.printJson(a):Ak(e,a,!!t.daily);return}let i=(await Gf(e,t.project)).filter(Rk);if(i.length===0)throw E("No analytics service is connected for this project.",`Show the status: serpel analytics status --project ${t.project}`);let n=[],o=[];for(let a of i)try{n.push(await Dk(e,t.project,a.provider,t.days))}catch(s){if(!(s instanceof xe))throw s;o.push({provider:a.provider,error:s.message})}if(e.json){e.out.printJson({data:n,failures:o});return}n.forEach((a,s)=>{s>0&&e.out.line(),Ak(e,a,!!t.daily)});for(let a of o)e.out.warn(`${xt[a.provider]}: ${a.error}`)}function Pk(e,t){let r=e.command("analytics").description("Web analytics from PostHog, Plausible and Google Analytics 4");r.command("status").description("Detect which analytics services are connected to a project").requiredOption("--project <id>","project ID").addHelpText("after",`
|
|
122
|
+
Example:
|
|
123
|
+
serpel analytics status --project <id>`).action(v(t,(i,n,o)=>KR(i,o))),r.command("report").description("Read visitors, sessions, pageviews, bounce rate, top pages, entry pages, sources and devices").requiredOption("--project <id>","project ID").addOption(L("--provider <provider>","read only this service, otherwise all connected ones",li)).addOption(L("--days <days>","period in days",ZR).default("28")).option("--daily","also print visitors, views, sessions and bounce rate per day").addHelpText("after",`
|
|
124
|
+
Without --provider, the CLI reads all connected services one after another. If one fails, the
|
|
125
|
+
others are still shown, and the error appears as a warning on stderr. Results are cached for 30 minutes.
|
|
126
|
+
|
|
127
|
+
Examples:
|
|
128
|
+
serpel analytics report --project <id>
|
|
129
|
+
serpel analytics report --project <id> --provider posthog --days 90 --daily
|
|
130
|
+
serpel analytics report --project <id> --json`).action(v(t,(i,n,o)=>nT(i,o))),r.command("connect-posthog").description("Connect PostHog with a personal API key").requiredOption("--project <id>","project ID in Serpel").requiredOption("--posthog-project <id>","project ID in PostHog (digits only)").requiredOption("--api-key-file <path>","file with the API key, or - for stdin").addOption(L("--region <region>","PostHog Cloud",["eu","us"]).default("eu")).option("--host <url>","own instance instead of the cloud, e.g. https://posthog.example.com").addHelpText("after",`
|
|
131
|
+
The key needs the scope \u201CQuery: Read\u201D. It is not passed as an argument so that it does not end up in your shell history.
|
|
132
|
+
|
|
133
|
+
Examples:
|
|
134
|
+
serpel analytics connect-posthog --project <id> --posthog-project 12345 --api-key-file posthog.key
|
|
135
|
+
printf %s "$POSTHOG_KEY" | serpel analytics connect-posthog --project <id> --posthog-project 12345 --region us --api-key-file -`).action(v(t,(i,n,o)=>qR(i,o))),r.command("connect-plausible").description("Connect Plausible Analytics with a Stats API key").requiredOption("--project <id>","project ID in Serpel").requiredOption("--site-id <domain>","domain as it is registered in Plausible").requiredOption("--api-key-file <path>","file with the API key, or - for stdin").option("--host <url>","own instance, default https://plausible.io").addHelpText("after",`
|
|
136
|
+
Example:
|
|
137
|
+
serpel analytics connect-plausible --project <id> --site-id example.com --api-key-file plausible.key`).action(v(t,(i,n,o)=>GR(i,o))),r.command("connect-google").description("Connect Google Analytics 4: create the authorisation URL and open it in the browser").requiredOption("--project <id>","project ID").option("--no-open","only print the URL, do not open the browser").addHelpText("after",`
|
|
138
|
+
Example:
|
|
139
|
+
serpel analytics connect-google --project <id>`).action(v(t,(i,n,o)=>XR(i,o))),r.command("property").description("Set the Google Analytics property of a project").requiredOption("--project <id>","project ID").requiredOption("--property-id <id>","property ID from analytics status --json (availableProperties)").addHelpText("after",`
|
|
140
|
+
Example:
|
|
141
|
+
serpel analytics property --project <id> --property-id 123456789`).action(v(t,(i,n,o)=>YR(i,o))),r.command("properties").description("List Google Analytics properties with their domains").requiredOption("--project <id>","project ID").option("--refresh","reload the list from Google and select the matching property if none is selected yet").addHelpText("after",`
|
|
142
|
+
Examples:
|
|
143
|
+
serpel analytics properties --project <id>
|
|
144
|
+
serpel analytics properties --project <id> --refresh --json`).action(v(t,(i,n,o)=>QR(i,o))),r.command("disconnect").description("Disconnect and delete the stored credentials").requiredOption("--project <id>","project ID").addOption(L("--provider <provider>","provider",li).makeOptionMandatory()).option("--yes","confirm disconnecting").addHelpText("after",`
|
|
145
|
+
Example:
|
|
146
|
+
serpel analytics disconnect --project <id> --provider plausible --yes`).action(v(t,(i,n,o)=>eT(i,o)))}var rT=new Intl.NumberFormat("en-GB",{minimumFractionDigits:1,maximumFractionDigits:1}),iT=new Intl.NumberFormat("en-GB",{minimumFractionDigits:2,maximumFractionDigits:3}),oT={lcp:"LCP",inp:"INP",cls:"CLS"},jk={good:"good",needs_improvement:"needs improvement",poor:"poor"},aT={ok:"fully measured",partial:"partially measured",unavailable:"unavailable"};function bc(e){return e===null?"not measured":aT[e]}function qn(e,t){return e==="cls"?iT.format(t):e==="lcp"?`${rT.format(t/1e3)} s`:`${b(Math.round(t))} ms`}function wc(e,t){return t==null||!Number.isFinite(t)?R:`${qn(e,t)} (${jk[Tf(e,t)]})`}function kc(e,t){let r=e.field?.[t];if(r&&Number.isFinite(r.percentile))return wc(t,r.percentile);let i=e.originField?.[t];return i&&Number.isFinite(i.percentile)?`${qn(t,i.percentile)} (${jk[Tf(t,i.percentile)]}, site-wide)`:R}function Nk(){return Lw.map(e=>{let t=Rf[e];return`${oT[e]} good up to ${qn(e,t.good)}, poor above ${qn(e,t.poor)}`}).join("; ")}var Lk={mobile:"Mobile",desktop:"Desktop"};function sT(e){return e.results.filter(t=>t.status!=="ok")}function cT(e,t){if(t.length!==0){e.out.line(),e.out.heading(`Failed measurements (${t.length})`);for(let r of t)e.out.line(` ${r.url} (${Lk[r.strategy]}): ${r.error??"not specified"}`)}}async function lT(e,t){let i=await(await e.client()).get(`/crawls/${k(t)}/web-vitals`);if(e.json){e.out.printJson(i);return}let n=sT(i);if(e.out.heading("Core Web Vitals"),e.out.fields([["Crawl ID",i.crawlId],["Status",bc(i.status)],["Reason",i.reason],["Measurements",i.results.length>0?`${b(i.results.length-n.length)} succeeded, ${b(n.length)} failed`:null]]),e.out.line(),i.results.length===0){e.out.line(i.status===null?"There is no measurement for this crawl.":"No measured values are available."),e.out.hint("With every new crawl, Serpel measures the home page and important pages with Google PageSpeed Insights, on mobile and desktop.");return}e.out.table([{header:"URL",value:o=>o.url,max:60},{header:"Device",value:o=>Lk[o.strategy]},{header:"Score",value:o=>o.performanceScore===null?R:String(o.performanceScore),align:"right"},{header:"LCP field",value:o=>kc(o,"lcp")},{header:"INP field",value:o=>kc(o,"inp")},{header:"CLS field",value:o=>kc(o,"cls")},{header:"LCP lab",value:o=>wc("lcp",o.lab.lcpMs)},{header:"CLS lab",value:o=>wc("cls",o.lab.cls)}],i.results),cT(e,n),e.out.hint("Field: real user data from the last 28 days. Lab: a single measurement. \u201CSite-wide\u201D means the value is for the whole site because there is too little user data for the page."),e.out.hint(`Google rating: ${Nk()}. INP is only available as a field value.`)}function Uk(e,t){e.command("web-vitals").description("Core Web Vitals of a crawl: LCP, INP, and CLS per URL and device, as field and lab values").argument("<crawlId>","crawl ID").addHelpText("after",`
|
|
147
|
+
The values come from Google PageSpeed Insights and are measured on every crawl for the
|
|
148
|
+
home page and important pages, on mobile and desktop. Field values are real user data
|
|
149
|
+
(Chrome UX Report), lab values are a single measurement. If the service was unavailable,
|
|
150
|
+
"Reason" names the cause.
|
|
151
|
+
|
|
152
|
+
Examples:
|
|
153
|
+
serpel audit web-vitals <crawlId>
|
|
154
|
+
serpel audit web-vitals <crawlId> --json`).action(v(t,(r,i)=>lT(r,i[0]??"")))}function zk(e,t,r){let{c:i}=e.out;return t==="error"?i.red(r):t==="warning"?i.yellow(r):i.cyan(r)}function Mk(e){return Xc[e]??e}async function uT(e,t){let i=await(await e.client()).get(`/projects/${k(t.project)}/issues`,{crawlId:t.crawl,severity:t.severity,category:t.category,q:t.query});if(e.json){e.out.printJson(i);return}if(!i.crawl){e.out.line("No completed crawl for this project yet."),e.out.hint(`Start a crawl: serpel crawl start --project ${t.project} --wait`);return}if(e.out.fields([["Crawl ID",i.crawl.id],["Checked",I(i.crawl.finishedAt??i.crawl.startedAt)],["Pages",String(i.crawl.pagesCrawled)],["Score",i.score!==null&&i.score!==void 0?ft(i.score):null],["Issues",Vt(i.counts)],["Since the last crawl",i.comparison?`${i.comparison.newIssues} new, ${i.comparison.resolvedIssues} resolved issue types`:null]]),e.out.line(),i.groups.length===0){e.out.line("No issues found with these filters.");return}e.out.table([{header:"Severity",value:n=>lt[n.severity]??n.severity,color:(n,o)=>zk(e,o.severity,n)},{header:"Code",value:n=>n.code},{header:"Issue",value:n=>n.heuristic?`${n.title} (heuristic)`:n.title,max:70},{header:"Affected",value:n=>n.siteLevel?"Site-wide":String(n.affectedCount),align:"right"},{header:"Category",value:n=>Mk(n.category)},{header:"Task",value:n=>n.taskId??R,max:36}],i.groups),e.out.hint(`Details and affected URLs: serpel audit issue <code> --project ${t.project}`),i.comparison&&e.out.hint(`Compare with the previous crawl: serpel crawl compare --project ${t.project}`),i.groups.some(n=>n.heuristic)&&e.out.hint('"(heuristic)": this finding is based on a heuristic and is not a confirmed error. Please check it manually.')}function dT(e){let t=Object.entries(e).filter(([,r])=>r!=null&&r!=="").map(([r,i])=>`${r}=${typeof i=="object"?JSON.stringify(i):String(i)}`);return t.length?t.join(", "):R}async function pT(e,t,r){let n=await(await e.client()).get(`/projects/${k(r.project)}/issues/${k(t)}`,{...se(r),crawlId:r.crawl,q:r.query});if(e.json){e.out.printJson(n);return}let o=n.group,{c:a}=e.out;if(e.out.heading(o.title),e.out.fields([["Code",o.code],["Severity",zk(e,o.severity,lt[o.severity]??o.severity)],["Category",Mk(o.category)],["Finding",o.heuristic?"Heuristic, not a confirmed error. Please check manually.":"rule-based check"],["Affected",o.siteLevel?"entire site":`${o.affectedCount} ${o.affectedCount===1?"URL":"URLs"}`],["Checked on",I(o.detectedAt)],["Crawl ID",o.crawlId],["Task",o.taskId]]),e.out.line(),e.out.line(a.bold("What was found")),e.out.line(` ${o.title}${o.siteLevel?" (affects the entire site)":`, ${o.affectedCount} affected`}.`),e.out.line(a.bold("Why it matters")),e.out.line(` ${o.why}`),e.out.line(a.bold("Fix")),e.out.line(` ${o.fix}`),e.out.line(),n.occurrences.length===0){e.out.line("No affected URLs on this page.");return}e.out.line(a.bold("Affected URLs")),e.out.table([{header:"URL",value:s=>s.url??"(site-wide)",max:90},{header:"Details",value:s=>dT(s.details),max:70}],n.occurrences),e.out.paginationHint(n.pagination,n.occurrences.length,r.page),o.taskId||e.out.hint(`Create a task: serpel tasks create --project ${r.project} --issue ${o.code} --crawl ${o.crawlId}`)}function Vk(e,t){let r=e.command("audit").description("Show website audit results");r.command("issues").description("Issues of a crawl grouped by severity (default: latest completed crawl)").requiredOption("--project <id>","project ID").option("--crawl <id>","specific crawl instead of the latest").addOption(L("--severity <level>","only this level (error, warning, notice)",$o)).addOption(L("--category <category>","only this category",Object.keys(Xc))).option("-q, --query <text>","search in title and code").addHelpText("after",`
|
|
155
|
+
Examples:
|
|
156
|
+
serpel audit issues --project <id>
|
|
157
|
+
serpel audit issues --project <id> --severity error --json`).action(v(t,(i,n,o)=>uT(i,o))),ae(r.command("issue").description("One issue in detail: affected URLs, what was found, why it matters, how to fix it").argument("<code>","issue code, e.g. title_missing").requiredOption("--project <id>","project ID").option("--crawl <id>","specific crawl instead of the latest").option("-q, --query <text>","search in affected URLs")).action(v(t,(i,n,o)=>pT(i,n[0]??"",o))),Uk(r,t)}import hT from"node:os";var mT=5,fT=3;async function Fk(e,t){let r=await e.post("/auth/device",{clientName:t.clientName.slice(0,100)},{auth:!1});if(!r?.deviceCode||!r.userCode)throw new z("invalid_response","The API did not return a sign-in code.",P.unexpected);await t.onStart(r);let i=t.minIntervalSeconds??1,n=Math.max(i,Number.isFinite(r.interval)?r.interval:5),o=t.now()+Math.max(1,r.expiresIn)*1e3,a=0;for(;;){if(await t.sleep(n*1e3),t.now()>o)throw Bk();try{let s=await e.post("/auth/device/token",{deviceCode:r.deviceCode},{auth:!1});if(!s?.accessToken)throw new z("invalid_response","The API did not return a token.",P.unexpected);return s}catch(s){if(s instanceof xe)switch(a=0,s.apiCode){case"authorization_pending":continue;case"slow_down":n+=mT;continue;case"expired_token":throw Bk();case"access_denied":throw new z("access_denied","The sign-in was denied in the dashboard.",P.unauthorized);default:throw s}if(s instanceof z&&s.exitCode===P.unreachable&&a<fT){a+=1;continue}throw s}}}function Bk(){return new z("expired_token","The sign-in code has expired.",P.unauthorized,{hint:"Please sign in again: serpel auth login"})}function Jk(e,t){try{return new URL(e,`${t}/`).toString()}catch{return e}}function Zk(e){return e?e.length===0?"no projects allowed":`${e.length} ${e.length===1?"project":"projects"}: ${e.join(", ")}`:"none (all projects the account is a member of)"}async function gT(e,t){let{runtime:r}=e,i=e.apiUrl().url;if(t.token!==void 0&&t.tokenStdin)throw E("Use either --token or --token-stdin, not both.");r.env[nt]?.trim()&&e.out.hint(`Note: ${nt} is set and takes precedence over the stored token for all commands.`);let n,o,a,s=null;if(t.token!==void 0||t.tokenStdin){if(t.token!==void 0&&e.out.hint("Note: Tokens passed as an argument end up in your shell history. --token-stdin is safer."),n=(t.tokenStdin?await r.readStdin():t.token??"").trim(),!n)throw E("No token provided.");if(/\s/.test(n))throw E("The token must not contain spaces or line breaks.");let u=await e.createClient(n,"The token was rejected: invalid, expired, or revoked.").get("/me");o=u.user,a=u.auth.scopes,s=u.auth.projectIds}else{let l=e.createClient(null),u=await Fk(l,{clientName:`serpel CLI (${hT.hostname()})`,sleep:r.sleep,now:r.now,onStart:async d=>{let m=Jk(d.verificationUriComplete||d.verificationUri,i),f=Jk(d.verificationUri,i),h=Math.max(1,Math.round(d.expiresIn/60));e.out.info("Confirm the sign-in in your browser:"),e.out.info(` ${m}`),e.out.info(`Verification code: ${e.out.errColors.bold(d.userCode)} (valid for ${h} ${h===1?"minute":"minutes"})`),f!==m&&e.out.hint(`Or open ${f} and enter the code.`),t.browser!==!1&&(await r.openUrl(m)||e.out.hint("The browser could not be opened automatically. Open the address manually.")),e.out.hint("Waiting for confirmation (cancel with Ctrl+C) ...")}});n=u.accessToken,e.out.addSecret(n),o=u.user,a=u.scopes;try{let d=await e.createClient(n).get("/me");o=d.user,a=d.auth.scopes,s=d.auth.projectIds}catch{}}let c=await e.tokens.save(i,n);if(e.config.setAccount(i,{user:{id:o.id,email:o.email,name:o.name},scopes:a,projectIds:s,tokenStorage:c.storage,loggedInAt:new Date(r.now()).toISOString()}),e.json){e.out.printJson({apiUrl:i,user:{id:o.id,email:o.email,name:o.name},scopes:a,projectIds:s,tokenStorage:c.storage,tokenLocation:c.location});return}e.out.line(`Signed in as ${o.name} <${o.email}> at ${i}.`),e.out.fields([["Token storage",c.location],["Permissions",a.join(", ")],["Project restriction",Zk(s)]])}async function yT(e){let t=e.apiUrl().url,r=!!e.runtime.env[nt]?.trim(),i=e.config.account(t),n=await e.tokens.load(t,i?.tokenStorage);if(r&&e.out.hint(`Note: ${nt} is never stored and is not revoked by logout. Remove the variable to sign out.`),!n){e.config.removeAccount(t),e.json?e.out.printJson({apiUrl:t,loggedOut:!1,revoked:!1,reason:"not_logged_in"}):e.out.line(`No stored token for ${t}. Nothing to do.`);return}e.out.addSecret(n.token);let o="failed",a=null;try{await e.createClient(n.token).request("POST","/auth/logout"),o="revoked"}catch(s){s instanceof xe&&s.status===401?o="already_invalid":s instanceof z?a=s:a=new z("unexpected",s instanceof Error?s.message:String(s),P.unexpected)}if(await e.tokens.remove(t),e.config.removeAccount(t),a&&e.out.warn(`The token could not be revoked on the server (${a.message}). It was only deleted locally and stays valid until it is revoked in the dashboard under API tokens or expires.`),e.json){e.out.printJson({apiUrl:t,loggedOut:!0,revoked:o!=="failed",serverStatus:o});return}o==="revoked"?e.out.line(`Signed out of ${t}. The token was revoked on the server and deleted locally.`):o==="already_invalid"?e.out.line(`Signed out of ${t}. The token was already invalid and was deleted locally.`):e.out.line(`Signed out of ${t} locally.`)}async function vT(e){let t=e.apiUrl(),r=await e.token();if(!r)throw new z("not_logged_in",`Not signed in to ${t.url}.`,P.unauthorized,{hint:`Sign in with "serpel auth login" or set a token through ${nt}.`});let i=await e.clientFor(r).get("/me");if(e.json){e.out.printJson({apiUrl:t.url,apiUrlSource:t.source,user:i.user,auth:i.auth,tokenSource:r.source,tokenLocation:r.location});return}e.out.line(`Signed in as ${i.user.name} <${i.user.email}>.`),e.out.fields([["API URL",`${t.url} (${lc[t.source]})`],["Account role",i.user.role==="admin"?"Administrator":"Member"],["Sign-in method",i.auth.method==="token"?`API token${i.auth.tokenId?` (ID ${i.auth.tokenId})`:""}`:"Session"],["Token storage",r.location],["Project restriction",Zk(i.auth.projectIds)]]),e.out.line(e.out.c.dim("Permissions:"));for(let n of i.auth.scopes)e.out.line(` ${n.padEnd(16)} ${Io[n]??""}`.trimEnd())}async function bT(e,t){let r={};if(t.name!==void 0&&(r.name=t.name),t.email!==void 0&&(r.email=t.email),Object.keys(r).length===0)throw E("Nothing to change. Pass --name or --email.","Show options: serpel auth profile --help");let i=B(Ew,r),o=await(await e.client()).patch("/me",i),a=e.apiUrl().url,s=e.config.account(a);if(s&&s.user.id===o.user.id&&e.config.setAccount(a,{...s,user:{id:o.user.id,email:o.user.email,name:o.user.name}}),e.json){e.out.printJson(o);return}e.out.line(`Profile saved: ${o.user.name} <${o.user.email}>.`),e.out.fields([["Name",o.user.name],["Email",o.user.email]]),i.email!==void 0&&e.out.hint("Sign in to the dashboard with the new email address from now on.")}function Wk(e,t){let r=e.command("auth").description("Sign in, sign out, and show your sign-in status");r.command("login").description("Sign in to the API (default: confirm in the browser using device login)").option("--token <token>","use an existing API token (ends up in your shell history)").option("--token-stdin","read the API token from standard input").option("--no-browser","do not open the browser automatically, only show the address").addHelpText("after",`
|
|
158
|
+
Examples:
|
|
159
|
+
serpel auth login
|
|
160
|
+
serpel auth login --no-browser
|
|
161
|
+
echo "$VSK_TOKEN" | serpel auth login --token-stdin
|
|
162
|
+
serpel auth login --api-url https://seo.example.com`).action(v(t,(i,n,o)=>gT(i,o))),r.command("logout").description("Revoke the token on the server and delete it locally").action(v(t,i=>yT(i))),r.command("status").description("Show the signed-in user, permissions, and token storage").action(v(t,i=>vT(i))),r.command("profile").description("Change the name or email address of your own account").option("--name <name>","new name (1 to 120 characters)").option("--email <address>","new email address for sign-in and reports").addHelpText("after",`
|
|
163
|
+
Only the fields you pass are changed. The email address is stored in lowercase and must be
|
|
164
|
+
unique across all accounts, otherwise the command exits with exit code 6. Through the API this
|
|
165
|
+
only works with a token that has all permissions and is not restricted to projects (like the
|
|
166
|
+
token from "auth login").
|
|
167
|
+
|
|
168
|
+
Examples:
|
|
169
|
+
serpel auth profile --name "Kerem Sinecek"
|
|
170
|
+
serpel auth profile --email kerem@example.com --json`).action(v(t,(i,n,o)=>bT(i,o)))}var wT=["credits500","credits1000","credits2500","credits5000"];async function kT(e){let t=await(await e.client()).get("/billing/summary");if(e.json)return e.out.printJson(t);e.out.line(`Available: ${b(t.account.available)} credits`),e.out.line(`Balance: ${b(t.account.balance)} credits`),e.out.line(`Reserved: ${b(t.account.reserved)} credits`),e.out.line(`Used today: ${b(t.spentTodayCredits)} of ${b(t.dailySpendLimitCredits)} credits`),e.out.line(`Used in 30 days: ${b(t.spentLast30DaysCredits)} credits`),e.out.line(`Lasts about: ${t.estimatedDaysRemaining===null?"no forecast yet":`${b(t.estimatedDaysRemaining)} days`}`)}async function _T(e,t,r){let i=await(await e.client()).list("/billing/ledger",se(r));Q(e,i,[{header:"Time",value:n=>I(n.createdAt)},{header:"Type",value:n=>n.kind},{header:"Credits",value:n=>`${n.amount>=0?"+":""}${b(n.amount)}`,align:"right"},{header:"Balance",value:n=>b(n.balanceAfter),align:"right"},{header:"Note",value:n=>n.note??"-",max:45}],"No transactions yet.",r)}function xT(e){let t=e.keywords??0,r=e.prompts??0,i=Number(e.depth??50),n={rankCheck:{operation:"rankCheck",params:{keywordCount:t,depth:i,queued:e.scheduled===!0}},aiCheck:{operation:"aiCheck",params:{promptCount:r,aiOverview:e.aiOverview}},keywordResearch:{operation:"keywordResearch",params:{mode:e.mode??"keyword",keywordCount:e.keywords,limit:e.limit}},keywordListRefresh:{operation:"keywordListRefresh",params:{keywordCount:t,taskCount:e.tasks}},keywordMetrics:{operation:"keywordMetrics",params:{keywordCount:t,taskCount:e.tasks}},crawl:{operation:"crawl",params:{maxPages:e.maxPages??0}},monitoring:{operation:"monitoring",params:{keywordCount:t,rankDepth:i,promptCount:r,aiOverview:e.aiOverview,queued:e.scheduled===!0}}};return B(Ow,n[e.operation])}async function ST(e,t,r){let i=await(await e.client()).post("/billing/estimate",xT(r));if(e.json)return e.out.printJson(i);e.out.line(`${i.minCredits===i.maxCredits?b(i.maxCredits):`${b(i.minCredits)} to ${b(i.maxCredits)}`} credits`);for(let n of i.breakdown)e.out.line(` ${n.label}: ${b(n.quantity)} \xD7 ${b(n.creditsPerUnit)} = ${b(n.credits)}`);e.out.hint(`Price version ${i.priceVersion}`)}async function $T(e,t,r){if(r.package&&r.amount!==void 0)throw E("--package and --amount are mutually exclusive.");let i=r.amount!==void 0?{amountCents:r.amount}:{packageKey:r.package??"credits500"},n=await(await e.client()).post("/billing/checkout-sessions",i);if(e.json)return e.out.printJson(n);e.out.line(`Checkout: ${n.url}`),e.out.line(`Credits: ${b(n.credits)}`),r.open!==!1&&await e.runtime.openUrl(n.url)&&e.out.info("Browser opened.")}function Xf(e){return e?I(e):"-"}async function IT(e){let t=await(await e.client()).get("/billing/subscription");if(e.json)return e.out.printJson(t);e.out.line(`Plan: ${zh[t.plan.plan]}`),e.out.line(`Projects: up to ${b(t.plan.limits.projectsPerWorkspace)}`),e.out.line(`Tracked keywords per project: up to ${b(t.plan.limits.rankKeywordsPerProject)}`),e.out.line(`AI prompts per project: up to ${b(t.plan.limits.aiPromptsPerProject)}`),e.out.line(`Pages per crawl: up to ${b(t.plan.limits.crawlPagesPerRun)}`),e.out.line(`Daily monitoring: ${t.plan.limits.dailyMonitoring?"yes":"no"}`);let r=t.subscription;if(!r)return e.out.hint("No subscription. Subscribe with: billing subscribe --plan starter|pro");e.out.line(`Subscription: ${xn[r.plan].label}, ${b(r.monthlyCredits)} credits per month`),e.out.line(`Status: ${r.status}`),e.out.line(`Period ends: ${Xf(r.currentPeriodEnd)}`),r.pendingPlan&&e.out.line(`Change to ${xn[r.pendingPlan].label} scheduled`),r.cancelAtPeriodEnd&&e.out.line(`Cancels on ${Xf(r.currentPeriodEnd)}`)}async function CT(e,t,r){let i=await(await e.client()).post("/billing/subscription-sessions",{plan:r.plan});if(e.json)return e.out.printJson(i);e.out.line(`Checkout: ${i.url}`),r.open!==!1&&await e.runtime.openUrl(i.url)&&e.out.info("Browser opened.")}async function AT(e,t,r){let i=await(await e.client()).patch("/billing/subscription",{plan:r.plan});if(e.json)return e.out.printJson(i);e.out.line(i.effective==="now"?`${xn[i.plan].label} is active immediately and the new billing period starts today.`:`Change to ${xn[i.plan].label} scheduled for the end of the billing period.`)}async function DT(e){let t=await(await e.client()).post("/billing/subscription/cancel",{});if(e.json)return e.out.printJson(t);e.out.line(`Subscription cancels on ${Xf(t.currentPeriodEnd)}. Purchased credits are kept.`)}async function RT(e){let t=await(await e.client()).post("/billing/subscription/resume",{});if(e.json)return e.out.printJson(t);e.out.line("Cancellation withdrawn, your subscription continues.")}async function TT(e,t,r){let i=await(await e.client()).post("/billing/portal-sessions",{});if(e.json)return e.out.printJson(i);e.out.line(`Customer portal: ${i.url}`),r.open!==!1&&await e.runtime.openUrl(i.url)&&e.out.info("Browser opened.")}function Hk(e,t){let r=e.command("billing").description("Balance, estimates, transactions, top-ups, and subscription");r.command("balance").description("Show balance and usage").action(v(t,kT)),ae(r.command("history").description("Show Credit transactions")).action(v(t,_T)),r.command("estimate").description("Estimate the cost of an operation").addOption(L("--operation <type>","operation",jw).makeOptionMandatory()).option("--keywords <n>","number of keywords",X(0,Yt)).addOption(L("--depth <n>","ranking depth",["10","20","30","50","100"]).default("50")).option("--prompts <n>","number of AI prompts",X(0,jt)).option("--no-ai-overview","estimate AI prompts without Google AI Overview").option("--scheduled","estimate rankings as a scheduled run through the queue").addOption(L("--mode <mode>","research mode",["keyword","domain","list"]).default("keyword")).option("--limit <n>","results per keyword or domain research (API default: 100)",X(1,pi)).option("--tasks <n>","number of queries for list refresh and search volume",X(0,Yt)).option("--max-pages <n>","maximum crawl pages",X(0,Ye)).action(v(t,ST)),r.command("top-up").description("Open Stripe Checkout for a top-up").addOption(L("--package <package>","Credit package",wT)).option("--amount <cents>","custom amount in cents",X(500,1e5)).option("--no-open","only print the checkout URL").action(v(t,$T)),r.command("plan").description("Show plan, limits, and subscription").action(v(t,IT)),r.command("subscribe").description("Open Stripe Checkout for a subscription").addOption(L("--plan <plan>","subscription plan",nr).makeOptionMandatory()).option("--no-open","only print the checkout URL").action(v(t,CT)),r.command("change-plan").description("Change the subscription plan: upgrades apply immediately, downgrades at the end of the period").addOption(L("--plan <plan>","new subscription plan",nr).makeOptionMandatory()).action(v(t,AT)),r.command("cancel").description("Cancel the subscription at the end of the billing period").action(v(t,DT)),r.command("resume").description("Withdraw the subscription cancellation").action(v(t,RT)),r.command("portal").description("Open the Stripe customer portal for payment details and invoices").option("--no-open","only print the portal URL").action(v(t,TT))}async function ET(e,t){let r=await e.client(),[i,n]=await Promise.all([r.get(`/projects/${k(t.project)}/competitors/overview`),r.get(`/projects/${k(t.project)}/competitors`)]);if(e.json){e.out.printJson({competitors:n,overview:i});return}n.length===0&&e.out.line("No competitors set yet."),i.rows.length===0?(n.length>0&&e.out.line(`Competitors: ${n.map(o=>o.domain).join(", ")}`),e.out.hint("Values appear after the next ranking check: serpel rankings run --project "+t.project)):(e.out.line(`Measured on ${i.measuredKeywords} of ${i.keywords} keywords (top ${i.depth}), as of ${I(i.checkedAt)}.`),e.out.table([{header:"Domain",value:o=>o.isProject?`${o.domain} (you)`:o.domain,max:40},{header:"Keywords",value:o=>`${o.rankedKeywords}/${i.measuredKeywords}`,align:"right"},{header:"Top 3",value:o=>b(o.top3),align:"right"},{header:"Top 10",value:o=>b(o.top10),align:"right"},{header:"Avg. position",value:o=>o.averagePosition===null?R:Y(o.averagePosition,1),align:"right"},{header:"Visibility",value:o=>Y(o.visibility,2),align:"right"},{header:"Clicks/month",value:o=>b(o.estimatedClicks),align:"right"}],i.rows)),n.length===0&&e.out.hint(`Suggestions: serpel competitors suggest --project ${t.project}`)}async function OT(e,t){let r=B(bw,{domain:t.domain}),n=await(await e.client()).post(`/projects/${k(t.project)}/competitors`,r);if(e.json){e.out.printJson(n);return}e.out.line(`Competitor saved: ${n.domain}`),e.out.fields([["ID",n.id]]),e.out.hint(`Show the comparison: serpel competitors list --project ${t.project}`)}async function PT(e,t){let r=await e.client(),i=await r.get(`/projects/${k(t.project)}/competitors`),n=t.domain.trim().toLowerCase().replace(/^https?:\/\//,"").replace(/^www\./,"").replace(/\/.*$/,""),o=i.find(a=>a.id===t.domain||a.domain===n);if(!o)throw E(`No competitor \u201C${t.domain}\u201D in this project.`,`List: serpel competitors list --project ${t.project}`);if(await r.delete(`/projects/${k(t.project)}/competitors/${k(o.id)}`),e.json){e.out.printJson({removed:!0,id:o.id,domain:o.domain});return}e.out.line(`Competitor removed: ${o.domain}`)}async function jT(e,t){let i=await(await e.client()).get(`/projects/${k(t.project)}/competitors/suggestions`);if(e.json){e.out.printJson($e(i));return}if(i.length===0){e.out.line("No suggestions. They are built from the stored search results of your ranking checks.");return}e.out.table([{header:"Domain",value:n=>n.domain,max:45},{header:"Keywords (top 20)",value:n=>b(n.keywords),align:"right"},{header:"Top 10",value:n=>b(n.top10),align:"right"},{header:"Avg. position",value:n=>n.averagePosition===null?R:Y(n.averagePosition,1),align:"right"}],i),e.out.hint(`Add one: serpel competitors add --project ${t.project} --domain ${i[0].domain}`)}function Kk(e,t,r){return e===null?R:r||t===null||e>=t?String(e):`${e} \u25B2`}async function NT(e,t){let i=await(await e.client()).get(`/projects/${k(t.project)}/competitors/comparison`);if(e.json){e.out.printJson(i);return}if(i.keywords.length===0){e.out.line("No search results stored yet."),e.out.hint("Values appear after the next ranking check: serpel rankings run --project "+t.project);return}let n=i.domains.filter(o=>!o.isProject);if(e.out.line(`Positions in the latest check (top ${i.depth}), as of ${I(i.checkedAt)}. \u25B2 = ranks ahead of you.`),e.out.table([{header:"Keyword",value:o=>o.keyword,max:36},{header:"You",value:o=>Kk(o.positions[0]?.position??null,null,!0),align:"right"},...n.map((o,a)=>({header:o.domain,value:s=>Kk(s.positions[a+1]?.position??null,s.positions[0]?.position??null,!1),align:"right"})),{header:"Search volume",value:o=>o.searchVolume===null?R:b(o.searchVolume),align:"right"}],i.keywords),n.length===0){e.out.hint(`Set competitors: serpel competitors suggest --project ${t.project}`);return}for(let o of n)e.out.line(`${o.domain}: ahead of you on ${b(o.ahead)}, behind you on ${b(o.behind)}, level on ${b(o.even)}`)}function qk(e,t){let r=e.command("competitors").description("Set competitors and compare their visibility with yours");r.command("list").description("Competitors with keywords, top 10, avg. position, visibility and estimated clicks").requiredOption("--project <id>","project ID").addHelpText("after",`
|
|
171
|
+
The values come from the same stored search results as your rankings, at no extra cost.
|
|
172
|
+
|
|
173
|
+
Examples:
|
|
174
|
+
serpel competitors list --project <id>
|
|
175
|
+
serpel competitors list --project <id> --json`).action(v(t,(i,n,o)=>ET(i,o))),r.command("compare").description("Positions of you and your competitors, keyword by keyword").requiredOption("--project <id>","project ID").addHelpText("after",`
|
|
176
|
+
This comes from the stored search results of the latest ranking check, at no extra cost.
|
|
177
|
+
|
|
178
|
+
Examples:
|
|
179
|
+
serpel competitors compare --project <id>
|
|
180
|
+
serpel competitors compare --project <id> --json`).action(v(t,(i,n,o)=>NT(i,o))),r.command("add").description("Add a competitor (at most 10 per project)").requiredOption("--project <id>","project ID").requiredOption("--domain <domain>","domain or URL, e.g. competitor.com").action(v(t,(i,n,o)=>OT(i,o))),r.command("remove").description("Remove a competitor").requiredOption("--project <id>","project ID").requiredOption("--domain <domain>","domain or ID of the competitor").action(v(t,(i,n,o)=>PT(i,o))),r.command("suggest").description("Domains that often appear in the top 20 for your keywords").requiredOption("--project <id>","project ID").action(v(t,(i,n,o)=>jT(i,o)))}var Yf=["api-url"];function LT(e,t){let r=e.apiUrl();if(t==="api-url"){e.json?e.out.printJson({key:t,value:r.url,source:r.source}):e.out.line(r.url);return}let i=e.config.load(),n=i.accounts?.[r.url]??null,o=hc(e.runtime.env.SERPEL_TOKEN_STORAGE);if(e.json){e.out.printJson({apiUrl:r.url,apiUrlSource:r.source,configuredApiUrl:i.apiUrl??null,configFile:e.config.file,tokenStorageMode:o,account:n});return}e.out.fields([["api-url",`${r.url} (${lc[r.source]})`],["Config file",e.config.file],["Token storage",o==="auto"?"Keyring, otherwise file":o==="file"?"File":"Keyring"],["Signed in",n?`${n.user.name} <${n.user.email}> (token in ${n.tokenStorage==="keyring"?"keyring":"file"})`:"no"]])}function UT(e,t,r){let i=vo(r);e.config.update(n=>{n.apiUrl=i}),e.runtime.env.SERPEL_API_URL?.trim()&&e.out.hint("Note: SERPEL_API_URL is set and takes precedence over the config file."),e.json?e.out.printJson({key:t,value:i,configFile:e.config.file}):e.out.line(`api-url set to ${i}.`)}function zT(e,t){e.config.update(r=>{delete r.apiUrl}),e.json?e.out.printJson({key:t,value:null,configFile:e.config.file}):e.out.line("api-url removed. The default https://serpel.app applies again.")}function Gk(e,t){let r=e.command("config").description("Show and change the configuration");r.command("get").description("Show the configuration (without a key: overview)").addArgument(new Ot("[key]","key").choices(Yf)).action(v(t,async(i,n)=>LT(i,n[0]||void 0))),r.command("set").description("Set a value in the config file").addArgument(new Ot("<key>","key").choices(Yf)).argument("<value>","new value, e.g. https://seo.example.com").addHelpText("after",`
|
|
181
|
+
Example:
|
|
182
|
+
serpel config set api-url https://seo.example.com`).action(v(t,async(i,n)=>UT(i,n[0]??"",n[1]??""))),r.command("unset").description("Remove a value from the config file").addArgument(new Ot("<key>","key").choices(Yf)).action(v(t,async(i,n)=>zT(i,n[0]??"")))}function Xk(e){return`${e.id} (${I(e.finishedAt??e.startedAt??e.createdAt)}, ${e.pagesCrawled} pages)`}var MT=[{header:"Severity",value:e=>lt[e.severity]??e.severity},{header:"Code",value:e=>e.code},{header:"Issue",value:e=>e.title,max:60}];function Qf(e,t,r,i){if(e.out.line(),e.out.heading(`${t} (${r.length})`),r.length===0){e.out.line("None.");return}e.out.table([...MT,...i],r)}async function VT(e,t){let r={crawlId:t.crawl,baseCrawlId:t.base};B(Sw,r);let n=await(await e.client()).get(`/projects/${k(t.project)}/crawls/compare`,r);if(e.json){e.out.printJson(n);return}if(e.out.heading("Crawl comparison"),e.out.fields([["Current crawl",Xk(n.current)],["Base crawl",n.base?Xk(n.base):"none"],["Score before",n.base?ft(n.scoreBefore):null],["Score after",ft(n.scoreAfter)],["Change",n.base?yo(n.scoreBefore,n.scoreAfter):null],["Unchanged issue types",String(n.unchangedCount)]]),!n.base){e.out.line(),e.out.line("There is no earlier completed crawl to compare this crawl with.");return}Qf(e,"New issues",n.newIssues,[{header:"Affected",value:o=>String(o.after),align:"right"}]),Qf(e,"Resolved issues",n.resolvedIssues,[{header:"Affected before",value:o=>String(o.before),align:"right"}]),Qf(e,"Changed issues",n.changedIssues,[{header:"Before",value:o=>String(o.before),align:"right"},{header:"After",value:o=>String(o.after),align:"right"},{header:"Difference",value:o=>yo(o.before,o.after),align:"right",color:(o,a)=>a.after<a.before?e.out.c.green(o):a.after>a.before?e.out.c.red(o):o}])}function Yk(e,t){e.command("compare").description("Compare two completed crawls: score, new, resolved, and changed issues").requiredOption("--project <id>","project ID").option("--crawl <id>","current crawl (default: latest completed crawl)").option("--base <id>","base crawl to compare against (default: the completed crawl before it)").addHelpText("after",`
|
|
183
|
+
Examples:
|
|
184
|
+
serpel crawl compare --project <id>
|
|
185
|
+
serpel crawl compare --project <id> --crawl <crawlId> --base <crawlId>
|
|
186
|
+
serpel crawl compare --project <id> --json`).action(v(t,(r,i,n)=>VT(r,n)))}var BT={html:"HTML",header:"HTTP header",sitemap:"Sitemap"},t_={"json-ld":"JSON-LD",microdata:"Microdata",rdfa:"RDFa"},eh=30;function Qk(e,t){return e===null||t===null?null:`${b(e)} in the HTML, ${b(t)} after rendering`}function e_(e){return e===null?null:`${b(Math.round(e))} ms`}function FT(e,t){e.out.line(),e.out.heading("Rendering"),e.out.fields([["Status",t.status==="rendered"?"rendered":"failed"],["Error",t.error],["Final URL",t.finalUrl],["Words",Qk(t.rawWordCount,t.renderedWordCount)],["Internal links",Qk(t.rawInternalLinks,t.renderedInternalLinks)],["LCP (render)",t.lcpMs===null?null:qn("lcp",t.lcpMs)],["CLS (render)",t.cls===null?null:qn("cls",t.cls)],["DOM loaded",e_(t.domContentLoadedMs)],["Load time",e_(t.loadMs)],["JavaScript errors",String(t.consoleErrorCount)]])}function JT(e){e.out.line(),e.out.heading("Rendering"),e.out.line("The page delivers almost no text but looks like a JavaScript application. It was not rendered, so its content is missing from the check.")}function ZT(e,t){e.out.line(),e.out.heading("Soft 404 check"),e.out.fields([["Classification",t.level==="high"?"very likely a soft 404":"possible soft 404"],["Confidence",`${Math.round(t.confidence*100)}%`],["Signals",t.signals.length>0?t.signals.join("; "):null]])}function WT(e){let t=[];return e.valid||t.push("invalid code"),e.relative&&t.push("relative URL"),t.length>0?t.join(", "):R}function HT(e,t){e.out.line(),e.out.heading(`hreflang (${t.length})`),e.out.table([{header:"Language",value:r=>r.hreflang},{header:"URL",value:r=>r.url,max:80},{header:"Source",value:r=>BT[r.source]??r.source},{header:"Note",value:WT}],t)}function KT(e){let t=[];for(let r of e.items){for(let i of r.errors)t.push({kind:"Error",type:r.type,path:i.path,message:i.message});for(let i of r.warnings)t.push({kind:"Warning",type:r.type,path:i.path,message:i.message})}for(let r of e.syntaxErrors)t.push({kind:"Error",type:t_[r.format]??r.format,path:"",message:`Syntax error: ${r.message}`});return t}function qT(e,t){e.out.line(),e.out.heading("Structured data"),e.out.fields([["Formats",t.formats.length>0?t.formats.map(i=>t_[i]??i).join(", "):"none found"],["Types",t.types.length>0?t.types.join(", "):null],["Errors",String(t.errorCount)],["Warnings",String(t.warningCount)],["Rich Results",t.richResultEligible?`eligible (${t.richResultTypes.join(", ")||"not specified"})`:"not eligible"]]);let r=KT(t);r.length!==0&&(e.out.line(),e.out.table([{header:"Kind",value:i=>i.kind},{header:"Type",value:i=>i.type},{header:"Field",value:i=>i.path||R},{header:"Message",value:i=>i.message,max:90}],r.slice(0,eh)),r.length>eh&&e.out.line(e.out.c.dim(` ... and ${Se(r.length-eh,"more message","more messages")} (full list with --json)`)))}function n_(e,t){t&&(t.render?FT(e,t.render):t.shellSuspected&&JT(e),t.softNotFound&&ZT(e,t.softNotFound),t.hreflang.length>0&&HT(e,t.hreflang),t.structuredData&&qT(e,t.structuredData))}var GT=["ok","redirect","client_error","server_error","failed","blocked"],XT={start:"Start URL",link:"internal link",redirect:"redirect",sitemap:"Sitemap"},th=20;function i_(e){return e.blockedByRobots?"blocked by robots.txt":e.statusCode===null?e.error?"not reachable":R:String(e.statusCode)}async function YT(e,t){let r={...se(t),status:t.status,q:t.query};B(Dw,r);let n=await(await e.client()).list(`/crawls/${k(t.crawl)}/pages`,r);Q(e,n,[{header:"Page ID",value:o=>o.id,max:36},{header:"URL",value:o=>o.url,max:70},{header:"Status",value:i_},{header:"Indexable",value:o=>ge(o.indexable)},{header:"Depth",value:o=>o.depth===null?R:String(o.depth),align:"right"},{header:"Issues",value:o=>String(o.issueCount),align:"right"},{header:"Response time",value:o=>Kr(o.responseTimeMs),align:"right"},{header:"HTML size",value:o=>zf(o.htmlBytes),align:"right"},{header:"Rendered",value:o=>ge(o.rendered)}],"No pages found with these filters.",t),!e.json&&n.data.length>0&&e.out.hint(`Details for a page: serpel crawl page <page-id> --crawl ${t.crawl}`)}function r_(e,t,r){if(e.out.line(),e.out.heading(`${t} (${r.length})`),r.length===0){e.out.line("None.");return}let i=r.slice(0,th),n=[{header:"URL",value:o=>o.url,max:80},{header:"Anchor text",value:o=>o.anchor??R,max:40}];i.some(o=>o.status!==void 0)&&n.push({header:"Status",value:o=>o.status===null||o.status===void 0?R:String(o.status)}),e.out.table(n,i),r.length>th&&e.out.line(e.out.c.dim(` ... and ${r.length-th} more (full list with --json)`))}function QT(e,t){if(e.out.line(),e.out.heading(`Issues (${t.length})`),t.length===0){e.out.line("No issues on this page.");return}e.out.table([{header:"Severity",value:r=>lt[r.severity]??r.severity},{header:"Code",value:r=>r.code},{header:"Issue",value:r=>Yc(r.code).title,max:70}],t)}async function eE(e,t,r){let n=await(await e.client()).get(`/crawls/${k(r.crawl)}/pages/${k(t)}`);if(e.json){e.out.printJson(n);return}let o=n.page;e.out.heading(o.url),e.out.fields([["Page ID",o.id],["Status",i_(o)],["Redirects to",o.redirectTarget],["Content-Type",o.contentType],["Click depth",o.depth===null?null:String(o.depth)],["Discovered via",XT[o.discoveredVia]??o.discoveredVia],["Indexable",ge(o.indexable)],["Title",o.title],["Meta description",o.metaDescription],["H1",o.h1.length>0?o.h1.join(" | "):null],["Canonical",o.canonical],["Meta robots",o.metaRobots],["X-Robots-Tag",o.xRobotsTag],["Words",o.wordCount===null?null:b(o.wordCount)],["HTML size",o.htmlBytes===null?null:zf(o.htmlBytes)],["Checked as",o.rendered?"rendered with JavaScript":"delivered HTML"],["Internal links",`${b(o.inlinks)} incoming, ${b(o.internalLinksOut)} outgoing`],["Images without alt text",String(o.imagesWithoutAlt)],["Response time",o.responseTimeMs===null?null:Kr(o.responseTimeMs)],["Error",o.error],["Fetched",I(o.fetchedAt)]]),QT(e,n.issues),n_(e,n.signals),r_(e,"Incoming links",n.inlinks),r_(e,"Outgoing links",n.outlinks)}function o_(e,t){ae(e.command("pages").description("Crawled pages of a crawl with status, indexability, and issue count").requiredOption("--crawl <id>","crawl ID").addOption(L("--status <status>","Filter by status (ok = 2xx, redirect = 3xx, client_error = 4xx, server_error = 5xx, failed = not reachable, blocked = blocked by robots.txt)",GT)).option("-q, --query <text>","search in URL and title")).addHelpText("after",`
|
|
187
|
+
Examples:
|
|
188
|
+
serpel crawl pages --crawl <crawlId>
|
|
189
|
+
serpel crawl pages --crawl <crawlId> --status client_error --limit 100
|
|
190
|
+
serpel crawl pages --crawl <crawlId> --query /blog/ --json`).action(v(t,(r,i,n)=>YT(r,n))),e.command("page").description("One crawled page in detail: metadata, issues, rendering, hreflang, structured data, incoming and outgoing links").argument("<pageId>","page ID (from crawl pages)").requiredOption("--crawl <id>","crawl ID").addHelpText("after",`
|
|
191
|
+
Example:
|
|
192
|
+
serpel crawl page <page-id> --crawl <crawlId>`).action(v(t,(r,i,n)=>eE(r,i[0]??"",n)))}function tE(e){let t=[`${Se(e.renderedPages,"page","pages")} rendered`];return e.failedPages>0&&t.push(`${b(e.failedPages)} failed`),e.suspectedShellPages>0&&t.push(`${Se(e.suspectedShellPages,"page","pages")} with almost empty HTML`),`${Gr(e.mode)}: ${t.join(", ")}`}function nE(e){return e.rendererConfigured?null:e.unavailableReason??"not set up"}function rE(e){let t=[`${Se(e.checked,"target","targets")} checked`];return e.skipped>0&&t.push(`${b(e.skipped)} skipped`),e.budgetExceeded&&t.push("time budget used up"),t.join(", ")}function iE(e){let t=[bc(e.status)];return e.status!=="unavailable"&&t.push(`${b(e.measured)} measured`),e.failed>0&&t.push(`${b(e.failed)} failed`),t.join(", ")}function nh(e){return e?[["Crawl device",e.crawlDevice?Me[e.crawlDevice]??e.crawlDevice:null],["JavaScript rendering",e.render?tE(e.render):null],["Render service",e.render?nE(e.render):null],["Render limit",e.render?.limitReached?"reached, further pages were not rendered":null],["External links and resources",e.linkCheck?rE(e.linkCheck):null],["Core Web Vitals",e.webVitals?iE(e.webVitals):null],["Core Web Vitals reason",e.webVitals?.reason??null]]:[]}async function oE(e,t){at(t);let r={};t.maxPages!==void 0&&(r.maxPages=t.maxPages),B($w,r);let i=await e.client(),n=await i.post(`/projects/${k(t.project)}/crawls`,r);if(!t.wait){if(e.json){e.out.printJson(n);return}n.alreadyRunning?e.out.line("A crawl is already running for this project."):e.out.line(`Crawl started (max. ${n.crawl.maxPages} pages).`),e.out.fields([["Job ID",n.job.id],["Crawl ID",n.crawl.id]]),e.out.hint(`Status: serpel jobs status ${n.job.id} --wait`);return}e.json||e.out.info(n.alreadyRunning?`A crawl is already running for this project. Waiting for job ${n.job.id} ...`:`Crawl started. Job ID: ${n.job.id}. Waiting for it to finish ...`);let o=await e.waitForJob(i,n.job.id,t.timeout),a=n.crawl;try{a=await i.get(`/crawls/${k(n.crawl.id)}`)}catch{}if(rt(o),e.json){e.out.printJson({crawl:a,job:o,alreadyRunning:n.alreadyRunning});return}e.out.line(`Crawl completed: ${a.pagesCrawled} pages checked.`),e.out.fields([["Job ID",o.id],["Crawl ID",a.id],["Status",Kn[a.status]??a.status],["Issues",a.stats?Vt(a.stats.issueCounts):R],["Limit reached",a.stats?.limitReached?`yes (max. ${a.maxPages} pages)`:null],...nh(a.stats)]),e.out.hint(`Show issues: serpel audit issues --project ${a.projectId}`),a.stats?.webVitals&&e.out.hint(`Show Core Web Vitals: serpel audit web-vitals ${a.id}`)}async function aE(e,t){let i=await(await e.client()).list(`/projects/${k(t.project)}/crawls`,se(t));Q(e,i,[{header:"Crawl ID",value:n=>n.id,max:36},{header:"Status",value:n=>Kn[n.status]??n.status},{header:"Started",value:n=>I(n.startedAt??n.createdAt)},{header:"Finished",value:n=>I(n.finishedAt)},{header:"Pages",value:n=>`${n.pagesCrawled}/${n.maxPages}`,align:"right"},{header:"Issues (E / W / N)",value:n=>Ys(n.stats?.issueCounts)},{header:"Score",value:n=>n.stats?.score!==null&&n.stats?.score!==void 0?String(n.stats.score):R,align:"right"},{header:"Job ID",value:n=>n.jobId??R,max:36}],"No crawls for this project yet.",t)}function sE(e){let t=Object.entries(e).sort(([r],[i])=>r.localeCompare(i));return t.length>0?t.map(([r,i])=>`${r}: ${b(i)}`).join(", "):R}function cE(e){return`${Y(e/1e3,1)} s`}function lE(e,t){let r=t.stats,i=r?.aiCrawlerAccess?.filter(n=>n.allowed).length??0;e.out.heading(`Crawl ${t.id}`),e.out.fields([["Project ID",t.projectId],["Status",Kn[t.status]??t.status],["Start URL",t.startUrl],["Job ID",t.jobId],["Created",I(t.createdAt)],["Started",t.startedAt?I(t.startedAt):null],["Finished",t.finishedAt?I(t.finishedAt):null],["Duration",r?cE(r.durationMs):null],["Pages",`${t.pagesCrawled} of max. ${t.maxPages}${r?.limitReached?" (limit reached)":""}`],["Score",r?.score!==null&&r?.score!==void 0?ft(r.score):null],["Issues",r?Vt(r.issueCounts):null],["Status codes",r?sE(r.statusCodes):null],["Indexable",r?`${b(r.indexablePages)} of ${Se(r.htmlPages,"HTML page","HTML pages")}`:null],["Response time (avg.)",r?Kr(r.avgResponseMs):null],["Max click depth",r?String(r.maxDepth):null],["Crawl delay (robots.txt)",r?.robotsDelayMs?Kr(r.robotsDelayMs):null],["robots.txt",t.robotsTxtStatus!==null?`HTTP ${t.robotsTxtStatus}`:null],["Sitemaps",t.sitemapUrls.length>0?t.sitemapUrls.join(", "):null],["llms.txt",r&&r.llmsTxtStatus!==void 0?ac(r.llmsTxtStatus):null],["AI crawlers allowed",r?.aiCrawlerAccess?`${i} of ${r.aiCrawlerAccess.length}`:null],...nh(r),["Error",t.error]])}async function uE(e,t){let i=await(await e.client()).get(`/crawls/${k(t)}`);if(e.json){e.out.printJson(i);return}lE(e,i),i.status==="completed"&&(e.out.hint(`Issues: serpel audit issues --project ${i.projectId} --crawl ${i.id}`),e.out.hint(`Pages: serpel crawl pages --crawl ${i.id}`),i.stats?.webVitals&&e.out.hint(`Core Web Vitals: serpel audit web-vitals ${i.id}`))}function a_(e,t){let r=e.command("crawl").description("Start, list, and compare website crawls and view crawled pages");ot(r.command("start").description("Start a crawl (runs asynchronously in the worker and prints the job ID)").requiredOption("--project <id>","project ID").option("--max-pages <n>",`maximum number of pages (1 to ${Ye}, default: project setting)`,X(1,Ye)),"the crawl").addHelpText("after",`
|
|
193
|
+
The crawler analyses the HTML delivered by the server. Pages that are delivered almost empty
|
|
194
|
+
are rendered with JavaScript, depending on the project setting (serpel projects update <id>
|
|
195
|
+
--render-mode auto|always|never). It respects robots.txt and limits concurrency and
|
|
196
|
+
page count. At the end it measures the Core Web Vitals of the most important pages.
|
|
197
|
+
|
|
198
|
+
Examples:
|
|
199
|
+
serpel crawl start --project <id>
|
|
200
|
+
serpel crawl start --project <id> --max-pages 50 --wait
|
|
201
|
+
serpel crawl start --project <id> --wait --timeout 600 --json`).action(v(t,(i,n,o)=>oE(i,o))),ae(r.command("list").description("List the crawls of a project").requiredOption("--project <id>","project ID")).action(v(t,(i,n,o)=>aE(i,o))),r.command("show").description("Details of a crawl: status, pages, score, status codes, rendering, link check, Core Web Vitals, robots.txt, sitemaps, llms.txt").argument("<crawlId>","crawl ID").addHelpText("after",`
|
|
202
|
+
Examples:
|
|
203
|
+
serpel crawl show <crawlId>
|
|
204
|
+
serpel crawl show <crawlId> --json`).action(v(t,(i,n)=>uE(i,n[0]??""))),o_(r,t),Yk(r,t)}import s_ from"node:fs";import c_ from"node:path";async function dE(e,t){if(t.list&&t.type!=="keywords")throw E("--list can only be used with --type keywords.");if(t.crawl&&t.type!=="issues")throw E("--crawl can only be used with --type issues.");let r={type:t.type,format:t.format,crawlId:t.crawl,listId:t.list};B(Rw,Object.fromEntries(Object.entries(r).filter(([,s])=>s!==void 0)));let n=await(await e.client()).download(`/projects/${k(t.project)}/export`,r);if(!t.output){e.runtime.stdout.write(Buffer.from(n.bytes).toString("utf8"));return}let o=c_.resolve(t.output);try{s_.mkdirSync(c_.dirname(o),{recursive:!0}),s_.writeFileSync(o,n.bytes)}catch(s){throw new z("write_failed",`Cannot write file: ${o} (${s.message}).`,P.unexpected)}let a={path:o,bytes:n.bytes.byteLength,type:t.type,format:t.format,contentType:n.contentType,serverFileName:n.fileName};e.json?e.out.printJson(a):e.out.info(`Export saved: ${o} (${a.bytes} bytes).`)}function l_(e,t){e.command("export").description("Export issues, keywords, rankings, or tasks as CSV or JSON").requiredOption("--project <id>","project ID").addOption(new Xe("--type <type>","data type").choices(Oo).makeOptionMandatory()).addOption(new Xe("--format <format>","file format").choices(Po).default("csv")).option("-o, --output <file>","write to a file instead of stdout").option("--crawl <id>","crawl for --type issues (default: last completed crawl)").option("--list <id>","keyword list for --type keywords").addHelpText("after",`
|
|
205
|
+
Without --output, the file content is written to stdout unchanged. With --output, a
|
|
206
|
+
confirmation appears on stderr, and with --json the path and size are written as JSON to
|
|
207
|
+
stdout instead.
|
|
208
|
+
|
|
209
|
+
Examples:
|
|
210
|
+
serpel export --project <id> --type issues --format csv > issues.csv
|
|
211
|
+
serpel export --project <id> --type rankings --format json --output rankings.json
|
|
212
|
+
serpel export --project <id> --type keywords --list <listId> -o keywords.csv`).action(v(t,(r,i,n)=>dE(r,n)))}function pE(e){return e.configured?e.connected?"connected":"not connected":"not set up"}function mE(e){return`${e} ${e===1?"mapping":"mappings"}`}function u_(e){return e.mappings.filter(t=>t.target&&!t.manual).length}function d_(e,t){e.out.line(e.out.c.bold(Xt[t.provider])),e.out.table([{header:"Project",value:r=>r.projectName,max:30},{header:"Domain",value:r=>r.domain,max:30},{header:"Area",value:r=>r.capability==="search"?"Search data":"Web analytics"},{header:"Mapped to",value:r=>r.manual?"set manually in the project":r.target??"no match",max:50}],t.mappings)}async function fE(e){return(await e.client()).get("/integrations")}async function hE(e,t){let r=await fE(e);if(e.json){e.out.printJson($e(r));return}e.out.table([{header:"Integration",value:i=>Xt[i.provider]},{header:"Status",value:i=>pE(i)},{header:"Mappings",value:i=>i.connected?String(u_(i)):"-",align:"right"},{header:"Last synced",value:i=>i.lastSyncedAt?I(i.lastSyncedAt):"-"}],r);for(let i of r)i.configurationHint&&e.out.hint(`${Xt[i.provider]}: ${i.configurationHint}`),i.lastError&&e.out.warn(`${Xt[i.provider]}: ${i.lastError}`);if(t.details)for(let i of r.filter(n=>n.connected))e.out.line(),d_(e,i);else r.some(i=>i.connected)&&e.out.hint("Mappings per project: serpel integrations status --details")}function p_(e,t){if(e.json){e.out.printJson(t);return}e.out.line(`${Xt[t.provider]} connected, ${mE(u_(t))}.`),e.out.line(),d_(e,t),t.lastError&&e.out.warn(t.lastError)}async function rh(e,t){let r=(await Dt(e.runtime,t)).trim();if(r.length<16)throw E("The API key is too short or missing.","Write the key to a file or pass it through stdin with --api-key-file -.");return e.out.addSecret(r),r}async function ih(e,t,r){let i=await e.client();p_(e,await i.post(`/integrations/${t}`,r))}async function gE(e,t){let i=await(await e.client()).post("/integrations/google/authorize");if(e.json){e.out.printJson(i);return}e.out.line("Open this address in the browser where you are signed in to the dashboard, and grant access to Search Console and Analytics:"),e.out.line(i.authorizationUrl),t.open&&await e.runtime.openUrl(i.authorizationUrl)&&e.out.info("Browser opened."),e.out.hint("Then check: serpel integrations status --details")}async function yE(e,t){let r=await e.client();p_(e,await r.post(`/integrations/${t.provider}/sync`))}async function vE(e,t){if(ue(t,`${Xt[t.provider]} will be disconnected, and all projects connected through it will lose this data.`,`serpel integrations disconnect --provider ${t.provider}`),await(await e.client()).delete(`/integrations/${t.provider}`),e.json){e.out.printJson({disconnected:!0,provider:t.provider});return}e.out.line(`${Xt[t.provider]} disconnected.`)}function m_(e,t){let r=e.command("integrations").description("Account integrations: connect once, use for all projects");r.command("status").description("Show connected integrations and how they map to your projects").option("--details","show the mapping per project").addHelpText("after",`
|
|
213
|
+
Examples:
|
|
214
|
+
serpel integrations status
|
|
215
|
+
serpel integrations status --details --json`).action(v(t,(i,n,o)=>hE(i,o))),r.command("connect-google").description("Connect Google Search Console and Google Analytics for all projects (authorise in the browser)").option("--no-open","only print the address, do not open the browser").action(v(t,(i,n,o)=>gE(i,o))),r.command("connect-bing").description("Connect Bing Webmaster Tools for all projects").requiredOption("--api-key-file <path>","file containing the API key, or - for stdin").action(v(t,async(i,n,o)=>ih(i,"bing",{apiKey:await rh(i,o.apiKeyFile)}))),r.command("connect-posthog").description("Connect PostHog for all projects").requiredOption("--api-key-file <path>","file containing the personal API key, or - for stdin").addOption(L("--region <region>","PostHog Cloud",["eu","us"]).default("eu")).option("--host <url>","own instance instead of Cloud").addHelpText("after",`
|
|
216
|
+
The key needs \u201CQuery: Read\u201D and \u201CProject: Read\u201D, plus \u201COrganization: Read\u201D for multiple organisations.`).action(v(t,async(i,n,o)=>ih(i,"posthog",{host:o.host??o.region,apiKey:await rh(i,o.apiKeyFile)}))),r.command("connect-plausible").description("Connect Plausible Analytics for all projects").requiredOption("--api-key-file <path>","file containing the Stats API key, or - for stdin").option("--host <url>","own instance, default https://plausible.io").action(v(t,async(i,n,o)=>ih(i,"plausible",{apiKey:await rh(i,o.apiKeyFile),...o.host?{host:o.host}:{}}))),r.command("sync").description("Re-map projects, e.g. after new properties or projects").addOption(L("--provider <integration>","integration",ui).makeOptionMandatory()).addHelpText("after",`
|
|
217
|
+
Example:
|
|
218
|
+
serpel integrations sync --provider google`).action(v(t,(i,n,o)=>yE(i,o))),r.command("disconnect").description("Disconnect an integration, connected projects lose this data").addOption(L("--provider <integration>","integration",ui).makeOptionMandatory()).option("--yes","confirm disconnecting").action(v(t,(i,n,o)=>vE(i,o)))}function bE(e){if(e.status==="failed")return e.lastError??R;if(e.status==="running"&&e.progress){let t=e.progress.total!==null?` of ${e.progress.total}`:"";return`${e.progress.current}${t}${e.progress.message?`, ${e.progress.message}`:""}`}return e.status==="cancelled"?e.startedAt?"cancelled while running":"cancelled before starting":R}function wE(e){let t=`sent to ${Se(e.recipientCount,"recipient","recipients")}`;return e.error?e.emailedAt?`${t}, ${e.error}`:`not sent: ${e.error}`:t}function kE(e){let t=e.cached?", from cache":"";return e.mode==="keyword"?`${Se(e.itemCount,"idea","ideas")} for \u201C${e.query}\u201D${t}`:e.mode==="domain"?`${Se(e.itemCount,"keyword","keywords")} for ${e.query}${t}`:`${Se(e.itemCount,"keyword","keywords")} from your list evaluated${t}`}function _E(e){return e.job?bE(e.job):e.reportEmail?wE(e.reportEmail):e.keywordResearch?kE(e.keywordResearch):R}function xE(e){return e.reportEmail?e.reportEmail.reportId:e.keywordResearch?e.keywordResearch.runId:e.id}function SE(e,t,r){let{c:i}=e.out;return t.status==="succeeded"?i.green(r):t.status==="failed"?i.red(r):t.status==="cancelled"?i.yellow(r):r}function $E(e,t){let{summary:r}=t;e.out.heading(`Activity in the last ${Se(r.days,"day","days")}`),e.out.fields([["Started",b(r.started)],["Running now",r.running>0?b(r.running):null],["Failed",b(r.failed)],["Cost",Ae(r.costUsd)]]),r.byType.length>0&&e.out.table([{header:"Type",value:i=>Wc[i.type]??i.type},{header:"Entries",value:i=>b(i.entries),align:"right"},{header:"Failed",value:i=>b(i.failed),align:"right"},{header:"Cost",value:i=>Ae(i.costUsd),align:"right"}],r.byType),e.out.line()}async function IE(e,t){let i=await(await e.client()).get(`/projects/${k(t.project)}/activity`,{...se(t),days:t.days});if(e.json){e.out.printJson(i);return}if($E(e,i),i.entries.length===0){e.out.info(i.pagination.total>0?`No entries on this page (${i.pagination.total} in total).`:"No activity entries yet.");return}e.out.table([{header:"Time",value:n=>I(n.occurredAt)},{header:"Type",value:n=>Wc[n.type]??n.type},{header:"Status",value:n=>We[n.status]??n.status,color:(n,o)=>SE(e,o,n)},{header:"Details",value:_E,max:70},{header:"Duration",value:n=>oc(n.durationMs),align:"right"},{header:"Cost",value:n=>n.costUsd>0?Ae(n.costUsd):R,align:"right"},{header:"ID",value:xE,max:36}],i.entries),e.out.paginationHint(i.pagination,i.entries.length,t.page)}function f_(e,t){ae(e.command("activity").description("Project activity: jobs, reports sent by email, and keyword research with costs").requiredOption("--project <id>","project ID").option("--days <n>",`time range of the figures in days (1 to ${ir})`,X(1,ir),Ao)).addHelpText("after",`
|
|
219
|
+
The figures at the top cover the last --days days, the list below shows the whole activity
|
|
220
|
+
history in descending time order and can be paged with --page or --offset. In the ID column,
|
|
221
|
+
jobs show the job ID, reports the report ID, and research the research ID. The Duration
|
|
222
|
+
column measures jobs from start to finish, reports as the delivery to all recipients, and
|
|
223
|
+
research as the query; older entries without a measurement show \u201C-\u201D.
|
|
224
|
+
|
|
225
|
+
Examples:
|
|
226
|
+
serpel jobs activity --project <id>
|
|
227
|
+
serpel jobs activity --project <id> --days 30 --limit 20 --page 2
|
|
228
|
+
serpel jobs activity --project <id> --json`).action(v(t,(r,i,n)=>IE(r,n)))}function g_(e){if(!e.progress)return R;let t=e.progress.total!==null?`/${e.progress.total}`:"";return`${e.progress.current}${t}`}function y_(e,t,r){let{c:i}=e.out;return t.status==="succeeded"?i.green(r):t.status==="failed"?i.red(r):t.status==="cancelled"?i.yellow(r):r}function h_(e,t){if(e.out.heading(`${_t[t.type]??t.type} ${t.id}`),e.out.fields([["Status",y_(e,t,We[t.status]??t.status)+(t.cancelRequested&&t.status==="running"?" (cancellation requested)":"")],["Project ID",t.projectId],["Progress",t.progress?`${g_(t)}${t.progress.message?` (${t.progress.message})`:""}`:null],["Attempts",`${t.attempts} of ${t.maxAttempts}`],["Cost",Ae(t.costUsd)],["Created",I(t.createdAt)],["Started",t.startedAt?I(t.startedAt):null],["Finished",t.finishedAt?I(t.finishedAt):null],["Last error",t.lastError]]),t.result&&Object.keys(t.result).length>0){e.out.line(e.out.c.dim("Result:"));for(let[r,i]of Object.entries(t.result))e.out.line(` ${r}: ${typeof i=="object"?JSON.stringify(i):String(i)}`)}}async function CE(e,t,r){at(r);let i=await e.client(),n;r.wait?(n=await e.waitForJob(i,t,r.timeout),n.status!=="succeeded"&&(e.json||h_(e,n),rt(n))):n=await i.get(`/jobs/${k(t)}`),e.json?e.out.printJson(n):h_(e,n)}async function AE(e,t){let i=await(await e.client()).list("/jobs",{...se(t),projectId:t.project,status:t.status,type:t.type});Q(e,i,[{header:"Job ID",value:n=>n.id,max:36},{header:"Type",value:n=>_t[n.type]??n.type},{header:"Status",value:n=>We[n.status]??n.status,color:(n,o)=>y_(e,o,n)},{header:"Progress",value:g_,align:"right"},{header:"Cost",value:n=>Ae(n.costUsd),align:"right"},{header:"Project ID",value:n=>n.projectId??R,max:36},{header:"Created",value:n=>I(n.createdAt)},{header:"Finished",value:n=>I(n.finishedAt)}],"No jobs found.",t)}async function DE(e,t){let i=await(await e.client()).post(`/jobs/${k(t)}/cancel`);if(e.json){e.out.printJson(i);return}i.status==="cancelled"?e.out.line(`Job ${i.id} was cancelled.`):i.status==="succeeded"||i.status==="failed"?e.out.line(`Job ${i.id} has already finished (${We[i.status]}).`):e.out.line(`Cancellation requested for job ${i.id}. The worker stops it at the next checkpoint.`)}async function RE(e,t){let i=await(await e.client()).post(`/jobs/${k(t)}/retry`);if(e.json){e.out.printJson(i);return}e.out.line(`${_t[i.type]??i.type} is being run again.`),e.out.fields([["Job ID",i.id],["Status",We[i.status]??i.status]]),e.out.hint(`Status: serpel jobs status ${i.id} --wait`)}function v_(e,t){let r=e.command("jobs").description("Track background jobs (crawls, ranking checks, AI visibility, monitoring)");ot(r.command("status").description("Show the status of a job").argument("<job-id>","job ID"),"the job").addHelpText("after",`
|
|
229
|
+
With --wait, the command exits with exit code 8 if the job fails or is cancelled,
|
|
230
|
+
and with exit code 10 if --timeout is reached (the job keeps running then).`).action(v(t,(i,n,o)=>CE(i,n[0]??"",o))),ae(r.command("list").description("List jobs").option("--project <id>","only jobs of this project").addOption(L("--status <status>","filter by status",Co)).addOption(L("--type <type>","filter by type",ii))).action(v(t,(i,n,o)=>AE(i,o))),r.command("cancel").description("Cancel a running or queued job").argument("<job-id>","job ID").action(v(t,(i,n)=>DE(i,n[0]??""))),r.command("retry").description("Restart a failed or cancelled job").argument("<job-id>","job ID").addHelpText("after",`
|
|
231
|
+
Only failed or cancelled jobs can be restarted, otherwise the command exits
|
|
232
|
+
with exit code 6.
|
|
233
|
+
|
|
234
|
+
Examples:
|
|
235
|
+
serpel jobs retry <job-id>
|
|
236
|
+
serpel jobs retry <job-id> --json`).action(v(t,(i,n)=>RE(i,n[0]??""))),f_(r,t)}import{randomUUID as QE}from"node:crypto";import{randomUUID as TE}from"node:crypto";import EE from"node:path";var OE=12e4,PE=["keyword","volume","difficulty","cpc","created"];function jE(e){let t=e.sourceDetail?`${e.source} (${e.sourceDetail})`:e.source;return e.fetchedAt?`${t}, ${I(e.fetchedAt)}`:t}async function NE(e,t,r){let n=await(await e.client()).list(`/keyword-lists/${k(t)}/items`,{...se(r),q:r.query,sort:r.sort}),o=[{header:"Keyword",value:a=>a.keyword,max:50},{header:"Market",value:a=>Le(a.country,a.language)},{header:"Search volume",value:a=>b(a.searchVolume),align:"right"},{header:"CPC",value:a=>Y(a.cpc),align:"right"},{header:"Ads competition",value:a=>Qs(a.adsCompetition,a.adsCompetitionLevel)}];n.data.some(a=>a.keywordDifficulty!==null)&&o.push({header:"KD (provider)",value:a=>b(a.keywordDifficulty),align:"right"}),o.push({header:"Intent",value:a=>ec(a.intent,a.intentSource)},{header:"Source, fetched",value:jE,max:45},{header:"ID",value:a=>a.id,max:36}),Q(e,n,o,yn(r.query,{empty:"The list has no keywords yet.",noMatch:a=>`No keyword in the list matches \u201C${a}\u201D.`}),r),!e.json&&n.data.length>0&&e.out.hint("Ads competition is the advertising competition in Google Ads, not organic SEO difficulty.")}async function LE(e,t,r){let i=At(r.keyword);if(i.length===0)throw E('Provide at least one keyword with --keyword "...".');let n={keywords:i};r.researchRun!==void 0&&(n.researchRunId=r.researchRun),B(hw,n);let a=await(await e.client()).post(`/keyword-lists/${k(t)}/items`,n);if(e.json){e.out.printJson(a);return}e.out.line(`Keywords added: ${a.inserted} new, ${a.updated} updated.`),r.researchRun===void 0&&e.out.hint(`Without --research-run, new keywords have no metrics yet. Fetch them with: serpel keywords refresh ${t}`)}async function UE(e,t,r,i){if(ue(i,"The keyword is removed from the list together with its metrics.",`serpel keywords items-remove ${t} ${r}`),await(await e.client()).delete(`/keyword-lists/${k(t)}/items/${k(r)}`),e.json){e.out.printJson({removed:!0,listId:t,itemId:r});return}e.out.line(`Keyword ${r} removed from the list.`)}async function zE(e,t,r){let i=await Dt(e.runtime,r.file);if(!i.trim())throw E("The CSV file is empty.");let n={csv:i};r.file!==qf&&(n.fileName=EE.basename(r.file)),r.country!==void 0&&(n.country=r.country),r.language!==void 0&&(n.language=r.language),B(gw,n);let a=await(await e.client()).post(`/keyword-lists/${k(t)}/import`,n);if(e.json){e.out.printJson(a);return}e.out.line(`CSV imported: ${b(a.rows)} rows, ${b(a.inserted)} new, ${b(a.updated)} updated.`),e.out.fields([["Metrics from the file",ge(a.withMetrics)]]),a.withMetrics||e.out.hint(`The file contained no metrics. Fetch them with: serpel keywords refresh ${t}`)}async function ME(e,t,r){let i=await e.client();e.json||e.out.info("Fetching metrics from the data provider, this can take up to two minutes ...");let o=(await i.request("POST",`/keyword-lists/${k(t)}/refresh`,{body:{},timeoutMs:Math.max(e.httpTimeoutMs(),OE),idempotencyKey:r.idempotencyKey??TE()})).body.data;if(e.json){e.out.printJson(o);return}e.out.line(`Metrics updated for ${b(o.updated)} ${o.updated===1?"keyword":"keywords"}.`),e.out.info(`${o.credits.charged} credits charged. New balance: ${o.credits.balance}.`)}function b_(e,t){ae(e.command("items").description("Show the keywords of a list").argument("<listId>","keyword list ID").option("-q, --query <text>","search by keyword").addOption(L("--sort <field>","sort order",PE))).action(v(t,(r,i,n)=>NE(r,i[0]??"",n))),e.command("items-add").description("Add keywords to a list").argument("<listId>","keyword list ID").option("--keyword <keyword>","keyword (repeat for several)",it).option("--research-run <runId>","take the metrics from a saved research run").addHelpText("after",`
|
|
237
|
+
Existing keywords are updated instead of being created twice. A list holds at most
|
|
238
|
+
${Yt} keywords.
|
|
239
|
+
|
|
240
|
+
Examples:
|
|
241
|
+
serpel keywords items-add <listId> --keyword "running shoes" --keyword "trail shoes"
|
|
242
|
+
serpel keywords items-add <listId> --keyword "running shoes" --research-run <run-id>`).action(v(t,(r,i,n)=>LE(r,i[0]??"",n))),e.command("items-remove").description("Remove a keyword from a list").argument("<listId>","keyword list ID").argument("<itemId>","item ID (ID column in keywords items)").option("--yes","confirm removal (required)").addHelpText("after",`
|
|
243
|
+
Example:
|
|
244
|
+
serpel keywords items-remove <listId> <itemId> --yes`).action(v(t,(r,i,n)=>UE(r,i[0]??"",i[1]??"",n))),e.command("import").description("Import keywords from a CSV file into a list").argument("<listId>","keyword list ID").requiredOption("--file <path>","CSV file (at most 2 MB), - reads from stdin").option("--country <code>","target country of the keywords (default: project setting)").option("--language <code>","language of the keywords (default: project setting)").addHelpText("after",`
|
|
245
|
+
With a header row (e.g. keyword, search volume, cpc, kd) the server maps the columns and
|
|
246
|
+
takes over the metrics; without a header row the first column is treated as the keyword.
|
|
247
|
+
Comma, semicolon and tab separators are detected automatically.
|
|
248
|
+
|
|
249
|
+
Examples:
|
|
250
|
+
serpel keywords import <listId> --file keywords.csv
|
|
251
|
+
serpel keywords import <listId> --file - --country AT < export.csv`).action(v(t,(r,i,n)=>zE(r,i[0]??"",n))),e.command("refresh").description("Fetch the metrics of all keywords in a list from the data provider again (incurs costs)").argument("<listId>","keyword list ID").option("--idempotency-key <key>","stable key for a safe retry").addHelpText("after",`
|
|
252
|
+
The request runs synchronously and can take up to two minutes. It does not create a job,
|
|
253
|
+
so there is no --wait.
|
|
254
|
+
|
|
255
|
+
Example:
|
|
256
|
+
serpel keywords refresh <listId>`).action(v(t,(r,i,n)=>ME(r,i[0]??"",n)))}function oh(e,t){e.out.heading(t.name),e.out.fields([["ID",t.id],["Project ID",t.projectId],["Description",t.description],["Keywords",b(t.itemCount)],["Created",I(t.createdAt)],["Updated",I(t.updatedAt)]])}async function VE(e,t){let i=await(await e.client()).list("/keyword-lists",{...se(t),projectId:t.project,q:t.query});Q(e,i,[{header:"ID",value:n=>n.id,max:36},{header:"Name",value:n=>n.name,max:40},{header:"Keywords",value:n=>b(n.itemCount),align:"right"},{header:"Project ID",value:n=>n.projectId,max:36},{header:"Updated",value:n=>I(n.updatedAt)}],yn(t.query,{empty:"No keyword lists yet.",noMatch:n=>`No keyword list matches \u201C${n}\u201D.`}),t)}async function BE(e,t){let i=await(await e.client()).get(`/keyword-lists/${k(t)}`);if(e.json){e.out.printJson(i);return}oh(e,i),e.out.hint(`Show keywords: serpel keywords items ${i.id}`)}async function FE(e,t){let r={projectId:t.project,name:t.name};t.description!==void 0&&(r.description=t.description),B(mw,r);let n=await(await e.client()).post("/keyword-lists",r);if(e.json){e.out.printJson(n);return}e.out.line("Keyword list created:"),oh(e,n),e.out.hint(`Add keywords: serpel keywords items-add ${n.id} --keyword "..."`)}async function JE(e,t,r){let i={};if(r.name!==void 0&&(i.name=r.name),r.description===!1?i.description=null:r.description!==void 0&&(i.description=r.description),Object.keys(i).length===0)throw E("Nothing to change. Provide --name, --description or --no-description.");B(fw,i);let o=await(await e.client()).patch(`/keyword-lists/${k(t)}`,i);if(e.json){e.out.printJson(o);return}e.out.line("Keyword list updated:"),oh(e,o)}async function ZE(e,t,r){ue(r,"Deleting permanently removes the keyword list with all its keywords.",`serpel keywords list-delete ${t}`);let i=await e.client(),n=await i.get(`/keyword-lists/${k(t)}`);if(await i.delete(`/keyword-lists/${k(t)}`),e.json){e.out.printJson({deleted:!0,id:n.id,name:n.name,projectId:n.projectId,itemCount:n.itemCount});return}e.out.line(`Keyword list deleted: ${n.name} (${b(n.itemCount)} keywords)`),e.out.fields([["ID",n.id]])}function w_(e,t){ae(e.command("lists").description("List keyword lists").option("--project <id>","only lists of this project").option("-q, --query <text>","search by name")).action(v(t,(r,i,n)=>VE(r,n))),e.command("list-show").description("Show a keyword list with its description and number of keywords").argument("<listId>","keyword list ID").addHelpText("after",`
|
|
257
|
+
Example:
|
|
258
|
+
serpel keywords list-show <listId>`).action(v(t,(r,i)=>BE(r,i[0]??""))),e.command("list-create").description("Create a keyword list in a project").requiredOption("--project <id>","project ID").requiredOption("--name <name>","name of the list").option("--description <text>","description").addHelpText("after",`
|
|
259
|
+
Examples:
|
|
260
|
+
serpel keywords list-create --project <id> --name "Running shoes"
|
|
261
|
+
serpel keywords list-create --project <id> --name "Guides" --description "Topics for the blog"`).action(v(t,(r,i,n)=>FE(r,n))),e.command("list-update").alias("list-rename").description("Rename a keyword list or change its description").argument("<listId>","keyword list ID").option("--name <name>","new name").option("--description <text>","new description").option("--no-description","remove the description").addHelpText("after",`
|
|
262
|
+
Examples:
|
|
263
|
+
serpel keywords list-update <listId> --name "Running shoes 2026"
|
|
264
|
+
serpel keywords list-rename <listId> --name "Running shoes 2026"
|
|
265
|
+
serpel keywords list-update <listId> --no-description`).action(v(t,(r,i,n)=>JE(r,i[0]??"",n))),e.command("list-delete").description("Delete a keyword list with all its keywords").argument("<listId>","keyword list ID").option("--yes","confirm deletion (required)").addHelpText("after",`
|
|
266
|
+
Example:
|
|
267
|
+
serpel keywords list-delete <listId> --yes`).action(v(t,(r,i,n)=>ZE(r,i[0]??"",n)))}var WE={keyword:"Keyword",list:"Keyword list",domain:"Domain"},ah=15;function sh(e){return WE[e]??e}function HE(e){let t=[{header:"Keyword",value:r=>r.keyword,max:50},{header:"Origin",value:r=>Yw[r.relation]??r.relation},{header:"Search volume",value:r=>b(r.searchVolume),align:"right"},{header:"CPC",value:r=>Y(r.cpc),align:"right"},{header:"Ads competition",value:r=>Qs(r.adsCompetition,r.adsCompetitionLevel)}];return e.items.some(r=>r.keywordDifficulty!==null)&&t.push({header:"KD (provider)",value:r=>b(r.keywordDifficulty),align:"right"}),t.push({header:"Intent",value:r=>ec(r.intent,r.intentSource)},{header:"Topic group",value:r=>r.cluster??R,max:30}),t}function KE(e,t){if(t.clusters.length===0)return;let{c:r}=e.out;e.out.line(),e.out.line(r.bold("Topic groups")+r.dim(" (estimate from our own heuristic)"));for(let i of t.clusters.slice(0,ah)){let n=i.totalVolume!==null?`, search volume ${b(i.totalVolume)}`:"";e.out.line(`- ${i.label}: ${i.keywordCount} keywords${n}`)}t.clusters.length>ah&&e.out.line(r.dim(` ... and ${t.clusters.length-ah} more`))}function qE(e,t){e.out.hint("Ads competition: competition for ads in Google Ads (0 to 1), not organic SEO difficulty."),t.items.some(r=>r.keywordDifficulty!==null)?e.out.hint(`KD: keyword difficulty according to ${t.provider.name} (0 to 100), specific to the provider.`):t.items.length>0&&e.out.hint("The provider did not supply keyword difficulty, so it is not shown."),t.items.some(r=>r.intentSource==="estimate")&&e.out.hint('Intent marked "(estimate)" is our own heuristic estimate, not provider data.');for(let r of t.notes)e.out.hint(`Note: ${r}`)}function _c(e,t){e.out.heading(`Keyword research: ${t.query} (${sh(t.mode)})`),e.out.fields([["Market",Hn(t.country,t.language)],["Data source",`${t.provider.name}${t.provider.endpoint?` (${t.provider.endpoint})`:""}`],["Fetched",`${I(t.fetchedAt)}${t.cached?" (from cache)":""}`],["Cost",t.costUsd!==null?Ae(t.costUsd):null],["Run ID",t.runId]]),e.out.line(),t.items.length===0?e.out.line("No keywords found."):(e.out.table(HE(t),t.items),t.totalCount!==null&&t.totalCount>t.items.length&&e.out.hint(`The provider reports ${b(t.totalCount)} results, ${b(t.items.length)} are shown (--limit).`)),KE(e,t),qE(e,t)}var GE=20,k_=100;async function XE(e,t){let i=await(await e.client()).get("/keywords/research",{projectId:t.project,limit:t.limit});Q(e,$e(i),[{header:"Run ID",value:n=>n.id,max:36},{header:"Mode",value:n=>sh(n.mode)},{header:"Query",value:n=>n.query,max:40},{header:"Market",value:n=>Le(n.country,n.language)},{header:"Keywords",value:n=>b(n.itemCount),align:"right"},{header:"Source",value:n=>n.provider},{header:"Cache",value:n=>ge(n.cached)},{header:"Cost",value:n=>Ae(n.costUsd),align:"right"},{header:"Duration",value:n=>oc(n.durationMs),align:"right"},{header:"Fetched",value:n=>I(n.fetchedAt)}],'No research yet. Start with: serpel keywords research "keyword"'),!e.json&&i.length>0&&e.out.hint("Show a result again (free of charge): serpel keywords research-show <run-id>")}async function YE(e,t){let i=await(await e.client()).get(`/keywords/research/${k(t)}`);if(e.json){e.out.printJson(i);return}_c(e,i),e.out.hint(`Add to a list with metrics: serpel keywords items-add <listId> --research-run ${i.runId} --keyword "..."`)}function __(e,t){e.command("history").description("List saved keyword research runs (newest first)").option("--project <id>","only research runs of this project").option("--limit <n>",`number of entries (1 to ${k_})`,X(1,k_),GE).addHelpText("after",`
|
|
268
|
+
Examples:
|
|
269
|
+
serpel keywords history
|
|
270
|
+
serpel keywords history --project <id> --limit 50 --json`).action(v(t,(r,i,n)=>XE(r,n))),e.command("research-show").description("Show a saved research result again without querying the provider").argument("<runId>","run ID (from keywords history or keywords research)").addHelpText("after",`
|
|
271
|
+
Examples:
|
|
272
|
+
serpel keywords research-show <run-id>
|
|
273
|
+
serpel keywords research-show <run-id> --json`).action(v(t,(r,i)=>YE(r,i[0]??"")))}var eO=12e4,x_=1e3;function tO(e){return e.split(",").map(t=>t.trim()).filter(Boolean)}async function nO(e,t){return(await Dt(e.runtime,t)).split(/\r?\n/).map(i=>i.trim()).filter(Boolean)}async function rO(e,t,r){let i=[t?"keyword":null,r.list!==void 0?"--list":null,r.file!==void 0?"--file":null,r.domain!==void 0?"--domain":null].filter(a=>a!==null);if(i.length===0)throw E('Provide a keyword, --list, --file or --domain. Example: serpel keywords research "running shoes"');if(i.length>1)throw E(`Use only one input (found: ${i.join(", ")}).`);let n={};if(r.country!==void 0&&(n.country=r.country),r.language!==void 0&&(n.language=r.language),r.limit!==void 0&&(n.limit=r.limit),r.project!==void 0&&(n.projectId=r.project),r.refresh&&(n.refresh=!0),t)return{mode:"keyword",keyword:t,...n};if(r.domain!==void 0)return{mode:"domain",domain:r.domain,...n};let o=r.list!==void 0?tO(r.list):await nO(e,r.file??"");if(o.length===0)throw E("The keyword list is empty.");if(o.length>$n)throw E(`At most ${$n} keywords per request (provided: ${o.length}).`);return{mode:"list",keywords:[...new Set(o)],...n}}async function iO(e,t,r){let i=await rO(e,t,r);B(pw,i);let n=await e.client(),a=(await n.request("POST","/keywords/research",{body:i,timeoutMs:Math.max(e.httpTimeoutMs(),eO),idempotencyKey:r.idempotencyKey??QE()})).body.data,s=null;if(r.saveTo&&a.items.length>0){let c=[...new Set(a.items.map(l=>l.keyword))];s={listId:r.saveTo,inserted:0,updated:0};for(let l=0;l<c.length;l+=x_){let u=await n.post(`/keyword-lists/${k(r.saveTo)}/items`,{keywords:c.slice(l,l+x_),researchRunId:a.runId});s.inserted+=u?.inserted??0,s.updated+=u?.updated??0}}if(e.json){e.out.printJson(s?{...a,savedTo:s}:a);return}_c(e,a),e.out.info(`${a.credits.charged} credits charged. New balance: ${a.credits.balance}.`),s?e.out.info(`Saved to list ${s.listId}: ${s.inserted} new, ${s.updated} updated.`):r.saveTo&&e.out.info("Nothing saved, the research returned no keywords.")}function S_(e,t){let r=e.command("keywords").description("Keyword research, research history and keyword lists");r.command("research").description("Research keywords for a keyword, a list or a domain").argument("[keyword]","search term (keyword mode)").option("--list <keywords>",'comma-separated keywords (list mode), e.g. "a,b,c"').option("--file <path>","file with one keyword per line (list mode), - reads from stdin").option("--domain <domain>","find the keywords of a domain (domain mode)").option("--country <code>","target country, e.g. DE (API default: DE)").option("--language <code>","language, e.g. de (API default: de)").option("--limit <n>","maximum number of results (1 to 500, API default: 100)",X(1,500)).option("--project <id>","assign the research to a project").option("--refresh","bypass the cache and query the provider again (incurs costs)").option("--save-to <listId>","add the results to a keyword list").option("--idempotency-key <key>","stable key for a safe retry").addHelpText("after",`
|
|
274
|
+
Metrics:
|
|
275
|
+
Search volume, CPC and Ads competition come from the data provider, if it supplies them.
|
|
276
|
+
Ads competition is competition for ads, not organic SEO difficulty.
|
|
277
|
+
KD is only shown when the provider supplies it. Intent and topic groups marked
|
|
278
|
+
"(estimate)" come from our own heuristic.
|
|
279
|
+
|
|
280
|
+
Examples:
|
|
281
|
+
serpel keywords research "running shoes" --country DE --language de
|
|
282
|
+
serpel keywords research --list "running shoes,trail shoes" --limit 50
|
|
283
|
+
serpel keywords research --file keywords.txt --save-to <listId>
|
|
284
|
+
serpel keywords research --domain example.com --country AT`).action(v(t,(i,n,o)=>iO(i,n[0]||void 0,o))),__(r,t),w_(r,t),b_(r,t)}import $_ from"node:fs";import I_ from"node:path";import{pathToFileURL as oO}from"node:url";function C_(e,t){if(e.json)e.out.printJson(t);else{t.sent>0&&e.out.line(`${t.sent} ${t.sent===1?"email":"emails"} sent to ${t.recipients.join(", ")}.`);for(let r of t.failed)e.out.warn(`${r.email}: ${r.error}`)}if(t.sent===0&&t.failed.length>0)throw new z("email_failed","No email delivered.",P.unexpected,{details:t})}function aO(e){return e===null?null:e?"Production access":"Sandbox, verified recipients only"}async function ch(e,t){return(await e.client()).get(`/projects/${k(t)}/report-recipients`)}function A_(e,t){let r=t.trim().toLowerCase();return e.recipients.find(i=>i.id===t||i.email.toLowerCase()===r)}async function sO(e,t){let r=await ch(e,t.project);if(e.json){e.out.printJson(r);return}if(e.out.fields([["Delivery",`${r.configured?"set up":"not set up"}${r.service?` (${Vh[r.service]})`:""}`],["Amazon SES",aO(r.sesProductionAccess)],["Sender",r.sender]]),r.configurationHint&&e.out.warn(r.configurationHint),e.out.line(),r.recipients.length===0){e.out.line("No recipients yet."),e.out.hint(`Add one: serpel monitoring recipients add --project ${t.project} --email name@example.com`);return}e.out.table([{header:"ID",value:i=>i.id,max:36},{header:"Email",value:i=>i.email,max:50},{header:"Status",value:i=>i.active?"active":`unsubscribed on ${I(i.unsubscribedAt)}`},{header:"Since",value:i=>I(i.createdAt)}],r.recipients)}async function cO(e,t){let r=B(ww,{email:t.email}),n=await(await e.client()).post(`/projects/${k(t.project)}/report-recipients`,r);if(e.json){e.out.printJson(n);return}e.out.line(`${n.email} will now receive the report by email after every monitoring run.`),e.out.hint(`Test email: serpel monitoring email-test --project ${t.project} --email ${n.email}`)}async function lO(e,t){let r=await ch(e,t.project),i=A_(r,t.email);if(!i)throw E(`${t.email} is not a recipient of this project.`,`List: serpel monitoring recipients list --project ${t.project}`);if(await(await e.client()).delete(`/projects/${k(t.project)}/report-recipients/${k(i.id)}`),e.json){e.out.printJson({removed:!0,id:i.id,email:i.email});return}e.out.line(`Recipient removed: ${i.email}`)}async function uO(e,t){let r;if(t.email){let o=A_(await ch(e,t.project),t.email);if(!o)throw E(`${t.email} is not a recipient of this project.`,`Add it first: serpel monitoring recipients add --project ${t.project} --email ${t.email}`);r=o.id}let n=await(await e.client()).post(`/projects/${k(t.project)}/report-recipients/test`,r?{recipientId:r}:{});C_(e,n)}async function dO(e,t){let r=await e.client();C_(e,await r.post(`/reports/${k(t)}/email`))}async function pO(e,t,r){let n=await(await e.client()).get(`/reports/${k(t)}/email-preview`,{format:"json"});if(!r.output){if(r.open)throw E("--open needs --output <file>.");if(e.json){e.out.printJson(n);return}e.out.heading(n.subject),e.out.line(n.text);return}let o=I_.resolve(r.output);try{$_.mkdirSync(I_.dirname(o),{recursive:!0}),$_.writeFileSync(o,n.html,"utf8")}catch(a){throw new z("write_failed",`Cannot write file: ${o} (${a.message}).`,P.unexpected)}e.json?e.out.printJson({path:o,subject:n.subject,bytes:Buffer.byteLength(n.html)}):e.out.info(`Preview saved: ${o}`),r.open&&await e.runtime.openUrl(oO(o).href)&&!e.json&&e.out.info("Opened in the browser.")}function D_(e,t){let r=e.command("recipients").description("Manage the recipients of the email reports");r.command("list").description("Recipients, unsubscribe status and delivery settings").requiredOption("--project <id>","project ID").action(v(t,(i,n,o)=>sO(i,o))),r.command("add").description("Register an email address for reports (at most 10 per project)").requiredOption("--project <id>","project ID").requiredOption("--email <address>","email address").addHelpText("after",`
|
|
285
|
+
The report is sent after every monitoring run. You set the schedule with
|
|
286
|
+
serpel projects update <id> --schedule every_3_days --schedule-hour 6.
|
|
287
|
+
|
|
288
|
+
Example:
|
|
289
|
+
serpel monitoring recipients add --project <id> --email kerem@example.com`).action(v(t,(i,n,o)=>cO(i,o))),r.command("remove").description("Remove a recipient").requiredOption("--project <id>","project ID").requiredOption("--email <address>","email address or recipient ID").action(v(t,(i,n,o)=>lO(i,o))),e.command("email-test").description("Send a test email with the latest report to all recipients or to one").requiredOption("--project <id>","project ID").option("--email <address>","only to this recipient").addHelpText("after",`
|
|
290
|
+
If there is no report yet, a short confirmation is sent. If delivery to all recipients
|
|
291
|
+
fails, the command exits with exit code 1 and shows the response of the mail server.
|
|
292
|
+
|
|
293
|
+
Examples:
|
|
294
|
+
serpel monitoring email-test --project <id>
|
|
295
|
+
serpel monitoring email-test --project <id> --email kerem@example.com`).action(v(t,(i,n,o)=>uO(i,o)))}function R_(e,t){e.command("send").description("Send a report again to all active email recipients").argument("<reportId>","report ID").action(v(t,(r,i)=>dO(r,i[0]??""))),e.command("preview").description("Show the email of a report or save it as an HTML file").argument("<reportId>","report ID").option("-o, --output <file>","write the HTML to this file").option("--open","open the saved file in the browser").addHelpText("after",`
|
|
296
|
+
Without --output, the subject and the plain-text version are shown in the terminal.
|
|
297
|
+
|
|
298
|
+
Examples:
|
|
299
|
+
serpel reports preview <id>
|
|
300
|
+
serpel reports preview <id> --output report.html --open`).action(v(t,(r,i,n)=>pO(r,i[0]??"",n)))}var mO={slack:"Slack",discord:"Discord",custom:"your custom webhook"},fO={slack:"--slack-webhook <url>",discord:"--discord-webhook <url>",custom:"--webhook <url>"};function hO(e){return e.length<=1?e.join(""):`${e.slice(0,-1).join(", ")} and ${e.at(-1)}`}async function gO(e,t,r){let i=t.result?.reportId;try{return typeof i=="string"&&i?await e.get(`/reports/${k(i)}`):(await e.list("/reports",{projectId:r,limit:1,offset:0})).data[0]??null}catch{return null}}function yO(e){let t=e.result?.failures;return Array.isArray(t)?t.filter(r=>typeof r=="string"):[]}async function vO(e,t){at(t);let r=await e.client(),i=await r.post(`/projects/${k(t.project)}/monitoring/run`);if(!t.wait){if(e.json){e.out.printJson(i);return}e.out.line(i.alreadyRunning?"A monitoring run is already in progress for this project.":"Monitoring started: rankings, AI visibility and report."),e.out.fields([["Job ID",i.job.id]]),e.out.hint(`Status: serpel jobs status ${i.job.id} --wait`);return}e.json||e.out.info(i.alreadyRunning?`A monitoring run is already in progress for this project. Waiting for job ${i.job.id} ...`:`Monitoring started. Job ID: ${i.job.id}. Waiting for it to finish ...`);let n=await e.waitForJob(r,i.job.id,t.timeout);rt(n);let o=await gO(r,n,t.project);if(e.json){e.out.printJson({job:n,alreadyRunning:i.alreadyRunning,report:o});return}e.out.line("Monitoring completed."),e.out.fields([["Job ID",n.id]]);for(let a of yO(n))e.out.warn(`Partially failed: ${a}`);if(!o){e.out.line("There is no report yet.");return}e.out.line(),e.out.line(e.out.c.bold(o.summary.headline)),e.out.fields([["Report ID",o.id],["Created",I(o.createdAt)]]),e.out.hint(`Show the report: serpel reports show ${o.id}`)}async function bO(e,t){let i=await(await e.client()).post(`/projects/${k(t.project)}/webhook/test`,t.channel?{channel:t.channel}:{}),n=i.results??[];if(!i.delivered){let a=n.find(s=>!s.delivered)?.channel??t.channel??"custom";throw new z("webhook_failed",`The test message was not delivered${i.error?`: ${i.error}`:"."}`,P.unexpected,{hint:`Check or change the webhook URL: serpel projects update ${t.project} ${fO[a]}`,details:i})}if(e.json){e.out.printJson(i);return}let o=n.map(a=>mO[a.channel]);e.out.line(o.length>0?`Test message delivered to ${hO(o)}.`:"Test message delivered to the webhook.")}function T_(e,t){let r=e.command("monitoring").description("Start monitoring, manage email recipients and test notifications");ot(r.command("run").description("Start monitoring right away: check rankings and AI visibility, create a report (asynchronous)").requiredOption("--project <id>","project ID"),"the monitoring run").addHelpText("after",`
|
|
301
|
+
Monitoring queries rankings and AI visibility from the data provider (incurs costs),
|
|
302
|
+
compares them with the state of the last report and creates a new report. The website
|
|
303
|
+
audit section comes from the latest completed crawl. The report goes to all email
|
|
304
|
+
recipients (monitoring recipients) and to all configured webhooks. With --wait the CLI
|
|
305
|
+
shows the summary of the new report at the end.
|
|
306
|
+
|
|
307
|
+
Examples:
|
|
308
|
+
serpel monitoring run --project <id>
|
|
309
|
+
serpel monitoring run --project <id> --wait --timeout 900`).action(v(t,(i,n,o)=>vO(i,o))),r.command("webhook-test").description("Send a test message to the project's configured webhooks (Slack, Discord, custom URL)").requiredOption("--project <id>","project ID").addOption(L("--channel <target>","test only this target (default: all configured)",ai)).addHelpText("after",`
|
|
310
|
+
Without --channel, the test message goes to all configured targets. If it cannot be delivered
|
|
311
|
+
to a target, the command exits with exit code 1 and names the target and the reason.
|
|
312
|
+
|
|
313
|
+
Examples:
|
|
314
|
+
serpel monitoring webhook-test --project <id>
|
|
315
|
+
serpel monitoring webhook-test --project <id> --channel slack
|
|
316
|
+
serpel monitoring webhook-test --project <id> --json`).action(v(t,(i,n,o)=>bO(i,o))),D_(r,t)}var wO=["editor","viewer"],E_=[{header:"User ID",value:e=>e.userId,max:36},{header:"Name",value:e=>e.name,max:30},{header:"Email",value:e=>e.email,max:40},{header:"Role",value:e=>go[e.role]??e.role},{header:"Member since",value:e=>I(e.createdAt)}];async function kO(e,t){let i=await(await e.client()).get(`/projects/${k(t.project)}/members`);Q(e,$e(i),E_,"The project has no other members yet.")}async function _O(e,t){let r={email:t.email.trim()};t.role!==void 0&&(r.role=t.role),B(dw,r);let n=await(await e.client()).post(`/projects/${k(t.project)}/members`,r);if(e.json){e.out.printJson(n);return}let o=String(r.email).toLowerCase(),a=n.find(s=>s.email.toLowerCase()===o);e.out.line(a?`Member added: ${a.name} <${a.email}> as ${go[a.role]??a.role}.`:"Member added."),e.out.line(),e.out.table(E_,n)}async function xO(e,t,r){ue(r,"The member immediately loses access to this project.",`serpel projects members remove ${t} --project ${r.project}`);let i=await e.client(),o=(await i.get(`/projects/${k(r.project)}/members`)).find(a=>a.userId===t)??null;if(await i.delete(`/projects/${k(r.project)}/members/${k(t)}`),e.json){e.out.printJson({removed:!0,projectId:r.project,userId:t,email:o?.email??null,name:o?.name??null});return}e.out.line(o?`Member removed: ${o.name} <${o.email}>`:`Member removed: ${t}`)}function O_(e,t){let r=e.command("members").description("List, add, and remove project members");r.command("list").description("List the members of a project with their roles").requiredOption("--project <id>","project ID").addHelpText("after",`
|
|
317
|
+
Examples:
|
|
318
|
+
serpel projects members list --project <id>
|
|
319
|
+
serpel projects members list --project <id> --json`).action(v(t,(i,n,o)=>kO(i,o))),r.command("add").description("Add an approved user by email address (owner only)").requiredOption("--project <id>","project ID").requiredOption("--email <address>","email address of the user").addOption(L("--role <role>","role (editor = Editor, viewer = Viewer, API default: viewer)",wO)).addHelpText("after",`
|
|
320
|
+
The user must already have an approved account. If the user is already a member, their role
|
|
321
|
+
is changed.
|
|
322
|
+
|
|
323
|
+
Examples:
|
|
324
|
+
serpel projects members add --project <id> --email colleague@example.com
|
|
325
|
+
serpel projects members add --project <id> --email colleague@example.com --role editor`).action(v(t,(i,n,o)=>_O(i,o))),r.command("remove").description("Remove a member from the project (owner only)").argument("<userId>","user ID of the member (from projects members list)").requiredOption("--project <id>","project ID").option("--yes","confirm removal (required)").addHelpText("after",`
|
|
326
|
+
Example:
|
|
327
|
+
serpel projects members remove <userId> --project <id> --yes`).action(v(t,(i,n,o)=>xO(i,n[0]??"",o)))}var SO=new Set(["nationwide","none","landesweit","keiner","keine"]);async function xc(e,t){return(await e.get(`/projects/${k(t)}`)).country}async function Sc(e,t,r){let i=t.trim();if(SO.has(i.toLowerCase()))return{code:null,label:`${r.toUpperCase()} nationwide`};if(i.length<2)throw E("The location needs at least 2 characters, a postal code, or a location code.");let n=await e.get("/locations",{country:r,q:i,limit:5}),o=n.find(a=>String(a.code)===i)??n[0];if(!o)throw E(`No location \u201C${i}\u201D found in ${r.toUpperCase()}.`,`Search locations: serpel rankings locations "${i}" --country ${r.toUpperCase()}`);return{code:o.code,label:o.name}}async function $O(e,t,r){let i=B(vw,{country:r.country,q:t,limit:r.limit}),o=await(await e.client()).get("/locations",i);if(e.json){e.out.printJson({data:o});return}if(o.length===0){e.out.line(`No location \u201C${t}\u201D found in ${i.country}.`);return}e.out.table([{header:"Code",value:a=>String(a.code),align:"right"},{header:"Location",value:a=>ut(a.name)??a.name,max:50},{header:"Type",value:a=>a.type},{header:"Full name",value:a=>a.name,max:60}],o),e.out.hint(`Use: serpel rankings add --project <id> --keyword "..." --location ${o[0].code}`)}function P_(e,t){e.command("locations").description("Search locations for local rank tracking (cities, postal codes, regions)").argument("<query>","location name or postal code, e.g. Bochum or 44789").option("--country <code>","country","DE").option("--limit <n>","number of results (1 to 50)",X(1,50),20).addHelpText("after",`
|
|
328
|
+
Location names come from Google and are in English, local names such as M\xFCnchen are recognised.
|
|
329
|
+
|
|
330
|
+
Examples:
|
|
331
|
+
serpel rankings locations Bochum
|
|
332
|
+
serpel rankings locations 44789 --json
|
|
333
|
+
serpel rankings locations Wien --country AT`).action(v(t,(r,i,n)=>$O(r,i[0]??"",n)))}var j_=["on","off"];function lh(e){return e===!1?null:e}function N_(e){if(e===!1)return null;if(e!==void 0)return Vs(e)}function IO(e){let t={};e.name!==void 0&&(t.name=e.name),e.country!==void 0&&(t.country=e.country),e.language!==void 0&&(t.language=e.language),e.maxPages!==void 0&&(t.crawlMaxPages=e.maxPages),e.rankDepth!==void 0&&(t.rankDepth=Number(e.rankDepth)),e.device!==void 0&&(t.rankDevice=e.device),e.schedule!==void 0&&(t.rankSchedule=e.schedule),e.scheduleHour!==void 0&&(t.rankScheduleHour=e.scheduleHour),e.crawlSchedule!==void 0&&(t.crawlSchedule=e.crawlSchedule),e.renderMode!==void 0&&(t.renderMode=e.renderMode),e.aiOverview!==void 0&&(t.aiOverviewTracking=e.aiOverview==="on"),e.keywordMetrics!==void 0&&(t.keywordMetricsAuto=e.keywordMetrics==="on");let r=[["slackWebhookUrl",lh(e.slackWebhook)],["discordWebhookUrl",lh(e.discordWebhook)],["notificationWebhookUrl",lh(e.webhook)]];for(let[n,o]of r)o!==void 0&&(t[n]=o);let i=[["slackChannelLabel",N_(e.slackChannel)],["discordChannelLabel",N_(e.discordChannel)]];for(let[n,o]of i)o!==void 0&&(t[n]=o);return t}function CO(e,t){let r=[typeof e.slackWebhook=="string"?"slack":null,typeof e.discordWebhook=="string"?"discord":null,typeof e.webhook=="string"?"custom":null].filter(n=>n!==null);if(r.length===0)return null;let i=r.length===1?` --channel ${r[0]}`:"";return`Test the webhook: serpel monitoring webhook-test --project ${t}${i}`}function AO(e,t){e.out.fields([["ID",t.id],["Name",t.name],["Domain",t.domain],["Market",Hn(t.country,t.language)],["Crawl limit",`${t.crawlMaxPages} pages`],["Crawl schedule",ic(t.crawlSchedule,t.rankScheduleHour)],["JavaScript rendering",Gr(t.renderMode)],["Rank tracking",`Top ${t.rankDepth}, ${Me[t.rankDevice]??t.rankDevice}`],["Default location",ut(t.rankLocationName)??"nationwide"],["Ranking schedule",rc(t.rankSchedule,t.rankScheduleHour)],["Track AI Overview",ge(t.aiOverviewTracking)],["Add search volume",ge(t.keywordMetricsAuto)],["Slack webhook",hn(t.slackWebhookUrl)],["Slack channel",qr(t.slackChannelLabel)],["Discord webhook",hn(t.discordWebhookUrl)],["Discord channel",qr(t.discordChannelLabel)],["Custom webhook",hn(t.notificationWebhookUrl)],["Updated",I(t.updatedAt)]])}async function DO(e,t,r){let i=IO(r);if(Object.keys(i).length===0&&r.location===void 0)throw E("Nothing to change. Pass at least one setting.","Show options: serpel projects update --help");B(uw,i);let n=await e.client();if(r.location!==void 0){let s=await Sc(n,r.location,r.country??await xc(n,t));i.rankLocationCode=s.code}let o=await n.patch(`/projects/${k(t)}`,i);if(e.json){e.out.printJson(o);return}e.out.line(`Project settings saved: ${o.name} (${o.domain})`),AO(e,o);let a=CO(r,o.id);a&&e.out.hint(a)}function L_(e,t){e.command("update").description("Update project settings: name, market, crawl, JavaScript rendering, rank tracking, AI Overview, search volume, webhooks").argument("<id>","project ID").option("--name <name>","new display name").option("--country <code>","target country, e.g. DE").option("--language <code>","language, e.g. de").option("--max-pages <n>",`maximum number of pages per crawl (1 to ${Ye})`,X(1,Ye)).addOption(L("--rank-depth <n>","result depth to check for rank tracking",di.map(String))).addOption(L("--device <device>","device for rank tracking",Sn)).addOption(L("--schedule <schedule>","schedule of the automatic ranking check",Do)).option("--schedule-hour <hour>","hour of the automatic ranking check (0 to 23)",X(0,23)).addOption(L("--crawl-schedule <schedule>","schedule of the automatic crawl",Ro)).addOption(L("--render-mode <mode>","JavaScript rendering during the crawl (auto = only nearly empty pages, always = every page, never = no rendering)",To)).addOption(L("--ai-overview <switch>","track the AI Overview during ranking checks",j_)).addOption(L("--keyword-metrics <switch>","automatically add search volume and CPC before the ranking check",j_)).option("--slack-webhook <url>","Slack webhook for monitoring reports (https://hooks.slack.com/...)").option("--no-slack-webhook","remove the configured Slack webhook").option("--discord-webhook <url>","Discord webhook for monitoring reports (https://discord.com/api/webhooks/...)").option("--no-discord-webhook","remove the configured Discord webhook").option("--slack-channel <name>",`Slack channel name for display, e.g. #seo-reports (up to ${Zn} characters)`).option("--no-slack-channel","remove the configured Slack channel").option("--discord-channel <name>",`Discord channel name for display, e.g. #reports (up to ${Zn} characters)`).option("--no-discord-channel","remove the configured Discord channel").option("--webhook <url>","custom https address for monitoring reports (JSON)").option("--no-webhook","remove the configured custom webhook address").option("--location <location>","default location for new keywords: city, postal code, location code, or nationwide").addHelpText("after",`
|
|
334
|
+
Only the settings you pass are changed. Values are checked with the same rules as in the API
|
|
335
|
+
before the request is sent. --render-mode controls whether the crawl renders pages with
|
|
336
|
+
JavaScript: auto renders only pages that are delivered nearly empty, always renders every
|
|
337
|
+
page, never renders no page. Slack, Discord, and the custom address are separate targets;
|
|
338
|
+
after every monitoring run the report goes to all configured ones. A Slack or Discord
|
|
339
|
+
address passed to --webhook is stored by the API automatically at the matching target.
|
|
340
|
+
--slack-channel and --discord-channel only store the channel name for display, without a
|
|
341
|
+
leading #; which channel the report goes to is decided by the webhook. A channel needs a
|
|
342
|
+
webhook; when you remove the webhook, the API removes the channel too.
|
|
343
|
+
|
|
344
|
+
Examples:
|
|
345
|
+
serpel projects update <id> --name "Shop DE" --max-pages 500
|
|
346
|
+
serpel projects update <id> --schedule weekly --schedule-hour 5 --crawl-schedule weekly
|
|
347
|
+
serpel projects update <id> --render-mode always
|
|
348
|
+
serpel projects update <id> --ai-overview off --keyword-metrics off --rank-depth 50 --device mobile
|
|
349
|
+
serpel projects update <id> --slack-webhook https://hooks.slack.com/services/...
|
|
350
|
+
serpel projects update <id> --slack-channel "#seo-reports"
|
|
351
|
+
serpel projects update <id> --no-discord-channel
|
|
352
|
+
serpel projects update <id> --discord-webhook https://discord.com/api/webhooks/... --webhook https://example.com/hook
|
|
353
|
+
serpel projects update <id> --location Bochum
|
|
354
|
+
serpel projects update <id> --no-slack-webhook --no-webhook --json`).action(v(t,(r,i,n)=>DO(r,i[0]??"",n)))}function RO(e){if(!e.lastCrawl)return"none yet";let t=e.lastCrawl.finishedAt??e.lastCrawl.startedAt;return`${Kn[e.lastCrawl.status]??e.lastCrawl.status}${t?` ${I(t)}`:""}`}async function TO(e,t){let i=await(await e.client()).list("/projects",{...se(t),q:t.query});Q(e,i,[{header:"ID",value:n=>n.id,max:36},{header:"Name",value:n=>n.name,max:30},{header:"Domain",value:n=>n.domain,max:40},{header:"Market",value:n=>Le(n.country,n.language)},{header:"Last crawl",value:RO},{header:"Issues (E/W/N)",value:n=>Ys(n.lastCrawl?.issueCounts)},{header:"Keywords",value:n=>String(n.trackedKeywords),align:"right"}],yn(t.query,{empty:"No projects yet. Create one with: serpel projects create --domain example.com",noMatch:n=>`No project matches \u201C${n}\u201D. Show all with: serpel projects list`}),t)}async function EO(e,t){try{ig(t.domain)}catch(o){throw E(o instanceof Error?o.message:String(o))}let r={domain:t.domain};t.name!==void 0&&(r.name=t.name),t.country!==void 0&&(r.country=t.country),t.language!==void 0&&(r.language=t.language),B(lw,r);let n=await(await e.client()).post("/projects",r);if(e.json){e.out.printJson(n);return}e.out.line(`Project created: ${n.name} (${n.domain})`),e.out.fields([["ID",n.id],["Start URL",n.startUrl],["Market",Hn(n.country,n.language)]]),e.out.hint(`Next step: serpel crawl start --project ${n.id}`)}async function OO(e,t,r){ue(r,"Deleting hides the project with its crawls, keywords, rankings, and tasks, and cancels running jobs.",`serpel projects delete ${t}`);let i=await e.client(),n=await i.get(`/projects/${k(t)}`);if(await i.delete(`/projects/${k(t)}`),e.json){e.out.printJson({deleted:!0,id:n.id,name:n.name,domain:n.domain});return}e.out.line(`Project deleted: ${n.name} (${n.domain})`),e.out.fields([["ID",n.id]])}async function PO(e,t){let i=await(await e.client()).get(`/projects/${k(t)}/overview`);if(e.json){e.out.printJson(i);return}let n=i.project,{c:o}=e.out;if(e.out.heading(`${n.name} (${n.domain})`),e.out.fields([["ID",n.id],["Start URL",n.startUrl],["Market",Hn(n.country,n.language)],["Role",go[n.role]??n.role],["Crawl limit",`${n.crawlMaxPages} pages`],["Crawl schedule",ic(n.crawlSchedule,n.rankScheduleHour)],["JavaScript rendering",Gr(n.renderMode)],["Rank tracking",`Top ${n.rankDepth}, ${Me[n.rankDevice]??n.rankDevice}, ${rc(n.rankSchedule,n.rankScheduleHour)}`],["Track AI Overview",ge(n.aiOverviewTracking)],["Add search volume",ge(n.keywordMetricsAuto)],["Slack webhook",hn(n.slackWebhookUrl)],["Slack channel",qr(n.slackChannelLabel)],["Discord webhook",hn(n.discordWebhookUrl)],["Discord channel",qr(n.discordChannelLabel)],["Custom webhook",hn(n.notificationWebhookUrl)],["Created",I(n.createdAt)]]),e.out.line(),e.out.heading("Last crawl"),i.lastCrawl){let c=i.lastCrawl;e.out.fields([["Crawl ID",c.id],["Status",Kn[c.status]??c.status],["Completed",I(c.finishedAt)],["Pages",`${c.pagesCrawled} of ${c.maxPages} max${c.stats?.limitReached?" (limit reached)":""}`],["Score",i.score!==null&&i.score!==void 0?ft(i.score):null],["Issues",Vt(i.issueCounts)]])}else e.out.line("No completed crawl yet.");i.activeCrawlJob&&e.out.line(`Active crawl: job ${i.activeCrawlJob.id} (${We[i.activeCrawlJob.status]??i.activeCrawlJob.status})`),i.topIssues.length>0&&(e.out.line(),e.out.heading("Top issues"),e.out.table([{header:"Severity",value:c=>lt[c.severity]??c.severity},{header:"Code",value:c=>c.code},{header:"Issue",value:c=>c.title,max:70},{header:"Affected",value:c=>String(c.affectedCount),align:"right"}],i.topIssues)),e.out.line(),e.out.heading("Rankings");let a=i.rankings;a.tracked===0?e.out.line("No tracked keywords yet."):e.out.fields([["Tracked",String(a.tracked)],["Checked",String(a.checked)],["Top 3 / Top 10",`${a.top3} / ${a.top10}`],[`Not in top ${n.rankDepth}`,String(a.notFound)],["Average position",a.avgPosition!==null?Y(a.avgPosition,1):R],["Improved / declined",`${a.improved} / ${a.declined}`],["Last check",I(a.lastCheckedAt)]]),e.out.line(),e.out.heading("AI visibility");let s=i.aiVisibility;if(!s||s.prompts===0?e.out.line("No tracked prompts yet."):e.out.fields([["Tracked prompts",String(s.prompts)],["Checked",String(s.checked)],["Cited / mentioned",`${s.cited} / ${s.mentioned}`],["Last check",I(s.lastCheckedAt)]]),i.latestReport&&(e.out.line(),e.out.heading("Latest report"),e.out.fields([["Report ID",i.latestReport.id],["Created",I(i.latestReport.createdAt)],["Summary",i.latestReport.headline],["Read",ge(i.latestReport.read)]])),e.out.line(),e.out.heading("Tasks"),e.out.line(`${i.tasks.open} open, ${i.tasks.inProgress} in progress, ${i.tasks.done} done`),i.nextSteps.length>0){e.out.line(),e.out.heading("Next steps");for(let c of i.nextSteps)e.out.line(`- [${oi[c.priority]??c.priority}] ${c.title}`),c.description&&e.out.line(o.dim(` ${c.description}`))}i.recentJobs.length>0&&(e.out.line(),e.out.heading("Recent jobs"),e.out.table([{header:"Job ID",value:c=>c.id,max:36},{header:"Type",value:c=>_t[c.type]??c.type},{header:"Status",value:c=>We[c.status]??c.status},{header:"Created",value:c=>I(c.createdAt)}],i.recentJobs))}function U_(e,t){let r=e.command("projects").description("List, create, show, update, and delete projects, and manage members");ae(r.command("list").description("List projects").option("-q, --query <text>","search by name or domain")).addHelpText("after",`
|
|
355
|
+
Examples:
|
|
356
|
+
serpel projects list
|
|
357
|
+
serpel projects list --query shop --limit 20 --page 2
|
|
358
|
+
serpel projects list --json`).action(v(t,(i,n,o)=>TO(i,o))),r.command("create").description("Create a project").requiredOption("--domain <domain>","domain or start URL, e.g. example.com").option("--name <name>","display name (default: domain)").option("--country <code>","target country, e.g. DE (API default: DE)").option("--language <code>","language, e.g. de (API default: de)").addHelpText("after",`
|
|
359
|
+
Examples:
|
|
360
|
+
serpel projects create --domain example.com
|
|
361
|
+
serpel projects create --domain https://www.example.at --name "Shop AT" --country AT --language de`).action(v(t,(i,n,o)=>EO(i,o))),r.command("show").description("Project overview: last crawl, issues, rankings, tasks, next steps").argument("<id>","project ID").addHelpText("after",`
|
|
362
|
+
Examples:
|
|
363
|
+
serpel projects show <id>
|
|
364
|
+
serpel projects show <id> --json`).action(v(t,(i,n)=>PO(i,n[0]??""))),L_(r,t),r.command("delete").description("Delete a project (owner only, running jobs are cancelled)").argument("<id>","project ID").option("--yes","confirm deletion (required)").addHelpText("after",`
|
|
365
|
+
Example:
|
|
366
|
+
serpel projects delete 00000000-0000-4000-8000-000000000000 --yes`).action(v(t,(i,n,o)=>OO(i,n[0]??"",o))),O_(r,t)}var jO={keywords:"Keyword data",serp:"Search results"};async function NO(e){let r=await(await e.client()).get("/providers");if(Q(e,$e(r),[{header:"Provider",value:i=>i.name},{header:"Data",value:i=>i.capabilities.map(n=>jO[n]??n).join(", ")},{header:"Configured",value:i=>ge(i.configured)},{header:"Cost today",value:i=>i.usedTodayUsd===null?"admin only":`${Ae(i.usedTodayUsd)} of ${Ae(i.dailyBudgetUsd)}`,align:"right"},{header:"Requests today",value:i=>i.requestsToday===null?"admin only":`${b(i.requestsToday)} of ${b(i.dailyRequestLimit)}`,align:"right"},{header:"Last used",value:i=>i.lastUsedAt?I(i.lastUsedAt):"never"}],"No data providers are known."),!e.json){for(let i of r.filter(n=>!n.configured))e.out.hint(`Set up ${i.name}: ${i.configHint} Docs: ${i.docsUrl}`);r.some(i=>i.configured)&&e.out.hint("Daily limits apply to the whole instance. Once a limit is reached, requests end with exit code 7.")}}function z_(e,t){e.command("providers").description("Show data providers, daily budget, and usage").command("status").description("Show configured data providers with today's cost and requests and last use").addHelpText("after",`
|
|
367
|
+
Examples:
|
|
368
|
+
serpel providers status
|
|
369
|
+
serpel providers status --json`).action(v(t,i=>NO(i)))}var LO=90,uh=365;function dh(e,t){e.out.fields([["Tracked",String(t.tracked)],["Checked",`${t.checked} of ${t.tracked}`],["Top 3 / Top 10",`${t.top3} / ${t.top10}`],["Not in the checked top N",String(t.notFound)],["Average position",t.avgPosition!==null?Y(t.avgPosition,1):R],["Improved / declined",`${t.improved} / ${t.declined}`],["Last check",I(t.lastCheckedAt)]])}async function UO(e,t,r){let n=await(await e.client()).get(`/rank-keywords/${k(t)}/history`,{limit:r.limit});if(e.json){e.out.printJson(n);return}let o=n.keyword;if(e.out.heading(`${o.keyword} (${Le(o.country,o.language)}, ${Me[o.device]??o.device})`),e.out.fields([["Keyword ID",o.id],["Project ID",o.projectId],["Location",ut(o.locationName)??"nationwide"],["Search volume",o.searchVolume!==null?`${b(o.searchVolume)} per month`:R],["CPC",o.cpc!==null?Ae(o.cpc):R],["Current position",ho(o.latest)],["Change",tc(o)]]),e.out.line(),n.checks.length===0){e.out.line("No check has run for this keyword yet.");return}e.out.table([{header:"Checked",value:a=>I(a.checkedAt)},{header:"Position",value:a=>ho(a),align:"right"},{header:"URL",value:a=>a.status==="error"?a.error??R:a.url??R,max:70},{header:"AI Overview",value:a=>nc(a.aiOverview)}],n.checks),n.checks.length>=r.limit&&e.out.hint(`Showing the last ${r.limit} checks. Use --limit for more (at most ${uh}).`)}async function zO(e,t,r){let n=await(await e.client()).get(`/rank-keywords/${k(t)}/serp`);if(e.json){e.out.printJson(n);return}if(!n.checkedAt){e.out.line("No search results are stored for this keyword yet. They arrive with the next ranking check.");return}e.out.heading(`Search results from ${I(n.checkedAt)} (top ${n.depth})`),e.out.table([{header:"Rank",value:o=>String(o.position),align:"right"},{header:"Domain",value:o=>o.domain,max:35},{header:"Title",value:o=>o.title??R,max:50},{header:"URL",value:o=>o.url,max:70}],n.results.slice(0,r.limit)),n.results.length>r.limit&&e.out.hint(`${n.results.length-r.limit} more results with --limit ${n.results.length} or --json.`)}async function MO(e,t){let i=await(await e.client()).get(`/projects/${k(t.project)}/rankings/summary`);if(e.json){e.out.printJson(i);return}if(e.out.heading("Ranking summary"),i.tracked===0){e.out.line(`No tracked keywords yet. Add some with: serpel rankings add --project ${t.project} --keyword "..."`);return}dh(e,i)}function M_(e,t){e.command("history").description("History of a tracked keyword: date, position, URL and AI Overview").argument("<keywordId>","keyword ID (ID column in rankings list)").option("--limit <n>",`number of checks (1 to ${uh})`,X(1,uh),LO).addHelpText("after",`
|
|
370
|
+
Examples:
|
|
371
|
+
serpel rankings history <keywordId>
|
|
372
|
+
serpel rankings history <keywordId> --limit 30 --json`).action(v(t,(r,i,n)=>UO(r,i[0]??"",n))),e.command("serp").description("Stored Google search results from the latest check of a keyword: who ranks ahead of you").argument("<keywordId>","keyword ID (ID column in rankings list)").option("--limit <n>","number of results (1 to 100)",X(1,100),10).addHelpText("after",`
|
|
373
|
+
Examples:
|
|
374
|
+
serpel rankings serp <keywordId>
|
|
375
|
+
serpel rankings serp <keywordId> --limit 30 --json`).action(v(t,(r,i,n)=>zO(r,i[0]??"",n))),e.command("summary").description("Key figures for all tracked keywords: top 3, top 10, average, changes").requiredOption("--project <id>","project ID").addHelpText("after",`
|
|
376
|
+
Examples:
|
|
377
|
+
serpel rankings summary --project <id>
|
|
378
|
+
serpel rankings summary --project <id> --json`).action(v(t,(r,i,n)=>MO(r,n)))}function VO(e){if(Array.isArray(e)){let t=e.map(r=>typeof r=="string"?r:String(r?.keyword??r));return{count:t.length,keywords:t}}return typeof e=="number"?{count:e,keywords:[]}:{count:0,keywords:[]}}async function BO(e,t){let r=[...new Set((t.keyword??[]).map(s=>s.trim()).filter(Boolean))];if(r.length===0)throw E('Provide at least one keyword with --keyword "...".');let i={keywords:r};t.country!==void 0&&(i.country=t.country),t.language!==void 0&&(i.language=t.language),t.device!==void 0&&(i.device=t.device),B(yw,i);let n=await e.client();if(t.location!==void 0){let s=await Sc(n,t.location,t.country??await xc(n,t.project));i.locationCode=s.code,e.json||e.out.info(`Location: ${s.label}`)}let o=await n.post(`/projects/${k(t.project)}/rankings`,i);if(e.json){e.out.printJson(o);return}let a=VO(o.skipped);e.out.line(`${o.added.length} ${o.added.length===1?"keyword":"keywords"} added to tracking`+(a.count>0?`, ${a.count} skipped (already tracked or duplicate).`:".")),o.added.length>0&&e.out.table([{header:"ID",value:s=>s.id,max:36},{header:"Keyword",value:s=>s.keyword,max:50},{header:"Market",value:s=>Le(s.country,s.language)},{header:"Location",value:s=>ut(s.locationName)??"nationwide",max:40},{header:"Device",value:s=>Me[s.device]??s.device}],o.added),a.keywords.length>0&&e.out.hint(`Skipped: ${a.keywords.join(", ")}`),e.out.hint(`Start a check: serpel rankings run --project ${t.project} --wait`)}async function FO(e,t){at(t);let r=At(t.keywordId),i=r.length>0?{keywordIds:r}:{};B(Iw,i);let n=await e.client(),o=await n.post(`/projects/${k(t.project)}/rankings/run`,i);if(!t.wait){if(e.json){e.out.printJson(o);return}e.out.line(o.alreadyRunning?"A ranking check is already running for this project.":`Ranking check started for ${o.keywordCount} ${o.keywordCount===1?"keyword":"keywords"}.`),e.out.fields([["Job ID",o.job.id]]),e.out.hint(`Status: serpel jobs status ${o.job.id} --wait`);return}e.json||e.out.info(o.alreadyRunning?`A ranking check is already running for this project. Waiting for job ${o.job.id} ...`:`Ranking check started (${o.keywordCount} keywords). Job ID: ${o.job.id}. Waiting for it to finish ...`);let a=await e.waitForJob(n,o.job.id,t.timeout);rt(a);let s=null;try{s=await n.get(`/projects/${k(t.project)}/rankings/summary`)}catch{s=null}if(e.json){e.out.printJson({job:a,keywordCount:o.keywordCount,alreadyRunning:o.alreadyRunning,summary:s});return}e.out.line("Ranking check completed."),e.out.fields([["Job ID",a.id]]),s&&dh(e,s),e.out.hint(`Results: serpel rankings list --project ${t.project}`)}async function JO(e,t,r){ue(r,"The keyword is removed from tracking together with its entire ranking history.",`serpel rankings remove ${t}`);let i=await e.client(),n=await i.get(`/rank-keywords/${k(t)}/history`,{limit:1});await i.delete(`/rank-keywords/${k(t)}`);let o=n.keyword;if(e.json){e.out.printJson({removed:!0,id:o.id,keyword:o.keyword,projectId:o.projectId});return}e.out.line(`Keyword removed from tracking: ${o.keyword} (${Le(o.country,o.language)}, ${Me[o.device]??o.device})`),e.out.fields([["ID",o.id]])}async function ZO(e,t){let i=await(await e.client()).list(`/projects/${k(t.project)}/rankings`,{...se(t),q:t.query}),{c:n}=e.out;Q(e,i,[{header:"ID",value:o=>o.id,max:36},{header:"Keyword",value:o=>o.keyword,max:45},{header:"Position",value:o=>ho(o.latest),align:"right"},{header:"Change",value:tc,align:"right",color:(o,a)=>a.change!==null&&a.change>0?n.green(o):a.change!==null&&a.change<0?n.red(o):o},{header:"Volume",value:o=>b(o.searchVolume),align:"right"},{header:"URL",value:o=>o.latest?.status==="error"?o.latest.error??R:o.latest?.url??R,max:60},{header:"AI Overview",value:o=>nc(o.latest?.aiOverview)},{header:"Market",value:o=>Le(o.country,o.language)},{header:"Location",value:o=>ut(o.locationName)??"nationwide",max:30},{header:"Device",value:o=>Me[o.device]??o.device},{header:"Checked",value:o=>I(o.latest?.checkedAt)}],yn(t.query,{empty:`No tracked keywords yet. Add some with: serpel rankings add --project ${t.project} --keyword "..."`,noMatch:o=>`No tracked keyword matches \u201C${o}\u201D. Show all with: serpel rankings list --project ${t.project}`}),t),!e.json&&i.data.some(o=>o.latest?.status==="ok"&&o.latest.position===null)&&e.out.hint('"not in top N": The domain did not appear in the N organic results that were checked. A more precise position is not known.'),!e.json&&i.data.some(o=>o.latest?.aiOverview?.present===!0)&&e.out.hint("AI Overview: \u201Ccited\u201D means Google's AI Overview links to a page on your domain as a source.")}function V_(e,t){let r=e.command("rankings").description("Track keywords, check rankings and show their history");r.command("add").description("Add keywords to ranking tracking").requiredOption("--project <id>","project ID").option("--keyword <keyword>","keyword (repeat for several)",it).addOption(L("--device <device>","device (default: project setting)",Sn)).option("--country <code>","target country (default: project setting)").option("--language <code>","language (default: project setting)").option("--location <location>","location: city, postal code, location code or nationwide (default: project setting)").addHelpText("after",`
|
|
379
|
+
For local businesses, the location the search is made from matters. Without --location, the
|
|
380
|
+
project's default location applies (serpel projects update <id> --location ...).
|
|
381
|
+
|
|
382
|
+
Examples:
|
|
383
|
+
serpel rankings add --project <id> --keyword "running shoes"
|
|
384
|
+
serpel rankings add --project <id> --keyword "running shoes" --keyword "trail shoes" --device mobile
|
|
385
|
+
serpel rankings add --project <id> --keyword "eyebrow studio" --location 44789
|
|
386
|
+
serpel rankings add --project <id> --keyword "seo agency" --location nationwide`).action(v(t,(i,n,o)=>BO(i,o))),ot(r.command("run").description("Start a ranking check for all or selected tracked keywords (asynchronous, prints the job ID)").requiredOption("--project <id>","project ID").option("--keyword-id <id>","check only this keyword (repeatable, ID column in rankings list)",it),"the check").addHelpText("after",`
|
|
387
|
+
Examples:
|
|
388
|
+
serpel rankings run --project <id> --wait
|
|
389
|
+
serpel rankings run --project <id> --keyword-id <keywordId> --keyword-id <keywordId>`).action(v(t,(i,n,o)=>FO(i,o))),ae(r.command("list").description("Tracked keywords with current position, change, URL, AI Overview and time of the last check").requiredOption("--project <id>","project ID").option("-q, --query <text>","search by keyword")).action(v(t,(i,n,o)=>ZO(i,o))),M_(r,t),P_(r,t),r.command("remove").description("Remove a keyword and its history from ranking tracking").argument("<keywordId>","keyword ID (ID column in rankings list)").option("--yes","confirm removal (required)").addHelpText("after",`
|
|
390
|
+
Example:
|
|
391
|
+
serpel rankings remove <keywordId> --yes`).action(v(t,(i,n,o)=>JO(i,n[0]??"",o)))}var WO=[{command:"accept",status:"accepted",description:"Accept a recommendation",resultText:"Recommendation accepted"},{command:"dismiss",status:"dismissed",description:"Dismiss a recommendation",resultText:"Recommendation dismissed"},{command:"done",status:"done",description:"Mark a recommendation as done",resultText:"Recommendation marked as done"},{command:"reopen",status:"open",description:"Set a recommendation back to open",resultText:"Recommendation reopened"}],HO=[...Ws,"active"];function B_(e,t){return e===null?R:typeof e=="string"?e:t==="ratio"?`${Y(e*100,1)}%`:t==="position"?Y(e,1):t==="count"?Number.isInteger(e)?b(e):Y(e,1):String(e)}function F_(e,t,r){let{c:i}=e.out;return t.status==="done"?i.green(r):t.status==="stale"||t.status==="dismissed"?i.dim(r):t.status==="accepted"?i.cyan(r):r}async function KO(e,t){let n=(await(await e.client()).request("GET",`/projects/${k(t.project)}/recommendations`,{query:{...se(t),status:t.status,rule:t.rule,q:t.query}})).body,o=!!(t.status||t.rule||t.query?.trim());if(Q(e,n,[{header:"ID",value:a=>a.id,max:36},{header:"Status",value:a=>Hs[a.status]??a.status,color:(a,s)=>F_(e,s,a)},{header:"Rule",value:a=>Ef[a.rule]??a.rule,max:34},{header:"Title",value:a=>a.title,max:50},{header:"Keyword",value:a=>a.keyword??R,max:28},{header:"Page",value:a=>a.route??a.pageUrl??R,max:36},{header:"Clicks/month",value:a=>b(Math.round(a.estimatedMonthlyClicks)),align:"right"},{header:"Impact",value:a=>Y(a.impactScore,1),align:"right"},{header:"Confidence",value:a=>Of[a.confidence]??a.confidence},{header:"Effort",value:a=>Pf[a.effort]??a.effort}],o?"No recommendations match this filter.":"No recommendations for this project yet.",t),!e.json&&n.counts){let a=n.counts;e.out.hint(`Open ${b(a.open)}, accepted ${b(a.accepted)}, dismissed ${b(a.dismissed)}, done ${b(a.done)}, stale ${b(a.stale)}.`)}}function qO(e,t){let r=t.evidence;if(r.metrics.length===0&&r.rows.length===0&&!r.note)return;e.out.line();let i=r.period?` (${r.period.startDate} to ${r.period.endDate})`:"";e.out.heading(`Evidence${i}`),r.metrics.length>0&&e.out.table([{header:"Evidence",value:n=>n.label,max:50},{header:"Value",value:n=>B_(n.value,n.unit),align:"right",max:40}],r.metrics),r.rows.length>0&&(e.out.line(),r.rowsTitle&&e.out.line(e.out.c.dim(`${r.rowsTitle}:`)),e.out.table([{header:"Entry",value:n=>n.label,max:50},{header:"Detail",value:n=>n.detail??R,max:40},{header:"Value",value:n=>B_(n.value,n.unit),align:"right"}],r.rows)),r.note&&(e.out.line(),e.out.line(r.note))}function GO(e,t){e.out.heading(t.title),e.out.fields([["ID",t.id],["Rule",Ef[t.rule]??t.rule],["Status",F_(e,t,Hs[t.status]??t.status)],["Summary",t.summary],["Impact",Y(t.impactScore,1)],["Estimated clicks per month",b(Math.round(t.estimatedMonthlyClicks))],["Confidence",Of[t.confidence]??t.confidence],["Effort",Pf[t.effort]??t.effort],["Keyword",t.keyword],["Page",t.pageUrl],["Route",t.route],["Next action",t.nextAction],["Data sources",t.dataSources.map(r=>zw[r]??r).join(", ")],["Generated",I(t.generatedAt)],["Last seen",I(t.lastSeenAt)],["Updated",I(t.updatedAt)],["Completed on",t.resolvedAt?I(t.resolvedAt):null],["Confirmed on",t.confirmedAt?I(t.confirmedAt):null]]),qO(e,t)}async function XO(e,t){let i=await(await e.client()).get(`/recommendations/${k(t)}`);if(e.json){e.out.printJson(i);return}GO(e,i)}async function YO(e,t,r){let i=B(Ww,{status:r.status}),o=await(await e.client()).patch(`/recommendations/${k(t)}`,i);if(e.json){e.out.printJson(o);return}e.out.line(`${r.resultText}: ${o.title}`),e.out.fields([["ID",o.id],["Status",Hs[o.status]??o.status]])}function J_(e,t){let r=e.command("recommendations").alias("recs").description("View, accept, dismiss, and complete recommendations");ae(r.command("list").description("List the recommendations of a project").requiredOption("--project <id>","project ID").addOption(L("--status <status>","filter by status (active = open and accepted)",HO)).addOption(L("--rule <rule>","filter by rule",Zs)).option("--query <text>","search in title, keyword, and page")).addHelpText("after",`
|
|
392
|
+
Examples:
|
|
393
|
+
serpel recommendations list --project <id>
|
|
394
|
+
serpel recs list --project <id> --status active --limit 10
|
|
395
|
+
serpel recommendations list --project <id> --rule lowCtr --json`).action(v(t,(i,n,o)=>KO(i,o))),r.command("show <id>").description("Show a recommendation with evidence, data sources, and next action").addHelpText("after",`
|
|
396
|
+
Example:
|
|
397
|
+
serpel recommendations show <id>`).action(v(t,(i,n)=>XO(i,n[0]??"")));for(let i of WO)r.command(`${i.command} <id>`).description(i.description).addHelpText("after",`
|
|
398
|
+
Example:
|
|
399
|
+
serpel recommendations ${i.command} <id>`).action(v(t,(n,o)=>YO(n,o[0]??"",i)))}var ph=10;function mh(e){return e.periodStart?`${I(e.periodStart)} to ${I(e.periodEnd)}`:`until ${I(e.periodEnd)}`}function QO(e){return e.deliveredAt&&e.deliveryError?`delivered by webhook on ${I(e.deliveredAt)}, partially failed: ${e.deliveryError}`:e.deliveredAt?`delivered by webhook on ${I(e.deliveredAt)}`:e.deliveryError?`Delivery failed: ${e.deliveryError}`:"not sent by webhook"}function e0(e){if(e.emailedAt){let t=`to ${e.emailRecipientCount} ${e.emailRecipientCount===1?"recipient":"recipients"} on ${I(e.emailedAt)}`;return e.emailError?`${t}, ${e.emailError}`:t}return e.emailError?`not sent: ${e.emailError}`:"not sent by email"}function t0(e){return e.movement==="new"?"NEW":e.movement==="lost"?"OUT":e.change!==null&&e.change!==0?e.change>0?`+${e.change}`:String(e.change):e.movement==="same"?"0":R}function Gn(e){if(e.before===null||e.before===e.now)return String(e.now);let t=e.now-e.before;return`${e.now} (${t>0?"+":""}${t})`}function n0(e,t){e.out.line(),e.out.heading("Keyword monitoring");let r=t.visibility;e.out.fields([["Visibility",`${Y(r.now,2)}${r.changePercent===null?"":` (${r.changePercent>0?"+":""}${Y(r.changePercent,2)}%)`}`],["Avg. position",t.averagePosition.now===null?R:`${Y(t.averagePosition.now,1)}${t.averagePosition.before===null?"":` (before ${Y(t.averagePosition.before,1)})`}`],["Moved up",`${Se(t.improved.keywords,"keyword","keywords")}, +${t.improved.places} places`],["Moved down",`${Se(t.declined.keywords,"keyword","keywords")}, -${t.declined.places} places`],["Entered / dropped",`${t.entered} / ${t.dropped}`],["Top 3 keywords / URLs",`${Gn(t.top3.keywords)} / ${Gn(t.top3.urls)}`],["Top 10 keywords / URLs",`${Gn(t.top10.keywords)} / ${Gn(t.top10.urls)}`],[`Top ${t.depth} keywords`,Gn(t.ranked.keywords)],["Estimated clicks/month",Gn(t.estimatedClicks)],["Compared with",t.comparedAt?I(t.comparedAt):"first measurement"]]),e.out.line(),e.out.table([{header:"Keyword",value:i=>i.keyword,max:40},{header:"Location",value:i=>`${ut(i.locationName)??i.country}, ${Me[i.device]}`,max:45},{header:"Pos.",value:i=>i.position===null?R:String(i.position),align:"right"},{header:"+/-",value:t0,align:"right"},{header:"Volume",value:i=>b(i.searchVolume),align:"right"},{header:"URL",value:i=>i.url??R,max:50}],t.rows),t.competitors.length>0&&(e.out.line(),e.out.line(e.out.c.bold("Competitors")),e.out.table([{header:"Domain",value:i=>i.isProject?`${i.domain} (you)`:i.domain,max:40},{header:"Keywords",value:i=>i.rankedKeywordsBefore===null?String(i.rankedKeywords):Gn({now:i.rankedKeywords,before:i.rankedKeywordsBefore}),align:"right"},{header:"Top 10",value:i=>String(i.top10),align:"right"},{header:"Visibility",value:i=>Y(i.visibility,2),align:"right"},{header:"Before",value:i=>i.visibilityBefore===null?R:Y(i.visibilityBefore,2),align:"right"}],t.competitors))}function vn(e,t,r){if(r.length!==0){e.out.line(e.out.c.dim(`${t} (${r.length}):`));for(let i of r.slice(0,ph))e.out.line(` - ${i}`);r.length>ph&&e.out.line(e.out.c.dim(` ... and ${r.length-ph} more (full list with --json)`))}}function Z_(e){return`${e.keyword}: ${Uf(e.before)} to ${Uf(e.after)}`}function W_(e){return`[${lt[e.severity]??e.severity}] ${e.title} (${e.code})`}function r0(e,t){e.out.line(),e.out.heading("Rankings"),e.out.fields([["Tracked",b(t.tracked)],["Checked",b(t.checked)],["In the top 10",b(t.top10)],["Improved / declined",`${t.improved.length} / ${t.declined.length}`],["AI Overview",`own domain cited in ${b(t.aiOverviewCited)} of ${b(t.aiOverviewPresent)} AI Overviews`]]),vn(e,"Improved",t.improved.map(Z_)),vn(e,"Declined",t.declined.map(Z_)),vn(e,"New in the top 10",t.enteredTop10),vn(e,"Dropped out of the top 10",t.leftTop10)}function i0(e,t){e.out.line(),e.out.heading("AI visibility"),e.out.fields([["Tracked prompts",b(t.prompts)],["Cited / mentioned",`${b(t.cited)} / ${b(t.mentioned)}`]]),vn(e,"Newly cited",t.newlyCited),vn(e,"No longer cited",t.lostCitations)}function o0(e,t){e.out.line(),e.out.heading("Website audit"),e.out.fields([["Crawl ID",t.crawlId],["Completed",t.finishedAt?I(t.finishedAt):null],["Score",ft(t.score)],["Change",t.scoreBefore!==null?`${yo(t.scoreBefore,t.score)} (before ${t.scoreBefore})`:null],["Issues",Vt(t.issueCounts)]]),vn(e,"New issues",t.newIssues.map(W_)),vn(e,"Resolved issues",t.resolvedIssues.map(W_))}function H_(e,t){let r=t.summary;e.out.heading(`Monitoring report: ${t.projectName}`),e.out.line(r.headline),e.out.line(),e.out.fields([["Report ID",t.id],["Project ID",t.projectId],["Period",mh(t)],["Created",I(t.createdAt)],["Read",ge(t.read)],["Delivery",QO(t)],["Email",e0(t)]]),r.keywordMonitoring?n0(e,r.keywordMonitoring):r.rankings&&r0(e,r.rankings),r.aiVisibility&&i0(e,r.aiVisibility),r.audit&&o0(e,r.audit),!r.rankings&&!r.aiVisibility&&!r.audit&&(e.out.line(),e.out.line("The report has no sections, there was no new data in the period."))}async function a0(e,t){let r={...se(t),projectId:t.project,unread:t.unread?"true":void 0};B(xw,r);let n=await(await e.client()).list("/reports",r),{c:o}=e.out;Q(e,n,[{header:"ID",value:a=>a.id,max:36},{header:"Project",value:a=>a.projectName,max:25},{header:"Created",value:a=>I(a.createdAt)},{header:"Period",value:a=>mh(a),max:45},{header:"Status",value:a=>a.read?"read":"new",color:(a,s)=>s.read?a:o.bold(a)},{header:"Summary",value:a=>a.summary.headline,max:70}],t.unread?"No unread reports.":"No reports yet. A report is created with every monitoring run (serpel monitoring run).",t),!e.json&&n.data.length>0&&e.out.hint("Show a report: serpel reports show <id>")}async function s0(e,t){let i=await(await e.client()).get(`/reports/${k(t)}`);if(e.json){e.out.printJson(i);return}H_(e,i),i.read||e.out.hint(`Mark as read: serpel reports read ${i.id}`)}async function c0(e,t){let i=await(await e.client()).post(`/reports/${k(t)}/read`);if(e.json){e.out.printJson(i);return}e.out.line(`Report marked as read: ${i.summary.headline}`),e.out.fields([["Report ID",i.id],["Project",i.projectName]])}async function l0(e,t){let r=await e.client(),i=t.project!==void 0?{projectId:t.project}:{},n=await r.post("/reports/read-all",i);if(e.json){e.out.printJson(n);return}e.out.line(n.updated===0?"There were no unread reports.":`${n.updated} ${n.updated===1?"report":"reports"} marked as read.`)}async function u0(e){let r=await(await e.client()).get("/reports/unread-count");if(e.json){e.out.printJson(r);return}e.out.line(r.count===0?"No unread reports.":`${r.count} unread ${r.count===1?"report":"reports"}.`),r.count>0&&e.out.hint("Show them: serpel reports list --unread")}function K_(e,t){let r=e.command("reports").description("Read monitoring reports and mark them as read");ae(r.command("list").description("List reports, newest first").option("--project <id>","only reports of this project").option("--unread","only unread reports")).addHelpText("after",`
|
|
400
|
+
Examples:
|
|
401
|
+
serpel reports list
|
|
402
|
+
serpel reports list --project <id> --unread --json`).action(v(t,(i,n,o)=>a0(i,o))),r.command("show").description("Show a report with rankings, AI visibility and website audit").argument("<id>","report ID").addHelpText("after",`
|
|
403
|
+
Showing a report does not mark it as read, use reports read for that.
|
|
404
|
+
|
|
405
|
+
Examples:
|
|
406
|
+
serpel reports show <id>
|
|
407
|
+
serpel reports show <id> --json`).action(v(t,(i,n)=>s0(i,n[0]??""))),r.command("read").description("Mark a report as read").argument("<id>","report ID").addHelpText("after",`
|
|
408
|
+
Example:
|
|
409
|
+
serpel reports read <id>`).action(v(t,(i,n)=>c0(i,n[0]??""))),r.command("read-all").description("Mark all reports as read").option("--project <id>","only reports of this project").addHelpText("after",`
|
|
410
|
+
Examples:
|
|
411
|
+
serpel reports read-all
|
|
412
|
+
serpel reports read-all --project <id>`).action(v(t,(i,n,o)=>l0(i,o))),r.command("unread").description("Show the number of unread reports").addHelpText("after",`
|
|
413
|
+
Examples:
|
|
414
|
+
serpel reports unread
|
|
415
|
+
serpel reports unread --json`).action(v(t,i=>u0(i))),R_(r,t)}import kj from"node:fs";import _j from"node:path";import d0 from"node:readline";var p0=new Set(["j","ja","y","yes"]);function m0(e){return!process.stdin.isTTY||e.stderr.isTTY!==!0?null:t=>new Promise(r=>{let i=d0.createInterface({input:process.stdin,output:process.stderr,terminal:!0}),n=!1;i.once("close",()=>{n||r(null)}),i.question(t,o=>{n=!0,i.close(),r(o)})})}function q_(e){return e.promptLine?e.promptLine:m0(e)}function G_(e){return e===null?!1:p0.has(e.trim().toLowerCase())}import uj from"node:fs";import dj from"node:path";import W0 from"node:fs";import xh from"node:path";var f0=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function X_(e){return e===0||e>=55296&&e<=57343||e>1114111}function Y_(e){return X_(e)?65533:e>=128&&e<=159&&f0[e-128]||e}function Q_(e){return X_(e)?65533:e}var ht=(()=>{let e=new Uint8Array(127),t=0;for(let r=33;r<=126;r++)r!==34&&r!==36&&r!==92&&(e[r]=t++);return e})();function ex(e,t,r,i,n,o){let s=e.length,c=o*90,l=0,u=()=>{let pe=ht[e.charCodeAt(l++)];return pe<o?pe:pe*91-c+ht[e.charCodeAt(l++)]},d=r-i,m=r+n,f=new Int32Array(m);f.fill(-1,i,o),f.fill(-1,o+d,m);let h=new Int32Array(m),w=new Int32Array(m);function D(pe,Te){let he=0,ze=Te,st=Te+pe;for(;ze<st;){let Tt=ht[e.charCodeAt(l++)];if(Tt<89)he+=Tt,f[ze++]=he;else if(Tt===89){let kn=ht[e.charCodeAt(l++)]+2;for(;kn--;)f[ze++]=++he}else{let kn=ht[e.charCodeAt(l++)];he+=89+(kn<90?kn*91+ht[e.charCodeAt(l++)]:ht[e.charCodeAt(l++)]*8281+ht[e.charCodeAt(l++)]*91+ht[e.charCodeAt(l++)]),f[ze++]=he}}}D(i,0),D(d,o);let A=new Int32Array(n*2),C=0,j=0;function W(pe,Te){for(let he=0;he<pe;he++){let ze=Te+he,st=u(),Tt=u();A[j*2]=st,A[j*2+1]=Tt,j+=1,h[ze]=C;let kn=(f[st]<0?w[st]:1)+(f[Tt]<0?w[Tt]:1);w[ze]=kn,C+=kn}}W(n-o+i,o+d),W(o-i,i);let K=new Uint16Array(C),G=0;for(let pe=0;pe<j;pe++)for(let Te=0;Te<2;Te++){let he=A[pe*2+Te],ze=f[he];if(ze<0){let st=h[he],Tt=st+w[he];for(;st<Tt;)K[G++]=K[st++]}else K[G++]=ze}let fe=new Uint16Array(t),Kt=0;for(;l<s;){let pe=ht[e.charCodeAt(l++)];pe>=o&&(pe=pe*91-c+ht[e.charCodeAt(l++)]);let Te=f[pe];if(Te<0){let he=h[pe],ze=he+w[pe];for(;he<ze;)fe[Kt++]=K[he++]}else fe[Kt++]=Te}return fe}var fh=ex("!}.&u%}'&}*'~!6*)%&,~!J~!J~%L~y<~!R,~~%Lu~~#GD~~#|)1#%}^%}2%+#.##%##%}&%##%'#%##&%#%#'%#&#%#&#'#%%#&#%##%#)%''%&%#%#'%#%%#%%}%%%#%#&(23#%%#&-%0%('1#(##%#'##+%'*.:1}#%#6-+(%'%%#%%%}#L'2351&('%}&/N'(0(/*-%(%%}#'+&T%7.2}#&%&#%#36/5##%&%%#&#%%#))2%%##%&&'0~!#*+&'%1~!%).'3q?&%'1~!.##%6(~!+%%%(Gw'rT~!E#<nA%#jZ~!H%(~!42##~!*31&~!G%U~#)5~#`3~!J~!Z~%]~%Y~%C~!q~!u~#kz~%#~!6'~!D~!U~!?~#T~!c%~!G#'~%7|~!G~!J~!G&~#pb~(Df}#%}*&}#%##%##%##&#-}&'#'&%#.++}%mI,#,@&(}*%}*'%&##&#%##%}&0}#.},U},%}+%}&%}#%##&}B%(}(%}+%)})%##%#&}&%##%&}<%}>%#%&}*%}(%}9%}/%})%}*%}*%}?&}&%}3%}&*#%})%#%#)}#&#-#+*%E%%'%'#%}#*V##&##I}#&&##%&%#&&Qf%%))w/0+&%#(#.%-''''++++7}>%4'',##1,#%#&%##&#'##&#*#9)%&%}#*}%,#+P(%A&%#'&##wSD',9E00#y#@}(+}&%&>~!#~!X}#*}(&&}(&}(,%}%&#+&}#&}I%#%}%)#(},'%#*}4%%#%}(''}#/##(##),%-##%%)#&}(.}&%#&}%%}*&#%},&&}&%}#%*'#%})%}D&}&%}-&}6&#&}-,%}#%})-(~+`~,=?~I9'9%~!,#%})%})%}@%}?%}(~!?~#<~#pP~#BG~#=1#%K+~#?#~%;)~#A~#mF1~#A'~'X%'~#lR~#N~'N~#r~#m#-~#i'?%#'%~#B%##%,%#~#_%#0%~#]732~,w~2+#:&#%&'0%&>%}#>##F+)#%&&#(+_}4&}-%}(&}@&}O7Fdf0@+/v4}&WU##&/0#&'('B#%}.%}'+#%}#%%&#&%#%##+#&#)#6#'#.},%}c%},%#%##%&#&%#&~#>'*-.%##%##%}#%%}%'~#)D1}#%*&~#_%%'(~#S2%'.}#~#=##*'*-%}&'%'##&&~'E%.#&~#M4}%%##&'%#~#O1##%&#'+~#<B%##%%'%+~#;#@%}#&%#&&%#(~#H1}'%'##&&~#?A}&'~#D#%32}'&&&&~#[}'(#%}'~#;C})&}%%#%~#=&%,3}%'(#%%~#^'#&&)#%'~#Y%-~#d-%'~#^%%&#&&&}#~#b~2t*&'~&(~&@~0%~e~3}%*''0})&}+~!9##-}#%-hD*)1fC#%/&/fB#40~!+#)*4~!+~!K'&:~!/*7~!.#~!H~!L':~%x&~!H#~!*~%1~!I#~!+A~#p'~!F~~#-#~,,(~.Z~!V~%;'B'mq-W~!N~%I%#&&#&}#%},%%}'%}+X#%}#&}(%}'%}<%}#%}%%'}'%}:~![)9@~%>~#UA%-%##&~!C%~!-.9:~!1~!-^2/:a~!y,D*J#-5)/4~%23,~#G~!L1~!0X3`~!2+~!!0-~&E~!W~!o,>Y&]~%cZx_&~#O*9#A#'#+I'%#)~!0B*-5A+-((F&*M#)(-7-5+'-3a5Vi~!Y~!?+[)%3),ERHm~!+:D,VG.+)?fB%%*(%)'(#&80%1'8`K8?`+'Z#&O&'H5#*9)A%%5&3))0%39+.*7#()&&*=4@**L)<'_&*+..;(#*+)./&0#3)%')-8(4ixD(&.}%,('aI:,)%,k2231T)I'#/-W7,/'Q#.'Y24+h')37</31&83##&0#),H(?'&?/1##%#&&#%''-%&&&#(&''&#.-'%#%%(,')*'&#&#'##%(%(#%('#&##%%%%('%#%#%%#%#&%##h>w+v<ayvyvcg.uuhKr}g/v|g>u9i[~>g5uI~=RvdwEg;v/g;uk!!TTSx]@RT!U!#!@VBRUU!'UTe-d0c`e&gSdicedFcrdTaqb.kYcAohdYd@a3e+d}dMdtd.aJ#bqcK`dle/e.e'dwdPdodddjbEb}ogd^ofdpduc6j?l%d{drdqc)d7bacOdQ%T#Y)X.sR[yH>6Vyv3[xwLu>vo'!*.[yBacahoj>6Rew3[xqdZa#!a&#^(X-[yG>6Vyu3[xvg3sEr|g.u/Ri9db0T#^(Xa)!-[y;>6Vylg4wKs{JwNZt3@3r=c4Z([xlg;wKt!cpq's@v7A'*a(a+!-a#[y<3Dt?3Dt'>6Vym3[xmg9rxsNJwLZt4~?r?db1T#`-!(Xa,!0[yS>6Vz%NuQs.g4wKtnJwNZtS@3r>c4Z([y%g;wKtrdga8!a(!#&T*Y-Xa#!a0<or[yc3Dtq>6Vz43[y3JwNZtf@3s!Ju}!%Dti:pm3c_%X#tjB5pkd6q!r]u?voC'*-a.a2!0a&a+[yI3DtI3Ds~3DtH>6Vyw3[xx;:s#~<5pKJwNZtE@3r~d`a)!a2T#a.(!+U.X1[yT3Dt`3Dtv>6Vz&3[y&g9rxwzcxstPu.<rAJwLZtT~?r@dZa%!a.&^*Za(/Reu[ya>6Vz23[y1g3sEr}wkg{NuQRg{ci(U#5@b`~,cg#U(2WnH5wugcRh7dX#T(Y,a'Ta!!a,[yZ<]mj>6Vz,3[y+Pv#5ReZKu+=,%!H}7ABwkaS?Rh:BcW(X#<]mrj:ubv/ARekdg%!(!a.*Ta(Y.X1!#sP>Rl*Dt6[y>>6Vyo3Wf*jOvuumvuRgRJuq*!:9<B@bX~3jVv&v@s@5Re[d/rQt{uAvo&a&a*)a2!,0Wf!3Dt0=Bs'>6Re}3[xy~<5s%JwJZt1~Gs)c;&!#2sJkNuXvzq7rxu,Re8dka4!a8(aEZ+a@Y.X1Xa)[yd=Bs(3DtP>6Vz53[y4cX#X&Re:avRe9~<5s&JwJZtQ~Gs*i^rzvdRg+Jv{%!2sbB@bX}kdga,!Za?&^*T1/!a'Dt+[y6>6Vyf3Wf%g/u;s4hGu6?Rh-JvZ,!c%#&RoX54Rivj7uyvf8RgTKvZB%*!2sGh<vu5Rgq<=C::9bb~#dZ#T&Ta6Y.X*Dt>[y93Wf)coZ(T,6VyifluvRgC@95@B@bX~/hFu34cC#T,k/unq8w8Q5RkUklwQuzunq8w8Q5Rk8d/rJu?v8w9)-&!a0a;a&aIWejg3sEr/h1s<DtDJvyZqY5aws3Jvy!&Wei~Hr1:au5@Bag>23E~5c:Z&bX};kKv?w&unuVu5Rjc;>bs)#~@:Rh.=ay<a]C;b`}Vd6s/t{uAvoaxa()!a,a7%-a#a2Dt,[yF2Wo[>6Vyt3[xuNuPRi&NuPwpi#RoWh?vf8Ri%Jv]!%Ri:KvxD!.'2WeAjZu`q9rxu,Re7woeAg-unLq(qA_/*2Wg_g3u5q^9:4E}/jTrxrzv=Wkkd~0UX#^^Xa-a1a5T&a=U1a'*aEa]!a*aPaA-adok[y54Rn>;:p3~Dp5g9rpsFNvZqjg3uJp4~<5p0Pw;5qlJwNZt*@3p1Pw:5p/Ou!5p2JvG'!6Vye=<qnJvh_[xhg3v,Rh3kOwOw-sDuev/Re^dha[a%!%!a+#Ta7)-5TaCaO!aka!a)sf[yb2>Rl!9ARiq5E}Qg=ucRkBE|oJrJ_@Wk~@Wk{JrJ_@Wk|@WkyJrJ_@Wk}@WkzJvO_[y2g-vMRmiKuYC!)&>Ri;>Ri<@3RkNc](X#@9Rk=g5vuRmhKvDB!+'=]meg3u4Rmgd)#Y'Vz3CARmfd`a+!%T'!+#Ta1Ta6TaM-sTDt9[yA9sYd'%Y#s[[xpj:ueunaXRgEjRq,v-vuqdd2'`#6Rev<32@5>:2<E}5xIo9a*X#Y(;5RePJvD_g>vyRgNj8w)v8<wggs:RgXiZt|vjx,hSq3ah!-(~@:Ro/Ou!5RhWj^v(pyw8unRhUdx-UY#^Ua.a3a70!)%UX1TaDa)'omRiRRhE[y:3Dsz=Br,>6Vyj3[xkg6ruwjcqsrPw;5r*Ku]D'Zt-@3r(~?r.i[vwv]dU1a--U#`a4(g/vsRhPOu!5RhLj:rmu9Wo!~@:wdh@g/vsRiTjXuvvNr}:RhBj^v(pyw8unRn]dz1UYa'a+^Y(!aETZalaRY.Ta?a4[yDJw1!#qLsW>6Vyrfzq-pLflpwRe|Js>%!Dt@3Dt&Jvy_[xs~HrnjMuwpsw'RecKu+D#'!t<~Grl~?rjg5u-x,gwp{ah!-(~@:Rg~Ou!5Rh'jXuvvNr}:Rh#cW#X/c;&!#2sLi[v7u7RgpJv)(!iLrxu,Re6j7v@s@5Se[e7d`aW!Za(a`T.a#!a3!&aDa-!9)Dt_=6s+3[x~~DR|h~DS6avhGun5RkZj3w)v-]mkKunB!&*]kb97R|i<ARk<c:Z(6Vy}Juh'!wziMRoS:F|vkLuauJv5vtvQRh1d='T+Y#VyO~DR|jcF#T'7R|g97R|kJv3'!ay<Rj,Jvh&!:ReXcsa6*a+#a#_aIRf9aLRf?c,Z&Rf5Rf7c.Z&Rf;Rf>cQ#%T'p-Rf8Rf=ct#%'(*!,p,Rf4p+Rf6Rf:Rf<d~'Ua%U*^UYa(!a,-!#a4YaTalaEX0a8a<Weo3Dt/3Dsx=Br93Wen~Dr;~<5p<JwNZt2@3p=Pw:5p;Ou!5r3c7&!#:p>3Ds}KvGB)_6Vyk2sM=<r7x'eovA(!hFu1ARf}cV#X&@r5j6rvwQa^Rf3c=Za'wkghJv__g;unRggA53B9=b^}%j6uduo5Jq;!(hIv%2Re`Ou4ARe_e%a#^^^Xa&!a*a2!&a6YaP!*ad!#a:aE/5Rn?[y@>6Vyp;:pE~DrY~<5pBJwNZt8@3pCh=rt3rWPw:5pAJup_[xoNuPpF9c!#'45pD5ARn)d8#X'X*3@rU72s]h>v<<sSjJpqvewOJq/(!hNw'5ReBk0s2u3w/w'5ReE5@Jq.!a+JQ!&WeU23d(#Y&RjG5]jBk!u7w&u0udARjEe#+^^^Ub#!a2/a`Z(agT1!a-a;|@TaG!aS[yV=Re~fow'RguNuPRe?bz#'>RoUWeL>:Cbb|?JwPZtVg6ruRmzJvD'!6Vz(g/vmRh~Jvy_[y(g9voRgyx*cy(#2>Ri2B9b]~9kIw9u7rluJu3Rg]dI#a%UY'@=p%CAx.gQZ&RhwwygtRm{x5g_Z'+ABqR9Woa=Bp&dV#^*Xa'!&@o{g4v]Rk;Jv{!%Rk[wkkiA5RkiwwfUB=x,fUuqC&*!>RfTg8v0RfV~ARfSd;rJsAuAv9wR'ae+/aO!a@aza/a#[yQ@Wg!2Wemg3sEr0JvB_g>uvReWg2v+Re=KupB_+[y!2AbY~-~Hr2AJwD!(h<~El>h<~El?Kun@+_:9b`}Kg-v/Ri3g;vtwyk_9]k_d=&T#*U.6qh@Ab`|K9:H|CJv[!&3Dtex'fDwC%!Rf[9WlMd[(^X,!a%Z06Vz!@WgBg=v~Rgvg,QRe@awd,#Y+jTv|Q~EfWj]uNr|~FRfXdy#Y&^Ua%!aO.!(a)Ua;=!a@aKap!a-,a!Ta]a[rSa]p?[y82sK=Bq~;:p:~<5p8Pw:5p7d'#Y'Wf(;RnRi[u4w&RgJJvG'!6Vyh=<r#ijuuv/sIKuYD'ZtG@3p9~Gr&d2#`(g<vtRgFj`u5w&rqpxRf2CJuY!+:wfnTOu!5Rg}jNs1ucv&RfwJvA!&3@q|BDcC#T,k/unq8w8Q5RkTklwQuzunq8w8Q5Rk9dga#!a'!a=#a0!:+Tb*b@aO.a4!aba8aFJv^}?!VyR~Dr<g;u%Rn.~<5p[x'e`wNZtR@3p]Pw:5pZhNvjBp.woe_g5u-r4JwF!%DtO3:ooc7&!#:p^3DtpLuGw(!+%)Dtk6Vz#2sd=<r8d'#Y([y#<x3gJt`w@!)%}MRiowzikRij=]ilxAf3,U(#B2Rf#g0v-Rm[ck{`U#]giKv3>)!&6Ri154s,KuGB_%@r68r:dJ|t`#X(9<E|u2@H|rx3gJu?w'!+'1Nu7Reg4=H~+9<wxgY95Rm]xLggZ-`(X}U2:Ri4h<uOawRmsJv__5@bb{jbV~3dka#a'a]!,#a+U=a>b6a3b%!/aKa/)!arwve^VyJ;:pR~DpTg3uJpS~<5pOPw;5qmPw:5pNOu!5pQJvG'!6Vyx=<qoJvA!{~Jup!%@qk7Rn/KvyD!}''[xz;>wkh'?Rh,x8gyt`w5D!&),(SgyccRgztJ@3pPB5p#d'(Y#<]mmifubw&RgoJvE&!82s^JvF&!8Rf,ADb]~;x=h'rNu]vK!,%'*0RnORh)4Rh*AqQg-vaRnNg;wHwkh'ba~4cE#Ta*x3gctyw@'!+%RnFRnD<4Rn@hFvK5RnCxWg[#`&a0Ua()`1Rm75Rg[c]%X#qi8Rg^NvdRj>BwzgZauwji7Rm6A4wgg]d1#&(*,.0a#Rm;Rm<Rm=Rm>Rm?Rm@RmARmBe%#^^^Xaea?aC/b+(,!a+a#!a/!>a&Ta<aKbD!2wphBRnk[yPw}hE|.=Br-3Dtm>6Vy~g6urRf.x,hPrNav!%'RnqRo%Ro#Nu;q[Pw;5r+JwNZtM@3r)d'#Y'Weh;xChL#`&RnmRnoKu}>%(!Rne~Bs-;2wjcussJv+'!aYSO}6@B<5?ba~8LrNvj!.%*ROwungw~ng~:9;Ri^>wtnig;wHRnixDh@|(UZ.x1h@|)!#:2<H|*xHn]#-UX'3Ro)z=iT}6ARns=Bwsn_wpnaRncw]aR(#UXa&Ua*a/=]iPd'#Y&Ro'WnXf{QRm2hNvj]nZd`'T~&1`{|`#9b]{}c:'!#Wl{>@=be}]?cl{{U#:5Abb}Jds#^YaF!a*b4a#a3aPa>&Tb!bH!*a_!Eau?/a&RjY<]gj>6Vz*;:pe~DrZg,QRj1JwNZtX@wihspcJvZ&!VyX9WmOJu|!|N2WmHJvh&!]ht~Bpbcn&T(!#RmQ<s7Nu;padH#X'`+WmJ@>RmKCARhnKup=!)&Wf+:RhqNuPpf9c!#'45pd5AwghpARn(Ls@w!%,)!RmP@Wfe<E|IJva!&WmNg8vsRmLd`*.`#Y'Xa!axRn*]hrA8Rhug5s@rXg8u!RmMd8#X'X*3@rV72smdI*#UY&RmICARho~GsgxVgd)Ta'U-Y&Xa!T#RnEWnA@Wffg1uDRi0hFvK5RnBxGnG&#`%owp)@wsf+bX}Ze-*1!a*^^^Ua|!#a.aq&Ya2!a>.a6!a:aO`aJDtL[y`@Wg#>6Vz12@wzoYRoZNuPRi!NuPRhzg=ucRi,@=b`{Yg=ucRi-ACJvB!&Sh[ebSh]ebi`wUuFRm4Jw2_[y0JvB!.<Ju(!&SoG}6Shd}6<Ju(!&SoH}6She}6Kur@._g5vHRieJvx!{L2G{Kx6gd'T#?Rh82Wi5cZ#X(g1w)Rm5dW-Y(Ta#!a)!#aYa=wnfE=su2>>bU{0j9udv:<svj8uQv-7RgHdE%#^'sq9sp=>Bb_{TJv`!&g/r|snj6v(us5d,#Y(56H}[978H}]Jw5!&g1rushJvB!+j;v{u5?zDhd}6}bj;v{u5?zDhe}6}ce*#`(^^^a[aea!=!a6a*aoXb1a.!aAbL!b>,b'aL!aV@Wf|2Wlg3[y/JwNZt^@3piPw:5pgJunZou3@rsJva&!Vy_g<v~Rm#JvG'!6Vz0=<r{Ju{%!:pj@WfsiXuJu3Rm:JvZ&!WfA~Bph@c4Z&Dtwax5rubx(#:awRk1@d,#Y&RfjRfid1#,Y(@Wfp2Wlrg5s@ryKu[@!,'=]ig9wlk?Rk>g5u-rqJvy'!@9RkQcH(T#=>Ri~@<wkj(Wj(KuZB*!&<7rw@9RkRcH(T#=>Ri}@<wkj)Wj)dg(Ta2Xa9X#`-!a*CARhg@@=I}d9x;c~#X%so=<sj>2@@=aybb}XjWv0Q~EfEj3vLv;<d,#Y(56H}`978H}_dgaPaFa'a/!#a3Y0a_a;a|!1(a7-[yE3[xt;:pJNvZrrg3uJrvJwNZt=@3pIh=rt3rxPw:5pGOu!5rpJvG'!6Vys=<rz@c4Z&Dt(ax5rtJvZ!&~BpH@wsfNg-vaRlNci*U#=<wei<F}a5@Jq.!a*JQ!%@qZ23d(#Y&RjH5]jCk!u7w&u0udARjFd/prq=tyvpaEa(a:.!a1aZ(@@=I}:9wpd%=<sX55w_h}@@=I{t=ay<aU@@=I}T=ay<2@@=I})?C9:9au@9Cb]}DP~=x-fAZ(2Wl1=ay<aU@@=I}>5@d##Y+jTv|vV~EfFj]uNpn~FRfGdgaK!Z2&!a8a-Tb({E!acTbM*!a(DtY[yYd'%Y#sl[y*hHvh>Re5x2c{Z}.j4uCvcawRiMd+#X+_x&d!},<5RkX;2Hzw@x,gavfB-!{CcF&T#Roe;RodwWbBg5urRgaKvHC*_6Vz+<4opieuew&Rmq@d]&Y)X,T#X0Rh}<BqP=4qS9:ReMg/ujReNJw0!/<Jui%!bd{kawwnemRelAxUa?a3#*.&UX(Ya+a/RhvRnQ<o}9Wmtd-#Y&RgSRmw9;Rmxay=Rmyg-vaRmuxEhSrNu,v-voC!%(aR.a(a7+1Ro1>Ro5CE{A9b]{@;5x#eO{:g;urRi+KrNA!%(Ro3>Ro79;Ri_Ku@>{;&!x%gX|{KunA_+g5QRj/g3u5Rj#g>uERj%wio/xRhS&!,!#^1U}wba{8>>@=be}qC@:D5ba{7Ku+A&!}x?ba}t>>@=be}se(aA^^^Uat!b0#{pa+awUazbGa#aLb9bgaWac'a5TbS=Br!d1#`%scp_Jvl!#rT>Re0JvX&!VyN=H{Fcm#U&:pY=ReaJv2&!]h0=]nUJvG'!6Vy|=<r%JrM_=]h2@Wlud'#)U'Wf'b]{i=]h/Jvh!&~BpWg=v]RnMx+ny#'Nu;pVwjnu=]nwxJnx,T#`&Reqwjnt=]nvieu9vrRjLLuYwP(#+!th@wih5pX~Gr'g5v/Rh4KunA'!-CARnP@wwiN:Rm_9x'cvw>!|l=<saKvAA!0&3@q}>w^e1bp#&Re2Re3BDx7gH#T|f5H|eKuZ>!%(:qNAH{]Jv6!+3B2B9=b^{X<5<B92:E{ZLvhwA(a;a%!igQuyRmad+#Y}m@3Rh5d8#X'X*:AqUAHzmaxwbh<aXRnVcF}RT#Nw&cj#U(BWnug/vsRntdka)(a3+.Zb7aYYan1!bVa@Xa}[y^@b[{G=H{+hFu73Rj&Pv#5ReQcK%T#sig1v{Rj'Ku+D#'!t]~Grm~?rkKuMB!01d5#`'Vy.ta3Dtu~Hroc8#'{^45s85AwZbP&!#Rn!wghxWn#KvEA!)&2RlA2RlBx:h|#(T,=]j09Wobz>x]z/@awRoTd+#Y(az]hFhCrm4d,#Y+jTv|Q~EfMj]uNr|~FRfOdCa!Xa9_X#@<plJvf!%b`{(9;Rgwc;.!#2x7cw#T|UDb]|T5Ju={(!=@E{&Jv)&!Ab`{'awJvf!~*>>@=be{#KuY>!+&4Ezyi[ugv&RjIdea+T)#UXa&T-T&a!Rh9auRmW=]kLg5vuRn+g3u4Rn-Ow6ARn,hHus5xNk?#UX(U~)/g8v0RkD~AwkkF?Ri.OuNBwkkA?Ri/d|a2`a*^UYa.!aBTZaTa'Xa;!(!2!-a#b2[yC>6Vyq3[xr2Wi?g1rusVh%s?DtF~<5rbJs;%!DtBfswKtCj[uvuSsEu3RgVx3o:u+wN'*Zt;@3rd~Grh~?rfg8w)Lq)qE&-a%!>bI|`jWv0vV~EfCjTv|vV~Ef@j]uNpn~FRfBcK#T']gWNu7x,k7q4ai(0!hHv8<RhmkMu9vrsBuev/RhlCJvB!,g<v{wchh~@:Rhji[vrv{wchi~@:RhkdS&a5UY#Ta!RgPwwiI5BwciI~@:Rh`x'iJvj'!5]iJPu8Bwch]~@:Rhach)U#h3rp]gLh@t|Ax,hTq3ah!-(~@:Ro0Ou!5RhXj^v(pyw8unRhVd|)`,^UYas!a?/a2Z'a^Ta{Tb7Ta(a#!a,Wf&9sZ3DtAadamov=Bqt3[xig8vsRm~>waiL2b`{QJv*_Ouv2qgj<v]v2BqfdR'X*X#Y-@3qr~Gqv~?p6hHv-]glPup5Lq+q?_%*b_{qF{n9b^{rOu4ARhpKvCD!+&~Bqp:5Dbb}nwoiKl&unuTuBv]v+ueunaXRf0=Jvh!0nKufu8v1w&w7q%w&uHrz:Rgnj5w,uxDJq/(!hNw'5ReCk0s2u3w/w'5ReFd>Za&!*UaA=<wkgsRnSJv^!%Refifw3vyRgOKu_B'!,<]gkiiu:w&Rh<=C@a^<B57@2F{[<B5@aW:=3away9A5aW=<B=C@a^<B57@2F{Ie-#`(^^^bCara.b8aza6!/bZ,!adTbnTbOb+aFaS!aAT9@Wf~2Wli3Dtl2@d,#Y&RfnRfmJwJZtN~GqyJva&!VyMg<v~Rm%iXuJu3Rm9Jv[_=]ih9wlkDRkCd1#`(@Wg>2Wls3cH#T(@<Rj*=>Ri|b~'#23s9h<~El.d'#Y&Dtxi^rzvdRl#d*#U%(o|B2s`hJwSaxRmDKv4B&!1:Rmdd5#`'Vx}to~Hq{x'f1v3(!BA5ba|bJv_&!Wfug1v]ReIdO+U/Y#&G}-8wze=Rh{g1v]ReHg/uQRf/by#)ibQwERl/cH#T(@<Rj+=>Ri{cNu+vlax-!(#a0qa9<Rii2;;bU{H;x<i=&X#Rk`<4wwi=C9H~8xAI(Y#<azRi@45wXI<B9;5bb~7dL(X#Xa(+!aL6Vy{g5QqOau:5au2@ay547EzbxOcU(UX-T#Ta#:Cbb|A?wjh/b_|SOw6ARgtihr}u7Rhy<d1#T)X1@@=I|~=ay<2@@=aybb}Sj3vLv;<d,#Y(56H}A978H}@dGpvs@uAu`vcw9*!aFa+ai%(b!aXa8.a?a[ozWey=sU2@G}Nch&U#Rf_WexKu+D#'!t:~Gr`~?r^j]uNr|~FRg*j^psurwJt|RmcKv)@&!)7Rkv~Br[@wxfO:Rl3co#U'6Rezj_q#vIuavjRltwzeyh@vr5JqD0!>aY?C9:9au@9Cb]}9cl#U*5;5<H||jbuus1ucv&Rfvg1v~d/pppzqFr^a--a~!aMat1(hFv;Wiz@@=Izoj5uuv-7Rix~Cw`fk2WlVcZ#X,k)u3vWs@u2]ktg;wEx'fBq(_2Wg/jTv|vV~EfoJv]!15x'hzqG!(P~EfU~CRl_j6v(us5x4i-#T(2WmZ?C2F|d>Kq<aj1!*jTqIsBv=Wl`~Cw`fi2WlWj`v0u*~>RlR=c>Z,k#u3vWs@u2]kr<c1Z+jTqIsBv=Wla~Cw`fm2WlXdmb3!a{(arZa`bkTa%TbQTa-a9+c'!aM!/[yL=Bqug.w'RifhFvyDRj.g>vgwyk^9]k^Jv3_@WfbAARkhJw2_[x|JvB_wkoIRoKwkoJRoLd'(Y#<]gm=<9<H|yd'%_X#skDtb3awwqkgNulRkgdB#^',9:p'hJwSaxRmEBwVb8@4=H|qLu+w50&!)@3qs~?pU>Awwn;;Rn=c:Z'ARn<=<qwKvC@!/&~BqqJv6!&]eVb^z^xRge'/a%+^`#Sge}6<4Rn3=]n0Pw2>Rn8Jw0!&>Rn:>Rn6cY#a7+!a&=<wkaNw~h3z_c5Z{=wjh#=]nLKv^D!&)Vyz=bW|swYb<WetcG#T(2wxa@qVx@gD#Y&b^|V5JwG&!5bb|pg/w&RgD@x=kHs=uAvn!a%%/'+RmSRh694Ro`g-vaRmRhHv-]mlxCcS#`&ba~.5cD#Ta)P~=d,#Y(56H{>978H{Dd_#{2^Y%_+qbbb{6g3sERhsbU{?dfa.,`a(Xa<!aiX#(55RiG54RiHcI#T'WiU3RiVNvdwtfcRlKNvdd,#Y&RlHRlExQgf.1*^T'X#Sgf}6Wn4=]hfPrk>Rn7Jw0!&>Rn5>Rn9Lunw?&a2!,5<oq@@wqfdRlJj5Q~=d,#Y(~ARfcOuN]fdDKw;ay(}i!547E}j?cI#T(@5bV}iCbV}hdv(^^Tb?a40,b##Tbo!a*bR!a<b|a/!aKai!aU[yK=]o^g:v>ReGJwPZtK<7Rh+h<~El,Pv#5ReR@awwxjCg,ulRjDJv6&!]j!z?aQeeg>w=Sh<eeJw;!&axEzOg,Qosc!#*:wkeJ]eJ>x'h-u(!%Ro.w~h.zPdNZ(X,Ya![x{;9ReY;wkgxRiF:x?ap#Y&RmUg<s2Rkod]+UY0TZ'!a&A9sw<=bczLNvuw{gqzNhJwSaxRmCKuLay!#&s_Rf-55b^{uJvZa!!c%#(55Ri654wmiu5RiuawLu,vp!+}^%b_}Y9;wkgxba}o>A9:=b^}zKuh=a''!3awRk3c*'!#aHRk6c+Z&Rk5Rk4Jv)&!awRjSawd9*`#0?C2@EzMj8u<uJ5RmbjQrquJu3x,k>uq@_+=ayb^|W~ARkEOuN]k@7dhzV^X/X&a-#zRzSb`zXcJzTT#2WkVKvDBzW!%FzY9;5bbzWjQrquJu3Jw3%!b`zU=ayb^zQd:#X(T-a!6Vyywxh}=b]{Jg=u1RiAdGp~qHtzv!w(wA+a+a;<!aJaYai'anasb(=azRmV:Cbb{MLq2vb!%')RjuRjrRjtRjqx3jnqCw3!%')Rk(Rk+Rk&Rk)Lq2vb!%')Rj{RjxRjzRjwLq2vb!%')RjsRjpRjfRjex3jcqCw3!%')Rk'Rk*RjkRjl9<CbbzfOu4ARhxLq2vb!%')RjyRjvRjhRjgx=joq*uKvb!%')+-Rk.Rk%Rj~Rk-Rk#Rj}x=jdq*uKvb!%')+-Rk,Rk!Rj|RjmRjjRjidAq&qKs@uAv8Aa.'*-a@a&0!aM@a5[y73Dsy3Ds|3Dt):wxgI2sHJwJZt.~Gqxwsf0ikrzt}Rl0Jvy_[xj~HqzKv_A|D!&WfP8axRoVcf,U#k(v]v+ueunaXRf1Ju}'!g8u#Ri=jQw!sCunLprq>!,')~<5qeGzq9F{W=c##%s5au:5aU3CBE|;d4#X(D!a&6Vygx(b;#(=]ed?C2F{N<capoq2r[a&!aPa9,'Pw;5s:@@=I|,55w_h|@@=IzcP~=x'fCqB_2Wl2>aU@@=I|1OuNBc1Z+jTqIsBv=Wlc~Cw`fl2WlZ~AcTa%!Z+jTqIsBv=Wlb~Cw`fh2WlYk+uNqJsBv=WlSg,u3dca3#UXaMYa)TaB-=cM|7T#<bI}l5@B932:aV2G{BOuNBJq:|M!5Ezt=<B=C@a^<B57@2F{v>cB{/T#=ay<bI{3Jv6!a.6BKq0ah&+!5E}HP~Ef{978BaU@@=Iza<7d#.Y#978BaU@@=IzH~AJq0!(@@=IzG978BaU@@=IzFe,aU*Y&^^^bvJb,b:bFad!a,c2Ta>aL.bo6!a#CbTa'T#Re{2Wlh2@G{yg6t~Ro_NvdRfticuRQRllJv3&!x&c|zs@Jw3!%RflwpfkRlpKuL;%(!Re<@G|C2GzdhIvuBwgjAg-u0RjAKQB%!(GzZ@G|5NuuRl7d='T+Y#Vy[g<v~Rm!==G|>JvA!)@wma=]m1ifuaw&RmnLs@vT'!|/+[y,g:v>ReTJw1!#qX=x!eC{bLu+wT&)ZtZauq_~Graci&U#F|89:r_Lupvq!.)&2RlG8RfaC=x!eF{_h?rpWlmd&'!#X|&]k::xJey#`'T|+<E|&2@H|%dE#(^,g;u.RiEg6vjRiC9xCkA{O|zY#g=ucRmXKs0@!&*@G|m@awRknJuh!,3d(}gY}eJvj!%Rm):Jw3!%Rm+Rm-Ls0w(&!a(a#@b[|6cZ#X'7RkxWgAOu4ARn'dH'U#Y*Vz-Wm'CARm}d]*#a%^a*T'aK!a<9bV{PC=p*Jw4!&SgxcbB5r]idw(wBRmF7xFkt#&`(Rm/Rm8E|!JuY_9:Rl5=wrgr2:bbxd@xXfB(a*#T+!.X0X1Ta/a'T&RlDRfL>RlyARl9b[z[>RfZ:RlL:RfRwlg/ARl;9;RlxKv,A/!%7s69<74=BA5ba{-8Bde#`a<XaKYa1,a'P~=wxfB2bZ}}?C972@@=I}r8@55B9;5bb}G978B2@@=aybb}3j3vLv;<Jw3&!>Rfk=ayb^}4~Ad1#`*@@=aybb{w2@>==<bbz]dx+UY#^UaF!a9!bB'Ya1.!ajXa#%olRhD[y=3Dt#Ov5BrHKuMB%!(Rf^Wep~HrJwkiQjKr|~FRg)Ku+D#'!t5~GrF~?rDdV)UY,Z/_7RkuG{<~BrBg,rlsO:235B@bX}|d?a1!#`(6Vyn5@d##Y+jTv|vV~EfIj]uNpn~FRfH7Lq2vb1!a9-978BaU@@=Iz9978BbU}#~AJq0!(@@=Iz8978BaU@@=Iz7~AJQ|}!978BbU}!JvkaK!AdUa21-U#`a+(g/vsRn~Ou!5RPj:rmu9WhOjXuvvNr}:RhAj^v(pyw8unRn[kPr}p|u7vwv]RiSBd;pppzq@qHQa?(b.!a.a`@.|xa(hFv;Wiyj5uuv-7Riw~Cw`fg2WlU978BbU|wOuNBJqG!(P~EfD~CRlQcZ#X,k)u3vWs@u2]ksg;wEx'f@q1_2Wg.j]uNpn~FRfqJv]!15x'h{qG!(@@=IzK~CRl^j6v(us5x4i,#T(2WmY?C2F{1>Kq<aj1!*jTqIsBv=Wld~Cw`fj2Wl[j`v0u*~>RlT=c>Z,k#u3vWs@u2]kq<c1Z+jTqIsBv=Wle~Cw`fn2Wl]dn1#c(a(b^a2!b/bAT(bj!aDa7bu,a_a{c0!2T0g:v>ReD2@G{42@G{5~DpM~<5rc=Bx6i>{RT#RnI@zCx]y]z:2Jv[!zr5Awyk]9]k]dD(Y+X#6Vz.g=wKtgwhaCwgmTWj2Lu,w%_+/[y-B;b^xeg3u3Rj-2@bX{*KrJ<!+'@Wg(g?QRlC@Jv`!%b[zIwsfII}8JQ_@w|kW|=Jv(%!AqcOuNBJvEzh!bYzjLs@wP#(0!oy@>RkdJwMZtc3Dtd@BcG#T'9bWxg2@2Fznd*#Y+;2x'c}w<zizixNgwa#Z'U+!/!a'!a+w~g~z6wcn{Rn}wcnzRn|5Rh%=]nJg5vuRmvNvdRlvcprJu}w*az*a#!%.a.'Bot9qT]kj@Wg'ay2Gzv@Jv`!%b[zEwsfHI}1;ck#Ux`<Cbbx_Lu+w!a&0*!wko*wwo,So,}6Juqxf!E}PigQuyRm`d3(`#8>Rn%:A5B;bZ~%KvhCa!a2!x>k7#Uxb@b{#xaRk7Jw0!)>wwhlShl}6>wwhmShm}6CJvB!.x'hhvj{!!5Bwkhhbaz}x'hivjz~!5Bwkhibaz|xEhTrNu,v-vpD!a%&/)a3a.,%Ro2t[CE{)@3re9b]{%wjo09:rgc:Z&Ro6=<riifuaw&RmoKrNA!%(Ro4>Ro89;Ri`dSaL'UYzxZb)7Rka3xRhT&!,!#^1U}vbaz{>>@=be}yC@:D5bazzKu+A&!}{?ba}y>>@=be}wxBh[t`u~vJvr!%a!a()a,a0a4RoC=]o;Ju(!%RoGRhdwjh`=]oAg>w#Ro?g5vuRo=NvdRl|Ku]C.!&;RoEJvB!%RoORoMBx'h[v+_?w~h`}~5?w~hd~!xKh]oiptu-utv.vp!#%&a30a@a'a+(a/aOp(o~p!RoDJu(!%RoHRhewjha=]oBNvdRl}g>w#Ro@g5vuRo>c[#X']o<CauRoRAd-#Y':RkpauRoQKu]C.!&;RoFJvB!%RoNRoPBx'h]v+_?w~ha}t5?w~he}ue!/UbhYacXaW^Tc&a;b:a-c/#b&aja1(!cL+!bKbt!bmcRc9aIc?8[yW3Dtt94Rg`Jv}!&SiRMzBhEebShEMNuPRe>x7gL#TzuwjirRipc<Z&>on;>z=h-MSh.Mwqczx'a7vj&!>Re4@=ResJt__NuPRi*NuPRi)j]uNr|~FRfzKrJ>_+@Wfy@Wf]2WocKrJ<!+'@Wg%g/QRl@@Jv`!&awRl<wsfFIzgLu(w*!.*&ShBMwvhIRhI9;RhNx1hK'!#Sn]Mx1hK~0!#:2<H~7cNu+w7D*'1ZtW>Rn1~?rOc:Z&Rn2=<rQ<7wjh&=BSnLMc]#X(6Vz)w[b=a!U#9wzgMc3#&(RgMRitRis<x,gKt`ax!&+SioM=BSilMc3#&(RgKRinRimKurB,!&SiQMzBhDebShDM6BJQ!(P~Efx978B2@@=I}WLrJw!!,a*&@G}O@9wkibRid@@x'fKwC!&SlDMSfLMjUv~Q~EfKKv3@a+!(hFv-]mpx/hYZ(C5RiWz<o/MwkhY?So/M@x,gbvfB*&!SgEM:SoeeehFu3:Rgbda(,^TZa)X/7Sg[eb:2RgI~BrMC@wgkc:wwkcRerx3h(uUvK!&*,SnOM4Sh*MArRg;wHRh(x=h;rJvPwI!a4',a'0@Wg&=BSh/Mg>w=Rh=g3w*wwgGRgGcW(X#;Sg}M2Gzk@Jv`!&awRl=wsfGIz`dKZ*T'Y-:RhR7RhQg5u-p`j6v(us5d,#Y+~Awkia?RicOuNBwkibba}Ld6p~tyu_vbAa'a+!a/'a3aEa8a!>Sh,ebJv{!&Sh@ebSaReb9;SgwebNuPRi(NvdRl)NuPRi'hHu^<Rm^Jvv_@Wl(g;u1Si/ebKu'B&!*Sh?eb@Wl'z@aPeb95Si.ebcpputyvjB)!,&a+0a%ShAMWeK@G}C@WfJ9;RhMwvhH9w{ia}ix,hJvRA1(!zAn[MRhHx1hJ~*!#hFv(BSn[MBJQ!(@@=I~'978B2@@=I}2db.Ua<'X}+T#a0XaG2G}E;wkg|wuh!Rh!x,hZu,@)!&So0MVy)C5RiXACJvB!&5RiY5RiZg8w)cG}*T#2@bU}=KsA>(!a.3wkhZba~(x,h^u(A!&(SoCMRhb5Bz=h[eb?w~hb~6x,h_u(A!&(SoDMRhc5Bz=h]eb?w~hc~6e)aA1T#T,^^^c-bMb&blcPaP(a/!0!bA=b5c@a(!bfbrc#2afwmhARnjwchORnp2Wlf3DtsNvdRl-2@wpa<]m0bx(#:awRk2@Jw3!%RfhwpfgRlnKQB%!(G{V@G|'NuuRl6d='T+Y#VyUg<v~Rl~==G|<Jv+'!aYShC}6@B<5?ba~8@Jw3'!g2QRljhLrpWlOd+#Y'g.w'rIg>w*wgj@g-u0Rj@Lu+wT&)ZtUauq]~GrGci&U#F|39:rELrNvj!.%*RhCwunfw~nf~:9;Ri]>wtnhg;wHRnhx3hDs@v~!/+'@Wfr@9RkSNu&Rlo=@<5GzoKs0@_+@Wl+@awRkmJuh!-3d(}pY#qWJvj!%Rm(:Jw3!%Rm,Rm*de&!1U-U#`)Re;@G|.@9Ri82@wjfvRlq=@<5GzpLvOvr!).&2RlF8Rf`C=x!eE{.Jw3_g2QRlkhLrpWlPde(!#U{s,UXa*Ta'[y'g:v>ReS;x0PZ&RnlRnn~HrKJw1}f!=x!eB|2w]aP(#Xa&a*Ta.Ua2a7=]iOd'#Y&Ro&WnWg;u.RiDg6vjRiBNvdRlzhNvj]nYJuW_2Wm3x)kFze{9d])!a.!,Y01!#&aC!a3RndC=ox~BrC@2b^{pg,rlse7x'ksuq!%Rm.E{xidw(wBRmGx9o+)X#wwo-So-}69:Rl4@xSf@a#XZ'X)X,Ta(/ARl8b[xc>RfY:RlI:RfQwlg.ARl:9;Rlwdn'#^XafaQa1X1TaHTa)@b[{zcZ#X'7RkwWg@Ou4ARn&x)kG#{,g7u/RkGdH'U#Y*Vz'Wm&CARm|bx#(A]gUbUzJj9Q~=d,#Y(56H}l978H{U7d,0#U*2>ABb_xZ978BbU{e~AJQ{g!978BbU{hxMh?ad{oUYZ.x1h?{l!#:2<H{mx3n[t{vl!,&a%3Ro(z=iS}6ARnr=Bwsn^wvn`Rnbd`*T}B0!#^X'BG{c9b]{a>>@=be}F?JvS!&BG{d7BG}(Bde#`a1X,Ya@!a'P~=wxf@2bZ}I56B2@@=aybb}08@55B9;5bb}<j3vLv;<Jw3&!>Rfg=ayb^}&OuNBKuLA!)a!P~=x#fD{f2@>==<bbzl?C972@@=Ix^d6rSu,v7w*C(0a)a6#B+a%!sQ[y?3Dt%3[xn~<5rLOu!5p@Ku+D#'!t7~GrP~?rNKvlaya7'!h+v-5qMg=t|cd,U#5AAaa5Abb{S@52B5@a[@52B5Gx[iXueu;d<#`a(!/549C;ag>23ExY5@Dah89b^~689Jv)!~2b[~1Lv'w(%*!a#bX|aPrmawRe]keu7uhv-q6rxu,q`xTo]/a5aU!bNaDXbi!b-!ao!b<bwA!#5@B932:aV2G|:d-)Y#hJrL>RhG<7@C5<H|_=Cau:5aj5@B932:bJ|ng>vIbs)#?C2F|9jPv0w.vISh-MKvUaz(.!9ABbb|[5;5<H|Eg>unwfh;9:4E|YjQsBt|vjx'hYq3!(?C2F|J:2<BaY?C2F|GOu!5x,g|p{ah!-(?C2F|c9:4E|OjXuvvNr}:Rh&i[w*t|cd+U#jJvsu)vsSn~Mkfrmu9p}u7vwv]So!McW#Xa!ax5@A5aY:5;5<H|>kJv~vYrquJu3x4ib#T)2@SmZM?C2F|Bj:rmu9@xPhI(a*a#U#`a3-5Abb|L~@:RhK9:4E|0@52B5G|#C::aY?C2F|-:2<BaY?C2F|.5Jvk!a)javYrquJu3x4ia#T)2@SmYM?C2F|HAxPhH(!a#U#`a*-5Abb|4~@:RhJ9:4E|R@52B5G|F:2<BaY?C2F|Sc^#Xa2j=Qq5CJvB!-g<v{z;hhM?C2F|Zi[vrv{z;hiM?C2F|XKsA>!a)-g<v{z;h[eb?C2F|]i[vrv{z;h]eb?C2F|^iZu.vix,hZq3ah!.(?C2F|QOu!5ShXM:2<BaY?C2F|P",13494,2713,49,25,61);var bo=new Uint16Array([512,26465,29036,7,0,2,4,116,24638,116,24636,8693,29807,24610,621,1,0,0,3,112,24614,111,115,24615]);var we;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE",e[e.VALUE_MASK=8191]="VALUE_MASK"})(we||(we={}));var Re;(function(e){e[e.AMP=38]="AMP",e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_X=120]="LOWER_X"})(Re||(Re={}));var $c=32;function tx(e){return e-Re.ZERO>>>0<=9}function h0(e){return(e|$c)-Re.LOWER_A>>>0<=5}function g0(e){return(e|$c)-Re.LOWER_A>>>0<=25}function y0(e){return e===Re.EQUALS||g0(e)||tx(e)}var De;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(De||(De={}));var gt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(gt||(gt={}));var Ic=class{decodeTree;emitCodePoint;errors;state=De.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=gt.Strict;runConsumed=0;constructor(t,r,i){this.decodeTree=t,this.emitCodePoint=r,this.errors=i}startEntity(t){this.decodeMode=t,this.state=De.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(t,r){switch(this.state){case De.EntityStart:return t.charCodeAt(r)===Re.NUM?(this.state=De.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=De.NamedEntity,this.stateNamedEntity(t,r));case De.NumericStart:return this.stateNumericStart(t,r);case De.NumericDecimal:return this.stateNumericDecimal(t,r);case De.NumericHex:return this.stateNumericHex(t,r);default:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|$c)===Re.LOWER_X?(this.state=De.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=De.NumericDecimal,this.stateNumericDecimal(t,r))}stateNumericHex(t,r){let i=t.length,{result:n}=this,{consumed:o}=this;for(;r<i;){let a=t.charCodeAt(r);if(tx(a)||h0(a)){let s=a<=Re.NINE?a-Re.ZERO:(a|$c)-Re.LOWER_A+10;n=n*16+s,o+=1,r+=1}else return this.result=n,this.consumed=o,this.emitNumericEntity(a,3)}return this.result=n,this.consumed=o,-1}stateNumericDecimal(t,r){let i=t.length,{result:n}=this,{consumed:o}=this;for(;r<i;){let a=t.charCodeAt(r)-Re.ZERO;if(a>>>0>9)return this.result=n,this.consumed=o,this.emitNumericEntity(a+Re.ZERO,2);n=n*10+a,o+=1,r+=1}return this.result=n,this.consumed=o,-1}emitNumericEntity(t,r){if(this.consumed<=r)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Re.SEMI)this.consumed+=1;else if(this.decodeMode===gt.Strict)return 0;return this.emitCodePoint((this.decodeTree===bo?Q_:Y_)(this.result),this.consumed),this.errors&&(t!==Re.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}flushAndEmitLegacyOrReject(t,r,i,n){return this.consumed=t,this.excess=r,this.result===0||this.decodeMode===gt.Attribute&&(n===0||r>1||y0(i))?0:this.emitNotTerminatedNamedEntity()}stateNamedEntity(t,r){let{decodeTree:i}=this,n=t.length,o=this.decodeMode===gt.Strict,{treeIndex:a}=this,{excess:s}=this,{consumed:c}=this,l=i[a];for(;r<n;){for(;(l&(we.VALUE_LENGTH|we.FLAG13))===0&&(l&we.JUMP_TABLE)!==0;){let f=t.charCodeAt(r),h=l&we.JUMP_TABLE,w=(l&we.BRANCH_LENGTH)>>7;if(w===0){if(f!==h)return this.flushAndEmitLegacyOrReject(c,s,f,0);a+=1}else{let D=f-h;if(D>>>0>=w)return this.flushAndEmitLegacyOrReject(c,s,f,0);let A=i[a+1+D];if(A===0)return this.flushAndEmitLegacyOrReject(c,s,f,0);a=a+w+A&65535}if(l=i[a],r+=1,s+=1,r>=n)break}if(r>=n)break;if((l&(we.VALUE_LENGTH|we.FLAG13))===we.FLAG13){let f=(l&we.BRANCH_LENGTH)>>7,{runConsumed:h}=this;if(h===0){let w=t.charCodeAt(r);if(w!==(l&we.JUMP_TABLE))return this.flushAndEmitLegacyOrReject(c,s,w,0);r+=1,s+=1,h=1}for(;h<f;){if(r>=n)return this.treeIndex=a,this.excess=s,this.consumed=c,this.runConsumed=h,-1;let w=h-1,A=i[a+1+(w>>1)]>>((w&1)<<3)&255,C=t.charCodeAt(r);if(C!==A)return this.runConsumed=0,this.flushAndEmitLegacyOrReject(c,s,C,0);r+=1,s+=1,h+=1}this.runConsumed=0,a+=1+(f>>1),l=i[a];continue}let u=l>>>14,d=t.charCodeAt(r);if(u!==0){if(!o&&(l&we.FLAG13)===0&&(this.result=a,c+=s-1,s=1),d===Re.SEMI)return this.emitNamedEntityData(a,u,c+s);if(u===1)return this.flushAndEmitLegacyOrReject(c,s,d,u)}let m=v0(i,l,a+(u||1),d);if(m<0)return this.flushAndEmitLegacyOrReject(c,s,d,u);a=m,l=i[a],r+=1,s+=1}return!o&&l>>>14&&(l&we.FLAG13)===0&&(this.result=a,c+=s-1,s=1),this.treeIndex=a,this.excess=s,this.consumed=c,-1}emitNotTerminatedNamedEntity(){let{result:t,decodeTree:r}=this,i=r[t]>>>14;return this.emitNamedEntityData(t,i,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,i){let{decodeTree:n}=this;return this.emitCodePoint(r===1?n[t]&we.VALUE_MASK:n[t+1],i),r===3&&this.emitCodePoint(n[t+2],i),i}end(){switch(this.state){case De.NamedEntity:return this.result!==0&&(this.decodeMode!==gt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case De.NumericDecimal:return this.emitNumericEntity(0,2);case De.NumericHex:return this.emitNumericEntity(0,3);case De.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;default:return 0}}};function v0(e,t,r,i){let n=(t&we.BRANCH_LENGTH)>>7,o=t&we.JUMP_TABLE;if(o){if(n===0)return i===o?r:-1;let c=i-o;if(c>>>0>=n)return-1;let l=e[r+c];return l===0?-1:r+n+l-1&65535}if(n===0)return-1;let a=n+1>>1,s=r+a+n;for(let c=0;c<n;c++){let u=e[r+(c>>1)]>>((c&1)<<3)&255;if(u===i){let d=r+a+c;return s+e[d]&65535}if(u>i)return-1}return-1}var N;(function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"})(N||(N={}));var $;(function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.DeclarationSequence=20]="DeclarationSequence",e[e.InSpecialComment=21]="InSpecialComment",e[e.InCommentLike=22]="InCommentLike",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.InPlainText=25]="InPlainText",e[e.InEntity=26]="InEntity"})($||($={}));function Xn(e){return e===N.Space||e===N.NewLine||e===N.Tab||e===N.FormFeed||e===N.CarriageReturn}function ei(e){return e===N.Slash||e===N.Gt||Xn(e)}function b0(e){return e>=N.LowerA&&e<=N.LowerZ||e>=N.UpperA&&e<=N.UpperZ}var yt;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(yt||(yt={}));var J={Empty:new Uint8Array(0),Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,33,62]),Doctype:new Uint8Array([100,111,99,116,121,112,101]),IframeEnd:new Uint8Array([60,47,105,102,114,97,109,101]),NoembedEnd:new Uint8Array([60,47,110,111,101,109,98,101,100]),NoframesEnd:new Uint8Array([60,47,110,111,102,114,97,109,101,115]),Plaintext:new Uint8Array([60,47,112,108,97,105,110,116,101,120,116]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97]),XmpEnd:new Uint8Array([60,47,120,109,112])},w0=new Map([[J.IframeEnd[2],J.IframeEnd],[J.NoembedEnd[2],J.NoembedEnd],[J.Plaintext[2],J.Plaintext],[J.ScriptEnd[2],J.ScriptEnd],[J.TitleEnd[2],J.TitleEnd],[J.XmpEnd[2],J.XmpEnd]]),wo=class{cbs;state=$.Text;buffer="";sectionStart=0;index=0;entityStart=0;baseState=$.Text;isSpecial=!1;running=!0;offset=0;xmlMode;decodeEntities;recognizeSelfClosing;entityDecoder;constructor({xmlMode:t=!1,decodeEntities:r=!0,recognizeSelfClosing:i=t},n){this.cbs=n,this.xmlMode=t,this.decodeEntities=r,this.recognizeSelfClosing=i,this.entityDecoder=new Ic(t?bo:fh,(o,a)=>this.emitCodePoint(o,a))}reset(){this.state=$.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=$.Text,this.isSpecial=!1,this.currentSequence=J.Empty,this.sequenceIndex=0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(t){t===N.Lt||!this.decodeEntities&&this.fastForwardTo(N.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=$.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===N.Amp&&this.startEntity()}currentSequence=J.Empty;sequenceIndex=0;enterTagBody(){this.currentSequence===J.Plaintext?(this.currentSequence=J.Empty,this.state=$.InPlainText):this.isSpecial?(this.state=$.InSpecialTag,this.sequenceIndex=0):this.state=$.Text}stateSpecialStartSequence(t){let r=t|32;if(this.sequenceIndex<this.currentSequence.length){if(r===this.currentSequence[this.sequenceIndex]){this.sequenceIndex++;return}if(this.sequenceIndex===3){if(this.currentSequence===J.ScriptEnd&&r===J.StyleEnd[3]){this.currentSequence=J.StyleEnd,this.sequenceIndex=4;return}if(this.currentSequence===J.TitleEnd&&r===J.TextareaEnd[3]){this.currentSequence=J.TextareaEnd,this.sequenceIndex=4;return}}else if(this.sequenceIndex===4&&this.currentSequence===J.NoembedEnd&&r===J.NoframesEnd[4]){this.currentSequence=J.NoframesEnd,this.sequenceIndex=5;return}}else if(ei(t)){this.sequenceIndex=0,this.state=$.InTagName,this.stateInTagName(t);return}this.isSpecial=!1,this.currentSequence=J.Empty,this.sequenceIndex=0,this.state=$.InTagName,this.stateInTagName(t)}stateCDATASequence(t){t===J.Cdata[this.sequenceIndex]?++this.sequenceIndex===J.Cdata.length&&(this.state=$.InCommentLike,this.currentSequence=J.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.xmlMode?(this.state=$.InDeclaration,this.stateInDeclaration(t)):(this.state=$.InSpecialComment,this.stateInSpecialComment(t)))}fastForwardTo(t){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===t)return!0;return this.index=this.buffer.length+this.offset-1,!1}emitComment(t){this.cbs.oncomment(this.sectionStart,this.index,t),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=$.Text}stateInCommentLike(t){!this.xmlMode&&this.currentSequence===J.CommentEnd&&this.sequenceIndex<=1&&this.index===this.sectionStart+this.sequenceIndex&&t===N.Gt?this.emitComment(this.sequenceIndex):this.currentSequence===J.CommentEnd&&this.sequenceIndex===2&&t===N.Gt?this.emitComment(2):this.currentSequence===J.CommentEnd&&this.sequenceIndex===this.currentSequence.length-1&&t!==N.Gt?this.sequenceIndex=+(t===N.Dash):t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===J.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,3),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=$.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(t){return this.xmlMode?!ei(t):b0(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(ei(t)){let r=this.index-this.currentSequence.length;if(this.sectionStart<r){let i=this.index;this.index=r,this.cbs.ontext(this.sectionStart,r),this.index=i}this.isSpecial=!1,this.sectionStart=r+2,this.stateInClosingTagName(t);return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===J.TitleEnd||this.currentSequence===J.TextareaEnd?this.decodeEntities&&t===N.Amp&&this.startEntity():this.fastForwardTo(N.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===N.Lt)}stateBeforeTagName(t){if(t===N.ExclamationMark)this.state=$.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===N.Questionmark)this.xmlMode?(this.state=$.InProcessingInstruction,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.state=$.InSpecialComment,this.sectionStart=this.index);else if(this.isTagStartChar(t)){this.sectionStart=this.index;let r=this.xmlMode||this.cbs.isInForeignContext?.()?void 0:w0.get(t|32);r===void 0?this.state=$.InTagName:(this.isSpecial=!0,this.currentSequence=r,this.sequenceIndex=3,this.state=$.SpecialStartSequence)}else t===N.Slash?this.state=$.BeforeClosingTagName:(this.state=$.Text,this.stateText(t))}stateInTagName(t){ei(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=$.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){Xn(t)?this.xmlMode||(this.state=$.InSpecialComment,this.sectionStart=this.index):t===N.Gt?(this.state=$.Text,this.xmlMode||(this.sectionStart=this.index+1)):(this.state=this.isTagStartChar(t)?$.InClosingTagName:$.InSpecialComment,this.sectionStart=this.index)}stateInClosingTagName(t){ei(t)&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=$.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===N.Gt||this.fastForwardTo(N.Gt))&&(this.state=$.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===N.Gt?(this.cbs.onopentagend(this.index),this.enterTagBody(),this.sectionStart=this.index+1):t===N.Slash?this.state=$.InSelfClosingTag:Xn(t)||(this.state=$.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){if(t===N.Gt){if(this.cbs.onselfclosingtag(this.index),this.sectionStart=this.index+1,!this.recognizeSelfClosing){this.enterTagBody();return}this.state=$.Text,this.isSpecial=!1,this.currentSequence=J.Empty}else Xn(t)||(this.state=$.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===N.Eq||ei(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=$.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===N.Eq?this.state=$.BeforeAttributeValue:t===N.Slash||t===N.Gt?(this.cbs.onattribend(yt.NoValue,this.sectionStart),this.sectionStart=-1,this.state=$.BeforeAttributeName,this.stateBeforeAttributeName(t)):Xn(t)||(this.cbs.onattribend(yt.NoValue,this.sectionStart),this.state=$.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===N.DoubleQuote?(this.state=$.InAttributeValueDq,this.sectionStart=this.index+1):t===N.SingleQuote?(this.state=$.InAttributeValueSq,this.sectionStart=this.index+1):Xn(t)||(this.sectionStart=this.index,this.state=$.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))}handleInAttributeValue(t,r){t===r||!this.decodeEntities&&this.fastForwardTo(r)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(r===N.DoubleQuote?yt.Double:yt.Single,this.index+1),this.state=$.BeforeAttributeName):this.decodeEntities&&t===N.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,N.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,N.SingleQuote)}stateInAttributeValueNoQuotes(t){Xn(t)||t===N.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(yt.Unquoted,this.index),this.state=$.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===N.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===N.OpeningSquareBracket?(this.state=$.CDATASequence,this.sequenceIndex=0):this.xmlMode?this.state=t===N.Dash?$.BeforeComment:$.InDeclaration:(t|32)===J.Doctype[0]?(this.state=$.DeclarationSequence,this.currentSequence=J.Doctype,this.sequenceIndex=1):t===N.Gt?(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=$.Text,this.sectionStart=this.index+1):t===N.Dash?this.state=$.BeforeComment:this.state=$.InSpecialComment}stateDeclarationSequence(t){this.sequenceIndex===this.currentSequence.length?(this.state=$.InDeclaration,this.stateInDeclaration(t)):(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:t===N.Gt?(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=$.Text,this.sectionStart=this.index+1):this.state=$.InSpecialComment}stateInDeclaration(t){(t===N.Gt||this.fastForwardTo(N.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=$.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){t===N.Questionmark?this.sequenceIndex=1:t===N.Gt&&this.sequenceIndex===1?(this.cbs.onprocessinginstruction(this.sectionStart,this.index-1),this.sequenceIndex=0,this.state=$.Text,this.sectionStart=this.index+1):this.sequenceIndex=Number(this.fastForwardTo(N.Questionmark))}stateBeforeComment(t){t===N.Dash?(this.state=$.InCommentLike,this.currentSequence=J.CommentEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):this.xmlMode?this.state=$.InDeclaration:t===N.Gt?(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=$.Text,this.sectionStart=this.index+1):this.state=$.InSpecialComment}stateInSpecialComment(t){(t===N.Gt||this.fastForwardTo(N.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=$.Text,this.sectionStart=this.index+1)}startEntity(){this.baseState=this.state,this.state=$.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?gt.Strict:this.baseState===$.Text||this.baseState===$.InSpecialTag?gt.Legacy:gt.Attribute)}stateInEntity(){let t=this.index-this.offset,r=this.entityDecoder.write(this.buffer,t);if(r>=0)this.state=this.baseState,r===0&&(this.index-=1);else{if(t<this.buffer.length&&this.buffer.charCodeAt(t)===N.Amp){this.state=this.baseState,this.index-=1;return}this.index=this.offset+this.buffer.length-1}}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===$.Text||this.state===$.InPlainText||this.state===$.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===$.InAttributeValueDq||this.state===$.InAttributeValueSq||this.state===$.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){let t=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case $.Text:{this.stateText(t);break}case $.InPlainText:{this.index=this.buffer.length+this.offset-1;break}case $.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case $.InSpecialTag:{this.stateInSpecialTag(t);break}case $.CDATASequence:{this.stateCDATASequence(t);break}case $.DeclarationSequence:{this.stateDeclarationSequence(t);break}case $.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case $.InAttributeName:{this.stateInAttributeName(t);break}case $.InCommentLike:{this.stateInCommentLike(t);break}case $.InSpecialComment:{this.stateInSpecialComment(t);break}case $.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case $.InTagName:{this.stateInTagName(t);break}case $.InClosingTagName:{this.stateInClosingTagName(t);break}case $.BeforeTagName:{this.stateBeforeTagName(t);break}case $.AfterAttributeName:{this.stateAfterAttributeName(t);break}case $.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case $.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case $.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case $.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case $.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case $.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case $.InDeclaration:{this.stateInDeclaration(t);break}case $.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case $.BeforeComment:{this.stateBeforeComment(t);break}case $.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case $.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===$.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingCommentLikeData(t){if(this.state!==$.InCommentLike)return!1;if(this.currentSequence===J.CdataEnd)if(this.xmlMode)this.sectionStart<t&&this.cbs.oncdata(this.sectionStart,t,0);else{let r=this.sectionStart-J.Cdata.length-1;this.cbs.oncomment(r,t,0)}else{let r=this.xmlMode?0:Math.min(this.sequenceIndex,J.CommentEnd.length-1);this.cbs.oncomment(this.sectionStart,t,r)}return!0}handleTrailingMarkupDeclaration(t){if(this.xmlMode)switch(this.state){case $.InSpecialComment:case $.BeforeComment:case $.CDATASequence:case $.DeclarationSequence:case $.InDeclaration:return this.cbs.ontext(this.sectionStart,t),!0;default:return!1}switch(this.state){case $.BeforeDeclaration:case $.InSpecialComment:case $.BeforeComment:case $.CDATASequence:return this.cbs.oncomment(this.sectionStart,t,0),!0;case $.DeclarationSequence:return this.sequenceIndex!==J.Doctype.length&&this.cbs.oncomment(this.sectionStart,t,0),!0;case $.InDeclaration:return!0;default:return!1}}handleTrailingData(){let t=this.buffer.length+this.offset;if(!(this.handleTrailingCommentLikeData(t)||this.handleTrailingMarkupDeclaration(t))&&!(this.sectionStart>=t))switch(this.state){case $.InTagName:case $.BeforeAttributeName:case $.BeforeAttributeValue:case $.AfterAttributeName:case $.InAttributeName:case $.InAttributeValueSq:case $.InAttributeValueDq:case $.InAttributeValueNq:case $.InClosingTagName:break;default:this.cbs.ontext(this.sectionStart,t)}}emitCodePoint(t,r){this.baseState!==$.Text&&this.baseState!==$.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+r,this.index=this.sectionStart-1,this.cbs.onattribentity(t)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+r,this.index=this.sectionStart-1,this.cbs.ontextentity(t,this.sectionStart))}};var{fromCodePoint:nx}=String,ti=new Set(["input","option","optgroup","select","button","datalist","textarea"]),de=new Set(["p"]),ni=new Set(["h1","h2","h3","h4","h5","h6","p"]),rx=new Set(["thead","tbody"]),ix=new Set(["dd","dt"]),ox=new Set(["rt","rp"]),k0=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["a",new Set(["a"])],["li",new Set(["li"])],["p",de],["h1",ni],["h2",ni],["h3",ni],["h4",ni],["h5",ni],["h6",ni],["select",ti],["input",ti],["output",ti],["button",ti],["datalist",ti],["textarea",ti],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",ix],["dt",ix],["address",de],["article",de],["aside",de],["blockquote",de],["details",de],["div",de],["dl",de],["fieldset",de],["figcaption",de],["figure",de],["footer",de],["form",de],["header",de],["hr",de],["main",de],["nav",de],["ol",de],["pre",de],["section",de],["table",de],["ul",de],["rt",ox],["rp",ox],["tbody",rx],["tfoot",rx]]),ax="doctype",_0=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),x0=new Set(["math","svg"]),sx=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),cx=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]),Bt;(function(e){e[e.None=0]="None",e[e.Svg=1]="Svg",e[e.MathML=2]="MathML"})(Bt||(Bt={}));var S0=/\s|\//,Yn=class{options;startIndex=0;endIndex=0;openTagStart=0;tagname="";attribname="";attribvalue="";attribs=null;stack=[];foreignContext;cbs;lowerCaseTagNames;lowerCaseAttributeNames;recognizeSelfClosing;htmlMode;tokenizer;buffers=[];bufferOffset=0;writeIndex=0;ended=!1;constructor(t,r={}){this.options=r,this.cbs=t??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=r.lowerCaseTags??this.htmlMode,this.lowerCaseAttributeNames=r.lowerCaseAttributeNames??this.htmlMode,this.recognizeSelfClosing=r.recognizeSelfClosing??!this.htmlMode,this.tokenizer=new(r.Tokenizer??wo)(this.options,this),this.foreignContext=[Bt.None],this.cbs.onparserinit?.(this)}ontext(t,r){let i=this.getSlice(t,r);this.endIndex=r-1,this.cbs.ontext?.(i),this.startIndex=r}ontextentity(t,r){this.endIndex=r-1,this.cbs.ontext?.(nx(t)),this.startIndex=r}isInForeignContext(){return this.foreignContext[0]!==Bt.None}isVoidElement(t){return this.htmlMode&&_0.has(t)}readTagName(t,r){let i=this.lowerCaseTagNames?this.getSlice(t,r).toLowerCase():this.getSlice(t,r);if(!(this.lowerCaseTagNames&&this.htmlMode))return i;if(this.foreignContext[0]===Bt.Svg)return cx.get(i)??i;if(this.foreignContext.length>1){let n=cx.get(i);if(n!==void 0&&this.stack.includes(n))return n}return this.isInForeignContext()?i:i==="image"?"img":i}onopentagname(t,r){this.endIndex=r,this.emitOpenTag(this.readTagName(t,r))}emitOpenTag(t){if(this.openTagStart=this.startIndex,this.tagname=t,this.htmlMode&&t==="form"&&this.stack.includes("form")){this.tagname="";return}let r=this.htmlMode&&k0.get(t);if(r)for(;this.stack.length>0&&r.has(this.stack[0]);)this.popElement(!0);this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(t==="svg"?this.foreignContext.unshift(Bt.Svg):t==="math"?this.foreignContext.unshift(Bt.MathML):sx.has(t)&&this.foreignContext.unshift(Bt.None))),this.cbs.onopentagname?.(t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){this.startIndex=this.openTagStart,this.attribs&&(this.cbs.onopentag?.(this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,r){this.endIndex=r;let i=this.readTagName(t,r);if(this.isVoidElement(i))this.htmlMode&&i==="br"&&(this.cbs.onopentagname?.("br"),this.cbs.onopentag?.("br",{},!0),this.cbs.onclosetag?.("br",!1));else{let n=this.stack.indexOf(i);if(n!==-1){for(let o=0;o<n;o++)this.popElement(!0);this.popElement(!1)}else this.htmlMode&&i==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=r+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.isInForeignContext()?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}popElement(t){let r=this.stack.shift();this.htmlMode&&(x0.has(r)||sx.has(r))&&this.foreignContext.shift(),this.cbs.onclosetag?.(r,t)}closeCurrentTag(t){let r=this.tagname;this.endOpenTag(t),this.stack[0]===r&&this.popElement(!t)}onattribname(t,r){this.startIndex=t;let i=this.getSlice(t,r);this.attribname=this.lowerCaseAttributeNames?i.toLowerCase():i}onattribdata(t,r){this.attribvalue+=this.getSlice(t,r)}onattribentity(t){this.attribvalue+=nx(t)}onattribend(t,r){this.endIndex=r,this.cbs.onattribute?.(this.attribname,this.attribvalue,t===yt.Double?'"':t===yt.Single?"'":t===yt.NoValue?void 0:null),this.attribs&&!Object.hasOwn(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){let r=t.search(S0),i=r<0?t:t.substr(0,r);return this.lowerCaseTagNames&&(i=i.toLowerCase()),i}ondeclaration(t,r){this.endIndex=r;let i=this.getSlice(t,r);if(this.cbs.onprocessinginstruction){let n=this.htmlMode?this.lowerCaseTagNames?ax:i.slice(0,ax.length):this.getInstructionName(i);this.cbs.onprocessinginstruction(`!${n}`,`!${i}`)}this.startIndex=r+1}onprocessinginstruction(t,r){this.endIndex=r;let i=this.getSlice(t,r);if(this.cbs.onprocessinginstruction){let n=this.getInstructionName(i);this.cbs.onprocessinginstruction(`?${n}`,`?${i}`)}this.startIndex=r+1}oncomment(t,r,i){this.endIndex=r,this.cbs.oncomment?.(this.getSlice(t,r-i)),this.cbs.oncommentend?.(),this.startIndex=r+1}oncdata(t,r,i){this.endIndex=r;let n=this.getSlice(t,r-i);!this.htmlMode||this.options.recognizeCDATA?(this.cbs.oncdatastart?.(),this.cbs.ontext?.(n),this.cbs.oncdataend?.()):this.isInForeignContext()?this.cbs.ontext?.(n):(this.cbs.oncomment?.(`[CDATA[${n}]]`),this.cbs.oncommentend?.()),this.startIndex=r+1}onend(){if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let t=0;t<this.stack.length;t++)this.cbs.onclosetag(this.stack[t],!0)}this.cbs.onend?.()}reset(){this.cbs.onreset?.(),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,this.cbs.onparserinit?.(this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(Bt.None),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,r){if(t===r)return"";for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let i=this.buffers[0].slice(t-this.bufferOffset,r-this.bufferOffset);for(;r-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),i+=this.buffers[0].slice(0,r-this.bufferOffset);return i}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){if(this.ended){this.cbs.onerror?.(new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){if(this.ended){this.cbs.onerror?.(new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}};var M={routeLength:500,sourceFileLength:500,title:300,description:600,canonical:2048,robots:200,headingOneItems:20,headingOneLength:300,headingTwoItems:50,headingTwoLength:300,structuredDataTypeItems:30,structuredDataTypeLength:100,internalLinkItems:500,internalLinkLength:2048,sitemapUrlLength:2048,robotsGroups:50,robotsRuleItems:200,robotsRuleLength:500,robotsUserAgentLength:200,productName:200,productDescription:1e3,readmeHeadingItems:40,readmeHeadingLength:200,gitCommit:64,gitBranch:200,frameworkVersion:40,cliVersion:40};var I0=new Set(["script","style","noscript","template","head","title"]),lx="http://internal.invalid";function vt(e){return e.replace(/\s+/g," ").trim()}function Ue(e,t){if(e.length<=t)return e;let r=t,i=e.charCodeAt(r-1);return i>=55296&&i<=56319&&(r-=1),e.slice(0,r)}function gh(e){return e.toLowerCase().replace(/^www\./,"")}function C0(e){try{return gh(new URL(e).host)}catch{return null}}function ux(e){let t=e.trim();if(t.length===0)return null;let r=t.split("#").pop()??t,i=r.split("/").filter(Boolean).pop()??r;return i.length>0?i:null}function hh(e,t,r){if(r>6||e===null||typeof e!="object")return;if(Array.isArray(e)){for(let a of e)hh(a,t,r+1);return}let i=e,n=i["@type"],o=Array.isArray(n)?n:[n];for(let a of o){if(typeof a!="string")continue;let s=ux(a);s!==null&&t.add(s)}"@graph"in i&&hh(i["@graph"],t,r+1)}function A0(e,t){let r=e.trim();if(r.length!==0)try{hh(JSON.parse(r),t,0)}catch{return}}function D0(e,t,r){let i=e.trim();if(i.length===0||i.startsWith("#"))return null;let n;try{n=new URL(i,`${lx}${t.startsWith("/")?t:`/${t}`}`)}catch{return null}if(n.protocol!=="http:"&&n.protocol!=="https:"||!(n.origin===lx)&&!r.has(gh(n.host)))return null;let a=n.pathname.length>0?n.pathname:"/";return a.length>M.internalLinkLength?null:a}function R0(e){if(e.length===0)return 0;let t=0;for(let r of e.split(" "))/[\p{L}\p{N}]/u.test(r)&&(t+=1);return t}function dx(e,t){let r=[],i=0,n=0,o={title:null,titleBuffer:null,description:null,canonical:null,robots:null,heading:null,jsonLd:null},a=[],s=[],c=new Set,l=[],u=[],d=new Yn({onopentag(A,C){let j=I0.has(A)||C.hidden!==void 0;if(r.push({name:A,hidden:j}),j&&(i+=1),A==="svg"&&(n+=1),A==="title"&&n===0&&o.title===null&&o.titleBuffer===null&&(o.titleBuffer=""),A==="meta"){let W=(C.name??"").trim().toLowerCase(),K=C.content;K!==void 0&&(W==="description"&&o.description===null&&(o.description=vt(K)),W==="robots"&&o.robots===null&&(o.robots=vt(K)))}if(A==="link"&&C.href!==void 0&&o.canonical===null&&(C.rel??"").toLowerCase().split(/\s+/).includes("canonical")&&(o.canonical=C.href.trim()),A==="script"&&/ld\+json/i.test(C.type??"")&&(o.jsonLd=""),C.itemtype!==void 0)for(let W of C.itemtype.split(/\s+/)){let K=ux(W);K!==null&&c.add(K)}A==="a"&&C.href!==void 0&&l.push(C.href),(A==="h1"||A==="h2")&&i===0&&o.heading===null&&(o.heading={level:A==="h1"?1:2,text:""})},ontext(A){o.titleBuffer!==null&&(o.titleBuffer+=A),o.jsonLd!==null&&(o.jsonLd+=A),!(i>0)&&(u.push(A),o.heading!==null&&(o.heading.text+=A))},onclosetag(A){if(r.pop()?.hidden&&(i-=1),A==="svg"&&n>0&&(n-=1),A==="title"&&o.titleBuffer!==null){let j=vt(o.titleBuffer);o.title=j.length>0?j:null,o.titleBuffer=null}if(A==="script"&&o.jsonLd!==null&&(A0(o.jsonLd,c),o.jsonLd=null),(A==="h1"||A==="h2")&&o.heading!==null&&o.heading.level===(A==="h1"?1:2)){let j=vt(o.heading.text);j.length>0&&(o.heading.level===1?a.push(j):s.push(j)),o.heading=null}}});d.write(e),d.end();let m=new Set((t.internalHosts??[]).map(gh));if(o.canonical!==null){let A=C0(o.canonical);A!==null&&m.add(A)}let f=[],h=new Set;for(let A of l){let C=D0(A,t.pagePath,m);if(!(C===null||h.has(C))&&(h.add(C),f.push(C),f.length>=M.internalLinkItems))break}let w=vt(u.join(" ")),D=[...c].map(A=>Ue(A,M.structuredDataTypeLength)).sort().slice(0,M.structuredDataTypeItems);return{title:o.title===null?null:Ue(o.title,M.title),description:o.description===null||o.description.length===0?null:Ue(o.description,M.description),canonical:o.canonical===null||o.canonical.length===0?null:Ue(o.canonical,M.canonical),robots:o.robots===null||o.robots.length===0?null:Ue(o.robots,M.robots),h1:a.slice(0,M.headingOneItems).map(A=>Ue(A,M.headingOneLength)),h2:s.slice(0,M.headingTwoItems).map(A=>Ue(A,M.headingTwoLength)),structuredDataTypes:D,internalLinks:f,wordCount:R0(w),textExcerpt:t.includeText&&w.length>0?Ue(w,500):null}}import vh from"node:fs";import L0 from"node:path";var T0=new Set(["node_modules",".git",".hg",".svn",".next",".vercel",".turbo",".ssh",".aws",".gnupg"]),E0=new Set(["pem","key","p12","pfx","crt","cer","der","p8","jks","keystore","gpg","pgp","asc","ppk","kdbx","tfstate","tfvars","secret","secrets"]),O0=new Set([".npmrc",".yarnrc",".yarnrc.yml",".netrc","_netrc",".pgpass",".htpasswd",".pypirc",".dockercfg",".git-credentials",".boto",".s3cfg","secret","secrets"]),P0=[/^\.env/,/^id_(?:rsa|dsa|ecdsa|ed25519)/,/^credentials/,/^secrets?\./,/^service[-_]?account.*\.json$/,/^.+[-_.]secrets?\.(?:json|ya?ml|toml|ini)$/],j0=new Set(["png","jpg","jpeg","gif","webp","avif","ico","icns","bmp","tif","tiff","psd","heic","woff","woff2","ttf","otf","eot","mp3","mp4","m4a","webm","mov","avi","mkv","wav","ogg","flac","zip","tar","gz","tgz","bz2","xz","7z","rar","pdf","doc","docx","xls","xlsx","ppt","pptx","exe","dll","so","dylib","bin","class","jar","wasm","node","sqlite","sqlite3","db","lockb"]),N0=new Set(["ts","tsx","js","jsx","mjs","cjs","mts","cts","json","md","mdx","css","scss","sass","less","html","htm","txt","xml","yml","yaml","svg","toml","gitignore"]);function yh(e){let t=e.lastIndexOf(".");return t<=0||t===e.length-1?"":e.slice(t+1).toLowerCase()}function px(e){return T0.has(e.toLowerCase())}function Ac(e){let t=e.toLowerCase();return O0.has(t)||E0.has(yh(t))?!0:P0.some(r=>r.test(t))}function Dc(e){return j0.has(yh(e))}function mx(e){let t=e.toLowerCase();return N0.has(yh(t))||t===".gitignore"}function Rc(e){let t=Math.min(e.length,8192);for(let r=0;r<t;r+=1)if(e[r]===0)return!0;return!1}function bt(e,t=2097152){let r=L0.basename(e);if(Ac(r)||Dc(r))return null;try{let i=vh.lstatSync(e);if(!i.isFile()||i.isSymbolicLink()||i.size>t)return null;let n=vh.readFileSync(e);if(Rc(n))return null;let o=n.toString("utf8");return o.charCodeAt(0)===65279?o.slice(1):o}catch{return null}}function fx(e){try{let t=vh.lstatSync(e);return t.isDirectory()&&!t.isSymbolicLink()}catch{return!1}}function Ft(e,t){return e===t?0:e<t?-1:1}var U0=/^[A-Za-z0-9\-._~%:[\]]+$/,gx=/^(?:\(\.\)|\(\.\.\)|\(\.\.\.\))/,z0=/^\[(?:\.\.\.)?[^\][/]+\]$|^\[\[\.\.\.[^\][/]+\]\]$/;function Tc(e){return U0.test(e)?e:encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function yx(e){return z0.test(e)}function M0(e){return e.length>2&&e.startsWith("(")&&e.endsWith(")")&&!gx.test(e)}function V0(e){return e.toUpperCase().startsWith("%5F")?`_${e.slice(3)}`:e}function vx(e){return e.length===0?"/":`/${e.join("/")}`}function bx(e){let t=[],r=!1;for(let i of e){if(i.startsWith("@"))return{kind:"skipped",reason:"parallelRoute"};if(gx.test(i))return{kind:"skipped",reason:"interceptedRoute"};if(i.startsWith("_"))return{kind:"skipped",reason:"privateFolder"};if(!M0(i)){if(i.length===0||i==="."||i==="..")return{kind:"skipped",reason:"invalidSegment"};yx(i)&&(r=!0),t.push(Tc(V0(i)))}}return{kind:"route",route:{route:vx(t),dynamic:r}}}var B0=new Set(["_app","_document","_error","_middleware"]),F0=new Set(["404","500"]),wh=/\.(?:tsx|jsx|ts|js|mdx)$/,J0=/\.(?:d\.ts|test\.[a-z]+|spec\.[a-z]+)$/;function wx(e){let t=e[e.length-1]??"";if(!wh.test(t)||J0.test(t))return"notAPage";if(e[0]==="api")return"api";let r=t.replace(wh,"");return e.length===1&&B0.has(r)?"special":e.length===1&&F0.has(r)?"errorPage":"route"}function kx(e){let t=e[e.length-1];if(t===void 0)return null;let r=t.replace(wh,""),i=[...e.slice(0,-1)];r!=="index"&&i.push(r);let n=[],o=!1;for(let a of i){if(a.length===0||a==="."||a==="..")return null;yx(a)&&(o=!0),n.push(Tc(a))}return{route:vx(n),dynamic:o}}function kh(e){return e.split("/").filter(t=>t.length>0)}function _h(e,t,r,i){if(r===e.length)return i===t.length;let n=e[r];return/^\[\[\.\.\.[^\][/]+\]\]$/.test(n)?r===e.length-1:/^\[\.\.\.[^\][/]+\]$/.test(n)?r===e.length-1&&i<t.length:i>=t.length?!1:/^\[[^\][/.]+\]$/.test(n)?_h(e,t,r+1,i+1):n!==t[i]?!1:_h(e,t,r+1,i+1)}function _x(e,t){return _h(kh(e),kh(t),0,0)}function hx(e){return kh(e).map(t=>/^\[\[\.\.\.[^\][/]+\]\]$/.test(t)?0:/^\[\.\.\.[^\][/]+\]$/.test(t)?1:/^\[[^\][/]+\]$/.test(t)?2:3)}function xx(e,t){let r=hx(e),i=hx(t),n=Math.max(r.length,i.length);for(let o=0;o<n;o+=1){let a=(i[o]??-1)-(r[o]??-1);if(a!==0)return a}return e===t?0:e<t?-1:1}var H0=[{directory:".next/server/app"},{directory:".next/server/pages"},{directory:"out"}],K0=new Set(["404","500","_not-found","_error","_global-error","_app","_document"]),q0=new Set(["_next","node_modules","_not-found","_global-error"]);function G0(e,t){let r=[],i=(n,o)=>{if(r.length>=t)return;let a;try{a=W0.readdirSync(n,{withFileTypes:!0})}catch{return}a.sort((s,c)=>Ft(s.name,c.name));for(let s of a){if(r.length>=t)return;if(!s.isSymbolicLink()){if(s.isDirectory()){if(q0.has(s.name))continue;i(xh.join(n,s.name),[...o,s.name]);continue}s.isFile()&&s.name.toLowerCase().endsWith(".html")&&r.push([...o,s.name])}}};return i(e,[]),r}function X0(e){let t=e[e.length-1];if(t===void 0)return null;let r=t.slice(0,-5),i=[...e.slice(0,-1)];return r!=="index"&&i.push(r),i.length===0?"/":K0.has(i[i.length-1])||i.some(n=>n.length===0||n==="."||n==="..")?null:`/${i.map(Tc).join("/")}`}function Y0(e){let t=new Map,r=0;for(let n of H0){let o=xh.join(e,...n.directory.split("/"));if(fx(o))for(let a of G0(o,2e4)){r+=1;let s=X0(a);s===null||t.has(s)||t.set(s,{urlPath:s,absolutePath:xh.join(o,...a)})}}return{candidates:[...t.values()].sort((n,o)=>Ft(n.urlPath,o.urlPath)),htmlFileCount:r}}function Q0(e,t,r){return t.has(e)?e:r.filter(n=>_x(n,e)).sort(xx)[0]??null}function Sx(e,t,r){let{candidates:i,htmlFileCount:n}=Y0(e),o=new Set(t.filter(d=>!d.dynamic).map(d=>d.route)),a=t.filter(d=>d.dynamic).map(d=>d.route),s=new Map,c=0,l=0;for(let d of i){let m=Q0(d.urlPath,o,a);if(m===null){l+=1;continue}c+=1,s.has(m)||s.set(m,d)}let u=new Map;for(let[d,m]of s){let f=bt(m.absolutePath);f!==null&&u.set(d,dx(f,{pagePath:m.urlPath,internalHosts:r.internalHosts,includeText:r.includeText}))}return{signalsByRoute:u,htmlFileCount:n,matchedFileCount:c,unmatchedFileCount:l}}import bn from"node:fs";import Rt from"node:path";function $x(e){return e.replace(/[\\^$.*+?()[\]{}|/]/g,"\\$&")}function eP(e,t){let r=t+1,i=!1;(e[r]==="!"||e[r]==="^")&&(i=!0,r+=1);let n=r,o="",a=!1;for(;r<e.length;){let c=e[r];if(c==="]"&&r>n){a=!0;break}if(c==="\\"&&r+1<e.length){o+=`\\${e[r+1]}`,r+=2;continue}c==="["||c==="^"||c==="\\"||c==="]"?o+=`\\${c}`:o+=c,r+=1}return!a||o.length===0?null:{source:`(?!/)[${i?"^":""}${o}]`,nextIndex:r+1}}function tP(e){let t="",r=0;for(;r<e.length;){let i=e[r];if(i==="\\"){let n=e[r+1];n===void 0?(t+="\\\\",r+=1):(t+=$x(n),r+=2);continue}if(i==="*"){let n=r;for(;e[n]==="*";)n+=1;let o=n-r>=2,a=r===0||e[r-1]==="/",s=n>=e.length||e[n]==="/";if(o&&a&&s){n>=e.length?(t+=".+",r=n):(t+="(?:.*/)?",r=n+1);continue}t+="[^/]*",r=n;continue}if(i==="?"){t+="[^/]",r+=1;continue}if(i==="["){let n=eP(e,r);if(n){t+=n.source,r=n.nextIndex;continue}t+="\\[",r+=1;continue}t+=$x(i),r+=1}return t}function nP(e){let t=e.length;for(;t>0&&e[t-1]===" ";){let r=0,i=t-2;for(;i>=0&&e[i]==="\\";)r+=1,i-=1;if(r%2===1)break;t-=1}return e.slice(0,t)}function rP(e){let t=e.endsWith("\r")?e.slice(0,-1):e;if(t.startsWith("#")||(t=nP(t),t.length===0))return null;let r=!1;t.startsWith("!")&&(r=!0,t=t.slice(1));let i=!1;if(t.endsWith("/")&&(i=!0,t=t.replace(/\/+$/,"")),t.length===0)return null;let n=t.includes("/");if(t.startsWith("/")&&(t=t.replace(/^\/+/,"")),t.length===0)return null;let o;try{o=new RegExp(`^${tP(t)}$`)}catch{return null}return{negated:r,directoryOnly:i,matchesBaseName:!n,expression:o}}function Ix(e){let t=[];for(let r of e.split(`
|
|
416
|
+
`)){let i=rP(r);i&&t.push(i)}return t}function iP(e){let t=e.lastIndexOf("/");return t===-1?e:e.slice(t+1)}function oP(e,t){return e.prefixAboveRoot.length>0?`${e.prefixAboveRoot}/${t}`:e.directory.length===0?t:t.startsWith(`${e.directory}/`)?t.slice(e.directory.length+1):null}var Ec=class e{scopes;constructor(t=[]){this.scopes=t}withScope(t){return t.rules.length===0?this:new e([...this.scopes,t])}isIgnored(t,r){let i=!1;for(let n of this.scopes){let o=oP(n,t);if(o===null)continue;let a=iP(o);for(let s of n.rules){if(s.directoryOnly&&!r)continue;let c=s.matchesBaseName?a:o;s.expression.test(c)&&(i=!s.negated)}}return i}};function cP(){return{sensitive:0,excludedDirectories:0,binary:0,ignoredByGitignore:0,tooLarge:0,symbolicLinks:0}}function Cx(e){try{let t=bn.lstatSync(e);return!t.isFile()||t.isSymbolicLink()||t.size>1048576?[]:Ix(bn.readFileSync(e,"utf8"))}catch{return[]}}function lP(e){let t=e;for(;;){if(bn.existsSync(Rt.join(t,".git")))return t;let r=Rt.dirname(t);if(r===t)return null;t=r}}function uP(e){return e.split(Rt.sep).join("/")}function dP(e){let t=lP(e);if(t===null||t===e)return[];let r=[],i=e;for(;i!==t;)i=Rt.dirname(i),r.unshift(i);let n=[];for(let o of r){let a=Cx(Rt.join(o,".gitignore"));a.length!==0&&n.push({directory:"",prefixAboveRoot:uP(Rt.relative(o,e)),rules:a})}return n}function pP(e){let t=null;try{t=bn.openSync(e,"r");let r=Buffer.alloc(8192),i=bn.readSync(t,r,0,8192,0);return Rc(r.subarray(0,i))}catch{return!0}finally{t!==null&&bn.closeSync(t)}}function Ax(e,t={}){let r=t.maximumFiles??2e5,i=cP(),n=[],o=!1,a=(s,c)=>{if(o)return;let l=s.length===0?e:Rt.join(e,...s.split("/")),u;try{u=bn.readdirSync(l,{withFileTypes:!0})}catch{return}u.sort((f,h)=>Ft(f.name,h.name));let d=Cx(Rt.join(l,".gitignore")),m=c.withScope({directory:s,prefixAboveRoot:"",rules:d});for(let f of u){if(o)return;let h=s.length===0?f.name:`${s}/${f.name}`;if(f.isSymbolicLink()){i.symbolicLinks+=1;continue}if(f.isDirectory()){if(px(f.name)){i.excludedDirectories+=1;continue}if(m.isIgnored(h,!0)){i.ignoredByGitignore+=1;continue}a(h,m);continue}if(!f.isFile())continue;if(Ac(f.name)){i.sensitive+=1;continue}if(m.isIgnored(h,!1)){i.ignoredByGitignore+=1;continue}if(Dc(f.name)){i.binary+=1;continue}let w;try{w=bn.lstatSync(Rt.join(l,f.name)).size}catch{continue}if(w>2097152){i.tooLarge+=1;continue}if(!mx(f.name)&&w>0&&pP(Rt.join(l,f.name))){i.binary+=1;continue}if(n.length>=r){o=!0;return}n.push({path:h,size:w})}};return a("",new Ec(dP(e))),n.sort((s,c)=>Ft(s.path,c.path)),{rootDirectory:e,files:n,skipped:i,truncated:o}}import{execFile as mP}from"node:child_process";var fP=1e4,hP=4*1024*1024;function Oc(e,t,r){return new Promise(i=>{try{mP("git",[...t],{cwd:e,timeout:fP,maxBuffer:hP,windowsHide:!0,env:{...r,GIT_OPTIONAL_LOCKS:"0",GIT_TERMINAL_PROMPT:"0"}},(n,o)=>{if(n){i(null);return}i(o)})}catch{i(null)}})}async function Dx(e,t=process.env){let r=await Oc(e,["rev-parse","--is-inside-work-tree"],t);if(r===null||r.trim()!=="true")return null;let i=await Oc(e,["rev-parse","HEAD"],t),n=await Oc(e,["rev-parse","--abbrev-ref","HEAD"],t),o=await Oc(e,["status","--porcelain","--","."],t),a=i===null?null:i.trim()||null,s=n===null?null:n.trim()||null,c=s===null||s==="HEAD"?null:s,l=o!==null&&o.trim().length>0;return a===null&&c===null&&o===null?null:{commit:a,branch:c,dirty:l}}import OP from"node:path";var gP=["...","===","!==","**=","&&=","||=","??=","=>","==","!=","<=",">=","&&","||","??","?.","**","++","--","+=","-=","*=","/=","%=","&=","|=","^="],yP=new Set(["return","typeof","case","in","of","delete","void","throw","new","else","do","yield","await"]),vP={n:`
|
|
417
|
+
`,t:" ",r:"\r",b:"\b",f:"\f",v:"\v"};function bP(e){return/[\p{L}_$]/u.test(e)}function Rx(e){return/[\p{L}\p{N}_$]/u.test(e)}function Tx(e){return e>="0"&&e<="9"}function Pc(e){return e===`
|
|
418
|
+
`||e==="\r"||e.charCodeAt(0)===8232||e.charCodeAt(0)===8233}function wP(e){return/\s/u.test(e)}function kP(e,t){if(e[t+2]==="{"){let i=e.indexOf("}",t+3),n=i===-1?"":e.slice(t+3,i);if(/^[0-9a-fA-F]{1,6}$/.test(n)){let o=Number.parseInt(n,16);if(o<=1114111)return{text:String.fromCodePoint(o),nextIndex:i+1}}return{text:"u",nextIndex:t+2}}let r=e.slice(t+2,t+6);return/^[0-9a-fA-F]{4}$/.test(r)?{text:String.fromCharCode(Number.parseInt(r,16)),nextIndex:t+6}:{text:"u",nextIndex:t+2}}function Ex(e,t){let r=e[t+1];if(r===void 0)return{text:"",nextIndex:t+1};if(r==="0")return Tx(e[t+2]??"")?{text:"0",nextIndex:t+2}:{text:"\0",nextIndex:t+2};let i=vP[r];if(i!==void 0)return{text:i,nextIndex:t+2};if(r==="x"){let n=e.slice(t+2,t+4);return/^[0-9a-fA-F]{2}$/.test(n)?{text:String.fromCharCode(Number.parseInt(n,16)),nextIndex:t+4}:{text:"x",nextIndex:t+2}}if(r==="u")return kP(e,t);if(r==="\r"){let n=e[t+2]===`
|
|
419
|
+
`;return{text:"",nextIndex:t+(n?3:2)}}return Pc(r)?{text:"",nextIndex:t+2}:{text:r,nextIndex:t+2}}function Ox(e,t){let r=e[t],i=t+1,n="";for(;i<e.length;){let o=e[i];if(o===r)return{value:n,end:i+1,terminated:!0};if(Pc(o))return{value:n,end:i,terminated:!1};if(o==="\\"){let a=Ex(e,i);n+=a.text,i=a.nextIndex;continue}n+=o,i+=1}return{value:n,end:i,terminated:!1}}function Px(e,t){let r=e.indexOf("*/",t+2);return r===-1?e.length:r+2}function jx(e,t){let r=t+2;for(;r<e.length&&!Pc(e[r]);)r+=1;return r}function _P(e,t){let r=1,i=t;for(;i<e.length;){let n=e[i];if(n==="{")r+=1,i+=1;else if(n==="}"){if(r-=1,i+=1,r===0)return i}else n==="'"||n==='"'?i=Ox(e,i).end:n==="`"?i=Nx(e,i).end:n==="/"&&e[i+1]==="*"?i=Px(e,i):n==="/"&&e[i+1]==="/"?i=jx(e,i):i+=1}return e.length}function Nx(e,t){let r=t+1,i="",n=!1;for(;r<e.length;){let o=e[r];if(o==="`")return{value:i,end:r+1,terminated:!0,hasExpressions:n};if(o==="\\"){let a=Ex(e,r);i+=a.text,r=a.nextIndex;continue}if(o==="$"&&e[r+1]==="{"){n=!0,r=_P(e,r+2);continue}i+=o,r+=1}return{value:i,end:r,terminated:!1,hasExpressions:n}}function xP(e,t){let r=t+1,i=!1;for(;r<e.length;){let n=e[r];if(Pc(n))return null;if(n==="\\"){r+=2;continue}if(n==="[")i=!0;else if(n==="]")i=!1;else if(n==="/"&&!i){for(r+=1;r<e.length&&Rx(e[r]);)r+=1;return r}r+=1}return null}function SP(e,t){let r=t;for(;r<e.length&&/[0-9a-zA-Z_.]/.test(e[r]);)r+=1;return r}function $P(e){return e===void 0?!0:e.kind==="punctuation"?e.value!==")"&&e.value!=="]":e.kind==="identifier"?yP.has(e.value):!1}function Lx(e){let t=[],r=0;for(;r<e.length;){let i=e[r];if(wP(i)){r+=1;continue}if(i==="/"&&e[r+1]==="*"){r=Px(e,r);continue}if(i==="/"&&e[r+1]==="/"){r=jx(e,r);continue}if(i==="'"||i==='"'){let a=Ox(e,r);t.push({kind:a.terminated?"string":"invalid",value:a.value,start:r,end:a.end,hasExpressions:!1}),r=a.end;continue}if(i==="`"){let a=Nx(e,r);t.push({kind:a.terminated?"template":"invalid",value:a.value,start:r,end:a.end,hasExpressions:a.hasExpressions}),r=a.end;continue}if(i==="/"&&$P(t[t.length-1])){let a=xP(e,r);if(a!==null){t.push({kind:"regex",value:e.slice(r,a),start:r,end:a,hasExpressions:!1}),r=a;continue}}if(Tx(i)){let a=SP(e,r);t.push({kind:"number",value:e.slice(r,a),start:r,end:a,hasExpressions:!1}),r=a;continue}if(bP(i)){let a=r+1;for(;a<e.length&&Rx(e[a]);)a+=1;t.push({kind:"identifier",value:e.slice(r,a),start:r,end:a,hasExpressions:!1}),r=a;continue}let o=gP.find(a=>e.startsWith(a,r))??i;t.push({kind:"punctuation",value:o,start:r,end:r+o.length,hasExpressions:!1}),r+=o.length}return t}var Qn={kind:"unknown"};function me(e,t){return e!==void 0&&e.kind==="punctuation"&&e.value===t}function Ge(e,t){return e===void 0||e.kind!=="identifier"?!1:t===void 0||e.value===t}function zx(e){return e.kind==="punctuation"&&(e.value==="("||e.value==="["||e.value==="{")}function Mx(e){return e.kind==="punctuation"&&(e.value===")"||e.value==="]"||e.value==="}")}function Jt(e,t){let r=0,i=t;for(;i<e.length;){let n=e[i];if(zx(n))r+=1;else if(Mx(n)){if(r===0)return i;r-=1}else if(r===0&&me(n,","))return i;i+=1}return i}function jc(e,t){let r=0,i=t;for(;i<e.length;){let n=e[i];if(zx(n))r+=1;else if(Mx(n)&&(r-=1,r===0))return i+1;i+=1}return i}function Vx(e){return e===void 0?!1:e.kind==="string"||e.kind==="template"&&!e.hasExpressions}function Nc(e){return e===void 0||me(e,",")||me(e,"}")}function IP(e,t){let r=e[t].value,i=t+1;for(;me(e[i],"+")&&Vx(e[i+1]);)r+=e[i+1].value,i+=2;if(Nc(e[i]))return{value:{kind:"string",value:r},nextIndex:i};let n=e[i];if(Ge(n,"as")||Ge(n,"satisfies")){let o=Jt(e,i+1);return{value:{kind:"string",value:r},nextIndex:o}}return{value:Qn,nextIndex:Jt(e,i)}}function Ux(e,t){let r=e[t];if(r===void 0)return{value:Qn,nextIndex:t};if(Vx(r))return IP(e,t);if(me(r,"{")){let i=Bx(e,t);return Nc(e[i.nextIndex])?{value:{kind:"object",literal:i.literal},nextIndex:i.nextIndex}:{value:Qn,nextIndex:Jt(e,i.nextIndex)}}return(Ge(r,"true")||Ge(r,"false"))&&Nc(e[t+1])?{value:{kind:"boolean",value:r.value==="true"},nextIndex:t+1}:me(r,"[")||me(r,"(")?{value:Qn,nextIndex:Jt(e,jc(e,t))}:{value:Qn,nextIndex:Jt(e,t+1)}}function CP(e){return e===void 0?null:e.kind==="identifier"||e.kind==="string"||e.kind==="number"||e.kind==="template"&&!e.hasExpressions?e.value:null}function Bx(e,t){let r={properties:new Map,hasUnknownKeys:!1},i=t+1;for(;i<e.length;){let n=e[i];if(me(n,"}"))return{literal:r,nextIndex:i+1};if(me(n,",")){i+=1;continue}if(me(n,"...")){i=Jt(e,i+1),r.properties.clear(),r.hasUnknownKeys=!0;continue}if(me(n,"[")){i=jc(e,i),r.hasUnknownKeys=!0,me(e[i],":")?i=Ux(e,i+1).nextIndex:i=Jt(e,i);continue}let o=CP(n);if(o===null){r.hasUnknownKeys=!0,i=Math.max(i+1,Jt(e,i));continue}let a=e[i+1];if(me(a,":")){let s=Ux(e,i+2);r.properties.set(o,s.value),i=Math.max(s.nextIndex,i+2);continue}if(r.properties.set(o,Qn),me(a,"(")){let s=jc(e,i+1);i=me(e[s],"{")?jc(e,s):s;continue}if(Nc(a)){i+=1;continue}r.hasUnknownKeys=!0,i=Math.max(i+1,Jt(e,i+1))}return{literal:r,nextIndex:i}}function wt(e,t){let r=e.properties.get(t);return r!==void 0?r:e.hasUnknownKeys?Qn:void 0}function AP(e,t){let r=[],i=t+1;for(;i<e.length&&!me(e[i],"}");){let n=e[i];(n.kind==="identifier"||n.kind==="string")&&r.push(n.value),i+=1}return r}function DP(e,t){let r=t;for(;r<e.length;){let i=e[r];if(me(i,"="))return r;if(me(i,";"))return-1;r+=1}return-1}function Fx(e){let t=Lx(e),r=null,i=!1;for(let n=0;n<t.length;n+=1){if(!Ge(t[n],"export"))continue;let o=t[n+1];if(o===void 0)break;if(me(o,"{")){let s=AP(t,n+1);(s.includes("metadata")||s.includes("generateMetadata"))&&(i=!0);continue}if(Ge(o,"const")||Ge(o,"let")||Ge(o,"var")){let s=t[n+2];if(Ge(s,"generateMetadata")){i=!0;continue}if(!Ge(s,"metadata"))continue;let c=DP(t,n+3);if(c===-1){i=!0;continue}if(me(t[c+1],"{")){let l=Bx(t,c+1);r??=l.literal}else i=!0;continue}let a=Ge(o,"async")?n+2:n+1;if(Ge(t[a],"function")){let s=me(t[a+1],"*")?t[a+2]:t[a+1];Ge(s,"generateMetadata")&&(i=!0)}}return i?{kind:"dynamic"}:r!==null?{kind:"static",metadata:r}:{kind:"none"}}function Sh(){return{title:null,description:null,canonical:null,robots:null}}function ko(e){return e===void 0||e.kind!=="string"?null:e.value}function Jx(e,t){return e.kind==="unknown"?null:e.kind==="known"?e.template.split("%s").join(t):t}function RP(e,t){if(e.kind==="string")return{title:Jx(t,e.value),template:{kind:"none"}};if(e.kind!=="object")return{title:null,template:{kind:"unknown"}};let r=e.literal,i=wt(r,"template"),n={kind:"none"};if(i!==void 0){let c=ko(i);n=c===null?{kind:"unknown"}:{kind:"known",template:c}}let o=wt(r,"absolute"),a=ko(o);if(a!==null&&a.length>0)return{title:a,template:n};let s=ko(wt(r,"default"));return s===null?{title:null,template:n}:{title:Jx(t,s),template:n}}function TP(e){if(e.kind==="string")return e.value;if(e.kind!=="object")return null;let t=wt(e.literal,"index"),r=wt(e.literal,"follow");if(t===void 0&&r===void 0)return null;let i=[];if(t!==void 0){if(t.kind!=="boolean")return null;i.push(t.value?"index":"noindex")}if(r!==void 0){if(r.kind!=="boolean")return null;i.push(r.value?"follow":"nofollow")}return i.join(", ")}function EP(e){return e.kind!=="object"?null:ko(wt(e.literal,"canonical"))}function Zx(e){let t=Sh(),r={kind:"none"};for(let i of e){if(i.kind==="none")continue;if(i.kind==="dynamic"){t.title=null,t.description=null,t.canonical=null,t.robots=null,r={kind:"unknown"};continue}let n=i.metadata,o=wt(n,"title");if(o!==void 0){let l=RP(o,r);t.title=l.title,r=l.template}let a=wt(n,"description");a!==void 0&&(t.description=ko(a));let s=wt(n,"alternates");s!==void 0&&(t.canonical=EP(s));let c=wt(n,"robots");c!==void 0&&(t.robots=TP(c))}return t}function Wx(e){return e.title!==null||e.description!==null||e.canonical!==null||e.robots!==null}var PP=/^page\.(?:tsx|jsx|ts|js|mdx)$/,jP=["layout.tsx","layout.ts","layout.jsx","layout.js"];function Hx(e,t){for(let r of t){let i=`${r}/`;for(let n of e)if(n.startsWith(i))return r}return null}var $h=class{counts=new Map;add(t){this.counts.set(t,(this.counts.get(t)??0)+1)}toList(){return[...this.counts.entries()].sort(([t],[r])=>Ft(t,r)).map(([t,r])=>({kind:t,count:r}))}};function NP(e){try{return Fx(e)}catch{return{kind:"dynamic"}}}var Ih=class{constructor(t){this.rootDirectory=t}rootDirectory;cache=new Map;analyze(t){let r=this.cache.get(t);if(r)return r;let i=bt(OP.join(this.rootDirectory,...t.split("/"))),n=i===null?{kind:"none"}:NP(i);return this.cache.set(t,n),n}};function Kx(e){return e.length<=M.sourceFileLength&&jf.test(e)}function LP(e,t,r){let i=[],n=[e],o=e;for(let a of t)o=`${o}/${a}`,n.push(o);for(let a of n){let s=jP.map(c=>`${a}/${c}`).find(c=>r.has(c));s&&i.push(s)}return i}function UP(e,t,r,i,n){let o=[],a=`${e}/`;for(let s of t){if(!s.startsWith(a))continue;let c=s.slice(a.length).split("/"),l=c[c.length-1];if(!PP.test(l))continue;let u=c.slice(0,-1),d=bx(u);if(d.kind==="skipped"){n.add(d.reason);continue}let m=s;if(!Kx(m)){n.add("invalidSourcePath");continue}let f=LP(e,u,r).map(h=>i.analyze(h));f.push(i.analyze(s)),o.push({route:d.route.route,sourceFile:m,dynamic:d.route.dynamic,router:"app",metadata:Zx(f)})}return o}function zP(e,t,r){let i=[],n=`${e}/`;for(let o of t){if(!o.startsWith(n))continue;let a=o.slice(n.length).split("/"),s=wx(a);if(s==="notAPage"||s==="api")continue;if(s==="special"){r.add("specialPagesFile");continue}if(s==="errorPage"){r.add("errorPage");continue}let c=kx(a);if(c===null){r.add("invalidSegment");continue}let l=o;if(!Kx(l)){r.add("invalidSourcePath");continue}i.push({route:c.route,sourceFile:l,dynamic:c.dynamic,router:"pages",metadata:Sh()})}return i}function qx(e,t){let r=t.files.map(h=>h.path),i=new Set(r),n=Hx(i,["app","src/app"]),o=Hx(i,["pages","src/pages"]),a=new $h,s=new Ih(e),c=n?UP(n,r,i,s,a):[],l=o?zP(o,r,a):[],u=new Map;for(let h of[...c,...l]){if(h.route.length>M.routeLength){a.add("invalidSegment");continue}if(u.has(h.route)){a.add("duplicateRoute");continue}u.set(h.route,h)}let d=[...u.values()].sort((h,w)=>Ft(h.route,w.route)),m=new Set(d.map(h=>h.router)),f=null;return m.has("app")&&m.has("pages")?f="both":m.has("app")?f="app":m.has("pages")?f="pages":n&&o?f="both":n?f="app":o&&(f="pages"),{routes:d,router:f,appDirectory:n,pagesDirectory:o,notices:a.toList()}}import MP from"node:path";var VP=/^[0-9][0-9A-Za-z.+-]*$/;function Gx(e,t){if(e===null||typeof e!="object")return;let r=e[t];return typeof r=="string"?r:void 0}function BP(e){let t=e.trim().replace(/^(?:[\^~<>=v]+\s*)+/,"");return VP.test(t)?Ue(t,M.frameworkVersion):null}function Xx(e,t){if(typeof e!="string")return null;let r=vt(e);return r.length>0?Ue(r,t):null}function Yx(e,t){let r=t.files.some(l=>l.path==="package.json"),i={found:r,readable:!1,name:null,description:null,framework:"unknown",frameworkVersion:null};if(!r)return i;let n=bt(MP.join(e,"package.json"));if(n===null)return i;let o;try{o=JSON.parse(n)}catch{return i}if(o===null||typeof o!="object"||Array.isArray(o))return i;let a=o,s=Gx(a.dependencies,"next")??Gx(a.devDependencies,"next"),c=s!==void 0;return{found:r,readable:!0,name:Xx(a.name,M.productName),description:Xx(a.description,M.productDescription),framework:c?"nextjs":"unknown",frameworkVersion:s===void 0?null:BP(s)}}import FP from"node:path";var JP=/^readme(?:\.md|\.mdx|\.markdown)?$/i,ZP=/^\s{0,3}(`{3,}|~{3,})/,WP=/^\s{0,3}(#{1,6})[ \t]+(.+?)[ \t]*$/,HP=/^\s{0,3}(=+|-+)[ \t]*$/;function Qx(e){return vt(e.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]*)\]\[[^\]]*\]/g,"$1").replace(/<[^>]+>/g,"").replace(/[`*_~]/g,"").replace(/\s+#+\s*$/,""))}function KP(e){let t=[],r=e.split(/\r?\n/),i=null,n=null;for(let o of r){let a=ZP.exec(o);if(a){let c=a[1][0];i===null?i=c:i===c&&(i=null),n=null;continue}if(i!==null)continue;let s=WP.exec(o);if(s){let c=Qx(s[2]);c.length>0&&t.push(c),n=null;continue}if(n!==null&&HP.test(o)){let c=Qx(n);c.length>0&&t.push(c),n=null;continue}n=o.trim().length>0&&!o.startsWith(" ")&&!/^[>*+\-|]/.test(o.trim())?o:null}return t}function eS(e,t){let r=t.files.find(n=>!n.path.includes("/")&&JP.test(n.path));if(!r)return[];let i=bt(FP.join(e,r.path));return i===null?[]:KP(i).slice(0,M.readmeHeadingItems).map(n=>Ue(n,M.readmeHeadingLength))}function tS(e,t){return t===0?0:e/t}var Ch=class{counts=new Map;add(t,r){let i=`${t}|${r??""}`,n=this.counts.get(i);n?n.count+=1:this.counts.set(i,{field:t,route:r,count:1})}toList(){return[...this.counts.values()]}};function Zt(e,t,r,i){return e===null?null:fn(e)?(i.add(t,r),null):e}function wn(e,t,r,i){let n=[];for(let o of e)fn(o)?i.add(t,r):n.push(o);return n}function qP(e,t){if(fn(e.route)||fn(e.sourceFile))return t.add("route",null),null;let r=e.route,i={...e,title:Zt(e.title,"title",r,t),description:Zt(e.description,"description",r,t),canonical:Zt(e.canonical,"canonical",r,t),robots:Zt(e.robots,"robots",r,t),h1:wn(e.h1,"h1",r,t),h2:wn(e.h2,"h2",r,t),structuredDataTypes:wn(e.structuredDataTypes,"structuredDataTypes",r,t),internalLinks:wn(e.internalLinks,"internalLinks",r,t)};return e.textExcerpt!==void 0&&fn(e.textExcerpt)&&(t.add("textExcerpt",r),delete i.textExcerpt),i}function nS(e){let t=new Ch,r=[];for(let a of e.routes){let s=qP(a,t);s&&r.push(s)}let i=e.git?{commit:Zt(e.git.commit,"git.commit",null,t),branch:Zt(e.git.branch,"git.branch",null,t),dirty:e.git.dirty}:null,n=[];for(let a of e.robots.rules){if(fn(a.userAgent)){t.add("robots.userAgent",null);continue}n.push({userAgent:a.userAgent,allow:wn(a.allow,"robots.allow",null,t),disallow:wn(a.disallow,"robots.disallow",null,t)})}return{snapshot:{...e,git:i,framework:{...e.framework,version:Zt(e.framework.version,"framework.version",null,t)},routes:r,sitemap:{...e.sitemap,urls:wn(e.sitemap.urls,"sitemap.urls",null,t)},robots:{...e.robots,rules:n},product:{name:Zt(e.product.name,"product.name",null,t),description:Zt(e.product.description,"product.description",null,t),readmeHeadings:wn(e.product.readmeHeadings,"product.readmeHeadings",null,t)},stats:{...e.stats,routeCount:r.length}},warnings:t.toList()}}function rS(e){if(e.field==="route")return e.count===1?"One route with a secret-like path was removed.":`${e.count} routes with a secret-like path were removed.`;let t=e.route===null?"":` on route ${e.route}`,r=e.count===1?"one value was":`${e.count} values were`,i=e.count===1?"which looks like a secret":"which look like secrets";return`In the field \u201C${e.field}\u201D${t}, ${r} removed, ${i}.`}import iS from"node:path";var GP=["public/sitemap.xml","app/sitemap.xml","src/app/sitemap.xml"],XP=["public/robots.txt","app/robots.txt","src/app/robots.txt"],YP=["app/sitemap.ts","app/sitemap.js","src/app/sitemap.ts","src/app/sitemap.js","app/sitemap.xml/route.ts","app/sitemap.xml/route.js","src/app/sitemap.xml/route.ts","src/app/sitemap.xml/route.js"],QP=["app/robots.ts","app/robots.js","src/app/robots.ts","src/app/robots.js","app/robots.txt/route.ts","app/robots.txt/route.js","src/app/robots.txt/route.ts","src/app/robots.txt/route.js"];function ej(e){let t=[],r=new Set,i=[],n="",o=!1,a=new Yn({onopentag(s){let c=s.toLowerCase();i.push(c),c==="loc"&&i[i.length-2]==="url"&&(o=!0,n="")},ontext(s){o&&(n+=s)},onclosetag(s,c){if(s.toLowerCase()==="loc"&&o){o=!1;let u=n.trim();!c&&/^https?:\/\//i.test(u)&&!r.has(u)&&(r.add(u),t.push(u))}i.pop()}},{xmlMode:!0});return a.write(e),a.end(),t}function tj(e){let t=e.indexOf("#");return(t===-1?e:e.slice(0,t)).trim()}function nj(e){let t=[],r=[],i=!1;for(let n of e.split(/\r?\n/)){let o=tj(n);if(o.length===0)continue;let a=o.indexOf(":");if(a===-1)continue;let s=o.slice(0,a).trim().toLowerCase(),c=o.slice(a+1).trim();if(s==="user-agent"){if(i||(r=[],i=!0),c.length===0)continue;let l=t.find(u=>u.userAgent===c);if(l)r.push(l);else{let u={userAgent:c,allow:[],disallow:[]};t.push(u),r.push(u)}continue}if(s==="allow"||s==="disallow"){if(i=!1,c.length===0)continue;for(let l of r){let u=s==="allow"?l.allow:l.disallow;u.includes(c)||u.push(c)}continue}i=!1}return t}function Lc(e,t){let r=new Set(e.files.map(i=>i.path));return t.find(i=>r.has(i))??null}function oS(e,t){let r=Lc(t,GP);if(r!==null){let i=bt(iS.join(e,...r.split("/")));if(i!==null)return{source:"file",urls:ej(i).filter(n=>n.length<=M.sitemapUrlLength)}}return Lc(t,YP)!==null?{source:"generator",urls:[]}:{source:"none",urls:[]}}function aS(e,t){let r=Lc(t,XP);if(r!==null){let i=bt(iS.join(e,...r.split("/")));if(i!==null)return{source:"file",rules:nj(i)}}return Lc(t,QP)!==null?{source:"generator",rules:[]}:{source:"none",rules:[]}}var Dh=class{counts=new Map;add(t,r=1){r<=0||this.counts.set(t,(this.counts.get(t)??0)+r)}toList(){return["routeCount","sitemapUrls","listLength","fieldLength","textExcerpt","internalLinks"].flatMap(r=>{let i=this.counts.get(r);return i===void 0?[]:[{kind:r,count:i}]})}};function Ah(e){return Buffer.byteLength(JSON.stringify(e),"utf8")}function Uc(e,t,r){return e.length<=t?e:(r.add("fieldLength"),Ue(e,t))}function Wt(e,t,r){return e===null?null:Uc(e,t,r)}function er(e,t,r,i,n=!1){let o=[];for(let a of e){if(n&&a.length>r){i.add("fieldLength");continue}o.push(Uc(a,r,i))}return o.length>t?(i.add("listLength",o.length-t),o.slice(0,t)):o}function rj(e,t){let r={...e,title:Wt(e.title,M.title,t),description:Wt(e.description,M.description,t),canonical:Wt(e.canonical,M.canonical,t),robots:Wt(e.robots,M.robots,t),h1:er(e.h1,M.headingOneItems,M.headingOneLength,t),h2:er(e.h2,M.headingTwoItems,M.headingTwoLength,t),structuredDataTypes:er(e.structuredDataTypes,M.structuredDataTypeItems,M.structuredDataTypeLength,t),internalLinks:er(e.internalLinks,M.internalLinkItems,M.internalLinkLength,t,!0)};return e.textExcerpt!==void 0&&(r.textExcerpt=Uc(e.textExcerpt,qs,t)),r}function ij(e,t){let r=e.routes.map(a=>rj(a,t));r.length>pn&&(t.add("routeCount",r.length-pn),r=r.slice(0,pn));let i=e.sitemap.urls.filter(a=>a.length<=M.sitemapUrlLength?!0:(t.add("fieldLength"),!1)),n=i.slice(0,fo);t.add("sitemapUrls",i.length-n.length);let o=e.robots.rules.slice(0,M.robotsGroups);return t.add("listLength",e.robots.rules.length-o.length),{...e,git:e.git?{commit:Wt(e.git.commit,M.gitCommit,t),branch:Wt(e.git.branch,M.gitBranch,t),dirty:e.git.dirty}:null,framework:{...e.framework,version:Wt(e.framework.version,M.frameworkVersion,t)},routes:r,sitemap:{...e.sitemap,urls:n},robots:{...e.robots,rules:o.map(a=>({userAgent:Uc(a.userAgent,M.robotsUserAgentLength,t),allow:er(a.allow,M.robotsRuleItems,M.robotsRuleLength,t,!0),disallow:er(a.disallow,M.robotsRuleItems,M.robotsRuleLength,t,!0)}))},product:{name:Wt(e.product.name,M.productName,t),description:Wt(e.product.description,M.productDescription,t),readmeHeadings:er(e.product.readmeHeadings,M.readmeHeadingItems,M.readmeHeadingLength,t)},stats:{...e.stats,routeCount:r.length}}}function oj(e){let t=0,r=e.routes.map(i=>{if(i.textExcerpt===void 0)return i;t+=1;let n={...i};return delete n.textExcerpt,n});return{snapshot:{...e,routes:r},removed:t}}function aj(e){let t=0,r=e.routes.map(i=>{if(i.internalLinks.length===0)return i;let n=Math.floor(i.internalLinks.length/2);return t+=i.internalLinks.length-n,{...i,internalLinks:i.internalLinks.slice(0,n)}});return{snapshot:{...e,routes:r},removed:t}}function sS(e){return(e/(1024*1024)).toLocaleString("en-GB",{minimumFractionDigits:1,maximumFractionDigits:1})}function cS(e,t=Mw){let r=new Dh,i=ij(e,r),n=Ah(i);if(n>t){let o=oj(i);o.removed>0&&(r.add("textExcerpt",o.removed),i=o.snapshot,n=Ah(i))}for(;n>t;){let o=aj(i);if(o.removed===0)break;r.add("internalLinks",o.removed),i=o.snapshot,n=Ah(i)}if(n>t)throw new z("snapshot_too_large",`The snapshot is ${sS(n)} MB, which is larger than the limit of ${sS(t)} MB, even without page texts and internal links.`,P.usage,{hint:"Scan a smaller directory or add folders with generated pages to the .gitignore.",details:{bytes:n,maximumBytes:t}});return{snapshot:i,truncations:r.toList(),serializedBytes:n}}function lS(e){switch(e.kind){case"routeCount":return`${e.count} routes over the limit of ${pn} were not included.`;case"sitemapUrls":return`${e.count} sitemap URLs over the limit of ${fo} were not included.`;case"listLength":return`${e.count} list entries over the field limits were not included.`;case"fieldLength":return`${e.count} texts that were too long were shortened or omitted.`;case"textExcerpt":return`Page texts of ${e.count} routes were removed so the snapshot stays under 2 MB.`;case"internalLinks":return`${e.count} internal links were removed so the snapshot stays under 2 MB.`}}function Ht(e){if(e===null)return null;let t=vt(e);return t.length>0?t:null}function sj(e,t){let r=e.metadata;if(t===void 0)return{route:e.route,sourceFile:e.sourceFile,dynamic:e.dynamic,metadataSource:Wx(r)?"static":"none",title:Ht(r.title),description:Ht(r.description),canonical:Ht(r.canonical),robots:Ht(r.robots),h1:[],h2:[],structuredDataTypes:[],internalLinks:[],wordCount:null};let i={route:e.route,sourceFile:e.sourceFile,dynamic:e.dynamic,metadataSource:"build",title:t.title??Ht(r.title),description:t.description??Ht(r.description),canonical:t.canonical??Ht(r.canonical),robots:t.robots??Ht(r.robots),h1:t.h1,h2:t.h2,structuredDataTypes:t.structuredDataTypes,internalLinks:t.internalLinks,wordCount:t.wordCount};return t.textExcerpt!==null&&(i.textExcerpt=t.textExcerpt),i}function cj(e){return{routeCount:e.length,dynamicRouteCount:e.filter(t=>t.dynamic).length,routesWithBuildMetadata:e.filter(t=>t.metadataSource==="build").length,routesWithStaticMetadata:e.filter(t=>t.metadataSource==="static").length,routesWithoutMetadata:e.filter(t=>t.metadataSource==="none").length}}function lj(e){let t=Zw.safeParse(e);if(t.success)return null;let r=t.error.issues.slice(0,5).map(i=>`${i.path.map(String).join(".")}: ${i.message}`);return new z("snapshot_invalid",`The generated snapshot does not match the schema (${r.join("; ")}).`,P.unexpected,{hint:"This is a bug in the CLI. Please report it with this message.",details:t.error.issues.slice(0,20)})}function uS(e){let t=e.routeDiscovery.routes.find(m=>m.route==="/"),r=t?e.buildSignals.get(t.route):void 0,i=r?.h1[0]??null,n=r?.description??(t?Ht(t.metadata.description):null),o=e.routeDiscovery.routes.map(m=>sj(m,e.buildSignals.get(m.route))),a=e.packageInfo.framework==="nextjs",s={schemaVersion:Ks,generatedAt:e.generatedAt,cliVersion:e.cliVersion,git:e.git?{commit:e.git.commit,branch:e.git.branch,dirty:e.git.dirty}:null,framework:{name:e.packageInfo.framework,version:e.packageInfo.frameworkVersion,router:a?e.routeDiscovery.router:null},routes:o,sitemap:{source:e.sitemap.source,urls:[...e.sitemap.urls]},robots:{source:e.robots.source,rules:e.robots.rules.map(m=>({userAgent:m.userAgent,allow:[...m.allow],disallow:[...m.disallow]}))},product:{name:e.packageInfo.name??i,description:e.packageInfo.description??n,readmeHeadings:[...e.readmeHeadings]},stats:{filesScanned:e.filesScanned,routeCount:o.length,durationMs:Math.max(0,Math.round(e.durationMs))}},c=nS(s),l=cS(c.snapshot);if(Gs(l.snapshot)!==null)throw new z("secret_in_snapshot","The snapshot still contains a secret-like value and is therefore not generated.",P.unexpected,{hint:"Please report the bug without quoting the value."});let d=lj(l.snapshot);if(d!==null)throw d;return{snapshot:l.snapshot,serializedBytes:l.serializedBytes,truncations:l.truncations,secretWarnings:c.warnings,routeStatistics:cj(l.snapshot.routes)}}function pj(){return{routes:[],router:null,appDirectory:null,pagesDirectory:null,notices:[]}}function mj(){return{signalsByRoute:new Map,htmlFileCount:0,matchedFileCount:0,unmatchedFileCount:0}}function fj(e){let t=dj.resolve(e),r;try{r=uj.statSync(t)}catch(i){let n=i.code;throw E(n==="ENOENT"?`Directory not found: ${e}`:`Directory not readable: ${e}`)}if(!r.isDirectory())throw E(`Not a directory: ${e}`);return t}function hj(e){let t=new Set;for(let r of e)try{t.add(new URL(r).host)}catch{continue}return[...t].sort()}async function dS(e){let t=e.now(),r=fj(e.directory),i=Ax(r),n=Yx(r,i),o=n.framework==="nextjs",a=o?qx(r,i):pj(),s=oS(r,i),c=aS(r,i),l=o&&a.routes.length>0?Sx(r,a.routes,{includeText:e.includeText,internalHosts:hj(s.urls)}):mj(),u=eS(r,i),d=await Dx(r,e.environment),m=uS({cliVersion:e.cliVersion,generatedAt:new Date(e.now()).toISOString(),durationMs:e.now()-t,filesScanned:i.files.length,git:d,packageInfo:n,routeDiscovery:a,buildSignals:l.signalsByRoute,sitemap:s,robots:c,readmeHeadings:u}),f=[],h=[];n.found?n.readable?o||f.push("The package.json has no dependency on \u201Cnext\u201D. No routes are collected. If the project is in a subfolder, specify it, for example: serpel scan apps/web"):f.push("The package.json is not readable or is not valid JSON. No routes are collected."):f.push("There is no package.json in the directory. No routes are collected."),o&&a.appDirectory===null&&a.pagesDirectory===null&&f.push("There is no \u201Capp\u201D or \u201Cpages\u201D folder (also not under \u201Csrc\u201D). If the project is in a subfolder, specify it as the directory."),i.truncated&&f.push("The directory contains a very large number of files. The scan stopped after 200,000 files.");for(let C of a.notices)C.kind==="duplicateRoute"&&f.push(`${C.count} routes occurred more than once, the first of each was kept.`),(C.kind==="invalidSourcePath"||C.kind==="invalidSegment")&&f.push(`${C.count} routes with an unusable path were skipped.`);let w=a.notices.find(C=>C.kind==="errorPage");w&&h.push(w.count===1?"An error page in the Pages Router (404 or 500) does not count as a route.":`${w.count} error pages in the Pages Router (404 and 500) do not count as routes.`);for(let C of m.secretWarnings)f.push(rS(C));for(let C of m.truncations)f.push(lS(C));o&&a.routes.length>0&&l.htmlFileCount===0&&h.push("No build output found. With an existing \u201C.next\u201D or \u201Cout\u201D folder, the scan adds title, headings, links, and word count from the built HTML.");let D=m.routeStatistics,A={directory:r,framework:m.snapshot.framework,filesScanned:i.files.length,skippedFiles:i.skipped,inventoryTruncated:i.truncated,routeCount:D.routeCount,dynamicRouteCount:D.dynamicRouteCount,routesWithBuildMetadata:D.routesWithBuildMetadata,routesWithStaticMetadata:D.routesWithStaticMetadata,routesWithoutMetadata:D.routesWithoutMetadata,buildMetadataShare:tS(D.routesWithBuildMetadata,D.routeCount),buildHtmlFileCount:l.htmlFileCount,buildHtmlUnmatchedCount:l.unmatchedFileCount,sitemap:{source:m.snapshot.sitemap.source,urlCount:m.snapshot.sitemap.urls.length},robots:{source:m.snapshot.robots.source,groupCount:m.snapshot.robots.rules.length},serializedBytes:m.serializedBytes,includesPageText:m.snapshot.routes.some(C=>C.textExcerpt!==void 0),git:m.snapshot.git,truncations:m.truncations,removedSecretLikeValueCount:m.secretWarnings.reduce((C,j)=>C+j.count,0),routeNotices:a.notices};return{snapshot:m.snapshot,summary:A,warnings:f,hints:h}}var gj={app:"App Router",pages:"Pages Router",both:"App Router and Pages Router"};function zc(e){return e>=1024*1024?`${Y(e/(1024*1024),1)} MB`:`${Y(e/1024,1)} KB`}function yj(e){if(e.framework.name!=="nextjs")return"not detected";let t=e.framework.version?` ${e.framework.version}`:"",r=e.framework.router?` (${gj[e.framework.router]})`:"";return`Next.js${t}${r}`}function vj(e){let t=[],r=e.skippedFiles;return r.sensitive>0&&t.push(`${b(r.sensitive)} protected (.env, keys, credentials)`),r.ignoredByGitignore>0&&t.push(`${b(r.ignoredByGitignore)} per .gitignore`),r.binary>0&&t.push(`${b(r.binary)} binary files`),r.tooLarge>0&&t.push(`${b(r.tooLarge)} over 2 MB`),r.excludedDirectories>0&&t.push(`${b(r.excludedDirectories)} folders such as node_modules and .git`),r.symbolicLinks>0&&t.push(`${b(r.symbolicLinks)} symlinks`),t.length>0?`not read: ${t.join(", ")}`:"nothing skipped"}function bj(e){if(e.routeCount===0)return"no routes";let t=Y(e.buildMetadataShare*100,1);return`${b(e.routesWithBuildMetadata)} from the build (${t}%), ${b(e.routesWithStaticMetadata)} from source code, ${b(e.routesWithoutMetadata)} without`}function pS(e,t){return e==="none"?"not present":e==="generator"?"generator in code (content unknown)":`file, ${t}`}function wj(e){if(e.git===null)return"no Git repository";let t=[];return e.git.branch&&t.push(`branch ${e.git.branch}`),e.git.commit&&t.push(`commit ${e.git.commit.slice(0,8)}`),t.push(e.git.dirty?"with uncommitted changes":"clean"),t.join(", ")}function mS(e){let t=[["Directory",e.directory],["Framework",yj(e)],["Files",`${b(e.filesScanned)} read, ${vj(e)}`],["Routes",`${b(e.routeCount)} (${b(e.dynamicRouteCount)} dynamic)`],["Metadata",bj(e)],["Sitemap",pS(e.sitemap.source,`${b(e.sitemap.urlCount)} URLs`)],["Robots",pS(e.robots.source,`${b(e.robots.groupCount)} groups`)],["Git",wj(e)],["Page texts",e.includesPageText?"yes, at most 500 characters per page":"no"],["Size",zc(e.serializedBytes)]],r=Math.max(...t.map(([i])=>i.length));return t.map(([i,n])=>`${`${i}:`.padEnd(r+1)} ${n}`)}var fS=Zh;function xj(e){if(at(e),e.dryRun&&e.wait)throw E("--wait cannot be combined with --dry-run because nothing is sent.");if(!e.dryRun&&!e.project)throw E("Specify the project with --project <id>.","To check without sending: serpel scan --dry-run")}function hS(e,t){let r=_j.resolve(e);try{kj.writeFileSync(r,t,"utf8")}catch(i){let n=i.code;throw E(`The snapshot could not be written to ${e}. ${n==="ENOENT"?"The folder does not exist.":n==="EISDIR"?"The target is a folder.":"The file is not writable."}`)}return r}function gS(e,t,r){e.out.info(r);for(let i of mS(t.summary))e.out.info(` ${i}`);for(let i of t.warnings)e.out.warn(i);for(let i of t.hints)e.out.hint(i)}function Sj(e){let{summary:t}=e;return{directory:t.directory,framework:t.framework,filesScanned:t.filesScanned,skippedFiles:t.skippedFiles,routeCount:t.routeCount,dynamicRouteCount:t.dynamicRouteCount,routesWithBuildMetadata:t.routesWithBuildMetadata,routesWithStaticMetadata:t.routesWithStaticMetadata,routesWithoutMetadata:t.routesWithoutMetadata,buildMetadataShare:t.buildMetadataShare,buildHtmlFileCount:t.buildHtmlFileCount,sitemap:t.sitemap,robots:t.robots,bytes:t.serializedBytes,includesPageText:t.includesPageText,removedSecretLikeValueCount:t.removedSecretLikeValueCount,truncations:t.truncations}}function $j(e,t,r){let i=`${JSON.stringify(r.snapshot,null,2)}
|
|
420
|
+
`,n=t.out?hS(t.out,i):null;if(e.json){e.out.printJson({dryRun:!0,sent:!1,outFile:n,statistics:Sj(r),warnings:r.warnings,hints:r.hints,...n===null?{snapshot:r.snapshot}:{}});return}gS(e,r,"The snapshot contains:"),n===null?e.out.raw(i):e.out.line(`Snapshot written: ${n} (${zc(Buffer.byteLength(i,"utf8"))})`),e.out.hint("Dry run: nothing was sent.")}async function Ij(e,t,r,i){if(t.yes)return;let o=`serpel scan ${i?`${i} `:""}--project ${t.project??"<id>"} --yes`,a=q_(e.runtime);if(a===null)throw E("Without a terminal, the CLI cannot ask for confirmation before it sends the snapshot.",`To confirm: ${o}`);let c=`Send snapshot with ${r.summary.routeCount===1?"1 route":`${b(r.summary.routeCount)} routes`} (${zc(r.summary.serializedBytes)}) to project ${t.project??""}? [y/N] `,l=await a(c);if(!G_(l))throw new z("scan_cancelled","Cancelled. Nothing was sent.",P.interrupted)}function Cj(e){return e instanceof xe?e.status===429&&e.apiCode==="rate_limited"?new z("rate_limited",`The daily limit for snapshot uploads has been reached: at most ${fS} per day and project. ${e.message}`.trim(),P.provider,{hint:"Try again tomorrow. With --dry-run --out snapshot.json you can still check the snapshot locally.",details:e.details}):e.status===403?new z(e.apiCode,e.message,P.forbidden,{hint:"The token is missing the scope codebase:write or access to the project. New token: serpel tokens create --name scan --scope codebase:write",details:e.details}):e:e}function Aj(e,t,r){e.out.line(`Snapshot uploaded (${r===1?"1 route":`${b(r)} routes`}).`),e.out.fields([["Snapshot ID",t.snapshot.id],["Job ID",t.job.id]])}function Dj(e,t,r){let i=t.stats;e.out.line(`Snapshot processed (${t.routeCount===1?"1 route":`${b(t.routeCount)} routes`}).`),e.out.fields([["Snapshot ID",t.id],["Job ID",r.id],["Time",I(t.processedAt??t.createdAt)],["Pages matched to live pages",i?b(i.mappedRouteCount):R],["Routes without metadata",i?b(i.routesWithoutMetadata):R],["Routes without live page",i?b(i.routesWithoutLivePage):R],["Live pages without route",i?b(i.livePagesWithoutRoute):R],["Deviating titles",i?b(i.titleDeviationCount):R],["Deviating descriptions",i?b(i.descriptionDeviationCount):R]])}async function Rj(e,t,r){xj(r);let i=r.dryRun?null:await e.client(),n=await dS({directory:t||".",includeText:!!r.includeText,now:e.runtime.now,cliVersion:Qr,environment:e.runtime.env});if(i===null){$j(e,r,n);return}let o=r.project;gS(e,n,"This will be sent:"),r.out&&hS(r.out,`${JSON.stringify(n.snapshot,null,2)}
|
|
421
|
+
`),await Ij(e,r,n,t);let a;try{a=await i.post(`/projects/${k(o)}/codebase-snapshots`,n.snapshot)}catch(l){throw Cj(l)}if(!r.wait){if(e.json){e.out.printJson(a);return}Aj(e,a,n.summary.routeCount),e.out.hint(`Status: serpel jobs status ${a.job.id} --wait`);return}e.json||e.out.info(`Snapshot uploaded. Job ID: ${a.job.id}. Waiting for processing ...`);let s=await e.waitForJob(i,a.job.id,r.timeout),c=a.snapshot;try{c=await i.get(`/codebase-snapshots/${k(a.snapshot.id)}`)}catch{}if(rt(s),e.json){e.out.printJson({snapshot:c,job:s});return}Dj(e,c,s)}function yS(e,t){ot(e.command("scan [directory]").description("Scan a Next.js project and send the codebase snapshot to Serpel").option("--project <id>","project ID (required unless --dry-run)").option("--dry-run","send nothing, print the snapshot").option("--out <file>","write the snapshot as JSON to this file").option("--include-text","also send short page texts (at most 500 characters per page, only with build output)").option("--yes","skip the confirmation prompt before sending"),"the snapshot processing").addHelpText("after",`
|
|
422
|
+
What is read: package.json, the routes from app/ and pages/ (also under src/), static metadata exports,
|
|
423
|
+
README headings, sitemap and robots, and existing HTML files from .next and out. Source code, .env files,
|
|
424
|
+
keys, node_modules, .git, binary files, and files listed in .gitignore are never read or sent.
|
|
425
|
+
Values that look like credentials are removed. Up to ${fS} uploads per project per day are possible.
|
|
426
|
+
|
|
427
|
+
Examples:
|
|
428
|
+
serpel scan --dry-run
|
|
429
|
+
serpel scan apps/web --dry-run --out snapshot.json
|
|
430
|
+
serpel scan --project <id> --wait
|
|
431
|
+
serpel scan . --project <id> --yes --include-text`).action(v(t,(r,i,n)=>Rj(r,i[0]??"",n)))}var Tj=["7","28","90"];function vS(e){return`${(e*100).toLocaleString("en-GB",{maximumFractionDigits:1})}%`}function Ej(e){return e.configured?e.connected?e.siteUrl?"connected":"property missing":"not connected":"not set up"}async function Oj(e,t){let i=await(await e.client()).get(`/projects/${k(t.project)}/search-console`);if(e.json){e.out.printJson($e(i));return}e.out.table([{header:"Provider",value:n=>Gt[n.provider]},{header:"Status",value:n=>Ej(n)},{header:"Property",value:n=>n.siteUrl??"-",max:50},{header:"Last fetched",value:n=>n.lastSyncedAt?I(n.lastSyncedAt):"-"}],i);for(let n of i)n.configurationHint&&e.out.hint(`${Gt[n.provider]}: ${n.configurationHint}`),n.lastError&&e.out.warn(`${Gt[n.provider]}: ${n.lastError}`)}async function Pj(e,t){let i=await(await e.client()).post(`/projects/${k(t.project)}/search-console/google/authorize`);if(e.json){e.out.printJson(i);return}e.out.line("Open this URL in the browser where you are signed in to the dashboard, and grant access:"),e.out.line(i.authorizationUrl),t.open&&await e.runtime.openUrl(i.authorizationUrl)&&e.out.info("Browser opened."),e.out.hint(`Then check: serpel search status --project ${t.project}`)}async function jj(e,t){let r=(await Dt(e.runtime,t.apiKeyFile)).trim();if(r.length<16)throw E("The API key is too short or missing.","Copy the key from Bing Webmaster Tools (Settings, API access) into a file or pass it via stdin.");e.out.addSecret(r);let n=await(await e.client()).post(`/projects/${k(t.project)}/search-console/bing`,{apiKey:r,...t.siteUrl?{siteUrl:t.siteUrl}:{}});if(e.json){e.out.printJson(n);return}e.out.line("Bing Webmaster Tools connected."),e.out.fields([["Property",n.siteUrl??"no matching one found"],["Verified sites",String(n.availableSites.length)]]),n.siteUrl||e.out.hint(`Select a property: serpel search site --project ${t.project} --provider bing --site-url <url>`)}async function Nj(e,t){let i=await(await e.client()).patch(`/projects/${k(t.project)}/search-console/${t.provider}`,{siteUrl:t.siteUrl});if(e.json){e.out.printJson(i);return}e.out.line(`Property saved for ${Gt[t.provider]}: ${i.siteUrl}`)}async function Lj(e,t){if(ue(t,`The connection to ${Gt[t.provider]} is deleted, along with the stored credentials.`,`serpel search disconnect --project ${t.project} --provider ${t.provider}`),await(await e.client()).delete(`/projects/${k(t.project)}/search-console/${t.provider}`),e.json){e.out.printJson({disconnected:!0,provider:t.provider});return}e.out.line(`${Gt[t.provider]} disconnected.`)}async function Uj(e,t){let i=await(await e.client()).get(`/projects/${k(t.project)}/search-performance`,{provider:t.provider,dimension:t.dimension,days:t.days,limit:t.limit});if(e.json){e.out.printJson(i);return}if(e.out.fields([["Provider",Gt[i.provider]],["Property",i.siteUrl],["Period",`${i.startDate} to ${i.endDate}`],["Clicks",i.totals.clicks.toLocaleString("en-GB")],["Impressions",i.totals.impressions.toLocaleString("en-GB")],["CTR",vS(i.totals.ctr)],["Avg. position",i.totals.position===null?"-":String(i.totals.position)],["Source",i.cached?`cached on ${I(i.fetchedAt)}`:"just fetched"]]),e.out.line(),i.rows.length===0){e.out.line("No data in this period.");return}let n=i.dimension==="query";e.out.table([{header:n?"Query":"Page",value:o=>o.key,max:60},{header:"Clicks",value:o=>o.clicks.toLocaleString("en-GB"),align:"right"},{header:"Impressions",value:o=>o.impressions.toLocaleString("en-GB"),align:"right"},{header:"CTR",value:o=>vS(o.ctr),align:"right"},{header:"Position",value:o=>o.position===null?"-":String(o.position),align:"right"},...n?[{header:"Tracked",value:o=>o.trackedKeywordId?"yes":"no"}]:[]],i.rows)}function bS(e,t){let r=e.command("search").description("Search data from Google Search Console and Bing Webmaster Tools");r.command("status").description("Show the connections of a project with their status and property").requiredOption("--project <id>","project ID").addHelpText("after",`
|
|
432
|
+
Example:
|
|
433
|
+
serpel search status --project <id>`).action(v(t,(i,n,o)=>Oj(i,o))),r.command("connect-google").description("Connect Google Search Console: create the authorisation URL and open it in the browser").requiredOption("--project <id>","project ID").option("--no-open","only print the URL, do not open the browser").addHelpText("after",`
|
|
434
|
+
Authorisation happens in the browser. There you must be signed in to the dashboard with the same account.
|
|
435
|
+
The URL is valid for ten minutes and can be used only once.
|
|
436
|
+
|
|
437
|
+
Examples:
|
|
438
|
+
serpel search connect-google --project <id>
|
|
439
|
+
serpel search connect-google --project <id> --no-open`).action(v(t,(i,n,o)=>Pj(i,o))),r.command("connect-bing").description("Connect Bing Webmaster Tools with an API key").requiredOption("--project <id>","project ID").requiredOption("--api-key-file <path>","file with the API key, or - for stdin").option("--site-url <url>","verified site in Bing, otherwise the matching one is selected automatically").addHelpText("after",`
|
|
440
|
+
The key is not passed as an argument so that it does not end up in your shell history.
|
|
441
|
+
|
|
442
|
+
Examples:
|
|
443
|
+
serpel search connect-bing --project <id> --api-key-file bing.key
|
|
444
|
+
printf %s "$BING_API_KEY" | serpel search connect-bing --project <id> --api-key-file -`).action(v(t,(i,n,o)=>jj(i,o))),r.command("site").description("Set the property of a connection").requiredOption("--project <id>","project ID").addOption(L("--provider <provider>","provider",ar).makeOptionMandatory()).requiredOption("--site-url <url>","property, e.g. sc-domain:example.com or https://www.example.com/").addHelpText("after",`
|
|
445
|
+
Example:
|
|
446
|
+
serpel search site --project <id> --provider google --site-url sc-domain:example.com`).action(v(t,(i,n,o)=>Nj(i,o))),r.command("disconnect").description("Disconnect and delete the stored credentials").requiredOption("--project <id>","project ID").addOption(L("--provider <provider>","provider",ar).makeOptionMandatory()).option("--yes","confirm disconnecting").addHelpText("after",`
|
|
447
|
+
Example:
|
|
448
|
+
serpel search disconnect --project <id> --provider bing --yes`).action(v(t,(i,n,o)=>Lj(i,o))),r.command("queries").description("Clicks, impressions, CTR and position per search query or page").requiredOption("--project <id>","project ID").addOption(L("--provider <provider>","provider",ar).default("google")).addOption(L("--dimension <type>","query for search queries, page for pages",Eo).default("query")).addOption(L("--days <days>","period in days",Tj).default("28")).option("--limit <n>","at most this many rows (1 to 500)",X(1,500),50).addHelpText("after",`
|
|
449
|
+
The data arrives with a delay of two to three days and is cached for six hours.
|
|
450
|
+
|
|
451
|
+
Examples:
|
|
452
|
+
serpel search queries --project <id>
|
|
453
|
+
serpel search queries --project <id> --provider bing --dimension page --days 90 --json`).action(v(t,(i,n,o)=>Uj(i,o)))}var Rh=20;function Th(e,t){if(e.out.heading(t.title),e.out.fields([["ID",t.id],["Status",Hc[t.status]??t.status],["Priority",oi[t.priority]??t.priority],["Issue",t.issueCode],["Crawl ID",t.sourceCrawlId],["Description",t.description],["Recheck",t.recheck?`${Kc[t.recheck.status]??t.recheck.status} (${I(t.recheck.checkedAt)})`:null],["Created",I(t.createdAt)],["Completed",t.completedAt?I(t.completedAt):null]]),t.urls.length>0){e.out.line(e.out.c.dim(`Linked URLs (${t.urls.length}):`));for(let r of t.urls.slice(0,20))e.out.line(` ${r}`);t.urls.length>20&&e.out.line(e.out.c.dim(` ... and ${t.urls.length-20} more (full list with --json)`))}}async function zj(e,t){let i=await(await e.client()).list(`/projects/${k(t.project)}/tasks`,{...se(t),status:t.status,priority:t.priority,q:t.query});Q(e,i,[{header:"ID",value:n=>n.id,max:36},{header:"Title",value:n=>n.title,max:60},{header:"Status",value:n=>Hc[n.status]??n.status},{header:"Priority",value:n=>oi[n.priority]??n.priority},{header:"Issue",value:n=>n.issueCode??R},{header:"URLs",value:n=>String(n.urls.length),align:"right"},{header:"Recheck",value:n=>n.recheck?Kc[n.recheck.status]??n.recheck.status:R},{header:"Updated",value:n=>I(n.updatedAt)}],"No tasks found.",t)}async function Mj(e,t){if(!t.title&&!t.issue)throw E("Pass --title or --issue.");if(t.crawl&&!t.issue)throw E("--crawl can only be used together with --issue.");let r={};t.title!==void 0&&(r.title=t.title),t.issue!==void 0&&(r.issueCode=t.issue),t.crawl!==void 0&&(r.crawlId=t.crawl),t.priority!==void 0&&(r.priority=t.priority),t.description!==void 0&&(r.description=t.description),t.url!==void 0&&(r.urls=t.url),B(Cw,r);let i=await e.client();if(t.issue&&!t.crawl)try{let a=await i.get(`/projects/${k(t.project)}/issues`,{q:t.issue});a.crawl&&(r.crawlId=a.crawl.id)}catch(a){if(!(a instanceof xe)||a.status===401||a.status===404)throw a}let{status:n,data:o}=await i.postWithStatus(`/projects/${k(t.project)}/tasks`,r);if(e.json){e.out.printJson(o);return}e.out.line(n===200?"An open task already exists for this issue:":"Task created:"),Th(e,o)}async function Vj(e,t,r){let i={};if(r.status!==void 0&&(i.status=r.status),r.priority!==void 0&&(i.priority=r.priority),r.title!==void 0&&(i.title=r.title),r.description!==void 0&&(i.description=r.description),Object.keys(i).length===0)throw E("Nothing to change. Pass --status, --priority, --title, or --description.");B(Aw,i);let o=await(await e.client()).patch(`/tasks/${k(t)}`,i);if(e.json){e.out.printJson(o);return}e.out.line("Task updated:"),Th(e,o)}async function Bj(e,t){let i=await(await e.client()).get(`/tasks/${k(t)}`);if(e.json){e.out.printJson(i);return}if(Th(e,i),i.recheck&&i.recheck.remainingUrls.length>0){e.out.line(e.out.c.dim(`Still affected after the last check (${i.recheck.remainingUrls.length}):`));for(let n of i.recheck.remainingUrls.slice(0,Rh))e.out.line(` ${n}`);i.recheck.remainingUrls.length>Rh&&e.out.line(e.out.c.dim(` ... and ${i.recheck.remainingUrls.length-Rh} more (full list with --json)`))}}async function Fj(e,t,r){ue(r,"The task will be deleted permanently.",`serpel tasks delete ${t}`);let i=await e.client(),n=await i.get(`/tasks/${k(t)}`);if(await i.delete(`/tasks/${k(t)}`),e.json){e.out.printJson({deleted:!0,id:n.id,title:n.title,projectId:n.projectId});return}e.out.line(`Task deleted: ${n.title}`),e.out.fields([["ID",n.id]])}function wS(e,t){let r=e.command("tasks").description("Manage optimisation tasks");ae(r.command("list").description("List the tasks of a project").requiredOption("--project <id>","project ID").addOption(L("--status <status>","filter by status",or)).addOption(L("--priority <priority>","filter by priority",qt)).option("-q, --query <text>","search in title and description")).action(v(t,(i,n,o)=>zj(i,o))),r.command("create").description("Create a task, freely with --title or from an audit issue with --issue").requiredOption("--project <id>","project ID").option("--title <title>","task title").option("--issue <code>","issue code from the audit, e.g. title_missing (affected URLs are carried over)").option("--crawl <id>","crawl the issue comes from (default: last completed crawl)").addOption(L("--priority <priority>","priority",qt)).option("--description <text>","description").option("--url <url>","linked URL (can be repeated)",it).addHelpText("after",`
|
|
454
|
+
Examples:
|
|
455
|
+
serpel tasks create --project <id> --issue title_missing
|
|
456
|
+
serpel tasks create --project <id> --title "Rework the homepage" --priority high`).action(v(t,(i,n,o)=>Mj(i,o))),r.command("update").description("Change the status, priority, title, or description of a task").argument("<task-id>","task ID").addOption(L("--status <status>","new status",or)).addOption(L("--priority <priority>","new priority",qt)).option("--title <title>","new title").option("--description <text>","new description").addHelpText("after",`
|
|
457
|
+
Examples:
|
|
458
|
+
serpel tasks update <task-id> --status done
|
|
459
|
+
serpel tasks update <task-id> --status in_progress --priority high`).action(v(t,(i,n,o)=>Vj(i,n[0]??"",o))),r.command("show").description("Show a task with linked URLs and the recheck result").argument("<task-id>","task ID").addHelpText("after",`
|
|
460
|
+
Examples:
|
|
461
|
+
serpel tasks show <task-id>
|
|
462
|
+
serpel tasks show <task-id> --json`).action(v(t,(i,n)=>Bj(i,n[0]??""))),r.command("delete").description("Delete a task").argument("<task-id>","task ID").option("--yes","confirm deletion (required)").addHelpText("after",`
|
|
463
|
+
Example:
|
|
464
|
+
serpel tasks delete <task-id> --yes`).action(v(t,(i,n,o)=>Fj(i,n[0]??"",o)))}var Jj="Token management needs a token with all permissions, as created by \u201Cserpel auth login\u201D. A project-restricted token can only create tokens for its own projects. In the dashboard under Settings, tab \u201CAPI tokens\u201D, it always works.",Eh=["Note: Token management needs a token with all permissions, as created by \u201Cserpel auth login\u201D.","A project-restricted token can only create tokens for its own projects, otherwise the command exits with exit code 4."].join(`
|
|
465
|
+
`),Zj={dashboard:"Dashboard",cli:"CLI sign-in"};async function Mc(e){try{return await e()}catch(t){throw t instanceof xe&&t.status===403?new xe(t.status,t.apiCode,t.message,t.details,Jj):t}}function Wj(e,t){return e.revokedAt?"revoked":e.expiresAt&&Date.parse(e.expiresAt)<=t?"expired":"active"}function Hj(e){return e?e.length===1?"1 project":`${e.length} projects`:"all"}async function Kj(e){let t=await e.client(),r=await Mc(()=>t.list("/tokens")),i=e.runtime.now();Q(e,r,[{header:"ID",value:n=>n.id,max:36},{header:"Name",value:n=>n.name,max:30},{header:"Prefix",value:n=>n.prefix},{header:"Status",value:n=>Wj(n,i)},{header:"Permissions",value:n=>n.scopes.join(", "),max:60},{header:"Projects",value:n=>Hj(n.projectIds)},{header:"Created via",value:n=>Zj[n.createdVia]??n.createdVia},{header:"Last used",value:n=>I(n.lastUsedAt)},{header:"Expires",value:n=>n.expiresAt?I(n.expiresAt):"never"}],"No API tokens yet.")}function qj(e,t){let r=t.token;e.out.line(`API token created: ${r.name}`),e.out.fields([["ID",r.id],["Prefix",r.prefix],["Permissions",r.scopes.map(i=>`${i} (${Io[i]??i})`).join(", ")],["Projects",r.projectIds?r.projectIds.join(", "):"all projects of the account"],["Expires",r.expiresAt?I(r.expiresAt):"never"]]),e.out.line(),e.out.line(e.out.c.bold("Token (shown only now):")),e.out.line(t.secret)}async function Gj(e,t){let r={name:t.name,scopes:At(t.scope)},i=At(t.project);i.length>0&&(r.projectIds=i),t.expiresInDays!==void 0&&(r.expiresInDays=t.expiresInDays),B(Tw,r);let n=await e.client(),o=await Mc(()=>n.post("/tokens",r));e.json?e.out.printJson(o):qj(e,o),e.out.addSecret(o.secret),e.json||e.out.hint("Keep the token safe. It cannot be shown again later.")}async function Xj(e,t,r){ue(r,"Programs and scripts that use this token lose access immediately.",`serpel tokens revoke ${t}`);let i=await e.client(),o=(await Mc(()=>i.list("/tokens"))).data.find(a=>a.id===t)??null;if(await Mc(()=>i.delete(`/tokens/${k(t)}`)),e.json){e.out.printJson({revoked:!0,id:t,name:o?.name??null,prefix:o?.prefix??null});return}e.out.line(o?`API token revoked: ${o.name} (${o.prefix})`:`API token revoked: ${t}`)}function kS(e,t){let r=e.command("tokens").description("List, create, and revoke API tokens");r.command("list").description("Show your own API tokens with status, permissions, and last use").addHelpText("after",`
|
|
466
|
+
${Eh}
|
|
467
|
+
|
|
468
|
+
Examples:
|
|
469
|
+
serpel tokens list
|
|
470
|
+
serpel tokens list --json`).action(v(t,i=>Kj(i))),r.command("create").description("Create an API token, the token is shown exactly once").requiredOption("--name <name>","name of the token, e.g. CI").addOption(gk("--scope <scope>","permission (repeat for multiple)",rr)).option("--project <id>","restrict the token to this project (can be repeated, default: all projects)",it).option("--expires-in-days <days>","validity in days (1 to 365, default: unlimited)",X(1,365)).addHelpText("after",`
|
|
471
|
+
With --json, the token is in the field \u201Csecret\u201D. It appears in no other output.
|
|
472
|
+
${Eh}
|
|
473
|
+
|
|
474
|
+
Examples:
|
|
475
|
+
serpel tokens create --name CI --scope projects:read --scope audit:write --expires-in-days 90
|
|
476
|
+
serpel tokens create --name Export --scope export:read --project <id> --json`).action(v(t,(i,n,o)=>Gj(i,o))),r.command("revoke").description("Revoke an API token immediately").argument("<id>","token ID (from tokens list)").option("--yes","confirm revocation (required)").addHelpText("after",`
|
|
477
|
+
${Eh}
|
|
478
|
+
|
|
479
|
+
Example:
|
|
480
|
+
serpel tokens revoke <id> --yes`).action(v(t,(i,n,o)=>Xj(i,n[0]??"",o)))}var Ph=class extends _n{optionDescription(t){let r=[];return t.argChoices&&r.push(`Choices: ${t.argChoices.join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional)&&r.push(`Default: ${t.defaultValueDescription??String(t.defaultValue)}`),t.envVar!==void 0&&r.push(`Environment variable: ${t.envVar}`),r.length?`${t.description} (${r.join(", ")})`.trim():t.description}argumentDescription(t){let r=[];return t.argChoices&&r.push(`Choices: ${t.argChoices.join(", ")}`),t.defaultValue!==void 0&&r.push(`Default: ${String(t.defaultValue)}`),r.length?`${t.description} (${r.join(", ")})`.trim():t.description}};function Yj(e){let t=e.replace(/^error:\s*/i,"").trim(),r=/\n?\(Did you mean (?:one of )?(.+)\?\)\s*$/s.exec(t),i="";r&&(t=t.slice(0,r.index).trim(),i=` Did you mean ${r[1]}?`);let n=[[/^unknown option '(.+)'$/,o=>`Unknown option ${o}.`],[/^unknown command '(.+)'$/,o=>`Unknown command "${o}".`],[/^missing required argument '(.+)'$/,o=>`Required argument <${o}> is missing.`],[/^option '(.+)' argument missing$/,o=>`Option ${o} expects a value.`],[/^required option '(.+)' not specified$/,o=>`Required option ${o} is missing.`],[/^too many arguments(?: for '(.+)')?\. Expected (\d+) arguments? but got (\d+): (.+)\.$/,(o,a,s,c)=>`Too many arguments${o?` for "${o}"`:""}: expected ${a}, got ${s} (${c}).`],[/^option '(.+)' argument '(.*)' is invalid\. Allowed choices are (.+)\.$/,(o,a,s)=>`Invalid value "${a}" for ${o}. Allowed: ${s}.`],[/^option '(.+)' argument '(.*)' is invalid\. (.+)$/,(o,a,s)=>`Invalid value "${a}" for ${o}: ${s}`],[/^command-argument value '(.*)' is invalid for argument '(.+)'\. Allowed choices are (.+)\.$/,(o,a,s)=>`Invalid value "${o}" for <${a}>. Allowed: ${s}.`],[/^command-argument value '(.*)' is invalid for argument '(.+)'\. (.+)$/,(o,a,s)=>`Invalid value "${o}" for <${a}>: ${s}`],[/^option '(.+)' cannot be used with option '(.+)'$/,(o,a)=>`${o} and ${a} cannot be used together.`]];for(let[o,a]of n){let s=o.exec(t);if(s)return a(...s.slice(1).map(c=>c??""))+i}return t+i}var jh=class e extends tr{createCommand(t){return new e(t)}createHelp(){return Object.assign(new Ph,this.configureHelp())}};function Qj(e,t,r,i=new Set){let n=new jh("serpel");n.description("Serpel on the command line: projects, keyword research, crawls, rankings, AI visibility, monitoring, tasks and exports.").version(Qr,"-V, --version","show the version").helpOption("-h, --help","show help").helpCommand("help [command]","Show help for a command").option("--api-url <url>","API base URL (otherwise SERPEL_API_URL, configuration, https://serpel.app)").option("--json","machine-readable JSON output on stdout").option("--no-color","disable colours (also via NO_COLOR)").option("--verbose","log requests and status codes to stderr (without token)").configureHelp({showGlobalOptions:!0}).exitOverride().showHelpAfterError(!1).showSuggestionAfterError(!0).configureOutput({writeOut:t,writeErr:r,outputError:()=>{}}).addHelpText("after",`
|
|
481
|
+
Getting started:
|
|
482
|
+
serpel config set api-url https://seo.example.com
|
|
483
|
+
serpel auth login
|
|
484
|
+
serpel projects create --domain example.com
|
|
485
|
+
serpel crawl start --project <id> --wait
|
|
486
|
+
|
|
487
|
+
Documentation: docs/cli.md`);let o={runtime:e,secrets:i};return Wk(n,o),Gk(n,o),U_(n,o),S_(n,o),a_(n,o),v_(n,o),Vk(n,o),V_(n,o),qk(n,o),Ck(n,o),T_(n,o),K_(n,o),bS(n,o),yS(n,o),J_(n,o),Pk(n,o),m_(n,o),wS(n,o),l_(n,o),kS(n,o),z_(n,o),Hk(n,o),bk(n,o),n}function eN(e){let t=e.indexOf("--");return(t===-1?e:e.slice(0,t)).includes("--json")}function tN(e,t,r){let i=t.indexOf("--"),n=i===-1?t:t.slice(0,i);return new Yr(e.stdout,e.stderr,e.env,{json:eN(t),color:!n.includes("--no-color"),verbose:!1},r)}function Oh(e,t){let r;if(qw(t))r=t;else{let i=t instanceof Error?t.message:String(t);r=new z("unexpected_error",`Unexpected error: ${i}`,P.unexpected)}if(e.json)e.errorJson(r.code,r.message,r.details);else{let i=[];if(Array.isArray(r.details)){for(let n of r.details.slice(0,20))if(n&&typeof n=="object"&&"message"in n){let o=n.path,a=Array.isArray(o)&&o.length?`${o.join(".")}: `:typeof o=="string"&&o?`${o}: `:"";i.push(`- ${a}${String(n.message)}`)}}e.errorText(r.message,r.hint,i)}return r.exitCode}async function _S(e,t){let r=new Set,i=t.env.SERPEL_TOKEN?.trim();i&&i.length>=6&&r.add(i);let n=tN(t,e,r),o;try{o=Qj(t,a=>t.stdout.write(n.redact(a)),a=>t.stderr.write(n.redact(a)),r)}catch(a){return Oh(n,a)}try{return await o.parseAsync(e,{from:"user"}),P.ok}catch(a){if(a instanceof kt){if(a.code==="commander.helpDisplayed"||a.code==="commander.version")return P.ok;if(a.code==="commander.help")return a.exitCode===0?P.ok:P.usage;let s=Yj(a.message);return Oh(n,new z("usage_error",s,P.usage,{hint:n.json?void 0:"Run with --help for usage."}))}return Oh(n,a)}}import{spawn as nN}from"node:child_process";import rN from"node:os";function iN(e){return new Promise(t=>setTimeout(t,Math.max(0,e)))}async function oN(){if(process.stdin.isTTY)return"";let e=[];for await(let t of process.stdin)e.push(typeof t=="string"?Buffer.from(t):t);return Buffer.concat(e).toString("utf8")}function aN(e,t=process.platform){if(!/^https?:\/\//i.test(e))return Promise.resolve(!1);let r,i;return t==="win32"?(r="rundll32.exe",i=["url.dll,FileProtocolHandler",e]):t==="darwin"?(r="open",i=[e]):(r="xdg-open",i=[e]),new Promise(n=>{try{let o=nN(r,i,{stdio:"ignore",detached:!0,windowsHide:!0});o.once("error",()=>n(!1)),o.once("spawn",()=>{o.unref(),n(!0)})}catch{n(!1)}})}async function sN(){try{let e=await import("@napi-rs/keyring"),t=e.Entry??e.default?.Entry;return t?{Entry:t}:null}catch{return null}}function xS(){return{env:process.env,stdout:process.stdout,stderr:process.stderr,readStdin:oN,platform:process.platform,homedir:rN.homedir(),fetch:globalThis.fetch.bind(globalThis),sleep:iN,now:()=>Date.now(),openUrl:e=>aN(e),loadKeyring:sN}}function Bc(e){return new Promise(t=>{if(!e.writable)return t();e.write("",()=>t())})}async function SS(e){await Promise.all([Bc(process.stdout),Bc(process.stderr)]),process.exitCode=e}async function cN(e){await Promise.all([Bc(process.stdout),Bc(process.stderr)]),process.exit(e)}var Vc=process.argv.slice(2),lN=(()=>{let e=Vc.indexOf("--");return(e===-1?Vc:Vc.slice(0,e)).includes("--json")})();process.once("SIGINT",()=>{let e=ck();lN?process.stdout.write(`${JSON.stringify({error:{code:"interrupted",message:e??"Cancelled."}},null,2)}
|
|
488
|
+
`):process.stderr.write(`
|
|
489
|
+
${e??"Cancelled."}
|
|
490
|
+
`),cN(P.interrupted)});process.stdout.on("error",e=>{e.code==="EPIPE"&&process.exit(P.ok)});_S(Vc,xS()).then(e=>SS(e),e=>(process.stderr.write(`Error: Unexpected error: ${e instanceof Error?e.message:String(e)}
|
|
491
|
+
`),SS(P.unexpected)));
|