oh-my-agent 4.18.1 → 4.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/cli.js +259 -257
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -1,436 +1,438 @@
1
1
  #!/usr/bin/env node
2
- import{createRequire as mO}from"node:module";var CO=Object.create;var{getPrototypeOf:fO,defineProperty:C2,getOwnPropertyNames:xO}=Object;var kO=Object.prototype.hasOwnProperty;function yO($){return this[$]}var iO,nO,q$=($,I,U)=>{var _=$!=null&&typeof $==="object";if(_){var u=I?iO??=new WeakMap:nO??=new WeakMap,g=u.get($);if(g)return g}U=$!=null?CO(fO($)):{};let z=I||!$||!$.__esModule?C2(U,"default",{value:$,enumerable:!0}):U;for(let v of xO($))if(!kO.call(z,v))C2(z,v,{get:yO.bind($,v),enumerable:!0});if(_)u.set($,z);return z};var E=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports);var rO=($)=>$;function lO($,I){this[$]=rO.bind(null,I)}var O4=($,I)=>{for(var U in I)C2($,U,{get:I[U],enumerable:!0,configurable:!0,set:lO.bind(I,U)})};var $4=($,I)=>()=>($&&(I=$($=0)),I);var g$=mO(import.meta.url);var KI=E((hO)=>{class f2 extends Error{constructor($,I,U){super(U);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=I,this.exitCode=$,this.nestedError=void 0}}class d9 extends f2{constructor($){super(1,"commander.invalidArgument",$);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}hO.CommanderError=f2;hO.InvalidArgumentError=d9});var Iu=E((tO)=>{var{InvalidArgumentError:pO}=KI();class p9{constructor($,I){switch(this.description=I||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,$[0]){case"<":this.required=!0,this._name=$.slice(1,-1);break;case"[":this.required=!1,this._name=$.slice(1,-1);break;default:this.required=!0,this._name=$;break}if(this._name.endsWith("..."))this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_collectValue($,I){if(I===this.defaultValue||!Array.isArray(I))return[$];return I.push($),I}default($,I){return this.defaultValue=$,this.defaultValueDescription=I,this}argParser($){return this.parseArg=$,this}choices($){return this.argChoices=$.slice(),this.parseArg=(I,U)=>{if(!this.argChoices.includes(I))throw new pO(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(I,U);return I},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function oO($){let I=$.name()+($.variadic===!0?"...":"");return $.required?"<"+I+">":"["+I+"]"}tO.Argument=p9;tO.humanReadableArgName=oO});var x2=E(($D)=>{var{humanReadableArgName:sO}=Iu();class o9{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext($){this.helpWidth=this.helpWidth??$.helpWidth??80}visibleCommands($){let I=$.commands.filter((_)=>!_._hidden),U=$._getHelpCommand();if(U&&!U._hidden)I.push(U);if(this.sortSubcommands)I.sort((_,u)=>{return _.name().localeCompare(u.name())});return I}compareOptions($,I){let U=(_)=>{return _.short?_.short.replace(/^-/,""):_.long.replace(/^--/,"")};return U($).localeCompare(U(I))}visibleOptions($){let I=$.options.filter((_)=>!_.hidden),U=$._getHelpOption();if(U&&!U.hidden){let _=U.short&&$._findOption(U.short),u=U.long&&$._findOption(U.long);if(!_&&!u)I.push(U);else if(U.long&&!u)I.push($.createOption(U.long,U.description));else if(U.short&&!_)I.push($.createOption(U.short,U.description))}if(this.sortOptions)I.sort(this.compareOptions);return I}visibleGlobalOptions($){if(!this.showGlobalOptions)return[];let I=[];for(let U=$.parent;U;U=U.parent){let _=U.options.filter((u)=>!u.hidden);I.push(..._)}if(this.sortOptions)I.sort(this.compareOptions);return I}visibleArguments($){if($._argsDescription)$.registeredArguments.forEach((I)=>{I.description=I.description||$._argsDescription[I.name()]||""});if($.registeredArguments.find((I)=>I.description))return $.registeredArguments;return[]}subcommandTerm($){let I=$.registeredArguments.map((U)=>sO(U)).join(" ");return $._name+($._aliases[0]?"|"+$._aliases[0]:"")+($.options.length?" [options]":"")+(I?" "+I:"")}optionTerm($){return $.flags}argumentTerm($){return $.name()}longestSubcommandTermLength($,I){return I.visibleCommands($).reduce((U,_)=>{return Math.max(U,this.displayWidth(I.styleSubcommandTerm(I.subcommandTerm(_))))},0)}longestOptionTermLength($,I){return I.visibleOptions($).reduce((U,_)=>{return Math.max(U,this.displayWidth(I.styleOptionTerm(I.optionTerm(_))))},0)}longestGlobalOptionTermLength($,I){return I.visibleGlobalOptions($).reduce((U,_)=>{return Math.max(U,this.displayWidth(I.styleOptionTerm(I.optionTerm(_))))},0)}longestArgumentTermLength($,I){return I.visibleArguments($).reduce((U,_)=>{return Math.max(U,this.displayWidth(I.styleArgumentTerm(I.argumentTerm(_))))},0)}commandUsage($){let I=$._name;if($._aliases[0])I=I+"|"+$._aliases[0];let U="";for(let _=$.parent;_;_=_.parent)U=_.name()+" "+U;return U+I+" "+$.usage()}commandDescription($){return $.description()}subcommandDescription($){return $.summary()||$.description()}optionDescription($){let I=[];if($.argChoices)I.push(`choices: ${$.argChoices.map((U)=>JSON.stringify(U)).join(", ")}`);if($.defaultValue!==void 0){if($.required||$.optional||$.isBoolean()&&typeof $.defaultValue==="boolean")I.push(`default: ${$.defaultValueDescription||JSON.stringify($.defaultValue)}`)}if($.presetArg!==void 0&&$.optional)I.push(`preset: ${JSON.stringify($.presetArg)}`);if($.envVar!==void 0)I.push(`env: ${$.envVar}`);if(I.length>0){let U=`(${I.join(", ")})`;if($.description)return`${$.description} ${U}`;return U}return $.description}argumentDescription($){let I=[];if($.argChoices)I.push(`choices: ${$.argChoices.map((U)=>JSON.stringify(U)).join(", ")}`);if($.defaultValue!==void 0)I.push(`default: ${$.defaultValueDescription||JSON.stringify($.defaultValue)}`);if(I.length>0){let U=`(${I.join(", ")})`;if($.description)return`${$.description} ${U}`;return U}return $.description}formatItemList($,I,U){if(I.length===0)return[];return[U.styleTitle($),...I,""]}groupItems($,I,U){let _=new Map;return $.forEach((u)=>{let g=U(u);if(!_.has(g))_.set(g,[])}),I.forEach((u)=>{let g=U(u);if(!_.has(g))_.set(g,[]);_.get(g).push(u)}),_}formatHelp($,I){let U=I.padWidth($,I),_=I.helpWidth??80;function u(X,G){return I.formatItem(X,U,G,I)}let g=[`${I.styleTitle("Usage:")} ${I.styleUsage(I.commandUsage($))}`,""],z=I.commandDescription($);if(z.length>0)g=g.concat([I.boxWrap(I.styleCommandDescription(z),_),""]);let v=I.visibleArguments($).map((X)=>{return u(I.styleArgumentTerm(I.argumentTerm(X)),I.styleArgumentDescription(I.argumentDescription(X)))});if(g=g.concat(this.formatItemList("Arguments:",v,I)),this.groupItems($.options,I.visibleOptions($),(X)=>X.helpGroupHeading??"Options:").forEach((X,G)=>{let q=X.map((T)=>{return u(I.styleOptionTerm(I.optionTerm(T)),I.styleOptionDescription(I.optionDescription(T)))});g=g.concat(this.formatItemList(G,q,I))}),I.showGlobalOptions){let X=I.visibleGlobalOptions($).map((G)=>{return u(I.styleOptionTerm(I.optionTerm(G)),I.styleOptionDescription(I.optionDescription(G)))});g=g.concat(this.formatItemList("Global Options:",X,I))}return this.groupItems($.commands,I.visibleCommands($),(X)=>X.helpGroup()||"Commands:").forEach((X,G)=>{let q=X.map((T)=>{return u(I.styleSubcommandTerm(I.subcommandTerm(T)),I.styleSubcommandDescription(I.subcommandDescription(T)))});g=g.concat(this.formatItemList(G,q,I))}),g.join(`
3
- `)}displayWidth($){return t9($).length}styleTitle($){return $}styleUsage($){return $.split(" ").map((I)=>{if(I==="[options]")return this.styleOptionText(I);if(I==="[command]")return this.styleSubcommandText(I);if(I[0]==="["||I[0]==="<")return this.styleArgumentText(I);return this.styleCommandText(I)}).join(" ")}styleCommandDescription($){return this.styleDescriptionText($)}styleOptionDescription($){return this.styleDescriptionText($)}styleSubcommandDescription($){return this.styleDescriptionText($)}styleArgumentDescription($){return this.styleDescriptionText($)}styleDescriptionText($){return $}styleOptionTerm($){return this.styleOptionText($)}styleSubcommandTerm($){return $.split(" ").map((I)=>{if(I==="[options]")return this.styleOptionText(I);if(I[0]==="["||I[0]==="<")return this.styleArgumentText(I);return this.styleSubcommandText(I)}).join(" ")}styleArgumentTerm($){return this.styleArgumentText($)}styleOptionText($){return $}styleArgumentText($){return $}styleSubcommandText($){return $}styleCommandText($){return $}padWidth($,I){return Math.max(I.longestOptionTermLength($,I),I.longestGlobalOptionTermLength($,I),I.longestSubcommandTermLength($,I),I.longestArgumentTermLength($,I))}preformatted($){return/\n[^\S\r\n]/.test($)}formatItem($,I,U,_){let g=" ".repeat(2);if(!U)return g+$;let z=$.padEnd(I+$.length-_.displayWidth($)),v=2,N=(this.helpWidth??80)-I-v-2,X;if(N<this.minWidthToWrap||_.preformatted(U))X=U;else X=_.boxWrap(U,N).replace(/\n/g,`
2
+ import{createRequire as hO}from"node:module";var fO=Object.create;var{getPrototypeOf:xO,defineProperty:x2,getOwnPropertyNames:kO}=Object;var yO=Object.prototype.hasOwnProperty;function iO($){return this[$]}var rO,nO,q$=($,I,U)=>{var _=$!=null&&typeof $==="object";if(_){var u=I?rO??=new WeakMap:nO??=new WeakMap,g=u.get($);if(g)return g}U=$!=null?fO(xO($)):{};let z=I||!$||!$.__esModule?x2(U,"default",{value:$,enumerable:!0}):U;for(let v of kO($))if(!yO.call(z,v))x2(z,v,{get:iO.bind($,v),enumerable:!0});if(_)u.set($,z);return z};var E=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports);var lO=($)=>$;function mO($,I){this[$]=lO.bind(null,I)}var D4=($,I)=>{for(var U in I)x2($,U,{get:I[U],enumerable:!0,configurable:!0,set:mO.bind(I,U)})};var u4=($,I)=>()=>($&&(I=$($=0)),I);var g$=hO(import.meta.url);var WI=E((cO)=>{class k2 extends Error{constructor($,I,U){super(U);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=I,this.exitCode=$,this.nestedError=void 0}}class o9 extends k2{constructor($){super(1,"commander.invalidArgument",$);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}cO.CommanderError=k2;cO.InvalidArgumentError=o9});var _u=E((aO)=>{var{InvalidArgumentError:oO}=WI();class t9{constructor($,I){switch(this.description=I||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,$[0]){case"<":this.required=!0,this._name=$.slice(1,-1);break;case"[":this.required=!1,this._name=$.slice(1,-1);break;default:this.required=!0,this._name=$;break}if(this._name.endsWith("..."))this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_collectValue($,I){if(I===this.defaultValue||!Array.isArray(I))return[$];return I.push($),I}default($,I){return this.defaultValue=$,this.defaultValueDescription=I,this}argParser($){return this.parseArg=$,this}choices($){return this.argChoices=$.slice(),this.parseArg=(I,U)=>{if(!this.argChoices.includes(I))throw new oO(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(I,U);return I},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function tO($){let I=$.name()+($.variadic===!0?"...":"");return $.required?"<"+I+">":"["+I+"]"}aO.Argument=t9;aO.humanReadableArgName=tO});var y2=E((IV)=>{var{humanReadableArgName:$V}=_u();class a9{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext($){this.helpWidth=this.helpWidth??$.helpWidth??80}visibleCommands($){let I=$.commands.filter((_)=>!_._hidden),U=$._getHelpCommand();if(U&&!U._hidden)I.push(U);if(this.sortSubcommands)I.sort((_,u)=>{return _.name().localeCompare(u.name())});return I}compareOptions($,I){let U=(_)=>{return _.short?_.short.replace(/^-/,""):_.long.replace(/^--/,"")};return U($).localeCompare(U(I))}visibleOptions($){let I=$.options.filter((_)=>!_.hidden),U=$._getHelpOption();if(U&&!U.hidden){let _=U.short&&$._findOption(U.short),u=U.long&&$._findOption(U.long);if(!_&&!u)I.push(U);else if(U.long&&!u)I.push($.createOption(U.long,U.description));else if(U.short&&!_)I.push($.createOption(U.short,U.description))}if(this.sortOptions)I.sort(this.compareOptions);return I}visibleGlobalOptions($){if(!this.showGlobalOptions)return[];let I=[];for(let U=$.parent;U;U=U.parent){let _=U.options.filter((u)=>!u.hidden);I.push(..._)}if(this.sortOptions)I.sort(this.compareOptions);return I}visibleArguments($){if($._argsDescription)$.registeredArguments.forEach((I)=>{I.description=I.description||$._argsDescription[I.name()]||""});if($.registeredArguments.find((I)=>I.description))return $.registeredArguments;return[]}subcommandTerm($){let I=$.registeredArguments.map((U)=>$V(U)).join(" ");return $._name+($._aliases[0]?"|"+$._aliases[0]:"")+($.options.length?" [options]":"")+(I?" "+I:"")}optionTerm($){return $.flags}argumentTerm($){return $.name()}longestSubcommandTermLength($,I){return I.visibleCommands($).reduce((U,_)=>{return Math.max(U,this.displayWidth(I.styleSubcommandTerm(I.subcommandTerm(_))))},0)}longestOptionTermLength($,I){return I.visibleOptions($).reduce((U,_)=>{return Math.max(U,this.displayWidth(I.styleOptionTerm(I.optionTerm(_))))},0)}longestGlobalOptionTermLength($,I){return I.visibleGlobalOptions($).reduce((U,_)=>{return Math.max(U,this.displayWidth(I.styleOptionTerm(I.optionTerm(_))))},0)}longestArgumentTermLength($,I){return I.visibleArguments($).reduce((U,_)=>{return Math.max(U,this.displayWidth(I.styleArgumentTerm(I.argumentTerm(_))))},0)}commandUsage($){let I=$._name;if($._aliases[0])I=I+"|"+$._aliases[0];let U="";for(let _=$.parent;_;_=_.parent)U=_.name()+" "+U;return U+I+" "+$.usage()}commandDescription($){return $.description()}subcommandDescription($){return $.summary()||$.description()}optionDescription($){let I=[];if($.argChoices)I.push(`choices: ${$.argChoices.map((U)=>JSON.stringify(U)).join(", ")}`);if($.defaultValue!==void 0){if($.required||$.optional||$.isBoolean()&&typeof $.defaultValue==="boolean")I.push(`default: ${$.defaultValueDescription||JSON.stringify($.defaultValue)}`)}if($.presetArg!==void 0&&$.optional)I.push(`preset: ${JSON.stringify($.presetArg)}`);if($.envVar!==void 0)I.push(`env: ${$.envVar}`);if(I.length>0){let U=`(${I.join(", ")})`;if($.description)return`${$.description} ${U}`;return U}return $.description}argumentDescription($){let I=[];if($.argChoices)I.push(`choices: ${$.argChoices.map((U)=>JSON.stringify(U)).join(", ")}`);if($.defaultValue!==void 0)I.push(`default: ${$.defaultValueDescription||JSON.stringify($.defaultValue)}`);if(I.length>0){let U=`(${I.join(", ")})`;if($.description)return`${$.description} ${U}`;return U}return $.description}formatItemList($,I,U){if(I.length===0)return[];return[U.styleTitle($),...I,""]}groupItems($,I,U){let _=new Map;return $.forEach((u)=>{let g=U(u);if(!_.has(g))_.set(g,[])}),I.forEach((u)=>{let g=U(u);if(!_.has(g))_.set(g,[]);_.get(g).push(u)}),_}formatHelp($,I){let U=I.padWidth($,I),_=I.helpWidth??80;function u(X,G){return I.formatItem(X,U,G,I)}let g=[`${I.styleTitle("Usage:")} ${I.styleUsage(I.commandUsage($))}`,""],z=I.commandDescription($);if(z.length>0)g=g.concat([I.boxWrap(I.styleCommandDescription(z),_),""]);let v=I.visibleArguments($).map((X)=>{return u(I.styleArgumentTerm(I.argumentTerm(X)),I.styleArgumentDescription(I.argumentDescription(X)))});if(g=g.concat(this.formatItemList("Arguments:",v,I)),this.groupItems($.options,I.visibleOptions($),(X)=>X.helpGroupHeading??"Options:").forEach((X,G)=>{let q=X.map((T)=>{return u(I.styleOptionTerm(I.optionTerm(T)),I.styleOptionDescription(I.optionDescription(T)))});g=g.concat(this.formatItemList(G,q,I))}),I.showGlobalOptions){let X=I.visibleGlobalOptions($).map((G)=>{return u(I.styleOptionTerm(I.optionTerm(G)),I.styleOptionDescription(I.optionDescription(G)))});g=g.concat(this.formatItemList("Global Options:",X,I))}return this.groupItems($.commands,I.visibleCommands($),(X)=>X.helpGroup()||"Commands:").forEach((X,G)=>{let q=X.map((T)=>{return u(I.styleSubcommandTerm(I.subcommandTerm(T)),I.styleSubcommandDescription(I.subcommandDescription(T)))});g=g.concat(this.formatItemList(G,q,I))}),g.join(`
3
+ `)}displayWidth($){return e9($).length}styleTitle($){return $}styleUsage($){return $.split(" ").map((I)=>{if(I==="[options]")return this.styleOptionText(I);if(I==="[command]")return this.styleSubcommandText(I);if(I[0]==="["||I[0]==="<")return this.styleArgumentText(I);return this.styleCommandText(I)}).join(" ")}styleCommandDescription($){return this.styleDescriptionText($)}styleOptionDescription($){return this.styleDescriptionText($)}styleSubcommandDescription($){return this.styleDescriptionText($)}styleArgumentDescription($){return this.styleDescriptionText($)}styleDescriptionText($){return $}styleOptionTerm($){return this.styleOptionText($)}styleSubcommandTerm($){return $.split(" ").map((I)=>{if(I==="[options]")return this.styleOptionText(I);if(I[0]==="["||I[0]==="<")return this.styleArgumentText(I);return this.styleSubcommandText(I)}).join(" ")}styleArgumentTerm($){return this.styleArgumentText($)}styleOptionText($){return $}styleArgumentText($){return $}styleSubcommandText($){return $}styleCommandText($){return $}padWidth($,I){return Math.max(I.longestOptionTermLength($,I),I.longestGlobalOptionTermLength($,I),I.longestSubcommandTermLength($,I),I.longestArgumentTermLength($,I))}preformatted($){return/\n[^\S\r\n]/.test($)}formatItem($,I,U,_){let g=" ".repeat(2);if(!U)return g+$;let z=$.padEnd(I+$.length-_.displayWidth($)),v=2,N=(this.helpWidth??80)-I-v-2,X;if(N<this.minWidthToWrap||_.preformatted(U))X=U;else X=_.boxWrap(U,N).replace(/\n/g,`
4
4
  `+" ".repeat(I+v));return g+z+" ".repeat(v)+X.replace(/\n/g,`
5
5
  ${g}`)}boxWrap($,I){if(I<this.minWidthToWrap)return $;let U=$.split(/\r\n|\n/),_=/[\s]*[^\s]+/g,u=[];return U.forEach((g)=>{let z=g.match(_);if(z===null){u.push("");return}let v=[z.shift()],J=this.displayWidth(v[0]);z.forEach((N)=>{let X=this.displayWidth(N);if(J+X<=I){v.push(N),J+=X;return}u.push(v.join(""));let G=N.trimStart();v=[G],J=this.displayWidth(G)}),u.push(v.join(""))}),u.join(`
6
- `)}}function t9($){let I=/\x1b\[\d*(;\d*)*m/g;return $.replace(I,"")}$D.Help=o9;$D.stripColor=t9});var k2=E((gD)=>{var{InvalidArgumentError:UD}=KI();class e9{constructor($,I){this.flags=$,this.description=I||"",this.required=$.includes("<"),this.optional=$.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test($),this.mandatory=!1;let U=_D($);if(this.short=U.shortFlag,this.long=U.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($,I){return this.defaultValue=$,this.defaultValueDescription=I,this}preset($){return this.presetArg=$,this}conflicts($){return this.conflictsWith=this.conflictsWith.concat($),this}implies($){let I=$;if(typeof $==="string")I={[$]:!0};return this.implied=Object.assign(this.implied||{},I),this}env($){return this.envVar=$,this}argParser($){return this.parseArg=$,this}makeOptionMandatory($=!0){return this.mandatory=!!$,this}hideHelp($=!0){return this.hidden=!!$,this}_collectValue($,I){if(I===this.defaultValue||!Array.isArray(I))return[$];return I.push($),I}choices($){return this.argChoices=$.slice(),this.parseArg=(I,U)=>{if(!this.argChoices.includes(I))throw new UD(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(I,U);return I},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){if(this.negate)return a9(this.name().replace(/^no-/,""));return a9(this.name())}helpGroup($){return this.helpGroupHeading=$,this}is($){return this.short===$||this.long===$}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class s9{constructor($){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,$.forEach((I)=>{if(I.negate)this.negativeOptions.set(I.attributeName(),I);else this.positiveOptions.set(I.attributeName(),I)}),this.negativeOptions.forEach((I,U)=>{if(this.positiveOptions.has(U))this.dualOptions.add(U)})}valueFromOption($,I){let U=I.attributeName();if(!this.dualOptions.has(U))return!0;let _=this.negativeOptions.get(U).presetArg,u=_!==void 0?_:!1;return I.negate===(u===$)}}function a9($){return $.split("-").reduce((I,U)=>{return I+U[0].toUpperCase()+U.slice(1)})}function _D($){let I,U,_=/^-[^-]$/,u=/^--[^-]/,g=$.split(/[ |,]+/).concat("guard");if(_.test(g[0]))I=g.shift();if(u.test(g[0]))U=g.shift();if(!I&&_.test(g[0]))I=g.shift();if(!I&&u.test(g[0]))I=U,U=g.shift();if(g[0].startsWith("-")){let z=g[0],v=`option creation failed due to '${z}' in option flags '${$}'`;if(/^-[^-][^-]/.test(z))throw Error(`${v}
6
+ `)}}function e9($){let I=/\x1b\[\d*(;\d*)*m/g;return $.replace(I,"")}IV.Help=a9;IV.stripColor=e9});var i2=E((zV)=>{var{InvalidArgumentError:_V}=WI();class $X{constructor($,I){this.flags=$,this.description=I||"",this.required=$.includes("<"),this.optional=$.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test($),this.mandatory=!1;let U=gV($);if(this.short=U.shortFlag,this.long=U.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($,I){return this.defaultValue=$,this.defaultValueDescription=I,this}preset($){return this.presetArg=$,this}conflicts($){return this.conflictsWith=this.conflictsWith.concat($),this}implies($){let I=$;if(typeof $==="string")I={[$]:!0};return this.implied=Object.assign(this.implied||{},I),this}env($){return this.envVar=$,this}argParser($){return this.parseArg=$,this}makeOptionMandatory($=!0){return this.mandatory=!!$,this}hideHelp($=!0){return this.hidden=!!$,this}_collectValue($,I){if(I===this.defaultValue||!Array.isArray(I))return[$];return I.push($),I}choices($){return this.argChoices=$.slice(),this.parseArg=(I,U)=>{if(!this.argChoices.includes(I))throw new _V(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(I,U);return I},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){if(this.negate)return s9(this.name().replace(/^no-/,""));return s9(this.name())}helpGroup($){return this.helpGroupHeading=$,this}is($){return this.short===$||this.long===$}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class IX{constructor($){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,$.forEach((I)=>{if(I.negate)this.negativeOptions.set(I.attributeName(),I);else this.positiveOptions.set(I.attributeName(),I)}),this.negativeOptions.forEach((I,U)=>{if(this.positiveOptions.has(U))this.dualOptions.add(U)})}valueFromOption($,I){let U=I.attributeName();if(!this.dualOptions.has(U))return!0;let _=this.negativeOptions.get(U).presetArg,u=_!==void 0?_:!1;return I.negate===(u===$)}}function s9($){return $.split("-").reduce((I,U)=>{return I+U[0].toUpperCase()+U.slice(1)})}function gV($){let I,U,_=/^-[^-]$/,u=/^--[^-]/,g=$.split(/[ |,]+/).concat("guard");if(_.test(g[0]))I=g.shift();if(u.test(g[0]))U=g.shift();if(!I&&_.test(g[0]))I=g.shift();if(!I&&u.test(g[0]))I=U,U=g.shift();if(g[0].startsWith("-")){let z=g[0],v=`option creation failed due to '${z}' in option flags '${$}'`;if(/^-[^-][^-]/.test(z))throw Error(`${v}
7
7
  - a short flag is a single dash and a single character
8
8
  - either use a single dash and a single character (for a short flag)
9
9
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(_.test(z))throw Error(`${v}
10
10
  - too many short flags`);if(u.test(z))throw Error(`${v}
11
11
  - too many long flags`);throw Error(`${v}
12
- - unrecognised flag format`)}if(I===void 0&&U===void 0)throw Error(`option creation failed due to no flags found in '${$}'.`);return{shortFlag:I,longFlag:U}}gD.Option=e9;gD.DualOptions=s9});var $X=E((GD)=>{function JD($,I){if(Math.abs($.length-I.length)>3)return Math.max($.length,I.length);let U=[];for(let _=0;_<=$.length;_++)U[_]=[_];for(let _=0;_<=I.length;_++)U[0][_]=_;for(let _=1;_<=I.length;_++)for(let u=1;u<=$.length;u++){let g=1;if($[u-1]===I[_-1])g=0;else g=1;if(U[u][_]=Math.min(U[u-1][_]+1,U[u][_-1]+1,U[u-1][_-1]+g),u>1&&_>1&&$[u-1]===I[_-2]&&$[u-2]===I[_-1])U[u][_]=Math.min(U[u][_],U[u-2][_-2]+1)}return U[$.length][I.length]}function ND($,I){if(!I||I.length===0)return"";I=Array.from(new Set(I));let U=$.startsWith("--");if(U)$=$.slice(2),I=I.map((z)=>z.slice(2));let _=[],u=3,g=0.4;if(I.forEach((z)=>{if(z.length<=1)return;let v=JD($,z),J=Math.max($.length,z.length);if((J-v)/J>g){if(v<u)u=v,_=[z];else if(v===u)_.push(z)}}),_.sort((z,v)=>z.localeCompare(v)),U)_=_.map((z)=>`--${z}`);if(_.length>1)return`
12
+ - unrecognised flag format`)}if(I===void 0&&U===void 0)throw Error(`option creation failed due to no flags found in '${$}'.`);return{shortFlag:I,longFlag:U}}zV.Option=$X;zV.DualOptions=IX});var uX=E((XV)=>{function NV($,I){if(Math.abs($.length-I.length)>3)return Math.max($.length,I.length);let U=[];for(let _=0;_<=$.length;_++)U[_]=[_];for(let _=0;_<=I.length;_++)U[0][_]=_;for(let _=1;_<=I.length;_++)for(let u=1;u<=$.length;u++){let g=1;if($[u-1]===I[_-1])g=0;else g=1;if(U[u][_]=Math.min(U[u-1][_]+1,U[u][_-1]+1,U[u-1][_-1]+g),u>1&&_>1&&$[u-1]===I[_-2]&&$[u-2]===I[_-1])U[u][_]=Math.min(U[u][_],U[u-2][_-2]+1)}return U[$.length][I.length]}function GV($,I){if(!I||I.length===0)return"";I=Array.from(new Set(I));let U=$.startsWith("--");if(U)$=$.slice(2),I=I.map((z)=>z.slice(2));let _=[],u=3,g=0.4;if(I.forEach((z)=>{if(z.length<=1)return;let v=NV($,z),J=Math.max($.length,z.length);if((J-v)/J>g){if(v<u)u=v,_=[z];else if(v===u)_.push(z)}}),_.sort((z,v)=>z.localeCompare(v)),U)_=_.map((z)=>`--${z}`);if(_.length>1)return`
13
13
  (Did you mean one of ${_.join(", ")}?)`;if(_.length===1)return`
14
- (Did you mean ${_[0]}?)`;return""}GD.suggestSimilar=ND});var _X=E((DD)=>{var qD=g$("node:events").EventEmitter,y2=g$("node:child_process"),l4=g$("node:path"),uu=g$("node:fs"),U$=g$("node:process"),{Argument:QD,humanReadableArgName:TD}=Iu(),{CommanderError:i2}=KI(),{Help:HD,stripColor:YD}=x2(),{Option:IX,DualOptions:OD}=k2(),{suggestSimilar:uX}=$X();class r2 extends qD{constructor($){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=$||"",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:(I)=>U$.stdout.write(I),writeErr:(I)=>U$.stderr.write(I),outputError:(I,U)=>U(I),getOutHelpWidth:()=>U$.stdout.isTTY?U$.stdout.columns:void 0,getErrHelpWidth:()=>U$.stderr.isTTY?U$.stderr.columns:void 0,getOutHasColors:()=>n2()??(U$.stdout.isTTY&&U$.stdout.hasColors?.()),getErrHasColors:()=>n2()??(U$.stderr.isTTY&&U$.stderr.hasColors?.()),stripColor:(I)=>YD(I)},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($){return this._outputConfiguration=$._outputConfiguration,this._helpOption=$._helpOption,this._helpCommand=$._helpCommand,this._helpConfiguration=$._helpConfiguration,this._exitCallback=$._exitCallback,this._storeOptionsAsProperties=$._storeOptionsAsProperties,this._combineFlagAndOptionalValue=$._combineFlagAndOptionalValue,this._allowExcessArguments=$._allowExcessArguments,this._enablePositionalOptions=$._enablePositionalOptions,this._showHelpAfterError=$._showHelpAfterError,this._showSuggestionAfterError=$._showSuggestionAfterError,this}_getCommandAndAncestors(){let $=[];for(let I=this;I;I=I.parent)$.push(I);return $}command($,I,U){let _=I,u=U;if(typeof _==="object"&&_!==null)u=_,_=null;u=u||{};let[,g,z]=$.match(/([^ ]+) *(.*)/),v=this.createCommand(g);if(_)v.description(_),v._executableHandler=!0;if(u.isDefault)this._defaultCommandName=v._name;if(v._hidden=!!(u.noHelp||u.hidden),v._executableFile=u.executableFile||null,z)v.arguments(z);if(this._registerCommand(v),v.parent=this,v.copyInheritedSettings(this),_)return this;return v}createCommand($){return new r2($)}createHelp(){return Object.assign(new HD,this.configureHelp())}configureHelp($){if($===void 0)return this._helpConfiguration;return this._helpConfiguration=$,this}configureOutput($){if($===void 0)return this._outputConfiguration;return this._outputConfiguration={...this._outputConfiguration,...$},this}showHelpAfterError($=!0){if(typeof $!=="string")$=!!$;return this._showHelpAfterError=$,this}showSuggestionAfterError($=!0){return this._showSuggestionAfterError=!!$,this}addCommand($,I){if(!$._name)throw Error(`Command passed to .addCommand() must have a name
15
- - specify the name in Command constructor or using .name()`);if(I=I||{},I.isDefault)this._defaultCommandName=$._name;if(I.noHelp||I.hidden)$._hidden=!0;return this._registerCommand($),$.parent=this,$._checkForBrokenPassThrough(),this}createArgument($,I){return new QD($,I)}argument($,I,U,_){let u=this.createArgument($,I);if(typeof U==="function")u.default(_).argParser(U);else u.default(U);return this.addArgument(u),this}arguments($){return $.trim().split(/ +/).forEach((I)=>{this.argument(I)}),this}addArgument($){let I=this.registeredArguments.slice(-1)[0];if(I?.variadic)throw Error(`only the last argument can be variadic '${I.name()}'`);if($.required&&$.defaultValue!==void 0&&$.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${$.name()}'`);return this.registeredArguments.push($),this}helpCommand($,I){if(typeof $==="boolean"){if(this._addImplicitHelpCommand=$,$&&this._defaultCommandGroup)this._initCommandGroup(this._getHelpCommand());return this}let U=$??"help [command]",[,_,u]=U.match(/([^ ]+) *(.*)/),g=I??"display help for command",z=this.createCommand(_);if(z.helpOption(!1),u)z.arguments(u);if(g)z.description(g);if(this._addImplicitHelpCommand=!0,this._helpCommand=z,$||I)this._initCommandGroup(z);return this}addHelpCommand($,I){if(typeof $!=="object")return this.helpCommand($,I),this;return this._addImplicitHelpCommand=!0,this._helpCommand=$,this._initCommandGroup($),this}_getHelpCommand(){if(this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))){if(this._helpCommand===void 0)this.helpCommand(void 0,void 0);return this._helpCommand}return null}hook($,I){let U=["preSubcommand","preAction","postAction"];if(!U.includes($))throw Error(`Unexpected value for event passed to hook : '${$}'.
16
- Expecting one of '${U.join("', '")}'`);if(this._lifeCycleHooks[$])this._lifeCycleHooks[$].push(I);else this._lifeCycleHooks[$]=[I];return this}exitOverride($){if($)this._exitCallback=$;else this._exitCallback=(I)=>{if(I.code!=="commander.executeSubCommandAsync")throw I};return this}_exit($,I,U){if(this._exitCallback)this._exitCallback(new i2($,I,U));U$.exit($)}action($){let I=(U)=>{let _=this.registeredArguments.length,u=U.slice(0,_);if(this._storeOptionsAsProperties)u[_]=this;else u[_]=this.opts();return u.push(this),$.apply(this,u)};return this._actionHandler=I,this}createOption($,I){return new IX($,I)}_callParseArg($,I,U,_){try{return $.parseArg(I,U)}catch(u){if(u.code==="commander.invalidArgument"){let g=`${_} ${u.message}`;this.error(g,{exitCode:u.exitCode,code:u.code})}throw u}}_registerOption($){let I=$.short&&this._findOption($.short)||$.long&&this._findOption($.long);if(I){let U=$.long&&this._findOption($.long)?$.long:$.short;throw Error(`Cannot add option '${$.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${U}'
17
- - already used by option '${I.flags}'`)}this._initOptionGroup($),this.options.push($)}_registerCommand($){let I=(_)=>{return[_.name()].concat(_.aliases())},U=I($).find((_)=>this._findCommand(_));if(U){let _=I(this._findCommand(U)).join("|"),u=I($).join("|");throw Error(`cannot add command '${u}' as already have command '${_}'`)}this._initCommandGroup($),this.commands.push($)}addOption($){this._registerOption($);let I=$.name(),U=$.attributeName();if($.negate){let u=$.long.replace(/^--no-/,"--");if(!this._findOption(u))this.setOptionValueWithSource(U,$.defaultValue===void 0?!0:$.defaultValue,"default")}else if($.defaultValue!==void 0)this.setOptionValueWithSource(U,$.defaultValue,"default");let _=(u,g,z)=>{if(u==null&&$.presetArg!==void 0)u=$.presetArg;let v=this.getOptionValue(U);if(u!==null&&$.parseArg)u=this._callParseArg($,u,v,g);else if(u!==null&&$.variadic)u=$._collectValue(u,v);if(u==null)if($.negate)u=!1;else if($.isBoolean()||$.optional)u=!0;else u="";this.setOptionValueWithSource(U,u,z)};if(this.on("option:"+I,(u)=>{let g=`error: option '${$.flags}' argument '${u}' is invalid.`;_(u,g,"cli")}),$.envVar)this.on("optionEnv:"+I,(u)=>{let g=`error: option '${$.flags}' value '${u}' from env '${$.envVar}' is invalid.`;_(u,g,"env")});return this}_optionEx($,I,U,_,u){if(typeof I==="object"&&I instanceof IX)throw Error("To add an Option object use addOption() instead of option() or requiredOption()");let g=this.createOption(I,U);if(g.makeOptionMandatory(!!$.mandatory),typeof _==="function")g.default(u).argParser(_);else if(_ instanceof RegExp){let z=_;_=(v,J)=>{let N=z.exec(v);return N?N[0]:J},g.default(u).argParser(_)}else g.default(_);return this.addOption(g)}option($,I,U,_){return this._optionEx({},$,I,U,_)}requiredOption($,I,U,_){return this._optionEx({mandatory:!0},$,I,U,_)}combineFlagAndOptionalValue($=!0){return this._combineFlagAndOptionalValue=!!$,this}allowUnknownOption($=!0){return this._allowUnknownOption=!!$,this}allowExcessArguments($=!0){return this._allowExcessArguments=!!$,this}enablePositionalOptions($=!0){return this._enablePositionalOptions=!!$,this}passThroughOptions($=!0){return this._passThroughOptions=!!$,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties($=!0){if(this.options.length)throw Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!$,this}getOptionValue($){if(this._storeOptionsAsProperties)return this[$];return this._optionValues[$]}setOptionValue($,I){return this.setOptionValueWithSource($,I,void 0)}setOptionValueWithSource($,I,U){if(this._storeOptionsAsProperties)this[$]=I;else this._optionValues[$]=I;return this._optionValueSources[$]=U,this}getOptionValueSource($){return this._optionValueSources[$]}getOptionValueSourceWithGlobals($){let I;return this._getCommandAndAncestors().forEach((U)=>{if(U.getOptionValueSource($)!==void 0)I=U.getOptionValueSource($)}),I}_prepareUserArgs($,I){if($!==void 0&&!Array.isArray($))throw Error("first parameter to parse must be array or undefined");if(I=I||{},$===void 0&&I.from===void 0){if(U$.versions?.electron)I.from="electron";let _=U$.execArgv??[];if(_.includes("-e")||_.includes("--eval")||_.includes("-p")||_.includes("--print"))I.from="eval"}if($===void 0)$=U$.argv;this.rawArgs=$.slice();let U;switch(I.from){case void 0:case"node":this._scriptPath=$[1],U=$.slice(2);break;case"electron":if(U$.defaultApp)this._scriptPath=$[1],U=$.slice(2);else U=$.slice(1);break;case"user":U=$.slice(0);break;case"eval":U=$.slice(1);break;default:throw Error(`unexpected parse option { from: '${I.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",U}parse($,I){this._prepareForParse();let U=this._prepareUserArgs($,I);return this._parseCommand([],U),this}async parseAsync($,I){this._prepareForParse();let U=this._prepareUserArgs($,I);return await this._parseCommand([],U),this}_prepareForParse(){if(this._savedState===null)this.saveStateBeforeParse();else this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw 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($,I,U){if(uu.existsSync($))return;let _=I?`searched for local subcommand relative to directory '${I}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",u=`'${$}' does not exist
14
+ (Did you mean ${_[0]}?)`;return""}XV.suggestSimilar=GV});var zX=E((DV)=>{var QV=g$("node:events").EventEmitter,r2=g$("node:child_process"),h4=g$("node:path"),gu=g$("node:fs"),U$=g$("node:process"),{Argument:TV,humanReadableArgName:HV}=_u(),{CommanderError:n2}=WI(),{Help:YV,stripColor:OV}=y2(),{Option:UX,DualOptions:VV}=i2(),{suggestSimilar:_X}=uX();class m2 extends QV{constructor($){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=$||"",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:(I)=>U$.stdout.write(I),writeErr:(I)=>U$.stderr.write(I),outputError:(I,U)=>U(I),getOutHelpWidth:()=>U$.stdout.isTTY?U$.stdout.columns:void 0,getErrHelpWidth:()=>U$.stderr.isTTY?U$.stderr.columns:void 0,getOutHasColors:()=>l2()??(U$.stdout.isTTY&&U$.stdout.hasColors?.()),getErrHasColors:()=>l2()??(U$.stderr.isTTY&&U$.stderr.hasColors?.()),stripColor:(I)=>OV(I)},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($){return this._outputConfiguration=$._outputConfiguration,this._helpOption=$._helpOption,this._helpCommand=$._helpCommand,this._helpConfiguration=$._helpConfiguration,this._exitCallback=$._exitCallback,this._storeOptionsAsProperties=$._storeOptionsAsProperties,this._combineFlagAndOptionalValue=$._combineFlagAndOptionalValue,this._allowExcessArguments=$._allowExcessArguments,this._enablePositionalOptions=$._enablePositionalOptions,this._showHelpAfterError=$._showHelpAfterError,this._showSuggestionAfterError=$._showSuggestionAfterError,this}_getCommandAndAncestors(){let $=[];for(let I=this;I;I=I.parent)$.push(I);return $}command($,I,U){let _=I,u=U;if(typeof _==="object"&&_!==null)u=_,_=null;u=u||{};let[,g,z]=$.match(/([^ ]+) *(.*)/),v=this.createCommand(g);if(_)v.description(_),v._executableHandler=!0;if(u.isDefault)this._defaultCommandName=v._name;if(v._hidden=!!(u.noHelp||u.hidden),v._executableFile=u.executableFile||null,z)v.arguments(z);if(this._registerCommand(v),v.parent=this,v.copyInheritedSettings(this),_)return this;return v}createCommand($){return new m2($)}createHelp(){return Object.assign(new YV,this.configureHelp())}configureHelp($){if($===void 0)return this._helpConfiguration;return this._helpConfiguration=$,this}configureOutput($){if($===void 0)return this._outputConfiguration;return this._outputConfiguration={...this._outputConfiguration,...$},this}showHelpAfterError($=!0){if(typeof $!=="string")$=!!$;return this._showHelpAfterError=$,this}showSuggestionAfterError($=!0){return this._showSuggestionAfterError=!!$,this}addCommand($,I){if(!$._name)throw Error(`Command passed to .addCommand() must have a name
15
+ - specify the name in Command constructor or using .name()`);if(I=I||{},I.isDefault)this._defaultCommandName=$._name;if(I.noHelp||I.hidden)$._hidden=!0;return this._registerCommand($),$.parent=this,$._checkForBrokenPassThrough(),this}createArgument($,I){return new TV($,I)}argument($,I,U,_){let u=this.createArgument($,I);if(typeof U==="function")u.default(_).argParser(U);else u.default(U);return this.addArgument(u),this}arguments($){return $.trim().split(/ +/).forEach((I)=>{this.argument(I)}),this}addArgument($){let I=this.registeredArguments.slice(-1)[0];if(I?.variadic)throw Error(`only the last argument can be variadic '${I.name()}'`);if($.required&&$.defaultValue!==void 0&&$.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${$.name()}'`);return this.registeredArguments.push($),this}helpCommand($,I){if(typeof $==="boolean"){if(this._addImplicitHelpCommand=$,$&&this._defaultCommandGroup)this._initCommandGroup(this._getHelpCommand());return this}let U=$??"help [command]",[,_,u]=U.match(/([^ ]+) *(.*)/),g=I??"display help for command",z=this.createCommand(_);if(z.helpOption(!1),u)z.arguments(u);if(g)z.description(g);if(this._addImplicitHelpCommand=!0,this._helpCommand=z,$||I)this._initCommandGroup(z);return this}addHelpCommand($,I){if(typeof $!=="object")return this.helpCommand($,I),this;return this._addImplicitHelpCommand=!0,this._helpCommand=$,this._initCommandGroup($),this}_getHelpCommand(){if(this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))){if(this._helpCommand===void 0)this.helpCommand(void 0,void 0);return this._helpCommand}return null}hook($,I){let U=["preSubcommand","preAction","postAction"];if(!U.includes($))throw Error(`Unexpected value for event passed to hook : '${$}'.
16
+ Expecting one of '${U.join("', '")}'`);if(this._lifeCycleHooks[$])this._lifeCycleHooks[$].push(I);else this._lifeCycleHooks[$]=[I];return this}exitOverride($){if($)this._exitCallback=$;else this._exitCallback=(I)=>{if(I.code!=="commander.executeSubCommandAsync")throw I};return this}_exit($,I,U){if(this._exitCallback)this._exitCallback(new n2($,I,U));U$.exit($)}action($){let I=(U)=>{let _=this.registeredArguments.length,u=U.slice(0,_);if(this._storeOptionsAsProperties)u[_]=this;else u[_]=this.opts();return u.push(this),$.apply(this,u)};return this._actionHandler=I,this}createOption($,I){return new UX($,I)}_callParseArg($,I,U,_){try{return $.parseArg(I,U)}catch(u){if(u.code==="commander.invalidArgument"){let g=`${_} ${u.message}`;this.error(g,{exitCode:u.exitCode,code:u.code})}throw u}}_registerOption($){let I=$.short&&this._findOption($.short)||$.long&&this._findOption($.long);if(I){let U=$.long&&this._findOption($.long)?$.long:$.short;throw Error(`Cannot add option '${$.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${U}'
17
+ - already used by option '${I.flags}'`)}this._initOptionGroup($),this.options.push($)}_registerCommand($){let I=(_)=>{return[_.name()].concat(_.aliases())},U=I($).find((_)=>this._findCommand(_));if(U){let _=I(this._findCommand(U)).join("|"),u=I($).join("|");throw Error(`cannot add command '${u}' as already have command '${_}'`)}this._initCommandGroup($),this.commands.push($)}addOption($){this._registerOption($);let I=$.name(),U=$.attributeName();if($.negate){let u=$.long.replace(/^--no-/,"--");if(!this._findOption(u))this.setOptionValueWithSource(U,$.defaultValue===void 0?!0:$.defaultValue,"default")}else if($.defaultValue!==void 0)this.setOptionValueWithSource(U,$.defaultValue,"default");let _=(u,g,z)=>{if(u==null&&$.presetArg!==void 0)u=$.presetArg;let v=this.getOptionValue(U);if(u!==null&&$.parseArg)u=this._callParseArg($,u,v,g);else if(u!==null&&$.variadic)u=$._collectValue(u,v);if(u==null)if($.negate)u=!1;else if($.isBoolean()||$.optional)u=!0;else u="";this.setOptionValueWithSource(U,u,z)};if(this.on("option:"+I,(u)=>{let g=`error: option '${$.flags}' argument '${u}' is invalid.`;_(u,g,"cli")}),$.envVar)this.on("optionEnv:"+I,(u)=>{let g=`error: option '${$.flags}' value '${u}' from env '${$.envVar}' is invalid.`;_(u,g,"env")});return this}_optionEx($,I,U,_,u){if(typeof I==="object"&&I instanceof UX)throw Error("To add an Option object use addOption() instead of option() or requiredOption()");let g=this.createOption(I,U);if(g.makeOptionMandatory(!!$.mandatory),typeof _==="function")g.default(u).argParser(_);else if(_ instanceof RegExp){let z=_;_=(v,J)=>{let N=z.exec(v);return N?N[0]:J},g.default(u).argParser(_)}else g.default(_);return this.addOption(g)}option($,I,U,_){return this._optionEx({},$,I,U,_)}requiredOption($,I,U,_){return this._optionEx({mandatory:!0},$,I,U,_)}combineFlagAndOptionalValue($=!0){return this._combineFlagAndOptionalValue=!!$,this}allowUnknownOption($=!0){return this._allowUnknownOption=!!$,this}allowExcessArguments($=!0){return this._allowExcessArguments=!!$,this}enablePositionalOptions($=!0){return this._enablePositionalOptions=!!$,this}passThroughOptions($=!0){return this._passThroughOptions=!!$,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties($=!0){if(this.options.length)throw Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!$,this}getOptionValue($){if(this._storeOptionsAsProperties)return this[$];return this._optionValues[$]}setOptionValue($,I){return this.setOptionValueWithSource($,I,void 0)}setOptionValueWithSource($,I,U){if(this._storeOptionsAsProperties)this[$]=I;else this._optionValues[$]=I;return this._optionValueSources[$]=U,this}getOptionValueSource($){return this._optionValueSources[$]}getOptionValueSourceWithGlobals($){let I;return this._getCommandAndAncestors().forEach((U)=>{if(U.getOptionValueSource($)!==void 0)I=U.getOptionValueSource($)}),I}_prepareUserArgs($,I){if($!==void 0&&!Array.isArray($))throw Error("first parameter to parse must be array or undefined");if(I=I||{},$===void 0&&I.from===void 0){if(U$.versions?.electron)I.from="electron";let _=U$.execArgv??[];if(_.includes("-e")||_.includes("--eval")||_.includes("-p")||_.includes("--print"))I.from="eval"}if($===void 0)$=U$.argv;this.rawArgs=$.slice();let U;switch(I.from){case void 0:case"node":this._scriptPath=$[1],U=$.slice(2);break;case"electron":if(U$.defaultApp)this._scriptPath=$[1],U=$.slice(2);else U=$.slice(1);break;case"user":U=$.slice(0);break;case"eval":U=$.slice(1);break;default:throw Error(`unexpected parse option { from: '${I.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",U}parse($,I){this._prepareForParse();let U=this._prepareUserArgs($,I);return this._parseCommand([],U),this}async parseAsync($,I){this._prepareForParse();let U=this._prepareUserArgs($,I);return await this._parseCommand([],U),this}_prepareForParse(){if(this._savedState===null)this.saveStateBeforeParse();else this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw 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($,I,U){if(gu.existsSync($))return;let _=I?`searched for local subcommand relative to directory '${I}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",u=`'${$}' does not exist
19
19
  - if '${U}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
20
20
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
21
- - ${_}`;throw Error(u)}_executeSubCommand($,I){I=I.slice();let U=!1,_=[".js",".ts",".tsx",".mjs",".cjs"];function u(N,X){let G=l4.resolve(N,X);if(uu.existsSync(G))return G;if(_.includes(l4.extname(X)))return;let q=_.find((T)=>uu.existsSync(`${G}${T}`));if(q)return`${G}${q}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let g=$._executableFile||`${this._name}-${$._name}`,z=this._executableDir||"";if(this._scriptPath){let N;try{N=uu.realpathSync(this._scriptPath)}catch{N=this._scriptPath}z=l4.resolve(l4.dirname(N),z)}if(z){let N=u(z,g);if(!N&&!$._executableFile&&this._scriptPath){let X=l4.basename(this._scriptPath,l4.extname(this._scriptPath));if(X!==this._name)N=u(z,`${X}-${$._name}`)}g=N||g}U=_.includes(l4.extname(g));let v;if(U$.platform!=="win32")if(U)I.unshift(g),I=UX(U$.execArgv).concat(I),v=y2.spawn(U$.argv[0],I,{stdio:"inherit"});else v=y2.spawn(g,I,{stdio:"inherit"});else this._checkForMissingExecutable(g,z,$._name),I.unshift(g),I=UX(U$.execArgv).concat(I),v=y2.spawn(U$.execPath,I,{stdio:"inherit"});if(!v.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((X)=>{U$.on(X,()=>{if(v.killed===!1&&v.exitCode===null)v.kill(X)})});let J=this._exitCallback;v.on("close",(N)=>{if(N=N??1,!J)U$.exit(N);else J(new i2(N,"commander.executeSubCommandAsync","(close)"))}),v.on("error",(N)=>{if(N.code==="ENOENT")this._checkForMissingExecutable(g,z,$._name);else if(N.code==="EACCES")throw Error(`'${g}' not executable`);if(!J)U$.exit(1);else{let X=new i2(1,"commander.executeSubCommandAsync","(error)");X.nestedError=N,J(X)}}),this.runningCommand=v}_dispatchSubcommand($,I,U){let _=this._findCommand($);if(!_)this.help({error:!0});_._prepareForParse();let u;return u=this._chainOrCallSubCommandHook(u,_,"preSubcommand"),u=this._chainOrCall(u,()=>{if(_._executableHandler)this._executeSubCommand(_,I.concat(U));else return _._parseCommand(I,U)}),u}_dispatchHelpCommand($){if(!$)this.help();let I=this._findCommand($);if(I&&!I._executableHandler)I.help();return this._dispatchSubcommand($,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){if(this.registeredArguments.forEach(($,I)=>{if($.required&&this.args[I]==null)this.missingArgument($.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)return;if(this.args.length>this.registeredArguments.length)this._excessArguments(this.args)}_processArguments(){let $=(U,_,u)=>{let g=_;if(_!==null&&U.parseArg){let z=`error: command-argument value '${_}' is invalid for argument '${U.name()}'.`;g=this._callParseArg(U,_,u,z)}return g};this._checkNumberOfArguments();let I=[];this.registeredArguments.forEach((U,_)=>{let u=U.defaultValue;if(U.variadic){if(_<this.args.length){if(u=this.args.slice(_),U.parseArg)u=u.reduce((g,z)=>{return $(U,z,g)},U.defaultValue)}else if(u===void 0)u=[]}else if(_<this.args.length){if(u=this.args[_],U.parseArg)u=$(U,u,U.defaultValue)}I[_]=u}),this.processedArgs=I}_chainOrCall($,I){if($?.then&&typeof $.then==="function")return $.then(()=>I());return I()}_chainOrCallHooks($,I){let U=$,_=[];if(this._getCommandAndAncestors().reverse().filter((u)=>u._lifeCycleHooks[I]!==void 0).forEach((u)=>{u._lifeCycleHooks[I].forEach((g)=>{_.push({hookedCommand:u,callback:g})})}),I==="postAction")_.reverse();return _.forEach((u)=>{U=this._chainOrCall(U,()=>{return u.callback(u.hookedCommand,this)})}),U}_chainOrCallSubCommandHook($,I,U){let _=$;if(this._lifeCycleHooks[U]!==void 0)this._lifeCycleHooks[U].forEach((u)=>{_=this._chainOrCall(_,()=>{return u(this,I)})});return _}_parseCommand($,I){let U=this.parseOptions(I);if(this._parseOptionsEnv(),this._parseOptionsImplied(),$=$.concat(U.operands),I=U.unknown,this.args=$.concat(I),$&&this._findCommand($[0]))return this._dispatchSubcommand($[0],$.slice(1),I);if(this._getHelpCommand()&&$[0]===this._getHelpCommand().name())return this._dispatchHelpCommand($[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(I),this._dispatchSubcommand(this._defaultCommandName,$,I);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});this._outputHelpIfRequested(U.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let _=()=>{if(U.unknown.length>0)this.unknownOption(U.unknown[0])},u=`command:${this.name()}`;if(this._actionHandler){_(),this._processArguments();let g;if(g=this._chainOrCallHooks(g,"preAction"),g=this._chainOrCall(g,()=>this._actionHandler(this.processedArgs)),this.parent)g=this._chainOrCall(g,()=>{this.parent.emit(u,$,I)});return g=this._chainOrCallHooks(g,"postAction"),g}if(this.parent?.listenerCount(u))_(),this._processArguments(),this.parent.emit(u,$,I);else if($.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",$,I);if(this.listenerCount("command:*"))this.emit("command:*",$,I);else if(this.commands.length)this.unknownCommand();else _(),this._processArguments()}else if(this.commands.length)_(),this.help({error:!0});else _(),this._processArguments()}_findCommand($){if(!$)return;return this.commands.find((I)=>I._name===$||I._aliases.includes($))}_findOption($){return this.options.find((I)=>I.is($))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(($)=>{$.options.forEach((I)=>{if(I.mandatory&&$.getOptionValue(I.attributeName())===void 0)$.missingMandatoryOptionValue(I)})})}_checkForConflictingLocalOptions(){let $=this.options.filter((U)=>{let _=U.attributeName();if(this.getOptionValue(_)===void 0)return!1;return this.getOptionValueSource(_)!=="default"});$.filter((U)=>U.conflictsWith.length>0).forEach((U)=>{let _=$.find((u)=>U.conflictsWith.includes(u.attributeName()));if(_)this._conflictingOption(U,_)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(($)=>{$._checkForConflictingLocalOptions()})}parseOptions($){let I=[],U=[],_=I;function u(N){return N.length>1&&N[0]==="-"}let g=(N)=>{if(!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(N))return!1;return!this._getCommandAndAncestors().some((X)=>X.options.map((G)=>G.short).some((G)=>/^-\d$/.test(G)))},z=null,v=null,J=0;while(J<$.length||v){let N=v??$[J++];if(v=null,N==="--"){if(_===U)_.push(N);_.push(...$.slice(J));break}if(z&&(!u(N)||g(N))){this.emit(`option:${z.name()}`,N);continue}if(z=null,u(N)){let X=this._findOption(N);if(X){if(X.required){let G=$[J++];if(G===void 0)this.optionMissingArgument(X);this.emit(`option:${X.name()}`,G)}else if(X.optional){let G=null;if(J<$.length&&(!u($[J])||g($[J])))G=$[J++];this.emit(`option:${X.name()}`,G)}else this.emit(`option:${X.name()}`);z=X.variadic?X:null;continue}}if(N.length>2&&N[0]==="-"&&N[1]!=="-"){let X=this._findOption(`-${N[1]}`);if(X){if(X.required||X.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${X.name()}`,N.slice(2));else this.emit(`option:${X.name()}`),v=`-${N.slice(2)}`;continue}}if(/^--[^=]+=/.test(N)){let X=N.indexOf("="),G=this._findOption(N.slice(0,X));if(G&&(G.required||G.optional)){this.emit(`option:${G.name()}`,N.slice(X+1));continue}}if(_===I&&u(N)&&!(this.commands.length===0&&g(N)))_=U;if((this._enablePositionalOptions||this._passThroughOptions)&&I.length===0&&U.length===0){if(this._findCommand(N)){I.push(N),U.push(...$.slice(J));break}else if(this._getHelpCommand()&&N===this._getHelpCommand().name()){I.push(N,...$.slice(J));break}else if(this._defaultCommandName){U.push(N,...$.slice(J));break}}if(this._passThroughOptions){_.push(N,...$.slice(J));break}_.push(N)}return{operands:I,unknown:U}}opts(){if(this._storeOptionsAsProperties){let $={},I=this.options.length;for(let U=0;U<I;U++){let _=this.options[U].attributeName();$[_]=_===this._versionOptionName?this._version:this[_]}return $}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(($,I)=>Object.assign($,I.opts()),{})}error($,I){if(this._outputConfiguration.outputError(`${$}
21
+ - ${_}`;throw Error(u)}_executeSubCommand($,I){I=I.slice();let U=!1,_=[".js",".ts",".tsx",".mjs",".cjs"];function u(N,X){let G=h4.resolve(N,X);if(gu.existsSync(G))return G;if(_.includes(h4.extname(X)))return;let q=_.find((T)=>gu.existsSync(`${G}${T}`));if(q)return`${G}${q}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let g=$._executableFile||`${this._name}-${$._name}`,z=this._executableDir||"";if(this._scriptPath){let N;try{N=gu.realpathSync(this._scriptPath)}catch{N=this._scriptPath}z=h4.resolve(h4.dirname(N),z)}if(z){let N=u(z,g);if(!N&&!$._executableFile&&this._scriptPath){let X=h4.basename(this._scriptPath,h4.extname(this._scriptPath));if(X!==this._name)N=u(z,`${X}-${$._name}`)}g=N||g}U=_.includes(h4.extname(g));let v;if(U$.platform!=="win32")if(U)I.unshift(g),I=gX(U$.execArgv).concat(I),v=r2.spawn(U$.argv[0],I,{stdio:"inherit"});else v=r2.spawn(g,I,{stdio:"inherit"});else this._checkForMissingExecutable(g,z,$._name),I.unshift(g),I=gX(U$.execArgv).concat(I),v=r2.spawn(U$.execPath,I,{stdio:"inherit"});if(!v.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((X)=>{U$.on(X,()=>{if(v.killed===!1&&v.exitCode===null)v.kill(X)})});let J=this._exitCallback;v.on("close",(N)=>{if(N=N??1,!J)U$.exit(N);else J(new n2(N,"commander.executeSubCommandAsync","(close)"))}),v.on("error",(N)=>{if(N.code==="ENOENT")this._checkForMissingExecutable(g,z,$._name);else if(N.code==="EACCES")throw Error(`'${g}' not executable`);if(!J)U$.exit(1);else{let X=new n2(1,"commander.executeSubCommandAsync","(error)");X.nestedError=N,J(X)}}),this.runningCommand=v}_dispatchSubcommand($,I,U){let _=this._findCommand($);if(!_)this.help({error:!0});_._prepareForParse();let u;return u=this._chainOrCallSubCommandHook(u,_,"preSubcommand"),u=this._chainOrCall(u,()=>{if(_._executableHandler)this._executeSubCommand(_,I.concat(U));else return _._parseCommand(I,U)}),u}_dispatchHelpCommand($){if(!$)this.help();let I=this._findCommand($);if(I&&!I._executableHandler)I.help();return this._dispatchSubcommand($,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){if(this.registeredArguments.forEach(($,I)=>{if($.required&&this.args[I]==null)this.missingArgument($.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)return;if(this.args.length>this.registeredArguments.length)this._excessArguments(this.args)}_processArguments(){let $=(U,_,u)=>{let g=_;if(_!==null&&U.parseArg){let z=`error: command-argument value '${_}' is invalid for argument '${U.name()}'.`;g=this._callParseArg(U,_,u,z)}return g};this._checkNumberOfArguments();let I=[];this.registeredArguments.forEach((U,_)=>{let u=U.defaultValue;if(U.variadic){if(_<this.args.length){if(u=this.args.slice(_),U.parseArg)u=u.reduce((g,z)=>{return $(U,z,g)},U.defaultValue)}else if(u===void 0)u=[]}else if(_<this.args.length){if(u=this.args[_],U.parseArg)u=$(U,u,U.defaultValue)}I[_]=u}),this.processedArgs=I}_chainOrCall($,I){if($?.then&&typeof $.then==="function")return $.then(()=>I());return I()}_chainOrCallHooks($,I){let U=$,_=[];if(this._getCommandAndAncestors().reverse().filter((u)=>u._lifeCycleHooks[I]!==void 0).forEach((u)=>{u._lifeCycleHooks[I].forEach((g)=>{_.push({hookedCommand:u,callback:g})})}),I==="postAction")_.reverse();return _.forEach((u)=>{U=this._chainOrCall(U,()=>{return u.callback(u.hookedCommand,this)})}),U}_chainOrCallSubCommandHook($,I,U){let _=$;if(this._lifeCycleHooks[U]!==void 0)this._lifeCycleHooks[U].forEach((u)=>{_=this._chainOrCall(_,()=>{return u(this,I)})});return _}_parseCommand($,I){let U=this.parseOptions(I);if(this._parseOptionsEnv(),this._parseOptionsImplied(),$=$.concat(U.operands),I=U.unknown,this.args=$.concat(I),$&&this._findCommand($[0]))return this._dispatchSubcommand($[0],$.slice(1),I);if(this._getHelpCommand()&&$[0]===this._getHelpCommand().name())return this._dispatchHelpCommand($[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(I),this._dispatchSubcommand(this._defaultCommandName,$,I);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});this._outputHelpIfRequested(U.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let _=()=>{if(U.unknown.length>0)this.unknownOption(U.unknown[0])},u=`command:${this.name()}`;if(this._actionHandler){_(),this._processArguments();let g;if(g=this._chainOrCallHooks(g,"preAction"),g=this._chainOrCall(g,()=>this._actionHandler(this.processedArgs)),this.parent)g=this._chainOrCall(g,()=>{this.parent.emit(u,$,I)});return g=this._chainOrCallHooks(g,"postAction"),g}if(this.parent?.listenerCount(u))_(),this._processArguments(),this.parent.emit(u,$,I);else if($.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",$,I);if(this.listenerCount("command:*"))this.emit("command:*",$,I);else if(this.commands.length)this.unknownCommand();else _(),this._processArguments()}else if(this.commands.length)_(),this.help({error:!0});else _(),this._processArguments()}_findCommand($){if(!$)return;return this.commands.find((I)=>I._name===$||I._aliases.includes($))}_findOption($){return this.options.find((I)=>I.is($))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(($)=>{$.options.forEach((I)=>{if(I.mandatory&&$.getOptionValue(I.attributeName())===void 0)$.missingMandatoryOptionValue(I)})})}_checkForConflictingLocalOptions(){let $=this.options.filter((U)=>{let _=U.attributeName();if(this.getOptionValue(_)===void 0)return!1;return this.getOptionValueSource(_)!=="default"});$.filter((U)=>U.conflictsWith.length>0).forEach((U)=>{let _=$.find((u)=>U.conflictsWith.includes(u.attributeName()));if(_)this._conflictingOption(U,_)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(($)=>{$._checkForConflictingLocalOptions()})}parseOptions($){let I=[],U=[],_=I;function u(N){return N.length>1&&N[0]==="-"}let g=(N)=>{if(!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(N))return!1;return!this._getCommandAndAncestors().some((X)=>X.options.map((G)=>G.short).some((G)=>/^-\d$/.test(G)))},z=null,v=null,J=0;while(J<$.length||v){let N=v??$[J++];if(v=null,N==="--"){if(_===U)_.push(N);_.push(...$.slice(J));break}if(z&&(!u(N)||g(N))){this.emit(`option:${z.name()}`,N);continue}if(z=null,u(N)){let X=this._findOption(N);if(X){if(X.required){let G=$[J++];if(G===void 0)this.optionMissingArgument(X);this.emit(`option:${X.name()}`,G)}else if(X.optional){let G=null;if(J<$.length&&(!u($[J])||g($[J])))G=$[J++];this.emit(`option:${X.name()}`,G)}else this.emit(`option:${X.name()}`);z=X.variadic?X:null;continue}}if(N.length>2&&N[0]==="-"&&N[1]!=="-"){let X=this._findOption(`-${N[1]}`);if(X){if(X.required||X.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${X.name()}`,N.slice(2));else this.emit(`option:${X.name()}`),v=`-${N.slice(2)}`;continue}}if(/^--[^=]+=/.test(N)){let X=N.indexOf("="),G=this._findOption(N.slice(0,X));if(G&&(G.required||G.optional)){this.emit(`option:${G.name()}`,N.slice(X+1));continue}}if(_===I&&u(N)&&!(this.commands.length===0&&g(N)))_=U;if((this._enablePositionalOptions||this._passThroughOptions)&&I.length===0&&U.length===0){if(this._findCommand(N)){I.push(N),U.push(...$.slice(J));break}else if(this._getHelpCommand()&&N===this._getHelpCommand().name()){I.push(N,...$.slice(J));break}else if(this._defaultCommandName){U.push(N,...$.slice(J));break}}if(this._passThroughOptions){_.push(N,...$.slice(J));break}_.push(N)}return{operands:I,unknown:U}}opts(){if(this._storeOptionsAsProperties){let $={},I=this.options.length;for(let U=0;U<I;U++){let _=this.options[U].attributeName();$[_]=_===this._versionOptionName?this._version:this[_]}return $}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce(($,I)=>Object.assign($,I.opts()),{})}error($,I){if(this._outputConfiguration.outputError(`${$}
22
22
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
23
23
  `);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
24
- `),this.outputHelp({error:!0});let U=I||{},_=U.exitCode||1,u=U.code||"commander.error";this._exit(_,u,$)}_parseOptionsEnv(){this.options.forEach(($)=>{if($.envVar&&$.envVar in U$.env){let I=$.attributeName();if(this.getOptionValue(I)===void 0||["default","config","env"].includes(this.getOptionValueSource(I)))if($.required||$.optional)this.emit(`optionEnv:${$.name()}`,U$.env[$.envVar]);else this.emit(`optionEnv:${$.name()}`)}})}_parseOptionsImplied(){let $=new OD(this.options),I=(U)=>{return this.getOptionValue(U)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(U))};this.options.filter((U)=>U.implied!==void 0&&I(U.attributeName())&&$.valueFromOption(this.getOptionValue(U.attributeName()),U)).forEach((U)=>{Object.keys(U.implied).filter((_)=>!I(_)).forEach((_)=>{this.setOptionValueWithSource(_,U.implied[_],"implied")})})}missingArgument($){let I=`error: missing required argument '${$}'`;this.error(I,{code:"commander.missingArgument"})}optionMissingArgument($){let I=`error: option '${$.flags}' argument missing`;this.error(I,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue($){let I=`error: required option '${$.flags}' not specified`;this.error(I,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption($,I){let U=(g)=>{let z=g.attributeName(),v=this.getOptionValue(z),J=this.options.find((X)=>X.negate&&z===X.attributeName()),N=this.options.find((X)=>!X.negate&&z===X.attributeName());if(J&&(J.presetArg===void 0&&v===!1||J.presetArg!==void 0&&v===J.presetArg))return J;return N||g},_=(g)=>{let z=U(g),v=z.attributeName();if(this.getOptionValueSource(v)==="env")return`environment variable '${z.envVar}'`;return`option '${z.flags}'`},u=`error: ${_($)} cannot be used with ${_(I)}`;this.error(u,{code:"commander.conflictingOption"})}unknownOption($){if(this._allowUnknownOption)return;let I="";if($.startsWith("--")&&this._showSuggestionAfterError){let _=[],u=this;do{let g=u.createHelp().visibleOptions(u).filter((z)=>z.long).map((z)=>z.long);_=_.concat(g),u=u.parent}while(u&&!u._enablePositionalOptions);I=uX($,_)}let U=`error: unknown option '${$}'${I}`;this.error(U,{code:"commander.unknownOption"})}_excessArguments($){if(this._allowExcessArguments)return;let I=this.registeredArguments.length,U=I===1?"":"s",u=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${I} argument${U} but got ${$.length}.`;this.error(u,{code:"commander.excessArguments"})}unknownCommand(){let $=this.args[0],I="";if(this._showSuggestionAfterError){let _=[];this.createHelp().visibleCommands(this).forEach((u)=>{if(_.push(u.name()),u.alias())_.push(u.alias())}),I=uX($,_)}let U=`error: unknown command '${$}'${I}`;this.error(U,{code:"commander.unknownCommand"})}version($,I,U){if($===void 0)return this._version;this._version=$,I=I||"-V, --version",U=U||"output the version number";let _=this.createOption(I,U);return this._versionOptionName=_.attributeName(),this._registerOption(_),this.on("option:"+_.name(),()=>{this._outputConfiguration.writeOut(`${$}
25
- `),this._exit(0,"commander.version",$)}),this}description($,I){if($===void 0&&I===void 0)return this._description;if(this._description=$,I)this._argsDescription=I;return this}summary($){if($===void 0)return this._summary;return this._summary=$,this}alias($){if($===void 0)return this._aliases[0];let I=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)I=this.commands[this.commands.length-1];if($===I._name)throw Error("Command alias can't be the same as its name");let U=this.parent?._findCommand($);if(U){let _=[U.name()].concat(U.aliases()).join("|");throw Error(`cannot add alias '${$}' to command '${this.name()}' as already have command '${_}'`)}return I._aliases.push($),this}aliases($){if($===void 0)return this._aliases;return $.forEach((I)=>this.alias(I)),this}usage($){if($===void 0){if(this._usage)return this._usage;let I=this.registeredArguments.map((U)=>{return TD(U)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?I:[]).join(" ")}return this._usage=$,this}name($){if($===void 0)return this._name;return this._name=$,this}helpGroup($){if($===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=$,this}commandsGroup($){if($===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=$,this}optionsGroup($){if($===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=$,this}_initOptionGroup($){if(this._defaultOptionGroup&&!$.helpGroupHeading)$.helpGroup(this._defaultOptionGroup)}_initCommandGroup($){if(this._defaultCommandGroup&&!$.helpGroup())$.helpGroup(this._defaultCommandGroup)}nameFromFilename($){return this._name=l4.basename($,l4.extname($)),this}executableDir($){if($===void 0)return this._executableDir;return this._executableDir=$,this}helpInformation($){let I=this.createHelp(),U=this._getOutputContext($);I.prepareContext({error:U.error,helpWidth:U.helpWidth,outputHasColors:U.hasColors});let _=I.formatHelp(this,I);if(U.hasColors)return _;return this._outputConfiguration.stripColor(_)}_getOutputContext($){$=$||{};let I=!!$.error,U,_,u;if(I)U=(z)=>this._outputConfiguration.writeErr(z),_=this._outputConfiguration.getErrHasColors(),u=this._outputConfiguration.getErrHelpWidth();else U=(z)=>this._outputConfiguration.writeOut(z),_=this._outputConfiguration.getOutHasColors(),u=this._outputConfiguration.getOutHelpWidth();return{error:I,write:(z)=>{if(!_)z=this._outputConfiguration.stripColor(z);return U(z)},hasColors:_,helpWidth:u}}outputHelp($){let I;if(typeof $==="function")I=$,$=void 0;let U=this._getOutputContext($),_={error:U.error,write:U.write,command:this};this._getCommandAndAncestors().reverse().forEach((g)=>g.emit("beforeAllHelp",_)),this.emit("beforeHelp",_);let u=this.helpInformation({error:U.error});if(I){if(u=I(u),typeof u!=="string"&&!Buffer.isBuffer(u))throw Error("outputHelp callback must return a string or a Buffer")}if(U.write(u),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",_),this._getCommandAndAncestors().forEach((g)=>g.emit("afterAllHelp",_))}helpOption($,I){if(typeof $==="boolean"){if($){if(this._helpOption===null)this._helpOption=void 0;if(this._defaultOptionGroup)this._initOptionGroup(this._getHelpOption())}else this._helpOption=null;return this}if(this._helpOption=this.createOption($??"-h, --help",I??"display help for command"),$||I)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption($){return this._helpOption=$,this._initOptionGroup($),this}help($){this.outputHelp($);let I=Number(U$.exitCode??0);if(I===0&&$&&typeof $!=="function"&&$.error)I=1;this._exit(I,"commander.help","(outputHelp)")}addHelpText($,I){let U=["beforeAll","before","after","afterAll"];if(!U.includes($))throw Error(`Unexpected value for position to addHelpText.
24
+ `),this.outputHelp({error:!0});let U=I||{},_=U.exitCode||1,u=U.code||"commander.error";this._exit(_,u,$)}_parseOptionsEnv(){this.options.forEach(($)=>{if($.envVar&&$.envVar in U$.env){let I=$.attributeName();if(this.getOptionValue(I)===void 0||["default","config","env"].includes(this.getOptionValueSource(I)))if($.required||$.optional)this.emit(`optionEnv:${$.name()}`,U$.env[$.envVar]);else this.emit(`optionEnv:${$.name()}`)}})}_parseOptionsImplied(){let $=new VV(this.options),I=(U)=>{return this.getOptionValue(U)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(U))};this.options.filter((U)=>U.implied!==void 0&&I(U.attributeName())&&$.valueFromOption(this.getOptionValue(U.attributeName()),U)).forEach((U)=>{Object.keys(U.implied).filter((_)=>!I(_)).forEach((_)=>{this.setOptionValueWithSource(_,U.implied[_],"implied")})})}missingArgument($){let I=`error: missing required argument '${$}'`;this.error(I,{code:"commander.missingArgument"})}optionMissingArgument($){let I=`error: option '${$.flags}' argument missing`;this.error(I,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue($){let I=`error: required option '${$.flags}' not specified`;this.error(I,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption($,I){let U=(g)=>{let z=g.attributeName(),v=this.getOptionValue(z),J=this.options.find((X)=>X.negate&&z===X.attributeName()),N=this.options.find((X)=>!X.negate&&z===X.attributeName());if(J&&(J.presetArg===void 0&&v===!1||J.presetArg!==void 0&&v===J.presetArg))return J;return N||g},_=(g)=>{let z=U(g),v=z.attributeName();if(this.getOptionValueSource(v)==="env")return`environment variable '${z.envVar}'`;return`option '${z.flags}'`},u=`error: ${_($)} cannot be used with ${_(I)}`;this.error(u,{code:"commander.conflictingOption"})}unknownOption($){if(this._allowUnknownOption)return;let I="";if($.startsWith("--")&&this._showSuggestionAfterError){let _=[],u=this;do{let g=u.createHelp().visibleOptions(u).filter((z)=>z.long).map((z)=>z.long);_=_.concat(g),u=u.parent}while(u&&!u._enablePositionalOptions);I=_X($,_)}let U=`error: unknown option '${$}'${I}`;this.error(U,{code:"commander.unknownOption"})}_excessArguments($){if(this._allowExcessArguments)return;let I=this.registeredArguments.length,U=I===1?"":"s",u=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${I} argument${U} but got ${$.length}.`;this.error(u,{code:"commander.excessArguments"})}unknownCommand(){let $=this.args[0],I="";if(this._showSuggestionAfterError){let _=[];this.createHelp().visibleCommands(this).forEach((u)=>{if(_.push(u.name()),u.alias())_.push(u.alias())}),I=_X($,_)}let U=`error: unknown command '${$}'${I}`;this.error(U,{code:"commander.unknownCommand"})}version($,I,U){if($===void 0)return this._version;this._version=$,I=I||"-V, --version",U=U||"output the version number";let _=this.createOption(I,U);return this._versionOptionName=_.attributeName(),this._registerOption(_),this.on("option:"+_.name(),()=>{this._outputConfiguration.writeOut(`${$}
25
+ `),this._exit(0,"commander.version",$)}),this}description($,I){if($===void 0&&I===void 0)return this._description;if(this._description=$,I)this._argsDescription=I;return this}summary($){if($===void 0)return this._summary;return this._summary=$,this}alias($){if($===void 0)return this._aliases[0];let I=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)I=this.commands[this.commands.length-1];if($===I._name)throw Error("Command alias can't be the same as its name");let U=this.parent?._findCommand($);if(U){let _=[U.name()].concat(U.aliases()).join("|");throw Error(`cannot add alias '${$}' to command '${this.name()}' as already have command '${_}'`)}return I._aliases.push($),this}aliases($){if($===void 0)return this._aliases;return $.forEach((I)=>this.alias(I)),this}usage($){if($===void 0){if(this._usage)return this._usage;let I=this.registeredArguments.map((U)=>{return HV(U)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?I:[]).join(" ")}return this._usage=$,this}name($){if($===void 0)return this._name;return this._name=$,this}helpGroup($){if($===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=$,this}commandsGroup($){if($===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=$,this}optionsGroup($){if($===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=$,this}_initOptionGroup($){if(this._defaultOptionGroup&&!$.helpGroupHeading)$.helpGroup(this._defaultOptionGroup)}_initCommandGroup($){if(this._defaultCommandGroup&&!$.helpGroup())$.helpGroup(this._defaultCommandGroup)}nameFromFilename($){return this._name=h4.basename($,h4.extname($)),this}executableDir($){if($===void 0)return this._executableDir;return this._executableDir=$,this}helpInformation($){let I=this.createHelp(),U=this._getOutputContext($);I.prepareContext({error:U.error,helpWidth:U.helpWidth,outputHasColors:U.hasColors});let _=I.formatHelp(this,I);if(U.hasColors)return _;return this._outputConfiguration.stripColor(_)}_getOutputContext($){$=$||{};let I=!!$.error,U,_,u;if(I)U=(z)=>this._outputConfiguration.writeErr(z),_=this._outputConfiguration.getErrHasColors(),u=this._outputConfiguration.getErrHelpWidth();else U=(z)=>this._outputConfiguration.writeOut(z),_=this._outputConfiguration.getOutHasColors(),u=this._outputConfiguration.getOutHelpWidth();return{error:I,write:(z)=>{if(!_)z=this._outputConfiguration.stripColor(z);return U(z)},hasColors:_,helpWidth:u}}outputHelp($){let I;if(typeof $==="function")I=$,$=void 0;let U=this._getOutputContext($),_={error:U.error,write:U.write,command:this};this._getCommandAndAncestors().reverse().forEach((g)=>g.emit("beforeAllHelp",_)),this.emit("beforeHelp",_);let u=this.helpInformation({error:U.error});if(I){if(u=I(u),typeof u!=="string"&&!Buffer.isBuffer(u))throw Error("outputHelp callback must return a string or a Buffer")}if(U.write(u),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",_),this._getCommandAndAncestors().forEach((g)=>g.emit("afterAllHelp",_))}helpOption($,I){if(typeof $==="boolean"){if($){if(this._helpOption===null)this._helpOption=void 0;if(this._defaultOptionGroup)this._initOptionGroup(this._getHelpOption())}else this._helpOption=null;return this}if(this._helpOption=this.createOption($??"-h, --help",I??"display help for command"),$||I)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption($){return this._helpOption=$,this._initOptionGroup($),this}help($){this.outputHelp($);let I=Number(U$.exitCode??0);if(I===0&&$&&typeof $!=="function"&&$.error)I=1;this._exit(I,"commander.help","(outputHelp)")}addHelpText($,I){let U=["beforeAll","before","after","afterAll"];if(!U.includes($))throw Error(`Unexpected value for position to addHelpText.
26
26
  Expecting one of '${U.join("', '")}'`);let _=`${$}Help`;return this.on(_,(u)=>{let g;if(typeof I==="function")g=I({error:u.error,command:u.command});else g=I;if(g)u.write(`${g}
27
- `)}),this}_outputHelpIfRequested($){let I=this._getHelpOption();if(I&&$.find((_)=>I.is(_)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function UX($){return $.map((I)=>{if(!I.startsWith("--inspect"))return I;let U,_="127.0.0.1",u="9229",g;if((g=I.match(/^(--inspect(-brk)?)$/))!==null)U=g[1];else if((g=I.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(U=g[1],/^\d+$/.test(g[3]))u=g[3];else _=g[3];else if((g=I.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)U=g[1],_=g[3],u=g[4];if(U&&u!=="0")return`${U}=${_}:${parseInt(u)+1}`;return I})}function n2(){if(U$.env.NO_COLOR||U$.env.FORCE_COLOR==="0"||U$.env.FORCE_COLOR==="false")return!1;if(U$.env.FORCE_COLOR||U$.env.CLICOLOR_FORCE!==void 0)return!0;return}DD.Command=r2;DD.useColor=n2});var JX=E((KD)=>{var{Argument:gX}=Iu(),{Command:l2}=_X(),{CommanderError:MD,InvalidArgumentError:zX}=KI(),{Help:RD}=x2(),{Option:vX}=k2();KD.program=new l2;KD.createCommand=($)=>new l2($);KD.createOption=($,I)=>new vX($,I);KD.createArgument=($,I)=>new gX($,I);KD.Command=l2;KD.Option=vX;KD.Argument=gX;KD.Help=RD;KD.CommanderError=MD;KD.InvalidArgumentError=zX;KD.InvalidOptionArgumentError=zX});var b$=E((qx,h2)=>{var _u=process||{},GX=_u.argv||[],Uu=_u.env||{},CD=!(!!Uu.NO_COLOR||GX.includes("--no-color"))&&(!!Uu.FORCE_COLOR||GX.includes("--color")||_u.platform==="win32"||(_u.stdout||{}).isTTY&&Uu.TERM!=="dumb"||!!Uu.CI),fD=($,I,U=$)=>(_)=>{let u=""+_,g=u.indexOf(I,$.length);return~g?$+xD(u,I,U,g)+I:$+u+I},xD=($,I,U,_)=>{let u="",g=0;do u+=$.substring(g,_)+U,g=_+I.length,_=$.indexOf(I,g);while(~_);return u+$.substring(g)},XX=($=CD)=>{let I=$?fD:()=>String;return{isColorSupported:$,reset:I("\x1B[0m","\x1B[0m"),bold:I("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:I("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:I("\x1B[3m","\x1B[23m"),underline:I("\x1B[4m","\x1B[24m"),inverse:I("\x1B[7m","\x1B[27m"),hidden:I("\x1B[8m","\x1B[28m"),strikethrough:I("\x1B[9m","\x1B[29m"),black:I("\x1B[30m","\x1B[39m"),red:I("\x1B[31m","\x1B[39m"),green:I("\x1B[32m","\x1B[39m"),yellow:I("\x1B[33m","\x1B[39m"),blue:I("\x1B[34m","\x1B[39m"),magenta:I("\x1B[35m","\x1B[39m"),cyan:I("\x1B[36m","\x1B[39m"),white:I("\x1B[37m","\x1B[39m"),gray:I("\x1B[90m","\x1B[39m"),bgBlack:I("\x1B[40m","\x1B[49m"),bgRed:I("\x1B[41m","\x1B[49m"),bgGreen:I("\x1B[42m","\x1B[49m"),bgYellow:I("\x1B[43m","\x1B[49m"),bgBlue:I("\x1B[44m","\x1B[49m"),bgMagenta:I("\x1B[45m","\x1B[49m"),bgCyan:I("\x1B[46m","\x1B[49m"),bgWhite:I("\x1B[47m","\x1B[49m"),blackBright:I("\x1B[90m","\x1B[39m"),redBright:I("\x1B[91m","\x1B[39m"),greenBright:I("\x1B[92m","\x1B[39m"),yellowBright:I("\x1B[93m","\x1B[39m"),blueBright:I("\x1B[94m","\x1B[39m"),magentaBright:I("\x1B[95m","\x1B[39m"),cyanBright:I("\x1B[96m","\x1B[39m"),whiteBright:I("\x1B[97m","\x1B[39m"),bgBlackBright:I("\x1B[100m","\x1B[49m"),bgRedBright:I("\x1B[101m","\x1B[49m"),bgGreenBright:I("\x1B[102m","\x1B[49m"),bgYellowBright:I("\x1B[103m","\x1B[49m"),bgBlueBright:I("\x1B[104m","\x1B[49m"),bgMagentaBright:I("\x1B[105m","\x1B[49m"),bgCyanBright:I("\x1B[106m","\x1B[49m"),bgWhiteBright:I("\x1B[107m","\x1B[49m")}};h2.exports=XX();h2.exports.createColors=XX});var $$=E((hD)=>{var c2=Symbol.for("yaml.alias"),qX=Symbol.for("yaml.document"),gu=Symbol.for("yaml.map"),QX=Symbol.for("yaml.pair"),d2=Symbol.for("yaml.scalar"),zu=Symbol.for("yaml.seq"),m4=Symbol.for("yaml.node.type"),kD=($)=>!!$&&typeof $==="object"&&$[m4]===c2,yD=($)=>!!$&&typeof $==="object"&&$[m4]===qX,iD=($)=>!!$&&typeof $==="object"&&$[m4]===gu,nD=($)=>!!$&&typeof $==="object"&&$[m4]===QX,TX=($)=>!!$&&typeof $==="object"&&$[m4]===d2,rD=($)=>!!$&&typeof $==="object"&&$[m4]===zu;function HX($){if($&&typeof $==="object")switch($[m4]){case gu:case zu:return!0}return!1}function lD($){if($&&typeof $==="object")switch($[m4]){case c2:case gu:case d2:case zu:return!0}return!1}var mD=($)=>(TX($)||HX($))&&!!$.anchor;hD.ALIAS=c2;hD.DOC=qX;hD.MAP=gu;hD.NODE_TYPE=m4;hD.PAIR=QX;hD.SCALAR=d2;hD.SEQ=zu;hD.hasAnchor=mD;hD.isAlias=kD;hD.isCollection=HX;hD.isDocument=yD;hD.isMap=iD;hD.isNode=lD;hD.isPair=nD;hD.isScalar=TX;hD.isSeq=rD});var LI=E((JV)=>{var Z$=$$(),p$=Symbol("break visit"),YX=Symbol("skip children"),j4=Symbol("remove node");function vu($,I){let U=OX(I);if(Z$.isDocument($)){if(B1(null,$.contents,U,Object.freeze([$]))===j4)$.contents=null}else B1(null,$,U,Object.freeze([]))}vu.BREAK=p$;vu.SKIP=YX;vu.REMOVE=j4;function B1($,I,U,_){let u=DX($,I,U,_);if(Z$.isNode(u)||Z$.isPair(u))return VX($,_,u),B1($,u,U,_);if(typeof u!=="symbol"){if(Z$.isCollection(I)){_=Object.freeze(_.concat(I));for(let g=0;g<I.items.length;++g){let z=B1(g,I.items[g],U,_);if(typeof z==="number")g=z-1;else if(z===p$)return p$;else if(z===j4)I.items.splice(g,1),g-=1}}else if(Z$.isPair(I)){_=Object.freeze(_.concat(I));let g=B1("key",I.key,U,_);if(g===p$)return p$;else if(g===j4)I.key=null;let z=B1("value",I.value,U,_);if(z===p$)return p$;else if(z===j4)I.value=null}}return u}async function Ju($,I){let U=OX(I);if(Z$.isDocument($)){if(await M1(null,$.contents,U,Object.freeze([$]))===j4)$.contents=null}else await M1(null,$,U,Object.freeze([]))}Ju.BREAK=p$;Ju.SKIP=YX;Ju.REMOVE=j4;async function M1($,I,U,_){let u=await DX($,I,U,_);if(Z$.isNode(u)||Z$.isPair(u))return VX($,_,u),M1($,u,U,_);if(typeof u!=="symbol"){if(Z$.isCollection(I)){_=Object.freeze(_.concat(I));for(let g=0;g<I.items.length;++g){let z=await M1(g,I.items[g],U,_);if(typeof z==="number")g=z-1;else if(z===p$)return p$;else if(z===j4)I.items.splice(g,1),g-=1}}else if(Z$.isPair(I)){_=Object.freeze(_.concat(I));let g=await M1("key",I.key,U,_);if(g===p$)return p$;else if(g===j4)I.key=null;let z=await M1("value",I.value,U,_);if(z===p$)return p$;else if(z===j4)I.value=null}}return u}function OX($){if(typeof $==="object"&&($.Collection||$.Node||$.Value))return Object.assign({Alias:$.Node,Map:$.Node,Scalar:$.Node,Seq:$.Node},$.Value&&{Map:$.Value,Scalar:$.Value,Seq:$.Value},$.Collection&&{Map:$.Collection,Seq:$.Collection},$);return $}function DX($,I,U,_){if(typeof U==="function")return U($,I,_);if(Z$.isMap(I))return U.Map?.($,I,_);if(Z$.isSeq(I))return U.Seq?.($,I,_);if(Z$.isPair(I))return U.Pair?.($,I,_);if(Z$.isScalar(I))return U.Scalar?.($,I,_);if(Z$.isAlias(I))return U.Alias?.($,I,_);return}function VX($,I,U){let _=I[I.length-1];if(Z$.isCollection(_))_.items[$]=U;else if(Z$.isPair(_))if($==="key")_.key=U;else _.value=U;else if(Z$.isDocument(_))_.contents=U;else{let u=Z$.isAlias(_)?"alias":"scalar";throw Error(`Cannot replace node with ${u} parent`)}}JV.visit=vu;JV.visitAsync=Ju});var p2=E((TV)=>{var BX=$$(),XV=LI(),qV={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},QV=($)=>$.replace(/[!,[\]{}]/g,(I)=>qV[I]);class G4{constructor($,I){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},G4.defaultYaml,$),this.tags=Object.assign({},G4.defaultTags,I)}clone(){let $=new G4(this.yaml,this.tags);return $.docStart=this.docStart,$}atDocument(){let $=new G4(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:G4.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},G4.defaultTags);break}return $}add($,I){if(this.atNextDocument)this.yaml={explicit:G4.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},G4.defaultTags),this.atNextDocument=!1;let U=$.trim().split(/[ \t]+/),_=U.shift();switch(_){case"%TAG":{if(U.length!==2){if(I(0,"%TAG directive should contain exactly two parts"),U.length<2)return!1}let[u,g]=U;return this.tags[u]=g,!0}case"%YAML":{if(this.yaml.explicit=!0,U.length!==1)return I(0,"%YAML directive should contain exactly one part"),!1;let[u]=U;if(u==="1.1"||u==="1.2")return this.yaml.version=u,!0;else{let g=/^\d+\.\d+$/.test(u);return I(6,`Unsupported YAML version ${u}`,g),!1}}default:return I(0,`Unknown directive ${_}`,!0),!1}}tagName($,I){if($==="!")return"!";if($[0]!=="!")return I(`Not a valid tag: ${$}`),null;if($[1]==="<"){let g=$.slice(2,-1);if(g==="!"||g==="!!")return I(`Verbatim tags aren't resolved, so ${$} is invalid.`),null;if($[$.length-1]!==">")I("Verbatim tags must end with a >");return g}let[,U,_]=$.match(/^(.*!)([^!]*)$/s);if(!_)I(`The ${$} tag has no suffix`);let u=this.tags[U];if(u)try{return u+decodeURIComponent(_)}catch(g){return I(String(g)),null}if(U==="!")return $;return I(`Could not resolve tag: ${$}`),null}tagString($){for(let[I,U]of Object.entries(this.tags))if($.startsWith(U))return I+QV($.substring(U.length));return $[0]==="!"?$:`!<${$}>`}toString($){let I=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],U=Object.entries(this.tags),_;if($&&U.length>0&&BX.isNode($.contents)){let u={};XV.visit($.contents,(g,z)=>{if(BX.isNode(z)&&z.tag)u[z.tag]=!0}),_=Object.keys(u)}else _=[];for(let[u,g]of U){if(u==="!!"&&g==="tag:yaml.org,2002:")continue;if(!$||_.some((z)=>z.startsWith(g)))I.push(`%TAG ${u} ${g}`)}return I.join(`
28
- `)}}G4.defaultYaml={explicit:!1,version:"1.2"};G4.defaultTags={"!!":"tag:yaml.org,2002:"};TV.Directives=G4});var Nu=E((VV)=>{var MX=$$(),YV=LI();function OV($){if(/[\x00-\x19\s,[\]{}]/.test($)){let U=`Anchor must not contain whitespace or control characters: ${JSON.stringify($)}`;throw Error(U)}return!0}function RX($){let I=new Set;return YV.visit($,{Value(U,_){if(_.anchor)I.add(_.anchor)}}),I}function KX($,I){for(let U=1;;++U){let _=`${$}${U}`;if(!I.has(_))return _}}function DV($,I){let U=[],_=new Map,u=null;return{onAnchor:(g)=>{U.push(g),u??(u=RX($));let z=KX(I,u);return u.add(z),z},setAnchors:()=>{for(let g of U){let z=_.get(g);if(typeof z==="object"&&z.anchor&&(MX.isScalar(z.node)||MX.isCollection(z.node)))z.node.anchor=z.anchor;else{let v=Error("Failed to resolve repeated object (this should not happen)");throw v.source=g,v}}},sourceObjects:_}}VV.anchorIsValid=OV;VV.anchorNames=RX;VV.createNodeAnchors=DV;VV.findNewAnchor=KX});var o2=E((LV)=>{function PI($,I,U,_){if(_&&typeof _==="object")if(Array.isArray(_))for(let u=0,g=_.length;u<g;++u){let z=_[u],v=PI($,_,String(u),z);if(v===void 0)delete _[u];else if(v!==z)_[u]=v}else if(_ instanceof Map)for(let u of Array.from(_.keys())){let g=_.get(u),z=PI($,_,u,g);if(z===void 0)_.delete(u);else if(z!==g)_.set(u,z)}else if(_ instanceof Set)for(let u of Array.from(_)){let g=PI($,_,u,u);if(g===void 0)_.delete(u);else if(g!==u)_.delete(u),_.add(g)}else for(let[u,g]of Object.entries(_)){let z=PI($,_,u,g);if(z===void 0)delete _[u];else if(z!==g)_[u]=z}return $.call(I,U,_)}LV.applyReviver=PI});var v6=E((ZV)=>{var WV=$$();function LX($,I,U){if(Array.isArray($))return $.map((_,u)=>LX(_,String(u),U));if($&&typeof $.toJSON==="function"){if(!U||!WV.hasAnchor($))return $.toJSON(I,U);let _={aliasCount:0,count:1,res:void 0};U.anchors.set($,_),U.onCreate=(g)=>{_.res=g,delete U.onCreate};let u=$.toJSON(I,U);if(U.onCreate)U.onCreate(u);return u}if(typeof $==="bigint"&&!U?.keep)return Number($);return $}ZV.toJS=LX});var Gu=E((FV)=>{var bV=o2(),PX=$$(),jV=v6();class WX{constructor($){Object.defineProperty(this,PX.NODE_TYPE,{value:$})}clone(){let $=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)$.range=this.range.slice();return $}toJS($,{mapAsMap:I,maxAliasCount:U,onAnchor:_,reviver:u}={}){if(!PX.isDocument($))throw TypeError("A document argument is required");let g={anchors:new Map,doc:$,keep:!0,mapAsMap:I===!0,mapKeyWarned:!1,maxAliasCount:typeof U==="number"?U:100},z=jV.toJS(this,"",g);if(typeof _==="function")for(let{count:v,res:J}of g.anchors.values())_(J,v);return typeof u==="function"?bV.applyReviver(u,{"":z},"",z):z}}FV.NodeBase=WX});var WI=E((xV)=>{var wV=Nu(),EV=LI(),R1=$$(),CV=Gu(),fV=v6();class ZX extends CV.NodeBase{constructor($){super(R1.ALIAS);this.source=$,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve($,I){let U;if(I?.aliasResolveCache)U=I.aliasResolveCache;else if(U=[],EV.visit($,{Node:(u,g)=>{if(R1.isAlias(g)||R1.hasAnchor(g))U.push(g)}}),I)I.aliasResolveCache=U;let _=void 0;for(let u of U){if(u===this)break;if(u.anchor===this.source)_=u}return _}toJSON($,I){if(!I)return{source:this.source};let{anchors:U,doc:_,maxAliasCount:u}=I,g=this.resolve(_,I);if(!g){let v=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(v)}let z=U.get(g);if(!z)fV.toJS(g,null,I),z=U.get(g);if(z?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(u>=0){if(z.count+=1,z.aliasCount===0)z.aliasCount=Xu(_,g,U);if(z.count*z.aliasCount>u)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return z.res}toString($,I,U){let _=`*${this.source}`;if($){if(wV.anchorIsValid(this.source),$.options.verifyAliasOrder&&!$.anchors.has(this.source)){let u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(u)}if($.implicitKey)return`${_} `}return _}}function Xu($,I,U){if(R1.isAlias(I)){let _=I.resolve($),u=U&&_&&U.get(_);return u?u.count*u.aliasCount:0}else if(R1.isCollection(I)){let _=0;for(let u of I.items){let g=Xu($,u,U);if(g>_)_=g}return _}else if(R1.isPair(I)){let _=Xu($,I.key,U),u=Xu($,I.value,U);return Math.max(_,u)}return 1}xV.Alias=ZX});var P$=E((lV)=>{var yV=$$(),iV=Gu(),nV=v6(),rV=($)=>!$||typeof $!=="function"&&typeof $!=="object";class x6 extends iV.NodeBase{constructor($){super(yV.SCALAR);this.value=$}toJSON($,I){return I?.keep?this.value:nV.toJS(this.value,$,I)}toString(){return String(this.value)}}x6.BLOCK_FOLDED="BLOCK_FOLDED";x6.BLOCK_LITERAL="BLOCK_LITERAL";x6.PLAIN="PLAIN";x6.QUOTE_DOUBLE="QUOTE_DOUBLE";x6.QUOTE_SINGLE="QUOTE_SINGLE";lV.Scalar=x6;lV.isScalarValue=rV});var ZI=E((tV)=>{var cV=WI(),k6=$$(),AX=P$(),dV="tag:yaml.org,2002:";function pV($,I,U){if(I){let _=U.filter((g)=>g.tag===I),u=_.find((g)=>!g.format)??_[0];if(!u)throw Error(`Tag ${I} not found`);return u}return U.find((_)=>_.identify?.($)&&!_.format)}function oV($,I,U){if(k6.isDocument($))$=$.contents;if(k6.isNode($))return $;if(k6.isPair($)){let G=U.schema[k6.MAP].createNode?.(U.schema,null,U);return G.items.push($),G}if($ instanceof String||$ instanceof Number||$ instanceof Boolean||typeof BigInt<"u"&&$ instanceof BigInt)$=$.valueOf();let{aliasDuplicateObjects:_,onAnchor:u,onTagObj:g,schema:z,sourceObjects:v}=U,J=void 0;if(_&&$&&typeof $==="object")if(J=v.get($),J)return J.anchor??(J.anchor=u($)),new cV.Alias(J.anchor);else J={anchor:null,node:null},v.set($,J);if(I?.startsWith("!!"))I=dV+I.slice(2);let N=pV($,I,z.tags);if(!N){if($&&typeof $.toJSON==="function")$=$.toJSON();if(!$||typeof $!=="object"){let G=new AX.Scalar($);if(J)J.node=G;return G}N=$ instanceof Map?z[k6.MAP]:(Symbol.iterator in Object($))?z[k6.SEQ]:z[k6.MAP]}if(g)g(N),delete U.onTagObj;let X=N?.createNode?N.createNode(U.schema,$,U):typeof N?.nodeClass?.from==="function"?N.nodeClass.from(U.schema,$,U):new AX.Scalar($);if(I)X.tag=I;else if(!N.default)X.tag=N.tag;if(J)J.node=X;return X}tV.createNode=oV});var qu=E(($B)=>{var eV=ZI(),F4=$$(),sV=Gu();function t2($,I,U){let _=U;for(let u=I.length-1;u>=0;--u){let g=I[u];if(typeof g==="number"&&Number.isInteger(g)&&g>=0){let z=[];z[g]=_,_=z}else _=new Map([[g,_]])}return eV.createNode(_,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:$,sourceObjects:new Map})}var bX=($)=>$==null||typeof $==="object"&&!!$[Symbol.iterator]().next().done;class jX extends sV.NodeBase{constructor($,I){super($);Object.defineProperty(this,"schema",{value:I,configurable:!0,enumerable:!1,writable:!0})}clone($){let I=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if($)I.schema=$;if(I.items=I.items.map((U)=>F4.isNode(U)||F4.isPair(U)?U.clone($):U),this.range)I.range=this.range.slice();return I}addIn($,I){if(bX($))this.add(I);else{let[U,..._]=$,u=this.get(U,!0);if(F4.isCollection(u))u.addIn(_,I);else if(u===void 0&&this.schema)this.set(U,t2(this.schema,_,I));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${_}`)}}deleteIn($){let[I,...U]=$;if(U.length===0)return this.delete(I);let _=this.get(I,!0);if(F4.isCollection(_))return _.deleteIn(U);else throw Error(`Expected YAML collection at ${I}. Remaining path: ${U}`)}getIn($,I){let[U,..._]=$,u=this.get(U,!0);if(_.length===0)return!I&&F4.isScalar(u)?u.value:u;else return F4.isCollection(u)?u.getIn(_,I):void 0}hasAllNullValues($){return this.items.every((I)=>{if(!F4.isPair(I))return!1;let U=I.value;return U==null||$&&F4.isScalar(U)&&U.value==null&&!U.commentBefore&&!U.comment&&!U.tag})}hasIn($){let[I,...U]=$;if(U.length===0)return this.has(I);let _=this.get(I,!0);return F4.isCollection(_)?_.hasIn(U):!1}setIn($,I){let[U,..._]=$;if(_.length===0)this.set(U,I);else{let u=this.get(U,!0);if(F4.isCollection(u))u.setIn(_,I);else if(u===void 0&&this.schema)this.set(U,t2(this.schema,_,I));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${_}`)}}}$B.Collection=jX;$B.collectionFromPath=t2;$B.isEmptyPath=bX});var AI=E((zB)=>{var _B=($)=>$.replace(/^(?!$)(?: $)?/gm,"#");function a2($,I){if(/^\n+$/.test($))return $.substring(1);return I?$.replace(/^(?! *$)/gm,I):$}var gB=($,I,U)=>$.endsWith(`
29
- `)?a2(U,I):U.includes(`
27
+ `)}),this}_outputHelpIfRequested($){let I=this._getHelpOption();if(I&&$.find((_)=>I.is(_)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function gX($){return $.map((I)=>{if(!I.startsWith("--inspect"))return I;let U,_="127.0.0.1",u="9229",g;if((g=I.match(/^(--inspect(-brk)?)$/))!==null)U=g[1];else if((g=I.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(U=g[1],/^\d+$/.test(g[3]))u=g[3];else _=g[3];else if((g=I.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)U=g[1],_=g[3],u=g[4];if(U&&u!=="0")return`${U}=${_}:${parseInt(u)+1}`;return I})}function l2(){if(U$.env.NO_COLOR||U$.env.FORCE_COLOR==="0"||U$.env.FORCE_COLOR==="false")return!1;if(U$.env.FORCE_COLOR||U$.env.CLICOLOR_FORCE!==void 0)return!0;return}DV.Command=m2;DV.useColor=l2});var GX=E((LV)=>{var{Argument:vX}=_u(),{Command:h2}=zX(),{CommanderError:KV,InvalidArgumentError:JX}=WI(),{Help:RV}=y2(),{Option:NX}=i2();LV.program=new h2;LV.createCommand=($)=>new h2($);LV.createOption=($,I)=>new NX($,I);LV.createArgument=($,I)=>new vX($,I);LV.Command=h2;LV.Option=NX;LV.Argument=vX;LV.Help=RV;LV.CommanderError=KV;LV.InvalidArgumentError=JX;LV.InvalidOptionArgumentError=JX});var b$=E((qx,d2)=>{var vu=process||{},qX=vu.argv||[],zu=vu.env||{},fV=!(!!zu.NO_COLOR||qX.includes("--no-color"))&&(!!zu.FORCE_COLOR||qX.includes("--color")||vu.platform==="win32"||(vu.stdout||{}).isTTY&&zu.TERM!=="dumb"||!!zu.CI),xV=($,I,U=$)=>(_)=>{let u=""+_,g=u.indexOf(I,$.length);return~g?$+kV(u,I,U,g)+I:$+u+I},kV=($,I,U,_)=>{let u="",g=0;do u+=$.substring(g,_)+U,g=_+I.length,_=$.indexOf(I,g);while(~_);return u+$.substring(g)},QX=($=fV)=>{let I=$?xV:()=>String;return{isColorSupported:$,reset:I("\x1B[0m","\x1B[0m"),bold:I("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:I("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:I("\x1B[3m","\x1B[23m"),underline:I("\x1B[4m","\x1B[24m"),inverse:I("\x1B[7m","\x1B[27m"),hidden:I("\x1B[8m","\x1B[28m"),strikethrough:I("\x1B[9m","\x1B[29m"),black:I("\x1B[30m","\x1B[39m"),red:I("\x1B[31m","\x1B[39m"),green:I("\x1B[32m","\x1B[39m"),yellow:I("\x1B[33m","\x1B[39m"),blue:I("\x1B[34m","\x1B[39m"),magenta:I("\x1B[35m","\x1B[39m"),cyan:I("\x1B[36m","\x1B[39m"),white:I("\x1B[37m","\x1B[39m"),gray:I("\x1B[90m","\x1B[39m"),bgBlack:I("\x1B[40m","\x1B[49m"),bgRed:I("\x1B[41m","\x1B[49m"),bgGreen:I("\x1B[42m","\x1B[49m"),bgYellow:I("\x1B[43m","\x1B[49m"),bgBlue:I("\x1B[44m","\x1B[49m"),bgMagenta:I("\x1B[45m","\x1B[49m"),bgCyan:I("\x1B[46m","\x1B[49m"),bgWhite:I("\x1B[47m","\x1B[49m"),blackBright:I("\x1B[90m","\x1B[39m"),redBright:I("\x1B[91m","\x1B[39m"),greenBright:I("\x1B[92m","\x1B[39m"),yellowBright:I("\x1B[93m","\x1B[39m"),blueBright:I("\x1B[94m","\x1B[39m"),magentaBright:I("\x1B[95m","\x1B[39m"),cyanBright:I("\x1B[96m","\x1B[39m"),whiteBright:I("\x1B[97m","\x1B[39m"),bgBlackBright:I("\x1B[100m","\x1B[49m"),bgRedBright:I("\x1B[101m","\x1B[49m"),bgGreenBright:I("\x1B[102m","\x1B[49m"),bgYellowBright:I("\x1B[103m","\x1B[49m"),bgBlueBright:I("\x1B[104m","\x1B[49m"),bgMagentaBright:I("\x1B[105m","\x1B[49m"),bgCyanBright:I("\x1B[106m","\x1B[49m"),bgWhiteBright:I("\x1B[107m","\x1B[49m")}};d2.exports=QX();d2.exports.createColors=QX});var $$=E((cV)=>{var p2=Symbol.for("yaml.alias"),TX=Symbol.for("yaml.document"),Ju=Symbol.for("yaml.map"),HX=Symbol.for("yaml.pair"),o2=Symbol.for("yaml.scalar"),Nu=Symbol.for("yaml.seq"),c4=Symbol.for("yaml.node.type"),yV=($)=>!!$&&typeof $==="object"&&$[c4]===p2,iV=($)=>!!$&&typeof $==="object"&&$[c4]===TX,rV=($)=>!!$&&typeof $==="object"&&$[c4]===Ju,nV=($)=>!!$&&typeof $==="object"&&$[c4]===HX,YX=($)=>!!$&&typeof $==="object"&&$[c4]===o2,lV=($)=>!!$&&typeof $==="object"&&$[c4]===Nu;function OX($){if($&&typeof $==="object")switch($[c4]){case Ju:case Nu:return!0}return!1}function mV($){if($&&typeof $==="object")switch($[c4]){case p2:case Ju:case o2:case Nu:return!0}return!1}var hV=($)=>(YX($)||OX($))&&!!$.anchor;cV.ALIAS=p2;cV.DOC=TX;cV.MAP=Ju;cV.NODE_TYPE=c4;cV.PAIR=HX;cV.SCALAR=o2;cV.SEQ=Nu;cV.hasAnchor=hV;cV.isAlias=yV;cV.isCollection=OX;cV.isDocument=iV;cV.isMap=rV;cV.isNode=mV;cV.isPair=nV;cV.isScalar=YX;cV.isSeq=lV});var PI=E((ND)=>{var Z$=$$(),t$=Symbol("break visit"),VX=Symbol("skip children"),S4=Symbol("remove node");function Gu($,I){let U=DX(I);if(Z$.isDocument($)){if(K1(null,$.contents,U,Object.freeze([$]))===S4)$.contents=null}else K1(null,$,U,Object.freeze([]))}Gu.BREAK=t$;Gu.SKIP=VX;Gu.REMOVE=S4;function K1($,I,U,_){let u=BX($,I,U,_);if(Z$.isNode(u)||Z$.isPair(u))return MX($,_,u),K1($,u,U,_);if(typeof u!=="symbol"){if(Z$.isCollection(I)){_=Object.freeze(_.concat(I));for(let g=0;g<I.items.length;++g){let z=K1(g,I.items[g],U,_);if(typeof z==="number")g=z-1;else if(z===t$)return t$;else if(z===S4)I.items.splice(g,1),g-=1}}else if(Z$.isPair(I)){_=Object.freeze(_.concat(I));let g=K1("key",I.key,U,_);if(g===t$)return t$;else if(g===S4)I.key=null;let z=K1("value",I.value,U,_);if(z===t$)return t$;else if(z===S4)I.value=null}}return u}async function Xu($,I){let U=DX(I);if(Z$.isDocument($)){if(await R1(null,$.contents,U,Object.freeze([$]))===S4)$.contents=null}else await R1(null,$,U,Object.freeze([]))}Xu.BREAK=t$;Xu.SKIP=VX;Xu.REMOVE=S4;async function R1($,I,U,_){let u=await BX($,I,U,_);if(Z$.isNode(u)||Z$.isPair(u))return MX($,_,u),R1($,u,U,_);if(typeof u!=="symbol"){if(Z$.isCollection(I)){_=Object.freeze(_.concat(I));for(let g=0;g<I.items.length;++g){let z=await R1(g,I.items[g],U,_);if(typeof z==="number")g=z-1;else if(z===t$)return t$;else if(z===S4)I.items.splice(g,1),g-=1}}else if(Z$.isPair(I)){_=Object.freeze(_.concat(I));let g=await R1("key",I.key,U,_);if(g===t$)return t$;else if(g===S4)I.key=null;let z=await R1("value",I.value,U,_);if(z===t$)return t$;else if(z===S4)I.value=null}}return u}function DX($){if(typeof $==="object"&&($.Collection||$.Node||$.Value))return Object.assign({Alias:$.Node,Map:$.Node,Scalar:$.Node,Seq:$.Node},$.Value&&{Map:$.Value,Scalar:$.Value,Seq:$.Value},$.Collection&&{Map:$.Collection,Seq:$.Collection},$);return $}function BX($,I,U,_){if(typeof U==="function")return U($,I,_);if(Z$.isMap(I))return U.Map?.($,I,_);if(Z$.isSeq(I))return U.Seq?.($,I,_);if(Z$.isPair(I))return U.Pair?.($,I,_);if(Z$.isScalar(I))return U.Scalar?.($,I,_);if(Z$.isAlias(I))return U.Alias?.($,I,_);return}function MX($,I,U){let _=I[I.length-1];if(Z$.isCollection(_))_.items[$]=U;else if(Z$.isPair(_))if($==="key")_.key=U;else _.value=U;else if(Z$.isDocument(_))_.contents=U;else{let u=Z$.isAlias(_)?"alias":"scalar";throw Error(`Cannot replace node with ${u} parent`)}}ND.visit=Gu;ND.visitAsync=Xu});var t2=E((HD)=>{var KX=$$(),qD=PI(),QD={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},TD=($)=>$.replace(/[!,[\]{}]/g,(I)=>QD[I]);class q4{constructor($,I){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},q4.defaultYaml,$),this.tags=Object.assign({},q4.defaultTags,I)}clone(){let $=new q4(this.yaml,this.tags);return $.docStart=this.docStart,$}atDocument(){let $=new q4(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:q4.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},q4.defaultTags);break}return $}add($,I){if(this.atNextDocument)this.yaml={explicit:q4.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},q4.defaultTags),this.atNextDocument=!1;let U=$.trim().split(/[ \t]+/),_=U.shift();switch(_){case"%TAG":{if(U.length!==2){if(I(0,"%TAG directive should contain exactly two parts"),U.length<2)return!1}let[u,g]=U;return this.tags[u]=g,!0}case"%YAML":{if(this.yaml.explicit=!0,U.length!==1)return I(0,"%YAML directive should contain exactly one part"),!1;let[u]=U;if(u==="1.1"||u==="1.2")return this.yaml.version=u,!0;else{let g=/^\d+\.\d+$/.test(u);return I(6,`Unsupported YAML version ${u}`,g),!1}}default:return I(0,`Unknown directive ${_}`,!0),!1}}tagName($,I){if($==="!")return"!";if($[0]!=="!")return I(`Not a valid tag: ${$}`),null;if($[1]==="<"){let g=$.slice(2,-1);if(g==="!"||g==="!!")return I(`Verbatim tags aren't resolved, so ${$} is invalid.`),null;if($[$.length-1]!==">")I("Verbatim tags must end with a >");return g}let[,U,_]=$.match(/^(.*!)([^!]*)$/s);if(!_)I(`The ${$} tag has no suffix`);let u=this.tags[U];if(u)try{return u+decodeURIComponent(_)}catch(g){return I(String(g)),null}if(U==="!")return $;return I(`Could not resolve tag: ${$}`),null}tagString($){for(let[I,U]of Object.entries(this.tags))if($.startsWith(U))return I+TD($.substring(U.length));return $[0]==="!"?$:`!<${$}>`}toString($){let I=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],U=Object.entries(this.tags),_;if($&&U.length>0&&KX.isNode($.contents)){let u={};qD.visit($.contents,(g,z)=>{if(KX.isNode(z)&&z.tag)u[z.tag]=!0}),_=Object.keys(u)}else _=[];for(let[u,g]of U){if(u==="!!"&&g==="tag:yaml.org,2002:")continue;if(!$||_.some((z)=>z.startsWith(g)))I.push(`%TAG ${u} ${g}`)}return I.join(`
28
+ `)}}q4.defaultYaml={explicit:!1,version:"1.2"};q4.defaultTags={"!!":"tag:yaml.org,2002:"};HD.Directives=q4});var qu=E((BD)=>{var RX=$$(),OD=PI();function VD($){if(/[\x00-\x19\s,[\]{}]/.test($)){let U=`Anchor must not contain whitespace or control characters: ${JSON.stringify($)}`;throw Error(U)}return!0}function LX($){let I=new Set;return OD.visit($,{Value(U,_){if(_.anchor)I.add(_.anchor)}}),I}function WX($,I){for(let U=1;;++U){let _=`${$}${U}`;if(!I.has(_))return _}}function DD($,I){let U=[],_=new Map,u=null;return{onAnchor:(g)=>{U.push(g),u??(u=LX($));let z=WX(I,u);return u.add(z),z},setAnchors:()=>{for(let g of U){let z=_.get(g);if(typeof z==="object"&&z.anchor&&(RX.isScalar(z.node)||RX.isCollection(z.node)))z.node.anchor=z.anchor;else{let v=Error("Failed to resolve repeated object (this should not happen)");throw v.source=g,v}}},sourceObjects:_}}BD.anchorIsValid=VD;BD.anchorNames=LX;BD.createNodeAnchors=DD;BD.findNewAnchor=WX});var a2=E((WD)=>{function ZI($,I,U,_){if(_&&typeof _==="object")if(Array.isArray(_))for(let u=0,g=_.length;u<g;++u){let z=_[u],v=ZI($,_,String(u),z);if(v===void 0)delete _[u];else if(v!==z)_[u]=v}else if(_ instanceof Map)for(let u of Array.from(_.keys())){let g=_.get(u),z=ZI($,_,u,g);if(z===void 0)_.delete(u);else if(z!==g)_.set(u,z)}else if(_ instanceof Set)for(let u of Array.from(_)){let g=ZI($,_,u,u);if(g===void 0)_.delete(u);else if(g!==u)_.delete(u),_.add(g)}else for(let[u,g]of Object.entries(_)){let z=ZI($,_,u,g);if(z===void 0)delete _[u];else if(z!==g)_[u]=z}return $.call(I,U,_)}WD.applyReviver=ZI});var N6=E((AD)=>{var ZD=$$();function PX($,I,U){if(Array.isArray($))return $.map((_,u)=>PX(_,String(u),U));if($&&typeof $.toJSON==="function"){if(!U||!ZD.hasAnchor($))return $.toJSON(I,U);let _={aliasCount:0,count:1,res:void 0};U.anchors.set($,_),U.onCreate=(g)=>{_.res=g,delete U.onCreate};let u=$.toJSON(I,U);if(U.onCreate)U.onCreate(u);return u}if(typeof $==="bigint"&&!U?.keep)return Number($);return $}AD.toJS=PX});var Qu=E((SD)=>{var jD=a2(),ZX=$$(),FD=N6();class AX{constructor($){Object.defineProperty(this,ZX.NODE_TYPE,{value:$})}clone(){let $=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)$.range=this.range.slice();return $}toJS($,{mapAsMap:I,maxAliasCount:U,onAnchor:_,reviver:u}={}){if(!ZX.isDocument($))throw TypeError("A document argument is required");let g={anchors:new Map,doc:$,keep:!0,mapAsMap:I===!0,mapKeyWarned:!1,maxAliasCount:typeof U==="number"?U:100},z=FD.toJS(this,"",g);if(typeof _==="function")for(let{count:v,res:J}of g.anchors.values())_(J,v);return typeof u==="function"?jD.applyReviver(u,{"":z},"",z):z}}SD.NodeBase=AX});var AI=E((kD)=>{var ED=qu(),CD=PI(),L1=$$(),fD=Qu(),xD=N6();class bX extends fD.NodeBase{constructor($){super(L1.ALIAS);this.source=$,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve($,I){let U;if(I?.aliasResolveCache)U=I.aliasResolveCache;else if(U=[],CD.visit($,{Node:(u,g)=>{if(L1.isAlias(g)||L1.hasAnchor(g))U.push(g)}}),I)I.aliasResolveCache=U;let _=void 0;for(let u of U){if(u===this)break;if(u.anchor===this.source)_=u}return _}toJSON($,I){if(!I)return{source:this.source};let{anchors:U,doc:_,maxAliasCount:u}=I,g=this.resolve(_,I);if(!g){let v=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(v)}let z=U.get(g);if(!z)xD.toJS(g,null,I),z=U.get(g);if(z?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(u>=0){if(z.count+=1,z.aliasCount===0)z.aliasCount=Tu(_,g,U);if(z.count*z.aliasCount>u)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return z.res}toString($,I,U){let _=`*${this.source}`;if($){if(ED.anchorIsValid(this.source),$.options.verifyAliasOrder&&!$.anchors.has(this.source)){let u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(u)}if($.implicitKey)return`${_} `}return _}}function Tu($,I,U){if(L1.isAlias(I)){let _=I.resolve($),u=U&&_&&U.get(_);return u?u.count*u.aliasCount:0}else if(L1.isCollection(I)){let _=0;for(let u of I.items){let g=Tu($,u,U);if(g>_)_=g}return _}else if(L1.isPair(I)){let _=Tu($,I.key,U),u=Tu($,I.value,U);return Math.max(_,u)}return 1}kD.Alias=bX});var W$=E((mD)=>{var iD=$$(),rD=Qu(),nD=N6(),lD=($)=>!$||typeof $!=="function"&&typeof $!=="object";class y6 extends rD.NodeBase{constructor($){super(iD.SCALAR);this.value=$}toJSON($,I){return I?.keep?this.value:nD.toJS(this.value,$,I)}toString(){return String(this.value)}}y6.BLOCK_FOLDED="BLOCK_FOLDED";y6.BLOCK_LITERAL="BLOCK_LITERAL";y6.PLAIN="PLAIN";y6.QUOTE_DOUBLE="QUOTE_DOUBLE";y6.QUOTE_SINGLE="QUOTE_SINGLE";mD.Scalar=y6;mD.isScalarValue=lD});var bI=E((aD)=>{var dD=AI(),i6=$$(),jX=W$(),pD="tag:yaml.org,2002:";function oD($,I,U){if(I){let _=U.filter((g)=>g.tag===I),u=_.find((g)=>!g.format)??_[0];if(!u)throw Error(`Tag ${I} not found`);return u}return U.find((_)=>_.identify?.($)&&!_.format)}function tD($,I,U){if(i6.isDocument($))$=$.contents;if(i6.isNode($))return $;if(i6.isPair($)){let G=U.schema[i6.MAP].createNode?.(U.schema,null,U);return G.items.push($),G}if($ instanceof String||$ instanceof Number||$ instanceof Boolean||typeof BigInt<"u"&&$ instanceof BigInt)$=$.valueOf();let{aliasDuplicateObjects:_,onAnchor:u,onTagObj:g,schema:z,sourceObjects:v}=U,J=void 0;if(_&&$&&typeof $==="object")if(J=v.get($),J)return J.anchor??(J.anchor=u($)),new dD.Alias(J.anchor);else J={anchor:null,node:null},v.set($,J);if(I?.startsWith("!!"))I=pD+I.slice(2);let N=oD($,I,z.tags);if(!N){if($&&typeof $.toJSON==="function")$=$.toJSON();if(!$||typeof $!=="object"){let G=new jX.Scalar($);if(J)J.node=G;return G}N=$ instanceof Map?z[i6.MAP]:(Symbol.iterator in Object($))?z[i6.SEQ]:z[i6.MAP]}if(g)g(N),delete U.onTagObj;let X=N?.createNode?N.createNode(U.schema,$,U):typeof N?.nodeClass?.from==="function"?N.nodeClass.from(U.schema,$,U):new jX.Scalar($);if(I)X.tag=I;else if(!N.default)X.tag=N.tag;if(J)J.node=X;return X}aD.createNode=tD});var Hu=E((IB)=>{var sD=bI(),w4=$$(),$B=Qu();function e2($,I,U){let _=U;for(let u=I.length-1;u>=0;--u){let g=I[u];if(typeof g==="number"&&Number.isInteger(g)&&g>=0){let z=[];z[g]=_,_=z}else _=new Map([[g,_]])}return sD.createNode(_,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:$,sourceObjects:new Map})}var FX=($)=>$==null||typeof $==="object"&&!!$[Symbol.iterator]().next().done;class SX extends $B.NodeBase{constructor($,I){super($);Object.defineProperty(this,"schema",{value:I,configurable:!0,enumerable:!1,writable:!0})}clone($){let I=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if($)I.schema=$;if(I.items=I.items.map((U)=>w4.isNode(U)||w4.isPair(U)?U.clone($):U),this.range)I.range=this.range.slice();return I}addIn($,I){if(FX($))this.add(I);else{let[U,..._]=$,u=this.get(U,!0);if(w4.isCollection(u))u.addIn(_,I);else if(u===void 0&&this.schema)this.set(U,e2(this.schema,_,I));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${_}`)}}deleteIn($){let[I,...U]=$;if(U.length===0)return this.delete(I);let _=this.get(I,!0);if(w4.isCollection(_))return _.deleteIn(U);else throw Error(`Expected YAML collection at ${I}. Remaining path: ${U}`)}getIn($,I){let[U,..._]=$,u=this.get(U,!0);if(_.length===0)return!I&&w4.isScalar(u)?u.value:u;else return w4.isCollection(u)?u.getIn(_,I):void 0}hasAllNullValues($){return this.items.every((I)=>{if(!w4.isPair(I))return!1;let U=I.value;return U==null||$&&w4.isScalar(U)&&U.value==null&&!U.commentBefore&&!U.comment&&!U.tag})}hasIn($){let[I,...U]=$;if(U.length===0)return this.has(I);let _=this.get(I,!0);return w4.isCollection(_)?_.hasIn(U):!1}setIn($,I){let[U,..._]=$;if(_.length===0)this.set(U,I);else{let u=this.get(U,!0);if(w4.isCollection(u))u.setIn(_,I);else if(u===void 0&&this.schema)this.set(U,e2(this.schema,_,I));else throw Error(`Expected YAML collection at ${U}. Remaining path: ${_}`)}}}IB.Collection=SX;IB.collectionFromPath=e2;IB.isEmptyPath=FX});var jI=E((vB)=>{var gB=($)=>$.replace(/^(?!$)(?: $)?/gm,"#");function s2($,I){if(/^\n+$/.test($))return $.substring(1);return I?$.replace(/^(?! *$)/gm,I):$}var zB=($,I,U)=>$.endsWith(`
29
+ `)?s2(U,I):U.includes(`
30
30
  `)?`
31
- `+a2(U,I):($.endsWith(" ")?"":" ")+U;zB.indentComment=a2;zB.lineComment=gB;zB.stringifyComment=_B});var SX=E((XB)=>{function GB($,I,U="flow",{indentAtStart:_,lineWidth:u=80,minContentWidth:g=20,onFold:z,onOverflow:v}={}){if(!u||u<0)return $;if(u<g)g=0;let J=Math.max(1+g,1+u-I.length);if($.length<=J)return $;let N=[],X={},G=u-I.length;if(typeof _==="number")if(_>u-Math.max(2,g))N.push(0);else G=u-_;let q=void 0,T=void 0,H=!1,Q=-1,Y=-1,R=-1;if(U==="block"){if(Q=FX($,Q,I.length),Q!==-1)G=Q+J}for(let W;W=$[Q+=1];){if(U==="quoted"&&W==="\\"){switch(Y=Q,$[Q+1]){case"x":Q+=3;break;case"u":Q+=5;break;case"U":Q+=9;break;default:Q+=1}R=Q}if(W===`
32
- `){if(U==="block")Q=FX($,Q,I.length);G=Q+I.length+J,q=void 0}else{if(W===" "&&T&&T!==" "&&T!==`
31
+ `+s2(U,I):($.endsWith(" ")?"":" ")+U;vB.indentComment=s2;vB.lineComment=zB;vB.stringifyComment=gB});var EX=E((qB)=>{function XB($,I,U="flow",{indentAtStart:_,lineWidth:u=80,minContentWidth:g=20,onFold:z,onOverflow:v}={}){if(!u||u<0)return $;if(u<g)g=0;let J=Math.max(1+g,1+u-I.length);if($.length<=J)return $;let N=[],X={},G=u-I.length;if(typeof _==="number")if(_>u-Math.max(2,g))N.push(0);else G=u-_;let q=void 0,T=void 0,H=!1,Q=-1,Y=-1,K=-1;if(U==="block"){if(Q=wX($,Q,I.length),Q!==-1)G=Q+J}for(let P;P=$[Q+=1];){if(U==="quoted"&&P==="\\"){switch(Y=Q,$[Q+1]){case"x":Q+=3;break;case"u":Q+=5;break;case"U":Q+=9;break;default:Q+=1}K=Q}if(P===`
32
+ `){if(U==="block")Q=wX($,Q,I.length);G=Q+I.length+J,q=void 0}else{if(P===" "&&T&&T!==" "&&T!==`
33
33
  `&&T!=="\t"){let O=$[Q+1];if(O&&O!==" "&&O!==`
34
- `&&O!=="\t")q=Q}if(Q>=G)if(q)N.push(q),G=q+J,q=void 0;else if(U==="quoted"){while(T===" "||T==="\t")T=W,W=$[Q+=1],H=!0;let O=Q>R+1?Q-2:Y-1;if(X[O])return $;N.push(O),X[O]=!0,G=O+J,q=void 0}else H=!0}T=W}if(H&&v)v();if(N.length===0)return $;if(z)z();let K=$.slice(0,N[0]);for(let W=0;W<N.length;++W){let O=N[W],V=N[W+1]||$.length;if(O===0)K=`
35
- ${I}${$.slice(0,V)}`;else{if(U==="quoted"&&X[O])K+=`${$[O]}\\`;K+=`
36
- ${I}${$.slice(O+1,V)}`}}return K}function FX($,I,U){let _=I,u=I+1,g=$[u];while(g===" "||g==="\t")if(I<u+U)g=$[++I];else{do g=$[++I];while(g&&g!==`
37
- `);_=I,u=I+1,g=$[u]}return _}XB.FOLD_BLOCK="block";XB.FOLD_FLOW="flow";XB.FOLD_QUOTED="quoted";XB.foldFlowLines=GB});var jI=E((VB)=>{var D4=P$(),J6=SX(),Tu=($,I)=>({indentAtStart:I?$.indent.length:$.indentAtStart,lineWidth:$.options.lineWidth,minContentWidth:$.options.minContentWidth}),Hu=($)=>/^(%|---|\.\.\.)/m.test($);function YB($,I,U){if(!I||I<0)return!1;let _=I-U,u=$.length;if(u<=_)return!1;for(let g=0,z=0;g<u;++g)if($[g]===`
38
- `){if(g-z>_)return!0;if(z=g+1,u-z<=_)return!1}return!0}function bI($,I){let U=JSON.stringify($);if(I.options.doubleQuotedAsJSON)return U;let{implicitKey:_}=I,u=I.options.doubleQuotedMinMultiLineLength,g=I.indent||(Hu($)?" ":""),z="",v=0;for(let J=0,N=U[J];N;N=U[++J]){if(N===" "&&U[J+1]==="\\"&&U[J+2]==="n")z+=U.slice(v,J)+"\\ ",J+=1,v=J,N="\\";if(N==="\\")switch(U[J+1]){case"u":{z+=U.slice(v,J);let X=U.substr(J+2,4);switch(X){case"0000":z+="\\0";break;case"0007":z+="\\a";break;case"000b":z+="\\v";break;case"001b":z+="\\e";break;case"0085":z+="\\N";break;case"00a0":z+="\\_";break;case"2028":z+="\\L";break;case"2029":z+="\\P";break;default:if(X.substr(0,2)==="00")z+="\\x"+X.substr(2);else z+=U.substr(J,6)}J+=5,v=J+1}break;case"n":if(_||U[J+2]==='"'||U.length<u)J+=1;else{z+=U.slice(v,J)+`
34
+ `&&O!=="\t")q=Q}if(Q>=G)if(q)N.push(q),G=q+J,q=void 0;else if(U==="quoted"){while(T===" "||T==="\t")T=P,P=$[Q+=1],H=!0;let O=Q>K+1?Q-2:Y-1;if(X[O])return $;N.push(O),X[O]=!0,G=O+J,q=void 0}else H=!0}T=P}if(H&&v)v();if(N.length===0)return $;if(z)z();let R=$.slice(0,N[0]);for(let P=0;P<N.length;++P){let O=N[P],D=N[P+1]||$.length;if(O===0)R=`
35
+ ${I}${$.slice(0,D)}`;else{if(U==="quoted"&&X[O])R+=`${$[O]}\\`;R+=`
36
+ ${I}${$.slice(O+1,D)}`}}return R}function wX($,I,U){let _=I,u=I+1,g=$[u];while(g===" "||g==="\t")if(I<u+U)g=$[++I];else{do g=$[++I];while(g&&g!==`
37
+ `);_=I,u=I+1,g=$[u]}return _}qB.FOLD_BLOCK="block";qB.FOLD_FLOW="flow";qB.FOLD_QUOTED="quoted";qB.foldFlowLines=XB});var SI=E((BB)=>{var B4=W$(),G6=EX(),Ou=($,I)=>({indentAtStart:I?$.indent.length:$.indentAtStart,lineWidth:$.options.lineWidth,minContentWidth:$.options.minContentWidth}),Vu=($)=>/^(%|---|\.\.\.)/m.test($);function OB($,I,U){if(!I||I<0)return!1;let _=I-U,u=$.length;if(u<=_)return!1;for(let g=0,z=0;g<u;++g)if($[g]===`
38
+ `){if(g-z>_)return!0;if(z=g+1,u-z<=_)return!1}return!0}function FI($,I){let U=JSON.stringify($);if(I.options.doubleQuotedAsJSON)return U;let{implicitKey:_}=I,u=I.options.doubleQuotedMinMultiLineLength,g=I.indent||(Vu($)?" ":""),z="",v=0;for(let J=0,N=U[J];N;N=U[++J]){if(N===" "&&U[J+1]==="\\"&&U[J+2]==="n")z+=U.slice(v,J)+"\\ ",J+=1,v=J,N="\\";if(N==="\\")switch(U[J+1]){case"u":{z+=U.slice(v,J);let X=U.substr(J+2,4);switch(X){case"0000":z+="\\0";break;case"0007":z+="\\a";break;case"000b":z+="\\v";break;case"001b":z+="\\e";break;case"0085":z+="\\N";break;case"00a0":z+="\\_";break;case"2028":z+="\\L";break;case"2029":z+="\\P";break;default:if(X.substr(0,2)==="00")z+="\\x"+X.substr(2);else z+=U.substr(J,6)}J+=5,v=J+1}break;case"n":if(_||U[J+2]==='"'||U.length<u)J+=1;else{z+=U.slice(v,J)+`
39
39
 
40
40
  `;while(U[J+2]==="\\"&&U[J+3]==="n"&&U[J+4]!=='"')z+=`
41
- `,J+=2;if(z+=g,U[J+2]===" ")z+="\\";J+=1,v=J+1}break;default:J+=1}}return z=v?z+U.slice(v):U,_?z:J6.foldFlowLines(z,g,J6.FOLD_QUOTED,Tu(I,!1))}function e2($,I){if(I.options.singleQuote===!1||I.implicitKey&&$.includes(`
42
- `)||/[ \t]\n|\n[ \t]/.test($))return bI($,I);let U=I.indent||(Hu($)?" ":""),_="'"+$.replace(/'/g,"''").replace(/\n+/g,`$&
43
- ${U}`)+"'";return I.implicitKey?_:J6.foldFlowLines(_,U,J6.FOLD_FLOW,Tu(I,!1))}function K1($,I){let{singleQuote:U}=I.options,_;if(U===!1)_=bI;else{let u=$.includes('"'),g=$.includes("'");if(u&&!g)_=e2;else if(g&&!u)_=bI;else _=U?e2:bI}return _($,I)}var s2;try{s2=new RegExp(`(^|(?<!
41
+ `,J+=2;if(z+=g,U[J+2]===" ")z+="\\";J+=1,v=J+1}break;default:J+=1}}return z=v?z+U.slice(v):U,_?z:G6.foldFlowLines(z,g,G6.FOLD_QUOTED,Ou(I,!1))}function $g($,I){if(I.options.singleQuote===!1||I.implicitKey&&$.includes(`
42
+ `)||/[ \t]\n|\n[ \t]/.test($))return FI($,I);let U=I.indent||(Vu($)?" ":""),_="'"+$.replace(/'/g,"''").replace(/\n+/g,`$&
43
+ ${U}`)+"'";return I.implicitKey?_:G6.foldFlowLines(_,U,G6.FOLD_FLOW,Ou(I,!1))}function W1($,I){let{singleQuote:U}=I.options,_;if(U===!1)_=FI;else{let u=$.includes('"'),g=$.includes("'");if(u&&!g)_=$g;else if(g&&!u)_=FI;else _=U?$g:FI}return _($,I)}var Ig;try{Ig=new RegExp(`(^|(?<!
44
44
  ))
45
45
  +(?!
46
- |$)`,"g")}catch{s2=/\n+(?!\n|$)/g}function Qu({comment:$,type:I,value:U},_,u,g){let{blockQuote:z,commentString:v,lineWidth:J}=_.options;if(!z||/\n[\t ]+$/.test(U))return K1(U,_);let N=_.indent||(_.forceBlockIndent||Hu(U)?" ":""),X=z==="literal"?!0:z==="folded"||I===D4.Scalar.BLOCK_FOLDED?!1:I===D4.Scalar.BLOCK_LITERAL?!0:!YB(U,J,N.length);if(!U)return X?`|
46
+ |$)`,"g")}catch{Ig=/\n+(?!\n|$)/g}function Yu({comment:$,type:I,value:U},_,u,g){let{blockQuote:z,commentString:v,lineWidth:J}=_.options;if(!z||/\n[\t ]+$/.test(U))return W1(U,_);let N=_.indent||(_.forceBlockIndent||Vu(U)?" ":""),X=z==="literal"?!0:z==="folded"||I===B4.Scalar.BLOCK_FOLDED?!1:I===B4.Scalar.BLOCK_LITERAL?!0:!OB(U,J,N.length);if(!U)return X?`|
47
47
  `:`>
48
- `;let G,q;for(q=U.length;q>0;--q){let V=U[q-1];if(V!==`
49
- `&&V!=="\t"&&V!==" ")break}let T=U.substring(q),H=T.indexOf(`
48
+ `;let G,q;for(q=U.length;q>0;--q){let D=U[q-1];if(D!==`
49
+ `&&D!=="\t"&&D!==" ")break}let T=U.substring(q),H=T.indexOf(`
50
50
  `);if(H===-1)G="-";else if(U===T||H!==T.length-1){if(G="+",g)g()}else G="";if(T){if(U=U.slice(0,-T.length),T[T.length-1]===`
51
- `)T=T.slice(0,-1);T=T.replace(s2,`$&${N}`)}let Q=!1,Y,R=-1;for(Y=0;Y<U.length;++Y){let V=U[Y];if(V===" ")Q=!0;else if(V===`
52
- `)R=Y;else break}let K=U.substring(0,R<Y?R+1:Y);if(K)U=U.substring(K.length),K=K.replace(/\n+/g,`$&${N}`);let O=(Q?N?"2":"1":"")+G;if($){if(O+=" "+v($.replace(/ ?[\r\n]+/g," ")),u)u()}if(!X){let V=U.replace(/\n+/g,`
53
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${N}`),L=!1,B=Tu(_,!0);if(z!=="folded"&&I!==D4.Scalar.BLOCK_FOLDED)B.onOverflow=()=>{L=!0};let M=J6.foldFlowLines(`${K}${V}${T}`,N,J6.FOLD_BLOCK,B);if(!L)return`>${O}
51
+ `)T=T.slice(0,-1);T=T.replace(Ig,`$&${N}`)}let Q=!1,Y,K=-1;for(Y=0;Y<U.length;++Y){let D=U[Y];if(D===" ")Q=!0;else if(D===`
52
+ `)K=Y;else break}let R=U.substring(0,K<Y?K+1:Y);if(R)U=U.substring(R.length),R=R.replace(/\n+/g,`$&${N}`);let O=(Q?N?"2":"1":"")+G;if($){if(O+=" "+v($.replace(/ ?[\r\n]+/g," ")),u)u()}if(!X){let D=U.replace(/\n+/g,`
53
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${N}`),L=!1,B=Ou(_,!0);if(z!=="folded"&&I!==B4.Scalar.BLOCK_FOLDED)B.onOverflow=()=>{L=!0};let M=G6.foldFlowLines(`${R}${D}${T}`,N,G6.FOLD_BLOCK,B);if(!L)return`>${O}
54
54
  ${N}${M}`}return U=U.replace(/\n+/g,`$&${N}`),`|${O}
55
- ${N}${K}${U}${T}`}function OB($,I,U,_){let{type:u,value:g}=$,{actualString:z,implicitKey:v,indent:J,indentStep:N,inFlow:X}=I;if(v&&g.includes(`
56
- `)||X&&/[[\]{},]/.test(g))return K1(g,I);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(g))return v||X||!g.includes(`
57
- `)?K1(g,I):Qu($,I,U,_);if(!v&&!X&&u!==D4.Scalar.PLAIN&&g.includes(`
58
- `))return Qu($,I,U,_);if(Hu(g)){if(J==="")return I.forceBlockIndent=!0,Qu($,I,U,_);else if(v&&J===N)return K1(g,I)}let G=g.replace(/\n+/g,`$&
59
- ${J}`);if(z){let q=(Q)=>Q.default&&Q.tag!=="tag:yaml.org,2002:str"&&Q.test?.test(G),{compat:T,tags:H}=I.doc.schema;if(H.some(q)||T?.some(q))return K1(g,I)}return v?G:J6.foldFlowLines(G,J,J6.FOLD_FLOW,Tu(I,!1))}function DB($,I,U,_){let{implicitKey:u,inFlow:g}=I,z=typeof $.value==="string"?$:Object.assign({},$,{value:String($.value)}),{type:v}=$;if(v!==D4.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(z.value))v=D4.Scalar.QUOTE_DOUBLE}let J=(X)=>{switch(X){case D4.Scalar.BLOCK_FOLDED:case D4.Scalar.BLOCK_LITERAL:return u||g?K1(z.value,I):Qu(z,I,U,_);case D4.Scalar.QUOTE_DOUBLE:return bI(z.value,I);case D4.Scalar.QUOTE_SINGLE:return e2(z.value,I);case D4.Scalar.PLAIN:return OB(z,I,U,_);default:return null}},N=J(v);if(N===null){let{defaultKeyType:X,defaultStringType:G}=I.options,q=u&&X||G;if(N=J(q),N===null)throw Error(`Unsupported default string type ${q}`)}return N}VB.stringifyString=DB});var FI=E((AB)=>{var MB=Nu(),N6=$$(),RB=AI(),KB=jI();function LB($,I){let U=Object.assign({blockQuote:!0,commentString:RB.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},$.schema.toStringOptions,I),_;switch(U.collectionStyle){case"block":_=!1;break;case"flow":_=!0;break;default:_=null}return{anchors:new Set,doc:$,flowCollectionPadding:U.flowCollectionPadding?" ":"",indent:"",indentStep:typeof U.indent==="number"?" ".repeat(U.indent):" ",inFlow:_,options:U}}function PB($,I){if(I.tag){let u=$.filter((g)=>g.tag===I.tag);if(u.length>0)return u.find((g)=>g.format===I.format)??u[0]}let U=void 0,_;if(N6.isScalar(I)){_=I.value;let u=$.filter((g)=>g.identify?.(_));if(u.length>1){let g=u.filter((z)=>z.test);if(g.length>0)u=g}U=u.find((g)=>g.format===I.format)??u.find((g)=>!g.format)}else _=I,U=$.find((u)=>u.nodeClass&&_ instanceof u.nodeClass);if(!U){let u=_?.constructor?.name??(_===null?"null":typeof _);throw Error(`Tag not resolved for ${u} value`)}return U}function WB($,I,{anchors:U,doc:_}){if(!_.directives)return"";let u=[],g=(N6.isScalar($)||N6.isCollection($))&&$.anchor;if(g&&MB.anchorIsValid(g))U.add(g),u.push(`&${g}`);let z=$.tag??(I.default?null:I.tag);if(z)u.push(_.directives.tagString(z));return u.join(" ")}function ZB($,I,U,_){if(N6.isPair($))return $.toString(I,U,_);if(N6.isAlias($)){if(I.doc.directives)return $.toString(I);if(I.resolvedAliases?.has($))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(I.resolvedAliases)I.resolvedAliases.add($);else I.resolvedAliases=new Set([$]);$=$.resolve(I.doc)}}let u=void 0,g=N6.isNode($)?$:I.doc.createNode($,{onTagObj:(J)=>u=J});u??(u=PB(I.doc.schema.tags,g));let z=WB(g,u,I);if(z.length>0)I.indentAtStart=(I.indentAtStart??0)+z.length+1;let v=typeof u.stringify==="function"?u.stringify(g,I,U,_):N6.isScalar(g)?KB.stringifyString(g,I,U,_):g.toString(I,U,_);if(!z)return v;return N6.isScalar(g)||v[0]==="{"||v[0]==="["?`${z} ${v}`:`${z}
60
- ${I.indent}${v}`}AB.createStringifyContext=LB;AB.stringify=ZB});var CX=E((SB)=>{var h4=$$(),wX=P$(),EX=FI(),SI=AI();function FB({key:$,value:I},U,_,u){let{allNullValues:g,doc:z,indent:v,indentStep:J,options:{commentString:N,indentSeq:X,simpleKeys:G}}=U,q=h4.isNode($)&&$.comment||null;if(G){if(q)throw Error("With simple keys, key nodes cannot have comments");if(h4.isCollection($)||!h4.isNode($)&&typeof $==="object")throw Error("With simple keys, collection cannot be used as a key value")}let T=!G&&(!$||q&&I==null&&!U.inFlow||h4.isCollection($)||(h4.isScalar($)?$.type===wX.Scalar.BLOCK_FOLDED||$.type===wX.Scalar.BLOCK_LITERAL:typeof $==="object"));U=Object.assign({},U,{allNullValues:!1,implicitKey:!T&&(G||!g),indent:v+J});let H=!1,Q=!1,Y=EX.stringify($,U,()=>H=!0,()=>Q=!0);if(!T&&!U.inFlow&&Y.length>1024){if(G)throw Error("With simple keys, single line scalar must not span more than 1024 characters");T=!0}if(U.inFlow){if(g||I==null){if(H&&_)_();return Y===""?"?":T?`? ${Y}`:Y}}else if(g&&!G||I==null&&T){if(Y=`? ${Y}`,q&&!H)Y+=SI.lineComment(Y,U.indent,N(q));else if(Q&&u)u();return Y}if(H)q=null;if(T){if(q)Y+=SI.lineComment(Y,U.indent,N(q));Y=`? ${Y}
61
- ${v}:`}else if(Y=`${Y}:`,q)Y+=SI.lineComment(Y,U.indent,N(q));let R,K,W;if(h4.isNode(I))R=!!I.spaceBefore,K=I.commentBefore,W=I.comment;else if(R=!1,K=null,W=null,I&&typeof I==="object")I=z.createNode(I);if(U.implicitKey=!1,!T&&!q&&h4.isScalar(I))U.indentAtStart=Y.length+1;if(Q=!1,!X&&J.length>=2&&!U.inFlow&&!T&&h4.isSeq(I)&&!I.flow&&!I.tag&&!I.anchor)U.indent=U.indent.substring(2);let O=!1,V=EX.stringify(I,U,()=>O=!0,()=>Q=!0),L=" ";if(q||R||K){if(L=R?`
62
- `:"",K){let B=N(K);L+=`
63
- ${SI.indentComment(B,U.indent)}`}if(V===""&&!U.inFlow){if(L===`
64
- `&&W)L=`
55
+ ${N}${R}${U}${T}`}function VB($,I,U,_){let{type:u,value:g}=$,{actualString:z,implicitKey:v,indent:J,indentStep:N,inFlow:X}=I;if(v&&g.includes(`
56
+ `)||X&&/[[\]{},]/.test(g))return W1(g,I);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(g))return v||X||!g.includes(`
57
+ `)?W1(g,I):Yu($,I,U,_);if(!v&&!X&&u!==B4.Scalar.PLAIN&&g.includes(`
58
+ `))return Yu($,I,U,_);if(Vu(g)){if(J==="")return I.forceBlockIndent=!0,Yu($,I,U,_);else if(v&&J===N)return W1(g,I)}let G=g.replace(/\n+/g,`$&
59
+ ${J}`);if(z){let q=(Q)=>Q.default&&Q.tag!=="tag:yaml.org,2002:str"&&Q.test?.test(G),{compat:T,tags:H}=I.doc.schema;if(H.some(q)||T?.some(q))return W1(g,I)}return v?G:G6.foldFlowLines(G,J,G6.FOLD_FLOW,Ou(I,!1))}function DB($,I,U,_){let{implicitKey:u,inFlow:g}=I,z=typeof $.value==="string"?$:Object.assign({},$,{value:String($.value)}),{type:v}=$;if(v!==B4.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(z.value))v=B4.Scalar.QUOTE_DOUBLE}let J=(X)=>{switch(X){case B4.Scalar.BLOCK_FOLDED:case B4.Scalar.BLOCK_LITERAL:return u||g?W1(z.value,I):Yu(z,I,U,_);case B4.Scalar.QUOTE_DOUBLE:return FI(z.value,I);case B4.Scalar.QUOTE_SINGLE:return $g(z.value,I);case B4.Scalar.PLAIN:return VB(z,I,U,_);default:return null}},N=J(v);if(N===null){let{defaultKeyType:X,defaultStringType:G}=I.options,q=u&&X||G;if(N=J(q),N===null)throw Error(`Unsupported default string type ${q}`)}return N}BB.stringifyString=DB});var wI=E((bB)=>{var KB=qu(),X6=$$(),RB=jI(),LB=SI();function WB($,I){let U=Object.assign({blockQuote:!0,commentString:RB.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},$.schema.toStringOptions,I),_;switch(U.collectionStyle){case"block":_=!1;break;case"flow":_=!0;break;default:_=null}return{anchors:new Set,doc:$,flowCollectionPadding:U.flowCollectionPadding?" ":"",indent:"",indentStep:typeof U.indent==="number"?" ".repeat(U.indent):" ",inFlow:_,options:U}}function PB($,I){if(I.tag){let u=$.filter((g)=>g.tag===I.tag);if(u.length>0)return u.find((g)=>g.format===I.format)??u[0]}let U=void 0,_;if(X6.isScalar(I)){_=I.value;let u=$.filter((g)=>g.identify?.(_));if(u.length>1){let g=u.filter((z)=>z.test);if(g.length>0)u=g}U=u.find((g)=>g.format===I.format)??u.find((g)=>!g.format)}else _=I,U=$.find((u)=>u.nodeClass&&_ instanceof u.nodeClass);if(!U){let u=_?.constructor?.name??(_===null?"null":typeof _);throw Error(`Tag not resolved for ${u} value`)}return U}function ZB($,I,{anchors:U,doc:_}){if(!_.directives)return"";let u=[],g=(X6.isScalar($)||X6.isCollection($))&&$.anchor;if(g&&KB.anchorIsValid(g))U.add(g),u.push(`&${g}`);let z=$.tag??(I.default?null:I.tag);if(z)u.push(_.directives.tagString(z));return u.join(" ")}function AB($,I,U,_){if(X6.isPair($))return $.toString(I,U,_);if(X6.isAlias($)){if(I.doc.directives)return $.toString(I);if(I.resolvedAliases?.has($))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(I.resolvedAliases)I.resolvedAliases.add($);else I.resolvedAliases=new Set([$]);$=$.resolve(I.doc)}}let u=void 0,g=X6.isNode($)?$:I.doc.createNode($,{onTagObj:(J)=>u=J});u??(u=PB(I.doc.schema.tags,g));let z=ZB(g,u,I);if(z.length>0)I.indentAtStart=(I.indentAtStart??0)+z.length+1;let v=typeof u.stringify==="function"?u.stringify(g,I,U,_):X6.isScalar(g)?LB.stringifyString(g,I,U,_):g.toString(I,U,_);if(!z)return v;return X6.isScalar(g)||v[0]==="{"||v[0]==="["?`${z} ${v}`:`${z}
60
+ ${I.indent}${v}`}bB.createStringifyContext=WB;bB.stringify=AB});var xX=E((wB)=>{var d4=$$(),CX=W$(),fX=wI(),EI=jI();function SB({key:$,value:I},U,_,u){let{allNullValues:g,doc:z,indent:v,indentStep:J,options:{commentString:N,indentSeq:X,simpleKeys:G}}=U,q=d4.isNode($)&&$.comment||null;if(G){if(q)throw Error("With simple keys, key nodes cannot have comments");if(d4.isCollection($)||!d4.isNode($)&&typeof $==="object")throw Error("With simple keys, collection cannot be used as a key value")}let T=!G&&(!$||q&&I==null&&!U.inFlow||d4.isCollection($)||(d4.isScalar($)?$.type===CX.Scalar.BLOCK_FOLDED||$.type===CX.Scalar.BLOCK_LITERAL:typeof $==="object"));U=Object.assign({},U,{allNullValues:!1,implicitKey:!T&&(G||!g),indent:v+J});let H=!1,Q=!1,Y=fX.stringify($,U,()=>H=!0,()=>Q=!0);if(!T&&!U.inFlow&&Y.length>1024){if(G)throw Error("With simple keys, single line scalar must not span more than 1024 characters");T=!0}if(U.inFlow){if(g||I==null){if(H&&_)_();return Y===""?"?":T?`? ${Y}`:Y}}else if(g&&!G||I==null&&T){if(Y=`? ${Y}`,q&&!H)Y+=EI.lineComment(Y,U.indent,N(q));else if(Q&&u)u();return Y}if(H)q=null;if(T){if(q)Y+=EI.lineComment(Y,U.indent,N(q));Y=`? ${Y}
61
+ ${v}:`}else if(Y=`${Y}:`,q)Y+=EI.lineComment(Y,U.indent,N(q));let K,R,P;if(d4.isNode(I))K=!!I.spaceBefore,R=I.commentBefore,P=I.comment;else if(K=!1,R=null,P=null,I&&typeof I==="object")I=z.createNode(I);if(U.implicitKey=!1,!T&&!q&&d4.isScalar(I))U.indentAtStart=Y.length+1;if(Q=!1,!X&&J.length>=2&&!U.inFlow&&!T&&d4.isSeq(I)&&!I.flow&&!I.tag&&!I.anchor)U.indent=U.indent.substring(2);let O=!1,D=fX.stringify(I,U,()=>O=!0,()=>Q=!0),L=" ";if(q||K||R){if(L=K?`
62
+ `:"",R){let B=N(R);L+=`
63
+ ${EI.indentComment(B,U.indent)}`}if(D===""&&!U.inFlow){if(L===`
64
+ `&&P)L=`
65
65
 
66
66
  `}else L+=`
67
- ${U.indent}`}else if(!T&&h4.isCollection(I)){let B=V[0],M=V.indexOf(`
68
- `),F=M!==-1,A=U.inFlow??I.flow??I.items.length===0;if(F||!A){let f=!1;if(F&&(B==="&"||B==="!")){let b=V.indexOf(" ");if(B==="&"&&b!==-1&&b<M&&V[b+1]==="!")b=V.indexOf(" ",b+1);if(b===-1||M<b)f=!0}if(!f)L=`
69
- ${U.indent}`}}else if(V===""||V[0]===`
70
- `)L="";if(Y+=L+V,U.inFlow){if(O&&_)_()}else if(W&&!O)Y+=SI.lineComment(Y,U.indent,N(W));else if(Q&&u)u();return Y}SB.stringifyPair=FB});var $g=E((fB)=>{var fX=g$("process");function EB($,...I){if($==="debug")console.log(...I)}function CB($,I){if($==="debug"||$==="warn")if(typeof fX.emitWarning==="function")fX.emitWarning(I);else console.warn(I)}fB.debug=EB;fB.warn=CB});var Du=E((iB)=>{var wI=$$(),xX=P$(),Yu="<<",Ou={identify:($)=>$===Yu||typeof $==="symbol"&&$.description===Yu,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new xX.Scalar(Symbol(Yu)),{addToJSMap:kX}),stringify:()=>Yu},yB=($,I)=>(Ou.identify(I)||wI.isScalar(I)&&(!I.type||I.type===xX.Scalar.PLAIN)&&Ou.identify(I.value))&&$?.doc.schema.tags.some((U)=>U.tag===Ou.tag&&U.default);function kX($,I,U){if(U=$&&wI.isAlias(U)?U.resolve($.doc):U,wI.isSeq(U))for(let _ of U.items)Ig($,I,_);else if(Array.isArray(U))for(let _ of U)Ig($,I,_);else Ig($,I,U)}function Ig($,I,U){let _=$&&wI.isAlias(U)?U.resolve($.doc):U;if(!wI.isMap(_))throw Error("Merge sources must be maps or map aliases");let u=_.toJSON(null,$,Map);for(let[g,z]of u)if(I instanceof Map){if(!I.has(g))I.set(g,z)}else if(I instanceof Set)I.add(g);else if(!Object.prototype.hasOwnProperty.call(I,g))Object.defineProperty(I,g,{value:z,writable:!0,enumerable:!0,configurable:!0});return I}iB.addMergeToJSMap=kX;iB.isMergeKey=yB;iB.merge=Ou});var Ug=E((pB)=>{var mB=$g(),yX=Du(),hB=FI(),iX=$$(),ug=v6();function cB($,I,{key:U,value:_}){if(iX.isNode(U)&&U.addToJSMap)U.addToJSMap($,I,_);else if(yX.isMergeKey($,U))yX.addMergeToJSMap($,I,_);else{let u=ug.toJS(U,"",$);if(I instanceof Map)I.set(u,ug.toJS(_,u,$));else if(I instanceof Set)I.add(u);else{let g=dB(U,u,$),z=ug.toJS(_,g,$);if(g in I)Object.defineProperty(I,g,{value:z,writable:!0,enumerable:!0,configurable:!0});else I[g]=z}}return I}function dB($,I,U){if(I===null)return"";if(typeof I!=="object")return String(I);if(iX.isNode($)&&U?.doc){let _=hB.createStringifyContext(U.doc,{});_.anchors=new Set;for(let g of U.anchors.keys())_.anchors.add(g.anchor);_.inFlow=!0,_.inStringifyKey=!0;let u=$.toString(_);if(!U.mapKeyWarned){let g=JSON.stringify(u);if(g.length>40)g=g.substring(0,36)+'..."';mB.warn(U.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${g}. Set mapAsMap: true to use object keys.`),U.mapKeyWarned=!0}return u}return JSON.stringify(I)}pB.addPairToJSMap=cB});var G6=E((sB)=>{var nX=ZI(),tB=CX(),aB=Ug(),Vu=$$();function eB($,I,U){let _=nX.createNode($,void 0,U),u=nX.createNode(I,void 0,U);return new Bu(_,u)}class Bu{constructor($,I=null){Object.defineProperty(this,Vu.NODE_TYPE,{value:Vu.PAIR}),this.key=$,this.value=I}clone($){let{key:I,value:U}=this;if(Vu.isNode(I))I=I.clone($);if(Vu.isNode(U))U=U.clone($);return new Bu(I,U)}toJSON($,I){let U=I?.mapAsMap?new Map:{};return aB.addPairToJSMap(I,U,this)}toString($,I,U){return $?.doc?tB.stringifyPair(this,$,I,U):JSON.stringify(this)}}sB.Pair=Bu;sB.createPair=eB});var _g=E((gM)=>{var y6=$$(),rX=FI(),Mu=AI();function uM($,I,U){return(I.inFlow??$.flow?_M:UM)($,I,U)}function UM({comment:$,items:I},U,{blockItemPrefix:_,flowChars:u,itemIndent:g,onChompKeep:z,onComment:v}){let{indent:J,options:{commentString:N}}=U,X=Object.assign({},U,{indent:g,type:null}),G=!1,q=[];for(let H=0;H<I.length;++H){let Q=I[H],Y=null;if(y6.isNode(Q)){if(!G&&Q.spaceBefore)q.push("");if(Ru(U,q,Q.commentBefore,G),Q.comment)Y=Q.comment}else if(y6.isPair(Q)){let K=y6.isNode(Q.key)?Q.key:null;if(K){if(!G&&K.spaceBefore)q.push("");Ru(U,q,K.commentBefore,G)}}G=!1;let R=rX.stringify(Q,X,()=>Y=null,()=>G=!0);if(Y)R+=Mu.lineComment(R,g,N(Y));if(G&&Y)G=!1;q.push(_+R)}let T;if(q.length===0)T=u.start+u.end;else{T=q[0];for(let H=1;H<q.length;++H){let Q=q[H];T+=Q?`
67
+ ${U.indent}`}else if(!T&&d4.isCollection(I)){let B=D[0],M=D.indexOf(`
68
+ `),F=M!==-1,A=U.inFlow??I.flow??I.items.length===0;if(F||!A){let f=!1;if(F&&(B==="&"||B==="!")){let b=D.indexOf(" ");if(B==="&"&&b!==-1&&b<M&&D[b+1]==="!")b=D.indexOf(" ",b+1);if(b===-1||M<b)f=!0}if(!f)L=`
69
+ ${U.indent}`}}else if(D===""||D[0]===`
70
+ `)L="";if(Y+=L+D,U.inFlow){if(O&&_)_()}else if(P&&!O)Y+=EI.lineComment(Y,U.indent,N(P));else if(Q&&u)u();return Y}wB.stringifyPair=SB});var ug=E((xB)=>{var kX=g$("process");function CB($,...I){if($==="debug")console.log(...I)}function fB($,I){if($==="debug"||$==="warn")if(typeof kX.emitWarning==="function")kX.emitWarning(I);else console.warn(I)}xB.debug=CB;xB.warn=fB});var Mu=E((rB)=>{var CI=$$(),yX=W$(),Du="<<",Bu={identify:($)=>$===Du||typeof $==="symbol"&&$.description===Du,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new yX.Scalar(Symbol(Du)),{addToJSMap:iX}),stringify:()=>Du},iB=($,I)=>(Bu.identify(I)||CI.isScalar(I)&&(!I.type||I.type===yX.Scalar.PLAIN)&&Bu.identify(I.value))&&$?.doc.schema.tags.some((U)=>U.tag===Bu.tag&&U.default);function iX($,I,U){if(U=$&&CI.isAlias(U)?U.resolve($.doc):U,CI.isSeq(U))for(let _ of U.items)Ug($,I,_);else if(Array.isArray(U))for(let _ of U)Ug($,I,_);else Ug($,I,U)}function Ug($,I,U){let _=$&&CI.isAlias(U)?U.resolve($.doc):U;if(!CI.isMap(_))throw Error("Merge sources must be maps or map aliases");let u=_.toJSON(null,$,Map);for(let[g,z]of u)if(I instanceof Map){if(!I.has(g))I.set(g,z)}else if(I instanceof Set)I.add(g);else if(!Object.prototype.hasOwnProperty.call(I,g))Object.defineProperty(I,g,{value:z,writable:!0,enumerable:!0,configurable:!0});return I}rB.addMergeToJSMap=iX;rB.isMergeKey=iB;rB.merge=Bu});var gg=E((oB)=>{var hB=ug(),rX=Mu(),cB=wI(),nX=$$(),_g=N6();function dB($,I,{key:U,value:_}){if(nX.isNode(U)&&U.addToJSMap)U.addToJSMap($,I,_);else if(rX.isMergeKey($,U))rX.addMergeToJSMap($,I,_);else{let u=_g.toJS(U,"",$);if(I instanceof Map)I.set(u,_g.toJS(_,u,$));else if(I instanceof Set)I.add(u);else{let g=pB(U,u,$),z=_g.toJS(_,g,$);if(g in I)Object.defineProperty(I,g,{value:z,writable:!0,enumerable:!0,configurable:!0});else I[g]=z}}return I}function pB($,I,U){if(I===null)return"";if(typeof I!=="object")return String(I);if(nX.isNode($)&&U?.doc){let _=cB.createStringifyContext(U.doc,{});_.anchors=new Set;for(let g of U.anchors.keys())_.anchors.add(g.anchor);_.inFlow=!0,_.inStringifyKey=!0;let u=$.toString(_);if(!U.mapKeyWarned){let g=JSON.stringify(u);if(g.length>40)g=g.substring(0,36)+'..."';hB.warn(U.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${g}. Set mapAsMap: true to use object keys.`),U.mapKeyWarned=!0}return u}return JSON.stringify(I)}oB.addPairToJSMap=dB});var q6=E(($M)=>{var lX=bI(),aB=xX(),eB=gg(),Ku=$$();function sB($,I,U){let _=lX.createNode($,void 0,U),u=lX.createNode(I,void 0,U);return new Ru(_,u)}class Ru{constructor($,I=null){Object.defineProperty(this,Ku.NODE_TYPE,{value:Ku.PAIR}),this.key=$,this.value=I}clone($){let{key:I,value:U}=this;if(Ku.isNode(I))I=I.clone($);if(Ku.isNode(U))U=U.clone($);return new Ru(I,U)}toJSON($,I){let U=I?.mapAsMap?new Map:{};return eB.addPairToJSMap(I,U,this)}toString($,I,U){return $?.doc?aB.stringifyPair(this,$,I,U):JSON.stringify(this)}}$M.Pair=Ru;$M.createPair=sB});var zg=E((zM)=>{var r6=$$(),mX=wI(),Lu=jI();function UM($,I,U){return(I.inFlow??$.flow?gM:_M)($,I,U)}function _M({comment:$,items:I},U,{blockItemPrefix:_,flowChars:u,itemIndent:g,onChompKeep:z,onComment:v}){let{indent:J,options:{commentString:N}}=U,X=Object.assign({},U,{indent:g,type:null}),G=!1,q=[];for(let H=0;H<I.length;++H){let Q=I[H],Y=null;if(r6.isNode(Q)){if(!G&&Q.spaceBefore)q.push("");if(Wu(U,q,Q.commentBefore,G),Q.comment)Y=Q.comment}else if(r6.isPair(Q)){let R=r6.isNode(Q.key)?Q.key:null;if(R){if(!G&&R.spaceBefore)q.push("");Wu(U,q,R.commentBefore,G)}}G=!1;let K=mX.stringify(Q,X,()=>Y=null,()=>G=!0);if(Y)K+=Lu.lineComment(K,g,N(Y));if(G&&Y)G=!1;q.push(_+K)}let T;if(q.length===0)T=u.start+u.end;else{T=q[0];for(let H=1;H<q.length;++H){let Q=q[H];T+=Q?`
71
71
  ${J}${Q}`:`
72
72
  `}}if($){if(T+=`
73
- `+Mu.indentComment(N($),J),v)v()}else if(G&&z)z();return T}function _M({items:$},I,{flowChars:U,itemIndent:_}){let{indent:u,indentStep:g,flowCollectionPadding:z,options:{commentString:v}}=I;_+=g;let J=Object.assign({},I,{indent:_,inFlow:!0,type:null}),N=!1,X=0,G=[];for(let H=0;H<$.length;++H){let Q=$[H],Y=null;if(y6.isNode(Q)){if(Q.spaceBefore)G.push("");if(Ru(I,G,Q.commentBefore,!1),Q.comment)Y=Q.comment}else if(y6.isPair(Q)){let K=y6.isNode(Q.key)?Q.key:null;if(K){if(K.spaceBefore)G.push("");if(Ru(I,G,K.commentBefore,!1),K.comment)N=!0}let W=y6.isNode(Q.value)?Q.value:null;if(W){if(W.comment)Y=W.comment;if(W.commentBefore)N=!0}else if(Q.value==null&&K?.comment)Y=K.comment}if(Y)N=!0;let R=rX.stringify(Q,J,()=>Y=null);if(H<$.length-1)R+=",";if(Y)R+=Mu.lineComment(R,_,v(Y));if(!N&&(G.length>X||R.includes(`
74
- `)))N=!0;G.push(R),X=G.length}let{start:q,end:T}=U;if(G.length===0)return q+T;else{if(!N){let H=G.reduce((Q,Y)=>Q+Y.length+2,2);N=I.options.lineWidth>0&&H>I.options.lineWidth}if(N){let H=q;for(let Q of G)H+=Q?`
73
+ `+Lu.indentComment(N($),J),v)v()}else if(G&&z)z();return T}function gM({items:$},I,{flowChars:U,itemIndent:_}){let{indent:u,indentStep:g,flowCollectionPadding:z,options:{commentString:v}}=I;_+=g;let J=Object.assign({},I,{indent:_,inFlow:!0,type:null}),N=!1,X=0,G=[];for(let H=0;H<$.length;++H){let Q=$[H],Y=null;if(r6.isNode(Q)){if(Q.spaceBefore)G.push("");if(Wu(I,G,Q.commentBefore,!1),Q.comment)Y=Q.comment}else if(r6.isPair(Q)){let R=r6.isNode(Q.key)?Q.key:null;if(R){if(R.spaceBefore)G.push("");if(Wu(I,G,R.commentBefore,!1),R.comment)N=!0}let P=r6.isNode(Q.value)?Q.value:null;if(P){if(P.comment)Y=P.comment;if(P.commentBefore)N=!0}else if(Q.value==null&&R?.comment)Y=R.comment}if(Y)N=!0;let K=mX.stringify(Q,J,()=>Y=null);if(H<$.length-1)K+=",";if(Y)K+=Lu.lineComment(K,_,v(Y));if(!N&&(G.length>X||K.includes(`
74
+ `)))N=!0;G.push(K),X=G.length}let{start:q,end:T}=U;if(G.length===0)return q+T;else{if(!N){let H=G.reduce((Q,Y)=>Q+Y.length+2,2);N=I.options.lineWidth>0&&H>I.options.lineWidth}if(N){let H=q;for(let Q of G)H+=Q?`
75
75
  ${g}${u}${Q}`:`
76
76
  `;return`${H}
77
- ${u}${T}`}else return`${q}${z}${G.join(" ")}${z}${T}`}}function Ru({indent:$,options:{commentString:I}},U,_,u){if(_&&u)_=_.replace(/^\n+/,"");if(_){let g=Mu.indentComment(I(_),$);U.push(g.trimStart())}}gM.stringifyCollection=uM});var q6=E((XM)=>{var vM=_g(),JM=Ug(),NM=qu(),X6=$$(),Ku=G6(),GM=P$();function EI($,I){let U=X6.isScalar(I)?I.value:I;for(let _ of $)if(X6.isPair(_)){if(_.key===I||_.key===U)return _;if(X6.isScalar(_.key)&&_.key.value===U)return _}return}class lX extends NM.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor($){super(X6.MAP,$);this.items=[]}static from($,I,U){let{keepUndefined:_,replacer:u}=U,g=new this($),z=(v,J)=>{if(typeof u==="function")J=u.call(I,v,J);else if(Array.isArray(u)&&!u.includes(v))return;if(J!==void 0||_)g.items.push(Ku.createPair(v,J,U))};if(I instanceof Map)for(let[v,J]of I)z(v,J);else if(I&&typeof I==="object")for(let v of Object.keys(I))z(v,I[v]);if(typeof $.sortMapEntries==="function")g.items.sort($.sortMapEntries);return g}add($,I){let U;if(X6.isPair($))U=$;else if(!$||typeof $!=="object"||!("key"in $))U=new Ku.Pair($,$?.value);else U=new Ku.Pair($.key,$.value);let _=EI(this.items,U.key),u=this.schema?.sortMapEntries;if(_){if(!I)throw Error(`Key ${U.key} already set`);if(X6.isScalar(_.value)&&GM.isScalarValue(U.value))_.value.value=U.value;else _.value=U.value}else if(u){let g=this.items.findIndex((z)=>u(U,z)<0);if(g===-1)this.items.push(U);else this.items.splice(g,0,U)}else this.items.push(U)}delete($){let I=EI(this.items,$);if(!I)return!1;return this.items.splice(this.items.indexOf(I),1).length>0}get($,I){let _=EI(this.items,$)?.value;return(!I&&X6.isScalar(_)?_.value:_)??void 0}has($){return!!EI(this.items,$)}set($,I){this.add(new Ku.Pair($,I),!0)}toJSON($,I,U){let _=U?new U:I?.mapAsMap?new Map:{};if(I?.onCreate)I.onCreate(_);for(let u of this.items)JM.addPairToJSMap(I,_,u);return _}toString($,I,U){if(!$)return JSON.stringify(this);for(let _ of this.items)if(!X6.isPair(_))throw Error(`Map items must all be pairs; found ${JSON.stringify(_)} instead`);if(!$.allNullValues&&this.hasAllNullValues(!1))$=Object.assign({},$,{allNullValues:!0});return vM.stringifyCollection(this,$,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:$.indent||"",onChompKeep:U,onComment:I})}}XM.YAMLMap=lX;XM.findPair=EI});var L1=E((YM)=>{var TM=$$(),mX=q6(),HM={collection:"map",default:!0,nodeClass:mX.YAMLMap,tag:"tag:yaml.org,2002:map",resolve($,I){if(!TM.isMap($))I("Expected a mapping for this tag");return $},createNode:($,I,U)=>mX.YAMLMap.from($,I,U)};YM.map=HM});var Q6=E((KM)=>{var DM=ZI(),VM=_g(),BM=qu(),Pu=$$(),MM=P$(),RM=v6();class hX extends BM.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor($){super(Pu.SEQ,$);this.items=[]}add($){this.items.push($)}delete($){let I=Lu($);if(typeof I!=="number")return!1;return this.items.splice(I,1).length>0}get($,I){let U=Lu($);if(typeof U!=="number")return;let _=this.items[U];return!I&&Pu.isScalar(_)?_.value:_}has($){let I=Lu($);return typeof I==="number"&&I<this.items.length}set($,I){let U=Lu($);if(typeof U!=="number")throw Error(`Expected a valid index, not ${$}.`);let _=this.items[U];if(Pu.isScalar(_)&&MM.isScalarValue(I))_.value=I;else this.items[U]=I}toJSON($,I){let U=[];if(I?.onCreate)I.onCreate(U);let _=0;for(let u of this.items)U.push(RM.toJS(u,String(_++),I));return U}toString($,I,U){if(!$)return JSON.stringify(this);return VM.stringifyCollection(this,$,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:($.indent||"")+" ",onChompKeep:U,onComment:I})}static from($,I,U){let{replacer:_}=U,u=new this($);if(I&&Symbol.iterator in Object(I)){let g=0;for(let z of I){if(typeof _==="function"){let v=I instanceof Set?z:String(g++);z=_.call(I,v,z)}u.items.push(DM.createNode(z,void 0,U))}}return u}}function Lu($){let I=Pu.isScalar($)?$.value:$;if(I&&typeof I==="string")I=Number(I);return typeof I==="number"&&Number.isInteger(I)&&I>=0?I:null}KM.YAMLSeq=hX});var P1=E((ZM)=>{var PM=$$(),cX=Q6(),WM={collection:"seq",default:!0,nodeClass:cX.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve($,I){if(!PM.isSeq($))I("Expected a sequence for this tag");return $},createNode:($,I,U)=>cX.YAMLSeq.from($,I,U)};ZM.seq=WM});var CI=E((FM)=>{var bM=jI(),jM={identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify($,I,U,_){return I=Object.assign({actualString:!0},I),bM.stringifyString($,I,U,_)}};FM.string=jM});var Wu=E((wM)=>{var dX=P$(),pX={identify:($)=>$==null,createNode:()=>new dX.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new dX.Scalar(null),stringify:({source:$},I)=>typeof $==="string"&&pX.test.test($)?$:I.options.nullStr};wM.nullTag=pX});var gg=E((fM)=>{var CM=P$(),oX={identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:($)=>new CM.Scalar($[0]==="t"||$[0]==="T"),stringify({source:$,value:I},U){if($&&oX.test.test($)){let _=$[0]==="t"||$[0]==="T";if(I===_)return $}return I?U.options.trueStr:U.options.falseStr}};fM.boolTag=oX});var W1=E((yM)=>{function kM({format:$,minFractionDigits:I,tag:U,value:_}){if(typeof _==="bigint")return String(_);let u=typeof _==="number"?_:Number(_);if(!isFinite(u))return isNaN(u)?".nan":u<0?"-.inf":".inf";let g=Object.is(_,-0)?"-0":JSON.stringify(_);if(!$&&I&&(!U||U==="tag:yaml.org,2002:float")&&/^\d/.test(g)){let z=g.indexOf(".");if(z<0)z=g.length,g+=".";let v=I-(g.length-z-1);while(v-- >0)g+="0"}return g}yM.stringifyNumber=kM});var vg=E((hM)=>{var nM=P$(),zg=W1(),rM={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:zg.stringifyNumber},lM={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($),stringify($){let I=Number($.value);return isFinite(I)?I.toExponential():zg.stringifyNumber($)}},mM={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve($){let I=new nM.Scalar(parseFloat($)),U=$.indexOf(".");if(U!==-1&&$[$.length-1]==="0")I.minFractionDigits=$.length-U-1;return I},stringify:zg.stringifyNumber};hM.float=mM;hM.floatExp=lM;hM.floatNaN=rM});var Ng=E((eM)=>{var tX=W1(),Zu=($)=>typeof $==="bigint"||Number.isInteger($),Jg=($,I,U,{intAsBigInt:_})=>_?BigInt($):parseInt($.substring(I),U);function aX($,I,U){let{value:_}=$;if(Zu(_)&&_>=0)return U+_.toString(I);return tX.stringifyNumber($)}var oM={identify:($)=>Zu($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:($,I,U)=>Jg($,2,8,U),stringify:($)=>aX($,8,"0o")},tM={identify:Zu,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:($,I,U)=>Jg($,0,10,U),stringify:tX.stringifyNumber},aM={identify:($)=>Zu($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:($,I,U)=>Jg($,2,16,U),stringify:($)=>aX($,16,"0x")};eM.int=tM;eM.intHex=aM;eM.intOct=oM});var eX=E((JR)=>{var uR=L1(),UR=Wu(),_R=P1(),gR=CI(),zR=gg(),Gg=vg(),Xg=Ng(),vR=[uR.map,_R.seq,gR.string,UR.nullTag,zR.boolTag,Xg.intOct,Xg.int,Xg.intHex,Gg.floatNaN,Gg.floatExp,Gg.float];JR.schema=vR});var $q=E((YR)=>{var GR=P$(),XR=L1(),qR=P1();function sX($){return typeof $==="bigint"||Number.isInteger($)}var Au=({value:$})=>JSON.stringify($),QR=[{identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify:Au},{identify:($)=>$==null,createNode:()=>new GR.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Au},{identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:($)=>$==="true",stringify:Au},{identify:sX,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:($,I,{intAsBigInt:U})=>U?BigInt($):parseInt($,10),stringify:({value:$})=>sX($)?$.toString():JSON.stringify($)},{identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:($)=>parseFloat($),stringify:Au}],TR={default:!0,tag:"",test:/^/,resolve($,I){return I(`Unresolved plain scalar ${JSON.stringify($)}`),$}},HR=[XR.map,qR.seq].concat(QR,TR);YR.schema=HR});var Qg=E((BR)=>{var fI=g$("buffer"),qg=P$(),DR=jI(),VR={identify:($)=>$ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve($,I){if(typeof fI.Buffer==="function")return fI.Buffer.from($,"base64");else if(typeof atob==="function"){let U=atob($.replace(/[\n\r]/g,"")),_=new Uint8Array(U.length);for(let u=0;u<U.length;++u)_[u]=U.charCodeAt(u);return _}else return I("This environment does not support reading binary tags; either Buffer or atob is required"),$},stringify({comment:$,type:I,value:U},_,u,g){if(!U)return"";let z=U,v;if(typeof fI.Buffer==="function")v=z instanceof fI.Buffer?z.toString("base64"):fI.Buffer.from(z.buffer).toString("base64");else if(typeof btoa==="function"){let J="";for(let N=0;N<z.length;++N)J+=String.fromCharCode(z[N]);v=btoa(J)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(I??(I=qg.Scalar.BLOCK_LITERAL),I!==qg.Scalar.QUOTE_DOUBLE){let J=Math.max(_.options.lineWidth-_.indent.length,_.options.minContentWidth),N=Math.ceil(v.length/J),X=Array(N);for(let G=0,q=0;G<N;++G,q+=J)X[G]=v.substr(q,J);v=X.join(I===qg.Scalar.BLOCK_LITERAL?`
78
- `:" ")}return DR.stringifyString({comment:$,type:I,value:v},_,u,g)}};BR.binary=VR});var ju=E((PR)=>{var bu=$$(),Tg=G6(),RR=P$(),KR=Q6();function Iq($,I){if(bu.isSeq($))for(let U=0;U<$.items.length;++U){let _=$.items[U];if(bu.isPair(_))continue;else if(bu.isMap(_)){if(_.items.length>1)I("Each pair must have its own sequence indicator");let u=_.items[0]||new Tg.Pair(new RR.Scalar(null));if(_.commentBefore)u.key.commentBefore=u.key.commentBefore?`${_.commentBefore}
77
+ ${u}${T}`}else return`${q}${z}${G.join(" ")}${z}${T}`}}function Wu({indent:$,options:{commentString:I}},U,_,u){if(_&&u)_=_.replace(/^\n+/,"");if(_){let g=Lu.indentComment(I(_),$);U.push(g.trimStart())}}zM.stringifyCollection=UM});var T6=E((qM)=>{var JM=zg(),NM=gg(),GM=Hu(),Q6=$$(),Pu=q6(),XM=W$();function fI($,I){let U=Q6.isScalar(I)?I.value:I;for(let _ of $)if(Q6.isPair(_)){if(_.key===I||_.key===U)return _;if(Q6.isScalar(_.key)&&_.key.value===U)return _}return}class hX extends GM.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor($){super(Q6.MAP,$);this.items=[]}static from($,I,U){let{keepUndefined:_,replacer:u}=U,g=new this($),z=(v,J)=>{if(typeof u==="function")J=u.call(I,v,J);else if(Array.isArray(u)&&!u.includes(v))return;if(J!==void 0||_)g.items.push(Pu.createPair(v,J,U))};if(I instanceof Map)for(let[v,J]of I)z(v,J);else if(I&&typeof I==="object")for(let v of Object.keys(I))z(v,I[v]);if(typeof $.sortMapEntries==="function")g.items.sort($.sortMapEntries);return g}add($,I){let U;if(Q6.isPair($))U=$;else if(!$||typeof $!=="object"||!("key"in $))U=new Pu.Pair($,$?.value);else U=new Pu.Pair($.key,$.value);let _=fI(this.items,U.key),u=this.schema?.sortMapEntries;if(_){if(!I)throw Error(`Key ${U.key} already set`);if(Q6.isScalar(_.value)&&XM.isScalarValue(U.value))_.value.value=U.value;else _.value=U.value}else if(u){let g=this.items.findIndex((z)=>u(U,z)<0);if(g===-1)this.items.push(U);else this.items.splice(g,0,U)}else this.items.push(U)}delete($){let I=fI(this.items,$);if(!I)return!1;return this.items.splice(this.items.indexOf(I),1).length>0}get($,I){let _=fI(this.items,$)?.value;return(!I&&Q6.isScalar(_)?_.value:_)??void 0}has($){return!!fI(this.items,$)}set($,I){this.add(new Pu.Pair($,I),!0)}toJSON($,I,U){let _=U?new U:I?.mapAsMap?new Map:{};if(I?.onCreate)I.onCreate(_);for(let u of this.items)NM.addPairToJSMap(I,_,u);return _}toString($,I,U){if(!$)return JSON.stringify(this);for(let _ of this.items)if(!Q6.isPair(_))throw Error(`Map items must all be pairs; found ${JSON.stringify(_)} instead`);if(!$.allNullValues&&this.hasAllNullValues(!1))$=Object.assign({},$,{allNullValues:!0});return JM.stringifyCollection(this,$,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:$.indent||"",onChompKeep:U,onComment:I})}}qM.YAMLMap=hX;qM.findPair=fI});var P1=E((OM)=>{var HM=$$(),cX=T6(),YM={collection:"map",default:!0,nodeClass:cX.YAMLMap,tag:"tag:yaml.org,2002:map",resolve($,I){if(!HM.isMap($))I("Expected a mapping for this tag");return $},createNode:($,I,U)=>cX.YAMLMap.from($,I,U)};OM.map=YM});var H6=E((LM)=>{var DM=bI(),BM=zg(),MM=Hu(),Au=$$(),KM=W$(),RM=N6();class dX extends MM.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor($){super(Au.SEQ,$);this.items=[]}add($){this.items.push($)}delete($){let I=Zu($);if(typeof I!=="number")return!1;return this.items.splice(I,1).length>0}get($,I){let U=Zu($);if(typeof U!=="number")return;let _=this.items[U];return!I&&Au.isScalar(_)?_.value:_}has($){let I=Zu($);return typeof I==="number"&&I<this.items.length}set($,I){let U=Zu($);if(typeof U!=="number")throw Error(`Expected a valid index, not ${$}.`);let _=this.items[U];if(Au.isScalar(_)&&KM.isScalarValue(I))_.value=I;else this.items[U]=I}toJSON($,I){let U=[];if(I?.onCreate)I.onCreate(U);let _=0;for(let u of this.items)U.push(RM.toJS(u,String(_++),I));return U}toString($,I,U){if(!$)return JSON.stringify(this);return BM.stringifyCollection(this,$,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:($.indent||"")+" ",onChompKeep:U,onComment:I})}static from($,I,U){let{replacer:_}=U,u=new this($);if(I&&Symbol.iterator in Object(I)){let g=0;for(let z of I){if(typeof _==="function"){let v=I instanceof Set?z:String(g++);z=_.call(I,v,z)}u.items.push(DM.createNode(z,void 0,U))}}return u}}function Zu($){let I=Au.isScalar($)?$.value:$;if(I&&typeof I==="string")I=Number(I);return typeof I==="number"&&Number.isInteger(I)&&I>=0?I:null}LM.YAMLSeq=dX});var Z1=E((AM)=>{var PM=$$(),pX=H6(),ZM={collection:"seq",default:!0,nodeClass:pX.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve($,I){if(!PM.isSeq($))I("Expected a sequence for this tag");return $},createNode:($,I,U)=>pX.YAMLSeq.from($,I,U)};AM.seq=ZM});var xI=E((SM)=>{var jM=SI(),FM={identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify($,I,U,_){return I=Object.assign({actualString:!0},I),jM.stringifyString($,I,U,_)}};SM.string=FM});var bu=E((EM)=>{var oX=W$(),tX={identify:($)=>$==null,createNode:()=>new oX.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new oX.Scalar(null),stringify:({source:$},I)=>typeof $==="string"&&tX.test.test($)?$:I.options.nullStr};EM.nullTag=tX});var vg=E((xM)=>{var fM=W$(),aX={identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:($)=>new fM.Scalar($[0]==="t"||$[0]==="T"),stringify({source:$,value:I},U){if($&&aX.test.test($)){let _=$[0]==="t"||$[0]==="T";if(I===_)return $}return I?U.options.trueStr:U.options.falseStr}};xM.boolTag=aX});var A1=E((iM)=>{function yM({format:$,minFractionDigits:I,tag:U,value:_}){if(typeof _==="bigint")return String(_);let u=typeof _==="number"?_:Number(_);if(!isFinite(u))return isNaN(u)?".nan":u<0?"-.inf":".inf";let g=Object.is(_,-0)?"-0":JSON.stringify(_);if(!$&&I&&(!U||U==="tag:yaml.org,2002:float")&&/^\d/.test(g)){let z=g.indexOf(".");if(z<0)z=g.length,g+=".";let v=I-(g.length-z-1);while(v-- >0)g+="0"}return g}iM.stringifyNumber=yM});var Ng=E((cM)=>{var nM=W$(),Jg=A1(),lM={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Jg.stringifyNumber},mM={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($),stringify($){let I=Number($.value);return isFinite(I)?I.toExponential():Jg.stringifyNumber($)}},hM={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve($){let I=new nM.Scalar(parseFloat($)),U=$.indexOf(".");if(U!==-1&&$[$.length-1]==="0")I.minFractionDigits=$.length-U-1;return I},stringify:Jg.stringifyNumber};cM.float=hM;cM.floatExp=mM;cM.floatNaN=lM});var Xg=E((sM)=>{var eX=A1(),ju=($)=>typeof $==="bigint"||Number.isInteger($),Gg=($,I,U,{intAsBigInt:_})=>_?BigInt($):parseInt($.substring(I),U);function sX($,I,U){let{value:_}=$;if(ju(_)&&_>=0)return U+_.toString(I);return eX.stringifyNumber($)}var tM={identify:($)=>ju($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:($,I,U)=>Gg($,2,8,U),stringify:($)=>sX($,8,"0o")},aM={identify:ju,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:($,I,U)=>Gg($,0,10,U),stringify:eX.stringifyNumber},eM={identify:($)=>ju($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:($,I,U)=>Gg($,2,16,U),stringify:($)=>sX($,16,"0x")};sM.int=aM;sM.intHex=eM;sM.intOct=tM});var $q=E((NK)=>{var UK=P1(),_K=bu(),gK=Z1(),zK=xI(),vK=vg(),qg=Ng(),Qg=Xg(),JK=[UK.map,gK.seq,zK.string,_K.nullTag,vK.boolTag,Qg.intOct,Qg.int,Qg.intHex,qg.floatNaN,qg.floatExp,qg.float];NK.schema=JK});var uq=E((OK)=>{var XK=W$(),qK=P1(),QK=Z1();function Iq($){return typeof $==="bigint"||Number.isInteger($)}var Fu=({value:$})=>JSON.stringify($),TK=[{identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify:Fu},{identify:($)=>$==null,createNode:()=>new XK.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Fu},{identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:($)=>$==="true",stringify:Fu},{identify:Iq,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:($,I,{intAsBigInt:U})=>U?BigInt($):parseInt($,10),stringify:({value:$})=>Iq($)?$.toString():JSON.stringify($)},{identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:($)=>parseFloat($),stringify:Fu}],HK={default:!0,tag:"",test:/^/,resolve($,I){return I(`Unresolved plain scalar ${JSON.stringify($)}`),$}},YK=[qK.map,QK.seq].concat(TK,HK);OK.schema=YK});var Hg=E((MK)=>{var kI=g$("buffer"),Tg=W$(),DK=SI(),BK={identify:($)=>$ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve($,I){if(typeof kI.Buffer==="function")return kI.Buffer.from($,"base64");else if(typeof atob==="function"){let U=atob($.replace(/[\n\r]/g,"")),_=new Uint8Array(U.length);for(let u=0;u<U.length;++u)_[u]=U.charCodeAt(u);return _}else return I("This environment does not support reading binary tags; either Buffer or atob is required"),$},stringify({comment:$,type:I,value:U},_,u,g){if(!U)return"";let z=U,v;if(typeof kI.Buffer==="function")v=z instanceof kI.Buffer?z.toString("base64"):kI.Buffer.from(z.buffer).toString("base64");else if(typeof btoa==="function"){let J="";for(let N=0;N<z.length;++N)J+=String.fromCharCode(z[N]);v=btoa(J)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(I??(I=Tg.Scalar.BLOCK_LITERAL),I!==Tg.Scalar.QUOTE_DOUBLE){let J=Math.max(_.options.lineWidth-_.indent.length,_.options.minContentWidth),N=Math.ceil(v.length/J),X=Array(N);for(let G=0,q=0;G<N;++G,q+=J)X[G]=v.substr(q,J);v=X.join(I===Tg.Scalar.BLOCK_LITERAL?`
78
+ `:" ")}return DK.stringifyString({comment:$,type:I,value:v},_,u,g)}};MK.binary=BK});var wu=E((PK)=>{var Su=$$(),Yg=q6(),RK=W$(),LK=H6();function Uq($,I){if(Su.isSeq($))for(let U=0;U<$.items.length;++U){let _=$.items[U];if(Su.isPair(_))continue;else if(Su.isMap(_)){if(_.items.length>1)I("Each pair must have its own sequence indicator");let u=_.items[0]||new Yg.Pair(new RK.Scalar(null));if(_.commentBefore)u.key.commentBefore=u.key.commentBefore?`${_.commentBefore}
79
79
  ${u.key.commentBefore}`:_.commentBefore;if(_.comment){let g=u.value??u.key;g.comment=g.comment?`${_.comment}
80
- ${g.comment}`:_.comment}_=u}$.items[U]=bu.isPair(_)?_:new Tg.Pair(_)}else I("Expected a sequence for this tag");return $}function uq($,I,U){let{replacer:_}=U,u=new KR.YAMLSeq($);u.tag="tag:yaml.org,2002:pairs";let g=0;if(I&&Symbol.iterator in Object(I))for(let z of I){if(typeof _==="function")z=_.call(I,String(g++),z);let v,J;if(Array.isArray(z))if(z.length===2)v=z[0],J=z[1];else throw TypeError(`Expected [key, value] tuple: ${z}`);else if(z&&z instanceof Object){let N=Object.keys(z);if(N.length===1)v=N[0],J=z[v];else throw TypeError(`Expected tuple with one key, not ${N.length} keys`)}else v=z;u.items.push(Tg.createPair(v,J,U))}return u}var LR={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Iq,createNode:uq};PR.createPairs=uq;PR.pairs=LR;PR.resolvePairs=Iq});var Yg=E((FR)=>{var Uq=$$(),Hg=v6(),xI=q6(),bR=Q6(),_q=ju();class i6 extends bR.YAMLSeq{constructor(){super();this.add=xI.YAMLMap.prototype.add.bind(this),this.delete=xI.YAMLMap.prototype.delete.bind(this),this.get=xI.YAMLMap.prototype.get.bind(this),this.has=xI.YAMLMap.prototype.has.bind(this),this.set=xI.YAMLMap.prototype.set.bind(this),this.tag=i6.tag}toJSON($,I){if(!I)return super.toJSON($);let U=new Map;if(I?.onCreate)I.onCreate(U);for(let _ of this.items){let u,g;if(Uq.isPair(_))u=Hg.toJS(_.key,"",I),g=Hg.toJS(_.value,u,I);else u=Hg.toJS(_,"",I);if(U.has(u))throw Error("Ordered maps must not include duplicate keys");U.set(u,g)}return U}static from($,I,U){let _=_q.createPairs($,I,U),u=new this;return u.items=_.items,u}}i6.tag="tag:yaml.org,2002:omap";var jR={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:i6,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,I){let U=_q.resolvePairs($,I),_=[];for(let{key:u}of U.items)if(Uq.isScalar(u))if(_.includes(u.value))I(`Ordered maps must not include duplicate keys: ${u.value}`);else _.push(u.value);return Object.assign(new i6,U)},createNode:($,I,U)=>i6.from($,I,U)};FR.YAMLOMap=i6;FR.omap=jR});var Nq=E((ER)=>{var gq=P$();function zq({value:$,source:I},U){if(I&&($?vq:Jq).test.test(I))return I;return $?U.options.trueStr:U.options.falseStr}var vq={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new gq.Scalar(!0),stringify:zq},Jq={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new gq.Scalar(!1),stringify:zq};ER.falseTag=Jq;ER.trueTag=vq});var Gq=E((nR)=>{var xR=P$(),Og=W1(),kR={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Og.stringifyNumber},yR={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($.replace(/_/g,"")),stringify($){let I=Number($.value);return isFinite(I)?I.toExponential():Og.stringifyNumber($)}},iR={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let I=new xR.Scalar(parseFloat($.replace(/_/g,""))),U=$.indexOf(".");if(U!==-1){let _=$.substring(U+1).replace(/_/g,"");if(_[_.length-1]==="0")I.minFractionDigits=_.length}return I},stringify:Og.stringifyNumber};nR.float=iR;nR.floatExp=yR;nR.floatNaN=kR});var qq=E((oR)=>{var Xq=W1(),kI=($)=>typeof $==="bigint"||Number.isInteger($);function Fu($,I,U,{intAsBigInt:_}){let u=$[0];if(u==="-"||u==="+")I+=1;if($=$.substring(I).replace(/_/g,""),_){switch(U){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let z=BigInt($);return u==="-"?BigInt(-1)*z:z}let g=parseInt($,U);return u==="-"?-1*g:g}function Dg($,I,U){let{value:_}=$;if(kI(_)){let u=_.toString(I);return _<0?"-"+U+u.substr(1):U+u}return Xq.stringifyNumber($)}var hR={identify:kI,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,I,U)=>Fu($,2,2,U),stringify:($)=>Dg($,2,"0b")},cR={identify:kI,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,I,U)=>Fu($,1,8,U),stringify:($)=>Dg($,8,"0")},dR={identify:kI,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,I,U)=>Fu($,0,10,U),stringify:Xq.stringifyNumber},pR={identify:kI,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,I,U)=>Fu($,2,16,U),stringify:($)=>Dg($,16,"0x")};oR.int=dR;oR.intBin=hR;oR.intHex=pR;oR.intOct=cR});var Vg=E((IK)=>{var Eu=$$(),Su=G6(),wu=q6();class n6 extends wu.YAMLMap{constructor($){super($);this.tag=n6.tag}add($){let I;if(Eu.isPair($))I=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)I=new Su.Pair($.key,null);else I=new Su.Pair($,null);if(!wu.findPair(this.items,I.key))this.items.push(I)}get($,I){let U=wu.findPair(this.items,$);return!I&&Eu.isPair(U)?Eu.isScalar(U.key)?U.key.value:U.key:U}set($,I){if(typeof I!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof I}`);let U=wu.findPair(this.items,$);if(U&&!I)this.items.splice(this.items.indexOf(U),1);else if(!U&&I)this.items.push(new Su.Pair($))}toJSON($,I){return super.toJSON($,I,Set)}toString($,I,U){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),I,U);else throw Error("Set items must all have null values")}static from($,I,U){let{replacer:_}=U,u=new this($);if(I&&Symbol.iterator in Object(I))for(let g of I){if(typeof _==="function")g=_.call(I,g,g);u.items.push(Su.createPair(g,null,U))}return u}}n6.tag="tag:yaml.org,2002:set";var $K={collection:"map",identify:($)=>$ instanceof Set,nodeClass:n6,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,I,U)=>n6.from($,I,U),resolve($,I){if(Eu.isMap($))if($.hasAllNullValues(!0))return Object.assign(new n6,$);else I("Set items must all have null values");else I("Expected a mapping for this tag");return $}};IK.YAMLSet=n6;IK.set=$K});var Mg=E((vK)=>{var _K=W1();function Bg($,I){let U=$[0],_=U==="-"||U==="+"?$.substring(1):$,u=(z)=>I?BigInt(z):Number(z),g=_.replace(/_/g,"").split(":").reduce((z,v)=>z*u(60)+u(v),u(0));return U==="-"?u(-1)*g:g}function Qq($){let{value:I}=$,U=(z)=>z;if(typeof I==="bigint")U=(z)=>BigInt(z);else if(isNaN(I)||!isFinite(I))return _K.stringifyNumber($);let _="";if(I<0)_="-",I*=U(-1);let u=U(60),g=[I%u];if(I<60)g.unshift(0);else if(I=(I-g[0])/u,g.unshift(I%u),I>=60)I=(I-g[0])/u,g.unshift(I);return _+g.map((z)=>String(z).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var gK={identify:($)=>typeof $==="bigint"||Number.isInteger($),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:($,I,{intAsBigInt:U})=>Bg($,U),stringify:Qq},zK={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:($)=>Bg($,!1),stringify:Qq},Tq={identify:($)=>$ instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve($){let I=$.match(Tq.test);if(!I)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,U,_,u,g,z,v]=I.map(Number),J=I[7]?Number((I[7]+"00").substr(1,3)):0,N=Date.UTC(U,_-1,u,g||0,z||0,v||0,J),X=I[8];if(X&&X!=="Z"){let G=Bg(X,!1);if(Math.abs(G)<30)G*=60;N-=60000*G}return new Date(N)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};vK.floatTime=zK;vK.intTime=gK;vK.timestamp=Tq});var Yq=E((MK)=>{var XK=L1(),qK=Wu(),QK=P1(),TK=CI(),HK=Qg(),Hq=Nq(),Rg=Gq(),Cu=qq(),YK=Du(),OK=Yg(),DK=ju(),VK=Vg(),Kg=Mg(),BK=[XK.map,QK.seq,TK.string,qK.nullTag,Hq.trueTag,Hq.falseTag,Cu.intBin,Cu.intOct,Cu.int,Cu.intHex,Rg.floatNaN,Rg.floatExp,Rg.float,HK.binary,YK.merge,OK.omap,DK.pairs,VK.set,Kg.intTime,Kg.floatTime,Kg.timestamp];MK.schema=BK});var Wq=E((jK)=>{var Bq=L1(),KK=Wu(),Mq=P1(),LK=CI(),PK=gg(),Lg=vg(),Pg=Ng(),WK=eX(),ZK=$q(),Rq=Qg(),yI=Du(),Kq=Yg(),Lq=ju(),Oq=Yq(),Pq=Vg(),fu=Mg(),Dq=new Map([["core",WK.schema],["failsafe",[Bq.map,Mq.seq,LK.string]],["json",ZK.schema],["yaml11",Oq.schema],["yaml-1.1",Oq.schema]]),Vq={binary:Rq.binary,bool:PK.boolTag,float:Lg.float,floatExp:Lg.floatExp,floatNaN:Lg.floatNaN,floatTime:fu.floatTime,int:Pg.int,intHex:Pg.intHex,intOct:Pg.intOct,intTime:fu.intTime,map:Bq.map,merge:yI.merge,null:KK.nullTag,omap:Kq.omap,pairs:Lq.pairs,seq:Mq.seq,set:Pq.set,timestamp:fu.timestamp},AK={"tag:yaml.org,2002:binary":Rq.binary,"tag:yaml.org,2002:merge":yI.merge,"tag:yaml.org,2002:omap":Kq.omap,"tag:yaml.org,2002:pairs":Lq.pairs,"tag:yaml.org,2002:set":Pq.set,"tag:yaml.org,2002:timestamp":fu.timestamp};function bK($,I,U){let _=Dq.get(I);if(_&&!$)return U&&!_.includes(yI.merge)?_.concat(yI.merge):_.slice();let u=_;if(!u)if(Array.isArray($))u=[];else{let g=Array.from(Dq.keys()).filter((z)=>z!=="yaml11").map((z)=>JSON.stringify(z)).join(", ");throw Error(`Unknown schema "${I}"; use one of ${g} or define customTags array`)}if(Array.isArray($))for(let g of $)u=u.concat(g);else if(typeof $==="function")u=$(u.slice());if(U)u=u.concat(yI.merge);return u.reduce((g,z)=>{let v=typeof z==="string"?Vq[z]:z;if(!v){let J=JSON.stringify(z),N=Object.keys(Vq).map((X)=>JSON.stringify(X)).join(", ");throw Error(`Unknown custom tag ${J}; use one of ${N}`)}if(!g.includes(v))g.push(v);return g},[])}jK.coreKnownTags=AK;jK.getTags=bK});var Ag=E((xK)=>{var Wg=$$(),wK=L1(),EK=P1(),CK=CI(),xu=Wq(),fK=($,I)=>$.key<I.key?-1:$.key>I.key?1:0;class Zg{constructor({compat:$,customTags:I,merge:U,resolveKnownTags:_,schema:u,sortMapEntries:g,toStringDefaults:z}){this.compat=Array.isArray($)?xu.getTags($,"compat"):$?xu.getTags(null,$):null,this.name=typeof u==="string"&&u||"core",this.knownTags=_?xu.coreKnownTags:{},this.tags=xu.getTags(I,this.name,U),this.toStringOptions=z??null,Object.defineProperty(this,Wg.MAP,{value:wK.map}),Object.defineProperty(this,Wg.SCALAR,{value:CK.string}),Object.defineProperty(this,Wg.SEQ,{value:EK.seq}),this.sortMapEntries=typeof g==="function"?g:g===!0?fK:null}clone(){let $=Object.create(Zg.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}xK.Schema=Zg});var Zq=E((nK)=>{var yK=$$(),bg=FI(),iI=AI();function iK($,I){let U=[],_=I.directives===!0;if(I.directives!==!1&&$.directives){let J=$.directives.toString($);if(J)U.push(J),_=!0;else if($.directives.docStart)_=!0}if(_)U.push("---");let u=bg.createStringifyContext($,I),{commentString:g}=u.options;if($.commentBefore){if(U.length!==1)U.unshift("");let J=g($.commentBefore);U.unshift(iI.indentComment(J,""))}let z=!1,v=null;if($.contents){if(yK.isNode($.contents)){if($.contents.spaceBefore&&_)U.push("");if($.contents.commentBefore){let X=g($.contents.commentBefore);U.push(iI.indentComment(X,""))}u.forceBlockIndent=!!$.comment,v=$.contents.comment}let J=v?void 0:()=>z=!0,N=bg.stringify($.contents,u,()=>v=null,J);if(v)N+=iI.lineComment(N,"",g(v));if((N[0]==="|"||N[0]===">")&&U[U.length-1]==="---")U[U.length-1]=`--- ${N}`;else U.push(N)}else U.push(bg.stringify($.contents,u));if($.directives?.docEnd)if($.comment){let J=g($.comment);if(J.includes(`
81
- `))U.push("..."),U.push(iI.indentComment(J,""));else U.push(`... ${J}`)}else U.push("...");else{let J=$.comment;if(J&&z)J=J.replace(/^\n+/,"");if(J){if((!z||v)&&U[U.length-1]!=="")U.push("");U.push(iI.indentComment(g(J),""))}}return U.join(`
80
+ ${g.comment}`:_.comment}_=u}$.items[U]=Su.isPair(_)?_:new Yg.Pair(_)}else I("Expected a sequence for this tag");return $}function _q($,I,U){let{replacer:_}=U,u=new LK.YAMLSeq($);u.tag="tag:yaml.org,2002:pairs";let g=0;if(I&&Symbol.iterator in Object(I))for(let z of I){if(typeof _==="function")z=_.call(I,String(g++),z);let v,J;if(Array.isArray(z))if(z.length===2)v=z[0],J=z[1];else throw TypeError(`Expected [key, value] tuple: ${z}`);else if(z&&z instanceof Object){let N=Object.keys(z);if(N.length===1)v=N[0],J=z[v];else throw TypeError(`Expected tuple with one key, not ${N.length} keys`)}else v=z;u.items.push(Yg.createPair(v,J,U))}return u}var WK={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Uq,createNode:_q};PK.createPairs=_q;PK.pairs=WK;PK.resolvePairs=Uq});var Vg=E((SK)=>{var gq=$$(),Og=N6(),yI=T6(),jK=H6(),zq=wu();class n6 extends jK.YAMLSeq{constructor(){super();this.add=yI.YAMLMap.prototype.add.bind(this),this.delete=yI.YAMLMap.prototype.delete.bind(this),this.get=yI.YAMLMap.prototype.get.bind(this),this.has=yI.YAMLMap.prototype.has.bind(this),this.set=yI.YAMLMap.prototype.set.bind(this),this.tag=n6.tag}toJSON($,I){if(!I)return super.toJSON($);let U=new Map;if(I?.onCreate)I.onCreate(U);for(let _ of this.items){let u,g;if(gq.isPair(_))u=Og.toJS(_.key,"",I),g=Og.toJS(_.value,u,I);else u=Og.toJS(_,"",I);if(U.has(u))throw Error("Ordered maps must not include duplicate keys");U.set(u,g)}return U}static from($,I,U){let _=zq.createPairs($,I,U),u=new this;return u.items=_.items,u}}n6.tag="tag:yaml.org,2002:omap";var FK={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:n6,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,I){let U=zq.resolvePairs($,I),_=[];for(let{key:u}of U.items)if(gq.isScalar(u))if(_.includes(u.value))I(`Ordered maps must not include duplicate keys: ${u.value}`);else _.push(u.value);return Object.assign(new n6,U)},createNode:($,I,U)=>n6.from($,I,U)};SK.YAMLOMap=n6;SK.omap=FK});var Xq=E((CK)=>{var vq=W$();function Jq({value:$,source:I},U){if(I&&($?Nq:Gq).test.test(I))return I;return $?U.options.trueStr:U.options.falseStr}var Nq={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new vq.Scalar(!0),stringify:Jq},Gq={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new vq.Scalar(!1),stringify:Jq};CK.falseTag=Gq;CK.trueTag=Nq});var qq=E((nK)=>{var kK=W$(),Dg=A1(),yK={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Dg.stringifyNumber},iK={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($.replace(/_/g,"")),stringify($){let I=Number($.value);return isFinite(I)?I.toExponential():Dg.stringifyNumber($)}},rK={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let I=new kK.Scalar(parseFloat($.replace(/_/g,""))),U=$.indexOf(".");if(U!==-1){let _=$.substring(U+1).replace(/_/g,"");if(_[_.length-1]==="0")I.minFractionDigits=_.length}return I},stringify:Dg.stringifyNumber};nK.float=rK;nK.floatExp=iK;nK.floatNaN=yK});var Tq=E((tK)=>{var Qq=A1(),iI=($)=>typeof $==="bigint"||Number.isInteger($);function Eu($,I,U,{intAsBigInt:_}){let u=$[0];if(u==="-"||u==="+")I+=1;if($=$.substring(I).replace(/_/g,""),_){switch(U){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let z=BigInt($);return u==="-"?BigInt(-1)*z:z}let g=parseInt($,U);return u==="-"?-1*g:g}function Bg($,I,U){let{value:_}=$;if(iI(_)){let u=_.toString(I);return _<0?"-"+U+u.substr(1):U+u}return Qq.stringifyNumber($)}var cK={identify:iI,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,I,U)=>Eu($,2,2,U),stringify:($)=>Bg($,2,"0b")},dK={identify:iI,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,I,U)=>Eu($,1,8,U),stringify:($)=>Bg($,8,"0")},pK={identify:iI,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,I,U)=>Eu($,0,10,U),stringify:Qq.stringifyNumber},oK={identify:iI,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,I,U)=>Eu($,2,16,U),stringify:($)=>Bg($,16,"0x")};tK.int=pK;tK.intBin=cK;tK.intHex=oK;tK.intOct=dK});var Mg=E((uR)=>{var xu=$$(),Cu=q6(),fu=T6();class l6 extends fu.YAMLMap{constructor($){super($);this.tag=l6.tag}add($){let I;if(xu.isPair($))I=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)I=new Cu.Pair($.key,null);else I=new Cu.Pair($,null);if(!fu.findPair(this.items,I.key))this.items.push(I)}get($,I){let U=fu.findPair(this.items,$);return!I&&xu.isPair(U)?xu.isScalar(U.key)?U.key.value:U.key:U}set($,I){if(typeof I!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof I}`);let U=fu.findPair(this.items,$);if(U&&!I)this.items.splice(this.items.indexOf(U),1);else if(!U&&I)this.items.push(new Cu.Pair($))}toJSON($,I){return super.toJSON($,I,Set)}toString($,I,U){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),I,U);else throw Error("Set items must all have null values")}static from($,I,U){let{replacer:_}=U,u=new this($);if(I&&Symbol.iterator in Object(I))for(let g of I){if(typeof _==="function")g=_.call(I,g,g);u.items.push(Cu.createPair(g,null,U))}return u}}l6.tag="tag:yaml.org,2002:set";var IR={collection:"map",identify:($)=>$ instanceof Set,nodeClass:l6,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,I,U)=>l6.from($,I,U),resolve($,I){if(xu.isMap($))if($.hasAllNullValues(!0))return Object.assign(new l6,$);else I("Set items must all have null values");else I("Expected a mapping for this tag");return $}};uR.YAMLSet=l6;uR.set=IR});var Rg=E((JR)=>{var gR=A1();function Kg($,I){let U=$[0],_=U==="-"||U==="+"?$.substring(1):$,u=(z)=>I?BigInt(z):Number(z),g=_.replace(/_/g,"").split(":").reduce((z,v)=>z*u(60)+u(v),u(0));return U==="-"?u(-1)*g:g}function Hq($){let{value:I}=$,U=(z)=>z;if(typeof I==="bigint")U=(z)=>BigInt(z);else if(isNaN(I)||!isFinite(I))return gR.stringifyNumber($);let _="";if(I<0)_="-",I*=U(-1);let u=U(60),g=[I%u];if(I<60)g.unshift(0);else if(I=(I-g[0])/u,g.unshift(I%u),I>=60)I=(I-g[0])/u,g.unshift(I);return _+g.map((z)=>String(z).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var zR={identify:($)=>typeof $==="bigint"||Number.isInteger($),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:($,I,{intAsBigInt:U})=>Kg($,U),stringify:Hq},vR={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:($)=>Kg($,!1),stringify:Hq},Yq={identify:($)=>$ instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve($){let I=$.match(Yq.test);if(!I)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,U,_,u,g,z,v]=I.map(Number),J=I[7]?Number((I[7]+"00").substr(1,3)):0,N=Date.UTC(U,_-1,u,g||0,z||0,v||0,J),X=I[8];if(X&&X!=="Z"){let G=Kg(X,!1);if(Math.abs(G)<30)G*=60;N-=60000*G}return new Date(N)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};JR.floatTime=vR;JR.intTime=zR;JR.timestamp=Yq});var Vq=E((KR)=>{var qR=P1(),QR=bu(),TR=Z1(),HR=xI(),YR=Hg(),Oq=Xq(),Lg=qq(),ku=Tq(),OR=Mu(),VR=Vg(),DR=wu(),BR=Mg(),Wg=Rg(),MR=[qR.map,TR.seq,HR.string,QR.nullTag,Oq.trueTag,Oq.falseTag,ku.intBin,ku.intOct,ku.int,ku.intHex,Lg.floatNaN,Lg.floatExp,Lg.float,YR.binary,OR.merge,VR.omap,DR.pairs,BR.set,Wg.intTime,Wg.floatTime,Wg.timestamp];KR.schema=MR});var Aq=E((FR)=>{var Kq=P1(),LR=bu(),Rq=Z1(),WR=xI(),PR=vg(),Pg=Ng(),Zg=Xg(),ZR=$q(),AR=uq(),Lq=Hg(),rI=Mu(),Wq=Vg(),Pq=wu(),Dq=Vq(),Zq=Mg(),yu=Rg(),Bq=new Map([["core",ZR.schema],["failsafe",[Kq.map,Rq.seq,WR.string]],["json",AR.schema],["yaml11",Dq.schema],["yaml-1.1",Dq.schema]]),Mq={binary:Lq.binary,bool:PR.boolTag,float:Pg.float,floatExp:Pg.floatExp,floatNaN:Pg.floatNaN,floatTime:yu.floatTime,int:Zg.int,intHex:Zg.intHex,intOct:Zg.intOct,intTime:yu.intTime,map:Kq.map,merge:rI.merge,null:LR.nullTag,omap:Wq.omap,pairs:Pq.pairs,seq:Rq.seq,set:Zq.set,timestamp:yu.timestamp},bR={"tag:yaml.org,2002:binary":Lq.binary,"tag:yaml.org,2002:merge":rI.merge,"tag:yaml.org,2002:omap":Wq.omap,"tag:yaml.org,2002:pairs":Pq.pairs,"tag:yaml.org,2002:set":Zq.set,"tag:yaml.org,2002:timestamp":yu.timestamp};function jR($,I,U){let _=Bq.get(I);if(_&&!$)return U&&!_.includes(rI.merge)?_.concat(rI.merge):_.slice();let u=_;if(!u)if(Array.isArray($))u=[];else{let g=Array.from(Bq.keys()).filter((z)=>z!=="yaml11").map((z)=>JSON.stringify(z)).join(", ");throw Error(`Unknown schema "${I}"; use one of ${g} or define customTags array`)}if(Array.isArray($))for(let g of $)u=u.concat(g);else if(typeof $==="function")u=$(u.slice());if(U)u=u.concat(rI.merge);return u.reduce((g,z)=>{let v=typeof z==="string"?Mq[z]:z;if(!v){let J=JSON.stringify(z),N=Object.keys(Mq).map((X)=>JSON.stringify(X)).join(", ");throw Error(`Unknown custom tag ${J}; use one of ${N}`)}if(!g.includes(v))g.push(v);return g},[])}FR.coreKnownTags=bR;FR.getTags=jR});var jg=E((kR)=>{var Ag=$$(),ER=P1(),CR=Z1(),fR=xI(),iu=Aq(),xR=($,I)=>$.key<I.key?-1:$.key>I.key?1:0;class bg{constructor({compat:$,customTags:I,merge:U,resolveKnownTags:_,schema:u,sortMapEntries:g,toStringDefaults:z}){this.compat=Array.isArray($)?iu.getTags($,"compat"):$?iu.getTags(null,$):null,this.name=typeof u==="string"&&u||"core",this.knownTags=_?iu.coreKnownTags:{},this.tags=iu.getTags(I,this.name,U),this.toStringOptions=z??null,Object.defineProperty(this,Ag.MAP,{value:ER.map}),Object.defineProperty(this,Ag.SCALAR,{value:fR.string}),Object.defineProperty(this,Ag.SEQ,{value:CR.seq}),this.sortMapEntries=typeof g==="function"?g:g===!0?xR:null}clone(){let $=Object.create(bg.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}kR.Schema=bg});var bq=E((nR)=>{var iR=$$(),Fg=wI(),nI=jI();function rR($,I){let U=[],_=I.directives===!0;if(I.directives!==!1&&$.directives){let J=$.directives.toString($);if(J)U.push(J),_=!0;else if($.directives.docStart)_=!0}if(_)U.push("---");let u=Fg.createStringifyContext($,I),{commentString:g}=u.options;if($.commentBefore){if(U.length!==1)U.unshift("");let J=g($.commentBefore);U.unshift(nI.indentComment(J,""))}let z=!1,v=null;if($.contents){if(iR.isNode($.contents)){if($.contents.spaceBefore&&_)U.push("");if($.contents.commentBefore){let X=g($.contents.commentBefore);U.push(nI.indentComment(X,""))}u.forceBlockIndent=!!$.comment,v=$.contents.comment}let J=v?void 0:()=>z=!0,N=Fg.stringify($.contents,u,()=>v=null,J);if(v)N+=nI.lineComment(N,"",g(v));if((N[0]==="|"||N[0]===">")&&U[U.length-1]==="---")U[U.length-1]=`--- ${N}`;else U.push(N)}else U.push(Fg.stringify($.contents,u));if($.directives?.docEnd)if($.comment){let J=g($.comment);if(J.includes(`
81
+ `))U.push("..."),U.push(nI.indentComment(J,""));else U.push(`... ${J}`)}else U.push("...");else{let J=$.comment;if(J&&z)J=J.replace(/^\n+/,"");if(J){if((!z||v)&&U[U.length-1]!=="")U.push("");U.push(nI.indentComment(g(J),""))}}return U.join(`
82
82
  `)+`
83
- `}nK.stringifyDocument=iK});var nI=E((tK)=>{var lK=WI(),Z1=qu(),X4=$$(),mK=G6(),hK=v6(),cK=Ag(),dK=Zq(),jg=Nu(),pK=o2(),oK=ZI(),Fg=p2();class Sg{constructor($,I,U){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,X4.NODE_TYPE,{value:X4.DOC});let _=null;if(typeof I==="function"||Array.isArray(I))_=I;else if(U===void 0&&I)U=I,I=void 0;let u=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},U);this.options=u;let{version:g}=u;if(U?._directives){if(this.directives=U._directives.atDocument(),this.directives.yaml.explicit)g=this.directives.yaml.version}else this.directives=new Fg.Directives({version:g});this.setSchema(g,U),this.contents=$===void 0?null:this.createNode($,_,U)}clone(){let $=Object.create(Sg.prototype,{[X4.NODE_TYPE]:{value:X4.DOC}});if($.commentBefore=this.commentBefore,$.comment=this.comment,$.errors=this.errors.slice(),$.warnings=this.warnings.slice(),$.options=Object.assign({},this.options),this.directives)$.directives=this.directives.clone();if($.schema=this.schema.clone(),$.contents=X4.isNode(this.contents)?this.contents.clone($.schema):this.contents,this.range)$.range=this.range.slice();return $}add($){if(A1(this.contents))this.contents.add($)}addIn($,I){if(A1(this.contents))this.contents.addIn($,I)}createAlias($,I){if(!$.anchor){let U=jg.anchorNames(this);$.anchor=!I||U.has(I)?jg.findNewAnchor(I||"a",U):I}return new lK.Alias($.anchor)}createNode($,I,U){let _=void 0;if(typeof I==="function")$=I.call({"":$},"",$),_=I;else if(Array.isArray(I)){let Q=(R)=>typeof R==="number"||R instanceof String||R instanceof Number,Y=I.filter(Q).map(String);if(Y.length>0)I=I.concat(Y);_=I}else if(U===void 0&&I)U=I,I=void 0;let{aliasDuplicateObjects:u,anchorPrefix:g,flow:z,keepUndefined:v,onTagObj:J,tag:N}=U??{},{onAnchor:X,setAnchors:G,sourceObjects:q}=jg.createNodeAnchors(this,g||"a"),T={aliasDuplicateObjects:u??!0,keepUndefined:v??!1,onAnchor:X,onTagObj:J,replacer:_,schema:this.schema,sourceObjects:q},H=oK.createNode($,N,T);if(z&&X4.isCollection(H))H.flow=!0;return G(),H}createPair($,I,U={}){let _=this.createNode($,null,U),u=this.createNode(I,null,U);return new mK.Pair(_,u)}delete($){return A1(this.contents)?this.contents.delete($):!1}deleteIn($){if(Z1.isEmptyPath($)){if(this.contents==null)return!1;return this.contents=null,!0}return A1(this.contents)?this.contents.deleteIn($):!1}get($,I){return X4.isCollection(this.contents)?this.contents.get($,I):void 0}getIn($,I){if(Z1.isEmptyPath($))return!I&&X4.isScalar(this.contents)?this.contents.value:this.contents;return X4.isCollection(this.contents)?this.contents.getIn($,I):void 0}has($){return X4.isCollection(this.contents)?this.contents.has($):!1}hasIn($){if(Z1.isEmptyPath($))return this.contents!==void 0;return X4.isCollection(this.contents)?this.contents.hasIn($):!1}set($,I){if(this.contents==null)this.contents=Z1.collectionFromPath(this.schema,[$],I);else if(A1(this.contents))this.contents.set($,I)}setIn($,I){if(Z1.isEmptyPath($))this.contents=I;else if(this.contents==null)this.contents=Z1.collectionFromPath(this.schema,Array.from($),I);else if(A1(this.contents))this.contents.setIn($,I)}setSchema($,I={}){if(typeof $==="number")$=String($);let U;switch($){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new Fg.Directives({version:"1.1"});U={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=$;else this.directives=new Fg.Directives({version:$});U={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;U=null;break;default:{let _=JSON.stringify($);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${_}`)}}if(I.schema instanceof Object)this.schema=I.schema;else if(U)this.schema=new cK.Schema(Object.assign(U,I));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:$,jsonArg:I,mapAsMap:U,maxAliasCount:_,onAnchor:u,reviver:g}={}){let z={anchors:new Map,doc:this,keep:!$,mapAsMap:U===!0,mapKeyWarned:!1,maxAliasCount:typeof _==="number"?_:100},v=hK.toJS(this.contents,I??"",z);if(typeof u==="function")for(let{count:J,res:N}of z.anchors.values())u(N,J);return typeof g==="function"?pK.applyReviver(g,{"":v},"",v):v}toJSON($,I){return this.toJS({json:!0,jsonArg:$,mapAsMap:!1,onAnchor:I})}toString($={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in $&&(!Number.isInteger($.indent)||Number($.indent)<=0)){let I=JSON.stringify($.indent);throw Error(`"indent" option must be a positive integer, not ${I}`)}return dK.stringifyDocument(this,$)}}function A1($){if(X4.isCollection($))return!0;throw Error("Expected a YAML collection as document contents")}tK.Document=Sg});var rI=E((sK)=>{class ku extends Error{constructor($,I,U,_){super();this.name=$,this.code=U,this.message=_,this.pos=I}}class Aq extends ku{constructor($,I,U){super("YAMLParseError",$,I,U)}}class bq extends ku{constructor($,I,U){super("YAMLWarning",$,I,U)}}var eK=($,I)=>(U)=>{if(U.pos[0]===-1)return;U.linePos=U.pos.map((v)=>I.linePos(v));let{line:_,col:u}=U.linePos[0];U.message+=` at line ${_}, column ${u}`;let g=u-1,z=$.substring(I.lineStarts[_-1],I.lineStarts[_]).replace(/[\n\r]+$/,"");if(g>=60&&z.length>80){let v=Math.min(g-39,z.length-79);z="…"+z.substring(v),g-=v-1}if(z.length>80)z=z.substring(0,79)+"…";if(_>1&&/^ *$/.test(z.substring(0,g))){let v=$.substring(I.lineStarts[_-2],I.lineStarts[_-1]);if(v.length>80)v=v.substring(0,79)+`…
83
+ `}nR.stringifyDocument=rR});var lI=E((aR)=>{var mR=AI(),b1=Hu(),Q4=$$(),hR=q6(),cR=N6(),dR=jg(),pR=bq(),Sg=qu(),oR=a2(),tR=bI(),wg=t2();class Eg{constructor($,I,U){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Q4.NODE_TYPE,{value:Q4.DOC});let _=null;if(typeof I==="function"||Array.isArray(I))_=I;else if(U===void 0&&I)U=I,I=void 0;let u=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},U);this.options=u;let{version:g}=u;if(U?._directives){if(this.directives=U._directives.atDocument(),this.directives.yaml.explicit)g=this.directives.yaml.version}else this.directives=new wg.Directives({version:g});this.setSchema(g,U),this.contents=$===void 0?null:this.createNode($,_,U)}clone(){let $=Object.create(Eg.prototype,{[Q4.NODE_TYPE]:{value:Q4.DOC}});if($.commentBefore=this.commentBefore,$.comment=this.comment,$.errors=this.errors.slice(),$.warnings=this.warnings.slice(),$.options=Object.assign({},this.options),this.directives)$.directives=this.directives.clone();if($.schema=this.schema.clone(),$.contents=Q4.isNode(this.contents)?this.contents.clone($.schema):this.contents,this.range)$.range=this.range.slice();return $}add($){if(j1(this.contents))this.contents.add($)}addIn($,I){if(j1(this.contents))this.contents.addIn($,I)}createAlias($,I){if(!$.anchor){let U=Sg.anchorNames(this);$.anchor=!I||U.has(I)?Sg.findNewAnchor(I||"a",U):I}return new mR.Alias($.anchor)}createNode($,I,U){let _=void 0;if(typeof I==="function")$=I.call({"":$},"",$),_=I;else if(Array.isArray(I)){let Q=(K)=>typeof K==="number"||K instanceof String||K instanceof Number,Y=I.filter(Q).map(String);if(Y.length>0)I=I.concat(Y);_=I}else if(U===void 0&&I)U=I,I=void 0;let{aliasDuplicateObjects:u,anchorPrefix:g,flow:z,keepUndefined:v,onTagObj:J,tag:N}=U??{},{onAnchor:X,setAnchors:G,sourceObjects:q}=Sg.createNodeAnchors(this,g||"a"),T={aliasDuplicateObjects:u??!0,keepUndefined:v??!1,onAnchor:X,onTagObj:J,replacer:_,schema:this.schema,sourceObjects:q},H=tR.createNode($,N,T);if(z&&Q4.isCollection(H))H.flow=!0;return G(),H}createPair($,I,U={}){let _=this.createNode($,null,U),u=this.createNode(I,null,U);return new hR.Pair(_,u)}delete($){return j1(this.contents)?this.contents.delete($):!1}deleteIn($){if(b1.isEmptyPath($)){if(this.contents==null)return!1;return this.contents=null,!0}return j1(this.contents)?this.contents.deleteIn($):!1}get($,I){return Q4.isCollection(this.contents)?this.contents.get($,I):void 0}getIn($,I){if(b1.isEmptyPath($))return!I&&Q4.isScalar(this.contents)?this.contents.value:this.contents;return Q4.isCollection(this.contents)?this.contents.getIn($,I):void 0}has($){return Q4.isCollection(this.contents)?this.contents.has($):!1}hasIn($){if(b1.isEmptyPath($))return this.contents!==void 0;return Q4.isCollection(this.contents)?this.contents.hasIn($):!1}set($,I){if(this.contents==null)this.contents=b1.collectionFromPath(this.schema,[$],I);else if(j1(this.contents))this.contents.set($,I)}setIn($,I){if(b1.isEmptyPath($))this.contents=I;else if(this.contents==null)this.contents=b1.collectionFromPath(this.schema,Array.from($),I);else if(j1(this.contents))this.contents.setIn($,I)}setSchema($,I={}){if(typeof $==="number")$=String($);let U;switch($){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new wg.Directives({version:"1.1"});U={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=$;else this.directives=new wg.Directives({version:$});U={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;U=null;break;default:{let _=JSON.stringify($);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${_}`)}}if(I.schema instanceof Object)this.schema=I.schema;else if(U)this.schema=new dR.Schema(Object.assign(U,I));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:$,jsonArg:I,mapAsMap:U,maxAliasCount:_,onAnchor:u,reviver:g}={}){let z={anchors:new Map,doc:this,keep:!$,mapAsMap:U===!0,mapKeyWarned:!1,maxAliasCount:typeof _==="number"?_:100},v=cR.toJS(this.contents,I??"",z);if(typeof u==="function")for(let{count:J,res:N}of z.anchors.values())u(N,J);return typeof g==="function"?oR.applyReviver(g,{"":v},"",v):v}toJSON($,I){return this.toJS({json:!0,jsonArg:$,mapAsMap:!1,onAnchor:I})}toString($={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in $&&(!Number.isInteger($.indent)||Number($.indent)<=0)){let I=JSON.stringify($.indent);throw Error(`"indent" option must be a positive integer, not ${I}`)}return pR.stringifyDocument(this,$)}}function j1($){if(Q4.isCollection($))return!0;throw Error("Expected a YAML collection as document contents")}aR.Document=Eg});var mI=E(($L)=>{class ru extends Error{constructor($,I,U,_){super();this.name=$,this.code=U,this.message=_,this.pos=I}}class jq extends ru{constructor($,I,U){super("YAMLParseError",$,I,U)}}class Fq extends ru{constructor($,I,U){super("YAMLWarning",$,I,U)}}var sR=($,I)=>(U)=>{if(U.pos[0]===-1)return;U.linePos=U.pos.map((v)=>I.linePos(v));let{line:_,col:u}=U.linePos[0];U.message+=` at line ${_}, column ${u}`;let g=u-1,z=$.substring(I.lineStarts[_-1],I.lineStarts[_]).replace(/[\n\r]+$/,"");if(g>=60&&z.length>80){let v=Math.min(g-39,z.length-79);z="…"+z.substring(v),g-=v-1}if(z.length>80)z=z.substring(0,79)+"…";if(_>1&&/^ *$/.test(z.substring(0,g))){let v=$.substring(I.lineStarts[_-2],I.lineStarts[_-1]);if(v.length>80)v=v.substring(0,79)+`…
84
84
  `;z=v+z}if(/[^ ]/.test(z)){let v=1,J=U.linePos[1];if(J?.line===_&&J.col>u)v=Math.max(1,Math.min(J.col-u,80-g));let N=" ".repeat(g)+"^".repeat(v);U.message+=`:
85
85
 
86
86
  ${z}
87
87
  ${N}
88
- `}};sK.YAMLError=ku;sK.YAMLParseError=Aq;sK.YAMLWarning=bq;sK.prettifyError=eK});var lI=E((gL)=>{function _L($,{flow:I,indicator:U,next:_,offset:u,onError:g,parentIndent:z,startOnNewline:v}){let J=!1,N=v,X=v,G="",q="",T=!1,H=!1,Q=null,Y=null,R=null,K=null,W=null,O=null,V=null;for(let M of $){if(H){if(M.type!=="space"&&M.type!=="newline"&&M.type!=="comma")g(M.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");H=!1}if(Q){if(N&&M.type!=="comment"&&M.type!=="newline")g(Q,"TAB_AS_INDENT","Tabs are not allowed as indentation");Q=null}switch(M.type){case"space":if(!I&&(U!=="doc-start"||_?.type!=="flow-collection")&&M.source.includes("\t"))Q=M;X=!0;break;case"comment":{if(!X)g(M,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let F=M.source.substring(1)||" ";if(!G)G=F;else G+=q+F;q="",N=!1;break}case"newline":if(N){if(G)G+=M.source;else if(!O||U!=="seq-item-ind")J=!0}else q+=M.source;if(N=!0,T=!0,Y||R)K=M;X=!0;break;case"anchor":if(Y)g(M,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(M.source.endsWith(":"))g(M.offset+M.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);Y=M,V??(V=M.offset),N=!1,X=!1,H=!0;break;case"tag":{if(R)g(M,"MULTIPLE_TAGS","A node can have at most one tag");R=M,V??(V=M.offset),N=!1,X=!1,H=!0;break}case U:if(Y||R)g(M,"BAD_PROP_ORDER",`Anchors and tags must be after the ${M.source} indicator`);if(O)g(M,"UNEXPECTED_TOKEN",`Unexpected ${M.source} in ${I??"collection"}`);O=M,N=U==="seq-item-ind"||U==="explicit-key-ind",X=!1;break;case"comma":if(I){if(W)g(M,"UNEXPECTED_TOKEN",`Unexpected , in ${I}`);W=M,N=!1,X=!1;break}default:g(M,"UNEXPECTED_TOKEN",`Unexpected ${M.type} token`),N=!1,X=!1}}let L=$[$.length-1],B=L?L.offset+L.source.length:u;if(H&&_&&_.type!=="space"&&_.type!=="newline"&&_.type!=="comma"&&(_.type!=="scalar"||_.source!==""))g(_.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(Q&&(N&&Q.indent<=z||_?.type==="block-map"||_?.type==="block-seq"))g(Q,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:W,found:O,spaceBefore:J,comment:G,hasNewline:T,anchor:Y,tag:R,newlineAfterProp:K,end:B,start:V??B}}gL.resolveProps=_L});var yu=E((vL)=>{function wg($){if(!$)return null;switch($.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if($.source.includes(`
89
- `))return!0;if($.end){for(let I of $.end)if(I.type==="newline")return!0}return!1;case"flow-collection":for(let I of $.items){for(let U of I.start)if(U.type==="newline")return!0;if(I.sep){for(let U of I.sep)if(U.type==="newline")return!0}if(wg(I.key)||wg(I.value))return!0}return!1;default:return!0}}vL.containsNewline=wg});var Eg=E((XL)=>{var NL=yu();function GL($,I,U){if(I?.type==="flow-collection"){let _=I.end[0];if(_.indent===$&&(_.source==="]"||_.source==="}")&&NL.containsNewline(I))U(_,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}XL.flowIndentCheck=GL});var Cg=E((TL)=>{var jq=$$();function QL($,I,U){let{uniqueKeys:_}=$.options;if(_===!1)return!1;let u=typeof _==="function"?_:(g,z)=>g===z||jq.isScalar(g)&&jq.isScalar(z)&&g.value===z.value;return I.some((g)=>u(g.key,U))}TL.mapIncludes=QL});var Cq=E((BL)=>{var Fq=G6(),YL=q6(),Sq=lI(),OL=yu(),wq=Eg(),DL=Cg(),Eq="All mapping items must start at the same column";function VL({composeNode:$,composeEmptyNode:I},U,_,u,g){let v=new(g?.nodeClass??YL.YAMLMap)(U.schema);if(U.atRoot)U.atRoot=!1;let J=_.offset,N=null;for(let X of _.items){let{start:G,key:q,sep:T,value:H}=X,Q=Sq.resolveProps(G,{indicator:"explicit-key-ind",next:q??T?.[0],offset:J,onError:u,parentIndent:_.indent,startOnNewline:!0}),Y=!Q.found;if(Y){if(q){if(q.type==="block-seq")u(J,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in q&&q.indent!==_.indent)u(J,"BAD_INDENT",Eq)}if(!Q.anchor&&!Q.tag&&!T){if(N=Q.end,Q.comment)if(v.comment)v.comment+=`
90
- `+Q.comment;else v.comment=Q.comment;continue}if(Q.newlineAfterProp||OL.containsNewline(q))u(q??G[G.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(Q.found?.indent!==_.indent)u(J,"BAD_INDENT",Eq);U.atKey=!0;let R=Q.end,K=q?$(U,q,Q,u):I(U,R,G,null,Q,u);if(U.schema.compat)wq.flowIndentCheck(_.indent,q,u);if(U.atKey=!1,DL.mapIncludes(U,v.items,K))u(R,"DUPLICATE_KEY","Map keys must be unique");let W=Sq.resolveProps(T??[],{indicator:"map-value-ind",next:H,offset:K.range[2],onError:u,parentIndent:_.indent,startOnNewline:!q||q.type==="block-scalar"});if(J=W.end,W.found){if(Y){if(H?.type==="block-map"&&!W.hasNewline)u(J,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(U.options.strict&&Q.start<W.found.offset-1024)u(K.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let O=H?$(U,H,W,u):I(U,J,T,null,W,u);if(U.schema.compat)wq.flowIndentCheck(_.indent,H,u);J=O.range[2];let V=new Fq.Pair(K,O);if(U.options.keepSourceTokens)V.srcToken=X;v.items.push(V)}else{if(Y)u(K.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(W.comment)if(K.comment)K.comment+=`
91
- `+W.comment;else K.comment=W.comment;let O=new Fq.Pair(K);if(U.options.keepSourceTokens)O.srcToken=X;v.items.push(O)}}if(N&&N<J)u(N,"IMPOSSIBLE","Map comment with trailing content");return v.range=[_.offset,J,N??J],v}BL.resolveBlockMap=VL});var fq=E((WL)=>{var RL=Q6(),KL=lI(),LL=Eg();function PL({composeNode:$,composeEmptyNode:I},U,_,u,g){let v=new(g?.nodeClass??RL.YAMLSeq)(U.schema);if(U.atRoot)U.atRoot=!1;if(U.atKey)U.atKey=!1;let J=_.offset,N=null;for(let{start:X,value:G}of _.items){let q=KL.resolveProps(X,{indicator:"seq-item-ind",next:G,offset:J,onError:u,parentIndent:_.indent,startOnNewline:!0});if(!q.found)if(q.anchor||q.tag||G)if(G?.type==="block-seq")u(q.end,"BAD_INDENT","All sequence items must start at the same column");else u(J,"MISSING_CHAR","Sequence item without - indicator");else{if(N=q.end,q.comment)v.comment=q.comment;continue}let T=G?$(U,G,q,u):I(U,q.end,X,null,q,u);if(U.schema.compat)LL.flowIndentCheck(_.indent,G,u);J=T.range[2],v.items.push(T)}return v.range=[_.offset,J,N??J],v}WL.resolveBlockSeq=PL});var b1=E((bL)=>{function AL($,I,U,_){let u="";if($){let g=!1,z="";for(let v of $){let{source:J,type:N}=v;switch(N){case"space":g=!0;break;case"comment":{if(U&&!g)_(v,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let X=J.substring(1)||" ";if(!u)u=X;else u+=z+X;z="";break}case"newline":if(u)z+=J;g=!0;break;default:_(v,"UNEXPECTED_TOKEN",`Unexpected ${N} at node end`)}I+=J.length}}return{comment:u,offset:I}}bL.resolveEnd=AL});var yq=E((kL)=>{var FL=$$(),SL=G6(),xq=q6(),wL=Q6(),EL=b1(),kq=lI(),CL=yu(),fL=Cg(),fg="Block collections are not allowed within flow collections",xg=($)=>$&&($.type==="block-map"||$.type==="block-seq");function xL({composeNode:$,composeEmptyNode:I},U,_,u,g){let z=_.start.source==="{",v=z?"flow map":"flow sequence",N=new(g?.nodeClass??(z?xq.YAMLMap:wL.YAMLSeq))(U.schema);N.flow=!0;let X=U.atRoot;if(X)U.atRoot=!1;if(U.atKey)U.atKey=!1;let G=_.offset+_.start.source.length;for(let Y=0;Y<_.items.length;++Y){let R=_.items[Y],{start:K,key:W,sep:O,value:V}=R,L=kq.resolveProps(K,{flow:v,indicator:"explicit-key-ind",next:W??O?.[0],offset:G,onError:u,parentIndent:_.indent,startOnNewline:!1});if(!L.found){if(!L.anchor&&!L.tag&&!O&&!V){if(Y===0&&L.comma)u(L.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${v}`);else if(Y<_.items.length-1)u(L.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${v}`);if(L.comment)if(N.comment)N.comment+=`
92
- `+L.comment;else N.comment=L.comment;G=L.end;continue}if(!z&&U.options.strict&&CL.containsNewline(W))u(W,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(Y===0){if(L.comma)u(L.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${v}`)}else{if(!L.comma)u(L.start,"MISSING_CHAR",`Missing , between ${v} items`);if(L.comment){let B="";$:for(let M of K)switch(M.type){case"comma":case"space":break;case"comment":B=M.source.substring(1);break $;default:break $}if(B){let M=N.items[N.items.length-1];if(FL.isPair(M))M=M.value??M.key;if(M.comment)M.comment+=`
93
- `+B;else M.comment=B;L.comment=L.comment.substring(B.length+1)}}}if(!z&&!O&&!L.found){let B=V?$(U,V,L,u):I(U,L.end,O,null,L,u);if(N.items.push(B),G=B.range[2],xg(V))u(B.range,"BLOCK_IN_FLOW",fg)}else{U.atKey=!0;let B=L.end,M=W?$(U,W,L,u):I(U,B,K,null,L,u);if(xg(W))u(M.range,"BLOCK_IN_FLOW",fg);U.atKey=!1;let F=kq.resolveProps(O??[],{flow:v,indicator:"map-value-ind",next:V,offset:M.range[2],onError:u,parentIndent:_.indent,startOnNewline:!1});if(F.found){if(!z&&!L.found&&U.options.strict){if(O)for(let b of O){if(b===F.found)break;if(b.type==="newline"){u(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(L.start<F.found.offset-1024)u(F.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(V)if("source"in V&&V.source?.[0]===":")u(V,"MISSING_CHAR",`Missing space after : in ${v}`);else u(F.start,"MISSING_CHAR",`Missing , or : between ${v} items`);let A=V?$(U,V,F,u):F.found?I(U,F.end,O,null,F,u):null;if(A){if(xg(V))u(A.range,"BLOCK_IN_FLOW",fg)}else if(F.comment)if(M.comment)M.comment+=`
94
- `+F.comment;else M.comment=F.comment;let f=new SL.Pair(M,A);if(U.options.keepSourceTokens)f.srcToken=R;if(z){let b=N;if(fL.mapIncludes(U,b.items,M))u(B,"DUPLICATE_KEY","Map keys must be unique");b.items.push(f)}else{let b=new xq.YAMLMap(U.schema);b.flow=!0,b.items.push(f);let u$=(A??M).range;b.range=[M.range[0],u$[1],u$[2]],N.items.push(b)}G=A?A.range[2]:F.end}}let q=z?"}":"]",[T,...H]=_.end,Q=G;if(T?.source===q)Q=T.offset+T.source.length;else{let Y=v[0].toUpperCase()+v.substring(1),R=X?`${Y} must end with a ${q}`:`${Y} in block collection must be sufficiently indented and end with a ${q}`;if(u(G,X?"MISSING_CHAR":"BAD_INDENT",R),T&&T.source.length!==1)H.unshift(T)}if(H.length>0){let Y=EL.resolveEnd(H,Q,U.options.strict,u);if(Y.comment)if(N.comment)N.comment+=`
95
- `+Y.comment;else N.comment=Y.comment;N.range=[_.offset,Q,Y.offset]}else N.range=[_.offset,Q,Q];return N}kL.resolveFlowCollection=xL});var iq=E((pL)=>{var iL=$$(),nL=P$(),rL=q6(),lL=Q6(),mL=Cq(),hL=fq(),cL=yq();function kg($,I,U,_,u,g){let z=U.type==="block-map"?mL.resolveBlockMap($,I,U,_,g):U.type==="block-seq"?hL.resolveBlockSeq($,I,U,_,g):cL.resolveFlowCollection($,I,U,_,g),v=z.constructor;if(u==="!"||u===v.tagName)return z.tag=v.tagName,z;if(u)z.tag=u;return z}function dL($,I,U,_,u){let g=_.tag,z=!g?null:I.directives.tagName(g.source,(q)=>u(g,"TAG_RESOLVE_FAILED",q));if(U.type==="block-seq"){let{anchor:q,newlineAfterProp:T}=_,H=q&&g?q.offset>g.offset?q:g:q??g;if(H&&(!T||T.offset<H.offset))u(H,"MISSING_CHAR","Missing newline after block sequence props")}let v=U.type==="block-map"?"map":U.type==="block-seq"?"seq":U.start.source==="{"?"map":"seq";if(!g||!z||z==="!"||z===rL.YAMLMap.tagName&&v==="map"||z===lL.YAMLSeq.tagName&&v==="seq")return kg($,I,U,u,z);let J=I.schema.tags.find((q)=>q.tag===z&&q.collection===v);if(!J){let q=I.schema.knownTags[z];if(q?.collection===v)I.schema.tags.push(Object.assign({},q,{default:!1})),J=q;else{if(q)u(g,"BAD_COLLECTION_TYPE",`${q.tag} used for ${v} collection, but expects ${q.collection??"scalar"}`,!0);else u(g,"TAG_RESOLVE_FAILED",`Unresolved tag: ${z}`,!0);return kg($,I,U,u,z)}}let N=kg($,I,U,u,z,J),X=J.resolve?.(N,(q)=>u(g,"TAG_RESOLVE_FAILED",q),I.options)??N,G=iL.isNode(X)?X:new nL.Scalar(X);if(G.range=N.range,G.tag=z,J?.format)G.format=J.format;return G}pL.composeCollection=dL});var ig=E((sL)=>{var yg=P$();function tL($,I,U){let _=I.offset,u=aL(I,$.options.strict,U);if(!u)return{value:"",type:null,comment:"",range:[_,_,_]};let g=u.mode===">"?yg.Scalar.BLOCK_FOLDED:yg.Scalar.BLOCK_LITERAL,z=I.source?eL(I.source):[],v=z.length;for(let Q=z.length-1;Q>=0;--Q){let Y=z[Q][1];if(Y===""||Y==="\r")v=Q;else break}if(v===0){let Q=u.chomp==="+"&&z.length>0?`
96
- `.repeat(Math.max(1,z.length-1)):"",Y=_+u.length;if(I.source)Y+=I.source.length;return{value:Q,type:g,comment:u.comment,range:[_,Y,Y]}}let J=I.indent+u.indent,N=I.offset+u.length,X=0;for(let Q=0;Q<v;++Q){let[Y,R]=z[Q];if(R===""||R==="\r"){if(u.indent===0&&Y.length>J)J=Y.length}else{if(Y.length<J)U(N+Y.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(u.indent===0)J=Y.length;if(X=Q,J===0&&!$.atRoot)U(N,"BAD_INDENT","Block scalar values in collections must be indented");break}N+=Y.length+R.length+1}for(let Q=z.length-1;Q>=v;--Q)if(z[Q][0].length>J)v=Q+1;let G="",q="",T=!1;for(let Q=0;Q<X;++Q)G+=z[Q][0].slice(J)+`
97
- `;for(let Q=X;Q<v;++Q){let[Y,R]=z[Q];N+=Y.length+R.length+1;let K=R[R.length-1]==="\r";if(K)R=R.slice(0,-1);if(R&&Y.length<J){let O=`Block scalar lines must not be less indented than their ${u.indent?"explicit indentation indicator":"first line"}`;U(N-R.length-(K?2:1),"BAD_INDENT",O),Y=""}if(g===yg.Scalar.BLOCK_LITERAL)G+=q+Y.slice(J)+R,q=`
98
- `;else if(Y.length>J||R[0]==="\t"){if(q===" ")q=`
88
+ `}};$L.YAMLError=ru;$L.YAMLParseError=jq;$L.YAMLWarning=Fq;$L.prettifyError=sR});var hI=E((zL)=>{function gL($,{flow:I,indicator:U,next:_,offset:u,onError:g,parentIndent:z,startOnNewline:v}){let J=!1,N=v,X=v,G="",q="",T=!1,H=!1,Q=null,Y=null,K=null,R=null,P=null,O=null,D=null;for(let M of $){if(H){if(M.type!=="space"&&M.type!=="newline"&&M.type!=="comma")g(M.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");H=!1}if(Q){if(N&&M.type!=="comment"&&M.type!=="newline")g(Q,"TAB_AS_INDENT","Tabs are not allowed as indentation");Q=null}switch(M.type){case"space":if(!I&&(U!=="doc-start"||_?.type!=="flow-collection")&&M.source.includes("\t"))Q=M;X=!0;break;case"comment":{if(!X)g(M,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let F=M.source.substring(1)||" ";if(!G)G=F;else G+=q+F;q="",N=!1;break}case"newline":if(N){if(G)G+=M.source;else if(!O||U!=="seq-item-ind")J=!0}else q+=M.source;if(N=!0,T=!0,Y||K)R=M;X=!0;break;case"anchor":if(Y)g(M,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(M.source.endsWith(":"))g(M.offset+M.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);Y=M,D??(D=M.offset),N=!1,X=!1,H=!0;break;case"tag":{if(K)g(M,"MULTIPLE_TAGS","A node can have at most one tag");K=M,D??(D=M.offset),N=!1,X=!1,H=!0;break}case U:if(Y||K)g(M,"BAD_PROP_ORDER",`Anchors and tags must be after the ${M.source} indicator`);if(O)g(M,"UNEXPECTED_TOKEN",`Unexpected ${M.source} in ${I??"collection"}`);O=M,N=U==="seq-item-ind"||U==="explicit-key-ind",X=!1;break;case"comma":if(I){if(P)g(M,"UNEXPECTED_TOKEN",`Unexpected , in ${I}`);P=M,N=!1,X=!1;break}default:g(M,"UNEXPECTED_TOKEN",`Unexpected ${M.type} token`),N=!1,X=!1}}let L=$[$.length-1],B=L?L.offset+L.source.length:u;if(H&&_&&_.type!=="space"&&_.type!=="newline"&&_.type!=="comma"&&(_.type!=="scalar"||_.source!==""))g(_.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(Q&&(N&&Q.indent<=z||_?.type==="block-map"||_?.type==="block-seq"))g(Q,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:P,found:O,spaceBefore:J,comment:G,hasNewline:T,anchor:Y,tag:K,newlineAfterProp:R,end:B,start:D??B}}zL.resolveProps=gL});var nu=E((JL)=>{function Cg($){if(!$)return null;switch($.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if($.source.includes(`
89
+ `))return!0;if($.end){for(let I of $.end)if(I.type==="newline")return!0}return!1;case"flow-collection":for(let I of $.items){for(let U of I.start)if(U.type==="newline")return!0;if(I.sep){for(let U of I.sep)if(U.type==="newline")return!0}if(Cg(I.key)||Cg(I.value))return!0}return!1;default:return!0}}JL.containsNewline=Cg});var fg=E((qL)=>{var GL=nu();function XL($,I,U){if(I?.type==="flow-collection"){let _=I.end[0];if(_.indent===$&&(_.source==="]"||_.source==="}")&&GL.containsNewline(I))U(_,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}qL.flowIndentCheck=XL});var xg=E((HL)=>{var Sq=$$();function TL($,I,U){let{uniqueKeys:_}=$.options;if(_===!1)return!1;let u=typeof _==="function"?_:(g,z)=>g===z||Sq.isScalar(g)&&Sq.isScalar(z)&&g.value===z.value;return I.some((g)=>u(g.key,U))}HL.mapIncludes=TL});var xq=E((ML)=>{var wq=q6(),OL=T6(),Eq=hI(),VL=nu(),Cq=fg(),DL=xg(),fq="All mapping items must start at the same column";function BL({composeNode:$,composeEmptyNode:I},U,_,u,g){let v=new(g?.nodeClass??OL.YAMLMap)(U.schema);if(U.atRoot)U.atRoot=!1;let J=_.offset,N=null;for(let X of _.items){let{start:G,key:q,sep:T,value:H}=X,Q=Eq.resolveProps(G,{indicator:"explicit-key-ind",next:q??T?.[0],offset:J,onError:u,parentIndent:_.indent,startOnNewline:!0}),Y=!Q.found;if(Y){if(q){if(q.type==="block-seq")u(J,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in q&&q.indent!==_.indent)u(J,"BAD_INDENT",fq)}if(!Q.anchor&&!Q.tag&&!T){if(N=Q.end,Q.comment)if(v.comment)v.comment+=`
90
+ `+Q.comment;else v.comment=Q.comment;continue}if(Q.newlineAfterProp||VL.containsNewline(q))u(q??G[G.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(Q.found?.indent!==_.indent)u(J,"BAD_INDENT",fq);U.atKey=!0;let K=Q.end,R=q?$(U,q,Q,u):I(U,K,G,null,Q,u);if(U.schema.compat)Cq.flowIndentCheck(_.indent,q,u);if(U.atKey=!1,DL.mapIncludes(U,v.items,R))u(K,"DUPLICATE_KEY","Map keys must be unique");let P=Eq.resolveProps(T??[],{indicator:"map-value-ind",next:H,offset:R.range[2],onError:u,parentIndent:_.indent,startOnNewline:!q||q.type==="block-scalar"});if(J=P.end,P.found){if(Y){if(H?.type==="block-map"&&!P.hasNewline)u(J,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(U.options.strict&&Q.start<P.found.offset-1024)u(R.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let O=H?$(U,H,P,u):I(U,J,T,null,P,u);if(U.schema.compat)Cq.flowIndentCheck(_.indent,H,u);J=O.range[2];let D=new wq.Pair(R,O);if(U.options.keepSourceTokens)D.srcToken=X;v.items.push(D)}else{if(Y)u(R.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(P.comment)if(R.comment)R.comment+=`
91
+ `+P.comment;else R.comment=P.comment;let O=new wq.Pair(R);if(U.options.keepSourceTokens)O.srcToken=X;v.items.push(O)}}if(N&&N<J)u(N,"IMPOSSIBLE","Map comment with trailing content");return v.range=[_.offset,J,N??J],v}ML.resolveBlockMap=BL});var kq=E((ZL)=>{var RL=H6(),LL=hI(),WL=fg();function PL({composeNode:$,composeEmptyNode:I},U,_,u,g){let v=new(g?.nodeClass??RL.YAMLSeq)(U.schema);if(U.atRoot)U.atRoot=!1;if(U.atKey)U.atKey=!1;let J=_.offset,N=null;for(let{start:X,value:G}of _.items){let q=LL.resolveProps(X,{indicator:"seq-item-ind",next:G,offset:J,onError:u,parentIndent:_.indent,startOnNewline:!0});if(!q.found)if(q.anchor||q.tag||G)if(G?.type==="block-seq")u(q.end,"BAD_INDENT","All sequence items must start at the same column");else u(J,"MISSING_CHAR","Sequence item without - indicator");else{if(N=q.end,q.comment)v.comment=q.comment;continue}let T=G?$(U,G,q,u):I(U,q.end,X,null,q,u);if(U.schema.compat)WL.flowIndentCheck(_.indent,G,u);J=T.range[2],v.items.push(T)}return v.range=[_.offset,J,N??J],v}ZL.resolveBlockSeq=PL});var F1=E((jL)=>{function bL($,I,U,_){let u="";if($){let g=!1,z="";for(let v of $){let{source:J,type:N}=v;switch(N){case"space":g=!0;break;case"comment":{if(U&&!g)_(v,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let X=J.substring(1)||" ";if(!u)u=X;else u+=z+X;z="";break}case"newline":if(u)z+=J;g=!0;break;default:_(v,"UNEXPECTED_TOKEN",`Unexpected ${N} at node end`)}I+=J.length}}return{comment:u,offset:I}}jL.resolveEnd=bL});var rq=E((yL)=>{var SL=$$(),wL=q6(),yq=T6(),EL=H6(),CL=F1(),iq=hI(),fL=nu(),xL=xg(),kg="Block collections are not allowed within flow collections",yg=($)=>$&&($.type==="block-map"||$.type==="block-seq");function kL({composeNode:$,composeEmptyNode:I},U,_,u,g){let z=_.start.source==="{",v=z?"flow map":"flow sequence",N=new(g?.nodeClass??(z?yq.YAMLMap:EL.YAMLSeq))(U.schema);N.flow=!0;let X=U.atRoot;if(X)U.atRoot=!1;if(U.atKey)U.atKey=!1;let G=_.offset+_.start.source.length;for(let Y=0;Y<_.items.length;++Y){let K=_.items[Y],{start:R,key:P,sep:O,value:D}=K,L=iq.resolveProps(R,{flow:v,indicator:"explicit-key-ind",next:P??O?.[0],offset:G,onError:u,parentIndent:_.indent,startOnNewline:!1});if(!L.found){if(!L.anchor&&!L.tag&&!O&&!D){if(Y===0&&L.comma)u(L.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${v}`);else if(Y<_.items.length-1)u(L.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${v}`);if(L.comment)if(N.comment)N.comment+=`
92
+ `+L.comment;else N.comment=L.comment;G=L.end;continue}if(!z&&U.options.strict&&fL.containsNewline(P))u(P,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(Y===0){if(L.comma)u(L.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${v}`)}else{if(!L.comma)u(L.start,"MISSING_CHAR",`Missing , between ${v} items`);if(L.comment){let B="";$:for(let M of R)switch(M.type){case"comma":case"space":break;case"comment":B=M.source.substring(1);break $;default:break $}if(B){let M=N.items[N.items.length-1];if(SL.isPair(M))M=M.value??M.key;if(M.comment)M.comment+=`
93
+ `+B;else M.comment=B;L.comment=L.comment.substring(B.length+1)}}}if(!z&&!O&&!L.found){let B=D?$(U,D,L,u):I(U,L.end,O,null,L,u);if(N.items.push(B),G=B.range[2],yg(D))u(B.range,"BLOCK_IN_FLOW",kg)}else{U.atKey=!0;let B=L.end,M=P?$(U,P,L,u):I(U,B,R,null,L,u);if(yg(P))u(M.range,"BLOCK_IN_FLOW",kg);U.atKey=!1;let F=iq.resolveProps(O??[],{flow:v,indicator:"map-value-ind",next:D,offset:M.range[2],onError:u,parentIndent:_.indent,startOnNewline:!1});if(F.found){if(!z&&!L.found&&U.options.strict){if(O)for(let b of O){if(b===F.found)break;if(b.type==="newline"){u(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(L.start<F.found.offset-1024)u(F.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(D)if("source"in D&&D.source?.[0]===":")u(D,"MISSING_CHAR",`Missing space after : in ${v}`);else u(F.start,"MISSING_CHAR",`Missing , or : between ${v} items`);let A=D?$(U,D,F,u):F.found?I(U,F.end,O,null,F,u):null;if(A){if(yg(D))u(A.range,"BLOCK_IN_FLOW",kg)}else if(F.comment)if(M.comment)M.comment+=`
94
+ `+F.comment;else M.comment=F.comment;let f=new wL.Pair(M,A);if(U.options.keepSourceTokens)f.srcToken=K;if(z){let b=N;if(xL.mapIncludes(U,b.items,M))u(B,"DUPLICATE_KEY","Map keys must be unique");b.items.push(f)}else{let b=new yq.YAMLMap(U.schema);b.flow=!0,b.items.push(f);let u$=(A??M).range;b.range=[M.range[0],u$[1],u$[2]],N.items.push(b)}G=A?A.range[2]:F.end}}let q=z?"}":"]",[T,...H]=_.end,Q=G;if(T?.source===q)Q=T.offset+T.source.length;else{let Y=v[0].toUpperCase()+v.substring(1),K=X?`${Y} must end with a ${q}`:`${Y} in block collection must be sufficiently indented and end with a ${q}`;if(u(G,X?"MISSING_CHAR":"BAD_INDENT",K),T&&T.source.length!==1)H.unshift(T)}if(H.length>0){let Y=CL.resolveEnd(H,Q,U.options.strict,u);if(Y.comment)if(N.comment)N.comment+=`
95
+ `+Y.comment;else N.comment=Y.comment;N.range=[_.offset,Q,Y.offset]}else N.range=[_.offset,Q,Q];return N}yL.resolveFlowCollection=kL});var nq=E((oL)=>{var rL=$$(),nL=W$(),lL=T6(),mL=H6(),hL=xq(),cL=kq(),dL=rq();function ig($,I,U,_,u,g){let z=U.type==="block-map"?hL.resolveBlockMap($,I,U,_,g):U.type==="block-seq"?cL.resolveBlockSeq($,I,U,_,g):dL.resolveFlowCollection($,I,U,_,g),v=z.constructor;if(u==="!"||u===v.tagName)return z.tag=v.tagName,z;if(u)z.tag=u;return z}function pL($,I,U,_,u){let g=_.tag,z=!g?null:I.directives.tagName(g.source,(q)=>u(g,"TAG_RESOLVE_FAILED",q));if(U.type==="block-seq"){let{anchor:q,newlineAfterProp:T}=_,H=q&&g?q.offset>g.offset?q:g:q??g;if(H&&(!T||T.offset<H.offset))u(H,"MISSING_CHAR","Missing newline after block sequence props")}let v=U.type==="block-map"?"map":U.type==="block-seq"?"seq":U.start.source==="{"?"map":"seq";if(!g||!z||z==="!"||z===lL.YAMLMap.tagName&&v==="map"||z===mL.YAMLSeq.tagName&&v==="seq")return ig($,I,U,u,z);let J=I.schema.tags.find((q)=>q.tag===z&&q.collection===v);if(!J){let q=I.schema.knownTags[z];if(q?.collection===v)I.schema.tags.push(Object.assign({},q,{default:!1})),J=q;else{if(q)u(g,"BAD_COLLECTION_TYPE",`${q.tag} used for ${v} collection, but expects ${q.collection??"scalar"}`,!0);else u(g,"TAG_RESOLVE_FAILED",`Unresolved tag: ${z}`,!0);return ig($,I,U,u,z)}}let N=ig($,I,U,u,z,J),X=J.resolve?.(N,(q)=>u(g,"TAG_RESOLVE_FAILED",q),I.options)??N,G=rL.isNode(X)?X:new nL.Scalar(X);if(G.range=N.range,G.tag=z,J?.format)G.format=J.format;return G}oL.composeCollection=pL});var ng=E(($W)=>{var rg=W$();function aL($,I,U){let _=I.offset,u=eL(I,$.options.strict,U);if(!u)return{value:"",type:null,comment:"",range:[_,_,_]};let g=u.mode===">"?rg.Scalar.BLOCK_FOLDED:rg.Scalar.BLOCK_LITERAL,z=I.source?sL(I.source):[],v=z.length;for(let Q=z.length-1;Q>=0;--Q){let Y=z[Q][1];if(Y===""||Y==="\r")v=Q;else break}if(v===0){let Q=u.chomp==="+"&&z.length>0?`
96
+ `.repeat(Math.max(1,z.length-1)):"",Y=_+u.length;if(I.source)Y+=I.source.length;return{value:Q,type:g,comment:u.comment,range:[_,Y,Y]}}let J=I.indent+u.indent,N=I.offset+u.length,X=0;for(let Q=0;Q<v;++Q){let[Y,K]=z[Q];if(K===""||K==="\r"){if(u.indent===0&&Y.length>J)J=Y.length}else{if(Y.length<J)U(N+Y.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(u.indent===0)J=Y.length;if(X=Q,J===0&&!$.atRoot)U(N,"BAD_INDENT","Block scalar values in collections must be indented");break}N+=Y.length+K.length+1}for(let Q=z.length-1;Q>=v;--Q)if(z[Q][0].length>J)v=Q+1;let G="",q="",T=!1;for(let Q=0;Q<X;++Q)G+=z[Q][0].slice(J)+`
97
+ `;for(let Q=X;Q<v;++Q){let[Y,K]=z[Q];N+=Y.length+K.length+1;let R=K[K.length-1]==="\r";if(R)K=K.slice(0,-1);if(K&&Y.length<J){let O=`Block scalar lines must not be less indented than their ${u.indent?"explicit indentation indicator":"first line"}`;U(N-K.length-(R?2:1),"BAD_INDENT",O),Y=""}if(g===rg.Scalar.BLOCK_LITERAL)G+=q+Y.slice(J)+K,q=`
98
+ `;else if(Y.length>J||K[0]==="\t"){if(q===" ")q=`
99
99
  `;else if(!T&&q===`
100
100
  `)q=`
101
101
 
102
- `;G+=q+Y.slice(J)+R,q=`
103
- `,T=!0}else if(R==="")if(q===`
102
+ `;G+=q+Y.slice(J)+K,q=`
103
+ `,T=!0}else if(K==="")if(q===`
104
104
  `)G+=`
105
105
  `;else q=`
106
- `;else G+=q+R,q=" ",T=!1}switch(u.chomp){case"-":break;case"+":for(let Q=v;Q<z.length;++Q)G+=`
106
+ `;else G+=q+K,q=" ",T=!1}switch(u.chomp){case"-":break;case"+":for(let Q=v;Q<z.length;++Q)G+=`
107
107
  `+z[Q][0].slice(J);if(G[G.length-1]!==`
108
108
  `)G+=`
109
109
  `;break;default:G+=`
110
- `}let H=_+u.length+I.source.length;return{value:G,type:g,comment:u.comment,range:[_,H,H]}}function aL({offset:$,props:I},U,_){if(I[0].type!=="block-scalar-header")return _(I[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:u}=I[0],g=u[0],z=0,v="",J=-1;for(let q=1;q<u.length;++q){let T=u[q];if(!v&&(T==="-"||T==="+"))v=T;else{let H=Number(T);if(!z&&H)z=H;else if(J===-1)J=$+q}}if(J!==-1)_(J,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${u}`);let N=!1,X="",G=u.length;for(let q=1;q<I.length;++q){let T=I[q];switch(T.type){case"space":N=!0;case"newline":G+=T.source.length;break;case"comment":if(U&&!N)_(T,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");G+=T.source.length,X=T.source.substring(1);break;case"error":_(T,"UNEXPECTED_TOKEN",T.message),G+=T.source.length;break;default:{let H=`Unexpected token in block scalar header: ${T.type}`;_(T,"UNEXPECTED_TOKEN",H);let Q=T.source;if(Q&&typeof Q==="string")G+=Q.length}}}return{mode:g,indent:z,chomp:v,comment:X,length:G}}function eL($){let I=$.split(/\n( *)/),U=I[0],_=U.match(/^( *)/),g=[_?.[1]?[_[1],U.slice(_[1].length)]:["",U]];for(let z=1;z<I.length;z+=2)g.push([I[z],I[z+1]]);return g}sL.resolveBlockScalar=tL});var rg=E((NP)=>{var ng=P$(),IP=b1();function uP($,I,U){let{offset:_,type:u,source:g,end:z}=$,v,J,N=(q,T,H)=>U(_+q,T,H);switch(u){case"scalar":v=ng.Scalar.PLAIN,J=UP(g,N);break;case"single-quoted-scalar":v=ng.Scalar.QUOTE_SINGLE,J=_P(g,N);break;case"double-quoted-scalar":v=ng.Scalar.QUOTE_DOUBLE,J=gP(g,N);break;default:return U($,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${u}`),{value:"",type:null,comment:"",range:[_,_+g.length,_+g.length]}}let X=_+g.length,G=IP.resolveEnd(z,X,I,U);return{value:J,type:v,comment:G.comment,range:[_,X,G.offset]}}function UP($,I){let U="";switch($[0]){case"\t":U="a tab character";break;case",":U="flow indicator character ,";break;case"%":U="directive indicator character %";break;case"|":case">":{U=`block scalar indicator ${$[0]}`;break}case"@":case"`":{U=`reserved character ${$[0]}`;break}}if(U)I(0,"BAD_SCALAR_START",`Plain value cannot start with ${U}`);return nq($)}function _P($,I){if($[$.length-1]!=="'"||$.length===1)I($.length,"MISSING_CHAR","Missing closing 'quote");return nq($.slice(1,-1)).replace(/''/g,"'")}function nq($){let I,U;try{I=new RegExp(`(.*?)(?<![ ])[ ]*\r?
110
+ `}let H=_+u.length+I.source.length;return{value:G,type:g,comment:u.comment,range:[_,H,H]}}function eL({offset:$,props:I},U,_){if(I[0].type!=="block-scalar-header")return _(I[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:u}=I[0],g=u[0],z=0,v="",J=-1;for(let q=1;q<u.length;++q){let T=u[q];if(!v&&(T==="-"||T==="+"))v=T;else{let H=Number(T);if(!z&&H)z=H;else if(J===-1)J=$+q}}if(J!==-1)_(J,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${u}`);let N=!1,X="",G=u.length;for(let q=1;q<I.length;++q){let T=I[q];switch(T.type){case"space":N=!0;case"newline":G+=T.source.length;break;case"comment":if(U&&!N)_(T,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");G+=T.source.length,X=T.source.substring(1);break;case"error":_(T,"UNEXPECTED_TOKEN",T.message),G+=T.source.length;break;default:{let H=`Unexpected token in block scalar header: ${T.type}`;_(T,"UNEXPECTED_TOKEN",H);let Q=T.source;if(Q&&typeof Q==="string")G+=Q.length}}}return{mode:g,indent:z,chomp:v,comment:X,length:G}}function sL($){let I=$.split(/\n( *)/),U=I[0],_=U.match(/^( *)/),g=[_?.[1]?[_[1],U.slice(_[1].length)]:["",U]];for(let z=1;z<I.length;z+=2)g.push([I[z],I[z+1]]);return g}$W.resolveBlockScalar=aL});var mg=E((GW)=>{var lg=W$(),uW=F1();function UW($,I,U){let{offset:_,type:u,source:g,end:z}=$,v,J,N=(q,T,H)=>U(_+q,T,H);switch(u){case"scalar":v=lg.Scalar.PLAIN,J=_W(g,N);break;case"single-quoted-scalar":v=lg.Scalar.QUOTE_SINGLE,J=gW(g,N);break;case"double-quoted-scalar":v=lg.Scalar.QUOTE_DOUBLE,J=zW(g,N);break;default:return U($,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${u}`),{value:"",type:null,comment:"",range:[_,_+g.length,_+g.length]}}let X=_+g.length,G=uW.resolveEnd(z,X,I,U);return{value:J,type:v,comment:G.comment,range:[_,X,G.offset]}}function _W($,I){let U="";switch($[0]){case"\t":U="a tab character";break;case",":U="flow indicator character ,";break;case"%":U="directive indicator character %";break;case"|":case">":{U=`block scalar indicator ${$[0]}`;break}case"@":case"`":{U=`reserved character ${$[0]}`;break}}if(U)I(0,"BAD_SCALAR_START",`Plain value cannot start with ${U}`);return lq($)}function gW($,I){if($[$.length-1]!=="'"||$.length===1)I($.length,"MISSING_CHAR","Missing closing 'quote");return lq($.slice(1,-1)).replace(/''/g,"'")}function lq($){let I,U;try{I=new RegExp(`(.*?)(?<![ ])[ ]*\r?
111
111
  `,"sy"),U=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
112
112
  `,"sy")}catch{I=/(.*?)[ \t]*\r?\n/sy,U=/[ \t]*(.*?)[ \t]*\r?\n/sy}let _=I.exec($);if(!_)return $;let u=_[1],g=" ",z=I.lastIndex;U.lastIndex=z;while(_=U.exec($)){if(_[1]==="")if(g===`
113
113
  `)u+=g;else g=`
114
- `;else u+=g+_[1],g=" ";z=U.lastIndex}let v=/[ \t]*(.*)/sy;return v.lastIndex=z,_=v.exec($),u+g+(_?.[1]??"")}function gP($,I){let U="";for(let _=1;_<$.length-1;++_){let u=$[_];if(u==="\r"&&$[_+1]===`
114
+ `;else u+=g+_[1],g=" ";z=U.lastIndex}let v=/[ \t]*(.*)/sy;return v.lastIndex=z,_=v.exec($),u+g+(_?.[1]??"")}function zW($,I){let U="";for(let _=1;_<$.length-1;++_){let u=$[_];if(u==="\r"&&$[_+1]===`
115
115
  `)continue;if(u===`
116
- `){let{fold:g,offset:z}=zP($,_);U+=g,_=z}else if(u==="\\"){let g=$[++_],z=vP[g];if(z)U+=z;else if(g===`
116
+ `){let{fold:g,offset:z}=vW($,_);U+=g,_=z}else if(u==="\\"){let g=$[++_],z=JW[g];if(z)U+=z;else if(g===`
117
117
  `){g=$[_+1];while(g===" "||g==="\t")g=$[++_+1]}else if(g==="\r"&&$[_+1]===`
118
- `){g=$[++_+1];while(g===" "||g==="\t")g=$[++_+1]}else if(g==="x"||g==="u"||g==="U"){let v={x:2,u:4,U:8}[g];U+=JP($,_+1,v,I),_+=v}else{let v=$.substr(_-1,2);I(_-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${v}`),U+=v}}else if(u===" "||u==="\t"){let g=_,z=$[_+1];while(z===" "||z==="\t")z=$[++_+1];if(z!==`
118
+ `){g=$[++_+1];while(g===" "||g==="\t")g=$[++_+1]}else if(g==="x"||g==="u"||g==="U"){let v={x:2,u:4,U:8}[g];U+=NW($,_+1,v,I),_+=v}else{let v=$.substr(_-1,2);I(_-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${v}`),U+=v}}else if(u===" "||u==="\t"){let g=_,z=$[_+1];while(z===" "||z==="\t")z=$[++_+1];if(z!==`
119
119
  `&&!(z==="\r"&&$[_+2]===`
120
- `))U+=_>g?$.slice(g,_+1):u}else U+=u}if($[$.length-1]!=='"'||$.length===1)I($.length,"MISSING_CHAR",'Missing closing "quote');return U}function zP($,I){let U="",_=$[I+1];while(_===" "||_==="\t"||_===`
120
+ `))U+=_>g?$.slice(g,_+1):u}else U+=u}if($[$.length-1]!=='"'||$.length===1)I($.length,"MISSING_CHAR",'Missing closing "quote');return U}function vW($,I){let U="",_=$[I+1];while(_===" "||_==="\t"||_===`
121
121
  `||_==="\r"){if(_==="\r"&&$[I+2]!==`
122
122
  `)break;if(_===`
123
123
  `)U+=`
124
- `;I+=1,_=$[I+1]}if(!U)U=" ";return{fold:U,offset:I}}var vP={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
125
- `,r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function JP($,I,U,_){let u=$.substr(I,U),z=u.length===U&&/^[0-9a-fA-F]+$/.test(u)?parseInt(u,16):NaN;if(isNaN(z)){let v=$.substr(I-2,U+2);return _(I-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${v}`),v}return String.fromCodePoint(z)}NP.resolveFlowScalar=uP});var lq=E((YP)=>{var r6=$$(),rq=P$(),XP=ig(),qP=rg();function QP($,I,U,_){let{value:u,type:g,comment:z,range:v}=I.type==="block-scalar"?XP.resolveBlockScalar($,I,_):qP.resolveFlowScalar(I,$.options.strict,_),J=U?$.directives.tagName(U.source,(G)=>_(U,"TAG_RESOLVE_FAILED",G)):null,N;if($.options.stringKeys&&$.atKey)N=$.schema[r6.SCALAR];else if(J)N=TP($.schema,u,J,U,_);else if(I.type==="scalar")N=HP($,u,I,_);else N=$.schema[r6.SCALAR];let X;try{let G=N.resolve(u,(q)=>_(U??I,"TAG_RESOLVE_FAILED",q),$.options);X=r6.isScalar(G)?G:new rq.Scalar(G)}catch(G){let q=G instanceof Error?G.message:String(G);_(U??I,"TAG_RESOLVE_FAILED",q),X=new rq.Scalar(u)}if(X.range=v,X.source=u,g)X.type=g;if(J)X.tag=J;if(N.format)X.format=N.format;if(z)X.comment=z;return X}function TP($,I,U,_,u){if(U==="!")return $[r6.SCALAR];let g=[];for(let v of $.tags)if(!v.collection&&v.tag===U)if(v.default&&v.test)g.push(v);else return v;for(let v of g)if(v.test?.test(I))return v;let z=$.knownTags[U];if(z&&!z.collection)return $.tags.push(Object.assign({},z,{default:!1,test:void 0})),z;return u(_,"TAG_RESOLVE_FAILED",`Unresolved tag: ${U}`,U!=="tag:yaml.org,2002:str"),$[r6.SCALAR]}function HP({atKey:$,directives:I,schema:U},_,u,g){let z=U.tags.find((v)=>(v.default===!0||$&&v.default==="key")&&v.test?.test(_))||U[r6.SCALAR];if(U.compat){let v=U.compat.find((J)=>J.default&&J.test?.test(_))??U[r6.SCALAR];if(z.tag!==v.tag){let J=I.tagString(z.tag),N=I.tagString(v.tag),X=`Value may be parsed as either ${J} or ${N}`;g(u,"TAG_RESOLVE_FAILED",X,!0)}}return z}YP.composeScalar=QP});var mq=E((VP)=>{function DP($,I,U){if(I){U??(U=I.length);for(let _=U-1;_>=0;--_){let u=I[_];switch(u.type){case"space":case"comment":case"newline":$-=u.source.length;continue}u=I[++_];while(u?.type==="space")$+=u.source.length,u=I[++_];break}}return $}VP.emptyScalarPosition=DP});var dq=E((AP)=>{var MP=WI(),RP=$$(),KP=iq(),hq=lq(),LP=b1(),PP=mq(),WP={composeNode:cq,composeEmptyNode:lg};function cq($,I,U,_){let u=$.atKey,{spaceBefore:g,comment:z,anchor:v,tag:J}=U,N,X=!0;switch(I.type){case"alias":if(N=ZP($,I,_),v||J)_(I,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(N=hq.composeScalar($,I,J,_),v)N.anchor=v.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":if(N=KP.composeCollection(WP,$,I,U,_),v)N.anchor=v.source.substring(1);break;default:{let G=I.type==="error"?I.message:`Unsupported token (type: ${I.type})`;_(I,"UNEXPECTED_TOKEN",G),N=lg($,I.offset,void 0,null,U,_),X=!1}}if(v&&N.anchor==="")_(v,"BAD_ALIAS","Anchor cannot be an empty string");if(u&&$.options.stringKeys&&(!RP.isScalar(N)||typeof N.value!=="string"||N.tag&&N.tag!=="tag:yaml.org,2002:str"))_(J??I,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(g)N.spaceBefore=!0;if(z)if(I.type==="scalar"&&I.source==="")N.comment=z;else N.commentBefore=z;if($.options.keepSourceTokens&&X)N.srcToken=I;return N}function lg($,I,U,_,{spaceBefore:u,comment:g,anchor:z,tag:v,end:J},N){let X={type:"scalar",offset:PP.emptyScalarPosition(I,U,_),indent:-1,source:""},G=hq.composeScalar($,X,v,N);if(z){if(G.anchor=z.source.substring(1),G.anchor==="")N(z,"BAD_ALIAS","Anchor cannot be an empty string")}if(u)G.spaceBefore=!0;if(g)G.comment=g,G.range[2]=J;return G}function ZP({options:$},{offset:I,source:U,end:_},u){let g=new MP.Alias(U.substring(1));if(g.source==="")u(I,"BAD_ALIAS","Alias cannot be an empty string");if(g.source.endsWith(":"))u(I+U.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let z=I+U.length,v=LP.resolveEnd(_,z,$.strict,u);if(g.range=[I,z,v.offset],v.comment)g.comment=v.comment;return g}AP.composeEmptyNode=lg;AP.composeNode=cq});var oq=E((CP)=>{var FP=nI(),pq=dq(),SP=b1(),wP=lI();function EP($,I,{offset:U,start:_,value:u,end:g},z){let v=Object.assign({_directives:I},$),J=new FP.Document(void 0,v),N={atKey:!1,atRoot:!0,directives:J.directives,options:J.options,schema:J.schema},X=wP.resolveProps(_,{indicator:"doc-start",next:u??g?.[0],offset:U,onError:z,parentIndent:0,startOnNewline:!0});if(X.found){if(J.directives.docStart=!0,u&&(u.type==="block-map"||u.type==="block-seq")&&!X.hasNewline)z(X.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}J.contents=u?pq.composeNode(N,u,X,z):pq.composeEmptyNode(N,X.end,_,null,X,z);let G=J.contents.range[2],q=SP.resolveEnd(g,G,!1,z);if(q.comment)J.comment=q.comment;return J.range=[U,G,q.offset],J}CP.composeDoc=EP});var mg=E((rP)=>{var xP=g$("process"),kP=p2(),yP=nI(),mI=rI(),tq=$$(),iP=oq(),nP=b1();function hI($){if(typeof $==="number")return[$,$+1];if(Array.isArray($))return $.length===2?$:[$[0],$[1]];let{offset:I,source:U}=$;return[I,I+(typeof U==="string"?U.length:1)]}function aq($){let I="",U=!1,_=!1;for(let u=0;u<$.length;++u){let g=$[u];switch(g[0]){case"#":I+=(I===""?"":_?`
124
+ `;I+=1,_=$[I+1]}if(!U)U=" ";return{fold:U,offset:I}}var JW={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
125
+ `,r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function NW($,I,U,_){let u=$.substr(I,U),z=u.length===U&&/^[0-9a-fA-F]+$/.test(u)?parseInt(u,16):NaN;if(isNaN(z)){let v=$.substr(I-2,U+2);return _(I-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${v}`),v}return String.fromCodePoint(z)}GW.resolveFlowScalar=UW});var hq=E((OW)=>{var m6=$$(),mq=W$(),qW=ng(),QW=mg();function TW($,I,U,_){let{value:u,type:g,comment:z,range:v}=I.type==="block-scalar"?qW.resolveBlockScalar($,I,_):QW.resolveFlowScalar(I,$.options.strict,_),J=U?$.directives.tagName(U.source,(G)=>_(U,"TAG_RESOLVE_FAILED",G)):null,N;if($.options.stringKeys&&$.atKey)N=$.schema[m6.SCALAR];else if(J)N=HW($.schema,u,J,U,_);else if(I.type==="scalar")N=YW($,u,I,_);else N=$.schema[m6.SCALAR];let X;try{let G=N.resolve(u,(q)=>_(U??I,"TAG_RESOLVE_FAILED",q),$.options);X=m6.isScalar(G)?G:new mq.Scalar(G)}catch(G){let q=G instanceof Error?G.message:String(G);_(U??I,"TAG_RESOLVE_FAILED",q),X=new mq.Scalar(u)}if(X.range=v,X.source=u,g)X.type=g;if(J)X.tag=J;if(N.format)X.format=N.format;if(z)X.comment=z;return X}function HW($,I,U,_,u){if(U==="!")return $[m6.SCALAR];let g=[];for(let v of $.tags)if(!v.collection&&v.tag===U)if(v.default&&v.test)g.push(v);else return v;for(let v of g)if(v.test?.test(I))return v;let z=$.knownTags[U];if(z&&!z.collection)return $.tags.push(Object.assign({},z,{default:!1,test:void 0})),z;return u(_,"TAG_RESOLVE_FAILED",`Unresolved tag: ${U}`,U!=="tag:yaml.org,2002:str"),$[m6.SCALAR]}function YW({atKey:$,directives:I,schema:U},_,u,g){let z=U.tags.find((v)=>(v.default===!0||$&&v.default==="key")&&v.test?.test(_))||U[m6.SCALAR];if(U.compat){let v=U.compat.find((J)=>J.default&&J.test?.test(_))??U[m6.SCALAR];if(z.tag!==v.tag){let J=I.tagString(z.tag),N=I.tagString(v.tag),X=`Value may be parsed as either ${J} or ${N}`;g(u,"TAG_RESOLVE_FAILED",X,!0)}}return z}OW.composeScalar=TW});var cq=E((BW)=>{function DW($,I,U){if(I){U??(U=I.length);for(let _=U-1;_>=0;--_){let u=I[_];switch(u.type){case"space":case"comment":case"newline":$-=u.source.length;continue}u=I[++_];while(u?.type==="space")$+=u.source.length,u=I[++_];break}}return $}BW.emptyScalarPosition=DW});var oq=E((bW)=>{var KW=AI(),RW=$$(),LW=nq(),dq=hq(),WW=F1(),PW=cq(),ZW={composeNode:pq,composeEmptyNode:hg};function pq($,I,U,_){let u=$.atKey,{spaceBefore:g,comment:z,anchor:v,tag:J}=U,N,X=!0;switch(I.type){case"alias":if(N=AW($,I,_),v||J)_(I,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(N=dq.composeScalar($,I,J,_),v)N.anchor=v.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":if(N=LW.composeCollection(ZW,$,I,U,_),v)N.anchor=v.source.substring(1);break;default:{let G=I.type==="error"?I.message:`Unsupported token (type: ${I.type})`;_(I,"UNEXPECTED_TOKEN",G),N=hg($,I.offset,void 0,null,U,_),X=!1}}if(v&&N.anchor==="")_(v,"BAD_ALIAS","Anchor cannot be an empty string");if(u&&$.options.stringKeys&&(!RW.isScalar(N)||typeof N.value!=="string"||N.tag&&N.tag!=="tag:yaml.org,2002:str"))_(J??I,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(g)N.spaceBefore=!0;if(z)if(I.type==="scalar"&&I.source==="")N.comment=z;else N.commentBefore=z;if($.options.keepSourceTokens&&X)N.srcToken=I;return N}function hg($,I,U,_,{spaceBefore:u,comment:g,anchor:z,tag:v,end:J},N){let X={type:"scalar",offset:PW.emptyScalarPosition(I,U,_),indent:-1,source:""},G=dq.composeScalar($,X,v,N);if(z){if(G.anchor=z.source.substring(1),G.anchor==="")N(z,"BAD_ALIAS","Anchor cannot be an empty string")}if(u)G.spaceBefore=!0;if(g)G.comment=g,G.range[2]=J;return G}function AW({options:$},{offset:I,source:U,end:_},u){let g=new KW.Alias(U.substring(1));if(g.source==="")u(I,"BAD_ALIAS","Alias cannot be an empty string");if(g.source.endsWith(":"))u(I+U.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let z=I+U.length,v=WW.resolveEnd(_,z,$.strict,u);if(g.range=[I,z,v.offset],v.comment)g.comment=v.comment;return g}bW.composeEmptyNode=hg;bW.composeNode=pq});var aq=E((fW)=>{var SW=lI(),tq=oq(),wW=F1(),EW=hI();function CW($,I,{offset:U,start:_,value:u,end:g},z){let v=Object.assign({_directives:I},$),J=new SW.Document(void 0,v),N={atKey:!1,atRoot:!0,directives:J.directives,options:J.options,schema:J.schema},X=EW.resolveProps(_,{indicator:"doc-start",next:u??g?.[0],offset:U,onError:z,parentIndent:0,startOnNewline:!0});if(X.found){if(J.directives.docStart=!0,u&&(u.type==="block-map"||u.type==="block-seq")&&!X.hasNewline)z(X.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}J.contents=u?tq.composeNode(N,u,X,z):tq.composeEmptyNode(N,X.end,_,null,X,z);let G=J.contents.range[2],q=wW.resolveEnd(g,G,!1,z);if(q.comment)J.comment=q.comment;return J.range=[U,G,q.offset],J}fW.composeDoc=CW});var cg=E((lW)=>{var kW=g$("process"),yW=t2(),iW=lI(),cI=mI(),eq=$$(),rW=aq(),nW=F1();function dI($){if(typeof $==="number")return[$,$+1];if(Array.isArray($))return $.length===2?$:[$[0],$[1]];let{offset:I,source:U}=$;return[I,I+(typeof U==="string"?U.length:1)]}function sq($){let I="",U=!1,_=!1;for(let u=0;u<$.length;++u){let g=$[u];switch(g[0]){case"#":I+=(I===""?"":_?`
126
126
 
127
127
  `:`
128
- `)+(g.substring(1)||" "),U=!0,_=!1;break;case"%":if($[u+1]?.[0]!=="#")u+=1;U=!1;break;default:if(!U)_=!0;U=!1}}return{comment:I,afterEmptyLine:_}}class eq{constructor($={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(I,U,_,u)=>{let g=hI(I);if(u)this.warnings.push(new mI.YAMLWarning(g,U,_));else this.errors.push(new mI.YAMLParseError(g,U,_))},this.directives=new kP.Directives({version:$.version||"1.2"}),this.options=$}decorate($,I){let{comment:U,afterEmptyLine:_}=aq(this.prelude);if(U){let u=$.contents;if(I)$.comment=$.comment?`${$.comment}
129
- ${U}`:U;else if(_||$.directives.docStart||!u)$.commentBefore=U;else if(tq.isCollection(u)&&!u.flow&&u.items.length>0){let g=u.items[0];if(tq.isPair(g))g=g.key;let z=g.commentBefore;g.commentBefore=z?`${U}
128
+ `)+(g.substring(1)||" "),U=!0,_=!1;break;case"%":if($[u+1]?.[0]!=="#")u+=1;U=!1;break;default:if(!U)_=!0;U=!1}}return{comment:I,afterEmptyLine:_}}class $5{constructor($={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(I,U,_,u)=>{let g=dI(I);if(u)this.warnings.push(new cI.YAMLWarning(g,U,_));else this.errors.push(new cI.YAMLParseError(g,U,_))},this.directives=new yW.Directives({version:$.version||"1.2"}),this.options=$}decorate($,I){let{comment:U,afterEmptyLine:_}=sq(this.prelude);if(U){let u=$.contents;if(I)$.comment=$.comment?`${$.comment}
129
+ ${U}`:U;else if(_||$.directives.docStart||!u)$.commentBefore=U;else if(eq.isCollection(u)&&!u.flow&&u.items.length>0){let g=u.items[0];if(eq.isPair(g))g=g.key;let z=g.commentBefore;g.commentBefore=z?`${U}
130
130
  ${z}`:U}else{let g=u.commentBefore;u.commentBefore=g?`${U}
131
- ${g}`:U}}if(I)Array.prototype.push.apply($.errors,this.errors),Array.prototype.push.apply($.warnings,this.warnings);else $.errors=this.errors,$.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:aq(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose($,I=!1,U=-1){for(let _ of $)yield*this.next(_);yield*this.end(I,U)}*next($){if(xP.env.LOG_STREAM)console.dir($,{depth:null});switch($.type){case"directive":this.directives.add($.source,(I,U,_)=>{let u=hI($);u[0]+=I,this.onError(u,"BAD_DIRECTIVE",U,_)}),this.prelude.push($.source),this.atDirectives=!0;break;case"document":{let I=iP.composeDoc(this.options,this.directives,$,this.onError);if(this.atDirectives&&!I.directives.docStart)this.onError($,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(I,!1),this.doc)yield this.doc;this.doc=I,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push($.source);break;case"error":{let I=$.source?`${$.message}: ${JSON.stringify($.source)}`:$.message,U=new mI.YAMLParseError(hI($),"UNEXPECTED_TOKEN",I);if(this.atDirectives||!this.doc)this.errors.push(U);else this.doc.errors.push(U);break}case"doc-end":{if(!this.doc){this.errors.push(new mI.YAMLParseError(hI($),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let I=nP.resolveEnd($.end,$.offset+$.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),I.comment){let U=this.doc.comment;this.doc.comment=U?`${U}
132
- ${I.comment}`:I.comment}this.doc.range[2]=I.offset;break}default:this.errors.push(new mI.YAMLParseError(hI($),"UNEXPECTED_TOKEN",`Unsupported token ${$.type}`))}}*end($=!1,I=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if($){let U=Object.assign({_directives:this.directives},this.options),_=new yP.Document(void 0,U);if(this.atDirectives)this.onError(I,"MISSING_CHAR","Missing directives-end indicator line");_.range=[0,I,I],this.decorate(_,!1),yield _}}}rP.Composer=eq});var I5=E((aP)=>{var mP=ig(),hP=rg(),cP=rI(),sq=jI();function dP($,I=!0,U){if($){let _=(u,g,z)=>{let v=typeof u==="number"?u:Array.isArray(u)?u[0]:u.offset;if(U)U(v,g,z);else throw new cP.YAMLParseError([v,v+1],g,z)};switch($.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return hP.resolveFlowScalar($,I,_);case"block-scalar":return mP.resolveBlockScalar({options:{strict:I}},$,_)}}return null}function pP($,I){let{implicitKey:U=!1,indent:_,inFlow:u=!1,offset:g=-1,type:z="PLAIN"}=I,v=sq.stringifyString({type:z,value:$},{implicitKey:U,indent:_>0?" ".repeat(_):"",inFlow:u,options:{blockQuote:!0,lineWidth:-1}}),J=I.end??[{type:"newline",offset:-1,indent:_,source:`
131
+ ${g}`:U}}if(I)Array.prototype.push.apply($.errors,this.errors),Array.prototype.push.apply($.warnings,this.warnings);else $.errors=this.errors,$.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:sq(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose($,I=!1,U=-1){for(let _ of $)yield*this.next(_);yield*this.end(I,U)}*next($){if(kW.env.LOG_STREAM)console.dir($,{depth:null});switch($.type){case"directive":this.directives.add($.source,(I,U,_)=>{let u=dI($);u[0]+=I,this.onError(u,"BAD_DIRECTIVE",U,_)}),this.prelude.push($.source),this.atDirectives=!0;break;case"document":{let I=rW.composeDoc(this.options,this.directives,$,this.onError);if(this.atDirectives&&!I.directives.docStart)this.onError($,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(I,!1),this.doc)yield this.doc;this.doc=I,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push($.source);break;case"error":{let I=$.source?`${$.message}: ${JSON.stringify($.source)}`:$.message,U=new cI.YAMLParseError(dI($),"UNEXPECTED_TOKEN",I);if(this.atDirectives||!this.doc)this.errors.push(U);else this.doc.errors.push(U);break}case"doc-end":{if(!this.doc){this.errors.push(new cI.YAMLParseError(dI($),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let I=nW.resolveEnd($.end,$.offset+$.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),I.comment){let U=this.doc.comment;this.doc.comment=U?`${U}
132
+ ${I.comment}`:I.comment}this.doc.range[2]=I.offset;break}default:this.errors.push(new cI.YAMLParseError(dI($),"UNEXPECTED_TOKEN",`Unsupported token ${$.type}`))}}*end($=!1,I=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if($){let U=Object.assign({_directives:this.directives},this.options),_=new iW.Document(void 0,U);if(this.atDirectives)this.onError(I,"MISSING_CHAR","Missing directives-end indicator line");_.range=[0,I,I],this.decorate(_,!1),yield _}}}lW.Composer=$5});var U5=E((eW)=>{var hW=ng(),cW=mg(),dW=mI(),I5=SI();function pW($,I=!0,U){if($){let _=(u,g,z)=>{let v=typeof u==="number"?u:Array.isArray(u)?u[0]:u.offset;if(U)U(v,g,z);else throw new dW.YAMLParseError([v,v+1],g,z)};switch($.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return cW.resolveFlowScalar($,I,_);case"block-scalar":return hW.resolveBlockScalar({options:{strict:I}},$,_)}}return null}function oW($,I){let{implicitKey:U=!1,indent:_,inFlow:u=!1,offset:g=-1,type:z="PLAIN"}=I,v=I5.stringifyString({type:z,value:$},{implicitKey:U,indent:_>0?" ".repeat(_):"",inFlow:u,options:{blockQuote:!0,lineWidth:-1}}),J=I.end??[{type:"newline",offset:-1,indent:_,source:`
133
133
  `}];switch(v[0]){case"|":case">":{let N=v.indexOf(`
134
134
  `),X=v.substring(0,N),G=v.substring(N+1)+`
135
- `,q=[{type:"block-scalar-header",offset:g,indent:_,source:X}];if(!$5(q,J))q.push({type:"newline",offset:-1,indent:_,source:`
136
- `});return{type:"block-scalar",offset:g,indent:_,props:q,source:G}}case'"':return{type:"double-quoted-scalar",offset:g,indent:_,source:v,end:J};case"'":return{type:"single-quoted-scalar",offset:g,indent:_,source:v,end:J};default:return{type:"scalar",offset:g,indent:_,source:v,end:J}}}function oP($,I,U={}){let{afterKey:_=!1,implicitKey:u=!1,inFlow:g=!1,type:z}=U,v="indent"in $?$.indent:null;if(_&&typeof v==="number")v+=2;if(!z)switch($.type){case"single-quoted-scalar":z="QUOTE_SINGLE";break;case"double-quoted-scalar":z="QUOTE_DOUBLE";break;case"block-scalar":{let N=$.props[0];if(N.type!=="block-scalar-header")throw Error("Invalid block scalar header");z=N.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:z="PLAIN"}let J=sq.stringifyString({type:z,value:I},{implicitKey:u||v===null,indent:v!==null&&v>0?" ".repeat(v):"",inFlow:g,options:{blockQuote:!0,lineWidth:-1}});switch(J[0]){case"|":case">":tP($,J);break;case'"':hg($,J,"double-quoted-scalar");break;case"'":hg($,J,"single-quoted-scalar");break;default:hg($,J,"scalar")}}function tP($,I){let U=I.indexOf(`
135
+ `,q=[{type:"block-scalar-header",offset:g,indent:_,source:X}];if(!u5(q,J))q.push({type:"newline",offset:-1,indent:_,source:`
136
+ `});return{type:"block-scalar",offset:g,indent:_,props:q,source:G}}case'"':return{type:"double-quoted-scalar",offset:g,indent:_,source:v,end:J};case"'":return{type:"single-quoted-scalar",offset:g,indent:_,source:v,end:J};default:return{type:"scalar",offset:g,indent:_,source:v,end:J}}}function tW($,I,U={}){let{afterKey:_=!1,implicitKey:u=!1,inFlow:g=!1,type:z}=U,v="indent"in $?$.indent:null;if(_&&typeof v==="number")v+=2;if(!z)switch($.type){case"single-quoted-scalar":z="QUOTE_SINGLE";break;case"double-quoted-scalar":z="QUOTE_DOUBLE";break;case"block-scalar":{let N=$.props[0];if(N.type!=="block-scalar-header")throw Error("Invalid block scalar header");z=N.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:z="PLAIN"}let J=I5.stringifyString({type:z,value:I},{implicitKey:u||v===null,indent:v!==null&&v>0?" ".repeat(v):"",inFlow:g,options:{blockQuote:!0,lineWidth:-1}});switch(J[0]){case"|":case">":aW($,J);break;case'"':dg($,J,"double-quoted-scalar");break;case"'":dg($,J,"single-quoted-scalar");break;default:dg($,J,"scalar")}}function aW($,I){let U=I.indexOf(`
137
137
  `),_=I.substring(0,U),u=I.substring(U+1)+`
138
- `;if($.type==="block-scalar"){let g=$.props[0];if(g.type!=="block-scalar-header")throw Error("Invalid block scalar header");g.source=_,$.source=u}else{let{offset:g}=$,z="indent"in $?$.indent:-1,v=[{type:"block-scalar-header",offset:g,indent:z,source:_}];if(!$5(v,"end"in $?$.end:void 0))v.push({type:"newline",offset:-1,indent:z,source:`
139
- `});for(let J of Object.keys($))if(J!=="type"&&J!=="offset")delete $[J];Object.assign($,{type:"block-scalar",indent:z,props:v,source:u})}}function $5($,I){if(I)for(let U of I)switch(U.type){case"space":case"comment":$.push(U);break;case"newline":return $.push(U),!0}return!1}function hg($,I,U){switch($.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":$.type=U,$.source=I;break;case"block-scalar":{let _=$.props.slice(1),u=I.length;if($.props[0].type==="block-scalar-header")u-=$.props[0].source.length;for(let g of _)g.offset+=u;delete $.props,Object.assign($,{type:U,source:I,end:_});break}case"block-map":case"block-seq":{let u={type:"newline",offset:$.offset+I.length,indent:$.indent,source:`
140
- `};delete $.items,Object.assign($,{type:U,source:I,end:[u]});break}default:{let _="indent"in $?$.indent:-1,u="end"in $&&Array.isArray($.end)?$.end.filter((g)=>g.type==="space"||g.type==="comment"||g.type==="newline"):[];for(let g of Object.keys($))if(g!=="type"&&g!=="offset")delete $[g];Object.assign($,{type:U,indent:_,source:I,end:u})}}}aP.createScalarToken=pP;aP.resolveAsScalar=dP;aP.setScalarValue=oP});var u5=E((uW)=>{var IW=($)=>("type"in $)?nu($):iu($);function nu($){switch($.type){case"block-scalar":{let I="";for(let U of $.props)I+=nu(U);return I+$.source}case"block-map":case"block-seq":{let I="";for(let U of $.items)I+=iu(U);return I}case"flow-collection":{let I=$.start.source;for(let U of $.items)I+=iu(U);for(let U of $.end)I+=U.source;return I}case"document":{let I=iu($);if($.end)for(let U of $.end)I+=U.source;return I}default:{let I=$.source;if("end"in $&&$.end)for(let U of $.end)I+=U.source;return I}}}function iu({start:$,key:I,sep:U,value:_}){let u="";for(let g of $)u+=g.source;if(I)u+=nu(I);if(U)for(let g of U)u+=g.source;if(_)u+=nu(_);return u}uW.stringify=IW});var g5=E((gW)=>{var cg=Symbol("break visit"),_W=Symbol("skip children"),U5=Symbol("remove item");function l6($,I){if("type"in $&&$.type==="document")$={start:$.start,value:$.value};_5(Object.freeze([]),$,I)}l6.BREAK=cg;l6.SKIP=_W;l6.REMOVE=U5;l6.itemAtPath=($,I)=>{let U=$;for(let[_,u]of I){let g=U?.[_];if(g&&"items"in g)U=g.items[u];else return}return U};l6.parentCollection=($,I)=>{let U=l6.itemAtPath($,I.slice(0,-1)),_=I[I.length-1][0],u=U?.[_];if(u&&"items"in u)return u;throw Error("Parent collection not found")};function _5($,I,U){let _=U(I,$);if(typeof _==="symbol")return _;for(let u of["key","value"]){let g=I[u];if(g&&"items"in g){for(let z=0;z<g.items.length;++z){let v=_5(Object.freeze($.concat([[u,z]])),g.items[z],U);if(typeof v==="number")z=v-1;else if(v===cg)return cg;else if(v===U5)g.items.splice(z,1),z-=1}if(typeof _==="function"&&u==="key")_=_(I,$)}}return typeof _==="function"?_(I,$):_}gW.visit=l6});var ru=E((QW)=>{var dg=I5(),vW=u5(),JW=g5(),pg="\uFEFF",og="\x02",tg="\x18",ag="\x1F",NW=($)=>!!$&&("items"in $),GW=($)=>!!$&&($.type==="scalar"||$.type==="single-quoted-scalar"||$.type==="double-quoted-scalar"||$.type==="block-scalar");function XW($){switch($){case pg:return"<BOM>";case og:return"<DOC>";case tg:return"<FLOW_END>";case ag:return"<SCALAR>";default:return JSON.stringify($)}}function qW($){switch($){case pg:return"byte-order-mark";case og:return"doc-mode";case tg:return"flow-error-end";case ag:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
138
+ `;if($.type==="block-scalar"){let g=$.props[0];if(g.type!=="block-scalar-header")throw Error("Invalid block scalar header");g.source=_,$.source=u}else{let{offset:g}=$,z="indent"in $?$.indent:-1,v=[{type:"block-scalar-header",offset:g,indent:z,source:_}];if(!u5(v,"end"in $?$.end:void 0))v.push({type:"newline",offset:-1,indent:z,source:`
139
+ `});for(let J of Object.keys($))if(J!=="type"&&J!=="offset")delete $[J];Object.assign($,{type:"block-scalar",indent:z,props:v,source:u})}}function u5($,I){if(I)for(let U of I)switch(U.type){case"space":case"comment":$.push(U);break;case"newline":return $.push(U),!0}return!1}function dg($,I,U){switch($.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":$.type=U,$.source=I;break;case"block-scalar":{let _=$.props.slice(1),u=I.length;if($.props[0].type==="block-scalar-header")u-=$.props[0].source.length;for(let g of _)g.offset+=u;delete $.props,Object.assign($,{type:U,source:I,end:_});break}case"block-map":case"block-seq":{let u={type:"newline",offset:$.offset+I.length,indent:$.indent,source:`
140
+ `};delete $.items,Object.assign($,{type:U,source:I,end:[u]});break}default:{let _="indent"in $?$.indent:-1,u="end"in $&&Array.isArray($.end)?$.end.filter((g)=>g.type==="space"||g.type==="comment"||g.type==="newline"):[];for(let g of Object.keys($))if(g!=="type"&&g!=="offset")delete $[g];Object.assign($,{type:U,indent:_,source:I,end:u})}}}eW.createScalarToken=oW;eW.resolveAsScalar=pW;eW.setScalarValue=tW});var _5=E((UP)=>{var uP=($)=>("type"in $)?mu($):lu($);function mu($){switch($.type){case"block-scalar":{let I="";for(let U of $.props)I+=mu(U);return I+$.source}case"block-map":case"block-seq":{let I="";for(let U of $.items)I+=lu(U);return I}case"flow-collection":{let I=$.start.source;for(let U of $.items)I+=lu(U);for(let U of $.end)I+=U.source;return I}case"document":{let I=lu($);if($.end)for(let U of $.end)I+=U.source;return I}default:{let I=$.source;if("end"in $&&$.end)for(let U of $.end)I+=U.source;return I}}}function lu({start:$,key:I,sep:U,value:_}){let u="";for(let g of $)u+=g.source;if(I)u+=mu(I);if(U)for(let g of U)u+=g.source;if(_)u+=mu(_);return u}UP.stringify=uP});var v5=E((zP)=>{var pg=Symbol("break visit"),gP=Symbol("skip children"),g5=Symbol("remove item");function h6($,I){if("type"in $&&$.type==="document")$={start:$.start,value:$.value};z5(Object.freeze([]),$,I)}h6.BREAK=pg;h6.SKIP=gP;h6.REMOVE=g5;h6.itemAtPath=($,I)=>{let U=$;for(let[_,u]of I){let g=U?.[_];if(g&&"items"in g)U=g.items[u];else return}return U};h6.parentCollection=($,I)=>{let U=h6.itemAtPath($,I.slice(0,-1)),_=I[I.length-1][0],u=U?.[_];if(u&&"items"in u)return u;throw Error("Parent collection not found")};function z5($,I,U){let _=U(I,$);if(typeof _==="symbol")return _;for(let u of["key","value"]){let g=I[u];if(g&&"items"in g){for(let z=0;z<g.items.length;++z){let v=z5(Object.freeze($.concat([[u,z]])),g.items[z],U);if(typeof v==="number")z=v-1;else if(v===pg)return pg;else if(v===g5)g.items.splice(z,1),z-=1}if(typeof _==="function"&&u==="key")_=_(I,$)}}return typeof _==="function"?_(I,$):_}zP.visit=h6});var hu=E((TP)=>{var og=U5(),JP=_5(),NP=v5(),tg="\uFEFF",ag="\x02",eg="\x18",sg="\x1F",GP=($)=>!!$&&("items"in $),XP=($)=>!!$&&($.type==="scalar"||$.type==="single-quoted-scalar"||$.type==="double-quoted-scalar"||$.type==="block-scalar");function qP($){switch($){case tg:return"<BOM>";case ag:return"<DOC>";case eg:return"<FLOW_END>";case sg:return"<SCALAR>";default:return JSON.stringify($)}}function QP($){switch($){case tg:return"byte-order-mark";case ag:return"doc-mode";case eg:return"flow-error-end";case sg:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
141
141
  `:case`\r
142
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch($[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}QW.createScalarToken=dg.createScalarToken;QW.resolveAsScalar=dg.resolveAsScalar;QW.setScalarValue=dg.setScalarValue;QW.stringify=vW.stringify;QW.visit=JW.visit;QW.BOM=pg;QW.DOCUMENT=og;QW.FLOW_END=tg;QW.SCALAR=ag;QW.isCollection=NW;QW.isScalar=GW;QW.prettyToken=XW;QW.tokenType=qW});var sg=E((bW)=>{var cI=ru();function V4($){switch($){case void 0:case" ":case`
143
- `:case"\r":case"\t":return!0;default:return!1}}var z5=new Set("0123456789ABCDEFabcdef"),ZW=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),lu=new Set(",[]{}"),AW=new Set(` ,[]{}
144
- \r `),eg=($)=>!$||AW.has($);class v5{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex($,I=!1){if($){if(typeof $!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+$:$,this.lineEndPos=null}this.atEnd=!I;let U=this.next??"stream";while(U&&(I||this.hasChars(1)))U=yield*this.parseNext(U)}atLineEnd(){let $=this.pos,I=this.buffer[$];while(I===" "||I==="\t")I=this.buffer[++$];if(!I||I==="#"||I===`
142
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch($[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}TP.createScalarToken=og.createScalarToken;TP.resolveAsScalar=og.resolveAsScalar;TP.setScalarValue=og.setScalarValue;TP.stringify=JP.stringify;TP.visit=NP.visit;TP.BOM=tg;TP.DOCUMENT=ag;TP.FLOW_END=eg;TP.SCALAR=sg;TP.isCollection=GP;TP.isScalar=XP;TP.prettyToken=qP;TP.tokenType=QP});var Iz=E((jP)=>{var pI=hu();function M4($){switch($){case void 0:case" ":case`
143
+ `:case"\r":case"\t":return!0;default:return!1}}var J5=new Set("0123456789ABCDEFabcdef"),AP=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),cu=new Set(",[]{}"),bP=new Set(` ,[]{}
144
+ \r `),$z=($)=>!$||bP.has($);class N5{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex($,I=!1){if($){if(typeof $!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+$:$,this.lineEndPos=null}this.atEnd=!I;let U=this.next??"stream";while(U&&(I||this.hasChars(1)))U=yield*this.parseNext(U)}atLineEnd(){let $=this.pos,I=this.buffer[$];while(I===" "||I==="\t")I=this.buffer[++$];if(!I||I==="#"||I===`
145
145
  `)return!0;if(I==="\r")return this.buffer[$+1]===`
146
146
  `;return!1}charAt($){return this.buffer[this.pos+$]}continueScalar($){let I=this.buffer[$];if(this.indentNext>0){let U=0;while(I===" ")I=this.buffer[++U+$];if(I==="\r"){let _=this.buffer[U+$+1];if(_===`
147
147
  `||!_&&!this.atEnd)return $+U+1}return I===`
148
- `||U>=this.indentNext||!I&&!this.atEnd?$+U:-1}if(I==="-"||I==="."){let U=this.buffer.substr($,3);if((U==="---"||U==="...")&&V4(this.buffer[$+3]))return-1}return $}getLine(){let $=this.lineEndPos;if(typeof $!=="number"||$!==-1&&$<this.pos)$=this.buffer.indexOf(`
149
- `,this.pos),this.lineEndPos=$;if($===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[$-1]==="\r")$-=1;return this.buffer.substring(this.pos,$)}hasChars($){return this.pos+$<=this.buffer.length}setNext($){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=$,null}peek($){return this.buffer.substr(this.pos,$)}*parseNext($){switch($){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let $=this.getLine();if($===null)return this.setNext("stream");if($[0]===cI.BOM)yield*this.pushCount(1),$=$.substring(1);if($[0]==="%"){let I=$.length,U=$.indexOf("#");while(U!==-1){let u=$[U-1];if(u===" "||u==="\t"){I=U-1;break}else U=$.indexOf("#",U+1)}while(!0){let u=$[I-1];if(u===" "||u==="\t")I-=1;else break}let _=(yield*this.pushCount(I))+(yield*this.pushSpaces(!0));return yield*this.pushCount($.length-_),this.pushNewline(),"stream"}if(this.atLineEnd()){let I=yield*this.pushSpaces(!0);return yield*this.pushCount($.length-I),yield*this.pushNewline(),"stream"}return yield cI.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let $=this.charAt(0);if(!$&&!this.atEnd)return this.setNext("line-start");if($==="-"||$==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let I=this.peek(3);if((I==="---"||I==="...")&&V4(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,I==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!V4(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[$,I]=this.peek(2);if(!I&&!this.atEnd)return this.setNext("block-start");if(($==="-"||$==="?"||$===":")&&V4(I)){let U=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=U,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let $=this.getLine();if($===null)return this.setNext("doc");let I=yield*this.pushIndicators();switch($[I]){case"#":yield*this.pushCount($.length-I);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(eg),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return I+=yield*this.parseBlockScalarHeader(),I+=yield*this.pushSpaces(!0),yield*this.pushCount($.length-I),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let $,I,U=-1;do{if($=yield*this.pushNewline(),$>0)I=yield*this.pushSpaces(!1),this.indentValue=U=I;else I=0;I+=yield*this.pushSpaces(!0)}while($+I>0);let _=this.getLine();if(_===null)return this.setNext("flow");if(U!==-1&&U<this.indentNext&&_[0]!=="#"||U===0&&(_.startsWith("---")||_.startsWith("..."))&&V4(_[3])){if(!(U===this.indentNext-1&&this.flowLevel===1&&(_[0]==="]"||_[0]==="}")))return this.flowLevel=0,yield cI.FLOW_END,yield*this.parseLineStart()}let u=0;while(_[u]===",")u+=yield*this.pushCount(1),u+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(u+=yield*this.pushIndicators(),_[u]){case void 0:return"flow";case"#":return yield*this.pushCount(_.length-u),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(eg),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let g=this.charAt(1);if(this.flowKey||V4(g)||g===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let $=this.charAt(0),I=this.buffer.indexOf($,this.pos+1);if($==="'")while(I!==-1&&this.buffer[I+1]==="'")I=this.buffer.indexOf("'",I+2);else while(I!==-1){let u=0;while(this.buffer[I-1-u]==="\\")u+=1;if(u%2===0)break;I=this.buffer.indexOf('"',I+1)}let U=this.buffer.substring(0,I),_=U.indexOf(`
148
+ `||U>=this.indentNext||!I&&!this.atEnd?$+U:-1}if(I==="-"||I==="."){let U=this.buffer.substr($,3);if((U==="---"||U==="...")&&M4(this.buffer[$+3]))return-1}return $}getLine(){let $=this.lineEndPos;if(typeof $!=="number"||$!==-1&&$<this.pos)$=this.buffer.indexOf(`
149
+ `,this.pos),this.lineEndPos=$;if($===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[$-1]==="\r")$-=1;return this.buffer.substring(this.pos,$)}hasChars($){return this.pos+$<=this.buffer.length}setNext($){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=$,null}peek($){return this.buffer.substr(this.pos,$)}*parseNext($){switch($){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let $=this.getLine();if($===null)return this.setNext("stream");if($[0]===pI.BOM)yield*this.pushCount(1),$=$.substring(1);if($[0]==="%"){let I=$.length,U=$.indexOf("#");while(U!==-1){let u=$[U-1];if(u===" "||u==="\t"){I=U-1;break}else U=$.indexOf("#",U+1)}while(!0){let u=$[I-1];if(u===" "||u==="\t")I-=1;else break}let _=(yield*this.pushCount(I))+(yield*this.pushSpaces(!0));return yield*this.pushCount($.length-_),this.pushNewline(),"stream"}if(this.atLineEnd()){let I=yield*this.pushSpaces(!0);return yield*this.pushCount($.length-I),yield*this.pushNewline(),"stream"}return yield pI.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let $=this.charAt(0);if(!$&&!this.atEnd)return this.setNext("line-start");if($==="-"||$==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let I=this.peek(3);if((I==="---"||I==="...")&&M4(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,I==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!M4(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[$,I]=this.peek(2);if(!I&&!this.atEnd)return this.setNext("block-start");if(($==="-"||$==="?"||$===":")&&M4(I)){let U=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=U,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let $=this.getLine();if($===null)return this.setNext("doc");let I=yield*this.pushIndicators();switch($[I]){case"#":yield*this.pushCount($.length-I);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil($z),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return I+=yield*this.parseBlockScalarHeader(),I+=yield*this.pushSpaces(!0),yield*this.pushCount($.length-I),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let $,I,U=-1;do{if($=yield*this.pushNewline(),$>0)I=yield*this.pushSpaces(!1),this.indentValue=U=I;else I=0;I+=yield*this.pushSpaces(!0)}while($+I>0);let _=this.getLine();if(_===null)return this.setNext("flow");if(U!==-1&&U<this.indentNext&&_[0]!=="#"||U===0&&(_.startsWith("---")||_.startsWith("..."))&&M4(_[3])){if(!(U===this.indentNext-1&&this.flowLevel===1&&(_[0]==="]"||_[0]==="}")))return this.flowLevel=0,yield pI.FLOW_END,yield*this.parseLineStart()}let u=0;while(_[u]===",")u+=yield*this.pushCount(1),u+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(u+=yield*this.pushIndicators(),_[u]){case void 0:return"flow";case"#":return yield*this.pushCount(_.length-u),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil($z),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let g=this.charAt(1);if(this.flowKey||M4(g)||g===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let $=this.charAt(0),I=this.buffer.indexOf($,this.pos+1);if($==="'")while(I!==-1&&this.buffer[I+1]==="'")I=this.buffer.indexOf("'",I+2);else while(I!==-1){let u=0;while(this.buffer[I-1-u]==="\\")u+=1;if(u%2===0)break;I=this.buffer.indexOf('"',I+1)}let U=this.buffer.substring(0,I),_=U.indexOf(`
150
150
  `,this.pos);if(_!==-1){while(_!==-1){let u=this.continueScalar(_+1);if(u===-1)break;_=U.indexOf(`
151
- `,u)}if(_!==-1)I=_-(U[_-1]==="\r"?2:1)}if(I===-1){if(!this.atEnd)return this.setNext("quoted-scalar");I=this.buffer.length}return yield*this.pushToIndex(I+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let $=this.pos;while(!0){let I=this.buffer[++$];if(I==="+")this.blockScalarKeep=!0;else if(I>"0"&&I<="9")this.blockScalarIndent=Number(I)-1;else if(I!=="-")break}return yield*this.pushUntil((I)=>V4(I)||I==="#")}*parseBlockScalar(){let $=this.pos-1,I=0,U;$:for(let u=this.pos;U=this.buffer[u];++u)switch(U){case" ":I+=1;break;case`
151
+ `,u)}if(_!==-1)I=_-(U[_-1]==="\r"?2:1)}if(I===-1){if(!this.atEnd)return this.setNext("quoted-scalar");I=this.buffer.length}return yield*this.pushToIndex(I+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let $=this.pos;while(!0){let I=this.buffer[++$];if(I==="+")this.blockScalarKeep=!0;else if(I>"0"&&I<="9")this.blockScalarIndent=Number(I)-1;else if(I!=="-")break}return yield*this.pushUntil((I)=>M4(I)||I==="#")}*parseBlockScalar(){let $=this.pos-1,I=0,U;$:for(let u=this.pos;U=this.buffer[u];++u)switch(U){case" ":I+=1;break;case`
152
152
  `:$=u,I=0;break;case"\r":{let g=this.buffer[u+1];if(!g&&!this.atEnd)return this.setNext("block-scalar");if(g===`
153
153
  `)break}default:break $}if(!U&&!this.atEnd)return this.setNext("block-scalar");if(I>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=I;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let u=this.continueScalar($+1);if(u===-1)break;$=this.buffer.indexOf(`
154
154
  `,u)}while($!==-1);if($===-1){if(!this.atEnd)return this.setNext("block-scalar");$=this.buffer.length}}let _=$+1;U=this.buffer[_];while(U===" ")U=this.buffer[++_];if(U==="\t"){while(U==="\t"||U===" "||U==="\r"||U===`
155
155
  `)U=this.buffer[++_];$=_-1}else if(!this.blockScalarKeep)do{let u=$-1,g=this.buffer[u];if(g==="\r")g=this.buffer[--u];let z=u;while(g===" ")g=this.buffer[--u];if(g===`
156
- `&&u>=this.pos&&u+1+I>z)$=u;else break}while(!0);return yield cI.SCALAR,yield*this.pushToIndex($+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let $=this.flowLevel>0,I=this.pos-1,U=this.pos-1,_;while(_=this.buffer[++U])if(_===":"){let u=this.buffer[U+1];if(V4(u)||$&&lu.has(u))break;I=U}else if(V4(_)){let u=this.buffer[U+1];if(_==="\r")if(u===`
156
+ `&&u>=this.pos&&u+1+I>z)$=u;else break}while(!0);return yield pI.SCALAR,yield*this.pushToIndex($+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let $=this.flowLevel>0,I=this.pos-1,U=this.pos-1,_;while(_=this.buffer[++U])if(_===":"){let u=this.buffer[U+1];if(M4(u)||$&&cu.has(u))break;I=U}else if(M4(_)){let u=this.buffer[U+1];if(_==="\r")if(u===`
157
157
  `)U+=1,_=`
158
- `,u=this.buffer[U+1];else I=U;if(u==="#"||$&&lu.has(u))break;if(_===`
159
- `){let g=this.continueScalar(U+1);if(g===-1)break;U=Math.max(U,g-2)}}else{if($&&lu.has(_))break;I=U}if(!_&&!this.atEnd)return this.setNext("plain-scalar");return yield cI.SCALAR,yield*this.pushToIndex(I+1,!0),$?"flow":"doc"}*pushCount($){if($>0)return yield this.buffer.substr(this.pos,$),this.pos+=$,$;return 0}*pushToIndex($,I){let U=this.buffer.slice(this.pos,$);if(U)return yield U,this.pos+=U.length,U.length;else if(I)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(eg))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let $=this.flowLevel>0,I=this.charAt(1);if(V4(I)||$&&lu.has(I)){if(!$)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;return(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let $=this.pos+2,I=this.buffer[$];while(!V4(I)&&I!==">")I=this.buffer[++$];return yield*this.pushToIndex(I===">"?$+1:$,!1)}else{let $=this.pos+1,I=this.buffer[$];while(I)if(ZW.has(I))I=this.buffer[++$];else if(I==="%"&&z5.has(this.buffer[$+1])&&z5.has(this.buffer[$+2]))I=this.buffer[$+=3];else break;return yield*this.pushToIndex($,!1)}}*pushNewline(){let $=this.buffer[this.pos];if($===`
158
+ `,u=this.buffer[U+1];else I=U;if(u==="#"||$&&cu.has(u))break;if(_===`
159
+ `){let g=this.continueScalar(U+1);if(g===-1)break;U=Math.max(U,g-2)}}else{if($&&cu.has(_))break;I=U}if(!_&&!this.atEnd)return this.setNext("plain-scalar");return yield pI.SCALAR,yield*this.pushToIndex(I+1,!0),$?"flow":"doc"}*pushCount($){if($>0)return yield this.buffer.substr(this.pos,$),this.pos+=$,$;return 0}*pushToIndex($,I){let U=this.buffer.slice(this.pos,$);if(U)return yield U,this.pos+=U.length,U.length;else if(I)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil($z))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let $=this.flowLevel>0,I=this.charAt(1);if(M4(I)||$&&cu.has(I)){if(!$)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;return(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let $=this.pos+2,I=this.buffer[$];while(!M4(I)&&I!==">")I=this.buffer[++$];return yield*this.pushToIndex(I===">"?$+1:$,!1)}else{let $=this.pos+1,I=this.buffer[$];while(I)if(AP.has(I))I=this.buffer[++$];else if(I==="%"&&J5.has(this.buffer[$+1])&&J5.has(this.buffer[$+2]))I=this.buffer[$+=3];else break;return yield*this.pushToIndex($,!1)}}*pushNewline(){let $=this.buffer[this.pos];if($===`
160
160
  `)return yield*this.pushCount(1);else if($==="\r"&&this.charAt(1)===`
161
- `)return yield*this.pushCount(2);else return 0}*pushSpaces($){let I=this.pos-1,U;do U=this.buffer[++I];while(U===" "||$&&U==="\t");let _=I-this.pos;if(_>0)yield this.buffer.substr(this.pos,_),this.pos=I;return _}*pushUntil($){let I=this.pos,U=this.buffer[I];while(!$(U))U=this.buffer[++I];return yield*this.pushToIndex(I,!1)}}bW.Lexer=v5});var $z=E((FW)=>{class J5{constructor(){this.lineStarts=[],this.addNewLine=($)=>this.lineStarts.push($),this.linePos=($)=>{let I=0,U=this.lineStarts.length;while(I<U){let u=I+U>>1;if(this.lineStarts[u]<$)I=u+1;else U=u}if(this.lineStarts[I]===$)return{line:I+1,col:1};if(I===0)return{line:0,col:$};let _=this.lineStarts[I-1];return{line:I,col:$-_+1}}}}FW.LineCounter=J5});var Iz=E((CW)=>{var wW=g$("process"),N5=ru(),EW=sg();function T6($,I){for(let U=0;U<$.length;++U)if($[U].type===I)return!0;return!1}function G5($){for(let I=0;I<$.length;++I)switch($[I].type){case"space":case"comment":case"newline":break;default:return I}return-1}function q5($){switch($?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function mu($){switch($.type){case"document":return $.start;case"block-map":{let I=$.items[$.items.length-1];return I.sep??I.start}case"block-seq":return $.items[$.items.length-1].start;default:return[]}}function j1($){if($.length===0)return[];let I=$.length;$:while(--I>=0)switch($[I].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break $}while($[++I]?.type==="space");return $.splice(I,$.length)}function X5($){if($.start.type==="flow-seq-start"){for(let I of $.items)if(I.sep&&!I.value&&!T6(I.start,"explicit-key-ind")&&!T6(I.sep,"map-value-ind")){if(I.key)I.value=I.key;if(delete I.key,q5(I.value))if(I.value.end)Array.prototype.push.apply(I.value.end,I.sep);else I.value.end=I.sep;else Array.prototype.push.apply(I.start,I.sep);delete I.sep}}}class Q5{constructor($){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new EW.Lexer,this.onNewLine=$}*parse($,I=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let U of this.lexer.lex($,I))yield*this.next(U);if(!I)yield*this.end()}*next($){if(this.source=$,wW.env.LOG_TOKENS)console.log("|",N5.prettyToken($));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=$.length;return}let I=N5.tokenType($);if(!I){let U=`Not a YAML token: ${$}`;yield*this.pop({type:"error",offset:this.offset,message:U,source:$}),this.offset+=$.length}else if(I==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=I,yield*this.step(),I){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+$.length);break;case"space":if(this.atNewLine&&$[0]===" ")this.indent+=$.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=$.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=$.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let $=this.peek(1);if(this.type==="doc-end"&&$?.type!=="doc-end"){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!$)return yield*this.stream();switch($.type){case"document":return yield*this.document($);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar($);case"block-scalar":return yield*this.blockScalar($);case"block-map":return yield*this.blockMap($);case"block-seq":return yield*this.blockSequence($);case"flow-collection":return yield*this.flowCollection($);case"doc-end":return yield*this.documentEnd($)}yield*this.pop()}peek($){return this.stack[this.stack.length-$]}*pop($){let I=$??this.stack.pop();if(!I)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield I;else{let U=this.peek(1);if(I.type==="block-scalar")I.indent="indent"in U?U.indent:0;else if(I.type==="flow-collection"&&U.type==="document")I.indent=0;if(I.type==="flow-collection")X5(I);switch(U.type){case"document":U.value=I;break;case"block-scalar":U.props.push(I);break;case"block-map":{let _=U.items[U.items.length-1];if(_.value){U.items.push({start:[],key:I,sep:[]}),this.onKeyLine=!0;return}else if(_.sep)_.value=I;else{Object.assign(_,{key:I,sep:[]}),this.onKeyLine=!_.explicitKey;return}break}case"block-seq":{let _=U.items[U.items.length-1];if(_.value)U.items.push({start:[],value:I});else _.value=I;break}case"flow-collection":{let _=U.items[U.items.length-1];if(!_||_.value)U.items.push({start:[],key:I,sep:[]});else if(_.sep)_.value=I;else Object.assign(_,{key:I,sep:[]});return}default:yield*this.pop(),yield*this.pop(I)}if((U.type==="document"||U.type==="block-map"||U.type==="block-seq")&&(I.type==="block-map"||I.type==="block-seq")){let _=I.items[I.items.length-1];if(_&&!_.sep&&!_.value&&_.start.length>0&&G5(_.start)===-1&&(I.indent===0||_.start.every((u)=>u.type!=="comment"||u.indent<I.indent))){if(U.type==="document")U.end=_.start;else U.items.push({start:_.start});I.items.splice(-1,1)}}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let $={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")$.start.push(this.sourceToken);this.stack.push($);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document($){if($.value)return yield*this.lineEnd($);switch(this.type){case"doc-start":{if(G5($.start)!==-1)yield*this.pop(),yield*this.step();else $.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":$.start.push(this.sourceToken);return}let I=this.startBlockValue($);if(I)this.stack.push(I);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar($){if(this.type==="map-value-ind"){let I=mu(this.peek(2)),U=j1(I),_;if($.end)_=$.end,_.push(this.sourceToken),delete $.end;else _=[this.sourceToken];let u={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:U,key:$,sep:_}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd($)}*blockScalar($){switch(this.type){case"space":case"comment":case"newline":$.props.push(this.sourceToken);return;case"scalar":if($.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let I=this.source.indexOf(`
161
+ `)return yield*this.pushCount(2);else return 0}*pushSpaces($){let I=this.pos-1,U;do U=this.buffer[++I];while(U===" "||$&&U==="\t");let _=I-this.pos;if(_>0)yield this.buffer.substr(this.pos,_),this.pos=I;return _}*pushUntil($){let I=this.pos,U=this.buffer[I];while(!$(U))U=this.buffer[++I];return yield*this.pushToIndex(I,!1)}}jP.Lexer=N5});var uz=E((SP)=>{class G5{constructor(){this.lineStarts=[],this.addNewLine=($)=>this.lineStarts.push($),this.linePos=($)=>{let I=0,U=this.lineStarts.length;while(I<U){let u=I+U>>1;if(this.lineStarts[u]<$)I=u+1;else U=u}if(this.lineStarts[I]===$)return{line:I+1,col:1};if(I===0)return{line:0,col:$};let _=this.lineStarts[I-1];return{line:I,col:$-_+1}}}}SP.LineCounter=G5});var Uz=E((fP)=>{var EP=g$("process"),X5=hu(),CP=Iz();function Y6($,I){for(let U=0;U<$.length;++U)if($[U].type===I)return!0;return!1}function q5($){for(let I=0;I<$.length;++I)switch($[I].type){case"space":case"comment":case"newline":break;default:return I}return-1}function T5($){switch($?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function du($){switch($.type){case"document":return $.start;case"block-map":{let I=$.items[$.items.length-1];return I.sep??I.start}case"block-seq":return $.items[$.items.length-1].start;default:return[]}}function S1($){if($.length===0)return[];let I=$.length;$:while(--I>=0)switch($[I].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break $}while($[++I]?.type==="space");return $.splice(I,$.length)}function Q5($){if($.start.type==="flow-seq-start"){for(let I of $.items)if(I.sep&&!I.value&&!Y6(I.start,"explicit-key-ind")&&!Y6(I.sep,"map-value-ind")){if(I.key)I.value=I.key;if(delete I.key,T5(I.value))if(I.value.end)Array.prototype.push.apply(I.value.end,I.sep);else I.value.end=I.sep;else Array.prototype.push.apply(I.start,I.sep);delete I.sep}}}class H5{constructor($){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new CP.Lexer,this.onNewLine=$}*parse($,I=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let U of this.lexer.lex($,I))yield*this.next(U);if(!I)yield*this.end()}*next($){if(this.source=$,EP.env.LOG_TOKENS)console.log("|",X5.prettyToken($));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=$.length;return}let I=X5.tokenType($);if(!I){let U=`Not a YAML token: ${$}`;yield*this.pop({type:"error",offset:this.offset,message:U,source:$}),this.offset+=$.length}else if(I==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=I,yield*this.step(),I){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+$.length);break;case"space":if(this.atNewLine&&$[0]===" ")this.indent+=$.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=$.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=$.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let $=this.peek(1);if(this.type==="doc-end"&&$?.type!=="doc-end"){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!$)return yield*this.stream();switch($.type){case"document":return yield*this.document($);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar($);case"block-scalar":return yield*this.blockScalar($);case"block-map":return yield*this.blockMap($);case"block-seq":return yield*this.blockSequence($);case"flow-collection":return yield*this.flowCollection($);case"doc-end":return yield*this.documentEnd($)}yield*this.pop()}peek($){return this.stack[this.stack.length-$]}*pop($){let I=$??this.stack.pop();if(!I)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield I;else{let U=this.peek(1);if(I.type==="block-scalar")I.indent="indent"in U?U.indent:0;else if(I.type==="flow-collection"&&U.type==="document")I.indent=0;if(I.type==="flow-collection")Q5(I);switch(U.type){case"document":U.value=I;break;case"block-scalar":U.props.push(I);break;case"block-map":{let _=U.items[U.items.length-1];if(_.value){U.items.push({start:[],key:I,sep:[]}),this.onKeyLine=!0;return}else if(_.sep)_.value=I;else{Object.assign(_,{key:I,sep:[]}),this.onKeyLine=!_.explicitKey;return}break}case"block-seq":{let _=U.items[U.items.length-1];if(_.value)U.items.push({start:[],value:I});else _.value=I;break}case"flow-collection":{let _=U.items[U.items.length-1];if(!_||_.value)U.items.push({start:[],key:I,sep:[]});else if(_.sep)_.value=I;else Object.assign(_,{key:I,sep:[]});return}default:yield*this.pop(),yield*this.pop(I)}if((U.type==="document"||U.type==="block-map"||U.type==="block-seq")&&(I.type==="block-map"||I.type==="block-seq")){let _=I.items[I.items.length-1];if(_&&!_.sep&&!_.value&&_.start.length>0&&q5(_.start)===-1&&(I.indent===0||_.start.every((u)=>u.type!=="comment"||u.indent<I.indent))){if(U.type==="document")U.end=_.start;else U.items.push({start:_.start});I.items.splice(-1,1)}}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let $={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")$.start.push(this.sourceToken);this.stack.push($);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document($){if($.value)return yield*this.lineEnd($);switch(this.type){case"doc-start":{if(q5($.start)!==-1)yield*this.pop(),yield*this.step();else $.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":$.start.push(this.sourceToken);return}let I=this.startBlockValue($);if(I)this.stack.push(I);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar($){if(this.type==="map-value-ind"){let I=du(this.peek(2)),U=S1(I),_;if($.end)_=$.end,_.push(this.sourceToken),delete $.end;else _=[this.sourceToken];let u={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:U,key:$,sep:_}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd($)}*blockScalar($){switch(this.type){case"space":case"comment":case"newline":$.props.push(this.sourceToken);return;case"scalar":if($.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let I=this.source.indexOf(`
162
162
  `)+1;while(I!==0)this.onNewLine(this.offset+I),I=this.source.indexOf(`
163
- `,I)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap($){let I=$.items[$.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,I.value){let U="end"in I.value?I.value.end:void 0;if((Array.isArray(U)?U[U.length-1]:void 0)?.type==="comment")U?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else if(I.sep)I.sep.push(this.sourceToken);else I.start.push(this.sourceToken);return;case"space":case"comment":if(I.value)$.items.push({start:[this.sourceToken]});else if(I.sep)I.sep.push(this.sourceToken);else{if(this.atIndentedComment(I.start,$.indent)){let _=$.items[$.items.length-2]?.value?.end;if(Array.isArray(_)){Array.prototype.push.apply(_,I.start),_.push(this.sourceToken),$.items.pop();return}}I.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let U=!this.onKeyLine&&this.indent===$.indent,_=U&&(I.sep||I.explicitKey)&&this.type!=="seq-item-ind",u=[];if(_&&I.sep&&!I.value){let g=[];for(let z=0;z<I.sep.length;++z){let v=I.sep[z];switch(v.type){case"newline":g.push(z);break;case"space":break;case"comment":if(v.indent>$.indent)g.length=0;break;default:g.length=0}}if(g.length>=2)u=I.sep.splice(g[1])}switch(this.type){case"anchor":case"tag":if(_||I.value)u.push(this.sourceToken),$.items.push({start:u}),this.onKeyLine=!0;else if(I.sep)I.sep.push(this.sourceToken);else I.start.push(this.sourceToken);return;case"explicit-key-ind":if(!I.sep&&!I.explicitKey)I.start.push(this.sourceToken),I.explicitKey=!0;else if(_||I.value)u.push(this.sourceToken),$.items.push({start:u,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(I.explicitKey)if(!I.sep)if(T6(I.start,"newline"))Object.assign(I,{key:null,sep:[this.sourceToken]});else{let g=j1(I.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:g,key:null,sep:[this.sourceToken]}]})}else if(I.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(T6(I.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]});else if(q5(I.key)&&!T6(I.sep,"newline")){let g=j1(I.start),z=I.key,v=I.sep;v.push(this.sourceToken),delete I.key,delete I.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:g,key:z,sep:v}]})}else if(u.length>0)I.sep=I.sep.concat(u,this.sourceToken);else I.sep.push(this.sourceToken);else if(!I.sep)Object.assign(I,{key:null,sep:[this.sourceToken]});else if(I.value||_)$.items.push({start:u,key:null,sep:[this.sourceToken]});else if(T6(I.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else I.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let g=this.flowScalar(this.type);if(_||I.value)$.items.push({start:u,key:g,sep:[]}),this.onKeyLine=!0;else if(I.sep)this.stack.push(g);else Object.assign(I,{key:g,sep:[]}),this.onKeyLine=!0;return}default:{let g=this.startBlockValue($);if(g){if(g.type==="block-seq"){if(!I.explicitKey&&I.sep&&!T6(I.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(U)$.items.push({start:u});this.stack.push(g);return}}}}yield*this.pop(),yield*this.step()}*blockSequence($){let I=$.items[$.items.length-1];switch(this.type){case"newline":if(I.value){let U="end"in I.value?I.value.end:void 0;if((Array.isArray(U)?U[U.length-1]:void 0)?.type==="comment")U?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else I.start.push(this.sourceToken);return;case"space":case"comment":if(I.value)$.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(I.start,$.indent)){let _=$.items[$.items.length-2]?.value?.end;if(Array.isArray(_)){Array.prototype.push.apply(_,I.start),_.push(this.sourceToken),$.items.pop();return}}I.start.push(this.sourceToken)}return;case"anchor":case"tag":if(I.value||this.indent<=$.indent)break;I.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==$.indent)break;if(I.value||T6(I.start,"seq-item-ind"))$.items.push({start:[this.sourceToken]});else I.start.push(this.sourceToken);return}if(this.indent>$.indent){let U=this.startBlockValue($);if(U){this.stack.push(U);return}}yield*this.pop(),yield*this.step()}*flowCollection($){let I=$.items[$.items.length-1];if(this.type==="flow-error-end"){let U;do yield*this.pop(),U=this.peek(1);while(U?.type==="flow-collection")}else if($.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!I||I.sep)$.items.push({start:[this.sourceToken]});else I.start.push(this.sourceToken);return;case"map-value-ind":if(!I||I.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(I.sep)I.sep.push(this.sourceToken);else Object.assign(I,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!I||I.value)$.items.push({start:[this.sourceToken]});else if(I.sep)I.sep.push(this.sourceToken);else I.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let _=this.flowScalar(this.type);if(!I||I.value)$.items.push({start:[],key:_,sep:[]});else if(I.sep)this.stack.push(_);else Object.assign(I,{key:_,sep:[]});return}case"flow-map-end":case"flow-seq-end":$.end.push(this.sourceToken);return}let U=this.startBlockValue($);if(U)this.stack.push(U);else yield*this.pop(),yield*this.step()}else{let U=this.peek(2);if(U.type==="block-map"&&(this.type==="map-value-ind"&&U.indent===$.indent||this.type==="newline"&&!U.items[U.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&U.type!=="flow-collection"){let _=mu(U),u=j1(_);X5($);let g=$.end.splice(1,$.end.length);g.push(this.sourceToken);let z={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:u,key:$,sep:g}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=z}else yield*this.lineEnd($)}}flowScalar($){if(this.onNewLine){let I=this.source.indexOf(`
163
+ `,I)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap($){let I=$.items[$.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,I.value){let U="end"in I.value?I.value.end:void 0;if((Array.isArray(U)?U[U.length-1]:void 0)?.type==="comment")U?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else if(I.sep)I.sep.push(this.sourceToken);else I.start.push(this.sourceToken);return;case"space":case"comment":if(I.value)$.items.push({start:[this.sourceToken]});else if(I.sep)I.sep.push(this.sourceToken);else{if(this.atIndentedComment(I.start,$.indent)){let _=$.items[$.items.length-2]?.value?.end;if(Array.isArray(_)){Array.prototype.push.apply(_,I.start),_.push(this.sourceToken),$.items.pop();return}}I.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let U=!this.onKeyLine&&this.indent===$.indent,_=U&&(I.sep||I.explicitKey)&&this.type!=="seq-item-ind",u=[];if(_&&I.sep&&!I.value){let g=[];for(let z=0;z<I.sep.length;++z){let v=I.sep[z];switch(v.type){case"newline":g.push(z);break;case"space":break;case"comment":if(v.indent>$.indent)g.length=0;break;default:g.length=0}}if(g.length>=2)u=I.sep.splice(g[1])}switch(this.type){case"anchor":case"tag":if(_||I.value)u.push(this.sourceToken),$.items.push({start:u}),this.onKeyLine=!0;else if(I.sep)I.sep.push(this.sourceToken);else I.start.push(this.sourceToken);return;case"explicit-key-ind":if(!I.sep&&!I.explicitKey)I.start.push(this.sourceToken),I.explicitKey=!0;else if(_||I.value)u.push(this.sourceToken),$.items.push({start:u,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(I.explicitKey)if(!I.sep)if(Y6(I.start,"newline"))Object.assign(I,{key:null,sep:[this.sourceToken]});else{let g=S1(I.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:g,key:null,sep:[this.sourceToken]}]})}else if(I.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Y6(I.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]});else if(T5(I.key)&&!Y6(I.sep,"newline")){let g=S1(I.start),z=I.key,v=I.sep;v.push(this.sourceToken),delete I.key,delete I.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:g,key:z,sep:v}]})}else if(u.length>0)I.sep=I.sep.concat(u,this.sourceToken);else I.sep.push(this.sourceToken);else if(!I.sep)Object.assign(I,{key:null,sep:[this.sourceToken]});else if(I.value||_)$.items.push({start:u,key:null,sep:[this.sourceToken]});else if(Y6(I.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else I.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let g=this.flowScalar(this.type);if(_||I.value)$.items.push({start:u,key:g,sep:[]}),this.onKeyLine=!0;else if(I.sep)this.stack.push(g);else Object.assign(I,{key:g,sep:[]}),this.onKeyLine=!0;return}default:{let g=this.startBlockValue($);if(g){if(g.type==="block-seq"){if(!I.explicitKey&&I.sep&&!Y6(I.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(U)$.items.push({start:u});this.stack.push(g);return}}}}yield*this.pop(),yield*this.step()}*blockSequence($){let I=$.items[$.items.length-1];switch(this.type){case"newline":if(I.value){let U="end"in I.value?I.value.end:void 0;if((Array.isArray(U)?U[U.length-1]:void 0)?.type==="comment")U?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else I.start.push(this.sourceToken);return;case"space":case"comment":if(I.value)$.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(I.start,$.indent)){let _=$.items[$.items.length-2]?.value?.end;if(Array.isArray(_)){Array.prototype.push.apply(_,I.start),_.push(this.sourceToken),$.items.pop();return}}I.start.push(this.sourceToken)}return;case"anchor":case"tag":if(I.value||this.indent<=$.indent)break;I.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==$.indent)break;if(I.value||Y6(I.start,"seq-item-ind"))$.items.push({start:[this.sourceToken]});else I.start.push(this.sourceToken);return}if(this.indent>$.indent){let U=this.startBlockValue($);if(U){this.stack.push(U);return}}yield*this.pop(),yield*this.step()}*flowCollection($){let I=$.items[$.items.length-1];if(this.type==="flow-error-end"){let U;do yield*this.pop(),U=this.peek(1);while(U?.type==="flow-collection")}else if($.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!I||I.sep)$.items.push({start:[this.sourceToken]});else I.start.push(this.sourceToken);return;case"map-value-ind":if(!I||I.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(I.sep)I.sep.push(this.sourceToken);else Object.assign(I,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!I||I.value)$.items.push({start:[this.sourceToken]});else if(I.sep)I.sep.push(this.sourceToken);else I.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let _=this.flowScalar(this.type);if(!I||I.value)$.items.push({start:[],key:_,sep:[]});else if(I.sep)this.stack.push(_);else Object.assign(I,{key:_,sep:[]});return}case"flow-map-end":case"flow-seq-end":$.end.push(this.sourceToken);return}let U=this.startBlockValue($);if(U)this.stack.push(U);else yield*this.pop(),yield*this.step()}else{let U=this.peek(2);if(U.type==="block-map"&&(this.type==="map-value-ind"&&U.indent===$.indent||this.type==="newline"&&!U.items[U.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&U.type!=="flow-collection"){let _=du(U),u=S1(_);Q5($);let g=$.end.splice(1,$.end.length);g.push(this.sourceToken);let z={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:u,key:$,sep:g}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=z}else yield*this.lineEnd($)}}flowScalar($){if(this.onNewLine){let I=this.source.indexOf(`
164
164
  `)+1;while(I!==0)this.onNewLine(this.offset+I),I=this.source.indexOf(`
165
- `,I)+1}return{type:$,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue($){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let I=mu($),U=j1(I);return U.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let I=mu($),U=j1(I);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,I){if(this.type!=="comment")return!1;if(this.indent<=I)return!1;return $.every((U)=>U.type==="newline"||U.type==="space")}*documentEnd($){if(this.type!=="doc-mode"){if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd($){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}CW.Parser=Q5});var D5=E((mW)=>{var T5=mg(),xW=nI(),dI=rI(),kW=$g(),yW=$$(),iW=$z(),H5=Iz();function Y5($){let I=$.prettyErrors!==!1;return{lineCounter:$.lineCounter||I&&new iW.LineCounter||null,prettyErrors:I}}function nW($,I={}){let{lineCounter:U,prettyErrors:_}=Y5(I),u=new H5.Parser(U?.addNewLine),g=new T5.Composer(I),z=Array.from(g.compose(u.parse($)));if(_&&U)for(let v of z)v.errors.forEach(dI.prettifyError($,U)),v.warnings.forEach(dI.prettifyError($,U));if(z.length>0)return z;return Object.assign([],{empty:!0},g.streamInfo())}function O5($,I={}){let{lineCounter:U,prettyErrors:_}=Y5(I),u=new H5.Parser(U?.addNewLine),g=new T5.Composer(I),z=null;for(let v of g.compose(u.parse($),!0,$.length))if(!z)z=v;else if(z.options.logLevel!=="silent"){z.errors.push(new dI.YAMLParseError(v.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(_&&U)z.errors.forEach(dI.prettifyError($,U)),z.warnings.forEach(dI.prettifyError($,U));return z}function rW($,I,U){let _=void 0;if(typeof I==="function")_=I;else if(U===void 0&&I&&typeof I==="object")U=I;let u=O5($,U);if(!u)return null;if(u.warnings.forEach((g)=>kW.warn(u.options.logLevel,g)),u.errors.length>0)if(u.options.logLevel!=="silent")throw u.errors[0];else u.errors=[];return u.toJS(Object.assign({reviver:_},U))}function lW($,I,U){let _=null;if(typeof I==="function"||Array.isArray(I))_=I;else if(U===void 0&&I)U=I;if(typeof U==="string")U=U.length;if(typeof U==="number"){let u=Math.round(U);U=u<1?void 0:u>8?{indent:8}:{indent:u}}if($===void 0){let{keepUndefined:u}=U??I??{};if(!u)return}if(yW.isDocument($)&&!_)return $.toString(U);return new xW.Document($,_,U).toString(U)}mW.parse=rW;mW.parseAllDocuments=nW;mW.parseDocument=O5;mW.stringify=lW});var oW,tW,aW,uz,eW,H6,sW,$Z,IZ,uZ,jk,UZ,_Z,gZ,hu,V5,zZ,vZ,JZ,NZ,GZ,XZ,qZ,QZ,TZ,HZ,YZ,OZ,DZ,VZ,BZ,MZ,RZ,KZ,LZ,PZ,WZ,ZZ,m6,AZ,bZ,jZ,FZ,SZ;var Uz=$4(()=>{oW=mg(),tW=nI(),aW=Ag(),uz=rI(),eW=WI(),H6=$$(),sW=G6(),$Z=P$(),IZ=q6(),uZ=Q6(),jk=ru(),UZ=sg(),_Z=$z(),gZ=Iz(),hu=D5(),V5=LI();zZ=oW.Composer,vZ=tW.Document,JZ=aW.Schema,NZ=uz.YAMLError,GZ=uz.YAMLParseError,XZ=uz.YAMLWarning,qZ=eW.Alias,QZ=H6.isAlias,TZ=H6.isCollection,HZ=H6.isDocument,YZ=H6.isMap,OZ=H6.isNode,DZ=H6.isPair,VZ=H6.isScalar,BZ=H6.isSeq,MZ=sW.Pair,RZ=$Z.Scalar,KZ=IZ.YAMLMap,LZ=uZ.YAMLSeq,PZ=UZ.Lexer,WZ=_Z.LineCounter,ZZ=gZ.Parser,m6=hu.parse,AZ=hu.parseAllDocuments,bZ=hu.parseDocument,jZ=hu.stringify,FZ=V5.visit,SZ=V5.visitAsync});import{existsSync as I1,mkdirSync as Vj,readdirSync as Bj,readFileSync as W_,writeFileSync as D7}from"node:fs";import{join as M4}from"node:path";function vI($){return M4($,".serena","memories")}function $1($){try{return W_($,"utf-8")}catch{return""}}function t3($){return($.match(/##\s*ID:\s*(.+)/i)||[])[1]||($.match(/session-id:\s*(.+)/i)||[])[1]||$.match(/(session-\d{8}-\d{6})/)?.[1]}function Mj($){let I=$.trim();return I===""||I==="---"}function a3($){let I=(J)=>String(J).padStart(2,"0"),U=$.getFullYear(),_=I($.getMonth()+1),u=I($.getDate()),g=I($.getHours()),z=I($.getMinutes()),v=I($.getSeconds());return`session-${U}${_}${u}-${g}${z}${v}`}function Rj($,I){return["# Orchestrator Session",`## ID: ${$}`,`## Started: ${I}`,"## Status: idle","","## Agents","| Agent ID | CLI | PID | Status | Task |","|----------|-----|-----|--------|------|","","## Summary (filled on completion)","- Total Tasks: 0","- Completed: 0","- Failed: 0","- Files Created: []","- Issues: []",""].join(`
166
- `)}function Kj($){return["# Task Board",`## Session: ${$}`,"","| Agent | Status | Task |","|-------|--------|------|",""].join(`
167
- `)}function e3($){let I=vI($);if(!I1(I))return[];try{return Bj(I).filter((U)=>U.endsWith(".md")&&U!==".gitkeep")}catch{return[]}}function V7($,I){let U=$.match(/^progress-(\w+)\.md$/),_=$.match(/^result-(\w+)\.md$/);if(U?.[1])return{agent:U[1],type:"progress",content:I.slice(0,500)};if(_?.[1])return{agent:_[1],type:"result",content:I.slice(0,500)};return null}function B7($){let I=vI($),U={agents:[],activities:[],completedTasks:[],inProgressTasks:[]};if(!I1(I))return U;let _=e3($);for(let u of _){if(u==="orchestrator-session.md"){try{let z=W_(M4(I,u),"utf-8").match(/session[:\s]+(\S+)/i);if(z)U.sessionId=z[1]}catch{}continue}try{let g=W_(M4(I,u),"utf-8"),z=V7(u,g);if(z){if(U.activities.push(z),!U.agents.includes(z.agent))U.agents.push(z.agent);if(z.type==="result"){let v=g.match(/task[:\s]+(.+)/i)||g.match(/##\s*(.+)/);if(v?.[1])U.completedTasks.push(v[1].trim())}else if(z.type==="progress"){let v=g.match(/current[:\s]+(.+)/i)||g.match(/working on[:\s]+(.+)/i);if(v?.[1]&&!U.completedTasks.includes(v[1].trim()))U.inProgressTasks.push(v[1].trim())}}}catch{}}return U}function Z_($){let I=vI($),U=M4(I,"orchestrator-session.md");if(!I1(U))return{};let _=$1(U);if(!_)return{};let u=t3(_)?.trim(),g=(_.match(/##\s*Status:\s*(.+)/i)||[])[1]||(_.match(/status:\s*(running|completed|failed|aborted)/i)||[])[1],z=(_.match(/##\s*Started:\s*(.+)/i)||[])[1]||(_.match(/started:\s*(.+)/i)||[])[1];return{id:u,status:g?.trim().toLowerCase(),startedAt:z?.trim()}}function M7($){let I=vI($);if(!I1(I))return 0;let U=0,_=e3($);for(let z of _){if(!z.startsWith("result-"))continue;let v=$1(M4(I,z));if(!v)continue;let J=v.split(`
168
- `).map((N)=>N.trim()).find((N)=>/^##\s*Status:/i.test(N)||/^Status:/i.test(N));if(J){if(J.match(/status[^:]*:\s*([a-z_]+)/i)?.[1]?.toLowerCase()==="completed")U+=1}}let u=$1(M4(I,"task-board.md"));if(u){let z=u.split(`
169
- `).map((v)=>v.trim()).filter((v)=>/status/i.test(v)).reduce((v,J)=>{if(J.match(/status[^:]*:\s*([a-z_]+)/i)?.[1]?.toLowerCase()==="completed")return v+1;return v},0);U=Math.max(U,z)}let g=$1(M4(I,"orchestrator-session.md"));if(g){let z=g.match(/Completed:\s*(\d+)/i);if(z?.[1]){let v=parseInt(z[1],10);if(!Number.isNaN(v))U=Math.max(U,v)}}return U}function R7($,I){let U=[],_=vI($);if(!I1(_))return U;let u=I?new Date(I).getTime():0,g=e3($);for(let z of g){if(z==="orchestrator-session.md")continue;try{let v=M4(_,z),J=W_(v,"utf-8"),N=V7(z,J);if(N)U.push(N)}catch{}}return U}function K7($){let I=[];for(let U of $){let _=U.content.toLowerCase();if(_.includes("error")||_.includes("fail"))I.push(`${U.agent}: Error handling improved`);if(_.includes("refactor"))I.push(`${U.agent}: Code structure refactored`);if(_.includes("test"))I.push(`${U.agent}: Test coverage added`);if(_.includes("performance")||_.includes("optimize"))I.push(`${U.agent}: Performance optimized`)}return[...new Set(I)].slice(0,5)}function L7($,I={}){let U=vI($);if(!I1(U))Vj(U,{recursive:!0});let _=$1(M4(U,"orchestrator-session.md")),u=$1(M4(U,"task-board.md")),g=t3(_)||t3(u)||a3(new Date),z=new Date().toISOString(),v=Rj(g,z),J=Kj(g),N=[],X=[],G=[],q=(T,H)=>{let Q=M4(U,T);if(!I1(Q)){D7(Q,H,"utf-8"),N.push(T);return}let Y=$1(Q);if(I.force||Mj(Y)){D7(Q,H,"utf-8"),X.push(T);return}G.push(T)};return q("orchestrator-session.md",v),q("task-board.md",J),q(".gitkeep",""),{memoriesDir:U,sessionId:g,created:N,updated:X,skipped:G}}var b0=()=>{};var UG=E((Fn,x7)=>{var uG={to($,I){if(!I)return`\x1B[${$+1}G`;return`\x1B[${I+1};${$+1}H`},move($,I){let U="";if($<0)U+=`\x1B[${-$}D`;else if($>0)U+=`\x1B[${$}C`;if(I<0)U+=`\x1B[${-I}A`;else if(I>0)U+=`\x1B[${I}B`;return U},up:($=1)=>`\x1B[${$}A`,down:($=1)=>`\x1B[${$}B`,forward:($=1)=>`\x1B[${$}C`,backward:($=1)=>`\x1B[${$}D`,nextLine:($=1)=>"\x1B[E".repeat($),prevLine:($=1)=>"\x1B[F".repeat($),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},tj={up:($=1)=>"\x1B[S".repeat($),down:($=1)=>"\x1B[T".repeat($)},aj={screen:"\x1B[2J",up:($=1)=>"\x1B[1J".repeat($),down:($=1)=>"\x1B[J".repeat($),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines($){let I="";for(let U=0;U<$;U++)I+=this.line+(U<$-1?uG.up():"");if($)I+=uG.left;return I}};x7.exports={cursor:uG,scroll:tj,erase:aj,beep:"\x07"}});import{styleText as vG}from"node:util";import{stdout as GG,stdin as r7}from"node:process";import*as P6 from"node:readline";import ej from"node:readline";import{ReadStream as k7}from"node:tty";function o4($,I,U){if(!U.some((z)=>!z.disabled))return $;let _=$+I,u=Math.max(U.length-1,0),g=_<0?u:_>u?0:_;return U[g].disabled?o4(g,I<0?-1:1,U):g}function JG($,I,U){return String($).normalize().replaceAll(`\r
165
+ `,I)+1}return{type:$,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue($){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let I=du($),U=S1(I);return U.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let I=du($),U=S1(I);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:U,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,I){if(this.type!=="comment")return!1;if(this.indent<=I)return!1;return $.every((U)=>U.type==="newline"||U.type==="space")}*documentEnd($){if(this.type!=="doc-mode"){if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd($){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}fP.Parser=H5});var B5=E((hP)=>{var Y5=cg(),kP=lI(),oI=mI(),yP=ug(),iP=$$(),rP=uz(),O5=Uz();function V5($){let I=$.prettyErrors!==!1;return{lineCounter:$.lineCounter||I&&new rP.LineCounter||null,prettyErrors:I}}function nP($,I={}){let{lineCounter:U,prettyErrors:_}=V5(I),u=new O5.Parser(U?.addNewLine),g=new Y5.Composer(I),z=Array.from(g.compose(u.parse($)));if(_&&U)for(let v of z)v.errors.forEach(oI.prettifyError($,U)),v.warnings.forEach(oI.prettifyError($,U));if(z.length>0)return z;return Object.assign([],{empty:!0},g.streamInfo())}function D5($,I={}){let{lineCounter:U,prettyErrors:_}=V5(I),u=new O5.Parser(U?.addNewLine),g=new Y5.Composer(I),z=null;for(let v of g.compose(u.parse($),!0,$.length))if(!z)z=v;else if(z.options.logLevel!=="silent"){z.errors.push(new oI.YAMLParseError(v.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(_&&U)z.errors.forEach(oI.prettifyError($,U)),z.warnings.forEach(oI.prettifyError($,U));return z}function lP($,I,U){let _=void 0;if(typeof I==="function")_=I;else if(U===void 0&&I&&typeof I==="object")U=I;let u=D5($,U);if(!u)return null;if(u.warnings.forEach((g)=>yP.warn(u.options.logLevel,g)),u.errors.length>0)if(u.options.logLevel!=="silent")throw u.errors[0];else u.errors=[];return u.toJS(Object.assign({reviver:_},U))}function mP($,I,U){let _=null;if(typeof I==="function"||Array.isArray(I))_=I;else if(U===void 0&&I)U=I;if(typeof U==="string")U=U.length;if(typeof U==="number"){let u=Math.round(U);U=u<1?void 0:u>8?{indent:8}:{indent:u}}if($===void 0){let{keepUndefined:u}=U??I??{};if(!u)return}if(iP.isDocument($)&&!_)return $.toString(U);return new kP.Document($,_,U).toString(U)}hP.parse=lP;hP.parseAllDocuments=nP;hP.parseDocument=D5;hP.stringify=mP});var tP,aP,eP,_z,sP,O6,$Z,IZ,uZ,UZ,jk,_Z,gZ,zZ,pu,M5,vZ,JZ,NZ,GZ,XZ,qZ,QZ,TZ,HZ,YZ,OZ,VZ,DZ,BZ,MZ,KZ,RZ,LZ,WZ,PZ,ZZ,AZ,c6,bZ,jZ,FZ,SZ,wZ;var gz=u4(()=>{tP=cg(),aP=lI(),eP=jg(),_z=mI(),sP=AI(),O6=$$(),$Z=q6(),IZ=W$(),uZ=T6(),UZ=H6(),jk=hu(),_Z=Iz(),gZ=uz(),zZ=Uz(),pu=B5(),M5=PI();vZ=tP.Composer,JZ=aP.Document,NZ=eP.Schema,GZ=_z.YAMLError,XZ=_z.YAMLParseError,qZ=_z.YAMLWarning,QZ=sP.Alias,TZ=O6.isAlias,HZ=O6.isCollection,YZ=O6.isDocument,OZ=O6.isMap,VZ=O6.isNode,DZ=O6.isPair,BZ=O6.isScalar,MZ=O6.isSeq,KZ=$Z.Pair,RZ=IZ.Scalar,LZ=uZ.YAMLMap,WZ=UZ.YAMLSeq,PZ=_Z.Lexer,ZZ=gZ.LineCounter,AZ=zZ.Parser,c6=pu.parse,bZ=pu.parseAllDocuments,jZ=pu.parseDocument,FZ=pu.stringify,SZ=M5.visit,wZ=M5.visitAsync});import{existsSync as U1,mkdirSync as Bj,readdirSync as Mj,readFileSync as b_,writeFileSync as B7}from"node:fs";import{join as R4}from"node:path";function NI($){return R4($,".serena","memories")}function u1($){try{return b_($,"utf-8")}catch{return""}}function e3($){return($.match(/##\s*ID:\s*(.+)/i)||[])[1]||($.match(/session-id:\s*(.+)/i)||[])[1]||$.match(/(session-\d{8}-\d{6})/)?.[1]}function Kj($){let I=$.trim();return I===""||I==="---"}function s3($){let I=(J)=>String(J).padStart(2,"0"),U=$.getFullYear(),_=I($.getMonth()+1),u=I($.getDate()),g=I($.getHours()),z=I($.getMinutes()),v=I($.getSeconds());return`session-${U}${_}${u}-${g}${z}${v}`}function Rj($,I){return["# Orchestrator Session",`## ID: ${$}`,`## Started: ${I}`,"## Status: idle","","## Agents","| Agent ID | CLI | PID | Status | Task |","|----------|-----|-----|--------|------|","","## Summary (filled on completion)","- Total Tasks: 0","- Completed: 0","- Failed: 0","- Files Created: []","- Issues: []",""].join(`
166
+ `)}function Lj($){return["# Task Board",`## Session: ${$}`,"","| Agent | Status | Task |","|-------|--------|------|",""].join(`
167
+ `)}function $G($){let I=NI($);if(!U1(I))return[];try{return Mj(I).filter((U)=>U.endsWith(".md")&&U!==".gitkeep")}catch{return[]}}function M7($,I){let U=$.match(/^progress-(\w+)\.md$/),_=$.match(/^result-(\w+)\.md$/);if(U?.[1])return{agent:U[1],type:"progress",content:I.slice(0,500)};if(_?.[1])return{agent:_[1],type:"result",content:I.slice(0,500)};return null}function K7($){let I=NI($),U={agents:[],activities:[],completedTasks:[],inProgressTasks:[]};if(!U1(I))return U;let _=$G($);for(let u of _){if(u==="orchestrator-session.md"){try{let z=b_(R4(I,u),"utf-8").match(/session[:\s]+(\S+)/i);if(z)U.sessionId=z[1]}catch{}continue}try{let g=b_(R4(I,u),"utf-8"),z=M7(u,g);if(z){if(U.activities.push(z),!U.agents.includes(z.agent))U.agents.push(z.agent);if(z.type==="result"){let v=g.match(/task[:\s]+(.+)/i)||g.match(/##\s*(.+)/);if(v?.[1])U.completedTasks.push(v[1].trim())}else if(z.type==="progress"){let v=g.match(/current[:\s]+(.+)/i)||g.match(/working on[:\s]+(.+)/i);if(v?.[1]&&!U.completedTasks.includes(v[1].trim()))U.inProgressTasks.push(v[1].trim())}}}catch{}}return U}function j_($){let I=NI($),U=R4(I,"orchestrator-session.md");if(!U1(U))return{};let _=u1(U);if(!_)return{};let u=e3(_)?.trim(),g=(_.match(/##\s*Status:\s*(.+)/i)||[])[1]||(_.match(/status:\s*(running|completed|failed|aborted)/i)||[])[1],z=(_.match(/##\s*Started:\s*(.+)/i)||[])[1]||(_.match(/started:\s*(.+)/i)||[])[1];return{id:u,status:g?.trim().toLowerCase(),startedAt:z?.trim()}}function R7($){let I=NI($);if(!U1(I))return 0;let U=0,_=$G($);for(let z of _){if(!z.startsWith("result-"))continue;let v=u1(R4(I,z));if(!v)continue;let J=v.split(`
168
+ `).map((N)=>N.trim()).find((N)=>/^##\s*Status:/i.test(N)||/^Status:/i.test(N));if(J){if(J.match(/status[^:]*:\s*([a-z_]+)/i)?.[1]?.toLowerCase()==="completed")U+=1}}let u=u1(R4(I,"task-board.md"));if(u){let z=u.split(`
169
+ `).map((v)=>v.trim()).filter((v)=>/status/i.test(v)).reduce((v,J)=>{if(J.match(/status[^:]*:\s*([a-z_]+)/i)?.[1]?.toLowerCase()==="completed")return v+1;return v},0);U=Math.max(U,z)}let g=u1(R4(I,"orchestrator-session.md"));if(g){let z=g.match(/Completed:\s*(\d+)/i);if(z?.[1]){let v=parseInt(z[1],10);if(!Number.isNaN(v))U=Math.max(U,v)}}return U}function L7($,I){let U=[],_=NI($);if(!U1(_))return U;let u=I?new Date(I).getTime():0,g=$G($);for(let z of g){if(z==="orchestrator-session.md")continue;try{let v=R4(_,z),J=b_(v,"utf-8"),N=M7(z,J);if(N)U.push(N)}catch{}}return U}function W7($){let I=[];for(let U of $){let _=U.content.toLowerCase();if(_.includes("error")||_.includes("fail"))I.push(`${U.agent}: Error handling improved`);if(_.includes("refactor"))I.push(`${U.agent}: Code structure refactored`);if(_.includes("test"))I.push(`${U.agent}: Test coverage added`);if(_.includes("performance")||_.includes("optimize"))I.push(`${U.agent}: Performance optimized`)}return[...new Set(I)].slice(0,5)}function P7($,I={}){let U=NI($);if(!U1(U))Bj(U,{recursive:!0});let _=u1(R4(U,"orchestrator-session.md")),u=u1(R4(U,"task-board.md")),g=e3(_)||e3(u)||s3(new Date),z=new Date().toISOString(),v=Rj(g,z),J=Lj(g),N=[],X=[],G=[],q=(T,H)=>{let Q=R4(U,T);if(!U1(Q)){B7(Q,H,"utf-8"),N.push(T);return}let Y=u1(Q);if(I.force||Kj(Y)){B7(Q,H,"utf-8"),X.push(T);return}G.push(T)};return q("orchestrator-session.md",v),q("task-board.md",J),q(".gitkeep",""),{memoriesDir:U,sessionId:g,created:N,updated:X,skipped:G}}var F0=()=>{};var gG=E((Fr,y7)=>{var _G={to($,I){if(!I)return`\x1B[${$+1}G`;return`\x1B[${I+1};${$+1}H`},move($,I){let U="";if($<0)U+=`\x1B[${-$}D`;else if($>0)U+=`\x1B[${$}C`;if(I<0)U+=`\x1B[${-I}A`;else if(I>0)U+=`\x1B[${I}B`;return U},up:($=1)=>`\x1B[${$}A`,down:($=1)=>`\x1B[${$}B`,forward:($=1)=>`\x1B[${$}C`,backward:($=1)=>`\x1B[${$}D`,nextLine:($=1)=>"\x1B[E".repeat($),prevLine:($=1)=>"\x1B[F".repeat($),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},aj={up:($=1)=>"\x1B[S".repeat($),down:($=1)=>"\x1B[T".repeat($)},ej={screen:"\x1B[2J",up:($=1)=>"\x1B[1J".repeat($),down:($=1)=>"\x1B[J".repeat($),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines($){let I="";for(let U=0;U<$;U++)I+=this.line+(U<$-1?_G.up():"");if($)I+=_G.left;return I}};y7.exports={cursor:_G,scroll:aj,erase:ej,beep:"\x07"}});import{styleText as NG}from"node:util";import{stdout as qG,stdin as m7}from"node:process";import*as Z6 from"node:readline";import sj from"node:readline";import{ReadStream as i7}from"node:tty";function a4($,I,U){if(!U.some((z)=>!z.disabled))return $;let _=$+I,u=Math.max(U.length-1,0),g=_<0?u:_>u?0:_;return U[g].disabled?a4(g,I<0?-1:1,U):g}function GG($,I,U){return String($).normalize().replaceAll(`\r
170
170
  `,`
171
171
  `).split(`
172
- `).map((_)=>GF(_,I,U)).join(`
173
- `)}function QG($,I){if(typeof $=="string")return E$.aliases.get($)===I;for(let U of $)if(U!==void 0&&QG(U,I))return!0;return!1}function qF($,I){if($===I)return;let U=$.split(`
172
+ `).map((_)=>XF(_,I,U)).join(`
173
+ `)}function HG($,I){if(typeof $=="string")return E$.aliases.get($)===I;for(let U of $)if(U!==void 0&&HG(U,I))return!0;return!1}function QF($,I){if($===I)return;let U=$.split(`
174
174
  `),_=I.split(`
175
- `),u=Math.max(U.length,_.length),g=[];for(let z=0;z<u;z++)U[z]!==_[z]&&g.push(z);return{lines:g,numLinesBefore:U.length,numLinesAfter:_.length,numLines:u}}function e($){return $===NG}function w_($,I){let U=$;U.isTTY&&U.setRawMode(I)}function d7({input:$=r7,output:I=GG,overwrite:U=!0,hideCursor:_=!0}={}){let u=P6.createInterface({input:$,output:I,prompt:"",tabSize:1});P6.emitKeypressEvents($,u),$ instanceof k7&&$.isTTY&&$.setRawMode(!0);let g=(z,{name:v,sequence:J})=>{let N=String(z);if(QG([N,v,J],"cancel")){_&&I.write(x$.cursor.show),process.exit(0);return}if(!U)return;P6.moveCursor(I,v==="return"?0:-1,v==="return"?-1:0,()=>{P6.clearLine(I,1,()=>{$.once("keypress",g)})})};return _&&I.write(x$.cursor.hide),$.once("keypress",g),()=>{$.off("keypress",g),_&&I.write(x$.cursor.show),$ instanceof k7&&$.isTTY&&!QF&&$.setRawMode(!1),u.terminal=!1,u.close()}}function u1($,I,U,_=U){let u=F0($??GG);return JG(I,u-U.length,{hard:!0,trim:!1}).split(`
175
+ `),u=Math.max(U.length,_.length),g=[];for(let z=0;z<u;z++)U[z]!==_[z]&&g.push(z);return{lines:g,numLinesBefore:U.length,numLinesAfter:_.length,numLines:u}}function e($){return $===XG}function C_($,I){let U=$;U.isTTY&&U.setRawMode(I)}function o7({input:$=m7,output:I=qG,overwrite:U=!0,hideCursor:_=!0}={}){let u=Z6.createInterface({input:$,output:I,prompt:"",tabSize:1});Z6.emitKeypressEvents($,u),$ instanceof i7&&$.isTTY&&$.setRawMode(!0);let g=(z,{name:v,sequence:J})=>{let N=String(z);if(HG([N,v,J],"cancel")){_&&I.write(x$.cursor.show),process.exit(0);return}if(!U)return;Z6.moveCursor(I,v==="return"?0:-1,v==="return"?-1:0,()=>{Z6.clearLine(I,1,()=>{$.once("keypress",g)})})};return _&&I.write(x$.cursor.hide),$.once("keypress",g),()=>{$.off("keypress",g),_&&I.write(x$.cursor.show),$ instanceof i7&&$.isTTY&&!TF&&$.setRawMode(!1),u.terminal=!1,u.close()}}function _1($,I,U,_=U){let u=E0($??qG);return GG(I,u-U.length,{hard:!0,trim:!1}).split(`
176
176
  `).map((g,z)=>`${z===0?_:U}${g}`).join(`
177
- `)}class U1{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor($,I=!0){let{input:U=r7,output:_=GG,render:u,signal:g,...z}=$;this.opts=z,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=u.bind(this),this._track=I,this._abortSignal=g,this.input=U,this.output=_}unsubscribe(){this._subscribers.clear()}setSubscriber($,I){let U=this._subscribers.get($)??[];U.push(I),this._subscribers.set($,U)}on($,I){this.setSubscriber($,{cb:I})}once($,I){this.setSubscriber($,{cb:I,once:!0})}emit($,...I){let U=this._subscribers.get($)??[],_=[];for(let u of U)u.cb(...I),u.once&&_.push(()=>U.splice(U.indexOf(u),1));for(let u of _)u()}prompt(){return new Promise(($)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),$(NG);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=ej.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on("keypress",this.onKeypress),w_(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(x$.cursor.show),this.output.off("resize",this.render),w_(this.input,!1),$(this.value)}),this.once("cancel",()=>{this.output.write(x$.cursor.show),this.output.off("resize",this.render),w_(this.input,!1),$(NG)})})}_isActionKey($,I){return $==="\t"}_setValue($){this.value=$,this.emit("value",this.value)}_setUserInput($,I){this.userInput=$??"",this.emit("userInput",this.userInput),I&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:"u"}),this._setUserInput("")}onKeypress($,I){if(this._track&&I.name!=="return"&&(I.name&&this._isActionKey($,I)&&this.rl?.write(null,{ctrl:!0,name:"h"}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state==="error"&&(this.state="active"),I?.name&&(!this._track&&E$.aliases.has(I.name)&&this.emit("cursor",E$.aliases.get(I.name)),E$.actions.has(I.name)&&this.emit("cursor",I.name)),$&&($.toLowerCase()==="y"||$.toLowerCase()==="n")&&this.emit("confirm",$.toLowerCase()==="y"),this.emit("key",$?.toLowerCase(),I),I?.name==="return"){if(this.opts.validate){let U=this.opts.validate(this.value);U&&(this.error=U instanceof Error?U.message:U,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}QG([$,I?.name,I?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
178
- `),w_(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let $=JG(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
179
- `).length-1;this.output.write(x$.cursor.move(-999,$*-1))}render(){let $=JG(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if($!==this._prevFrame){if(this.state==="initial")this.output.write(x$.cursor.hide);else{let I=qF(this._prevFrame,$),U=TG(this.output);if(this.restoreCursor(),I){let _=Math.max(0,I.numLinesAfter-U),u=Math.max(0,I.numLinesBefore-U),g=I.lines.find((z)=>z>=_);if(g===void 0){this._prevFrame=$;return}if(I.lines.length===1){this.output.write(x$.cursor.move(0,g-u)),this.output.write(x$.erase.lines(1));let z=$.split(`
177
+ `)}class g1{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor($,I=!0){let{input:U=m7,output:_=qG,render:u,signal:g,...z}=$;this.opts=z,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=u.bind(this),this._track=I,this._abortSignal=g,this.input=U,this.output=_}unsubscribe(){this._subscribers.clear()}setSubscriber($,I){let U=this._subscribers.get($)??[];U.push(I),this._subscribers.set($,U)}on($,I){this.setSubscriber($,{cb:I})}once($,I){this.setSubscriber($,{cb:I,once:!0})}emit($,...I){let U=this._subscribers.get($)??[],_=[];for(let u of U)u.cb(...I),u.once&&_.push(()=>U.splice(U.indexOf(u),1));for(let u of _)u()}prompt(){return new Promise(($)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),$(XG);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=sj.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on("keypress",this.onKeypress),C_(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(x$.cursor.show),this.output.off("resize",this.render),C_(this.input,!1),$(this.value)}),this.once("cancel",()=>{this.output.write(x$.cursor.show),this.output.off("resize",this.render),C_(this.input,!1),$(XG)})})}_isActionKey($,I){return $==="\t"}_setValue($){this.value=$,this.emit("value",this.value)}_setUserInput($,I){this.userInput=$??"",this.emit("userInput",this.userInput),I&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:"u"}),this._setUserInput("")}onKeypress($,I){if(this._track&&I.name!=="return"&&(I.name&&this._isActionKey($,I)&&this.rl?.write(null,{ctrl:!0,name:"h"}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state==="error"&&(this.state="active"),I?.name&&(!this._track&&E$.aliases.has(I.name)&&this.emit("cursor",E$.aliases.get(I.name)),E$.actions.has(I.name)&&this.emit("cursor",I.name)),$&&($.toLowerCase()==="y"||$.toLowerCase()==="n")&&this.emit("confirm",$.toLowerCase()==="y"),this.emit("key",$?.toLowerCase(),I),I?.name==="return"){if(this.opts.validate){let U=this.opts.validate(this.value);U&&(this.error=U instanceof Error?U.message:U,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}HG([$,I?.name,I?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
178
+ `),C_(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let $=GG(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
179
+ `).length-1;this.output.write(x$.cursor.move(-999,$*-1))}render(){let $=GG(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if($!==this._prevFrame){if(this.state==="initial")this.output.write(x$.cursor.hide);else{let I=QF(this._prevFrame,$),U=YG(this.output);if(this.restoreCursor(),I){let _=Math.max(0,I.numLinesAfter-U),u=Math.max(0,I.numLinesBefore-U),g=I.lines.find((z)=>z>=_);if(g===void 0){this._prevFrame=$;return}if(I.lines.length===1){this.output.write(x$.cursor.move(0,g-u)),this.output.write(x$.erase.lines(1));let z=$.split(`
180
180
  `);this.output.write(z[g]),this._prevFrame=$,this.output.write(x$.cursor.move(0,z.length-g-1));return}else if(I.lines.length>1){if(_<u)g=_;else{let v=g-u;v>0&&this.output.write(x$.cursor.move(0,v))}this.output.write(x$.erase.down());let z=$.split(`
181
181
  `).slice(g);this.output.write(z.join(`
182
- `)),this._prevFrame=$;return}}this.output.write(x$.erase.down())}this.output.write($),this.state==="initial"&&(this.state="active"),this._prevFrame=$}}}function TF($,I){if($===void 0||I.length===0)return 0;let U=I.findIndex((_)=>_.value===$);return U!==-1?U:0}function HF($,I){return(I.label??String(I.value)).toLowerCase().includes($.toLowerCase())}function YF($,I){if(I)return $?I:I[0]}var x$,sj=($)=>$===161||$===164||$===167||$===168||$===170||$===173||$===174||$>=176&&$<=180||$>=182&&$<=186||$>=188&&$<=191||$===198||$===208||$===215||$===216||$>=222&&$<=225||$===230||$>=232&&$<=234||$===236||$===237||$===240||$===242||$===243||$>=247&&$<=250||$===252||$===254||$===257||$===273||$===275||$===283||$===294||$===295||$===299||$>=305&&$<=307||$===312||$>=319&&$<=322||$===324||$>=328&&$<=331||$===333||$===338||$===339||$===358||$===359||$===363||$===462||$===464||$===466||$===468||$===470||$===472||$===474||$===476||$===593||$===609||$===708||$===711||$>=713&&$<=715||$===717||$===720||$>=728&&$<=731||$===733||$===735||$>=768&&$<=879||$>=913&&$<=929||$>=931&&$<=937||$>=945&&$<=961||$>=963&&$<=969||$===1025||$>=1040&&$<=1103||$===1105||$===8208||$>=8211&&$<=8214||$===8216||$===8217||$===8220||$===8221||$>=8224&&$<=8226||$>=8228&&$<=8231||$===8240||$===8242||$===8243||$===8245||$===8251||$===8254||$===8308||$===8319||$>=8321&&$<=8324||$===8364||$===8451||$===8453||$===8457||$===8467||$===8470||$===8481||$===8482||$===8486||$===8491||$===8531||$===8532||$>=8539&&$<=8542||$>=8544&&$<=8555||$>=8560&&$<=8569||$===8585||$>=8592&&$<=8601||$===8632||$===8633||$===8658||$===8660||$===8679||$===8704||$===8706||$===8707||$===8711||$===8712||$===8715||$===8719||$===8721||$===8725||$===8730||$>=8733&&$<=8736||$===8739||$===8741||$>=8743&&$<=8748||$===8750||$>=8756&&$<=8759||$===8764||$===8765||$===8776||$===8780||$===8786||$===8800||$===8801||$>=8804&&$<=8807||$===8810||$===8811||$===8814||$===8815||$===8834||$===8835||$===8838||$===8839||$===8853||$===8857||$===8869||$===8895||$===8978||$>=9312&&$<=9449||$>=9451&&$<=9547||$>=9552&&$<=9587||$>=9600&&$<=9615||$>=9618&&$<=9621||$===9632||$===9633||$>=9635&&$<=9641||$===9650||$===9651||$===9654||$===9655||$===9660||$===9661||$===9664||$===9665||$>=9670&&$<=9672||$===9675||$>=9678&&$<=9681||$>=9698&&$<=9701||$===9711||$===9733||$===9734||$===9737||$===9742||$===9743||$===9756||$===9758||$===9792||$===9794||$===9824||$===9825||$>=9827&&$<=9829||$>=9831&&$<=9834||$===9836||$===9837||$===9839||$===9886||$===9887||$===9919||$>=9926&&$<=9933||$>=9935&&$<=9939||$>=9941&&$<=9953||$===9955||$===9960||$===9961||$>=9963&&$<=9969||$===9972||$>=9974&&$<=9977||$===9979||$===9980||$===9982||$===9983||$===10045||$>=10102&&$<=10111||$>=11094&&$<=11097||$>=12872&&$<=12879||$>=57344&&$<=63743||$>=65024&&$<=65039||$===65533||$>=127232&&$<=127242||$>=127248&&$<=127277||$>=127280&&$<=127337||$>=127344&&$<=127373||$===127375||$===127376||$>=127387&&$<=127404||$>=917760&&$<=917999||$>=983040&&$<=1048573||$>=1048576&&$<=1114109,$F=($)=>$===12288||$>=65281&&$<=65376||$>=65504&&$<=65510,IF=($)=>$>=4352&&$<=4447||$===8986||$===8987||$===9001||$===9002||$>=9193&&$<=9196||$===9200||$===9203||$===9725||$===9726||$===9748||$===9749||$>=9800&&$<=9811||$===9855||$===9875||$===9889||$===9898||$===9899||$===9917||$===9918||$===9924||$===9925||$===9934||$===9940||$===9962||$===9970||$===9971||$===9973||$===9978||$===9981||$===9989||$===9994||$===9995||$===10024||$===10060||$===10062||$>=10067&&$<=10069||$===10071||$>=10133&&$<=10135||$===10160||$===10175||$===11035||$===11036||$===11088||$===11093||$>=11904&&$<=11929||$>=11931&&$<=12019||$>=12032&&$<=12245||$>=12272&&$<=12287||$>=12289&&$<=12350||$>=12353&&$<=12438||$>=12441&&$<=12543||$>=12549&&$<=12591||$>=12593&&$<=12686||$>=12688&&$<=12771||$>=12783&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=19903||$>=19968&&$<=42124||$>=42128&&$<=42182||$>=43360&&$<=43388||$>=44032&&$<=55203||$>=63744&&$<=64255||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=94176&&$<=94180||$===94192||$===94193||$>=94208&&$<=100343||$>=100352&&$<=101589||$>=101632&&$<=101640||$>=110576&&$<=110579||$>=110581&&$<=110587||$===110589||$===110590||$>=110592&&$<=110882||$===110898||$>=110928&&$<=110930||$===110933||$>=110948&&$<=110951||$>=110960&&$<=111355||$===126980||$===127183||$===127374||$>=127377&&$<=127386||$>=127488&&$<=127490||$>=127504&&$<=127547||$>=127552&&$<=127560||$===127568||$===127569||$>=127584&&$<=127589||$>=127744&&$<=127776||$>=127789&&$<=127797||$>=127799&&$<=127868||$>=127870&&$<=127891||$>=127904&&$<=127946||$>=127951&&$<=127955||$>=127968&&$<=127984||$===127988||$>=127992&&$<=128062||$===128064||$>=128066&&$<=128252||$>=128255&&$<=128317||$>=128331&&$<=128334||$>=128336&&$<=128359||$===128378||$===128405||$===128406||$===128420||$>=128507&&$<=128591||$>=128640&&$<=128709||$===128716||$>=128720&&$<=128722||$>=128725&&$<=128727||$>=128732&&$<=128735||$===128747||$===128748||$>=128756&&$<=128764||$>=128992&&$<=129003||$===129008||$>=129292&&$<=129338||$>=129340&&$<=129349||$>=129351&&$<=129535||$>=129648&&$<=129660||$>=129664&&$<=129672||$>=129680&&$<=129725||$>=129727&&$<=129733||$>=129742&&$<=129755||$>=129760&&$<=129768||$>=129776&&$<=129784||$>=131072&&$<=196605||$>=196608&&$<=262141,_G,j_,F_,gG,S_,uF,UF,l7=($,I={},U={})=>{let _=I.limit??1/0,u=I.ellipsis??"",g=I?.ellipsisWidth??(u?l7(u,UF,U).width:0),z=U.ansiWidth??0,v=U.controlWidth??0,J=U.tabWidth??8,N=U.ambiguousWidth??1,X=U.emojiWidth??2,G=U.fullWidthWidth??2,q=U.regularWidth??1,T=U.wideWidth??2,H=0,Q=0,Y=$.length,R=0,K=!1,W=Y,O=Math.max(0,_-g),V=0,L=0,B=0,M=0;$:for(;;){if(L>V||Q>=Y&&Q>H){let F=$.slice(V,L)||$.slice(H,Q);R=0;for(let A of F.replaceAll(uF,"")){let f=A.codePointAt(0)||0;if($F(f)?M=G:IF(f)?M=T:N!==q&&sj(f)?M=N:M=q,B+M>O&&(W=Math.min(W,Math.max(V,H)+R)),B+M>_){K=!0;break $}R+=A.length,B+=M}V=L=0}if(Q>=Y)break;if(S_.lastIndex=Q,S_.test($)){if(R=S_.lastIndex-Q,M=R*q,B+M>O&&(W=Math.min(W,Q+Math.floor((O-B)/q))),B+M>_){K=!0;break}B+=M,V=H,L=Q,Q=H=S_.lastIndex;continue}if(_G.lastIndex=Q,_G.test($)){if(B+z>O&&(W=Math.min(W,Q)),B+z>_){K=!0;break}B+=z,V=H,L=Q,Q=H=_G.lastIndex;continue}if(j_.lastIndex=Q,j_.test($)){if(R=j_.lastIndex-Q,M=R*v,B+M>O&&(W=Math.min(W,Q+Math.floor((O-B)/v))),B+M>_){K=!0;break}B+=M,V=H,L=Q,Q=H=j_.lastIndex;continue}if(F_.lastIndex=Q,F_.test($)){if(R=F_.lastIndex-Q,M=R*J,B+M>O&&(W=Math.min(W,Q+Math.floor((O-B)/J))),B+M>_){K=!0;break}B+=M,V=H,L=Q,Q=H=F_.lastIndex;continue}if(gG.lastIndex=Q,gG.test($)){if(B+X>O&&(W=Math.min(W,Q)),B+X>_){K=!0;break}B+=X,V=H,L=Q,Q=H=gG.lastIndex;continue}Q+=1}return{width:K?O:B,index:K?W:Y,truncated:K,ellipsed:K&&_>=g}},_F,j0=($,I={})=>l7($,_F,I).width,E_="\x1B",m7="›",gF=39,XG="\x07",h7="[",zF="]",c7="m",qG,y7,vF=($)=>{if($>=30&&$<=37||$>=90&&$<=97)return 39;if($>=40&&$<=47||$>=100&&$<=107)return 49;if($===1||$===2)return 22;if($===3)return 23;if($===4)return 24;if($===7)return 27;if($===8)return 28;if($===9)return 29;if($===0)return 0},i7=($)=>`${E_}${h7}${$}${c7}`,n7=($)=>`${E_}${qG}${$}${XG}`,JF=($)=>$.map((I)=>j0(I)),zG=($,I,U)=>{let _=I[Symbol.iterator](),u=!1,g=!1,z=$.at(-1),v=z===void 0?0:j0(z),J=_.next(),N=_.next(),X=0;for(;!J.done;){let G=J.value,q=j0(G);v+q<=U?$[$.length-1]+=G:($.push(G),v=0),(G===E_||G===m7)&&(u=!0,g=I.startsWith(qG,X+1)),u?g?G===XG&&(u=!1,g=!1):G===c7&&(u=!1):(v+=q,v===U&&!N.done&&($.push(""),v=0)),J=N,N=_.next(),X+=G.length}z=$.at(-1),!v&&z!==void 0&&z.length>0&&$.length>1&&($[$.length-2]+=$.pop())},NF=($)=>{let I=$.split(" "),U=I.length;for(;U>0&&!(j0(I[U-1])>0);)U--;return U===I.length?$:I.slice(0,U).join(" ")+I.slice(U).join("")},GF=($,I,U={})=>{if(U.trim!==!1&&$.trim()==="")return"";let _="",u,g,z=$.split(" "),v=JF(z),J=[""];for(let[H,Q]of z.entries()){U.trim!==!1&&(J[J.length-1]=(J.at(-1)??"").trimStart());let Y=j0(J.at(-1)??"");if(H!==0&&(Y>=I&&(U.wordWrap===!1||U.trim===!1)&&(J.push(""),Y=0),(Y>0||U.trim===!1)&&(J[J.length-1]+=" ",Y++)),U.hard&&v[H]>I){let R=I-Y,K=1+Math.floor((v[H]-R-1)/I);Math.floor((v[H]-1)/I)<K&&J.push(""),zG(J,Q,I);continue}if(Y+v[H]>I&&Y>0&&v[H]>0){if(U.wordWrap===!1&&Y<I){zG(J,Q,I);continue}J.push("")}if(Y+v[H]>I&&U.wordWrap===!1){zG(J,Q,I);continue}J[J.length-1]+=Q}U.trim!==!1&&(J=J.map((H)=>NF(H)));let N=J.join(`
183
- `),X=N[Symbol.iterator](),G=X.next(),q=X.next(),T=0;for(;!G.done;){let H=G.value,Q=q.value;if(_+=H,H===E_||H===m7){y7.lastIndex=T+1;let R=y7.exec(N)?.groups;if(R?.code!==void 0){let K=Number.parseFloat(R.code);u=K===gF?void 0:K}else R?.uri!==void 0&&(g=R.uri.length===0?void 0:R.uri)}let Y=u?vF(u):void 0;Q===`
184
- `?(g&&(_+=n7("")),u&&Y&&(_+=i7(Y))):H===`
185
- `&&(u&&Y&&(_+=i7(u)),g&&(_+=n7(g))),T+=H.length,G=q,q=X.next()}return _},XF,E$,QF,NG,F0=($)=>("columns"in $)&&typeof $.columns=="number"?$.columns:80,TG=($)=>("rows"in $)&&typeof $.rows=="number"?$.rows:20,p7,HG,o7,t7,YG,OG;var DG=$4(()=>{x$=q$(UG(),1);_G=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,j_=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,F_=/\t{1,1000}/y,gG=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,S_=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,uF=/\p{M}+/gu,UF={limit:1/0,ellipsis:""},_F={limit:1/0,ellipsis:"",ellipsisWidth:0},qG=`${zF}8;;`,y7=new RegExp(`(?:\\${h7}(?<code>\\d+)m|\\${qG}(?<uri>.*)${XG})`,"y");XF=["up","down","left","right","space","enter","cancel"],E$={actions:new Set(XF),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0};QF=globalThis.process.platform.startsWith("win"),NG=Symbol("clack:cancel");p7=class p7 extends U1{filteredOptions;multiple;isNavigating=!1;selectedValues=[];focusedValue;#$=0;#u="";#U;#I;get cursor(){return this.#$}get userInputWithCursor(){if(!this.userInput)return vG(["inverse","hidden"],"_");if(this._cursor>=this.userInput.length)return`${this.userInput}█`;let $=this.userInput.slice(0,this._cursor),[I,...U]=this.userInput.slice(this._cursor);return`${$}${vG("inverse",I)}${U.join("")}`}get options(){return typeof this.#I=="function"?this.#I():this.#I}constructor($){super($),this.#I=$.options;let I=this.options;this.filteredOptions=[...I],this.multiple=$.multiple===!0,this.#U=$.filter??HF;let U;if($.initialValue&&Array.isArray($.initialValue)?this.multiple?U=$.initialValue:U=$.initialValue.slice(0,1):!this.multiple&&this.options.length>0&&(U=[this.options[0].value]),U)for(let _ of U){let u=I.findIndex((g)=>g.value===_);u!==-1&&(this.toggleSelected(_),this.#$=u)}this.focusedValue=this.options[this.#$]?.value,this.on("key",(_,u)=>this.#_(_,u)),this.on("userInput",(_)=>this.#g(_))}_isActionKey($,I){return $==="\t"||this.multiple&&this.isNavigating&&I.name==="space"&&$!==void 0&&$!==""}#_($,I){let U=I.name==="up",_=I.name==="down",u=I.name==="return";U||_?(this.#$=o4(this.#$,U?-1:1,this.filteredOptions),this.focusedValue=this.filteredOptions[this.#$]?.value,this.multiple||(this.selectedValues=[this.focusedValue]),this.isNavigating=!0):u?this.value=YF(this.multiple,this.selectedValues):this.multiple?this.focusedValue!==void 0&&(I.name==="tab"||this.isNavigating&&I.name==="space")?this.toggleSelected(this.focusedValue):this.isNavigating=!1:(this.focusedValue&&(this.selectedValues=[this.focusedValue]),this.isNavigating=!1)}deselectAll(){this.selectedValues=[]}toggleSelected($){this.filteredOptions.length!==0&&(this.multiple?this.selectedValues.includes($)?this.selectedValues=this.selectedValues.filter((I)=>I!==$):this.selectedValues=[...this.selectedValues,$]:this.selectedValues=[$])}#g($){if($!==this.#u){this.#u=$;let I=this.options;$?this.filteredOptions=I.filter((u)=>this.#U($,u)):this.filteredOptions=[...I];let U=TF(this.focusedValue,this.filteredOptions);this.#$=o4(U,0,this.filteredOptions);let _=this.filteredOptions[this.#$];_&&!_.disabled?this.focusedValue=_.value:this.focusedValue=void 0,this.multiple||(this.focusedValue!==void 0?this.toggleSelected(this.focusedValue):this.deselectAll())}}};HG=class HG extends U1{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor($){super($,!1),this.value=!!$.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",(I)=>{this.output.write(x$.cursor.move(0,-1)),this.value=I,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};o7=class o7 extends U1{options;cursor=0;#$;getGroupItems($){return this.options.filter((I)=>I.group===$)}isGroupSelected($){let I=this.getGroupItems($),U=this.value;return U===void 0?!1:I.every((_)=>U.includes(_.value))}toggleValue(){let $=this.options[this.cursor];if(this.value===void 0&&(this.value=[]),$.group===!0){let I=$.value,U=this.getGroupItems(I);this.isGroupSelected(I)?this.value=this.value.filter((_)=>U.findIndex((u)=>u.value===_)===-1):this.value=[...this.value,...U.map((_)=>_.value)],this.value=Array.from(new Set(this.value))}else{let I=this.value.includes($.value);this.value=I?this.value.filter((U)=>U!==$.value):[...this.value,$.value]}}constructor($){super($,!1);let{options:I}=$;this.#$=$.selectableGroups!==!1,this.options=Object.entries(I).flatMap(([U,_])=>[{value:U,group:!0,label:U},..._.map((u)=>({...u,group:U}))]),this.value=[...$.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:U})=>U===$.cursorAt),this.#$?0:1),this.on("cursor",(U)=>{switch(U){case"left":case"up":{this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;let _=this.options[this.cursor]?.group===!0;!this.#$&&_&&(this.cursor=this.cursor===0?this.options.length-1:this.cursor-1);break}case"down":case"right":{this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;let _=this.options[this.cursor]?.group===!0;!this.#$&&_&&(this.cursor=this.cursor===this.options.length-1?0:this.cursor+1);break}case"space":this.toggleValue();break}})}};t7=class extends U1{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter(($)=>$.disabled!==!0)}toggleAll(){let $=this._enabledOptions,I=this.value!==void 0&&this.value.length===$.length;this.value=I?[]:$.map((U)=>U.value)}toggleInvert(){let $=this.value;if(!$)return;let I=this._enabledOptions.filter((U)=>!$.includes(U.value));this.value=I.map((U)=>U.value)}toggleValue(){this.value===void 0&&(this.value=[]);let $=this.value.includes(this._value);this.value=$?this.value.filter((I)=>I!==this._value):[...this.value,this._value]}constructor($){super($,!1),this.options=$.options,this.value=[...$.initialValues??[]];let I=Math.max(this.options.findIndex(({value:U})=>U===$.cursorAt),0);this.cursor=this.options[I].disabled?o4(I,1,this.options):I,this.on("key",(U)=>{U==="a"&&this.toggleAll(),U==="i"&&this.toggleInvert()}),this.on("cursor",(U)=>{switch(U){case"left":case"up":this.cursor=o4(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=o4(this.cursor,1,this.options);break;case"space":this.toggleValue();break}})}};YG=class YG extends U1{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor($){super($,!1),this.options=$.options;let I=this.options.findIndex(({value:_})=>_===$.initialValue),U=I===-1?0:I;this.cursor=this.options[U].disabled?o4(U,1,this.options):U,this.changeValue(),this.on("cursor",(_)=>{switch(_){case"left":case"up":this.cursor=o4(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=o4(this.cursor,1,this.options);break}this.changeValue()})}};OG=class OG extends U1{get userInputWithCursor(){if(this.state==="submit")return this.userInput;let $=this.userInput;if(this.cursor>=$.length)return`${this.userInput}█`;let I=$.slice(0,this.cursor),[U,..._]=$.slice(this.cursor);return`${I}${vG("inverse",U)}${_.join("")}`}get cursor(){return this._cursor}constructor($){super({...$,initialUserInput:$.initialUserInput??$.initialValue}),this.on("userInput",(I)=>{this._setValue(I)}),this.on("finalize",()=>{this.value||(this.value=$.defaultValue),this.value===void 0&&(this.value="")})}}});import{styleText as Z,stripVTControlCharacters as mn}from"node:util";import T4 from"node:process";function OF(){return T4.platform!=="win32"?T4.env.TERM!=="linux":!!T4.env.CI||!!T4.env.WT_SESSION||!!T4.env.TERMINUS_SUBLIME||T4.env.ConEmuTask==="{cmd::Cmder}"||T4.env.TERM_PROGRAM==="Terminus-Sublime"||T4.env.TERM_PROGRAM==="vscode"||T4.env.TERM==="xterm-256color"||T4.env.TERM==="alacritty"||T4.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}function E0($,I,U){return String($).normalize().replaceAll(`\r
182
+ `)),this._prevFrame=$;return}}this.output.write(x$.erase.down())}this.output.write($),this.state==="initial"&&(this.state="active"),this._prevFrame=$}}}function HF($,I){if($===void 0||I.length===0)return 0;let U=I.findIndex((_)=>_.value===$);return U!==-1?U:0}function YF($,I){return(I.label??String(I.value)).toLowerCase().includes($.toLowerCase())}function OF($,I){if(I)return $?I:I[0]}var x$,$F=($)=>$===161||$===164||$===167||$===168||$===170||$===173||$===174||$>=176&&$<=180||$>=182&&$<=186||$>=188&&$<=191||$===198||$===208||$===215||$===216||$>=222&&$<=225||$===230||$>=232&&$<=234||$===236||$===237||$===240||$===242||$===243||$>=247&&$<=250||$===252||$===254||$===257||$===273||$===275||$===283||$===294||$===295||$===299||$>=305&&$<=307||$===312||$>=319&&$<=322||$===324||$>=328&&$<=331||$===333||$===338||$===339||$===358||$===359||$===363||$===462||$===464||$===466||$===468||$===470||$===472||$===474||$===476||$===593||$===609||$===708||$===711||$>=713&&$<=715||$===717||$===720||$>=728&&$<=731||$===733||$===735||$>=768&&$<=879||$>=913&&$<=929||$>=931&&$<=937||$>=945&&$<=961||$>=963&&$<=969||$===1025||$>=1040&&$<=1103||$===1105||$===8208||$>=8211&&$<=8214||$===8216||$===8217||$===8220||$===8221||$>=8224&&$<=8226||$>=8228&&$<=8231||$===8240||$===8242||$===8243||$===8245||$===8251||$===8254||$===8308||$===8319||$>=8321&&$<=8324||$===8364||$===8451||$===8453||$===8457||$===8467||$===8470||$===8481||$===8482||$===8486||$===8491||$===8531||$===8532||$>=8539&&$<=8542||$>=8544&&$<=8555||$>=8560&&$<=8569||$===8585||$>=8592&&$<=8601||$===8632||$===8633||$===8658||$===8660||$===8679||$===8704||$===8706||$===8707||$===8711||$===8712||$===8715||$===8719||$===8721||$===8725||$===8730||$>=8733&&$<=8736||$===8739||$===8741||$>=8743&&$<=8748||$===8750||$>=8756&&$<=8759||$===8764||$===8765||$===8776||$===8780||$===8786||$===8800||$===8801||$>=8804&&$<=8807||$===8810||$===8811||$===8814||$===8815||$===8834||$===8835||$===8838||$===8839||$===8853||$===8857||$===8869||$===8895||$===8978||$>=9312&&$<=9449||$>=9451&&$<=9547||$>=9552&&$<=9587||$>=9600&&$<=9615||$>=9618&&$<=9621||$===9632||$===9633||$>=9635&&$<=9641||$===9650||$===9651||$===9654||$===9655||$===9660||$===9661||$===9664||$===9665||$>=9670&&$<=9672||$===9675||$>=9678&&$<=9681||$>=9698&&$<=9701||$===9711||$===9733||$===9734||$===9737||$===9742||$===9743||$===9756||$===9758||$===9792||$===9794||$===9824||$===9825||$>=9827&&$<=9829||$>=9831&&$<=9834||$===9836||$===9837||$===9839||$===9886||$===9887||$===9919||$>=9926&&$<=9933||$>=9935&&$<=9939||$>=9941&&$<=9953||$===9955||$===9960||$===9961||$>=9963&&$<=9969||$===9972||$>=9974&&$<=9977||$===9979||$===9980||$===9982||$===9983||$===10045||$>=10102&&$<=10111||$>=11094&&$<=11097||$>=12872&&$<=12879||$>=57344&&$<=63743||$>=65024&&$<=65039||$===65533||$>=127232&&$<=127242||$>=127248&&$<=127277||$>=127280&&$<=127337||$>=127344&&$<=127373||$===127375||$===127376||$>=127387&&$<=127404||$>=917760&&$<=917999||$>=983040&&$<=1048573||$>=1048576&&$<=1114109,IF=($)=>$===12288||$>=65281&&$<=65376||$>=65504&&$<=65510,uF=($)=>$>=4352&&$<=4447||$===8986||$===8987||$===9001||$===9002||$>=9193&&$<=9196||$===9200||$===9203||$===9725||$===9726||$===9748||$===9749||$>=9800&&$<=9811||$===9855||$===9875||$===9889||$===9898||$===9899||$===9917||$===9918||$===9924||$===9925||$===9934||$===9940||$===9962||$===9970||$===9971||$===9973||$===9978||$===9981||$===9989||$===9994||$===9995||$===10024||$===10060||$===10062||$>=10067&&$<=10069||$===10071||$>=10133&&$<=10135||$===10160||$===10175||$===11035||$===11036||$===11088||$===11093||$>=11904&&$<=11929||$>=11931&&$<=12019||$>=12032&&$<=12245||$>=12272&&$<=12287||$>=12289&&$<=12350||$>=12353&&$<=12438||$>=12441&&$<=12543||$>=12549&&$<=12591||$>=12593&&$<=12686||$>=12688&&$<=12771||$>=12783&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=19903||$>=19968&&$<=42124||$>=42128&&$<=42182||$>=43360&&$<=43388||$>=44032&&$<=55203||$>=63744&&$<=64255||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=94176&&$<=94180||$===94192||$===94193||$>=94208&&$<=100343||$>=100352&&$<=101589||$>=101632&&$<=101640||$>=110576&&$<=110579||$>=110581&&$<=110587||$===110589||$===110590||$>=110592&&$<=110882||$===110898||$>=110928&&$<=110930||$===110933||$>=110948&&$<=110951||$>=110960&&$<=111355||$===126980||$===127183||$===127374||$>=127377&&$<=127386||$>=127488&&$<=127490||$>=127504&&$<=127547||$>=127552&&$<=127560||$===127568||$===127569||$>=127584&&$<=127589||$>=127744&&$<=127776||$>=127789&&$<=127797||$>=127799&&$<=127868||$>=127870&&$<=127891||$>=127904&&$<=127946||$>=127951&&$<=127955||$>=127968&&$<=127984||$===127988||$>=127992&&$<=128062||$===128064||$>=128066&&$<=128252||$>=128255&&$<=128317||$>=128331&&$<=128334||$>=128336&&$<=128359||$===128378||$===128405||$===128406||$===128420||$>=128507&&$<=128591||$>=128640&&$<=128709||$===128716||$>=128720&&$<=128722||$>=128725&&$<=128727||$>=128732&&$<=128735||$===128747||$===128748||$>=128756&&$<=128764||$>=128992&&$<=129003||$===129008||$>=129292&&$<=129338||$>=129340&&$<=129349||$>=129351&&$<=129535||$>=129648&&$<=129660||$>=129664&&$<=129672||$>=129680&&$<=129725||$>=129727&&$<=129733||$>=129742&&$<=129755||$>=129760&&$<=129768||$>=129776&&$<=129784||$>=131072&&$<=196605||$>=196608&&$<=262141,zG,S_,w_,vG,E_,UF,_F,h7=($,I={},U={})=>{let _=I.limit??1/0,u=I.ellipsis??"",g=I?.ellipsisWidth??(u?h7(u,_F,U).width:0),z=U.ansiWidth??0,v=U.controlWidth??0,J=U.tabWidth??8,N=U.ambiguousWidth??1,X=U.emojiWidth??2,G=U.fullWidthWidth??2,q=U.regularWidth??1,T=U.wideWidth??2,H=0,Q=0,Y=$.length,K=0,R=!1,P=Y,O=Math.max(0,_-g),D=0,L=0,B=0,M=0;$:for(;;){if(L>D||Q>=Y&&Q>H){let F=$.slice(D,L)||$.slice(H,Q);K=0;for(let A of F.replaceAll(UF,"")){let f=A.codePointAt(0)||0;if(IF(f)?M=G:uF(f)?M=T:N!==q&&$F(f)?M=N:M=q,B+M>O&&(P=Math.min(P,Math.max(D,H)+K)),B+M>_){R=!0;break $}K+=A.length,B+=M}D=L=0}if(Q>=Y)break;if(E_.lastIndex=Q,E_.test($)){if(K=E_.lastIndex-Q,M=K*q,B+M>O&&(P=Math.min(P,Q+Math.floor((O-B)/q))),B+M>_){R=!0;break}B+=M,D=H,L=Q,Q=H=E_.lastIndex;continue}if(zG.lastIndex=Q,zG.test($)){if(B+z>O&&(P=Math.min(P,Q)),B+z>_){R=!0;break}B+=z,D=H,L=Q,Q=H=zG.lastIndex;continue}if(S_.lastIndex=Q,S_.test($)){if(K=S_.lastIndex-Q,M=K*v,B+M>O&&(P=Math.min(P,Q+Math.floor((O-B)/v))),B+M>_){R=!0;break}B+=M,D=H,L=Q,Q=H=S_.lastIndex;continue}if(w_.lastIndex=Q,w_.test($)){if(K=w_.lastIndex-Q,M=K*J,B+M>O&&(P=Math.min(P,Q+Math.floor((O-B)/J))),B+M>_){R=!0;break}B+=M,D=H,L=Q,Q=H=w_.lastIndex;continue}if(vG.lastIndex=Q,vG.test($)){if(B+X>O&&(P=Math.min(P,Q)),B+X>_){R=!0;break}B+=X,D=H,L=Q,Q=H=vG.lastIndex;continue}Q+=1}return{width:R?O:B,index:R?P:Y,truncated:R,ellipsed:R&&_>=g}},gF,w0=($,I={})=>h7($,gF,I).width,f_="\x1B",c7="›",zF=39,QG="\x07",d7="[",vF="]",p7="m",TG,r7,JF=($)=>{if($>=30&&$<=37||$>=90&&$<=97)return 39;if($>=40&&$<=47||$>=100&&$<=107)return 49;if($===1||$===2)return 22;if($===3)return 23;if($===4)return 24;if($===7)return 27;if($===8)return 28;if($===9)return 29;if($===0)return 0},n7=($)=>`${f_}${d7}${$}${p7}`,l7=($)=>`${f_}${TG}${$}${QG}`,NF=($)=>$.map((I)=>w0(I)),JG=($,I,U)=>{let _=I[Symbol.iterator](),u=!1,g=!1,z=$.at(-1),v=z===void 0?0:w0(z),J=_.next(),N=_.next(),X=0;for(;!J.done;){let G=J.value,q=w0(G);v+q<=U?$[$.length-1]+=G:($.push(G),v=0),(G===f_||G===c7)&&(u=!0,g=I.startsWith(TG,X+1)),u?g?G===QG&&(u=!1,g=!1):G===p7&&(u=!1):(v+=q,v===U&&!N.done&&($.push(""),v=0)),J=N,N=_.next(),X+=G.length}z=$.at(-1),!v&&z!==void 0&&z.length>0&&$.length>1&&($[$.length-2]+=$.pop())},GF=($)=>{let I=$.split(" "),U=I.length;for(;U>0&&!(w0(I[U-1])>0);)U--;return U===I.length?$:I.slice(0,U).join(" ")+I.slice(U).join("")},XF=($,I,U={})=>{if(U.trim!==!1&&$.trim()==="")return"";let _="",u,g,z=$.split(" "),v=NF(z),J=[""];for(let[H,Q]of z.entries()){U.trim!==!1&&(J[J.length-1]=(J.at(-1)??"").trimStart());let Y=w0(J.at(-1)??"");if(H!==0&&(Y>=I&&(U.wordWrap===!1||U.trim===!1)&&(J.push(""),Y=0),(Y>0||U.trim===!1)&&(J[J.length-1]+=" ",Y++)),U.hard&&v[H]>I){let K=I-Y,R=1+Math.floor((v[H]-K-1)/I);Math.floor((v[H]-1)/I)<R&&J.push(""),JG(J,Q,I);continue}if(Y+v[H]>I&&Y>0&&v[H]>0){if(U.wordWrap===!1&&Y<I){JG(J,Q,I);continue}J.push("")}if(Y+v[H]>I&&U.wordWrap===!1){JG(J,Q,I);continue}J[J.length-1]+=Q}U.trim!==!1&&(J=J.map((H)=>GF(H)));let N=J.join(`
183
+ `),X=N[Symbol.iterator](),G=X.next(),q=X.next(),T=0;for(;!G.done;){let H=G.value,Q=q.value;if(_+=H,H===f_||H===c7){r7.lastIndex=T+1;let K=r7.exec(N)?.groups;if(K?.code!==void 0){let R=Number.parseFloat(K.code);u=R===zF?void 0:R}else K?.uri!==void 0&&(g=K.uri.length===0?void 0:K.uri)}let Y=u?JF(u):void 0;Q===`
184
+ `?(g&&(_+=l7("")),u&&Y&&(_+=n7(Y))):H===`
185
+ `&&(u&&Y&&(_+=n7(u)),g&&(_+=l7(g))),T+=H.length,G=q,q=X.next()}return _},qF,E$,TF,XG,E0=($)=>("columns"in $)&&typeof $.columns=="number"?$.columns:80,YG=($)=>("rows"in $)&&typeof $.rows=="number"?$.rows:20,t7,OG,a7,e7,VG,DG;var BG=u4(()=>{x$=q$(gG(),1);zG=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,S_=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,w_=/\t{1,1000}/y,vG=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,E_=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,UF=/\p{M}+/gu,_F={limit:1/0,ellipsis:""},gF={limit:1/0,ellipsis:"",ellipsisWidth:0},TG=`${vF}8;;`,r7=new RegExp(`(?:\\${d7}(?<code>\\d+)m|\\${TG}(?<uri>.*)${QG})`,"y");qF=["up","down","left","right","space","enter","cancel"],E$={actions:new Set(qF),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0};TF=globalThis.process.platform.startsWith("win"),XG=Symbol("clack:cancel");t7=class t7 extends g1{filteredOptions;multiple;isNavigating=!1;selectedValues=[];focusedValue;#$=0;#u="";#U;#I;get cursor(){return this.#$}get userInputWithCursor(){if(!this.userInput)return NG(["inverse","hidden"],"_");if(this._cursor>=this.userInput.length)return`${this.userInput}█`;let $=this.userInput.slice(0,this._cursor),[I,...U]=this.userInput.slice(this._cursor);return`${$}${NG("inverse",I)}${U.join("")}`}get options(){return typeof this.#I=="function"?this.#I():this.#I}constructor($){super($),this.#I=$.options;let I=this.options;this.filteredOptions=[...I],this.multiple=$.multiple===!0,this.#U=$.filter??YF;let U;if($.initialValue&&Array.isArray($.initialValue)?this.multiple?U=$.initialValue:U=$.initialValue.slice(0,1):!this.multiple&&this.options.length>0&&(U=[this.options[0].value]),U)for(let _ of U){let u=I.findIndex((g)=>g.value===_);u!==-1&&(this.toggleSelected(_),this.#$=u)}this.focusedValue=this.options[this.#$]?.value,this.on("key",(_,u)=>this.#_(_,u)),this.on("userInput",(_)=>this.#g(_))}_isActionKey($,I){return $==="\t"||this.multiple&&this.isNavigating&&I.name==="space"&&$!==void 0&&$!==""}#_($,I){let U=I.name==="up",_=I.name==="down",u=I.name==="return";U||_?(this.#$=a4(this.#$,U?-1:1,this.filteredOptions),this.focusedValue=this.filteredOptions[this.#$]?.value,this.multiple||(this.selectedValues=[this.focusedValue]),this.isNavigating=!0):u?this.value=OF(this.multiple,this.selectedValues):this.multiple?this.focusedValue!==void 0&&(I.name==="tab"||this.isNavigating&&I.name==="space")?this.toggleSelected(this.focusedValue):this.isNavigating=!1:(this.focusedValue&&(this.selectedValues=[this.focusedValue]),this.isNavigating=!1)}deselectAll(){this.selectedValues=[]}toggleSelected($){this.filteredOptions.length!==0&&(this.multiple?this.selectedValues.includes($)?this.selectedValues=this.selectedValues.filter((I)=>I!==$):this.selectedValues=[...this.selectedValues,$]:this.selectedValues=[$])}#g($){if($!==this.#u){this.#u=$;let I=this.options;$?this.filteredOptions=I.filter((u)=>this.#U($,u)):this.filteredOptions=[...I];let U=HF(this.focusedValue,this.filteredOptions);this.#$=a4(U,0,this.filteredOptions);let _=this.filteredOptions[this.#$];_&&!_.disabled?this.focusedValue=_.value:this.focusedValue=void 0,this.multiple||(this.focusedValue!==void 0?this.toggleSelected(this.focusedValue):this.deselectAll())}}};OG=class OG extends g1{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor($){super($,!1),this.value=!!$.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",(I)=>{this.output.write(x$.cursor.move(0,-1)),this.value=I,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};a7=class a7 extends g1{options;cursor=0;#$;getGroupItems($){return this.options.filter((I)=>I.group===$)}isGroupSelected($){let I=this.getGroupItems($),U=this.value;return U===void 0?!1:I.every((_)=>U.includes(_.value))}toggleValue(){let $=this.options[this.cursor];if(this.value===void 0&&(this.value=[]),$.group===!0){let I=$.value,U=this.getGroupItems(I);this.isGroupSelected(I)?this.value=this.value.filter((_)=>U.findIndex((u)=>u.value===_)===-1):this.value=[...this.value,...U.map((_)=>_.value)],this.value=Array.from(new Set(this.value))}else{let I=this.value.includes($.value);this.value=I?this.value.filter((U)=>U!==$.value):[...this.value,$.value]}}constructor($){super($,!1);let{options:I}=$;this.#$=$.selectableGroups!==!1,this.options=Object.entries(I).flatMap(([U,_])=>[{value:U,group:!0,label:U},..._.map((u)=>({...u,group:U}))]),this.value=[...$.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:U})=>U===$.cursorAt),this.#$?0:1),this.on("cursor",(U)=>{switch(U){case"left":case"up":{this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;let _=this.options[this.cursor]?.group===!0;!this.#$&&_&&(this.cursor=this.cursor===0?this.options.length-1:this.cursor-1);break}case"down":case"right":{this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;let _=this.options[this.cursor]?.group===!0;!this.#$&&_&&(this.cursor=this.cursor===this.options.length-1?0:this.cursor+1);break}case"space":this.toggleValue();break}})}};e7=class extends g1{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter(($)=>$.disabled!==!0)}toggleAll(){let $=this._enabledOptions,I=this.value!==void 0&&this.value.length===$.length;this.value=I?[]:$.map((U)=>U.value)}toggleInvert(){let $=this.value;if(!$)return;let I=this._enabledOptions.filter((U)=>!$.includes(U.value));this.value=I.map((U)=>U.value)}toggleValue(){this.value===void 0&&(this.value=[]);let $=this.value.includes(this._value);this.value=$?this.value.filter((I)=>I!==this._value):[...this.value,this._value]}constructor($){super($,!1),this.options=$.options,this.value=[...$.initialValues??[]];let I=Math.max(this.options.findIndex(({value:U})=>U===$.cursorAt),0);this.cursor=this.options[I].disabled?a4(I,1,this.options):I,this.on("key",(U)=>{U==="a"&&this.toggleAll(),U==="i"&&this.toggleInvert()}),this.on("cursor",(U)=>{switch(U){case"left":case"up":this.cursor=a4(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=a4(this.cursor,1,this.options);break;case"space":this.toggleValue();break}})}};VG=class VG extends g1{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor($){super($,!1),this.options=$.options;let I=this.options.findIndex(({value:_})=>_===$.initialValue),U=I===-1?0:I;this.cursor=this.options[U].disabled?a4(U,1,this.options):U,this.changeValue(),this.on("cursor",(_)=>{switch(_){case"left":case"up":this.cursor=a4(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=a4(this.cursor,1,this.options);break}this.changeValue()})}};DG=class DG extends g1{get userInputWithCursor(){if(this.state==="submit")return this.userInput;let $=this.userInput;if(this.cursor>=$.length)return`${this.userInput}█`;let I=$.slice(0,this.cursor),[U,..._]=$.slice(this.cursor);return`${I}${NG("inverse",U)}${_.join("")}`}get cursor(){return this._cursor}constructor($){super({...$,initialUserInput:$.initialUserInput??$.initialValue}),this.on("userInput",(I)=>{this._setValue(I)}),this.on("finalize",()=>{this.value||(this.value=$.defaultValue),this.value===void 0&&(this.value="")})}}});import{styleText as Z,stripVTControlCharacters as lr}from"node:util";import Y4 from"node:process";function VF(){return Y4.platform!=="win32"?Y4.env.TERM!=="linux":!!Y4.env.CI||!!Y4.env.WT_SESSION||!!Y4.env.TERMINUS_SUBLIME||Y4.env.ConEmuTask==="{cmd::Cmder}"||Y4.env.TERM_PROGRAM==="Terminus-Sublime"||Y4.env.TERM_PROGRAM==="vscode"||Y4.env.TERM==="xterm-256color"||Y4.env.TERM==="alacritty"||Y4.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}function x0($,I,U){return String($).normalize().replaceAll(`\r
186
186
  `,`
187
187
  `).split(`
188
188
  `).map((_)=>nF(_,I,U)).join(`
189
- `)}var w0,RG,DF=()=>process.env.CI==="true",N$=($,I)=>RG?$:I,VF,UT,_T,i_,BF,s,W6,cn,dn,KG,y_,MF,a7,e7,pn,s7,RF,KF,LF,PF,on,WF,ZF,AF,bF,n_=($)=>{switch($){case"initial":case"active":return Z("cyan",VF);case"cancel":return Z("red",UT);case"error":return Z("yellow",_T);case"submit":return Z("green",i_)}},gT=($)=>{switch($){case"initial":case"active":return Z("cyan",s);case"cancel":return Z("red",s);case"error":return Z("yellow",s);case"submit":return Z("green",s)}},jF=($)=>$===161||$===164||$===167||$===168||$===170||$===173||$===174||$>=176&&$<=180||$>=182&&$<=186||$>=188&&$<=191||$===198||$===208||$===215||$===216||$>=222&&$<=225||$===230||$>=232&&$<=234||$===236||$===237||$===240||$===242||$===243||$>=247&&$<=250||$===252||$===254||$===257||$===273||$===275||$===283||$===294||$===295||$===299||$>=305&&$<=307||$===312||$>=319&&$<=322||$===324||$>=328&&$<=331||$===333||$===338||$===339||$===358||$===359||$===363||$===462||$===464||$===466||$===468||$===470||$===472||$===474||$===476||$===593||$===609||$===708||$===711||$>=713&&$<=715||$===717||$===720||$>=728&&$<=731||$===733||$===735||$>=768&&$<=879||$>=913&&$<=929||$>=931&&$<=937||$>=945&&$<=961||$>=963&&$<=969||$===1025||$>=1040&&$<=1103||$===1105||$===8208||$>=8211&&$<=8214||$===8216||$===8217||$===8220||$===8221||$>=8224&&$<=8226||$>=8228&&$<=8231||$===8240||$===8242||$===8243||$===8245||$===8251||$===8254||$===8308||$===8319||$>=8321&&$<=8324||$===8364||$===8451||$===8453||$===8457||$===8467||$===8470||$===8481||$===8482||$===8486||$===8491||$===8531||$===8532||$>=8539&&$<=8542||$>=8544&&$<=8555||$>=8560&&$<=8569||$===8585||$>=8592&&$<=8601||$===8632||$===8633||$===8658||$===8660||$===8679||$===8704||$===8706||$===8707||$===8711||$===8712||$===8715||$===8719||$===8721||$===8725||$===8730||$>=8733&&$<=8736||$===8739||$===8741||$>=8743&&$<=8748||$===8750||$>=8756&&$<=8759||$===8764||$===8765||$===8776||$===8780||$===8786||$===8800||$===8801||$>=8804&&$<=8807||$===8810||$===8811||$===8814||$===8815||$===8834||$===8835||$===8838||$===8839||$===8853||$===8857||$===8869||$===8895||$===8978||$>=9312&&$<=9449||$>=9451&&$<=9547||$>=9552&&$<=9587||$>=9600&&$<=9615||$>=9618&&$<=9621||$===9632||$===9633||$>=9635&&$<=9641||$===9650||$===9651||$===9654||$===9655||$===9660||$===9661||$===9664||$===9665||$>=9670&&$<=9672||$===9675||$>=9678&&$<=9681||$>=9698&&$<=9701||$===9711||$===9733||$===9734||$===9737||$===9742||$===9743||$===9756||$===9758||$===9792||$===9794||$===9824||$===9825||$>=9827&&$<=9829||$>=9831&&$<=9834||$===9836||$===9837||$===9839||$===9886||$===9887||$===9919||$>=9926&&$<=9933||$>=9935&&$<=9939||$>=9941&&$<=9953||$===9955||$===9960||$===9961||$>=9963&&$<=9969||$===9972||$>=9974&&$<=9977||$===9979||$===9980||$===9982||$===9983||$===10045||$>=10102&&$<=10111||$>=11094&&$<=11097||$>=12872&&$<=12879||$>=57344&&$<=63743||$>=65024&&$<=65039||$===65533||$>=127232&&$<=127242||$>=127248&&$<=127277||$>=127280&&$<=127337||$>=127344&&$<=127373||$===127375||$===127376||$>=127387&&$<=127404||$>=917760&&$<=917999||$>=983040&&$<=1048573||$>=1048576&&$<=1114109,FF=($)=>$===12288||$>=65281&&$<=65376||$>=65504&&$<=65510,SF=($)=>$>=4352&&$<=4447||$===8986||$===8987||$===9001||$===9002||$>=9193&&$<=9196||$===9200||$===9203||$===9725||$===9726||$===9748||$===9749||$>=9800&&$<=9811||$===9855||$===9875||$===9889||$===9898||$===9899||$===9917||$===9918||$===9924||$===9925||$===9934||$===9940||$===9962||$===9970||$===9971||$===9973||$===9978||$===9981||$===9989||$===9994||$===9995||$===10024||$===10060||$===10062||$>=10067&&$<=10069||$===10071||$>=10133&&$<=10135||$===10160||$===10175||$===11035||$===11036||$===11088||$===11093||$>=11904&&$<=11929||$>=11931&&$<=12019||$>=12032&&$<=12245||$>=12272&&$<=12287||$>=12289&&$<=12350||$>=12353&&$<=12438||$>=12441&&$<=12543||$>=12549&&$<=12591||$>=12593&&$<=12686||$>=12688&&$<=12771||$>=12783&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=19903||$>=19968&&$<=42124||$>=42128&&$<=42182||$>=43360&&$<=43388||$>=44032&&$<=55203||$>=63744&&$<=64255||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=94176&&$<=94180||$===94192||$===94193||$>=94208&&$<=100343||$>=100352&&$<=101589||$>=101632&&$<=101640||$>=110576&&$<=110579||$>=110581&&$<=110587||$===110589||$===110590||$>=110592&&$<=110882||$===110898||$>=110928&&$<=110930||$===110933||$>=110948&&$<=110951||$>=110960&&$<=111355||$===126980||$===127183||$===127374||$>=127377&&$<=127386||$>=127488&&$<=127490||$>=127504&&$<=127547||$>=127552&&$<=127560||$===127568||$===127569||$>=127584&&$<=127589||$>=127744&&$<=127776||$>=127789&&$<=127797||$>=127799&&$<=127868||$>=127870&&$<=127891||$>=127904&&$<=127946||$>=127951&&$<=127955||$>=127968&&$<=127984||$===127988||$>=127992&&$<=128062||$===128064||$>=128066&&$<=128252||$>=128255&&$<=128317||$>=128331&&$<=128334||$>=128336&&$<=128359||$===128378||$===128405||$===128406||$===128420||$>=128507&&$<=128591||$>=128640&&$<=128709||$===128716||$>=128720&&$<=128722||$>=128725&&$<=128727||$>=128732&&$<=128735||$===128747||$===128748||$>=128756&&$<=128764||$>=128992&&$<=129003||$===129008||$>=129292&&$<=129338||$>=129340&&$<=129349||$>=129351&&$<=129535||$>=129648&&$<=129660||$>=129664&&$<=129672||$>=129680&&$<=129725||$>=129727&&$<=129733||$>=129742&&$<=129755||$>=129760&&$<=129768||$>=129776&&$<=129784||$>=131072&&$<=196605||$>=196608&&$<=262141,VG,C_,f_,BG,x_,wF,EF,zT=($,I={},U={})=>{let _=I.limit??1/0,u=I.ellipsis??"",g=I?.ellipsisWidth??(u?zT(u,EF,U).width:0),z=U.ansiWidth??0,v=U.controlWidth??0,J=U.tabWidth??8,N=U.ambiguousWidth??1,X=U.emojiWidth??2,G=U.fullWidthWidth??2,q=U.regularWidth??1,T=U.wideWidth??2,H=0,Q=0,Y=$.length,R=0,K=!1,W=Y,O=Math.max(0,_-g),V=0,L=0,B=0,M=0;$:for(;;){if(L>V||Q>=Y&&Q>H){let F=$.slice(V,L)||$.slice(H,Q);R=0;for(let A of F.replaceAll(wF,"")){let f=A.codePointAt(0)||0;if(FF(f)?M=G:SF(f)?M=T:N!==q&&jF(f)?M=N:M=q,B+M>O&&(W=Math.min(W,Math.max(V,H)+R)),B+M>_){K=!0;break $}R+=A.length,B+=M}V=L=0}if(Q>=Y)break;if(x_.lastIndex=Q,x_.test($)){if(R=x_.lastIndex-Q,M=R*q,B+M>O&&(W=Math.min(W,Q+Math.floor((O-B)/q))),B+M>_){K=!0;break}B+=M,V=H,L=Q,Q=H=x_.lastIndex;continue}if(VG.lastIndex=Q,VG.test($)){if(B+z>O&&(W=Math.min(W,Q)),B+z>_){K=!0;break}B+=z,V=H,L=Q,Q=H=VG.lastIndex;continue}if(C_.lastIndex=Q,C_.test($)){if(R=C_.lastIndex-Q,M=R*v,B+M>O&&(W=Math.min(W,Q+Math.floor((O-B)/v))),B+M>_){K=!0;break}B+=M,V=H,L=Q,Q=H=C_.lastIndex;continue}if(f_.lastIndex=Q,f_.test($)){if(R=f_.lastIndex-Q,M=R*J,B+M>O&&(W=Math.min(W,Q+Math.floor((O-B)/J))),B+M>_){K=!0;break}B+=M,V=H,L=Q,Q=H=f_.lastIndex;continue}if(BG.lastIndex=Q,BG.test($)){if(B+X>O&&(W=Math.min(W,Q)),B+X>_){K=!0;break}B+=X,V=H,L=Q,Q=H=BG.lastIndex;continue}Q+=1}return{width:K?O:B,index:K?W:Y,truncated:K,ellipsed:K&&_>=g}},CF,x4=($,I={})=>zT($,CF,I).width,r_="\x1B",vT="›",fF=39,PG="\x07",JT="[",xF="]",NT="m",WG,$T,kF=($)=>{if($>=30&&$<=37||$>=90&&$<=97)return 39;if($>=40&&$<=47||$>=100&&$<=107)return 49;if($===1||$===2)return 22;if($===3)return 23;if($===4)return 24;if($===7)return 27;if($===8)return 28;if($===9)return 29;if($===0)return 0},IT=($)=>`${r_}${JT}${$}${NT}`,uT=($)=>`${r_}${WG}${$}${PG}`,yF=($)=>$.map((I)=>x4(I)),MG=($,I,U)=>{let _=I[Symbol.iterator](),u=!1,g=!1,z=$.at(-1),v=z===void 0?0:x4(z),J=_.next(),N=_.next(),X=0;for(;!J.done;){let G=J.value,q=x4(G);v+q<=U?$[$.length-1]+=G:($.push(G),v=0),(G===r_||G===vT)&&(u=!0,g=I.startsWith(WG,X+1)),u?g?G===PG&&(u=!1,g=!1):G===NT&&(u=!1):(v+=q,v===U&&!N.done&&($.push(""),v=0)),J=N,N=_.next(),X+=G.length}z=$.at(-1),!v&&z!==void 0&&z.length>0&&$.length>1&&($[$.length-2]+=$.pop())},iF=($)=>{let I=$.split(" "),U=I.length;for(;U>0&&!(x4(I[U-1])>0);)U--;return U===I.length?$:I.slice(0,U).join(" ")+I.slice(U).join("")},nF=($,I,U={})=>{if(U.trim!==!1&&$.trim()==="")return"";let _="",u,g,z=$.split(" "),v=yF(z),J=[""];for(let[H,Q]of z.entries()){U.trim!==!1&&(J[J.length-1]=(J.at(-1)??"").trimStart());let Y=x4(J.at(-1)??"");if(H!==0&&(Y>=I&&(U.wordWrap===!1||U.trim===!1)&&(J.push(""),Y=0),(Y>0||U.trim===!1)&&(J[J.length-1]+=" ",Y++)),U.hard&&v[H]>I){let R=I-Y,K=1+Math.floor((v[H]-R-1)/I);Math.floor((v[H]-1)/I)<K&&J.push(""),MG(J,Q,I);continue}if(Y+v[H]>I&&Y>0&&v[H]>0){if(U.wordWrap===!1&&Y<I){MG(J,Q,I);continue}J.push("")}if(Y+v[H]>I&&U.wordWrap===!1){MG(J,Q,I);continue}J[J.length-1]+=Q}U.trim!==!1&&(J=J.map((H)=>iF(H)));let N=J.join(`
190
- `),X=N[Symbol.iterator](),G=X.next(),q=X.next(),T=0;for(;!G.done;){let H=G.value,Q=q.value;if(_+=H,H===r_||H===vT){$T.lastIndex=T+1;let R=$T.exec(N)?.groups;if(R?.code!==void 0){let K=Number.parseFloat(R.code);u=K===fF?void 0:K}else R?.uri!==void 0&&(g=R.uri.length===0?void 0:R.uri)}let Y=u?kF(u):void 0;Q===`
191
- `?(g&&(_+=uT("")),u&&Y&&(_+=IT(Y))):H===`
192
- `&&(u&&Y&&(_+=IT(u)),g&&(_+=uT(g))),T+=H.length,G=q,q=X.next()}return _},rF=($,I,U,_,u)=>{let g=I,z=0;for(let v=U;v<_;v++){let J=$[v];if(g=g-J.length,z++,g<=u)break}return{lineCount:g,removals:z}},LG=({cursor:$,options:I,style:U,output:_=process.stdout,maxItems:u=Number.POSITIVE_INFINITY,columnPadding:g=0,rowPadding:z=4})=>{let v=F0(_)-g,J=TG(_),N=Z("dim","..."),X=Math.max(J-z,0),G=Math.max(Math.min(u,X),5),q=0;$>=G-3&&(q=Math.max(Math.min($-G+3,I.length-G),0));let T=G<I.length&&q>0,H=G<I.length&&q+G<I.length,Q=Math.min(q+G,I.length),Y=[],R=0;T&&R++,H&&R++;let K=q+(T?1:0),W=Q-(H?1:0);for(let V=K;V<W;V++){let L=E0(U(I[V],V===$),v,{hard:!0,trim:!1}).split(`
193
- `);Y.push(L),R+=L.length}if(R>X){let V=0,L=0,B=R,M=$-K,F=(A,f)=>rF(Y,B,A,f,X);T?({lineCount:B,removals:V}=F(0,M),B>X&&({lineCount:B,removals:L}=F(M+1,Y.length))):({lineCount:B,removals:L}=F(M+1,Y.length),B>X&&({lineCount:B,removals:V}=F(0,M))),V>0&&(T=!0,Y.splice(0,V)),L>0&&(H=!0,Y.splice(Y.length-L,L))}let O=[];T&&O.push(N);for(let V of Y)for(let L of V)O.push(L);return H&&O.push(N),O},O$=($)=>{let I=$.active??"Yes",U=$.inactive??"No";return new HG({active:I,inactive:U,signal:$.signal,input:$.input,output:$.output,initialValue:$.initialValue??!0,render(){let _=$.withGuide??E$.withGuide,u=`${_?`${Z("gray",s)}
194
- `:""}${n_(this.state)} ${$.message}
189
+ `)}var f0,LG,DF=()=>process.env.CI==="true",N$=($,I)=>LG?$:I,BF,gT,zT,n_,MF,s,A6,hr,cr,WG,r_,KF,s7,$T,dr,IT,RF,LF,WF,PF,pr,ZF,AF,bF,jF,l_=($)=>{switch($){case"initial":case"active":return Z("cyan",BF);case"cancel":return Z("red",gT);case"error":return Z("yellow",zT);case"submit":return Z("green",n_)}},vT=($)=>{switch($){case"initial":case"active":return Z("cyan",s);case"cancel":return Z("red",s);case"error":return Z("yellow",s);case"submit":return Z("green",s)}},FF=($)=>$===161||$===164||$===167||$===168||$===170||$===173||$===174||$>=176&&$<=180||$>=182&&$<=186||$>=188&&$<=191||$===198||$===208||$===215||$===216||$>=222&&$<=225||$===230||$>=232&&$<=234||$===236||$===237||$===240||$===242||$===243||$>=247&&$<=250||$===252||$===254||$===257||$===273||$===275||$===283||$===294||$===295||$===299||$>=305&&$<=307||$===312||$>=319&&$<=322||$===324||$>=328&&$<=331||$===333||$===338||$===339||$===358||$===359||$===363||$===462||$===464||$===466||$===468||$===470||$===472||$===474||$===476||$===593||$===609||$===708||$===711||$>=713&&$<=715||$===717||$===720||$>=728&&$<=731||$===733||$===735||$>=768&&$<=879||$>=913&&$<=929||$>=931&&$<=937||$>=945&&$<=961||$>=963&&$<=969||$===1025||$>=1040&&$<=1103||$===1105||$===8208||$>=8211&&$<=8214||$===8216||$===8217||$===8220||$===8221||$>=8224&&$<=8226||$>=8228&&$<=8231||$===8240||$===8242||$===8243||$===8245||$===8251||$===8254||$===8308||$===8319||$>=8321&&$<=8324||$===8364||$===8451||$===8453||$===8457||$===8467||$===8470||$===8481||$===8482||$===8486||$===8491||$===8531||$===8532||$>=8539&&$<=8542||$>=8544&&$<=8555||$>=8560&&$<=8569||$===8585||$>=8592&&$<=8601||$===8632||$===8633||$===8658||$===8660||$===8679||$===8704||$===8706||$===8707||$===8711||$===8712||$===8715||$===8719||$===8721||$===8725||$===8730||$>=8733&&$<=8736||$===8739||$===8741||$>=8743&&$<=8748||$===8750||$>=8756&&$<=8759||$===8764||$===8765||$===8776||$===8780||$===8786||$===8800||$===8801||$>=8804&&$<=8807||$===8810||$===8811||$===8814||$===8815||$===8834||$===8835||$===8838||$===8839||$===8853||$===8857||$===8869||$===8895||$===8978||$>=9312&&$<=9449||$>=9451&&$<=9547||$>=9552&&$<=9587||$>=9600&&$<=9615||$>=9618&&$<=9621||$===9632||$===9633||$>=9635&&$<=9641||$===9650||$===9651||$===9654||$===9655||$===9660||$===9661||$===9664||$===9665||$>=9670&&$<=9672||$===9675||$>=9678&&$<=9681||$>=9698&&$<=9701||$===9711||$===9733||$===9734||$===9737||$===9742||$===9743||$===9756||$===9758||$===9792||$===9794||$===9824||$===9825||$>=9827&&$<=9829||$>=9831&&$<=9834||$===9836||$===9837||$===9839||$===9886||$===9887||$===9919||$>=9926&&$<=9933||$>=9935&&$<=9939||$>=9941&&$<=9953||$===9955||$===9960||$===9961||$>=9963&&$<=9969||$===9972||$>=9974&&$<=9977||$===9979||$===9980||$===9982||$===9983||$===10045||$>=10102&&$<=10111||$>=11094&&$<=11097||$>=12872&&$<=12879||$>=57344&&$<=63743||$>=65024&&$<=65039||$===65533||$>=127232&&$<=127242||$>=127248&&$<=127277||$>=127280&&$<=127337||$>=127344&&$<=127373||$===127375||$===127376||$>=127387&&$<=127404||$>=917760&&$<=917999||$>=983040&&$<=1048573||$>=1048576&&$<=1114109,SF=($)=>$===12288||$>=65281&&$<=65376||$>=65504&&$<=65510,wF=($)=>$>=4352&&$<=4447||$===8986||$===8987||$===9001||$===9002||$>=9193&&$<=9196||$===9200||$===9203||$===9725||$===9726||$===9748||$===9749||$>=9800&&$<=9811||$===9855||$===9875||$===9889||$===9898||$===9899||$===9917||$===9918||$===9924||$===9925||$===9934||$===9940||$===9962||$===9970||$===9971||$===9973||$===9978||$===9981||$===9989||$===9994||$===9995||$===10024||$===10060||$===10062||$>=10067&&$<=10069||$===10071||$>=10133&&$<=10135||$===10160||$===10175||$===11035||$===11036||$===11088||$===11093||$>=11904&&$<=11929||$>=11931&&$<=12019||$>=12032&&$<=12245||$>=12272&&$<=12287||$>=12289&&$<=12350||$>=12353&&$<=12438||$>=12441&&$<=12543||$>=12549&&$<=12591||$>=12593&&$<=12686||$>=12688&&$<=12771||$>=12783&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=19903||$>=19968&&$<=42124||$>=42128&&$<=42182||$>=43360&&$<=43388||$>=44032&&$<=55203||$>=63744&&$<=64255||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=94176&&$<=94180||$===94192||$===94193||$>=94208&&$<=100343||$>=100352&&$<=101589||$>=101632&&$<=101640||$>=110576&&$<=110579||$>=110581&&$<=110587||$===110589||$===110590||$>=110592&&$<=110882||$===110898||$>=110928&&$<=110930||$===110933||$>=110948&&$<=110951||$>=110960&&$<=111355||$===126980||$===127183||$===127374||$>=127377&&$<=127386||$>=127488&&$<=127490||$>=127504&&$<=127547||$>=127552&&$<=127560||$===127568||$===127569||$>=127584&&$<=127589||$>=127744&&$<=127776||$>=127789&&$<=127797||$>=127799&&$<=127868||$>=127870&&$<=127891||$>=127904&&$<=127946||$>=127951&&$<=127955||$>=127968&&$<=127984||$===127988||$>=127992&&$<=128062||$===128064||$>=128066&&$<=128252||$>=128255&&$<=128317||$>=128331&&$<=128334||$>=128336&&$<=128359||$===128378||$===128405||$===128406||$===128420||$>=128507&&$<=128591||$>=128640&&$<=128709||$===128716||$>=128720&&$<=128722||$>=128725&&$<=128727||$>=128732&&$<=128735||$===128747||$===128748||$>=128756&&$<=128764||$>=128992&&$<=129003||$===129008||$>=129292&&$<=129338||$>=129340&&$<=129349||$>=129351&&$<=129535||$>=129648&&$<=129660||$>=129664&&$<=129672||$>=129680&&$<=129725||$>=129727&&$<=129733||$>=129742&&$<=129755||$>=129760&&$<=129768||$>=129776&&$<=129784||$>=131072&&$<=196605||$>=196608&&$<=262141,MG,x_,k_,KG,y_,EF,CF,JT=($,I={},U={})=>{let _=I.limit??1/0,u=I.ellipsis??"",g=I?.ellipsisWidth??(u?JT(u,CF,U).width:0),z=U.ansiWidth??0,v=U.controlWidth??0,J=U.tabWidth??8,N=U.ambiguousWidth??1,X=U.emojiWidth??2,G=U.fullWidthWidth??2,q=U.regularWidth??1,T=U.wideWidth??2,H=0,Q=0,Y=$.length,K=0,R=!1,P=Y,O=Math.max(0,_-g),D=0,L=0,B=0,M=0;$:for(;;){if(L>D||Q>=Y&&Q>H){let F=$.slice(D,L)||$.slice(H,Q);K=0;for(let A of F.replaceAll(EF,"")){let f=A.codePointAt(0)||0;if(SF(f)?M=G:wF(f)?M=T:N!==q&&FF(f)?M=N:M=q,B+M>O&&(P=Math.min(P,Math.max(D,H)+K)),B+M>_){R=!0;break $}K+=A.length,B+=M}D=L=0}if(Q>=Y)break;if(y_.lastIndex=Q,y_.test($)){if(K=y_.lastIndex-Q,M=K*q,B+M>O&&(P=Math.min(P,Q+Math.floor((O-B)/q))),B+M>_){R=!0;break}B+=M,D=H,L=Q,Q=H=y_.lastIndex;continue}if(MG.lastIndex=Q,MG.test($)){if(B+z>O&&(P=Math.min(P,Q)),B+z>_){R=!0;break}B+=z,D=H,L=Q,Q=H=MG.lastIndex;continue}if(x_.lastIndex=Q,x_.test($)){if(K=x_.lastIndex-Q,M=K*v,B+M>O&&(P=Math.min(P,Q+Math.floor((O-B)/v))),B+M>_){R=!0;break}B+=M,D=H,L=Q,Q=H=x_.lastIndex;continue}if(k_.lastIndex=Q,k_.test($)){if(K=k_.lastIndex-Q,M=K*J,B+M>O&&(P=Math.min(P,Q+Math.floor((O-B)/J))),B+M>_){R=!0;break}B+=M,D=H,L=Q,Q=H=k_.lastIndex;continue}if(KG.lastIndex=Q,KG.test($)){if(B+X>O&&(P=Math.min(P,Q)),B+X>_){R=!0;break}B+=X,D=H,L=Q,Q=H=KG.lastIndex;continue}Q+=1}return{width:R?O:B,index:R?P:Y,truncated:R,ellipsed:R&&_>=g}},fF,y4=($,I={})=>JT($,fF,I).width,m_="\x1B",NT="›",xF=39,ZG="\x07",GT="[",kF="]",XT="m",AG,uT,yF=($)=>{if($>=30&&$<=37||$>=90&&$<=97)return 39;if($>=40&&$<=47||$>=100&&$<=107)return 49;if($===1||$===2)return 22;if($===3)return 23;if($===4)return 24;if($===7)return 27;if($===8)return 28;if($===9)return 29;if($===0)return 0},UT=($)=>`${m_}${GT}${$}${XT}`,_T=($)=>`${m_}${AG}${$}${ZG}`,iF=($)=>$.map((I)=>y4(I)),RG=($,I,U)=>{let _=I[Symbol.iterator](),u=!1,g=!1,z=$.at(-1),v=z===void 0?0:y4(z),J=_.next(),N=_.next(),X=0;for(;!J.done;){let G=J.value,q=y4(G);v+q<=U?$[$.length-1]+=G:($.push(G),v=0),(G===m_||G===NT)&&(u=!0,g=I.startsWith(AG,X+1)),u?g?G===ZG&&(u=!1,g=!1):G===XT&&(u=!1):(v+=q,v===U&&!N.done&&($.push(""),v=0)),J=N,N=_.next(),X+=G.length}z=$.at(-1),!v&&z!==void 0&&z.length>0&&$.length>1&&($[$.length-2]+=$.pop())},rF=($)=>{let I=$.split(" "),U=I.length;for(;U>0&&!(y4(I[U-1])>0);)U--;return U===I.length?$:I.slice(0,U).join(" ")+I.slice(U).join("")},nF=($,I,U={})=>{if(U.trim!==!1&&$.trim()==="")return"";let _="",u,g,z=$.split(" "),v=iF(z),J=[""];for(let[H,Q]of z.entries()){U.trim!==!1&&(J[J.length-1]=(J.at(-1)??"").trimStart());let Y=y4(J.at(-1)??"");if(H!==0&&(Y>=I&&(U.wordWrap===!1||U.trim===!1)&&(J.push(""),Y=0),(Y>0||U.trim===!1)&&(J[J.length-1]+=" ",Y++)),U.hard&&v[H]>I){let K=I-Y,R=1+Math.floor((v[H]-K-1)/I);Math.floor((v[H]-1)/I)<R&&J.push(""),RG(J,Q,I);continue}if(Y+v[H]>I&&Y>0&&v[H]>0){if(U.wordWrap===!1&&Y<I){RG(J,Q,I);continue}J.push("")}if(Y+v[H]>I&&U.wordWrap===!1){RG(J,Q,I);continue}J[J.length-1]+=Q}U.trim!==!1&&(J=J.map((H)=>rF(H)));let N=J.join(`
190
+ `),X=N[Symbol.iterator](),G=X.next(),q=X.next(),T=0;for(;!G.done;){let H=G.value,Q=q.value;if(_+=H,H===m_||H===NT){uT.lastIndex=T+1;let K=uT.exec(N)?.groups;if(K?.code!==void 0){let R=Number.parseFloat(K.code);u=R===xF?void 0:R}else K?.uri!==void 0&&(g=K.uri.length===0?void 0:K.uri)}let Y=u?yF(u):void 0;Q===`
191
+ `?(g&&(_+=_T("")),u&&Y&&(_+=UT(Y))):H===`
192
+ `&&(u&&Y&&(_+=UT(u)),g&&(_+=_T(g))),T+=H.length,G=q,q=X.next()}return _},lF=($,I,U,_,u)=>{let g=I,z=0;for(let v=U;v<_;v++){let J=$[v];if(g=g-J.length,z++,g<=u)break}return{lineCount:g,removals:z}},PG=({cursor:$,options:I,style:U,output:_=process.stdout,maxItems:u=Number.POSITIVE_INFINITY,columnPadding:g=0,rowPadding:z=4})=>{let v=E0(_)-g,J=YG(_),N=Z("dim","..."),X=Math.max(J-z,0),G=Math.max(Math.min(u,X),5),q=0;$>=G-3&&(q=Math.max(Math.min($-G+3,I.length-G),0));let T=G<I.length&&q>0,H=G<I.length&&q+G<I.length,Q=Math.min(q+G,I.length),Y=[],K=0;T&&K++,H&&K++;let R=q+(T?1:0),P=Q-(H?1:0);for(let D=R;D<P;D++){let L=x0(U(I[D],D===$),v,{hard:!0,trim:!1}).split(`
193
+ `);Y.push(L),K+=L.length}if(K>X){let D=0,L=0,B=K,M=$-R,F=(A,f)=>lF(Y,B,A,f,X);T?({lineCount:B,removals:D}=F(0,M),B>X&&({lineCount:B,removals:L}=F(M+1,Y.length))):({lineCount:B,removals:L}=F(M+1,Y.length),B>X&&({lineCount:B,removals:D}=F(0,M))),D>0&&(T=!0,Y.splice(0,D)),L>0&&(H=!0,Y.splice(Y.length-L,L))}let O=[];T&&O.push(N);for(let D of Y)for(let L of D)O.push(L);return H&&O.push(N),O},O$=($)=>{let I=$.active??"Yes",U=$.inactive??"No";return new OG({active:I,inactive:U,signal:$.signal,input:$.input,output:$.output,initialValue:$.initialValue??!0,render(){let _=$.withGuide??E$.withGuide,u=`${_?`${Z("gray",s)}
194
+ `:""}${l_(this.state)} ${$.message}
195
195
  `,g=this.value?I:U;switch(this.state){case"submit":{let z=_?`${Z("gray",s)} `:"";return`${u}${z}${Z("dim",g)}`}case"cancel":{let z=_?`${Z("gray",s)} `:"";return`${u}${z}${Z(["strikethrough","dim"],g)}${_?`
196
- ${Z("gray",s)}`:""}`}default:{let z=_?`${Z("cyan",s)} `:"",v=_?Z("cyan",W6):"";return`${u}${z}${this.value?`${Z("green",KG)} ${I}`:`${Z("dim",y_)} ${Z("dim",I)}`}${$.vertical?_?`
196
+ ${Z("gray",s)}`:""}`}default:{let z=_?`${Z("cyan",s)} `:"",v=_?Z("cyan",A6):"";return`${u}${z}${this.value?`${Z("green",WG)} ${I}`:`${Z("dim",r_)} ${Z("dim",I)}`}${$.vertical?_?`
197
197
  ${Z("cyan",s)} `:`
198
- `:` ${Z("dim","/")} `}${this.value?`${Z("dim",y_)} ${Z("dim",U)}`:`${Z("green",KG)} ${U}`}
198
+ `:` ${Z("dim","/")} `}${this.value?`${Z("dim",r_)} ${Z("dim",U)}`:`${Z("green",WG)} ${U}`}
199
199
  ${v}
200
- `}}}}).prompt()},o,U4=($="",I)=>{let U=I?.output??process.stdout,_=I?.withGuide??E$.withGuide?`${Z("gray",W6)} `:"";U.write(`${_}${Z("red",$)}
200
+ `}}}}).prompt()},o,g4=($="",I)=>{let U=I?.output??process.stdout,_=I?.withGuide??E$.withGuide?`${Z("gray",A6)} `:"";U.write(`${_}${Z("red",$)}
201
201
 
202
- `)},D$=($="",I)=>{let U=I?.output??process.stdout,_=I?.withGuide??E$.withGuide?`${Z("gray",BF)} `:"";U.write(`${_}${$}
202
+ `)},V$=($="",I)=>{let U=I?.output??process.stdout,_=I?.withGuide??E$.withGuide?`${Z("gray",MF)} `:"";U.write(`${_}${$}
203
203
  `)},d=($="",I)=>{let U=I?.output??process.stdout,_=I?.withGuide??E$.withGuide?`${Z("gray",s)}
204
- ${Z("gray",W6)} `:"";U.write(`${_}${$}
204
+ ${Z("gray",A6)} `:"";U.write(`${_}${$}
205
205
 
206
- `)},S0=($,I)=>$.split(`
206
+ `)},C0=($,I)=>$.split(`
207
207
  `).map((U)=>I(U)).join(`
208
- `),l_=($)=>{let I=(_,u)=>{let g=_.label??String(_.value);return u==="disabled"?`${Z("gray",e7)} ${S0(g,(z)=>Z(["strikethrough","gray"],z))}${_.hint?` ${Z("dim",`(${_.hint??"disabled"})`)}`:""}`:u==="active"?`${Z("cyan",MF)} ${g}${_.hint?` ${Z("dim",`(${_.hint})`)}`:""}`:u==="selected"?`${Z("green",a7)} ${S0(g,(z)=>Z("dim",z))}${_.hint?` ${Z("dim",`(${_.hint})`)}`:""}`:u==="cancelled"?`${S0(g,(z)=>Z(["strikethrough","dim"],z))}`:u==="active-selected"?`${Z("green",a7)} ${g}${_.hint?` ${Z("dim",`(${_.hint})`)}`:""}`:u==="submitted"?`${S0(g,(z)=>Z("dim",z))}`:`${Z("dim",e7)} ${S0(g,(z)=>Z("dim",z))}`},U=$.required??!0;return new t7({options:$.options,signal:$.signal,input:$.input,output:$.output,initialValues:$.initialValues,required:U,cursorAt:$.cursorAt,validate(_){if(U&&(_===void 0||_.length===0))return`Please select at least one option.
209
- ${Z("reset",Z("dim",`Press ${Z(["gray","bgWhite","inverse"]," space ")} to select, ${Z("gray",Z("bgWhite",Z("inverse"," enter ")))} to submit`))}`},render(){let _=u1($.output,$.message,`${gT(this.state)} `,`${n_(this.state)} `),u=`${Z("gray",s)}
208
+ `),h_=($)=>{let I=(_,u)=>{let g=_.label??String(_.value);return u==="disabled"?`${Z("gray",$T)} ${C0(g,(z)=>Z(["strikethrough","gray"],z))}${_.hint?` ${Z("dim",`(${_.hint??"disabled"})`)}`:""}`:u==="active"?`${Z("cyan",KF)} ${g}${_.hint?` ${Z("dim",`(${_.hint})`)}`:""}`:u==="selected"?`${Z("green",s7)} ${C0(g,(z)=>Z("dim",z))}${_.hint?` ${Z("dim",`(${_.hint})`)}`:""}`:u==="cancelled"?`${C0(g,(z)=>Z(["strikethrough","dim"],z))}`:u==="active-selected"?`${Z("green",s7)} ${g}${_.hint?` ${Z("dim",`(${_.hint})`)}`:""}`:u==="submitted"?`${C0(g,(z)=>Z("dim",z))}`:`${Z("dim",$T)} ${C0(g,(z)=>Z("dim",z))}`},U=$.required??!0;return new e7({options:$.options,signal:$.signal,input:$.input,output:$.output,initialValues:$.initialValues,required:U,cursorAt:$.cursorAt,validate(_){if(U&&(_===void 0||_.length===0))return`Please select at least one option.
209
+ ${Z("reset",Z("dim",`Press ${Z(["gray","bgWhite","inverse"]," space ")} to select, ${Z("gray",Z("bgWhite",Z("inverse"," enter ")))} to submit`))}`},render(){let _=_1($.output,$.message,`${vT(this.state)} `,`${l_(this.state)} `),u=`${Z("gray",s)}
210
210
  ${_}
211
- `,g=this.value??[],z=(v,J)=>{if(v.disabled)return I(v,"disabled");let N=g.includes(v.value);return J&&N?I(v,"active-selected"):N?I(v,"selected"):I(v,J?"active":"inactive")};switch(this.state){case"submit":{let v=this.options.filter(({value:N})=>g.includes(N)).map((N)=>I(N,"submitted")).join(Z("dim",", "))||Z("dim","none"),J=u1($.output,v,`${Z("gray",s)} `);return`${u}${J}`}case"cancel":{let v=this.options.filter(({value:N})=>g.includes(N)).map((N)=>I(N,"cancelled")).join(Z("dim",", "));if(v.trim()==="")return`${u}${Z("gray",s)}`;let J=u1($.output,v,`${Z("gray",s)} `);return`${u}${J}
211
+ `,g=this.value??[],z=(v,J)=>{if(v.disabled)return I(v,"disabled");let N=g.includes(v.value);return J&&N?I(v,"active-selected"):N?I(v,"selected"):I(v,J?"active":"inactive")};switch(this.state){case"submit":{let v=this.options.filter(({value:N})=>g.includes(N)).map((N)=>I(N,"submitted")).join(Z("dim",", "))||Z("dim","none"),J=_1($.output,v,`${Z("gray",s)} `);return`${u}${J}`}case"cancel":{let v=this.options.filter(({value:N})=>g.includes(N)).map((N)=>I(N,"cancelled")).join(Z("dim",", "));if(v.trim()==="")return`${u}${Z("gray",s)}`;let J=_1($.output,v,`${Z("gray",s)} `);return`${u}${J}
212
212
  ${Z("gray",s)}`}case"error":{let v=`${Z("yellow",s)} `,J=this.error.split(`
213
- `).map((G,q)=>q===0?`${Z("yellow",W6)} ${Z("yellow",G)}`:` ${G}`).join(`
213
+ `).map((G,q)=>q===0?`${Z("yellow",A6)} ${Z("yellow",G)}`:` ${G}`).join(`
214
214
  `),N=u.split(`
215
215
  `).length,X=J.split(`
216
- `).length+1;return`${u}${v}${LG({output:$.output,options:this.options,cursor:this.cursor,maxItems:$.maxItems,columnPadding:v.length,rowPadding:N+X,style:z}).join(`
216
+ `).length+1;return`${u}${v}${PG({output:$.output,options:this.options,cursor:this.cursor,maxItems:$.maxItems,columnPadding:v.length,rowPadding:N+X,style:z}).join(`
217
217
  ${v}`)}
218
218
  ${J}
219
219
  `}default:{let v=`${Z("cyan",s)} `,J=u.split(`
220
- `).length;return`${u}${v}${LG({output:$.output,options:this.options,cursor:this.cursor,maxItems:$.maxItems,columnPadding:v.length,rowPadding:J+2,style:z}).join(`
220
+ `).length;return`${u}${v}${PG({output:$.output,options:this.options,cursor:this.cursor,maxItems:$.maxItems,columnPadding:v.length,rowPadding:J+2,style:z}).join(`
221
221
  ${v}`)}
222
- ${Z("cyan",W6)}
223
- `}}}}).prompt()},lF=($)=>Z("dim",$),mF=($,I,U)=>{let _={hard:!0,trim:!1},u=E0($,I,_).split(`
224
- `),g=u.reduce((J,N)=>Math.max(x4(N),J),0),z=u.map(U).reduce((J,N)=>Math.max(x4(N),J),0),v=I-(z-g);return E0($,v,_)},k=($="",I="",U)=>{let _=U?.output??T4.stdout,u=U?.withGuide??E$.withGuide,g=U?.format??lF,z=["",...mF($,F0(_)-6,g).split(`
225
- `).map(g),""],v=x4(I),J=Math.max(z.reduce((q,T)=>{let H=x4(T);return H>q?H:q},0),v)+2,N=z.map((q)=>`${Z("gray",s)} ${q}${" ".repeat(J-x4(q))}${Z("gray",s)}`).join(`
222
+ ${Z("cyan",A6)}
223
+ `}}}}).prompt()},mF=($)=>Z("dim",$),hF=($,I,U)=>{let _={hard:!0,trim:!1},u=x0($,I,_).split(`
224
+ `),g=u.reduce((J,N)=>Math.max(y4(N),J),0),z=u.map(U).reduce((J,N)=>Math.max(y4(N),J),0),v=I-(z-g);return x0($,v,_)},k=($="",I="",U)=>{let _=U?.output??Y4.stdout,u=U?.withGuide??E$.withGuide,g=U?.format??mF,z=["",...hF($,E0(_)-6,g).split(`
225
+ `).map(g),""],v=y4(I),J=Math.max(z.reduce((q,T)=>{let H=y4(T);return H>q?H:q},0),v)+2,N=z.map((q)=>`${Z("gray",s)} ${q}${" ".repeat(J-y4(q))}${Z("gray",s)}`).join(`
226
226
  `),X=u?`${Z("gray",s)}
227
- `:"",G=u?KF:PF;_.write(`${X}${Z("green",i_)} ${Z("reset",I)} ${Z("gray",s7.repeat(Math.max(J-v-1,1))+RF)}
227
+ `:"",G=u?LF:PF;_.write(`${X}${Z("green",n_)} ${Z("reset",I)} ${Z("gray",IT.repeat(Math.max(J-v-1,1))+RF)}
228
228
  ${N}
229
- ${Z("gray",G+s7.repeat(J+2)+LF)}
230
- `)},hF=($)=>Z("magenta",$),e$=({indicator:$="dots",onCancel:I,output:U=process.stdout,cancelMessage:_,errorMessage:u,frames:g=RG?["◒","◐","◓","◑"]:["•","o","O","0"],delay:z=RG?80:120,signal:v,...J}={})=>{let N=DF(),X,G,q=!1,T=!1,H="",Q,Y=performance.now(),R=F0(U),K=J?.styleFrame??hF,W=(t)=>{let Y$=t>1?u??E$.messages.error:_??E$.messages.cancel;T=t===1,q&&(u$(Y$,t),T&&typeof I=="function"&&I())},O=()=>W(2),V=()=>W(1),L=()=>{process.on("uncaughtExceptionMonitor",O),process.on("unhandledRejection",O),process.on("SIGINT",V),process.on("SIGTERM",V),process.on("exit",W),v&&v.addEventListener("abort",V)},B=()=>{process.removeListener("uncaughtExceptionMonitor",O),process.removeListener("unhandledRejection",O),process.removeListener("SIGINT",V),process.removeListener("SIGTERM",V),process.removeListener("exit",W),v&&v.removeEventListener("abort",V)},M=()=>{if(Q===void 0)return;N&&U.write(`
231
- `);let t=E0(Q,R,{hard:!0,trim:!1}).split(`
232
- `);t.length>1&&U.write(w0.cursor.up(t.length-1)),U.write(w0.cursor.to(0)),U.write(w0.erase.down())},F=(t)=>t.replace(/\.+$/,""),A=(t)=>{let Y$=(performance.now()-t)/1000,c$=Math.floor(Y$/60),d$=Math.floor(Y$%60);return c$>0?`[${c$}m ${d$}s]`:`[${d$}s]`},f=J.withGuide??E$.withGuide,b=(t="")=>{q=!0,X=d7({output:U}),H=F(t),Y=performance.now(),f&&U.write(`${Z("gray",s)}
233
- `);let Y$=0,c$=0;L(),G=setInterval(()=>{if(N&&H===Q)return;M(),Q=H;let d$=K(g[Y$]),b4;if(N)b4=`${d$} ${H}...`;else if($==="timer")b4=`${d$} ${H} ${A(Y)}`;else{let z6=".".repeat(Math.floor(c$)).slice(0,3);b4=`${d$} ${H}${z6}`}let E2=E0(b4,R,{hard:!0,trim:!1});U.write(E2),Y$=Y$+1<g.length?Y$+1:0,c$=c$<4?c$+0.125:0},z)},u$=(t="",Y$=0,c$=!1)=>{if(!q)return;q=!1,clearInterval(G),M();let d$=Y$===0?Z("green",i_):Y$===1?Z("red",UT):Z("red",_T);H=t??H,c$||($==="timer"?U.write(`${d$} ${H} ${A(Y)}
234
- `):U.write(`${d$} ${H}
235
- `)),B(),X()};return{start:b,stop:(t="")=>u$(t,0),message:(t="")=>{H=F(t??H)},cancel:(t="")=>u$(t,1),error:(t="")=>u$(t,2),clear:()=>u$("",0,!0),get isCancelled(){return T}}},tn,k_=($,I)=>$.includes(`
229
+ ${Z("gray",G+IT.repeat(J+2)+WF)}
230
+ `)},cF=($)=>Z("magenta",$),$4=({indicator:$="dots",onCancel:I,output:U=process.stdout,cancelMessage:_,errorMessage:u,frames:g=LG?["◒","◐","◓","◑"]:["•","o","O","0"],delay:z=LG?80:120,signal:v,...J}={})=>{let N=DF(),X,G,q=!1,T=!1,H="",Q,Y=performance.now(),K=E0(U),R=J?.styleFrame??cF,P=(t)=>{let Y$=t>1?u??E$.messages.error:_??E$.messages.cancel;T=t===1,q&&(u$(Y$,t),T&&typeof I=="function"&&I())},O=()=>P(2),D=()=>P(1),L=()=>{process.on("uncaughtExceptionMonitor",O),process.on("unhandledRejection",O),process.on("SIGINT",D),process.on("SIGTERM",D),process.on("exit",P),v&&v.addEventListener("abort",D)},B=()=>{process.removeListener("uncaughtExceptionMonitor",O),process.removeListener("unhandledRejection",O),process.removeListener("SIGINT",D),process.removeListener("SIGTERM",D),process.removeListener("exit",P),v&&v.removeEventListener("abort",D)},M=()=>{if(Q===void 0)return;N&&U.write(`
231
+ `);let t=x0(Q,K,{hard:!0,trim:!1}).split(`
232
+ `);t.length>1&&U.write(f0.cursor.up(t.length-1)),U.write(f0.cursor.to(0)),U.write(f0.erase.down())},F=(t)=>t.replace(/\.+$/,""),A=(t)=>{let Y$=(performance.now()-t)/1000,p$=Math.floor(Y$/60),o$=Math.floor(Y$%60);return p$>0?`[${p$}m ${o$}s]`:`[${o$}s]`},f=J.withGuide??E$.withGuide,b=(t="")=>{q=!0,X=o7({output:U}),H=F(t),Y=performance.now(),f&&U.write(`${Z("gray",s)}
233
+ `);let Y$=0,p$=0;L(),G=setInterval(()=>{if(N&&H===Q)return;M(),Q=H;let o$=R(g[Y$]),F4;if(N)F4=`${o$} ${H}...`;else if($==="timer")F4=`${o$} ${H} ${A(Y)}`;else{let J6=".".repeat(Math.floor(p$)).slice(0,3);F4=`${o$} ${H}${J6}`}let f2=x0(F4,K,{hard:!0,trim:!1});U.write(f2),Y$=Y$+1<g.length?Y$+1:0,p$=p$<4?p$+0.125:0},z)},u$=(t="",Y$=0,p$=!1)=>{if(!q)return;q=!1,clearInterval(G),M();let o$=Y$===0?Z("green",n_):Y$===1?Z("red",gT):Z("red",zT);H=t??H,p$||($==="timer"?U.write(`${o$} ${H} ${A(Y)}
234
+ `):U.write(`${o$} ${H}
235
+ `)),B(),X()};return{start:b,stop:(t="")=>u$(t,0),message:(t="")=>{H=F(t??H)},cancel:(t="")=>u$(t,1),error:(t="")=>u$(t,2),clear:()=>u$("",0,!0),get isCancelled(){return T}}},or,i_=($,I)=>$.includes(`
236
236
  `)?$.split(`
237
237
  `).map((U)=>I(U)).join(`
238
- `):I($),_1=($)=>{let I=(U,_)=>{let u=U.label??String(U.value);switch(_){case"disabled":return`${Z("gray",y_)} ${k_(u,(g)=>Z("gray",g))}${U.hint?` ${Z("dim",`(${U.hint??"disabled"})`)}`:""}`;case"selected":return`${k_(u,(g)=>Z("dim",g))}`;case"active":return`${Z("green",KG)} ${u}${U.hint?` ${Z("dim",`(${U.hint})`)}`:""}`;case"cancelled":return`${k_(u,(g)=>Z(["strikethrough","dim"],g))}`;default:return`${Z("dim",y_)} ${k_(u,(g)=>Z("dim",g))}`}};return new YG({options:$.options,signal:$.signal,input:$.input,output:$.output,initialValue:$.initialValue,render(){let U=$.withGuide??E$.withGuide,_=`${n_(this.state)} `,u=`${gT(this.state)} `,g=u1($.output,$.message,u,_),z=`${U?`${Z("gray",s)}
238
+ `):I($),z1=($)=>{let I=(U,_)=>{let u=U.label??String(U.value);switch(_){case"disabled":return`${Z("gray",r_)} ${i_(u,(g)=>Z("gray",g))}${U.hint?` ${Z("dim",`(${U.hint??"disabled"})`)}`:""}`;case"selected":return`${i_(u,(g)=>Z("dim",g))}`;case"active":return`${Z("green",WG)} ${u}${U.hint?` ${Z("dim",`(${U.hint})`)}`:""}`;case"cancelled":return`${i_(u,(g)=>Z(["strikethrough","dim"],g))}`;default:return`${Z("dim",r_)} ${i_(u,(g)=>Z("dim",g))}`}};return new VG({options:$.options,signal:$.signal,input:$.input,output:$.output,initialValue:$.initialValue,render(){let U=$.withGuide??E$.withGuide,_=`${l_(this.state)} `,u=`${vT(this.state)} `,g=_1($.output,$.message,u,_),z=`${U?`${Z("gray",s)}
239
239
  `:""}${g}
240
- `;switch(this.state){case"submit":{let v=U?`${Z("gray",s)} `:"",J=u1($.output,I(this.options[this.cursor],"selected"),v);return`${z}${J}`}case"cancel":{let v=U?`${Z("gray",s)} `:"",J=u1($.output,I(this.options[this.cursor],"cancelled"),v);return`${z}${J}${U?`
241
- ${Z("gray",s)}`:""}`}default:{let v=U?`${Z("cyan",s)} `:"",J=U?Z("cyan",W6):"",N=z.split(`
242
- `).length,X=U?2:1;return`${z}${v}${LG({output:$.output,cursor:this.cursor,options:this.options,maxItems:$.maxItems,columnPadding:v.length,rowPadding:N+X,style:(G,q)=>I(G,G.disabled?"disabled":q?"active":"inactive")}).join(`
240
+ `;switch(this.state){case"submit":{let v=U?`${Z("gray",s)} `:"",J=_1($.output,I(this.options[this.cursor],"selected"),v);return`${z}${J}`}case"cancel":{let v=U?`${Z("gray",s)} `:"",J=_1($.output,I(this.options[this.cursor],"cancelled"),v);return`${z}${J}${U?`
241
+ ${Z("gray",s)}`:""}`}default:{let v=U?`${Z("cyan",s)} `:"",J=U?Z("cyan",A6):"",N=z.split(`
242
+ `).length,X=U?2:1;return`${z}${v}${PG({output:$.output,cursor:this.cursor,options:this.options,maxItems:$.maxItems,columnPadding:v.length,rowPadding:N+X,style:(G,q)=>I(G,G.disabled?"disabled":q?"active":"inactive")}).join(`
243
243
  ${v}`)}
244
244
  ${J}
245
- `}}}}).prompt()},an,m_=($)=>new OG({validate:$.validate,placeholder:$.placeholder,defaultValue:$.defaultValue,initialValue:$.initialValue,output:$.output,signal:$.signal,input:$.input,render(){let I=$?.withGuide??E$.withGuide,U=`${`${I?`${Z("gray",s)}
246
- `:""}${n_(this.state)} `}${$.message}
247
- `,_=$.placeholder?Z("inverse",$.placeholder[0])+Z("dim",$.placeholder.slice(1)):Z(["inverse","hidden"],"_"),u=this.userInput?this.userInputWithCursor:_,g=this.value??"";switch(this.state){case"error":{let z=this.error?` ${Z("yellow",this.error)}`:"",v=I?`${Z("yellow",s)} `:"",J=I?Z("yellow",W6):"";return`${U.trim()}
245
+ `}}}}).prompt()},tr,c_=($)=>new DG({validate:$.validate,placeholder:$.placeholder,defaultValue:$.defaultValue,initialValue:$.initialValue,output:$.output,signal:$.signal,input:$.input,render(){let I=$?.withGuide??E$.withGuide,U=`${`${I?`${Z("gray",s)}
246
+ `:""}${l_(this.state)} `}${$.message}
247
+ `,_=$.placeholder?Z("inverse",$.placeholder[0])+Z("dim",$.placeholder.slice(1)):Z(["inverse","hidden"],"_"),u=this.userInput?this.userInputWithCursor:_,g=this.value??"";switch(this.state){case"error":{let z=this.error?` ${Z("yellow",this.error)}`:"",v=I?`${Z("yellow",s)} `:"",J=I?Z("yellow",A6):"";return`${U.trim()}
248
248
  ${v}${u}
249
249
  ${J}${z}
250
250
  `}case"submit":{let z=g?` ${Z("dim",g)}`:"",v=I?Z("gray",s):"";return`${U}${v}${z}`}case"cancel":{let z=g?` ${Z(["strikethrough","dim"],g)}`:"",v=I?Z("gray",s):"";return`${U}${v}${z}${g.trim()?`
251
- ${v}`:""}`}default:{let z=I?`${Z("cyan",s)} `:"",v=I?Z("cyan",W6):"";return`${U}${z}${u}
251
+ ${v}`:""}`}default:{let z=I?`${Z("cyan",s)} `:"",v=I?Z("cyan",A6):"";return`${U}${z}${u}
252
252
  ${v}
253
- `}}}}).prompt();var s$=$4(()=>{DG();DG();w0=q$(UG(),1);RG=OF(),VF=N$("◆","*"),UT=N$("■","x"),_T=N$("▲","x"),i_=N$("◇","o"),BF=N$("┌","T"),s=N$("│","|"),W6=N$("└","—"),cn=N$("┐","T"),dn=N$("┘","—"),KG=N$("●",">"),y_=N$("○"," "),MF=N$("◻","[•]"),a7=N$("◼","[+]"),e7=N$("◻","[ ]"),pn=N$("▪","•"),s7=N$("─","-"),RF=N$("╮","+"),KF=N$("├","+"),LF=N$("╯","+"),PF=N$("╰","+"),on=N$("╭","+"),WF=N$("●","•"),ZF=N$("◆","*"),AF=N$("▲","!"),bF=N$("■","x"),VG=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,C_=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,f_=/\t{1,1000}/y,BG=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,x_=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,wF=/\p{M}+/gu,EF={limit:1/0,ellipsis:""},CF={limit:1/0,ellipsis:"",ellipsisWidth:0},WG=`${xF}8;;`,$T=new RegExp(`(?:\\${JT}(?<code>\\d+)m|\\${WG}(?<uri>.*)${PG})`,"y");o={message:($=[],{symbol:I=Z("gray",s),secondarySymbol:U=Z("gray",s),output:_=process.stdout,spacing:u=1,withGuide:g}={})=>{let z=[],v=g??E$.withGuide,J=v?U:"",N=v?`${I} `:"",X=v?`${U} `:"";for(let q=0;q<u;q++)z.push(J);let G=Array.isArray($)?$:$.split(`
253
+ `}}}}).prompt();var I4=u4(()=>{BG();BG();f0=q$(gG(),1);LG=VF(),BF=N$("◆","*"),gT=N$("■","x"),zT=N$("▲","x"),n_=N$("◇","o"),MF=N$("┌","T"),s=N$("│","|"),A6=N$("└","—"),hr=N$("┐","T"),cr=N$("┘","—"),WG=N$("●",">"),r_=N$("○"," "),KF=N$("◻","[•]"),s7=N$("◼","[+]"),$T=N$("◻","[ ]"),dr=N$("▪","•"),IT=N$("─","-"),RF=N$("╮","+"),LF=N$("├","+"),WF=N$("╯","+"),PF=N$("╰","+"),pr=N$("╭","+"),ZF=N$("●","•"),AF=N$("◆","*"),bF=N$("▲","!"),jF=N$("■","x"),MG=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,x_=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,k_=/\t{1,1000}/y,KG=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,y_=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,EF=/\p{M}+/gu,CF={limit:1/0,ellipsis:""},fF={limit:1/0,ellipsis:"",ellipsisWidth:0},AG=`${kF}8;;`,uT=new RegExp(`(?:\\${GT}(?<code>\\d+)m|\\${AG}(?<uri>.*)${ZG})`,"y");o={message:($=[],{symbol:I=Z("gray",s),secondarySymbol:U=Z("gray",s),output:_=process.stdout,spacing:u=1,withGuide:g}={})=>{let z=[],v=g??E$.withGuide,J=v?U:"",N=v?`${I} `:"",X=v?`${U} `:"";for(let q=0;q<u;q++)z.push(J);let G=Array.isArray($)?$:$.split(`
254
254
  `);if(G.length>0){let[q,...T]=G;q.length>0?z.push(`${N}${q}`):z.push(v?I:"");for(let H of T)H.length>0?z.push(`${X}${H}`):z.push(v?U:"")}_.write(`${z.join(`
255
255
  `)}
256
- `)},info:($,I)=>{o.message($,{...I,symbol:Z("blue",WF)})},success:($,I)=>{o.message($,{...I,symbol:Z("green",ZF)})},step:($,I)=>{o.message($,{...I,symbol:Z("green",i_)})},warn:($,I)=>{o.message($,{...I,symbol:Z("yellow",AF)})},warning:($,I)=>{o.warn($,I)},error:($,I)=>{o.message($,{...I,symbol:Z("red",bF)})}},tn={light:N$("─","-"),heavy:N$("━","="),block:N$("█","#")},an=`${Z("gray",s)} `});function AG($){let I=$.trimStart();if(!I.startsWith("---"))return{frontmatter:{},body:$};let U=I.indexOf(`
257
- ---`,3);if(U===-1)return{frontmatter:{},body:$};let _=I.slice(3,U).trim(),u=I.slice(U+4);try{let g=m6(_);return{frontmatter:g&&typeof g==="object"?g:{},body:u}}catch{return{frontmatter:{},body:u}}}function bG($,I){let U=["---"];for(let[_,u]of Object.entries($)){if(u===void 0||u===null)continue;if(Array.isArray(u)){U.push(`${_}:`);for(let g of u)U.push(` - ${g}`)}else{let g=String(u),z=/[:#[\]{}|>&*!,'"%@`]/.test(g)||g.includes(`
256
+ `)},info:($,I)=>{o.message($,{...I,symbol:Z("blue",ZF)})},success:($,I)=>{o.message($,{...I,symbol:Z("green",AF)})},step:($,I)=>{o.message($,{...I,symbol:Z("green",n_)})},warn:($,I)=>{o.message($,{...I,symbol:Z("yellow",bF)})},warning:($,I)=>{o.warn($,I)},error:($,I)=>{o.message($,{...I,symbol:Z("red",jF)})}},or={light:N$("─","-"),heavy:N$("━","="),block:N$("█","#")},tr=`${Z("gray",s)} `});function jG($){let I=$.trimStart();if(!I.startsWith("---"))return{frontmatter:{},body:$};let U=I.indexOf(`
257
+ ---`,3);if(U===-1)return{frontmatter:{},body:$};let _=I.slice(3,U).trim(),u=I.slice(U+4);try{let g=c6(_);return{frontmatter:g&&typeof g==="object"?g:{},body:u}}catch{return{frontmatter:{},body:u}}}function FG($,I){let U=["---"];for(let[_,u]of Object.entries($)){if(u===void 0||u===null)continue;if(Array.isArray(u)){U.push(`${_}:`);for(let g of u)U.push(` - ${g}`)}else{let g=String(u),z=/[:#[\]{}|>&*!,'"%@`]/.test(g)||g.includes(`
258
258
  `);U.push(`${_}: ${z?JSON.stringify(g):g}`)}}return U.push("---"),U.push(""),U.join(`
259
- `)+I}var HT=$4(()=>{Uz()});import{cpSync as t4,existsSync as K$,lstatSync as OT,mkdirSync as g4,readdirSync as h_,readFileSync as JI,readlinkSync as sF,rmSync as $S,symlinkSync as IS,unlinkSync as DT,writeFileSync as k4}from"node:fs";import{dirname as FG,join as m,relative as uS,resolve as jG}from"node:path";function c_($){try{if(!OT($).isDirectory())DT($)}catch{}}function d_($,I,U,_){let u=m($,".agents","skills",I);if(!K$(u))return!1;let g=m(U,R4,I);c_(g),g4(g,{recursive:!0}),t4(u,g,{recursive:!0,force:!0});let z=m(u,"variants"),v=m(g,"stack");if(_&&K$(m(z,_)))g4(v,{recursive:!0}),t4(m(z,_),v,{recursive:!0,force:!0}),k4(m(v,"stack.yaml"),`language: ${_}
259
+ `)+I}var OT=u4(()=>{gz()});import{cpSync as e4,existsSync as R$,lstatSync as DT,mkdirSync as v4,readdirSync as d_,readFileSync as GI,readlinkSync as $S,rmSync as IS,symlinkSync as uS,unlinkSync as BT,writeFileSync as i4}from"node:fs";import{dirname as wG,join as m,relative as US,resolve as SG}from"node:path";function p_($){try{if(!DT($).isDirectory())BT($)}catch{}}function o_($,I,U,_){let u=m($,".agents","skills",I);if(!R$(u))return!1;let g=m(U,L4,I);p_(g),v4(g,{recursive:!0}),e4(u,g,{recursive:!0,force:!0});let z=m(u,"variants"),v=m(g,"stack");if(_&&R$(m(z,_)))v4(v,{recursive:!0}),e4(m(z,_),v,{recursive:!0,force:!0}),i4(m(v,"stack.yaml"),`language: ${_}
260
260
  source: preset
261
- `);let J=m(g,"variants");if(K$(J))$S(J,{recursive:!0,force:!0});return!0}function p_($,I){let U=m($,".agents","skills","_shared");if(!K$(U))return;let _=m(I,R4,"_shared");c_(_),g4(_,{recursive:!0}),t4(U,_,{recursive:!0,force:!0})}function BT($,I){let U=m($,".agents","workflows");if(!K$(U))return;let _=m(I,".agents","workflows");c_(_),g4(_,{recursive:!0}),t4(U,_,{recursive:!0,force:!0})}function MT($,I,U=!1){let _=m($,".agents","config");if(K$(_)){let g=m(I,".agents","config");if(g4(g,{recursive:!0}),U)t4(_,g,{recursive:!0,force:!0});else for(let z of h_(_,{withFileTypes:!0})){let v=m(g,z.name);if(!K$(v))t4(m(_,z.name),v,z.isDirectory()?{recursive:!0}:{})}}let u=m($,".agents","mcp.json");if(K$(u)){let g=m(I,".agents");g4(g,{recursive:!0});let z=m(g,"mcp.json");if(U||!K$(z))t4(u,z)}}function RT($){let I=process.env.HOME||process.env.USERPROFILE||"",U=m(I,".gemini","antigravity","global_workflows"),_=m($,".agents","workflows");if(!K$(_))return;g4(U,{recursive:!0}),t4(_,U,{recursive:!0,force:!0})}function _S($,I){if(!K$($))return;let U=m(I,".claude","agents");g4(U,{recursive:!0});for(let _ of h_($,{withFileTypes:!0})){if(!_.isFile()||!_.name.endsWith(".md"))continue;let u=_.name,g=JI(m($,u),"utf-8"),{frontmatter:z,body:v}=AG(g),J=z.name||u.replace(".md",""),N=US[J]||{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},X={name:J,description:z.description,tools:N.tools,model:N.model,maxTurns:N.maxTurns};if(z.skills)X.skills=z.skills;let G=v.replace("Follow the vendor-specific execution protocol:","Follow `.agents/skills/_shared/runtime/execution-protocols/claude.md`:"),q=`<!-- Generated by oh-my-agent CLI. Source: .agents/agents/${u} -->
262
- ${G}`;k4(m(U,u),bG(X,q))}}function gS($,I){if(!K$($))return;for(let U of h_($,{withFileTypes:!0})){if(!U.isFile()||!U.name.endsWith(".md")||U.name.startsWith("_"))continue;let _=U.name,u=JI(m($,_),"utf-8"),{frontmatter:g}=AG(u),z=_.replace(".md",""),v=g.description||z,J=m(I,".claude","skills",z);c_(J);let N=bG({name:z,description:v,"disable-model-invocation":!0},`# /${z}
261
+ `);let J=m(g,"variants");if(R$(J))IS(J,{recursive:!0,force:!0});return!0}function t_($,I){let U=m($,".agents","skills","_shared");if(!R$(U))return;let _=m(I,L4,"_shared");p_(_),v4(_,{recursive:!0}),e4(U,_,{recursive:!0,force:!0})}function KT($,I){let U=m($,".agents","workflows");if(!R$(U))return;let _=m(I,".agents","workflows");p_(_),v4(_,{recursive:!0}),e4(U,_,{recursive:!0,force:!0})}function RT($,I,U=!1){let _=m($,".agents","config");if(R$(_)){let g=m(I,".agents","config");if(v4(g,{recursive:!0}),U)e4(_,g,{recursive:!0,force:!0});else for(let z of d_(_,{withFileTypes:!0})){let v=m(g,z.name);if(!R$(v))e4(m(_,z.name),v,z.isDirectory()?{recursive:!0}:{})}}let u=m($,".agents","mcp.json");if(R$(u)){let g=m(I,".agents");v4(g,{recursive:!0});let z=m(g,"mcp.json");if(U||!R$(z))e4(u,z)}}function LT($){let I=process.env.HOME||process.env.USERPROFILE||"",U=m(I,".gemini","antigravity","global_workflows"),_=m($,".agents","workflows");if(!R$(_))return;v4(U,{recursive:!0}),e4(_,U,{recursive:!0,force:!0})}function gS($,I){if(!R$($))return;let U=m(I,".claude","agents");v4(U,{recursive:!0});for(let _ of d_($,{withFileTypes:!0})){if(!_.isFile()||!_.name.endsWith(".md"))continue;let u=_.name,g=GI(m($,u),"utf-8"),{frontmatter:z,body:v}=jG(g),J=z.name||u.replace(".md",""),N=_S[J]||{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},X={name:J,description:z.description,tools:N.tools,model:N.model,maxTurns:N.maxTurns};if(N.effort)X.effort=N.effort;if(z.skills)X.skills=z.skills;let G=v.replace("Follow the vendor-specific execution protocol:","Follow `.agents/skills/_shared/runtime/execution-protocols/claude.md`:"),q=`<!-- Generated by oh-my-agent CLI. Source: .agents/agents/${u} -->
262
+ ${G}`;i4(m(U,u),FG(X,q))}}function zS($,I){if(!R$($))return;for(let U of d_($,{withFileTypes:!0})){if(!U.isFile()||!U.name.endsWith(".md")||U.name.startsWith("_"))continue;let _=U.name,u=GI(m($,_),"utf-8"),{frontmatter:g}=jG(u),z=_.replace(".md",""),v=g.description||z,J=m(I,".claude","skills",z);p_(J);let N=FG({name:z,description:v,"disable-model-invocation":!0},`# /${z}
263
263
 
264
264
  Read and follow \`.agents/workflows/${_}\` step by step.
265
- `);g4(J,{recursive:!0}),k4(m(J,"SKILL.md"),N)}}function o_($,I){let U=m($,".claude","hooks");if(!K$(U))return;g4(I,{recursive:!0}),t4(U,I,{recursive:!0,force:!0})}function t_($,I,U){let _={};if(K$($))try{_=JSON.parse(JI($,"utf-8"))}catch{}if(_.hooks={..._.hooks||{},...I},U)Object.assign(_,U);k4($,`${JSON.stringify(_,null,2)}
266
- `)}function g1($,I,U){return`bun "$${$}/${I}/hooks/${U}"`}function zS($,I){o_($,m(I,".claude","hooks")),t_(m(I,".claude","settings.json"),{UserPromptSubmit:[{hooks:[{type:"command",command:g1("CLAUDE_PROJECT_DIR",".claude","keyword-detector.ts"),timeout:5}]}],Stop:[{hooks:[{type:"command",command:g1("CLAUDE_PROJECT_DIR",".claude","persistent-mode.ts"),timeout:5}]}]},{statusLine:{type:"command",command:g1("CLAUDE_PROJECT_DIR",".claude","hud.ts")}})}function vS($,I){let U=m(I,".codex","hooks");o_($,U),t_(m(I,".codex","hooks.json"),{UserPromptSubmit:[{hooks:[{type:"command",command:"bun .codex/hooks/keyword-detector.ts",timeout:5}]}],Stop:[{hooks:[{type:"command",command:"bun .codex/hooks/persistent-mode.ts",timeout:5}]}]}),JS(m(I,".codex","config.toml"))}function JS($){g4(FG($),{recursive:!0});let I="";if(K$($))I=JI($,"utf-8");if(/codex_hooks\s*=\s*true/i.test(I))return;if(/codex_hooks\s*=\s*false/i.test(I)){I=I.replace(/codex_hooks\s*=\s*false/i,"codex_hooks = true"),k4($,I);return}if(/\[features\]/i.test(I)){I=I.replace(/(\[features\][^[]*)/i,`$1codex_hooks = true
267
- `),k4($,I);return}let U=`
265
+ `);v4(J,{recursive:!0}),i4(m(J,"SKILL.md"),N)}}function a_($,I){let U=m($,".claude","hooks");if(!R$(U))return;v4(I,{recursive:!0}),e4(U,I,{recursive:!0,force:!0})}function e_($,I,U){let _={};if(R$($))try{_=JSON.parse(GI($,"utf-8"))}catch{}if(_.hooks={..._.hooks||{},...I},U)Object.assign(_,U);i4($,`${JSON.stringify(_,null,2)}
266
+ `)}function v1($,I,U){return`bun "$${$}/${I}/hooks/${U}"`}function vS($,I){a_($,m(I,".claude","hooks")),e_(m(I,".claude","settings.json"),{UserPromptSubmit:[{hooks:[{type:"command",command:v1("CLAUDE_PROJECT_DIR",".claude","keyword-detector.ts"),timeout:5}]}],Stop:[{hooks:[{type:"command",command:v1("CLAUDE_PROJECT_DIR",".claude","persistent-mode.ts"),timeout:5}]}]},{statusLine:{type:"command",command:v1("CLAUDE_PROJECT_DIR",".claude","hud.ts")},permissions:{allow:["Bash(bun run:*)","Bash(bunx tsx:*)","Bash(git add:*)","mcp__serena__*"]}})}function JS($,I){let U=m(I,".codex","hooks");a_($,U),e_(m(I,".codex","hooks.json"),{UserPromptSubmit:[{hooks:[{type:"command",command:"bun .codex/hooks/keyword-detector.ts",timeout:5}]}],Stop:[{hooks:[{type:"command",command:"bun .codex/hooks/persistent-mode.ts",timeout:5}]}]}),NS(m(I,".codex","config.toml"))}function NS($){v4(wG($),{recursive:!0});let I="";if(R$($))I=GI($,"utf-8");if(/codex_hooks\s*=\s*true/i.test(I))return;if(/codex_hooks\s*=\s*false/i.test(I)){I=I.replace(/codex_hooks\s*=\s*false/i,"codex_hooks = true"),i4($,I);return}if(/\[features\]/i.test(I)){I=I.replace(/(\[features\][^[]*)/i,`$1codex_hooks = true
267
+ `),i4($,I);return}let U=`
268
268
  [features]
269
269
  codex_hooks = true
270
- `;k4($,I.trimEnd()+U)}function NS($,I){let U=m(I,".gemini","hooks");o_($,U),t_(m(I,".gemini","settings.json"),{BeforeAgent:[{matcher:"*",hooks:[{type:"command",command:g1("GEMINI_PROJECT_DIR",".gemini","keyword-detector.ts"),timeout:5}]}],AfterAgent:[{matcher:"*",hooks:[{type:"command",command:g1("GEMINI_PROJECT_DIR",".gemini","persistent-mode.ts"),timeout:5}]}]})}function GS($,I){let U=m(I,".qwen","hooks");o_($,U),t_(m(I,".qwen","settings.json"),{UserPromptSubmit:[{hooks:[{type:"command",command:g1("QWEN_PROJECT_DIR",".qwen","keyword-detector.ts"),timeout:5}]}],Stop:[{hooks:[{type:"command",command:g1("QWEN_PROJECT_DIR",".qwen","persistent-mode.ts"),timeout:5}]}]})}function qS($){let I=m($,".claude","CLAUDE.md.template");if(!K$(I))return;let U=process.env.HOME||process.env.USERPROFILE||"",_=JI(I,"utf-8").trim(),u=m(U,".claude","CLAUDE.md");if(g4(FG(u),{recursive:!0}),K$(u)){let g=JI(u,"utf-8"),z=g.indexOf(XS),v=g.indexOf(YT);if(z!==-1&&v!==-1){let J=g.slice(0,z),N=g.slice(v+YT.length);k4(u,`${J}${_}${N}`)}else k4(u,`${g.trimEnd()}
270
+ `;i4($,I.trimEnd()+U)}function GS($,I){let U=m(I,".gemini","hooks");a_($,U),e_(m(I,".gemini","settings.json"),{BeforeAgent:[{matcher:"*",hooks:[{type:"command",command:v1("GEMINI_PROJECT_DIR",".gemini","keyword-detector.ts"),timeout:5}]}],AfterAgent:[{matcher:"*",hooks:[{type:"command",command:v1("GEMINI_PROJECT_DIR",".gemini","persistent-mode.ts"),timeout:5}]}]})}function XS($,I){let U=m(I,".qwen","hooks");a_($,U),e_(m(I,".qwen","settings.json"),{UserPromptSubmit:[{hooks:[{type:"command",command:v1("QWEN_PROJECT_DIR",".qwen","keyword-detector.ts"),timeout:5}]}],Stop:[{hooks:[{type:"command",command:v1("QWEN_PROJECT_DIR",".qwen","persistent-mode.ts"),timeout:5}]}]})}function QS($){let I=m($,".claude","CLAUDE.md.template");if(!R$(I))return;let U=process.env.HOME||process.env.USERPROFILE||"",_=GI(I,"utf-8").trim(),u=m(U,".claude","CLAUDE.md");if(v4(wG(u),{recursive:!0}),R$(u)){let g=GI(u,"utf-8"),z=g.indexOf(qS),v=g.indexOf(VT);if(z!==-1&&v!==-1){let J=g.slice(0,z),N=g.slice(v+VT.length);i4(u,`${J}${_}${N}`)}else i4(u,`${g.trimEnd()}
271
271
 
272
272
  ${_}
273
- `)}else k4(u,`${_}
274
- `)}function a_($,I,U){let _=m($,".agents","agents"),u=m($,".agents","workflows");for(let g of U)switch(g){case"claude":_S(_,I),gS(u,I),zS($,I),qS($);break;case"codex":vS($,I);break;case"gemini":NS($,I);break;case"qwen":GS($,I);break}}function NI(){return[...H4.domain,...H4.design,...H4.coordination,...H4.utility,...H4.infrastructure]}function e_($,I,U){let _=[],u=[],g=jG($,R4);for(let z of I){let v=KT[z],J=m($,v);if(!K$(J))g4(J,{recursive:!0});for(let N of U){let X=m(g,N),G=m(J,N);if(!K$(X)){u.push(`${v}/${N} (source missing)`);continue}try{if(OT(G).isSymbolicLink()){if(jG(FG(G),sF(G))===jG(X)){u.push(`${v}/${N} (already linked)`);continue}DT(G)}else{u.push(`${v}/${N} (real dir exists)`);continue}}catch(T){}let q=uS(J,X);IS(q,G,"dir"),_.push(`${v}/${N}`)}}return{created:_,skipped:u}}function LT($){let I=m($,R4);if(!K$(I))return[];return h_(I,{withFileTypes:!0}).filter((U)=>U.isDirectory()&&!U.name.startsWith("_")).map((U)=>U.name)}function PT($){let I=[];for(let[U,_]of Object.entries(KT))if(K$(m($,_)))I.push(U);return I}var L$="first-fluke/oh-my-agent",R4=".agents/skills",H4,VT,US,XS="<!-- OMA:START",YT="<!-- OMA:END -->",KT;var a4=$4(()=>{HT();H4={domain:[{name:"oma-frontend",desc:"React/Next.js UI specialist"},{name:"oma-backend",desc:"Backend API specialist (multi-language)"},{name:"oma-db",desc:"SQL/NoSQL data modeling, normalization, integrity, and capacity specialist"},{name:"oma-mobile",desc:"Flutter/Dart mobile specialist"}],design:[{name:"oma-design",desc:"Design system, DESIGN.md, accessibility, anti-pattern enforcement"}],coordination:[{name:"oma-brainstorm",desc:"Design-first ideation before planning"},{name:"oma-pm",desc:"Product manager - task decomposition"},{name:"oma-qa",desc:"QA - OWASP, Lighthouse, WCAG"},{name:"oma-coordination",desc:"Manual multi-agent orchestration"},{name:"oma-orchestrator",desc:"Automated parallel CLI execution"}],utility:[{name:"oma-debug",desc:"Bug fixing specialist"},{name:"oma-commit",desc:"Conventional Commits helper"},{name:"oma-translator",desc:"Context-aware multilingual translation"}],infrastructure:[{name:"oma-tf-infra",desc:"Multi-cloud infrastructure with Terraform - AWS, GCP, Azure, OCI support"},{name:"oma-dev-workflow",desc:"Monorepo developer workflows - mise tasks, git hooks, CI/CD, release automation"}]},VT={fullstack:["oma-brainstorm","oma-design","oma-frontend","oma-backend","oma-db","oma-pm","oma-qa","oma-debug","oma-commit","oma-tf-infra","oma-dev-workflow"],frontend:["oma-brainstorm","oma-design","oma-frontend","oma-pm","oma-qa","oma-debug","oma-commit"],backend:["oma-brainstorm","oma-backend","oma-db","oma-pm","oma-qa","oma-debug","oma-commit","oma-dev-workflow"],mobile:["oma-brainstorm","oma-mobile","oma-pm","oma-qa","oma-debug","oma-commit"],devops:["oma-brainstorm","oma-tf-infra","oma-dev-workflow","oma-pm","oma-qa","oma-debug","oma-commit"],all:[...H4.domain,...H4.design,...H4.coordination,...H4.utility,...H4.infrastructure].map(($)=>$.name)};US={"backend-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},"frontend-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},"db-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:15},"debug-investigator":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:15},"mobile-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},"pm-planner":{tools:"Read, Write, Grep, Glob, Bash",model:"sonnet",maxTurns:10},"qa-reviewer":{tools:"Read, Grep, Glob, Bash",model:"sonnet",maxTurns:15}};KT={claude:".claude/skills",copilot:".github/skills"}});import{execSync as SG}from"node:child_process";function z1(){try{return SG("gh --version",{stdio:"ignore"}),!0}catch{return!1}}function y4(){try{return SG("gh auth status",{stdio:"ignore"}),!0}catch{return!1}}function v1(){try{return SG(`gh api user/starred/${L$}`,{stdio:"ignore"}),!0}catch{return!1}}function WT(){return z1()&&y4()&&v1()}var GI=$4(()=>{a4()});import{execSync as kT}from"node:child_process";import{existsSync as G1,readFileSync as lG,rmSync as bS,writeFileSync as jS}from"node:fs";import{join as qI}from"node:path";function FS($){let I=process.env.HOME||process.env.USERPROFILE||"",U=[],_=qI($,".omc"),u=qI(I,".claude","CLAUDE.md"),g=G1(_);if(!g&&G1(u))try{g=lG(u,"utf-8").includes("OMC:START")}catch{}if(g)U.push({name:"omc",displayName:"oh-my-claudecode",uninstall:()=>{kT("curl -fsSL https://raw.githubusercontent.com/Yeachan-Heo/oh-my-claudecode/main/scripts/uninstall.sh | bash",{stdio:"pipe",timeout:60000})}});for(let N of["opencode.json","opencode.jsonc"]){let X=qI(I,".config","opencode",N);if(!G1(X))continue;try{let q=lG(X,"utf-8").replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/,\s*([\]}])/g,"$1"),T=JSON.parse(q);if(Array.isArray(T.plugin)&&T.plugin.includes("oh-my-opencode")){U.push({name:"omo",displayName:"oh-my-opencode",uninstall:()=>{let Q=lG(X,"utf-8").replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/,\s*([\]}])/g,"$1"),Y=JSON.parse(Q);Y.plugin=Y.plugin.filter((R)=>R!=="oh-my-opencode"),jS(X,JSON.stringify(Y,null,2))}});break}}catch{}}let z=qI(I,".agents","skills","superpowers"),v=qI(I,".codex","superpowers");if(G1(z)||G1(v))U.push({name:"superpowers",displayName:"superpowers",uninstall:()=>{for(let N of[z,v])if(G1(N))bS(N,{recursive:!0,force:!0})}});let J=qI($,".omx");if(G1(J))U.push({name:"omx",displayName:"oh-my-codex",uninstall:()=>{kT("npx -y oh-my-codex@latest uninstall --yes",{stdio:"pipe",timeout:60000})}});return U}async function u2($){let I=FS($);if(I.length===0)return[];let U=I.map((z)=>z.name),_=await O$({message:`${I2.default.yellow(U.join(", "))} detected. Remove all?`,initialValue:!0});if(e(_)||!_)return[];let u=[],g=e$();g.start("Removing competing tools...");for(let z of I)try{z.uninstall(),u.push(`${z.displayName} removed`)}catch(v){let J=v instanceof Error?v.message:String(v);u.push(`${z.displayName} removal failed: ${J}`)}return g.stop(u.map((z)=>z.includes("failed")?`${I2.default.red("✗")} ${z}`:`${I2.default.green("✓")} ${z}`).join(`
275
- `)),u}var I2;var mG=$4(()=>{s$();I2=q$(b$(),1)});import{existsSync as A$,lstatSync as yT,mkdirSync as iT,readdirSync as U2,readFileSync as nT,renameSync as f0,rmSync as QI,unlinkSync as rT,writeFileSync as SS}from"node:fs";import{dirname as lT,join as C$}from"node:path";function _2($){let I=[],U=C$($,".agent"),_=C$($,".agents");if(A$(U)&&!A$(_))f0(U,_),I.push(".agent/ → .agents/ (renamed)");else if(A$(U)&&A$(_))try{let J=U2(U);for(let N of J){let X=C$(U,N),G=C$(_,N);if(!A$(G))f0(X,G),I.push(`.agent/${N} → .agents/${N} (merged)`)}QI(U,{recursive:!0,force:!0}),I.push(".agent/ (removed after merge)")}catch{}for(let J of[".cursor/skills"]){let N=C$($,J);if(!A$(N))continue;try{if(yT(N).isSymbolicLink())rT(N),I.push(`${J} (removed symlink)`);else{let G=U2(N),q=0;for(let H of G){let Q=C$(N,H);if(yT(Q).isSymbolicLink())rT(Q),q++}if(U2(N).length===0)QI(N,{recursive:!0}),I.push(`${J} (removed ${q} symlinks, cleaned dir)`);else if(q>0)I.push(`${J} (removed ${q} symlinks)`)}}catch{}}let u={"backend-agent":"oma-backend","db-agent":"oma-db","debug-agent":"oma-debug","frontend-agent":"oma-frontend","mobile-agent":"oma-mobile","pm-agent":"oma-pm","qa-agent":"oma-qa","tf-infra-agent":"oma-tf-infra",brainstorm:"oma-brainstorm",commit:"oma-commit",orchestrator:"oma-orchestrator","dev-workflow":"oma-dev-workflow",translator:"oma-translator","workflow-guide":"oma-coordination"},g=C$($,".agents","skills");if(A$(g))for(let[J,N]of Object.entries(u)){let X=C$(g,J),G=C$(g,N);if(A$(X)&&!A$(G))f0(X,G),I.push(`skills/${J} → skills/${N}`);else if(A$(X)&&A$(G))QI(X,{recursive:!0}),I.push(`skills/${J} (removed, replaced by ${N})`)}let z={"backend-impl.md":"backend-engineer.md","db-impl.md":"db-engineer.md","frontend-impl.md":"frontend-engineer.md","mobile-impl.md":"mobile-engineer.md"},v=C$($,".claude","agents");if(A$(v))for(let[J,N]of Object.entries(z)){let X=C$(v,J),G=C$(v,N);if(A$(X)&&!A$(G))f0(X,G),I.push(`agents/${J} → agents/${N}`);else if(A$(X)&&A$(G))QI(X),I.push(`agents/${J} (removed, replaced by ${N})`)}return I}function CS($,I){let U=I.replace(/^\.agents\//,"");return C$($,".agents",".migration-backup","shared-layout-v2",U)}function fS($){return C$(".agents",".migration-backup","shared-layout-v2",$.replace(/^\.agents\//,""))}function x0($){let I=[];for(let U of wS){let _=C$($,U.from),u=C$($,U.to);if(!A$(_))continue;if(!A$(u)){iT(lT(u),{recursive:!0}),f0(_,u),I.push(`${U.from} → ${U.to}`);continue}let g=nT(_,"utf-8"),z=nT(u,"utf-8");if(g!==z){let v=CS($,U.from),J=fS(U.from);iT(lT(v),{recursive:!0}),SS(v,g,"utf-8"),I.push(`${U.from} → ${J} (backup)`)}QI(_,{force:!0}),I.push(`${U.from} (removed legacy path)`)}for(let U of ES){let _=C$($,U);if(!A$(_))continue;try{if(U2(_).length===0)QI(_,{recursive:!0,force:!0}),I.push(`${U} (removed empty dir)`)}catch{}}return I}var wS,ES;var hG=$4(()=>{wS=[{from:".agents/skills/_shared/api-contracts/README.md",to:".agents/skills/_shared/core/api-contracts/README.md"},{from:".agents/skills/_shared/api-contracts/template.md",to:".agents/skills/_shared/core/api-contracts/template.md"},{from:".agents/skills/_shared/clarification-protocol.md",to:".agents/skills/_shared/core/clarification-protocol.md"},{from:".agents/skills/_shared/common-checklist.md",to:".agents/skills/_shared/core/common-checklist.md"},{from:".agents/skills/_shared/context-budget.md",to:".agents/skills/_shared/core/context-budget.md"},{from:".agents/skills/_shared/context-loading.md",to:".agents/skills/_shared/core/context-loading.md"},{from:".agents/skills/_shared/difficulty-guide.md",to:".agents/skills/_shared/core/difficulty-guide.md"},{from:".agents/skills/_shared/lessons-learned.md",to:".agents/skills/_shared/core/lessons-learned.md"},{from:".agents/skills/_shared/prompt-structure.md",to:".agents/skills/_shared/core/prompt-structure.md"},{from:".agents/skills/_shared/quality-principles.md",to:".agents/skills/_shared/core/quality-principles.md"},{from:".agents/skills/_shared/reasoning-templates.md",to:".agents/skills/_shared/core/reasoning-templates.md"},{from:".agents/skills/_shared/session-metrics.md",to:".agents/skills/_shared/core/session-metrics.md"},{from:".agents/skills/_shared/skill-routing.md",to:".agents/skills/_shared/core/skill-routing.md"},{from:".agents/skills/_shared/experiment-ledger.md",to:".agents/skills/_shared/conditional/experiment-ledger.md"},{from:".agents/skills/_shared/exploration-loop.md",to:".agents/skills/_shared/conditional/exploration-loop.md"},{from:".agents/skills/_shared/quality-score.md",to:".agents/skills/_shared/conditional/quality-score.md"},{from:".agents/skills/_shared/memory-protocol.md",to:".agents/skills/_shared/runtime/memory-protocol.md"},{from:".agents/skills/_shared/execution-protocols/claude.md",to:".agents/skills/_shared/runtime/execution-protocols/claude.md"},{from:".agents/skills/_shared/execution-protocols/codex.md",to:".agents/skills/_shared/runtime/execution-protocols/codex.md"},{from:".agents/skills/_shared/execution-protocols/gemini.md",to:".agents/skills/_shared/runtime/execution-protocols/gemini.md"},{from:".agents/skills/_shared/execution-protocols/qwen.md",to:".agents/skills/_shared/runtime/execution-protocols/qwen.md"},{from:".agents/skills/_shared/multi-review-protocol.md",to:".agents/workflows/ultrawork/resources/multi-review-protocol.md"},{from:".agents/skills/_shared/phase-gates.md",to:".agents/workflows/ultrawork/resources/phase-gates.md"}],ES=[".agents/skills/_shared/api-contracts",".agents/skills/_shared/execution-protocols"]});import{execSync as xS}from"node:child_process";import{mkdtempSync as kS,rmSync as cG,writeFileSync as yS}from"node:fs";import{tmpdir as iS}from"node:os";import{join as mT}from"node:path";async function g2(){let $=kS(mT(iS(),"oh-my-agent-"));try{let I=`https://api.github.com/repos/${L$}/tarball/main`,U=await fetch(I,{headers:{"User-Agent":"oh-my-agent-cli"}});if(!U.ok)throw Error(`HTTP ${U.status}`);let _=mT($,"repo.tar.gz");yS(_,Buffer.from(await U.arrayBuffer())),xS(`tar -xzf "${_}" -C "${$}" --strip-components=1`,{stdio:"pipe",timeout:30000}),cG(_)}catch(I){throw cG($,{recursive:!0,force:!0}),Error(`Failed to download repository archive: ${I instanceof Error?I.message:I}`)}return{dir:$,cleanup:()=>cG($,{recursive:!0,force:!0})}}var dG=$4(()=>{a4()});var hT={};O4(hT,{install:()=>v2});import{execSync as A6}from"node:child_process";import{existsSync as z2,readFileSync as pG,writeFileSync as oG}from"node:fs";import{join as k0}from"node:path";async function v2(){console.clear(),D$(B$.default.bgMagenta(B$.default.white(" \uD83D\uDEF8 oh-my-agent ")));let $=_2(process.cwd());if($.length>0)k($.map((J)=>`${B$.default.green("✓")} ${J}`).join(`
276
- `),"Migration");await u2(process.cwd());let I=await _1({message:"What type of project?",options:[{value:"all",label:"✨ All",hint:"Install everything"},{value:"fullstack",label:"\uD83C\uDF10 Fullstack",hint:"Frontend + Backend + PM + QA"},{value:"frontend",label:"\uD83C\uDFA8 Frontend",hint:"React/Next.js"},{value:"backend",label:"⚙️ Backend",hint:"Python, Node.js, Rust, ..."},{value:"mobile",label:"\uD83D\uDCF1 Mobile",hint:"Flutter/Dart"},{value:"devops",label:"\uD83D\uDE80 DevOps",hint:"Terraform + CI/CD + Workflows"},{value:"custom",label:"\uD83D\uDD27 Custom",hint:"Choose skills"}]});if(e(I))U4("Cancelled."),process.exit(0);let U;if(I==="custom"){let J=NI(),N=await l_({message:"Select skills:",options:J.map((X)=>({value:X.name,label:X.name,hint:X.desc})),required:!0});if(e(N))U4("Cancelled."),process.exit(0);U=N}else U=VT[I]??[];let _=process.cwd(),u={};if(U.includes("oma-backend")){let J=await _1({message:"Backend language?",options:[{value:"python",label:"\uD83D\uDC0D Python",hint:"FastAPI/SQLAlchemy (default)"},{value:"node",label:"\uD83D\uDFE2 Node.js",hint:"NestJS/Hono + Prisma/Drizzle"},{value:"rust",label:"\uD83E\uDD80 Rust",hint:"Axum/Actix-web"},{value:"other",label:"\uD83D\uDD27 Other / Auto-detect",hint:"Configure later with /stack-set"}],initialValue:"python"});if(e(J))U4("Cancelled."),process.exit(0);if(J!=="other")u["oma-backend"]=J}let g=["claude"];if(z2(k0(_,".github")))g.push("copilot");else{let J=await O$({message:"Also create symlinks for GitHub Copilot? (.github/skills/)",initialValue:!1});if(!e(J)&&J)g.push("copilot")}let v=e$();v.start("Downloading...");try{let{dir:J,cleanup:N}=await g2();try{v.message("Installing skills..."),p_(J,_),BT(J,_),MT(J,_),RT(J);for(let V of U)v.message(`Installing ${B$.default.cyan(V)}...`),d_(J,V,_,u[V]);v.stop("Skills installed!"),v.start("Installing vendor adaptations..."),a_(J,_,["claude","codex","gemini","qwen"]),v.stop("Vendor adaptations installed!");let O=x0(_);if(O.length>0)k(O.map((V)=>`${B$.default.green("✓")} ${V}`).join(`
277
- `),"Shared layout migration")}finally{N()}let X=e_(_,g,U);k([...U.map((O)=>`${B$.default.green("")} ${O}`),"",B$.default.dim(`Location: ${k0(_,R4)}`),...X.created.length>0?["",B$.default.cyan("Symlinks:"),...X.created.map((O)=>`${B$.default.green("")} ${O}`)]:[],...X.skipped.length>0?["",B$.default.dim("Skipped:"),...X.skipped.map((O)=>B$.default.dim(` ${O}`))]:[]].join(`
278
- `),"Installed");try{if(A6("git config --get rerere.enabled",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim()==="true")o.success(B$.default.green("git rerere is already enabled."))}catch{let O=await O$({message:"Enable git rerere? (Recommended for multi-agent merge conflict reuse)",initialValue:!0});if(!e(O)&&O)try{A6("git config --global rerere.enabled true"),o.success(B$.default.green("git rerere enabled globally!"))}catch(V){o.error(`Failed to enable git rerere: ${V}`)}}let G=process.env.HOME||process.env.USERPROFILE||"",q=!1;try{A6("claude --version",{stdio:"ignore"}),q=!0}catch{}let T=k0(G,".claude","settings.json");if(q)try{let O={};if(z2(T))O=JSON.parse(pG(T,"utf-8"));if((O.env?.cleanupPeriodDays??0)<180||(O.env?.CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS??0)<1e5||(O.env?.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE??0)<80||!O.attribution?.commit||!O.attribution?.pr||O.env?.DISABLE_TELEMETRY!=="1"||O.env?.DISABLE_ERROR_REPORTING!=="1"||O.env?.CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY!=="1"){let L=await O$({message:"Apply recommended Claude Code settings?",initialValue:!0});if(!e(L)&&L)O.env={...O.env||{},cleanupPeriodDays:180,CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS:1e5,CLAUDE_AUTOCOMPACT_PCT_OVERRIDE:80,DISABLE_TELEMETRY:"1",DISABLE_ERROR_REPORTING:"1",CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY:"1"},O.attribution={commit:`Generated with oh-my-agent
273
+ `)}else i4(u,`${_}
274
+ `)}function s_($,I,U){let _=m($,".agents","agents"),u=m($,".agents","workflows");for(let g of U)switch(g){case"claude":gS(_,I),zS(u,I),vS($,I),QS($);break;case"codex":JS($,I);break;case"gemini":GS($,I);break;case"qwen":XS($,I);break}}function XI(){return[...O4.domain,...O4.design,...O4.coordination,...O4.utility,...O4.infrastructure]}function $2($,I,U){let _=[],u=[],g=SG($,L4);for(let z of I){let v=WT[z],J=m($,v);if(!R$(J))v4(J,{recursive:!0});for(let N of U){let X=m(g,N),G=m(J,N);if(!R$(X)){u.push(`${v}/${N} (source missing)`);continue}try{if(DT(G).isSymbolicLink()){if(SG(wG(G),$S(G))===SG(X)){u.push(`${v}/${N} (already linked)`);continue}BT(G)}else{u.push(`${v}/${N} (real dir exists)`);continue}}catch(T){}let q=US(J,X);uS(q,G,"dir"),_.push(`${v}/${N}`)}}return{created:_,skipped:u}}function PT($){let I=m($,L4);if(!R$(I))return[];return d_(I,{withFileTypes:!0}).filter((U)=>U.isDirectory()&&!U.name.startsWith("_")).map((U)=>U.name)}function ZT($){let I=[];for(let[U,_]of Object.entries(WT))if(R$(m($,_)))I.push(U);return I}var L$="first-fluke/oh-my-agent",L4=".agents/skills",O4,MT,_S,qS="<!-- OMA:START",VT="<!-- OMA:END -->",WT;var s4=u4(()=>{OT();O4={domain:[{name:"oma-frontend",desc:"React/Next.js UI specialist"},{name:"oma-backend",desc:"Backend API specialist (multi-language)"},{name:"oma-db",desc:"SQL/NoSQL data modeling, normalization, integrity, and capacity specialist"},{name:"oma-mobile",desc:"Flutter/Dart mobile specialist"}],design:[{name:"oma-design",desc:"Design system, DESIGN.md, accessibility, anti-pattern enforcement"}],coordination:[{name:"oma-brainstorm",desc:"Design-first ideation before planning"},{name:"oma-pm",desc:"Product manager - task decomposition"},{name:"oma-qa",desc:"QA - OWASP, Lighthouse, WCAG"},{name:"oma-coordination",desc:"Manual multi-agent orchestration"},{name:"oma-orchestrator",desc:"Automated parallel CLI execution"}],utility:[{name:"oma-debug",desc:"Bug fixing specialist"},{name:"oma-commit",desc:"Conventional Commits helper"},{name:"oma-translator",desc:"Context-aware multilingual translation"}],infrastructure:[{name:"oma-tf-infra",desc:"Multi-cloud infrastructure with Terraform - AWS, GCP, Azure, OCI support"},{name:"oma-dev-workflow",desc:"Monorepo developer workflows - mise tasks, git hooks, CI/CD, release automation"}]},MT={fullstack:["oma-brainstorm","oma-design","oma-frontend","oma-backend","oma-db","oma-pm","oma-qa","oma-debug","oma-commit","oma-tf-infra","oma-dev-workflow"],frontend:["oma-brainstorm","oma-design","oma-frontend","oma-pm","oma-qa","oma-debug","oma-commit"],backend:["oma-brainstorm","oma-backend","oma-db","oma-pm","oma-qa","oma-debug","oma-commit","oma-dev-workflow"],mobile:["oma-brainstorm","oma-mobile","oma-pm","oma-qa","oma-debug","oma-commit"],devops:["oma-brainstorm","oma-tf-infra","oma-dev-workflow","oma-pm","oma-qa","oma-debug","oma-commit"],all:[...O4.domain,...O4.design,...O4.coordination,...O4.utility,...O4.infrastructure].map(($)=>$.name)};_S={"backend-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},"frontend-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},"db-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:15},"debug-investigator":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:15},"mobile-engineer":{tools:"Read, Write, Edit, Bash, Grep, Glob",model:"sonnet",maxTurns:20},"pm-planner":{tools:"Read, Write, Grep, Glob, Bash",model:"sonnet",maxTurns:10},"qa-reviewer":{tools:"Read, Grep, Glob, Bash",model:"sonnet",maxTurns:15,effort:"low"}};WT={claude:".claude/skills",copilot:".github/skills"}});import{execSync as EG}from"node:child_process";function J1(){try{return EG("gh --version",{stdio:"ignore"}),!0}catch{return!1}}function r4(){try{return EG("gh auth status",{stdio:"ignore"}),!0}catch{return!1}}function N1(){try{return EG(`gh api user/starred/${L$}`,{stdio:"ignore"}),!0}catch{return!1}}function AT(){return J1()&&r4()&&N1()}var qI=u4(()=>{s4()});import{execSync as jS}from"node:child_process";import{existsSync as y$,readFileSync as TI,rmSync as q1,writeFileSync as hG}from"node:fs";import{join as h$}from"node:path";function FS($){let I=process.env.HOME||process.env.USERPROFILE||"",U=[],_=h$($,".omc"),u=h$(I,".claude","CLAUDE.md"),g=y$(_);if(!g&&y$(u))try{g=TI(u,"utf-8").includes("OMC:START")}catch{}if(g)U.push({name:"omc",displayName:"oh-my-claudecode",uninstall:()=>{let N=h$(I,".claude");for(let q of["architect","document-specialist","explore","designer","writer","vision","critic","analyst","executor","planner"]){let T=h$(N,"agents",`${q}.md`);if(y$(T))q1(T,{force:!0})}for(let q of["coordinator","omc","ultrawork","deepsearch","analyze","plan","review","planner","orchestrator","update"]){let T=h$(N,"commands",`${q}.md`);if(y$(T))q1(T,{force:!0})}for(let q of["ultrawork","git-master","frontend-ui-ux"]){let T=h$(N,"skills",q);if(!y$(T))continue;let H=h$(T,"SKILL.md");if(y$(H))try{if(TI(H,"utf-8").includes(".agents/workflows/"))continue}catch{continue}q1(T,{recursive:!0,force:!0})}for(let q of["keyword-detector.sh","silent-auto-update.sh","stop-continuation.sh"]){let T=h$(N,"hooks",q);if(y$(T))q1(T,{force:!0})}for(let q of[".omc-version.json",".omc-silent-update.json",".omc-update.log",".omc-config.json"]){let T=h$(N,q);if(y$(T))q1(T,{force:!0})}if(y$(_))q1(_,{recursive:!0,force:!0});let X=h$(N,"settings.json");if(y$(X))try{let q=JSON.parse(TI(X,"utf-8"));if(q.hooks){for(let T of Object.keys(q.hooks)){if(!Array.isArray(q.hooks[T]))continue;if(q.hooks[T]=q.hooks[T].map((H)=>{if(Array.isArray(H.hooks))H.hooks=H.hooks.filter((Q)=>!Q.command||!(Q.command.includes("keyword-detector.sh")||Q.command.includes("silent-auto-update.sh")||Q.command.includes("stop-continuation.sh")));return H}).filter((H)=>!H.hooks||H.hooks.length>0),q.hooks[T].length===0)delete q.hooks[T]}if(Object.keys(q.hooks).length===0)delete q.hooks;hG(X,`${JSON.stringify(q,null,2)}
275
+ `)}}catch{}let G=h$(N,"CLAUDE.md");if(y$(G))try{let q=TI(G,"utf-8");if(q.includes("OMC:START")){let T=q.replace(/<!-- OMC:START[\s\S]*?OMC:END -->\n?/g,"");hG(G,T)}}catch{}}});for(let N of["opencode.json","opencode.jsonc"]){let X=h$(I,".config","opencode",N);if(!y$(X))continue;try{let q=TI(X,"utf-8").replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/,\s*([\]}])/g,"$1"),T=JSON.parse(q);if(Array.isArray(T.plugin)&&T.plugin.includes("oh-my-opencode")){U.push({name:"omo",displayName:"oh-my-opencode",uninstall:()=>{let Q=TI(X,"utf-8").replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/,\s*([\]}])/g,"$1"),Y=JSON.parse(Q);Y.plugin=Y.plugin.filter((K)=>K!=="oh-my-opencode"),hG(X,JSON.stringify(Y,null,2))}});break}}catch{}}let z=h$(I,".agents","skills","superpowers"),v=h$(I,".codex","superpowers");if(y$(z)||y$(v))U.push({name:"superpowers",displayName:"superpowers",uninstall:()=>{for(let N of[z,v])if(y$(N))q1(N,{recursive:!0,force:!0})}});let J=h$($,".omx");if(y$(J))U.push({name:"omx",displayName:"oh-my-codex",uninstall:()=>{jS("npx -y oh-my-codex@latest uninstall --yes",{stdio:"pipe",timeout:60000})}});return U}async function _2($){let I=FS($);if(I.length===0)return[];let U=I.map((z)=>z.name),_=await O$({message:`${U2.default.yellow(U.join(", "))} detected. Remove all?`,initialValue:!0});if(e(_)||!_)return[];let u=[],g=$4();g.start("Removing competing tools...");for(let z of I)try{z.uninstall(),u.push(`${z.displayName} removed`)}catch(v){let J=v instanceof Error?v.message:String(v);u.push(`${z.displayName} removal failed: ${J}`)}return g.stop(u.map((z)=>z.includes("failed")?`${U2.default.red("")} ${z}`:`${U2.default.green("✓")} ${z}`).join(`
276
+ `)),u}var U2;var cG=u4(()=>{I4();U2=q$(b$(),1)});import{existsSync as A$,lstatSync as iT,mkdirSync as rT,readdirSync as g2,readFileSync as nT,renameSync as y0,rmSync as HI,unlinkSync as lT,writeFileSync as SS}from"node:fs";import{dirname as mT,join as C$}from"node:path";function z2($){let I=[],U=C$($,".agent"),_=C$($,".agents");if(A$(U)&&!A$(_))y0(U,_),I.push(".agent/ → .agents/ (renamed)");else if(A$(U)&&A$(_))try{let J=g2(U);for(let N of J){let X=C$(U,N),G=C$(_,N);if(!A$(G))y0(X,G),I.push(`.agent/${N} → .agents/${N} (merged)`)}HI(U,{recursive:!0,force:!0}),I.push(".agent/ (removed after merge)")}catch{}for(let J of[".cursor/skills"]){let N=C$($,J);if(!A$(N))continue;try{if(iT(N).isSymbolicLink())lT(N),I.push(`${J} (removed symlink)`);else{let G=g2(N),q=0;for(let H of G){let Q=C$(N,H);if(iT(Q).isSymbolicLink())lT(Q),q++}if(g2(N).length===0)HI(N,{recursive:!0}),I.push(`${J} (removed ${q} symlinks, cleaned dir)`);else if(q>0)I.push(`${J} (removed ${q} symlinks)`)}}catch{}}let u={"backend-agent":"oma-backend","db-agent":"oma-db","debug-agent":"oma-debug","frontend-agent":"oma-frontend","mobile-agent":"oma-mobile","pm-agent":"oma-pm","qa-agent":"oma-qa","tf-infra-agent":"oma-tf-infra",brainstorm:"oma-brainstorm",commit:"oma-commit",orchestrator:"oma-orchestrator","dev-workflow":"oma-dev-workflow",translator:"oma-translator","workflow-guide":"oma-coordination"},g=C$($,".agents","skills");if(A$(g))for(let[J,N]of Object.entries(u)){let X=C$(g,J),G=C$(g,N);if(A$(X)&&!A$(G))y0(X,G),I.push(`skills/${J} → skills/${N}`);else if(A$(X)&&A$(G))HI(X,{recursive:!0}),I.push(`skills/${J} (removed, replaced by ${N})`)}let z={"backend-impl.md":"backend-engineer.md","db-impl.md":"db-engineer.md","frontend-impl.md":"frontend-engineer.md","mobile-impl.md":"mobile-engineer.md"},v=C$($,".claude","agents");if(A$(v))for(let[J,N]of Object.entries(z)){let X=C$(v,J),G=C$(v,N);if(A$(X)&&!A$(G))y0(X,G),I.push(`agents/${J} → agents/${N}`);else if(A$(X)&&A$(G))HI(X),I.push(`agents/${J} (removed, replaced by ${N})`)}return I}function CS($,I){let U=I.replace(/^\.agents\//,"");return C$($,".agents",".migration-backup","shared-layout-v2",U)}function fS($){return C$(".agents",".migration-backup","shared-layout-v2",$.replace(/^\.agents\//,""))}function i0($){let I=[];for(let U of wS){let _=C$($,U.from),u=C$($,U.to);if(!A$(_))continue;if(!A$(u)){rT(mT(u),{recursive:!0}),y0(_,u),I.push(`${U.from} → ${U.to}`);continue}let g=nT(_,"utf-8"),z=nT(u,"utf-8");if(g!==z){let v=CS($,U.from),J=fS(U.from);rT(mT(v),{recursive:!0}),SS(v,g,"utf-8"),I.push(`${U.from} → ${J} (backup)`)}HI(_,{force:!0}),I.push(`${U.from} (removed legacy path)`)}for(let U of ES){let _=C$($,U);if(!A$(_))continue;try{if(g2(_).length===0)HI(_,{recursive:!0,force:!0}),I.push(`${U} (removed empty dir)`)}catch{}}return I}var wS,ES;var dG=u4(()=>{wS=[{from:".agents/skills/_shared/api-contracts/README.md",to:".agents/skills/_shared/core/api-contracts/README.md"},{from:".agents/skills/_shared/api-contracts/template.md",to:".agents/skills/_shared/core/api-contracts/template.md"},{from:".agents/skills/_shared/clarification-protocol.md",to:".agents/skills/_shared/core/clarification-protocol.md"},{from:".agents/skills/_shared/common-checklist.md",to:".agents/skills/_shared/core/common-checklist.md"},{from:".agents/skills/_shared/context-budget.md",to:".agents/skills/_shared/core/context-budget.md"},{from:".agents/skills/_shared/context-loading.md",to:".agents/skills/_shared/core/context-loading.md"},{from:".agents/skills/_shared/difficulty-guide.md",to:".agents/skills/_shared/core/difficulty-guide.md"},{from:".agents/skills/_shared/lessons-learned.md",to:".agents/skills/_shared/core/lessons-learned.md"},{from:".agents/skills/_shared/prompt-structure.md",to:".agents/skills/_shared/core/prompt-structure.md"},{from:".agents/skills/_shared/quality-principles.md",to:".agents/skills/_shared/core/quality-principles.md"},{from:".agents/skills/_shared/reasoning-templates.md",to:".agents/skills/_shared/core/reasoning-templates.md"},{from:".agents/skills/_shared/session-metrics.md",to:".agents/skills/_shared/core/session-metrics.md"},{from:".agents/skills/_shared/skill-routing.md",to:".agents/skills/_shared/core/skill-routing.md"},{from:".agents/skills/_shared/experiment-ledger.md",to:".agents/skills/_shared/conditional/experiment-ledger.md"},{from:".agents/skills/_shared/exploration-loop.md",to:".agents/skills/_shared/conditional/exploration-loop.md"},{from:".agents/skills/_shared/quality-score.md",to:".agents/skills/_shared/conditional/quality-score.md"},{from:".agents/skills/_shared/memory-protocol.md",to:".agents/skills/_shared/runtime/memory-protocol.md"},{from:".agents/skills/_shared/execution-protocols/claude.md",to:".agents/skills/_shared/runtime/execution-protocols/claude.md"},{from:".agents/skills/_shared/execution-protocols/codex.md",to:".agents/skills/_shared/runtime/execution-protocols/codex.md"},{from:".agents/skills/_shared/execution-protocols/gemini.md",to:".agents/skills/_shared/runtime/execution-protocols/gemini.md"},{from:".agents/skills/_shared/execution-protocols/qwen.md",to:".agents/skills/_shared/runtime/execution-protocols/qwen.md"},{from:".agents/skills/_shared/multi-review-protocol.md",to:".agents/workflows/ultrawork/resources/multi-review-protocol.md"},{from:".agents/skills/_shared/phase-gates.md",to:".agents/workflows/ultrawork/resources/phase-gates.md"}],ES=[".agents/skills/_shared/api-contracts",".agents/skills/_shared/execution-protocols"]});import{execSync as xS}from"node:child_process";import{mkdtempSync as kS,rmSync as pG,writeFileSync as yS}from"node:fs";import{tmpdir as iS}from"node:os";import{join as hT}from"node:path";async function v2(){let $=kS(hT(iS(),"oh-my-agent-"));try{let I=`https://api.github.com/repos/${L$}/tarball/main`,U=await fetch(I,{headers:{"User-Agent":"oh-my-agent-cli"}});if(!U.ok)throw Error(`HTTP ${U.status}`);let _=hT($,"repo.tar.gz");yS(_,Buffer.from(await U.arrayBuffer())),xS(`tar -xzf "${_}" -C "${$}" --strip-components=1`,{stdio:"pipe",timeout:30000}),pG(_)}catch(I){throw pG($,{recursive:!0,force:!0}),Error(`Failed to download repository archive: ${I instanceof Error?I.message:I}`)}return{dir:$,cleanup:()=>pG($,{recursive:!0,force:!0})}}var oG=u4(()=>{s4()});var cT={};D4(cT,{install:()=>N2});import{execSync as j6}from"node:child_process";import{existsSync as J2,readFileSync as tG,writeFileSync as aG}from"node:fs";import{join as r0}from"node:path";async function N2(){console.clear(),V$(B$.default.bgMagenta(B$.default.white(" \uD83D\uDEF8 oh-my-agent ")));let $=z2(process.cwd());if($.length>0)k($.map((J)=>`${B$.default.green("✓")} ${J}`).join(`
277
+ `),"Migration");await _2(process.cwd());let I=await z1({message:"What type of project?",options:[{value:"all",label:"✨ All",hint:"Install everything"},{value:"fullstack",label:"\uD83C\uDF10 Fullstack",hint:"Frontend + Backend + PM + QA"},{value:"frontend",label:"\uD83C\uDFA8 Frontend",hint:"React/Next.js"},{value:"backend",label:"⚙️ Backend",hint:"Python, Node.js, Rust, ..."},{value:"mobile",label:"\uD83D\uDCF1 Mobile",hint:"Flutter/Dart"},{value:"devops",label:"\uD83D\uDE80 DevOps",hint:"Terraform + CI/CD + Workflows"},{value:"custom",label:"\uD83D\uDD27 Custom",hint:"Choose skills"}]});if(e(I))g4("Cancelled."),process.exit(0);let U;if(I==="custom"){let J=XI(),N=await h_({message:"Select skills:",options:J.map((X)=>({value:X.name,label:X.name,hint:X.desc})),required:!0});if(e(N))g4("Cancelled."),process.exit(0);U=N}else U=MT[I]??[];let _=process.cwd(),u={};if(U.includes("oma-backend")){let J=await z1({message:"Backend language?",options:[{value:"python",label:"\uD83D\uDC0D Python",hint:"FastAPI/SQLAlchemy (default)"},{value:"node",label:"\uD83D\uDFE2 Node.js",hint:"NestJS/Hono + Prisma/Drizzle"},{value:"rust",label:"\uD83E\uDD80 Rust",hint:"Axum/Actix-web"},{value:"other",label:"\uD83D\uDD27 Other / Auto-detect",hint:"Configure later with /stack-set"}],initialValue:"python"});if(e(J))g4("Cancelled."),process.exit(0);if(J!=="other")u["oma-backend"]=J}let g=["claude"];if(J2(r0(_,".github")))g.push("copilot");else{let J=await O$({message:"Also create symlinks for GitHub Copilot? (.github/skills/)",initialValue:!1});if(!e(J)&&J)g.push("copilot")}let v=$4();v.start("Downloading...");try{let{dir:J,cleanup:N}=await v2();try{v.message("Installing skills..."),t_(J,_),KT(J,_),RT(J,_),LT(J);for(let D of U)v.message(`Installing ${B$.default.cyan(D)}...`),o_(J,D,_,u[D]);v.stop("Skills installed!"),v.start("Installing vendor adaptations..."),s_(J,_,["claude","codex","gemini","qwen"]),v.stop("Vendor adaptations installed!");let O=i0(_);if(O.length>0)k(O.map((D)=>`${B$.default.green("✓")} ${D}`).join(`
278
+ `),"Shared layout migration")}finally{N()}let X=$2(_,g,U);k([...U.map((O)=>`${B$.default.green("")} ${O}`),"",B$.default.dim(`Location: ${r0(_,L4)}`),...X.created.length>0?["",B$.default.cyan("Symlinks:"),...X.created.map((O)=>`${B$.default.green("")} ${O}`)]:[],...X.skipped.length>0?["",B$.default.dim("Skipped:"),...X.skipped.map((O)=>B$.default.dim(` ${O}`))]:[]].join(`
279
+ `),"Installed");try{if(j6("git config --get rerere.enabled",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim()==="true")o.success(B$.default.green("git rerere is already enabled."))}catch{let O=await O$({message:"Enable git rerere? (Recommended for multi-agent merge conflict reuse)",initialValue:!0});if(!e(O)&&O)try{j6("git config --global rerere.enabled true"),o.success(B$.default.green("git rerere enabled globally!"))}catch(D){o.error(`Failed to enable git rerere: ${D}`)}}let G=process.env.HOME||process.env.USERPROFILE||"",q=!1;try{j6("claude --version",{stdio:"ignore"}),q=!0}catch{}let T=r0(G,".claude","settings.json");if(q)try{let O={};if(J2(T))O=JSON.parse(tG(T,"utf-8"));if((O.env?.cleanupPeriodDays??0)<180||(O.env?.CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS??0)<1e5||(O.env?.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE??0)<80||!O.attribution?.commit||!O.attribution?.pr||O.env?.DISABLE_TELEMETRY!=="1"||O.env?.DISABLE_ERROR_REPORTING!=="1"||O.env?.CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY!=="1"){let L=await O$({message:"Apply recommended Claude Code settings?",initialValue:!0});if(!e(L)&&L)O.env={...O.env||{},cleanupPeriodDays:180,CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS:1e5,CLAUDE_AUTOCOMPACT_PCT_OVERRIDE:80,DISABLE_TELEMETRY:"1",DISABLE_ERROR_REPORTING:"1",CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY:"1"},O.attribution={commit:`Generated with oh-my-agent
279
280
 
280
- Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},oG(T,`${JSON.stringify(O,null,2)}
281
- `),o.success(B$.default.green("Claude Code recommended settings applied!"))}}catch(O){o.warn(`Could not configure Claude Code settings: ${O}`)}if(q){let O=!1;try{A6("codex --version",{stdio:"ignore"}),O=!0}catch{}if(O){let V=!1;try{V=A6("claude plugin list",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).includes("codex@openai-codex")}catch{}if(!V)try{A6("claude plugin marketplace add openai/codex-plugin-cc",{stdio:"ignore"}),A6("claude plugin install codex@openai-codex",{stdio:"ignore"}),o.success(B$.default.green("Codex plugin installed for Claude Code!"))}catch(L){o.warn(`Could not install Codex plugin: ${L}`)}}}let H=k0(G,".gemini","antigravity","mcp_config.json"),Q=null,Y=!1;try{if(z2(H)){let O=pG(H,"utf-8");Q=JSON.parse(O),Y=!0}}catch(O){}if(Y&&Q&&Q.mcpServers){let O=Q.mcpServers.serena,V="oh-my-agent@latest";if(!(O&&O.command==="npx"&&Array.isArray(O.args)&&O.args.includes("oh-my-agent@latest")&&O.args.includes("bridge"))){let B=await O$({message:"Configure Serena MCP with bridge? (Required for full functionality)",initialValue:!0});if(e(B));else if(B){Q.mcpServers.serena={command:"npx",args:["-y","oh-my-agent@latest","bridge","http://localhost:12341/mcp"],disabled:!1};try{oG(H,JSON.stringify(Q,null,2)),o.success(B$.default.green("Serena MCP configured successfully!"))}catch(M){o.error(`Failed to update MCP config: ${M}`)}}}}let R=k0(G,".gemini","settings.json"),K=null,W=!1;try{if(z2(R)){let O=pG(R,"utf-8");K=JSON.parse(O),W=!0}}catch(O){}if(W&&K&&K.mcpServers){let O=K.mcpServers.serena;if(!(O&&O.url==="http://localhost:12341/mcp")){let L=await O$({message:"Configure Serena for Gemini CLI? (HTTP Mode)",initialValue:!0});if(e(L));else if(L){K.mcpServers.serena={url:"http://localhost:12341/mcp"};try{oG(R,JSON.stringify(K,null,2)),o.success(B$.default.green("Gemini CLI configured successfully!"))}catch(B){o.error(`Failed to update Gemini config: ${B}`)}}}}if(d(B$.default.green("Done! Open your project in your IDE to use the skills.")),z1()&&y4()&&!v1()){let O=await O$({message:`${B$.default.yellow("⭐")} Star ${B$.default.cyan(L$)} on GitHub? It helps a lot!`});if(!e(O)&&O)try{A6(`gh api -X PUT /user/starred/${L$}`,{stdio:"ignore"}),o.success(`Starred ${B$.default.cyan(L$)}! Thank you! \uD83C\uDF1F`)}catch{o.warn(`Could not star automatically. Try: ${B$.default.dim(`gh api --method PUT /user/starred/${L$}`)}`)}}}catch(J){v.stop("Installation failed"),o.error(J instanceof Error?J.message:String(J)),process.exit(1)}}var B$;var tG=$4(()=>{s$();mG();GI();hG();a4();dG();B$=q$(b$(),1)});import{execSync as X1}from"node:child_process";function N2($){try{let U=X1("git diff --stat HEAD~10 2>/dev/null || git diff --stat",{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
282
- `),_=U[U.length-1]||"",u=_.match(/(\d+) files? changed/),g=_.match(/(\d+) insertions?\(\+\)/),z=_.match(/(\d+) deletions?\(-\)/);return{filesChanged:u?.[1]?parseInt(u[1],10):0,linesAdded:g?.[1]?parseInt(g[1],10):0,linesRemoved:z?.[1]?parseInt(z[1],10):0}}catch{return{filesChanged:0,linesAdded:0,linesRemoved:0}}}function QH($,I=5){try{return X1(`git log --oneline -${I} 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
283
- `).filter(Boolean)}catch{return[]}}function U9($){try{return X1("git diff --name-only HEAD~5 2>/dev/null || git diff --name-only",{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
284
- `).filter(Boolean).slice(0,10)}catch{return[]}}function qH($,I=10){try{return X1(`git log --format="%s" -${I} 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
285
- `).filter(Boolean)}catch{return[]}}function TH($){let I={},U=/^(feat|fix|docs|style|refactor|test|chore|build|ci|perf)(\(.+\))?:/;for(let _ of $){let u=_.match(U);if(u){let g=u[1];if(g)I[g]=(I[g]||0)+1}}return I}function HH($){try{let I=`${$}/.serena/retrospectives`,U=X1(`ls -t "${I}"/*.json 2>/dev/null | head -1`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim();if(!U)return null;let _=X1(`cat "${U}"`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]});return JSON.parse(_).date||null}catch{return null}}function YH($,I){if(!I)return qH($,10);try{let _=new Date(I).toISOString().split("T")[0];return X1(`git log --format="%s" --since="${_}" 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
286
- `).filter(Boolean)}catch{return qH($,10)}}var _9=()=>{};var VH={};O4(VH,{retro:()=>zw});import{existsSync as DH,mkdirSync as $w,readdirSync as Iw,readFileSync as uw,writeFileSync as Uw}from"node:fs";import{join as g9}from"node:path";function z9($){return g9($,".serena","retrospectives")}function _w($){let I=z9($);if(!DH(I))return[];try{return Iw(I).filter((_)=>_.endsWith(".json")).sort().reverse().slice(0,10).map((_)=>JSON.parse(uw(g9(I,_),"utf-8")))}catch{return[]}}function OH($,I){let U=z9($);if(!DH(U))$w(U,{recursive:!0});let _=`${I.date.replace(/[:.]/g,"-")}_${I.id}.json`;Uw(g9(U,_),JSON.stringify(I,null,2),"utf-8")}function gw($){let I=HH($),U=YH($,I),_=TH(U),u=N2($),g=B7($),z=R7($,I||void 0),v=Object.entries(_).sort(([,G],[,q])=>q-G)[0],J="Development session";if(v){let[G]=v;J={feat:"Feature development",fix:"Bug fixes and improvements",refactor:"Code refactoring",docs:"Documentation updates",test:"Testing improvements",chore:"Maintenance tasks",build:"Build system updates",perf:"Performance improvements"}[G]||"Development session"}if(u.filesChanged>0)J+=` (${u.filesChanged} files, +${u.linesAdded}/-${u.linesRemoved})`;if(g.agents.length>0)J+=` with ${g.agents.join(", ")}`;let N=K7(z);if(U.length>0&&N.length===0){if(_.refactor||_.perf)N.push("Code quality and performance improvements");if(_.test)N.push("Enhanced test coverage");if(_.fix)N.push("Issue resolution and stability improvements")}let X=[];if(g.inProgressTasks.length>0)X.push(...g.inProgressTasks.slice(0,3));if(U.length>0){let G=U[0]?.toLowerCase()||"";if(G.includes("wip")||G.includes("todo"))X.push("Complete work-in-progress items")}if(X.length===0)X.push("Continue development","Review and test changes");return{summary:J,learnings:N.slice(0,5),nextSteps:X.slice(0,5)}}async function zw(){let $=process.cwd(),I=z9($),U=_w($);console.clear(),D$(j$.default.bgMagenta(j$.default.white(" retro (interactive) ")));let _=U[0];if(_)k([j$.default.bold("Last Retrospective"),`Date: ${_.date}`,"",j$.default.bold("Summary:"),_.summary,"",j$.default.bold("Key Learnings:"),..._.keyLearnings.map((G)=>` - ${G}`),"",j$.default.bold("Next Steps:"),..._.nextSteps.map((G)=>` > ${G}`)].join(`
287
- `),"Previous Session");let u=await _1({message:"What would you like to do?",options:[{value:"auto",label:"Auto-generate from git history",hint:"Analyze commits and agent activity"},{value:"manual",label:"Create manually",hint:"Write your own retrospective"},{value:"list",label:"View past retrospectives"},{value:"exit",label:"Exit"}]});if(e(u)||u==="exit"){d(j$.default.dim("Goodbye!"));return}if(u==="list"){if(U.length===0)k(j$.default.yellow("No retrospectives found."),"History");else{let G=U.map((q,T)=>`${T+1}. [${q.date.split("T")[0]}] ${q.summary.slice(0,50)}...`).join(`
288
- `);k(G,`Past Retrospectives (${U.length})`)}d(j$.default.dim(`Stored in: ${I}`));return}if(u==="auto"){let{summary:G,learnings:q,nextSteps:T}=gw($),H=U9($);k([j$.default.bold("Auto-generated Content"),"",j$.default.bold("Summary:"),G,"",j$.default.bold("Key Learnings:"),...q.map((R)=>` - ${R}`),"",j$.default.bold("Next Steps:"),...T.map((R)=>` > ${R}`)].join(`
289
- `),"Preview");let Q=await O$({message:"Save this retrospective?",initialValue:!0});if(e(Q)||!Q){U4("Cancelled.");return}let Y={id:Math.random().toString(36).slice(2,8),date:new Date().toISOString(),summary:G,keyLearnings:q,filesChanged:H,nextSteps:T};OH($,Y),k(j$.default.green("Retrospective saved!"),"Done"),d(j$.default.dim(`Stored in: ${I}`));return}let g=QH($),z=U9($);if(g.length>0)k(g.join(`
281
+ Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},aG(T,`${JSON.stringify(O,null,2)}
282
+ `),o.success(B$.default.green("Claude Code recommended settings applied!"))}}catch(O){o.warn(`Could not configure Claude Code settings: ${O}`)}if(q){let O=!1;try{j6("codex --version",{stdio:"ignore"}),O=!0}catch{}if(O){let D=!1;try{D=j6("claude plugin list",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).includes("codex@openai-codex")}catch{}if(!D)try{j6("claude plugin marketplace add openai/codex-plugin-cc",{stdio:"ignore"}),j6("claude plugin install codex@openai-codex",{stdio:"ignore"}),o.success(B$.default.green("Codex plugin installed for Claude Code!"))}catch(L){o.warn(`Could not install Codex plugin: ${L}`)}}}let H=r0(G,".gemini","antigravity","mcp_config.json"),Q=null,Y=!1;try{if(J2(H)){let O=tG(H,"utf-8");Q=JSON.parse(O),Y=!0}}catch(O){}if(Y&&Q&&Q.mcpServers){let O=Q.mcpServers.serena,D="oh-my-agent@latest";if(!(O&&O.command==="npx"&&Array.isArray(O.args)&&O.args.includes("oh-my-agent@latest")&&O.args.includes("bridge"))){let B=await O$({message:"Configure Serena MCP with bridge? (Required for full functionality)",initialValue:!0});if(e(B));else if(B){Q.mcpServers.serena={command:"npx",args:["-y","oh-my-agent@latest","bridge","http://localhost:12341/mcp"],disabled:!1};try{aG(H,JSON.stringify(Q,null,2)),o.success(B$.default.green("Serena MCP configured successfully!"))}catch(M){o.error(`Failed to update MCP config: ${M}`)}}}}let K=r0(G,".gemini","settings.json"),R=null,P=!1;try{if(J2(K)){let O=tG(K,"utf-8");R=JSON.parse(O),P=!0}}catch(O){}if(P&&R&&R.mcpServers){let O=R.mcpServers.serena;if(!(O&&O.url==="http://localhost:12341/mcp")){let L=await O$({message:"Configure Serena for Gemini CLI? (HTTP Mode)",initialValue:!0});if(e(L));else if(L){R.mcpServers.serena={url:"http://localhost:12341/mcp"};try{aG(K,JSON.stringify(R,null,2)),o.success(B$.default.green("Gemini CLI configured successfully!"))}catch(B){o.error(`Failed to update Gemini config: ${B}`)}}}}if(d(B$.default.green("Done! Open your project in your IDE to use the skills.")),J1()&&r4()&&!N1()){let O=await O$({message:`${B$.default.yellow("⭐")} Star ${B$.default.cyan(L$)} on GitHub? It helps a lot!`});if(!e(O)&&O)try{j6(`gh api -X PUT /user/starred/${L$}`,{stdio:"ignore"}),o.success(`Starred ${B$.default.cyan(L$)}! Thank you! \uD83C\uDF1F`)}catch{o.warn(`Could not star automatically. Try: ${B$.default.dim(`gh api --method PUT /user/starred/${L$}`)}`)}}}catch(J){v.stop("Installation failed"),o.error(J instanceof Error?J.message:String(J)),process.exit(1)}}var B$;var eG=u4(()=>{I4();cG();qI();dG();s4();oG();B$=q$(b$(),1)});import{execSync as Q1}from"node:child_process";function X2($){try{let U=Q1("git diff --stat HEAD~10 2>/dev/null || git diff --stat",{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
283
+ `),_=U[U.length-1]||"",u=_.match(/(\d+) files? changed/),g=_.match(/(\d+) insertions?\(\+\)/),z=_.match(/(\d+) deletions?\(-\)/);return{filesChanged:u?.[1]?parseInt(u[1],10):0,linesAdded:g?.[1]?parseInt(g[1],10):0,linesRemoved:z?.[1]?parseInt(z[1],10):0}}catch{return{filesChanged:0,linesAdded:0,linesRemoved:0}}}function TH($,I=5){try{return Q1(`git log --oneline -${I} 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
284
+ `).filter(Boolean)}catch{return[]}}function g9($){try{return Q1("git diff --name-only HEAD~5 2>/dev/null || git diff --name-only",{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
285
+ `).filter(Boolean).slice(0,10)}catch{return[]}}function QH($,I=10){try{return Q1(`git log --format="%s" -${I} 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
286
+ `).filter(Boolean)}catch{return[]}}function HH($){let I={},U=/^(feat|fix|docs|style|refactor|test|chore|build|ci|perf)(\(.+\))?:/;for(let _ of $){let u=_.match(U);if(u){let g=u[1];if(g)I[g]=(I[g]||0)+1}}return I}function YH($){try{let I=`${$}/.serena/retrospectives`,U=Q1(`ls -t "${I}"/*.json 2>/dev/null | head -1`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim();if(!U)return null;let _=Q1(`cat "${U}"`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]});return JSON.parse(_).date||null}catch{return null}}function OH($,I){if(!I)return QH($,10);try{let _=new Date(I).toISOString().split("T")[0];return Q1(`git log --format="%s" --since="${_}" 2>/dev/null`,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim().split(`
287
+ `).filter(Boolean)}catch{return QH($,10)}}var z9=()=>{};var BH={};D4(BH,{retro:()=>zw});import{existsSync as DH,mkdirSync as $w,readdirSync as Iw,readFileSync as uw,writeFileSync as Uw}from"node:fs";import{join as v9}from"node:path";function J9($){return v9($,".serena","retrospectives")}function _w($){let I=J9($);if(!DH(I))return[];try{return Iw(I).filter((_)=>_.endsWith(".json")).sort().reverse().slice(0,10).map((_)=>JSON.parse(uw(v9(I,_),"utf-8")))}catch{return[]}}function VH($,I){let U=J9($);if(!DH(U))$w(U,{recursive:!0});let _=`${I.date.replace(/[:.]/g,"-")}_${I.id}.json`;Uw(v9(U,_),JSON.stringify(I,null,2),"utf-8")}function gw($){let I=YH($),U=OH($,I),_=HH(U),u=X2($),g=K7($),z=L7($,I||void 0),v=Object.entries(_).sort(([,G],[,q])=>q-G)[0],J="Development session";if(v){let[G]=v;J={feat:"Feature development",fix:"Bug fixes and improvements",refactor:"Code refactoring",docs:"Documentation updates",test:"Testing improvements",chore:"Maintenance tasks",build:"Build system updates",perf:"Performance improvements"}[G]||"Development session"}if(u.filesChanged>0)J+=` (${u.filesChanged} files, +${u.linesAdded}/-${u.linesRemoved})`;if(g.agents.length>0)J+=` with ${g.agents.join(", ")}`;let N=W7(z);if(U.length>0&&N.length===0){if(_.refactor||_.perf)N.push("Code quality and performance improvements");if(_.test)N.push("Enhanced test coverage");if(_.fix)N.push("Issue resolution and stability improvements")}let X=[];if(g.inProgressTasks.length>0)X.push(...g.inProgressTasks.slice(0,3));if(U.length>0){let G=U[0]?.toLowerCase()||"";if(G.includes("wip")||G.includes("todo"))X.push("Complete work-in-progress items")}if(X.length===0)X.push("Continue development","Review and test changes");return{summary:J,learnings:N.slice(0,5),nextSteps:X.slice(0,5)}}async function zw(){let $=process.cwd(),I=J9($),U=_w($);console.clear(),V$(j$.default.bgMagenta(j$.default.white(" retro (interactive) ")));let _=U[0];if(_)k([j$.default.bold("Last Retrospective"),`Date: ${_.date}`,"",j$.default.bold("Summary:"),_.summary,"",j$.default.bold("Key Learnings:"),..._.keyLearnings.map((G)=>` - ${G}`),"",j$.default.bold("Next Steps:"),..._.nextSteps.map((G)=>` > ${G}`)].join(`
288
+ `),"Previous Session");let u=await z1({message:"What would you like to do?",options:[{value:"auto",label:"Auto-generate from git history",hint:"Analyze commits and agent activity"},{value:"manual",label:"Create manually",hint:"Write your own retrospective"},{value:"list",label:"View past retrospectives"},{value:"exit",label:"Exit"}]});if(e(u)||u==="exit"){d(j$.default.dim("Goodbye!"));return}if(u==="list"){if(U.length===0)k(j$.default.yellow("No retrospectives found."),"History");else{let G=U.map((q,T)=>`${T+1}. [${q.date.split("T")[0]}] ${q.summary.slice(0,50)}...`).join(`
289
+ `);k(G,`Past Retrospectives (${U.length})`)}d(j$.default.dim(`Stored in: ${I}`));return}if(u==="auto"){let{summary:G,learnings:q,nextSteps:T}=gw($),H=g9($);k([j$.default.bold("Auto-generated Content"),"",j$.default.bold("Summary:"),G,"",j$.default.bold("Key Learnings:"),...q.map((K)=>` - ${K}`),"",j$.default.bold("Next Steps:"),...T.map((K)=>` > ${K}`)].join(`
290
+ `),"Preview");let Q=await O$({message:"Save this retrospective?",initialValue:!0});if(e(Q)||!Q){g4("Cancelled.");return}let Y={id:Math.random().toString(36).slice(2,8),date:new Date().toISOString(),summary:G,keyLearnings:q,filesChanged:H,nextSteps:T};VH($,Y),k(j$.default.green("Retrospective saved!"),"Done"),d(j$.default.dim(`Stored in: ${I}`));return}let g=TH($),z=g9($);if(g.length>0)k(g.join(`
290
291
  `),"Recent Commits");if(z.length>0)k(z.join(`
291
- `),"Changed Files");let v=await m_({message:"What did you accomplish in this session?",placeholder:"e.g., Implemented user authentication flow"});if(e(v)){U4("Cancelled.");return}let J=await m_({message:"Key learnings? (comma-separated)",placeholder:"e.g., JWT needs refresh token, bcrypt is slow"});if(e(J)){U4("Cancelled.");return}let N=await m_({message:"Next steps? (comma-separated)",placeholder:"e.g., Add password reset, Write tests"});if(e(N)){U4("Cancelled.");return}let X={id:Math.random().toString(36).slice(2,8),date:new Date().toISOString(),summary:v,keyLearnings:J.split(",").map((G)=>G.trim()).filter(Boolean),filesChanged:z,nextSteps:N.split(",").map((G)=>G.trim()).filter(Boolean)};OH($,X),k(j$.default.green("Retrospective saved!"),"Done"),d(j$.default.dim(`Stored in: ${I}`))}var j$;var BH=$4(()=>{s$();_9();b0();j$=q$(b$(),1)});var u6=E((Hm,MY)=>{var VY=["nodebuffer","arraybuffer","fragments"],BY=typeof Blob<"u";if(BY)VY.push("blob");MY.exports={BINARY_TYPES:VY,CLOSE_TIMEOUT:30000,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:BY,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var n0=E((Ym,R2)=>{var{EMPTY_BUFFER:fE}=u6(),K9=Buffer[Symbol.species];function xE($,I){if($.length===0)return fE;if($.length===1)return $[0];let U=Buffer.allocUnsafe(I),_=0;for(let u=0;u<$.length;u++){let g=$[u];U.set(g,_),_+=g.length}if(_<I)return new K9(U.buffer,U.byteOffset,_);return U}function RY($,I,U,_,u){for(let g=0;g<u;g++)U[_+g]=$[g]^I[g&3]}function KY($,I){for(let U=0;U<$.length;U++)$[U]^=I[U&3]}function kE($){if($.length===$.buffer.byteLength)return $.buffer;return $.buffer.slice($.byteOffset,$.byteOffset+$.length)}function L9($){if(L9.readOnly=!0,Buffer.isBuffer($))return $;let I;if($ instanceof ArrayBuffer)I=new K9($);else if(ArrayBuffer.isView($))I=new K9($.buffer,$.byteOffset,$.byteLength);else I=Buffer.from($),L9.readOnly=!1;return I}R2.exports={concat:xE,mask:RY,toArrayBuffer:kE,toBuffer:L9,unmask:KY};if(!process.env.WS_NO_BUFFER_UTIL)try{let $=(()=>{throw new Error("Cannot require module "+"bufferutil");})();R2.exports.mask=function(I,U,_,u,g){if(g<48)RY(I,U,_,u,g);else $.mask(I,U,_,u,g)},R2.exports.unmask=function(I,U){if(I.length<32)KY(I,U);else $.unmask(I,U)}}catch($){}});var ZY=E((Om,WY)=>{var LY=Symbol("kDone"),P9=Symbol("kRun");class PY{constructor($){this[LY]=()=>{this.pending--,this[P9]()},this.concurrency=$||1/0,this.jobs=[],this.pending=0}add($){this.jobs.push($),this[P9]()}[P9](){if(this.pending===this.concurrency)return;if(this.jobs.length){let $=this.jobs.shift();this.pending++,$(this[LY])}}}WY.exports=PY});var l0=E((Dm,SY)=>{var r0=g$("zlib"),AY=n0(),yE=ZY(),{kStatusCode:bY}=u6(),iE=Buffer[Symbol.species],nE=Buffer.from([0,0,255,255]),L2=Symbol("permessage-deflate"),U6=Symbol("total-length"),HI=Symbol("callback"),S6=Symbol("buffers"),YI=Symbol("error"),K2;class jY{constructor($,I,U){if(this._maxPayload=U|0,this._options=$||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!I,this._deflate=null,this._inflate=null,this.params=null,!K2){let _=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;K2=new yE(_)}}static get extensionName(){return"permessage-deflate"}offer(){let $={};if(this._options.serverNoContextTakeover)$.server_no_context_takeover=!0;if(this._options.clientNoContextTakeover)$.client_no_context_takeover=!0;if(this._options.serverMaxWindowBits)$.server_max_window_bits=this._options.serverMaxWindowBits;if(this._options.clientMaxWindowBits)$.client_max_window_bits=this._options.clientMaxWindowBits;else if(this._options.clientMaxWindowBits==null)$.client_max_window_bits=!0;return $}accept($){return $=this.normalizeParams($),this.params=this._isServer?this.acceptAsServer($):this.acceptAsClient($),this.params}cleanup(){if(this._inflate)this._inflate.close(),this._inflate=null;if(this._deflate){let $=this._deflate[HI];if(this._deflate.close(),this._deflate=null,$)$(Error("The deflate stream was closed while data was being processed"))}}acceptAsServer($){let I=this._options,U=$.find((_)=>{if(I.serverNoContextTakeover===!1&&_.server_no_context_takeover||_.server_max_window_bits&&(I.serverMaxWindowBits===!1||typeof I.serverMaxWindowBits==="number"&&I.serverMaxWindowBits>_.server_max_window_bits)||typeof I.clientMaxWindowBits==="number"&&!_.client_max_window_bits)return!1;return!0});if(!U)throw Error("None of the extension offers can be accepted");if(I.serverNoContextTakeover)U.server_no_context_takeover=!0;if(I.clientNoContextTakeover)U.client_no_context_takeover=!0;if(typeof I.serverMaxWindowBits==="number")U.server_max_window_bits=I.serverMaxWindowBits;if(typeof I.clientMaxWindowBits==="number")U.client_max_window_bits=I.clientMaxWindowBits;else if(U.client_max_window_bits===!0||I.clientMaxWindowBits===!1)delete U.client_max_window_bits;return U}acceptAsClient($){let I=$[0];if(this._options.clientNoContextTakeover===!1&&I.client_no_context_takeover)throw Error('Unexpected parameter "client_no_context_takeover"');if(!I.client_max_window_bits){if(typeof this._options.clientMaxWindowBits==="number")I.client_max_window_bits=this._options.clientMaxWindowBits}else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits==="number"&&I.client_max_window_bits>this._options.clientMaxWindowBits)throw Error('Unexpected or invalid parameter "client_max_window_bits"');return I}normalizeParams($){return $.forEach((I)=>{Object.keys(I).forEach((U)=>{let _=I[U];if(_.length>1)throw Error(`Parameter "${U}" must have only a single value`);if(_=_[0],U==="client_max_window_bits"){if(_!==!0){let u=+_;if(!Number.isInteger(u)||u<8||u>15)throw TypeError(`Invalid value for parameter "${U}": ${_}`);_=u}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${U}": ${_}`)}else if(U==="server_max_window_bits"){let u=+_;if(!Number.isInteger(u)||u<8||u>15)throw TypeError(`Invalid value for parameter "${U}": ${_}`);_=u}else if(U==="client_no_context_takeover"||U==="server_no_context_takeover"){if(_!==!0)throw TypeError(`Invalid value for parameter "${U}": ${_}`)}else throw Error(`Unknown parameter "${U}"`);I[U]=_})}),$}decompress($,I,U){K2.add((_)=>{this._decompress($,I,(u,g)=>{_(),U(u,g)})})}compress($,I,U){K2.add((_)=>{this._compress($,I,(u,g)=>{_(),U(u,g)})})}_decompress($,I,U){let _=this._isServer?"client":"server";if(!this._inflate){let u=`${_}_max_window_bits`,g=typeof this.params[u]!=="number"?r0.Z_DEFAULT_WINDOWBITS:this.params[u];this._inflate=r0.createInflateRaw({...this._options.zlibInflateOptions,windowBits:g}),this._inflate[L2]=this,this._inflate[U6]=0,this._inflate[S6]=[],this._inflate.on("error",lE),this._inflate.on("data",FY)}if(this._inflate[HI]=U,this._inflate.write($),I)this._inflate.write(nE);this._inflate.flush(()=>{let u=this._inflate[YI];if(u){this._inflate.close(),this._inflate=null,U(u);return}let g=AY.concat(this._inflate[S6],this._inflate[U6]);if(this._inflate._readableState.endEmitted)this._inflate.close(),this._inflate=null;else if(this._inflate[U6]=0,this._inflate[S6]=[],I&&this.params[`${_}_no_context_takeover`])this._inflate.reset();U(null,g)})}_compress($,I,U){let _=this._isServer?"server":"client";if(!this._deflate){let u=`${_}_max_window_bits`,g=typeof this.params[u]!=="number"?r0.Z_DEFAULT_WINDOWBITS:this.params[u];this._deflate=r0.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:g}),this._deflate[U6]=0,this._deflate[S6]=[],this._deflate.on("data",rE)}this._deflate[HI]=U,this._deflate.write($),this._deflate.flush(r0.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let u=AY.concat(this._deflate[S6],this._deflate[U6]);if(I)u=new iE(u.buffer,u.byteOffset,u.length-4);if(this._deflate[HI]=null,this._deflate[U6]=0,this._deflate[S6]=[],I&&this.params[`${_}_no_context_takeover`])this._deflate.reset();U(null,u)})}}SY.exports=jY;function rE($){this[S6].push($),this[U6]+=$.length}function FY($){if(this[U6]+=$.length,this[L2]._maxPayload<1||this[U6]<=this[L2]._maxPayload){this[S6].push($);return}this[YI]=RangeError("Max payload size exceeded"),this[YI].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[YI][bY]=1009,this.removeListener("data",FY),this.reset()}function lE($){if(this[L2]._inflate=null,this[YI]){this[HI](this[YI]);return}$[bY]=1007,this[HI]($)}});var OI=E((Vm,P2)=>{var{isUtf8:wY}=g$("buffer"),{hasBlob:mE}=u6(),hE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function cE($){return $>=1000&&$<=1014&&$!==1004&&$!==1005&&$!==1006||$>=3000&&$<=4999}function W9($){let I=$.length,U=0;while(U<I)if(($[U]&128)===0)U++;else if(($[U]&224)===192){if(U+1===I||($[U+1]&192)!==128||($[U]&254)===192)return!1;U+=2}else if(($[U]&240)===224){if(U+2>=I||($[U+1]&192)!==128||($[U+2]&192)!==128||$[U]===224&&($[U+1]&224)===128||$[U]===237&&($[U+1]&224)===160)return!1;U+=3}else if(($[U]&248)===240){if(U+3>=I||($[U+1]&192)!==128||($[U+2]&192)!==128||($[U+3]&192)!==128||$[U]===240&&($[U+1]&240)===128||$[U]===244&&$[U+1]>143||$[U]>244)return!1;U+=4}else return!1;return!0}function dE($){return mE&&typeof $==="object"&&typeof $.arrayBuffer==="function"&&typeof $.type==="string"&&typeof $.stream==="function"&&($[Symbol.toStringTag]==="Blob"||$[Symbol.toStringTag]==="File")}P2.exports={isBlob:dE,isValidStatusCode:cE,isValidUTF8:W9,tokenChars:hE};if(wY)P2.exports.isValidUTF8=function($){return $.length<24?W9($):wY($)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let $=(()=>{throw new Error("Cannot require module "+"utf-8-validate");})();P2.exports.isValidUTF8=function(I){return I.length<32?W9(I):$(I)}}catch($){}});var A9=E((Bm,kY)=>{var{Writable:pE}=g$("stream"),EY=l0(),{BINARY_TYPES:oE,EMPTY_BUFFER:CY,kStatusCode:tE,kWebSocket:aE}=u6(),{concat:Z9,toArrayBuffer:eE,unmask:sE}=n0(),{isValidStatusCode:$C,isValidUTF8:fY}=OI(),W2=Buffer[Symbol.species];class xY extends pE{constructor($={}){super();this._allowSynchronousEvents=$.allowSynchronousEvents!==void 0?$.allowSynchronousEvents:!0,this._binaryType=$.binaryType||oE[0],this._extensions=$.extensions||{},this._isServer=!!$.isServer,this._maxPayload=$.maxPayload|0,this._skipUTF8Validation=!!$.skipUTF8Validation,this[aE]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write($,I,U){if(this._opcode===8&&this._state==0)return U();this._bufferedBytes+=$.length,this._buffers.push($),this.startLoop(U)}consume($){if(this._bufferedBytes-=$,$===this._buffers[0].length)return this._buffers.shift();if($<this._buffers[0].length){let U=this._buffers[0];return this._buffers[0]=new W2(U.buffer,U.byteOffset+$,U.length-$),new W2(U.buffer,U.byteOffset,$)}let I=Buffer.allocUnsafe($);do{let U=this._buffers[0],_=I.length-$;if($>=U.length)I.set(this._buffers.shift(),_);else I.set(new Uint8Array(U.buffer,U.byteOffset,$),_),this._buffers[0]=new W2(U.buffer,U.byteOffset+$,U.length-$);$-=U.length}while($>0);return I}startLoop($){this._loop=!0;do switch(this._state){case 0:this.getInfo($);break;case 1:this.getPayloadLength16($);break;case 2:this.getPayloadLength64($);break;case 3:this.getMask();break;case 4:this.getData($);break;case 5:case 6:this._loop=!1;return}while(this._loop);if(!this._errored)$()}getInfo($){if(this._bufferedBytes<2){this._loop=!1;return}let I=this.consume(2);if((I[0]&48)!==0){let _=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");$(_);return}let U=(I[0]&64)===64;if(U&&!this._extensions[EY.extensionName]){let _=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(_);return}if(this._fin=(I[0]&128)===128,this._opcode=I[0]&15,this._payloadLength=I[1]&127,this._opcode===0){if(U){let _=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(_);return}if(!this._fragmented){let _=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");$(_);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let _=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");$(_);return}this._compressed=U}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let _=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");$(_);return}if(U){let _=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(_);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let _=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");$(_);return}}else{let _=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");$(_);return}if(!this._fin&&!this._fragmented)this._fragmented=this._opcode;if(this._masked=(I[1]&128)===128,this._isServer){if(!this._masked){let _=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");$(_);return}}else if(this._masked){let _=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");$(_);return}if(this._payloadLength===126)this._state=1;else if(this._payloadLength===127)this._state=2;else this.haveLength($)}getPayloadLength16($){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength($)}getPayloadLength64($){if(this._bufferedBytes<8){this._loop=!1;return}let I=this.consume(8),U=I.readUInt32BE(0);if(U>Math.pow(2,21)-1){let _=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");$(_);return}this._payloadLength=U*Math.pow(2,32)+I.readUInt32BE(4),this.haveLength($)}haveLength($){if(this._payloadLength&&this._opcode<8){if(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0){let I=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");$(I);return}}if(this._masked)this._state=3;else this._state=4}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=4}getData($){let I=CY;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}if(I=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0)sE(I,this._mask)}if(this._opcode>7){this.controlMessage(I,$);return}if(this._compressed){this._state=5,this.decompress(I,$);return}if(I.length)this._messageLength=this._totalPayloadLength,this._fragments.push(I);this.dataMessage($)}decompress($,I){this._extensions[EY.extensionName].decompress($,this._fin,(_,u)=>{if(_)return I(_);if(u.length){if(this._messageLength+=u.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let g=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");I(g);return}this._fragments.push(u)}if(this.dataMessage(I),this._state===0)this.startLoop(I)})}dataMessage($){if(!this._fin){this._state=0;return}let I=this._messageLength,U=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let _;if(this._binaryType==="nodebuffer")_=Z9(U,I);else if(this._binaryType==="arraybuffer")_=eE(Z9(U,I));else if(this._binaryType==="blob")_=new Blob(U);else _=U;if(this._allowSynchronousEvents)this.emit("message",_,!0),this._state=0;else this._state=6,setImmediate(()=>{this.emit("message",_,!0),this._state=0,this.startLoop($)})}else{let _=Z9(U,I);if(!this._skipUTF8Validation&&!fY(_)){let u=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");$(u);return}if(this._state===5||this._allowSynchronousEvents)this.emit("message",_,!1),this._state=0;else this._state=6,setImmediate(()=>{this.emit("message",_,!1),this._state=0,this.startLoop($)})}}controlMessage($,I){if(this._opcode===8){if($.length===0)this._loop=!1,this.emit("conclude",1005,CY),this.end();else{let U=$.readUInt16BE(0);if(!$C(U)){let u=this.createError(RangeError,`invalid status code ${U}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");I(u);return}let _=new W2($.buffer,$.byteOffset+2,$.length-2);if(!this._skipUTF8Validation&&!fY(_)){let u=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");I(u);return}this._loop=!1,this.emit("conclude",U,_),this.end()}this._state=0;return}if(this._allowSynchronousEvents)this.emit(this._opcode===9?"ping":"pong",$),this._state=0;else this._state=6,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",$),this._state=0,this.startLoop(I)})}createError($,I,U,_,u){this._loop=!1,this._errored=!0;let g=new $(U?`Invalid WebSocket frame: ${I}`:I);return Error.captureStackTrace(g,this.createError),g.code=u,g[tE]=_,g}}kY.exports=xY});var j9=E((Rm,nY)=>{var{Duplex:Mm}=g$("stream"),{randomFillSync:IC}=g$("crypto"),yY=l0(),{EMPTY_BUFFER:uC,kWebSocket:UC,NOOP:_C}=u6(),{isBlob:DI,isValidStatusCode:gC}=OI(),{mask:iY,toBuffer:H1}=n0(),Y4=Symbol("kByteLength"),zC=Buffer.alloc(4),Y1,VI=8192,W4=0,vC=1,JC=2;class w6{constructor($,I,U){if(this._extensions=I||{},U)this._generateMask=U,this._maskBuffer=Buffer.alloc(4);this._socket=$,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=W4,this.onerror=_C,this[UC]=void 0}static frame($,I){let U,_=!1,u=2,g=!1;if(I.mask){if(U=I.maskBuffer||zC,I.generateMask)I.generateMask(U);else{if(VI===8192){if(Y1===void 0)Y1=Buffer.alloc(8192);IC(Y1,0,8192),VI=0}U[0]=Y1[VI++],U[1]=Y1[VI++],U[2]=Y1[VI++],U[3]=Y1[VI++]}g=(U[0]|U[1]|U[2]|U[3])===0,u=6}let z;if(typeof $==="string")if((!I.mask||g)&&I[Y4]!==void 0)z=I[Y4];else $=Buffer.from($),z=$.length;else z=$.length,_=I.mask&&I.readOnly&&!g;let v=z;if(z>=65536)u+=8,v=127;else if(z>125)u+=2,v=126;let J=Buffer.allocUnsafe(_?z+u:u);if(J[0]=I.fin?I.opcode|128:I.opcode,I.rsv1)J[0]|=64;if(J[1]=v,v===126)J.writeUInt16BE(z,2);else if(v===127)J[2]=J[3]=0,J.writeUIntBE(z,4,6);if(!I.mask)return[J,$];if(J[1]|=128,J[u-4]=U[0],J[u-3]=U[1],J[u-2]=U[2],J[u-1]=U[3],g)return[J,$];if(_)return iY($,U,J,u,z),[J];return iY($,U,$,0,z),[J,$]}close($,I,U,_){let u;if($===void 0)u=uC;else if(typeof $!=="number"||!gC($))throw TypeError("First argument must be a valid error code number");else if(I===void 0||!I.length)u=Buffer.allocUnsafe(2),u.writeUInt16BE($,0);else{let z=Buffer.byteLength(I);if(z>123)throw RangeError("The message must not be greater than 123 bytes");if(u=Buffer.allocUnsafe(2+z),u.writeUInt16BE($,0),typeof I==="string")u.write(I,2);else u.set(I,2)}let g={[Y4]:u.length,fin:!0,generateMask:this._generateMask,mask:U,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};if(this._state!==W4)this.enqueue([this.dispatch,u,!1,g,_]);else this.sendFrame(w6.frame(u,g),_)}ping($,I,U){let _,u;if(typeof $==="string")_=Buffer.byteLength($),u=!1;else if(DI($))_=$.size,u=!1;else $=H1($),_=$.length,u=H1.readOnly;if(_>125)throw RangeError("The data size must not be greater than 125 bytes");let g={[Y4]:_,fin:!0,generateMask:this._generateMask,mask:I,maskBuffer:this._maskBuffer,opcode:9,readOnly:u,rsv1:!1};if(DI($))if(this._state!==W4)this.enqueue([this.getBlobData,$,!1,g,U]);else this.getBlobData($,!1,g,U);else if(this._state!==W4)this.enqueue([this.dispatch,$,!1,g,U]);else this.sendFrame(w6.frame($,g),U)}pong($,I,U){let _,u;if(typeof $==="string")_=Buffer.byteLength($),u=!1;else if(DI($))_=$.size,u=!1;else $=H1($),_=$.length,u=H1.readOnly;if(_>125)throw RangeError("The data size must not be greater than 125 bytes");let g={[Y4]:_,fin:!0,generateMask:this._generateMask,mask:I,maskBuffer:this._maskBuffer,opcode:10,readOnly:u,rsv1:!1};if(DI($))if(this._state!==W4)this.enqueue([this.getBlobData,$,!1,g,U]);else this.getBlobData($,!1,g,U);else if(this._state!==W4)this.enqueue([this.dispatch,$,!1,g,U]);else this.sendFrame(w6.frame($,g),U)}send($,I,U){let _=this._extensions[yY.extensionName],u=I.binary?2:1,g=I.compress,z,v;if(typeof $==="string")z=Buffer.byteLength($),v=!1;else if(DI($))z=$.size,v=!1;else $=H1($),z=$.length,v=H1.readOnly;if(this._firstFragment){if(this._firstFragment=!1,g&&_&&_.params[_._isServer?"server_no_context_takeover":"client_no_context_takeover"])g=z>=_._threshold;this._compress=g}else g=!1,u=0;if(I.fin)this._firstFragment=!0;let J={[Y4]:z,fin:I.fin,generateMask:this._generateMask,mask:I.mask,maskBuffer:this._maskBuffer,opcode:u,readOnly:v,rsv1:g};if(DI($))if(this._state!==W4)this.enqueue([this.getBlobData,$,this._compress,J,U]);else this.getBlobData($,this._compress,J,U);else if(this._state!==W4)this.enqueue([this.dispatch,$,this._compress,J,U]);else this.dispatch($,this._compress,J,U)}getBlobData($,I,U,_){this._bufferedBytes+=U[Y4],this._state=JC,$.arrayBuffer().then((u)=>{if(this._socket.destroyed){let z=Error("The socket was closed while the blob was being read");process.nextTick(b9,this,z,_);return}this._bufferedBytes-=U[Y4];let g=H1(u);if(!I)this._state=W4,this.sendFrame(w6.frame(g,U),_),this.dequeue();else this.dispatch(g,I,U,_)}).catch((u)=>{process.nextTick(NC,this,u,_)})}dispatch($,I,U,_){if(!I){this.sendFrame(w6.frame($,U),_);return}let u=this._extensions[yY.extensionName];this._bufferedBytes+=U[Y4],this._state=vC,u.compress($,U.fin,(g,z)=>{if(this._socket.destroyed){let v=Error("The socket was closed while data was being compressed");b9(this,v,_);return}this._bufferedBytes-=U[Y4],this._state=W4,U.readOnly=!1,this.sendFrame(w6.frame(z,U),_),this.dequeue()})}dequeue(){while(this._state===W4&&this._queue.length){let $=this._queue.shift();this._bufferedBytes-=$[3][Y4],Reflect.apply($[0],this,$.slice(1))}}enqueue($){this._bufferedBytes+=$[3][Y4],this._queue.push($)}sendFrame($,I){if($.length===2)this._socket.cork(),this._socket.write($[0]),this._socket.write($[1],I),this._socket.uncork();else this._socket.write($[0],I)}}nY.exports=w6;function b9($,I,U){if(typeof U==="function")U(I);for(let _=0;_<$._queue.length;_++){let u=$._queue[_],g=u[u.length-1];if(typeof g==="function")g(I)}}function NC($,I,U){b9($,I,U),$.onerror(I)}});var tY=E((Km,oY)=>{var{kForOnEventAttribute:m0,kListener:F9}=u6(),rY=Symbol("kCode"),lY=Symbol("kData"),mY=Symbol("kError"),hY=Symbol("kMessage"),cY=Symbol("kReason"),BI=Symbol("kTarget"),dY=Symbol("kType"),pY=Symbol("kWasClean");class E6{constructor($){this[BI]=null,this[dY]=$}get target(){return this[BI]}get type(){return this[dY]}}Object.defineProperty(E6.prototype,"target",{enumerable:!0});Object.defineProperty(E6.prototype,"type",{enumerable:!0});class MI extends E6{constructor($,I={}){super($);this[rY]=I.code===void 0?0:I.code,this[cY]=I.reason===void 0?"":I.reason,this[pY]=I.wasClean===void 0?!1:I.wasClean}get code(){return this[rY]}get reason(){return this[cY]}get wasClean(){return this[pY]}}Object.defineProperty(MI.prototype,"code",{enumerable:!0});Object.defineProperty(MI.prototype,"reason",{enumerable:!0});Object.defineProperty(MI.prototype,"wasClean",{enumerable:!0});class h0 extends E6{constructor($,I={}){super($);this[mY]=I.error===void 0?null:I.error,this[hY]=I.message===void 0?"":I.message}get error(){return this[mY]}get message(){return this[hY]}}Object.defineProperty(h0.prototype,"error",{enumerable:!0});Object.defineProperty(h0.prototype,"message",{enumerable:!0});class A2 extends E6{constructor($,I={}){super($);this[lY]=I.data===void 0?null:I.data}get data(){return this[lY]}}Object.defineProperty(A2.prototype,"data",{enumerable:!0});var GC={addEventListener($,I,U={}){for(let u of this.listeners($))if(!U[m0]&&u[F9]===I&&!u[m0])return;let _;if($==="message")_=function(g,z){let v=new A2("message",{data:z?g:g.toString()});v[BI]=this,Z2(I,this,v)};else if($==="close")_=function(g,z){let v=new MI("close",{code:g,reason:z.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});v[BI]=this,Z2(I,this,v)};else if($==="error")_=function(g){let z=new h0("error",{error:g,message:g.message});z[BI]=this,Z2(I,this,z)};else if($==="open")_=function(){let g=new E6("open");g[BI]=this,Z2(I,this,g)};else return;if(_[m0]=!!U[m0],_[F9]=I,U.once)this.once($,_);else this.on($,_)},removeEventListener($,I){for(let U of this.listeners($))if(U[F9]===I&&!U[m0]){this.removeListener($,U);break}}};oY.exports={CloseEvent:MI,ErrorEvent:h0,Event:E6,EventTarget:GC,MessageEvent:A2};function Z2($,I,U){if(typeof $==="object"&&$.handleEvent)$.handleEvent.call($,U);else $.call(I,U)}});var S9=E((Lm,aY)=>{var{tokenChars:c0}=OI();function n4($,I,U){if($[I]===void 0)$[I]=[U];else $[I].push(U)}function XC($){let I=Object.create(null),U=Object.create(null),_=!1,u=!1,g=!1,z,v,J=-1,N=-1,X=-1,G=0;for(;G<$.length;G++)if(N=$.charCodeAt(G),z===void 0)if(X===-1&&c0[N]===1){if(J===-1)J=G}else if(G!==0&&(N===32||N===9)){if(X===-1&&J!==-1)X=G}else if(N===59||N===44){if(J===-1)throw SyntaxError(`Unexpected character at index ${G}`);if(X===-1)X=G;let T=$.slice(J,X);if(N===44)n4(I,T,U),U=Object.create(null);else z=T;J=X=-1}else throw SyntaxError(`Unexpected character at index ${G}`);else if(v===void 0)if(X===-1&&c0[N]===1){if(J===-1)J=G}else if(N===32||N===9){if(X===-1&&J!==-1)X=G}else if(N===59||N===44){if(J===-1)throw SyntaxError(`Unexpected character at index ${G}`);if(X===-1)X=G;if(n4(U,$.slice(J,X),!0),N===44)n4(I,z,U),U=Object.create(null),z=void 0;J=X=-1}else if(N===61&&J!==-1&&X===-1)v=$.slice(J,G),J=X=-1;else throw SyntaxError(`Unexpected character at index ${G}`);else if(u){if(c0[N]!==1)throw SyntaxError(`Unexpected character at index ${G}`);if(J===-1)J=G;else if(!_)_=!0;u=!1}else if(g)if(c0[N]===1){if(J===-1)J=G}else if(N===34&&J!==-1)g=!1,X=G;else if(N===92)u=!0;else throw SyntaxError(`Unexpected character at index ${G}`);else if(N===34&&$.charCodeAt(G-1)===61)g=!0;else if(X===-1&&c0[N]===1){if(J===-1)J=G}else if(J!==-1&&(N===32||N===9)){if(X===-1)X=G}else if(N===59||N===44){if(J===-1)throw SyntaxError(`Unexpected character at index ${G}`);if(X===-1)X=G;let T=$.slice(J,X);if(_)T=T.replace(/\\/g,""),_=!1;if(n4(U,v,T),N===44)n4(I,z,U),U=Object.create(null),z=void 0;v=void 0,J=X=-1}else throw SyntaxError(`Unexpected character at index ${G}`);if(J===-1||g||N===32||N===9)throw SyntaxError("Unexpected end of input");if(X===-1)X=G;let q=$.slice(J,X);if(z===void 0)n4(I,q,U);else{if(v===void 0)n4(U,q,!0);else if(_)n4(U,v,q.replace(/\\/g,""));else n4(U,v,q);n4(I,z,U)}return I}function qC($){return Object.keys($).map((I)=>{let U=$[I];if(!Array.isArray(U))U=[U];return U.map((_)=>{return[I].concat(Object.keys(_).map((u)=>{let g=_[u];if(!Array.isArray(g))g=[g];return g.map((z)=>z===!0?u:`${u}=${z}`).join("; ")})).join("; ")}).join(", ")}).join(", ")}aY.exports={format:qC,parse:XC}});var S2=E((Zm,NO)=>{var QC=g$("events"),TC=g$("https"),HC=g$("http"),$O=g$("net"),YC=g$("tls"),{randomBytes:OC,createHash:DC}=g$("crypto"),{Duplex:Pm,Readable:Wm}=g$("stream"),{URL:w9}=g$("url"),C6=l0(),VC=A9(),BC=j9(),{isBlob:MC}=OI(),{BINARY_TYPES:eY,CLOSE_TIMEOUT:RC,EMPTY_BUFFER:b2,GUID:KC,kForOnEventAttribute:E9,kListener:LC,kStatusCode:PC,kWebSocket:S$,NOOP:IO}=u6(),{EventTarget:{addEventListener:WC,removeEventListener:ZC}}=tY(),{format:AC,parse:bC}=S9(),{toBuffer:jC}=n0(),uO=Symbol("kAborted"),C9=[8,13],_6=["CONNECTING","OPEN","CLOSING","CLOSED"],FC=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class h extends QC{constructor($,I,U){super();if(this._binaryType=eY[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=b2,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=h.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,$!==null){if(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,I===void 0)I=[];else if(!Array.isArray(I))if(typeof I==="object"&&I!==null)U=I,I=[];else I=[I];UO(this,$,I,U)}else this._autoPong=U.autoPong,this._closeTimeout=U.closeTimeout,this._isServer=!0}get binaryType(){return this._binaryType}set binaryType($){if(!eY.includes($))return;if(this._binaryType=$,this._receiver)this._receiver._binaryType=$}get bufferedAmount(){if(!this._socket)return this._bufferedAmount;return this._socket._writableState.length+this._sender._bufferedBytes}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket($,I,U){let _=new VC({allowSynchronousEvents:U.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:U.maxPayload,skipUTF8Validation:U.skipUTF8Validation}),u=new BC($,this._extensions,U.generateMask);if(this._receiver=_,this._sender=u,this._socket=$,_[S$]=this,u[S$]=this,$[S$]=this,_.on("conclude",EC),_.on("drain",CC),_.on("error",fC),_.on("message",xC),_.on("ping",kC),_.on("pong",yC),u.onerror=iC,$.setTimeout)$.setTimeout(0);if($.setNoDelay)$.setNoDelay();if(I.length>0)$.unshift(I);$.on("close",zO),$.on("data",F2),$.on("end",vO),$.on("error",JO),this._readyState=h.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=h.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}if(this._extensions[C6.extensionName])this._extensions[C6.extensionName].cleanup();this._receiver.removeAllListeners(),this._readyState=h.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close($,I){if(this.readyState===h.CLOSED)return;if(this.readyState===h.CONNECTING){N4(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===h.CLOSING){if(this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted))this._socket.end();return}this._readyState=h.CLOSING,this._sender.close($,I,!this._isServer,(U)=>{if(U)return;if(this._closeFrameSent=!0,this._closeFrameReceived||this._receiver._writableState.errorEmitted)this._socket.end()}),gO(this)}pause(){if(this.readyState===h.CONNECTING||this.readyState===h.CLOSED)return;this._paused=!0,this._socket.pause()}ping($,I,U){if(this.readyState===h.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof $==="function")U=$,$=I=void 0;else if(typeof I==="function")U=I,I=void 0;if(typeof $==="number")$=$.toString();if(this.readyState!==h.OPEN){f9(this,$,U);return}if(I===void 0)I=!this._isServer;this._sender.ping($||b2,I,U)}pong($,I,U){if(this.readyState===h.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof $==="function")U=$,$=I=void 0;else if(typeof I==="function")U=I,I=void 0;if(typeof $==="number")$=$.toString();if(this.readyState!==h.OPEN){f9(this,$,U);return}if(I===void 0)I=!this._isServer;this._sender.pong($||b2,I,U)}resume(){if(this.readyState===h.CONNECTING||this.readyState===h.CLOSED)return;if(this._paused=!1,!this._receiver._writableState.needDrain)this._socket.resume()}send($,I,U){if(this.readyState===h.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof I==="function")U=I,I={};if(typeof $==="number")$=$.toString();if(this.readyState!==h.OPEN){f9(this,$,U);return}let _={binary:typeof $!=="string",mask:!this._isServer,compress:!0,fin:!0,...I};if(!this._extensions[C6.extensionName])_.compress=!1;this._sender.send($||b2,_,U)}terminate(){if(this.readyState===h.CLOSED)return;if(this.readyState===h.CONNECTING){N4(this,this._req,"WebSocket was closed before the connection was established");return}if(this._socket)this._readyState=h.CLOSING,this._socket.destroy()}}Object.defineProperty(h,"CONNECTING",{enumerable:!0,value:_6.indexOf("CONNECTING")});Object.defineProperty(h.prototype,"CONNECTING",{enumerable:!0,value:_6.indexOf("CONNECTING")});Object.defineProperty(h,"OPEN",{enumerable:!0,value:_6.indexOf("OPEN")});Object.defineProperty(h.prototype,"OPEN",{enumerable:!0,value:_6.indexOf("OPEN")});Object.defineProperty(h,"CLOSING",{enumerable:!0,value:_6.indexOf("CLOSING")});Object.defineProperty(h.prototype,"CLOSING",{enumerable:!0,value:_6.indexOf("CLOSING")});Object.defineProperty(h,"CLOSED",{enumerable:!0,value:_6.indexOf("CLOSED")});Object.defineProperty(h.prototype,"CLOSED",{enumerable:!0,value:_6.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(($)=>{Object.defineProperty(h.prototype,$,{enumerable:!0})});["open","error","close","message"].forEach(($)=>{Object.defineProperty(h.prototype,`on${$}`,{enumerable:!0,get(){for(let I of this.listeners($))if(I[E9])return I[LC];return null},set(I){for(let U of this.listeners($))if(U[E9]){this.removeListener($,U);break}if(typeof I!=="function")return;this.addEventListener($,I,{[E9]:!0})}})});h.prototype.addEventListener=WC;h.prototype.removeEventListener=ZC;NO.exports=h;function UO($,I,U,_){let u={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:RC,protocolVersion:C9[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,..._,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if($._autoPong=u.autoPong,$._closeTimeout=u.closeTimeout,!C9.includes(u.protocolVersion))throw RangeError(`Unsupported protocol version: ${u.protocolVersion} (supported versions: ${C9.join(", ")})`);let g;if(I instanceof w9)g=I;else try{g=new w9(I)}catch(Q){throw SyntaxError(`Invalid URL: ${I}`)}if(g.protocol==="http:")g.protocol="ws:";else if(g.protocol==="https:")g.protocol="wss:";$._url=g.href;let z=g.protocol==="wss:",v=g.protocol==="ws+unix:",J;if(g.protocol!=="ws:"&&!z&&!v)J=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`;else if(v&&!g.pathname)J="The URL's pathname is empty";else if(g.hash)J="The URL contains a fragment identifier";if(J){let Q=SyntaxError(J);if($._redirects===0)throw Q;else{j2($,Q);return}}let N=z?443:80,X=OC(16).toString("base64"),G=z?TC.request:HC.request,q=new Set,T;if(u.createConnection=u.createConnection||(z?wC:SC),u.defaultPort=u.defaultPort||N,u.port=g.port||N,u.host=g.hostname.startsWith("[")?g.hostname.slice(1,-1):g.hostname,u.headers={...u.headers,"Sec-WebSocket-Version":u.protocolVersion,"Sec-WebSocket-Key":X,Connection:"Upgrade",Upgrade:"websocket"},u.path=g.pathname+g.search,u.timeout=u.handshakeTimeout,u.perMessageDeflate)T=new C6(u.perMessageDeflate!==!0?u.perMessageDeflate:{},!1,u.maxPayload),u.headers["Sec-WebSocket-Extensions"]=AC({[C6.extensionName]:T.offer()});if(U.length){for(let Q of U){if(typeof Q!=="string"||!FC.test(Q)||q.has(Q))throw SyntaxError("An invalid or duplicated subprotocol was specified");q.add(Q)}u.headers["Sec-WebSocket-Protocol"]=U.join(",")}if(u.origin)if(u.protocolVersion<13)u.headers["Sec-WebSocket-Origin"]=u.origin;else u.headers.Origin=u.origin;if(g.username||g.password)u.auth=`${g.username}:${g.password}`;if(v){let Q=u.path.split(":");u.socketPath=Q[0],u.path=Q[1]}let H;if(u.followRedirects){if($._redirects===0){$._originalIpc=v,$._originalSecure=z,$._originalHostOrSocketPath=v?u.socketPath:g.host;let Q=_&&_.headers;if(_={..._,headers:{}},Q)for(let[Y,R]of Object.entries(Q))_.headers[Y.toLowerCase()]=R}else if($.listenerCount("redirect")===0){let Q=v?$._originalIpc?u.socketPath===$._originalHostOrSocketPath:!1:$._originalIpc?!1:g.host===$._originalHostOrSocketPath;if(!Q||$._originalSecure&&!z){if(delete u.headers.authorization,delete u.headers.cookie,!Q)delete u.headers.host;u.auth=void 0}}if(u.auth&&!_.headers.authorization)_.headers.authorization="Basic "+Buffer.from(u.auth).toString("base64");if(H=$._req=G(u),$._redirects)$.emit("redirect",$.url,H)}else H=$._req=G(u);if(u.timeout)H.on("timeout",()=>{N4($,H,"Opening handshake has timed out")});if(H.on("error",(Q)=>{if(H===null||H[uO])return;H=$._req=null,j2($,Q)}),H.on("response",(Q)=>{let Y=Q.headers.location,R=Q.statusCode;if(Y&&u.followRedirects&&R>=300&&R<400){if(++$._redirects>u.maxRedirects){N4($,H,"Maximum redirects exceeded");return}H.abort();let K;try{K=new w9(Y,I)}catch(W){let O=SyntaxError(`Invalid URL: ${Y}`);j2($,O);return}UO($,K,U,_)}else if(!$.emit("unexpected-response",H,Q))N4($,H,`Unexpected server response: ${Q.statusCode}`)}),H.on("upgrade",(Q,Y,R)=>{if($.emit("upgrade",Q),$.readyState!==h.CONNECTING)return;H=$._req=null;let K=Q.headers.upgrade;if(K===void 0||K.toLowerCase()!=="websocket"){N4($,Y,"Invalid Upgrade header");return}let W=DC("sha1").update(X+KC).digest("base64");if(Q.headers["sec-websocket-accept"]!==W){N4($,Y,"Invalid Sec-WebSocket-Accept header");return}let O=Q.headers["sec-websocket-protocol"],V;if(O!==void 0){if(!q.size)V="Server sent a subprotocol but none was requested";else if(!q.has(O))V="Server sent an invalid subprotocol"}else if(q.size)V="Server sent no subprotocol";if(V){N4($,Y,V);return}if(O)$._protocol=O;let L=Q.headers["sec-websocket-extensions"];if(L!==void 0){if(!T){N4($,Y,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let B;try{B=bC(L)}catch(F){N4($,Y,"Invalid Sec-WebSocket-Extensions header");return}let M=Object.keys(B);if(M.length!==1||M[0]!==C6.extensionName){N4($,Y,"Server indicated an extension that was not requested");return}try{T.accept(B[C6.extensionName])}catch(F){N4($,Y,"Invalid Sec-WebSocket-Extensions header");return}$._extensions[C6.extensionName]=T}$.setSocket(Y,R,{allowSynchronousEvents:u.allowSynchronousEvents,generateMask:u.generateMask,maxPayload:u.maxPayload,skipUTF8Validation:u.skipUTF8Validation})}),u.finishRequest)u.finishRequest(H,$);else H.end()}function j2($,I){$._readyState=h.CLOSING,$._errorEmitted=!0,$.emit("error",I),$.emitClose()}function SC($){return $.path=$.socketPath,$O.connect($)}function wC($){if($.path=void 0,!$.servername&&$.servername!=="")$.servername=$O.isIP($.host)?"":$.host;return YC.connect($)}function N4($,I,U){$._readyState=h.CLOSING;let _=Error(U);if(Error.captureStackTrace(_,N4),I.setHeader){if(I[uO]=!0,I.abort(),I.socket&&!I.socket.destroyed)I.socket.destroy();process.nextTick(j2,$,_)}else I.destroy(_),I.once("error",$.emit.bind($,"error")),I.once("close",$.emitClose.bind($))}function f9($,I,U){if(I){let _=MC(I)?I.size:jC(I).length;if($._socket)$._sender._bufferedBytes+=_;else $._bufferedAmount+=_}if(U){let _=Error(`WebSocket is not open: readyState ${$.readyState} (${_6[$.readyState]})`);process.nextTick(U,_)}}function EC($,I){let U=this[S$];if(U._closeFrameReceived=!0,U._closeMessage=I,U._closeCode=$,U._socket[S$]===void 0)return;if(U._socket.removeListener("data",F2),process.nextTick(_O,U._socket),$===1005)U.close();else U.close($,I)}function CC(){let $=this[S$];if(!$.isPaused)$._socket.resume()}function fC($){let I=this[S$];if(I._socket[S$]!==void 0)I._socket.removeListener("data",F2),process.nextTick(_O,I._socket),I.close($[PC]);if(!I._errorEmitted)I._errorEmitted=!0,I.emit("error",$)}function sY(){this[S$].emitClose()}function xC($,I){this[S$].emit("message",$,I)}function kC($){let I=this[S$];if(I._autoPong)I.pong($,!this._isServer,IO);I.emit("ping",$)}function yC($){this[S$].emit("pong",$)}function _O($){$.resume()}function iC($){let I=this[S$];if(I.readyState===h.CLOSED)return;if(I.readyState===h.OPEN)I._readyState=h.CLOSING,gO(I);if(this._socket.end(),!I._errorEmitted)I._errorEmitted=!0,I.emit("error",$)}function gO($){$._closeTimer=setTimeout($._socket.destroy.bind($._socket),$._closeTimeout)}function zO(){let $=this[S$];if(this.removeListener("close",zO),this.removeListener("data",F2),this.removeListener("end",vO),$._readyState=h.CLOSING,!this._readableState.endEmitted&&!$._closeFrameReceived&&!$._receiver._writableState.errorEmitted&&this._readableState.length!==0){let I=this.read(this._readableState.length);$._receiver.write(I)}if($._receiver.end(),this[S$]=void 0,clearTimeout($._closeTimer),$._receiver._writableState.finished||$._receiver._writableState.errorEmitted)$.emitClose();else $._receiver.on("error",sY),$._receiver.on("finish",sY)}function F2($){if(!this[S$]._receiver.write($))this.pause()}function vO(){let $=this[S$];$._readyState=h.CLOSING,$._receiver.end(),this.end()}function JO(){let $=this[S$];if(this.removeListener("error",JO),this.on("error",IO),$)$._readyState=h.CLOSING,this.destroy()}});var QO=E((bm,qO)=>{var Am=S2(),{Duplex:nC}=g$("stream");function GO($){$.emit("close")}function rC(){if(!this.destroyed&&this._writableState.finished)this.destroy()}function XO($){if(this.removeListener("error",XO),this.destroy(),this.listenerCount("error")===0)this.emit("error",$)}function lC($,I){let U=!0,_=new nC({...I,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return $.on("message",function(g,z){let v=!z&&_._readableState.objectMode?g.toString():g;if(!_.push(v))$.pause()}),$.once("error",function(g){if(_.destroyed)return;U=!1,_.destroy(g)}),$.once("close",function(){if(_.destroyed)return;_.push(null)}),_._destroy=function(u,g){if($.readyState===$.CLOSED){g(u),process.nextTick(GO,_);return}let z=!1;if($.once("error",function(J){z=!0,g(J)}),$.once("close",function(){if(!z)g(u);process.nextTick(GO,_)}),U)$.terminate()},_._final=function(u){if($.readyState===$.CONNECTING){$.once("open",function(){_._final(u)});return}if($._socket===null)return;if($._socket._writableState.finished){if(u(),_._readableState.endEmitted)_.destroy()}else $._socket.once("finish",function(){u()}),$.close()},_._read=function(){if($.isPaused)$.resume()},_._write=function(u,g,z){if($.readyState===$.CONNECTING){$.once("open",function(){_._write(u,g,z)});return}$.send(u,z)},_.on("end",rC),_.on("error",XO),_}qO.exports=lC});var HO=E((jm,TO)=>{var{tokenChars:mC}=OI();function hC($){let I=new Set,U=-1,_=-1,u=0;for(u;u<$.length;u++){let z=$.charCodeAt(u);if(_===-1&&mC[z]===1){if(U===-1)U=u}else if(u!==0&&(z===32||z===9)){if(_===-1&&U!==-1)_=u}else if(z===44){if(U===-1)throw SyntaxError(`Unexpected character at index ${u}`);if(_===-1)_=u;let v=$.slice(U,_);if(I.has(v))throw SyntaxError(`The "${v}" subprotocol is duplicated`);I.add(v),U=_=-1}else throw SyntaxError(`Unexpected character at index ${u}`)}if(U===-1||_!==-1)throw SyntaxError("Unexpected end of input");let g=$.slice(U,u);if(I.has(g))throw SyntaxError(`The "${g}" subprotocol is duplicated`);return I.add(g),I}TO.exports={parse:hC}});var BO=E((Sm,VO)=>{var cC=g$("events"),w2=g$("http"),{Duplex:Fm}=g$("stream"),{createHash:dC}=g$("crypto"),YO=S9(),O1=l0(),pC=HO(),oC=S2(),{CLOSE_TIMEOUT:tC,GUID:aC,kWebSocket:eC}=u6(),sC=/^[+/0-9A-Za-z]{22}==$/;class DO extends cC{constructor($,I){super();if($={allowSynchronousEvents:!0,autoPong:!0,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:tC,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:oC,...$},$.port==null&&!$.server&&!$.noServer||$.port!=null&&($.server||$.noServer)||$.server&&$.noServer)throw TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if($.port!=null)this._server=w2.createServer((U,_)=>{let u=w2.STATUS_CODES[426];_.writeHead(426,{"Content-Length":u.length,"Content-Type":"text/plain"}),_.end(u)}),this._server.listen($.port,$.host,$.backlog,I);else if($.server)this._server=$.server;if(this._server){let U=this.emit.bind(this,"connection");this._removeListeners=$f(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(_,u,g)=>{this.handleUpgrade(_,u,g,U)}})}if($.perMessageDeflate===!0)$.perMessageDeflate={};if($.clientTracking)this.clients=new Set,this._shouldEmitClose=!1;this.options=$,this._state=0}address(){if(this.options.noServer)throw Error('The server is operating in "noServer" mode');if(!this._server)return null;return this._server.address()}close($){if(this._state===2){if($)this.once("close",()=>{$(Error("The server is not running"))});process.nextTick(d0,this);return}if($)this.once("close",$);if(this._state===1)return;if(this._state=1,this.options.noServer||this.options.server){if(this._server)this._removeListeners(),this._removeListeners=this._server=null;if(this.clients)if(!this.clients.size)process.nextTick(d0,this);else this._shouldEmitClose=!0;else process.nextTick(d0,this)}else{let I=this._server;this._removeListeners(),this._removeListeners=this._server=null,I.close(()=>{d0(this)})}}shouldHandle($){if(this.options.path){let I=$.url.indexOf("?");if((I!==-1?$.url.slice(0,I):$.url)!==this.options.path)return!1}return!0}handleUpgrade($,I,U,_){I.on("error",OO);let u=$.headers["sec-websocket-key"],g=$.headers.upgrade,z=+$.headers["sec-websocket-version"];if($.method!=="GET"){D1(this,$,I,405,"Invalid HTTP method");return}if(g===void 0||g.toLowerCase()!=="websocket"){D1(this,$,I,400,"Invalid Upgrade header");return}if(u===void 0||!sC.test(u)){D1(this,$,I,400,"Missing or invalid Sec-WebSocket-Key header");return}if(z!==13&&z!==8){D1(this,$,I,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle($)){p0(I,400);return}let v=$.headers["sec-websocket-protocol"],J=new Set;if(v!==void 0)try{J=pC.parse(v)}catch(G){D1(this,$,I,400,"Invalid Sec-WebSocket-Protocol header");return}let N=$.headers["sec-websocket-extensions"],X={};if(this.options.perMessageDeflate&&N!==void 0){let G=new O1(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let q=YO.parse(N);if(q[O1.extensionName])G.accept(q[O1.extensionName]),X[O1.extensionName]=G}catch(q){D1(this,$,I,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let G={origin:$.headers[`${z===8?"sec-websocket-origin":"origin"}`],secure:!!($.socket.authorized||$.socket.encrypted),req:$};if(this.options.verifyClient.length===2){this.options.verifyClient(G,(q,T,H,Q)=>{if(!q)return p0(I,T||401,H,Q);this.completeUpgrade(X,u,J,$,I,U,_)});return}if(!this.options.verifyClient(G))return p0(I,401)}this.completeUpgrade(X,u,J,$,I,U,_)}completeUpgrade($,I,U,_,u,g,z){if(!u.readable||!u.writable)return u.destroy();if(u[eC])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return p0(u,503);let J=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${dC("sha1").update(I+aC).digest("base64")}`],N=new this.options.WebSocket(null,void 0,this.options);if(U.size){let X=this.options.handleProtocols?this.options.handleProtocols(U,_):U.values().next().value;if(X)J.push(`Sec-WebSocket-Protocol: ${X}`),N._protocol=X}if($[O1.extensionName]){let X=$[O1.extensionName].params,G=YO.format({[O1.extensionName]:[X]});J.push(`Sec-WebSocket-Extensions: ${G}`),N._extensions=$}if(this.emit("headers",J,_),u.write(J.concat(`\r
292
+ `),"Changed Files");let v=await c_({message:"What did you accomplish in this session?",placeholder:"e.g., Implemented user authentication flow"});if(e(v)){g4("Cancelled.");return}let J=await c_({message:"Key learnings? (comma-separated)",placeholder:"e.g., JWT needs refresh token, bcrypt is slow"});if(e(J)){g4("Cancelled.");return}let N=await c_({message:"Next steps? (comma-separated)",placeholder:"e.g., Add password reset, Write tests"});if(e(N)){g4("Cancelled.");return}let X={id:Math.random().toString(36).slice(2,8),date:new Date().toISOString(),summary:v,keyLearnings:J.split(",").map((G)=>G.trim()).filter(Boolean),filesChanged:z,nextSteps:N.split(",").map((G)=>G.trim()).filter(Boolean)};VH($,X),k(j$.default.green("Retrospective saved!"),"Done"),d(j$.default.dim(`Stored in: ${I}`))}var j$;var MH=u4(()=>{I4();z9();F0();j$=q$(b$(),1)});var _6=E((Hm,KY)=>{var BY=["nodebuffer","arraybuffer","fragments"],MY=typeof Blob<"u";if(MY)BY.push("blob");KY.exports={BINARY_TYPES:BY,CLOSE_TIMEOUT:30000,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:MY,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var m0=E((Ym,L2)=>{var{EMPTY_BUFFER:fE}=_6(),W9=Buffer[Symbol.species];function xE($,I){if($.length===0)return fE;if($.length===1)return $[0];let U=Buffer.allocUnsafe(I),_=0;for(let u=0;u<$.length;u++){let g=$[u];U.set(g,_),_+=g.length}if(_<I)return new W9(U.buffer,U.byteOffset,_);return U}function RY($,I,U,_,u){for(let g=0;g<u;g++)U[_+g]=$[g]^I[g&3]}function LY($,I){for(let U=0;U<$.length;U++)$[U]^=I[U&3]}function kE($){if($.length===$.buffer.byteLength)return $.buffer;return $.buffer.slice($.byteOffset,$.byteOffset+$.length)}function P9($){if(P9.readOnly=!0,Buffer.isBuffer($))return $;let I;if($ instanceof ArrayBuffer)I=new W9($);else if(ArrayBuffer.isView($))I=new W9($.buffer,$.byteOffset,$.byteLength);else I=Buffer.from($),P9.readOnly=!1;return I}L2.exports={concat:xE,mask:RY,toArrayBuffer:kE,toBuffer:P9,unmask:LY};if(!process.env.WS_NO_BUFFER_UTIL)try{let $=(()=>{throw new Error("Cannot require module "+"bufferutil");})();L2.exports.mask=function(I,U,_,u,g){if(g<48)RY(I,U,_,u,g);else $.mask(I,U,_,u,g)},L2.exports.unmask=function(I,U){if(I.length<32)LY(I,U);else $.unmask(I,U)}}catch($){}});var AY=E((Om,ZY)=>{var WY=Symbol("kDone"),Z9=Symbol("kRun");class PY{constructor($){this[WY]=()=>{this.pending--,this[Z9]()},this.concurrency=$||1/0,this.jobs=[],this.pending=0}add($){this.jobs.push($),this[Z9]()}[Z9](){if(this.pending===this.concurrency)return;if(this.jobs.length){let $=this.jobs.shift();this.pending++,$(this[WY])}}}ZY.exports=PY});var c0=E((Vm,wY)=>{var h0=g$("zlib"),bY=m0(),yE=AY(),{kStatusCode:jY}=_6(),iE=Buffer[Symbol.species],rE=Buffer.from([0,0,255,255]),P2=Symbol("permessage-deflate"),g6=Symbol("total-length"),OI=Symbol("callback"),E6=Symbol("buffers"),VI=Symbol("error"),W2;class FY{constructor($,I,U){if(this._maxPayload=U|0,this._options=$||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!I,this._deflate=null,this._inflate=null,this.params=null,!W2){let _=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;W2=new yE(_)}}static get extensionName(){return"permessage-deflate"}offer(){let $={};if(this._options.serverNoContextTakeover)$.server_no_context_takeover=!0;if(this._options.clientNoContextTakeover)$.client_no_context_takeover=!0;if(this._options.serverMaxWindowBits)$.server_max_window_bits=this._options.serverMaxWindowBits;if(this._options.clientMaxWindowBits)$.client_max_window_bits=this._options.clientMaxWindowBits;else if(this._options.clientMaxWindowBits==null)$.client_max_window_bits=!0;return $}accept($){return $=this.normalizeParams($),this.params=this._isServer?this.acceptAsServer($):this.acceptAsClient($),this.params}cleanup(){if(this._inflate)this._inflate.close(),this._inflate=null;if(this._deflate){let $=this._deflate[OI];if(this._deflate.close(),this._deflate=null,$)$(Error("The deflate stream was closed while data was being processed"))}}acceptAsServer($){let I=this._options,U=$.find((_)=>{if(I.serverNoContextTakeover===!1&&_.server_no_context_takeover||_.server_max_window_bits&&(I.serverMaxWindowBits===!1||typeof I.serverMaxWindowBits==="number"&&I.serverMaxWindowBits>_.server_max_window_bits)||typeof I.clientMaxWindowBits==="number"&&!_.client_max_window_bits)return!1;return!0});if(!U)throw Error("None of the extension offers can be accepted");if(I.serverNoContextTakeover)U.server_no_context_takeover=!0;if(I.clientNoContextTakeover)U.client_no_context_takeover=!0;if(typeof I.serverMaxWindowBits==="number")U.server_max_window_bits=I.serverMaxWindowBits;if(typeof I.clientMaxWindowBits==="number")U.client_max_window_bits=I.clientMaxWindowBits;else if(U.client_max_window_bits===!0||I.clientMaxWindowBits===!1)delete U.client_max_window_bits;return U}acceptAsClient($){let I=$[0];if(this._options.clientNoContextTakeover===!1&&I.client_no_context_takeover)throw Error('Unexpected parameter "client_no_context_takeover"');if(!I.client_max_window_bits){if(typeof this._options.clientMaxWindowBits==="number")I.client_max_window_bits=this._options.clientMaxWindowBits}else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits==="number"&&I.client_max_window_bits>this._options.clientMaxWindowBits)throw Error('Unexpected or invalid parameter "client_max_window_bits"');return I}normalizeParams($){return $.forEach((I)=>{Object.keys(I).forEach((U)=>{let _=I[U];if(_.length>1)throw Error(`Parameter "${U}" must have only a single value`);if(_=_[0],U==="client_max_window_bits"){if(_!==!0){let u=+_;if(!Number.isInteger(u)||u<8||u>15)throw TypeError(`Invalid value for parameter "${U}": ${_}`);_=u}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${U}": ${_}`)}else if(U==="server_max_window_bits"){let u=+_;if(!Number.isInteger(u)||u<8||u>15)throw TypeError(`Invalid value for parameter "${U}": ${_}`);_=u}else if(U==="client_no_context_takeover"||U==="server_no_context_takeover"){if(_!==!0)throw TypeError(`Invalid value for parameter "${U}": ${_}`)}else throw Error(`Unknown parameter "${U}"`);I[U]=_})}),$}decompress($,I,U){W2.add((_)=>{this._decompress($,I,(u,g)=>{_(),U(u,g)})})}compress($,I,U){W2.add((_)=>{this._compress($,I,(u,g)=>{_(),U(u,g)})})}_decompress($,I,U){let _=this._isServer?"client":"server";if(!this._inflate){let u=`${_}_max_window_bits`,g=typeof this.params[u]!=="number"?h0.Z_DEFAULT_WINDOWBITS:this.params[u];this._inflate=h0.createInflateRaw({...this._options.zlibInflateOptions,windowBits:g}),this._inflate[P2]=this,this._inflate[g6]=0,this._inflate[E6]=[],this._inflate.on("error",lE),this._inflate.on("data",SY)}if(this._inflate[OI]=U,this._inflate.write($),I)this._inflate.write(rE);this._inflate.flush(()=>{let u=this._inflate[VI];if(u){this._inflate.close(),this._inflate=null,U(u);return}let g=bY.concat(this._inflate[E6],this._inflate[g6]);if(this._inflate._readableState.endEmitted)this._inflate.close(),this._inflate=null;else if(this._inflate[g6]=0,this._inflate[E6]=[],I&&this.params[`${_}_no_context_takeover`])this._inflate.reset();U(null,g)})}_compress($,I,U){let _=this._isServer?"server":"client";if(!this._deflate){let u=`${_}_max_window_bits`,g=typeof this.params[u]!=="number"?h0.Z_DEFAULT_WINDOWBITS:this.params[u];this._deflate=h0.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:g}),this._deflate[g6]=0,this._deflate[E6]=[],this._deflate.on("data",nE)}this._deflate[OI]=U,this._deflate.write($),this._deflate.flush(h0.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let u=bY.concat(this._deflate[E6],this._deflate[g6]);if(I)u=new iE(u.buffer,u.byteOffset,u.length-4);if(this._deflate[OI]=null,this._deflate[g6]=0,this._deflate[E6]=[],I&&this.params[`${_}_no_context_takeover`])this._deflate.reset();U(null,u)})}}wY.exports=FY;function nE($){this[E6].push($),this[g6]+=$.length}function SY($){if(this[g6]+=$.length,this[P2]._maxPayload<1||this[g6]<=this[P2]._maxPayload){this[E6].push($);return}this[VI]=RangeError("Max payload size exceeded"),this[VI].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[VI][jY]=1009,this.removeListener("data",SY),this.reset()}function lE($){if(this[P2]._inflate=null,this[VI]){this[OI](this[VI]);return}$[jY]=1007,this[OI]($)}});var DI=E((Dm,Z2)=>{var{isUtf8:EY}=g$("buffer"),{hasBlob:mE}=_6(),hE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function cE($){return $>=1000&&$<=1014&&$!==1004&&$!==1005&&$!==1006||$>=3000&&$<=4999}function A9($){let I=$.length,U=0;while(U<I)if(($[U]&128)===0)U++;else if(($[U]&224)===192){if(U+1===I||($[U+1]&192)!==128||($[U]&254)===192)return!1;U+=2}else if(($[U]&240)===224){if(U+2>=I||($[U+1]&192)!==128||($[U+2]&192)!==128||$[U]===224&&($[U+1]&224)===128||$[U]===237&&($[U+1]&224)===160)return!1;U+=3}else if(($[U]&248)===240){if(U+3>=I||($[U+1]&192)!==128||($[U+2]&192)!==128||($[U+3]&192)!==128||$[U]===240&&($[U+1]&240)===128||$[U]===244&&$[U+1]>143||$[U]>244)return!1;U+=4}else return!1;return!0}function dE($){return mE&&typeof $==="object"&&typeof $.arrayBuffer==="function"&&typeof $.type==="string"&&typeof $.stream==="function"&&($[Symbol.toStringTag]==="Blob"||$[Symbol.toStringTag]==="File")}Z2.exports={isBlob:dE,isValidStatusCode:cE,isValidUTF8:A9,tokenChars:hE};if(EY)Z2.exports.isValidUTF8=function($){return $.length<24?A9($):EY($)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let $=(()=>{throw new Error("Cannot require module "+"utf-8-validate");})();Z2.exports.isValidUTF8=function(I){return I.length<32?A9(I):$(I)}}catch($){}});var j9=E((Bm,yY)=>{var{Writable:pE}=g$("stream"),CY=c0(),{BINARY_TYPES:oE,EMPTY_BUFFER:fY,kStatusCode:tE,kWebSocket:aE}=_6(),{concat:b9,toArrayBuffer:eE,unmask:sE}=m0(),{isValidStatusCode:$C,isValidUTF8:xY}=DI(),A2=Buffer[Symbol.species];class kY extends pE{constructor($={}){super();this._allowSynchronousEvents=$.allowSynchronousEvents!==void 0?$.allowSynchronousEvents:!0,this._binaryType=$.binaryType||oE[0],this._extensions=$.extensions||{},this._isServer=!!$.isServer,this._maxPayload=$.maxPayload|0,this._skipUTF8Validation=!!$.skipUTF8Validation,this[aE]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=0}_write($,I,U){if(this._opcode===8&&this._state==0)return U();this._bufferedBytes+=$.length,this._buffers.push($),this.startLoop(U)}consume($){if(this._bufferedBytes-=$,$===this._buffers[0].length)return this._buffers.shift();if($<this._buffers[0].length){let U=this._buffers[0];return this._buffers[0]=new A2(U.buffer,U.byteOffset+$,U.length-$),new A2(U.buffer,U.byteOffset,$)}let I=Buffer.allocUnsafe($);do{let U=this._buffers[0],_=I.length-$;if($>=U.length)I.set(this._buffers.shift(),_);else I.set(new Uint8Array(U.buffer,U.byteOffset,$),_),this._buffers[0]=new A2(U.buffer,U.byteOffset+$,U.length-$);$-=U.length}while($>0);return I}startLoop($){this._loop=!0;do switch(this._state){case 0:this.getInfo($);break;case 1:this.getPayloadLength16($);break;case 2:this.getPayloadLength64($);break;case 3:this.getMask();break;case 4:this.getData($);break;case 5:case 6:this._loop=!1;return}while(this._loop);if(!this._errored)$()}getInfo($){if(this._bufferedBytes<2){this._loop=!1;return}let I=this.consume(2);if((I[0]&48)!==0){let _=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");$(_);return}let U=(I[0]&64)===64;if(U&&!this._extensions[CY.extensionName]){let _=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(_);return}if(this._fin=(I[0]&128)===128,this._opcode=I[0]&15,this._payloadLength=I[1]&127,this._opcode===0){if(U){let _=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(_);return}if(!this._fragmented){let _=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");$(_);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let _=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");$(_);return}this._compressed=U}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let _=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");$(_);return}if(U){let _=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");$(_);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let _=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");$(_);return}}else{let _=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");$(_);return}if(!this._fin&&!this._fragmented)this._fragmented=this._opcode;if(this._masked=(I[1]&128)===128,this._isServer){if(!this._masked){let _=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");$(_);return}}else if(this._masked){let _=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");$(_);return}if(this._payloadLength===126)this._state=1;else if(this._payloadLength===127)this._state=2;else this.haveLength($)}getPayloadLength16($){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength($)}getPayloadLength64($){if(this._bufferedBytes<8){this._loop=!1;return}let I=this.consume(8),U=I.readUInt32BE(0);if(U>Math.pow(2,21)-1){let _=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");$(_);return}this._payloadLength=U*Math.pow(2,32)+I.readUInt32BE(4),this.haveLength($)}haveLength($){if(this._payloadLength&&this._opcode<8){if(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0){let I=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");$(I);return}}if(this._masked)this._state=3;else this._state=4}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=4}getData($){let I=fY;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}if(I=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0)sE(I,this._mask)}if(this._opcode>7){this.controlMessage(I,$);return}if(this._compressed){this._state=5,this.decompress(I,$);return}if(I.length)this._messageLength=this._totalPayloadLength,this._fragments.push(I);this.dataMessage($)}decompress($,I){this._extensions[CY.extensionName].decompress($,this._fin,(_,u)=>{if(_)return I(_);if(u.length){if(this._messageLength+=u.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let g=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");I(g);return}this._fragments.push(u)}if(this.dataMessage(I),this._state===0)this.startLoop(I)})}dataMessage($){if(!this._fin){this._state=0;return}let I=this._messageLength,U=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let _;if(this._binaryType==="nodebuffer")_=b9(U,I);else if(this._binaryType==="arraybuffer")_=eE(b9(U,I));else if(this._binaryType==="blob")_=new Blob(U);else _=U;if(this._allowSynchronousEvents)this.emit("message",_,!0),this._state=0;else this._state=6,setImmediate(()=>{this.emit("message",_,!0),this._state=0,this.startLoop($)})}else{let _=b9(U,I);if(!this._skipUTF8Validation&&!xY(_)){let u=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");$(u);return}if(this._state===5||this._allowSynchronousEvents)this.emit("message",_,!1),this._state=0;else this._state=6,setImmediate(()=>{this.emit("message",_,!1),this._state=0,this.startLoop($)})}}controlMessage($,I){if(this._opcode===8){if($.length===0)this._loop=!1,this.emit("conclude",1005,fY),this.end();else{let U=$.readUInt16BE(0);if(!$C(U)){let u=this.createError(RangeError,`invalid status code ${U}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");I(u);return}let _=new A2($.buffer,$.byteOffset+2,$.length-2);if(!this._skipUTF8Validation&&!xY(_)){let u=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");I(u);return}this._loop=!1,this.emit("conclude",U,_),this.end()}this._state=0;return}if(this._allowSynchronousEvents)this.emit(this._opcode===9?"ping":"pong",$),this._state=0;else this._state=6,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",$),this._state=0,this.startLoop(I)})}createError($,I,U,_,u){this._loop=!1,this._errored=!0;let g=new $(U?`Invalid WebSocket frame: ${I}`:I);return Error.captureStackTrace(g,this.createError),g.code=u,g[tE]=_,g}}yY.exports=kY});var S9=E((Km,nY)=>{var{Duplex:Mm}=g$("stream"),{randomFillSync:IC}=g$("crypto"),iY=c0(),{EMPTY_BUFFER:uC,kWebSocket:UC,NOOP:_C}=_6(),{isBlob:BI,isValidStatusCode:gC}=DI(),{mask:rY,toBuffer:O1}=m0(),V4=Symbol("kByteLength"),zC=Buffer.alloc(4),V1,MI=8192,A4=0,vC=1,JC=2;class C6{constructor($,I,U){if(this._extensions=I||{},U)this._generateMask=U,this._maskBuffer=Buffer.alloc(4);this._socket=$,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=A4,this.onerror=_C,this[UC]=void 0}static frame($,I){let U,_=!1,u=2,g=!1;if(I.mask){if(U=I.maskBuffer||zC,I.generateMask)I.generateMask(U);else{if(MI===8192){if(V1===void 0)V1=Buffer.alloc(8192);IC(V1,0,8192),MI=0}U[0]=V1[MI++],U[1]=V1[MI++],U[2]=V1[MI++],U[3]=V1[MI++]}g=(U[0]|U[1]|U[2]|U[3])===0,u=6}let z;if(typeof $==="string")if((!I.mask||g)&&I[V4]!==void 0)z=I[V4];else $=Buffer.from($),z=$.length;else z=$.length,_=I.mask&&I.readOnly&&!g;let v=z;if(z>=65536)u+=8,v=127;else if(z>125)u+=2,v=126;let J=Buffer.allocUnsafe(_?z+u:u);if(J[0]=I.fin?I.opcode|128:I.opcode,I.rsv1)J[0]|=64;if(J[1]=v,v===126)J.writeUInt16BE(z,2);else if(v===127)J[2]=J[3]=0,J.writeUIntBE(z,4,6);if(!I.mask)return[J,$];if(J[1]|=128,J[u-4]=U[0],J[u-3]=U[1],J[u-2]=U[2],J[u-1]=U[3],g)return[J,$];if(_)return rY($,U,J,u,z),[J];return rY($,U,$,0,z),[J,$]}close($,I,U,_){let u;if($===void 0)u=uC;else if(typeof $!=="number"||!gC($))throw TypeError("First argument must be a valid error code number");else if(I===void 0||!I.length)u=Buffer.allocUnsafe(2),u.writeUInt16BE($,0);else{let z=Buffer.byteLength(I);if(z>123)throw RangeError("The message must not be greater than 123 bytes");if(u=Buffer.allocUnsafe(2+z),u.writeUInt16BE($,0),typeof I==="string")u.write(I,2);else u.set(I,2)}let g={[V4]:u.length,fin:!0,generateMask:this._generateMask,mask:U,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};if(this._state!==A4)this.enqueue([this.dispatch,u,!1,g,_]);else this.sendFrame(C6.frame(u,g),_)}ping($,I,U){let _,u;if(typeof $==="string")_=Buffer.byteLength($),u=!1;else if(BI($))_=$.size,u=!1;else $=O1($),_=$.length,u=O1.readOnly;if(_>125)throw RangeError("The data size must not be greater than 125 bytes");let g={[V4]:_,fin:!0,generateMask:this._generateMask,mask:I,maskBuffer:this._maskBuffer,opcode:9,readOnly:u,rsv1:!1};if(BI($))if(this._state!==A4)this.enqueue([this.getBlobData,$,!1,g,U]);else this.getBlobData($,!1,g,U);else if(this._state!==A4)this.enqueue([this.dispatch,$,!1,g,U]);else this.sendFrame(C6.frame($,g),U)}pong($,I,U){let _,u;if(typeof $==="string")_=Buffer.byteLength($),u=!1;else if(BI($))_=$.size,u=!1;else $=O1($),_=$.length,u=O1.readOnly;if(_>125)throw RangeError("The data size must not be greater than 125 bytes");let g={[V4]:_,fin:!0,generateMask:this._generateMask,mask:I,maskBuffer:this._maskBuffer,opcode:10,readOnly:u,rsv1:!1};if(BI($))if(this._state!==A4)this.enqueue([this.getBlobData,$,!1,g,U]);else this.getBlobData($,!1,g,U);else if(this._state!==A4)this.enqueue([this.dispatch,$,!1,g,U]);else this.sendFrame(C6.frame($,g),U)}send($,I,U){let _=this._extensions[iY.extensionName],u=I.binary?2:1,g=I.compress,z,v;if(typeof $==="string")z=Buffer.byteLength($),v=!1;else if(BI($))z=$.size,v=!1;else $=O1($),z=$.length,v=O1.readOnly;if(this._firstFragment){if(this._firstFragment=!1,g&&_&&_.params[_._isServer?"server_no_context_takeover":"client_no_context_takeover"])g=z>=_._threshold;this._compress=g}else g=!1,u=0;if(I.fin)this._firstFragment=!0;let J={[V4]:z,fin:I.fin,generateMask:this._generateMask,mask:I.mask,maskBuffer:this._maskBuffer,opcode:u,readOnly:v,rsv1:g};if(BI($))if(this._state!==A4)this.enqueue([this.getBlobData,$,this._compress,J,U]);else this.getBlobData($,this._compress,J,U);else if(this._state!==A4)this.enqueue([this.dispatch,$,this._compress,J,U]);else this.dispatch($,this._compress,J,U)}getBlobData($,I,U,_){this._bufferedBytes+=U[V4],this._state=JC,$.arrayBuffer().then((u)=>{if(this._socket.destroyed){let z=Error("The socket was closed while the blob was being read");process.nextTick(F9,this,z,_);return}this._bufferedBytes-=U[V4];let g=O1(u);if(!I)this._state=A4,this.sendFrame(C6.frame(g,U),_),this.dequeue();else this.dispatch(g,I,U,_)}).catch((u)=>{process.nextTick(NC,this,u,_)})}dispatch($,I,U,_){if(!I){this.sendFrame(C6.frame($,U),_);return}let u=this._extensions[iY.extensionName];this._bufferedBytes+=U[V4],this._state=vC,u.compress($,U.fin,(g,z)=>{if(this._socket.destroyed){let v=Error("The socket was closed while data was being compressed");F9(this,v,_);return}this._bufferedBytes-=U[V4],this._state=A4,U.readOnly=!1,this.sendFrame(C6.frame(z,U),_),this.dequeue()})}dequeue(){while(this._state===A4&&this._queue.length){let $=this._queue.shift();this._bufferedBytes-=$[3][V4],Reflect.apply($[0],this,$.slice(1))}}enqueue($){this._bufferedBytes+=$[3][V4],this._queue.push($)}sendFrame($,I){if($.length===2)this._socket.cork(),this._socket.write($[0]),this._socket.write($[1],I),this._socket.uncork();else this._socket.write($[0],I)}}nY.exports=C6;function F9($,I,U){if(typeof U==="function")U(I);for(let _=0;_<$._queue.length;_++){let u=$._queue[_],g=u[u.length-1];if(typeof g==="function")g(I)}}function NC($,I,U){F9($,I,U),$.onerror(I)}});var aY=E((Rm,tY)=>{var{kForOnEventAttribute:d0,kListener:w9}=_6(),lY=Symbol("kCode"),mY=Symbol("kData"),hY=Symbol("kError"),cY=Symbol("kMessage"),dY=Symbol("kReason"),KI=Symbol("kTarget"),pY=Symbol("kType"),oY=Symbol("kWasClean");class f6{constructor($){this[KI]=null,this[pY]=$}get target(){return this[KI]}get type(){return this[pY]}}Object.defineProperty(f6.prototype,"target",{enumerable:!0});Object.defineProperty(f6.prototype,"type",{enumerable:!0});class RI extends f6{constructor($,I={}){super($);this[lY]=I.code===void 0?0:I.code,this[dY]=I.reason===void 0?"":I.reason,this[oY]=I.wasClean===void 0?!1:I.wasClean}get code(){return this[lY]}get reason(){return this[dY]}get wasClean(){return this[oY]}}Object.defineProperty(RI.prototype,"code",{enumerable:!0});Object.defineProperty(RI.prototype,"reason",{enumerable:!0});Object.defineProperty(RI.prototype,"wasClean",{enumerable:!0});class p0 extends f6{constructor($,I={}){super($);this[hY]=I.error===void 0?null:I.error,this[cY]=I.message===void 0?"":I.message}get error(){return this[hY]}get message(){return this[cY]}}Object.defineProperty(p0.prototype,"error",{enumerable:!0});Object.defineProperty(p0.prototype,"message",{enumerable:!0});class j2 extends f6{constructor($,I={}){super($);this[mY]=I.data===void 0?null:I.data}get data(){return this[mY]}}Object.defineProperty(j2.prototype,"data",{enumerable:!0});var GC={addEventListener($,I,U={}){for(let u of this.listeners($))if(!U[d0]&&u[w9]===I&&!u[d0])return;let _;if($==="message")_=function(g,z){let v=new j2("message",{data:z?g:g.toString()});v[KI]=this,b2(I,this,v)};else if($==="close")_=function(g,z){let v=new RI("close",{code:g,reason:z.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});v[KI]=this,b2(I,this,v)};else if($==="error")_=function(g){let z=new p0("error",{error:g,message:g.message});z[KI]=this,b2(I,this,z)};else if($==="open")_=function(){let g=new f6("open");g[KI]=this,b2(I,this,g)};else return;if(_[d0]=!!U[d0],_[w9]=I,U.once)this.once($,_);else this.on($,_)},removeEventListener($,I){for(let U of this.listeners($))if(U[w9]===I&&!U[d0]){this.removeListener($,U);break}}};tY.exports={CloseEvent:RI,ErrorEvent:p0,Event:f6,EventTarget:GC,MessageEvent:j2};function b2($,I,U){if(typeof $==="object"&&$.handleEvent)$.handleEvent.call($,U);else $.call(I,U)}});var E9=E((Lm,eY)=>{var{tokenChars:o0}=DI();function l4($,I,U){if($[I]===void 0)$[I]=[U];else $[I].push(U)}function XC($){let I=Object.create(null),U=Object.create(null),_=!1,u=!1,g=!1,z,v,J=-1,N=-1,X=-1,G=0;for(;G<$.length;G++)if(N=$.charCodeAt(G),z===void 0)if(X===-1&&o0[N]===1){if(J===-1)J=G}else if(G!==0&&(N===32||N===9)){if(X===-1&&J!==-1)X=G}else if(N===59||N===44){if(J===-1)throw SyntaxError(`Unexpected character at index ${G}`);if(X===-1)X=G;let T=$.slice(J,X);if(N===44)l4(I,T,U),U=Object.create(null);else z=T;J=X=-1}else throw SyntaxError(`Unexpected character at index ${G}`);else if(v===void 0)if(X===-1&&o0[N]===1){if(J===-1)J=G}else if(N===32||N===9){if(X===-1&&J!==-1)X=G}else if(N===59||N===44){if(J===-1)throw SyntaxError(`Unexpected character at index ${G}`);if(X===-1)X=G;if(l4(U,$.slice(J,X),!0),N===44)l4(I,z,U),U=Object.create(null),z=void 0;J=X=-1}else if(N===61&&J!==-1&&X===-1)v=$.slice(J,G),J=X=-1;else throw SyntaxError(`Unexpected character at index ${G}`);else if(u){if(o0[N]!==1)throw SyntaxError(`Unexpected character at index ${G}`);if(J===-1)J=G;else if(!_)_=!0;u=!1}else if(g)if(o0[N]===1){if(J===-1)J=G}else if(N===34&&J!==-1)g=!1,X=G;else if(N===92)u=!0;else throw SyntaxError(`Unexpected character at index ${G}`);else if(N===34&&$.charCodeAt(G-1)===61)g=!0;else if(X===-1&&o0[N]===1){if(J===-1)J=G}else if(J!==-1&&(N===32||N===9)){if(X===-1)X=G}else if(N===59||N===44){if(J===-1)throw SyntaxError(`Unexpected character at index ${G}`);if(X===-1)X=G;let T=$.slice(J,X);if(_)T=T.replace(/\\/g,""),_=!1;if(l4(U,v,T),N===44)l4(I,z,U),U=Object.create(null),z=void 0;v=void 0,J=X=-1}else throw SyntaxError(`Unexpected character at index ${G}`);if(J===-1||g||N===32||N===9)throw SyntaxError("Unexpected end of input");if(X===-1)X=G;let q=$.slice(J,X);if(z===void 0)l4(I,q,U);else{if(v===void 0)l4(U,q,!0);else if(_)l4(U,v,q.replace(/\\/g,""));else l4(U,v,q);l4(I,z,U)}return I}function qC($){return Object.keys($).map((I)=>{let U=$[I];if(!Array.isArray(U))U=[U];return U.map((_)=>{return[I].concat(Object.keys(_).map((u)=>{let g=_[u];if(!Array.isArray(g))g=[g];return g.map((z)=>z===!0?u:`${u}=${z}`).join("; ")})).join("; ")}).join(", ")}).join(", ")}eY.exports={format:qC,parse:XC}});var E2=E((Zm,GO)=>{var QC=g$("events"),TC=g$("https"),HC=g$("http"),IO=g$("net"),YC=g$("tls"),{randomBytes:OC,createHash:VC}=g$("crypto"),{Duplex:Wm,Readable:Pm}=g$("stream"),{URL:C9}=g$("url"),x6=c0(),DC=j9(),BC=S9(),{isBlob:MC}=DI(),{BINARY_TYPES:sY,CLOSE_TIMEOUT:KC,EMPTY_BUFFER:F2,GUID:RC,kForOnEventAttribute:f9,kListener:LC,kStatusCode:WC,kWebSocket:S$,NOOP:uO}=_6(),{EventTarget:{addEventListener:PC,removeEventListener:ZC}}=aY(),{format:AC,parse:bC}=E9(),{toBuffer:jC}=m0(),UO=Symbol("kAborted"),x9=[8,13],z6=["CONNECTING","OPEN","CLOSING","CLOSED"],FC=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class h extends QC{constructor($,I,U){super();if(this._binaryType=sY[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=F2,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=h.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,$!==null){if(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,I===void 0)I=[];else if(!Array.isArray(I))if(typeof I==="object"&&I!==null)U=I,I=[];else I=[I];_O(this,$,I,U)}else this._autoPong=U.autoPong,this._closeTimeout=U.closeTimeout,this._isServer=!0}get binaryType(){return this._binaryType}set binaryType($){if(!sY.includes($))return;if(this._binaryType=$,this._receiver)this._receiver._binaryType=$}get bufferedAmount(){if(!this._socket)return this._bufferedAmount;return this._socket._writableState.length+this._sender._bufferedBytes}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket($,I,U){let _=new DC({allowSynchronousEvents:U.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:U.maxPayload,skipUTF8Validation:U.skipUTF8Validation}),u=new BC($,this._extensions,U.generateMask);if(this._receiver=_,this._sender=u,this._socket=$,_[S$]=this,u[S$]=this,$[S$]=this,_.on("conclude",EC),_.on("drain",CC),_.on("error",fC),_.on("message",xC),_.on("ping",kC),_.on("pong",yC),u.onerror=iC,$.setTimeout)$.setTimeout(0);if($.setNoDelay)$.setNoDelay();if(I.length>0)$.unshift(I);$.on("close",vO),$.on("data",w2),$.on("end",JO),$.on("error",NO),this._readyState=h.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=h.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}if(this._extensions[x6.extensionName])this._extensions[x6.extensionName].cleanup();this._receiver.removeAllListeners(),this._readyState=h.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close($,I){if(this.readyState===h.CLOSED)return;if(this.readyState===h.CONNECTING){X4(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===h.CLOSING){if(this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted))this._socket.end();return}this._readyState=h.CLOSING,this._sender.close($,I,!this._isServer,(U)=>{if(U)return;if(this._closeFrameSent=!0,this._closeFrameReceived||this._receiver._writableState.errorEmitted)this._socket.end()}),zO(this)}pause(){if(this.readyState===h.CONNECTING||this.readyState===h.CLOSED)return;this._paused=!0,this._socket.pause()}ping($,I,U){if(this.readyState===h.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof $==="function")U=$,$=I=void 0;else if(typeof I==="function")U=I,I=void 0;if(typeof $==="number")$=$.toString();if(this.readyState!==h.OPEN){k9(this,$,U);return}if(I===void 0)I=!this._isServer;this._sender.ping($||F2,I,U)}pong($,I,U){if(this.readyState===h.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof $==="function")U=$,$=I=void 0;else if(typeof I==="function")U=I,I=void 0;if(typeof $==="number")$=$.toString();if(this.readyState!==h.OPEN){k9(this,$,U);return}if(I===void 0)I=!this._isServer;this._sender.pong($||F2,I,U)}resume(){if(this.readyState===h.CONNECTING||this.readyState===h.CLOSED)return;if(this._paused=!1,!this._receiver._writableState.needDrain)this._socket.resume()}send($,I,U){if(this.readyState===h.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof I==="function")U=I,I={};if(typeof $==="number")$=$.toString();if(this.readyState!==h.OPEN){k9(this,$,U);return}let _={binary:typeof $!=="string",mask:!this._isServer,compress:!0,fin:!0,...I};if(!this._extensions[x6.extensionName])_.compress=!1;this._sender.send($||F2,_,U)}terminate(){if(this.readyState===h.CLOSED)return;if(this.readyState===h.CONNECTING){X4(this,this._req,"WebSocket was closed before the connection was established");return}if(this._socket)this._readyState=h.CLOSING,this._socket.destroy()}}Object.defineProperty(h,"CONNECTING",{enumerable:!0,value:z6.indexOf("CONNECTING")});Object.defineProperty(h.prototype,"CONNECTING",{enumerable:!0,value:z6.indexOf("CONNECTING")});Object.defineProperty(h,"OPEN",{enumerable:!0,value:z6.indexOf("OPEN")});Object.defineProperty(h.prototype,"OPEN",{enumerable:!0,value:z6.indexOf("OPEN")});Object.defineProperty(h,"CLOSING",{enumerable:!0,value:z6.indexOf("CLOSING")});Object.defineProperty(h.prototype,"CLOSING",{enumerable:!0,value:z6.indexOf("CLOSING")});Object.defineProperty(h,"CLOSED",{enumerable:!0,value:z6.indexOf("CLOSED")});Object.defineProperty(h.prototype,"CLOSED",{enumerable:!0,value:z6.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(($)=>{Object.defineProperty(h.prototype,$,{enumerable:!0})});["open","error","close","message"].forEach(($)=>{Object.defineProperty(h.prototype,`on${$}`,{enumerable:!0,get(){for(let I of this.listeners($))if(I[f9])return I[LC];return null},set(I){for(let U of this.listeners($))if(U[f9]){this.removeListener($,U);break}if(typeof I!=="function")return;this.addEventListener($,I,{[f9]:!0})}})});h.prototype.addEventListener=PC;h.prototype.removeEventListener=ZC;GO.exports=h;function _O($,I,U,_){let u={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:KC,protocolVersion:x9[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,..._,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if($._autoPong=u.autoPong,$._closeTimeout=u.closeTimeout,!x9.includes(u.protocolVersion))throw RangeError(`Unsupported protocol version: ${u.protocolVersion} (supported versions: ${x9.join(", ")})`);let g;if(I instanceof C9)g=I;else try{g=new C9(I)}catch(Q){throw SyntaxError(`Invalid URL: ${I}`)}if(g.protocol==="http:")g.protocol="ws:";else if(g.protocol==="https:")g.protocol="wss:";$._url=g.href;let z=g.protocol==="wss:",v=g.protocol==="ws+unix:",J;if(g.protocol!=="ws:"&&!z&&!v)J=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`;else if(v&&!g.pathname)J="The URL's pathname is empty";else if(g.hash)J="The URL contains a fragment identifier";if(J){let Q=SyntaxError(J);if($._redirects===0)throw Q;else{S2($,Q);return}}let N=z?443:80,X=OC(16).toString("base64"),G=z?TC.request:HC.request,q=new Set,T;if(u.createConnection=u.createConnection||(z?wC:SC),u.defaultPort=u.defaultPort||N,u.port=g.port||N,u.host=g.hostname.startsWith("[")?g.hostname.slice(1,-1):g.hostname,u.headers={...u.headers,"Sec-WebSocket-Version":u.protocolVersion,"Sec-WebSocket-Key":X,Connection:"Upgrade",Upgrade:"websocket"},u.path=g.pathname+g.search,u.timeout=u.handshakeTimeout,u.perMessageDeflate)T=new x6(u.perMessageDeflate!==!0?u.perMessageDeflate:{},!1,u.maxPayload),u.headers["Sec-WebSocket-Extensions"]=AC({[x6.extensionName]:T.offer()});if(U.length){for(let Q of U){if(typeof Q!=="string"||!FC.test(Q)||q.has(Q))throw SyntaxError("An invalid or duplicated subprotocol was specified");q.add(Q)}u.headers["Sec-WebSocket-Protocol"]=U.join(",")}if(u.origin)if(u.protocolVersion<13)u.headers["Sec-WebSocket-Origin"]=u.origin;else u.headers.Origin=u.origin;if(g.username||g.password)u.auth=`${g.username}:${g.password}`;if(v){let Q=u.path.split(":");u.socketPath=Q[0],u.path=Q[1]}let H;if(u.followRedirects){if($._redirects===0){$._originalIpc=v,$._originalSecure=z,$._originalHostOrSocketPath=v?u.socketPath:g.host;let Q=_&&_.headers;if(_={..._,headers:{}},Q)for(let[Y,K]of Object.entries(Q))_.headers[Y.toLowerCase()]=K}else if($.listenerCount("redirect")===0){let Q=v?$._originalIpc?u.socketPath===$._originalHostOrSocketPath:!1:$._originalIpc?!1:g.host===$._originalHostOrSocketPath;if(!Q||$._originalSecure&&!z){if(delete u.headers.authorization,delete u.headers.cookie,!Q)delete u.headers.host;u.auth=void 0}}if(u.auth&&!_.headers.authorization)_.headers.authorization="Basic "+Buffer.from(u.auth).toString("base64");if(H=$._req=G(u),$._redirects)$.emit("redirect",$.url,H)}else H=$._req=G(u);if(u.timeout)H.on("timeout",()=>{X4($,H,"Opening handshake has timed out")});if(H.on("error",(Q)=>{if(H===null||H[UO])return;H=$._req=null,S2($,Q)}),H.on("response",(Q)=>{let Y=Q.headers.location,K=Q.statusCode;if(Y&&u.followRedirects&&K>=300&&K<400){if(++$._redirects>u.maxRedirects){X4($,H,"Maximum redirects exceeded");return}H.abort();let R;try{R=new C9(Y,I)}catch(P){let O=SyntaxError(`Invalid URL: ${Y}`);S2($,O);return}_O($,R,U,_)}else if(!$.emit("unexpected-response",H,Q))X4($,H,`Unexpected server response: ${Q.statusCode}`)}),H.on("upgrade",(Q,Y,K)=>{if($.emit("upgrade",Q),$.readyState!==h.CONNECTING)return;H=$._req=null;let R=Q.headers.upgrade;if(R===void 0||R.toLowerCase()!=="websocket"){X4($,Y,"Invalid Upgrade header");return}let P=VC("sha1").update(X+RC).digest("base64");if(Q.headers["sec-websocket-accept"]!==P){X4($,Y,"Invalid Sec-WebSocket-Accept header");return}let O=Q.headers["sec-websocket-protocol"],D;if(O!==void 0){if(!q.size)D="Server sent a subprotocol but none was requested";else if(!q.has(O))D="Server sent an invalid subprotocol"}else if(q.size)D="Server sent no subprotocol";if(D){X4($,Y,D);return}if(O)$._protocol=O;let L=Q.headers["sec-websocket-extensions"];if(L!==void 0){if(!T){X4($,Y,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let B;try{B=bC(L)}catch(F){X4($,Y,"Invalid Sec-WebSocket-Extensions header");return}let M=Object.keys(B);if(M.length!==1||M[0]!==x6.extensionName){X4($,Y,"Server indicated an extension that was not requested");return}try{T.accept(B[x6.extensionName])}catch(F){X4($,Y,"Invalid Sec-WebSocket-Extensions header");return}$._extensions[x6.extensionName]=T}$.setSocket(Y,K,{allowSynchronousEvents:u.allowSynchronousEvents,generateMask:u.generateMask,maxPayload:u.maxPayload,skipUTF8Validation:u.skipUTF8Validation})}),u.finishRequest)u.finishRequest(H,$);else H.end()}function S2($,I){$._readyState=h.CLOSING,$._errorEmitted=!0,$.emit("error",I),$.emitClose()}function SC($){return $.path=$.socketPath,IO.connect($)}function wC($){if($.path=void 0,!$.servername&&$.servername!=="")$.servername=IO.isIP($.host)?"":$.host;return YC.connect($)}function X4($,I,U){$._readyState=h.CLOSING;let _=Error(U);if(Error.captureStackTrace(_,X4),I.setHeader){if(I[UO]=!0,I.abort(),I.socket&&!I.socket.destroyed)I.socket.destroy();process.nextTick(S2,$,_)}else I.destroy(_),I.once("error",$.emit.bind($,"error")),I.once("close",$.emitClose.bind($))}function k9($,I,U){if(I){let _=MC(I)?I.size:jC(I).length;if($._socket)$._sender._bufferedBytes+=_;else $._bufferedAmount+=_}if(U){let _=Error(`WebSocket is not open: readyState ${$.readyState} (${z6[$.readyState]})`);process.nextTick(U,_)}}function EC($,I){let U=this[S$];if(U._closeFrameReceived=!0,U._closeMessage=I,U._closeCode=$,U._socket[S$]===void 0)return;if(U._socket.removeListener("data",w2),process.nextTick(gO,U._socket),$===1005)U.close();else U.close($,I)}function CC(){let $=this[S$];if(!$.isPaused)$._socket.resume()}function fC($){let I=this[S$];if(I._socket[S$]!==void 0)I._socket.removeListener("data",w2),process.nextTick(gO,I._socket),I.close($[WC]);if(!I._errorEmitted)I._errorEmitted=!0,I.emit("error",$)}function $O(){this[S$].emitClose()}function xC($,I){this[S$].emit("message",$,I)}function kC($){let I=this[S$];if(I._autoPong)I.pong($,!this._isServer,uO);I.emit("ping",$)}function yC($){this[S$].emit("pong",$)}function gO($){$.resume()}function iC($){let I=this[S$];if(I.readyState===h.CLOSED)return;if(I.readyState===h.OPEN)I._readyState=h.CLOSING,zO(I);if(this._socket.end(),!I._errorEmitted)I._errorEmitted=!0,I.emit("error",$)}function zO($){$._closeTimer=setTimeout($._socket.destroy.bind($._socket),$._closeTimeout)}function vO(){let $=this[S$];if(this.removeListener("close",vO),this.removeListener("data",w2),this.removeListener("end",JO),$._readyState=h.CLOSING,!this._readableState.endEmitted&&!$._closeFrameReceived&&!$._receiver._writableState.errorEmitted&&this._readableState.length!==0){let I=this.read(this._readableState.length);$._receiver.write(I)}if($._receiver.end(),this[S$]=void 0,clearTimeout($._closeTimer),$._receiver._writableState.finished||$._receiver._writableState.errorEmitted)$.emitClose();else $._receiver.on("error",$O),$._receiver.on("finish",$O)}function w2($){if(!this[S$]._receiver.write($))this.pause()}function JO(){let $=this[S$];$._readyState=h.CLOSING,$._receiver.end(),this.end()}function NO(){let $=this[S$];if(this.removeListener("error",NO),this.on("error",uO),$)$._readyState=h.CLOSING,this.destroy()}});var TO=E((bm,QO)=>{var Am=E2(),{Duplex:rC}=g$("stream");function XO($){$.emit("close")}function nC(){if(!this.destroyed&&this._writableState.finished)this.destroy()}function qO($){if(this.removeListener("error",qO),this.destroy(),this.listenerCount("error")===0)this.emit("error",$)}function lC($,I){let U=!0,_=new rC({...I,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return $.on("message",function(g,z){let v=!z&&_._readableState.objectMode?g.toString():g;if(!_.push(v))$.pause()}),$.once("error",function(g){if(_.destroyed)return;U=!1,_.destroy(g)}),$.once("close",function(){if(_.destroyed)return;_.push(null)}),_._destroy=function(u,g){if($.readyState===$.CLOSED){g(u),process.nextTick(XO,_);return}let z=!1;if($.once("error",function(J){z=!0,g(J)}),$.once("close",function(){if(!z)g(u);process.nextTick(XO,_)}),U)$.terminate()},_._final=function(u){if($.readyState===$.CONNECTING){$.once("open",function(){_._final(u)});return}if($._socket===null)return;if($._socket._writableState.finished){if(u(),_._readableState.endEmitted)_.destroy()}else $._socket.once("finish",function(){u()}),$.close()},_._read=function(){if($.isPaused)$.resume()},_._write=function(u,g,z){if($.readyState===$.CONNECTING){$.once("open",function(){_._write(u,g,z)});return}$.send(u,z)},_.on("end",nC),_.on("error",qO),_}QO.exports=lC});var YO=E((jm,HO)=>{var{tokenChars:mC}=DI();function hC($){let I=new Set,U=-1,_=-1,u=0;for(u;u<$.length;u++){let z=$.charCodeAt(u);if(_===-1&&mC[z]===1){if(U===-1)U=u}else if(u!==0&&(z===32||z===9)){if(_===-1&&U!==-1)_=u}else if(z===44){if(U===-1)throw SyntaxError(`Unexpected character at index ${u}`);if(_===-1)_=u;let v=$.slice(U,_);if(I.has(v))throw SyntaxError(`The "${v}" subprotocol is duplicated`);I.add(v),U=_=-1}else throw SyntaxError(`Unexpected character at index ${u}`)}if(U===-1||_!==-1)throw SyntaxError("Unexpected end of input");let g=$.slice(U,u);if(I.has(g))throw SyntaxError(`The "${g}" subprotocol is duplicated`);return I.add(g),I}HO.exports={parse:hC}});var MO=E((Sm,BO)=>{var cC=g$("events"),C2=g$("http"),{Duplex:Fm}=g$("stream"),{createHash:dC}=g$("crypto"),OO=E9(),D1=c0(),pC=YO(),oC=E2(),{CLOSE_TIMEOUT:tC,GUID:aC,kWebSocket:eC}=_6(),sC=/^[+/0-9A-Za-z]{22}==$/;class DO extends cC{constructor($,I){super();if($={allowSynchronousEvents:!0,autoPong:!0,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:tC,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:oC,...$},$.port==null&&!$.server&&!$.noServer||$.port!=null&&($.server||$.noServer)||$.server&&$.noServer)throw TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if($.port!=null)this._server=C2.createServer((U,_)=>{let u=C2.STATUS_CODES[426];_.writeHead(426,{"Content-Length":u.length,"Content-Type":"text/plain"}),_.end(u)}),this._server.listen($.port,$.host,$.backlog,I);else if($.server)this._server=$.server;if(this._server){let U=this.emit.bind(this,"connection");this._removeListeners=$f(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(_,u,g)=>{this.handleUpgrade(_,u,g,U)}})}if($.perMessageDeflate===!0)$.perMessageDeflate={};if($.clientTracking)this.clients=new Set,this._shouldEmitClose=!1;this.options=$,this._state=0}address(){if(this.options.noServer)throw Error('The server is operating in "noServer" mode');if(!this._server)return null;return this._server.address()}close($){if(this._state===2){if($)this.once("close",()=>{$(Error("The server is not running"))});process.nextTick(t0,this);return}if($)this.once("close",$);if(this._state===1)return;if(this._state=1,this.options.noServer||this.options.server){if(this._server)this._removeListeners(),this._removeListeners=this._server=null;if(this.clients)if(!this.clients.size)process.nextTick(t0,this);else this._shouldEmitClose=!0;else process.nextTick(t0,this)}else{let I=this._server;this._removeListeners(),this._removeListeners=this._server=null,I.close(()=>{t0(this)})}}shouldHandle($){if(this.options.path){let I=$.url.indexOf("?");if((I!==-1?$.url.slice(0,I):$.url)!==this.options.path)return!1}return!0}handleUpgrade($,I,U,_){I.on("error",VO);let u=$.headers["sec-websocket-key"],g=$.headers.upgrade,z=+$.headers["sec-websocket-version"];if($.method!=="GET"){B1(this,$,I,405,"Invalid HTTP method");return}if(g===void 0||g.toLowerCase()!=="websocket"){B1(this,$,I,400,"Invalid Upgrade header");return}if(u===void 0||!sC.test(u)){B1(this,$,I,400,"Missing or invalid Sec-WebSocket-Key header");return}if(z!==13&&z!==8){B1(this,$,I,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle($)){a0(I,400);return}let v=$.headers["sec-websocket-protocol"],J=new Set;if(v!==void 0)try{J=pC.parse(v)}catch(G){B1(this,$,I,400,"Invalid Sec-WebSocket-Protocol header");return}let N=$.headers["sec-websocket-extensions"],X={};if(this.options.perMessageDeflate&&N!==void 0){let G=new D1(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let q=OO.parse(N);if(q[D1.extensionName])G.accept(q[D1.extensionName]),X[D1.extensionName]=G}catch(q){B1(this,$,I,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let G={origin:$.headers[`${z===8?"sec-websocket-origin":"origin"}`],secure:!!($.socket.authorized||$.socket.encrypted),req:$};if(this.options.verifyClient.length===2){this.options.verifyClient(G,(q,T,H,Q)=>{if(!q)return a0(I,T||401,H,Q);this.completeUpgrade(X,u,J,$,I,U,_)});return}if(!this.options.verifyClient(G))return a0(I,401)}this.completeUpgrade(X,u,J,$,I,U,_)}completeUpgrade($,I,U,_,u,g,z){if(!u.readable||!u.writable)return u.destroy();if(u[eC])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>0)return a0(u,503);let J=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${dC("sha1").update(I+aC).digest("base64")}`],N=new this.options.WebSocket(null,void 0,this.options);if(U.size){let X=this.options.handleProtocols?this.options.handleProtocols(U,_):U.values().next().value;if(X)J.push(`Sec-WebSocket-Protocol: ${X}`),N._protocol=X}if($[D1.extensionName]){let X=$[D1.extensionName].params,G=OO.format({[D1.extensionName]:[X]});J.push(`Sec-WebSocket-Extensions: ${G}`),N._extensions=$}if(this.emit("headers",J,_),u.write(J.concat(`\r
292
293
  `).join(`\r
293
- `)),u.removeListener("error",OO),N.setSocket(u,g,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients)this.clients.add(N),N.on("close",()=>{if(this.clients.delete(N),this._shouldEmitClose&&!this.clients.size)process.nextTick(d0,this)});z(N,_)}}VO.exports=DO;function $f($,I){for(let U of Object.keys(I))$.on(U,I[U]);return function(){for(let _ of Object.keys(I))$.removeListener(_,I[_])}}function d0($){$._state=2,$.emit("close")}function OO(){this.destroy()}function p0($,I,U,_){U=U||w2.STATUS_CODES[I],_={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(U),..._},$.once("finish",$.destroy),$.end(`HTTP/1.1 ${I} ${w2.STATUS_CODES[I]}\r
294
+ `)),u.removeListener("error",VO),N.setSocket(u,g,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients)this.clients.add(N),N.on("close",()=>{if(this.clients.delete(N),this._shouldEmitClose&&!this.clients.size)process.nextTick(t0,this)});z(N,_)}}BO.exports=DO;function $f($,I){for(let U of Object.keys(I))$.on(U,I[U]);return function(){for(let _ of Object.keys(I))$.removeListener(_,I[_])}}function t0($){$._state=2,$.emit("close")}function VO(){this.destroy()}function a0($,I,U,_){U=U||C2.STATUS_CODES[I],_={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(U),..._},$.once("finish",$.destroy),$.end(`HTTP/1.1 ${I} ${C2.STATUS_CODES[I]}\r
294
295
  `+Object.keys(_).map((u)=>`${u}: ${_[u]}`).join(`\r
295
296
  `)+`\r
296
297
  \r
297
- `+U)}function D1($,I,U,_,u,g){if($.listenerCount("wsClientError")){let z=Error(u);Error.captureStackTrace(z,D1),$.emit("wsClientError",z,U,I)}else p0(U,_,u,g)}});var NX=q$(JX(),1),{program:Ix,createCommand:ux,createArgument:Ux,createOption:_x,CommanderError:gx,InvalidArgumentError:zx,InvalidOptionArgumentError:vx,Command:m2,Argument:Jx,Option:Nx,Help:Gx}=NX.default;Uz();var n=q$(b$(),1);import{execSync as Lj,spawn as s3}from"node:child_process";import y from"node:fs";import{tmpdir as A_}from"node:os";import I$ from"node:path";var z$={};O4(z$,{xor:()=>cQ,xid:()=>HQ,void:()=>iQ,uuidv7:()=>vQ,uuidv6:()=>zQ,uuidv4:()=>gQ,uuid:()=>_Q,util:()=>w,url:()=>JQ,uppercase:()=>r1,unknown:()=>e6,union:()=>V_,undefined:()=>kQ,ulid:()=>TQ,uint64:()=>fQ,uint32:()=>wQ,tuple:()=>B3,trim:()=>p1,treeifyError:()=>Hz,transform:()=>M_,toUpperCase:()=>t1,toLowerCase:()=>o1,toJSONSchema:()=>cU,templateLiteral:()=>g7,symbol:()=>xQ,superRefine:()=>d3,success:()=>u7,stringbool:()=>Q7,stringFormat:()=>WQ,string:()=>eU,strictObject:()=>mQ,startsWith:()=>m1,slugify:()=>a1,size:()=>o6,setErrorMap:()=>Nj,set:()=>aQ,safeParseAsync:()=>p8,safeParse:()=>d8,safeEncodeAsync:()=>I3,safeEncode:()=>s8,safeDecodeAsync:()=>u3,safeDecode:()=>$3,registry:()=>OU,regexes:()=>Q4,regex:()=>i1,refine:()=>c3,record:()=>M3,readonly:()=>i3,property:()=>rU,promise:()=>z7,prettifyError:()=>Yz,preprocess:()=>H7,prefault:()=>w3,positive:()=>kU,pipe:()=>M0,partialRecord:()=>pQ,parseAsync:()=>c8,parse:()=>h8,overwrite:()=>B4,optional:()=>V0,object:()=>lQ,number:()=>_3,nullish:()=>I7,nullable:()=>B0,null:()=>N3,normalize:()=>d1,nonpositive:()=>iU,nonoptional:()=>E3,nonnegative:()=>nU,never:()=>D_,negative:()=>yU,nativeEnum:()=>eQ,nanoid:()=>XQ,nan:()=>U7,multipleOf:()=>B6,minSize:()=>C4,minLength:()=>d4,mime:()=>c1,meta:()=>X7,maxSize:()=>M6,maxLength:()=>t6,map:()=>tQ,mac:()=>DQ,lte:()=>u4,lt:()=>w4,lowercase:()=>n1,looseRecord:()=>oQ,looseObject:()=>hQ,locales:()=>T0,literal:()=>sQ,length:()=>a6,lazy:()=>l3,ksuid:()=>YQ,keyof:()=>rQ,jwt:()=>PQ,json:()=>T7,iso:()=>$I,ipv6:()=>VQ,ipv4:()=>OQ,intersection:()=>D3,int64:()=>CQ,int32:()=>SQ,int:()=>sU,instanceof:()=>q7,includes:()=>l1,httpUrl:()=>NQ,hostname:()=>ZQ,hex:()=>AQ,hash:()=>bQ,guid:()=>UQ,gte:()=>r$,gt:()=>E4,globalRegistry:()=>w$,getErrorMap:()=>Gj,function:()=>v7,fromJSONSchema:()=>O7,formatError:()=>U0,float64:()=>FQ,float32:()=>jQ,flattenError:()=>u0,file:()=>$7,exactOptional:()=>A3,enum:()=>B_,endsWith:()=>h1,encodeAsync:()=>a8,encode:()=>o8,emoji:()=>GQ,email:()=>uQ,e164:()=>LQ,discriminatedUnion:()=>dQ,describe:()=>G7,decodeAsync:()=>e8,decode:()=>t8,date:()=>nQ,custom:()=>N7,cuid2:()=>QQ,cuid:()=>qQ,core:()=>p4,config:()=>R$,coerce:()=>o3,codec:()=>_7,clone:()=>n$,cidrv6:()=>MQ,cidrv4:()=>BQ,check:()=>J7,catch:()=>x3,boolean:()=>g3,bigint:()=>EQ,base64url:()=>KQ,base64:()=>RQ,array:()=>L0,any:()=>yQ,_function:()=>v7,_default:()=>F3,_ZodString:()=>$_,ZodXor:()=>H3,ZodXID:()=>v_,ZodVoid:()=>Q3,ZodUnknown:()=>X3,ZodUnion:()=>W0,ZodUndefined:()=>v3,ZodUUID:()=>f4,ZodURL:()=>R0,ZodULID:()=>z_,ZodType:()=>c,ZodTuple:()=>V3,ZodTransform:()=>W3,ZodTemplateLiteral:()=>n3,ZodSymbol:()=>z3,ZodSuccess:()=>C3,ZodStringFormat:()=>J$,ZodString:()=>uI,ZodSet:()=>K3,ZodRecord:()=>Z0,ZodRealError:()=>a$,ZodReadonly:()=>y3,ZodPromise:()=>m3,ZodPrefault:()=>S3,ZodPipe:()=>L_,ZodOptional:()=>R_,ZodObject:()=>P0,ZodNumberFormat:()=>s6,ZodNumber:()=>_I,ZodNullable:()=>b3,ZodNull:()=>J3,ZodNonOptional:()=>K_,ZodNever:()=>q3,ZodNanoID:()=>U_,ZodNaN:()=>k3,ZodMap:()=>R3,ZodMAC:()=>U3,ZodLiteral:()=>L3,ZodLazy:()=>r3,ZodKSUID:()=>J_,ZodJWT:()=>Y_,ZodIssueCode:()=>Jj,ZodIntersection:()=>O3,ZodISOTime:()=>tU,ZodISODuration:()=>aU,ZodISODateTime:()=>pU,ZodISODate:()=>oU,ZodIPv6:()=>G_,ZodIPv4:()=>N_,ZodGUID:()=>D0,ZodFunction:()=>h3,ZodFirstPartyTypeKind:()=>p3,ZodFile:()=>P3,ZodExactOptional:()=>Z3,ZodError:()=>zj,ZodEnum:()=>II,ZodEmoji:()=>u_,ZodEmail:()=>I_,ZodE164:()=>H_,ZodDiscriminatedUnion:()=>Y3,ZodDefault:()=>j3,ZodDate:()=>K0,ZodCustomStringFormat:()=>UI,ZodCustom:()=>A0,ZodCodec:()=>P_,ZodCatch:()=>f3,ZodCUID2:()=>g_,ZodCUID:()=>__,ZodCIDRv6:()=>q_,ZodCIDRv4:()=>X_,ZodBoolean:()=>gI,ZodBigIntFormat:()=>O_,ZodBigInt:()=>zI,ZodBase64URL:()=>T_,ZodBase64:()=>Q_,ZodArray:()=>T3,ZodAny:()=>G3,TimePrecision:()=>BN,NEVER:()=>_z,$output:()=>TN,$input:()=>HN,$brand:()=>gz});var p4={};O4(p4,{version:()=>Xv,util:()=>w,treeifyError:()=>Hz,toJSONSchema:()=>cU,toDotPath:()=>P5,safeParseAsync:()=>Dz,safeParse:()=>Oz,safeEncodeAsync:()=>XA,safeEncode:()=>NA,safeDecodeAsync:()=>qA,safeDecode:()=>GA,registry:()=>OU,regexes:()=>Q4,process:()=>_$,prettifyError:()=>Yz,parseAsync:()=>ou,parse:()=>pu,meta:()=>$8,locales:()=>T0,isValidJWT:()=>m5,isValidBase64URL:()=>l5,isValidBase64:()=>wv,initializeContext:()=>R6,globalRegistry:()=>w$,globalConfig:()=>pI,formatError:()=>U0,flattenError:()=>u0,finalize:()=>L6,extractDefs:()=>K6,encodeAsync:()=>vA,encode:()=>gA,describe:()=>sN,decodeAsync:()=>JA,decode:()=>zA,createToJSONSchemaMethod:()=>u8,createStandardJSONSchemaMethod:()=>s1,config:()=>R$,clone:()=>n$,_xor:()=>fb,_xid:()=>AU,_void:()=>mN,_uuidv7:()=>RU,_uuidv6:()=>MU,_uuidv4:()=>BU,_uuid:()=>VU,_url:()=>Y0,_uppercase:()=>r1,_unknown:()=>rN,_union:()=>Cb,_undefined:()=>yN,_ulid:()=>ZU,_uint64:()=>xN,_uint32:()=>FN,_tuple:()=>yb,_trim:()=>p1,_transform:()=>cb,_toUpperCase:()=>t1,_toLowerCase:()=>o1,_templateLiteral:()=>Ij,_symbol:()=>kN,_superRefine:()=>eN,_success:()=>ab,_stringbool:()=>I8,_stringFormat:()=>e1,_string:()=>ON,_startsWith:()=>m1,_slugify:()=>a1,_size:()=>o6,_set:()=>rb,_safeParseAsync:()=>x1,_safeParse:()=>f1,_safeEncodeAsync:()=>uU,_safeEncode:()=>$U,_safeDecodeAsync:()=>UU,_safeDecode:()=>IU,_regex:()=>i1,_refine:()=>aN,_record:()=>ib,_readonly:()=>$j,_property:()=>rU,_promise:()=>Uj,_positive:()=>kU,_pipe:()=>sb,_parseAsync:()=>C1,_parse:()=>E1,_overwrite:()=>B4,_optional:()=>db,_number:()=>PN,_nullable:()=>pb,_null:()=>iN,_normalize:()=>d1,_nonpositive:()=>iU,_nonoptional:()=>tb,_nonnegative:()=>nU,_never:()=>lN,_negative:()=>yU,_nativeEnum:()=>mb,_nanoid:()=>LU,_nan:()=>dN,_multipleOf:()=>B6,_minSize:()=>C4,_minLength:()=>d4,_min:()=>r$,_mime:()=>c1,_maxSize:()=>M6,_maxLength:()=>t6,_max:()=>u4,_map:()=>nb,_mac:()=>VN,_lte:()=>u4,_lt:()=>w4,_lowercase:()=>n1,_literal:()=>hb,_length:()=>a6,_lazy:()=>uj,_ksuid:()=>bU,_jwt:()=>xU,_isoTime:()=>KN,_isoDuration:()=>LN,_isoDateTime:()=>MN,_isoDate:()=>RN,_ipv6:()=>FU,_ipv4:()=>jU,_intersection:()=>kb,_int64:()=>fN,_int32:()=>jN,_int:()=>ZN,_includes:()=>l1,_guid:()=>H0,_gte:()=>r$,_gt:()=>E4,_float64:()=>bN,_float32:()=>AN,_file:()=>oN,_enum:()=>lb,_endsWith:()=>h1,_encodeAsync:()=>eu,_encode:()=>tu,_emoji:()=>KU,_email:()=>DU,_e164:()=>fU,_discriminatedUnion:()=>xb,_default:()=>ob,_decodeAsync:()=>su,_decode:()=>au,_date:()=>hN,_custom:()=>tN,_cuid2:()=>WU,_cuid:()=>PU,_coercedString:()=>DN,_coercedNumber:()=>WN,_coercedDate:()=>cN,_coercedBoolean:()=>wN,_coercedBigint:()=>CN,_cidrv6:()=>wU,_cidrv4:()=>SU,_check:()=>s5,_catch:()=>eb,_boolean:()=>SN,_bigint:()=>EN,_base64url:()=>CU,_base64:()=>EU,_array:()=>pN,_any:()=>nN,TimePrecision:()=>BN,NEVER:()=>_z,JSONSchemaGenerator:()=>i8,JSONSchema:()=>$Q,Doc:()=>vU,$output:()=>TN,$input:()=>HN,$constructor:()=>D,$brand:()=>gz,$ZodXor:()=>av,$ZodXID:()=>Rv,$ZodVoid:()=>dv,$ZodUnknown:()=>hv,$ZodUnion:()=>J0,$ZodUndefined:()=>rv,$ZodUUID:()=>Tv,$ZodURL:()=>Yv,$ZodULID:()=>Mv,$ZodType:()=>l,$ZodTuple:()=>HU,$ZodTransform:()=>zJ,$ZodTemplateLiteral:()=>OJ,$ZodSymbol:()=>nv,$ZodSuccess:()=>qJ,$ZodStringFormat:()=>v$,$ZodString:()=>p6,$ZodSet:()=>uJ,$ZodRegistry:()=>YN,$ZodRecord:()=>$J,$ZodRealError:()=>t$,$ZodReadonly:()=>YJ,$ZodPromise:()=>VJ,$ZodPrefault:()=>GJ,$ZodPipe:()=>HJ,$ZodOptional:()=>YU,$ZodObjectJIT:()=>tv,$ZodObject:()=>d5,$ZodNumberFormat:()=>yv,$ZodNumber:()=>QU,$ZodNullable:()=>JJ,$ZodNull:()=>lv,$ZodNonOptional:()=>XJ,$ZodNever:()=>cv,$ZodNanoID:()=>Dv,$ZodNaN:()=>TJ,$ZodMap:()=>IJ,$ZodMAC:()=>jv,$ZodLiteral:()=>_J,$ZodLazy:()=>BJ,$ZodKSUID:()=>Kv,$ZodJWT:()=>xv,$ZodIntersection:()=>sv,$ZodISOTime:()=>Wv,$ZodISODuration:()=>Zv,$ZodISODateTime:()=>Lv,$ZodISODate:()=>Pv,$ZodIPv6:()=>bv,$ZodIPv4:()=>Av,$ZodGUID:()=>Qv,$ZodFunction:()=>DJ,$ZodFile:()=>gJ,$ZodExactOptional:()=>vJ,$ZodError:()=>I0,$ZodEnum:()=>UJ,$ZodEncodeError:()=>h6,$ZodEmoji:()=>Ov,$ZodEmail:()=>Hv,$ZodE164:()=>fv,$ZodDiscriminatedUnion:()=>ev,$ZodDefault:()=>NJ,$ZodDate:()=>pv,$ZodCustomStringFormat:()=>kv,$ZodCustom:()=>MJ,$ZodCodec:()=>N0,$ZodCheckUpperCase:()=>_v,$ZodCheckStringFormat:()=>k1,$ZodCheckStartsWith:()=>zv,$ZodCheckSizeEquals:()=>ez,$ZodCheckRegex:()=>uv,$ZodCheckProperty:()=>Jv,$ZodCheckOverwrite:()=>Gv,$ZodCheckNumberFormat:()=>pz,$ZodCheckMultipleOf:()=>dz,$ZodCheckMinSize:()=>az,$ZodCheckMinLength:()=>$v,$ZodCheckMimeType:()=>Nv,$ZodCheckMaxSize:()=>tz,$ZodCheckMaxLength:()=>sz,$ZodCheckLowerCase:()=>Uv,$ZodCheckLessThan:()=>gU,$ZodCheckLengthEquals:()=>Iv,$ZodCheckIncludes:()=>gv,$ZodCheckGreaterThan:()=>zU,$ZodCheckEndsWith:()=>vv,$ZodCheckBigIntFormat:()=>oz,$ZodCheck:()=>G$,$ZodCatch:()=>QJ,$ZodCUID2:()=>Bv,$ZodCUID:()=>Vv,$ZodCIDRv6:()=>Sv,$ZodCIDRv4:()=>Fv,$ZodBoolean:()=>v0,$ZodBigIntFormat:()=>iv,$ZodBigInt:()=>TU,$ZodBase64URL:()=>Cv,$ZodBase64:()=>Ev,$ZodAsyncError:()=>S4,$ZodArray:()=>ov,$ZodAny:()=>mv});var _z=Object.freeze({status:"aborted"});function D($,I,U){function _(v,J){if(!v._zod)Object.defineProperty(v,"_zod",{value:{def:J,constr:z,traits:new Set},enumerable:!1});if(v._zod.traits.has($))return;v._zod.traits.add($),I(v,J);let N=z.prototype,X=Object.keys(N);for(let G=0;G<X.length;G++){let q=X[G];if(!(q in v))v[q]=N[q].bind(v)}}let u=U?.Parent??Object;class g extends u{}Object.defineProperty(g,"name",{value:$});function z(v){var J;let N=U?.Parent?new g:this;_(N,v),(J=N._zod).deferred??(J.deferred=[]);for(let X of N._zod.deferred)X();return N}return Object.defineProperty(z,"init",{value:_}),Object.defineProperty(z,Symbol.hasInstance,{value:(v)=>{if(U?.Parent&&v instanceof U.Parent)return!0;return v?._zod?.traits?.has($)}}),Object.defineProperty(z,"name",{value:$}),z}var gz=Symbol("zod_brand");class S4 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class h6 extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}}var pI={};function R$($){if($)Object.assign(pI,$);return pI}var w={};O4(w,{unwrapMessage:()=>oI,uint8ArrayToHex:()=>UA,uint8ArrayToBase64url:()=>IA,uint8ArrayToBase64:()=>R5,stringifyPrimitive:()=>j,slugify:()=>Jz,shallowClone:()=>Gz,safeExtend:()=>oZ,required:()=>eZ,randomString:()=>rZ,propertyKeyTypes:()=>eI,promiseAllObject:()=>nZ,primitiveTypes:()=>Xz,prefixIssues:()=>I4,pick:()=>cZ,partial:()=>aZ,parsedType:()=>S,optionalKeys:()=>qz,omit:()=>dZ,objectClone:()=>kZ,numKeys:()=>lZ,nullish:()=>Y6,normalizeParams:()=>C,mergeDefs:()=>c4,merge:()=>tZ,jsonStringifyReplacer:()=>F1,joinValues:()=>P,issue:()=>w1,isPlainObject:()=>D6,isObject:()=>c6,hexToUint8Array:()=>uA,getSizableOrigin:()=>sI,getParsedType:()=>mZ,getLengthableOrigin:()=>$0,getEnumValues:()=>tI,getElementAtPath:()=>iZ,floatSafeRemainder:()=>vz,finalizeIssue:()=>o$,extend:()=>pZ,escapeRegex:()=>q4,esc:()=>cu,defineLazy:()=>p,createTransparentProxy:()=>hZ,cloneDef:()=>yZ,clone:()=>n$,cleanRegex:()=>aI,cleanEnum:()=>sZ,captureStackTrace:()=>du,cached:()=>S1,base64urlToUint8Array:()=>$A,base64ToUint8Array:()=>M5,assignProp:()=>O6,assertNotEqual:()=>EZ,assertNever:()=>fZ,assertIs:()=>CZ,assertEqual:()=>wZ,assert:()=>xZ,allowsEval:()=>Nz,aborted:()=>V6,NUMBER_FORMAT_RANGES:()=>Qz,Class:()=>K5,BIGINT_FORMAT_RANGES:()=>Tz});function wZ($){return $}function EZ($){return $}function CZ($){}function fZ($){throw Error("Unexpected value in exhaustive check")}function xZ($){}function tI($){let I=Object.values($).filter((_)=>typeof _==="number");return Object.entries($).filter(([_,u])=>I.indexOf(+_)===-1).map(([_,u])=>u)}function P($,I="|"){return $.map((U)=>j(U)).join(I)}function F1($,I){if(typeof I==="bigint")return I.toString();return I}function S1($){return{get value(){{let U=$();return Object.defineProperty(this,"value",{value:U}),U}throw Error("cached value already set")}}}function Y6($){return $===null||$===void 0}function aI($){let I=$.startsWith("^")?1:0,U=$.endsWith("$")?$.length-1:$.length;return $.slice(I,U)}function vz($,I){let U=($.toString().split(".")[1]||"").length,_=I.toString(),u=(_.split(".")[1]||"").length;if(u===0&&/\d?e-\d?/.test(_)){let J=_.match(/\d?e-(\d?)/);if(J?.[1])u=Number.parseInt(J[1])}let g=U>u?U:u,z=Number.parseInt($.toFixed(g).replace(".","")),v=Number.parseInt(I.toFixed(g).replace(".",""));return z%v/10**g}var B5=Symbol("evaluating");function p($,I,U){let _=void 0;Object.defineProperty($,I,{get(){if(_===B5)return;if(_===void 0)_=B5,_=U();return _},set(u){Object.defineProperty($,I,{value:u})},configurable:!0})}function kZ($){return Object.create(Object.getPrototypeOf($),Object.getOwnPropertyDescriptors($))}function O6($,I,U){Object.defineProperty($,I,{value:U,writable:!0,enumerable:!0,configurable:!0})}function c4(...$){let I={};for(let U of $){let _=Object.getOwnPropertyDescriptors(U);Object.assign(I,_)}return Object.defineProperties({},I)}function yZ($){return c4($._zod.def)}function iZ($,I){if(!I)return $;return I.reduce((U,_)=>U?.[_],$)}function nZ($){let I=Object.keys($),U=I.map((_)=>$[_]);return Promise.all(U).then((_)=>{let u={};for(let g=0;g<I.length;g++)u[I[g]]=_[g];return u})}function rZ($=10){let U="";for(let _=0;_<$;_++)U+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return U}function cu($){return JSON.stringify($)}function Jz($){return $.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var du="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};function c6($){return typeof $==="object"&&$!==null&&!Array.isArray($)}var Nz=S1(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});function D6($){if(c6($)===!1)return!1;let I=$.constructor;if(I===void 0)return!0;if(typeof I!=="function")return!0;let U=I.prototype;if(c6(U)===!1)return!1;if(Object.prototype.hasOwnProperty.call(U,"isPrototypeOf")===!1)return!1;return!0}function Gz($){if(D6($))return{...$};if(Array.isArray($))return[...$];return $}function lZ($){let I=0;for(let U in $)if(Object.prototype.hasOwnProperty.call($,U))I++;return I}var mZ=($)=>{let I=typeof $;switch(I){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN($)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray($))return"array";if($===null)return"null";if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return"promise";if(typeof Map<"u"&&$ instanceof Map)return"map";if(typeof Set<"u"&&$ instanceof Set)return"set";if(typeof Date<"u"&&$ instanceof Date)return"date";if(typeof File<"u"&&$ instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${I}`)}},eI=new Set(["string","number","symbol"]),Xz=new Set(["string","number","bigint","boolean","symbol","undefined"]);function q4($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function n$($,I,U){let _=new $._zod.constr(I??$._zod.def);if(!I||U?.parent)_._zod.parent=$;return _}function C($){let I=$;if(!I)return{};if(typeof I==="string")return{error:()=>I};if(I?.message!==void 0){if(I?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");I.error=I.message}if(delete I.message,typeof I.error==="string")return{...I,error:()=>I.error};return I}function hZ($){let I;return new Proxy({},{get(U,_,u){return I??(I=$()),Reflect.get(I,_,u)},set(U,_,u,g){return I??(I=$()),Reflect.set(I,_,u,g)},has(U,_){return I??(I=$()),Reflect.has(I,_)},deleteProperty(U,_){return I??(I=$()),Reflect.deleteProperty(I,_)},ownKeys(U){return I??(I=$()),Reflect.ownKeys(I)},getOwnPropertyDescriptor(U,_){return I??(I=$()),Reflect.getOwnPropertyDescriptor(I,_)},defineProperty(U,_,u){return I??(I=$()),Reflect.defineProperty(I,_,u)}})}function j($){if(typeof $==="bigint")return $.toString()+"n";if(typeof $==="string")return`"${$}"`;return`${$}`}function qz($){return Object.keys($).filter((I)=>{return $[I]._zod.optin==="optional"&&$[I]._zod.optout==="optional"})}var Qz={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Tz={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function cZ($,I){let U=$._zod.def,_=U.checks;if(_&&_.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let g=c4($._zod.def,{get shape(){let z={};for(let v in I){if(!(v in U.shape))throw Error(`Unrecognized key: "${v}"`);if(!I[v])continue;z[v]=U.shape[v]}return O6(this,"shape",z),z},checks:[]});return n$($,g)}function dZ($,I){let U=$._zod.def,_=U.checks;if(_&&_.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let g=c4($._zod.def,{get shape(){let z={...$._zod.def.shape};for(let v in I){if(!(v in U.shape))throw Error(`Unrecognized key: "${v}"`);if(!I[v])continue;delete z[v]}return O6(this,"shape",z),z},checks:[]});return n$($,g)}function pZ($,I){if(!D6(I))throw Error("Invalid input to extend: expected a plain object");let U=$._zod.def.checks;if(U&&U.length>0){let g=$._zod.def.shape;for(let z in I)if(Object.getOwnPropertyDescriptor(g,z)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let u=c4($._zod.def,{get shape(){let g={...$._zod.def.shape,...I};return O6(this,"shape",g),g}});return n$($,u)}function oZ($,I){if(!D6(I))throw Error("Invalid input to safeExtend: expected a plain object");let U=c4($._zod.def,{get shape(){let _={...$._zod.def.shape,...I};return O6(this,"shape",_),_}});return n$($,U)}function tZ($,I){let U=c4($._zod.def,{get shape(){let _={...$._zod.def.shape,...I._zod.def.shape};return O6(this,"shape",_),_},get catchall(){return I._zod.def.catchall},checks:[]});return n$($,U)}function aZ($,I,U){let u=I._zod.def.checks;if(u&&u.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let z=c4(I._zod.def,{get shape(){let v=I._zod.def.shape,J={...v};if(U)for(let N in U){if(!(N in v))throw Error(`Unrecognized key: "${N}"`);if(!U[N])continue;J[N]=$?new $({type:"optional",innerType:v[N]}):v[N]}else for(let N in v)J[N]=$?new $({type:"optional",innerType:v[N]}):v[N];return O6(this,"shape",J),J},checks:[]});return n$(I,z)}function eZ($,I,U){let _=c4(I._zod.def,{get shape(){let u=I._zod.def.shape,g={...u};if(U)for(let z in U){if(!(z in g))throw Error(`Unrecognized key: "${z}"`);if(!U[z])continue;g[z]=new $({type:"nonoptional",innerType:u[z]})}else for(let z in u)g[z]=new $({type:"nonoptional",innerType:u[z]});return O6(this,"shape",g),g}});return n$(I,_)}function V6($,I=0){if($.aborted===!0)return!0;for(let U=I;U<$.issues.length;U++)if($.issues[U]?.continue!==!0)return!0;return!1}function I4($,I){return I.map((U)=>{var _;return(_=U).path??(_.path=[]),U.path.unshift($),U})}function oI($){return typeof $==="string"?$:$?.message}function o$($,I,U){let _={...$,path:$.path??[]};if(!$.message){let u=oI($.inst?._zod.def?.error?.($))??oI(I?.error?.($))??oI(U.customError?.($))??oI(U.localeError?.($))??"Invalid input";_.message=u}if(delete _.inst,delete _.continue,!I?.reportInput)delete _.input;return _}function sI($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function $0($){if(Array.isArray($))return"array";if(typeof $==="string")return"string";return"unknown"}function S($){let I=typeof $;switch(I){case"number":return Number.isNaN($)?"nan":"number";case"object":{if($===null)return"null";if(Array.isArray($))return"array";let U=$;if(U&&Object.getPrototypeOf(U)!==Object.prototype&&"constructor"in U&&U.constructor)return U.constructor.name}}return I}function w1(...$){let[I,U,_]=$;if(typeof I==="string")return{message:I,code:"custom",input:U,inst:_};return{...I}}function sZ($){return Object.entries($).filter(([I,U])=>{return Number.isNaN(Number.parseInt(I,10))}).map((I)=>I[1])}function M5($){let I=atob($),U=new Uint8Array(I.length);for(let _=0;_<I.length;_++)U[_]=I.charCodeAt(_);return U}function R5($){let I="";for(let U=0;U<$.length;U++)I+=String.fromCharCode($[U]);return btoa(I)}function $A($){let I=$.replace(/-/g,"+").replace(/_/g,"/"),U="=".repeat((4-I.length%4)%4);return M5(I+U)}function IA($){return R5($).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function uA($){let I=$.replace(/^0x/,"");if(I.length%2!==0)throw Error("Invalid hex string length");let U=new Uint8Array(I.length/2);for(let _=0;_<I.length;_+=2)U[_/2]=Number.parseInt(I.slice(_,_+2),16);return U}function UA($){return Array.from($).map((I)=>I.toString(16).padStart(2,"0")).join("")}class K5{constructor(...$){}}var L5=($,I)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:I,enumerable:!1}),$.message=JSON.stringify(I,F1,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},I0=D("$ZodError",L5),t$=D("$ZodError",L5,{Parent:Error});function u0($,I=(U)=>U.message){let U={},_=[];for(let u of $.issues)if(u.path.length>0)U[u.path[0]]=U[u.path[0]]||[],U[u.path[0]].push(I(u));else _.push(I(u));return{formErrors:_,fieldErrors:U}}function U0($,I=(U)=>U.message){let U={_errors:[]},_=(u)=>{for(let g of u.issues)if(g.code==="invalid_union"&&g.errors.length)g.errors.map((z)=>_({issues:z}));else if(g.code==="invalid_key")_({issues:g.issues});else if(g.code==="invalid_element")_({issues:g.issues});else if(g.path.length===0)U._errors.push(I(g));else{let z=U,v=0;while(v<g.path.length){let J=g.path[v];if(v!==g.path.length-1)z[J]=z[J]||{_errors:[]};else z[J]=z[J]||{_errors:[]},z[J]._errors.push(I(g));z=z[J],v++}}};return _($),U}function Hz($,I=(U)=>U.message){let U={errors:[]},_=(u,g=[])=>{var z,v;for(let J of u.issues)if(J.code==="invalid_union"&&J.errors.length)J.errors.map((N)=>_({issues:N},J.path));else if(J.code==="invalid_key")_({issues:J.issues},J.path);else if(J.code==="invalid_element")_({issues:J.issues},J.path);else{let N=[...g,...J.path];if(N.length===0){U.errors.push(I(J));continue}let X=U,G=0;while(G<N.length){let q=N[G],T=G===N.length-1;if(typeof q==="string")X.properties??(X.properties={}),(z=X.properties)[q]??(z[q]={errors:[]}),X=X.properties[q];else X.items??(X.items=[]),(v=X.items)[q]??(v[q]={errors:[]}),X=X.items[q];if(T)X.errors.push(I(J));G++}}};return _($),U}function P5($){let I=[],U=$.map((_)=>typeof _==="object"?_.key:_);for(let _ of U)if(typeof _==="number")I.push(`[${_}]`);else if(typeof _==="symbol")I.push(`[${JSON.stringify(String(_))}]`);else if(/[^\w$]/.test(_))I.push(`[${JSON.stringify(_)}]`);else{if(I.length)I.push(".");I.push(_)}return I.join("")}function Yz($){let I=[],U=[...$.issues].sort((_,u)=>(_.path??[]).length-(u.path??[]).length);for(let _ of U)if(I.push(`✖ ${_.message}`),_.path?.length)I.push(` → at ${P5(_.path)}`);return I.join(`
298
- `)}var E1=($)=>(I,U,_,u)=>{let g=_?Object.assign(_,{async:!1}):{async:!1},z=I._zod.run({value:U,issues:[]},g);if(z instanceof Promise)throw new S4;if(z.issues.length){let v=new(u?.Err??$)(z.issues.map((J)=>o$(J,g,R$())));throw du(v,u?.callee),v}return z.value},pu=E1(t$),C1=($)=>async(I,U,_,u)=>{let g=_?Object.assign(_,{async:!0}):{async:!0},z=I._zod.run({value:U,issues:[]},g);if(z instanceof Promise)z=await z;if(z.issues.length){let v=new(u?.Err??$)(z.issues.map((J)=>o$(J,g,R$())));throw du(v,u?.callee),v}return z.value},ou=C1(t$),f1=($)=>(I,U,_)=>{let u=_?{..._,async:!1}:{async:!1},g=I._zod.run({value:U,issues:[]},u);if(g instanceof Promise)throw new S4;return g.issues.length?{success:!1,error:new($??I0)(g.issues.map((z)=>o$(z,u,R$())))}:{success:!0,data:g.value}},Oz=f1(t$),x1=($)=>async(I,U,_)=>{let u=_?Object.assign(_,{async:!0}):{async:!0},g=I._zod.run({value:U,issues:[]},u);if(g instanceof Promise)g=await g;return g.issues.length?{success:!1,error:new $(g.issues.map((z)=>o$(z,u,R$())))}:{success:!0,data:g.value}},Dz=x1(t$),tu=($)=>(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return E1($)(I,U,u)},gA=tu(t$),au=($)=>(I,U,_)=>{return E1($)(I,U,_)},zA=au(t$),eu=($)=>async(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return C1($)(I,U,u)},vA=eu(t$),su=($)=>async(I,U,_)=>{return C1($)(I,U,_)},JA=su(t$),$U=($)=>(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return f1($)(I,U,u)},NA=$U(t$),IU=($)=>(I,U,_)=>{return f1($)(I,U,_)},GA=IU(t$),uU=($)=>async(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return x1($)(I,U,u)},XA=uU(t$),UU=($)=>async(I,U,_)=>{return x1($)(I,U,_)},qA=UU(t$);var Q4={};O4(Q4,{xid:()=>Rz,uuid7:()=>YA,uuid6:()=>HA,uuid4:()=>TA,uuid:()=>d6,uppercase:()=>cz,unicodeEmail:()=>W5,undefined:()=>mz,ulid:()=>Mz,time:()=>xz,string:()=>yz,sha512_hex:()=>xA,sha512_base64url:()=>yA,sha512_base64:()=>kA,sha384_hex:()=>EA,sha384_base64url:()=>fA,sha384_base64:()=>CA,sha256_hex:()=>FA,sha256_base64url:()=>wA,sha256_base64:()=>SA,sha1_hex:()=>AA,sha1_base64url:()=>jA,sha1_base64:()=>bA,rfc5322Email:()=>DA,number:()=>_0,null:()=>lz,nanoid:()=>Lz,md5_hex:()=>PA,md5_base64url:()=>ZA,md5_base64:()=>WA,mac:()=>Fz,lowercase:()=>hz,ksuid:()=>Kz,ipv6:()=>jz,ipv4:()=>bz,integer:()=>nz,idnEmail:()=>VA,html5Email:()=>OA,hostname:()=>RA,hex:()=>LA,guid:()=>Wz,extendedDuration:()=>QA,emoji:()=>Az,email:()=>Zz,e164:()=>Cz,duration:()=>Pz,domain:()=>KA,datetime:()=>kz,date:()=>fz,cuid2:()=>Bz,cuid:()=>Vz,cidrv6:()=>wz,cidrv4:()=>Sz,browserEmail:()=>BA,boolean:()=>rz,bigint:()=>iz,base64url:()=>_U,base64:()=>Ez});var Vz=/^[cC][^\s-]{8,}$/,Bz=/^[0-9a-z]+$/,Mz=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Rz=/^[0-9a-vA-V]{20}$/,Kz=/^[A-Za-z0-9]{27}$/,Lz=/^[a-zA-Z0-9_-]{21}$/,Pz=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,QA=/^[-+]?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)?)??$/,Wz=/^([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})$/,d6=($)=>{if(!$)return/^([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)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},TA=d6(4),HA=d6(6),YA=d6(7),Zz=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,OA=/^[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])?)*$/,DA=/^(([^<>()\[\]\\.,;:\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,}))$/,W5=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,VA=W5,BA=/^[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])?)*$/,MA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Az(){return new RegExp(MA,"u")}var bz=/^(?:(?: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])$/,jz=/^(([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}|:))$/,Fz=($)=>{let I=q4($??":");return new RegExp(`^(?:[0-9A-F]{2}${I}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${I}){5}[0-9a-f]{2}$`)},Sz=/^((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])$/,wz=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ez=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,_U=/^[A-Za-z0-9_-]*$/,RA=/^(?=.{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])?)*\.?$/,KA=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Cz=/^\+[1-9]\d{6,14}$/,Z5="(?:(?:\\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])))",fz=new RegExp(`^${Z5}$`);function A5($){return typeof $.precision==="number"?$.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":$.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${$.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function xz($){return new RegExp(`^${A5($)}$`)}function kz($){let I=A5({precision:$.precision}),U=["Z"];if($.local)U.push("");if($.offset)U.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let _=`${I}(?:${U.join("|")})`;return new RegExp(`^${Z5}T(?:${_})$`)}var yz=($)=>{let I=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${I}$`)},iz=/^-?\d+n?$/,nz=/^-?\d+$/,_0=/^-?\d+(?:\.\d+)?$/,rz=/^(?:true|false)$/i,lz=/^null$/i;var mz=/^undefined$/i;var hz=/^[^A-Z]*$/,cz=/^[^a-z]*$/,LA=/^[0-9a-fA-F]*$/;function g0($,I){return new RegExp(`^[A-Za-z0-9+/]{${$}}${I}$`)}function z0($){return new RegExp(`^[A-Za-z0-9_-]{${$}}$`)}var PA=/^[0-9a-fA-F]{32}$/,WA=g0(22,"=="),ZA=z0(22),AA=/^[0-9a-fA-F]{40}$/,bA=g0(27,"="),jA=z0(27),FA=/^[0-9a-fA-F]{64}$/,SA=g0(43,"="),wA=z0(43),EA=/^[0-9a-fA-F]{96}$/,CA=g0(64,""),fA=z0(64),xA=/^[0-9a-fA-F]{128}$/,kA=g0(86,"=="),yA=z0(86);var G$=D("$ZodCheck",($,I)=>{var U;$._zod??($._zod={}),$._zod.def=I,(U=$._zod).onattach??(U.onattach=[])}),j5={number:"number",bigint:"bigint",object:"date"},gU=D("$ZodCheckLessThan",($,I)=>{G$.init($,I);let U=j5[typeof I.value];$._zod.onattach.push((_)=>{let u=_._zod.bag,g=(I.inclusive?u.maximum:u.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(I.value<g)if(I.inclusive)u.maximum=I.value;else u.exclusiveMaximum=I.value}),$._zod.check=(_)=>{if(I.inclusive?_.value<=I.value:_.value<I.value)return;_.issues.push({origin:U,code:"too_big",maximum:typeof I.value==="object"?I.value.getTime():I.value,input:_.value,inclusive:I.inclusive,inst:$,continue:!I.abort})}}),zU=D("$ZodCheckGreaterThan",($,I)=>{G$.init($,I);let U=j5[typeof I.value];$._zod.onattach.push((_)=>{let u=_._zod.bag,g=(I.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(I.value>g)if(I.inclusive)u.minimum=I.value;else u.exclusiveMinimum=I.value}),$._zod.check=(_)=>{if(I.inclusive?_.value>=I.value:_.value>I.value)return;_.issues.push({origin:U,code:"too_small",minimum:typeof I.value==="object"?I.value.getTime():I.value,input:_.value,inclusive:I.inclusive,inst:$,continue:!I.abort})}}),dz=D("$ZodCheckMultipleOf",($,I)=>{G$.init($,I),$._zod.onattach.push((U)=>{var _;(_=U._zod.bag).multipleOf??(_.multipleOf=I.value)}),$._zod.check=(U)=>{if(typeof U.value!==typeof I.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof U.value==="bigint"?U.value%I.value===BigInt(0):vz(U.value,I.value)===0)return;U.issues.push({origin:typeof U.value,code:"not_multiple_of",divisor:I.value,input:U.value,inst:$,continue:!I.abort})}}),pz=D("$ZodCheckNumberFormat",($,I)=>{G$.init($,I),I.format=I.format||"float64";let U=I.format?.includes("int"),_=U?"int":"number",[u,g]=Qz[I.format];$._zod.onattach.push((z)=>{let v=z._zod.bag;if(v.format=I.format,v.minimum=u,v.maximum=g,U)v.pattern=nz}),$._zod.check=(z)=>{let v=z.value;if(U){if(!Number.isInteger(v)){z.issues.push({expected:_,format:I.format,code:"invalid_type",continue:!1,input:v,inst:$});return}if(!Number.isSafeInteger(v)){if(v>0)z.issues.push({input:v,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:_,inclusive:!0,continue:!I.abort});else z.issues.push({input:v,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:_,inclusive:!0,continue:!I.abort});return}}if(v<u)z.issues.push({origin:"number",input:v,code:"too_small",minimum:u,inclusive:!0,inst:$,continue:!I.abort});if(v>g)z.issues.push({origin:"number",input:v,code:"too_big",maximum:g,inclusive:!0,inst:$,continue:!I.abort})}}),oz=D("$ZodCheckBigIntFormat",($,I)=>{G$.init($,I);let[U,_]=Tz[I.format];$._zod.onattach.push((u)=>{let g=u._zod.bag;g.format=I.format,g.minimum=U,g.maximum=_}),$._zod.check=(u)=>{let g=u.value;if(g<U)u.issues.push({origin:"bigint",input:g,code:"too_small",minimum:U,inclusive:!0,inst:$,continue:!I.abort});if(g>_)u.issues.push({origin:"bigint",input:g,code:"too_big",maximum:_,inclusive:!0,inst:$,continue:!I.abort})}}),tz=D("$ZodCheckMaxSize",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!Y6(u)&&u.size!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag.maximum??Number.POSITIVE_INFINITY;if(I.maximum<u)_._zod.bag.maximum=I.maximum}),$._zod.check=(_)=>{let u=_.value;if(u.size<=I.maximum)return;_.issues.push({origin:sI(u),code:"too_big",maximum:I.maximum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),az=D("$ZodCheckMinSize",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!Y6(u)&&u.size!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(I.minimum>u)_._zod.bag.minimum=I.minimum}),$._zod.check=(_)=>{let u=_.value;if(u.size>=I.minimum)return;_.issues.push({origin:sI(u),code:"too_small",minimum:I.minimum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),ez=D("$ZodCheckSizeEquals",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!Y6(u)&&u.size!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag;u.minimum=I.size,u.maximum=I.size,u.size=I.size}),$._zod.check=(_)=>{let u=_.value,g=u.size;if(g===I.size)return;let z=g>I.size;_.issues.push({origin:sI(u),...z?{code:"too_big",maximum:I.size}:{code:"too_small",minimum:I.size},inclusive:!0,exact:!0,input:_.value,inst:$,continue:!I.abort})}}),sz=D("$ZodCheckMaxLength",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!Y6(u)&&u.length!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag.maximum??Number.POSITIVE_INFINITY;if(I.maximum<u)_._zod.bag.maximum=I.maximum}),$._zod.check=(_)=>{let u=_.value;if(u.length<=I.maximum)return;let z=$0(u);_.issues.push({origin:z,code:"too_big",maximum:I.maximum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),$v=D("$ZodCheckMinLength",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!Y6(u)&&u.length!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(I.minimum>u)_._zod.bag.minimum=I.minimum}),$._zod.check=(_)=>{let u=_.value;if(u.length>=I.minimum)return;let z=$0(u);_.issues.push({origin:z,code:"too_small",minimum:I.minimum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),Iv=D("$ZodCheckLengthEquals",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!Y6(u)&&u.length!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag;u.minimum=I.length,u.maximum=I.length,u.length=I.length}),$._zod.check=(_)=>{let u=_.value,g=u.length;if(g===I.length)return;let z=$0(u),v=g>I.length;_.issues.push({origin:z,...v?{code:"too_big",maximum:I.length}:{code:"too_small",minimum:I.length},inclusive:!0,exact:!0,input:_.value,inst:$,continue:!I.abort})}}),k1=D("$ZodCheckStringFormat",($,I)=>{var U,_;if(G$.init($,I),$._zod.onattach.push((u)=>{let g=u._zod.bag;if(g.format=I.format,I.pattern)g.patterns??(g.patterns=new Set),g.patterns.add(I.pattern)}),I.pattern)(U=$._zod).check??(U.check=(u)=>{if(I.pattern.lastIndex=0,I.pattern.test(u.value))return;u.issues.push({origin:"string",code:"invalid_format",format:I.format,input:u.value,...I.pattern?{pattern:I.pattern.toString()}:{},inst:$,continue:!I.abort})});else(_=$._zod).check??(_.check=()=>{})}),uv=D("$ZodCheckRegex",($,I)=>{k1.init($,I),$._zod.check=(U)=>{if(I.pattern.lastIndex=0,I.pattern.test(U.value))return;U.issues.push({origin:"string",code:"invalid_format",format:"regex",input:U.value,pattern:I.pattern.toString(),inst:$,continue:!I.abort})}}),Uv=D("$ZodCheckLowerCase",($,I)=>{I.pattern??(I.pattern=hz),k1.init($,I)}),_v=D("$ZodCheckUpperCase",($,I)=>{I.pattern??(I.pattern=cz),k1.init($,I)}),gv=D("$ZodCheckIncludes",($,I)=>{G$.init($,I);let U=q4(I.includes),_=new RegExp(typeof I.position==="number"?`^.{${I.position}}${U}`:U);I.pattern=_,$._zod.onattach.push((u)=>{let g=u._zod.bag;g.patterns??(g.patterns=new Set),g.patterns.add(_)}),$._zod.check=(u)=>{if(u.value.includes(I.includes,I.position))return;u.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:I.includes,input:u.value,inst:$,continue:!I.abort})}}),zv=D("$ZodCheckStartsWith",($,I)=>{G$.init($,I);let U=new RegExp(`^${q4(I.prefix)}.*`);I.pattern??(I.pattern=U),$._zod.onattach.push((_)=>{let u=_._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(U)}),$._zod.check=(_)=>{if(_.value.startsWith(I.prefix))return;_.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:I.prefix,input:_.value,inst:$,continue:!I.abort})}}),vv=D("$ZodCheckEndsWith",($,I)=>{G$.init($,I);let U=new RegExp(`.*${q4(I.suffix)}$`);I.pattern??(I.pattern=U),$._zod.onattach.push((_)=>{let u=_._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(U)}),$._zod.check=(_)=>{if(_.value.endsWith(I.suffix))return;_.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:I.suffix,input:_.value,inst:$,continue:!I.abort})}});function b5($,I,U){if($.issues.length)I.issues.push(...I4(U,$.issues))}var Jv=D("$ZodCheckProperty",($,I)=>{G$.init($,I),$._zod.check=(U)=>{let _=I.schema._zod.run({value:U.value[I.property],issues:[]},{});if(_ instanceof Promise)return _.then((u)=>b5(u,U,I.property));b5(_,U,I.property);return}}),Nv=D("$ZodCheckMimeType",($,I)=>{G$.init($,I);let U=new Set(I.mime);$._zod.onattach.push((_)=>{_._zod.bag.mime=I.mime}),$._zod.check=(_)=>{if(U.has(_.value.type))return;_.issues.push({code:"invalid_value",values:I.mime,input:_.value.type,inst:$,continue:!I.abort})}}),Gv=D("$ZodCheckOverwrite",($,I)=>{G$.init($,I),$._zod.check=(U)=>{U.value=I.tx(U.value)}});class vU{constructor($=[]){if(this.content=[],this.indent=0,this)this.args=$}indented($){this.indent+=1,$(this),this.indent-=1}write($){if(typeof $==="function"){$(this,{execution:"sync"}),$(this,{execution:"async"});return}let U=$.split(`
298
+ `+U)}function B1($,I,U,_,u,g){if($.listenerCount("wsClientError")){let z=Error(u);Error.captureStackTrace(z,B1),$.emit("wsClientError",z,U,I)}else a0(U,_,u,g)}});var XX=q$(GX(),1),{program:Ix,createCommand:ux,createArgument:Ux,createOption:_x,CommanderError:gx,InvalidArgumentError:zx,InvalidOptionArgumentError:vx,Command:c2,Argument:Jx,Option:Nx,Help:Gx}=XX.default;gz();var r=q$(b$(),1);import{execSync as Wj,spawn as IG}from"node:child_process";import y from"node:fs";import{tmpdir as F_}from"node:os";import I$ from"node:path";var z$={};D4(z$,{xor:()=>pQ,xid:()=>OQ,void:()=>nQ,uuidv7:()=>NQ,uuidv6:()=>JQ,uuidv4:()=>vQ,uuid:()=>zQ,util:()=>w,url:()=>GQ,uppercase:()=>m1,unknown:()=>$1,union:()=>K_,undefined:()=>iQ,ulid:()=>YQ,uint64:()=>kQ,uint32:()=>CQ,tuple:()=>K3,trim:()=>t1,treeifyError:()=>Oz,transform:()=>L_,toUpperCase:()=>e1,toLowerCase:()=>a1,toJSONSchema:()=>oU,templateLiteral:()=>v7,symbol:()=>yQ,superRefine:()=>o3,success:()=>_7,stringbool:()=>H7,stringFormat:()=>AQ,string:()=>I_,strictObject:()=>cQ,startsWith:()=>c1,slugify:()=>s1,size:()=>a6,setErrorMap:()=>Gj,set:()=>sQ,safeParseAsync:()=>t8,safeParse:()=>o8,safeEncodeAsync:()=>U3,safeEncode:()=>I3,safeDecodeAsync:()=>_3,safeDecode:()=>u3,registry:()=>BU,regexes:()=>H4,regex:()=>n1,refine:()=>p3,record:()=>R3,readonly:()=>n3,property:()=>hU,promise:()=>J7,prettifyError:()=>Vz,preprocess:()=>O7,prefault:()=>C3,positive:()=>rU,pipe:()=>R0,partialRecord:()=>tQ,parseAsync:()=>p8,parse:()=>d8,overwrite:()=>K4,optional:()=>M0,object:()=>hQ,number:()=>z3,nullish:()=>U7,nullable:()=>K0,null:()=>X3,normalize:()=>o1,nonpositive:()=>lU,nonoptional:()=>f3,nonnegative:()=>mU,never:()=>M_,negative:()=>nU,nativeEnum:()=>$7,nanoid:()=>QQ,nan:()=>g7,multipleOf:()=>K6,minSize:()=>x4,minLength:()=>o4,mime:()=>p1,meta:()=>Q7,maxSize:()=>R6,maxLength:()=>e6,map:()=>eQ,mac:()=>BQ,lte:()=>_4,lt:()=>C4,lowercase:()=>l1,looseRecord:()=>aQ,looseObject:()=>dQ,locales:()=>Y0,literal:()=>I7,length:()=>s6,lazy:()=>h3,ksuid:()=>VQ,keyof:()=>mQ,jwt:()=>ZQ,json:()=>Y7,iso:()=>uI,ipv6:()=>MQ,ipv4:()=>DQ,intersection:()=>B3,int64:()=>xQ,int32:()=>EQ,int:()=>u_,instanceof:()=>T7,includes:()=>h1,httpUrl:()=>XQ,hostname:()=>bQ,hex:()=>jQ,hash:()=>FQ,guid:()=>gQ,gte:()=>l$,gt:()=>f4,globalRegistry:()=>w$,getErrorMap:()=>Xj,function:()=>N7,fromJSONSchema:()=>D7,formatError:()=>g0,float64:()=>wQ,float32:()=>SQ,flattenError:()=>_0,file:()=>u7,exactOptional:()=>j3,enum:()=>R_,endsWith:()=>d1,encodeAsync:()=>s8,encode:()=>a8,emoji:()=>qQ,email:()=>_Q,e164:()=>PQ,discriminatedUnion:()=>oQ,describe:()=>q7,decodeAsync:()=>$3,decode:()=>e8,date:()=>lQ,custom:()=>X7,cuid2:()=>HQ,cuid:()=>TQ,core:()=>t4,config:()=>K$,coerce:()=>a3,codec:()=>z7,clone:()=>n$,cidrv6:()=>RQ,cidrv4:()=>KQ,check:()=>G7,catch:()=>y3,boolean:()=>v3,bigint:()=>fQ,base64url:()=>WQ,base64:()=>LQ,array:()=>P0,any:()=>rQ,_function:()=>N7,_default:()=>w3,_ZodString:()=>U_,ZodXor:()=>O3,ZodXID:()=>G_,ZodVoid:()=>H3,ZodUnknown:()=>Q3,ZodUnion:()=>A0,ZodUndefined:()=>N3,ZodUUID:()=>k4,ZodURL:()=>L0,ZodULID:()=>N_,ZodType:()=>c,ZodTuple:()=>M3,ZodTransform:()=>A3,ZodTemplateLiteral:()=>l3,ZodSymbol:()=>J3,ZodSuccess:()=>x3,ZodStringFormat:()=>J$,ZodString:()=>_I,ZodSet:()=>W3,ZodRecord:()=>b0,ZodRealError:()=>s$,ZodReadonly:()=>r3,ZodPromise:()=>c3,ZodPrefault:()=>E3,ZodPipe:()=>Z_,ZodOptional:()=>W_,ZodObject:()=>Z0,ZodNumberFormat:()=>I1,ZodNumber:()=>zI,ZodNullable:()=>F3,ZodNull:()=>G3,ZodNonOptional:()=>P_,ZodNever:()=>T3,ZodNanoID:()=>z_,ZodNaN:()=>i3,ZodMap:()=>L3,ZodMAC:()=>g3,ZodLiteral:()=>P3,ZodLazy:()=>m3,ZodKSUID:()=>X_,ZodJWT:()=>D_,ZodIssueCode:()=>Nj,ZodIntersection:()=>D3,ZodISOTime:()=>sU,ZodISODuration:()=>$_,ZodISODateTime:()=>aU,ZodISODate:()=>eU,ZodIPv6:()=>Q_,ZodIPv4:()=>q_,ZodGUID:()=>B0,ZodFunction:()=>d3,ZodFirstPartyTypeKind:()=>t3,ZodFile:()=>Z3,ZodExactOptional:()=>b3,ZodError:()=>vj,ZodEnum:()=>UI,ZodEmoji:()=>g_,ZodEmail:()=>__,ZodE164:()=>V_,ZodDiscriminatedUnion:()=>V3,ZodDefault:()=>S3,ZodDate:()=>W0,ZodCustomStringFormat:()=>gI,ZodCustom:()=>j0,ZodCodec:()=>A_,ZodCatch:()=>k3,ZodCUID2:()=>J_,ZodCUID:()=>v_,ZodCIDRv6:()=>H_,ZodCIDRv4:()=>T_,ZodBoolean:()=>vI,ZodBigIntFormat:()=>B_,ZodBigInt:()=>JI,ZodBase64URL:()=>O_,ZodBase64:()=>Y_,ZodArray:()=>Y3,ZodAny:()=>q3,TimePrecision:()=>KN,NEVER:()=>zz,$output:()=>YN,$input:()=>ON,$brand:()=>vz});var t4={};D4(t4,{version:()=>Qv,util:()=>w,treeifyError:()=>Oz,toJSONSchema:()=>oU,toDotPath:()=>Z5,safeParseAsync:()=>Bz,safeParse:()=>Dz,safeEncodeAsync:()=>qA,safeEncode:()=>GA,safeDecodeAsync:()=>QA,safeDecode:()=>XA,registry:()=>BU,regexes:()=>H4,process:()=>_$,prettifyError:()=>Vz,parseAsync:()=>eu,parse:()=>au,meta:()=>u8,locales:()=>Y0,isValidJWT:()=>c5,isValidBase64URL:()=>h5,isValidBase64:()=>Cv,initializeContext:()=>L6,globalRegistry:()=>w$,globalConfig:()=>tI,formatError:()=>g0,flattenError:()=>_0,finalize:()=>P6,extractDefs:()=>W6,encodeAsync:()=>JA,encode:()=>zA,describe:()=>I8,decodeAsync:()=>NA,decode:()=>vA,createToJSONSchemaMethod:()=>_8,createStandardJSONSchemaMethod:()=>II,config:()=>K$,clone:()=>n$,_xor:()=>xb,_xid:()=>FU,_void:()=>cN,_uuidv7:()=>WU,_uuidv6:()=>LU,_uuidv4:()=>RU,_uuid:()=>KU,_url:()=>V0,_uppercase:()=>m1,_unknown:()=>mN,_union:()=>fb,_undefined:()=>rN,_ulid:()=>jU,_uint64:()=>yN,_uint32:()=>wN,_tuple:()=>ib,_trim:()=>t1,_transform:()=>db,_toUpperCase:()=>e1,_toLowerCase:()=>a1,_templateLiteral:()=>uj,_symbol:()=>iN,_superRefine:()=>$8,_success:()=>eb,_stringbool:()=>U8,_stringFormat:()=>$I,_string:()=>DN,_startsWith:()=>c1,_slugify:()=>s1,_size:()=>a6,_set:()=>lb,_safeParseAsync:()=>y1,_safeParse:()=>k1,_safeEncodeAsync:()=>gU,_safeEncode:()=>UU,_safeDecodeAsync:()=>zU,_safeDecode:()=>_U,_regex:()=>n1,_refine:()=>sN,_record:()=>rb,_readonly:()=>Ij,_property:()=>hU,_promise:()=>_j,_positive:()=>rU,_pipe:()=>$j,_parseAsync:()=>x1,_parse:()=>f1,_overwrite:()=>K4,_optional:()=>pb,_number:()=>ZN,_nullable:()=>ob,_null:()=>nN,_normalize:()=>o1,_nonpositive:()=>lU,_nonoptional:()=>ab,_nonnegative:()=>mU,_never:()=>hN,_negative:()=>nU,_nativeEnum:()=>hb,_nanoid:()=>ZU,_nan:()=>oN,_multipleOf:()=>K6,_minSize:()=>x4,_minLength:()=>o4,_min:()=>l$,_mime:()=>p1,_maxSize:()=>R6,_maxLength:()=>e6,_max:()=>_4,_map:()=>nb,_mac:()=>MN,_lte:()=>_4,_lt:()=>C4,_lowercase:()=>l1,_literal:()=>cb,_length:()=>s6,_lazy:()=>Uj,_ksuid:()=>SU,_jwt:()=>iU,_isoTime:()=>WN,_isoDuration:()=>PN,_isoDateTime:()=>RN,_isoDate:()=>LN,_ipv6:()=>EU,_ipv4:()=>wU,_intersection:()=>yb,_int64:()=>kN,_int32:()=>SN,_int:()=>bN,_includes:()=>h1,_guid:()=>O0,_gte:()=>l$,_gt:()=>f4,_float64:()=>FN,_float32:()=>jN,_file:()=>aN,_enum:()=>mb,_endsWith:()=>d1,_encodeAsync:()=>IU,_encode:()=>su,_emoji:()=>PU,_email:()=>MU,_e164:()=>yU,_discriminatedUnion:()=>kb,_default:()=>tb,_decodeAsync:()=>uU,_decode:()=>$U,_date:()=>dN,_custom:()=>eN,_cuid2:()=>bU,_cuid:()=>AU,_coercedString:()=>BN,_coercedNumber:()=>AN,_coercedDate:()=>pN,_coercedBoolean:()=>CN,_coercedBigint:()=>xN,_cidrv6:()=>fU,_cidrv4:()=>CU,_check:()=>IQ,_catch:()=>sb,_boolean:()=>EN,_bigint:()=>fN,_base64url:()=>kU,_base64:()=>xU,_array:()=>tN,_any:()=>lN,TimePrecision:()=>KN,NEVER:()=>zz,JSONSchemaGenerator:()=>n8,JSONSchema:()=>uQ,Doc:()=>GU,$output:()=>YN,$input:()=>ON,$constructor:()=>V,$brand:()=>vz,$ZodXor:()=>sv,$ZodXID:()=>Lv,$ZodVoid:()=>ov,$ZodUnknown:()=>dv,$ZodUnion:()=>G0,$ZodUndefined:()=>mv,$ZodUUID:()=>Yv,$ZodURL:()=>Vv,$ZodULID:()=>Rv,$ZodType:()=>l,$ZodTuple:()=>VU,$ZodTransform:()=>JJ,$ZodTemplateLiteral:()=>DJ,$ZodSymbol:()=>lv,$ZodSuccess:()=>TJ,$ZodStringFormat:()=>v$,$ZodString:()=>t6,$ZodSet:()=>_J,$ZodRegistry:()=>VN,$ZodRecord:()=>uJ,$ZodRealError:()=>e$,$ZodReadonly:()=>VJ,$ZodPromise:()=>MJ,$ZodPrefault:()=>qJ,$ZodPipe:()=>OJ,$ZodOptional:()=>DU,$ZodObjectJIT:()=>ev,$ZodObject:()=>o5,$ZodNumberFormat:()=>rv,$ZodNumber:()=>YU,$ZodNullable:()=>GJ,$ZodNull:()=>hv,$ZodNonOptional:()=>QJ,$ZodNever:()=>pv,$ZodNanoID:()=>Bv,$ZodNaN:()=>YJ,$ZodMap:()=>UJ,$ZodMAC:()=>Sv,$ZodLiteral:()=>zJ,$ZodLazy:()=>KJ,$ZodKSUID:()=>Wv,$ZodJWT:()=>yv,$ZodIntersection:()=>IJ,$ZodISOTime:()=>Av,$ZodISODuration:()=>bv,$ZodISODateTime:()=>Pv,$ZodISODate:()=>Zv,$ZodIPv6:()=>Fv,$ZodIPv4:()=>jv,$ZodGUID:()=>Hv,$ZodFunction:()=>BJ,$ZodFile:()=>vJ,$ZodExactOptional:()=>NJ,$ZodError:()=>U0,$ZodEnum:()=>gJ,$ZodEncodeError:()=>d6,$ZodEmoji:()=>Dv,$ZodEmail:()=>Ov,$ZodE164:()=>kv,$ZodDiscriminatedUnion:()=>$J,$ZodDefault:()=>XJ,$ZodDate:()=>tv,$ZodCustomStringFormat:()=>iv,$ZodCustom:()=>RJ,$ZodCodec:()=>X0,$ZodCheckUpperCase:()=>zv,$ZodCheckStringFormat:()=>i1,$ZodCheckStartsWith:()=>Jv,$ZodCheckSizeEquals:()=>$v,$ZodCheckRegex:()=>_v,$ZodCheckProperty:()=>Gv,$ZodCheckOverwrite:()=>qv,$ZodCheckNumberFormat:()=>tz,$ZodCheckMultipleOf:()=>oz,$ZodCheckMinSize:()=>sz,$ZodCheckMinLength:()=>uv,$ZodCheckMimeType:()=>Xv,$ZodCheckMaxSize:()=>ez,$ZodCheckMaxLength:()=>Iv,$ZodCheckLowerCase:()=>gv,$ZodCheckLessThan:()=>JU,$ZodCheckLengthEquals:()=>Uv,$ZodCheckIncludes:()=>vv,$ZodCheckGreaterThan:()=>NU,$ZodCheckEndsWith:()=>Nv,$ZodCheckBigIntFormat:()=>az,$ZodCheck:()=>G$,$ZodCatch:()=>HJ,$ZodCUID2:()=>Kv,$ZodCUID:()=>Mv,$ZodCIDRv6:()=>Ev,$ZodCIDRv4:()=>wv,$ZodBoolean:()=>N0,$ZodBigIntFormat:()=>nv,$ZodBigInt:()=>OU,$ZodBase64URL:()=>xv,$ZodBase64:()=>fv,$ZodAsyncError:()=>E4,$ZodArray:()=>av,$ZodAny:()=>cv});var zz=Object.freeze({status:"aborted"});function V($,I,U){function _(v,J){if(!v._zod)Object.defineProperty(v,"_zod",{value:{def:J,constr:z,traits:new Set},enumerable:!1});if(v._zod.traits.has($))return;v._zod.traits.add($),I(v,J);let N=z.prototype,X=Object.keys(N);for(let G=0;G<X.length;G++){let q=X[G];if(!(q in v))v[q]=N[q].bind(v)}}let u=U?.Parent??Object;class g extends u{}Object.defineProperty(g,"name",{value:$});function z(v){var J;let N=U?.Parent?new g:this;_(N,v),(J=N._zod).deferred??(J.deferred=[]);for(let X of N._zod.deferred)X();return N}return Object.defineProperty(z,"init",{value:_}),Object.defineProperty(z,Symbol.hasInstance,{value:(v)=>{if(U?.Parent&&v instanceof U.Parent)return!0;return v?._zod?.traits?.has($)}}),Object.defineProperty(z,"name",{value:$}),z}var vz=Symbol("zod_brand");class E4 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class d6 extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}}var tI={};function K$($){if($)Object.assign(tI,$);return tI}var w={};D4(w,{unwrapMessage:()=>aI,uint8ArrayToHex:()=>_A,uint8ArrayToBase64url:()=>uA,uint8ArrayToBase64:()=>L5,stringifyPrimitive:()=>j,slugify:()=>Gz,shallowClone:()=>qz,safeExtend:()=>tZ,required:()=>sZ,randomString:()=>lZ,propertyKeyTypes:()=>$0,promiseAllObject:()=>nZ,primitiveTypes:()=>Qz,prefixIssues:()=>U4,pick:()=>dZ,partial:()=>eZ,parsedType:()=>S,optionalKeys:()=>Tz,omit:()=>pZ,objectClone:()=>yZ,numKeys:()=>mZ,nullish:()=>V6,normalizeParams:()=>C,mergeDefs:()=>p4,merge:()=>aZ,jsonStringifyReplacer:()=>w1,joinValues:()=>W,issue:()=>C1,isPlainObject:()=>B6,isObject:()=>p6,hexToUint8Array:()=>UA,getSizableOrigin:()=>I0,getParsedType:()=>hZ,getLengthableOrigin:()=>u0,getEnumValues:()=>eI,getElementAtPath:()=>rZ,floatSafeRemainder:()=>Nz,finalizeIssue:()=>a$,extend:()=>oZ,escapeRegex:()=>T4,esc:()=>ou,defineLazy:()=>p,createTransparentProxy:()=>cZ,cloneDef:()=>iZ,clone:()=>n$,cleanRegex:()=>sI,cleanEnum:()=>$A,captureStackTrace:()=>tu,cached:()=>E1,base64urlToUint8Array:()=>IA,base64ToUint8Array:()=>R5,assignProp:()=>D6,assertNotEqual:()=>CZ,assertNever:()=>xZ,assertIs:()=>fZ,assertEqual:()=>EZ,assert:()=>kZ,allowsEval:()=>Xz,aborted:()=>M6,NUMBER_FORMAT_RANGES:()=>Hz,Class:()=>W5,BIGINT_FORMAT_RANGES:()=>Yz});function EZ($){return $}function CZ($){return $}function fZ($){}function xZ($){throw Error("Unexpected value in exhaustive check")}function kZ($){}function eI($){let I=Object.values($).filter((_)=>typeof _==="number");return Object.entries($).filter(([_,u])=>I.indexOf(+_)===-1).map(([_,u])=>u)}function W($,I="|"){return $.map((U)=>j(U)).join(I)}function w1($,I){if(typeof I==="bigint")return I.toString();return I}function E1($){return{get value(){{let U=$();return Object.defineProperty(this,"value",{value:U}),U}throw Error("cached value already set")}}}function V6($){return $===null||$===void 0}function sI($){let I=$.startsWith("^")?1:0,U=$.endsWith("$")?$.length-1:$.length;return $.slice(I,U)}function Nz($,I){let U=($.toString().split(".")[1]||"").length,_=I.toString(),u=(_.split(".")[1]||"").length;if(u===0&&/\d?e-\d?/.test(_)){let J=_.match(/\d?e-(\d?)/);if(J?.[1])u=Number.parseInt(J[1])}let g=U>u?U:u,z=Number.parseInt($.toFixed(g).replace(".","")),v=Number.parseInt(I.toFixed(g).replace(".",""));return z%v/10**g}var K5=Symbol("evaluating");function p($,I,U){let _=void 0;Object.defineProperty($,I,{get(){if(_===K5)return;if(_===void 0)_=K5,_=U();return _},set(u){Object.defineProperty($,I,{value:u})},configurable:!0})}function yZ($){return Object.create(Object.getPrototypeOf($),Object.getOwnPropertyDescriptors($))}function D6($,I,U){Object.defineProperty($,I,{value:U,writable:!0,enumerable:!0,configurable:!0})}function p4(...$){let I={};for(let U of $){let _=Object.getOwnPropertyDescriptors(U);Object.assign(I,_)}return Object.defineProperties({},I)}function iZ($){return p4($._zod.def)}function rZ($,I){if(!I)return $;return I.reduce((U,_)=>U?.[_],$)}function nZ($){let I=Object.keys($),U=I.map((_)=>$[_]);return Promise.all(U).then((_)=>{let u={};for(let g=0;g<I.length;g++)u[I[g]]=_[g];return u})}function lZ($=10){let U="";for(let _=0;_<$;_++)U+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return U}function ou($){return JSON.stringify($)}function Gz($){return $.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var tu="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};function p6($){return typeof $==="object"&&$!==null&&!Array.isArray($)}var Xz=E1(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});function B6($){if(p6($)===!1)return!1;let I=$.constructor;if(I===void 0)return!0;if(typeof I!=="function")return!0;let U=I.prototype;if(p6(U)===!1)return!1;if(Object.prototype.hasOwnProperty.call(U,"isPrototypeOf")===!1)return!1;return!0}function qz($){if(B6($))return{...$};if(Array.isArray($))return[...$];return $}function mZ($){let I=0;for(let U in $)if(Object.prototype.hasOwnProperty.call($,U))I++;return I}var hZ=($)=>{let I=typeof $;switch(I){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN($)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray($))return"array";if($===null)return"null";if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return"promise";if(typeof Map<"u"&&$ instanceof Map)return"map";if(typeof Set<"u"&&$ instanceof Set)return"set";if(typeof Date<"u"&&$ instanceof Date)return"date";if(typeof File<"u"&&$ instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${I}`)}},$0=new Set(["string","number","symbol"]),Qz=new Set(["string","number","bigint","boolean","symbol","undefined"]);function T4($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function n$($,I,U){let _=new $._zod.constr(I??$._zod.def);if(!I||U?.parent)_._zod.parent=$;return _}function C($){let I=$;if(!I)return{};if(typeof I==="string")return{error:()=>I};if(I?.message!==void 0){if(I?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");I.error=I.message}if(delete I.message,typeof I.error==="string")return{...I,error:()=>I.error};return I}function cZ($){let I;return new Proxy({},{get(U,_,u){return I??(I=$()),Reflect.get(I,_,u)},set(U,_,u,g){return I??(I=$()),Reflect.set(I,_,u,g)},has(U,_){return I??(I=$()),Reflect.has(I,_)},deleteProperty(U,_){return I??(I=$()),Reflect.deleteProperty(I,_)},ownKeys(U){return I??(I=$()),Reflect.ownKeys(I)},getOwnPropertyDescriptor(U,_){return I??(I=$()),Reflect.getOwnPropertyDescriptor(I,_)},defineProperty(U,_,u){return I??(I=$()),Reflect.defineProperty(I,_,u)}})}function j($){if(typeof $==="bigint")return $.toString()+"n";if(typeof $==="string")return`"${$}"`;return`${$}`}function Tz($){return Object.keys($).filter((I)=>{return $[I]._zod.optin==="optional"&&$[I]._zod.optout==="optional"})}var Hz={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Yz={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function dZ($,I){let U=$._zod.def,_=U.checks;if(_&&_.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let g=p4($._zod.def,{get shape(){let z={};for(let v in I){if(!(v in U.shape))throw Error(`Unrecognized key: "${v}"`);if(!I[v])continue;z[v]=U.shape[v]}return D6(this,"shape",z),z},checks:[]});return n$($,g)}function pZ($,I){let U=$._zod.def,_=U.checks;if(_&&_.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let g=p4($._zod.def,{get shape(){let z={...$._zod.def.shape};for(let v in I){if(!(v in U.shape))throw Error(`Unrecognized key: "${v}"`);if(!I[v])continue;delete z[v]}return D6(this,"shape",z),z},checks:[]});return n$($,g)}function oZ($,I){if(!B6(I))throw Error("Invalid input to extend: expected a plain object");let U=$._zod.def.checks;if(U&&U.length>0){let g=$._zod.def.shape;for(let z in I)if(Object.getOwnPropertyDescriptor(g,z)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let u=p4($._zod.def,{get shape(){let g={...$._zod.def.shape,...I};return D6(this,"shape",g),g}});return n$($,u)}function tZ($,I){if(!B6(I))throw Error("Invalid input to safeExtend: expected a plain object");let U=p4($._zod.def,{get shape(){let _={...$._zod.def.shape,...I};return D6(this,"shape",_),_}});return n$($,U)}function aZ($,I){let U=p4($._zod.def,{get shape(){let _={...$._zod.def.shape,...I._zod.def.shape};return D6(this,"shape",_),_},get catchall(){return I._zod.def.catchall},checks:[]});return n$($,U)}function eZ($,I,U){let u=I._zod.def.checks;if(u&&u.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let z=p4(I._zod.def,{get shape(){let v=I._zod.def.shape,J={...v};if(U)for(let N in U){if(!(N in v))throw Error(`Unrecognized key: "${N}"`);if(!U[N])continue;J[N]=$?new $({type:"optional",innerType:v[N]}):v[N]}else for(let N in v)J[N]=$?new $({type:"optional",innerType:v[N]}):v[N];return D6(this,"shape",J),J},checks:[]});return n$(I,z)}function sZ($,I,U){let _=p4(I._zod.def,{get shape(){let u=I._zod.def.shape,g={...u};if(U)for(let z in U){if(!(z in g))throw Error(`Unrecognized key: "${z}"`);if(!U[z])continue;g[z]=new $({type:"nonoptional",innerType:u[z]})}else for(let z in u)g[z]=new $({type:"nonoptional",innerType:u[z]});return D6(this,"shape",g),g}});return n$(I,_)}function M6($,I=0){if($.aborted===!0)return!0;for(let U=I;U<$.issues.length;U++)if($.issues[U]?.continue!==!0)return!0;return!1}function U4($,I){return I.map((U)=>{var _;return(_=U).path??(_.path=[]),U.path.unshift($),U})}function aI($){return typeof $==="string"?$:$?.message}function a$($,I,U){let _={...$,path:$.path??[]};if(!$.message){let u=aI($.inst?._zod.def?.error?.($))??aI(I?.error?.($))??aI(U.customError?.($))??aI(U.localeError?.($))??"Invalid input";_.message=u}if(delete _.inst,delete _.continue,!I?.reportInput)delete _.input;return _}function I0($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function u0($){if(Array.isArray($))return"array";if(typeof $==="string")return"string";return"unknown"}function S($){let I=typeof $;switch(I){case"number":return Number.isNaN($)?"nan":"number";case"object":{if($===null)return"null";if(Array.isArray($))return"array";let U=$;if(U&&Object.getPrototypeOf(U)!==Object.prototype&&"constructor"in U&&U.constructor)return U.constructor.name}}return I}function C1(...$){let[I,U,_]=$;if(typeof I==="string")return{message:I,code:"custom",input:U,inst:_};return{...I}}function $A($){return Object.entries($).filter(([I,U])=>{return Number.isNaN(Number.parseInt(I,10))}).map((I)=>I[1])}function R5($){let I=atob($),U=new Uint8Array(I.length);for(let _=0;_<I.length;_++)U[_]=I.charCodeAt(_);return U}function L5($){let I="";for(let U=0;U<$.length;U++)I+=String.fromCharCode($[U]);return btoa(I)}function IA($){let I=$.replace(/-/g,"+").replace(/_/g,"/"),U="=".repeat((4-I.length%4)%4);return R5(I+U)}function uA($){return L5($).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function UA($){let I=$.replace(/^0x/,"");if(I.length%2!==0)throw Error("Invalid hex string length");let U=new Uint8Array(I.length/2);for(let _=0;_<I.length;_+=2)U[_/2]=Number.parseInt(I.slice(_,_+2),16);return U}function _A($){return Array.from($).map((I)=>I.toString(16).padStart(2,"0")).join("")}class W5{constructor(...$){}}var P5=($,I)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:I,enumerable:!1}),$.message=JSON.stringify(I,w1,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},U0=V("$ZodError",P5),e$=V("$ZodError",P5,{Parent:Error});function _0($,I=(U)=>U.message){let U={},_=[];for(let u of $.issues)if(u.path.length>0)U[u.path[0]]=U[u.path[0]]||[],U[u.path[0]].push(I(u));else _.push(I(u));return{formErrors:_,fieldErrors:U}}function g0($,I=(U)=>U.message){let U={_errors:[]},_=(u)=>{for(let g of u.issues)if(g.code==="invalid_union"&&g.errors.length)g.errors.map((z)=>_({issues:z}));else if(g.code==="invalid_key")_({issues:g.issues});else if(g.code==="invalid_element")_({issues:g.issues});else if(g.path.length===0)U._errors.push(I(g));else{let z=U,v=0;while(v<g.path.length){let J=g.path[v];if(v!==g.path.length-1)z[J]=z[J]||{_errors:[]};else z[J]=z[J]||{_errors:[]},z[J]._errors.push(I(g));z=z[J],v++}}};return _($),U}function Oz($,I=(U)=>U.message){let U={errors:[]},_=(u,g=[])=>{var z,v;for(let J of u.issues)if(J.code==="invalid_union"&&J.errors.length)J.errors.map((N)=>_({issues:N},J.path));else if(J.code==="invalid_key")_({issues:J.issues},J.path);else if(J.code==="invalid_element")_({issues:J.issues},J.path);else{let N=[...g,...J.path];if(N.length===0){U.errors.push(I(J));continue}let X=U,G=0;while(G<N.length){let q=N[G],T=G===N.length-1;if(typeof q==="string")X.properties??(X.properties={}),(z=X.properties)[q]??(z[q]={errors:[]}),X=X.properties[q];else X.items??(X.items=[]),(v=X.items)[q]??(v[q]={errors:[]}),X=X.items[q];if(T)X.errors.push(I(J));G++}}};return _($),U}function Z5($){let I=[],U=$.map((_)=>typeof _==="object"?_.key:_);for(let _ of U)if(typeof _==="number")I.push(`[${_}]`);else if(typeof _==="symbol")I.push(`[${JSON.stringify(String(_))}]`);else if(/[^\w$]/.test(_))I.push(`[${JSON.stringify(_)}]`);else{if(I.length)I.push(".");I.push(_)}return I.join("")}function Vz($){let I=[],U=[...$.issues].sort((_,u)=>(_.path??[]).length-(u.path??[]).length);for(let _ of U)if(I.push(`✖ ${_.message}`),_.path?.length)I.push(` → at ${Z5(_.path)}`);return I.join(`
299
+ `)}var f1=($)=>(I,U,_,u)=>{let g=_?Object.assign(_,{async:!1}):{async:!1},z=I._zod.run({value:U,issues:[]},g);if(z instanceof Promise)throw new E4;if(z.issues.length){let v=new(u?.Err??$)(z.issues.map((J)=>a$(J,g,K$())));throw tu(v,u?.callee),v}return z.value},au=f1(e$),x1=($)=>async(I,U,_,u)=>{let g=_?Object.assign(_,{async:!0}):{async:!0},z=I._zod.run({value:U,issues:[]},g);if(z instanceof Promise)z=await z;if(z.issues.length){let v=new(u?.Err??$)(z.issues.map((J)=>a$(J,g,K$())));throw tu(v,u?.callee),v}return z.value},eu=x1(e$),k1=($)=>(I,U,_)=>{let u=_?{..._,async:!1}:{async:!1},g=I._zod.run({value:U,issues:[]},u);if(g instanceof Promise)throw new E4;return g.issues.length?{success:!1,error:new($??U0)(g.issues.map((z)=>a$(z,u,K$())))}:{success:!0,data:g.value}},Dz=k1(e$),y1=($)=>async(I,U,_)=>{let u=_?Object.assign(_,{async:!0}):{async:!0},g=I._zod.run({value:U,issues:[]},u);if(g instanceof Promise)g=await g;return g.issues.length?{success:!1,error:new $(g.issues.map((z)=>a$(z,u,K$())))}:{success:!0,data:g.value}},Bz=y1(e$),su=($)=>(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return f1($)(I,U,u)},zA=su(e$),$U=($)=>(I,U,_)=>{return f1($)(I,U,_)},vA=$U(e$),IU=($)=>async(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return x1($)(I,U,u)},JA=IU(e$),uU=($)=>async(I,U,_)=>{return x1($)(I,U,_)},NA=uU(e$),UU=($)=>(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return k1($)(I,U,u)},GA=UU(e$),_U=($)=>(I,U,_)=>{return k1($)(I,U,_)},XA=_U(e$),gU=($)=>async(I,U,_)=>{let u=_?Object.assign(_,{direction:"backward"}):{direction:"backward"};return y1($)(I,U,u)},qA=gU(e$),zU=($)=>async(I,U,_)=>{return y1($)(I,U,_)},QA=zU(e$);var H4={};D4(H4,{xid:()=>Lz,uuid7:()=>OA,uuid6:()=>YA,uuid4:()=>HA,uuid:()=>o6,uppercase:()=>pz,unicodeEmail:()=>A5,undefined:()=>cz,ulid:()=>Rz,time:()=>yz,string:()=>rz,sha512_hex:()=>kA,sha512_base64url:()=>iA,sha512_base64:()=>yA,sha384_hex:()=>CA,sha384_base64url:()=>xA,sha384_base64:()=>fA,sha256_hex:()=>SA,sha256_base64url:()=>EA,sha256_base64:()=>wA,sha1_hex:()=>bA,sha1_base64url:()=>FA,sha1_base64:()=>jA,rfc5322Email:()=>DA,number:()=>z0,null:()=>hz,nanoid:()=>Pz,md5_hex:()=>PA,md5_base64url:()=>AA,md5_base64:()=>ZA,mac:()=>wz,lowercase:()=>dz,ksuid:()=>Wz,ipv6:()=>Sz,ipv4:()=>Fz,integer:()=>lz,idnEmail:()=>BA,html5Email:()=>VA,hostname:()=>RA,hex:()=>WA,guid:()=>Az,extendedDuration:()=>TA,emoji:()=>jz,email:()=>bz,e164:()=>xz,duration:()=>Zz,domain:()=>LA,datetime:()=>iz,date:()=>kz,cuid2:()=>Kz,cuid:()=>Mz,cidrv6:()=>Cz,cidrv4:()=>Ez,browserEmail:()=>MA,boolean:()=>mz,bigint:()=>nz,base64url:()=>vU,base64:()=>fz});var Mz=/^[cC][^\s-]{8,}$/,Kz=/^[0-9a-z]+$/,Rz=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Lz=/^[0-9a-vA-V]{20}$/,Wz=/^[A-Za-z0-9]{27}$/,Pz=/^[a-zA-Z0-9_-]{21}$/,Zz=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,TA=/^[-+]?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)?)??$/,Az=/^([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})$/,o6=($)=>{if(!$)return/^([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)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},HA=o6(4),YA=o6(6),OA=o6(7),bz=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,VA=/^[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])?)*$/,DA=/^(([^<>()\[\]\\.,;:\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,}))$/,A5=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,BA=A5,MA=/^[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])?)*$/,KA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function jz(){return new RegExp(KA,"u")}var Fz=/^(?:(?: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])$/,Sz=/^(([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}|:))$/,wz=($)=>{let I=T4($??":");return new RegExp(`^(?:[0-9A-F]{2}${I}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${I}){5}[0-9a-f]{2}$`)},Ez=/^((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])$/,Cz=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,fz=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vU=/^[A-Za-z0-9_-]*$/,RA=/^(?=.{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])?)*\.?$/,LA=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,xz=/^\+[1-9]\d{6,14}$/,b5="(?:(?:\\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])))",kz=new RegExp(`^${b5}$`);function j5($){return typeof $.precision==="number"?$.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":$.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${$.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function yz($){return new RegExp(`^${j5($)}$`)}function iz($){let I=j5({precision:$.precision}),U=["Z"];if($.local)U.push("");if($.offset)U.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let _=`${I}(?:${U.join("|")})`;return new RegExp(`^${b5}T(?:${_})$`)}var rz=($)=>{let I=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${I}$`)},nz=/^-?\d+n?$/,lz=/^-?\d+$/,z0=/^-?\d+(?:\.\d+)?$/,mz=/^(?:true|false)$/i,hz=/^null$/i;var cz=/^undefined$/i;var dz=/^[^A-Z]*$/,pz=/^[^a-z]*$/,WA=/^[0-9a-fA-F]*$/;function v0($,I){return new RegExp(`^[A-Za-z0-9+/]{${$}}${I}$`)}function J0($){return new RegExp(`^[A-Za-z0-9_-]{${$}}$`)}var PA=/^[0-9a-fA-F]{32}$/,ZA=v0(22,"=="),AA=J0(22),bA=/^[0-9a-fA-F]{40}$/,jA=v0(27,"="),FA=J0(27),SA=/^[0-9a-fA-F]{64}$/,wA=v0(43,"="),EA=J0(43),CA=/^[0-9a-fA-F]{96}$/,fA=v0(64,""),xA=J0(64),kA=/^[0-9a-fA-F]{128}$/,yA=v0(86,"=="),iA=J0(86);var G$=V("$ZodCheck",($,I)=>{var U;$._zod??($._zod={}),$._zod.def=I,(U=$._zod).onattach??(U.onattach=[])}),S5={number:"number",bigint:"bigint",object:"date"},JU=V("$ZodCheckLessThan",($,I)=>{G$.init($,I);let U=S5[typeof I.value];$._zod.onattach.push((_)=>{let u=_._zod.bag,g=(I.inclusive?u.maximum:u.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(I.value<g)if(I.inclusive)u.maximum=I.value;else u.exclusiveMaximum=I.value}),$._zod.check=(_)=>{if(I.inclusive?_.value<=I.value:_.value<I.value)return;_.issues.push({origin:U,code:"too_big",maximum:typeof I.value==="object"?I.value.getTime():I.value,input:_.value,inclusive:I.inclusive,inst:$,continue:!I.abort})}}),NU=V("$ZodCheckGreaterThan",($,I)=>{G$.init($,I);let U=S5[typeof I.value];$._zod.onattach.push((_)=>{let u=_._zod.bag,g=(I.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(I.value>g)if(I.inclusive)u.minimum=I.value;else u.exclusiveMinimum=I.value}),$._zod.check=(_)=>{if(I.inclusive?_.value>=I.value:_.value>I.value)return;_.issues.push({origin:U,code:"too_small",minimum:typeof I.value==="object"?I.value.getTime():I.value,input:_.value,inclusive:I.inclusive,inst:$,continue:!I.abort})}}),oz=V("$ZodCheckMultipleOf",($,I)=>{G$.init($,I),$._zod.onattach.push((U)=>{var _;(_=U._zod.bag).multipleOf??(_.multipleOf=I.value)}),$._zod.check=(U)=>{if(typeof U.value!==typeof I.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof U.value==="bigint"?U.value%I.value===BigInt(0):Nz(U.value,I.value)===0)return;U.issues.push({origin:typeof U.value,code:"not_multiple_of",divisor:I.value,input:U.value,inst:$,continue:!I.abort})}}),tz=V("$ZodCheckNumberFormat",($,I)=>{G$.init($,I),I.format=I.format||"float64";let U=I.format?.includes("int"),_=U?"int":"number",[u,g]=Hz[I.format];$._zod.onattach.push((z)=>{let v=z._zod.bag;if(v.format=I.format,v.minimum=u,v.maximum=g,U)v.pattern=lz}),$._zod.check=(z)=>{let v=z.value;if(U){if(!Number.isInteger(v)){z.issues.push({expected:_,format:I.format,code:"invalid_type",continue:!1,input:v,inst:$});return}if(!Number.isSafeInteger(v)){if(v>0)z.issues.push({input:v,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:_,inclusive:!0,continue:!I.abort});else z.issues.push({input:v,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:_,inclusive:!0,continue:!I.abort});return}}if(v<u)z.issues.push({origin:"number",input:v,code:"too_small",minimum:u,inclusive:!0,inst:$,continue:!I.abort});if(v>g)z.issues.push({origin:"number",input:v,code:"too_big",maximum:g,inclusive:!0,inst:$,continue:!I.abort})}}),az=V("$ZodCheckBigIntFormat",($,I)=>{G$.init($,I);let[U,_]=Yz[I.format];$._zod.onattach.push((u)=>{let g=u._zod.bag;g.format=I.format,g.minimum=U,g.maximum=_}),$._zod.check=(u)=>{let g=u.value;if(g<U)u.issues.push({origin:"bigint",input:g,code:"too_small",minimum:U,inclusive:!0,inst:$,continue:!I.abort});if(g>_)u.issues.push({origin:"bigint",input:g,code:"too_big",maximum:_,inclusive:!0,inst:$,continue:!I.abort})}}),ez=V("$ZodCheckMaxSize",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.size!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag.maximum??Number.POSITIVE_INFINITY;if(I.maximum<u)_._zod.bag.maximum=I.maximum}),$._zod.check=(_)=>{let u=_.value;if(u.size<=I.maximum)return;_.issues.push({origin:I0(u),code:"too_big",maximum:I.maximum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),sz=V("$ZodCheckMinSize",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.size!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(I.minimum>u)_._zod.bag.minimum=I.minimum}),$._zod.check=(_)=>{let u=_.value;if(u.size>=I.minimum)return;_.issues.push({origin:I0(u),code:"too_small",minimum:I.minimum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),$v=V("$ZodCheckSizeEquals",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.size!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag;u.minimum=I.size,u.maximum=I.size,u.size=I.size}),$._zod.check=(_)=>{let u=_.value,g=u.size;if(g===I.size)return;let z=g>I.size;_.issues.push({origin:I0(u),...z?{code:"too_big",maximum:I.size}:{code:"too_small",minimum:I.size},inclusive:!0,exact:!0,input:_.value,inst:$,continue:!I.abort})}}),Iv=V("$ZodCheckMaxLength",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.length!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag.maximum??Number.POSITIVE_INFINITY;if(I.maximum<u)_._zod.bag.maximum=I.maximum}),$._zod.check=(_)=>{let u=_.value;if(u.length<=I.maximum)return;let z=u0(u);_.issues.push({origin:z,code:"too_big",maximum:I.maximum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),uv=V("$ZodCheckMinLength",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.length!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(I.minimum>u)_._zod.bag.minimum=I.minimum}),$._zod.check=(_)=>{let u=_.value;if(u.length>=I.minimum)return;let z=u0(u);_.issues.push({origin:z,code:"too_small",minimum:I.minimum,inclusive:!0,input:u,inst:$,continue:!I.abort})}}),Uv=V("$ZodCheckLengthEquals",($,I)=>{var U;G$.init($,I),(U=$._zod.def).when??(U.when=(_)=>{let u=_.value;return!V6(u)&&u.length!==void 0}),$._zod.onattach.push((_)=>{let u=_._zod.bag;u.minimum=I.length,u.maximum=I.length,u.length=I.length}),$._zod.check=(_)=>{let u=_.value,g=u.length;if(g===I.length)return;let z=u0(u),v=g>I.length;_.issues.push({origin:z,...v?{code:"too_big",maximum:I.length}:{code:"too_small",minimum:I.length},inclusive:!0,exact:!0,input:_.value,inst:$,continue:!I.abort})}}),i1=V("$ZodCheckStringFormat",($,I)=>{var U,_;if(G$.init($,I),$._zod.onattach.push((u)=>{let g=u._zod.bag;if(g.format=I.format,I.pattern)g.patterns??(g.patterns=new Set),g.patterns.add(I.pattern)}),I.pattern)(U=$._zod).check??(U.check=(u)=>{if(I.pattern.lastIndex=0,I.pattern.test(u.value))return;u.issues.push({origin:"string",code:"invalid_format",format:I.format,input:u.value,...I.pattern?{pattern:I.pattern.toString()}:{},inst:$,continue:!I.abort})});else(_=$._zod).check??(_.check=()=>{})}),_v=V("$ZodCheckRegex",($,I)=>{i1.init($,I),$._zod.check=(U)=>{if(I.pattern.lastIndex=0,I.pattern.test(U.value))return;U.issues.push({origin:"string",code:"invalid_format",format:"regex",input:U.value,pattern:I.pattern.toString(),inst:$,continue:!I.abort})}}),gv=V("$ZodCheckLowerCase",($,I)=>{I.pattern??(I.pattern=dz),i1.init($,I)}),zv=V("$ZodCheckUpperCase",($,I)=>{I.pattern??(I.pattern=pz),i1.init($,I)}),vv=V("$ZodCheckIncludes",($,I)=>{G$.init($,I);let U=T4(I.includes),_=new RegExp(typeof I.position==="number"?`^.{${I.position}}${U}`:U);I.pattern=_,$._zod.onattach.push((u)=>{let g=u._zod.bag;g.patterns??(g.patterns=new Set),g.patterns.add(_)}),$._zod.check=(u)=>{if(u.value.includes(I.includes,I.position))return;u.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:I.includes,input:u.value,inst:$,continue:!I.abort})}}),Jv=V("$ZodCheckStartsWith",($,I)=>{G$.init($,I);let U=new RegExp(`^${T4(I.prefix)}.*`);I.pattern??(I.pattern=U),$._zod.onattach.push((_)=>{let u=_._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(U)}),$._zod.check=(_)=>{if(_.value.startsWith(I.prefix))return;_.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:I.prefix,input:_.value,inst:$,continue:!I.abort})}}),Nv=V("$ZodCheckEndsWith",($,I)=>{G$.init($,I);let U=new RegExp(`.*${T4(I.suffix)}$`);I.pattern??(I.pattern=U),$._zod.onattach.push((_)=>{let u=_._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(U)}),$._zod.check=(_)=>{if(_.value.endsWith(I.suffix))return;_.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:I.suffix,input:_.value,inst:$,continue:!I.abort})}});function F5($,I,U){if($.issues.length)I.issues.push(...U4(U,$.issues))}var Gv=V("$ZodCheckProperty",($,I)=>{G$.init($,I),$._zod.check=(U)=>{let _=I.schema._zod.run({value:U.value[I.property],issues:[]},{});if(_ instanceof Promise)return _.then((u)=>F5(u,U,I.property));F5(_,U,I.property);return}}),Xv=V("$ZodCheckMimeType",($,I)=>{G$.init($,I);let U=new Set(I.mime);$._zod.onattach.push((_)=>{_._zod.bag.mime=I.mime}),$._zod.check=(_)=>{if(U.has(_.value.type))return;_.issues.push({code:"invalid_value",values:I.mime,input:_.value.type,inst:$,continue:!I.abort})}}),qv=V("$ZodCheckOverwrite",($,I)=>{G$.init($,I),$._zod.check=(U)=>{U.value=I.tx(U.value)}});class GU{constructor($=[]){if(this.content=[],this.indent=0,this)this.args=$}indented($){this.indent+=1,$(this),this.indent-=1}write($){if(typeof $==="function"){$(this,{execution:"sync"}),$(this,{execution:"async"});return}let U=$.split(`
299
300
  `).filter((g)=>g),_=Math.min(...U.map((g)=>g.length-g.trimStart().length)),u=U.map((g)=>g.slice(_)).map((g)=>" ".repeat(this.indent*2)+g);for(let g of u)this.content.push(g)}compile(){let $=Function,I=this?.args,_=[...(this?.content??[""]).map((u)=>` ${u}`)];return new $(...I,_.join(`
300
- `))}}var Xv={major:4,minor:3,patch:6};var l=D("$ZodType",($,I)=>{var U;$??($={}),$._zod.def=I,$._zod.bag=$._zod.bag||{},$._zod.version=Xv;let _=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))_.unshift($);for(let u of _)for(let g of u._zod.onattach)g($);if(_.length===0)(U=$._zod).deferred??(U.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let u=(z,v,J)=>{let N=V6(z),X;for(let G of v){if(G._zod.def.when){if(!G._zod.def.when(z))continue}else if(N)continue;let q=z.issues.length,T=G._zod.check(z);if(T instanceof Promise&&J?.async===!1)throw new S4;if(X||T instanceof Promise)X=(X??Promise.resolve()).then(async()=>{if(await T,z.issues.length===q)return;if(!N)N=V6(z,q)});else{if(z.issues.length===q)continue;if(!N)N=V6(z,q)}}if(X)return X.then(()=>{return z});return z},g=(z,v,J)=>{if(V6(z))return z.aborted=!0,z;let N=u(v,_,J);if(N instanceof Promise){if(J.async===!1)throw new S4;return N.then((X)=>$._zod.parse(X,J))}return $._zod.parse(N,J)};$._zod.run=(z,v)=>{if(v.skipChecks)return $._zod.parse(z,v);if(v.direction==="backward"){let N=$._zod.parse({value:z.value,issues:[]},{...v,skipChecks:!0});if(N instanceof Promise)return N.then((X)=>{return g(X,z,v)});return g(N,z,v)}let J=$._zod.parse(z,v);if(J instanceof Promise){if(v.async===!1)throw new S4;return J.then((N)=>u(N,_,v))}return u(J,_,v)}}p($,"~standard",()=>({validate:(u)=>{try{let g=Oz($,u);return g.success?{value:g.data}:{issues:g.error?.issues}}catch(g){return Dz($,u).then((z)=>z.success?{value:z.data}:{issues:z.error?.issues})}},vendor:"zod",version:1}))}),p6=D("$ZodString",($,I)=>{l.init($,I),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??yz($._zod.bag),$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=String(U.value)}catch(u){}if(typeof U.value==="string")return U;return U.issues.push({expected:"string",code:"invalid_type",input:U.value,inst:$}),U}}),v$=D("$ZodStringFormat",($,I)=>{k1.init($,I),p6.init($,I)}),Qv=D("$ZodGUID",($,I)=>{I.pattern??(I.pattern=Wz),v$.init($,I)}),Tv=D("$ZodUUID",($,I)=>{if(I.version){let _={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[I.version];if(_===void 0)throw Error(`Invalid UUID version: "${I.version}"`);I.pattern??(I.pattern=d6(_))}else I.pattern??(I.pattern=d6());v$.init($,I)}),Hv=D("$ZodEmail",($,I)=>{I.pattern??(I.pattern=Zz),v$.init($,I)}),Yv=D("$ZodURL",($,I)=>{v$.init($,I),$._zod.check=(U)=>{try{let _=U.value.trim(),u=new URL(_);if(I.hostname){if(I.hostname.lastIndex=0,!I.hostname.test(u.hostname))U.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:I.hostname.source,input:U.value,inst:$,continue:!I.abort})}if(I.protocol){if(I.protocol.lastIndex=0,!I.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol))U.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:I.protocol.source,input:U.value,inst:$,continue:!I.abort})}if(I.normalize)U.value=u.href;else U.value=_;return}catch(_){U.issues.push({code:"invalid_format",format:"url",input:U.value,inst:$,continue:!I.abort})}}}),Ov=D("$ZodEmoji",($,I)=>{I.pattern??(I.pattern=Az()),v$.init($,I)}),Dv=D("$ZodNanoID",($,I)=>{I.pattern??(I.pattern=Lz),v$.init($,I)}),Vv=D("$ZodCUID",($,I)=>{I.pattern??(I.pattern=Vz),v$.init($,I)}),Bv=D("$ZodCUID2",($,I)=>{I.pattern??(I.pattern=Bz),v$.init($,I)}),Mv=D("$ZodULID",($,I)=>{I.pattern??(I.pattern=Mz),v$.init($,I)}),Rv=D("$ZodXID",($,I)=>{I.pattern??(I.pattern=Rz),v$.init($,I)}),Kv=D("$ZodKSUID",($,I)=>{I.pattern??(I.pattern=Kz),v$.init($,I)}),Lv=D("$ZodISODateTime",($,I)=>{I.pattern??(I.pattern=kz(I)),v$.init($,I)}),Pv=D("$ZodISODate",($,I)=>{I.pattern??(I.pattern=fz),v$.init($,I)}),Wv=D("$ZodISOTime",($,I)=>{I.pattern??(I.pattern=xz(I)),v$.init($,I)}),Zv=D("$ZodISODuration",($,I)=>{I.pattern??(I.pattern=Pz),v$.init($,I)}),Av=D("$ZodIPv4",($,I)=>{I.pattern??(I.pattern=bz),v$.init($,I),$._zod.bag.format="ipv4"}),bv=D("$ZodIPv6",($,I)=>{I.pattern??(I.pattern=jz),v$.init($,I),$._zod.bag.format="ipv6",$._zod.check=(U)=>{try{new URL(`http://[${U.value}]`)}catch{U.issues.push({code:"invalid_format",format:"ipv6",input:U.value,inst:$,continue:!I.abort})}}}),jv=D("$ZodMAC",($,I)=>{I.pattern??(I.pattern=Fz(I.delimiter)),v$.init($,I),$._zod.bag.format="mac"}),Fv=D("$ZodCIDRv4",($,I)=>{I.pattern??(I.pattern=Sz),v$.init($,I)}),Sv=D("$ZodCIDRv6",($,I)=>{I.pattern??(I.pattern=wz),v$.init($,I),$._zod.check=(U)=>{let _=U.value.split("/");try{if(_.length!==2)throw Error();let[u,g]=_;if(!g)throw Error();let z=Number(g);if(`${z}`!==g)throw Error();if(z<0||z>128)throw Error();new URL(`http://[${u}]`)}catch{U.issues.push({code:"invalid_format",format:"cidrv6",input:U.value,inst:$,continue:!I.abort})}}});function wv($){if($==="")return!0;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}var Ev=D("$ZodBase64",($,I)=>{I.pattern??(I.pattern=Ez),v$.init($,I),$._zod.bag.contentEncoding="base64",$._zod.check=(U)=>{if(wv(U.value))return;U.issues.push({code:"invalid_format",format:"base64",input:U.value,inst:$,continue:!I.abort})}});function l5($){if(!_U.test($))return!1;let I=$.replace(/[-_]/g,(_)=>_==="-"?"+":"/"),U=I.padEnd(Math.ceil(I.length/4)*4,"=");return wv(U)}var Cv=D("$ZodBase64URL",($,I)=>{I.pattern??(I.pattern=_U),v$.init($,I),$._zod.bag.contentEncoding="base64url",$._zod.check=(U)=>{if(l5(U.value))return;U.issues.push({code:"invalid_format",format:"base64url",input:U.value,inst:$,continue:!I.abort})}}),fv=D("$ZodE164",($,I)=>{I.pattern??(I.pattern=Cz),v$.init($,I)});function m5($,I=null){try{let U=$.split(".");if(U.length!==3)return!1;let[_]=U;if(!_)return!1;let u=JSON.parse(atob(_));if("typ"in u&&u?.typ!=="JWT")return!1;if(!u.alg)return!1;if(I&&(!("alg"in u)||u.alg!==I))return!1;return!0}catch{return!1}}var xv=D("$ZodJWT",($,I)=>{v$.init($,I),$._zod.check=(U)=>{if(m5(U.value,I.alg))return;U.issues.push({code:"invalid_format",format:"jwt",input:U.value,inst:$,continue:!I.abort})}}),kv=D("$ZodCustomStringFormat",($,I)=>{v$.init($,I),$._zod.check=(U)=>{if(I.fn(U.value))return;U.issues.push({code:"invalid_format",format:I.format,input:U.value,inst:$,continue:!I.abort})}}),QU=D("$ZodNumber",($,I)=>{l.init($,I),$._zod.pattern=$._zod.bag.pattern??_0,$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=Number(U.value)}catch(z){}let u=U.value;if(typeof u==="number"&&!Number.isNaN(u)&&Number.isFinite(u))return U;let g=typeof u==="number"?Number.isNaN(u)?"NaN":!Number.isFinite(u)?"Infinity":void 0:void 0;return U.issues.push({expected:"number",code:"invalid_type",input:u,inst:$,...g?{received:g}:{}}),U}}),yv=D("$ZodNumberFormat",($,I)=>{pz.init($,I),QU.init($,I)}),v0=D("$ZodBoolean",($,I)=>{l.init($,I),$._zod.pattern=rz,$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=Boolean(U.value)}catch(g){}let u=U.value;if(typeof u==="boolean")return U;return U.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:$}),U}}),TU=D("$ZodBigInt",($,I)=>{l.init($,I),$._zod.pattern=iz,$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=BigInt(U.value)}catch(u){}if(typeof U.value==="bigint")return U;return U.issues.push({expected:"bigint",code:"invalid_type",input:U.value,inst:$}),U}}),iv=D("$ZodBigIntFormat",($,I)=>{oz.init($,I),TU.init($,I)}),nv=D("$ZodSymbol",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(typeof u==="symbol")return U;return U.issues.push({expected:"symbol",code:"invalid_type",input:u,inst:$}),U}}),rv=D("$ZodUndefined",($,I)=>{l.init($,I),$._zod.pattern=mz,$._zod.values=new Set([void 0]),$._zod.optin="optional",$._zod.optout="optional",$._zod.parse=(U,_)=>{let u=U.value;if(typeof u>"u")return U;return U.issues.push({expected:"undefined",code:"invalid_type",input:u,inst:$}),U}}),lv=D("$ZodNull",($,I)=>{l.init($,I),$._zod.pattern=lz,$._zod.values=new Set([null]),$._zod.parse=(U,_)=>{let u=U.value;if(u===null)return U;return U.issues.push({expected:"null",code:"invalid_type",input:u,inst:$}),U}}),mv=D("$ZodAny",($,I)=>{l.init($,I),$._zod.parse=(U)=>U}),hv=D("$ZodUnknown",($,I)=>{l.init($,I),$._zod.parse=(U)=>U}),cv=D("$ZodNever",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{return U.issues.push({expected:"never",code:"invalid_type",input:U.value,inst:$}),U}}),dv=D("$ZodVoid",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(typeof u>"u")return U;return U.issues.push({expected:"void",code:"invalid_type",input:u,inst:$}),U}}),pv=D("$ZodDate",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=new Date(U.value)}catch(v){}let u=U.value,g=u instanceof Date;if(g&&!Number.isNaN(u.getTime()))return U;return U.issues.push({expected:"date",code:"invalid_type",input:u,...g?{received:"Invalid Date"}:{},inst:$}),U}});function S5($,I,U){if($.issues.length)I.issues.push(...I4(U,$.issues));I.value[U]=$.value}var ov=D("$ZodArray",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!Array.isArray(u))return U.issues.push({expected:"array",code:"invalid_type",input:u,inst:$}),U;U.value=Array(u.length);let g=[];for(let z=0;z<u.length;z++){let v=u[z],J=I.element._zod.run({value:v,issues:[]},_);if(J instanceof Promise)g.push(J.then((N)=>S5(N,U,z)));else S5(J,U,z)}if(g.length)return Promise.all(g).then(()=>U);return U}});function qU($,I,U,_,u){if($.issues.length){if(u&&!(U in _))return;I.issues.push(...I4(U,$.issues))}if($.value===void 0){if(U in _)I.value[U]=void 0}else I.value[U]=$.value}function h5($){let I=Object.keys($.shape);for(let _ of I)if(!$.shape?.[_]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${_}": expected a Zod schema`);let U=qz($.shape);return{...$,keys:I,keySet:new Set(I),numKeys:I.length,optionalKeys:new Set(U)}}function c5($,I,U,_,u,g){let z=[],v=u.keySet,J=u.catchall._zod,N=J.def.type,X=J.optout==="optional";for(let G in I){if(v.has(G))continue;if(N==="never"){z.push(G);continue}let q=J.run({value:I[G],issues:[]},_);if(q instanceof Promise)$.push(q.then((T)=>qU(T,U,G,I,X)));else qU(q,U,G,I,X)}if(z.length)U.issues.push({code:"unrecognized_keys",keys:z,input:I,inst:g});if(!$.length)return U;return Promise.all($).then(()=>{return U})}var d5=D("$ZodObject",($,I)=>{if(l.init($,I),!Object.getOwnPropertyDescriptor(I,"shape")?.get){let v=I.shape;Object.defineProperty(I,"shape",{get:()=>{let J={...v};return Object.defineProperty(I,"shape",{value:J}),J}})}let _=S1(()=>h5(I));p($._zod,"propValues",()=>{let v=I.shape,J={};for(let N in v){let X=v[N]._zod;if(X.values){J[N]??(J[N]=new Set);for(let G of X.values)J[N].add(G)}}return J});let u=c6,g=I.catchall,z;$._zod.parse=(v,J)=>{z??(z=_.value);let N=v.value;if(!u(N))return v.issues.push({expected:"object",code:"invalid_type",input:N,inst:$}),v;v.value={};let X=[],G=z.shape;for(let q of z.keys){let T=G[q],H=T._zod.optout==="optional",Q=T._zod.run({value:N[q],issues:[]},J);if(Q instanceof Promise)X.push(Q.then((Y)=>qU(Y,v,q,N,H)));else qU(Q,v,q,N,H)}if(!g)return X.length?Promise.all(X).then(()=>v):v;return c5(X,N,v,J,_.value,$)}}),tv=D("$ZodObjectJIT",($,I)=>{d5.init($,I);let U=$._zod.parse,_=S1(()=>h5(I)),u=(q)=>{let T=new vU(["shape","payload","ctx"]),H=_.value,Q=(W)=>{let O=cu(W);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};T.write("const input = payload.value;");let Y=Object.create(null),R=0;for(let W of H.keys)Y[W]=`key_${R++}`;T.write("const newResult = {};");for(let W of H.keys){let O=Y[W],V=cu(W),B=q[W]?._zod?.optout==="optional";if(T.write(`const ${O} = ${Q(W)};`),B)T.write(`
301
+ `))}}var Qv={major:4,minor:3,patch:6};var l=V("$ZodType",($,I)=>{var U;$??($={}),$._zod.def=I,$._zod.bag=$._zod.bag||{},$._zod.version=Qv;let _=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))_.unshift($);for(let u of _)for(let g of u._zod.onattach)g($);if(_.length===0)(U=$._zod).deferred??(U.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let u=(z,v,J)=>{let N=M6(z),X;for(let G of v){if(G._zod.def.when){if(!G._zod.def.when(z))continue}else if(N)continue;let q=z.issues.length,T=G._zod.check(z);if(T instanceof Promise&&J?.async===!1)throw new E4;if(X||T instanceof Promise)X=(X??Promise.resolve()).then(async()=>{if(await T,z.issues.length===q)return;if(!N)N=M6(z,q)});else{if(z.issues.length===q)continue;if(!N)N=M6(z,q)}}if(X)return X.then(()=>{return z});return z},g=(z,v,J)=>{if(M6(z))return z.aborted=!0,z;let N=u(v,_,J);if(N instanceof Promise){if(J.async===!1)throw new E4;return N.then((X)=>$._zod.parse(X,J))}return $._zod.parse(N,J)};$._zod.run=(z,v)=>{if(v.skipChecks)return $._zod.parse(z,v);if(v.direction==="backward"){let N=$._zod.parse({value:z.value,issues:[]},{...v,skipChecks:!0});if(N instanceof Promise)return N.then((X)=>{return g(X,z,v)});return g(N,z,v)}let J=$._zod.parse(z,v);if(J instanceof Promise){if(v.async===!1)throw new E4;return J.then((N)=>u(N,_,v))}return u(J,_,v)}}p($,"~standard",()=>({validate:(u)=>{try{let g=Dz($,u);return g.success?{value:g.data}:{issues:g.error?.issues}}catch(g){return Bz($,u).then((z)=>z.success?{value:z.data}:{issues:z.error?.issues})}},vendor:"zod",version:1}))}),t6=V("$ZodString",($,I)=>{l.init($,I),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??rz($._zod.bag),$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=String(U.value)}catch(u){}if(typeof U.value==="string")return U;return U.issues.push({expected:"string",code:"invalid_type",input:U.value,inst:$}),U}}),v$=V("$ZodStringFormat",($,I)=>{i1.init($,I),t6.init($,I)}),Hv=V("$ZodGUID",($,I)=>{I.pattern??(I.pattern=Az),v$.init($,I)}),Yv=V("$ZodUUID",($,I)=>{if(I.version){let _={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[I.version];if(_===void 0)throw Error(`Invalid UUID version: "${I.version}"`);I.pattern??(I.pattern=o6(_))}else I.pattern??(I.pattern=o6());v$.init($,I)}),Ov=V("$ZodEmail",($,I)=>{I.pattern??(I.pattern=bz),v$.init($,I)}),Vv=V("$ZodURL",($,I)=>{v$.init($,I),$._zod.check=(U)=>{try{let _=U.value.trim(),u=new URL(_);if(I.hostname){if(I.hostname.lastIndex=0,!I.hostname.test(u.hostname))U.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:I.hostname.source,input:U.value,inst:$,continue:!I.abort})}if(I.protocol){if(I.protocol.lastIndex=0,!I.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol))U.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:I.protocol.source,input:U.value,inst:$,continue:!I.abort})}if(I.normalize)U.value=u.href;else U.value=_;return}catch(_){U.issues.push({code:"invalid_format",format:"url",input:U.value,inst:$,continue:!I.abort})}}}),Dv=V("$ZodEmoji",($,I)=>{I.pattern??(I.pattern=jz()),v$.init($,I)}),Bv=V("$ZodNanoID",($,I)=>{I.pattern??(I.pattern=Pz),v$.init($,I)}),Mv=V("$ZodCUID",($,I)=>{I.pattern??(I.pattern=Mz),v$.init($,I)}),Kv=V("$ZodCUID2",($,I)=>{I.pattern??(I.pattern=Kz),v$.init($,I)}),Rv=V("$ZodULID",($,I)=>{I.pattern??(I.pattern=Rz),v$.init($,I)}),Lv=V("$ZodXID",($,I)=>{I.pattern??(I.pattern=Lz),v$.init($,I)}),Wv=V("$ZodKSUID",($,I)=>{I.pattern??(I.pattern=Wz),v$.init($,I)}),Pv=V("$ZodISODateTime",($,I)=>{I.pattern??(I.pattern=iz(I)),v$.init($,I)}),Zv=V("$ZodISODate",($,I)=>{I.pattern??(I.pattern=kz),v$.init($,I)}),Av=V("$ZodISOTime",($,I)=>{I.pattern??(I.pattern=yz(I)),v$.init($,I)}),bv=V("$ZodISODuration",($,I)=>{I.pattern??(I.pattern=Zz),v$.init($,I)}),jv=V("$ZodIPv4",($,I)=>{I.pattern??(I.pattern=Fz),v$.init($,I),$._zod.bag.format="ipv4"}),Fv=V("$ZodIPv6",($,I)=>{I.pattern??(I.pattern=Sz),v$.init($,I),$._zod.bag.format="ipv6",$._zod.check=(U)=>{try{new URL(`http://[${U.value}]`)}catch{U.issues.push({code:"invalid_format",format:"ipv6",input:U.value,inst:$,continue:!I.abort})}}}),Sv=V("$ZodMAC",($,I)=>{I.pattern??(I.pattern=wz(I.delimiter)),v$.init($,I),$._zod.bag.format="mac"}),wv=V("$ZodCIDRv4",($,I)=>{I.pattern??(I.pattern=Ez),v$.init($,I)}),Ev=V("$ZodCIDRv6",($,I)=>{I.pattern??(I.pattern=Cz),v$.init($,I),$._zod.check=(U)=>{let _=U.value.split("/");try{if(_.length!==2)throw Error();let[u,g]=_;if(!g)throw Error();let z=Number(g);if(`${z}`!==g)throw Error();if(z<0||z>128)throw Error();new URL(`http://[${u}]`)}catch{U.issues.push({code:"invalid_format",format:"cidrv6",input:U.value,inst:$,continue:!I.abort})}}});function Cv($){if($==="")return!0;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}var fv=V("$ZodBase64",($,I)=>{I.pattern??(I.pattern=fz),v$.init($,I),$._zod.bag.contentEncoding="base64",$._zod.check=(U)=>{if(Cv(U.value))return;U.issues.push({code:"invalid_format",format:"base64",input:U.value,inst:$,continue:!I.abort})}});function h5($){if(!vU.test($))return!1;let I=$.replace(/[-_]/g,(_)=>_==="-"?"+":"/"),U=I.padEnd(Math.ceil(I.length/4)*4,"=");return Cv(U)}var xv=V("$ZodBase64URL",($,I)=>{I.pattern??(I.pattern=vU),v$.init($,I),$._zod.bag.contentEncoding="base64url",$._zod.check=(U)=>{if(h5(U.value))return;U.issues.push({code:"invalid_format",format:"base64url",input:U.value,inst:$,continue:!I.abort})}}),kv=V("$ZodE164",($,I)=>{I.pattern??(I.pattern=xz),v$.init($,I)});function c5($,I=null){try{let U=$.split(".");if(U.length!==3)return!1;let[_]=U;if(!_)return!1;let u=JSON.parse(atob(_));if("typ"in u&&u?.typ!=="JWT")return!1;if(!u.alg)return!1;if(I&&(!("alg"in u)||u.alg!==I))return!1;return!0}catch{return!1}}var yv=V("$ZodJWT",($,I)=>{v$.init($,I),$._zod.check=(U)=>{if(c5(U.value,I.alg))return;U.issues.push({code:"invalid_format",format:"jwt",input:U.value,inst:$,continue:!I.abort})}}),iv=V("$ZodCustomStringFormat",($,I)=>{v$.init($,I),$._zod.check=(U)=>{if(I.fn(U.value))return;U.issues.push({code:"invalid_format",format:I.format,input:U.value,inst:$,continue:!I.abort})}}),YU=V("$ZodNumber",($,I)=>{l.init($,I),$._zod.pattern=$._zod.bag.pattern??z0,$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=Number(U.value)}catch(z){}let u=U.value;if(typeof u==="number"&&!Number.isNaN(u)&&Number.isFinite(u))return U;let g=typeof u==="number"?Number.isNaN(u)?"NaN":!Number.isFinite(u)?"Infinity":void 0:void 0;return U.issues.push({expected:"number",code:"invalid_type",input:u,inst:$,...g?{received:g}:{}}),U}}),rv=V("$ZodNumberFormat",($,I)=>{tz.init($,I),YU.init($,I)}),N0=V("$ZodBoolean",($,I)=>{l.init($,I),$._zod.pattern=mz,$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=Boolean(U.value)}catch(g){}let u=U.value;if(typeof u==="boolean")return U;return U.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:$}),U}}),OU=V("$ZodBigInt",($,I)=>{l.init($,I),$._zod.pattern=nz,$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=BigInt(U.value)}catch(u){}if(typeof U.value==="bigint")return U;return U.issues.push({expected:"bigint",code:"invalid_type",input:U.value,inst:$}),U}}),nv=V("$ZodBigIntFormat",($,I)=>{az.init($,I),OU.init($,I)}),lv=V("$ZodSymbol",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(typeof u==="symbol")return U;return U.issues.push({expected:"symbol",code:"invalid_type",input:u,inst:$}),U}}),mv=V("$ZodUndefined",($,I)=>{l.init($,I),$._zod.pattern=cz,$._zod.values=new Set([void 0]),$._zod.optin="optional",$._zod.optout="optional",$._zod.parse=(U,_)=>{let u=U.value;if(typeof u>"u")return U;return U.issues.push({expected:"undefined",code:"invalid_type",input:u,inst:$}),U}}),hv=V("$ZodNull",($,I)=>{l.init($,I),$._zod.pattern=hz,$._zod.values=new Set([null]),$._zod.parse=(U,_)=>{let u=U.value;if(u===null)return U;return U.issues.push({expected:"null",code:"invalid_type",input:u,inst:$}),U}}),cv=V("$ZodAny",($,I)=>{l.init($,I),$._zod.parse=(U)=>U}),dv=V("$ZodUnknown",($,I)=>{l.init($,I),$._zod.parse=(U)=>U}),pv=V("$ZodNever",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{return U.issues.push({expected:"never",code:"invalid_type",input:U.value,inst:$}),U}}),ov=V("$ZodVoid",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(typeof u>"u")return U;return U.issues.push({expected:"void",code:"invalid_type",input:u,inst:$}),U}}),tv=V("$ZodDate",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{if(I.coerce)try{U.value=new Date(U.value)}catch(v){}let u=U.value,g=u instanceof Date;if(g&&!Number.isNaN(u.getTime()))return U;return U.issues.push({expected:"date",code:"invalid_type",input:u,...g?{received:"Invalid Date"}:{},inst:$}),U}});function E5($,I,U){if($.issues.length)I.issues.push(...U4(U,$.issues));I.value[U]=$.value}var av=V("$ZodArray",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!Array.isArray(u))return U.issues.push({expected:"array",code:"invalid_type",input:u,inst:$}),U;U.value=Array(u.length);let g=[];for(let z=0;z<u.length;z++){let v=u[z],J=I.element._zod.run({value:v,issues:[]},_);if(J instanceof Promise)g.push(J.then((N)=>E5(N,U,z)));else E5(J,U,z)}if(g.length)return Promise.all(g).then(()=>U);return U}});function HU($,I,U,_,u){if($.issues.length){if(u&&!(U in _))return;I.issues.push(...U4(U,$.issues))}if($.value===void 0){if(U in _)I.value[U]=void 0}else I.value[U]=$.value}function d5($){let I=Object.keys($.shape);for(let _ of I)if(!$.shape?.[_]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${_}": expected a Zod schema`);let U=Tz($.shape);return{...$,keys:I,keySet:new Set(I),numKeys:I.length,optionalKeys:new Set(U)}}function p5($,I,U,_,u,g){let z=[],v=u.keySet,J=u.catchall._zod,N=J.def.type,X=J.optout==="optional";for(let G in I){if(v.has(G))continue;if(N==="never"){z.push(G);continue}let q=J.run({value:I[G],issues:[]},_);if(q instanceof Promise)$.push(q.then((T)=>HU(T,U,G,I,X)));else HU(q,U,G,I,X)}if(z.length)U.issues.push({code:"unrecognized_keys",keys:z,input:I,inst:g});if(!$.length)return U;return Promise.all($).then(()=>{return U})}var o5=V("$ZodObject",($,I)=>{if(l.init($,I),!Object.getOwnPropertyDescriptor(I,"shape")?.get){let v=I.shape;Object.defineProperty(I,"shape",{get:()=>{let J={...v};return Object.defineProperty(I,"shape",{value:J}),J}})}let _=E1(()=>d5(I));p($._zod,"propValues",()=>{let v=I.shape,J={};for(let N in v){let X=v[N]._zod;if(X.values){J[N]??(J[N]=new Set);for(let G of X.values)J[N].add(G)}}return J});let u=p6,g=I.catchall,z;$._zod.parse=(v,J)=>{z??(z=_.value);let N=v.value;if(!u(N))return v.issues.push({expected:"object",code:"invalid_type",input:N,inst:$}),v;v.value={};let X=[],G=z.shape;for(let q of z.keys){let T=G[q],H=T._zod.optout==="optional",Q=T._zod.run({value:N[q],issues:[]},J);if(Q instanceof Promise)X.push(Q.then((Y)=>HU(Y,v,q,N,H)));else HU(Q,v,q,N,H)}if(!g)return X.length?Promise.all(X).then(()=>v):v;return p5(X,N,v,J,_.value,$)}}),ev=V("$ZodObjectJIT",($,I)=>{o5.init($,I);let U=$._zod.parse,_=E1(()=>d5(I)),u=(q)=>{let T=new GU(["shape","payload","ctx"]),H=_.value,Q=(P)=>{let O=ou(P);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};T.write("const input = payload.value;");let Y=Object.create(null),K=0;for(let P of H.keys)Y[P]=`key_${K++}`;T.write("const newResult = {};");for(let P of H.keys){let O=Y[P],D=ou(P),B=q[P]?._zod?.optout==="optional";if(T.write(`const ${O} = ${Q(P)};`),B)T.write(`
301
302
  if (${O}.issues.length) {
302
- if (${V} in input) {
303
+ if (${D} in input) {
303
304
  payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
304
305
  ...iss,
305
- path: iss.path ? [${V}, ...iss.path] : [${V}]
306
+ path: iss.path ? [${D}, ...iss.path] : [${D}]
306
307
  })));
307
308
  }
308
309
  }
309
310
 
310
311
  if (${O}.value === undefined) {
311
- if (${V} in input) {
312
- newResult[${V}] = undefined;
312
+ if (${D} in input) {
313
+ newResult[${D}] = undefined;
313
314
  }
314
315
  } else {
315
- newResult[${V}] = ${O}.value;
316
+ newResult[${D}] = ${O}.value;
316
317
  }
317
318
 
318
319
  `);else T.write(`
319
320
  if (${O}.issues.length) {
320
321
  payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
321
322
  ...iss,
322
- path: iss.path ? [${V}, ...iss.path] : [${V}]
323
+ path: iss.path ? [${D}, ...iss.path] : [${D}]
323
324
  })));
324
325
  }
325
326
 
326
327
  if (${O}.value === undefined) {
327
- if (${V} in input) {
328
- newResult[${V}] = undefined;
328
+ if (${D} in input) {
329
+ newResult[${D}] = undefined;
329
330
  }
330
331
  } else {
331
- newResult[${V}] = ${O}.value;
332
+ newResult[${D}] = ${O}.value;
332
333
  }
333
334
 
334
- `)}T.write("payload.value = newResult;"),T.write("return payload;");let K=T.compile();return(W,O)=>K(q,W,O)},g,z=c6,v=!pI.jitless,N=v&&Nz.value,X=I.catchall,G;$._zod.parse=(q,T)=>{G??(G=_.value);let H=q.value;if(!z(H))return q.issues.push({expected:"object",code:"invalid_type",input:H,inst:$}),q;if(v&&N&&T?.async===!1&&T.jitless!==!0){if(!g)g=u(I.shape);if(q=g(q,T),!X)return q;return c5([],H,q,T,G,$)}return U(q,T)}});function w5($,I,U,_){for(let g of $)if(g.issues.length===0)return I.value=g.value,I;let u=$.filter((g)=>!V6(g));if(u.length===1)return I.value=u[0].value,u[0];return I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:$.map((g)=>g.issues.map((z)=>o$(z,_,R$())))}),I}var J0=D("$ZodUnion",($,I)=>{l.init($,I),p($._zod,"optin",()=>I.options.some((u)=>u._zod.optin==="optional")?"optional":void 0),p($._zod,"optout",()=>I.options.some((u)=>u._zod.optout==="optional")?"optional":void 0),p($._zod,"values",()=>{if(I.options.every((u)=>u._zod.values))return new Set(I.options.flatMap((u)=>Array.from(u._zod.values)));return}),p($._zod,"pattern",()=>{if(I.options.every((u)=>u._zod.pattern)){let u=I.options.map((g)=>g._zod.pattern);return new RegExp(`^(${u.map((g)=>aI(g.source)).join("|")})$`)}return});let U=I.options.length===1,_=I.options[0]._zod.run;$._zod.parse=(u,g)=>{if(U)return _(u,g);let z=!1,v=[];for(let J of I.options){let N=J._zod.run({value:u.value,issues:[]},g);if(N instanceof Promise)v.push(N),z=!0;else{if(N.issues.length===0)return N;v.push(N)}}if(!z)return w5(v,u,$,g);return Promise.all(v).then((J)=>{return w5(J,u,$,g)})}});function E5($,I,U,_){let u=$.filter((g)=>g.issues.length===0);if(u.length===1)return I.value=u[0].value,I;if(u.length===0)I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:$.map((g)=>g.issues.map((z)=>o$(z,_,R$())))});else I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:[],inclusive:!1});return I}var av=D("$ZodXor",($,I)=>{J0.init($,I),I.inclusive=!1;let U=I.options.length===1,_=I.options[0]._zod.run;$._zod.parse=(u,g)=>{if(U)return _(u,g);let z=!1,v=[];for(let J of I.options){let N=J._zod.run({value:u.value,issues:[]},g);if(N instanceof Promise)v.push(N),z=!0;else v.push(N)}if(!z)return E5(v,u,$,g);return Promise.all(v).then((J)=>{return E5(J,u,$,g)})}}),ev=D("$ZodDiscriminatedUnion",($,I)=>{I.inclusive=!1,J0.init($,I);let U=$._zod.parse;p($._zod,"propValues",()=>{let u={};for(let g of I.options){let z=g._zod.propValues;if(!z||Object.keys(z).length===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(g)}"`);for(let[v,J]of Object.entries(z)){if(!u[v])u[v]=new Set;for(let N of J)u[v].add(N)}}return u});let _=S1(()=>{let u=I.options,g=new Map;for(let z of u){let v=z._zod.propValues?.[I.discriminator];if(!v||v.size===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(z)}"`);for(let J of v){if(g.has(J))throw Error(`Duplicate discriminator value "${String(J)}"`);g.set(J,z)}}return g});$._zod.parse=(u,g)=>{let z=u.value;if(!c6(z))return u.issues.push({code:"invalid_type",expected:"object",input:z,inst:$}),u;let v=_.value.get(z?.[I.discriminator]);if(v)return v._zod.run(u,g);if(I.unionFallback)return U(u,g);return u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:I.discriminator,input:z,path:[I.discriminator],inst:$}),u}}),sv=D("$ZodIntersection",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value,g=I.left._zod.run({value:u,issues:[]},_),z=I.right._zod.run({value:u,issues:[]},_);if(g instanceof Promise||z instanceof Promise)return Promise.all([g,z]).then(([J,N])=>{return C5(U,J,N)});return C5(U,g,z)}});function qv($,I){if($===I)return{valid:!0,data:$};if($ instanceof Date&&I instanceof Date&&+$===+I)return{valid:!0,data:$};if(D6($)&&D6(I)){let U=Object.keys(I),_=Object.keys($).filter((g)=>U.indexOf(g)!==-1),u={...$,...I};for(let g of _){let z=qv($[g],I[g]);if(!z.valid)return{valid:!1,mergeErrorPath:[g,...z.mergeErrorPath]};u[g]=z.data}return{valid:!0,data:u}}if(Array.isArray($)&&Array.isArray(I)){if($.length!==I.length)return{valid:!1,mergeErrorPath:[]};let U=[];for(let _=0;_<$.length;_++){let u=$[_],g=I[_],z=qv(u,g);if(!z.valid)return{valid:!1,mergeErrorPath:[_,...z.mergeErrorPath]};U.push(z.data)}return{valid:!0,data:U}}return{valid:!1,mergeErrorPath:[]}}function C5($,I,U){let _=new Map,u;for(let v of I.issues)if(v.code==="unrecognized_keys"){u??(u=v);for(let J of v.keys){if(!_.has(J))_.set(J,{});_.get(J).l=!0}}else $.issues.push(v);for(let v of U.issues)if(v.code==="unrecognized_keys")for(let J of v.keys){if(!_.has(J))_.set(J,{});_.get(J).r=!0}else $.issues.push(v);let g=[..._].filter(([,v])=>v.l&&v.r).map(([v])=>v);if(g.length&&u)$.issues.push({...u,keys:g});if(V6($))return $;let z=qv(I.value,U.value);if(!z.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(z.mergeErrorPath)}`);return $.value=z.data,$}var HU=D("$ZodTuple",($,I)=>{l.init($,I);let U=I.items;$._zod.parse=(_,u)=>{let g=_.value;if(!Array.isArray(g))return _.issues.push({input:g,inst:$,expected:"tuple",code:"invalid_type"}),_;_.value=[];let z=[],v=[...U].reverse().findIndex((X)=>X._zod.optin!=="optional"),J=v===-1?0:U.length-v;if(!I.rest){let X=g.length>U.length,G=g.length<J-1;if(X||G)return _.issues.push({...X?{code:"too_big",maximum:U.length,inclusive:!0}:{code:"too_small",minimum:U.length},input:g,inst:$,origin:"array"}),_}let N=-1;for(let X of U){if(N++,N>=g.length){if(N>=J)continue}let G=X._zod.run({value:g[N],issues:[]},u);if(G instanceof Promise)z.push(G.then((q)=>JU(q,_,N)));else JU(G,_,N)}if(I.rest){let X=g.slice(U.length);for(let G of X){N++;let q=I.rest._zod.run({value:G,issues:[]},u);if(q instanceof Promise)z.push(q.then((T)=>JU(T,_,N)));else JU(q,_,N)}}if(z.length)return Promise.all(z).then(()=>_);return _}});function JU($,I,U){if($.issues.length)I.issues.push(...I4(U,$.issues));I.value[U]=$.value}var $J=D("$ZodRecord",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!D6(u))return U.issues.push({expected:"record",code:"invalid_type",input:u,inst:$}),U;let g=[],z=I.keyType._zod.values;if(z){U.value={};let v=new Set;for(let N of z)if(typeof N==="string"||typeof N==="number"||typeof N==="symbol"){v.add(typeof N==="number"?N.toString():N);let X=I.valueType._zod.run({value:u[N],issues:[]},_);if(X instanceof Promise)g.push(X.then((G)=>{if(G.issues.length)U.issues.push(...I4(N,G.issues));U.value[N]=G.value}));else{if(X.issues.length)U.issues.push(...I4(N,X.issues));U.value[N]=X.value}}let J;for(let N in u)if(!v.has(N))J=J??[],J.push(N);if(J&&J.length>0)U.issues.push({code:"unrecognized_keys",input:u,inst:$,keys:J})}else{U.value={};for(let v of Reflect.ownKeys(u)){if(v==="__proto__")continue;let J=I.keyType._zod.run({value:v,issues:[]},_);if(J instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof v==="string"&&_0.test(v)&&J.issues.length){let G=I.keyType._zod.run({value:Number(v),issues:[]},_);if(G instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(G.issues.length===0)J=G}if(J.issues.length){if(I.mode==="loose")U.value[v]=u[v];else U.issues.push({code:"invalid_key",origin:"record",issues:J.issues.map((G)=>o$(G,_,R$())),input:v,path:[v],inst:$});continue}let X=I.valueType._zod.run({value:u[v],issues:[]},_);if(X instanceof Promise)g.push(X.then((G)=>{if(G.issues.length)U.issues.push(...I4(v,G.issues));U.value[J.value]=G.value}));else{if(X.issues.length)U.issues.push(...I4(v,X.issues));U.value[J.value]=X.value}}}if(g.length)return Promise.all(g).then(()=>U);return U}}),IJ=D("$ZodMap",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!(u instanceof Map))return U.issues.push({expected:"map",code:"invalid_type",input:u,inst:$}),U;let g=[];U.value=new Map;for(let[z,v]of u){let J=I.keyType._zod.run({value:z,issues:[]},_),N=I.valueType._zod.run({value:v,issues:[]},_);if(J instanceof Promise||N instanceof Promise)g.push(Promise.all([J,N]).then(([X,G])=>{f5(X,G,U,z,u,$,_)}));else f5(J,N,U,z,u,$,_)}if(g.length)return Promise.all(g).then(()=>U);return U}});function f5($,I,U,_,u,g,z){if($.issues.length)if(eI.has(typeof _))U.issues.push(...I4(_,$.issues));else U.issues.push({code:"invalid_key",origin:"map",input:u,inst:g,issues:$.issues.map((v)=>o$(v,z,R$()))});if(I.issues.length)if(eI.has(typeof _))U.issues.push(...I4(_,I.issues));else U.issues.push({origin:"map",code:"invalid_element",input:u,inst:g,key:_,issues:I.issues.map((v)=>o$(v,z,R$()))});U.value.set($.value,I.value)}var uJ=D("$ZodSet",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!(u instanceof Set))return U.issues.push({input:u,inst:$,expected:"set",code:"invalid_type"}),U;let g=[];U.value=new Set;for(let z of u){let v=I.valueType._zod.run({value:z,issues:[]},_);if(v instanceof Promise)g.push(v.then((J)=>x5(J,U)));else x5(v,U)}if(g.length)return Promise.all(g).then(()=>U);return U}});function x5($,I){if($.issues.length)I.issues.push(...$.issues);I.value.add($.value)}var UJ=D("$ZodEnum",($,I)=>{l.init($,I);let U=tI(I.entries),_=new Set(U);$._zod.values=_,$._zod.pattern=new RegExp(`^(${U.filter((u)=>eI.has(typeof u)).map((u)=>typeof u==="string"?q4(u):u.toString()).join("|")})$`),$._zod.parse=(u,g)=>{let z=u.value;if(_.has(z))return u;return u.issues.push({code:"invalid_value",values:U,input:z,inst:$}),u}}),_J=D("$ZodLiteral",($,I)=>{if(l.init($,I),I.values.length===0)throw Error("Cannot create literal schema with no valid values");let U=new Set(I.values);$._zod.values=U,$._zod.pattern=new RegExp(`^(${I.values.map((_)=>typeof _==="string"?q4(_):_?q4(_.toString()):String(_)).join("|")})$`),$._zod.parse=(_,u)=>{let g=_.value;if(U.has(g))return _;return _.issues.push({code:"invalid_value",values:I.values,input:g,inst:$}),_}}),gJ=D("$ZodFile",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(u instanceof File)return U;return U.issues.push({expected:"file",code:"invalid_type",input:u,inst:$}),U}}),zJ=D("$ZodTransform",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new h6($.constructor.name);let u=I.transform(U.value,U);if(_.async)return(u instanceof Promise?u:Promise.resolve(u)).then((z)=>{return U.value=z,U});if(u instanceof Promise)throw new S4;return U.value=u,U}});function k5($,I){if($.issues.length&&I===void 0)return{issues:[],value:void 0};return $}var YU=D("$ZodOptional",($,I)=>{l.init($,I),$._zod.optin="optional",$._zod.optout="optional",p($._zod,"values",()=>{return I.innerType._zod.values?new Set([...I.innerType._zod.values,void 0]):void 0}),p($._zod,"pattern",()=>{let U=I.innerType._zod.pattern;return U?new RegExp(`^(${aI(U.source)})?$`):void 0}),$._zod.parse=(U,_)=>{if(I.innerType._zod.optin==="optional"){let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>k5(g,U.value));return k5(u,U.value)}if(U.value===void 0)return U;return I.innerType._zod.run(U,_)}}),vJ=D("$ZodExactOptional",($,I)=>{YU.init($,I),p($._zod,"values",()=>I.innerType._zod.values),p($._zod,"pattern",()=>I.innerType._zod.pattern),$._zod.parse=(U,_)=>{return I.innerType._zod.run(U,_)}}),JJ=D("$ZodNullable",($,I)=>{l.init($,I),p($._zod,"optin",()=>I.innerType._zod.optin),p($._zod,"optout",()=>I.innerType._zod.optout),p($._zod,"pattern",()=>{let U=I.innerType._zod.pattern;return U?new RegExp(`^(${aI(U.source)}|null)$`):void 0}),p($._zod,"values",()=>{return I.innerType._zod.values?new Set([...I.innerType._zod.values,null]):void 0}),$._zod.parse=(U,_)=>{if(U.value===null)return U;return I.innerType._zod.run(U,_)}}),NJ=D("$ZodDefault",($,I)=>{l.init($,I),$._zod.optin="optional",p($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(U,_)=>{if(_.direction==="backward")return I.innerType._zod.run(U,_);if(U.value===void 0)return U.value=I.defaultValue,U;let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>y5(g,I));return y5(u,I)}});function y5($,I){if($.value===void 0)$.value=I.defaultValue;return $}var GJ=D("$ZodPrefault",($,I)=>{l.init($,I),$._zod.optin="optional",p($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(U,_)=>{if(_.direction==="backward")return I.innerType._zod.run(U,_);if(U.value===void 0)U.value=I.defaultValue;return I.innerType._zod.run(U,_)}}),XJ=D("$ZodNonOptional",($,I)=>{l.init($,I),p($._zod,"values",()=>{let U=I.innerType._zod.values;return U?new Set([...U].filter((_)=>_!==void 0)):void 0}),$._zod.parse=(U,_)=>{let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>i5(g,$));return i5(u,$)}});function i5($,I){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:I});return $}var qJ=D("$ZodSuccess",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new h6("ZodSuccess");let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>{return U.value=g.issues.length===0,U});return U.value=u.issues.length===0,U}}),QJ=D("$ZodCatch",($,I)=>{l.init($,I),p($._zod,"optin",()=>I.innerType._zod.optin),p($._zod,"optout",()=>I.innerType._zod.optout),p($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(U,_)=>{if(_.direction==="backward")return I.innerType._zod.run(U,_);let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>{if(U.value=g.value,g.issues.length)U.value=I.catchValue({...U,error:{issues:g.issues.map((z)=>o$(z,_,R$()))},input:U.value}),U.issues=[];return U});if(U.value=u.value,u.issues.length)U.value=I.catchValue({...U,error:{issues:u.issues.map((g)=>o$(g,_,R$()))},input:U.value}),U.issues=[];return U}}),TJ=D("$ZodNaN",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{if(typeof U.value!=="number"||!Number.isNaN(U.value))return U.issues.push({input:U.value,inst:$,expected:"nan",code:"invalid_type"}),U;return U}}),HJ=D("$ZodPipe",($,I)=>{l.init($,I),p($._zod,"values",()=>I.in._zod.values),p($._zod,"optin",()=>I.in._zod.optin),p($._zod,"optout",()=>I.out._zod.optout),p($._zod,"propValues",()=>I.in._zod.propValues),$._zod.parse=(U,_)=>{if(_.direction==="backward"){let g=I.out._zod.run(U,_);if(g instanceof Promise)return g.then((z)=>NU(z,I.in,_));return NU(g,I.in,_)}let u=I.in._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>NU(g,I.out,_));return NU(u,I.out,_)}});function NU($,I,U){if($.issues.length)return $.aborted=!0,$;return I._zod.run({value:$.value,issues:$.issues},U)}var N0=D("$ZodCodec",($,I)=>{l.init($,I),p($._zod,"values",()=>I.in._zod.values),p($._zod,"optin",()=>I.in._zod.optin),p($._zod,"optout",()=>I.out._zod.optout),p($._zod,"propValues",()=>I.in._zod.propValues),$._zod.parse=(U,_)=>{if((_.direction||"forward")==="forward"){let g=I.in._zod.run(U,_);if(g instanceof Promise)return g.then((z)=>GU(z,I,_));return GU(g,I,_)}else{let g=I.out._zod.run(U,_);if(g instanceof Promise)return g.then((z)=>GU(z,I,_));return GU(g,I,_)}}});function GU($,I,U){if($.issues.length)return $.aborted=!0,$;if((U.direction||"forward")==="forward"){let u=I.transform($.value,$);if(u instanceof Promise)return u.then((g)=>XU($,g,I.out,U));return XU($,u,I.out,U)}else{let u=I.reverseTransform($.value,$);if(u instanceof Promise)return u.then((g)=>XU($,g,I.in,U));return XU($,u,I.in,U)}}function XU($,I,U,_){if($.issues.length)return $.aborted=!0,$;return U._zod.run({value:I,issues:$.issues},_)}var YJ=D("$ZodReadonly",($,I)=>{l.init($,I),p($._zod,"propValues",()=>I.innerType._zod.propValues),p($._zod,"values",()=>I.innerType._zod.values),p($._zod,"optin",()=>I.innerType?._zod?.optin),p($._zod,"optout",()=>I.innerType?._zod?.optout),$._zod.parse=(U,_)=>{if(_.direction==="backward")return I.innerType._zod.run(U,_);let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then(n5);return n5(u)}});function n5($){return $.value=Object.freeze($.value),$}var OJ=D("$ZodTemplateLiteral",($,I)=>{l.init($,I);let U=[];for(let _ of I.parts)if(typeof _==="object"&&_!==null){if(!_._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[..._._zod.traits].shift()}`);let u=_._zod.pattern instanceof RegExp?_._zod.pattern.source:_._zod.pattern;if(!u)throw Error(`Invalid template literal part: ${_._zod.traits}`);let g=u.startsWith("^")?1:0,z=u.endsWith("$")?u.length-1:u.length;U.push(u.slice(g,z))}else if(_===null||Xz.has(typeof _))U.push(q4(`${_}`));else throw Error(`Invalid template literal part: ${_}`);$._zod.pattern=new RegExp(`^${U.join("")}$`),$._zod.parse=(_,u)=>{if(typeof _.value!=="string")return _.issues.push({input:_.value,inst:$,expected:"string",code:"invalid_type"}),_;if($._zod.pattern.lastIndex=0,!$._zod.pattern.test(_.value))return _.issues.push({input:_.value,inst:$,code:"invalid_format",format:I.format??"template_literal",pattern:$._zod.pattern.source}),_;return _}}),DJ=D("$ZodFunction",($,I)=>{return l.init($,I),$._def=I,$._zod.def=I,$.implement=(U)=>{if(typeof U!=="function")throw Error("implement() must be called with a function");return function(..._){let u=$._def.input?pu($._def.input,_):_,g=Reflect.apply(U,this,u);if($._def.output)return pu($._def.output,g);return g}},$.implementAsync=(U)=>{if(typeof U!=="function")throw Error("implementAsync() must be called with a function");return async function(..._){let u=$._def.input?await ou($._def.input,_):_,g=await Reflect.apply(U,this,u);if($._def.output)return await ou($._def.output,g);return g}},$._zod.parse=(U,_)=>{if(typeof U.value!=="function")return U.issues.push({code:"invalid_type",expected:"function",input:U.value,inst:$}),U;if($._def.output&&$._def.output._zod.def.type==="promise")U.value=$.implementAsync(U.value);else U.value=$.implement(U.value);return U},$.input=(...U)=>{let _=$.constructor;if(Array.isArray(U[0]))return new _({type:"function",input:new HU({type:"tuple",items:U[0],rest:U[1]}),output:$._def.output});return new _({type:"function",input:U[0],output:$._def.output})},$.output=(U)=>{return new $.constructor({type:"function",input:$._def.input,output:U})},$}),VJ=D("$ZodPromise",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{return Promise.resolve(U.value).then((u)=>I.innerType._zod.run({value:u,issues:[]},_))}}),BJ=D("$ZodLazy",($,I)=>{l.init($,I),p($._zod,"innerType",()=>I.getter()),p($._zod,"pattern",()=>$._zod.innerType?._zod?.pattern),p($._zod,"propValues",()=>$._zod.innerType?._zod?.propValues),p($._zod,"optin",()=>$._zod.innerType?._zod?.optin??void 0),p($._zod,"optout",()=>$._zod.innerType?._zod?.optout??void 0),$._zod.parse=(U,_)=>{return $._zod.innerType._zod.run(U,_)}}),MJ=D("$ZodCustom",($,I)=>{G$.init($,I),l.init($,I),$._zod.parse=(U,_)=>{return U},$._zod.check=(U)=>{let _=U.value,u=I.fn(_);if(u instanceof Promise)return u.then((g)=>r5(g,U,_,$));r5(u,U,_,$);return}});function r5($,I,U,_){if(!$){let u={code:"custom",input:U,inst:_,path:[..._._zod.def.path??[]],continue:!_._zod.def.abort};if(_._zod.def.params)u.params=_._zod.def.params;I.issues.push(w1(u))}}var T0={};O4(T0,{zhTW:()=>qN,zhCN:()=>XN,yo:()=>QN,vi:()=>GN,uz:()=>NN,ur:()=>JN,uk:()=>Q0,ua:()=>vN,tr:()=>zN,th:()=>gN,ta:()=>_N,sv:()=>UN,sl:()=>uN,ru:()=>IN,pt:()=>$N,ps:()=>eJ,pl:()=>sJ,ota:()=>aJ,no:()=>tJ,nl:()=>oJ,ms:()=>pJ,mk:()=>dJ,lt:()=>cJ,ko:()=>hJ,km:()=>X0,kh:()=>mJ,ka:()=>lJ,ja:()=>rJ,it:()=>nJ,is:()=>iJ,id:()=>yJ,hy:()=>kJ,hu:()=>xJ,he:()=>fJ,frCA:()=>CJ,fr:()=>EJ,fi:()=>wJ,fa:()=>SJ,es:()=>FJ,eo:()=>jJ,en:()=>G0,de:()=>bJ,da:()=>AJ,cs:()=>ZJ,ca:()=>WJ,bg:()=>PJ,be:()=>LJ,az:()=>KJ,ar:()=>RJ});var nA=()=>{let $={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function I(u){return $[u]??null}let U={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${u.expected}، ولكن تم إدخال ${v}`;return`مدخلات غير مقبولة: يفترض إدخال ${g}، ولكن تم إدخال ${v}`}case"invalid_value":if(u.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${j(u.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return` أكبر من اللازم: يفترض أن تكون ${u.origin??"القيمة"} ${g} ${u.maximum.toString()} ${z.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${u.origin??"القيمة"} ${g} ${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`أصغر من اللازم: يفترض لـ ${u.origin} أن يكون ${g} ${u.minimum.toString()} ${z.unit}`;return`أصغر من اللازم: يفترض لـ ${u.origin} أن يكون ${g} ${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${u.prefix}"`;if(g.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${g.suffix}"`;if(g.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${g.includes}"`;if(g.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${g.pattern}`;return`${U[g.format]??u.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${u.divisor}`;case"unrecognized_keys":return`معرف${u.keys.length>1?"ات":""} غريب${u.keys.length>1?"ة":""}: ${P(u.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${u.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${u.origin}`;default:return"مدخل غير مقبول"}}};function RJ(){return{localeError:nA()}}var rA=()=>{let $={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function I(u){return $[u]??null}let U={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Yanlış dəyər: gözlənilən instanceof ${u.expected}, daxil olan ${v}`;return`Yanlış dəyər: gözlənilən ${g}, daxil olan ${v}`}case"invalid_value":if(u.values.length===1)return`Yanlış dəyər: gözlənilən ${j(u.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Çox böyük: gözlənilən ${u.origin??"dəyər"} ${g}${u.maximum.toString()} ${z.unit??"element"}`;return`Çox böyük: gözlənilən ${u.origin??"dəyər"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Çox kiçik: gözlənilən ${u.origin} ${g}${u.minimum.toString()} ${z.unit}`;return`Çox kiçik: gözlənilən ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Yanlış mətn: "${g.prefix}" ilə başlamalıdır`;if(g.format==="ends_with")return`Yanlış mətn: "${g.suffix}" ilə bitməlidir`;if(g.format==="includes")return`Yanlış mətn: "${g.includes}" daxil olmalıdır`;if(g.format==="regex")return`Yanlış mətn: ${g.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${U[g.format]??u.format}`}case"not_multiple_of":return`Yanlış ədəd: ${u.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${u.keys.length>1?"lar":""}: ${P(u.keys,", ")}`;case"invalid_key":return`${u.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${u.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function KJ(){return{localeError:rA()}}function p5($,I,U,_){let u=Math.abs($),g=u%10,z=u%100;if(z>=11&&z<=19)return _;if(g===1)return I;if(g>=2&&g<=4)return U;return _}var lA=()=>{let $={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function I(u){return $[u]??null}let U={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},_={nan:"NaN",number:"лік",array:"масіў"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Няправільны ўвод: чакаўся instanceof ${u.expected}, атрымана ${v}`;return`Няправільны ўвод: чакаўся ${g}, атрымана ${v}`}case"invalid_value":if(u.values.length===1)return`Няправільны ўвод: чакалася ${j(u.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z){let v=Number(u.maximum),J=p5(v,z.unit.one,z.unit.few,z.unit.many);return`Занадта вялікі: чакалася, што ${u.origin??"значэнне"} павінна ${z.verb} ${g}${u.maximum.toString()} ${J}`}return`Занадта вялікі: чакалася, што ${u.origin??"значэнне"} павінна быць ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z){let v=Number(u.minimum),J=p5(v,z.unit.one,z.unit.few,z.unit.many);return`Занадта малы: чакалася, што ${u.origin} павінна ${z.verb} ${g}${u.minimum.toString()} ${J}`}return`Занадта малы: чакалася, што ${u.origin} павінна быць ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${g.prefix}"`;if(g.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${g.suffix}"`;if(g.format==="includes")return`Няправільны радок: павінен змяшчаць "${g.includes}"`;if(g.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${g.pattern}`;return`Няправільны ${U[g.format]??u.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${u.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${u.keys.length>1?"ключы":"ключ"}: ${P(u.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${u.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${u.origin}`;default:return"Няправільны ўвод"}}};function LJ(){return{localeError:lA()}}var mA=()=>{let $={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function I(u){return $[u]??null}let U={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},_={nan:"NaN",number:"число",array:"масив"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Невалиден вход: очакван instanceof ${u.expected}, получен ${v}`;return`Невалиден вход: очакван ${g}, получен ${v}`}case"invalid_value":if(u.values.length===1)return`Невалиден вход: очакван ${j(u.values[0])}`;return`Невалидна опция: очаквано едно от ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Твърде голямо: очаква се ${u.origin??"стойност"} да съдържа ${g}${u.maximum.toString()} ${z.unit??"елемента"}`;return`Твърде голямо: очаква се ${u.origin??"стойност"} да бъде ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Твърде малко: очаква се ${u.origin} да съдържа ${g}${u.minimum.toString()} ${z.unit}`;return`Твърде малко: очаква се ${u.origin} да бъде ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Невалиден низ: трябва да започва с "${g.prefix}"`;if(g.format==="ends_with")return`Невалиден низ: трябва да завършва с "${g.suffix}"`;if(g.format==="includes")return`Невалиден низ: трябва да включва "${g.includes}"`;if(g.format==="regex")return`Невалиден низ: трябва да съвпада с ${g.pattern}`;let z="Невалиден";if(g.format==="emoji")z="Невалидно";if(g.format==="datetime")z="Невалидно";if(g.format==="date")z="Невалидна";if(g.format==="time")z="Невалидно";if(g.format==="duration")z="Невалидна";return`${z} ${U[g.format]??u.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${u.divisor}`;case"unrecognized_keys":return`Неразпознат${u.keys.length>1?"и":""} ключ${u.keys.length>1?"ове":""}: ${P(u.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${u.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${u.origin}`;default:return"Невалиден вход"}}};function PJ(){return{localeError:mA()}}var hA=()=>{let $={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function I(u){return $[u]??null}let U={regex:"entrada",email:"adreça electrònica",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ça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Tipus invàlid: s'esperava instanceof ${u.expected}, s'ha rebut ${v}`;return`Tipus invàlid: s'esperava ${g}, s'ha rebut ${v}`}case"invalid_value":if(u.values.length===1)return`Valor invàlid: s'esperava ${j(u.values[0])}`;return`Opció invàlida: s'esperava una de ${P(u.values," o ")}`;case"too_big":{let g=u.inclusive?"com a màxim":"menys de",z=I(u.origin);if(z)return`Massa gran: s'esperava que ${u.origin??"el valor"} contingués ${g} ${u.maximum.toString()} ${z.unit??"elements"}`;return`Massa gran: s'esperava que ${u.origin??"el valor"} fos ${g} ${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?"com a mínim":"més de",z=I(u.origin);if(z)return`Massa petit: s'esperava que ${u.origin} contingués ${g} ${u.minimum.toString()} ${z.unit}`;return`Massa petit: s'esperava que ${u.origin} fos ${g} ${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Format invàlid: ha de començar amb "${g.prefix}"`;if(g.format==="ends_with")return`Format invàlid: ha d'acabar amb "${g.suffix}"`;if(g.format==="includes")return`Format invàlid: ha d'incloure "${g.includes}"`;if(g.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${g.pattern}`;return`Format invàlid per a ${U[g.format]??u.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${u.divisor}`;case"unrecognized_keys":return`Clau${u.keys.length>1?"s":""} no reconeguda${u.keys.length>1?"s":""}: ${P(u.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${u.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${u.origin}`;default:return"Entrada invàlida"}}};function WJ(){return{localeError:hA()}}var cA=()=>{let $={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function I(u){return $[u]??null}let U={regex:"regulární výraz",email:"e-mailová 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 čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},_={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Neplatný vstup: očekáváno instanceof ${u.expected}, obdrženo ${v}`;return`Neplatný vstup: očekáváno ${g}, obdrženo ${v}`}case"invalid_value":if(u.values.length===1)return`Neplatný vstup: očekáváno ${j(u.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Hodnota je příliš velká: ${u.origin??"hodnota"} musí mít ${g}${u.maximum.toString()} ${z.unit??"prvků"}`;return`Hodnota je příliš velká: ${u.origin??"hodnota"} musí být ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Hodnota je příliš malá: ${u.origin??"hodnota"} musí mít ${g}${u.minimum.toString()} ${z.unit??"prvků"}`;return`Hodnota je příliš malá: ${u.origin??"hodnota"} musí být ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Neplatný řetězec: musí začínat na "${g.prefix}"`;if(g.format==="ends_with")return`Neplatný řetězec: musí končit na "${g.suffix}"`;if(g.format==="includes")return`Neplatný řetězec: musí obsahovat "${g.includes}"`;if(g.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${g.pattern}`;return`Neplatný formát ${U[g.format]??u.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${u.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${P(u.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${u.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${u.origin}`;default:return"Neplatný vstup"}}};function ZJ(){return{localeError:cA()}}var dA=()=>{let $={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function I(u){return $[u]??null}let U={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æt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},_={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ugyldigt input: forventede instanceof ${u.expected}, fik ${v}`;return`Ugyldigt input: forventede ${g}, fik ${v}`}case"invalid_value":if(u.values.length===1)return`Ugyldig værdi: forventede ${j(u.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin),v=_[u.origin]??u.origin;if(z)return`For stor: forventede ${v??"value"} ${z.verb} ${g} ${u.maximum.toString()} ${z.unit??"elementer"}`;return`For stor: forventede ${v??"value"} havde ${g} ${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin),v=_[u.origin]??u.origin;if(z)return`For lille: forventede ${v} ${z.verb} ${g} ${u.minimum.toString()} ${z.unit}`;return`For lille: forventede ${v} havde ${g} ${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ugyldig streng: skal starte med "${g.prefix}"`;if(g.format==="ends_with")return`Ugyldig streng: skal ende med "${g.suffix}"`;if(g.format==="includes")return`Ugyldig streng: skal indeholde "${g.includes}"`;if(g.format==="regex")return`Ugyldig streng: skal matche mønsteret ${g.pattern}`;return`Ugyldig ${U[g.format]??u.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${P(u.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${u.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${u.origin}`;default:return"Ugyldigt input"}}};function AJ(){return{localeError:dA()}}var pA=()=>{let $={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function I(u){return $[u]??null}let U={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},_={nan:"NaN",number:"Zahl",array:"Array"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ungültige Eingabe: erwartet instanceof ${u.expected}, erhalten ${v}`;return`Ungültige Eingabe: erwartet ${g}, erhalten ${v}`}case"invalid_value":if(u.values.length===1)return`Ungültige Eingabe: erwartet ${j(u.values[0])}`;return`Ungültige Option: erwartet eine von ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Zu groß: erwartet, dass ${u.origin??"Wert"} ${g}${u.maximum.toString()} ${z.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${u.origin??"Wert"} ${g}${u.maximum.toString()} ist`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Zu klein: erwartet, dass ${u.origin} ${g}${u.minimum.toString()} ${z.unit} hat`;return`Zu klein: erwartet, dass ${u.origin} ${g}${u.minimum.toString()} ist`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ungültiger String: muss mit "${g.prefix}" beginnen`;if(g.format==="ends_with")return`Ungültiger String: muss mit "${g.suffix}" enden`;if(g.format==="includes")return`Ungültiger String: muss "${g.includes}" enthalten`;if(g.format==="regex")return`Ungültiger String: muss dem Muster ${g.pattern} entsprechen`;return`Ungültig: ${U[g.format]??u.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${u.divisor} sein`;case"unrecognized_keys":return`${u.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${P(u.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${u.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${u.origin}`;default:return"Ungültige Eingabe"}}};function bJ(){return{localeError:pA()}}var oA=()=>{let $={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 I(u){return $[u]??null}let U={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;return`Invalid input: expected ${g}, received ${v}`}case"invalid_value":if(u.values.length===1)return`Invalid input: expected ${j(u.values[0])}`;return`Invalid option: expected one of ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Too big: expected ${u.origin??"value"} to have ${g}${u.maximum.toString()} ${z.unit??"elements"}`;return`Too big: expected ${u.origin??"value"} to be ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Too small: expected ${u.origin} to have ${g}${u.minimum.toString()} ${z.unit}`;return`Too small: expected ${u.origin} to be ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Invalid string: must start with "${g.prefix}"`;if(g.format==="ends_with")return`Invalid string: must end with "${g.suffix}"`;if(g.format==="includes")return`Invalid string: must include "${g.includes}"`;if(g.format==="regex")return`Invalid string: must match pattern ${g.pattern}`;return`Invalid ${U[g.format]??u.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${u.divisor}`;case"unrecognized_keys":return`Unrecognized key${u.keys.length>1?"s":""}: ${P(u.keys,", ")}`;case"invalid_key":return`Invalid key in ${u.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${u.origin}`;default:return"Invalid input"}}};function G0(){return{localeError:oA()}}var tA=()=>{let $={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function I(u){return $[u]??null}let U={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",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ŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},_={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Nevalida enigo: atendiĝis instanceof ${u.expected}, riceviĝis ${v}`;return`Nevalida enigo: atendiĝis ${g}, riceviĝis ${v}`}case"invalid_value":if(u.values.length===1)return`Nevalida enigo: atendiĝis ${j(u.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Tro granda: atendiĝis ke ${u.origin??"valoro"} havu ${g}${u.maximum.toString()} ${z.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${u.origin??"valoro"} havu ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Tro malgranda: atendiĝis ke ${u.origin} havu ${g}${u.minimum.toString()} ${z.unit}`;return`Tro malgranda: atendiĝis ke ${u.origin} estu ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${g.prefix}"`;if(g.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${g.suffix}"`;if(g.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${g.includes}"`;if(g.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${g.pattern}`;return`Nevalida ${U[g.format]??u.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${u.divisor}`;case"unrecognized_keys":return`Nekonata${u.keys.length>1?"j":""} ŝlosilo${u.keys.length>1?"j":""}: ${P(u.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${u.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${u.origin}`;default:return"Nevalida enigo"}}};function jJ(){return{localeError:tA()}}var aA=()=>{let $={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function I(u){return $[u]??null}let U={regex:"entrada",email:"dirección de correo electrónico",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ón ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},_={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Entrada inválida: se esperaba instanceof ${u.expected}, recibido ${v}`;return`Entrada inválida: se esperaba ${g}, recibido ${v}`}case"invalid_value":if(u.values.length===1)return`Entrada inválida: se esperaba ${j(u.values[0])}`;return`Opción inválida: se esperaba una de ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin),v=_[u.origin]??u.origin;if(z)return`Demasiado grande: se esperaba que ${v??"valor"} tuviera ${g}${u.maximum.toString()} ${z.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${v??"valor"} fuera ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin),v=_[u.origin]??u.origin;if(z)return`Demasiado pequeño: se esperaba que ${v} tuviera ${g}${u.minimum.toString()} ${z.unit}`;return`Demasiado pequeño: se esperaba que ${v} fuera ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Cadena inválida: debe comenzar con "${g.prefix}"`;if(g.format==="ends_with")return`Cadena inválida: debe terminar en "${g.suffix}"`;if(g.format==="includes")return`Cadena inválida: debe incluir "${g.includes}"`;if(g.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${g.pattern}`;return`Inválido ${U[g.format]??u.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${u.divisor}`;case"unrecognized_keys":return`Llave${u.keys.length>1?"s":""} desconocida${u.keys.length>1?"s":""}: ${P(u.keys,", ")}`;case"invalid_key":return`Llave inválida en ${_[u.origin]??u.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${_[u.origin]??u.origin}`;default:return"Entrada inválida"}}};function FJ(){return{localeError:aA()}}var eA=()=>{let $={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function I(u){return $[u]??null}let U={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},_={nan:"NaN",number:"عدد",array:"آرایه"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`ورودی نامعتبر: می‌بایست instanceof ${u.expected} می‌بود، ${v} دریافت شد`;return`ورودی نامعتبر: می‌بایست ${g} می‌بود، ${v} دریافت شد`}case"invalid_value":if(u.values.length===1)return`ورودی نامعتبر: می‌بایست ${j(u.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${P(u.values,"|")} می‌بود`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`خیلی بزرگ: ${u.origin??"مقدار"} باید ${g}${u.maximum.toString()} ${z.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${u.origin??"مقدار"} باید ${g}${u.maximum.toString()} باشد`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`خیلی کوچک: ${u.origin} باید ${g}${u.minimum.toString()} ${z.unit} باشد`;return`خیلی کوچک: ${u.origin} باید ${g}${u.minimum.toString()} باشد`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`رشته نامعتبر: باید با "${g.prefix}" شروع شود`;if(g.format==="ends_with")return`رشته نامعتبر: باید با "${g.suffix}" تمام شود`;if(g.format==="includes")return`رشته نامعتبر: باید شامل "${g.includes}" باشد`;if(g.format==="regex")return`رشته نامعتبر: باید با الگوی ${g.pattern} مطابقت داشته باشد`;return`${U[g.format]??u.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${u.divisor} باشد`;case"unrecognized_keys":return`کلید${u.keys.length>1?"های":""} ناشناس: ${P(u.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${u.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${u.origin}`;default:return"ورودی نامعتبر"}}};function SJ(){return{localeError:eA()}}var sA=()=>{let $={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function I(u){return $[u]??null}let U={regex:"säännöllinen lauseke",email:"sähköpostiosoite",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äivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Virheellinen tyyppi: odotettiin instanceof ${u.expected}, oli ${v}`;return`Virheellinen tyyppi: odotettiin ${g}, oli ${v}`}case"invalid_value":if(u.values.length===1)return`Virheellinen syöte: täytyy olla ${j(u.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Liian suuri: ${z.subject} täytyy olla ${g}${u.maximum.toString()} ${z.unit}`.trim();return`Liian suuri: arvon täytyy olla ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Liian pieni: ${z.subject} täytyy olla ${g}${u.minimum.toString()} ${z.unit}`.trim();return`Liian pieni: arvon täytyy olla ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${g.prefix}"`;if(g.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${g.suffix}"`;if(g.format==="includes")return`Virheellinen syöte: täytyy sisältää "${g.includes}"`;if(g.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${g.pattern}`;return`Virheellinen ${U[g.format]??u.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${u.divisor} monikerta`;case"unrecognized_keys":return`${u.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${P(u.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öte"}}};function wJ(){return{localeError:sA()}}var $b=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function I(u){return $[u]??null}let U={regex:"entrée",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ée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},_={nan:"NaN",number:"nombre",array:"tableau"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Entrée invalide : instanceof ${u.expected} attendu, ${v} reçu`;return`Entrée invalide : ${g} attendu, ${v} reçu`}case"invalid_value":if(u.values.length===1)return`Entrée invalide : ${j(u.values[0])} attendu`;return`Option invalide : une valeur parmi ${P(u.values,"|")} attendue`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Trop grand : ${u.origin??"valeur"} doit ${z.verb} ${g}${u.maximum.toString()} ${z.unit??"élément(s)"}`;return`Trop grand : ${u.origin??"valeur"} doit être ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Trop petit : ${u.origin} doit ${z.verb} ${g}${u.minimum.toString()} ${z.unit}`;return`Trop petit : ${u.origin} doit être ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Chaîne invalide : doit commencer par "${g.prefix}"`;if(g.format==="ends_with")return`Chaîne invalide : doit se terminer par "${g.suffix}"`;if(g.format==="includes")return`Chaîne invalide : doit inclure "${g.includes}"`;if(g.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${g.pattern}`;return`${U[g.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${u.divisor}`;case"unrecognized_keys":return`Clé${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${P(u.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${u.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entrée invalide"}}};function EJ(){return{localeError:$b()}}var Ib=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function I(u){return $[u]??null}let U={regex:"entrée",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ée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Entrée invalide : attendu instanceof ${u.expected}, reçu ${v}`;return`Entrée invalide : attendu ${g}, reçu ${v}`}case"invalid_value":if(u.values.length===1)return`Entrée invalide : attendu ${j(u.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"≤":"<",z=I(u.origin);if(z)return`Trop grand : attendu que ${u.origin??"la valeur"} ait ${g}${u.maximum.toString()} ${z.unit}`;return`Trop grand : attendu que ${u.origin??"la valeur"} soit ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?"≥":">",z=I(u.origin);if(z)return`Trop petit : attendu que ${u.origin} ait ${g}${u.minimum.toString()} ${z.unit}`;return`Trop petit : attendu que ${u.origin} soit ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Chaîne invalide : doit commencer par "${g.prefix}"`;if(g.format==="ends_with")return`Chaîne invalide : doit se terminer par "${g.suffix}"`;if(g.format==="includes")return`Chaîne invalide : doit inclure "${g.includes}"`;if(g.format==="regex")return`Chaîne invalide : doit correspondre au motif ${g.pattern}`;return`${U[g.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${u.divisor}`;case"unrecognized_keys":return`Clé${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${P(u.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${u.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entrée invalide"}}};function CJ(){return{localeError:Ib()}}var ub=()=>{let $={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},I={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},U=(N)=>N?$[N]:void 0,_=(N)=>{let X=U(N);if(X)return X.label;return N??$.unknown.label},u=(N)=>`ה${_(N)}`,g=(N)=>{return(U(N)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות"},z=(N)=>{if(!N)return null;return I[N]??null},v={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},J={nan:"NaN"};return(N)=>{switch(N.code){case"invalid_type":{let X=N.expected,G=J[X??""]??_(X),q=S(N.input),T=J[q]??$[q]?.label??q;if(/^[A-Z]/.test(N.expected))return`קלט לא תקין: צריך להיות instanceof ${N.expected}, התקבל ${T}`;return`קלט לא תקין: צריך להיות ${G}, התקבל ${T}`}case"invalid_value":{if(N.values.length===1)return`ערך לא תקין: הערך חייב להיות ${j(N.values[0])}`;let X=N.values.map((T)=>j(T));if(N.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${X[0]} או ${X[1]}`;let G=X[X.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${X.slice(0,-1).join(", ")} או ${G}`}case"too_big":{let X=z(N.origin),G=u(N.origin??"value");if(N.origin==="string")return`${X?.longLabel??"ארוך"} מדי: ${G} צריכה להכיל ${N.maximum.toString()} ${X?.unit??""} ${N.inclusive?"או פחות":"לכל היותר"}`.trim();if(N.origin==="number"){let H=N.inclusive?`קטן או שווה ל-${N.maximum}`:`קטן מ-${N.maximum}`;return`גדול מדי: ${G} צריך להיות ${H}`}if(N.origin==="array"||N.origin==="set"){let H=N.origin==="set"?"צריכה":"צריך",Q=N.inclusive?`${N.maximum} ${X?.unit??""} או פחות`:`פחות מ-${N.maximum} ${X?.unit??""}`;return`גדול מדי: ${G} ${H} להכיל ${Q}`.trim()}let q=N.inclusive?"<=":"<",T=g(N.origin??"value");if(X?.unit)return`${X.longLabel} מדי: ${G} ${T} ${q}${N.maximum.toString()} ${X.unit}`;return`${X?.longLabel??"גדול"} מדי: ${G} ${T} ${q}${N.maximum.toString()}`}case"too_small":{let X=z(N.origin),G=u(N.origin??"value");if(N.origin==="string")return`${X?.shortLabel??"קצר"} מדי: ${G} צריכה להכיל ${N.minimum.toString()} ${X?.unit??""} ${N.inclusive?"או יותר":"לפחות"}`.trim();if(N.origin==="number"){let H=N.inclusive?`גדול או שווה ל-${N.minimum}`:`גדול מ-${N.minimum}`;return`קטן מדי: ${G} צריך להיות ${H}`}if(N.origin==="array"||N.origin==="set"){let H=N.origin==="set"?"צריכה":"צריך";if(N.minimum===1&&N.inclusive){let Y=N.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${G} ${H} להכיל ${Y}`}let Q=N.inclusive?`${N.minimum} ${X?.unit??""} או יותר`:`יותר מ-${N.minimum} ${X?.unit??""}`;return`קטן מדי: ${G} ${H} להכיל ${Q}`.trim()}let q=N.inclusive?">=":">",T=g(N.origin??"value");if(X?.unit)return`${X.shortLabel} מדי: ${G} ${T} ${q}${N.minimum.toString()} ${X.unit}`;return`${X?.shortLabel??"קטן"} מדי: ${G} ${T} ${q}${N.minimum.toString()}`}case"invalid_format":{let X=N;if(X.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${X.prefix}"`;if(X.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${X.suffix}"`;if(X.format==="includes")return`המחרוזת חייבת לכלול "${X.includes}"`;if(X.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${X.pattern}`;let G=v[X.format],q=G?.label??X.format,H=(G?.gender??"m")==="f"?"תקינה":"תקין";return`${q} לא ${H}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${N.divisor}`;case"unrecognized_keys":return`מפתח${N.keys.length>1?"ות":""} לא מזוה${N.keys.length>1?"ים":"ה"}: ${P(N.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${u(N.origin??"array")}`;default:return"קלט לא תקין"}}};function fJ(){return{localeError:ub()}}var Ub=()=>{let $={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function I(u){return $[u]??null}let U={regex:"bemenet",email:"email cím",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őbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},_={nan:"NaN",number:"szám",array:"tömb"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Érvénytelen bemenet: a várt érték instanceof ${u.expected}, a kapott érték ${v}`;return`Érvénytelen bemenet: a várt érték ${g}, a kapott érték ${v}`}case"invalid_value":if(u.values.length===1)return`Érvénytelen bemenet: a várt érték ${j(u.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Túl nagy: ${u.origin??"érték"} mérete túl nagy ${g}${u.maximum.toString()} ${z.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${u.origin??"érték"} túl nagy: ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Túl kicsi: a bemeneti érték ${u.origin} mérete túl kicsi ${g}${u.minimum.toString()} ${z.unit}`;return`Túl kicsi: a bemeneti érték ${u.origin} túl kicsi ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Érvénytelen string: "${g.prefix}" értékkel kell kezdődnie`;if(g.format==="ends_with")return`Érvénytelen string: "${g.suffix}" értékkel kell végződnie`;if(g.format==="includes")return`Érvénytelen string: "${g.includes}" értéket kell tartalmaznia`;if(g.format==="regex")return`Érvénytelen string: ${g.pattern} mintának kell megfelelnie`;return`Érvénytelen ${U[g.format]??u.format}`}case"not_multiple_of":return`Érvénytelen szám: ${u.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${u.keys.length>1?"s":""}: ${P(u.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${u.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${u.origin}`;default:return"Érvénytelen bemenet"}}};function xJ(){return{localeError:Ub()}}function o5($,I,U){return Math.abs($)===1?I:U}function y1($){if(!$)return"";let I=["ա","ե","ը","ի","ո","ու","օ"],U=$[$.length-1];return $+(I.includes(U)?"ն":"ը")}var _b=()=>{let $={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function I(u){return $[u]??null}let U={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},_={nan:"NaN",number:"թիվ",array:"զանգված"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${u.expected}, ստացվել է ${v}`;return`Սխալ մուտքագրում․ սպասվում էր ${g}, ստացվել է ${v}`}case"invalid_value":if(u.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${j(u.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z){let v=Number(u.maximum),J=o5(v,z.unit.one,z.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${y1(u.origin??"արժեք")} կունենա ${g}${u.maximum.toString()} ${J}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${y1(u.origin??"արժեք")} լինի ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z){let v=Number(u.minimum),J=o5(v,z.unit.one,z.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${y1(u.origin)} կունենա ${g}${u.minimum.toString()} ${J}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${y1(u.origin)} լինի ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${g.prefix}"-ով`;if(g.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${g.suffix}"-ով`;if(g.format==="includes")return`Սխալ տող․ պետք է պարունակի "${g.includes}"`;if(g.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${g.pattern} ձևաչափին`;return`Սխալ ${U[g.format]??u.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${u.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${u.keys.length>1?"ներ":""}. ${P(u.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${y1(u.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${y1(u.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function kJ(){return{localeError:_b()}}var gb=()=>{let $={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function I(u){return $[u]??null}let U={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Input tidak valid: diharapkan instanceof ${u.expected}, diterima ${v}`;return`Input tidak valid: diharapkan ${g}, diterima ${v}`}case"invalid_value":if(u.values.length===1)return`Input tidak valid: diharapkan ${j(u.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Terlalu besar: diharapkan ${u.origin??"value"} memiliki ${g}${u.maximum.toString()} ${z.unit??"elemen"}`;return`Terlalu besar: diharapkan ${u.origin??"value"} menjadi ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Terlalu kecil: diharapkan ${u.origin} memiliki ${g}${u.minimum.toString()} ${z.unit}`;return`Terlalu kecil: diharapkan ${u.origin} menjadi ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`String tidak valid: harus dimulai dengan "${g.prefix}"`;if(g.format==="ends_with")return`String tidak valid: harus berakhir dengan "${g.suffix}"`;if(g.format==="includes")return`String tidak valid: harus menyertakan "${g.includes}"`;if(g.format==="regex")return`String tidak valid: harus sesuai pola ${g.pattern}`;return`${U[g.format]??u.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${u.keys.length>1?"s":""}: ${P(u.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${u.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${u.origin}`;default:return"Input tidak valid"}}};function yJ(){return{localeError:gb()}}var zb=()=>{let $={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function I(u){return $[u]??null}let U={regex:"gildi",email:"netfang",url:"vefslóð",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ími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},_={nan:"NaN",number:"númer",array:"fylki"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Rangt gildi: Þú slóst inn ${v} þar sem á að vera instanceof ${u.expected}`;return`Rangt gildi: Þú slóst inn ${v} þar sem á að vera ${g}`}case"invalid_value":if(u.values.length===1)return`Rangt gildi: gert ráð fyrir ${j(u.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Of stórt: gert er ráð fyrir að ${u.origin??"gildi"} hafi ${g}${u.maximum.toString()} ${z.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${u.origin??"gildi"} sé ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Of lítið: gert er ráð fyrir að ${u.origin} hafi ${g}${u.minimum.toString()} ${z.unit}`;return`Of lítið: gert er ráð fyrir að ${u.origin} sé ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ógildur strengur: verður að byrja á "${g.prefix}"`;if(g.format==="ends_with")return`Ógildur strengur: verður að enda á "${g.suffix}"`;if(g.format==="includes")return`Ógildur strengur: verður að innihalda "${g.includes}"`;if(g.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${g.pattern}`;return`Rangt ${U[g.format]??u.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${u.divisor}`;case"unrecognized_keys":return`Óþekkt ${u.keys.length>1?"ir lyklar":"ur lykill"}: ${P(u.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${u.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${u.origin}`;default:return"Rangt gildi"}}};function iJ(){return{localeError:zb()}}var vb=()=>{let $={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function I(u){return $[u]??null}let U={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},_={nan:"NaN",number:"numero",array:"vettore"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Input non valido: atteso instanceof ${u.expected}, ricevuto ${v}`;return`Input non valido: atteso ${g}, ricevuto ${v}`}case"invalid_value":if(u.values.length===1)return`Input non valido: atteso ${j(u.values[0])}`;return`Opzione non valida: atteso uno tra ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Troppo grande: ${u.origin??"valore"} deve avere ${g}${u.maximum.toString()} ${z.unit??"elementi"}`;return`Troppo grande: ${u.origin??"valore"} deve essere ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Troppo piccolo: ${u.origin} deve avere ${g}${u.minimum.toString()} ${z.unit}`;return`Troppo piccolo: ${u.origin} deve essere ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Stringa non valida: deve iniziare con "${g.prefix}"`;if(g.format==="ends_with")return`Stringa non valida: deve terminare con "${g.suffix}"`;if(g.format==="includes")return`Stringa non valida: deve includere "${g.includes}"`;if(g.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${g.pattern}`;return`Invalid ${U[g.format]??u.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${u.divisor}`;case"unrecognized_keys":return`Chiav${u.keys.length>1?"i":"e"} non riconosciut${u.keys.length>1?"e":"a"}: ${P(u.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${u.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${u.origin}`;default:return"Input non valido"}}};function nJ(){return{localeError:vb()}}var Jb=()=>{let $={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function I(u){return $[u]??null}let U={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},_={nan:"NaN",number:"数値",array:"配列"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`無効な入力: instanceof ${u.expected}が期待されましたが、${v}が入力されました`;return`無効な入力: ${g}が期待されましたが、${v}が入力されました`}case"invalid_value":if(u.values.length===1)return`無効な入力: ${j(u.values[0])}が期待されました`;return`無効な選択: ${P(u.values,"、")}のいずれかである必要があります`;case"too_big":{let g=u.inclusive?"以下である":"より小さい",z=I(u.origin);if(z)return`大きすぎる値: ${u.origin??"値"}は${u.maximum.toString()}${z.unit??"要素"}${g}必要があります`;return`大きすぎる値: ${u.origin??"値"}は${u.maximum.toString()}${g}必要があります`}case"too_small":{let g=u.inclusive?"以上である":"より大きい",z=I(u.origin);if(z)return`小さすぎる値: ${u.origin}は${u.minimum.toString()}${z.unit}${g}必要があります`;return`小さすぎる値: ${u.origin}は${u.minimum.toString()}${g}必要があります`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`無効な文字列: "${g.prefix}"で始まる必要があります`;if(g.format==="ends_with")return`無効な文字列: "${g.suffix}"で終わる必要があります`;if(g.format==="includes")return`無効な文字列: "${g.includes}"を含む必要があります`;if(g.format==="regex")return`無効な文字列: パターン${g.pattern}に一致する必要があります`;return`無効な${U[g.format]??u.format}`}case"not_multiple_of":return`無効な数値: ${u.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${u.keys.length>1?"群":""}: ${P(u.keys,"、")}`;case"invalid_key":return`${u.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${u.origin}内の無効な値`;default:return"無効な入力"}}};function rJ(){return{localeError:Jb()}}var Nb=()=>{let $={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function I(u){return $[u]??null}let U={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},_={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${u.expected}, მიღებული ${v}`;return`არასწორი შეყვანა: მოსალოდნელი ${g}, მიღებული ${v}`}case"invalid_value":if(u.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${j(u.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${P(u.values,"|")}-დან`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`ზედმეტად დიდი: მოსალოდნელი ${u.origin??"მნიშვნელობა"} ${z.verb} ${g}${u.maximum.toString()} ${z.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${u.origin??"მნიშვნელობა"} იყოს ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`ზედმეტად პატარა: მოსალოდნელი ${u.origin} ${z.verb} ${g}${u.minimum.toString()} ${z.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${u.origin} იყოს ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`არასწორი სტრინგი: უნდა იწყებოდეს "${g.prefix}"-ით`;if(g.format==="ends_with")return`არასწორი სტრინგი: უნდა მთავრდებოდეს "${g.suffix}"-ით`;if(g.format==="includes")return`არასწორი სტრინგი: უნდა შეიცავდეს "${g.includes}"-ს`;if(g.format==="regex")return`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${g.pattern}`;return`არასწორი ${U[g.format]??u.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${u.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${u.keys.length>1?"ები":"ი"}: ${P(u.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${u.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${u.origin}-ში`;default:return"არასწორი შეყვანა"}}};function lJ(){return{localeError:Nb()}}var Gb=()=>{let $={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function I(u){return $[u]??null}let U={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},_={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${u.expected} ប៉ុន្តែទទួលបាន ${v}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${g} ប៉ុន្តែទទួលបាន ${v}`}case"invalid_value":if(u.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${j(u.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`ធំពេក៖ ត្រូវការ ${u.origin??"តម្លៃ"} ${g} ${u.maximum.toString()} ${z.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${u.origin??"តម្លៃ"} ${g} ${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`តូចពេក៖ ត្រូវការ ${u.origin} ${g} ${u.minimum.toString()} ${z.unit}`;return`តូចពេក៖ ត្រូវការ ${u.origin} ${g} ${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${g.prefix}"`;if(g.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${g.suffix}"`;if(g.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${g.includes}"`;if(g.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${g.pattern}`;return`មិនត្រឹមត្រូវ៖ ${U[g.format]??u.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${u.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${P(u.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${u.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${u.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function X0(){return{localeError:Gb()}}function mJ(){return X0()}var Xb=()=>{let $={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function I(u){return $[u]??null}let U={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`잘못된 입력: 예상 타입은 instanceof ${u.expected}, 받은 타입은 ${v}입니다`;return`잘못된 입력: 예상 타입은 ${g}, 받은 타입은 ${v}입니다`}case"invalid_value":if(u.values.length===1)return`잘못된 입력: 값은 ${j(u.values[0])} 이어야 합니다`;return`잘못된 옵션: ${P(u.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let g=u.inclusive?"이하":"미만",z=g==="미만"?"이어야 합니다":"여야 합니다",v=I(u.origin),J=v?.unit??"요소";if(v)return`${u.origin??"값"}이 너무 큽니다: ${u.maximum.toString()}${J} ${g}${z}`;return`${u.origin??"값"}이 너무 큽니다: ${u.maximum.toString()} ${g}${z}`}case"too_small":{let g=u.inclusive?"이상":"초과",z=g==="이상"?"이어야 합니다":"여야 합니다",v=I(u.origin),J=v?.unit??"요소";if(v)return`${u.origin??"값"}이 너무 작습니다: ${u.minimum.toString()}${J} ${g}${z}`;return`${u.origin??"값"}이 너무 작습니다: ${u.minimum.toString()} ${g}${z}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`잘못된 문자열: "${g.prefix}"(으)로 시작해야 합니다`;if(g.format==="ends_with")return`잘못된 문자열: "${g.suffix}"(으)로 끝나야 합니다`;if(g.format==="includes")return`잘못된 문자열: "${g.includes}"을(를) 포함해야 합니다`;if(g.format==="regex")return`잘못된 문자열: 정규식 ${g.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${U[g.format]??u.format}`}case"not_multiple_of":return`잘못된 숫자: ${u.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${P(u.keys,", ")}`;case"invalid_key":return`잘못된 키: ${u.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${u.origin}`;default:return"잘못된 입력"}}};function hJ(){return{localeError:Xb()}}var q0=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)};function t5($){let I=Math.abs($),U=I%10,_=I%100;if(_>=11&&_<=19||U===0)return"many";if(U===1)return"one";return"few"}var qb=()=>{let $={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function I(u,g,z,v){let J=$[u]??null;if(J===null)return J;return{unit:J.unit[g],verb:J.verb[v][z?"inclusive":"notInclusive"]}}let U={regex:"įvestis",email:"el. pašto 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ė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},_={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Gautas tipas ${v}, o tikėtasi - instanceof ${u.expected}`;return`Gautas tipas ${v}, o tikėtasi - ${g}`}case"invalid_value":if(u.values.length===1)return`Privalo būti ${j(u.values[0])}`;return`Privalo būti vienas iš ${P(u.values,"|")} pasirinkimų`;case"too_big":{let g=_[u.origin]??u.origin,z=I(u.origin,t5(Number(u.maximum)),u.inclusive??!1,"smaller");if(z?.verb)return`${q0(g??u.origin??"reikšmė")} ${z.verb} ${u.maximum.toString()} ${z.unit??"elementų"}`;let v=u.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${q0(g??u.origin??"reikšmė")} turi būti ${v} ${u.maximum.toString()} ${z?.unit}`}case"too_small":{let g=_[u.origin]??u.origin,z=I(u.origin,t5(Number(u.minimum)),u.inclusive??!1,"bigger");if(z?.verb)return`${q0(g??u.origin??"reikšmė")} ${z.verb} ${u.minimum.toString()} ${z.unit??"elementų"}`;let v=u.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${q0(g??u.origin??"reikšmė")} turi būti ${v} ${u.minimum.toString()} ${z?.unit}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Eilutė privalo prasidėti "${g.prefix}"`;if(g.format==="ends_with")return`Eilutė privalo pasibaigti "${g.suffix}"`;if(g.format==="includes")return`Eilutė privalo įtraukti "${g.includes}"`;if(g.format==="regex")return`Eilutė privalo atitikti ${g.pattern}`;return`Neteisingas ${U[g.format]??u.format}`}case"not_multiple_of":return`Skaičius privalo būti ${u.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${u.keys.length>1?"i":"as"} rakt${u.keys.length>1?"ai":"as"}: ${P(u.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let g=_[u.origin]??u.origin;return`${q0(g??u.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function cJ(){return{localeError:qb()}}var Qb=()=>{let $={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function I(u){return $[u]??null}let U={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},_={nan:"NaN",number:"број",array:"низа"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Грешен внес: се очекува instanceof ${u.expected}, примено ${v}`;return`Грешен внес: се очекува ${g}, примено ${v}`}case"invalid_value":if(u.values.length===1)return`Invalid input: expected ${j(u.values[0])}`;return`Грешана опција: се очекува една ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Премногу голем: се очекува ${u.origin??"вредноста"} да има ${g}${u.maximum.toString()} ${z.unit??"елементи"}`;return`Премногу голем: се очекува ${u.origin??"вредноста"} да биде ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Премногу мал: се очекува ${u.origin} да има ${g}${u.minimum.toString()} ${z.unit}`;return`Премногу мал: се очекува ${u.origin} да биде ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Неважечка низа: мора да започнува со "${g.prefix}"`;if(g.format==="ends_with")return`Неважечка низа: мора да завршува со "${g.suffix}"`;if(g.format==="includes")return`Неважечка низа: мора да вклучува "${g.includes}"`;if(g.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${g.pattern}`;return`Invalid ${U[g.format]??u.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${P(u.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${u.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${u.origin}`;default:return"Грешен внес"}}};function dJ(){return{localeError:Qb()}}var Tb=()=>{let $={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function I(u){return $[u]??null}let U={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},_={nan:"NaN",number:"nombor"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Input tidak sah: dijangka instanceof ${u.expected}, diterima ${v}`;return`Input tidak sah: dijangka ${g}, diterima ${v}`}case"invalid_value":if(u.values.length===1)return`Input tidak sah: dijangka ${j(u.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Terlalu besar: dijangka ${u.origin??"nilai"} ${z.verb} ${g}${u.maximum.toString()} ${z.unit??"elemen"}`;return`Terlalu besar: dijangka ${u.origin??"nilai"} adalah ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Terlalu kecil: dijangka ${u.origin} ${z.verb} ${g}${u.minimum.toString()} ${z.unit}`;return`Terlalu kecil: dijangka ${u.origin} adalah ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`String tidak sah: mesti bermula dengan "${g.prefix}"`;if(g.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${g.suffix}"`;if(g.format==="includes")return`String tidak sah: mesti mengandungi "${g.includes}"`;if(g.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${g.pattern}`;return`${U[g.format]??u.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${P(u.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${u.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${u.origin}`;default:return"Input tidak sah"}}};function pJ(){return{localeError:Tb()}}var Hb=()=>{let $={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function I(u){return $[u]??null}let U={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},_={nan:"NaN",number:"getal"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ongeldige invoer: verwacht instanceof ${u.expected}, ontving ${v}`;return`Ongeldige invoer: verwacht ${g}, ontving ${v}`}case"invalid_value":if(u.values.length===1)return`Ongeldige invoer: verwacht ${j(u.values[0])}`;return`Ongeldige optie: verwacht één van ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin),v=u.origin==="date"?"laat":u.origin==="string"?"lang":"groot";if(z)return`Te ${v}: verwacht dat ${u.origin??"waarde"} ${g}${u.maximum.toString()} ${z.unit??"elementen"} ${z.verb}`;return`Te ${v}: verwacht dat ${u.origin??"waarde"} ${g}${u.maximum.toString()} is`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin),v=u.origin==="date"?"vroeg":u.origin==="string"?"kort":"klein";if(z)return`Te ${v}: verwacht dat ${u.origin} ${g}${u.minimum.toString()} ${z.unit} ${z.verb}`;return`Te ${v}: verwacht dat ${u.origin} ${g}${u.minimum.toString()} is`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ongeldige tekst: moet met "${g.prefix}" beginnen`;if(g.format==="ends_with")return`Ongeldige tekst: moet op "${g.suffix}" eindigen`;if(g.format==="includes")return`Ongeldige tekst: moet "${g.includes}" bevatten`;if(g.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${g.pattern}`;return`Ongeldig: ${U[g.format]??u.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${u.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${u.keys.length>1?"s":""}: ${P(u.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${u.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${u.origin}`;default:return"Ongeldige invoer"}}};function oJ(){return{localeError:Hb()}}var Yb=()=>{let $={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function I(u){return $[u]??null}let U={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},_={nan:"NaN",number:"tall",array:"liste"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ugyldig input: forventet instanceof ${u.expected}, fikk ${v}`;return`Ugyldig input: forventet ${g}, fikk ${v}`}case"invalid_value":if(u.values.length===1)return`Ugyldig verdi: forventet ${j(u.values[0])}`;return`Ugyldig valg: forventet en av ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`For stor(t): forventet ${u.origin??"value"} til å ha ${g}${u.maximum.toString()} ${z.unit??"elementer"}`;return`For stor(t): forventet ${u.origin??"value"} til å ha ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`For lite(n): forventet ${u.origin} til å ha ${g}${u.minimum.toString()} ${z.unit}`;return`For lite(n): forventet ${u.origin} til å ha ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ugyldig streng: må starte med "${g.prefix}"`;if(g.format==="ends_with")return`Ugyldig streng: må ende med "${g.suffix}"`;if(g.format==="includes")return`Ugyldig streng: må inneholde "${g.includes}"`;if(g.format==="regex")return`Ugyldig streng: må matche mønsteret ${g.pattern}`;return`Ugyldig ${U[g.format]??u.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${P(u.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${u.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${u.origin}`;default:return"Ugyldig input"}}};function tJ(){return{localeError:Yb()}}var Ob=()=>{let $={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function I(u){return $[u]??null}let U={regex:"giren",email:"epostagâh",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âmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},_={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Fâsit giren: umulan instanceof ${u.expected}, alınan ${v}`;return`Fâsit giren: umulan ${g}, alınan ${v}`}case"invalid_value":if(u.values.length===1)return`Fâsit giren: umulan ${j(u.values[0])}`;return`Fâsit tercih: mûteberler ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Fazla büyük: ${u.origin??"value"}, ${g}${u.maximum.toString()} ${z.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${u.origin??"value"}, ${g}${u.maximum.toString()} olmalıydı.`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Fazla küçük: ${u.origin}, ${g}${u.minimum.toString()} ${z.unit} sahip olmalıydı.`;return`Fazla küçük: ${u.origin}, ${g}${u.minimum.toString()} olmalıydı.`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Fâsit metin: "${g.prefix}" ile başlamalı.`;if(g.format==="ends_with")return`Fâsit metin: "${g.suffix}" ile bitmeli.`;if(g.format==="includes")return`Fâsit metin: "${g.includes}" ihtivâ etmeli.`;if(g.format==="regex")return`Fâsit metin: ${g.pattern} nakşına uymalı.`;return`Fâsit ${U[g.format]??u.format}`}case"not_multiple_of":return`Fâsit sayı: ${u.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${u.keys.length>1?"s":""}: ${P(u.keys,", ")}`;case"invalid_key":return`${u.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${u.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function aJ(){return{localeError:Ob()}}var Db=()=>{let $={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function I(u){return $[u]??null}let U={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},_={nan:"NaN",number:"عدد",array:"ارې"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`ناسم ورودي: باید instanceof ${u.expected} وای, مګر ${v} ترلاسه شو`;return`ناسم ورودي: باید ${g} وای, مګر ${v} ترلاسه شو`}case"invalid_value":if(u.values.length===1)return`ناسم ورودي: باید ${j(u.values[0])} وای`;return`ناسم انتخاب: باید یو له ${P(u.values,"|")} څخه وای`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`ډیر لوی: ${u.origin??"ارزښت"} باید ${g}${u.maximum.toString()} ${z.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${u.origin??"ارزښت"} باید ${g}${u.maximum.toString()} وي`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`ډیر کوچنی: ${u.origin} باید ${g}${u.minimum.toString()} ${z.unit} ولري`;return`ډیر کوچنی: ${u.origin} باید ${g}${u.minimum.toString()} وي`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`ناسم متن: باید د "${g.prefix}" سره پیل شي`;if(g.format==="ends_with")return`ناسم متن: باید د "${g.suffix}" سره پای ته ورسيږي`;if(g.format==="includes")return`ناسم متن: باید "${g.includes}" ولري`;if(g.format==="regex")return`ناسم متن: باید د ${g.pattern} سره مطابقت ولري`;return`${U[g.format]??u.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${u.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${u.keys.length>1?"کلیډونه":"کلیډ"}: ${P(u.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${u.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${u.origin} کې`;default:return"ناسمه ورودي"}}};function eJ(){return{localeError:Db()}}var Vb=()=>{let $={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function I(u){return $[u]??null}let U={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},_={nan:"NaN",number:"liczba",array:"tablica"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${u.expected}, otrzymano ${v}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${g}, otrzymano ${v}`}case"invalid_value":if(u.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${j(u.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Za duża wartość: oczekiwano, że ${u.origin??"wartość"} będzie mieć ${g}${u.maximum.toString()} ${z.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${u.origin??"wartość"} będzie wynosić ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Za mała wartość: oczekiwano, że ${u.origin??"wartość"} będzie mieć ${g}${u.minimum.toString()} ${z.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${u.origin??"wartość"} będzie wynosić ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${g.prefix}"`;if(g.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${g.suffix}"`;if(g.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${g.includes}"`;if(g.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${g.pattern}`;return`Nieprawidłow(y/a/e) ${U[g.format]??u.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${u.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${u.keys.length>1?"s":""}: ${P(u.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${u.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${u.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function sJ(){return{localeError:Vb()}}var Bb=()=>{let $={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function I(u){return $[u]??null}let U={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},_={nan:"NaN",number:"número",null:"nulo"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Tipo inválido: esperado instanceof ${u.expected}, recebido ${v}`;return`Tipo inválido: esperado ${g}, recebido ${v}`}case"invalid_value":if(u.values.length===1)return`Entrada inválida: esperado ${j(u.values[0])}`;return`Opção inválida: esperada uma das ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Muito grande: esperado que ${u.origin??"valor"} tivesse ${g}${u.maximum.toString()} ${z.unit??"elementos"}`;return`Muito grande: esperado que ${u.origin??"valor"} fosse ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Muito pequeno: esperado que ${u.origin} tivesse ${g}${u.minimum.toString()} ${z.unit}`;return`Muito pequeno: esperado que ${u.origin} fosse ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Texto inválido: deve começar com "${g.prefix}"`;if(g.format==="ends_with")return`Texto inválido: deve terminar com "${g.suffix}"`;if(g.format==="includes")return`Texto inválido: deve incluir "${g.includes}"`;if(g.format==="regex")return`Texto inválido: deve corresponder ao padrão ${g.pattern}`;return`${U[g.format]??u.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${u.divisor}`;case"unrecognized_keys":return`Chave${u.keys.length>1?"s":""} desconhecida${u.keys.length>1?"s":""}: ${P(u.keys,", ")}`;case"invalid_key":return`Chave inválida em ${u.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${u.origin}`;default:return"Campo inválido"}}};function $N(){return{localeError:Bb()}}function a5($,I,U,_){let u=Math.abs($),g=u%10,z=u%100;if(z>=11&&z<=19)return _;if(g===1)return I;if(g>=2&&g<=4)return U;return _}var Mb=()=>{let $={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function I(u){return $[u]??null}let U={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},_={nan:"NaN",number:"число",array:"массив"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Неверный ввод: ожидалось instanceof ${u.expected}, получено ${v}`;return`Неверный ввод: ожидалось ${g}, получено ${v}`}case"invalid_value":if(u.values.length===1)return`Неверный ввод: ожидалось ${j(u.values[0])}`;return`Неверный вариант: ожидалось одно из ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z){let v=Number(u.maximum),J=a5(v,z.unit.one,z.unit.few,z.unit.many);return`Слишком большое значение: ожидалось, что ${u.origin??"значение"} будет иметь ${g}${u.maximum.toString()} ${J}`}return`Слишком большое значение: ожидалось, что ${u.origin??"значение"} будет ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z){let v=Number(u.minimum),J=a5(v,z.unit.one,z.unit.few,z.unit.many);return`Слишком маленькое значение: ожидалось, что ${u.origin} будет иметь ${g}${u.minimum.toString()} ${J}`}return`Слишком маленькое значение: ожидалось, что ${u.origin} будет ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Неверная строка: должна начинаться с "${g.prefix}"`;if(g.format==="ends_with")return`Неверная строка: должна заканчиваться на "${g.suffix}"`;if(g.format==="includes")return`Неверная строка: должна содержать "${g.includes}"`;if(g.format==="regex")return`Неверная строка: должна соответствовать шаблону ${g.pattern}`;return`Неверный ${U[g.format]??u.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${u.divisor}`;case"unrecognized_keys":return`Нераспознанн${u.keys.length>1?"ые":"ый"} ключ${u.keys.length>1?"и":""}: ${P(u.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${u.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${u.origin}`;default:return"Неверные входные данные"}}};function IN(){return{localeError:Mb()}}var Rb=()=>{let $={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function I(u){return $[u]??null}let U={regex:"vnos",email:"e-poštni 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 čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},_={nan:"NaN",number:"število",array:"tabela"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Neveljaven vnos: pričakovano instanceof ${u.expected}, prejeto ${v}`;return`Neveljaven vnos: pričakovano ${g}, prejeto ${v}`}case"invalid_value":if(u.values.length===1)return`Neveljaven vnos: pričakovano ${j(u.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Preveliko: pričakovano, da bo ${u.origin??"vrednost"} imelo ${g}${u.maximum.toString()} ${z.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${u.origin??"vrednost"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Premajhno: pričakovano, da bo ${u.origin} imelo ${g}${u.minimum.toString()} ${z.unit}`;return`Premajhno: pričakovano, da bo ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Neveljaven niz: mora se začeti z "${g.prefix}"`;if(g.format==="ends_with")return`Neveljaven niz: mora se končati z "${g.suffix}"`;if(g.format==="includes")return`Neveljaven niz: mora vsebovati "${g.includes}"`;if(g.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${g.pattern}`;return`Neveljaven ${U[g.format]??u.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${u.divisor}`;case"unrecognized_keys":return`Neprepoznan${u.keys.length>1?"i ključi":" ključ"}: ${P(u.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${u.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${u.origin}`;default:return"Neveljaven vnos"}}};function uN(){return{localeError:Rb()}}var Kb=()=>{let $={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function I(u){return $[u]??null}let U={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},_={nan:"NaN",number:"antal",array:"lista"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ogiltig inmatning: förväntat instanceof ${u.expected}, fick ${v}`;return`Ogiltig inmatning: förväntat ${g}, fick ${v}`}case"invalid_value":if(u.values.length===1)return`Ogiltig inmatning: förväntat ${j(u.values[0])}`;return`Ogiltigt val: förväntade en av ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`För stor(t): förväntade ${u.origin??"värdet"} att ha ${g}${u.maximum.toString()} ${z.unit??"element"}`;return`För stor(t): förväntat ${u.origin??"värdet"} att ha ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`För lite(t): förväntade ${u.origin??"värdet"} att ha ${g}${u.minimum.toString()} ${z.unit}`;return`För lite(t): förväntade ${u.origin??"värdet"} att ha ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ogiltig sträng: måste börja med "${g.prefix}"`;if(g.format==="ends_with")return`Ogiltig sträng: måste sluta med "${g.suffix}"`;if(g.format==="includes")return`Ogiltig sträng: måste innehålla "${g.includes}"`;if(g.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${g.pattern}"`;return`Ogiltig(t) ${U[g.format]??u.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${P(u.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${u.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${u.origin??"värdet"}`;default:return"Ogiltig input"}}};function UN(){return{localeError:Kb()}}var Lb=()=>{let $={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function I(u){return $[u]??null}let U={regex:"உள்ளீடு",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 தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},_={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${u.expected}, பெறப்பட்டது ${v}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${g}, பெறப்பட்டது ${v}`}case"invalid_value":if(u.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${j(u.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${P(u.values,"|")} இல் ஒன்று`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${u.origin??"மதிப்பு"} ${g}${u.maximum.toString()} ${z.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${u.origin??"மதிப்பு"} ${g}${u.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${u.origin} ${g}${u.minimum.toString()} ${z.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${u.origin} ${g}${u.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`தவறான சரம்: "${g.prefix}" இல் தொடங்க வேண்டும்`;if(g.format==="ends_with")return`தவறான சரம்: "${g.suffix}" இல் முடிவடைய வேண்டும்`;if(g.format==="includes")return`தவறான சரம்: "${g.includes}" ஐ உள்ளடக்க வேண்டும்`;if(g.format==="regex")return`தவறான சரம்: ${g.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${U[g.format]??u.format}`}case"not_multiple_of":return`தவறான எண்: ${u.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${u.keys.length>1?"கள்":""}: ${P(u.keys,", ")}`;case"invalid_key":return`${u.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${u.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function _N(){return{localeError:Lb()}}var Pb=()=>{let $={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function I(u){return $[u]??null}let U={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},_={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${u.expected} แต่ได้รับ ${v}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${g} แต่ได้รับ ${v}`}case"invalid_value":if(u.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${j(u.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"ไม่เกิน":"น้อยกว่า",z=I(u.origin);if(z)return`เกินกำหนด: ${u.origin??"ค่า"} ควรมี${g} ${u.maximum.toString()} ${z.unit??"รายการ"}`;return`เกินกำหนด: ${u.origin??"ค่า"} ควรมี${g} ${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?"อย่างน้อย":"มากกว่า",z=I(u.origin);if(z)return`น้อยกว่ากำหนด: ${u.origin} ควรมี${g} ${u.minimum.toString()} ${z.unit}`;return`น้อยกว่ากำหนด: ${u.origin} ควรมี${g} ${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${g.prefix}"`;if(g.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${g.suffix}"`;if(g.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${g.includes}" อยู่ในข้อความ`;if(g.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${g.pattern}`;return`รูปแบบไม่ถูกต้อง: ${U[g.format]??u.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${u.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${P(u.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${u.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${u.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function gN(){return{localeError:Pb()}}var Wb=()=>{let $={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function I(u){return $[u]??null}let U={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üre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Geçersiz değer: beklenen instanceof ${u.expected}, alınan ${v}`;return`Geçersiz değer: beklenen ${g}, alınan ${v}`}case"invalid_value":if(u.values.length===1)return`Geçersiz değer: beklenen ${j(u.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Çok büyük: beklenen ${u.origin??"değer"} ${g}${u.maximum.toString()} ${z.unit??"öğe"}`;return`Çok büyük: beklenen ${u.origin??"değer"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Çok küçük: beklenen ${u.origin} ${g}${u.minimum.toString()} ${z.unit}`;return`Çok küçük: beklenen ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Geçersiz metin: "${g.prefix}" ile başlamalı`;if(g.format==="ends_with")return`Geçersiz metin: "${g.suffix}" ile bitmeli`;if(g.format==="includes")return`Geçersiz metin: "${g.includes}" içermeli`;if(g.format==="regex")return`Geçersiz metin: ${g.pattern} desenine uymalı`;return`Geçersiz ${U[g.format]??u.format}`}case"not_multiple_of":return`Geçersiz sayı: ${u.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${u.keys.length>1?"lar":""}: ${P(u.keys,", ")}`;case"invalid_key":return`${u.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${u.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function zN(){return{localeError:Wb()}}var Zb=()=>{let $={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function I(u){return $[u]??null}let U={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},_={nan:"NaN",number:"число",array:"масив"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Неправильні вхідні дані: очікується instanceof ${u.expected}, отримано ${v}`;return`Неправильні вхідні дані: очікується ${g}, отримано ${v}`}case"invalid_value":if(u.values.length===1)return`Неправильні вхідні дані: очікується ${j(u.values[0])}`;return`Неправильна опція: очікується одне з ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Занадто велике: очікується, що ${u.origin??"значення"} ${z.verb} ${g}${u.maximum.toString()} ${z.unit??"елементів"}`;return`Занадто велике: очікується, що ${u.origin??"значення"} буде ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Занадто мале: очікується, що ${u.origin} ${z.verb} ${g}${u.minimum.toString()} ${z.unit}`;return`Занадто мале: очікується, що ${u.origin} буде ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Неправильний рядок: повинен починатися з "${g.prefix}"`;if(g.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${g.suffix}"`;if(g.format==="includes")return`Неправильний рядок: повинен містити "${g.includes}"`;if(g.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${g.pattern}`;return`Неправильний ${U[g.format]??u.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${u.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${u.keys.length>1?"і":""}: ${P(u.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${u.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${u.origin}`;default:return"Неправильні вхідні дані"}}};function Q0(){return{localeError:Zb()}}function vN(){return Q0()}var Ab=()=>{let $={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function I(u){return $[u]??null}let U={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},_={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`غلط ان پٹ: instanceof ${u.expected} متوقع تھا، ${v} موصول ہوا`;return`غلط ان پٹ: ${g} متوقع تھا، ${v} موصول ہوا`}case"invalid_value":if(u.values.length===1)return`غلط ان پٹ: ${j(u.values[0])} متوقع تھا`;return`غلط آپشن: ${P(u.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`بہت بڑا: ${u.origin??"ویلیو"} کے ${g}${u.maximum.toString()} ${z.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${u.origin??"ویلیو"} کا ${g}${u.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`بہت چھوٹا: ${u.origin} کے ${g}${u.minimum.toString()} ${z.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${u.origin} کا ${g}${u.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`غلط سٹرنگ: "${g.prefix}" سے شروع ہونا چاہیے`;if(g.format==="ends_with")return`غلط سٹرنگ: "${g.suffix}" پر ختم ہونا چاہیے`;if(g.format==="includes")return`غلط سٹرنگ: "${g.includes}" شامل ہونا چاہیے`;if(g.format==="regex")return`غلط سٹرنگ: پیٹرن ${g.pattern} سے میچ ہونا چاہیے`;return`غلط ${U[g.format]??u.format}`}case"not_multiple_of":return`غلط نمبر: ${u.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${u.keys.length>1?"ز":""}: ${P(u.keys,"، ")}`;case"invalid_key":return`${u.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${u.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function JN(){return{localeError:Ab()}}var bb=()=>{let $={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function I(u){return $[u]??null}let U={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},_={nan:"NaN",number:"raqam",array:"massiv"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${u.expected}, qabul qilingan ${v}`;return`Noto‘g‘ri kirish: kutilgan ${g}, qabul qilingan ${v}`}case"invalid_value":if(u.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${j(u.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Juda katta: kutilgan ${u.origin??"qiymat"} ${g}${u.maximum.toString()} ${z.unit} ${z.verb}`;return`Juda katta: kutilgan ${u.origin??"qiymat"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Juda kichik: kutilgan ${u.origin} ${g}${u.minimum.toString()} ${z.unit} ${z.verb}`;return`Juda kichik: kutilgan ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Noto‘g‘ri satr: "${g.prefix}" bilan boshlanishi kerak`;if(g.format==="ends_with")return`Noto‘g‘ri satr: "${g.suffix}" bilan tugashi kerak`;if(g.format==="includes")return`Noto‘g‘ri satr: "${g.includes}" ni o‘z ichiga olishi kerak`;if(g.format==="regex")return`Noto‘g‘ri satr: ${g.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${U[g.format]??u.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${u.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${u.keys.length>1?"lar":""}: ${P(u.keys,", ")}`;case"invalid_key":return`${u.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${u.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function NN(){return{localeError:bb()}}var jb=()=>{let $={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function I(u){return $[u]??null}let U={regex:"đầu vào",email:"địa chỉ 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ày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},_={nan:"NaN",number:"số",array:"mảng"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${u.expected}, nhận được ${v}`;return`Đầu vào không hợp lệ: mong đợi ${g}, nhận được ${v}`}case"invalid_value":if(u.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${j(u.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Quá lớn: mong đợi ${u.origin??"giá trị"} ${z.verb} ${g}${u.maximum.toString()} ${z.unit??"phần tử"}`;return`Quá lớn: mong đợi ${u.origin??"giá trị"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Quá nhỏ: mong đợi ${u.origin} ${z.verb} ${g}${u.minimum.toString()} ${z.unit}`;return`Quá nhỏ: mong đợi ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${g.prefix}"`;if(g.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${g.suffix}"`;if(g.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${g.includes}"`;if(g.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${g.pattern}`;return`${U[g.format]??u.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${u.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${P(u.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${u.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${u.origin}`;default:return"Đầu vào không hợp lệ"}}};function GN(){return{localeError:jb()}}var Fb=()=>{let $={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function I(u){return $[u]??null}let U={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},_={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`无效输入:期望 instanceof ${u.expected},实际接收 ${v}`;return`无效输入:期望 ${g},实际接收 ${v}`}case"invalid_value":if(u.values.length===1)return`无效输入:期望 ${j(u.values[0])}`;return`无效选项:期望以下之一 ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`数值过大:期望 ${u.origin??"值"} ${g}${u.maximum.toString()} ${z.unit??"个元素"}`;return`数值过大:期望 ${u.origin??"值"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`数值过小:期望 ${u.origin} ${g}${u.minimum.toString()} ${z.unit}`;return`数值过小:期望 ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`无效字符串:必须以 "${g.prefix}" 开头`;if(g.format==="ends_with")return`无效字符串:必须以 "${g.suffix}" 结尾`;if(g.format==="includes")return`无效字符串:必须包含 "${g.includes}"`;if(g.format==="regex")return`无效字符串:必须满足正则表达式 ${g.pattern}`;return`无效${U[g.format]??u.format}`}case"not_multiple_of":return`无效数字:必须是 ${u.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${P(u.keys,", ")}`;case"invalid_key":return`${u.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${u.origin} 中包含无效值(value)`;default:return"无效输入"}}};function XN(){return{localeError:Fb()}}var Sb=()=>{let $={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function I(u){return $[u]??null}let U={regex:"輸入",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 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`無效的輸入值:預期為 instanceof ${u.expected},但收到 ${v}`;return`無效的輸入值:預期為 ${g},但收到 ${v}`}case"invalid_value":if(u.values.length===1)return`無效的輸入值:預期為 ${j(u.values[0])}`;return`無效的選項:預期為以下其中之一 ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`數值過大:預期 ${u.origin??"值"} 應為 ${g}${u.maximum.toString()} ${z.unit??"個元素"}`;return`數值過大:預期 ${u.origin??"值"} 應為 ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`數值過小:預期 ${u.origin} 應為 ${g}${u.minimum.toString()} ${z.unit}`;return`數值過小:預期 ${u.origin} 應為 ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`無效的字串:必須以 "${g.prefix}" 開頭`;if(g.format==="ends_with")return`無效的字串:必須以 "${g.suffix}" 結尾`;if(g.format==="includes")return`無效的字串:必須包含 "${g.includes}"`;if(g.format==="regex")return`無效的字串:必須符合格式 ${g.pattern}`;return`無效的 ${U[g.format]??u.format}`}case"not_multiple_of":return`無效的數字:必須為 ${u.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${u.keys.length>1?"們":""}:${P(u.keys,"、")}`;case"invalid_key":return`${u.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${u.origin} 中有無效的值`;default:return"無效的輸入值"}}};function qN(){return{localeError:Sb()}}var wb=()=>{let $={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function I(u){return $[u]??null}let U={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",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:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},_={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${u.expected}, àmọ̀ a rí ${v}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${g}, àmọ̀ a rí ${v}`}case"invalid_value":if(u.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${j(u.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${P(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${u.origin??"iye"} ${z.verb} ${g}${u.maximum} ${z.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${g}${u.maximum}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Kéré ju: a ní láti jẹ́ pé ${u.origin} ${z.verb} ${g}${u.minimum} ${z.unit}`;return`Kéré ju: a ní láti jẹ́ ${g}${u.minimum}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${g.prefix}"`;if(g.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${g.suffix}"`;if(g.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${g.includes}"`;if(g.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${g.pattern}`;return`Aṣìṣe: ${U[g.format]??u.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${u.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${P(u.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${u.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${u.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function QN(){return{localeError:wb()}}var e5,TN=Symbol("ZodOutput"),HN=Symbol("ZodInput");class YN{constructor(){this._map=new WeakMap,this._idmap=new Map}add($,...I){let U=I[0];if(this._map.set($,U),U&&typeof U==="object"&&"id"in U)this._idmap.set(U.id,$);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove($){let I=this._map.get($);if(I&&typeof I==="object"&&"id"in I)this._idmap.delete(I.id);return this._map.delete($),this}get($){let I=$._zod.parent;if(I){let U={...this.get(I)??{}};delete U.id;let _={...U,...this._map.get($)};return Object.keys(_).length?_:void 0}return this._map.get($)}has($){return this._map.has($)}}function OU(){return new YN}(e5=globalThis).__zod_globalRegistry??(e5.__zod_globalRegistry=OU());var w$=globalThis.__zod_globalRegistry;function ON($,I){return new $({type:"string",...C(I)})}function DN($,I){return new $({type:"string",coerce:!0,...C(I)})}function DU($,I){return new $({type:"string",format:"email",check:"string_format",abort:!1,...C(I)})}function H0($,I){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...C(I)})}function VU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...C(I)})}function BU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...C(I)})}function MU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...C(I)})}function RU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...C(I)})}function Y0($,I){return new $({type:"string",format:"url",check:"string_format",abort:!1,...C(I)})}function KU($,I){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...C(I)})}function LU($,I){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...C(I)})}function PU($,I){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...C(I)})}function WU($,I){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...C(I)})}function ZU($,I){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...C(I)})}function AU($,I){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...C(I)})}function bU($,I){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...C(I)})}function jU($,I){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...C(I)})}function FU($,I){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...C(I)})}function VN($,I){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...C(I)})}function SU($,I){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...C(I)})}function wU($,I){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...C(I)})}function EU($,I){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...C(I)})}function CU($,I){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...C(I)})}function fU($,I){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...C(I)})}function xU($,I){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...C(I)})}var BN={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function MN($,I){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...C(I)})}function RN($,I){return new $({type:"string",format:"date",check:"string_format",...C(I)})}function KN($,I){return new $({type:"string",format:"time",check:"string_format",precision:null,...C(I)})}function LN($,I){return new $({type:"string",format:"duration",check:"string_format",...C(I)})}function PN($,I){return new $({type:"number",checks:[],...C(I)})}function WN($,I){return new $({type:"number",coerce:!0,checks:[],...C(I)})}function ZN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...C(I)})}function AN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...C(I)})}function bN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...C(I)})}function jN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...C(I)})}function FN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...C(I)})}function SN($,I){return new $({type:"boolean",...C(I)})}function wN($,I){return new $({type:"boolean",coerce:!0,...C(I)})}function EN($,I){return new $({type:"bigint",...C(I)})}function CN($,I){return new $({type:"bigint",coerce:!0,...C(I)})}function fN($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...C(I)})}function xN($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...C(I)})}function kN($,I){return new $({type:"symbol",...C(I)})}function yN($,I){return new $({type:"undefined",...C(I)})}function iN($,I){return new $({type:"null",...C(I)})}function nN($){return new $({type:"any"})}function rN($){return new $({type:"unknown"})}function lN($,I){return new $({type:"never",...C(I)})}function mN($,I){return new $({type:"void",...C(I)})}function hN($,I){return new $({type:"date",...C(I)})}function cN($,I){return new $({type:"date",coerce:!0,...C(I)})}function dN($,I){return new $({type:"nan",...C(I)})}function w4($,I){return new gU({check:"less_than",...C(I),value:$,inclusive:!1})}function u4($,I){return new gU({check:"less_than",...C(I),value:$,inclusive:!0})}function E4($,I){return new zU({check:"greater_than",...C(I),value:$,inclusive:!1})}function r$($,I){return new zU({check:"greater_than",...C(I),value:$,inclusive:!0})}function kU($){return E4(0,$)}function yU($){return w4(0,$)}function iU($){return u4(0,$)}function nU($){return r$(0,$)}function B6($,I){return new dz({check:"multiple_of",...C(I),value:$})}function M6($,I){return new tz({check:"max_size",...C(I),maximum:$})}function C4($,I){return new az({check:"min_size",...C(I),minimum:$})}function o6($,I){return new ez({check:"size_equals",...C(I),size:$})}function t6($,I){return new sz({check:"max_length",...C(I),maximum:$})}function d4($,I){return new $v({check:"min_length",...C(I),minimum:$})}function a6($,I){return new Iv({check:"length_equals",...C(I),length:$})}function i1($,I){return new uv({check:"string_format",format:"regex",...C(I),pattern:$})}function n1($){return new Uv({check:"string_format",format:"lowercase",...C($)})}function r1($){return new _v({check:"string_format",format:"uppercase",...C($)})}function l1($,I){return new gv({check:"string_format",format:"includes",...C(I),includes:$})}function m1($,I){return new zv({check:"string_format",format:"starts_with",...C(I),prefix:$})}function h1($,I){return new vv({check:"string_format",format:"ends_with",...C(I),suffix:$})}function rU($,I,U){return new Jv({check:"property",property:$,schema:I,...C(U)})}function c1($,I){return new Nv({check:"mime_type",mime:$,...C(I)})}function B4($){return new Gv({check:"overwrite",tx:$})}function d1($){return B4((I)=>I.normalize($))}function p1(){return B4(($)=>$.trim())}function o1(){return B4(($)=>$.toLowerCase())}function t1(){return B4(($)=>$.toUpperCase())}function a1(){return B4(($)=>Jz($))}function pN($,I,U){return new $({type:"array",element:I,...C(U)})}function Cb($,I,U){return new $({type:"union",options:I,...C(U)})}function fb($,I,U){return new $({type:"union",options:I,inclusive:!1,...C(U)})}function xb($,I,U,_){return new $({type:"union",options:U,discriminator:I,...C(_)})}function kb($,I,U){return new $({type:"intersection",left:I,right:U})}function yb($,I,U,_){let u=U instanceof l;return new $({type:"tuple",items:I,rest:u?U:null,...C(u?_:U)})}function ib($,I,U,_){return new $({type:"record",keyType:I,valueType:U,...C(_)})}function nb($,I,U,_){return new $({type:"map",keyType:I,valueType:U,...C(_)})}function rb($,I,U){return new $({type:"set",valueType:I,...C(U)})}function lb($,I,U){let _=Array.isArray(I)?Object.fromEntries(I.map((u)=>[u,u])):I;return new $({type:"enum",entries:_,...C(U)})}function mb($,I,U){return new $({type:"enum",entries:I,...C(U)})}function hb($,I,U){return new $({type:"literal",values:Array.isArray(I)?I:[I],...C(U)})}function oN($,I){return new $({type:"file",...C(I)})}function cb($,I){return new $({type:"transform",transform:I})}function db($,I){return new $({type:"optional",innerType:I})}function pb($,I){return new $({type:"nullable",innerType:I})}function ob($,I,U){return new $({type:"default",innerType:I,get defaultValue(){return typeof U==="function"?U():Gz(U)}})}function tb($,I,U){return new $({type:"nonoptional",innerType:I,...C(U)})}function ab($,I){return new $({type:"success",innerType:I})}function eb($,I,U){return new $({type:"catch",innerType:I,catchValue:typeof U==="function"?U:()=>U})}function sb($,I,U){return new $({type:"pipe",in:I,out:U})}function $j($,I){return new $({type:"readonly",innerType:I})}function Ij($,I,U){return new $({type:"template_literal",parts:I,...C(U)})}function uj($,I){return new $({type:"lazy",getter:I})}function Uj($,I){return new $({type:"promise",innerType:I})}function tN($,I,U){let _=C(U);return _.abort??(_.abort=!0),new $({type:"custom",check:"custom",fn:I,..._})}function aN($,I,U){return new $({type:"custom",check:"custom",fn:I,...C(U)})}function eN($){let I=s5((U)=>{return U.addIssue=(_)=>{if(typeof _==="string")U.issues.push(w1(_,U.value,I._zod.def));else{let u=_;if(u.fatal)u.continue=!1;u.code??(u.code="custom"),u.input??(u.input=U.value),u.inst??(u.inst=I),u.continue??(u.continue=!I._zod.def.abort),U.issues.push(w1(u))}},$(U.value,U)});return I}function s5($,I){let U=new G$({check:"custom",...C(I)});return U._zod.check=$,U}function sN($){let I=new G$({check:"describe"});return I._zod.onattach=[(U)=>{let _=w$.get(U)??{};w$.add(U,{..._,description:$})}],I._zod.check=()=>{},I}function $8($){let I=new G$({check:"meta"});return I._zod.onattach=[(U)=>{let _=w$.get(U)??{};w$.add(U,{..._,...$})}],I._zod.check=()=>{},I}function I8($,I){let U=C(I),_=U.truthy??["true","1","yes","on","y","enabled"],u=U.falsy??["false","0","no","off","n","disabled"];if(U.case!=="sensitive")_=_.map((T)=>typeof T==="string"?T.toLowerCase():T),u=u.map((T)=>typeof T==="string"?T.toLowerCase():T);let g=new Set(_),z=new Set(u),v=$.Codec??N0,J=$.Boolean??v0,X=new($.String??p6)({type:"string",error:U.error}),G=new J({type:"boolean",error:U.error}),q=new v({type:"pipe",in:X,out:G,transform:(T,H)=>{let Q=T;if(U.case!=="sensitive")Q=Q.toLowerCase();if(g.has(Q))return!0;else if(z.has(Q))return!1;else return H.issues.push({code:"invalid_value",expected:"stringbool",values:[...g,...z],input:H.value,inst:q,continue:!1}),{}},reverseTransform:(T,H)=>{if(T===!0)return _[0]||"true";else return u[0]||"false"},error:U.error});return q}function e1($,I,U,_={}){let u=C(_),g={...C(_),check:"string_format",type:"string",format:I,fn:typeof U==="function"?U:(v)=>U.test(v),...u};if(U instanceof RegExp)g.pattern=U;return new $(g)}function R6($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??w$,target:I,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,cycles:$?.cycles??"ref",reused:$?.reused??"inline",external:$?.external??void 0}}function _$($,I,U={path:[],schemaPath:[]}){var _;let u=$._zod.def,g=I.seen.get($);if(g){if(g.count++,U.schemaPath.includes($))g.cycle=U.path;return g.schema}let z={schema:{},count:1,cycle:void 0,path:U.path};I.seen.set($,z);let v=$._zod.toJSONSchema?.();if(v)z.schema=v;else{let X={...U,schemaPath:[...U.schemaPath,$],path:U.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(I,z.schema,X);else{let q=z.schema,T=I.processors[u.type];if(!T)throw Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);T($,I,q,X)}let G=$._zod.parent;if(G){if(!z.ref)z.ref=G;_$(G,I,X),I.seen.get(G).isParent=!0}}let J=I.metadataRegistry.get($);if(J)Object.assign(z.schema,J);if(I.io==="input"&&l$($))delete z.schema.examples,delete z.schema.default;if(I.io==="input"&&z.schema._prefault)(_=z.schema).default??(_.default=z.schema._prefault);return delete z.schema._prefault,I.seen.get($).schema}function K6($,I){let U=$.seen.get(I);if(!U)throw Error("Unprocessed schema. This is a bug in Zod.");let _=new Map;for(let z of $.seen.entries()){let v=$.metadataRegistry.get(z[0])?.id;if(v){let J=_.get(v);if(J&&J!==z[0])throw Error(`Duplicate schema id "${v}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);_.set(v,z[0])}}let u=(z)=>{let v=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let G=$.external.registry.get(z[0])?.id,q=$.external.uri??((H)=>H);if(G)return{ref:q(G)};let T=z[1].defId??z[1].schema.id??`schema${$.counter++}`;return z[1].defId=T,{defId:T,ref:`${q("__shared")}#/${v}/${T}`}}if(z[1]===U)return{ref:"#"};let N=`${"#"}/${v}/`,X=z[1].schema.id??`__schema${$.counter++}`;return{defId:X,ref:N+X}},g=(z)=>{if(z[1].schema.$ref)return;let v=z[1],{ref:J,defId:N}=u(z);if(v.def={...v.schema},N)v.defId=N;let X=v.schema;for(let G in X)delete X[G];X.$ref=J};if($.cycles==="throw")for(let z of $.seen.entries()){let v=z[1];if(v.cycle)throw Error(`Cycle detected: #/${v.cycle?.join("/")}/<root>
335
+ `)}T.write("payload.value = newResult;"),T.write("return payload;");let R=T.compile();return(P,O)=>R(q,P,O)},g,z=p6,v=!tI.jitless,N=v&&Xz.value,X=I.catchall,G;$._zod.parse=(q,T)=>{G??(G=_.value);let H=q.value;if(!z(H))return q.issues.push({expected:"object",code:"invalid_type",input:H,inst:$}),q;if(v&&N&&T?.async===!1&&T.jitless!==!0){if(!g)g=u(I.shape);if(q=g(q,T),!X)return q;return p5([],H,q,T,G,$)}return U(q,T)}});function C5($,I,U,_){for(let g of $)if(g.issues.length===0)return I.value=g.value,I;let u=$.filter((g)=>!M6(g));if(u.length===1)return I.value=u[0].value,u[0];return I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:$.map((g)=>g.issues.map((z)=>a$(z,_,K$())))}),I}var G0=V("$ZodUnion",($,I)=>{l.init($,I),p($._zod,"optin",()=>I.options.some((u)=>u._zod.optin==="optional")?"optional":void 0),p($._zod,"optout",()=>I.options.some((u)=>u._zod.optout==="optional")?"optional":void 0),p($._zod,"values",()=>{if(I.options.every((u)=>u._zod.values))return new Set(I.options.flatMap((u)=>Array.from(u._zod.values)));return}),p($._zod,"pattern",()=>{if(I.options.every((u)=>u._zod.pattern)){let u=I.options.map((g)=>g._zod.pattern);return new RegExp(`^(${u.map((g)=>sI(g.source)).join("|")})$`)}return});let U=I.options.length===1,_=I.options[0]._zod.run;$._zod.parse=(u,g)=>{if(U)return _(u,g);let z=!1,v=[];for(let J of I.options){let N=J._zod.run({value:u.value,issues:[]},g);if(N instanceof Promise)v.push(N),z=!0;else{if(N.issues.length===0)return N;v.push(N)}}if(!z)return C5(v,u,$,g);return Promise.all(v).then((J)=>{return C5(J,u,$,g)})}});function f5($,I,U,_){let u=$.filter((g)=>g.issues.length===0);if(u.length===1)return I.value=u[0].value,I;if(u.length===0)I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:$.map((g)=>g.issues.map((z)=>a$(z,_,K$())))});else I.issues.push({code:"invalid_union",input:I.value,inst:U,errors:[],inclusive:!1});return I}var sv=V("$ZodXor",($,I)=>{G0.init($,I),I.inclusive=!1;let U=I.options.length===1,_=I.options[0]._zod.run;$._zod.parse=(u,g)=>{if(U)return _(u,g);let z=!1,v=[];for(let J of I.options){let N=J._zod.run({value:u.value,issues:[]},g);if(N instanceof Promise)v.push(N),z=!0;else v.push(N)}if(!z)return f5(v,u,$,g);return Promise.all(v).then((J)=>{return f5(J,u,$,g)})}}),$J=V("$ZodDiscriminatedUnion",($,I)=>{I.inclusive=!1,G0.init($,I);let U=$._zod.parse;p($._zod,"propValues",()=>{let u={};for(let g of I.options){let z=g._zod.propValues;if(!z||Object.keys(z).length===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(g)}"`);for(let[v,J]of Object.entries(z)){if(!u[v])u[v]=new Set;for(let N of J)u[v].add(N)}}return u});let _=E1(()=>{let u=I.options,g=new Map;for(let z of u){let v=z._zod.propValues?.[I.discriminator];if(!v||v.size===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(z)}"`);for(let J of v){if(g.has(J))throw Error(`Duplicate discriminator value "${String(J)}"`);g.set(J,z)}}return g});$._zod.parse=(u,g)=>{let z=u.value;if(!p6(z))return u.issues.push({code:"invalid_type",expected:"object",input:z,inst:$}),u;let v=_.value.get(z?.[I.discriminator]);if(v)return v._zod.run(u,g);if(I.unionFallback)return U(u,g);return u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:I.discriminator,input:z,path:[I.discriminator],inst:$}),u}}),IJ=V("$ZodIntersection",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value,g=I.left._zod.run({value:u,issues:[]},_),z=I.right._zod.run({value:u,issues:[]},_);if(g instanceof Promise||z instanceof Promise)return Promise.all([g,z]).then(([J,N])=>{return x5(U,J,N)});return x5(U,g,z)}});function Tv($,I){if($===I)return{valid:!0,data:$};if($ instanceof Date&&I instanceof Date&&+$===+I)return{valid:!0,data:$};if(B6($)&&B6(I)){let U=Object.keys(I),_=Object.keys($).filter((g)=>U.indexOf(g)!==-1),u={...$,...I};for(let g of _){let z=Tv($[g],I[g]);if(!z.valid)return{valid:!1,mergeErrorPath:[g,...z.mergeErrorPath]};u[g]=z.data}return{valid:!0,data:u}}if(Array.isArray($)&&Array.isArray(I)){if($.length!==I.length)return{valid:!1,mergeErrorPath:[]};let U=[];for(let _=0;_<$.length;_++){let u=$[_],g=I[_],z=Tv(u,g);if(!z.valid)return{valid:!1,mergeErrorPath:[_,...z.mergeErrorPath]};U.push(z.data)}return{valid:!0,data:U}}return{valid:!1,mergeErrorPath:[]}}function x5($,I,U){let _=new Map,u;for(let v of I.issues)if(v.code==="unrecognized_keys"){u??(u=v);for(let J of v.keys){if(!_.has(J))_.set(J,{});_.get(J).l=!0}}else $.issues.push(v);for(let v of U.issues)if(v.code==="unrecognized_keys")for(let J of v.keys){if(!_.has(J))_.set(J,{});_.get(J).r=!0}else $.issues.push(v);let g=[..._].filter(([,v])=>v.l&&v.r).map(([v])=>v);if(g.length&&u)$.issues.push({...u,keys:g});if(M6($))return $;let z=Tv(I.value,U.value);if(!z.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(z.mergeErrorPath)}`);return $.value=z.data,$}var VU=V("$ZodTuple",($,I)=>{l.init($,I);let U=I.items;$._zod.parse=(_,u)=>{let g=_.value;if(!Array.isArray(g))return _.issues.push({input:g,inst:$,expected:"tuple",code:"invalid_type"}),_;_.value=[];let z=[],v=[...U].reverse().findIndex((X)=>X._zod.optin!=="optional"),J=v===-1?0:U.length-v;if(!I.rest){let X=g.length>U.length,G=g.length<J-1;if(X||G)return _.issues.push({...X?{code:"too_big",maximum:U.length,inclusive:!0}:{code:"too_small",minimum:U.length},input:g,inst:$,origin:"array"}),_}let N=-1;for(let X of U){if(N++,N>=g.length){if(N>=J)continue}let G=X._zod.run({value:g[N],issues:[]},u);if(G instanceof Promise)z.push(G.then((q)=>XU(q,_,N)));else XU(G,_,N)}if(I.rest){let X=g.slice(U.length);for(let G of X){N++;let q=I.rest._zod.run({value:G,issues:[]},u);if(q instanceof Promise)z.push(q.then((T)=>XU(T,_,N)));else XU(q,_,N)}}if(z.length)return Promise.all(z).then(()=>_);return _}});function XU($,I,U){if($.issues.length)I.issues.push(...U4(U,$.issues));I.value[U]=$.value}var uJ=V("$ZodRecord",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!B6(u))return U.issues.push({expected:"record",code:"invalid_type",input:u,inst:$}),U;let g=[],z=I.keyType._zod.values;if(z){U.value={};let v=new Set;for(let N of z)if(typeof N==="string"||typeof N==="number"||typeof N==="symbol"){v.add(typeof N==="number"?N.toString():N);let X=I.valueType._zod.run({value:u[N],issues:[]},_);if(X instanceof Promise)g.push(X.then((G)=>{if(G.issues.length)U.issues.push(...U4(N,G.issues));U.value[N]=G.value}));else{if(X.issues.length)U.issues.push(...U4(N,X.issues));U.value[N]=X.value}}let J;for(let N in u)if(!v.has(N))J=J??[],J.push(N);if(J&&J.length>0)U.issues.push({code:"unrecognized_keys",input:u,inst:$,keys:J})}else{U.value={};for(let v of Reflect.ownKeys(u)){if(v==="__proto__")continue;let J=I.keyType._zod.run({value:v,issues:[]},_);if(J instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof v==="string"&&z0.test(v)&&J.issues.length){let G=I.keyType._zod.run({value:Number(v),issues:[]},_);if(G instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(G.issues.length===0)J=G}if(J.issues.length){if(I.mode==="loose")U.value[v]=u[v];else U.issues.push({code:"invalid_key",origin:"record",issues:J.issues.map((G)=>a$(G,_,K$())),input:v,path:[v],inst:$});continue}let X=I.valueType._zod.run({value:u[v],issues:[]},_);if(X instanceof Promise)g.push(X.then((G)=>{if(G.issues.length)U.issues.push(...U4(v,G.issues));U.value[J.value]=G.value}));else{if(X.issues.length)U.issues.push(...U4(v,X.issues));U.value[J.value]=X.value}}}if(g.length)return Promise.all(g).then(()=>U);return U}}),UJ=V("$ZodMap",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!(u instanceof Map))return U.issues.push({expected:"map",code:"invalid_type",input:u,inst:$}),U;let g=[];U.value=new Map;for(let[z,v]of u){let J=I.keyType._zod.run({value:z,issues:[]},_),N=I.valueType._zod.run({value:v,issues:[]},_);if(J instanceof Promise||N instanceof Promise)g.push(Promise.all([J,N]).then(([X,G])=>{k5(X,G,U,z,u,$,_)}));else k5(J,N,U,z,u,$,_)}if(g.length)return Promise.all(g).then(()=>U);return U}});function k5($,I,U,_,u,g,z){if($.issues.length)if($0.has(typeof _))U.issues.push(...U4(_,$.issues));else U.issues.push({code:"invalid_key",origin:"map",input:u,inst:g,issues:$.issues.map((v)=>a$(v,z,K$()))});if(I.issues.length)if($0.has(typeof _))U.issues.push(...U4(_,I.issues));else U.issues.push({origin:"map",code:"invalid_element",input:u,inst:g,key:_,issues:I.issues.map((v)=>a$(v,z,K$()))});U.value.set($.value,I.value)}var _J=V("$ZodSet",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(!(u instanceof Set))return U.issues.push({input:u,inst:$,expected:"set",code:"invalid_type"}),U;let g=[];U.value=new Set;for(let z of u){let v=I.valueType._zod.run({value:z,issues:[]},_);if(v instanceof Promise)g.push(v.then((J)=>y5(J,U)));else y5(v,U)}if(g.length)return Promise.all(g).then(()=>U);return U}});function y5($,I){if($.issues.length)I.issues.push(...$.issues);I.value.add($.value)}var gJ=V("$ZodEnum",($,I)=>{l.init($,I);let U=eI(I.entries),_=new Set(U);$._zod.values=_,$._zod.pattern=new RegExp(`^(${U.filter((u)=>$0.has(typeof u)).map((u)=>typeof u==="string"?T4(u):u.toString()).join("|")})$`),$._zod.parse=(u,g)=>{let z=u.value;if(_.has(z))return u;return u.issues.push({code:"invalid_value",values:U,input:z,inst:$}),u}}),zJ=V("$ZodLiteral",($,I)=>{if(l.init($,I),I.values.length===0)throw Error("Cannot create literal schema with no valid values");let U=new Set(I.values);$._zod.values=U,$._zod.pattern=new RegExp(`^(${I.values.map((_)=>typeof _==="string"?T4(_):_?T4(_.toString()):String(_)).join("|")})$`),$._zod.parse=(_,u)=>{let g=_.value;if(U.has(g))return _;return _.issues.push({code:"invalid_value",values:I.values,input:g,inst:$}),_}}),vJ=V("$ZodFile",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{let u=U.value;if(u instanceof File)return U;return U.issues.push({expected:"file",code:"invalid_type",input:u,inst:$}),U}}),JJ=V("$ZodTransform",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new d6($.constructor.name);let u=I.transform(U.value,U);if(_.async)return(u instanceof Promise?u:Promise.resolve(u)).then((z)=>{return U.value=z,U});if(u instanceof Promise)throw new E4;return U.value=u,U}});function i5($,I){if($.issues.length&&I===void 0)return{issues:[],value:void 0};return $}var DU=V("$ZodOptional",($,I)=>{l.init($,I),$._zod.optin="optional",$._zod.optout="optional",p($._zod,"values",()=>{return I.innerType._zod.values?new Set([...I.innerType._zod.values,void 0]):void 0}),p($._zod,"pattern",()=>{let U=I.innerType._zod.pattern;return U?new RegExp(`^(${sI(U.source)})?$`):void 0}),$._zod.parse=(U,_)=>{if(I.innerType._zod.optin==="optional"){let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>i5(g,U.value));return i5(u,U.value)}if(U.value===void 0)return U;return I.innerType._zod.run(U,_)}}),NJ=V("$ZodExactOptional",($,I)=>{DU.init($,I),p($._zod,"values",()=>I.innerType._zod.values),p($._zod,"pattern",()=>I.innerType._zod.pattern),$._zod.parse=(U,_)=>{return I.innerType._zod.run(U,_)}}),GJ=V("$ZodNullable",($,I)=>{l.init($,I),p($._zod,"optin",()=>I.innerType._zod.optin),p($._zod,"optout",()=>I.innerType._zod.optout),p($._zod,"pattern",()=>{let U=I.innerType._zod.pattern;return U?new RegExp(`^(${sI(U.source)}|null)$`):void 0}),p($._zod,"values",()=>{return I.innerType._zod.values?new Set([...I.innerType._zod.values,null]):void 0}),$._zod.parse=(U,_)=>{if(U.value===null)return U;return I.innerType._zod.run(U,_)}}),XJ=V("$ZodDefault",($,I)=>{l.init($,I),$._zod.optin="optional",p($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(U,_)=>{if(_.direction==="backward")return I.innerType._zod.run(U,_);if(U.value===void 0)return U.value=I.defaultValue,U;let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>r5(g,I));return r5(u,I)}});function r5($,I){if($.value===void 0)$.value=I.defaultValue;return $}var qJ=V("$ZodPrefault",($,I)=>{l.init($,I),$._zod.optin="optional",p($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(U,_)=>{if(_.direction==="backward")return I.innerType._zod.run(U,_);if(U.value===void 0)U.value=I.defaultValue;return I.innerType._zod.run(U,_)}}),QJ=V("$ZodNonOptional",($,I)=>{l.init($,I),p($._zod,"values",()=>{let U=I.innerType._zod.values;return U?new Set([...U].filter((_)=>_!==void 0)):void 0}),$._zod.parse=(U,_)=>{let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>n5(g,$));return n5(u,$)}});function n5($,I){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:I});return $}var TJ=V("$ZodSuccess",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new d6("ZodSuccess");let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>{return U.value=g.issues.length===0,U});return U.value=u.issues.length===0,U}}),HJ=V("$ZodCatch",($,I)=>{l.init($,I),p($._zod,"optin",()=>I.innerType._zod.optin),p($._zod,"optout",()=>I.innerType._zod.optout),p($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(U,_)=>{if(_.direction==="backward")return I.innerType._zod.run(U,_);let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>{if(U.value=g.value,g.issues.length)U.value=I.catchValue({...U,error:{issues:g.issues.map((z)=>a$(z,_,K$()))},input:U.value}),U.issues=[];return U});if(U.value=u.value,u.issues.length)U.value=I.catchValue({...U,error:{issues:u.issues.map((g)=>a$(g,_,K$()))},input:U.value}),U.issues=[];return U}}),YJ=V("$ZodNaN",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{if(typeof U.value!=="number"||!Number.isNaN(U.value))return U.issues.push({input:U.value,inst:$,expected:"nan",code:"invalid_type"}),U;return U}}),OJ=V("$ZodPipe",($,I)=>{l.init($,I),p($._zod,"values",()=>I.in._zod.values),p($._zod,"optin",()=>I.in._zod.optin),p($._zod,"optout",()=>I.out._zod.optout),p($._zod,"propValues",()=>I.in._zod.propValues),$._zod.parse=(U,_)=>{if(_.direction==="backward"){let g=I.out._zod.run(U,_);if(g instanceof Promise)return g.then((z)=>qU(z,I.in,_));return qU(g,I.in,_)}let u=I.in._zod.run(U,_);if(u instanceof Promise)return u.then((g)=>qU(g,I.out,_));return qU(u,I.out,_)}});function qU($,I,U){if($.issues.length)return $.aborted=!0,$;return I._zod.run({value:$.value,issues:$.issues},U)}var X0=V("$ZodCodec",($,I)=>{l.init($,I),p($._zod,"values",()=>I.in._zod.values),p($._zod,"optin",()=>I.in._zod.optin),p($._zod,"optout",()=>I.out._zod.optout),p($._zod,"propValues",()=>I.in._zod.propValues),$._zod.parse=(U,_)=>{if((_.direction||"forward")==="forward"){let g=I.in._zod.run(U,_);if(g instanceof Promise)return g.then((z)=>QU(z,I,_));return QU(g,I,_)}else{let g=I.out._zod.run(U,_);if(g instanceof Promise)return g.then((z)=>QU(z,I,_));return QU(g,I,_)}}});function QU($,I,U){if($.issues.length)return $.aborted=!0,$;if((U.direction||"forward")==="forward"){let u=I.transform($.value,$);if(u instanceof Promise)return u.then((g)=>TU($,g,I.out,U));return TU($,u,I.out,U)}else{let u=I.reverseTransform($.value,$);if(u instanceof Promise)return u.then((g)=>TU($,g,I.in,U));return TU($,u,I.in,U)}}function TU($,I,U,_){if($.issues.length)return $.aborted=!0,$;return U._zod.run({value:I,issues:$.issues},_)}var VJ=V("$ZodReadonly",($,I)=>{l.init($,I),p($._zod,"propValues",()=>I.innerType._zod.propValues),p($._zod,"values",()=>I.innerType._zod.values),p($._zod,"optin",()=>I.innerType?._zod?.optin),p($._zod,"optout",()=>I.innerType?._zod?.optout),$._zod.parse=(U,_)=>{if(_.direction==="backward")return I.innerType._zod.run(U,_);let u=I.innerType._zod.run(U,_);if(u instanceof Promise)return u.then(l5);return l5(u)}});function l5($){return $.value=Object.freeze($.value),$}var DJ=V("$ZodTemplateLiteral",($,I)=>{l.init($,I);let U=[];for(let _ of I.parts)if(typeof _==="object"&&_!==null){if(!_._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[..._._zod.traits].shift()}`);let u=_._zod.pattern instanceof RegExp?_._zod.pattern.source:_._zod.pattern;if(!u)throw Error(`Invalid template literal part: ${_._zod.traits}`);let g=u.startsWith("^")?1:0,z=u.endsWith("$")?u.length-1:u.length;U.push(u.slice(g,z))}else if(_===null||Qz.has(typeof _))U.push(T4(`${_}`));else throw Error(`Invalid template literal part: ${_}`);$._zod.pattern=new RegExp(`^${U.join("")}$`),$._zod.parse=(_,u)=>{if(typeof _.value!=="string")return _.issues.push({input:_.value,inst:$,expected:"string",code:"invalid_type"}),_;if($._zod.pattern.lastIndex=0,!$._zod.pattern.test(_.value))return _.issues.push({input:_.value,inst:$,code:"invalid_format",format:I.format??"template_literal",pattern:$._zod.pattern.source}),_;return _}}),BJ=V("$ZodFunction",($,I)=>{return l.init($,I),$._def=I,$._zod.def=I,$.implement=(U)=>{if(typeof U!=="function")throw Error("implement() must be called with a function");return function(..._){let u=$._def.input?au($._def.input,_):_,g=Reflect.apply(U,this,u);if($._def.output)return au($._def.output,g);return g}},$.implementAsync=(U)=>{if(typeof U!=="function")throw Error("implementAsync() must be called with a function");return async function(..._){let u=$._def.input?await eu($._def.input,_):_,g=await Reflect.apply(U,this,u);if($._def.output)return await eu($._def.output,g);return g}},$._zod.parse=(U,_)=>{if(typeof U.value!=="function")return U.issues.push({code:"invalid_type",expected:"function",input:U.value,inst:$}),U;if($._def.output&&$._def.output._zod.def.type==="promise")U.value=$.implementAsync(U.value);else U.value=$.implement(U.value);return U},$.input=(...U)=>{let _=$.constructor;if(Array.isArray(U[0]))return new _({type:"function",input:new VU({type:"tuple",items:U[0],rest:U[1]}),output:$._def.output});return new _({type:"function",input:U[0],output:$._def.output})},$.output=(U)=>{return new $.constructor({type:"function",input:$._def.input,output:U})},$}),MJ=V("$ZodPromise",($,I)=>{l.init($,I),$._zod.parse=(U,_)=>{return Promise.resolve(U.value).then((u)=>I.innerType._zod.run({value:u,issues:[]},_))}}),KJ=V("$ZodLazy",($,I)=>{l.init($,I),p($._zod,"innerType",()=>I.getter()),p($._zod,"pattern",()=>$._zod.innerType?._zod?.pattern),p($._zod,"propValues",()=>$._zod.innerType?._zod?.propValues),p($._zod,"optin",()=>$._zod.innerType?._zod?.optin??void 0),p($._zod,"optout",()=>$._zod.innerType?._zod?.optout??void 0),$._zod.parse=(U,_)=>{return $._zod.innerType._zod.run(U,_)}}),RJ=V("$ZodCustom",($,I)=>{G$.init($,I),l.init($,I),$._zod.parse=(U,_)=>{return U},$._zod.check=(U)=>{let _=U.value,u=I.fn(_);if(u instanceof Promise)return u.then((g)=>m5(g,U,_,$));m5(u,U,_,$);return}});function m5($,I,U,_){if(!$){let u={code:"custom",input:U,inst:_,path:[..._._zod.def.path??[]],continue:!_._zod.def.abort};if(_._zod.def.params)u.params=_._zod.def.params;I.issues.push(C1(u))}}var Y0={};D4(Y0,{zhTW:()=>TN,zhCN:()=>QN,yo:()=>HN,vi:()=>qN,uz:()=>XN,ur:()=>GN,uk:()=>H0,ua:()=>NN,tr:()=>JN,th:()=>vN,ta:()=>zN,sv:()=>gN,sl:()=>_N,ru:()=>UN,pt:()=>uN,ps:()=>$N,pl:()=>IN,ota:()=>sJ,no:()=>eJ,nl:()=>aJ,ms:()=>tJ,mk:()=>oJ,lt:()=>pJ,ko:()=>dJ,km:()=>Q0,kh:()=>cJ,ka:()=>hJ,ja:()=>mJ,it:()=>lJ,is:()=>nJ,id:()=>rJ,hy:()=>iJ,hu:()=>yJ,he:()=>kJ,frCA:()=>xJ,fr:()=>fJ,fi:()=>CJ,fa:()=>EJ,es:()=>wJ,eo:()=>SJ,en:()=>q0,de:()=>FJ,da:()=>jJ,cs:()=>bJ,ca:()=>AJ,bg:()=>ZJ,be:()=>PJ,az:()=>WJ,ar:()=>LJ});var nA=()=>{let $={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function I(u){return $[u]??null}let U={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${u.expected}، ولكن تم إدخال ${v}`;return`مدخلات غير مقبولة: يفترض إدخال ${g}، ولكن تم إدخال ${v}`}case"invalid_value":if(u.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${j(u.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return` أكبر من اللازم: يفترض أن تكون ${u.origin??"القيمة"} ${g} ${u.maximum.toString()} ${z.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${u.origin??"القيمة"} ${g} ${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`أصغر من اللازم: يفترض لـ ${u.origin} أن يكون ${g} ${u.minimum.toString()} ${z.unit}`;return`أصغر من اللازم: يفترض لـ ${u.origin} أن يكون ${g} ${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${u.prefix}"`;if(g.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${g.suffix}"`;if(g.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${g.includes}"`;if(g.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${g.pattern}`;return`${U[g.format]??u.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${u.divisor}`;case"unrecognized_keys":return`معرف${u.keys.length>1?"ات":""} غريب${u.keys.length>1?"ة":""}: ${W(u.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${u.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${u.origin}`;default:return"مدخل غير مقبول"}}};function LJ(){return{localeError:nA()}}var lA=()=>{let $={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function I(u){return $[u]??null}let U={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Yanlış dəyər: gözlənilən instanceof ${u.expected}, daxil olan ${v}`;return`Yanlış dəyər: gözlənilən ${g}, daxil olan ${v}`}case"invalid_value":if(u.values.length===1)return`Yanlış dəyər: gözlənilən ${j(u.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Çox böyük: gözlənilən ${u.origin??"dəyər"} ${g}${u.maximum.toString()} ${z.unit??"element"}`;return`Çox böyük: gözlənilən ${u.origin??"dəyər"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Çox kiçik: gözlənilən ${u.origin} ${g}${u.minimum.toString()} ${z.unit}`;return`Çox kiçik: gözlənilən ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Yanlış mətn: "${g.prefix}" ilə başlamalıdır`;if(g.format==="ends_with")return`Yanlış mətn: "${g.suffix}" ilə bitməlidir`;if(g.format==="includes")return`Yanlış mətn: "${g.includes}" daxil olmalıdır`;if(g.format==="regex")return`Yanlış mətn: ${g.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${U[g.format]??u.format}`}case"not_multiple_of":return`Yanlış ədəd: ${u.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${u.keys.length>1?"lar":""}: ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${u.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function WJ(){return{localeError:lA()}}function t5($,I,U,_){let u=Math.abs($),g=u%10,z=u%100;if(z>=11&&z<=19)return _;if(g===1)return I;if(g>=2&&g<=4)return U;return _}var mA=()=>{let $={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function I(u){return $[u]??null}let U={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},_={nan:"NaN",number:"лік",array:"масіў"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Няправільны ўвод: чакаўся instanceof ${u.expected}, атрымана ${v}`;return`Няправільны ўвод: чакаўся ${g}, атрымана ${v}`}case"invalid_value":if(u.values.length===1)return`Няправільны ўвод: чакалася ${j(u.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z){let v=Number(u.maximum),J=t5(v,z.unit.one,z.unit.few,z.unit.many);return`Занадта вялікі: чакалася, што ${u.origin??"значэнне"} павінна ${z.verb} ${g}${u.maximum.toString()} ${J}`}return`Занадта вялікі: чакалася, што ${u.origin??"значэнне"} павінна быць ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z){let v=Number(u.minimum),J=t5(v,z.unit.one,z.unit.few,z.unit.many);return`Занадта малы: чакалася, што ${u.origin} павінна ${z.verb} ${g}${u.minimum.toString()} ${J}`}return`Занадта малы: чакалася, што ${u.origin} павінна быць ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${g.prefix}"`;if(g.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${g.suffix}"`;if(g.format==="includes")return`Няправільны радок: павінен змяшчаць "${g.includes}"`;if(g.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${g.pattern}`;return`Няправільны ${U[g.format]??u.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${u.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${u.keys.length>1?"ключы":"ключ"}: ${W(u.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${u.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${u.origin}`;default:return"Няправільны ўвод"}}};function PJ(){return{localeError:mA()}}var hA=()=>{let $={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function I(u){return $[u]??null}let U={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},_={nan:"NaN",number:"число",array:"масив"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Невалиден вход: очакван instanceof ${u.expected}, получен ${v}`;return`Невалиден вход: очакван ${g}, получен ${v}`}case"invalid_value":if(u.values.length===1)return`Невалиден вход: очакван ${j(u.values[0])}`;return`Невалидна опция: очаквано едно от ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Твърде голямо: очаква се ${u.origin??"стойност"} да съдържа ${g}${u.maximum.toString()} ${z.unit??"елемента"}`;return`Твърде голямо: очаква се ${u.origin??"стойност"} да бъде ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Твърде малко: очаква се ${u.origin} да съдържа ${g}${u.minimum.toString()} ${z.unit}`;return`Твърде малко: очаква се ${u.origin} да бъде ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Невалиден низ: трябва да започва с "${g.prefix}"`;if(g.format==="ends_with")return`Невалиден низ: трябва да завършва с "${g.suffix}"`;if(g.format==="includes")return`Невалиден низ: трябва да включва "${g.includes}"`;if(g.format==="regex")return`Невалиден низ: трябва да съвпада с ${g.pattern}`;let z="Невалиден";if(g.format==="emoji")z="Невалидно";if(g.format==="datetime")z="Невалидно";if(g.format==="date")z="Невалидна";if(g.format==="time")z="Невалидно";if(g.format==="duration")z="Невалидна";return`${z} ${U[g.format]??u.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${u.divisor}`;case"unrecognized_keys":return`Неразпознат${u.keys.length>1?"и":""} ключ${u.keys.length>1?"ове":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${u.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${u.origin}`;default:return"Невалиден вход"}}};function ZJ(){return{localeError:hA()}}var cA=()=>{let $={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function I(u){return $[u]??null}let U={regex:"entrada",email:"adreça electrònica",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ça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Tipus invàlid: s'esperava instanceof ${u.expected}, s'ha rebut ${v}`;return`Tipus invàlid: s'esperava ${g}, s'ha rebut ${v}`}case"invalid_value":if(u.values.length===1)return`Valor invàlid: s'esperava ${j(u.values[0])}`;return`Opció invàlida: s'esperava una de ${W(u.values," o ")}`;case"too_big":{let g=u.inclusive?"com a màxim":"menys de",z=I(u.origin);if(z)return`Massa gran: s'esperava que ${u.origin??"el valor"} contingués ${g} ${u.maximum.toString()} ${z.unit??"elements"}`;return`Massa gran: s'esperava que ${u.origin??"el valor"} fos ${g} ${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?"com a mínim":"més de",z=I(u.origin);if(z)return`Massa petit: s'esperava que ${u.origin} contingués ${g} ${u.minimum.toString()} ${z.unit}`;return`Massa petit: s'esperava que ${u.origin} fos ${g} ${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Format invàlid: ha de començar amb "${g.prefix}"`;if(g.format==="ends_with")return`Format invàlid: ha d'acabar amb "${g.suffix}"`;if(g.format==="includes")return`Format invàlid: ha d'incloure "${g.includes}"`;if(g.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${g.pattern}`;return`Format invàlid per a ${U[g.format]??u.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${u.divisor}`;case"unrecognized_keys":return`Clau${u.keys.length>1?"s":""} no reconeguda${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${u.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${u.origin}`;default:return"Entrada invàlida"}}};function AJ(){return{localeError:cA()}}var dA=()=>{let $={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function I(u){return $[u]??null}let U={regex:"regulární výraz",email:"e-mailová 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 čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},_={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Neplatný vstup: očekáváno instanceof ${u.expected}, obdrženo ${v}`;return`Neplatný vstup: očekáváno ${g}, obdrženo ${v}`}case"invalid_value":if(u.values.length===1)return`Neplatný vstup: očekáváno ${j(u.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Hodnota je příliš velká: ${u.origin??"hodnota"} musí mít ${g}${u.maximum.toString()} ${z.unit??"prvků"}`;return`Hodnota je příliš velká: ${u.origin??"hodnota"} musí být ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Hodnota je příliš malá: ${u.origin??"hodnota"} musí mít ${g}${u.minimum.toString()} ${z.unit??"prvků"}`;return`Hodnota je příliš malá: ${u.origin??"hodnota"} musí být ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Neplatný řetězec: musí začínat na "${g.prefix}"`;if(g.format==="ends_with")return`Neplatný řetězec: musí končit na "${g.suffix}"`;if(g.format==="includes")return`Neplatný řetězec: musí obsahovat "${g.includes}"`;if(g.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${g.pattern}`;return`Neplatný formát ${U[g.format]??u.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${u.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${W(u.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${u.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${u.origin}`;default:return"Neplatný vstup"}}};function bJ(){return{localeError:dA()}}var pA=()=>{let $={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function I(u){return $[u]??null}let U={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æt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},_={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ugyldigt input: forventede instanceof ${u.expected}, fik ${v}`;return`Ugyldigt input: forventede ${g}, fik ${v}`}case"invalid_value":if(u.values.length===1)return`Ugyldig værdi: forventede ${j(u.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin),v=_[u.origin]??u.origin;if(z)return`For stor: forventede ${v??"value"} ${z.verb} ${g} ${u.maximum.toString()} ${z.unit??"elementer"}`;return`For stor: forventede ${v??"value"} havde ${g} ${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin),v=_[u.origin]??u.origin;if(z)return`For lille: forventede ${v} ${z.verb} ${g} ${u.minimum.toString()} ${z.unit}`;return`For lille: forventede ${v} havde ${g} ${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ugyldig streng: skal starte med "${g.prefix}"`;if(g.format==="ends_with")return`Ugyldig streng: skal ende med "${g.suffix}"`;if(g.format==="includes")return`Ugyldig streng: skal indeholde "${g.includes}"`;if(g.format==="regex")return`Ugyldig streng: skal matche mønsteret ${g.pattern}`;return`Ugyldig ${U[g.format]??u.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${W(u.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${u.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${u.origin}`;default:return"Ugyldigt input"}}};function jJ(){return{localeError:pA()}}var oA=()=>{let $={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function I(u){return $[u]??null}let U={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},_={nan:"NaN",number:"Zahl",array:"Array"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ungültige Eingabe: erwartet instanceof ${u.expected}, erhalten ${v}`;return`Ungültige Eingabe: erwartet ${g}, erhalten ${v}`}case"invalid_value":if(u.values.length===1)return`Ungültige Eingabe: erwartet ${j(u.values[0])}`;return`Ungültige Option: erwartet eine von ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Zu groß: erwartet, dass ${u.origin??"Wert"} ${g}${u.maximum.toString()} ${z.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${u.origin??"Wert"} ${g}${u.maximum.toString()} ist`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Zu klein: erwartet, dass ${u.origin} ${g}${u.minimum.toString()} ${z.unit} hat`;return`Zu klein: erwartet, dass ${u.origin} ${g}${u.minimum.toString()} ist`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ungültiger String: muss mit "${g.prefix}" beginnen`;if(g.format==="ends_with")return`Ungültiger String: muss mit "${g.suffix}" enden`;if(g.format==="includes")return`Ungültiger String: muss "${g.includes}" enthalten`;if(g.format==="regex")return`Ungültiger String: muss dem Muster ${g.pattern} entsprechen`;return`Ungültig: ${U[g.format]??u.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${u.divisor} sein`;case"unrecognized_keys":return`${u.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${W(u.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${u.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${u.origin}`;default:return"Ungültige Eingabe"}}};function FJ(){return{localeError:oA()}}var tA=()=>{let $={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 I(u){return $[u]??null}let U={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;return`Invalid input: expected ${g}, received ${v}`}case"invalid_value":if(u.values.length===1)return`Invalid input: expected ${j(u.values[0])}`;return`Invalid option: expected one of ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Too big: expected ${u.origin??"value"} to have ${g}${u.maximum.toString()} ${z.unit??"elements"}`;return`Too big: expected ${u.origin??"value"} to be ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Too small: expected ${u.origin} to have ${g}${u.minimum.toString()} ${z.unit}`;return`Too small: expected ${u.origin} to be ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Invalid string: must start with "${g.prefix}"`;if(g.format==="ends_with")return`Invalid string: must end with "${g.suffix}"`;if(g.format==="includes")return`Invalid string: must include "${g.includes}"`;if(g.format==="regex")return`Invalid string: must match pattern ${g.pattern}`;return`Invalid ${U[g.format]??u.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${u.divisor}`;case"unrecognized_keys":return`Unrecognized key${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Invalid key in ${u.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${u.origin}`;default:return"Invalid input"}}};function q0(){return{localeError:tA()}}var aA=()=>{let $={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function I(u){return $[u]??null}let U={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",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ŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},_={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Nevalida enigo: atendiĝis instanceof ${u.expected}, riceviĝis ${v}`;return`Nevalida enigo: atendiĝis ${g}, riceviĝis ${v}`}case"invalid_value":if(u.values.length===1)return`Nevalida enigo: atendiĝis ${j(u.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Tro granda: atendiĝis ke ${u.origin??"valoro"} havu ${g}${u.maximum.toString()} ${z.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${u.origin??"valoro"} havu ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Tro malgranda: atendiĝis ke ${u.origin} havu ${g}${u.minimum.toString()} ${z.unit}`;return`Tro malgranda: atendiĝis ke ${u.origin} estu ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${g.prefix}"`;if(g.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${g.suffix}"`;if(g.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${g.includes}"`;if(g.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${g.pattern}`;return`Nevalida ${U[g.format]??u.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${u.divisor}`;case"unrecognized_keys":return`Nekonata${u.keys.length>1?"j":""} ŝlosilo${u.keys.length>1?"j":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${u.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${u.origin}`;default:return"Nevalida enigo"}}};function SJ(){return{localeError:aA()}}var eA=()=>{let $={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function I(u){return $[u]??null}let U={regex:"entrada",email:"dirección de correo electrónico",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ón ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},_={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Entrada inválida: se esperaba instanceof ${u.expected}, recibido ${v}`;return`Entrada inválida: se esperaba ${g}, recibido ${v}`}case"invalid_value":if(u.values.length===1)return`Entrada inválida: se esperaba ${j(u.values[0])}`;return`Opción inválida: se esperaba una de ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin),v=_[u.origin]??u.origin;if(z)return`Demasiado grande: se esperaba que ${v??"valor"} tuviera ${g}${u.maximum.toString()} ${z.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${v??"valor"} fuera ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin),v=_[u.origin]??u.origin;if(z)return`Demasiado pequeño: se esperaba que ${v} tuviera ${g}${u.minimum.toString()} ${z.unit}`;return`Demasiado pequeño: se esperaba que ${v} fuera ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Cadena inválida: debe comenzar con "${g.prefix}"`;if(g.format==="ends_with")return`Cadena inválida: debe terminar en "${g.suffix}"`;if(g.format==="includes")return`Cadena inválida: debe incluir "${g.includes}"`;if(g.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${g.pattern}`;return`Inválido ${U[g.format]??u.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${u.divisor}`;case"unrecognized_keys":return`Llave${u.keys.length>1?"s":""} desconocida${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Llave inválida en ${_[u.origin]??u.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${_[u.origin]??u.origin}`;default:return"Entrada inválida"}}};function wJ(){return{localeError:eA()}}var sA=()=>{let $={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function I(u){return $[u]??null}let U={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},_={nan:"NaN",number:"عدد",array:"آرایه"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`ورودی نامعتبر: می‌بایست instanceof ${u.expected} می‌بود، ${v} دریافت شد`;return`ورودی نامعتبر: می‌بایست ${g} می‌بود، ${v} دریافت شد`}case"invalid_value":if(u.values.length===1)return`ورودی نامعتبر: می‌بایست ${j(u.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${W(u.values,"|")} می‌بود`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`خیلی بزرگ: ${u.origin??"مقدار"} باید ${g}${u.maximum.toString()} ${z.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${u.origin??"مقدار"} باید ${g}${u.maximum.toString()} باشد`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`خیلی کوچک: ${u.origin} باید ${g}${u.minimum.toString()} ${z.unit} باشد`;return`خیلی کوچک: ${u.origin} باید ${g}${u.minimum.toString()} باشد`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`رشته نامعتبر: باید با "${g.prefix}" شروع شود`;if(g.format==="ends_with")return`رشته نامعتبر: باید با "${g.suffix}" تمام شود`;if(g.format==="includes")return`رشته نامعتبر: باید شامل "${g.includes}" باشد`;if(g.format==="regex")return`رشته نامعتبر: باید با الگوی ${g.pattern} مطابقت داشته باشد`;return`${U[g.format]??u.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${u.divisor} باشد`;case"unrecognized_keys":return`کلید${u.keys.length>1?"های":""} ناشناس: ${W(u.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${u.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${u.origin}`;default:return"ورودی نامعتبر"}}};function EJ(){return{localeError:sA()}}var $b=()=>{let $={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function I(u){return $[u]??null}let U={regex:"säännöllinen lauseke",email:"sähköpostiosoite",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äivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Virheellinen tyyppi: odotettiin instanceof ${u.expected}, oli ${v}`;return`Virheellinen tyyppi: odotettiin ${g}, oli ${v}`}case"invalid_value":if(u.values.length===1)return`Virheellinen syöte: täytyy olla ${j(u.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Liian suuri: ${z.subject} täytyy olla ${g}${u.maximum.toString()} ${z.unit}`.trim();return`Liian suuri: arvon täytyy olla ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Liian pieni: ${z.subject} täytyy olla ${g}${u.minimum.toString()} ${z.unit}`.trim();return`Liian pieni: arvon täytyy olla ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${g.prefix}"`;if(g.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${g.suffix}"`;if(g.format==="includes")return`Virheellinen syöte: täytyy sisältää "${g.includes}"`;if(g.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${g.pattern}`;return`Virheellinen ${U[g.format]??u.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${u.divisor} monikerta`;case"unrecognized_keys":return`${u.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${W(u.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öte"}}};function CJ(){return{localeError:$b()}}var Ib=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function I(u){return $[u]??null}let U={regex:"entrée",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ée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},_={nan:"NaN",number:"nombre",array:"tableau"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Entrée invalide : instanceof ${u.expected} attendu, ${v} reçu`;return`Entrée invalide : ${g} attendu, ${v} reçu`}case"invalid_value":if(u.values.length===1)return`Entrée invalide : ${j(u.values[0])} attendu`;return`Option invalide : une valeur parmi ${W(u.values,"|")} attendue`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Trop grand : ${u.origin??"valeur"} doit ${z.verb} ${g}${u.maximum.toString()} ${z.unit??"élément(s)"}`;return`Trop grand : ${u.origin??"valeur"} doit être ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Trop petit : ${u.origin} doit ${z.verb} ${g}${u.minimum.toString()} ${z.unit}`;return`Trop petit : ${u.origin} doit être ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Chaîne invalide : doit commencer par "${g.prefix}"`;if(g.format==="ends_with")return`Chaîne invalide : doit se terminer par "${g.suffix}"`;if(g.format==="includes")return`Chaîne invalide : doit inclure "${g.includes}"`;if(g.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${g.pattern}`;return`${U[g.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${u.divisor}`;case"unrecognized_keys":return`Clé${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${W(u.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${u.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entrée invalide"}}};function fJ(){return{localeError:Ib()}}var ub=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function I(u){return $[u]??null}let U={regex:"entrée",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ée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Entrée invalide : attendu instanceof ${u.expected}, reçu ${v}`;return`Entrée invalide : attendu ${g}, reçu ${v}`}case"invalid_value":if(u.values.length===1)return`Entrée invalide : attendu ${j(u.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"≤":"<",z=I(u.origin);if(z)return`Trop grand : attendu que ${u.origin??"la valeur"} ait ${g}${u.maximum.toString()} ${z.unit}`;return`Trop grand : attendu que ${u.origin??"la valeur"} soit ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?"≥":">",z=I(u.origin);if(z)return`Trop petit : attendu que ${u.origin} ait ${g}${u.minimum.toString()} ${z.unit}`;return`Trop petit : attendu que ${u.origin} soit ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Chaîne invalide : doit commencer par "${g.prefix}"`;if(g.format==="ends_with")return`Chaîne invalide : doit se terminer par "${g.suffix}"`;if(g.format==="includes")return`Chaîne invalide : doit inclure "${g.includes}"`;if(g.format==="regex")return`Chaîne invalide : doit correspondre au motif ${g.pattern}`;return`${U[g.format]??u.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${u.divisor}`;case"unrecognized_keys":return`Clé${u.keys.length>1?"s":""} non reconnue${u.keys.length>1?"s":""} : ${W(u.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${u.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${u.origin}`;default:return"Entrée invalide"}}};function xJ(){return{localeError:ub()}}var Ub=()=>{let $={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},I={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},U=(N)=>N?$[N]:void 0,_=(N)=>{let X=U(N);if(X)return X.label;return N??$.unknown.label},u=(N)=>`ה${_(N)}`,g=(N)=>{return(U(N)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות"},z=(N)=>{if(!N)return null;return I[N]??null},v={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},J={nan:"NaN"};return(N)=>{switch(N.code){case"invalid_type":{let X=N.expected,G=J[X??""]??_(X),q=S(N.input),T=J[q]??$[q]?.label??q;if(/^[A-Z]/.test(N.expected))return`קלט לא תקין: צריך להיות instanceof ${N.expected}, התקבל ${T}`;return`קלט לא תקין: צריך להיות ${G}, התקבל ${T}`}case"invalid_value":{if(N.values.length===1)return`ערך לא תקין: הערך חייב להיות ${j(N.values[0])}`;let X=N.values.map((T)=>j(T));if(N.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${X[0]} או ${X[1]}`;let G=X[X.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${X.slice(0,-1).join(", ")} או ${G}`}case"too_big":{let X=z(N.origin),G=u(N.origin??"value");if(N.origin==="string")return`${X?.longLabel??"ארוך"} מדי: ${G} צריכה להכיל ${N.maximum.toString()} ${X?.unit??""} ${N.inclusive?"או פחות":"לכל היותר"}`.trim();if(N.origin==="number"){let H=N.inclusive?`קטן או שווה ל-${N.maximum}`:`קטן מ-${N.maximum}`;return`גדול מדי: ${G} צריך להיות ${H}`}if(N.origin==="array"||N.origin==="set"){let H=N.origin==="set"?"צריכה":"צריך",Q=N.inclusive?`${N.maximum} ${X?.unit??""} או פחות`:`פחות מ-${N.maximum} ${X?.unit??""}`;return`גדול מדי: ${G} ${H} להכיל ${Q}`.trim()}let q=N.inclusive?"<=":"<",T=g(N.origin??"value");if(X?.unit)return`${X.longLabel} מדי: ${G} ${T} ${q}${N.maximum.toString()} ${X.unit}`;return`${X?.longLabel??"גדול"} מדי: ${G} ${T} ${q}${N.maximum.toString()}`}case"too_small":{let X=z(N.origin),G=u(N.origin??"value");if(N.origin==="string")return`${X?.shortLabel??"קצר"} מדי: ${G} צריכה להכיל ${N.minimum.toString()} ${X?.unit??""} ${N.inclusive?"או יותר":"לפחות"}`.trim();if(N.origin==="number"){let H=N.inclusive?`גדול או שווה ל-${N.minimum}`:`גדול מ-${N.minimum}`;return`קטן מדי: ${G} צריך להיות ${H}`}if(N.origin==="array"||N.origin==="set"){let H=N.origin==="set"?"צריכה":"צריך";if(N.minimum===1&&N.inclusive){let Y=N.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${G} ${H} להכיל ${Y}`}let Q=N.inclusive?`${N.minimum} ${X?.unit??""} או יותר`:`יותר מ-${N.minimum} ${X?.unit??""}`;return`קטן מדי: ${G} ${H} להכיל ${Q}`.trim()}let q=N.inclusive?">=":">",T=g(N.origin??"value");if(X?.unit)return`${X.shortLabel} מדי: ${G} ${T} ${q}${N.minimum.toString()} ${X.unit}`;return`${X?.shortLabel??"קטן"} מדי: ${G} ${T} ${q}${N.minimum.toString()}`}case"invalid_format":{let X=N;if(X.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${X.prefix}"`;if(X.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${X.suffix}"`;if(X.format==="includes")return`המחרוזת חייבת לכלול "${X.includes}"`;if(X.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${X.pattern}`;let G=v[X.format],q=G?.label??X.format,H=(G?.gender??"m")==="f"?"תקינה":"תקין";return`${q} לא ${H}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${N.divisor}`;case"unrecognized_keys":return`מפתח${N.keys.length>1?"ות":""} לא מזוה${N.keys.length>1?"ים":"ה"}: ${W(N.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${u(N.origin??"array")}`;default:return"קלט לא תקין"}}};function kJ(){return{localeError:Ub()}}var _b=()=>{let $={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function I(u){return $[u]??null}let U={regex:"bemenet",email:"email cím",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őbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},_={nan:"NaN",number:"szám",array:"tömb"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Érvénytelen bemenet: a várt érték instanceof ${u.expected}, a kapott érték ${v}`;return`Érvénytelen bemenet: a várt érték ${g}, a kapott érték ${v}`}case"invalid_value":if(u.values.length===1)return`Érvénytelen bemenet: a várt érték ${j(u.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Túl nagy: ${u.origin??"érték"} mérete túl nagy ${g}${u.maximum.toString()} ${z.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${u.origin??"érték"} túl nagy: ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Túl kicsi: a bemeneti érték ${u.origin} mérete túl kicsi ${g}${u.minimum.toString()} ${z.unit}`;return`Túl kicsi: a bemeneti érték ${u.origin} túl kicsi ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Érvénytelen string: "${g.prefix}" értékkel kell kezdődnie`;if(g.format==="ends_with")return`Érvénytelen string: "${g.suffix}" értékkel kell végződnie`;if(g.format==="includes")return`Érvénytelen string: "${g.includes}" értéket kell tartalmaznia`;if(g.format==="regex")return`Érvénytelen string: ${g.pattern} mintának kell megfelelnie`;return`Érvénytelen ${U[g.format]??u.format}`}case"not_multiple_of":return`Érvénytelen szám: ${u.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${u.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${u.origin}`;default:return"Érvénytelen bemenet"}}};function yJ(){return{localeError:_b()}}function a5($,I,U){return Math.abs($)===1?I:U}function r1($){if(!$)return"";let I=["ա","ե","ը","ի","ո","ու","օ"],U=$[$.length-1];return $+(I.includes(U)?"ն":"ը")}var gb=()=>{let $={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function I(u){return $[u]??null}let U={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},_={nan:"NaN",number:"թիվ",array:"զանգված"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${u.expected}, ստացվել է ${v}`;return`Սխալ մուտքագրում․ սպասվում էր ${g}, ստացվել է ${v}`}case"invalid_value":if(u.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${j(u.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z){let v=Number(u.maximum),J=a5(v,z.unit.one,z.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${r1(u.origin??"արժեք")} կունենա ${g}${u.maximum.toString()} ${J}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${r1(u.origin??"արժեք")} լինի ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z){let v=Number(u.minimum),J=a5(v,z.unit.one,z.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${r1(u.origin)} կունենա ${g}${u.minimum.toString()} ${J}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${r1(u.origin)} լինի ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${g.prefix}"-ով`;if(g.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${g.suffix}"-ով`;if(g.format==="includes")return`Սխալ տող․ պետք է պարունակի "${g.includes}"`;if(g.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${g.pattern} ձևաչափին`;return`Սխալ ${U[g.format]??u.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${u.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${u.keys.length>1?"ներ":""}. ${W(u.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${r1(u.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${r1(u.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function iJ(){return{localeError:gb()}}var zb=()=>{let $={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function I(u){return $[u]??null}let U={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Input tidak valid: diharapkan instanceof ${u.expected}, diterima ${v}`;return`Input tidak valid: diharapkan ${g}, diterima ${v}`}case"invalid_value":if(u.values.length===1)return`Input tidak valid: diharapkan ${j(u.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Terlalu besar: diharapkan ${u.origin??"value"} memiliki ${g}${u.maximum.toString()} ${z.unit??"elemen"}`;return`Terlalu besar: diharapkan ${u.origin??"value"} menjadi ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Terlalu kecil: diharapkan ${u.origin} memiliki ${g}${u.minimum.toString()} ${z.unit}`;return`Terlalu kecil: diharapkan ${u.origin} menjadi ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`String tidak valid: harus dimulai dengan "${g.prefix}"`;if(g.format==="ends_with")return`String tidak valid: harus berakhir dengan "${g.suffix}"`;if(g.format==="includes")return`String tidak valid: harus menyertakan "${g.includes}"`;if(g.format==="regex")return`String tidak valid: harus sesuai pola ${g.pattern}`;return`${U[g.format]??u.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${u.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${u.origin}`;default:return"Input tidak valid"}}};function rJ(){return{localeError:zb()}}var vb=()=>{let $={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function I(u){return $[u]??null}let U={regex:"gildi",email:"netfang",url:"vefslóð",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ími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},_={nan:"NaN",number:"númer",array:"fylki"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Rangt gildi: Þú slóst inn ${v} þar sem á að vera instanceof ${u.expected}`;return`Rangt gildi: Þú slóst inn ${v} þar sem á að vera ${g}`}case"invalid_value":if(u.values.length===1)return`Rangt gildi: gert ráð fyrir ${j(u.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Of stórt: gert er ráð fyrir að ${u.origin??"gildi"} hafi ${g}${u.maximum.toString()} ${z.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${u.origin??"gildi"} sé ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Of lítið: gert er ráð fyrir að ${u.origin} hafi ${g}${u.minimum.toString()} ${z.unit}`;return`Of lítið: gert er ráð fyrir að ${u.origin} sé ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ógildur strengur: verður að byrja á "${g.prefix}"`;if(g.format==="ends_with")return`Ógildur strengur: verður að enda á "${g.suffix}"`;if(g.format==="includes")return`Ógildur strengur: verður að innihalda "${g.includes}"`;if(g.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${g.pattern}`;return`Rangt ${U[g.format]??u.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${u.divisor}`;case"unrecognized_keys":return`Óþekkt ${u.keys.length>1?"ir lyklar":"ur lykill"}: ${W(u.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${u.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${u.origin}`;default:return"Rangt gildi"}}};function nJ(){return{localeError:vb()}}var Jb=()=>{let $={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function I(u){return $[u]??null}let U={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},_={nan:"NaN",number:"numero",array:"vettore"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Input non valido: atteso instanceof ${u.expected}, ricevuto ${v}`;return`Input non valido: atteso ${g}, ricevuto ${v}`}case"invalid_value":if(u.values.length===1)return`Input non valido: atteso ${j(u.values[0])}`;return`Opzione non valida: atteso uno tra ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Troppo grande: ${u.origin??"valore"} deve avere ${g}${u.maximum.toString()} ${z.unit??"elementi"}`;return`Troppo grande: ${u.origin??"valore"} deve essere ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Troppo piccolo: ${u.origin} deve avere ${g}${u.minimum.toString()} ${z.unit}`;return`Troppo piccolo: ${u.origin} deve essere ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Stringa non valida: deve iniziare con "${g.prefix}"`;if(g.format==="ends_with")return`Stringa non valida: deve terminare con "${g.suffix}"`;if(g.format==="includes")return`Stringa non valida: deve includere "${g.includes}"`;if(g.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${g.pattern}`;return`Invalid ${U[g.format]??u.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${u.divisor}`;case"unrecognized_keys":return`Chiav${u.keys.length>1?"i":"e"} non riconosciut${u.keys.length>1?"e":"a"}: ${W(u.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${u.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${u.origin}`;default:return"Input non valido"}}};function lJ(){return{localeError:Jb()}}var Nb=()=>{let $={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function I(u){return $[u]??null}let U={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},_={nan:"NaN",number:"数値",array:"配列"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`無効な入力: instanceof ${u.expected}が期待されましたが、${v}が入力されました`;return`無効な入力: ${g}が期待されましたが、${v}が入力されました`}case"invalid_value":if(u.values.length===1)return`無効な入力: ${j(u.values[0])}が期待されました`;return`無効な選択: ${W(u.values,"、")}のいずれかである必要があります`;case"too_big":{let g=u.inclusive?"以下である":"より小さい",z=I(u.origin);if(z)return`大きすぎる値: ${u.origin??"値"}は${u.maximum.toString()}${z.unit??"要素"}${g}必要があります`;return`大きすぎる値: ${u.origin??"値"}は${u.maximum.toString()}${g}必要があります`}case"too_small":{let g=u.inclusive?"以上である":"より大きい",z=I(u.origin);if(z)return`小さすぎる値: ${u.origin}は${u.minimum.toString()}${z.unit}${g}必要があります`;return`小さすぎる値: ${u.origin}は${u.minimum.toString()}${g}必要があります`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`無効な文字列: "${g.prefix}"で始まる必要があります`;if(g.format==="ends_with")return`無効な文字列: "${g.suffix}"で終わる必要があります`;if(g.format==="includes")return`無効な文字列: "${g.includes}"を含む必要があります`;if(g.format==="regex")return`無効な文字列: パターン${g.pattern}に一致する必要があります`;return`無効な${U[g.format]??u.format}`}case"not_multiple_of":return`無効な数値: ${u.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${u.keys.length>1?"群":""}: ${W(u.keys,"、")}`;case"invalid_key":return`${u.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${u.origin}内の無効な値`;default:return"無効な入力"}}};function mJ(){return{localeError:Nb()}}var Gb=()=>{let $={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function I(u){return $[u]??null}let U={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},_={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${u.expected}, მიღებული ${v}`;return`არასწორი შეყვანა: მოსალოდნელი ${g}, მიღებული ${v}`}case"invalid_value":if(u.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${j(u.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${W(u.values,"|")}-დან`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`ზედმეტად დიდი: მოსალოდნელი ${u.origin??"მნიშვნელობა"} ${z.verb} ${g}${u.maximum.toString()} ${z.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${u.origin??"მნიშვნელობა"} იყოს ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`ზედმეტად პატარა: მოსალოდნელი ${u.origin} ${z.verb} ${g}${u.minimum.toString()} ${z.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${u.origin} იყოს ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`არასწორი სტრინგი: უნდა იწყებოდეს "${g.prefix}"-ით`;if(g.format==="ends_with")return`არასწორი სტრინგი: უნდა მთავრდებოდეს "${g.suffix}"-ით`;if(g.format==="includes")return`არასწორი სტრინგი: უნდა შეიცავდეს "${g.includes}"-ს`;if(g.format==="regex")return`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${g.pattern}`;return`არასწორი ${U[g.format]??u.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${u.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${u.keys.length>1?"ები":"ი"}: ${W(u.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${u.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${u.origin}-ში`;default:return"არასწორი შეყვანა"}}};function hJ(){return{localeError:Gb()}}var Xb=()=>{let $={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function I(u){return $[u]??null}let U={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},_={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${u.expected} ប៉ុន្តែទទួលបាន ${v}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${g} ប៉ុន្តែទទួលបាន ${v}`}case"invalid_value":if(u.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${j(u.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`ធំពេក៖ ត្រូវការ ${u.origin??"តម្លៃ"} ${g} ${u.maximum.toString()} ${z.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${u.origin??"តម្លៃ"} ${g} ${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`តូចពេក៖ ត្រូវការ ${u.origin} ${g} ${u.minimum.toString()} ${z.unit}`;return`តូចពេក៖ ត្រូវការ ${u.origin} ${g} ${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${g.prefix}"`;if(g.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${g.suffix}"`;if(g.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${g.includes}"`;if(g.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${g.pattern}`;return`មិនត្រឹមត្រូវ៖ ${U[g.format]??u.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${u.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${W(u.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${u.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${u.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Q0(){return{localeError:Xb()}}function cJ(){return Q0()}var qb=()=>{let $={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function I(u){return $[u]??null}let U={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`잘못된 입력: 예상 타입은 instanceof ${u.expected}, 받은 타입은 ${v}입니다`;return`잘못된 입력: 예상 타입은 ${g}, 받은 타입은 ${v}입니다`}case"invalid_value":if(u.values.length===1)return`잘못된 입력: 값은 ${j(u.values[0])} 이어야 합니다`;return`잘못된 옵션: ${W(u.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let g=u.inclusive?"이하":"미만",z=g==="미만"?"이어야 합니다":"여야 합니다",v=I(u.origin),J=v?.unit??"요소";if(v)return`${u.origin??"값"}이 너무 큽니다: ${u.maximum.toString()}${J} ${g}${z}`;return`${u.origin??"값"}이 너무 큽니다: ${u.maximum.toString()} ${g}${z}`}case"too_small":{let g=u.inclusive?"이상":"초과",z=g==="이상"?"이어야 합니다":"여야 합니다",v=I(u.origin),J=v?.unit??"요소";if(v)return`${u.origin??"값"}이 너무 작습니다: ${u.minimum.toString()}${J} ${g}${z}`;return`${u.origin??"값"}이 너무 작습니다: ${u.minimum.toString()} ${g}${z}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`잘못된 문자열: "${g.prefix}"(으)로 시작해야 합니다`;if(g.format==="ends_with")return`잘못된 문자열: "${g.suffix}"(으)로 끝나야 합니다`;if(g.format==="includes")return`잘못된 문자열: "${g.includes}"을(를) 포함해야 합니다`;if(g.format==="regex")return`잘못된 문자열: 정규식 ${g.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${U[g.format]??u.format}`}case"not_multiple_of":return`잘못된 숫자: ${u.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${W(u.keys,", ")}`;case"invalid_key":return`잘못된 키: ${u.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${u.origin}`;default:return"잘못된 입력"}}};function dJ(){return{localeError:qb()}}var T0=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)};function e5($){let I=Math.abs($),U=I%10,_=I%100;if(_>=11&&_<=19||U===0)return"many";if(U===1)return"one";return"few"}var Qb=()=>{let $={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function I(u,g,z,v){let J=$[u]??null;if(J===null)return J;return{unit:J.unit[g],verb:J.verb[v][z?"inclusive":"notInclusive"]}}let U={regex:"įvestis",email:"el. pašto 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ė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},_={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Gautas tipas ${v}, o tikėtasi - instanceof ${u.expected}`;return`Gautas tipas ${v}, o tikėtasi - ${g}`}case"invalid_value":if(u.values.length===1)return`Privalo būti ${j(u.values[0])}`;return`Privalo būti vienas iš ${W(u.values,"|")} pasirinkimų`;case"too_big":{let g=_[u.origin]??u.origin,z=I(u.origin,e5(Number(u.maximum)),u.inclusive??!1,"smaller");if(z?.verb)return`${T0(g??u.origin??"reikšmė")} ${z.verb} ${u.maximum.toString()} ${z.unit??"elementų"}`;let v=u.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${T0(g??u.origin??"reikšmė")} turi būti ${v} ${u.maximum.toString()} ${z?.unit}`}case"too_small":{let g=_[u.origin]??u.origin,z=I(u.origin,e5(Number(u.minimum)),u.inclusive??!1,"bigger");if(z?.verb)return`${T0(g??u.origin??"reikšmė")} ${z.verb} ${u.minimum.toString()} ${z.unit??"elementų"}`;let v=u.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${T0(g??u.origin??"reikšmė")} turi būti ${v} ${u.minimum.toString()} ${z?.unit}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Eilutė privalo prasidėti "${g.prefix}"`;if(g.format==="ends_with")return`Eilutė privalo pasibaigti "${g.suffix}"`;if(g.format==="includes")return`Eilutė privalo įtraukti "${g.includes}"`;if(g.format==="regex")return`Eilutė privalo atitikti ${g.pattern}`;return`Neteisingas ${U[g.format]??u.format}`}case"not_multiple_of":return`Skaičius privalo būti ${u.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${u.keys.length>1?"i":"as"} rakt${u.keys.length>1?"ai":"as"}: ${W(u.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let g=_[u.origin]??u.origin;return`${T0(g??u.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function pJ(){return{localeError:Qb()}}var Tb=()=>{let $={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function I(u){return $[u]??null}let U={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},_={nan:"NaN",number:"број",array:"низа"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Грешен внес: се очекува instanceof ${u.expected}, примено ${v}`;return`Грешен внес: се очекува ${g}, примено ${v}`}case"invalid_value":if(u.values.length===1)return`Invalid input: expected ${j(u.values[0])}`;return`Грешана опција: се очекува една ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Премногу голем: се очекува ${u.origin??"вредноста"} да има ${g}${u.maximum.toString()} ${z.unit??"елементи"}`;return`Премногу голем: се очекува ${u.origin??"вредноста"} да биде ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Премногу мал: се очекува ${u.origin} да има ${g}${u.minimum.toString()} ${z.unit}`;return`Премногу мал: се очекува ${u.origin} да биде ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Неважечка низа: мора да започнува со "${g.prefix}"`;if(g.format==="ends_with")return`Неважечка низа: мора да завршува со "${g.suffix}"`;if(g.format==="includes")return`Неважечка низа: мора да вклучува "${g.includes}"`;if(g.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${g.pattern}`;return`Invalid ${U[g.format]??u.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${W(u.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${u.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${u.origin}`;default:return"Грешен внес"}}};function oJ(){return{localeError:Tb()}}var Hb=()=>{let $={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function I(u){return $[u]??null}let U={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},_={nan:"NaN",number:"nombor"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Input tidak sah: dijangka instanceof ${u.expected}, diterima ${v}`;return`Input tidak sah: dijangka ${g}, diterima ${v}`}case"invalid_value":if(u.values.length===1)return`Input tidak sah: dijangka ${j(u.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Terlalu besar: dijangka ${u.origin??"nilai"} ${z.verb} ${g}${u.maximum.toString()} ${z.unit??"elemen"}`;return`Terlalu besar: dijangka ${u.origin??"nilai"} adalah ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Terlalu kecil: dijangka ${u.origin} ${z.verb} ${g}${u.minimum.toString()} ${z.unit}`;return`Terlalu kecil: dijangka ${u.origin} adalah ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`String tidak sah: mesti bermula dengan "${g.prefix}"`;if(g.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${g.suffix}"`;if(g.format==="includes")return`String tidak sah: mesti mengandungi "${g.includes}"`;if(g.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${g.pattern}`;return`${U[g.format]??u.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${u.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${W(u.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${u.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${u.origin}`;default:return"Input tidak sah"}}};function tJ(){return{localeError:Hb()}}var Yb=()=>{let $={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function I(u){return $[u]??null}let U={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},_={nan:"NaN",number:"getal"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ongeldige invoer: verwacht instanceof ${u.expected}, ontving ${v}`;return`Ongeldige invoer: verwacht ${g}, ontving ${v}`}case"invalid_value":if(u.values.length===1)return`Ongeldige invoer: verwacht ${j(u.values[0])}`;return`Ongeldige optie: verwacht één van ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin),v=u.origin==="date"?"laat":u.origin==="string"?"lang":"groot";if(z)return`Te ${v}: verwacht dat ${u.origin??"waarde"} ${g}${u.maximum.toString()} ${z.unit??"elementen"} ${z.verb}`;return`Te ${v}: verwacht dat ${u.origin??"waarde"} ${g}${u.maximum.toString()} is`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin),v=u.origin==="date"?"vroeg":u.origin==="string"?"kort":"klein";if(z)return`Te ${v}: verwacht dat ${u.origin} ${g}${u.minimum.toString()} ${z.unit} ${z.verb}`;return`Te ${v}: verwacht dat ${u.origin} ${g}${u.minimum.toString()} is`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ongeldige tekst: moet met "${g.prefix}" beginnen`;if(g.format==="ends_with")return`Ongeldige tekst: moet op "${g.suffix}" eindigen`;if(g.format==="includes")return`Ongeldige tekst: moet "${g.includes}" bevatten`;if(g.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${g.pattern}`;return`Ongeldig: ${U[g.format]??u.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${u.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${u.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${u.origin}`;default:return"Ongeldige invoer"}}};function aJ(){return{localeError:Yb()}}var Ob=()=>{let $={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function I(u){return $[u]??null}let U={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},_={nan:"NaN",number:"tall",array:"liste"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ugyldig input: forventet instanceof ${u.expected}, fikk ${v}`;return`Ugyldig input: forventet ${g}, fikk ${v}`}case"invalid_value":if(u.values.length===1)return`Ugyldig verdi: forventet ${j(u.values[0])}`;return`Ugyldig valg: forventet en av ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`For stor(t): forventet ${u.origin??"value"} til å ha ${g}${u.maximum.toString()} ${z.unit??"elementer"}`;return`For stor(t): forventet ${u.origin??"value"} til å ha ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`For lite(n): forventet ${u.origin} til å ha ${g}${u.minimum.toString()} ${z.unit}`;return`For lite(n): forventet ${u.origin} til å ha ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ugyldig streng: må starte med "${g.prefix}"`;if(g.format==="ends_with")return`Ugyldig streng: må ende med "${g.suffix}"`;if(g.format==="includes")return`Ugyldig streng: må inneholde "${g.includes}"`;if(g.format==="regex")return`Ugyldig streng: må matche mønsteret ${g.pattern}`;return`Ugyldig ${U[g.format]??u.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${W(u.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${u.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${u.origin}`;default:return"Ugyldig input"}}};function eJ(){return{localeError:Ob()}}var Vb=()=>{let $={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function I(u){return $[u]??null}let U={regex:"giren",email:"epostagâh",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âmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},_={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Fâsit giren: umulan instanceof ${u.expected}, alınan ${v}`;return`Fâsit giren: umulan ${g}, alınan ${v}`}case"invalid_value":if(u.values.length===1)return`Fâsit giren: umulan ${j(u.values[0])}`;return`Fâsit tercih: mûteberler ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Fazla büyük: ${u.origin??"value"}, ${g}${u.maximum.toString()} ${z.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${u.origin??"value"}, ${g}${u.maximum.toString()} olmalıydı.`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Fazla küçük: ${u.origin}, ${g}${u.minimum.toString()} ${z.unit} sahip olmalıydı.`;return`Fazla küçük: ${u.origin}, ${g}${u.minimum.toString()} olmalıydı.`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Fâsit metin: "${g.prefix}" ile başlamalı.`;if(g.format==="ends_with")return`Fâsit metin: "${g.suffix}" ile bitmeli.`;if(g.format==="includes")return`Fâsit metin: "${g.includes}" ihtivâ etmeli.`;if(g.format==="regex")return`Fâsit metin: ${g.pattern} nakşına uymalı.`;return`Fâsit ${U[g.format]??u.format}`}case"not_multiple_of":return`Fâsit sayı: ${u.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${u.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function sJ(){return{localeError:Vb()}}var Db=()=>{let $={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function I(u){return $[u]??null}let U={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},_={nan:"NaN",number:"عدد",array:"ارې"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`ناسم ورودي: باید instanceof ${u.expected} وای, مګر ${v} ترلاسه شو`;return`ناسم ورودي: باید ${g} وای, مګر ${v} ترلاسه شو`}case"invalid_value":if(u.values.length===1)return`ناسم ورودي: باید ${j(u.values[0])} وای`;return`ناسم انتخاب: باید یو له ${W(u.values,"|")} څخه وای`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`ډیر لوی: ${u.origin??"ارزښت"} باید ${g}${u.maximum.toString()} ${z.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${u.origin??"ارزښت"} باید ${g}${u.maximum.toString()} وي`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`ډیر کوچنی: ${u.origin} باید ${g}${u.minimum.toString()} ${z.unit} ولري`;return`ډیر کوچنی: ${u.origin} باید ${g}${u.minimum.toString()} وي`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`ناسم متن: باید د "${g.prefix}" سره پیل شي`;if(g.format==="ends_with")return`ناسم متن: باید د "${g.suffix}" سره پای ته ورسيږي`;if(g.format==="includes")return`ناسم متن: باید "${g.includes}" ولري`;if(g.format==="regex")return`ناسم متن: باید د ${g.pattern} سره مطابقت ولري`;return`${U[g.format]??u.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${u.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${u.keys.length>1?"کلیډونه":"کلیډ"}: ${W(u.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${u.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${u.origin} کې`;default:return"ناسمه ورودي"}}};function $N(){return{localeError:Db()}}var Bb=()=>{let $={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function I(u){return $[u]??null}let U={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},_={nan:"NaN",number:"liczba",array:"tablica"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${u.expected}, otrzymano ${v}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${g}, otrzymano ${v}`}case"invalid_value":if(u.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${j(u.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Za duża wartość: oczekiwano, że ${u.origin??"wartość"} będzie mieć ${g}${u.maximum.toString()} ${z.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${u.origin??"wartość"} będzie wynosić ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Za mała wartość: oczekiwano, że ${u.origin??"wartość"} będzie mieć ${g}${u.minimum.toString()} ${z.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${u.origin??"wartość"} będzie wynosić ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${g.prefix}"`;if(g.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${g.suffix}"`;if(g.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${g.includes}"`;if(g.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${g.pattern}`;return`Nieprawidłow(y/a/e) ${U[g.format]??u.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${u.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${u.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${u.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function IN(){return{localeError:Bb()}}var Mb=()=>{let $={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function I(u){return $[u]??null}let U={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},_={nan:"NaN",number:"número",null:"nulo"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Tipo inválido: esperado instanceof ${u.expected}, recebido ${v}`;return`Tipo inválido: esperado ${g}, recebido ${v}`}case"invalid_value":if(u.values.length===1)return`Entrada inválida: esperado ${j(u.values[0])}`;return`Opção inválida: esperada uma das ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Muito grande: esperado que ${u.origin??"valor"} tivesse ${g}${u.maximum.toString()} ${z.unit??"elementos"}`;return`Muito grande: esperado que ${u.origin??"valor"} fosse ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Muito pequeno: esperado que ${u.origin} tivesse ${g}${u.minimum.toString()} ${z.unit}`;return`Muito pequeno: esperado que ${u.origin} fosse ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Texto inválido: deve começar com "${g.prefix}"`;if(g.format==="ends_with")return`Texto inválido: deve terminar com "${g.suffix}"`;if(g.format==="includes")return`Texto inválido: deve incluir "${g.includes}"`;if(g.format==="regex")return`Texto inválido: deve corresponder ao padrão ${g.pattern}`;return`${U[g.format]??u.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${u.divisor}`;case"unrecognized_keys":return`Chave${u.keys.length>1?"s":""} desconhecida${u.keys.length>1?"s":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Chave inválida em ${u.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${u.origin}`;default:return"Campo inválido"}}};function uN(){return{localeError:Mb()}}function s5($,I,U,_){let u=Math.abs($),g=u%10,z=u%100;if(z>=11&&z<=19)return _;if(g===1)return I;if(g>=2&&g<=4)return U;return _}var Kb=()=>{let $={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function I(u){return $[u]??null}let U={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},_={nan:"NaN",number:"число",array:"массив"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Неверный ввод: ожидалось instanceof ${u.expected}, получено ${v}`;return`Неверный ввод: ожидалось ${g}, получено ${v}`}case"invalid_value":if(u.values.length===1)return`Неверный ввод: ожидалось ${j(u.values[0])}`;return`Неверный вариант: ожидалось одно из ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z){let v=Number(u.maximum),J=s5(v,z.unit.one,z.unit.few,z.unit.many);return`Слишком большое значение: ожидалось, что ${u.origin??"значение"} будет иметь ${g}${u.maximum.toString()} ${J}`}return`Слишком большое значение: ожидалось, что ${u.origin??"значение"} будет ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z){let v=Number(u.minimum),J=s5(v,z.unit.one,z.unit.few,z.unit.many);return`Слишком маленькое значение: ожидалось, что ${u.origin} будет иметь ${g}${u.minimum.toString()} ${J}`}return`Слишком маленькое значение: ожидалось, что ${u.origin} будет ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Неверная строка: должна начинаться с "${g.prefix}"`;if(g.format==="ends_with")return`Неверная строка: должна заканчиваться на "${g.suffix}"`;if(g.format==="includes")return`Неверная строка: должна содержать "${g.includes}"`;if(g.format==="regex")return`Неверная строка: должна соответствовать шаблону ${g.pattern}`;return`Неверный ${U[g.format]??u.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${u.divisor}`;case"unrecognized_keys":return`Нераспознанн${u.keys.length>1?"ые":"ый"} ключ${u.keys.length>1?"и":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${u.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${u.origin}`;default:return"Неверные входные данные"}}};function UN(){return{localeError:Kb()}}var Rb=()=>{let $={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function I(u){return $[u]??null}let U={regex:"vnos",email:"e-poštni 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 čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},_={nan:"NaN",number:"število",array:"tabela"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Neveljaven vnos: pričakovano instanceof ${u.expected}, prejeto ${v}`;return`Neveljaven vnos: pričakovano ${g}, prejeto ${v}`}case"invalid_value":if(u.values.length===1)return`Neveljaven vnos: pričakovano ${j(u.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Preveliko: pričakovano, da bo ${u.origin??"vrednost"} imelo ${g}${u.maximum.toString()} ${z.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${u.origin??"vrednost"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Premajhno: pričakovano, da bo ${u.origin} imelo ${g}${u.minimum.toString()} ${z.unit}`;return`Premajhno: pričakovano, da bo ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Neveljaven niz: mora se začeti z "${g.prefix}"`;if(g.format==="ends_with")return`Neveljaven niz: mora se končati z "${g.suffix}"`;if(g.format==="includes")return`Neveljaven niz: mora vsebovati "${g.includes}"`;if(g.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${g.pattern}`;return`Neveljaven ${U[g.format]??u.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${u.divisor}`;case"unrecognized_keys":return`Neprepoznan${u.keys.length>1?"i ključi":" ključ"}: ${W(u.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${u.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${u.origin}`;default:return"Neveljaven vnos"}}};function _N(){return{localeError:Rb()}}var Lb=()=>{let $={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function I(u){return $[u]??null}let U={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},_={nan:"NaN",number:"antal",array:"lista"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ogiltig inmatning: förväntat instanceof ${u.expected}, fick ${v}`;return`Ogiltig inmatning: förväntat ${g}, fick ${v}`}case"invalid_value":if(u.values.length===1)return`Ogiltig inmatning: förväntat ${j(u.values[0])}`;return`Ogiltigt val: förväntade en av ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`För stor(t): förväntade ${u.origin??"värdet"} att ha ${g}${u.maximum.toString()} ${z.unit??"element"}`;return`För stor(t): förväntat ${u.origin??"värdet"} att ha ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`För lite(t): förväntade ${u.origin??"värdet"} att ha ${g}${u.minimum.toString()} ${z.unit}`;return`För lite(t): förväntade ${u.origin??"värdet"} att ha ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ogiltig sträng: måste börja med "${g.prefix}"`;if(g.format==="ends_with")return`Ogiltig sträng: måste sluta med "${g.suffix}"`;if(g.format==="includes")return`Ogiltig sträng: måste innehålla "${g.includes}"`;if(g.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${g.pattern}"`;return`Ogiltig(t) ${U[g.format]??u.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${u.divisor}`;case"unrecognized_keys":return`${u.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${W(u.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${u.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${u.origin??"värdet"}`;default:return"Ogiltig input"}}};function gN(){return{localeError:Lb()}}var Wb=()=>{let $={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function I(u){return $[u]??null}let U={regex:"உள்ளீடு",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 தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},_={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${u.expected}, பெறப்பட்டது ${v}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${g}, பெறப்பட்டது ${v}`}case"invalid_value":if(u.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${j(u.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${W(u.values,"|")} இல் ஒன்று`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${u.origin??"மதிப்பு"} ${g}${u.maximum.toString()} ${z.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${u.origin??"மதிப்பு"} ${g}${u.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${u.origin} ${g}${u.minimum.toString()} ${z.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${u.origin} ${g}${u.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`தவறான சரம்: "${g.prefix}" இல் தொடங்க வேண்டும்`;if(g.format==="ends_with")return`தவறான சரம்: "${g.suffix}" இல் முடிவடைய வேண்டும்`;if(g.format==="includes")return`தவறான சரம்: "${g.includes}" ஐ உள்ளடக்க வேண்டும்`;if(g.format==="regex")return`தவறான சரம்: ${g.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${U[g.format]??u.format}`}case"not_multiple_of":return`தவறான எண்: ${u.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${u.keys.length>1?"கள்":""}: ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${u.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function zN(){return{localeError:Wb()}}var Pb=()=>{let $={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function I(u){return $[u]??null}let U={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},_={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${u.expected} แต่ได้รับ ${v}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${g} แต่ได้รับ ${v}`}case"invalid_value":if(u.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${j(u.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"ไม่เกิน":"น้อยกว่า",z=I(u.origin);if(z)return`เกินกำหนด: ${u.origin??"ค่า"} ควรมี${g} ${u.maximum.toString()} ${z.unit??"รายการ"}`;return`เกินกำหนด: ${u.origin??"ค่า"} ควรมี${g} ${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?"อย่างน้อย":"มากกว่า",z=I(u.origin);if(z)return`น้อยกว่ากำหนด: ${u.origin} ควรมี${g} ${u.minimum.toString()} ${z.unit}`;return`น้อยกว่ากำหนด: ${u.origin} ควรมี${g} ${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${g.prefix}"`;if(g.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${g.suffix}"`;if(g.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${g.includes}" อยู่ในข้อความ`;if(g.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${g.pattern}`;return`รูปแบบไม่ถูกต้อง: ${U[g.format]??u.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${u.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${W(u.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${u.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${u.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function vN(){return{localeError:Pb()}}var Zb=()=>{let $={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function I(u){return $[u]??null}let U={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üre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Geçersiz değer: beklenen instanceof ${u.expected}, alınan ${v}`;return`Geçersiz değer: beklenen ${g}, alınan ${v}`}case"invalid_value":if(u.values.length===1)return`Geçersiz değer: beklenen ${j(u.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Çok büyük: beklenen ${u.origin??"değer"} ${g}${u.maximum.toString()} ${z.unit??"öğe"}`;return`Çok büyük: beklenen ${u.origin??"değer"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Çok küçük: beklenen ${u.origin} ${g}${u.minimum.toString()} ${z.unit}`;return`Çok küçük: beklenen ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Geçersiz metin: "${g.prefix}" ile başlamalı`;if(g.format==="ends_with")return`Geçersiz metin: "${g.suffix}" ile bitmeli`;if(g.format==="includes")return`Geçersiz metin: "${g.includes}" içermeli`;if(g.format==="regex")return`Geçersiz metin: ${g.pattern} desenine uymalı`;return`Geçersiz ${U[g.format]??u.format}`}case"not_multiple_of":return`Geçersiz sayı: ${u.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${u.keys.length>1?"lar":""}: ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${u.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function JN(){return{localeError:Zb()}}var Ab=()=>{let $={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function I(u){return $[u]??null}let U={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},_={nan:"NaN",number:"число",array:"масив"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Неправильні вхідні дані: очікується instanceof ${u.expected}, отримано ${v}`;return`Неправильні вхідні дані: очікується ${g}, отримано ${v}`}case"invalid_value":if(u.values.length===1)return`Неправильні вхідні дані: очікується ${j(u.values[0])}`;return`Неправильна опція: очікується одне з ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Занадто велике: очікується, що ${u.origin??"значення"} ${z.verb} ${g}${u.maximum.toString()} ${z.unit??"елементів"}`;return`Занадто велике: очікується, що ${u.origin??"значення"} буде ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Занадто мале: очікується, що ${u.origin} ${z.verb} ${g}${u.minimum.toString()} ${z.unit}`;return`Занадто мале: очікується, що ${u.origin} буде ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Неправильний рядок: повинен починатися з "${g.prefix}"`;if(g.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${g.suffix}"`;if(g.format==="includes")return`Неправильний рядок: повинен містити "${g.includes}"`;if(g.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${g.pattern}`;return`Неправильний ${U[g.format]??u.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${u.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${u.keys.length>1?"і":""}: ${W(u.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${u.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${u.origin}`;default:return"Неправильні вхідні дані"}}};function H0(){return{localeError:Ab()}}function NN(){return H0()}var bb=()=>{let $={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function I(u){return $[u]??null}let U={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},_={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`غلط ان پٹ: instanceof ${u.expected} متوقع تھا، ${v} موصول ہوا`;return`غلط ان پٹ: ${g} متوقع تھا، ${v} موصول ہوا`}case"invalid_value":if(u.values.length===1)return`غلط ان پٹ: ${j(u.values[0])} متوقع تھا`;return`غلط آپشن: ${W(u.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`بہت بڑا: ${u.origin??"ویلیو"} کے ${g}${u.maximum.toString()} ${z.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${u.origin??"ویلیو"} کا ${g}${u.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`بہت چھوٹا: ${u.origin} کے ${g}${u.minimum.toString()} ${z.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${u.origin} کا ${g}${u.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`غلط سٹرنگ: "${g.prefix}" سے شروع ہونا چاہیے`;if(g.format==="ends_with")return`غلط سٹرنگ: "${g.suffix}" پر ختم ہونا چاہیے`;if(g.format==="includes")return`غلط سٹرنگ: "${g.includes}" شامل ہونا چاہیے`;if(g.format==="regex")return`غلط سٹرنگ: پیٹرن ${g.pattern} سے میچ ہونا چاہیے`;return`غلط ${U[g.format]??u.format}`}case"not_multiple_of":return`غلط نمبر: ${u.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${u.keys.length>1?"ز":""}: ${W(u.keys,"، ")}`;case"invalid_key":return`${u.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${u.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function GN(){return{localeError:bb()}}var jb=()=>{let $={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function I(u){return $[u]??null}let U={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},_={nan:"NaN",number:"raqam",array:"massiv"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${u.expected}, qabul qilingan ${v}`;return`Noto‘g‘ri kirish: kutilgan ${g}, qabul qilingan ${v}`}case"invalid_value":if(u.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${j(u.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Juda katta: kutilgan ${u.origin??"qiymat"} ${g}${u.maximum.toString()} ${z.unit} ${z.verb}`;return`Juda katta: kutilgan ${u.origin??"qiymat"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Juda kichik: kutilgan ${u.origin} ${g}${u.minimum.toString()} ${z.unit} ${z.verb}`;return`Juda kichik: kutilgan ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Noto‘g‘ri satr: "${g.prefix}" bilan boshlanishi kerak`;if(g.format==="ends_with")return`Noto‘g‘ri satr: "${g.suffix}" bilan tugashi kerak`;if(g.format==="includes")return`Noto‘g‘ri satr: "${g.includes}" ni o‘z ichiga olishi kerak`;if(g.format==="regex")return`Noto‘g‘ri satr: ${g.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${U[g.format]??u.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${u.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${u.keys.length>1?"lar":""}: ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${u.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function XN(){return{localeError:jb()}}var Fb=()=>{let $={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function I(u){return $[u]??null}let U={regex:"đầu vào",email:"địa chỉ 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ày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},_={nan:"NaN",number:"số",array:"mảng"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${u.expected}, nhận được ${v}`;return`Đầu vào không hợp lệ: mong đợi ${g}, nhận được ${v}`}case"invalid_value":if(u.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${j(u.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Quá lớn: mong đợi ${u.origin??"giá trị"} ${z.verb} ${g}${u.maximum.toString()} ${z.unit??"phần tử"}`;return`Quá lớn: mong đợi ${u.origin??"giá trị"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Quá nhỏ: mong đợi ${u.origin} ${z.verb} ${g}${u.minimum.toString()} ${z.unit}`;return`Quá nhỏ: mong đợi ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${g.prefix}"`;if(g.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${g.suffix}"`;if(g.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${g.includes}"`;if(g.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${g.pattern}`;return`${U[g.format]??u.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${u.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${W(u.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${u.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${u.origin}`;default:return"Đầu vào không hợp lệ"}}};function qN(){return{localeError:Fb()}}var Sb=()=>{let $={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function I(u){return $[u]??null}let U={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},_={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`无效输入:期望 instanceof ${u.expected},实际接收 ${v}`;return`无效输入:期望 ${g},实际接收 ${v}`}case"invalid_value":if(u.values.length===1)return`无效输入:期望 ${j(u.values[0])}`;return`无效选项:期望以下之一 ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`数值过大:期望 ${u.origin??"值"} ${g}${u.maximum.toString()} ${z.unit??"个元素"}`;return`数值过大:期望 ${u.origin??"值"} ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`数值过小:期望 ${u.origin} ${g}${u.minimum.toString()} ${z.unit}`;return`数值过小:期望 ${u.origin} ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`无效字符串:必须以 "${g.prefix}" 开头`;if(g.format==="ends_with")return`无效字符串:必须以 "${g.suffix}" 结尾`;if(g.format==="includes")return`无效字符串:必须包含 "${g.includes}"`;if(g.format==="regex")return`无效字符串:必须满足正则表达式 ${g.pattern}`;return`无效${U[g.format]??u.format}`}case"not_multiple_of":return`无效数字:必须是 ${u.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${W(u.keys,", ")}`;case"invalid_key":return`${u.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${u.origin} 中包含无效值(value)`;default:return"无效输入"}}};function QN(){return{localeError:Sb()}}var wb=()=>{let $={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function I(u){return $[u]??null}let U={regex:"輸入",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 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},_={nan:"NaN"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`無效的輸入值:預期為 instanceof ${u.expected},但收到 ${v}`;return`無效的輸入值:預期為 ${g},但收到 ${v}`}case"invalid_value":if(u.values.length===1)return`無效的輸入值:預期為 ${j(u.values[0])}`;return`無效的選項:預期為以下其中之一 ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`數值過大:預期 ${u.origin??"值"} 應為 ${g}${u.maximum.toString()} ${z.unit??"個元素"}`;return`數值過大:預期 ${u.origin??"值"} 應為 ${g}${u.maximum.toString()}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`數值過小:預期 ${u.origin} 應為 ${g}${u.minimum.toString()} ${z.unit}`;return`數值過小:預期 ${u.origin} 應為 ${g}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`無效的字串:必須以 "${g.prefix}" 開頭`;if(g.format==="ends_with")return`無效的字串:必須以 "${g.suffix}" 結尾`;if(g.format==="includes")return`無效的字串:必須包含 "${g.includes}"`;if(g.format==="regex")return`無效的字串:必須符合格式 ${g.pattern}`;return`無效的 ${U[g.format]??u.format}`}case"not_multiple_of":return`無效的數字:必須為 ${u.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${u.keys.length>1?"們":""}:${W(u.keys,"、")}`;case"invalid_key":return`${u.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${u.origin} 中有無效的值`;default:return"無效的輸入值"}}};function TN(){return{localeError:wb()}}var Eb=()=>{let $={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function I(u){return $[u]??null}let U={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",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:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},_={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(u)=>{switch(u.code){case"invalid_type":{let g=_[u.expected]??u.expected,z=S(u.input),v=_[z]??z;if(/^[A-Z]/.test(u.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${u.expected}, àmọ̀ a rí ${v}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${g}, àmọ̀ a rí ${v}`}case"invalid_value":if(u.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${j(u.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${W(u.values,"|")}`;case"too_big":{let g=u.inclusive?"<=":"<",z=I(u.origin);if(z)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${u.origin??"iye"} ${z.verb} ${g}${u.maximum} ${z.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${g}${u.maximum}`}case"too_small":{let g=u.inclusive?">=":">",z=I(u.origin);if(z)return`Kéré ju: a ní láti jẹ́ pé ${u.origin} ${z.verb} ${g}${u.minimum} ${z.unit}`;return`Kéré ju: a ní láti jẹ́ ${g}${u.minimum}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${g.prefix}"`;if(g.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${g.suffix}"`;if(g.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${g.includes}"`;if(g.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${g.pattern}`;return`Aṣìṣe: ${U[g.format]??u.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${u.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${W(u.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${u.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${u.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function HN(){return{localeError:Eb()}}var $Q,YN=Symbol("ZodOutput"),ON=Symbol("ZodInput");class VN{constructor(){this._map=new WeakMap,this._idmap=new Map}add($,...I){let U=I[0];if(this._map.set($,U),U&&typeof U==="object"&&"id"in U)this._idmap.set(U.id,$);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove($){let I=this._map.get($);if(I&&typeof I==="object"&&"id"in I)this._idmap.delete(I.id);return this._map.delete($),this}get($){let I=$._zod.parent;if(I){let U={...this.get(I)??{}};delete U.id;let _={...U,...this._map.get($)};return Object.keys(_).length?_:void 0}return this._map.get($)}has($){return this._map.has($)}}function BU(){return new VN}($Q=globalThis).__zod_globalRegistry??($Q.__zod_globalRegistry=BU());var w$=globalThis.__zod_globalRegistry;function DN($,I){return new $({type:"string",...C(I)})}function BN($,I){return new $({type:"string",coerce:!0,...C(I)})}function MU($,I){return new $({type:"string",format:"email",check:"string_format",abort:!1,...C(I)})}function O0($,I){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...C(I)})}function KU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...C(I)})}function RU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...C(I)})}function LU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...C(I)})}function WU($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...C(I)})}function V0($,I){return new $({type:"string",format:"url",check:"string_format",abort:!1,...C(I)})}function PU($,I){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...C(I)})}function ZU($,I){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...C(I)})}function AU($,I){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...C(I)})}function bU($,I){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...C(I)})}function jU($,I){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...C(I)})}function FU($,I){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...C(I)})}function SU($,I){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...C(I)})}function wU($,I){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...C(I)})}function EU($,I){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...C(I)})}function MN($,I){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...C(I)})}function CU($,I){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...C(I)})}function fU($,I){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...C(I)})}function xU($,I){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...C(I)})}function kU($,I){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...C(I)})}function yU($,I){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...C(I)})}function iU($,I){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...C(I)})}var KN={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function RN($,I){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...C(I)})}function LN($,I){return new $({type:"string",format:"date",check:"string_format",...C(I)})}function WN($,I){return new $({type:"string",format:"time",check:"string_format",precision:null,...C(I)})}function PN($,I){return new $({type:"string",format:"duration",check:"string_format",...C(I)})}function ZN($,I){return new $({type:"number",checks:[],...C(I)})}function AN($,I){return new $({type:"number",coerce:!0,checks:[],...C(I)})}function bN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...C(I)})}function jN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...C(I)})}function FN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...C(I)})}function SN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...C(I)})}function wN($,I){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...C(I)})}function EN($,I){return new $({type:"boolean",...C(I)})}function CN($,I){return new $({type:"boolean",coerce:!0,...C(I)})}function fN($,I){return new $({type:"bigint",...C(I)})}function xN($,I){return new $({type:"bigint",coerce:!0,...C(I)})}function kN($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...C(I)})}function yN($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...C(I)})}function iN($,I){return new $({type:"symbol",...C(I)})}function rN($,I){return new $({type:"undefined",...C(I)})}function nN($,I){return new $({type:"null",...C(I)})}function lN($){return new $({type:"any"})}function mN($){return new $({type:"unknown"})}function hN($,I){return new $({type:"never",...C(I)})}function cN($,I){return new $({type:"void",...C(I)})}function dN($,I){return new $({type:"date",...C(I)})}function pN($,I){return new $({type:"date",coerce:!0,...C(I)})}function oN($,I){return new $({type:"nan",...C(I)})}function C4($,I){return new JU({check:"less_than",...C(I),value:$,inclusive:!1})}function _4($,I){return new JU({check:"less_than",...C(I),value:$,inclusive:!0})}function f4($,I){return new NU({check:"greater_than",...C(I),value:$,inclusive:!1})}function l$($,I){return new NU({check:"greater_than",...C(I),value:$,inclusive:!0})}function rU($){return f4(0,$)}function nU($){return C4(0,$)}function lU($){return _4(0,$)}function mU($){return l$(0,$)}function K6($,I){return new oz({check:"multiple_of",...C(I),value:$})}function R6($,I){return new ez({check:"max_size",...C(I),maximum:$})}function x4($,I){return new sz({check:"min_size",...C(I),minimum:$})}function a6($,I){return new $v({check:"size_equals",...C(I),size:$})}function e6($,I){return new Iv({check:"max_length",...C(I),maximum:$})}function o4($,I){return new uv({check:"min_length",...C(I),minimum:$})}function s6($,I){return new Uv({check:"length_equals",...C(I),length:$})}function n1($,I){return new _v({check:"string_format",format:"regex",...C(I),pattern:$})}function l1($){return new gv({check:"string_format",format:"lowercase",...C($)})}function m1($){return new zv({check:"string_format",format:"uppercase",...C($)})}function h1($,I){return new vv({check:"string_format",format:"includes",...C(I),includes:$})}function c1($,I){return new Jv({check:"string_format",format:"starts_with",...C(I),prefix:$})}function d1($,I){return new Nv({check:"string_format",format:"ends_with",...C(I),suffix:$})}function hU($,I,U){return new Gv({check:"property",property:$,schema:I,...C(U)})}function p1($,I){return new Xv({check:"mime_type",mime:$,...C(I)})}function K4($){return new qv({check:"overwrite",tx:$})}function o1($){return K4((I)=>I.normalize($))}function t1(){return K4(($)=>$.trim())}function a1(){return K4(($)=>$.toLowerCase())}function e1(){return K4(($)=>$.toUpperCase())}function s1(){return K4(($)=>Gz($))}function tN($,I,U){return new $({type:"array",element:I,...C(U)})}function fb($,I,U){return new $({type:"union",options:I,...C(U)})}function xb($,I,U){return new $({type:"union",options:I,inclusive:!1,...C(U)})}function kb($,I,U,_){return new $({type:"union",options:U,discriminator:I,...C(_)})}function yb($,I,U){return new $({type:"intersection",left:I,right:U})}function ib($,I,U,_){let u=U instanceof l;return new $({type:"tuple",items:I,rest:u?U:null,...C(u?_:U)})}function rb($,I,U,_){return new $({type:"record",keyType:I,valueType:U,...C(_)})}function nb($,I,U,_){return new $({type:"map",keyType:I,valueType:U,...C(_)})}function lb($,I,U){return new $({type:"set",valueType:I,...C(U)})}function mb($,I,U){let _=Array.isArray(I)?Object.fromEntries(I.map((u)=>[u,u])):I;return new $({type:"enum",entries:_,...C(U)})}function hb($,I,U){return new $({type:"enum",entries:I,...C(U)})}function cb($,I,U){return new $({type:"literal",values:Array.isArray(I)?I:[I],...C(U)})}function aN($,I){return new $({type:"file",...C(I)})}function db($,I){return new $({type:"transform",transform:I})}function pb($,I){return new $({type:"optional",innerType:I})}function ob($,I){return new $({type:"nullable",innerType:I})}function tb($,I,U){return new $({type:"default",innerType:I,get defaultValue(){return typeof U==="function"?U():qz(U)}})}function ab($,I,U){return new $({type:"nonoptional",innerType:I,...C(U)})}function eb($,I){return new $({type:"success",innerType:I})}function sb($,I,U){return new $({type:"catch",innerType:I,catchValue:typeof U==="function"?U:()=>U})}function $j($,I,U){return new $({type:"pipe",in:I,out:U})}function Ij($,I){return new $({type:"readonly",innerType:I})}function uj($,I,U){return new $({type:"template_literal",parts:I,...C(U)})}function Uj($,I){return new $({type:"lazy",getter:I})}function _j($,I){return new $({type:"promise",innerType:I})}function eN($,I,U){let _=C(U);return _.abort??(_.abort=!0),new $({type:"custom",check:"custom",fn:I,..._})}function sN($,I,U){return new $({type:"custom",check:"custom",fn:I,...C(U)})}function $8($){let I=IQ((U)=>{return U.addIssue=(_)=>{if(typeof _==="string")U.issues.push(C1(_,U.value,I._zod.def));else{let u=_;if(u.fatal)u.continue=!1;u.code??(u.code="custom"),u.input??(u.input=U.value),u.inst??(u.inst=I),u.continue??(u.continue=!I._zod.def.abort),U.issues.push(C1(u))}},$(U.value,U)});return I}function IQ($,I){let U=new G$({check:"custom",...C(I)});return U._zod.check=$,U}function I8($){let I=new G$({check:"describe"});return I._zod.onattach=[(U)=>{let _=w$.get(U)??{};w$.add(U,{..._,description:$})}],I._zod.check=()=>{},I}function u8($){let I=new G$({check:"meta"});return I._zod.onattach=[(U)=>{let _=w$.get(U)??{};w$.add(U,{..._,...$})}],I._zod.check=()=>{},I}function U8($,I){let U=C(I),_=U.truthy??["true","1","yes","on","y","enabled"],u=U.falsy??["false","0","no","off","n","disabled"];if(U.case!=="sensitive")_=_.map((T)=>typeof T==="string"?T.toLowerCase():T),u=u.map((T)=>typeof T==="string"?T.toLowerCase():T);let g=new Set(_),z=new Set(u),v=$.Codec??X0,J=$.Boolean??N0,X=new($.String??t6)({type:"string",error:U.error}),G=new J({type:"boolean",error:U.error}),q=new v({type:"pipe",in:X,out:G,transform:(T,H)=>{let Q=T;if(U.case!=="sensitive")Q=Q.toLowerCase();if(g.has(Q))return!0;else if(z.has(Q))return!1;else return H.issues.push({code:"invalid_value",expected:"stringbool",values:[...g,...z],input:H.value,inst:q,continue:!1}),{}},reverseTransform:(T,H)=>{if(T===!0)return _[0]||"true";else return u[0]||"false"},error:U.error});return q}function $I($,I,U,_={}){let u=C(_),g={...C(_),check:"string_format",type:"string",format:I,fn:typeof U==="function"?U:(v)=>U.test(v),...u};if(U instanceof RegExp)g.pattern=U;return new $(g)}function L6($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??w$,target:I,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,cycles:$?.cycles??"ref",reused:$?.reused??"inline",external:$?.external??void 0}}function _$($,I,U={path:[],schemaPath:[]}){var _;let u=$._zod.def,g=I.seen.get($);if(g){if(g.count++,U.schemaPath.includes($))g.cycle=U.path;return g.schema}let z={schema:{},count:1,cycle:void 0,path:U.path};I.seen.set($,z);let v=$._zod.toJSONSchema?.();if(v)z.schema=v;else{let X={...U,schemaPath:[...U.schemaPath,$],path:U.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(I,z.schema,X);else{let q=z.schema,T=I.processors[u.type];if(!T)throw Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);T($,I,q,X)}let G=$._zod.parent;if(G){if(!z.ref)z.ref=G;_$(G,I,X),I.seen.get(G).isParent=!0}}let J=I.metadataRegistry.get($);if(J)Object.assign(z.schema,J);if(I.io==="input"&&m$($))delete z.schema.examples,delete z.schema.default;if(I.io==="input"&&z.schema._prefault)(_=z.schema).default??(_.default=z.schema._prefault);return delete z.schema._prefault,I.seen.get($).schema}function W6($,I){let U=$.seen.get(I);if(!U)throw Error("Unprocessed schema. This is a bug in Zod.");let _=new Map;for(let z of $.seen.entries()){let v=$.metadataRegistry.get(z[0])?.id;if(v){let J=_.get(v);if(J&&J!==z[0])throw Error(`Duplicate schema id "${v}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);_.set(v,z[0])}}let u=(z)=>{let v=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let G=$.external.registry.get(z[0])?.id,q=$.external.uri??((H)=>H);if(G)return{ref:q(G)};let T=z[1].defId??z[1].schema.id??`schema${$.counter++}`;return z[1].defId=T,{defId:T,ref:`${q("__shared")}#/${v}/${T}`}}if(z[1]===U)return{ref:"#"};let N=`${"#"}/${v}/`,X=z[1].schema.id??`__schema${$.counter++}`;return{defId:X,ref:N+X}},g=(z)=>{if(z[1].schema.$ref)return;let v=z[1],{ref:J,defId:N}=u(z);if(v.def={...v.schema},N)v.defId=N;let X=v.schema;for(let G in X)delete X[G];X.$ref=J};if($.cycles==="throw")for(let z of $.seen.entries()){let v=z[1];if(v.cycle)throw Error(`Cycle detected: #/${v.cycle?.join("/")}/<root>
335
336
 
336
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let z of $.seen.entries()){let v=z[1];if(I===z[0]){g(z);continue}if($.external){let N=$.external.registry.get(z[0])?.id;if(I!==z[0]&&N){g(z);continue}}if($.metadataRegistry.get(z[0])?.id){g(z);continue}if(v.cycle){g(z);continue}if(v.count>1){if($.reused==="ref"){g(z);continue}}}}function L6($,I){let U=$.seen.get(I);if(!U)throw Error("Unprocessed schema. This is a bug in Zod.");let _=(z)=>{let v=$.seen.get(z);if(v.ref===null)return;let J=v.def??v.schema,N={...J},X=v.ref;if(v.ref=null,X){_(X);let q=$.seen.get(X),T=q.schema;if(T.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))J.allOf=J.allOf??[],J.allOf.push(T);else Object.assign(J,T);if(Object.assign(J,N),z._zod.parent===X)for(let Q in J){if(Q==="$ref"||Q==="allOf")continue;if(!(Q in N))delete J[Q]}if(T.$ref&&q.def)for(let Q in J){if(Q==="$ref"||Q==="allOf")continue;if(Q in q.def&&JSON.stringify(J[Q])===JSON.stringify(q.def[Q]))delete J[Q]}}let G=z._zod.parent;if(G&&G!==X){_(G);let q=$.seen.get(G);if(q?.schema.$ref){if(J.$ref=q.schema.$ref,q.def)for(let T in J){if(T==="$ref"||T==="allOf")continue;if(T in q.def&&JSON.stringify(J[T])===JSON.stringify(q.def[T]))delete J[T]}}}$.override({zodSchema:z,jsonSchema:J,path:v.path??[]})};for(let z of[...$.seen.entries()].reverse())_(z[0]);let u={};if($.target==="draft-2020-12")u.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")u.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")u.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let z=$.external.registry.get(I)?.id;if(!z)throw Error("Schema is missing an `id` property");u.$id=$.external.uri(z)}Object.assign(u,U.def??U.schema);let g=$.external?.defs??{};for(let z of $.seen.entries()){let v=z[1];if(v.def&&v.defId)g[v.defId]=v.def}if($.external);else if(Object.keys(g).length>0)if($.target==="draft-2020-12")u.$defs=g;else u.definitions=g;try{let z=JSON.parse(JSON.stringify(u));return Object.defineProperty(z,"~standard",{value:{...I["~standard"],jsonSchema:{input:s1(I,"input",$.processors),output:s1(I,"output",$.processors)}},enumerable:!1,writable:!1}),z}catch(z){throw Error("Error converting schema to JSON.")}}function l$($,I){let U=I??{seen:new Set};if(U.seen.has($))return!1;U.seen.add($);let _=$._zod.def;if(_.type==="transform")return!0;if(_.type==="array")return l$(_.element,U);if(_.type==="set")return l$(_.valueType,U);if(_.type==="lazy")return l$(_.getter(),U);if(_.type==="promise"||_.type==="optional"||_.type==="nonoptional"||_.type==="nullable"||_.type==="readonly"||_.type==="default"||_.type==="prefault")return l$(_.innerType,U);if(_.type==="intersection")return l$(_.left,U)||l$(_.right,U);if(_.type==="record"||_.type==="map")return l$(_.keyType,U)||l$(_.valueType,U);if(_.type==="pipe")return l$(_.in,U)||l$(_.out,U);if(_.type==="object"){for(let u in _.shape)if(l$(_.shape[u],U))return!0;return!1}if(_.type==="union"){for(let u of _.options)if(l$(u,U))return!0;return!1}if(_.type==="tuple"){for(let u of _.items)if(l$(u,U))return!0;if(_.rest&&l$(_.rest,U))return!0;return!1}return!1}var u8=($,I={})=>(U)=>{let _=R6({...U,processors:I});return _$($,_),K6(_,$),L6(_,$)},s1=($,I,U={})=>(_)=>{let{libraryOptions:u,target:g}=_??{},z=R6({...u??{},target:g,io:I,processors:U});return _$($,z),K6(z,$),L6(z,$)};var _j={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},U8=($,I,U,_)=>{let u=U;u.type="string";let{minimum:g,maximum:z,format:v,patterns:J,contentEncoding:N}=$._zod.bag;if(typeof g==="number")u.minLength=g;if(typeof z==="number")u.maxLength=z;if(v){if(u.format=_j[v]??v,u.format==="")delete u.format;if(v==="time")delete u.format}if(N)u.contentEncoding=N;if(J&&J.size>0){let X=[...J];if(X.length===1)u.pattern=X[0].source;else if(X.length>1)u.allOf=[...X.map((G)=>({...I.target==="draft-07"||I.target==="draft-04"||I.target==="openapi-3.0"?{type:"string"}:{},pattern:G.source}))]}},_8=($,I,U,_)=>{let u=U,{minimum:g,maximum:z,format:v,multipleOf:J,exclusiveMaximum:N,exclusiveMinimum:X}=$._zod.bag;if(typeof v==="string"&&v.includes("int"))u.type="integer";else u.type="number";if(typeof X==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")u.minimum=X,u.exclusiveMinimum=!0;else u.exclusiveMinimum=X;if(typeof g==="number"){if(u.minimum=g,typeof X==="number"&&I.target!=="draft-04")if(X>=g)delete u.minimum;else delete u.exclusiveMinimum}if(typeof N==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")u.maximum=N,u.exclusiveMaximum=!0;else u.exclusiveMaximum=N;if(typeof z==="number"){if(u.maximum=z,typeof N==="number"&&I.target!=="draft-04")if(N<=z)delete u.maximum;else delete u.exclusiveMaximum}if(typeof J==="number")u.multipleOf=J},g8=($,I,U,_)=>{U.type="boolean"},z8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},v8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},J8=($,I,U,_)=>{if(I.target==="openapi-3.0")U.type="string",U.nullable=!0,U.enum=[null];else U.type="null"},N8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},G8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},X8=($,I,U,_)=>{U.not={}},q8=($,I,U,_)=>{},Q8=($,I,U,_)=>{},T8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},H8=($,I,U,_)=>{let u=$._zod.def,g=tI(u.entries);if(g.every((z)=>typeof z==="number"))U.type="number";if(g.every((z)=>typeof z==="string"))U.type="string";U.enum=g},Y8=($,I,U,_)=>{let u=$._zod.def,g=[];for(let z of u.values)if(z===void 0){if(I.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof z==="bigint")if(I.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else g.push(Number(z));else g.push(z);if(g.length===0);else if(g.length===1){let z=g[0];if(U.type=z===null?"null":typeof z,I.target==="draft-04"||I.target==="openapi-3.0")U.enum=[z];else U.const=z}else{if(g.every((z)=>typeof z==="number"))U.type="number";if(g.every((z)=>typeof z==="string"))U.type="string";if(g.every((z)=>typeof z==="boolean"))U.type="boolean";if(g.every((z)=>z===null))U.type="null";U.enum=g}},O8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},D8=($,I,U,_)=>{let u=U,g=$._zod.pattern;if(!g)throw Error("Pattern not found in template literal");u.type="string",u.pattern=g.source},V8=($,I,U,_)=>{let u=U,g={type:"string",format:"binary",contentEncoding:"binary"},{minimum:z,maximum:v,mime:J}=$._zod.bag;if(z!==void 0)g.minLength=z;if(v!==void 0)g.maxLength=v;if(J)if(J.length===1)g.contentMediaType=J[0],Object.assign(u,g);else Object.assign(u,g),u.anyOf=J.map((N)=>({contentMediaType:N}));else Object.assign(u,g)},B8=($,I,U,_)=>{U.type="boolean"},M8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},R8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},K8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},L8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},P8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},W8=($,I,U,_)=>{let u=U,g=$._zod.def,{minimum:z,maximum:v}=$._zod.bag;if(typeof z==="number")u.minItems=z;if(typeof v==="number")u.maxItems=v;u.type="array",u.items=_$(g.element,I,{..._,path:[..._.path,"items"]})},Z8=($,I,U,_)=>{let u=U,g=$._zod.def;u.type="object",u.properties={};let z=g.shape;for(let N in z)u.properties[N]=_$(z[N],I,{..._,path:[..._.path,"properties",N]});let v=new Set(Object.keys(z)),J=new Set([...v].filter((N)=>{let X=g.shape[N]._zod;if(I.io==="input")return X.optin===void 0;else return X.optout===void 0}));if(J.size>0)u.required=Array.from(J);if(g.catchall?._zod.def.type==="never")u.additionalProperties=!1;else if(!g.catchall){if(I.io==="output")u.additionalProperties=!1}else if(g.catchall)u.additionalProperties=_$(g.catchall,I,{..._,path:[..._.path,"additionalProperties"]})},mU=($,I,U,_)=>{let u=$._zod.def,g=u.inclusive===!1,z=u.options.map((v,J)=>_$(v,I,{..._,path:[..._.path,g?"oneOf":"anyOf",J]}));if(g)U.oneOf=z;else U.anyOf=z},A8=($,I,U,_)=>{let u=$._zod.def,g=_$(u.left,I,{..._,path:[..._.path,"allOf",0]}),z=_$(u.right,I,{..._,path:[..._.path,"allOf",1]}),v=(N)=>("allOf"in N)&&Object.keys(N).length===1,J=[...v(g)?g.allOf:[g],...v(z)?z.allOf:[z]];U.allOf=J},b8=($,I,U,_)=>{let u=U,g=$._zod.def;u.type="array";let z=I.target==="draft-2020-12"?"prefixItems":"items",v=I.target==="draft-2020-12"?"items":I.target==="openapi-3.0"?"items":"additionalItems",J=g.items.map((q,T)=>_$(q,I,{..._,path:[..._.path,z,T]})),N=g.rest?_$(g.rest,I,{..._,path:[..._.path,v,...I.target==="openapi-3.0"?[g.items.length]:[]]}):null;if(I.target==="draft-2020-12"){if(u.prefixItems=J,N)u.items=N}else if(I.target==="openapi-3.0"){if(u.items={anyOf:J},N)u.items.anyOf.push(N);if(u.minItems=J.length,!N)u.maxItems=J.length}else if(u.items=J,N)u.additionalItems=N;let{minimum:X,maximum:G}=$._zod.bag;if(typeof X==="number")u.minItems=X;if(typeof G==="number")u.maxItems=G},j8=($,I,U,_)=>{let u=U,g=$._zod.def;u.type="object";let z=g.keyType,J=z._zod.bag?.patterns;if(g.mode==="loose"&&J&&J.size>0){let X=_$(g.valueType,I,{..._,path:[..._.path,"patternProperties","*"]});u.patternProperties={};for(let G of J)u.patternProperties[G.source]=X}else{if(I.target==="draft-07"||I.target==="draft-2020-12")u.propertyNames=_$(g.keyType,I,{..._,path:[..._.path,"propertyNames"]});u.additionalProperties=_$(g.valueType,I,{..._,path:[..._.path,"additionalProperties"]})}let N=z._zod.values;if(N){let X=[...N].filter((G)=>typeof G==="string"||typeof G==="number");if(X.length>0)u.required=X}},F8=($,I,U,_)=>{let u=$._zod.def,g=_$(u.innerType,I,_),z=I.seen.get($);if(I.target==="openapi-3.0")z.ref=u.innerType,U.nullable=!0;else U.anyOf=[g,{type:"null"}]},S8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType},w8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType,U.default=JSON.parse(JSON.stringify(u.defaultValue))},E8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);if(g.ref=u.innerType,I.io==="input")U._prefault=JSON.parse(JSON.stringify(u.defaultValue))},C8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType;let z;try{z=u.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}U.default=z},f8=($,I,U,_)=>{let u=$._zod.def,g=I.io==="input"?u.in._zod.def.type==="transform"?u.out:u.in:u.out;_$(g,I,_);let z=I.seen.get($);z.ref=g},x8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType,U.readOnly=!0},k8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType},hU=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType},y8=($,I,U,_)=>{let u=$._zod.innerType;_$(u,I,_);let g=I.seen.get($);g.ref=u},lU={string:U8,number:_8,boolean:g8,bigint:z8,symbol:v8,null:J8,undefined:N8,void:G8,never:X8,any:q8,unknown:Q8,date:T8,enum:H8,literal:Y8,nan:O8,template_literal:D8,file:V8,success:B8,custom:M8,function:R8,transform:K8,map:L8,set:P8,array:W8,object:Z8,union:mU,intersection:A8,tuple:b8,record:j8,nullable:F8,nonoptional:S8,default:w8,prefault:E8,catch:C8,pipe:f8,readonly:x8,promise:k8,optional:hU,lazy:y8};function cU($,I){if("_idmap"in $){let _=$,u=R6({...I,processors:lU}),g={};for(let J of _._idmap.entries()){let[N,X]=J;_$(X,u)}let z={},v={registry:_,uri:I?.uri,defs:g};u.external=v;for(let J of _._idmap.entries()){let[N,X]=J;K6(u,X),z[N]=L6(u,X)}if(Object.keys(g).length>0){let J=u.target==="draft-2020-12"?"$defs":"definitions";z.__shared={[J]:g}}return{schemas:z}}let U=R6({...I,processors:lU});return _$($,U),K6(U,$),L6(U,$)}class i8{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($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";this.ctx=R6({processors:lU,target:I,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,I={path:[],schemaPath:[]}){return _$($,this.ctx,I)}emit($,I){if(I){if(I.cycles)this.ctx.cycles=I.cycles;if(I.reused)this.ctx.reused=I.reused;if(I.external)this.ctx.external=I.external}K6(this.ctx,$);let U=L6(this.ctx,$),{"~standard":_,...u}=U;return u}}var $Q={};var O0={};O4(O0,{xor:()=>cQ,xid:()=>HQ,void:()=>iQ,uuidv7:()=>vQ,uuidv6:()=>zQ,uuidv4:()=>gQ,uuid:()=>_Q,url:()=>JQ,unknown:()=>e6,union:()=>V_,undefined:()=>kQ,ulid:()=>TQ,uint64:()=>fQ,uint32:()=>wQ,tuple:()=>B3,transform:()=>M_,templateLiteral:()=>g7,symbol:()=>xQ,superRefine:()=>d3,success:()=>u7,stringbool:()=>Q7,stringFormat:()=>WQ,string:()=>eU,strictObject:()=>mQ,set:()=>aQ,refine:()=>c3,record:()=>M3,readonly:()=>i3,promise:()=>z7,preprocess:()=>H7,prefault:()=>w3,pipe:()=>M0,partialRecord:()=>pQ,optional:()=>V0,object:()=>lQ,number:()=>_3,nullish:()=>I7,nullable:()=>B0,null:()=>N3,nonoptional:()=>E3,never:()=>D_,nativeEnum:()=>eQ,nanoid:()=>XQ,nan:()=>U7,meta:()=>X7,map:()=>tQ,mac:()=>DQ,looseRecord:()=>oQ,looseObject:()=>hQ,literal:()=>sQ,lazy:()=>l3,ksuid:()=>YQ,keyof:()=>rQ,jwt:()=>PQ,json:()=>T7,ipv6:()=>VQ,ipv4:()=>OQ,intersection:()=>D3,int64:()=>CQ,int32:()=>SQ,int:()=>sU,instanceof:()=>q7,httpUrl:()=>NQ,hostname:()=>ZQ,hex:()=>AQ,hash:()=>bQ,guid:()=>UQ,function:()=>v7,float64:()=>FQ,float32:()=>jQ,file:()=>$7,exactOptional:()=>A3,enum:()=>B_,emoji:()=>GQ,email:()=>uQ,e164:()=>LQ,discriminatedUnion:()=>dQ,describe:()=>G7,date:()=>nQ,custom:()=>N7,cuid2:()=>QQ,cuid:()=>qQ,codec:()=>_7,cidrv6:()=>MQ,cidrv4:()=>BQ,check:()=>J7,catch:()=>x3,boolean:()=>g3,bigint:()=>EQ,base64url:()=>KQ,base64:()=>RQ,array:()=>L0,any:()=>yQ,_function:()=>v7,_default:()=>F3,_ZodString:()=>$_,ZodXor:()=>H3,ZodXID:()=>v_,ZodVoid:()=>Q3,ZodUnknown:()=>X3,ZodUnion:()=>W0,ZodUndefined:()=>v3,ZodUUID:()=>f4,ZodURL:()=>R0,ZodULID:()=>z_,ZodType:()=>c,ZodTuple:()=>V3,ZodTransform:()=>W3,ZodTemplateLiteral:()=>n3,ZodSymbol:()=>z3,ZodSuccess:()=>C3,ZodStringFormat:()=>J$,ZodString:()=>uI,ZodSet:()=>K3,ZodRecord:()=>Z0,ZodReadonly:()=>y3,ZodPromise:()=>m3,ZodPrefault:()=>S3,ZodPipe:()=>L_,ZodOptional:()=>R_,ZodObject:()=>P0,ZodNumberFormat:()=>s6,ZodNumber:()=>_I,ZodNullable:()=>b3,ZodNull:()=>J3,ZodNonOptional:()=>K_,ZodNever:()=>q3,ZodNanoID:()=>U_,ZodNaN:()=>k3,ZodMap:()=>R3,ZodMAC:()=>U3,ZodLiteral:()=>L3,ZodLazy:()=>r3,ZodKSUID:()=>J_,ZodJWT:()=>Y_,ZodIntersection:()=>O3,ZodIPv6:()=>G_,ZodIPv4:()=>N_,ZodGUID:()=>D0,ZodFunction:()=>h3,ZodFile:()=>P3,ZodExactOptional:()=>Z3,ZodEnum:()=>II,ZodEmoji:()=>u_,ZodEmail:()=>I_,ZodE164:()=>H_,ZodDiscriminatedUnion:()=>Y3,ZodDefault:()=>j3,ZodDate:()=>K0,ZodCustomStringFormat:()=>UI,ZodCustom:()=>A0,ZodCodec:()=>P_,ZodCatch:()=>f3,ZodCUID2:()=>g_,ZodCUID:()=>__,ZodCIDRv6:()=>q_,ZodCIDRv4:()=>X_,ZodBoolean:()=>gI,ZodBigIntFormat:()=>O_,ZodBigInt:()=>zI,ZodBase64URL:()=>T_,ZodBase64:()=>Q_,ZodArray:()=>T3,ZodAny:()=>G3});var dU={};O4(dU,{uppercase:()=>r1,trim:()=>p1,toUpperCase:()=>t1,toLowerCase:()=>o1,startsWith:()=>m1,slugify:()=>a1,size:()=>o6,regex:()=>i1,property:()=>rU,positive:()=>kU,overwrite:()=>B4,normalize:()=>d1,nonpositive:()=>iU,nonnegative:()=>nU,negative:()=>yU,multipleOf:()=>B6,minSize:()=>C4,minLength:()=>d4,mime:()=>c1,maxSize:()=>M6,maxLength:()=>t6,lte:()=>u4,lt:()=>w4,lowercase:()=>n1,length:()=>a6,includes:()=>l1,gte:()=>r$,gt:()=>E4,endsWith:()=>h1});var $I={};O4($I,{time:()=>l8,duration:()=>m8,datetime:()=>n8,date:()=>r8,ZodISOTime:()=>tU,ZodISODuration:()=>aU,ZodISODateTime:()=>pU,ZodISODate:()=>oU});var pU=D("ZodISODateTime",($,I)=>{Lv.init($,I),J$.init($,I)});function n8($){return MN(pU,$)}var oU=D("ZodISODate",($,I)=>{Pv.init($,I),J$.init($,I)});function r8($){return RN(oU,$)}var tU=D("ZodISOTime",($,I)=>{Wv.init($,I),J$.init($,I)});function l8($){return KN(tU,$)}var aU=D("ZodISODuration",($,I)=>{Zv.init($,I),J$.init($,I)});function m8($){return LN(aU,$)}var IQ=($,I)=>{I0.init($,I),$.name="ZodError",Object.defineProperties($,{format:{value:(U)=>U0($,U)},flatten:{value:(U)=>u0($,U)},addIssue:{value:(U)=>{$.issues.push(U),$.message=JSON.stringify($.issues,F1,2)}},addIssues:{value:(U)=>{$.issues.push(...U),$.message=JSON.stringify($.issues,F1,2)}},isEmpty:{get(){return $.issues.length===0}}})},zj=D("ZodError",IQ),a$=D("ZodError",IQ,{Parent:Error});var h8=E1(a$),c8=C1(a$),d8=f1(a$),p8=x1(a$),o8=tu(a$),t8=au(a$),a8=eu(a$),e8=su(a$),s8=$U(a$),$3=IU(a$),I3=uU(a$),u3=UU(a$);var c=D("ZodType",($,I)=>{return l.init($,I),Object.assign($["~standard"],{jsonSchema:{input:s1($,"input"),output:s1($,"output")}}),$.toJSONSchema=u8($,{}),$.def=I,$.type=I.type,Object.defineProperty($,"_def",{value:I}),$.check=(...U)=>{return $.clone(w.mergeDefs(I,{checks:[...I.checks??[],...U.map((_)=>typeof _==="function"?{_zod:{check:_,def:{check:"custom"},onattach:[]}}:_)]}),{parent:!0})},$.with=$.check,$.clone=(U,_)=>n$($,U,_),$.brand=()=>$,$.register=(U,_)=>{return U.add($,_),$},$.parse=(U,_)=>h8($,U,_,{callee:$.parse}),$.safeParse=(U,_)=>d8($,U,_),$.parseAsync=async(U,_)=>c8($,U,_,{callee:$.parseAsync}),$.safeParseAsync=async(U,_)=>p8($,U,_),$.spa=$.safeParseAsync,$.encode=(U,_)=>o8($,U,_),$.decode=(U,_)=>t8($,U,_),$.encodeAsync=async(U,_)=>a8($,U,_),$.decodeAsync=async(U,_)=>e8($,U,_),$.safeEncode=(U,_)=>s8($,U,_),$.safeDecode=(U,_)=>$3($,U,_),$.safeEncodeAsync=async(U,_)=>I3($,U,_),$.safeDecodeAsync=async(U,_)=>u3($,U,_),$.refine=(U,_)=>$.check(c3(U,_)),$.superRefine=(U)=>$.check(d3(U)),$.overwrite=(U)=>$.check(B4(U)),$.optional=()=>V0($),$.exactOptional=()=>A3($),$.nullable=()=>B0($),$.nullish=()=>V0(B0($)),$.nonoptional=(U)=>E3($,U),$.array=()=>L0($),$.or=(U)=>V_([$,U]),$.and=(U)=>D3($,U),$.transform=(U)=>M0($,M_(U)),$.default=(U)=>F3($,U),$.prefault=(U)=>w3($,U),$.catch=(U)=>x3($,U),$.pipe=(U)=>M0($,U),$.readonly=()=>i3($),$.describe=(U)=>{let _=$.clone();return w$.add(_,{description:U}),_},Object.defineProperty($,"description",{get(){return w$.get($)?.description},configurable:!0}),$.meta=(...U)=>{if(U.length===0)return w$.get($);let _=$.clone();return w$.add(_,U[0]),_},$.isOptional=()=>$.safeParse(void 0).success,$.isNullable=()=>$.safeParse(null).success,$.apply=(U)=>U($),$}),$_=D("_ZodString",($,I)=>{p6.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>U8($,_,u,g);let U=$._zod.bag;$.format=U.format??null,$.minLength=U.minimum??null,$.maxLength=U.maximum??null,$.regex=(..._)=>$.check(i1(..._)),$.includes=(..._)=>$.check(l1(..._)),$.startsWith=(..._)=>$.check(m1(..._)),$.endsWith=(..._)=>$.check(h1(..._)),$.min=(..._)=>$.check(d4(..._)),$.max=(..._)=>$.check(t6(..._)),$.length=(..._)=>$.check(a6(..._)),$.nonempty=(..._)=>$.check(d4(1,..._)),$.lowercase=(_)=>$.check(n1(_)),$.uppercase=(_)=>$.check(r1(_)),$.trim=()=>$.check(p1()),$.normalize=(..._)=>$.check(d1(..._)),$.toLowerCase=()=>$.check(o1()),$.toUpperCase=()=>$.check(t1()),$.slugify=()=>$.check(a1())}),uI=D("ZodString",($,I)=>{p6.init($,I),$_.init($,I),$.email=(U)=>$.check(DU(I_,U)),$.url=(U)=>$.check(Y0(R0,U)),$.jwt=(U)=>$.check(xU(Y_,U)),$.emoji=(U)=>$.check(KU(u_,U)),$.guid=(U)=>$.check(H0(D0,U)),$.uuid=(U)=>$.check(VU(f4,U)),$.uuidv4=(U)=>$.check(BU(f4,U)),$.uuidv6=(U)=>$.check(MU(f4,U)),$.uuidv7=(U)=>$.check(RU(f4,U)),$.nanoid=(U)=>$.check(LU(U_,U)),$.guid=(U)=>$.check(H0(D0,U)),$.cuid=(U)=>$.check(PU(__,U)),$.cuid2=(U)=>$.check(WU(g_,U)),$.ulid=(U)=>$.check(ZU(z_,U)),$.base64=(U)=>$.check(EU(Q_,U)),$.base64url=(U)=>$.check(CU(T_,U)),$.xid=(U)=>$.check(AU(v_,U)),$.ksuid=(U)=>$.check(bU(J_,U)),$.ipv4=(U)=>$.check(jU(N_,U)),$.ipv6=(U)=>$.check(FU(G_,U)),$.cidrv4=(U)=>$.check(SU(X_,U)),$.cidrv6=(U)=>$.check(wU(q_,U)),$.e164=(U)=>$.check(fU(H_,U)),$.datetime=(U)=>$.check(n8(U)),$.date=(U)=>$.check(r8(U)),$.time=(U)=>$.check(l8(U)),$.duration=(U)=>$.check(m8(U))});function eU($){return ON(uI,$)}var J$=D("ZodStringFormat",($,I)=>{v$.init($,I),$_.init($,I)}),I_=D("ZodEmail",($,I)=>{Hv.init($,I),J$.init($,I)});function uQ($){return DU(I_,$)}var D0=D("ZodGUID",($,I)=>{Qv.init($,I),J$.init($,I)});function UQ($){return H0(D0,$)}var f4=D("ZodUUID",($,I)=>{Tv.init($,I),J$.init($,I)});function _Q($){return VU(f4,$)}function gQ($){return BU(f4,$)}function zQ($){return MU(f4,$)}function vQ($){return RU(f4,$)}var R0=D("ZodURL",($,I)=>{Yv.init($,I),J$.init($,I)});function JQ($){return Y0(R0,$)}function NQ($){return Y0(R0,{protocol:/^https?$/,hostname:Q4.domain,...w.normalizeParams($)})}var u_=D("ZodEmoji",($,I)=>{Ov.init($,I),J$.init($,I)});function GQ($){return KU(u_,$)}var U_=D("ZodNanoID",($,I)=>{Dv.init($,I),J$.init($,I)});function XQ($){return LU(U_,$)}var __=D("ZodCUID",($,I)=>{Vv.init($,I),J$.init($,I)});function qQ($){return PU(__,$)}var g_=D("ZodCUID2",($,I)=>{Bv.init($,I),J$.init($,I)});function QQ($){return WU(g_,$)}var z_=D("ZodULID",($,I)=>{Mv.init($,I),J$.init($,I)});function TQ($){return ZU(z_,$)}var v_=D("ZodXID",($,I)=>{Rv.init($,I),J$.init($,I)});function HQ($){return AU(v_,$)}var J_=D("ZodKSUID",($,I)=>{Kv.init($,I),J$.init($,I)});function YQ($){return bU(J_,$)}var N_=D("ZodIPv4",($,I)=>{Av.init($,I),J$.init($,I)});function OQ($){return jU(N_,$)}var U3=D("ZodMAC",($,I)=>{jv.init($,I),J$.init($,I)});function DQ($){return VN(U3,$)}var G_=D("ZodIPv6",($,I)=>{bv.init($,I),J$.init($,I)});function VQ($){return FU(G_,$)}var X_=D("ZodCIDRv4",($,I)=>{Fv.init($,I),J$.init($,I)});function BQ($){return SU(X_,$)}var q_=D("ZodCIDRv6",($,I)=>{Sv.init($,I),J$.init($,I)});function MQ($){return wU(q_,$)}var Q_=D("ZodBase64",($,I)=>{Ev.init($,I),J$.init($,I)});function RQ($){return EU(Q_,$)}var T_=D("ZodBase64URL",($,I)=>{Cv.init($,I),J$.init($,I)});function KQ($){return CU(T_,$)}var H_=D("ZodE164",($,I)=>{fv.init($,I),J$.init($,I)});function LQ($){return fU(H_,$)}var Y_=D("ZodJWT",($,I)=>{xv.init($,I),J$.init($,I)});function PQ($){return xU(Y_,$)}var UI=D("ZodCustomStringFormat",($,I)=>{kv.init($,I),J$.init($,I)});function WQ($,I,U={}){return e1(UI,$,I,U)}function ZQ($){return e1(UI,"hostname",Q4.hostname,$)}function AQ($){return e1(UI,"hex",Q4.hex,$)}function bQ($,I){let U=I?.enc??"hex",_=`${$}_${U}`,u=Q4[_];if(!u)throw Error(`Unrecognized hash format: ${_}`);return e1(UI,_,u,I)}var _I=D("ZodNumber",($,I)=>{QU.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>_8($,_,u,g),$.gt=(_,u)=>$.check(E4(_,u)),$.gte=(_,u)=>$.check(r$(_,u)),$.min=(_,u)=>$.check(r$(_,u)),$.lt=(_,u)=>$.check(w4(_,u)),$.lte=(_,u)=>$.check(u4(_,u)),$.max=(_,u)=>$.check(u4(_,u)),$.int=(_)=>$.check(sU(_)),$.safe=(_)=>$.check(sU(_)),$.positive=(_)=>$.check(E4(0,_)),$.nonnegative=(_)=>$.check(r$(0,_)),$.negative=(_)=>$.check(w4(0,_)),$.nonpositive=(_)=>$.check(u4(0,_)),$.multipleOf=(_,u)=>$.check(B6(_,u)),$.step=(_,u)=>$.check(B6(_,u)),$.finite=()=>$;let U=$._zod.bag;$.minValue=Math.max(U.minimum??Number.NEGATIVE_INFINITY,U.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(U.maximum??Number.POSITIVE_INFINITY,U.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(U.format??"").includes("int")||Number.isSafeInteger(U.multipleOf??0.5),$.isFinite=!0,$.format=U.format??null});function _3($){return PN(_I,$)}var s6=D("ZodNumberFormat",($,I)=>{yv.init($,I),_I.init($,I)});function sU($){return ZN(s6,$)}function jQ($){return AN(s6,$)}function FQ($){return bN(s6,$)}function SQ($){return jN(s6,$)}function wQ($){return FN(s6,$)}var gI=D("ZodBoolean",($,I)=>{v0.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>g8($,U,_,u)});function g3($){return SN(gI,$)}var zI=D("ZodBigInt",($,I)=>{TU.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>z8($,_,u,g),$.gte=(_,u)=>$.check(r$(_,u)),$.min=(_,u)=>$.check(r$(_,u)),$.gt=(_,u)=>$.check(E4(_,u)),$.gte=(_,u)=>$.check(r$(_,u)),$.min=(_,u)=>$.check(r$(_,u)),$.lt=(_,u)=>$.check(w4(_,u)),$.lte=(_,u)=>$.check(u4(_,u)),$.max=(_,u)=>$.check(u4(_,u)),$.positive=(_)=>$.check(E4(BigInt(0),_)),$.negative=(_)=>$.check(w4(BigInt(0),_)),$.nonpositive=(_)=>$.check(u4(BigInt(0),_)),$.nonnegative=(_)=>$.check(r$(BigInt(0),_)),$.multipleOf=(_,u)=>$.check(B6(_,u));let U=$._zod.bag;$.minValue=U.minimum??null,$.maxValue=U.maximum??null,$.format=U.format??null});function EQ($){return EN(zI,$)}var O_=D("ZodBigIntFormat",($,I)=>{iv.init($,I),zI.init($,I)});function CQ($){return fN(O_,$)}function fQ($){return xN(O_,$)}var z3=D("ZodSymbol",($,I)=>{nv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>v8($,U,_,u)});function xQ($){return kN(z3,$)}var v3=D("ZodUndefined",($,I)=>{rv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>N8($,U,_,u)});function kQ($){return yN(v3,$)}var J3=D("ZodNull",($,I)=>{lv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>J8($,U,_,u)});function N3($){return iN(J3,$)}var G3=D("ZodAny",($,I)=>{mv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>q8($,U,_,u)});function yQ(){return nN(G3)}var X3=D("ZodUnknown",($,I)=>{hv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>Q8($,U,_,u)});function e6(){return rN(X3)}var q3=D("ZodNever",($,I)=>{cv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>X8($,U,_,u)});function D_($){return lN(q3,$)}var Q3=D("ZodVoid",($,I)=>{dv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>G8($,U,_,u)});function iQ($){return mN(Q3,$)}var K0=D("ZodDate",($,I)=>{pv.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>T8($,_,u,g),$.min=(_,u)=>$.check(r$(_,u)),$.max=(_,u)=>$.check(u4(_,u));let U=$._zod.bag;$.minDate=U.minimum?new Date(U.minimum):null,$.maxDate=U.maximum?new Date(U.maximum):null});function nQ($){return hN(K0,$)}var T3=D("ZodArray",($,I)=>{ov.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>W8($,U,_,u),$.element=I.element,$.min=(U,_)=>$.check(d4(U,_)),$.nonempty=(U)=>$.check(d4(1,U)),$.max=(U,_)=>$.check(t6(U,_)),$.length=(U,_)=>$.check(a6(U,_)),$.unwrap=()=>$.element});function L0($,I){return pN(T3,$,I)}function rQ($){let I=$._zod.def.shape;return B_(Object.keys(I))}var P0=D("ZodObject",($,I)=>{tv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>Z8($,U,_,u),w.defineLazy($,"shape",()=>{return I.shape}),$.keyof=()=>B_(Object.keys($._zod.def.shape)),$.catchall=(U)=>$.clone({...$._zod.def,catchall:U}),$.passthrough=()=>$.clone({...$._zod.def,catchall:e6()}),$.loose=()=>$.clone({...$._zod.def,catchall:e6()}),$.strict=()=>$.clone({...$._zod.def,catchall:D_()}),$.strip=()=>$.clone({...$._zod.def,catchall:void 0}),$.extend=(U)=>{return w.extend($,U)},$.safeExtend=(U)=>{return w.safeExtend($,U)},$.merge=(U)=>w.merge($,U),$.pick=(U)=>w.pick($,U),$.omit=(U)=>w.omit($,U),$.partial=(...U)=>w.partial(R_,$,U[0]),$.required=(...U)=>w.required(K_,$,U[0])});function lQ($,I){let U={type:"object",shape:$??{},...w.normalizeParams(I)};return new P0(U)}function mQ($,I){return new P0({type:"object",shape:$,catchall:D_(),...w.normalizeParams(I)})}function hQ($,I){return new P0({type:"object",shape:$,catchall:e6(),...w.normalizeParams(I)})}var W0=D("ZodUnion",($,I)=>{J0.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>mU($,U,_,u),$.options=I.options});function V_($,I){return new W0({type:"union",options:$,...w.normalizeParams(I)})}var H3=D("ZodXor",($,I)=>{W0.init($,I),av.init($,I),$._zod.processJSONSchema=(U,_,u)=>mU($,U,_,u),$.options=I.options});function cQ($,I){return new H3({type:"union",options:$,inclusive:!1,...w.normalizeParams(I)})}var Y3=D("ZodDiscriminatedUnion",($,I)=>{W0.init($,I),ev.init($,I)});function dQ($,I,U){return new Y3({type:"union",options:I,discriminator:$,...w.normalizeParams(U)})}var O3=D("ZodIntersection",($,I)=>{sv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>A8($,U,_,u)});function D3($,I){return new O3({type:"intersection",left:$,right:I})}var V3=D("ZodTuple",($,I)=>{HU.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>b8($,U,_,u),$.rest=(U)=>$.clone({...$._zod.def,rest:U})});function B3($,I,U){let _=I instanceof l,u=_?U:I;return new V3({type:"tuple",items:$,rest:_?I:null,...w.normalizeParams(u)})}var Z0=D("ZodRecord",($,I)=>{$J.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>j8($,U,_,u),$.keyType=I.keyType,$.valueType=I.valueType});function M3($,I,U){return new Z0({type:"record",keyType:$,valueType:I,...w.normalizeParams(U)})}function pQ($,I,U){let _=n$($);return _._zod.values=void 0,new Z0({type:"record",keyType:_,valueType:I,...w.normalizeParams(U)})}function oQ($,I,U){return new Z0({type:"record",keyType:$,valueType:I,mode:"loose",...w.normalizeParams(U)})}var R3=D("ZodMap",($,I)=>{IJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>L8($,U,_,u),$.keyType=I.keyType,$.valueType=I.valueType,$.min=(...U)=>$.check(C4(...U)),$.nonempty=(U)=>$.check(C4(1,U)),$.max=(...U)=>$.check(M6(...U)),$.size=(...U)=>$.check(o6(...U))});function tQ($,I,U){return new R3({type:"map",keyType:$,valueType:I,...w.normalizeParams(U)})}var K3=D("ZodSet",($,I)=>{uJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>P8($,U,_,u),$.min=(...U)=>$.check(C4(...U)),$.nonempty=(U)=>$.check(C4(1,U)),$.max=(...U)=>$.check(M6(...U)),$.size=(...U)=>$.check(o6(...U))});function aQ($,I){return new K3({type:"set",valueType:$,...w.normalizeParams(I)})}var II=D("ZodEnum",($,I)=>{UJ.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>H8($,_,u,g),$.enum=I.entries,$.options=Object.values(I.entries);let U=new Set(Object.keys(I.entries));$.extract=(_,u)=>{let g={};for(let z of _)if(U.has(z))g[z]=I.entries[z];else throw Error(`Key ${z} not found in enum`);return new II({...I,checks:[],...w.normalizeParams(u),entries:g})},$.exclude=(_,u)=>{let g={...I.entries};for(let z of _)if(U.has(z))delete g[z];else throw Error(`Key ${z} not found in enum`);return new II({...I,checks:[],...w.normalizeParams(u),entries:g})}});function B_($,I){let U=Array.isArray($)?Object.fromEntries($.map((_)=>[_,_])):$;return new II({type:"enum",entries:U,...w.normalizeParams(I)})}function eQ($,I){return new II({type:"enum",entries:$,...w.normalizeParams(I)})}var L3=D("ZodLiteral",($,I)=>{_J.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>Y8($,U,_,u),$.values=new Set(I.values),Object.defineProperty($,"value",{get(){if(I.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return I.values[0]}})});function sQ($,I){return new L3({type:"literal",values:Array.isArray($)?$:[$],...w.normalizeParams(I)})}var P3=D("ZodFile",($,I)=>{gJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>V8($,U,_,u),$.min=(U,_)=>$.check(C4(U,_)),$.max=(U,_)=>$.check(M6(U,_)),$.mime=(U,_)=>$.check(c1(Array.isArray(U)?U:[U],_))});function $7($){return oN(P3,$)}var W3=D("ZodTransform",($,I)=>{zJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>K8($,U,_,u),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new h6($.constructor.name);U.addIssue=(g)=>{if(typeof g==="string")U.issues.push(w.issue(g,U.value,I));else{let z=g;if(z.fatal)z.continue=!1;z.code??(z.code="custom"),z.input??(z.input=U.value),z.inst??(z.inst=$),U.issues.push(w.issue(z))}};let u=I.transform(U.value,U);if(u instanceof Promise)return u.then((g)=>{return U.value=g,U});return U.value=u,U}});function M_($){return new W3({type:"transform",transform:$})}var R_=D("ZodOptional",($,I)=>{YU.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>hU($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function V0($){return new R_({type:"optional",innerType:$})}var Z3=D("ZodExactOptional",($,I)=>{vJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>hU($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function A3($){return new Z3({type:"optional",innerType:$})}var b3=D("ZodNullable",($,I)=>{JJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>F8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function B0($){return new b3({type:"nullable",innerType:$})}function I7($){return V0(B0($))}var j3=D("ZodDefault",($,I)=>{NJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>w8($,U,_,u),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function F3($,I){return new j3({type:"default",innerType:$,get defaultValue(){return typeof I==="function"?I():w.shallowClone(I)}})}var S3=D("ZodPrefault",($,I)=>{GJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>E8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function w3($,I){return new S3({type:"prefault",innerType:$,get defaultValue(){return typeof I==="function"?I():w.shallowClone(I)}})}var K_=D("ZodNonOptional",($,I)=>{XJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>S8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function E3($,I){return new K_({type:"nonoptional",innerType:$,...w.normalizeParams(I)})}var C3=D("ZodSuccess",($,I)=>{qJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>B8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function u7($){return new C3({type:"success",innerType:$})}var f3=D("ZodCatch",($,I)=>{QJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>C8($,U,_,u),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function x3($,I){return new f3({type:"catch",innerType:$,catchValue:typeof I==="function"?I:()=>I})}var k3=D("ZodNaN",($,I)=>{TJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>O8($,U,_,u)});function U7($){return dN(k3,$)}var L_=D("ZodPipe",($,I)=>{HJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>f8($,U,_,u),$.in=I.in,$.out=I.out});function M0($,I){return new L_({type:"pipe",in:$,out:I})}var P_=D("ZodCodec",($,I)=>{L_.init($,I),N0.init($,I)});function _7($,I,U){return new P_({type:"pipe",in:$,out:I,transform:U.decode,reverseTransform:U.encode})}var y3=D("ZodReadonly",($,I)=>{YJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>x8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function i3($){return new y3({type:"readonly",innerType:$})}var n3=D("ZodTemplateLiteral",($,I)=>{OJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>D8($,U,_,u)});function g7($,I){return new n3({type:"template_literal",parts:$,...w.normalizeParams(I)})}var r3=D("ZodLazy",($,I)=>{BJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>y8($,U,_,u),$.unwrap=()=>$._zod.def.getter()});function l3($){return new r3({type:"lazy",getter:$})}var m3=D("ZodPromise",($,I)=>{VJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>k8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function z7($){return new m3({type:"promise",innerType:$})}var h3=D("ZodFunction",($,I)=>{DJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>R8($,U,_,u)});function v7($){return new h3({type:"function",input:Array.isArray($?.input)?B3($?.input):$?.input??L0(e6()),output:$?.output??e6()})}var A0=D("ZodCustom",($,I)=>{MJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>M8($,U,_,u)});function J7($){let I=new G$({check:"custom"});return I._zod.check=$,I}function N7($,I){return tN(A0,$??(()=>!0),I)}function c3($,I={}){return aN(A0,$,I)}function d3($){return eN($)}var G7=sN,X7=$8;function q7($,I={}){let U=new A0({type:"custom",check:"custom",fn:(_)=>_ instanceof $,abort:!0,...w.normalizeParams(I)});return U._zod.bag.Class=$,U._zod.check=(_)=>{if(!(_.value instanceof $))_.issues.push({code:"invalid_type",expected:$.name,input:_.value,inst:U,path:[...U._zod.def.path??[]]})},U}var Q7=(...$)=>I8({Codec:P_,Boolean:gI,String:uI},...$);function T7($){let I=l3(()=>{return V_([eU($),_3(),g3(),N3(),L0(I),M3(eU(),I)])});return I}function H7($,I){return M0(M_($),I)}var Jj={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 Nj($){R$({customError:$})}function Gj(){return R$().customError}var p3;(function($){})(p3||(p3={}));var x={...O0,...dU,iso:$I},Xj=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 qj($,I){let U=$.$schema;if(U==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(U==="http://json-schema.org/draft-07/schema#")return"draft-7";if(U==="http://json-schema.org/draft-04/schema#")return"draft-4";return I??"draft-2020-12"}function Qj($,I){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let U=$.slice(1).split("/").filter(Boolean);if(U.length===0)return I.rootSchema;let _=I.version==="draft-2020-12"?"$defs":"definitions";if(U[0]===_){let u=U[1];if(!u||!I.defs[u])throw Error(`Reference not found: ${$}`);return I.defs[u]}throw Error(`Reference not found: ${$}`)}function Y7($,I){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return x.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let u=$.$ref;if(I.refs.has(u))return I.refs.get(u);if(I.processing.has(u))return x.lazy(()=>{if(!I.refs.has(u))throw Error(`Circular reference not resolved: ${u}`);return I.refs.get(u)});I.processing.add(u);let g=Qj(u,I),z=f$(g,I);return I.refs.set(u,z),I.processing.delete(u),z}if($.enum!==void 0){let u=$.enum;if(I.version==="openapi-3.0"&&$.nullable===!0&&u.length===1&&u[0]===null)return x.null();if(u.length===0)return x.never();if(u.length===1)return x.literal(u[0]);if(u.every((z)=>typeof z==="string"))return x.enum(u);let g=u.map((z)=>x.literal(z));if(g.length<2)return g[0];return x.union([g[0],g[1],...g.slice(2)])}if($.const!==void 0)return x.literal($.const);let U=$.type;if(Array.isArray(U)){let u=U.map((g)=>{let z={...$,type:g};return Y7(z,I)});if(u.length===0)return x.never();if(u.length===1)return u[0];return x.union(u)}if(!U)return x.any();let _;switch(U){case"string":{let u=x.string();if($.format){let g=$.format;if(g==="email")u=u.check(x.email());else if(g==="uri"||g==="uri-reference")u=u.check(x.url());else if(g==="uuid"||g==="guid")u=u.check(x.uuid());else if(g==="date-time")u=u.check(x.iso.datetime());else if(g==="date")u=u.check(x.iso.date());else if(g==="time")u=u.check(x.iso.time());else if(g==="duration")u=u.check(x.iso.duration());else if(g==="ipv4")u=u.check(x.ipv4());else if(g==="ipv6")u=u.check(x.ipv6());else if(g==="mac")u=u.check(x.mac());else if(g==="cidr")u=u.check(x.cidrv4());else if(g==="cidr-v6")u=u.check(x.cidrv6());else if(g==="base64")u=u.check(x.base64());else if(g==="base64url")u=u.check(x.base64url());else if(g==="e164")u=u.check(x.e164());else if(g==="jwt")u=u.check(x.jwt());else if(g==="emoji")u=u.check(x.emoji());else if(g==="nanoid")u=u.check(x.nanoid());else if(g==="cuid")u=u.check(x.cuid());else if(g==="cuid2")u=u.check(x.cuid2());else if(g==="ulid")u=u.check(x.ulid());else if(g==="xid")u=u.check(x.xid());else if(g==="ksuid")u=u.check(x.ksuid())}if(typeof $.minLength==="number")u=u.min($.minLength);if(typeof $.maxLength==="number")u=u.max($.maxLength);if($.pattern)u=u.regex(new RegExp($.pattern));_=u;break}case"number":case"integer":{let u=U==="integer"?x.number().int():x.number();if(typeof $.minimum==="number")u=u.min($.minimum);if(typeof $.maximum==="number")u=u.max($.maximum);if(typeof $.exclusiveMinimum==="number")u=u.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")u=u.gt($.minimum);if(typeof $.exclusiveMaximum==="number")u=u.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")u=u.lt($.maximum);if(typeof $.multipleOf==="number")u=u.multipleOf($.multipleOf);_=u;break}case"boolean":{_=x.boolean();break}case"null":{_=x.null();break}case"object":{let u={},g=$.properties||{},z=new Set($.required||[]);for(let[J,N]of Object.entries(g)){let X=f$(N,I);u[J]=z.has(J)?X:X.optional()}if($.propertyNames){let J=f$($.propertyNames,I),N=$.additionalProperties&&typeof $.additionalProperties==="object"?f$($.additionalProperties,I):x.any();if(Object.keys(u).length===0){_=x.record(J,N);break}let X=x.object(u).passthrough(),G=x.looseRecord(J,N);_=x.intersection(X,G);break}if($.patternProperties){let J=$.patternProperties,N=Object.keys(J),X=[];for(let q of N){let T=f$(J[q],I),H=x.string().regex(new RegExp(q));X.push(x.looseRecord(H,T))}let G=[];if(Object.keys(u).length>0)G.push(x.object(u).passthrough());if(G.push(...X),G.length===0)_=x.object({}).passthrough();else if(G.length===1)_=G[0];else{let q=x.intersection(G[0],G[1]);for(let T=2;T<G.length;T++)q=x.intersection(q,G[T]);_=q}break}let v=x.object(u);if($.additionalProperties===!1)_=v.strict();else if(typeof $.additionalProperties==="object")_=v.catchall(f$($.additionalProperties,I));else _=v.passthrough();break}case"array":{let{prefixItems:u,items:g}=$;if(u&&Array.isArray(u)){let z=u.map((J)=>f$(J,I)),v=g&&typeof g==="object"&&!Array.isArray(g)?f$(g,I):void 0;if(v)_=x.tuple(z).rest(v);else _=x.tuple(z);if(typeof $.minItems==="number")_=_.check(x.minLength($.minItems));if(typeof $.maxItems==="number")_=_.check(x.maxLength($.maxItems))}else if(Array.isArray(g)){let z=g.map((J)=>f$(J,I)),v=$.additionalItems&&typeof $.additionalItems==="object"?f$($.additionalItems,I):void 0;if(v)_=x.tuple(z).rest(v);else _=x.tuple(z);if(typeof $.minItems==="number")_=_.check(x.minLength($.minItems));if(typeof $.maxItems==="number")_=_.check(x.maxLength($.maxItems))}else if(g!==void 0){let z=f$(g,I),v=x.array(z);if(typeof $.minItems==="number")v=v.min($.minItems);if(typeof $.maxItems==="number")v=v.max($.maxItems);_=v}else _=x.array(x.any());break}default:throw Error(`Unsupported type: ${U}`)}if($.description)_=_.describe($.description);if($.default!==void 0)_=_.default($.default);return _}function f$($,I){if(typeof $==="boolean")return $?x.any():x.never();let U=Y7($,I),_=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let v=$.anyOf.map((N)=>f$(N,I)),J=x.union(v);U=_?x.intersection(U,J):J}if($.oneOf&&Array.isArray($.oneOf)){let v=$.oneOf.map((N)=>f$(N,I)),J=x.xor(v);U=_?x.intersection(U,J):J}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)U=_?U:x.any();else{let v=_?U:f$($.allOf[0],I),J=_?0:1;for(let N=J;N<$.allOf.length;N++)v=x.intersection(v,f$($.allOf[N],I));U=v}if($.nullable===!0&&I.version==="openapi-3.0")U=x.nullable(U);if($.readOnly===!0)U=x.readonly(U);let u={},g=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let v of g)if(v in $)u[v]=$[v];let z=["contentEncoding","contentMediaType","contentSchema"];for(let v of z)if(v in $)u[v]=$[v];for(let v of Object.keys($))if(!Xj.has(v))u[v]=$[v];if(Object.keys(u).length>0)I.registry.add(U,u);return U}function O7($,I){if(typeof $==="boolean")return $?x.any():x.never();let U=qj($,I?.defaultTarget),_=$.$defs||$.definitions||{},u={version:U,defs:_,refs:new Map,processing:new Set,rootSchema:$,registry:I?.registry??w$};return f$($,u)}var o3={};O4(o3,{string:()=>Tj,number:()=>Hj,date:()=>Dj,boolean:()=>Yj,bigint:()=>Oj});function Tj($){return DN(uI,$)}function Hj($){return WN(_I,$)}function Yj($){return wN(gI,$)}function Oj($){return CN(zI,$)}function Dj($){return cN(K0,$)}R$(G0());b0();function b_($){try{return process.kill($,0),!0}catch(I){return!1}}function P7($){let I=[],U=/[^\s"']+|"([^"]*)"|'([^']*)'/g,_=U.exec($);while(_!==null){if(_[1]!==void 0)I.push(_[1]);else if(_[2]!==void 0)I.push(_[2]);else if(_[0])I.push(_[0]);_=U.exec($)}return I}var Pj=z$.object({default_cli:z$.string().optional(),agent_cli_mapping:z$.record(z$.string(),z$.string()).optional()}).passthrough().transform(($)=>({default_cli:$.default_cli,agent_cli_mapping:$.agent_cli_mapping??{}})),Wj=z$.object({command:z$.string().optional(),subcommand:z$.string().optional(),prompt_flag:z$.string().optional().transform(($)=>{if($===void 0)return;let I=$.trim().toLowerCase();if(I===""||I==="none"||I==="null")return null;return $}),auto_approve_flag:z$.string().optional(),output_format_flag:z$.string().optional(),output_format:z$.string().optional(),model_flag:z$.string().optional(),default_model:z$.string().optional(),isolation_env:z$.string().optional(),isolation_flags:z$.string().optional()}).passthrough().transform(($)=>({...$,prompt_flag:$.prompt_flag??void 0})),Zj=z$.object({active_vendor:z$.string().optional(),vendors:z$.record(z$.string(),Wj).optional()}).passthrough().transform(($)=>({active_vendor:$.active_vendor,vendors:$.vendors??{}}));function W7($){try{return m6($)}catch{return null}}function Aj($){let I=W7($),U=Pj.safeParse(I);if(!U.success)return{};return U.data}function bj($){let I=W7($),U=Zj.safeParse(I);if(!U.success)return{vendors:{}};return{active_vendor:U.data.active_vendor,vendors:U.data.vendors}}function $G($,I){let U=I$.resolve($),_=I$.parse(U).root;while(U!==_){let u=I$.join(U,I);if(y.existsSync(u))return u;U=I$.dirname(U)}return null}function jj($){let I=$G($,I$.join(".agents","config","user-preferences.yaml"));if(!I)return null;try{let U=y.readFileSync(I,"utf-8");return Aj(U)}catch{return null}}function Fj($){let I=$G($,I$.join(".agents","skills","oma-orchestrator","config","cli-config.yaml"));if(!I)return null;try{let U=y.readFileSync(I,"utf-8");return bj(U)}catch{return null}}function IG($,I){let U=process.cwd(),_=jj(U),u=Fj(U),g=$.replace(/-agent$/i,""),z=_?.agent_cli_mapping?.[$]||_?.agent_cli_mapping?.[g];return{vendor:(I||z||_?.default_cli||u?.active_vendor||"gemini").toLowerCase(),config:u}}function Z7($,I){if(I!==void 0)return I;return{gemini:"-p",claude:"-p",qwen:"-p",codex:null}[$]??"-p"}var Sj={frontend:["web","frontend","client","ui","app","dashboard","admin","portal"],backend:["api","backend","server","service","gateway","core"],mobile:["mobile","ios","android","native","rn","expo"]},wj={frontend:["apps/web","apps/frontend","apps/client","packages/web","packages/frontend","frontend","web","client"],backend:["apps/api","apps/backend","apps/server","packages/api","packages/backend","backend","api","server"],mobile:["apps/mobile","apps/app","packages/mobile","mobile","app"]};function A7($,I){if($.startsWith("!"))return[];let U=$.replace(/\/\*\*?$/,"").replace(/\/$/,"");if(!$.includes("*")){let u=I$.join(I,U);if(y.existsSync(u)&&y.statSync(u).isDirectory())return[U];return[]}let _=I$.join(I,U);if(!y.existsSync(_)||!y.statSync(_).isDirectory())return[];try{return y.readdirSync(_,{withFileTypes:!0}).filter((g)=>g.isDirectory()&&!g.name.startsWith(".")).map((g)=>I$.join(U,g.name))}catch{return[]}}function Ej($){let I=I$.join($,"pnpm-workspace.yaml");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8");return m6(U)?.packages??[]}catch{return[]}}function b7($){let I=I$.join($,"package.json");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8"),_=JSON.parse(U);if(Array.isArray(_?.workspaces))return _.workspaces;if(_?.workspaces&&typeof _.workspaces==="object")return _.workspaces.packages??[];return[]}catch{return[]}}function Cj($){let I=I$.join($,"lerna.json");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8");return JSON.parse(U)?.packages??[]}catch{return[]}}function fj($){let I=I$.join($,"nx.json");if(!y.existsSync(I))return[];return["apps/*","libs/*","packages/*"].flatMap((_)=>A7(_,$))}function xj($){let I=I$.join($,"turbo.json");if(!y.existsSync(I))return[];return b7($)}function kj($){let I=I$.join($,"mise.toml");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8"),_=[],u=U.match(/workspaces\s*=\s*\[([^\]]+)\]/);if(u?.[1]){let g=u[1].match(/"([^"]+)"|'([^']+)'/g);if(g)_.push(...g.map((z)=>z.replace(/["']/g,"")))}return _}catch{return[]}}function yj($){let I=new Set,U=[Ej($),b7($),Cj($),fj($),xj($),kj($)];for(let u of U)for(let g of u)I.add(g);let _=new Set;for(let u of I)for(let g of A7(u,$))_.add(g);return[..._]}function ij($,I){let U=Sj[I];if(!U)return 0;let _=I$.basename($).toLowerCase(),u=$.toLowerCase();for(let g=0;g<U.length;g++){let z=U[g];if(!z)continue;if(_===z)return 100-g;if(_.includes(z))return 50-g;if(u.includes(z))return 25-g}return 0}function j7($){let I=process.cwd(),U=yj(I);if(U.length>0){let u=U.map((g)=>({workspace:g,score:ij(g,$)})).filter((g)=>g.score>0).sort((g,z)=>z.score-g.score);if(u.length>0&&u[0])return u[0].workspace}let _=wj[$];if(_)for(let u of _){let g=I$.resolve(u);if(y.existsSync(g)&&y.statSync(g).isDirectory())return u}return"."}function F7($){let I=I$.resolve($);if(y.existsSync(I)&&y.statSync(I).isFile())return y.readFileSync(I,"utf-8");return $}function S7($,I){let U=$G(I,I$.join(".agents","skills","_shared","runtime","execution-protocols",`${$}.md`));if(!U)return"";try{return y.readFileSync(U,"utf-8")}catch{return""}}async function w7($,I,U,_,u){let g=_==="."?j7($):_,z=I$.resolve(g);if(!y.existsSync(z))y.mkdirSync(z,{recursive:!0}),console.log(n.default.dim(`[${$}] Created workspace: ${z}`));else if(g!==_)console.log(n.default.blue(`[${$}] Auto-detected workspace: ${g}`));let v=A_(),J=I$.join(v,`subagent-${U}-${$}.log`),N=I$.join(v,`subagent-${U}-${$}.pid`),X=F7(I),{vendor:G,config:q}=IG($,u),T=S7(G,process.cwd()),H=T?`${X}
337
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let z of $.seen.entries()){let v=z[1];if(I===z[0]){g(z);continue}if($.external){let N=$.external.registry.get(z[0])?.id;if(I!==z[0]&&N){g(z);continue}}if($.metadataRegistry.get(z[0])?.id){g(z);continue}if(v.cycle){g(z);continue}if(v.count>1){if($.reused==="ref"){g(z);continue}}}}function P6($,I){let U=$.seen.get(I);if(!U)throw Error("Unprocessed schema. This is a bug in Zod.");let _=(z)=>{let v=$.seen.get(z);if(v.ref===null)return;let J=v.def??v.schema,N={...J},X=v.ref;if(v.ref=null,X){_(X);let q=$.seen.get(X),T=q.schema;if(T.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))J.allOf=J.allOf??[],J.allOf.push(T);else Object.assign(J,T);if(Object.assign(J,N),z._zod.parent===X)for(let Q in J){if(Q==="$ref"||Q==="allOf")continue;if(!(Q in N))delete J[Q]}if(T.$ref&&q.def)for(let Q in J){if(Q==="$ref"||Q==="allOf")continue;if(Q in q.def&&JSON.stringify(J[Q])===JSON.stringify(q.def[Q]))delete J[Q]}}let G=z._zod.parent;if(G&&G!==X){_(G);let q=$.seen.get(G);if(q?.schema.$ref){if(J.$ref=q.schema.$ref,q.def)for(let T in J){if(T==="$ref"||T==="allOf")continue;if(T in q.def&&JSON.stringify(J[T])===JSON.stringify(q.def[T]))delete J[T]}}}$.override({zodSchema:z,jsonSchema:J,path:v.path??[]})};for(let z of[...$.seen.entries()].reverse())_(z[0]);let u={};if($.target==="draft-2020-12")u.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")u.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")u.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let z=$.external.registry.get(I)?.id;if(!z)throw Error("Schema is missing an `id` property");u.$id=$.external.uri(z)}Object.assign(u,U.def??U.schema);let g=$.external?.defs??{};for(let z of $.seen.entries()){let v=z[1];if(v.def&&v.defId)g[v.defId]=v.def}if($.external);else if(Object.keys(g).length>0)if($.target==="draft-2020-12")u.$defs=g;else u.definitions=g;try{let z=JSON.parse(JSON.stringify(u));return Object.defineProperty(z,"~standard",{value:{...I["~standard"],jsonSchema:{input:II(I,"input",$.processors),output:II(I,"output",$.processors)}},enumerable:!1,writable:!1}),z}catch(z){throw Error("Error converting schema to JSON.")}}function m$($,I){let U=I??{seen:new Set};if(U.seen.has($))return!1;U.seen.add($);let _=$._zod.def;if(_.type==="transform")return!0;if(_.type==="array")return m$(_.element,U);if(_.type==="set")return m$(_.valueType,U);if(_.type==="lazy")return m$(_.getter(),U);if(_.type==="promise"||_.type==="optional"||_.type==="nonoptional"||_.type==="nullable"||_.type==="readonly"||_.type==="default"||_.type==="prefault")return m$(_.innerType,U);if(_.type==="intersection")return m$(_.left,U)||m$(_.right,U);if(_.type==="record"||_.type==="map")return m$(_.keyType,U)||m$(_.valueType,U);if(_.type==="pipe")return m$(_.in,U)||m$(_.out,U);if(_.type==="object"){for(let u in _.shape)if(m$(_.shape[u],U))return!0;return!1}if(_.type==="union"){for(let u of _.options)if(m$(u,U))return!0;return!1}if(_.type==="tuple"){for(let u of _.items)if(m$(u,U))return!0;if(_.rest&&m$(_.rest,U))return!0;return!1}return!1}var _8=($,I={})=>(U)=>{let _=L6({...U,processors:I});return _$($,_),W6(_,$),P6(_,$)},II=($,I,U={})=>(_)=>{let{libraryOptions:u,target:g}=_??{},z=L6({...u??{},target:g,io:I,processors:U});return _$($,z),W6(z,$),P6(z,$)};var gj={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},g8=($,I,U,_)=>{let u=U;u.type="string";let{minimum:g,maximum:z,format:v,patterns:J,contentEncoding:N}=$._zod.bag;if(typeof g==="number")u.minLength=g;if(typeof z==="number")u.maxLength=z;if(v){if(u.format=gj[v]??v,u.format==="")delete u.format;if(v==="time")delete u.format}if(N)u.contentEncoding=N;if(J&&J.size>0){let X=[...J];if(X.length===1)u.pattern=X[0].source;else if(X.length>1)u.allOf=[...X.map((G)=>({...I.target==="draft-07"||I.target==="draft-04"||I.target==="openapi-3.0"?{type:"string"}:{},pattern:G.source}))]}},z8=($,I,U,_)=>{let u=U,{minimum:g,maximum:z,format:v,multipleOf:J,exclusiveMaximum:N,exclusiveMinimum:X}=$._zod.bag;if(typeof v==="string"&&v.includes("int"))u.type="integer";else u.type="number";if(typeof X==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")u.minimum=X,u.exclusiveMinimum=!0;else u.exclusiveMinimum=X;if(typeof g==="number"){if(u.minimum=g,typeof X==="number"&&I.target!=="draft-04")if(X>=g)delete u.minimum;else delete u.exclusiveMinimum}if(typeof N==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")u.maximum=N,u.exclusiveMaximum=!0;else u.exclusiveMaximum=N;if(typeof z==="number"){if(u.maximum=z,typeof N==="number"&&I.target!=="draft-04")if(N<=z)delete u.maximum;else delete u.exclusiveMaximum}if(typeof J==="number")u.multipleOf=J},v8=($,I,U,_)=>{U.type="boolean"},J8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},N8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},G8=($,I,U,_)=>{if(I.target==="openapi-3.0")U.type="string",U.nullable=!0,U.enum=[null];else U.type="null"},X8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},q8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},Q8=($,I,U,_)=>{U.not={}},T8=($,I,U,_)=>{},H8=($,I,U,_)=>{},Y8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},O8=($,I,U,_)=>{let u=$._zod.def,g=eI(u.entries);if(g.every((z)=>typeof z==="number"))U.type="number";if(g.every((z)=>typeof z==="string"))U.type="string";U.enum=g},V8=($,I,U,_)=>{let u=$._zod.def,g=[];for(let z of u.values)if(z===void 0){if(I.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof z==="bigint")if(I.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else g.push(Number(z));else g.push(z);if(g.length===0);else if(g.length===1){let z=g[0];if(U.type=z===null?"null":typeof z,I.target==="draft-04"||I.target==="openapi-3.0")U.enum=[z];else U.const=z}else{if(g.every((z)=>typeof z==="number"))U.type="number";if(g.every((z)=>typeof z==="string"))U.type="string";if(g.every((z)=>typeof z==="boolean"))U.type="boolean";if(g.every((z)=>z===null))U.type="null";U.enum=g}},D8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},B8=($,I,U,_)=>{let u=U,g=$._zod.pattern;if(!g)throw Error("Pattern not found in template literal");u.type="string",u.pattern=g.source},M8=($,I,U,_)=>{let u=U,g={type:"string",format:"binary",contentEncoding:"binary"},{minimum:z,maximum:v,mime:J}=$._zod.bag;if(z!==void 0)g.minLength=z;if(v!==void 0)g.maxLength=v;if(J)if(J.length===1)g.contentMediaType=J[0],Object.assign(u,g);else Object.assign(u,g),u.anyOf=J.map((N)=>({contentMediaType:N}));else Object.assign(u,g)},K8=($,I,U,_)=>{U.type="boolean"},R8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},L8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},W8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},P8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},Z8=($,I,U,_)=>{if(I.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},A8=($,I,U,_)=>{let u=U,g=$._zod.def,{minimum:z,maximum:v}=$._zod.bag;if(typeof z==="number")u.minItems=z;if(typeof v==="number")u.maxItems=v;u.type="array",u.items=_$(g.element,I,{..._,path:[..._.path,"items"]})},b8=($,I,U,_)=>{let u=U,g=$._zod.def;u.type="object",u.properties={};let z=g.shape;for(let N in z)u.properties[N]=_$(z[N],I,{..._,path:[..._.path,"properties",N]});let v=new Set(Object.keys(z)),J=new Set([...v].filter((N)=>{let X=g.shape[N]._zod;if(I.io==="input")return X.optin===void 0;else return X.optout===void 0}));if(J.size>0)u.required=Array.from(J);if(g.catchall?._zod.def.type==="never")u.additionalProperties=!1;else if(!g.catchall){if(I.io==="output")u.additionalProperties=!1}else if(g.catchall)u.additionalProperties=_$(g.catchall,I,{..._,path:[..._.path,"additionalProperties"]})},dU=($,I,U,_)=>{let u=$._zod.def,g=u.inclusive===!1,z=u.options.map((v,J)=>_$(v,I,{..._,path:[..._.path,g?"oneOf":"anyOf",J]}));if(g)U.oneOf=z;else U.anyOf=z},j8=($,I,U,_)=>{let u=$._zod.def,g=_$(u.left,I,{..._,path:[..._.path,"allOf",0]}),z=_$(u.right,I,{..._,path:[..._.path,"allOf",1]}),v=(N)=>("allOf"in N)&&Object.keys(N).length===1,J=[...v(g)?g.allOf:[g],...v(z)?z.allOf:[z]];U.allOf=J},F8=($,I,U,_)=>{let u=U,g=$._zod.def;u.type="array";let z=I.target==="draft-2020-12"?"prefixItems":"items",v=I.target==="draft-2020-12"?"items":I.target==="openapi-3.0"?"items":"additionalItems",J=g.items.map((q,T)=>_$(q,I,{..._,path:[..._.path,z,T]})),N=g.rest?_$(g.rest,I,{..._,path:[..._.path,v,...I.target==="openapi-3.0"?[g.items.length]:[]]}):null;if(I.target==="draft-2020-12"){if(u.prefixItems=J,N)u.items=N}else if(I.target==="openapi-3.0"){if(u.items={anyOf:J},N)u.items.anyOf.push(N);if(u.minItems=J.length,!N)u.maxItems=J.length}else if(u.items=J,N)u.additionalItems=N;let{minimum:X,maximum:G}=$._zod.bag;if(typeof X==="number")u.minItems=X;if(typeof G==="number")u.maxItems=G},S8=($,I,U,_)=>{let u=U,g=$._zod.def;u.type="object";let z=g.keyType,J=z._zod.bag?.patterns;if(g.mode==="loose"&&J&&J.size>0){let X=_$(g.valueType,I,{..._,path:[..._.path,"patternProperties","*"]});u.patternProperties={};for(let G of J)u.patternProperties[G.source]=X}else{if(I.target==="draft-07"||I.target==="draft-2020-12")u.propertyNames=_$(g.keyType,I,{..._,path:[..._.path,"propertyNames"]});u.additionalProperties=_$(g.valueType,I,{..._,path:[..._.path,"additionalProperties"]})}let N=z._zod.values;if(N){let X=[...N].filter((G)=>typeof G==="string"||typeof G==="number");if(X.length>0)u.required=X}},w8=($,I,U,_)=>{let u=$._zod.def,g=_$(u.innerType,I,_),z=I.seen.get($);if(I.target==="openapi-3.0")z.ref=u.innerType,U.nullable=!0;else U.anyOf=[g,{type:"null"}]},E8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType},C8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType,U.default=JSON.parse(JSON.stringify(u.defaultValue))},f8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);if(g.ref=u.innerType,I.io==="input")U._prefault=JSON.parse(JSON.stringify(u.defaultValue))},x8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType;let z;try{z=u.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}U.default=z},k8=($,I,U,_)=>{let u=$._zod.def,g=I.io==="input"?u.in._zod.def.type==="transform"?u.out:u.in:u.out;_$(g,I,_);let z=I.seen.get($);z.ref=g},y8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType,U.readOnly=!0},i8=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType},pU=($,I,U,_)=>{let u=$._zod.def;_$(u.innerType,I,_);let g=I.seen.get($);g.ref=u.innerType},r8=($,I,U,_)=>{let u=$._zod.innerType;_$(u,I,_);let g=I.seen.get($);g.ref=u},cU={string:g8,number:z8,boolean:v8,bigint:J8,symbol:N8,null:G8,undefined:X8,void:q8,never:Q8,any:T8,unknown:H8,date:Y8,enum:O8,literal:V8,nan:D8,template_literal:B8,file:M8,success:K8,custom:R8,function:L8,transform:W8,map:P8,set:Z8,array:A8,object:b8,union:dU,intersection:j8,tuple:F8,record:S8,nullable:w8,nonoptional:E8,default:C8,prefault:f8,catch:x8,pipe:k8,readonly:y8,promise:i8,optional:pU,lazy:r8};function oU($,I){if("_idmap"in $){let _=$,u=L6({...I,processors:cU}),g={};for(let J of _._idmap.entries()){let[N,X]=J;_$(X,u)}let z={},v={registry:_,uri:I?.uri,defs:g};u.external=v;for(let J of _._idmap.entries()){let[N,X]=J;W6(u,X),z[N]=P6(u,X)}if(Object.keys(g).length>0){let J=u.target==="draft-2020-12"?"$defs":"definitions";z.__shared={[J]:g}}return{schemas:z}}let U=L6({...I,processors:cU});return _$($,U),W6(U,$),P6(U,$)}class n8{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($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";this.ctx=L6({processors:cU,target:I,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,I={path:[],schemaPath:[]}){return _$($,this.ctx,I)}emit($,I){if(I){if(I.cycles)this.ctx.cycles=I.cycles;if(I.reused)this.ctx.reused=I.reused;if(I.external)this.ctx.external=I.external}W6(this.ctx,$);let U=P6(this.ctx,$),{"~standard":_,...u}=U;return u}}var uQ={};var D0={};D4(D0,{xor:()=>pQ,xid:()=>OQ,void:()=>nQ,uuidv7:()=>NQ,uuidv6:()=>JQ,uuidv4:()=>vQ,uuid:()=>zQ,url:()=>GQ,unknown:()=>$1,union:()=>K_,undefined:()=>iQ,ulid:()=>YQ,uint64:()=>kQ,uint32:()=>CQ,tuple:()=>K3,transform:()=>L_,templateLiteral:()=>v7,symbol:()=>yQ,superRefine:()=>o3,success:()=>_7,stringbool:()=>H7,stringFormat:()=>AQ,string:()=>I_,strictObject:()=>cQ,set:()=>sQ,refine:()=>p3,record:()=>R3,readonly:()=>n3,promise:()=>J7,preprocess:()=>O7,prefault:()=>C3,pipe:()=>R0,partialRecord:()=>tQ,optional:()=>M0,object:()=>hQ,number:()=>z3,nullish:()=>U7,nullable:()=>K0,null:()=>X3,nonoptional:()=>f3,never:()=>M_,nativeEnum:()=>$7,nanoid:()=>QQ,nan:()=>g7,meta:()=>Q7,map:()=>eQ,mac:()=>BQ,looseRecord:()=>aQ,looseObject:()=>dQ,literal:()=>I7,lazy:()=>h3,ksuid:()=>VQ,keyof:()=>mQ,jwt:()=>ZQ,json:()=>Y7,ipv6:()=>MQ,ipv4:()=>DQ,intersection:()=>B3,int64:()=>xQ,int32:()=>EQ,int:()=>u_,instanceof:()=>T7,httpUrl:()=>XQ,hostname:()=>bQ,hex:()=>jQ,hash:()=>FQ,guid:()=>gQ,function:()=>N7,float64:()=>wQ,float32:()=>SQ,file:()=>u7,exactOptional:()=>j3,enum:()=>R_,emoji:()=>qQ,email:()=>_Q,e164:()=>PQ,discriminatedUnion:()=>oQ,describe:()=>q7,date:()=>lQ,custom:()=>X7,cuid2:()=>HQ,cuid:()=>TQ,codec:()=>z7,cidrv6:()=>RQ,cidrv4:()=>KQ,check:()=>G7,catch:()=>y3,boolean:()=>v3,bigint:()=>fQ,base64url:()=>WQ,base64:()=>LQ,array:()=>P0,any:()=>rQ,_function:()=>N7,_default:()=>w3,_ZodString:()=>U_,ZodXor:()=>O3,ZodXID:()=>G_,ZodVoid:()=>H3,ZodUnknown:()=>Q3,ZodUnion:()=>A0,ZodUndefined:()=>N3,ZodUUID:()=>k4,ZodURL:()=>L0,ZodULID:()=>N_,ZodType:()=>c,ZodTuple:()=>M3,ZodTransform:()=>A3,ZodTemplateLiteral:()=>l3,ZodSymbol:()=>J3,ZodSuccess:()=>x3,ZodStringFormat:()=>J$,ZodString:()=>_I,ZodSet:()=>W3,ZodRecord:()=>b0,ZodReadonly:()=>r3,ZodPromise:()=>c3,ZodPrefault:()=>E3,ZodPipe:()=>Z_,ZodOptional:()=>W_,ZodObject:()=>Z0,ZodNumberFormat:()=>I1,ZodNumber:()=>zI,ZodNullable:()=>F3,ZodNull:()=>G3,ZodNonOptional:()=>P_,ZodNever:()=>T3,ZodNanoID:()=>z_,ZodNaN:()=>i3,ZodMap:()=>L3,ZodMAC:()=>g3,ZodLiteral:()=>P3,ZodLazy:()=>m3,ZodKSUID:()=>X_,ZodJWT:()=>D_,ZodIntersection:()=>D3,ZodIPv6:()=>Q_,ZodIPv4:()=>q_,ZodGUID:()=>B0,ZodFunction:()=>d3,ZodFile:()=>Z3,ZodExactOptional:()=>b3,ZodEnum:()=>UI,ZodEmoji:()=>g_,ZodEmail:()=>__,ZodE164:()=>V_,ZodDiscriminatedUnion:()=>V3,ZodDefault:()=>S3,ZodDate:()=>W0,ZodCustomStringFormat:()=>gI,ZodCustom:()=>j0,ZodCodec:()=>A_,ZodCatch:()=>k3,ZodCUID2:()=>J_,ZodCUID:()=>v_,ZodCIDRv6:()=>H_,ZodCIDRv4:()=>T_,ZodBoolean:()=>vI,ZodBigIntFormat:()=>B_,ZodBigInt:()=>JI,ZodBase64URL:()=>O_,ZodBase64:()=>Y_,ZodArray:()=>Y3,ZodAny:()=>q3});var tU={};D4(tU,{uppercase:()=>m1,trim:()=>t1,toUpperCase:()=>e1,toLowerCase:()=>a1,startsWith:()=>c1,slugify:()=>s1,size:()=>a6,regex:()=>n1,property:()=>hU,positive:()=>rU,overwrite:()=>K4,normalize:()=>o1,nonpositive:()=>lU,nonnegative:()=>mU,negative:()=>nU,multipleOf:()=>K6,minSize:()=>x4,minLength:()=>o4,mime:()=>p1,maxSize:()=>R6,maxLength:()=>e6,lte:()=>_4,lt:()=>C4,lowercase:()=>l1,length:()=>s6,includes:()=>h1,gte:()=>l$,gt:()=>f4,endsWith:()=>d1});var uI={};D4(uI,{time:()=>h8,duration:()=>c8,datetime:()=>l8,date:()=>m8,ZodISOTime:()=>sU,ZodISODuration:()=>$_,ZodISODateTime:()=>aU,ZodISODate:()=>eU});var aU=V("ZodISODateTime",($,I)=>{Pv.init($,I),J$.init($,I)});function l8($){return RN(aU,$)}var eU=V("ZodISODate",($,I)=>{Zv.init($,I),J$.init($,I)});function m8($){return LN(eU,$)}var sU=V("ZodISOTime",($,I)=>{Av.init($,I),J$.init($,I)});function h8($){return WN(sU,$)}var $_=V("ZodISODuration",($,I)=>{bv.init($,I),J$.init($,I)});function c8($){return PN($_,$)}var UQ=($,I)=>{U0.init($,I),$.name="ZodError",Object.defineProperties($,{format:{value:(U)=>g0($,U)},flatten:{value:(U)=>_0($,U)},addIssue:{value:(U)=>{$.issues.push(U),$.message=JSON.stringify($.issues,w1,2)}},addIssues:{value:(U)=>{$.issues.push(...U),$.message=JSON.stringify($.issues,w1,2)}},isEmpty:{get(){return $.issues.length===0}}})},vj=V("ZodError",UQ),s$=V("ZodError",UQ,{Parent:Error});var d8=f1(s$),p8=x1(s$),o8=k1(s$),t8=y1(s$),a8=su(s$),e8=$U(s$),s8=IU(s$),$3=uU(s$),I3=UU(s$),u3=_U(s$),U3=gU(s$),_3=zU(s$);var c=V("ZodType",($,I)=>{return l.init($,I),Object.assign($["~standard"],{jsonSchema:{input:II($,"input"),output:II($,"output")}}),$.toJSONSchema=_8($,{}),$.def=I,$.type=I.type,Object.defineProperty($,"_def",{value:I}),$.check=(...U)=>{return $.clone(w.mergeDefs(I,{checks:[...I.checks??[],...U.map((_)=>typeof _==="function"?{_zod:{check:_,def:{check:"custom"},onattach:[]}}:_)]}),{parent:!0})},$.with=$.check,$.clone=(U,_)=>n$($,U,_),$.brand=()=>$,$.register=(U,_)=>{return U.add($,_),$},$.parse=(U,_)=>d8($,U,_,{callee:$.parse}),$.safeParse=(U,_)=>o8($,U,_),$.parseAsync=async(U,_)=>p8($,U,_,{callee:$.parseAsync}),$.safeParseAsync=async(U,_)=>t8($,U,_),$.spa=$.safeParseAsync,$.encode=(U,_)=>a8($,U,_),$.decode=(U,_)=>e8($,U,_),$.encodeAsync=async(U,_)=>s8($,U,_),$.decodeAsync=async(U,_)=>$3($,U,_),$.safeEncode=(U,_)=>I3($,U,_),$.safeDecode=(U,_)=>u3($,U,_),$.safeEncodeAsync=async(U,_)=>U3($,U,_),$.safeDecodeAsync=async(U,_)=>_3($,U,_),$.refine=(U,_)=>$.check(p3(U,_)),$.superRefine=(U)=>$.check(o3(U)),$.overwrite=(U)=>$.check(K4(U)),$.optional=()=>M0($),$.exactOptional=()=>j3($),$.nullable=()=>K0($),$.nullish=()=>M0(K0($)),$.nonoptional=(U)=>f3($,U),$.array=()=>P0($),$.or=(U)=>K_([$,U]),$.and=(U)=>B3($,U),$.transform=(U)=>R0($,L_(U)),$.default=(U)=>w3($,U),$.prefault=(U)=>C3($,U),$.catch=(U)=>y3($,U),$.pipe=(U)=>R0($,U),$.readonly=()=>n3($),$.describe=(U)=>{let _=$.clone();return w$.add(_,{description:U}),_},Object.defineProperty($,"description",{get(){return w$.get($)?.description},configurable:!0}),$.meta=(...U)=>{if(U.length===0)return w$.get($);let _=$.clone();return w$.add(_,U[0]),_},$.isOptional=()=>$.safeParse(void 0).success,$.isNullable=()=>$.safeParse(null).success,$.apply=(U)=>U($),$}),U_=V("_ZodString",($,I)=>{t6.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>g8($,_,u,g);let U=$._zod.bag;$.format=U.format??null,$.minLength=U.minimum??null,$.maxLength=U.maximum??null,$.regex=(..._)=>$.check(n1(..._)),$.includes=(..._)=>$.check(h1(..._)),$.startsWith=(..._)=>$.check(c1(..._)),$.endsWith=(..._)=>$.check(d1(..._)),$.min=(..._)=>$.check(o4(..._)),$.max=(..._)=>$.check(e6(..._)),$.length=(..._)=>$.check(s6(..._)),$.nonempty=(..._)=>$.check(o4(1,..._)),$.lowercase=(_)=>$.check(l1(_)),$.uppercase=(_)=>$.check(m1(_)),$.trim=()=>$.check(t1()),$.normalize=(..._)=>$.check(o1(..._)),$.toLowerCase=()=>$.check(a1()),$.toUpperCase=()=>$.check(e1()),$.slugify=()=>$.check(s1())}),_I=V("ZodString",($,I)=>{t6.init($,I),U_.init($,I),$.email=(U)=>$.check(MU(__,U)),$.url=(U)=>$.check(V0(L0,U)),$.jwt=(U)=>$.check(iU(D_,U)),$.emoji=(U)=>$.check(PU(g_,U)),$.guid=(U)=>$.check(O0(B0,U)),$.uuid=(U)=>$.check(KU(k4,U)),$.uuidv4=(U)=>$.check(RU(k4,U)),$.uuidv6=(U)=>$.check(LU(k4,U)),$.uuidv7=(U)=>$.check(WU(k4,U)),$.nanoid=(U)=>$.check(ZU(z_,U)),$.guid=(U)=>$.check(O0(B0,U)),$.cuid=(U)=>$.check(AU(v_,U)),$.cuid2=(U)=>$.check(bU(J_,U)),$.ulid=(U)=>$.check(jU(N_,U)),$.base64=(U)=>$.check(xU(Y_,U)),$.base64url=(U)=>$.check(kU(O_,U)),$.xid=(U)=>$.check(FU(G_,U)),$.ksuid=(U)=>$.check(SU(X_,U)),$.ipv4=(U)=>$.check(wU(q_,U)),$.ipv6=(U)=>$.check(EU(Q_,U)),$.cidrv4=(U)=>$.check(CU(T_,U)),$.cidrv6=(U)=>$.check(fU(H_,U)),$.e164=(U)=>$.check(yU(V_,U)),$.datetime=(U)=>$.check(l8(U)),$.date=(U)=>$.check(m8(U)),$.time=(U)=>$.check(h8(U)),$.duration=(U)=>$.check(c8(U))});function I_($){return DN(_I,$)}var J$=V("ZodStringFormat",($,I)=>{v$.init($,I),U_.init($,I)}),__=V("ZodEmail",($,I)=>{Ov.init($,I),J$.init($,I)});function _Q($){return MU(__,$)}var B0=V("ZodGUID",($,I)=>{Hv.init($,I),J$.init($,I)});function gQ($){return O0(B0,$)}var k4=V("ZodUUID",($,I)=>{Yv.init($,I),J$.init($,I)});function zQ($){return KU(k4,$)}function vQ($){return RU(k4,$)}function JQ($){return LU(k4,$)}function NQ($){return WU(k4,$)}var L0=V("ZodURL",($,I)=>{Vv.init($,I),J$.init($,I)});function GQ($){return V0(L0,$)}function XQ($){return V0(L0,{protocol:/^https?$/,hostname:H4.domain,...w.normalizeParams($)})}var g_=V("ZodEmoji",($,I)=>{Dv.init($,I),J$.init($,I)});function qQ($){return PU(g_,$)}var z_=V("ZodNanoID",($,I)=>{Bv.init($,I),J$.init($,I)});function QQ($){return ZU(z_,$)}var v_=V("ZodCUID",($,I)=>{Mv.init($,I),J$.init($,I)});function TQ($){return AU(v_,$)}var J_=V("ZodCUID2",($,I)=>{Kv.init($,I),J$.init($,I)});function HQ($){return bU(J_,$)}var N_=V("ZodULID",($,I)=>{Rv.init($,I),J$.init($,I)});function YQ($){return jU(N_,$)}var G_=V("ZodXID",($,I)=>{Lv.init($,I),J$.init($,I)});function OQ($){return FU(G_,$)}var X_=V("ZodKSUID",($,I)=>{Wv.init($,I),J$.init($,I)});function VQ($){return SU(X_,$)}var q_=V("ZodIPv4",($,I)=>{jv.init($,I),J$.init($,I)});function DQ($){return wU(q_,$)}var g3=V("ZodMAC",($,I)=>{Sv.init($,I),J$.init($,I)});function BQ($){return MN(g3,$)}var Q_=V("ZodIPv6",($,I)=>{Fv.init($,I),J$.init($,I)});function MQ($){return EU(Q_,$)}var T_=V("ZodCIDRv4",($,I)=>{wv.init($,I),J$.init($,I)});function KQ($){return CU(T_,$)}var H_=V("ZodCIDRv6",($,I)=>{Ev.init($,I),J$.init($,I)});function RQ($){return fU(H_,$)}var Y_=V("ZodBase64",($,I)=>{fv.init($,I),J$.init($,I)});function LQ($){return xU(Y_,$)}var O_=V("ZodBase64URL",($,I)=>{xv.init($,I),J$.init($,I)});function WQ($){return kU(O_,$)}var V_=V("ZodE164",($,I)=>{kv.init($,I),J$.init($,I)});function PQ($){return yU(V_,$)}var D_=V("ZodJWT",($,I)=>{yv.init($,I),J$.init($,I)});function ZQ($){return iU(D_,$)}var gI=V("ZodCustomStringFormat",($,I)=>{iv.init($,I),J$.init($,I)});function AQ($,I,U={}){return $I(gI,$,I,U)}function bQ($){return $I(gI,"hostname",H4.hostname,$)}function jQ($){return $I(gI,"hex",H4.hex,$)}function FQ($,I){let U=I?.enc??"hex",_=`${$}_${U}`,u=H4[_];if(!u)throw Error(`Unrecognized hash format: ${_}`);return $I(gI,_,u,I)}var zI=V("ZodNumber",($,I)=>{YU.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>z8($,_,u,g),$.gt=(_,u)=>$.check(f4(_,u)),$.gte=(_,u)=>$.check(l$(_,u)),$.min=(_,u)=>$.check(l$(_,u)),$.lt=(_,u)=>$.check(C4(_,u)),$.lte=(_,u)=>$.check(_4(_,u)),$.max=(_,u)=>$.check(_4(_,u)),$.int=(_)=>$.check(u_(_)),$.safe=(_)=>$.check(u_(_)),$.positive=(_)=>$.check(f4(0,_)),$.nonnegative=(_)=>$.check(l$(0,_)),$.negative=(_)=>$.check(C4(0,_)),$.nonpositive=(_)=>$.check(_4(0,_)),$.multipleOf=(_,u)=>$.check(K6(_,u)),$.step=(_,u)=>$.check(K6(_,u)),$.finite=()=>$;let U=$._zod.bag;$.minValue=Math.max(U.minimum??Number.NEGATIVE_INFINITY,U.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(U.maximum??Number.POSITIVE_INFINITY,U.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(U.format??"").includes("int")||Number.isSafeInteger(U.multipleOf??0.5),$.isFinite=!0,$.format=U.format??null});function z3($){return ZN(zI,$)}var I1=V("ZodNumberFormat",($,I)=>{rv.init($,I),zI.init($,I)});function u_($){return bN(I1,$)}function SQ($){return jN(I1,$)}function wQ($){return FN(I1,$)}function EQ($){return SN(I1,$)}function CQ($){return wN(I1,$)}var vI=V("ZodBoolean",($,I)=>{N0.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>v8($,U,_,u)});function v3($){return EN(vI,$)}var JI=V("ZodBigInt",($,I)=>{OU.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>J8($,_,u,g),$.gte=(_,u)=>$.check(l$(_,u)),$.min=(_,u)=>$.check(l$(_,u)),$.gt=(_,u)=>$.check(f4(_,u)),$.gte=(_,u)=>$.check(l$(_,u)),$.min=(_,u)=>$.check(l$(_,u)),$.lt=(_,u)=>$.check(C4(_,u)),$.lte=(_,u)=>$.check(_4(_,u)),$.max=(_,u)=>$.check(_4(_,u)),$.positive=(_)=>$.check(f4(BigInt(0),_)),$.negative=(_)=>$.check(C4(BigInt(0),_)),$.nonpositive=(_)=>$.check(_4(BigInt(0),_)),$.nonnegative=(_)=>$.check(l$(BigInt(0),_)),$.multipleOf=(_,u)=>$.check(K6(_,u));let U=$._zod.bag;$.minValue=U.minimum??null,$.maxValue=U.maximum??null,$.format=U.format??null});function fQ($){return fN(JI,$)}var B_=V("ZodBigIntFormat",($,I)=>{nv.init($,I),JI.init($,I)});function xQ($){return kN(B_,$)}function kQ($){return yN(B_,$)}var J3=V("ZodSymbol",($,I)=>{lv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>N8($,U,_,u)});function yQ($){return iN(J3,$)}var N3=V("ZodUndefined",($,I)=>{mv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>X8($,U,_,u)});function iQ($){return rN(N3,$)}var G3=V("ZodNull",($,I)=>{hv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>G8($,U,_,u)});function X3($){return nN(G3,$)}var q3=V("ZodAny",($,I)=>{cv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>T8($,U,_,u)});function rQ(){return lN(q3)}var Q3=V("ZodUnknown",($,I)=>{dv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>H8($,U,_,u)});function $1(){return mN(Q3)}var T3=V("ZodNever",($,I)=>{pv.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>Q8($,U,_,u)});function M_($){return hN(T3,$)}var H3=V("ZodVoid",($,I)=>{ov.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>q8($,U,_,u)});function nQ($){return cN(H3,$)}var W0=V("ZodDate",($,I)=>{tv.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>Y8($,_,u,g),$.min=(_,u)=>$.check(l$(_,u)),$.max=(_,u)=>$.check(_4(_,u));let U=$._zod.bag;$.minDate=U.minimum?new Date(U.minimum):null,$.maxDate=U.maximum?new Date(U.maximum):null});function lQ($){return dN(W0,$)}var Y3=V("ZodArray",($,I)=>{av.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>A8($,U,_,u),$.element=I.element,$.min=(U,_)=>$.check(o4(U,_)),$.nonempty=(U)=>$.check(o4(1,U)),$.max=(U,_)=>$.check(e6(U,_)),$.length=(U,_)=>$.check(s6(U,_)),$.unwrap=()=>$.element});function P0($,I){return tN(Y3,$,I)}function mQ($){let I=$._zod.def.shape;return R_(Object.keys(I))}var Z0=V("ZodObject",($,I)=>{ev.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>b8($,U,_,u),w.defineLazy($,"shape",()=>{return I.shape}),$.keyof=()=>R_(Object.keys($._zod.def.shape)),$.catchall=(U)=>$.clone({...$._zod.def,catchall:U}),$.passthrough=()=>$.clone({...$._zod.def,catchall:$1()}),$.loose=()=>$.clone({...$._zod.def,catchall:$1()}),$.strict=()=>$.clone({...$._zod.def,catchall:M_()}),$.strip=()=>$.clone({...$._zod.def,catchall:void 0}),$.extend=(U)=>{return w.extend($,U)},$.safeExtend=(U)=>{return w.safeExtend($,U)},$.merge=(U)=>w.merge($,U),$.pick=(U)=>w.pick($,U),$.omit=(U)=>w.omit($,U),$.partial=(...U)=>w.partial(W_,$,U[0]),$.required=(...U)=>w.required(P_,$,U[0])});function hQ($,I){let U={type:"object",shape:$??{},...w.normalizeParams(I)};return new Z0(U)}function cQ($,I){return new Z0({type:"object",shape:$,catchall:M_(),...w.normalizeParams(I)})}function dQ($,I){return new Z0({type:"object",shape:$,catchall:$1(),...w.normalizeParams(I)})}var A0=V("ZodUnion",($,I)=>{G0.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>dU($,U,_,u),$.options=I.options});function K_($,I){return new A0({type:"union",options:$,...w.normalizeParams(I)})}var O3=V("ZodXor",($,I)=>{A0.init($,I),sv.init($,I),$._zod.processJSONSchema=(U,_,u)=>dU($,U,_,u),$.options=I.options});function pQ($,I){return new O3({type:"union",options:$,inclusive:!1,...w.normalizeParams(I)})}var V3=V("ZodDiscriminatedUnion",($,I)=>{A0.init($,I),$J.init($,I)});function oQ($,I,U){return new V3({type:"union",options:I,discriminator:$,...w.normalizeParams(U)})}var D3=V("ZodIntersection",($,I)=>{IJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>j8($,U,_,u)});function B3($,I){return new D3({type:"intersection",left:$,right:I})}var M3=V("ZodTuple",($,I)=>{VU.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>F8($,U,_,u),$.rest=(U)=>$.clone({...$._zod.def,rest:U})});function K3($,I,U){let _=I instanceof l,u=_?U:I;return new M3({type:"tuple",items:$,rest:_?I:null,...w.normalizeParams(u)})}var b0=V("ZodRecord",($,I)=>{uJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>S8($,U,_,u),$.keyType=I.keyType,$.valueType=I.valueType});function R3($,I,U){return new b0({type:"record",keyType:$,valueType:I,...w.normalizeParams(U)})}function tQ($,I,U){let _=n$($);return _._zod.values=void 0,new b0({type:"record",keyType:_,valueType:I,...w.normalizeParams(U)})}function aQ($,I,U){return new b0({type:"record",keyType:$,valueType:I,mode:"loose",...w.normalizeParams(U)})}var L3=V("ZodMap",($,I)=>{UJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>P8($,U,_,u),$.keyType=I.keyType,$.valueType=I.valueType,$.min=(...U)=>$.check(x4(...U)),$.nonempty=(U)=>$.check(x4(1,U)),$.max=(...U)=>$.check(R6(...U)),$.size=(...U)=>$.check(a6(...U))});function eQ($,I,U){return new L3({type:"map",keyType:$,valueType:I,...w.normalizeParams(U)})}var W3=V("ZodSet",($,I)=>{_J.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>Z8($,U,_,u),$.min=(...U)=>$.check(x4(...U)),$.nonempty=(U)=>$.check(x4(1,U)),$.max=(...U)=>$.check(R6(...U)),$.size=(...U)=>$.check(a6(...U))});function sQ($,I){return new W3({type:"set",valueType:$,...w.normalizeParams(I)})}var UI=V("ZodEnum",($,I)=>{gJ.init($,I),c.init($,I),$._zod.processJSONSchema=(_,u,g)=>O8($,_,u,g),$.enum=I.entries,$.options=Object.values(I.entries);let U=new Set(Object.keys(I.entries));$.extract=(_,u)=>{let g={};for(let z of _)if(U.has(z))g[z]=I.entries[z];else throw Error(`Key ${z} not found in enum`);return new UI({...I,checks:[],...w.normalizeParams(u),entries:g})},$.exclude=(_,u)=>{let g={...I.entries};for(let z of _)if(U.has(z))delete g[z];else throw Error(`Key ${z} not found in enum`);return new UI({...I,checks:[],...w.normalizeParams(u),entries:g})}});function R_($,I){let U=Array.isArray($)?Object.fromEntries($.map((_)=>[_,_])):$;return new UI({type:"enum",entries:U,...w.normalizeParams(I)})}function $7($,I){return new UI({type:"enum",entries:$,...w.normalizeParams(I)})}var P3=V("ZodLiteral",($,I)=>{zJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>V8($,U,_,u),$.values=new Set(I.values),Object.defineProperty($,"value",{get(){if(I.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return I.values[0]}})});function I7($,I){return new P3({type:"literal",values:Array.isArray($)?$:[$],...w.normalizeParams(I)})}var Z3=V("ZodFile",($,I)=>{vJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>M8($,U,_,u),$.min=(U,_)=>$.check(x4(U,_)),$.max=(U,_)=>$.check(R6(U,_)),$.mime=(U,_)=>$.check(p1(Array.isArray(U)?U:[U],_))});function u7($){return aN(Z3,$)}var A3=V("ZodTransform",($,I)=>{JJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>W8($,U,_,u),$._zod.parse=(U,_)=>{if(_.direction==="backward")throw new d6($.constructor.name);U.addIssue=(g)=>{if(typeof g==="string")U.issues.push(w.issue(g,U.value,I));else{let z=g;if(z.fatal)z.continue=!1;z.code??(z.code="custom"),z.input??(z.input=U.value),z.inst??(z.inst=$),U.issues.push(w.issue(z))}};let u=I.transform(U.value,U);if(u instanceof Promise)return u.then((g)=>{return U.value=g,U});return U.value=u,U}});function L_($){return new A3({type:"transform",transform:$})}var W_=V("ZodOptional",($,I)=>{DU.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>pU($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function M0($){return new W_({type:"optional",innerType:$})}var b3=V("ZodExactOptional",($,I)=>{NJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>pU($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function j3($){return new b3({type:"optional",innerType:$})}var F3=V("ZodNullable",($,I)=>{GJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>w8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function K0($){return new F3({type:"nullable",innerType:$})}function U7($){return M0(K0($))}var S3=V("ZodDefault",($,I)=>{XJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>C8($,U,_,u),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function w3($,I){return new S3({type:"default",innerType:$,get defaultValue(){return typeof I==="function"?I():w.shallowClone(I)}})}var E3=V("ZodPrefault",($,I)=>{qJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>f8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function C3($,I){return new E3({type:"prefault",innerType:$,get defaultValue(){return typeof I==="function"?I():w.shallowClone(I)}})}var P_=V("ZodNonOptional",($,I)=>{QJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>E8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function f3($,I){return new P_({type:"nonoptional",innerType:$,...w.normalizeParams(I)})}var x3=V("ZodSuccess",($,I)=>{TJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>K8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function _7($){return new x3({type:"success",innerType:$})}var k3=V("ZodCatch",($,I)=>{HJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>x8($,U,_,u),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function y3($,I){return new k3({type:"catch",innerType:$,catchValue:typeof I==="function"?I:()=>I})}var i3=V("ZodNaN",($,I)=>{YJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>D8($,U,_,u)});function g7($){return oN(i3,$)}var Z_=V("ZodPipe",($,I)=>{OJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>k8($,U,_,u),$.in=I.in,$.out=I.out});function R0($,I){return new Z_({type:"pipe",in:$,out:I})}var A_=V("ZodCodec",($,I)=>{Z_.init($,I),X0.init($,I)});function z7($,I,U){return new A_({type:"pipe",in:$,out:I,transform:U.decode,reverseTransform:U.encode})}var r3=V("ZodReadonly",($,I)=>{VJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>y8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function n3($){return new r3({type:"readonly",innerType:$})}var l3=V("ZodTemplateLiteral",($,I)=>{DJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>B8($,U,_,u)});function v7($,I){return new l3({type:"template_literal",parts:$,...w.normalizeParams(I)})}var m3=V("ZodLazy",($,I)=>{KJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>r8($,U,_,u),$.unwrap=()=>$._zod.def.getter()});function h3($){return new m3({type:"lazy",getter:$})}var c3=V("ZodPromise",($,I)=>{MJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>i8($,U,_,u),$.unwrap=()=>$._zod.def.innerType});function J7($){return new c3({type:"promise",innerType:$})}var d3=V("ZodFunction",($,I)=>{BJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>L8($,U,_,u)});function N7($){return new d3({type:"function",input:Array.isArray($?.input)?K3($?.input):$?.input??P0($1()),output:$?.output??$1()})}var j0=V("ZodCustom",($,I)=>{RJ.init($,I),c.init($,I),$._zod.processJSONSchema=(U,_,u)=>R8($,U,_,u)});function G7($){let I=new G$({check:"custom"});return I._zod.check=$,I}function X7($,I){return eN(j0,$??(()=>!0),I)}function p3($,I={}){return sN(j0,$,I)}function o3($){return $8($)}var q7=I8,Q7=u8;function T7($,I={}){let U=new j0({type:"custom",check:"custom",fn:(_)=>_ instanceof $,abort:!0,...w.normalizeParams(I)});return U._zod.bag.Class=$,U._zod.check=(_)=>{if(!(_.value instanceof $))_.issues.push({code:"invalid_type",expected:$.name,input:_.value,inst:U,path:[...U._zod.def.path??[]]})},U}var H7=(...$)=>U8({Codec:A_,Boolean:vI,String:_I},...$);function Y7($){let I=h3(()=>{return K_([I_($),z3(),v3(),X3(),P0(I),R3(I_(),I)])});return I}function O7($,I){return R0(L_($),I)}var Nj={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 Gj($){K$({customError:$})}function Xj(){return K$().customError}var t3;(function($){})(t3||(t3={}));var x={...D0,...tU,iso:uI},qj=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 Qj($,I){let U=$.$schema;if(U==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(U==="http://json-schema.org/draft-07/schema#")return"draft-7";if(U==="http://json-schema.org/draft-04/schema#")return"draft-4";return I??"draft-2020-12"}function Tj($,I){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let U=$.slice(1).split("/").filter(Boolean);if(U.length===0)return I.rootSchema;let _=I.version==="draft-2020-12"?"$defs":"definitions";if(U[0]===_){let u=U[1];if(!u||!I.defs[u])throw Error(`Reference not found: ${$}`);return I.defs[u]}throw Error(`Reference not found: ${$}`)}function V7($,I){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return x.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let u=$.$ref;if(I.refs.has(u))return I.refs.get(u);if(I.processing.has(u))return x.lazy(()=>{if(!I.refs.has(u))throw Error(`Circular reference not resolved: ${u}`);return I.refs.get(u)});I.processing.add(u);let g=Tj(u,I),z=f$(g,I);return I.refs.set(u,z),I.processing.delete(u),z}if($.enum!==void 0){let u=$.enum;if(I.version==="openapi-3.0"&&$.nullable===!0&&u.length===1&&u[0]===null)return x.null();if(u.length===0)return x.never();if(u.length===1)return x.literal(u[0]);if(u.every((z)=>typeof z==="string"))return x.enum(u);let g=u.map((z)=>x.literal(z));if(g.length<2)return g[0];return x.union([g[0],g[1],...g.slice(2)])}if($.const!==void 0)return x.literal($.const);let U=$.type;if(Array.isArray(U)){let u=U.map((g)=>{let z={...$,type:g};return V7(z,I)});if(u.length===0)return x.never();if(u.length===1)return u[0];return x.union(u)}if(!U)return x.any();let _;switch(U){case"string":{let u=x.string();if($.format){let g=$.format;if(g==="email")u=u.check(x.email());else if(g==="uri"||g==="uri-reference")u=u.check(x.url());else if(g==="uuid"||g==="guid")u=u.check(x.uuid());else if(g==="date-time")u=u.check(x.iso.datetime());else if(g==="date")u=u.check(x.iso.date());else if(g==="time")u=u.check(x.iso.time());else if(g==="duration")u=u.check(x.iso.duration());else if(g==="ipv4")u=u.check(x.ipv4());else if(g==="ipv6")u=u.check(x.ipv6());else if(g==="mac")u=u.check(x.mac());else if(g==="cidr")u=u.check(x.cidrv4());else if(g==="cidr-v6")u=u.check(x.cidrv6());else if(g==="base64")u=u.check(x.base64());else if(g==="base64url")u=u.check(x.base64url());else if(g==="e164")u=u.check(x.e164());else if(g==="jwt")u=u.check(x.jwt());else if(g==="emoji")u=u.check(x.emoji());else if(g==="nanoid")u=u.check(x.nanoid());else if(g==="cuid")u=u.check(x.cuid());else if(g==="cuid2")u=u.check(x.cuid2());else if(g==="ulid")u=u.check(x.ulid());else if(g==="xid")u=u.check(x.xid());else if(g==="ksuid")u=u.check(x.ksuid())}if(typeof $.minLength==="number")u=u.min($.minLength);if(typeof $.maxLength==="number")u=u.max($.maxLength);if($.pattern)u=u.regex(new RegExp($.pattern));_=u;break}case"number":case"integer":{let u=U==="integer"?x.number().int():x.number();if(typeof $.minimum==="number")u=u.min($.minimum);if(typeof $.maximum==="number")u=u.max($.maximum);if(typeof $.exclusiveMinimum==="number")u=u.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")u=u.gt($.minimum);if(typeof $.exclusiveMaximum==="number")u=u.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")u=u.lt($.maximum);if(typeof $.multipleOf==="number")u=u.multipleOf($.multipleOf);_=u;break}case"boolean":{_=x.boolean();break}case"null":{_=x.null();break}case"object":{let u={},g=$.properties||{},z=new Set($.required||[]);for(let[J,N]of Object.entries(g)){let X=f$(N,I);u[J]=z.has(J)?X:X.optional()}if($.propertyNames){let J=f$($.propertyNames,I),N=$.additionalProperties&&typeof $.additionalProperties==="object"?f$($.additionalProperties,I):x.any();if(Object.keys(u).length===0){_=x.record(J,N);break}let X=x.object(u).passthrough(),G=x.looseRecord(J,N);_=x.intersection(X,G);break}if($.patternProperties){let J=$.patternProperties,N=Object.keys(J),X=[];for(let q of N){let T=f$(J[q],I),H=x.string().regex(new RegExp(q));X.push(x.looseRecord(H,T))}let G=[];if(Object.keys(u).length>0)G.push(x.object(u).passthrough());if(G.push(...X),G.length===0)_=x.object({}).passthrough();else if(G.length===1)_=G[0];else{let q=x.intersection(G[0],G[1]);for(let T=2;T<G.length;T++)q=x.intersection(q,G[T]);_=q}break}let v=x.object(u);if($.additionalProperties===!1)_=v.strict();else if(typeof $.additionalProperties==="object")_=v.catchall(f$($.additionalProperties,I));else _=v.passthrough();break}case"array":{let{prefixItems:u,items:g}=$;if(u&&Array.isArray(u)){let z=u.map((J)=>f$(J,I)),v=g&&typeof g==="object"&&!Array.isArray(g)?f$(g,I):void 0;if(v)_=x.tuple(z).rest(v);else _=x.tuple(z);if(typeof $.minItems==="number")_=_.check(x.minLength($.minItems));if(typeof $.maxItems==="number")_=_.check(x.maxLength($.maxItems))}else if(Array.isArray(g)){let z=g.map((J)=>f$(J,I)),v=$.additionalItems&&typeof $.additionalItems==="object"?f$($.additionalItems,I):void 0;if(v)_=x.tuple(z).rest(v);else _=x.tuple(z);if(typeof $.minItems==="number")_=_.check(x.minLength($.minItems));if(typeof $.maxItems==="number")_=_.check(x.maxLength($.maxItems))}else if(g!==void 0){let z=f$(g,I),v=x.array(z);if(typeof $.minItems==="number")v=v.min($.minItems);if(typeof $.maxItems==="number")v=v.max($.maxItems);_=v}else _=x.array(x.any());break}default:throw Error(`Unsupported type: ${U}`)}if($.description)_=_.describe($.description);if($.default!==void 0)_=_.default($.default);return _}function f$($,I){if(typeof $==="boolean")return $?x.any():x.never();let U=V7($,I),_=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let v=$.anyOf.map((N)=>f$(N,I)),J=x.union(v);U=_?x.intersection(U,J):J}if($.oneOf&&Array.isArray($.oneOf)){let v=$.oneOf.map((N)=>f$(N,I)),J=x.xor(v);U=_?x.intersection(U,J):J}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)U=_?U:x.any();else{let v=_?U:f$($.allOf[0],I),J=_?0:1;for(let N=J;N<$.allOf.length;N++)v=x.intersection(v,f$($.allOf[N],I));U=v}if($.nullable===!0&&I.version==="openapi-3.0")U=x.nullable(U);if($.readOnly===!0)U=x.readonly(U);let u={},g=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let v of g)if(v in $)u[v]=$[v];let z=["contentEncoding","contentMediaType","contentSchema"];for(let v of z)if(v in $)u[v]=$[v];for(let v of Object.keys($))if(!qj.has(v))u[v]=$[v];if(Object.keys(u).length>0)I.registry.add(U,u);return U}function D7($,I){if(typeof $==="boolean")return $?x.any():x.never();let U=Qj($,I?.defaultTarget),_=$.$defs||$.definitions||{},u={version:U,defs:_,refs:new Map,processing:new Set,rootSchema:$,registry:I?.registry??w$};return f$($,u)}var a3={};D4(a3,{string:()=>Hj,number:()=>Yj,date:()=>Dj,boolean:()=>Oj,bigint:()=>Vj});function Hj($){return BN(_I,$)}function Yj($){return AN(zI,$)}function Oj($){return CN(vI,$)}function Vj($){return xN(JI,$)}function Dj($){return pN(W0,$)}K$(q0());F0();function S0($){try{return process.kill($,0),!0}catch(I){return!1}}function Z7($){let I=[],U=/[^\s"']+|"([^"]*)"|'([^']*)'/g,_=U.exec($);while(_!==null){if(_[1]!==void 0)I.push(_[1]);else if(_[2]!==void 0)I.push(_[2]);else if(_[0])I.push(_[0]);_=U.exec($)}return I}var Pj=z$.object({default_cli:z$.string().optional(),agent_cli_mapping:z$.record(z$.string(),z$.string()).optional()}).passthrough().transform(($)=>({default_cli:$.default_cli,agent_cli_mapping:$.agent_cli_mapping??{}})),Zj=z$.object({command:z$.string().optional(),subcommand:z$.string().optional(),prompt_flag:z$.string().optional().transform(($)=>{if($===void 0)return;let I=$.trim().toLowerCase();if(I===""||I==="none"||I==="null")return null;return $}),auto_approve_flag:z$.string().optional(),output_format_flag:z$.string().optional(),output_format:z$.string().optional(),model_flag:z$.string().optional(),default_model:z$.string().optional(),isolation_env:z$.string().optional(),isolation_flags:z$.string().optional()}).passthrough().transform(($)=>({...$,prompt_flag:$.prompt_flag??void 0})),Aj=z$.object({active_vendor:z$.string().optional(),vendors:z$.record(z$.string(),Zj).optional()}).passthrough().transform(($)=>({active_vendor:$.active_vendor,vendors:$.vendors??{}}));function A7($){try{return c6($)}catch{return null}}function bj($){let I=A7($),U=Pj.safeParse(I);if(!U.success)return{};return U.data}function jj($){let I=A7($),U=Aj.safeParse(I);if(!U.success)return{vendors:{}};return{active_vendor:U.data.active_vendor,vendors:U.data.vendors}}function uG($,I){let U=I$.resolve($),_=I$.parse(U).root;while(U!==_){let u=I$.join(U,I);if(y.existsSync(u))return u;U=I$.dirname(U)}return null}function Fj($){let I=uG($,I$.join(".agents","config","user-preferences.yaml"));if(!I)return null;try{let U=y.readFileSync(I,"utf-8");return bj(U)}catch{return null}}function Sj($){let I=uG($,I$.join(".agents","skills","oma-orchestrator","config","cli-config.yaml"));if(!I)return null;try{let U=y.readFileSync(I,"utf-8");return jj(U)}catch{return null}}function UG($,I){let U=process.cwd(),_=Fj(U),u=Sj(U),g=$.replace(/-agent$/i,""),z=_?.agent_cli_mapping?.[$]||_?.agent_cli_mapping?.[g],v=I||z||_?.default_cli||u?.active_vendor||"gemini";if(!I&&!z&&!_?.default_cli&&!u?.active_vendor)console.error(r.default.yellow(`[oma] No vendor configured for agent "${$}". Falling back to "gemini".
338
+ Set default_cli in .agents/config/user-preferences.yaml or use --vendor flag.`));return{vendor:v.toLowerCase(),config:u}}function b7($,I){if(I!==void 0)return I;return{gemini:"-p",claude:"-p",qwen:"-p",codex:null}[$]??"-p"}var wj={frontend:["web","frontend","client","ui","app","dashboard","admin","portal"],backend:["api","backend","server","service","gateway","core"],mobile:["mobile","ios","android","native","rn","expo"]},Ej={frontend:["apps/web","apps/frontend","apps/client","packages/web","packages/frontend","frontend","web","client"],backend:["apps/api","apps/backend","apps/server","packages/api","packages/backend","backend","api","server"],mobile:["apps/mobile","apps/app","packages/mobile","mobile","app"]};function j7($,I){if($.startsWith("!"))return[];let U=$.replace(/\/\*\*?$/,"").replace(/\/$/,"");if(!$.includes("*")){let u=I$.join(I,U);if(y.existsSync(u)&&y.statSync(u).isDirectory())return[U];return[]}let _=I$.join(I,U);if(!y.existsSync(_)||!y.statSync(_).isDirectory())return[];try{return y.readdirSync(_,{withFileTypes:!0}).filter((g)=>g.isDirectory()&&!g.name.startsWith(".")).map((g)=>I$.join(U,g.name))}catch{return[]}}function Cj($){let I=I$.join($,"pnpm-workspace.yaml");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8");return c6(U)?.packages??[]}catch{return[]}}function F7($){let I=I$.join($,"package.json");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8"),_=JSON.parse(U);if(Array.isArray(_?.workspaces))return _.workspaces;if(_?.workspaces&&typeof _.workspaces==="object")return _.workspaces.packages??[];return[]}catch{return[]}}function fj($){let I=I$.join($,"lerna.json");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8");return JSON.parse(U)?.packages??[]}catch{return[]}}function xj($){let I=I$.join($,"nx.json");if(!y.existsSync(I))return[];return["apps/*","libs/*","packages/*"].flatMap((_)=>j7(_,$))}function kj($){let I=I$.join($,"turbo.json");if(!y.existsSync(I))return[];return F7($)}function yj($){let I=I$.join($,"mise.toml");if(!y.existsSync(I))return[];try{let U=y.readFileSync(I,"utf-8"),_=[],u=U.match(/workspaces\s*=\s*\[([^\]]+)\]/);if(u?.[1]){let g=u[1].match(/"([^"]+)"|'([^']+)'/g);if(g)_.push(...g.map((z)=>z.replace(/["']/g,"")))}return _}catch{return[]}}function ij($){let I=new Set,U=[Cj($),F7($),fj($),xj($),kj($),yj($)];for(let u of U)for(let g of u)I.add(g);let _=new Set;for(let u of I)for(let g of j7(u,$))_.add(g);return[..._]}function rj($,I){let U=wj[I];if(!U)return 0;let _=I$.basename($).toLowerCase(),u=$.toLowerCase();for(let g=0;g<U.length;g++){let z=U[g];if(!z)continue;if(_===z)return 100-g;if(_.includes(z))return 50-g;if(u.includes(z))return 25-g}return 0}function S7($){let I=process.cwd(),U=ij(I);if(U.length>0){let u=U.map((g)=>({workspace:g,score:rj(g,$)})).filter((g)=>g.score>0).sort((g,z)=>z.score-g.score);if(u.length>0&&u[0])return u[0].workspace}let _=Ej[$];if(_)for(let u of _){let g=I$.resolve(u);if(y.existsSync(g)&&y.statSync(g).isDirectory())return u}return"."}function w7($){let I=I$.resolve($);if(y.existsSync(I)&&y.statSync(I).isFile())return y.readFileSync(I,"utf-8");return $}function E7($,I){let U=uG(I,I$.join(".agents","skills","_shared","runtime","execution-protocols",`${$}.md`));if(!U)return"";try{return y.readFileSync(U,"utf-8")}catch{return""}}async function C7($,I,U,_,u){let g=_==="."?S7($):_,z=I$.resolve(g);if(!y.existsSync(z))y.mkdirSync(z,{recursive:!0}),console.log(r.default.dim(`[${$}] Created workspace: ${z}`));else if(g!==_)console.log(r.default.blue(`[${$}] Auto-detected workspace: ${g}`));let v=F_(),J=I$.join(v,`subagent-${U}-${$}.log`),N=I$.join(v,`subagent-${U}-${$}.pid`),X=w7(I),{vendor:G,config:q}=UG($,u),T=E7(G,process.cwd()),H=T?`${X}
337
339
 
338
- ${T}`:X,Q=q?.vendors?.[G]||{},Y=Q.command||G,R=Q.subcommand,K=y.openSync(J,"w");console.log(n.default.blue(`[${$}] Spawning subagent...`)),console.log(n.default.dim(` Vendor: ${G}`)),console.log(n.default.dim(` Workspace: ${z}`)),console.log(n.default.dim(` Log: ${J}`));let W=[],O=Z7(G,Q.prompt_flag);if(Q.output_format_flag&&Q.output_format)W.push(Q.output_format_flag,Q.output_format);else if(Q.output_format_flag)W.push(Q.output_format_flag);if(Q.model_flag&&Q.default_model)W.push(Q.model_flag,Q.default_model);if(Q.isolation_flags)W.push(...P7(Q.isolation_flags));if(Q.auto_approve_flag)W.push(Q.auto_approve_flag);else{let f={gemini:"--approval-mode=yolo",codex:"--full-auto",qwen:"--yolo"}[G];if(f)W.push(f)}if(O)W.push(O,H);let V=[];if(R)V.push(R);if(V.push(...W),!O)V.push(H);let L={...process.env};if(Q.isolation_env){let[A,...f]=Q.isolation_env.split("="),b=f.join("=");if(A&&b){let u$=b.replace("$$",String(process.pid));if(L[A]=u$,u$.startsWith("/")&&!y.existsSync(u$))y.mkdirSync(u$,{recursive:!0})}}let B=s3(Y,V,{cwd:z,stdio:["ignore",K,K],detached:!1,env:L});if(!B.pid)console.error(n.default.red(`[${$}] Failed to spawn process`)),process.exit(1);y.writeFileSync(N,B.pid.toString()),console.log(n.default.green(`[${$}] Started with PID ${B.pid}`));let M=()=>{try{if(y.existsSync(N))y.unlinkSync(N);if(y.existsSync(J))y.unlinkSync(J)}catch(A){}},F=()=>{if(B.pid&&b_(B.pid))process.kill(B.pid);M(),process.exit()};process.on("SIGINT",F),process.on("SIGTERM",F),B.on("exit",(A)=>{if(console.log(n.default.blue(`[${$}] Exited with code ${A}`)),A!==0&&y.existsSync(J)){let f=y.readFileSync(J,"utf-8").trim();if(f)console.log(n.default.red(`[${$}] Log output:`)),console.log(f)}M(),process.exit(A??0)})}async function E7($,I,U=process.cwd()){let _={};for(let u of I){let g=I$.join(U,".serena","memories",`result-${u}.md`),z=I$.join(A_(),`subagent-${$}-${u}.pid`);if(y.existsSync(g)){let J=y.readFileSync(g,"utf-8").match(/^## Status:\s*(\S+)/m);if(J?.[1])_[u]=J[1];else _[u]="completed"}else if(y.existsSync(z)){let v=y.readFileSync(z,"utf-8").trim(),J=parseInt(v,10);if(!Number.isNaN(J)&&b_(J))_[u]="running";else _[u]="crashed"}else _[u]="crashed"}for(let[u,g]of Object.entries(_))console.log(`${u}:${g}`)}var nj=z$.object({agent:z$.string(),task:z$.string(),workspace:z$.string().optional()}),rj=z$.object({tasks:z$.array(nj)});function lj($){if(!y.existsSync($))throw Error(`Tasks file not found: ${$}`);let I=y.readFileSync($,"utf-8"),U=m6(I),_=rj.safeParse(U);if(!_.success)throw Error(`Invalid tasks file format: ${_.error.message}`);return _.data.tasks}function mj($){return $.map((I)=>{let U=I.split(":");if(U.length<2||!U[0])throw Error(`Invalid task format: "${I}". Expected "agent:task" or "agent:task:workspace"`);let _=U[0],u=U.slice(1),g,z;if(u.length>=2){let v=u[u.length-1]??"";if(v.startsWith("./")||v.startsWith("/")||v===".")z=v,g=u.slice(0,-1).join(":");else g=u.join(":")}else g=u.join(":");return{agent:_,task:g,workspace:z}})}async function C7($,I={}){let U=process.cwd(),_=I$.join(U,".agents","results"),u=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19),g=I$.join(_,`parallel-${u}`);y.mkdirSync(g,{recursive:!0});let z=I$.join(g,"pids.txt"),v;try{if(I.inline){if($.length===0)console.error(n.default.red("Error: No tasks specified")),console.log('Usage: oh-my-agent agent:parallel --inline "agent:task" "agent:task" ...'),process.exit(1);v=mj($)}else{if($.length===0)console.error(n.default.red("Error: No tasks file specified")),console.log("Usage: oh-my-agent agent:parallel <tasks-file.yaml>"),process.exit(1);let T=$[0];if(!T)console.error(n.default.red("Error: No tasks file specified")),process.exit(1);v=lj(T)}}catch(T){console.error(n.default.red(`Error: ${T.message}`)),process.exit(1)}console.log(n.default.cyan("======================================")),console.log(n.default.cyan(" Parallel SubAgent Execution")),console.log(n.default.cyan("======================================")),console.log(""),console.log(n.default.blue("Starting parallel execution...")),console.log("");let J=[];for(let T=0;T<v.length;T++){let H=v[T];if(!H)continue;let{agent:Q,task:Y,workspace:R="."}=H,K=R==="."?j7(Q):R,W=I$.resolve(K),O=I$.join(g,`${Q}-${T}.log`);if(console.log(`${n.default.blue(`[${T}]`)} Spawning ${n.default.yellow(Q)} agent...`),console.log(` Task: ${Y.slice(0,60)}${Y.length>60?"...":""}`),console.log(` Workspace: ${K}`),!y.existsSync(W))y.mkdirSync(W,{recursive:!0});let{vendor:V,config:L}=IG(Q,I.vendor),B=L?.vendors?.[V]||{},M=B.command||V,F=B.subcommand,A=[],f=Z7(V,B.prompt_flag),b=F7(Y),u$=S7(V,U),t=u$?`${b}
340
+ ${T}`:X,Q=q?.vendors?.[G]||{},Y=Q.command||G,K=Q.subcommand,R=y.openSync(J,"w");console.log(r.default.blue(`[${$}] Spawning subagent...`)),console.log(r.default.dim(` Vendor: ${G}`)),console.log(r.default.dim(` Workspace: ${z}`)),console.log(r.default.dim(` Log: ${J}`));let P=[],O=b7(G,Q.prompt_flag);if(Q.output_format_flag&&Q.output_format)P.push(Q.output_format_flag,Q.output_format);else if(Q.output_format_flag)P.push(Q.output_format_flag);if(Q.model_flag&&Q.default_model)P.push(Q.model_flag,Q.default_model);if(Q.isolation_flags)P.push(...Z7(Q.isolation_flags));if(Q.auto_approve_flag)P.push(Q.auto_approve_flag);else{let f={gemini:"--approval-mode=yolo",codex:"--full-auto",qwen:"--yolo"}[G];if(f)P.push(f)}if(O)P.push(O,H);let D=[];if(K)D.push(K);if(D.push(...P),!O)D.push(H);let L={...process.env};if(Q.isolation_env){let[A,...f]=Q.isolation_env.split("="),b=f.join("=");if(A&&b){let u$=b.replace("$$",String(process.pid));if(L[A]=u$,u$.startsWith("/")&&!y.existsSync(u$))y.mkdirSync(u$,{recursive:!0})}}let B=IG(Y,D,{cwd:z,stdio:["ignore",R,R],detached:!1,env:L});if(!B.pid)console.error(r.default.red(`[${$}] Failed to spawn process`)),process.exit(1);y.writeFileSync(N,B.pid.toString()),console.log(r.default.green(`[${$}] Started with PID ${B.pid}`));let M=()=>{try{if(y.existsSync(N))y.unlinkSync(N);if(y.existsSync(J))y.unlinkSync(J)}catch(A){}},F=()=>{if(B.pid&&S0(B.pid))process.kill(B.pid);M(),process.exit()};process.on("SIGINT",F),process.on("SIGTERM",F),B.on("exit",(A)=>{if(console.log(r.default.blue(`[${$}] Exited with code ${A}`)),A!==0&&y.existsSync(J)){let f=y.readFileSync(J,"utf-8").trim();if(f)console.log(r.default.red(`[${$}] Log output:`)),console.log(f)}M(),process.exit(A??0)})}async function f7($,I,U=process.cwd()){let _={};for(let u of I){let g=I$.join(U,".serena","memories",`result-${u}.md`),z=I$.join(F_(),`subagent-${$}-${u}.pid`);if(y.existsSync(g)){let J=y.readFileSync(g,"utf-8").match(/^## Status:\s*(\S+)/m);if(J?.[1])_[u]=J[1];else{let N=y.existsSync(z)?y.readFileSync(z,"utf-8").trim():"",X=parseInt(N,10);if(!Number.isNaN(X)&&S0(X))_[u]="running";else _[u]="completed"}}else if(y.existsSync(z)){let v=y.readFileSync(z,"utf-8").trim(),J=parseInt(v,10);if(!Number.isNaN(J)&&S0(J))_[u]="running";else _[u]="crashed"}else _[u]="crashed"}for(let[u,g]of Object.entries(_))console.log(`${u}:${g}`)}var nj=z$.object({agent:z$.string(),task:z$.string(),workspace:z$.string().optional()}),lj=z$.object({tasks:z$.array(nj)});function mj($){if(!y.existsSync($))throw Error(`Tasks file not found: ${$}`);let I=y.readFileSync($,"utf-8"),U=c6(I),_=lj.safeParse(U);if(!_.success)throw Error(`Invalid tasks file format: ${_.error.message}`);return _.data.tasks}function hj($){return $.map((I)=>{let U=I.split(":");if(U.length<2||!U[0])throw Error(`Invalid task format: "${I}". Expected "agent:task" or "agent:task:workspace"`);let _=U[0],u=U.slice(1),g,z;if(u.length>=2){let v=u[u.length-1]??"";if(v.startsWith("./")||v.startsWith("/")||v===".")z=v,g=u.slice(0,-1).join(":");else g=u.join(":")}else g=u.join(":");return{agent:_,task:g,workspace:z}})}async function x7($,I={}){let U=process.cwd(),_=I$.join(U,".agents","results"),u=new Date().toISOString().replace(/[:.]/g,"-").slice(0,19),g=I$.join(_,`parallel-${u}`);y.mkdirSync(g,{recursive:!0});let z=I$.join(g,"pids.txt"),v;try{if(I.inline){if($.length===0)console.error(r.default.red("Error: No tasks specified")),console.log('Usage: oh-my-agent agent:parallel --inline "agent:task" "agent:task" ...'),process.exit(1);v=hj($)}else{if($.length===0)console.error(r.default.red("Error: No tasks file specified")),console.log("Usage: oh-my-agent agent:parallel <tasks-file.yaml>"),process.exit(1);let T=$[0];if(!T)console.error(r.default.red("Error: No tasks file specified")),process.exit(1);v=mj(T)}}catch(T){console.error(r.default.red(`Error: ${T.message}`)),process.exit(1)}console.log(r.default.cyan("======================================")),console.log(r.default.cyan(" Parallel SubAgent Execution")),console.log(r.default.cyan("======================================")),console.log(""),console.log(r.default.blue("Starting parallel execution...")),console.log("");let J=[];for(let T=0;T<v.length;T++){let H=v[T];if(!H)continue;let{agent:Q,task:Y,workspace:K="."}=H,R=K==="."?S7(Q):K,P=I$.resolve(R),O=I$.join(g,`${Q}-${T}.log`);if(console.log(`${r.default.blue(`[${T}]`)} Spawning ${r.default.yellow(Q)} agent...`),console.log(` Task: ${Y.slice(0,60)}${Y.length>60?"...":""}`),console.log(` Workspace: ${R}`),!y.existsSync(P))y.mkdirSync(P,{recursive:!0});let{vendor:D,config:L}=UG(Q,I.vendor),B=L?.vendors?.[D]||{},M=B.command||D,F=B.subcommand,A=[],f=b7(D,B.prompt_flag),b=w7(Y),u$=E7(D,U),t=u$?`${b}
339
341
 
340
- ${u$}`:b;if(B.output_format_flag&&B.output_format)A.push(B.output_format_flag,B.output_format);else if(B.output_format_flag)A.push(B.output_format_flag);if(B.model_flag&&B.default_model)A.push(B.model_flag,B.default_model);if(B.isolation_flags)A.push(...P7(B.isolation_flags));if(B.auto_approve_flag)A.push(B.auto_approve_flag);else{let V1={gemini:"--approval-mode=yolo",codex:"--full-auto",qwen:"--yolo"}[V];if(V1)A.push(V1)}if(f)A.push(f,t);let Y$=[];if(F)Y$.push(F);if(Y$.push(...A),!f)Y$.push(t);let c$={...process.env};if(B.isolation_env){let[z6,...V1]=B.isolation_env.split("="),c9=V1.join("=");if(z6&&c9){let $u=c9.replace("$$",String(process.pid));if(c$[z6]=$u,$u.startsWith("/")&&!y.existsSync($u))y.mkdirSync($u,{recursive:!0})}}let d$=y.openSync(O,"w"),b4=s3(M,Y$,{cwd:W,stdio:["ignore",d$,d$],detached:!1,env:c$});if(!b4.pid){console.error(n.default.red(`[${T}] Failed to spawn ${Q} process`));continue}y.appendFileSync(z,`${b4.pid}:${Q}
341
- `);let E2=new Promise((z6)=>{b4.on("exit",(V1)=>{y.closeSync(d$),z6(V1)}),b4.on("error",()=>{y.closeSync(d$),z6(null)})});J.push({pid:b4.pid,agent:Q,idx:T,promise:E2})}if(console.log(""),console.log(n.default.blue("[Parallel]")+` Started ${n.default.yellow(String(J.length))} agents`),I.noWait){console.log(`${n.default.blue("[Parallel]")} Running in background mode`),console.log(`${n.default.blue("[Parallel]")} Results will be in: ${g}`),console.log(`${n.default.blue("[Parallel]")} PID list: ${z}`);return}console.log(`${n.default.blue("[Parallel]")} Waiting for completion...`),console.log("");let N=()=>{console.log(""),console.log(`${n.default.yellow("[Parallel]")} Cleaning up child processes...`);for(let{pid:T,agent:H}of J)if(b_(T))try{process.kill(T),console.log(`${n.default.yellow("[Parallel]")} Killed PID ${T} (${H})`)}catch{}try{if(y.existsSync(z))y.unlinkSync(z)}catch{}};process.on("SIGINT",()=>{N(),process.exit(130)}),process.on("SIGTERM",()=>{N(),process.exit(143)});let X=0,G=0;for(let{agent:T,idx:H,promise:Q}of J){let Y=await Q;if(Y===0)console.log(`${n.default.green("[DONE]")} ${T} agent (${H}) completed`),X++;else console.log(n.default.red("[FAIL]")+` ${T} agent (${H}) failed (exit code: ${Y})`),G++}try{if(y.existsSync(z))y.unlinkSync(z)}catch{}console.log(""),console.log(n.default.cyan("======================================")),console.log(n.default.cyan(" Execution Summary")),console.log(n.default.cyan("======================================")),console.log(`Total: ${J.length}`),console.log(`Completed: ${n.default.green(String(X))}`),console.log(`Failed: ${n.default.red(String(G))}`),console.log(`Results: ${g}`),console.log(n.default.cyan("======================================")),console.log(""),console.log(n.default.blue("Result files:"));let q=y.readdirSync(g).filter((T)=>T.endsWith(".log"));for(let T of q)console.log(` - ${I$.join(g,T)}`);if(G>0)process.exit(1)}function hj(){let $=Z_(process.cwd());if($.id&&$.status!=="completed"&&$.status!=="failed")return $.id;return a3(new Date)}var cj="codex",dj=["codex","claude","gemini","qwen"];function pj($,I,U){if(I)return`Review the uncommitted changes (git diff) in this repository. ${$}`;try{let _=Lj("git diff HEAD~1",{cwd:U,encoding:"utf-8"}).trim();if(!_)return`No committed changes found. ${$}`;return`Review the following committed diff:
342
+ ${u$}`:b;if(B.output_format_flag&&B.output_format)A.push(B.output_format_flag,B.output_format);else if(B.output_format_flag)A.push(B.output_format_flag);if(B.model_flag&&B.default_model)A.push(B.model_flag,B.default_model);if(B.isolation_flags)A.push(...Z7(B.isolation_flags));if(B.auto_approve_flag)A.push(B.auto_approve_flag);else{let M1={gemini:"--approval-mode=yolo",codex:"--full-auto",qwen:"--yolo"}[D];if(M1)A.push(M1)}if(f)A.push(f,t);let Y$=[];if(F)Y$.push(F);if(Y$.push(...A),!f)Y$.push(t);let p$={...process.env};if(B.isolation_env){let[J6,...M1]=B.isolation_env.split("="),p9=M1.join("=");if(J6&&p9){let Uu=p9.replace("$$",String(process.pid));if(p$[J6]=Uu,Uu.startsWith("/")&&!y.existsSync(Uu))y.mkdirSync(Uu,{recursive:!0})}}let o$=y.openSync(O,"w"),F4=IG(M,Y$,{cwd:P,stdio:["ignore",o$,o$],detached:!0,env:p$});if(!F4.pid){console.error(r.default.red(`[${T}] Failed to spawn ${Q} process`));continue}y.appendFileSync(z,`${F4.pid}:${Q}
343
+ `);let f2=new Promise((J6)=>{F4.on("exit",(M1)=>{y.closeSync(o$),J6(M1)}),F4.on("error",()=>{y.closeSync(o$),J6(null)})});J.push({pid:F4.pid,agent:Q,idx:T,promise:f2})}if(console.log(""),console.log(r.default.blue("[Parallel]")+` Started ${r.default.yellow(String(J.length))} agents`),I.noWait){console.log(`${r.default.blue("[Parallel]")} Running in background mode`),console.log(`${r.default.blue("[Parallel]")} Results will be in: ${g}`),console.log(`${r.default.blue("[Parallel]")} PID list: ${z}`);return}console.log(`${r.default.blue("[Parallel]")} Waiting for completion...`),console.log("");let N=()=>{console.log(""),console.log(`${r.default.yellow("[Parallel]")} Cleaning up child processes...`);for(let{pid:T,agent:H}of J)if(S0(T)){try{process.kill(-T,"SIGTERM")}catch{try{process.kill(T,"SIGTERM")}catch{}}console.log(`${r.default.yellow("[Parallel]")} Killed PID ${T} (${H})`)}try{if(y.existsSync(z))y.unlinkSync(z)}catch{}};process.on("SIGINT",()=>{N(),process.exit(130)}),process.on("SIGTERM",()=>{N(),process.exit(143)});let X=0,G=0;for(let{agent:T,idx:H,promise:Q}of J){let Y=await Q;if(Y===0)console.log(`${r.default.green("[DONE]")} ${T} agent (${H}) completed`),X++;else console.log(r.default.red("[FAIL]")+` ${T} agent (${H}) failed (exit code: ${Y})`),G++}try{if(y.existsSync(z))y.unlinkSync(z)}catch{}console.log(""),console.log(r.default.cyan("======================================")),console.log(r.default.cyan(" Execution Summary")),console.log(r.default.cyan("======================================")),console.log(`Total: ${J.length}`),console.log(`Completed: ${r.default.green(String(X))}`),console.log(`Failed: ${r.default.red(String(G))}`),console.log(`Results: ${g}`),console.log(r.default.cyan("======================================")),console.log(""),console.log(r.default.blue("Result files:"));let q=y.readdirSync(g).filter((T)=>T.endsWith(".log"));for(let T of q)console.log(` - ${I$.join(g,T)}`);if(G>0)process.exit(1)}function cj(){let $=j_(process.cwd());if($.id&&$.status!=="completed"&&$.status!=="failed")return $.id;return s3(new Date)}var dj="codex",pj=["codex","claude","gemini","qwen"];function oj($,I,U){if(I)return`Review the uncommitted changes (git diff) in this repository. ${$}`;try{let _=Wj("git diff HEAD~1",{cwd:U,encoding:"utf-8"}).trim();if(!_)return`No committed changes found. ${$}`;return`Review the following committed diff:
342
344
 
343
345
  \`\`\`diff
344
346
  ${_}
345
347
  \`\`\`
346
348
 
347
- ${$}`}catch{return`Review the latest committed changes. ${$}`}}function oj($,I,U,_,u){let g=I.command||$;if($==="codex")return _?[g,"review","--uncommitted"]:[g,"review"];let z=pj(U,_,u),v=I.prompt_flag||"-p",J=[g,v,z];if(I.model_flag&&I.default_model)J.push(I.model_flag,I.default_model);if(I.auto_approve_flag)J.push(I.auto_approve_flag);else{let X={gemini:"--approval-mode=yolo",qwen:"--yolo"}[$];if(X)J.push(X)}if($==="claude")J.push("--output-format","text");return J}async function f7($){let I=hj(),U=$.prompt||"Review for bugs, security vulnerabilities, performance issues, and code quality. Report findings with severity levels.",_="review",u=$.workspace||".",g=I$.resolve(u),{vendor:z,config:v}=IG("review",$.model),J=dj.includes(z)?z:cj;if(J!==z)console.log(n.default.yellow(`[review] "${z}" has no review mode, falling back to ${J}`));let N=v?.vendors?.[J]||{},X=$.uncommitted??!0,G=oj(J,N,U,X,g),[q,...T]=G,H=I$.join(A_(),`review-${I}.log`),Q=I$.join(A_(),`review-${I}.pid`);console.log(n.default.dim(` Session: ${I}`)),console.log(n.default.blue("[review] Starting review...")),console.log(n.default.dim(` Vendor: ${J}`)),console.log(n.default.dim(` Command: ${q} ${T.slice(0,2).join(" ")}...`));let Y=y.openSync(H,"w"),R=s3(q,T,{cwd:g,stdio:["ignore",Y,Y],detached:!1});if(!R.pid)console.error(n.default.red("[review] Failed to spawn process")),process.exit(1);y.writeFileSync(Q,R.pid.toString()),console.log(n.default.green(`[review] Started with PID ${R.pid}`));let K=()=>{try{if(y.existsSync(Q))y.unlinkSync(Q);if(y.existsSync(H))y.unlinkSync(H)}catch(O){}},W=()=>{if(R.pid&&b_(R.pid))process.kill(R.pid);K(),process.exit()};process.on("SIGINT",W),process.on("SIGTERM",W),R.on("exit",(O)=>{if(y.existsSync(H)){let V=y.readFileSync(H,"utf-8").trim();if(V)console.log(""),console.log(V)}console.log(O===0?n.default.green("[review] Done"):n.default.red(`[review] Exited with code ${O}`)),K(),process.exit(O??0)})}s$();var J1=q$(b$(),1);import{execSync as QS}from"node:child_process";import{existsSync as wG,readFileSync as EG}from"node:fs";import{homedir as CG}from"node:os";import{join as fG}from"node:path";import{execSync as ZG}from"node:child_process";import XT from"node:https";function cF(){try{let $=ZG("pgrep -fl language_server",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]});for(let I of $.split(`
348
- `))if(I.includes("antigravity")||I.includes("language_server")){let U=I.trim().split(" ")[0];if(!U)continue;let _=Number.parseInt(U,10);if(!Number.isNaN(_))return _}}catch{}return null}function dF($){try{return ZG(`ps -p ${$} -ww -o args`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).match(/--csrf_token\s+([a-zA-Z0-9-]+)/)?.[1]??null}catch{}return null}function pF($){try{let I=ZG(`lsof -nP -a -iTCP -sTCP:LISTEN -p ${$}`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}),U=[];for(let _ of I.split(`
349
- `).slice(1)){let u=_.match(/:(\d+)\s+\(LISTEN\)/);if(u?.[1])U.push(Number.parseInt(u[1],10))}return U}catch{}return[]}function qT($,I,U,_){return new Promise((u,g)=>{let z=JSON.stringify(_),v=XT.request({hostname:"127.0.0.1",port:$,path:I,method:"POST",headers:{"Content-Type":"application/json","Content-Length":Buffer.byteLength(z),"Connect-Protocol-Version":"1","X-Codeium-Csrf-Token":U},rejectUnauthorized:!1,timeout:5000},(J)=>{let N="";J.on("data",(X)=>{N+=X}),J.on("end",()=>{if(J.statusCode&&J.statusCode>=200&&J.statusCode<300)try{u(JSON.parse(N))}catch{g(Error("Invalid JSON response"))}else g(Error(`Request failed: ${J.statusCode}`))})});v.on("error",g),v.on("timeout",()=>{v.destroy(),g(Error("Request timeout"))}),v.write(z),v.end()})}function oF($,I){return new Promise((U)=>{let _=XT.request({hostname:"127.0.0.1",port:$,path:"/exa.language_server_pb.LanguageServerService/GetUnleashData",method:"POST",headers:{"Content-Type":"application/json","X-Codeium-Csrf-Token":I,"Connect-Protocol-Version":"1"},rejectUnauthorized:!1,timeout:5000},(u)=>{let g="";u.on("data",(z)=>{g+=z}),u.on("end",()=>{if(u.statusCode===200)try{JSON.parse(g),U(!0)}catch{U(!1)}else U(!1)})});_.on("error",()=>U(!1)),_.on("timeout",()=>{_.destroy(),U(!1)}),_.write(JSON.stringify({wrapper_data:{}})),_.end()})}function tF($){if($<=0)return"Ready";let I=Math.ceil($/60000);if(I<60)return`${I}m`;return`${Math.floor(I/60)}h ${I%60}m`}function GT($,I){if(!$||I===void 0)return;let U=Number($),_=Number(I);if(U<=0)return;return{available:_,monthly:U,usedPercent:(U-_)/U*100,remainingPercent:_/U*100}}function aF($){let I=$.userStatus??{},U=I.planStatus?.planInfo??{},_=GT(U.monthlyPromptCredits,I.planStatus?.availablePromptCredits),u=GT(U.monthlyFlowCredits,I.planStatus?.availableFlowCredits),z=(I.cascadeModelConfigData?.clientModelConfigs??[]).filter((J)=>J.quotaInfo!==void 0).map((J)=>{let N=J.quotaInfo.resetTime?new Date(J.quotaInfo.resetTime):null,X=N?N.getTime()-Date.now():0,G=J.quotaInfo.remainingFraction,q=0;if(G!==void 0&&G!==null)q=G*100;else if(J.quotaInfo.allowed)q=100;return{label:J.label||"Unknown",modelId:J.modelOrAlias?.model||"unknown",remainingPercent:q,isExhausted:J.quotaInfo.remainingFraction===0,resetTime:N,timeUntilReset:tF(X),supportsImages:J.supportsImages??!1}}),v=I.cascadeModelConfigData?.defaultOverrideModelConfig?.modelOrAlias?.model??null;return{userName:I.name||"Unknown",email:I.email||"",planName:U.planName||"Free",tierName:I.userTier?.name||"",promptCredits:_,flowCredits:u,models:z,defaultModel:v,timestamp:new Date}}async function QT(){let $=cF();if(!$)return null;let I=dF($);if(!I)return null;let U=pF($);for(let _ of U)if(await oF(_,I))return{pid:$,csrfToken:I,port:_};return null}async function eF($){try{let I=await qT($.port,"/exa.language_server_pb.LanguageServerService/GetUserStatus",$.csrfToken,{metadata:{ideName:"antigravity",extensionName:"antigravity",locale:"en"}});return aF(I)}catch{return null}}async function TT(){let $=await QT();if(!$)return null;try{return await qT($.port,"/exa.language_server_pb.LanguageServerService/GetUserStatus",$.csrfToken,{metadata:{ideName:"antigravity",extensionName:"antigravity",locale:"en"}})}catch{return null}}async function C0(){let $=await QT();if(!$)return null;return eF($)}GI();function xG(){try{let $=QS("claude auth status",{stdio:["pipe","pipe","ignore"],encoding:"utf-8"});return JSON.parse($).loggedIn===!0}catch{return!1}}function kG(){let $=fG(CG(),".gemini","oauth_creds.json");if(!wG($))return!1;try{let I=JSON.parse(EG($,"utf-8"));return!!(I.access_token&&I.refresh_token)}catch{return!1}}function yG(){let $=fG(CG(),".codex","auth.json");if(!wG($))return!1;try{return!!JSON.parse(EG($,"utf-8")).tokens?.access_token}catch{return!1}}function iG(){let $=fG(CG(),".qwen","settings.json");if(!wG($))return!1;try{return!!JSON.parse(EG($,"utf-8")).security?.auth?.selectedType}catch{return!1}}async function ZT($=!1){let[I,U]=await Promise.all([y4(),C0().then((G)=>!!G)]),_=kG(),u=xG(),g=yG(),z=iG(),v={github:I,gemini:_,claude:u,codex:g,qwen:z,antigravity:U};if($){console.log(JSON.stringify(v,null,2));return}D$(J1.default.bgMagenta(J1.default.white(" \uD83D\uDD10 oh-my-agent auth status ")));let J=(G)=>G?"✅":"❌",N=(G)=>G?J1.default.green("Authenticated"):J1.default.red("Not Authenticated");k([["GitHub",I],["Gemini CLI",_],["Claude CLI",u],["Codex CLI",g],["Qwen CLI",z],["Antigravity",U]].map(([G,q])=>`${J(q)} ${G.padEnd(12)} ${N(q)}`).join(`
350
- `),"Authentication Status"),d(`Use ${J1.default.cyan("gemini auth")}, ${J1.default.cyan("claude auth")}, etc. to login.`)}import{spawn as TS}from"node:child_process";import{existsSync as AT,readFileSync as bT,writeFileSync as HS}from"node:fs";import YS from"node:http";import OS from"node:https";import{homedir as DS}from"node:os";import{join as jT}from"node:path";var VS="http://localhost:12341/mcp",FT=1000,BS=Number.parseInt(process.env.OH_MY_AG_BRIDGE_PROBE_TIMEOUT_MS??"2000",10),MS=Number.parseInt(process.env.OH_MY_AG_BRIDGE_STARTUP_TIMEOUT_MS??"120000",10),Z6={};function ST(){if(Z6.stdinData)process.stdin.off("data",Z6.stdinData);if(Z6.sigint)process.off("SIGINT",Z6.sigint);if(Z6.sigterm)process.off("SIGTERM",Z6.sigterm);Z6={}}function RS(){let $=jT(DS(),".serena","serena_config.yml");if(!AT($))return;try{let U=bT($,"utf8").match(/^projects:\s*\n((?:\s*-\s*.+\n?)*)/m);if(!U)return;let u=((U[1]??"").match(/^\s*-\s*(.+)$/gm)||[]).map((g)=>g.replace(/^\s*-\s*/,"").trim());for(let g of u){let z=jT(g,".serena","project.yml");if(!AT(z))continue;let v=bT(z,"utf8");if(!/^languages:/m.test(v)){console.error(`[Bridge] Missing 'languages' key in ${z}, adding default...`);let J=v.search(/\n(?=\w)/);if(J!==-1){let N=`${v.slice(0,J)}
349
+ ${$}`}catch{return`Review the latest committed changes. ${$}`}}function tj($,I,U,_,u){let g=I.command||$;if($==="codex")return _?[g,"review","--uncommitted"]:[g,"review"];let z=oj(U,_,u),v=I.prompt_flag||"-p",J=[g,v,z];if(I.model_flag&&I.default_model)J.push(I.model_flag,I.default_model);if(I.auto_approve_flag)J.push(I.auto_approve_flag);else{let X={gemini:"--approval-mode=yolo",qwen:"--yolo"}[$];if(X)J.push(X)}if($==="claude")J.push("--output-format","text");return J}async function k7($){let I=cj(),U=$.prompt||"Review for bugs, security vulnerabilities, performance issues, and code quality. Report findings with severity levels.",_="review",u=$.workspace||".",g=I$.resolve(u),{vendor:z,config:v}=UG("review",$.model),J=pj.includes(z)?z:dj;if(J!==z)console.log(r.default.yellow(`[review] "${z}" has no review mode, falling back to ${J}`));let N=v?.vendors?.[J]||{},X=$.uncommitted??!0,G=tj(J,N,U,X,g),[q,...T]=G,H=I$.join(F_(),`review-${I}.log`),Q=I$.join(F_(),`review-${I}.pid`);console.log(r.default.dim(` Session: ${I}`)),console.log(r.default.blue("[review] Starting review...")),console.log(r.default.dim(` Vendor: ${J}`)),console.log(r.default.dim(` Command: ${q} ${T.slice(0,2).join(" ")}...`));let Y=y.openSync(H,"w"),K=IG(q,T,{cwd:g,stdio:["ignore",Y,Y],detached:!1});if(!K.pid)console.error(r.default.red("[review] Failed to spawn process")),process.exit(1);y.writeFileSync(Q,K.pid.toString()),console.log(r.default.green(`[review] Started with PID ${K.pid}`));let R=()=>{try{if(y.existsSync(Q))y.unlinkSync(Q);if(y.existsSync(H))y.unlinkSync(H)}catch(O){}},P=()=>{if(K.pid&&S0(K.pid))process.kill(K.pid);R(),process.exit()};process.on("SIGINT",P),process.on("SIGTERM",P),K.on("exit",(O)=>{if(y.existsSync(H)){let D=y.readFileSync(H,"utf-8").trim();if(D)console.log(""),console.log(D)}console.log(O===0?r.default.green("[review] Done"):r.default.red(`[review] Exited with code ${O}`)),R(),process.exit(O??0)})}I4();var G1=q$(b$(),1);import{execSync as TS}from"node:child_process";import{existsSync as CG,readFileSync as fG}from"node:fs";import{homedir as xG}from"node:os";import{join as kG}from"node:path";import{execSync as bG}from"node:child_process";import QT from"node:https";function dF(){try{let $=bG("pgrep -fl language_server",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]});for(let I of $.split(`
350
+ `))if(I.includes("antigravity")||I.includes("language_server")){let U=I.trim().split(" ")[0];if(!U)continue;let _=Number.parseInt(U,10);if(!Number.isNaN(_))return _}}catch{}return null}function pF($){try{return bG(`ps -p ${$} -ww -o args`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).match(/--csrf_token\s+([a-zA-Z0-9-]+)/)?.[1]??null}catch{}return null}function oF($){try{let I=bG(`lsof -nP -a -iTCP -sTCP:LISTEN -p ${$}`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}),U=[];for(let _ of I.split(`
351
+ `).slice(1)){let u=_.match(/:(\d+)\s+\(LISTEN\)/);if(u?.[1])U.push(Number.parseInt(u[1],10))}return U}catch{}return[]}function TT($,I,U,_){return new Promise((u,g)=>{let z=JSON.stringify(_),v=QT.request({hostname:"127.0.0.1",port:$,path:I,method:"POST",headers:{"Content-Type":"application/json","Content-Length":Buffer.byteLength(z),"Connect-Protocol-Version":"1","X-Codeium-Csrf-Token":U},rejectUnauthorized:!1,timeout:5000},(J)=>{let N="";J.on("data",(X)=>{N+=X}),J.on("end",()=>{if(J.statusCode&&J.statusCode>=200&&J.statusCode<300)try{u(JSON.parse(N))}catch{g(Error("Invalid JSON response"))}else g(Error(`Request failed: ${J.statusCode}`))})});v.on("error",g),v.on("timeout",()=>{v.destroy(),g(Error("Request timeout"))}),v.write(z),v.end()})}function tF($,I){return new Promise((U)=>{let _=QT.request({hostname:"127.0.0.1",port:$,path:"/exa.language_server_pb.LanguageServerService/GetUnleashData",method:"POST",headers:{"Content-Type":"application/json","X-Codeium-Csrf-Token":I,"Connect-Protocol-Version":"1"},rejectUnauthorized:!1,timeout:5000},(u)=>{let g="";u.on("data",(z)=>{g+=z}),u.on("end",()=>{if(u.statusCode===200)try{JSON.parse(g),U(!0)}catch{U(!1)}else U(!1)})});_.on("error",()=>U(!1)),_.on("timeout",()=>{_.destroy(),U(!1)}),_.write(JSON.stringify({wrapper_data:{}})),_.end()})}function aF($){if($<=0)return"Ready";let I=Math.ceil($/60000);if(I<60)return`${I}m`;return`${Math.floor(I/60)}h ${I%60}m`}function qT($,I){if(!$||I===void 0)return;let U=Number($),_=Number(I);if(U<=0)return;return{available:_,monthly:U,usedPercent:(U-_)/U*100,remainingPercent:_/U*100}}function eF($){let I=$.userStatus??{},U=I.planStatus?.planInfo??{},_=qT(U.monthlyPromptCredits,I.planStatus?.availablePromptCredits),u=qT(U.monthlyFlowCredits,I.planStatus?.availableFlowCredits),z=(I.cascadeModelConfigData?.clientModelConfigs??[]).filter((J)=>J.quotaInfo!==void 0).map((J)=>{let N=J.quotaInfo.resetTime?new Date(J.quotaInfo.resetTime):null,X=N?N.getTime()-Date.now():0,G=J.quotaInfo.remainingFraction,q=0;if(G!==void 0&&G!==null)q=G*100;else if(J.quotaInfo.allowed)q=100;return{label:J.label||"Unknown",modelId:J.modelOrAlias?.model||"unknown",remainingPercent:q,isExhausted:J.quotaInfo.remainingFraction===0,resetTime:N,timeUntilReset:aF(X),supportsImages:J.supportsImages??!1}}),v=I.cascadeModelConfigData?.defaultOverrideModelConfig?.modelOrAlias?.model??null;return{userName:I.name||"Unknown",email:I.email||"",planName:U.planName||"Free",tierName:I.userTier?.name||"",promptCredits:_,flowCredits:u,models:z,defaultModel:v,timestamp:new Date}}async function HT(){let $=dF();if(!$)return null;let I=pF($);if(!I)return null;let U=oF($);for(let _ of U)if(await tF(_,I))return{pid:$,csrfToken:I,port:_};return null}async function sF($){try{let I=await TT($.port,"/exa.language_server_pb.LanguageServerService/GetUserStatus",$.csrfToken,{metadata:{ideName:"antigravity",extensionName:"antigravity",locale:"en"}});return eF(I)}catch{return null}}async function YT(){let $=await HT();if(!$)return null;try{return await TT($.port,"/exa.language_server_pb.LanguageServerService/GetUserStatus",$.csrfToken,{metadata:{ideName:"antigravity",extensionName:"antigravity",locale:"en"}})}catch{return null}}async function k0(){let $=await HT();if(!$)return null;return sF($)}qI();function yG(){try{let $=TS("claude auth status",{stdio:["pipe","pipe","ignore"],encoding:"utf-8"});return JSON.parse($).loggedIn===!0}catch{return!1}}function iG(){let $=kG(xG(),".gemini","oauth_creds.json");if(!CG($))return!1;try{let I=JSON.parse(fG($,"utf-8"));return!!(I.access_token&&I.refresh_token)}catch{return!1}}function rG(){let $=kG(xG(),".codex","auth.json");if(!CG($))return!1;try{return!!JSON.parse(fG($,"utf-8")).tokens?.access_token}catch{return!1}}function nG(){let $=kG(xG(),".qwen","settings.json");if(!CG($))return!1;try{return!!JSON.parse(fG($,"utf-8")).security?.auth?.selectedType}catch{return!1}}async function bT($=!1){let[I,U]=await Promise.all([r4(),k0().then((G)=>!!G)]),_=iG(),u=yG(),g=rG(),z=nG(),v={github:I,gemini:_,claude:u,codex:g,qwen:z,antigravity:U};if($){console.log(JSON.stringify(v,null,2));return}V$(G1.default.bgMagenta(G1.default.white(" \uD83D\uDD10 oh-my-agent auth status ")));let J=(G)=>G?"✅":"❌",N=(G)=>G?G1.default.green("Authenticated"):G1.default.red("Not Authenticated");k([["GitHub",I],["Gemini CLI",_],["Claude CLI",u],["Codex CLI",g],["Qwen CLI",z],["Antigravity",U]].map(([G,q])=>`${J(q)} ${G.padEnd(12)} ${N(q)}`).join(`
352
+ `),"Authentication Status"),d(`Use ${G1.default.cyan("gemini auth")}, ${G1.default.cyan("claude auth")}, etc. to login.`)}import{spawn as HS}from"node:child_process";import{existsSync as jT,readFileSync as FT,writeFileSync as YS}from"node:fs";import OS from"node:http";import VS from"node:https";import{homedir as DS}from"node:os";import{join as ST}from"node:path";var BS="http://localhost:12341/mcp",wT=1000,MS=Number.parseInt(process.env.OH_MY_AG_BRIDGE_PROBE_TIMEOUT_MS??"2000",10),KS=Number.parseInt(process.env.OH_MY_AG_BRIDGE_STARTUP_TIMEOUT_MS??"120000",10),b6={};function ET(){if(b6.stdinData)process.stdin.off("data",b6.stdinData);if(b6.sigint)process.off("SIGINT",b6.sigint);if(b6.sigterm)process.off("SIGTERM",b6.sigterm);b6={}}function RS(){let $=ST(DS(),".serena","serena_config.yml");if(!jT($))return;try{let U=FT($,"utf8").match(/^projects:\s*\n((?:\s*-\s*.+\n?)*)/m);if(!U)return;let u=((U[1]??"").match(/^\s*-\s*(.+)$/gm)||[]).map((g)=>g.replace(/^\s*-\s*/,"").trim());for(let g of u){let z=ST(g,".serena","project.yml");if(!jT(z))continue;let v=FT(z,"utf8");if(!/^languages:/m.test(v)){console.error(`[Bridge] Missing 'languages' key in ${z}, adding default...`);let J=v.search(/\n(?=\w)/);if(J!==-1){let N=`${v.slice(0,J)}
351
353
 
352
354
  languages:
353
355
  - python
354
356
  - typescript
355
357
  - dart
356
- - terraform${v.slice(J)}`;HS(z,N),console.error(`[Bridge] Fixed ${z}`)}}}}catch(I){console.error(`[Bridge] Warning: Failed to validate Serena configs: ${I instanceof Error?I.message:I}`)}}async function wT($){ST();let I=$||VS,U=new URL(I),u=U.protocol==="https:"?OS:YS,g=null,z=!1,v=null,J=!1;async function N(){let B=U.hostname==="localhost"?[I,I.replace("localhost","127.0.0.1")]:[I];for(let M of B)if(await new Promise((A)=>{let f=u.get(M,(b)=>{A(!0),f.destroy()});f.setTimeout(BS,()=>{f.destroy(),A(!1)}),f.on("error",()=>{A(!1)}),f.end()}))return!0;return!1}async function X(){let B=U.port||"12341",M=U.hostname||"0.0.0.0";console.error(`Starting Serena server on ${M}:${B}...`),g=TS("uvx",["--from","git+https://github.com/oraios/serena","serena-mcp-server","--transport","streamable-http","--host",M,"--port",B,"--context","ide","--open-web-dashboard","false"],{stdio:"pipe",detached:!1});let A=g;if(g.stderr)g.stderr.on("data",(b)=>{process.stderr.write(`[Serena] ${b}`)});if(g.stdout)g.stdout.on("data",()=>{});A.on("error",(b)=>{console.error("Failed to start Serena server:",b),process.exit(1)}),A.on("exit",(b,u$)=>{if(console.error(`Serena server exited with code ${String(b)} signal ${String(u$)}`),!z)process.exit(typeof b==="number"?b:1)}),console.error("Waiting for Serena to be ready...");let f=Math.max(1,Math.ceil(MS/FT));for(let b=0;b<f;b++){if(await N()){console.error("Serena server is ready!");return}await new Promise((u$)=>setTimeout(u$,FT))}console.error("Timed out waiting for Serena server to start."),process.exit(1)}function G(B,M){let F=new URL(I),A={"Content-Type":"application/json",Accept:"application/json, text/event-stream","Content-Length":String(Buffer.byteLength(B))};if(v)A["Mcp-Session-Id"]=v;let f={hostname:F.hostname,port:F.port,path:F.pathname,method:"POST",headers:A},b=u.request(f,M);b.on("error",(u$)=>{console.error("POST error:",u$.message)}),b.write(B),b.end()}function q(B,M){let F="";B.on("data",(A)=>{F+=A.toString(),F=F.replace(/\r\n/g,`
358
+ - terraform${v.slice(J)}`;YS(z,N),console.error(`[Bridge] Fixed ${z}`)}}}}catch(I){console.error(`[Bridge] Warning: Failed to validate Serena configs: ${I instanceof Error?I.message:I}`)}}async function CT($){ET();let I=$||BS,U=new URL(I),u=U.protocol==="https:"?VS:OS,g=null,z=!1,v=null,J=!1;async function N(){let B=U.hostname==="localhost"?[I,I.replace("localhost","127.0.0.1")]:[I];for(let M of B)if(await new Promise((A)=>{let f=u.get(M,(b)=>{A(!0),f.destroy()});f.setTimeout(MS,()=>{f.destroy(),A(!1)}),f.on("error",()=>{A(!1)}),f.end()}))return!0;return!1}async function X(){let B=U.port||"12341",M=U.hostname||"0.0.0.0";console.error(`Starting Serena server on ${M}:${B}...`),g=HS("uvx",["--from","git+https://github.com/oraios/serena","serena-mcp-server","--transport","streamable-http","--host",M,"--port",B,"--context","ide","--open-web-dashboard","false"],{stdio:"pipe",detached:!1});let A=g;if(g.stderr)g.stderr.on("data",(b)=>{process.stderr.write(`[Serena] ${b}`)});if(g.stdout)g.stdout.on("data",()=>{});A.on("error",(b)=>{console.error("Failed to start Serena server:",b),process.exit(1)}),A.on("exit",(b,u$)=>{if(console.error(`Serena server exited with code ${String(b)} signal ${String(u$)}`),!z)process.exit(typeof b==="number"?b:1)}),console.error("Waiting for Serena to be ready...");let f=Math.max(1,Math.ceil(KS/wT));for(let b=0;b<f;b++){if(await N()){console.error("Serena server is ready!");return}await new Promise((u$)=>setTimeout(u$,wT))}console.error("Timed out waiting for Serena server to start."),process.exit(1)}function G(B,M){let F=new URL(I),A={"Content-Type":"application/json",Accept:"application/json, text/event-stream","Content-Length":String(Buffer.byteLength(B))};if(v)A["Mcp-Session-Id"]=v;let f={hostname:F.hostname,port:F.port,path:F.pathname,method:"POST",headers:A},b=u.request(f,M);b.on("error",(u$)=>{console.error("POST error:",u$.message)}),b.write(B),b.end()}function q(B,M){let F="";B.on("data",(A)=>{F+=A.toString(),F=F.replace(/\r\n/g,`
357
359
  `);let f=F.split(`
358
360
 
359
361
  `);F=f.pop()||"";for(let b of f){let u$=b.split(`
360
362
  `),t="";for(let Y$ of u$)if(Y$.startsWith("data:"))t+=Y$.slice(5).trim();if(t)M(t)}})}function T(){if(!v||J)return;J=!0;let B=new URL(I),M={hostname:B.hostname,port:B.port,path:B.pathname,method:"GET",headers:{Accept:"application/json, text/event-stream","Cache-Control":"no-cache","Mcp-Session-Id":v}},F=u.request(M,(A)=>{if(A.statusCode===405){A.resume(),J=!1;return}if(A.statusCode===409){console.error("GET stream already open for this session (409)"),A.resume();return}if(A.statusCode!==200){if(console.error(`Server stream connection failed: ${A.statusCode}`),A.resume(),J=!1,!z)setTimeout(T,1000);return}q(A,(f)=>{process.stdout.write(`${f}
361
- `)}),A.on("end",()=>{if(J=!1,!z)console.error("Server stream closed, reconnecting..."),setTimeout(T,1000)}),A.on("error",(f)=>{if(J=!1,console.error("Server stream error:",f.message),!z)setTimeout(T,1000)})});F.on("error",(A)=>{if(J=!1,console.error("Server stream connection error:",A.message),!z)setTimeout(T,1000)}),F.end()}if(RS(),!await N())await X();else console.error(`Connected to existing Serena server at ${I}`);let Q="",Y=!1,R=[];process.stdin.setEncoding("utf8");let K=(B)=>{Q+=B.toString();let M=Q.split(`
362
- `);Q=M.pop()||"";for(let F of M)if(F.trim())W(F.trim())};process.stdin.on("data",K);function W(B){if(Y){R.push(B);return}V(B)}function O(){while(R.length>0){let B=R.shift();if(B)V(B)}}function V(B){try{let M=JSON.parse(B),F=M.method==="initialize";if(F)Y=!0;let A=JSON.stringify(M);G(A,(f)=>{let b=f.headers["mcp-session-id"];if(b)v=b;if(f.statusCode===202){if(f.resume(),F)Y=!1,O();return}if((f.headers["content-type"]||"").includes("text/event-stream"))q(f,(t)=>{process.stdout.write(`${t}
363
+ `)}),A.on("end",()=>{if(J=!1,!z)console.error("Server stream closed, reconnecting..."),setTimeout(T,1000)}),A.on("error",(f)=>{if(J=!1,console.error("Server stream error:",f.message),!z)setTimeout(T,1000)})});F.on("error",(A)=>{if(J=!1,console.error("Server stream connection error:",A.message),!z)setTimeout(T,1000)}),F.end()}if(RS(),!await N())await X();else console.error(`Connected to existing Serena server at ${I}`);let Q="",Y=!1,K=[];process.stdin.setEncoding("utf8");let R=(B)=>{Q+=B.toString();let M=Q.split(`
364
+ `);Q=M.pop()||"";for(let F of M)if(F.trim())P(F.trim())};process.stdin.on("data",R);function P(B){if(Y){K.push(B);return}D(B)}function O(){while(K.length>0){let B=K.shift();if(B)D(B)}}function D(B){try{let M=JSON.parse(B),F=M.method==="initialize";if(F)Y=!0;let A=JSON.stringify(M);G(A,(f)=>{let b=f.headers["mcp-session-id"];if(b)v=b;if(f.statusCode===202){if(f.resume(),F)Y=!1,O();return}if((f.headers["content-type"]||"").includes("text/event-stream"))q(f,(t)=>{process.stdout.write(`${t}
363
365
  `)}),f.on("end",()=>{if(F){if(Y=!1,v)T();O()}});else{let t="";f.on("data",(Y$)=>{t+=Y$.toString()}),f.on("end",()=>{if(t.trim())process.stdout.write(`${t}
364
- `);if(F){if(Y=!1,v)T();O()}})}})}catch(M){let F=M instanceof Error?M.message:String(M);console.error("Failed to parse IDE message:",F)}}process.stdin.resume();let L=()=>{if(z=!0,ST(),g)console.error("Stopping Serena server..."),g.kill("SIGTERM");process.exit(0)};Z6={stdinData:K,sigint:L,sigterm:L},process.on("SIGINT",L),process.on("SIGTERM",L)}s$();var z4=q$(b$(),1);import{existsSync as e4,readdirSync as XI,readFileSync as nG,rmSync as ET}from"node:fs";import{tmpdir as KS}from"node:os";import{join as k$}from"node:path";async function LS($,I,U){let _=k$($,".gemini","antigravity"),u=k$(_,"brain"),g=k$(_,"implicit"),z=k$(_,"knowledge"),v=e4(u),J=e4(g),N=e4(z);if(!v&&!J&&!N)return{shouldCleanupBrain:!1,shouldCleanupImplicit:!1,shouldCleanupKnowledge:!1};if(I)return{shouldCleanupBrain:v,shouldCleanupImplicit:J,shouldCleanupKnowledge:N};let X=[v&&" - brain",J&&" - implicit",N&&" - knowledge"].filter(Boolean).join(`
366
+ `);if(F){if(Y=!1,v)T();O()}})}})}catch(M){let F=M instanceof Error?M.message:String(M);console.error("Failed to parse IDE message:",F)}}process.stdin.resume();let L=()=>{if(z=!0,ET(),g)console.error("Stopping Serena server..."),g.kill("SIGTERM");process.exit(0)};b6={stdinData:R,sigint:L,sigterm:L},process.on("SIGINT",L),process.on("SIGTERM",L)}I4();var J4=q$(b$(),1);import{existsSync as $6,readdirSync as QI,readFileSync as lG,rmSync as fT}from"node:fs";import{tmpdir as LS}from"node:os";import{join as k$}from"node:path";async function WS($,I,U){let _=k$($,".gemini","antigravity"),u=k$(_,"brain"),g=k$(_,"implicit"),z=k$(_,"knowledge"),v=$6(u),J=$6(g),N=$6(z);if(!v&&!J&&!N)return{shouldCleanupBrain:!1,shouldCleanupImplicit:!1,shouldCleanupKnowledge:!1};if(I)return{shouldCleanupBrain:v,shouldCleanupImplicit:J,shouldCleanupKnowledge:N};let X=[v&&" - brain",J&&" - implicit",N&&" - knowledge"].filter(Boolean).join(`
365
367
  `),G=U?!0:await O$({message:`Clean up IDE garbage?
366
- ${X}`,initialValue:!0});if(e(G)||!G)return{shouldCleanupBrain:!1,shouldCleanupImplicit:!1,shouldCleanupKnowledge:!1};return{shouldCleanupBrain:v,shouldCleanupImplicit:J,shouldCleanupKnowledge:N}}async function CT($=!1,I=!1,U=!1){let _=process.cwd(),u=k$(_,".agents","results"),g=KS(),z={cleaned:0,skipped:0,details:[]},v=await LS(_,I,U),J=(H)=>{z.details.push($?`[DRY-RUN] ${H}`:`[CLEAN] ${H}`),z.cleaned++},N=(H)=>{z.details.push(`[SKIP] ${H}`),z.skipped++},X=(H)=>{if($)return;try{ET(H,{force:!0})}catch{}},G=(H)=>{try{return process.kill(H,0),!0}catch{return!1}},q=async(H)=>{if($)return;try{process.kill(H)}catch{}await new Promise((Q)=>setTimeout(Q,1000));try{if(G(H))process.kill(H,"SIGKILL")}catch{}};try{let H=XI(g).filter((Q)=>Q.startsWith("subagent-")&&Q.endsWith(".pid"));for(let Q of H){let Y=k$(g,Q),R=nG(Y,"utf-8").trim();if(!R){J(`Removing empty PID file: ${Y}`),X(Y);continue}let K=parseInt(R,10);if(Number.isNaN(K)){J(`Removing invalid PID file: ${Y}`),X(Y);continue}if(G(K))J(`Killing orphaned process PID=${K} (from ${Y})`),await q(K),X(Y);else J(`Removing stale PID file (process gone): ${Y}`),X(Y)}}catch{}try{let H=XI(g).filter((Q)=>Q.startsWith("subagent-")&&Q.endsWith(".log"));for(let Q of H){let Y=k$(g,Q),R=Q.replace(".log",".pid"),K=k$(g,R);if(e4(K))try{let W=nG(K,"utf-8").trim(),O=parseInt(W,10);if(!Number.isNaN(O)){if(G(O)){N(`Log file has active process: ${Y}`);continue}}}catch{}J(`Removing stale log file: ${Y}`),X(Y)}}catch{}if(e4(u))try{let H=XI(u).filter((Q)=>Q.startsWith("parallel-"));for(let Q of H){let Y=k$(u,Q,"pids.txt");if(!e4(Y))continue;let K=nG(Y,"utf-8").split(`
367
- `).filter((O)=>O.trim()),W=!1;for(let O of K){let[V,L]=O.split(":"),B=parseInt(V?.trim()||"",10);if(Number.isNaN(B))continue;if(G(B))W=!0,J(`Killing orphaned parallel agent PID=${B} (${L?.trim()||"unknown"})`),await q(B),X(Y)}if(!W)J(`Removing stale PID list: ${Y}`),X(Y);else if(!$){await new Promise((O)=>setTimeout(O,1000));try{ET(Y,{force:!0})}catch{}}}}catch{}else N(`No results directory found: ${u}`);if(v.shouldCleanupBrain||v.shouldCleanupImplicit||v.shouldCleanupKnowledge){let H=k$(_,".gemini","antigravity");if(v.shouldCleanupBrain){let Q=k$(H,"brain");try{if(e4(Q)){let Y=XI(Q);for(let R of Y){let K=k$(Q,R);J(`Removing brain file: ${K}`),X(K)}}}catch{}}if(v.shouldCleanupImplicit){let Q=k$(H,"implicit");try{if(e4(Q)){let Y=XI(Q);for(let R of Y){let K=k$(Q,R);J(`Removing implicit file: ${K}`),X(K)}}}catch{}}if(v.shouldCleanupKnowledge){let Q=k$(H,"knowledge");try{if(e4(Q)){let Y=XI(Q);for(let R of Y){let K=k$(Q,R);J(`Removing knowledge file: ${K}`),X(K)}}}catch{}}}if(I){console.log(JSON.stringify(z,null,2));return}if(console.clear(),D$(z4.default.bgMagenta(z4.default.white(" \uD83E\uDDF9 oh-my-agent cleanup "))),$)k(z4.default.yellow("Dry-run mode — no changes will be made"),"Mode");if(z.details.length>0){let H=[z4.default.bold("Cleanup Details"),...z.details.map((Q)=>{if(Q.startsWith("[DRY-RUN]"))return z4.default.yellow(Q);if(Q.startsWith("[CLEAN]"))return z4.default.green(Q);return z4.default.cyan(Q)})].join(`
368
- `);k(H,"Details")}let T=[z4.default.bold("Summary"),"┌─────────┬────────┐",`│ ${z4.default.bold("Action")} │ ${z4.default.bold("Count")} │`,"├─────────┼────────┤",`│ Cleaned │ ${String(z.cleaned).padEnd(6)} │`,`│ Skipped │ ${String(z.skipped).padEnd(6)} │`,"└─────────┴────────┘"].join(`
369
- `);if(k(T,"Results"),$)d(z4.default.yellow("Run without --dry-run to apply changes"));else d(z4.default.green("Cleanup complete!"))}s$();GI();a4();var i=q$(b$(),1);import{execSync as rG}from"node:child_process";import{existsSync as s4,readdirSync as fT,readFileSync as $2,writeFileSync as PS}from"node:fs";import{join as N1}from"node:path";async function s_($,I,U){try{let _=rG(`${I} --version`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim();return{name:$,installed:!0,version:_,installCmd:U}}catch{return{name:$,installed:!1,installCmd:U}}}async function WS($){let I=process.env.HOME||process.env.USERPROFILE||"",_={gemini:{path:`${I}/.gemini/settings.json`,type:"json"},claude:{path:`${I}/.claude.json`,type:"json"},codex:{path:`${I}/.codex/config.toml`,type:"toml"}}[$];if(!_)return{configured:!1};if(s4(_.path))try{let u=$2(_.path,"utf-8");if(_.type==="json"){let g=JSON.parse(u);return{configured:!!(g.mcpServers||g.mcp),path:_.path}}return{configured:!0,path:_.path}}catch{return{configured:!1}}return{configured:!1}}async function ZS(){let $=N1(process.cwd(),R4);if(!s4($))return[];let I=NI(),U=[];for(let _ of I){let u=N1($,_.name),g=N1(u,"SKILL.md");U.push({name:_.name,installed:s4(u),hasSkillMd:s4(g)})}return U}async function AS(){let $=process.env.HOME||process.env.USERPROFILE||"",I=N1($,".gemini","antigravity","global_workflows");if(!s4(I))return{installed:!1,count:0};try{return{installed:!0,count:fT(I).filter((_)=>_.endsWith(".md")).length}}catch{return{installed:!1,count:0}}}async function xT($=!1){let I=process.cwd(),U=process.env.HOME||process.env.USERPROFILE||"",_=await Promise.all([s_("gemini","gemini","bun install --global @google/gemini-cli"),s_("claude","claude","bun install --global @anthropic-ai/claude-code"),s_("codex","codex","bun install --global @openai/codex"),s_("qwen","qwen","bun install --global @qwen-code/qwen-code")]),u={gemini:kG,claude:xG,codex:yG,qwen:iG},g=await Promise.all(_.filter((V)=>V.installed).map(async(V)=>{let L=await WS(V.name);return{...V,mcp:L}})),z=await ZS(),v=await AS(),J=!1;try{J=rG("git config --get rerere.enabled",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim()==="true"}catch{}let N=_.some((V)=>V.name==="claude"&&V.installed),X=!1,G=!1,q=N1(U,".claude","settings.json"),T=N1(U,".claude","CLAUDE.md");if(N)try{if(s4(q)){let V=JSON.parse($2(q,"utf-8"));X=(V.env?.cleanupPeriodDays??0)>=180&&(V.env?.CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS??0)>=1e5&&(V.env?.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE??0)>=80&&!!V.attribution?.commit&&!!V.attribution?.pr&&V.env?.DISABLE_TELEMETRY==="1"&&V.env?.DISABLE_ERROR_REPORTING==="1"&&V.env?.CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY==="1"}}catch{}try{if(s4(T))G=$2(T,"utf-8").includes("<!-- OMA:START")}catch{}let H=N1(I,".serena","memories"),Q=s4(H),Y=0;if(Q)try{Y=fT(H).length}catch{}let R=_.filter((V)=>!V.installed),K=z.length>0?z.filter((V)=>!V.installed||!V.hasSkillMd):NI().map((V)=>({name:V.name,installed:!1,hasSkillMd:!1})),W=R.length+K.length+(v.installed?0:1)+(J?0:1)+(N&&!X?1:0)+(N&&!G?1:0);if($){let V={ok:W===0,issues:W,clis:_.map((L)=>({name:L.name,installed:L.installed,version:L.version||null,authenticated:L.installed?u[L.name]?.()??!1:!1})),mcp:g.map((L)=>({name:L.name,configured:L.mcp.configured,path:L.mcp.path||null})),skills:z.length>0?z.map((L)=>({name:L.name,installed:L.installed,complete:L.hasSkillMd})):[],missingSkills:K.map((L)=>L.name),globalWorkflows:{installed:v.installed,count:v.count},serena:{exists:Q,fileCount:Y},gitRerere:{enabled:J},recommendedSettings:{configured:X},claudeMd:{hasOmaBlock:G}};console.log(JSON.stringify(V,null,2)),process.exit(W===0?0:1)}console.clear(),D$(i.default.bgMagenta(i.default.white(" \uD83E\uDE7A oh-my-agent doctor ")));let O=e$();try{let V=_.map((M)=>{let F=M.installed?i.default.green("✅"):i.default.red("❌"),A=M.version||"-",f=M.installed?u[M.name]?.()?i.default.green("✅"):i.default.red("❌"):i.default.dim("-");return`${F} ${M.name.padEnd(8)} ${A.padEnd(12)} ${f}`});if(k([`${"CLI".padEnd(11)} ${"Version".padEnd(12)} Auth`,...V].join(`
370
- `),"CLI Status"),R.length>0)k(R.map((M)=>`${i.default.yellow("→")} ${M.name}: ${i.default.dim(M.installCmd)}`).join(`
368
+ ${X}`,initialValue:!0});if(e(G)||!G)return{shouldCleanupBrain:!1,shouldCleanupImplicit:!1,shouldCleanupKnowledge:!1};return{shouldCleanupBrain:v,shouldCleanupImplicit:J,shouldCleanupKnowledge:N}}async function xT($=!1,I=!1,U=!1){let _=process.cwd(),u=k$(_,".agents","results"),g=LS(),z={cleaned:0,skipped:0,details:[]},v=await WS(_,I,U),J=(H)=>{z.details.push($?`[DRY-RUN] ${H}`:`[CLEAN] ${H}`),z.cleaned++},N=(H)=>{z.details.push(`[SKIP] ${H}`),z.skipped++},X=(H)=>{if($)return;try{fT(H,{force:!0})}catch{}},G=(H)=>{try{return process.kill(H,0),!0}catch{return!1}},q=async(H)=>{if($)return;try{process.kill(H)}catch{}await new Promise((Q)=>setTimeout(Q,1000));try{if(G(H))process.kill(H,"SIGKILL")}catch{}};try{let H=QI(g).filter((Q)=>Q.startsWith("subagent-")&&Q.endsWith(".pid"));for(let Q of H){let Y=k$(g,Q),K=lG(Y,"utf-8").trim();if(!K){J(`Removing empty PID file: ${Y}`),X(Y);continue}let R=parseInt(K,10);if(Number.isNaN(R)){J(`Removing invalid PID file: ${Y}`),X(Y);continue}if(G(R))J(`Killing orphaned process PID=${R} (from ${Y})`),await q(R),X(Y);else J(`Removing stale PID file (process gone): ${Y}`),X(Y)}}catch{}try{let H=QI(g).filter((Q)=>Q.startsWith("subagent-")&&Q.endsWith(".log"));for(let Q of H){let Y=k$(g,Q),K=Q.replace(".log",".pid"),R=k$(g,K);if($6(R))try{let P=lG(R,"utf-8").trim(),O=parseInt(P,10);if(!Number.isNaN(O)){if(G(O)){N(`Log file has active process: ${Y}`);continue}}}catch{}J(`Removing stale log file: ${Y}`),X(Y)}}catch{}if($6(u))try{let H=QI(u).filter((Q)=>Q.startsWith("parallel-"));for(let Q of H){let Y=k$(u,Q,"pids.txt");if(!$6(Y))continue;let R=lG(Y,"utf-8").split(`
369
+ `).filter((O)=>O.trim()),P=!1;for(let O of R){let[D,L]=O.split(":"),B=parseInt(D?.trim()||"",10);if(Number.isNaN(B))continue;if(G(B))P=!0,J(`Killing orphaned parallel agent PID=${B} (${L?.trim()||"unknown"})`),await q(B),X(Y)}if(!P)J(`Removing stale PID list: ${Y}`),X(Y);else if(!$){await new Promise((O)=>setTimeout(O,1000));try{fT(Y,{force:!0})}catch{}}}}catch{}else N(`No results directory found: ${u}`);if(v.shouldCleanupBrain||v.shouldCleanupImplicit||v.shouldCleanupKnowledge){let H=k$(_,".gemini","antigravity");if(v.shouldCleanupBrain){let Q=k$(H,"brain");try{if($6(Q)){let Y=QI(Q);for(let K of Y){let R=k$(Q,K);J(`Removing brain file: ${R}`),X(R)}}}catch{}}if(v.shouldCleanupImplicit){let Q=k$(H,"implicit");try{if($6(Q)){let Y=QI(Q);for(let K of Y){let R=k$(Q,K);J(`Removing implicit file: ${R}`),X(R)}}}catch{}}if(v.shouldCleanupKnowledge){let Q=k$(H,"knowledge");try{if($6(Q)){let Y=QI(Q);for(let K of Y){let R=k$(Q,K);J(`Removing knowledge file: ${R}`),X(R)}}}catch{}}}if(I){console.log(JSON.stringify(z,null,2));return}if(console.clear(),V$(J4.default.bgMagenta(J4.default.white(" \uD83E\uDDF9 oh-my-agent cleanup "))),$)k(J4.default.yellow("Dry-run mode — no changes will be made"),"Mode");if(z.details.length>0){let H=[J4.default.bold("Cleanup Details"),...z.details.map((Q)=>{if(Q.startsWith("[DRY-RUN]"))return J4.default.yellow(Q);if(Q.startsWith("[CLEAN]"))return J4.default.green(Q);return J4.default.cyan(Q)})].join(`
370
+ `);k(H,"Details")}let T=[J4.default.bold("Summary"),"┌─────────┬────────┐",`│ ${J4.default.bold("Action")} │ ${J4.default.bold("Count")} │`,"├─────────┼────────┤",`│ Cleaned │ ${String(z.cleaned).padEnd(6)} │`,`│ Skipped │ ${String(z.skipped).padEnd(6)} │`,"└─────────┴────────┘"].join(`
371
+ `);if(k(T,"Results"),$)d(J4.default.yellow("Run without --dry-run to apply changes"));else d(J4.default.green("Cleanup complete!"))}I4();qI();s4();var i=q$(b$(),1);import{execSync as mG}from"node:child_process";import{existsSync as I6,readdirSync as kT,readFileSync as u2,writeFileSync as PS}from"node:fs";import{join as X1}from"node:path";async function I2($,I,U){try{let _=mG(`${I} --version`,{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim();return{name:$,installed:!0,version:_,installCmd:U}}catch{return{name:$,installed:!1,installCmd:U}}}async function ZS($){let I=process.env.HOME||process.env.USERPROFILE||"",_={gemini:{path:`${I}/.gemini/settings.json`,type:"json"},claude:{path:`${I}/.claude.json`,type:"json"},codex:{path:`${I}/.codex/config.toml`,type:"toml"}}[$];if(!_)return{configured:!1};if(I6(_.path))try{let u=u2(_.path,"utf-8");if(_.type==="json"){let g=JSON.parse(u);return{configured:!!(g.mcpServers||g.mcp),path:_.path}}return{configured:!0,path:_.path}}catch{return{configured:!1}}return{configured:!1}}async function AS(){let $=X1(process.cwd(),L4);if(!I6($))return[];let I=XI(),U=[];for(let _ of I){let u=X1($,_.name),g=X1(u,"SKILL.md");U.push({name:_.name,installed:I6(u),hasSkillMd:I6(g)})}return U}async function bS(){let $=process.env.HOME||process.env.USERPROFILE||"",I=X1($,".gemini","antigravity","global_workflows");if(!I6(I))return{installed:!1,count:0};try{return{installed:!0,count:kT(I).filter((_)=>_.endsWith(".md")).length}}catch{return{installed:!1,count:0}}}async function yT($=!1){let I=process.cwd(),U=process.env.HOME||process.env.USERPROFILE||"",_=await Promise.all([I2("gemini","gemini","bun install --global @google/gemini-cli"),I2("claude","claude","bun install --global @anthropic-ai/claude-code"),I2("codex","codex","bun install --global @openai/codex"),I2("qwen","qwen","bun install --global @qwen-code/qwen-code")]),u={gemini:iG,claude:yG,codex:rG,qwen:nG},g=await Promise.all(_.filter((D)=>D.installed).map(async(D)=>{let L=await ZS(D.name);return{...D,mcp:L}})),z=await AS(),v=await bS(),J=!1;try{J=mG("git config --get rerere.enabled",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim()==="true"}catch{}let N=_.some((D)=>D.name==="claude"&&D.installed),X=!1,G=!1,q=X1(U,".claude","settings.json"),T=X1(U,".claude","CLAUDE.md");if(N)try{if(I6(q)){let D=JSON.parse(u2(q,"utf-8"));X=(D.env?.cleanupPeriodDays??0)>=180&&(D.env?.CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS??0)>=1e5&&(D.env?.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE??0)>=80&&!!D.attribution?.commit&&!!D.attribution?.pr&&D.env?.DISABLE_TELEMETRY==="1"&&D.env?.DISABLE_ERROR_REPORTING==="1"&&D.env?.CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY==="1"}}catch{}try{if(I6(T))G=u2(T,"utf-8").includes("<!-- OMA:START")}catch{}let H=X1(I,".serena","memories"),Q=I6(H),Y=0;if(Q)try{Y=kT(H).length}catch{}let K=_.filter((D)=>!D.installed),R=z.length>0?z.filter((D)=>!D.installed||!D.hasSkillMd):XI().map((D)=>({name:D.name,installed:!1,hasSkillMd:!1})),P=K.length+R.length+(v.installed?0:1)+(J?0:1)+(N&&!X?1:0)+(N&&!G?1:0);if($){let D={ok:P===0,issues:P,clis:_.map((L)=>({name:L.name,installed:L.installed,version:L.version||null,authenticated:L.installed?u[L.name]?.()??!1:!1})),mcp:g.map((L)=>({name:L.name,configured:L.mcp.configured,path:L.mcp.path||null})),skills:z.length>0?z.map((L)=>({name:L.name,installed:L.installed,complete:L.hasSkillMd})):[],missingSkills:R.map((L)=>L.name),globalWorkflows:{installed:v.installed,count:v.count},serena:{exists:Q,fileCount:Y},gitRerere:{enabled:J},recommendedSettings:{configured:X},claudeMd:{hasOmaBlock:G}};console.log(JSON.stringify(D,null,2)),process.exit(P===0?0:1)}console.clear(),V$(i.default.bgMagenta(i.default.white(" \uD83E\uDE7A oh-my-agent doctor ")));let O=$4();try{let D=_.map((M)=>{let F=M.installed?i.default.green("✅"):i.default.red("❌"),A=M.version||"-",f=M.installed?u[M.name]?.()?i.default.green("✅"):i.default.red("❌"):i.default.dim("-");return`${F} ${M.name.padEnd(8)} ${A.padEnd(12)} ${f}`});if(k([`${"CLI".padEnd(11)} ${"Version".padEnd(12)} Auth`,...D].join(`
372
+ `),"CLI Status"),K.length>0)k(K.map((M)=>`${i.default.yellow("→")} ${M.name}: ${i.default.dim(M.installCmd)}`).join(`
371
373
  `),"Install missing CLIs");if(g.length>0){let M=[i.default.bold("\uD83D\uDD17 MCP Connection Status"),"┌─────────┬──────────┬─────────────────────┐",`│ ${i.default.bold("CLI")} │ ${i.default.bold("MCP Config")} │ ${i.default.bold("Path")} │`,"├─────────┼──────────┼─────────────────────┤",...g.map((F)=>{let A=F.mcp.configured?i.default.green("✅ Configured"):i.default.yellow("⚠️ Not configured"),f=F.mcp.path?F.mcp.path.split("/").pop()||"":"-";return`│ ${F.name.padEnd(7)} │ ${A.padEnd(8)} │ ${f.padEnd(19)} │`}),"└─────────┴──────────┴─────────────────────┘"].join(`
372
374
  `);k(M,"MCP Status")}let L=z.filter((M)=>M.installed).length,B=z.filter((M)=>M.hasSkillMd).length;if(z.length>0){let M=[i.default.bold(`\uD83D\uDCE6 Skills (${L}/${z.length} installed, ${B} complete)`),"┌────────────────────┬──────────┬─────────────┐",`│ ${i.default.bold("Skill")} │ ${i.default.bold("Installed")} │ ${i.default.bold("SKILL.md")} │`,"├────────────────────┼──────────┼─────────────┤",...z.map((F)=>{let A=F.installed?i.default.green("✅"):i.default.red("❌"),f=F.hasSkillMd?i.default.green("✅"):i.default.red("❌");return`│ ${F.name.padEnd(18)} │ ${A.padEnd(8)} │ ${f.padEnd(11)} │`}),"└────────────────────┴──────────┴─────────────┘"].join(`
373
- `);k(M,"Skills Status")}else k(i.default.yellow("No skills installed."),"Skills Status");if(K.length>0){let M=await O$({message:`Found ${K.length} missing/incomplete skill(s). Install them?`,initialValue:!0});if(e(M))U4("Cancelled."),process.exit(0);if(M){let F=K.map((b)=>b.name),A=await _1({message:"Which skills to install?",options:[{value:"all",label:`✨ All (${F.length} skills)`,hint:"Recommended"},{value:"select",label:"\uD83D\uDD27 Select individually"}]});if(e(A))U4("Cancelled."),process.exit(0);let f;if(A==="select"){let b=NI(),u$=await l_({message:"Select skills to install:",options:K.map((t)=>{let Y$=b.find((c$)=>c$.name===t.name);return{value:t.name,label:t.name,hint:Y$?.desc||""}}),required:!0});if(e(u$))U4("Cancelled."),process.exit(0);f=u$}else f=F;O.start("Installing skills...");try{p_(I,I);for(let b of f)O.message(`Installing ${i.default.cyan(b)}...`),d_(I,b,I);O.stop(`Installed ${f.length} skill(s)!`),k(f.map((b)=>`${i.default.green("✓")} ${b}`).join(`
375
+ `);k(M,"Skills Status")}else k(i.default.yellow("No skills installed."),"Skills Status");if(R.length>0){let M=await O$({message:`Found ${R.length} missing/incomplete skill(s). Install them?`,initialValue:!0});if(e(M))g4("Cancelled."),process.exit(0);if(M){let F=R.map((b)=>b.name),A=await z1({message:"Which skills to install?",options:[{value:"all",label:`✨ All (${F.length} skills)`,hint:"Recommended"},{value:"select",label:"\uD83D\uDD27 Select individually"}]});if(e(A))g4("Cancelled."),process.exit(0);let f;if(A==="select"){let b=XI(),u$=await h_({message:"Select skills to install:",options:R.map((t)=>{let Y$=b.find((p$)=>p$.name===t.name);return{value:t.name,label:t.name,hint:Y$?.desc||""}}),required:!0});if(e(u$))g4("Cancelled."),process.exit(0);f=u$}else f=F;O.start("Installing skills...");try{t_(I,I);for(let b of f)O.message(`Installing ${i.default.cyan(b)}...`),o_(I,b,I);O.stop(`Installed ${f.length} skill(s)!`),k(f.map((b)=>`${i.default.green("✓")} ${b}`).join(`
374
376
  `),"Installed Skills")}catch(b){O.stop("Installation failed"),o.error(b instanceof Error?b.message:String(b))}}}if(Q)k(`${i.default.green("✅")} Serena memory directory exists
375
377
  ${i.default.dim(`${Y} memory files found`)}`,"Serena Memory");else k(`${i.default.yellow("⚠️")} Serena memory directory not found
376
378
  ${i.default.dim("Dashboard will show 'No agents detected'")}`,"Serena Memory");if(v.installed)k(`${i.default.green("✅")} Global workflows installed
377
379
  ${i.default.dim(`${v.count} workflow files found`)}`,"Global Workflows");else k(`${i.default.red("❌")} Global workflows missing
378
- ${i.default.dim("Run 'oh-my-ag' to install or reinstall global workflows")}`,"Global Workflows");if(J)k(`${i.default.green("✅")} git rerere is enabled`,"Git Config");else{let M=await O$({message:"Enable git rerere? (Recommended for multi-agent merge conflict reuse)",initialValue:!0});if(!e(M)&&M)try{rG("git config --global rerere.enabled true"),o.success(i.default.green("git rerere enabled globally!"))}catch(F){o.error(`Failed to enable git rerere: ${F}`)}else k(`${i.default.yellow("⚠️")} git rerere is not enabled
379
- ${i.default.dim("Run: git config --global rerere.enabled true")}`,"Git Config")}if(N){if(X)k(`${i.default.green("✅")} Claude Code recommended settings applied`,"Claude Config");else{let M=await O$({message:"Apply recommended Claude Code settings?",initialValue:!0});if(!e(M)&&M)try{let F={};if(s4(q))F=JSON.parse($2(q,"utf-8"));F.env={...F.env||{},cleanupPeriodDays:180,CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS:1e5,CLAUDE_AUTOCOMPACT_PCT_OVERRIDE:80,DISABLE_TELEMETRY:"1",DISABLE_ERROR_REPORTING:"1",CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY:"1"},F.attribution={commit:`Generated with oh-my-agent
380
+ ${i.default.dim("Run 'oh-my-ag' to install or reinstall global workflows")}`,"Global Workflows");if(J)k(`${i.default.green("✅")} git rerere is enabled`,"Git Config");else{let M=await O$({message:"Enable git rerere? (Recommended for multi-agent merge conflict reuse)",initialValue:!0});if(!e(M)&&M)try{mG("git config --global rerere.enabled true"),o.success(i.default.green("git rerere enabled globally!"))}catch(F){o.error(`Failed to enable git rerere: ${F}`)}else k(`${i.default.yellow("⚠️")} git rerere is not enabled
381
+ ${i.default.dim("Run: git config --global rerere.enabled true")}`,"Git Config")}if(N){if(X)k(`${i.default.green("✅")} Claude Code recommended settings applied`,"Claude Config");else{let M=await O$({message:"Apply recommended Claude Code settings?",initialValue:!0});if(!e(M)&&M)try{let F={};if(I6(q))F=JSON.parse(u2(q,"utf-8"));F.env={...F.env||{},cleanupPeriodDays:180,CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS:1e5,CLAUDE_AUTOCOMPACT_PCT_OVERRIDE:80,DISABLE_TELEMETRY:"1",DISABLE_ERROR_REPORTING:"1",CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY:"1"},F.attribution={commit:`Generated with oh-my-agent
380
382
 
381
383
  Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},PS(q,`${JSON.stringify(F,null,2)}
382
384
  `),o.success(i.default.green("Claude Code recommended settings applied!"))}catch(F){o.error(`Failed to apply Claude Code settings: ${F}`)}else k(`${i.default.yellow("⚠️")} Claude Code recommended settings not applied
383
385
  ${i.default.dim("Conversations are deleted after 30 days by default")}`,"Claude Config")}if(G)k(`${i.default.green("✅")} OMA block found in ~/.claude/CLAUDE.md`,"CLAUDE.md");else k(`${i.default.yellow("⚠️")} OMA block missing in ~/.claude/CLAUDE.md
384
- ${i.default.dim("Run 'oh-my-agent' to install or reinstall")}`,"CLAUDE.md")}if(W===0)d(i.default.green("✅ All checks passed! Ready to use."));else d(i.default.yellow(`⚠️ Found ${W} issue(s). See details above.`));if(WT())k(`${i.default.green("⭐")} Thank you for starring oh-my-agent!
386
+ ${i.default.dim("Run 'oh-my-agent' to install or reinstall")}`,"CLAUDE.md")}if(P===0)d(i.default.green("✅ All checks passed! Ready to use."));else d(i.default.yellow(`⚠️ Found ${P} issue(s). See details above.`));if(AT())k(`${i.default.green("⭐")} Thank you for starring oh-my-agent!
385
387
  ${i.default.dim("https://github.com/sponsors/first-fluke")}`,"Support");else k(`${i.default.yellow("❤️")} Enjoying oh-my-agent? Give it a star or sponsor!
386
388
  ${i.default.dim("gh api --method PUT /user/starred/first-fluke/oh-my-agent")}
387
- ${i.default.dim("https://github.com/sponsors/first-fluke")}`,"Support")}catch(V){if(O)O.stop("Check failed");o.error(V instanceof Error?V.message:String(V)),process.exit(1)}}tG();s$();b0();var $6=q$(b$(),1);async function cT($=!1,I=!1){let U=process.cwd(),_=L7(U,{force:I});if($){console.log(JSON.stringify(_,null,2));return}console.clear(),D$($6.default.bgMagenta($6.default.white(" \uD83E\uDDE0 oh-my-agent memory:init ")));let u=[`Memories dir: ${$6.default.cyan(_.memoriesDir)}`,`Session ID: ${$6.default.cyan(_.sessionId)}`,"",$6.default.bold("Created:"),_.created.length>0?_.created.map((g)=>` + ${g}`).join(`
388
- `):" (none)","",$6.default.bold("Updated:"),_.updated.length>0?_.updated.map((g)=>` ~ ${g}`).join(`
389
- `):" (none)","",$6.default.bold("Skipped:"),_.skipped.length>0?_.skipped.map((g)=>` - ${g}`).join(`
389
+ ${i.default.dim("https://github.com/sponsors/first-fluke")}`,"Support")}catch(D){if(O)O.stop("Check failed");o.error(D instanceof Error?D.message:String(D)),process.exit(1)}}eG();I4();F0();var u6=q$(b$(),1);async function dT($=!1,I=!1){let U=process.cwd(),_=P7(U,{force:I});if($){console.log(JSON.stringify(_,null,2));return}console.clear(),V$(u6.default.bgMagenta(u6.default.white(" \uD83E\uDDE0 oh-my-agent memory:init ")));let u=[`Memories dir: ${u6.default.cyan(_.memoriesDir)}`,`Session ID: ${u6.default.cyan(_.sessionId)}`,"",u6.default.bold("Created:"),_.created.length>0?_.created.map((g)=>` + ${g}`).join(`
390
+ `):" (none)","",u6.default.bold("Updated:"),_.updated.length>0?_.updated.map((g)=>` ~ ${g}`).join(`
391
+ `):" (none)","",u6.default.bold("Skipped:"),_.skipped.length>0?_.skipped.map((g)=>` - ${g}`).join(`
390
392
  `):" (none)"].join(`
391
- `);k(u,"Memory Schema"),d($6.default.green("Memory schema ready!"))}s$();var W$=q$(b$(),1);import{execSync as nS}from"node:child_process";import{existsSync as dT,mkdirSync as rS,readdirSync as pT,readFileSync as lS,writeFileSync as mS}from"node:fs";import{join as aG}from"node:path";function eG($){if(!$)return{since:"7 days ago",label:"7d",days:7};let I=$.match(/^(\d+)(h|d|w)$/);if(!I)throw Error(`Invalid window: ${$}. Use: 24h, 7d, 14d, 30d, 2w`);let U=parseInt(I[1]||"0",10),_=I[2]||"";switch(_){case"h":return{since:`${U} hours ago`,label:`${U}h`,days:U/24};case"d":return{since:`${U} days ago`,label:`${U}d`,days:U};case"w":return{since:`${U*7} days ago`,label:`${U}w`,days:U*7};default:throw Error(`Invalid unit: ${_}`)}}function oT($){let I=eG($);return{current:I,previous:{since:`${I.days*2} days ago`,until:`${I.days} days ago`,label:I.label,days:I.days}}}function b6($,I){try{return nS(I,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"],maxBuffer:10485760}).trim()}catch{return""}}function tT($){b6($,"git fetch origin --quiet 2>/dev/null || true")}function aT($){return b6($,"git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|refs/remotes/origin/||'")||"main"}function eT($){return b6($,"git config user.name")||"Unknown"}function sT($,I,U){let _=I.until?` --until="${I.until}"`:"",u=b6($,`git log ${U} --since="${I.since}"${_} --format="COMMIT:%H|%aN|%ae|%at|%s" --shortstat`);if(!u)return[];let g=[],z=null;for(let v of u.split(`
392
- `))if(v.startsWith("COMMIT:")){if(z?.hash)g.push({hash:z.hash,author:z.author||"",email:z.email||"",timestamp:z.timestamp||0,subject:z.subject||"",insertions:z.insertions||0,deletions:z.deletions||0});let J=v.slice(7).split("|");z={hash:J[0],author:J[1],email:J[2],timestamp:parseInt(J[3]||"0",10),subject:J.slice(4).join("|"),insertions:0,deletions:0}}else if(z&&v.trim()){let J=v.match(/(\d+) insertions?\(\+\)/),N=v.match(/(\d+) deletions?\(-\)/);if(J)z.insertions=parseInt(J[1]||"0",10);if(N)z.deletions=parseInt(N[1]||"0",10)}if(z?.hash)g.push({hash:z.hash,author:z.author||"",email:z.email||"",timestamp:z.timestamp||0,subject:z.subject||"",insertions:z.insertions||0,deletions:z.deletions||0});return g}function hS($,I,U){let _=I.until?` --until="${I.until}"`:"",u=b6($,`git log ${U} --since="${I.since}"${_} --format="COMMIT:%H|%aN" --numstat`);if(!u)return[];let g=[],z="";for(let v of u.split(`
393
- `))if(v.startsWith("COMMIT:"))z=v.slice(7).split("|")[1]||"";else if(v.trim()&&z){let J=v.split("\t");if(J.length>=3){let N=parseInt(J[0]||"0",10),X=parseInt(J[1]||"0",10);if(!Number.isNaN(N)&&!Number.isNaN(X)&&J[2])g.push({file:J[2],insertions:N,deletions:X,author:z})}}return g}function cS($,I,U,_=10){let u=I.until?` --until="${I.until}"`:"",g=b6($,`git log ${U} --since="${I.since}"${u} --format="" --name-only | grep -v '^$' | sort | uniq -c | sort -rn | head -${_}`);if(!g)return[];return g.split(`
394
- `).filter(Boolean).map((z)=>{let v=z.trim().match(/^\s*(\d+)\s+(.+)$/);if(!v)return null;return{count:parseInt(v[1]||"0",10),file:v[2]||""}}).filter((z)=>z!==null)}function dS($,I,U){let _=U?` --author="${U}"`:"",u=b6($,`git log ${I}${_} --format="%ad" --date=format:"%Y-%m-%d" | sort -u`);if(!u)return 0;let g=u.split(`
395
- `).filter(Boolean).sort().reverse(),z=new Date;z.setHours(0,0,0,0);let v=0,J=new Date(z);for(let N of g){let[X=0,G=0,q=0]=N.split("-").map(Number),T=new Date(X,G-1,q);T.setHours(0,0,0,0);let H=Math.round((J.getTime()-T.getTime())/86400000);if(H===0)v++,J.setDate(J.getDate()-1);else if(H===1&&v===0)v++,J.setTime(T.getTime()),J.setDate(J.getDate()-1);else break}return v}function pS($,I,U){let _=I.until?` --until="${I.until}"`:"",u=b6($,`git log ${U} --since="${I.since}"${_} --format="%b" | grep -ci "co-authored-by.*noreply@anthropic\\.com\\|co-authored-by.*copilot\\|co-authored-by.*openai" 2>/dev/null || echo 0`);return parseInt(u||"0",10)}var oS=/(?:test|spec|__tests__|\.test\.|\.spec\.)/i;function sG($){return oS.test($)}function $H($,I=45){if($.length===0)return[];let U=[...$].sort((J,N)=>J.timestamp-N.timestamp),_=[],u=U[0]?.timestamp??0,g=U[0]?.timestamp??0,z=1,v=()=>{let J=Math.max(Math.round((g-u)/60),1),N=J>=50?"deep":J>=20?"medium":"micro";_.push({startTime:u,endTime:g,commits:z,type:N,durationMinutes:J})};for(let J=1;J<U.length;J++){let N=U[J]?.timestamp??0;if((N-g)/60>I)v(),u=N,g=N,z=1;else g=N,z++}return v(),_}function IH($){let I=Array(24).fill(0);for(let U of $){let _=new Date(U.timestamp*1000).getHours();I[_]=(I[_]||0)+1}return I}function tS($){let I={},U=/^(feat|fix|docs|style|refactor|test|chore|build|ci|perf)(\(.+\))?!?:/;for(let _ of $){let u=_.subject.match(U),g=u?u[1]||"other":"other";I[g]=(I[g]||0)+1}return I}function aS($){let I={};for(let g of $){let z=g.file.split("/")[0]||g.file;I[z]=(I[z]||0)+1}let U=$.length;if(U===0)return{score:0,area:"-"};let u=Object.entries(I).sort(([,g],[,z])=>z-g)[0];if(!u)return{score:0,area:"-"};return{score:Math.round(u[1]/U*100),area:u[0]}}function eS($,I){let U={};for(let g of $){if(!U[g.author])U[g.author]={commits:0,insertions:0,deletions:0,testInsertions:0,topAreas:[],commitTypes:{},peakHour:0};let z=U[g.author];if(!z)continue;z.commits++,z.insertions+=g.insertions,z.deletions+=g.deletions;let v=g.subject.match(/^(feat|fix|docs|style|refactor|test|chore|build|ci|perf)(\(.+\))?!?:/),J=v?v[1]||"other":"other";z.commitTypes[J]=(z.commitTypes[J]||0)+1}let _={},u={};for(let g of I){if(!_[g.author])_[g.author]={};let z=g.file.split("/")[0]||g.file,v=_[g.author];if(v)v[z]=(v[z]||0)+1;let J=U[g.author];if(J&&sG(g.file))J.testInsertions+=g.insertions}for(let g of $){if(!u[g.author])u[g.author]=Array(24).fill(0);let z=new Date(g.timestamp*1000).getHours(),v=u[g.author];if(v)v[z]=(v[z]||0)+1}for(let[g,z]of Object.entries(U)){let v=_[g]||{};z.topAreas=Object.entries(v).sort(([,X],[,G])=>G-X).slice(0,3).map(([X])=>X);let J=u[g]||[],N=Math.max(...J,0);z.peakHour=N>0?J.indexOf(N):0}return U}function uH($){return aG($,".serena","retrospectives")}function $9($,I){let U=uH($);if(!dT(U))rS(U,{recursive:!0});let _=I.date.split("T")[0]||I.date,u=pT(U).filter((v)=>v.startsWith(_)).length,g=`${_}-${u+1}.json`,z=aG(U,g);return mS(z,JSON.stringify(I,null,2),"utf-8"),z}function UH($){let I=uH($);if(!dT(I))return null;try{let U=pT(I).filter((g)=>g.endsWith(".json")).sort().reverse();if(U.length===0)return null;let _=lS(aG(I,U[0]||""),"utf-8"),u=JSON.parse(_);if(u.metrics)return u;return null}catch{return null}}function _H($,I,U=30){if(I===0)return"";let _=Math.round($/I*U);return"█".repeat(_)}function sS($,I,U,_=25){let u=U>0?Math.round(I/U*100):0,g=_H(I,U,_);return` ${$.padEnd(12)} ${String(I).padStart(4)} (${String(u).padStart(2)}%) ${g}`}function gH($){let I=Math.max(...$,1),U=[];for(let _=0;_<24;_++){let u=$[_]||0;if(u===0)continue;U.push(` ${String(_).padStart(2)}:00 ${String(u).padStart(3)} ${_H(u,I,20)}`)}return U.length>0?U.join(`
396
- `):" (no commits)"}function zH($){return[["Commits",String($.commits)],["Contributors",String($.contributors)],["Insertions",`+${$.insertions}`],["Deletions",`-${$.deletions}`],["Net LOC",String($.netLoc)],["Test LOC (ins)",String($.testLoc)],["Test ratio",`${$.testRatio}%`],["Active days",String($.activeDays)],["Sessions",String($.sessions)],["Deep sessions",String($.deepSessions)],["Avg session",`${$.avgSessionMinutes} min`],["LOC/session-hour",String($.locPerSessionHour)],["Peak hour",`${$.peakHour}:00`],["Focus score",`${$.focusScore}% (${$.focusArea})`],["Streak",`${$.streakDays} days`],["AI-assisted",String($.aiAssistedCommits)]].map(([U,_])=>` ${U?.padEnd(20)} ${_}`).join(`
397
- `)}function vH($,I){let U=Object.entries($).sort(([,v],[,J])=>J.commits-v.commits),_=U.findIndex(([v])=>v===I);if(_>0){let[v]=U.splice(_,1);if(v)U.unshift(v)}let u=` ${"Contributor".padEnd(24)} ${"Commits".padStart(7)} ${"+/-".padStart(14)} Top area`,g=` ${"-".repeat(24)} ${"-".repeat(7)} ${"-".repeat(14)} ${"-".repeat(15)}`,z=U.map(([v,J])=>{let N=v===I?`You (${v})`:v,X=`+${J.insertions}/-${J.deletions}`;return` ${N.padEnd(24)} ${String(J.commits).padStart(7)} ${X.padStart(14)} ${J.topArea}`});return[u,g,...z].join(`
398
- `)}function I9($,I){let U=$.metrics,_=I.metrics;function u(z,v,J=""){let N=z-v,X=N>0?"↑":N<0?"↓":"→",G=N>0?"+":"";return`${v}${J} → ${z}${J} ${X}${G}${N}${J}`}return[` ${"Metric".padEnd(20)} Change`,` ${"-".repeat(20)} ${"-".repeat(35)}`,` ${"Commits".padEnd(20)} ${u(U.commits,_.commits)}`,` ${"Test ratio".padEnd(20)} ${u(U.testRatio,_.testRatio,"%")}`,` ${"Sessions".padEnd(20)} ${u(U.sessions,_.sessions)}`,` ${"Deep sessions".padEnd(20)} ${u(U.deepSessions,_.deepSessions)}`,` ${"LOC/session-hour".padEnd(20)} ${u(U.locPerSessionHour,_.locPerSessionHour)}`,` ${"Focus score".padEnd(20)} ${u(U.focusScore,_.focusScore,"%")}`,` ${"Streak".padEnd(20)} ${u(U.streakDays,_.streakDays,"d")}`].join(`
399
- `)}function JH($){let I=$.filter((z)=>z.type==="deep").length,U=$.filter((z)=>z.type==="medium").length,_=$.filter((z)=>z.type==="micro").length,u=$.reduce((z,v)=>z+v.durationMinutes,0),g=$.length>0?Math.round(u/$.length):0;return[` Total sessions: ${$.length}`,` Deep (50+ min): ${I}`,` Medium (20-50): ${U}`,` Micro (<20 min): ${_}`,` Total active time: ${Math.floor(u/60)}h ${u%60}m`,` Avg session: ${g} min`].join(`
400
- `)}function NH($){if($.length===0)return" (no file changes)";return $.map((I,U)=>{let _=I.count>=5?" [churn]":"",u=sG(I.file)?" [test]":"";return` ${String(U+1).padStart(2)}. ${I.file} (${I.count}x)${u}${_}`}).join(`
401
- `)}function GH($,I){if(I===0)return" (no commits)";return Object.entries($).sort(([,U],[,_])=>_-U).map(([U,_])=>sS(U,_,I)).join(`
402
- `)}function XH($){let I=$.metrics;return`${$.date.split("T")[0]||""} (${$.window}): ${I.commits} commits (${I.contributors} contrib), ${I.netLoc>0?"+":""}${I.netLoc} LOC, ${I.testRatio}% tests, peak: ${I.peakHour}:00 | Streak: ${I.streakDays}d`}function J2($,I){let U=`origin/${aT($)}`,_=sT($,I,U),u=hS($,I,U),g=cS($,I,U),z=eS(_,u),v=$H(_),J=IH(_),N=tS(_),X=aS(u),G=dS($,U),q=pS($,I,U),T=0;for(let L of u)if(sG(L.file))T+=L.insertions;let H=_.reduce((L,B)=>L+B.insertions,0),Q=_.reduce((L,B)=>L+B.deletions,0),Y=new Set(_.map((L)=>new Date(L.timestamp*1000).toISOString().split("T")[0])).size,R=v.reduce((L,B)=>L+B.durationMinutes,0),K=R/60,W=K>0?Math.round((H+Q)/K/50)*50:0,O=J.indexOf(Math.max(...J)),V={};for(let[L,B]of Object.entries(z)){let M=B.insertions>0?Math.round(B.testInsertions/B.insertions*100):0;V[L]={commits:B.commits,insertions:B.insertions,deletions:B.deletions,testRatio:M,topArea:B.topAreas[0]||"-"}}return{date:new Date().toISOString(),window:I.label,metrics:{commits:_.length,contributors:Object.keys(z).length,insertions:H,deletions:Q,netLoc:H-Q,testLoc:T,testRatio:H>0?Math.round(T/H*100):0,activeDays:Y,sessions:v.length,deepSessions:v.filter((L)=>L.type==="deep").length,avgSessionMinutes:v.length>0?Math.round(R/v.length):0,locPerSessionHour:W,peakHour:O,focusScore:X.score,focusArea:X.area,streakDays:G,aiAssistedCommits:q},authors:V,commitTypes:N,hotspots:g}}function u9($,I){let U=`origin/${aT($)}`,_=sT($,I,U);return{sessions:$H(_),hourly:IH(_)}}function MH($,I,U,_,u){if(console.log(W$.default.bold(W$.default.cyan(XH($)))),console.log(),k(zH($.metrics),"Summary"),u)k(I9($,u),"Trends vs Last Retro");if($.metrics.contributors>0)k(vH($.authors,_),"Contributors");if(k(gH(U),"Commit Time Distribution"),I.length>0)k(JH(I),"Work Sessions");if(k(GH($.commitTypes,$.metrics.commits),"Commit Types"),$.hotspots.length>0){let J=$.metrics.commits>0?Math.round(($.commitTypes.fix||0)/$.metrics.commits*100):0,N=NH($.hotspots);if(J>50)N+=`
393
+ `);k(u,"Memory Schema"),d(u6.default.green("Memory schema ready!"))}I4();var P$=q$(b$(),1);import{execSync as rS}from"node:child_process";import{existsSync as pT,mkdirSync as nS,readdirSync as oT,readFileSync as lS,writeFileSync as mS}from"node:fs";import{join as sG}from"node:path";function $9($){if(!$)return{since:"7 days ago",label:"7d",days:7};let I=$.match(/^(\d+)(h|d|w)$/);if(!I)throw Error(`Invalid window: ${$}. Use: 24h, 7d, 14d, 30d, 2w`);let U=parseInt(I[1]||"0",10),_=I[2]||"";switch(_){case"h":return{since:`${U} hours ago`,label:`${U}h`,days:U/24};case"d":return{since:`${U} days ago`,label:`${U}d`,days:U};case"w":return{since:`${U*7} days ago`,label:`${U}w`,days:U*7};default:throw Error(`Invalid unit: ${_}`)}}function tT($){let I=$9($);return{current:I,previous:{since:`${I.days*2} days ago`,until:`${I.days} days ago`,label:I.label,days:I.days}}}function F6($,I){try{return rS(I,{cwd:$,encoding:"utf-8",stdio:["pipe","pipe","ignore"],maxBuffer:10485760}).trim()}catch{return""}}function aT($){F6($,"git fetch origin --quiet 2>/dev/null || true")}function eT($){return F6($,"git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|refs/remotes/origin/||'")||"main"}function sT($){return F6($,"git config user.name")||"Unknown"}function $H($,I,U){let _=I.until?` --until="${I.until}"`:"",u=F6($,`git log ${U} --since="${I.since}"${_} --format="COMMIT:%H|%aN|%ae|%at|%s" --shortstat`);if(!u)return[];let g=[],z=null;for(let v of u.split(`
394
+ `))if(v.startsWith("COMMIT:")){if(z?.hash)g.push({hash:z.hash,author:z.author||"",email:z.email||"",timestamp:z.timestamp||0,subject:z.subject||"",insertions:z.insertions||0,deletions:z.deletions||0});let J=v.slice(7).split("|");z={hash:J[0],author:J[1],email:J[2],timestamp:parseInt(J[3]||"0",10),subject:J.slice(4).join("|"),insertions:0,deletions:0}}else if(z&&v.trim()){let J=v.match(/(\d+) insertions?\(\+\)/),N=v.match(/(\d+) deletions?\(-\)/);if(J)z.insertions=parseInt(J[1]||"0",10);if(N)z.deletions=parseInt(N[1]||"0",10)}if(z?.hash)g.push({hash:z.hash,author:z.author||"",email:z.email||"",timestamp:z.timestamp||0,subject:z.subject||"",insertions:z.insertions||0,deletions:z.deletions||0});return g}function hS($,I,U){let _=I.until?` --until="${I.until}"`:"",u=F6($,`git log ${U} --since="${I.since}"${_} --format="COMMIT:%H|%aN" --numstat`);if(!u)return[];let g=[],z="";for(let v of u.split(`
395
+ `))if(v.startsWith("COMMIT:"))z=v.slice(7).split("|")[1]||"";else if(v.trim()&&z){let J=v.split("\t");if(J.length>=3){let N=parseInt(J[0]||"0",10),X=parseInt(J[1]||"0",10);if(!Number.isNaN(N)&&!Number.isNaN(X)&&J[2])g.push({file:J[2],insertions:N,deletions:X,author:z})}}return g}function cS($,I,U,_=10){let u=I.until?` --until="${I.until}"`:"",g=F6($,`git log ${U} --since="${I.since}"${u} --format="" --name-only | grep -v '^$' | sort | uniq -c | sort -rn | head -${_}`);if(!g)return[];return g.split(`
396
+ `).filter(Boolean).map((z)=>{let v=z.trim().match(/^\s*(\d+)\s+(.+)$/);if(!v)return null;return{count:parseInt(v[1]||"0",10),file:v[2]||""}}).filter((z)=>z!==null)}function dS($,I,U){let _=U?` --author="${U}"`:"",u=F6($,`git log ${I}${_} --format="%ad" --date=format:"%Y-%m-%d" | sort -u`);if(!u)return 0;let g=u.split(`
397
+ `).filter(Boolean).sort().reverse(),z=new Date;z.setHours(0,0,0,0);let v=0,J=new Date(z);for(let N of g){let[X=0,G=0,q=0]=N.split("-").map(Number),T=new Date(X,G-1,q);T.setHours(0,0,0,0);let H=Math.round((J.getTime()-T.getTime())/86400000);if(H===0)v++,J.setDate(J.getDate()-1);else if(H===1&&v===0)v++,J.setTime(T.getTime()),J.setDate(J.getDate()-1);else break}return v}function pS($,I,U){let _=I.until?` --until="${I.until}"`:"",u=F6($,`git log ${U} --since="${I.since}"${_} --format="%b" | grep -ci "co-authored-by.*noreply@anthropic\\.com\\|co-authored-by.*copilot\\|co-authored-by.*openai" 2>/dev/null || echo 0`);return parseInt(u||"0",10)}var oS=/(?:test|spec|__tests__|\.test\.|\.spec\.)/i;function I9($){return oS.test($)}function IH($,I=45){if($.length===0)return[];let U=[...$].sort((J,N)=>J.timestamp-N.timestamp),_=[],u=U[0]?.timestamp??0,g=U[0]?.timestamp??0,z=1,v=()=>{let J=Math.max(Math.round((g-u)/60),1),N=J>=50?"deep":J>=20?"medium":"micro";_.push({startTime:u,endTime:g,commits:z,type:N,durationMinutes:J})};for(let J=1;J<U.length;J++){let N=U[J]?.timestamp??0;if((N-g)/60>I)v(),u=N,g=N,z=1;else g=N,z++}return v(),_}function uH($){let I=Array(24).fill(0);for(let U of $){let _=new Date(U.timestamp*1000).getHours();I[_]=(I[_]||0)+1}return I}function tS($){let I={},U=/^(feat|fix|docs|style|refactor|test|chore|build|ci|perf)(\(.+\))?!?:/;for(let _ of $){let u=_.subject.match(U),g=u?u[1]||"other":"other";I[g]=(I[g]||0)+1}return I}function aS($){let I={};for(let g of $){let z=g.file.split("/")[0]||g.file;I[z]=(I[z]||0)+1}let U=$.length;if(U===0)return{score:0,area:"-"};let u=Object.entries(I).sort(([,g],[,z])=>z-g)[0];if(!u)return{score:0,area:"-"};return{score:Math.round(u[1]/U*100),area:u[0]}}function eS($,I){let U={};for(let g of $){if(!U[g.author])U[g.author]={commits:0,insertions:0,deletions:0,testInsertions:0,topAreas:[],commitTypes:{},peakHour:0};let z=U[g.author];if(!z)continue;z.commits++,z.insertions+=g.insertions,z.deletions+=g.deletions;let v=g.subject.match(/^(feat|fix|docs|style|refactor|test|chore|build|ci|perf)(\(.+\))?!?:/),J=v?v[1]||"other":"other";z.commitTypes[J]=(z.commitTypes[J]||0)+1}let _={},u={};for(let g of I){if(!_[g.author])_[g.author]={};let z=g.file.split("/")[0]||g.file,v=_[g.author];if(v)v[z]=(v[z]||0)+1;let J=U[g.author];if(J&&I9(g.file))J.testInsertions+=g.insertions}for(let g of $){if(!u[g.author])u[g.author]=Array(24).fill(0);let z=new Date(g.timestamp*1000).getHours(),v=u[g.author];if(v)v[z]=(v[z]||0)+1}for(let[g,z]of Object.entries(U)){let v=_[g]||{};z.topAreas=Object.entries(v).sort(([,X],[,G])=>G-X).slice(0,3).map(([X])=>X);let J=u[g]||[],N=Math.max(...J,0);z.peakHour=N>0?J.indexOf(N):0}return U}function UH($){return sG($,".serena","retrospectives")}function u9($,I){let U=UH($);if(!pT(U))nS(U,{recursive:!0});let _=I.date.split("T")[0]||I.date,u=oT(U).filter((v)=>v.startsWith(_)).length,g=`${_}-${u+1}.json`,z=sG(U,g);return mS(z,JSON.stringify(I,null,2),"utf-8"),z}function _H($){let I=UH($);if(!pT(I))return null;try{let U=oT(I).filter((g)=>g.endsWith(".json")).sort().reverse();if(U.length===0)return null;let _=lS(sG(I,U[0]||""),"utf-8"),u=JSON.parse(_);if(u.metrics)return u;return null}catch{return null}}function gH($,I,U=30){if(I===0)return"";let _=Math.round($/I*U);return"█".repeat(_)}function sS($,I,U,_=25){let u=U>0?Math.round(I/U*100):0,g=gH(I,U,_);return` ${$.padEnd(12)} ${String(I).padStart(4)} (${String(u).padStart(2)}%) ${g}`}function zH($){let I=Math.max(...$,1),U=[];for(let _=0;_<24;_++){let u=$[_]||0;if(u===0)continue;U.push(` ${String(_).padStart(2)}:00 ${String(u).padStart(3)} ${gH(u,I,20)}`)}return U.length>0?U.join(`
398
+ `):" (no commits)"}function vH($){return[["Commits",String($.commits)],["Contributors",String($.contributors)],["Insertions",`+${$.insertions}`],["Deletions",`-${$.deletions}`],["Net LOC",String($.netLoc)],["Test LOC (ins)",String($.testLoc)],["Test ratio",`${$.testRatio}%`],["Active days",String($.activeDays)],["Sessions",String($.sessions)],["Deep sessions",String($.deepSessions)],["Avg session",`${$.avgSessionMinutes} min`],["LOC/session-hour",String($.locPerSessionHour)],["Peak hour",`${$.peakHour}:00`],["Focus score",`${$.focusScore}% (${$.focusArea})`],["Streak",`${$.streakDays} days`],["AI-assisted",String($.aiAssistedCommits)]].map(([U,_])=>` ${U?.padEnd(20)} ${_}`).join(`
399
+ `)}function JH($,I){let U=Object.entries($).sort(([,v],[,J])=>J.commits-v.commits),_=U.findIndex(([v])=>v===I);if(_>0){let[v]=U.splice(_,1);if(v)U.unshift(v)}let u=` ${"Contributor".padEnd(24)} ${"Commits".padStart(7)} ${"+/-".padStart(14)} Top area`,g=` ${"-".repeat(24)} ${"-".repeat(7)} ${"-".repeat(14)} ${"-".repeat(15)}`,z=U.map(([v,J])=>{let N=v===I?`You (${v})`:v,X=`+${J.insertions}/-${J.deletions}`;return` ${N.padEnd(24)} ${String(J.commits).padStart(7)} ${X.padStart(14)} ${J.topArea}`});return[u,g,...z].join(`
400
+ `)}function U9($,I){let U=$.metrics,_=I.metrics;function u(z,v,J=""){let N=z-v,X=N>0?"↑":N<0?"↓":"→",G=N>0?"+":"";return`${v}${J} → ${z}${J} ${X}${G}${N}${J}`}return[` ${"Metric".padEnd(20)} Change`,` ${"-".repeat(20)} ${"-".repeat(35)}`,` ${"Commits".padEnd(20)} ${u(U.commits,_.commits)}`,` ${"Test ratio".padEnd(20)} ${u(U.testRatio,_.testRatio,"%")}`,` ${"Sessions".padEnd(20)} ${u(U.sessions,_.sessions)}`,` ${"Deep sessions".padEnd(20)} ${u(U.deepSessions,_.deepSessions)}`,` ${"LOC/session-hour".padEnd(20)} ${u(U.locPerSessionHour,_.locPerSessionHour)}`,` ${"Focus score".padEnd(20)} ${u(U.focusScore,_.focusScore,"%")}`,` ${"Streak".padEnd(20)} ${u(U.streakDays,_.streakDays,"d")}`].join(`
401
+ `)}function NH($){let I=$.filter((z)=>z.type==="deep").length,U=$.filter((z)=>z.type==="medium").length,_=$.filter((z)=>z.type==="micro").length,u=$.reduce((z,v)=>z+v.durationMinutes,0),g=$.length>0?Math.round(u/$.length):0;return[` Total sessions: ${$.length}`,` Deep (50+ min): ${I}`,` Medium (20-50): ${U}`,` Micro (<20 min): ${_}`,` Total active time: ${Math.floor(u/60)}h ${u%60}m`,` Avg session: ${g} min`].join(`
402
+ `)}function GH($){if($.length===0)return" (no file changes)";return $.map((I,U)=>{let _=I.count>=5?" [churn]":"",u=I9(I.file)?" [test]":"";return` ${String(U+1).padStart(2)}. ${I.file} (${I.count}x)${u}${_}`}).join(`
403
+ `)}function XH($,I){if(I===0)return" (no commits)";return Object.entries($).sort(([,U],[,_])=>_-U).map(([U,_])=>sS(U,_,I)).join(`
404
+ `)}function qH($){let I=$.metrics;return`${$.date.split("T")[0]||""} (${$.window}): ${I.commits} commits (${I.contributors} contrib), ${I.netLoc>0?"+":""}${I.netLoc} LOC, ${I.testRatio}% tests, peak: ${I.peakHour}:00 | Streak: ${I.streakDays}d`}function G2($,I){let U=`origin/${eT($)}`,_=$H($,I,U),u=hS($,I,U),g=cS($,I,U),z=eS(_,u),v=IH(_),J=uH(_),N=tS(_),X=aS(u),G=dS($,U),q=pS($,I,U),T=0;for(let L of u)if(I9(L.file))T+=L.insertions;let H=_.reduce((L,B)=>L+B.insertions,0),Q=_.reduce((L,B)=>L+B.deletions,0),Y=new Set(_.map((L)=>new Date(L.timestamp*1000).toISOString().split("T")[0])).size,K=v.reduce((L,B)=>L+B.durationMinutes,0),R=K/60,P=R>0?Math.round((H+Q)/R/50)*50:0,O=J.indexOf(Math.max(...J)),D={};for(let[L,B]of Object.entries(z)){let M=B.insertions>0?Math.round(B.testInsertions/B.insertions*100):0;D[L]={commits:B.commits,insertions:B.insertions,deletions:B.deletions,testRatio:M,topArea:B.topAreas[0]||"-"}}return{date:new Date().toISOString(),window:I.label,metrics:{commits:_.length,contributors:Object.keys(z).length,insertions:H,deletions:Q,netLoc:H-Q,testLoc:T,testRatio:H>0?Math.round(T/H*100):0,activeDays:Y,sessions:v.length,deepSessions:v.filter((L)=>L.type==="deep").length,avgSessionMinutes:v.length>0?Math.round(K/v.length):0,locPerSessionHour:P,peakHour:O,focusScore:X.score,focusArea:X.area,streakDays:G,aiAssistedCommits:q},authors:D,commitTypes:N,hotspots:g}}function _9($,I){let U=`origin/${eT($)}`,_=$H($,I,U);return{sessions:IH(_),hourly:uH(_)}}function KH($,I,U,_,u){if(console.log(P$.default.bold(P$.default.cyan(qH($)))),console.log(),k(vH($.metrics),"Summary"),u)k(U9($,u),"Trends vs Last Retro");if($.metrics.contributors>0)k(JH($.authors,_),"Contributors");if(k(zH(U),"Commit Time Distribution"),I.length>0)k(NH(I),"Work Sessions");if(k(XH($.commitTypes,$.metrics.commits),"Commit Types"),$.hotspots.length>0){let J=$.metrics.commits>0?Math.round(($.commitTypes.fix||0)/$.metrics.commits*100):0,N=GH($.hotspots);if(J>50)N+=`
403
405
 
404
- ${W$.default.yellow(`Fix ratio ${J}% — ship-fast-fix-fast pattern detected`)}`;k(N,"File Hotspots (Top 10)")}let{focusScore:g,focusArea:z}=$.metrics,v=g>=60?W$.default.green:g>=40?W$.default.yellow:W$.default.red;if(k(` ${v(`${g}%`)} — primary area: ${W$.default.bold(z)}`,"Focus Score"),k(` ${W$.default.bold(String($.metrics.streakDays))} consecutive days with commits`,"Shipping Streak"),$.metrics.aiAssistedCommits>0){let J=$.metrics.commits>0?Math.round($.metrics.aiAssistedCommits/$.metrics.commits*100):0;k(` ${$.metrics.aiAssistedCommits} commits (${J}%) AI-assisted`,"AI Collaboration")}}async function RH($,I={}){let U=process.cwd();if(I.interactive){let{retro:X}=await Promise.resolve().then(() => (BH(),VH));await X();return}console.clear(),D$(W$.default.bgMagenta(W$.default.white(" retro ")));let _=e$();_.start("Fetching origin..."),tT(U),_.stop("Origin fetched");let u=eT(U);if(I.compare){let{current:X,previous:G}=oT($);_.start(`Analyzing current window (${X.label})...`);let q=J2(U,X),T=u9(U,X);_.stop("Current window analyzed"),_.start(`Analyzing previous window (${G.label})...`);let H=J2(U,G);if(_.stop("Previous window analyzed"),q.metrics.commits===0&&H.metrics.commits===0){k(W$.default.yellow("No commits found in either window."),"Empty"),d(W$.default.dim("Try a wider window: oma retro compare 30d"));return}if(I.json){console.log(JSON.stringify({current:q,previous:H},null,2));return}console.log(W$.default.bold(`
406
+ ${P$.default.yellow(`Fix ratio ${J}% — ship-fast-fix-fast pattern detected`)}`;k(N,"File Hotspots (Top 10)")}let{focusScore:g,focusArea:z}=$.metrics,v=g>=60?P$.default.green:g>=40?P$.default.yellow:P$.default.red;if(k(` ${v(`${g}%`)} — primary area: ${P$.default.bold(z)}`,"Focus Score"),k(` ${P$.default.bold(String($.metrics.streakDays))} consecutive days with commits`,"Shipping Streak"),$.metrics.aiAssistedCommits>0){let J=$.metrics.commits>0?Math.round($.metrics.aiAssistedCommits/$.metrics.commits*100):0;k(` ${$.metrics.aiAssistedCommits} commits (${J}%) AI-assisted`,"AI Collaboration")}}async function RH($,I={}){let U=process.cwd();if(I.interactive){let{retro:X}=await Promise.resolve().then(() => (MH(),BH));await X();return}console.clear(),V$(P$.default.bgMagenta(P$.default.white(" retro ")));let _=$4();_.start("Fetching origin..."),aT(U),_.stop("Origin fetched");let u=sT(U);if(I.compare){let{current:X,previous:G}=tT($);_.start(`Analyzing current window (${X.label})...`);let q=G2(U,X),T=_9(U,X);_.stop("Current window analyzed"),_.start(`Analyzing previous window (${G.label})...`);let H=G2(U,G);if(_.stop("Previous window analyzed"),q.metrics.commits===0&&H.metrics.commits===0){k(P$.default.yellow("No commits found in either window."),"Empty"),d(P$.default.dim("Try a wider window: oma retro compare 30d"));return}if(I.json){console.log(JSON.stringify({current:q,previous:H},null,2));return}console.log(P$.default.bold(`
405
407
  Comparing: ${X.label} (current) vs ${G.label} (prior)
406
- `)),k(I9(q,H),"Period Comparison"),console.log(W$.default.bold(`
408
+ `)),k(U9(q,H),"Period Comparison"),console.log(P$.default.bold(`
407
409
  --- Current Period ---
408
- `)),MH(q,T.sessions,T.hourly,u,null);let Q=$9(U,q);d(W$.default.dim(`Snapshot saved: ${Q}`));return}let g;try{g=eG($)}catch(X){k(["Usage: oma retro [window]",""," oma retro last 7 days (default)"," oma retro 24h last 24 hours"," oma retro 14d last 14 days"," oma retro 30d last 30 days"," oma retro 2w last 2 weeks"," oma retro --compare compare current vs prior period"," oma retro --compare 14d"].join(`
409
- `),"Usage"),d(W$.default.dim(X.message));return}_.start(`Analyzing ${g.label} window...`);let z=J2(U,g),v=u9(U,g);if(_.stop(`Analysis complete (${z.metrics.commits} commits)`),z.metrics.commits===0){k(W$.default.yellow("No commits found in this window."),"Empty"),d(W$.default.dim("Try a wider window: oma retro 30d"));return}if(I.json){console.log(JSON.stringify(z,null,2));return}let J=UH(U);MH(z,v.sessions,v.hourly,u,J);let N=$9(U,z);d(W$.default.dim(`Snapshot saved: ${N}`))}s$();GI();a4();var j6=q$(b$(),1);import{execSync as vw,spawnSync as KH}from"node:child_process";import{platform as Jw}from"node:os";function Nw(){let $=Jw();if($==="darwin")return"brew install gh";if($==="win32")return"winget install GitHub.cli";return"sudo apt install gh"}async function LH(){if(console.clear(),D$(j6.default.bgMagenta(j6.default.white(" ⭐ oh-my-agent star "))),!z1()){let I=Nw(),U=await O$({message:`GitHub CLI (gh) is not installed. Install with ${j6.default.cyan(I)}?`});if(e(U)||!U){d("Install gh manually and try again.");return}let _=e$();_.start("Installing GitHub CLI...");let u=KH(I,{shell:!0,stdio:"pipe"});if(u.status!==0){_.stop("Installation failed"),o.error(u.stderr?.toString()||"Unknown error"),d("Please install gh manually.");return}_.stop("GitHub CLI installed!")}if(!y4()){o.warn("GitHub CLI is not authenticated.");let I=await O$({message:`Run ${j6.default.cyan("gh auth login")} now?`});if(e(I)||!I){d("Authenticate and try again.");return}if(KH("gh",["auth","login"],{stdio:"inherit"}),!y4()){d("Authentication was not completed. Try again.");return}o.success("Authenticated!")}if(v1()){d(`Already starred ${j6.default.cyan(L$)}! Thank you! \uD83D\uDE4F`);return}let $=await O$({message:`Star ${j6.default.cyan(L$)} on GitHub?`});if(e($)||!$){d("Maybe next time!");return}try{vw(`gh api -X PUT /user/starred/${L$}`,{stdio:"ignore"}),d(`Starred ${j6.default.cyan(L$)}! Thank you! \uD83C\uDF1F`)}catch{o.error("Failed to star the repository."),d("Please try again later.")}}s$();_9();b0();var K4=q$(b$(),1);import{existsSync as G2,mkdirSync as Gw,readdirSync as Xw,readFileSync as qw,writeFileSync as PH}from"node:fs";import{dirname as Qw,join as WH}from"node:path";function J9($){return WH($,".serena","metrics.json")}function v9(){return{sessions:0,skillsUsed:{},tasksCompleted:0,totalSessionTime:0,filesChanged:0,linesAdded:0,linesRemoved:0,lastUpdated:new Date().toISOString(),startDate:new Date().toISOString()}}function Tw($){let I=J9($);if(G2(I))try{return JSON.parse(qw(I,"utf-8"))}catch{return v9()}return v9()}function Hw($,I){let U=J9($),_=Qw(U);if(!G2(_))Gw(_,{recursive:!0});I.lastUpdated=new Date().toISOString(),PH(U,JSON.stringify(I,null,2),"utf-8")}function Yw($){let I=WH($,".serena","memories"),U={};if(!G2(I))return U;try{let _=Xw(I);for(let u of _){let g=u.match(/(?:progress|result)-(\w+)/);if(g?.[1]){let z=g[1];U[z]=(U[z]||0)+1}}}catch{}return U}async function ZH($=!1,I=!1){let U=process.cwd(),_=J9(U);if(I){if(G2(_))PH(_,JSON.stringify(v9(),null,2),"utf-8");if($)console.log(JSON.stringify({reset:!0}));else console.log(K4.default.green("✅ Metrics reset successfully."));return}let u=Tw(U),g=N2(U),z=Yw(U),v=M7(U),J=Z_(U),N=J.startedAt?new Date(J.startedAt):null,X=N&&!Number.isNaN(N.getTime())?Math.max(0,Math.floor((Date.now()-N.getTime())/1000)):0;for(let[Q,Y]of Object.entries(z))u.skillsUsed[Q]=(u.skillsUsed[Q]||0)+Y;if(v>u.tasksCompleted)u.tasksCompleted=v;if(J.id){if(["completed","failed","aborted"].includes(J.status||"")&&(u.lastSessionId!==J.id||u.lastSessionStatus!==J.status)&&X>0)u.totalSessionTime+=X;u.lastSessionId=J.id,u.lastSessionStatus=J.status,u.lastSessionStarted=J.startedAt,u.lastSessionDuration=X}u.filesChanged+=g.filesChanged,u.linesAdded+=g.linesAdded,u.linesRemoved+=g.linesRemoved,u.sessions+=1,Hw(U,u);let G=Math.max(1,Math.ceil((Date.now()-new Date(u.startDate).getTime())/86400000)),q=u.sessions>0?Math.round(u.totalSessionTime/u.sessions):0;if($){console.log(JSON.stringify({...u,gitStats:g,daysSinceStart:G,avgSessionTime:q},null,2));return}console.clear(),D$(K4.default.bgMagenta(K4.default.white(" \uD83D\uDCCA oh-my-agent stats ")));let T=[K4.default.bold(`\uD83D\uDCC8 Productivity Metrics (${G} days)`),"┌─────────────────────┬──────────────┐",`│ ${K4.default.bold("Metric")} │ ${K4.default.bold("Value")} │`,"├─────────────────────┼──────────────┤",`│ Sessions │ ${String(u.sessions).padEnd(12)} │`,`│ Tasks Completed │ ${String(u.tasksCompleted).padEnd(12)} │`,`│ Files Changed │ ${String(u.filesChanged).padEnd(12)} │`,`│ Lines Added │ ${K4.default.green(`+${u.linesAdded}`).padEnd(12)} │`,`│ Lines Removed │ ${K4.default.red(`-${u.linesRemoved}`).padEnd(12)} │`,"└─────────────────────┴──────────────┘"].join(`
410
- `);k(T,"Overview");let H=Object.entries(u.skillsUsed).sort(([,Q],[,Y])=>Y-Q).slice(0,5);if(H.length>0){let Q=[K4.default.bold("\uD83C\uDFC6 Top Skills Used"),...H.map(([Y,R],K)=>` ${K+1}. ${Y} (${R})`)].join(`
411
- `);k(Q,"Skills")}d(K4.default.dim(`Data stored in: ${_}`))}s$();mG();GI();var h$=q$(b$(),1);import{execSync as q1}from"node:child_process";import{cpSync as X2,existsSync as Q1,mkdirSync as q2,readFileSync as N9,rmSync as wH,writeFileSync as Q2}from"node:fs";import{tmpdir as Mw}from"node:os";import{join as m$}from"node:path";a4();import{existsSync as AH,mkdirSync as Ow,readFileSync as Dw,writeFileSync as Vw}from"node:fs";import{dirname as Bw,join as bH}from"node:path";async function jH($){let I=bH($,R4,"_version.json");if(!AH(I))return null;try{let U=Dw(I,"utf-8");return JSON.parse(U).version||null}catch{return null}}async function FH($,I){let U=bH($,R4,"_version.json"),_=Bw(U);if(!AH(_))Ow(_,{recursive:!0});Vw(U,JSON.stringify({version:I},null,2),"utf-8")}async function SH(){let $=`https://raw.githubusercontent.com/${L$}/main/prompt-manifest.json`,I=await fetch($);if(!I.ok)throw Error("Failed to fetch remote manifest");return await I.json()}hG();a4();dG();function Rw($){if(!$)return{intro:(U)=>D$(U),outro:(U)=>d(U),note:(U,_)=>k(U,_),logError:(U)=>o.error(U),spinnerStart:(U)=>{let _=e$();return _.start(U),_}};let I={start(U){},stop(U){if(U)console.log(U)},message(U){console.log(U)}};return{intro:(U)=>console.log(U),outro:(U)=>console.log(U),note:(U,_)=>console.log(U),logError:(U)=>console.error(U),spinnerStart:(U)=>{return console.log(U),I}}}async function EH($=!1,I=!1){if(!I&&process.stdout.isTTY)console.clear();let U=Rw(I);U.intro(h$.default.bgMagenta(h$.default.white(" \uD83D\uDEF8 oh-my-agent update ")));let _=process.cwd(),u=_2(_);if(u.length>0)U.note(u.map((v)=>`${h$.default.green("✓")} ${v}`).join(`
412
- `),"Migration");if(!I)await u2(_);let g=await jH(_);if(g===null){U.note("oh-my-agent is not installed in this project. Running install...","Not initialized");let{install:v}=await Promise.resolve().then(() => (tG(),hT));await v();return}let z;try{z=U.spinnerStart("Checking for updates...");let v=await SH();if(g===v.version){let X=x0(_);if(X.length>0)U.note(X.map((G)=>`${h$.default.green("✓")} ${G}`).join(`
413
- `),"Shared layout migration");z.stop(h$.default.green("Already up to date!")),U.outro(`Current version: ${h$.default.cyan(g)}`);return}z.message(`Downloading ${h$.default.cyan(v.version)}...`);let{dir:J,cleanup:N}=await g2();try{z.message("Copying files...");let X=m$(_,".agents","config","user-preferences.yaml"),G=m$(_,".agents","mcp.json"),q=!$&&Q1(X)?N9(X):null,T=!$&&Q1(G)?N9(G):null,H=m$(Mw(),`oma-stack-backup-${Date.now()}`),Q=m$(_,".agents","skills","oma-backend","stack"),Y=!$&&Q1(Q);if(Y)q2(H,{recursive:!0}),X2(Q,m$(H,"oma-backend"),{recursive:!0});let R=["snippets.md","tech-stack.md","api-template.py"],K=m$(_,".agents","skills","oma-backend","resources"),W=!$&&!Y&&R.some((A)=>Q1(m$(K,A)));if(X2(m$(J,".agents"),m$(_,".agents"),{recursive:!0,force:!0}),q)Q2(X,q);if(T)Q2(G,T);if(Y)try{q2(Q,{recursive:!0}),X2(m$(H,"oma-backend"),Q,{recursive:!0,force:!0})}finally{wH(H,{recursive:!0,force:!0})}if(W){let A=m$(J,".agents","skills","oma-backend","variants","python");if(Q1(A))q2(Q,{recursive:!0}),X2(A,Q,{recursive:!0,force:!0}),Q2(m$(Q,"stack.yaml"),`language: python
410
+ `)),KH(q,T.sessions,T.hourly,u,null);let Q=u9(U,q);d(P$.default.dim(`Snapshot saved: ${Q}`));return}let g;try{g=$9($)}catch(X){k(["Usage: oma retro [window]",""," oma retro last 7 days (default)"," oma retro 24h last 24 hours"," oma retro 14d last 14 days"," oma retro 30d last 30 days"," oma retro 2w last 2 weeks"," oma retro --compare compare current vs prior period"," oma retro --compare 14d"].join(`
411
+ `),"Usage"),d(P$.default.dim(X.message));return}_.start(`Analyzing ${g.label} window...`);let z=G2(U,g),v=_9(U,g);if(_.stop(`Analysis complete (${z.metrics.commits} commits)`),z.metrics.commits===0){k(P$.default.yellow("No commits found in this window."),"Empty"),d(P$.default.dim("Try a wider window: oma retro 30d"));return}if(I.json){console.log(JSON.stringify(z,null,2));return}let J=_H(U);KH(z,v.sessions,v.hourly,u,J);let N=u9(U,z);d(P$.default.dim(`Snapshot saved: ${N}`))}I4();qI();s4();var S6=q$(b$(),1);import{execSync as vw,spawnSync as LH}from"node:child_process";import{platform as Jw}from"node:os";function Nw(){let $=Jw();if($==="darwin")return"brew install gh";if($==="win32")return"winget install GitHub.cli";return"sudo apt install gh"}async function WH(){if(console.clear(),V$(S6.default.bgMagenta(S6.default.white(" ⭐ oh-my-agent star "))),!J1()){let I=Nw(),U=await O$({message:`GitHub CLI (gh) is not installed. Install with ${S6.default.cyan(I)}?`});if(e(U)||!U){d("Install gh manually and try again.");return}let _=$4();_.start("Installing GitHub CLI...");let u=LH(I,{shell:!0,stdio:"pipe"});if(u.status!==0){_.stop("Installation failed"),o.error(u.stderr?.toString()||"Unknown error"),d("Please install gh manually.");return}_.stop("GitHub CLI installed!")}if(!r4()){o.warn("GitHub CLI is not authenticated.");let I=await O$({message:`Run ${S6.default.cyan("gh auth login")} now?`});if(e(I)||!I){d("Authenticate and try again.");return}if(LH("gh",["auth","login"],{stdio:"inherit"}),!r4()){d("Authentication was not completed. Try again.");return}o.success("Authenticated!")}if(N1()){d(`Already starred ${S6.default.cyan(L$)}! Thank you! \uD83D\uDE4F`);return}let $=await O$({message:`Star ${S6.default.cyan(L$)} on GitHub?`});if(e($)||!$){d("Maybe next time!");return}try{vw(`gh api -X PUT /user/starred/${L$}`,{stdio:"ignore"}),d(`Starred ${S6.default.cyan(L$)}! Thank you! \uD83C\uDF1F`)}catch{o.error("Failed to star the repository."),d("Please try again later.")}}I4();z9();F0();var W4=q$(b$(),1);import{existsSync as q2,mkdirSync as Gw,readdirSync as Xw,readFileSync as qw,writeFileSync as PH}from"node:fs";import{dirname as Qw,join as ZH}from"node:path";function G9($){return ZH($,".serena","metrics.json")}function N9(){return{sessions:0,skillsUsed:{},tasksCompleted:0,totalSessionTime:0,filesChanged:0,linesAdded:0,linesRemoved:0,lastUpdated:new Date().toISOString(),startDate:new Date().toISOString()}}function Tw($){let I=G9($);if(q2(I))try{return JSON.parse(qw(I,"utf-8"))}catch{return N9()}return N9()}function Hw($,I){let U=G9($),_=Qw(U);if(!q2(_))Gw(_,{recursive:!0});I.lastUpdated=new Date().toISOString(),PH(U,JSON.stringify(I,null,2),"utf-8")}function Yw($){let I=ZH($,".serena","memories"),U={};if(!q2(I))return U;try{let _=Xw(I);for(let u of _){let g=u.match(/(?:progress|result)-(\w+)/);if(g?.[1]){let z=g[1];U[z]=(U[z]||0)+1}}}catch{}return U}async function AH($=!1,I=!1){let U=process.cwd(),_=G9(U);if(I){if(q2(_))PH(_,JSON.stringify(N9(),null,2),"utf-8");if($)console.log(JSON.stringify({reset:!0}));else console.log(W4.default.green("✅ Metrics reset successfully."));return}let u=Tw(U),g=X2(U),z=Yw(U),v=R7(U),J=j_(U),N=J.startedAt?new Date(J.startedAt):null,X=N&&!Number.isNaN(N.getTime())?Math.max(0,Math.floor((Date.now()-N.getTime())/1000)):0;for(let[Q,Y]of Object.entries(z))u.skillsUsed[Q]=(u.skillsUsed[Q]||0)+Y;if(v>u.tasksCompleted)u.tasksCompleted=v;if(J.id){if(["completed","failed","aborted"].includes(J.status||"")&&(u.lastSessionId!==J.id||u.lastSessionStatus!==J.status)&&X>0)u.totalSessionTime+=X;u.lastSessionId=J.id,u.lastSessionStatus=J.status,u.lastSessionStarted=J.startedAt,u.lastSessionDuration=X}u.filesChanged+=g.filesChanged,u.linesAdded+=g.linesAdded,u.linesRemoved+=g.linesRemoved,u.sessions+=1,Hw(U,u);let G=Math.max(1,Math.ceil((Date.now()-new Date(u.startDate).getTime())/86400000)),q=u.sessions>0?Math.round(u.totalSessionTime/u.sessions):0;if($){console.log(JSON.stringify({...u,gitStats:g,daysSinceStart:G,avgSessionTime:q},null,2));return}console.clear(),V$(W4.default.bgMagenta(W4.default.white(" \uD83D\uDCCA oh-my-agent stats ")));let T=[W4.default.bold(`\uD83D\uDCC8 Productivity Metrics (${G} days)`),"┌─────────────────────┬──────────────┐",`│ ${W4.default.bold("Metric")} │ ${W4.default.bold("Value")} │`,"├─────────────────────┼──────────────┤",`│ Sessions │ ${String(u.sessions).padEnd(12)} │`,`│ Tasks Completed │ ${String(u.tasksCompleted).padEnd(12)} │`,`│ Files Changed │ ${String(u.filesChanged).padEnd(12)} │`,`│ Lines Added │ ${W4.default.green(`+${u.linesAdded}`).padEnd(12)} │`,`│ Lines Removed │ ${W4.default.red(`-${u.linesRemoved}`).padEnd(12)} │`,"└─────────────────────┴──────────────┘"].join(`
412
+ `);k(T,"Overview");let H=Object.entries(u.skillsUsed).sort(([,Q],[,Y])=>Y-Q).slice(0,5);if(H.length>0){let Q=[W4.default.bold("\uD83C\uDFC6 Top Skills Used"),...H.map(([Y,K],R)=>` ${R+1}. ${Y} (${K})`)].join(`
413
+ `);k(Q,"Skills")}d(W4.default.dim(`Data stored in: ${_}`))}I4();cG();qI();var d$=q$(b$(),1);import{execSync as T1}from"node:child_process";import{cpSync as Q2,existsSync as H1,mkdirSync as T2,readFileSync as X9,rmSync as EH,writeFileSync as H2}from"node:fs";import{tmpdir as Mw}from"node:os";import{join as c$}from"node:path";s4();import{existsSync as bH,mkdirSync as Ow,readFileSync as Vw,writeFileSync as Dw}from"node:fs";import{dirname as Bw,join as jH}from"node:path";async function FH($){let I=jH($,L4,"_version.json");if(!bH(I))return null;try{let U=Vw(I,"utf-8");return JSON.parse(U).version||null}catch{return null}}async function SH($,I){let U=jH($,L4,"_version.json"),_=Bw(U);if(!bH(_))Ow(_,{recursive:!0});Dw(U,JSON.stringify({version:I},null,2),"utf-8")}async function wH(){let $=`https://raw.githubusercontent.com/${L$}/main/prompt-manifest.json`,I=await fetch($);if(!I.ok)throw Error("Failed to fetch remote manifest");return await I.json()}dG();s4();oG();function Kw($){if(!$)return{intro:(U)=>V$(U),outro:(U)=>d(U),note:(U,_)=>k(U,_),logError:(U)=>o.error(U),spinnerStart:(U)=>{let _=$4();return _.start(U),_}};let I={start(U){},stop(U){if(U)console.log(U)},message(U){console.log(U)}};return{intro:(U)=>console.log(U),outro:(U)=>console.log(U),note:(U,_)=>console.log(U),logError:(U)=>console.error(U),spinnerStart:(U)=>{return console.log(U),I}}}async function CH($=!1,I=!1){if(!I&&process.stdout.isTTY)console.clear();let U=Kw(I);U.intro(d$.default.bgMagenta(d$.default.white(" \uD83D\uDEF8 oh-my-agent update ")));let _=process.cwd(),u=z2(_);if(u.length>0)U.note(u.map((v)=>`${d$.default.green("✓")} ${v}`).join(`
414
+ `),"Migration");if(!I)await _2(_);let g=await FH(_);if(g===null){U.note("oh-my-agent is not installed in this project. Running install...","Not initialized");let{install:v}=await Promise.resolve().then(() => (eG(),cT));await v();return}let z;try{z=U.spinnerStart("Checking for updates...");let v=await wH();if(g===v.version){let X=i0(_);if(X.length>0)U.note(X.map((G)=>`${d$.default.green("✓")} ${G}`).join(`
415
+ `),"Shared layout migration");z.stop(d$.default.green("Already up to date!")),U.outro(`Current version: ${d$.default.cyan(g)}`);return}z.message(`Downloading ${d$.default.cyan(v.version)}...`);let{dir:J,cleanup:N}=await v2();try{z.message("Copying files...");let X=c$(_,".agents","config","user-preferences.yaml"),G=c$(_,".agents","mcp.json"),q=!$&&H1(X)?X9(X):null,T=!$&&H1(G)?X9(G):null,H=c$(Mw(),`oma-stack-backup-${Date.now()}`),Q=c$(_,".agents","skills","oma-backend","stack"),Y=!$&&H1(Q);if(Y)T2(H,{recursive:!0}),Q2(Q,c$(H,"oma-backend"),{recursive:!0});let K=["snippets.md","tech-stack.md","api-template.py"],R=c$(_,".agents","skills","oma-backend","resources"),P=!$&&!Y&&K.some((A)=>H1(c$(R,A)));if(Q2(c$(J,".agents"),c$(_,".agents"),{recursive:!0,force:!0}),q)H2(X,q);if(T)H2(G,T);if(Y)try{T2(Q,{recursive:!0}),Q2(c$(H,"oma-backend"),Q,{recursive:!0,force:!0})}finally{EH(H,{recursive:!0,force:!0})}if(P){let A=c$(J,".agents","skills","oma-backend","variants","python");if(H1(A))T2(Q,{recursive:!0}),Q2(A,Q,{recursive:!0,force:!0}),H2(c$(Q,"stack.yaml"),`language: python
414
416
  framework: fastapi
415
417
  orm: sqlalchemy
416
418
  source: migrated
417
- `)}let O=m$(_,".agents","skills","oma-backend","variants");if(Q1(O))wH(O,{recursive:!0,force:!0});let V=x0(_);if(V.length>0)U.note(V.map((A)=>`${h$.default.green("✓")} ${A}`).join(`
418
- `),"Shared layout migration");await FH(_,v.version),a_(J,_,["claude","codex","gemini","qwen"]);let L=process.env.HOME||process.env.USERPROFILE||"",B=!1;try{q1("claude --version",{stdio:"ignore"}),B=!0}catch{}let M=m$(L,".claude","settings.json");if(B)try{let A={};if(Q1(M))A=JSON.parse(N9(M,"utf-8"));if((A.env?.cleanupPeriodDays??0)<180||(A.env?.CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS??0)<1e5||(A.env?.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE??0)<80||!A.attribution?.commit||!A.attribution?.pr||A.env?.DISABLE_TELEMETRY!=="1"||A.env?.DISABLE_ERROR_REPORTING!=="1"||A.env?.CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY!=="1"){let b=I;if(!I){let u$=await O$({message:"Apply recommended Claude Code settings?",initialValue:!0});b=!e(u$)&&u$}if(b)q2(m$(L,".claude"),{recursive:!0}),A.env={...A.env||{},cleanupPeriodDays:180,CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS:1e5,CLAUDE_AUTOCOMPACT_PCT_OVERRIDE:80,DISABLE_TELEMETRY:"1",DISABLE_ERROR_REPORTING:"1",CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY:"1"},A.attribution={commit:`Generated with oh-my-agent
419
+ `)}let O=c$(_,".agents","skills","oma-backend","variants");if(H1(O))EH(O,{recursive:!0,force:!0});let D=i0(_);if(D.length>0)U.note(D.map((A)=>`${d$.default.green("✓")} ${A}`).join(`
420
+ `),"Shared layout migration");await SH(_,v.version),s_(J,_,["claude","codex","gemini","qwen"]);let L=process.env.HOME||process.env.USERPROFILE||"",B=!1;try{T1("claude --version",{stdio:"ignore"}),B=!0}catch{}let M=c$(L,".claude","settings.json");if(B)try{let A={};if(H1(M))A=JSON.parse(X9(M,"utf-8"));if((A.env?.cleanupPeriodDays??0)<180||(A.env?.CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS??0)<1e5||(A.env?.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE??0)<80||!A.attribution?.commit||!A.attribution?.pr||A.env?.DISABLE_TELEMETRY!=="1"||A.env?.DISABLE_ERROR_REPORTING!=="1"||A.env?.CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY!=="1"){let b=I;if(!I){let u$=await O$({message:"Apply recommended Claude Code settings?",initialValue:!0});b=!e(u$)&&u$}if(b)T2(c$(L,".claude"),{recursive:!0}),A.env={...A.env||{},cleanupPeriodDays:180,CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS:1e5,CLAUDE_AUTOCOMPACT_PCT_OVERRIDE:80,DISABLE_TELEMETRY:"1",DISABLE_ERROR_REPORTING:"1",CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY:"1"},A.attribution={commit:`Generated with oh-my-agent
419
421
 
420
- Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},Q2(M,`${JSON.stringify(A,null,2)}
421
- `)}}catch{}if(B){let A=!1;try{q1("codex --version",{stdio:"ignore"}),A=!0}catch{}if(A){let f=!1;try{f=q1("claude plugin list",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).includes("codex@openai-codex")}catch{}if(f)try{q1("claude plugin update codex@openai-codex",{stdio:"ignore"})}catch{}else try{q1("claude plugin marketplace add openai/codex-plugin-cc",{stdio:"ignore"}),q1("claude plugin install codex@openai-codex",{stdio:"ignore"})}catch{}}}let F=PT(_);if(z.stop(`Updated to version ${h$.default.cyan(v.version)}!`),F.length>0){let A=LT(_);if(A.length>0){let{created:f}=e_(_,F,A);if(f.length>0)U.note(f.map((b)=>`${h$.default.green("→")} ${b}`).join(`
422
- `),"Symlinks updated")}}if(U.outro(`${v.metadata?.totalFiles??0} files updated successfully`),!I&&z1()&&y4()&&!v1()){let A=await O$({message:`${h$.default.yellow("⭐")} Star ${h$.default.cyan(L$)} on GitHub? It helps a lot!`});if(!e(A)&&A)try{q1(`gh api -X PUT /user/starred/${L$}`,{stdio:"ignore"}),o.success(`Starred ${h$.default.cyan(L$)}! Thank you! \uD83C\uDF1F`)}catch{o.warn(`Could not star automatically. Try: ${h$.default.dim(`gh api --method PUT /user/starred/${L$}`)}`)}}}finally{N()}}catch(v){if(z?.stop("Update failed"),U.logError(v instanceof Error?v.message:String(v)),I)throw v;process.exit(1)}}s$();var Q$=q$(b$(),1);var CH=30;function kH($){let I=Math.round($/100*CH),U=CH-I,_;if($>60)_=Q$.default.green;else if($>30)_=Q$.default.yellow;else _=Q$.default.red;let u=_("█".repeat(I)),g=Q$.default.dim("░".repeat(U));return`${u}${g}`}function fH($){let I=$.remainingPercent.toFixed(0).padStart(4),U=kH($.remainingPercent),_=$.supportsImages?Q$.default.dim(" img"):"",u=$.label.padEnd(26),g=$.isExhausted?Q$.default.red(`resets ${$.timeUntilReset}`):$.timeUntilReset!=="Ready"?Q$.default.dim(`resets ${$.timeUntilReset}`):"";return` ${u} ${U} ${I}%${_} ${g}`}function xH($,I){let U=kH(I.remainingPercent),_=I.remainingPercent.toFixed(0).padStart(4),u=`${I.available.toLocaleString()} / ${I.monthly.toLocaleString()}`;return[` ${U} ${_}%`,` ${Q$.default.dim(u)}`].join(`
423
- `)}function Kw($){console.clear(),D$(Q$.default.bgCyan(Q$.default.black(" oh-my-agent usage ")));let I=[`${Q$.default.bold("User")} ${$.userName}${$.email?` (${Q$.default.dim($.email)})`:""}`,`${Q$.default.bold("Plan")} ${$.planName}${$.tierName?` ${Q$.default.dim(`(${$.tierName})`)}`:""}`];if($.defaultModel){let U=$.models.find((_)=>_.modelId===$.defaultModel)?.label;if(U)I.push(`${Q$.default.bold("Default")} ${U}`)}if(k(I.join(`
424
- `),"Account"),$.promptCredits||$.flowCredits){let U=[];if($.promptCredits)U.push(Q$.default.bold(" Prompt"),xH("Prompt",$.promptCredits));if($.flowCredits){if(U.length>0)U.push("");U.push(Q$.default.bold(" Flow"),xH("Flow",$.flowCredits))}k(U.join(`
425
- `),"Credits")}if($.models.length===0)k(Q$.default.dim(" No model quota data available"),"Models");else{let U=[...$.models].sort((z,v)=>z.label.localeCompare(v.label)),_=U.filter((z)=>z.isExhausted),u=U.filter((z)=>!z.isExhausted),g=[];if(u.length>0)for(let z of u)g.push(fH(z));if(_.length>0){if(g.length>0)g.push("");g.push(Q$.default.red(" ── Exhausted ──"));for(let z of _)g.push(fH(z))}k(g.join(`
426
- `),`Models (${$.models.length})`)}d(Q$.default.dim(`Updated ${$.timestamp.toLocaleTimeString()}`))}async function yH($=!1,I=!1){if(I){let _=await TT();if(!_)console.error("Failed to connect to Antigravity"),process.exit(1);console.log(JSON.stringify(_,null,2));return}if(!$){let _=e$();_.start("Connecting to Antigravity...");let u=await C0();if(_.stop(u?"Connected":Q$.default.red("Failed to connect to Antigravity")),!u)k([`${Q$.default.yellow("Antigravity IDE must be running locally.")}`,"",Q$.default.dim("Make sure the language_server process is active."),Q$.default.dim("Try opening a project in Antigravity first.")].join(`
427
- `),"Connection Failed"),process.exit(1);Kw(u);return}let U=await C0();if(!U)console.log(JSON.stringify({error:"Failed to connect"})),process.exit(1);console.log(JSON.stringify({userName:U.userName,email:U.email,planName:U.planName,tierName:U.tierName||null,promptCredits:U.promptCredits??null,flowCredits:U.flowCredits??null,defaultModel:U.defaultModel,models:[...U.models].sort((_,u)=>_.label.localeCompare(u.label)).map((_)=>({label:_.label,modelId:_.modelId,remainingPercent:_.remainingPercent,isExhausted:_.isExhausted,supportsImages:_.supportsImages,resetTime:_.resetTime?.toISOString()??null,timeUntilReset:_.timeUntilReset})),timestamp:U.timestamp.toISOString()},null,2))}s$();var y$=q$(b$(),1);import{execSync as Lw}from"node:child_process";import{existsSync as I6,readFileSync as G9}from"node:fs";import{join as F6}from"node:path";var iH=["backend","frontend","mobile","qa","debug","pm"];function r($,I,U){return{name:$,status:I,message:U}}function F$($,I){try{return Lw($,{encoding:"utf-8",cwd:I,stdio:["pipe","pipe","pipe"]}).trim()}catch{return null}}function Pw($,I){let U=F6($,".agents","plan.json");if(!I6(U))return r("Scope Check","skip","No plan.json found");let _;try{_=JSON.parse(G9(U,"utf-8"))}catch{return r("Scope Check","skip","Invalid plan.json")}let u=_.tasks?.filter((N)=>N.agent?.toLowerCase()===I);if(!u||u.length===0)return r("Scope Check","skip","No tasks for this agent");let g=u.flatMap((N)=>N.scope??[]);if(g.length===0)return r("Scope Check","skip","No scope defined in plan");let z=F$("git diff --name-only HEAD 2>/dev/null || git diff --name-only --cached 2>/dev/null",$);if(!z)return r("Scope Check","pass","No files changed");let v=z.split(`
428
- `).filter(Boolean),J=[];for(let N of v)if(!g.some((G)=>N.startsWith(G)))J.push(N);if(J.length>0)return r("Scope Check","fail",`${J.length} out-of-scope: ${J[0]}${J.length>1?` +${J.length-1}`:""}`);return r("Scope Check","pass",`All ${v.length} files in scope`)}function Ww($,I){let U=F6($,".serena","memories",`result-${I}.md`);if(!I6(U))return r("Charter Preflight","skip","Result file not found");let _=G9(U,"utf-8");if(!_.includes("CHARTER_CHECK:"))return r("Charter Preflight","warn","Block missing from result");if(/\{[^}]+\}/.test(_.split("CHARTER_CHECK:")[1]?.split("```")[0]||""))return r("Charter Preflight","warn","Contains unfilled placeholders");return r("Charter Preflight","pass","Properly filled")}function Zw($){let I=["*.py","*.ts","*.tsx","*.js","*.dart"],U=`(password|secret|api_key|token)\\s*=\\s*['"][^'"]{8,}`;for(let _ of I){let u=F$(`grep -rn --include="${_}" -E "(password|secret|api_key|token)\\s*=\\s*['"][^'"]{8,}" . 2>/dev/null | grep -v test | grep -v example | grep -v node_modules | head -1`,$);if(u)return r("Hardcoded Secrets","fail",`Found in: ${u.split(":")[0]}`)}return r("Hardcoded Secrets","pass","None detected")}function Aw($){let I=F$('grep -rn --include="*.py" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.dart" -E "TODO|FIXME|HACK|XXX" . 2>/dev/null | grep -v node_modules | grep -v ".agents/" | wc -l',$),U=Number.parseInt(I||"0",10);if(U>0)return r("TODO/FIXME Comments","warn",`${U} found`);return r("TODO/FIXME Comments","pass","None found")}function bw($){if(!F$("which uv",$))return r("Python Syntax","skip","uv not available");let U=F$('find . -name "*.py" -not -path "*/node_modules/*" -not -path "*/.venv/*" -exec uv run python -m py_compile {} \\; 2>&1 | head -5',$);if(U&&U.length>0)return r("Python Syntax","fail","Syntax errors found");return r("Python Syntax","pass","Valid")}function jw($){if(F$(`grep -rn --include="*.py" -E "f['"].*SELECT|f['"].*INSERT|f['"].*UPDATE|f['"].*DELETE" . 2>/dev/null | grep -v test | grep -v node_modules | head -1`,$))return r("SQL Injection","fail","f-string with SQL keywords detected");return r("SQL Injection","pass","None detected")}function nH($){let I=F$("which uv",$),U=I6(F6($,"pyproject.toml"));if(!I||!U)return r("Python Tests","skip",!I?"uv not available":"pyproject.toml not found");let _=F$("uv run pytest -q --tb=no 2>&1",$);if(_?.includes("passed")||_?.includes("no tests ran"))return r("Python Tests","pass","Tests pass");return r("Python Tests","fail","Tests failing")}function Fw($){if(!I6(F6($,"tsconfig.json")))return r("TypeScript","skip","Not configured");let I=F$("npx tsc --noEmit 2>&1",$);if(I===null||I==="")return r("TypeScript","pass","Compilation clean");if(I.includes("error"))return r("TypeScript","fail","Type errors found");return r("TypeScript","pass","Compilation clean")}function Sw($){let I=F$(`grep -rn --include="*.tsx" --include="*.jsx" 'style={{' . 2>/dev/null | grep -v node_modules | wc -l`,$),U=Number.parseInt(I||"0",10);if(U>0)return r("Inline Styles","warn",`${U} found (prefer Tailwind)`);return r("Inline Styles","pass","None found")}function ww($){let I=F$(`grep -rn --include="*.ts" --include="*.tsx" ': any' . 2>/dev/null | grep -v node_modules | grep -v ".d.ts" | wc -l`,$),U=Number.parseInt(I||"0",10);if(U>3)return r("Any Types","fail",`${U} found (limit: 3)`);if(U>0)return r("Any Types","warn",`${U} found`);return r("Any Types","pass","None found")}function rH($){if(!I6(F6($,"package.json")))return r("Frontend Tests","skip","No package.json");let I=F$("npx vitest run --reporter=verbose 2>&1",$);if(I?.includes("passed")||I?.includes("✓"))return r("Frontend Tests","pass","Tests pass");return r("Frontend Tests","warn","Tests failed or vitest not configured")}function Ew($){if(!F$("which flutter",$)){if(!F$("which dart",$))return r("Flutter/Dart Analysis","skip","Not available");if(F$("dart analyze 2>&1",$)?.includes("No issues found"))return r("Dart Analysis","pass","Clean");return r("Dart Analysis","fail","Issues found")}if(F$("flutter analyze 2>&1",$)?.includes("No issues found"))return r("Flutter Analysis","pass","Clean");return r("Flutter Analysis","fail","Issues found")}function Cw($){if(!F$("which flutter",$))return r("Flutter Tests","skip","Flutter not available");if(F$("flutter test 2>&1",$)?.includes("All tests passed"))return r("Flutter Tests","pass","All tests pass");return r("Flutter Tests","fail","Tests failed")}function fw($){let I=F6($,".agents","plan.json");if(!I6(I))return r("PM Plan","warn","plan.json not found");try{return JSON.parse(G9(I,"utf-8")),r("PM Plan","pass","Valid JSON")}catch{return r("PM Plan","fail","Invalid JSON")}}function xw($,I){let U=[];switch($){case"backend":U.push(bw(I)),U.push(jw(I)),U.push(nH(I));break;case"frontend":U.push(Fw(I)),U.push(Sw(I)),U.push(ww(I)),U.push(rH(I));break;case"mobile":U.push(Ew(I)),U.push(Cw(I));break;case"qa":U.push(r("QA Report","pass","Verified by self-check.md"));break;case"debug":if(I6(F6(I,"pyproject.toml")))U.push(nH(I));else if(I6(F6(I,"package.json")))U.push(rH(I));else U.push(r("Debug Tests","skip","No test runner detected"));break;case"pm":U.push(fw(I));break}return U}async function lH($,I,U=!1){let _=$.toLowerCase();if(!iH.includes(_)){let q=`Invalid agent type: ${$}. Valid types: ${iH.join(", ")}`;if(U)console.log(JSON.stringify({ok:!1,error:q}));else o.error(q);process.exit(2)}let u=I||process.cwd();if(!I6(u)){let q=`Workspace not found: ${u}`;if(U)console.log(JSON.stringify({ok:!1,error:q}));else o.error(q);process.exit(2)}let g=[];g.push(Pw(u,_)),g.push(Ww(u,_)),g.push(Zw(u)),g.push(Aw(u)),g.push(...xw(_,u));let z=g.filter((q)=>q.status==="pass").length,v=g.filter((q)=>q.status==="fail").length,J=g.filter((q)=>q.status==="warn").length,N={ok:v===0,agent:_,workspace:u,checks:g,summary:{passed:z,failed:v,warned:J}};if(U)console.log(JSON.stringify(N,null,2)),process.exit(v>0?1:0);console.clear(),D$(y$.default.bgCyan(y$.default.white(` \uD83D\uDD0D Verify: ${_} agent `))),k(y$.default.dim(u),"Workspace");let X=["┌────────────────────────────┬────────┬─────────────────────────────┐",`│ ${y$.default.bold("Check")} │ ${y$.default.bold("Status")} │ ${y$.default.bold("Details")} │`,"├────────────────────────────┼────────┼─────────────────────────────┤",...g.map((q)=>{let T;switch(q.status){case"pass":T=y$.default.green("PASS");break;case"fail":T=y$.default.red("FAIL");break;case"warn":T=y$.default.yellow("WARN");break;default:T=y$.default.dim("SKIP")}let H=q.name.padEnd(26),Q=T.padEnd(6),Y=(q.message||"-").slice(0,27).padEnd(27);return`│ ${H} │ ${Q} │ ${Y} │`}),"└────────────────────────────┴────────┴─────────────────────────────┘"].join(`
429
- `);console.log(X),console.log();let G=`${y$.default.green(`${z} passed`)}, ${y$.default.red(`${v} failed`)}, ${y$.default.yellow(`${J} warnings`)}`;if(v>0)d(y$.default.red(`❌ Verification failed: ${G}`)),process.exit(1);d(y$.default.green(`✅ Verification passed: ${G}`)),process.exit(0)}a4();var T$=q$(b$(),1);import{existsSync as kw,readdirSync as mH,readFileSync as yw}from"node:fs";import{join as L4}from"node:path";var hH=Object.fromEntries(Object.entries(H4).map(([$,I])=>[$,I.map((U)=>U.name)])),iw={"backend-engineer":"oma-backend","frontend-engineer":"oma-frontend","db-engineer":"oma-db","mobile-engineer":"oma-mobile","pm-planner":"oma-pm","qa-reviewer":"oma-qa","debug-investigator":"oma-debug"};function X9($){let I=new Set;for(let U of $.matchAll(/_shared\/((?:[a-z][a-z0-9_-]*\/)*[a-z][a-z0-9_-]*)(?:\.md)?(?=[`)\s/}]|$)/gi))if(U[1])I.add(U[1]);return[...I]}function T2($){try{return yw($,"utf-8")}catch{return""}}function q9($){try{return mH($).filter((I)=>!I.startsWith("."))}catch{return[]}}function nw($){try{return mH($,{withFileTypes:!0}).filter((I)=>!I.name.startsWith("."))}catch{return[]}}function cH($,I=""){let U=[];for(let _ of nw($)){let u=I?`${I}/${_.name}`:_.name;if(_.isDirectory()){U.push({path:u,isDirectory:!0}),U.push(...cH(L4($,_.name),u));continue}if(!_.name.endsWith(".md"))continue;U.push({path:u.replace(/\.md$/,""),isDirectory:!1})}return U}function dH($){let I=[{id:"root",label:"oh-my-agent",category:"root"}],U=new Set,_=[];function u(G,q,T){let H=`${G}|${q}`;if(U.has(H))return;U.add(H),_.push({from:G,to:q,type:T})}let g=L4($,".agents","skills");for(let[G,q]of Object.entries(hH))for(let T of q){let H=L4(g,T);if(!kw(H))continue;let Q=`skill:${T}`;I.push({id:Q,label:T,category:"skill",group:"Skills",subgroup:G});let Y=[T2(L4(H,"SKILL.md")),T2(L4(H,"resources","execution-protocol.md"))].join(`
430
- `);for(let R of X9(Y))u(Q,`shared:${R}`,"references")}let z=L4($,".agents","workflows");for(let G of q9(z).filter((q)=>q.endsWith(".md"))){let q=G.replace(".md",""),T=`workflow:${q}`;I.push({id:T,label:q,category:"workflow",group:"Workflows"});for(let H of X9(T2(L4(z,G))))u(T,`shared:${H}`,"references")}let v=L4(g,"_shared");for(let G of cH(v)){let q=`shared:${G.path}`;if(I.push({id:q,label:G.path,category:"shared",group:"Shared"}),!G.isDirectory){for(let T of X9(T2(L4(v,`${G.path}.md`))))if(T!==G.path)u(q,`shared:${T}`,"references")}}let J=L4($,".claude","agents");for(let G of q9(J).filter((q)=>q.endsWith(".md"))){let q=G.replace(".md",""),T=`agent:${q}`;I.push({id:T,label:q,category:"agent",group:"Claude Agents"});let H=iw[q];if(H)u(T,`skill:${H}`,"implements")}let N=L4($,".serena","memories");for(let G of q9(N).filter((q)=>q.endsWith(".md")))I.push({id:`memory:${G.replace(".md","")}`,label:G.replace(".md",""),category:"memory",group:"Serena Memories"});let X=new Set(I.map((G)=>G.id));return{nodes:I,edges:_.filter((G)=>X.has(G.from)&&X.has(G.to))}}var rw={root:($)=>T$.default.bold(T$.default.white($)),skill:T$.default.green,workflow:T$.default.blue,shared:T$.default.yellow,agent:T$.default.magenta,memory:T$.default.cyan};function v4($,I){return(rw[I]??T$.default.white)($)}function i4(...$){let I=$.sort((u,g)=>u[0]-g[0]),U="",_=0;for(let[u,g,z]of I){if(u>_)U+=" ".repeat(u-_);U+=g,_=u+z}return U}function lw($){let I=[],U=$.nodes.filter((b)=>b.category==="skill").length,_=$.nodes.filter((b)=>b.category==="workflow").length,u=$.nodes.filter((b)=>b.category==="shared").length,g=$.nodes.filter((b)=>b.category==="agent").length,z=$.nodes.filter((b)=>b.category==="memory").length,v=$.edges.filter((b)=>b.from.startsWith("skill:")&&b.to.startsWith("shared:")).length,J=$.edges.filter((b)=>b.from.startsWith("workflow:")&&b.to.startsWith("shared:")).length,N=$.edges.filter((b)=>b.type==="implements").length,X=$.edges.filter((b)=>b.from.startsWith("shared:")&&b.to.startsWith("shared:")).length,G=`Skills (${U})`,q=`Workflows (${_})`,T=`Shared (${u})`,H=`Agents (${g})`,Q=`Memories (${z})`,Y=10,R=29,K=48,W=19;I.push(i4([24,v4("oh-my-agent","root"),11])),I.push(i4([29,"│",1]));let O=Array(49).fill(" ");O[10]="┌",O[29]="┼",O[48]="┐";for(let b=11;b<48;b++)if(b!==29)O[b]="─";I.push(O.join("")),I.push(i4([10,"▼",1],[29,"▼",1],[48,"▼",1])),I.push(i4([10-(G.length>>1),v4(G,"skill"),G.length],[29-(q.length>>1),v4(q,"workflow"),q.length],[48-(Q.length>>1),v4(Q,"memory"),Q.length])),I.push(i4([10,"│",1],[29,"│",1]));let V=`${v} refs`,L=`${J} refs`;I.push(i4([10-(V.length>>1),T$.default.dim(V),V.length],[29-(L.length>>1),T$.default.dim(L),L.length])),I.push(i4([10,"│",1],[29,"│",1]));let B=Array(30).fill(" ");B[10]="└",B[19]="┬",B[29]="┘";for(let b=11;b<29;b++)if(b!==19)B[b]="─";I.push(B.join("")),I.push(i4([19,"▼",1]));let M=19-(T.length>>1),F=i4([M,v4(T,"shared"),T.length]);if(X>0)F+=` ${T$.default.dim(`◂── ${X} internal`)}`;I.push(F),I.push("");let A=10-(H.length>>1),f=`──[${N} implements]──▸`;return I.push(i4([A,v4(H,"agent"),H.length])+` ${T$.default.dim(f)} ${v4("Skills","skill")}`),I}function pH($){let I=[];I.push(...lw($)),I.push(""),I.push(T$.default.dim("─".repeat(56))),I.push("");let U=new Map,_=new Map;for(let G of $.edges){if(!U.has(G.from))U.set(G.from,[]);if(U.get(G.from)?.push(G),G.to.startsWith("shared:"))_.set(G.to,(_.get(G.to)??0)+1)}function u(G){let q=U.get(G);if(!q?.length)return"";let T=q.map((Q)=>$.nodes.find((Y)=>Y.id===Q.to)?.label.replace(/\.md$/,"")??Q.to.split(":")[1]),H=T.length>4?`${T.slice(0,3).join(", ")} +${T.length-3}`:T.join(", ");return` ${T$.default.dim("──▸")} ${T$.default.dim(H)}`}let g=$.nodes.filter((G)=>G.category==="skill"),z=Object.keys(hH);I.push(T$.default.bold(`Skills (${g.length})`));for(let G=0;G<z.length;G++){let q=z[G],T=g.filter((Y)=>Y.subgroup===q);if(!T.length)continue;let H=G===z.length-1;I.push(`${H?"└─":"├─"} ${T$.default.dim(q)}`);let Q=H?" ":"│ ";for(let Y of T){let R=Y===T.at(-1)?"└─":"├─";I.push(`${Q}${R} ${v4(Y.label,"skill")}${u(Y.id)}`)}}I.push("");let v=$.nodes.filter((G)=>G.category==="workflow");I.push(T$.default.bold(`Workflows (${v.length})`));for(let G of v){let q=G===v.at(-1)?"└─":"├─";I.push(`${q} ${v4(G.label,"workflow")}${u(G.id)}`)}I.push("");let J=[...$.nodes.filter((G)=>G.category==="shared")].sort((G,q)=>(_.get(q.id)??0)-(_.get(G.id)??0));I.push(T$.default.bold(`Shared (${J.length})`));for(let G of J){let q=G===J.at(-1)?"└─":"├─",T=_.get(G.id)??0,H=T>0?T$.default.dim(` (${T} refs)`):"";I.push(`${q} ${v4(G.label,"shared")}${H}${u(G.id)}`)}I.push("");let N=$.nodes.filter((G)=>G.category==="agent");I.push(T$.default.bold(`Claude Agents (${N.length})`));for(let G of N){let q=G===N.at(-1)?"└─":"├─",T=$.edges.find((Q)=>Q.from===G.id&&Q.type==="implements"),H=T?` ${T$.default.dim("──▸")} ${v4(T.to.split(":")[1]??"","skill")}`:"";I.push(`${q} ${v4(G.label,"agent")}${H}`)}I.push("");let X=$.nodes.filter((G)=>G.category==="memory");if(I.push(T$.default.bold(`Serena Memories (${X.length})`)),!X.length)I.push(`└─ ${T$.default.dim("(none)")}`);else for(let G of X){let q=G===X.at(-1)?"└─":"├─";I.push(`${q} ${v4(G.label,"memory")}`)}return I.join(`
431
- `)}async function oH($){let I=dH(process.cwd());if($.json){console.log(JSON.stringify(I,null,2));return}console.log(pH(I))}import{existsSync as _f,mkdirSync as gf,readdirSync as o0,readFileSync as zf,statSync as n9}from"node:fs";import{createServer as vf}from"node:http";import{basename as RO,join as Z4}from"node:path";import{EventEmitter as VE}from"node:events";import{stat as BE,Stats as Gm}from"node:fs";import{readdir as ME,stat as RE}from"node:fs/promises";import*as a from"node:path";import{lstat as tH,readdir as mw,realpath as hw,stat as cw}from"node:fs/promises";import{join as dw,relative as pw,resolve as aH,sep as ow}from"node:path";import{Readable as tw}from"node:stream";var J4={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},Q9={root:".",fileFilter:($)=>!0,directoryFilter:($)=>!0,type:J4.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(Q9);var IY="READDIRP_RECURSIVE_ERROR",aw=new Set(["ENOENT","EPERM","EACCES","ELOOP",IY]),eH=[J4.DIR_TYPE,J4.EVERYTHING_TYPE,J4.FILE_DIR_TYPE,J4.FILE_TYPE],ew=new Set([J4.DIR_TYPE,J4.EVERYTHING_TYPE,J4.FILE_DIR_TYPE]),sw=new Set([J4.EVERYTHING_TYPE,J4.FILE_DIR_TYPE,J4.FILE_TYPE]),$E=($)=>aw.has($.code),IE=process.platform==="win32",sH=($)=>!0,$Y=($)=>{if($===void 0)return sH;if(typeof $==="function")return $;if(typeof $==="string"){let I=$.trim();return(U)=>U.basename===I}if(Array.isArray($)){let I=$.map((U)=>U.trim());return(U)=>I.some((_)=>U.basename===_)}return sH};class T9 extends tw{parents;reading;parent;_stat;_maxDepth;_wantsDir;_wantsFile;_wantsEverything;_root;_isDirent;_statsProp;_rdOptions;_fileFilter;_directoryFilter;constructor($={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:$.highWaterMark});let I={...Q9,...$},{root:U,type:_}=I;this._fileFilter=$Y(I.fileFilter),this._directoryFilter=$Y(I.directoryFilter);let u=I.lstat?tH:cw;if(IE)this._stat=(g)=>u(g,{bigint:!0});else this._stat=u;this._maxDepth=I.depth!=null&&Number.isSafeInteger(I.depth)?I.depth:Q9.depth,this._wantsDir=_?ew.has(_):!1,this._wantsFile=_?sw.has(_):!1,this._wantsEverything=_===J4.EVERYTHING_TYPE,this._root=aH(U),this._isDirent=!I.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(U,1)],this.reading=!1,this.parent=void 0}async _read($){if(this.reading)return;this.reading=!0;try{while(!this.destroyed&&$>0){let I=this.parent,U=I&&I.files;if(U&&U.length>0){let{path:_,depth:u}=I,g=U.splice(0,$).map((v)=>this._formatEntry(v,_)),z=await Promise.all(g);for(let v of z){if(!v)continue;if(this.destroyed)return;let J=await this._getEntryType(v);if(J==="directory"&&this._directoryFilter(v)){if(u<=this._maxDepth)this.parents.push(this._exploreDir(v.fullPath,u+1));if(this._wantsDir)this.push(v),$--}else if((J==="file"||this._includeAsFile(v))&&this._fileFilter(v)){if(this._wantsFile)this.push(v),$--}}}else{let _=this.parents.pop();if(!_){this.push(null);break}if(this.parent=await _,this.destroyed)return}}}catch(I){this.destroy(I)}finally{this.reading=!1}}async _exploreDir($,I){let U;try{U=await mw($,this._rdOptions)}catch(_){this._onError(_)}return{files:U,depth:I,path:$}}async _formatEntry($,I){let U,_=this._isDirent?$.name:$;try{let u=aH(dw(I,_));U={path:pw(this._root,u),fullPath:u,basename:_},U[this._statsProp]=this._isDirent?$:await this._stat(u)}catch(u){this._onError(u);return}return U}_onError($){if($E($)&&!this.destroyed)this.emit("warn",$);else this.destroy($)}async _getEntryType($){if(!$&&this._statsProp in $)return"";let I=$[this._statsProp];if(I.isFile())return"file";if(I.isDirectory())return"directory";if(I&&I.isSymbolicLink()){let U=$.fullPath;try{let _=await hw(U),u=await tH(_);if(u.isFile())return"file";if(u.isDirectory()){let g=_.length;if(U.startsWith(_)&&U.substr(g,1)===ow){let z=Error(`Circular symlink detected: "${U}" points to "${_}"`);return z.code=IY,this._onError(z)}return"directory"}}catch(_){return this._onError(_),""}}}_includeAsFile($){let I=$&&$[this._statsProp];return I&&this._wantsEverything&&!I.isDirectory()}}function uY($,I={}){let U=I.entryType||I.type;if(U==="both")U=J4.FILE_DIR_TYPE;if(U)I.type=U;if(!$)throw Error("readdirp: root argument is required. Usage: readdirp(root, options)");else if(typeof $!=="string")throw TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");else if(U&&!eH.includes(U))throw Error(`readdirp: Invalid type passed. Use one of ${eH.join(", ")}`);return I.root=$,new T9(I)}import{watch as uE,unwatchFile as UY,watchFile as UE}from"node:fs";import{realpath as H9,lstat as _E,open as gE,stat as gY}from"node:fs/promises";import{type as zE}from"node:os";import*as V$ from"node:path";var vE="data",D9="end",zY="close",D2=()=>{};var V2=process.platform,V9=V2==="win32",JE=V2==="darwin",NE=V2==="linux",GE=V2==="freebsd",vY=zE()==="OS400",H$={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},P4=H$,XE="watch",qE={lstat:_E,stat:gY},T1="listeners",H2="errHandlers",TI="rawEmitters",QE=[T1,H2,TI],TE=new Set(["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),HE=($)=>TE.has(V$.extname($).slice(1).toLowerCase()),O9=($,I)=>{if($ instanceof Set)$.forEach(I);else I($)},y0=($,I,U)=>{let _=$[I];if(!(_ instanceof Set))$[I]=_=new Set([_]);_.add(U)},YE=($)=>(I)=>{let U=$[I];if(U instanceof Set)U.clear();else delete $[I]},i0=($,I,U)=>{let _=$[I];if(_ instanceof Set)_.delete(U);else if(_===U)delete $[I]},JY=($)=>$ instanceof Set?$.size===0:!$,Y2=new Map;function _Y($,I,U,_,u){let g=(z,v)=>{if(U($),u(z,v,{watchedPath:$}),v&&$!==v)O2(V$.resolve($,v),T1,V$.join($,v))};try{return uE($,{persistent:I.persistent},g)}catch(z){_(z);return}}var O2=($,I,U,_,u)=>{let g=Y2.get($);if(!g)return;O9(g[I],(z)=>{z(U,_,u)})},OE=($,I,U,_)=>{let{listener:u,errHandler:g,rawEmitter:z}=_,v=Y2.get(I),J;if(!U.persistent){if(J=_Y($,U,u,g,z),!J)return;return J.close.bind(J)}if(v)y0(v,T1,u),y0(v,H2,g),y0(v,TI,z);else{if(J=_Y($,U,O2.bind(null,I,T1),g,O2.bind(null,I,TI)),!J)return;J.on(P4.ERROR,async(N)=>{let X=O2.bind(null,I,H2);if(v)v.watcherUnusable=!0;if(V9&&N.code==="EPERM")try{await(await gE($,"r")).close(),X(N)}catch(G){}else X(N)}),v={listeners:u,errHandlers:g,rawEmitters:z,watcher:J},Y2.set(I,v)}return()=>{if(i0(v,T1,u),i0(v,H2,g),i0(v,TI,z),JY(v.listeners))v.watcher.close(),Y2.delete(I),QE.forEach(YE(v)),v.watcher=void 0,Object.freeze(v)}},Y9=new Map,DE=($,I,U,_)=>{let{listener:u,rawEmitter:g}=_,z=Y9.get(I),v=z&&z.options;if(v&&(v.persistent<U.persistent||v.interval>U.interval))UY(I),z=void 0;if(z)y0(z,T1,u),y0(z,TI,g);else z={listeners:u,rawEmitters:g,options:U,watcher:UE(I,U,(J,N)=>{O9(z.rawEmitters,(G)=>{G(P4.CHANGE,I,{curr:J,prev:N})});let X=J.mtimeMs;if(J.size!==N.size||X>N.mtimeMs||X===0)O9(z.listeners,(G)=>G($,J))})},Y9.set(I,z);return()=>{if(i0(z,T1,u),i0(z,TI,g),JY(z.listeners))Y9.delete(I),UY(I),z.options=z.watcher=void 0,Object.freeze(z)}};class B9{fsw;_boundHandleError;constructor($){this.fsw=$,this._boundHandleError=(I)=>$._handleError(I)}_watchWithNodeFs($,I){let U=this.fsw.options,_=V$.dirname($),u=V$.basename($);this.fsw._getWatchedDir(_).add(u);let z=V$.resolve($),v={persistent:U.persistent};if(!I)I=D2;let J;if(U.usePolling){let N=U.interval!==U.binaryInterval;v.interval=N&&HE(u)?U.binaryInterval:U.interval,J=DE($,z,v,{listener:I,rawEmitter:this.fsw._emitRaw})}else J=OE($,z,v,{listener:I,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return J}_handleFile($,I,U){if(this.fsw.closed)return;let _=V$.dirname($),u=V$.basename($),g=this.fsw._getWatchedDir(_),z=I;if(g.has(u))return;let v=async(N,X)=>{if(!this.fsw._throttle(XE,$,5))return;if(!X||X.mtimeMs===0)try{let G=await gY($);if(this.fsw.closed)return;let{atimeMs:q,mtimeMs:T}=G;if(!q||q<=T||T!==z.mtimeMs)this.fsw._emit(P4.CHANGE,$,G);if((JE||NE||GE)&&z.ino!==G.ino){this.fsw._closeFile(N),z=G;let H=this._watchWithNodeFs($,v);if(H)this.fsw._addPathCloser(N,H)}else z=G}catch(G){this.fsw._remove(_,u)}else if(g.has(u)){let{atimeMs:G,mtimeMs:q}=X;if(!G||G<=q||q!==z.mtimeMs)this.fsw._emit(P4.CHANGE,$,X);z=X}},J=this._watchWithNodeFs($,v);if(!(U&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored($)){if(!this.fsw._throttle(P4.ADD,$,0))return;this.fsw._emit(P4.ADD,$,I)}return J}async _handleSymlink($,I,U,_){if(this.fsw.closed)return;let u=$.fullPath,g=this.fsw._getWatchedDir(I);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let z;try{z=await H9(U)}catch(v){return this.fsw._emitReady(),!0}if(this.fsw.closed)return;if(g.has(_)){if(this.fsw._symlinkPaths.get(u)!==z)this.fsw._symlinkPaths.set(u,z),this.fsw._emit(P4.CHANGE,U,$.stats)}else g.add(_),this.fsw._symlinkPaths.set(u,z),this.fsw._emit(P4.ADD,U,$.stats);return this.fsw._emitReady(),!0}if(this.fsw._symlinkPaths.has(u))return!0;this.fsw._symlinkPaths.set(u,!0)}_handleRead($,I,U,_,u,g,z){$=V$.join($,"");let v=_?`${$}:${_}`:$;if(z=this.fsw._throttle("readdir",v,1000),!z)return;let J=this.fsw._getWatchedDir(U.path),N=new Set,X=this.fsw._readdirp($,{fileFilter:(G)=>U.filterPath(G),directoryFilter:(G)=>U.filterDir(G)});if(!X)return;return X.on(vE,async(G)=>{if(this.fsw.closed){X=void 0;return}let q=G.path,T=V$.join($,q);if(N.add(q),G.stats.isSymbolicLink()&&await this._handleSymlink(G,$,T,q))return;if(this.fsw.closed){X=void 0;return}if(q===_||!_&&!J.has(q))this.fsw._incrReadyCount(),T=V$.join(u,V$.relative(u,T)),this._addToNodeFs(T,I,U,g+1)}).on(P4.ERROR,this._boundHandleError),new Promise((G,q)=>{if(!X)return q();X.once(D9,()=>{if(this.fsw.closed){X=void 0;return}let T=z?z.clear():!1;if(G(void 0),J.getChildren().filter((H)=>{return H!==$&&!N.has(H)}).forEach((H)=>{this.fsw._remove($,H)}),X=void 0,T)this._handleRead($,!1,U,_,u,g,z)})})}async _handleDir($,I,U,_,u,g,z){let v=this.fsw._getWatchedDir(V$.dirname($)),J=v.has(V$.basename($));if(!(U&&this.fsw.options.ignoreInitial)&&!u&&!J)this.fsw._emit(P4.ADD_DIR,$,I);v.add(V$.basename($)),this.fsw._getWatchedDir($);let N,X,G=this.fsw.options.depth;if((G==null||_<=G)&&!this.fsw._symlinkPaths.has(z)){if(!u){if(await this._handleRead($,U,g,u,$,_,N),this.fsw.closed)return}X=this._watchWithNodeFs($,(q,T)=>{if(T&&T.mtimeMs===0)return;this._handleRead(q,!1,g,u,$,_,N)})}return X}async _addToNodeFs($,I,U,_,u){let g=this.fsw._emitReady;if(this.fsw._isIgnored($)||this.fsw.closed)return g(),!1;let z=this.fsw._getWatchHelpers($);if(U)z.filterPath=(v)=>U.filterPath(v),z.filterDir=(v)=>U.filterDir(v);try{let v=await qE[z.statMethod](z.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(z.watchPath,v))return g(),!1;let J=this.fsw.options.followSymlinks,N;if(v.isDirectory()){let X=V$.resolve($),G=J?await H9($):$;if(this.fsw.closed)return;if(N=await this._handleDir(z.watchPath,v,I,_,u,z,G),this.fsw.closed)return;if(X!==G&&G!==void 0)this.fsw._symlinkPaths.set(X,G)}else if(v.isSymbolicLink()){let X=J?await H9($):$;if(this.fsw.closed)return;let G=V$.dirname(z.watchPath);if(this.fsw._getWatchedDir(G).add(z.watchPath),this.fsw._emit(P4.ADD,z.watchPath,v),N=await this._handleDir(G,v,I,_,$,z,X),this.fsw.closed)return;if(X!==void 0)this.fsw._symlinkPaths.set(V$.resolve($),X)}else N=this._handleFile(z.watchPath,v,I);if(g(),N)this.fsw._addPathCloser($,N);return!1}catch(v){if(this.fsw._handleError(v))return g(),$}}}/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */var M9="/",KE="//",QY=".",LE="..",PE="string",WE=/\\/g,TY=/\/\//g,ZE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,AE=/^\.[/\\]/;function B2($){return Array.isArray($)?$:[$]}var R9=($)=>typeof $==="object"&&$!==null&&!($ instanceof RegExp);function bE($){if(typeof $==="function")return $;if(typeof $==="string")return(I)=>$===I;if($ instanceof RegExp)return(I)=>$.test(I);if(typeof $==="object"&&$!==null)return(I)=>{if($.path===I)return!0;if($.recursive){let U=a.relative($.path,I);if(!U)return!1;return!U.startsWith("..")&&!a.isAbsolute(U)}return!1};return()=>!1}function jE($){if(typeof $!=="string")throw Error("string expected");$=a.normalize($),$=$.replace(/\\/g,"/");let I=!1;if($.startsWith("//"))I=!0;if($=$.replace(TY,"/"),I)$="/"+$;return $}function NY($,I,U){let _=jE(I);for(let u=0;u<$.length;u++){let g=$[u];if(g(_,U))return!0}return!1}function FE($,I){if($==null)throw TypeError("anymatch: specify first argument");let _=B2($).map((u)=>bE(u));if(I==null)return(u,g)=>{return NY(_,u,g)};return NY(_,I)}var GY=($)=>{let I=B2($).flat();if(!I.every((U)=>typeof U===PE))throw TypeError(`Non-string provided as watch path: ${I}`);return I.map(HY)},XY=($)=>{let I=$.replace(WE,M9),U=!1;if(I.startsWith(KE))U=!0;if(I=I.replace(TY,M9),U)I=M9+I;return I},HY=($)=>XY(a.normalize(XY($))),qY=($="")=>(I)=>{if(typeof I==="string")return HY(a.isAbsolute(I)?I:a.join($,I));else return I},SE=($,I)=>{if(a.isAbsolute($))return $;return a.join(I,$)},wE=Object.freeze(new Set);class YY{path;_removeWatcher;items;constructor($,I){this.path=$,this._removeWatcher=I,this.items=new Set}add($){let{items:I}=this;if(!I)return;if($!==QY&&$!==LE)I.add($)}async remove($){let{items:I}=this;if(!I)return;if(I.delete($),I.size>0)return;let U=this.path;try{await ME(U)}catch(_){if(this._removeWatcher)this._removeWatcher(a.dirname(U),a.basename(U))}}has($){let{items:I}=this;if(!I)return;return I.has($)}getChildren(){let{items:$}=this;if(!$)return[];return[...$.values()]}dispose(){this.items.clear(),this.path="",this._removeWatcher=D2,this.items=wE,Object.freeze(this)}}var EE="stat",CE="lstat";class OY{fsw;path;watchPath;fullWatchPath;dirParts;followSymlinks;statMethod;constructor($,I,U){this.fsw=U;let _=$;this.path=$=$.replace(AE,""),this.watchPath=_,this.fullWatchPath=a.resolve(_),this.dirParts=[],this.dirParts.forEach((u)=>{if(u.length>1)u.pop()}),this.followSymlinks=I,this.statMethod=I?EE:CE}entryPath($){return a.join(this.watchPath,a.relative(this.watchPath,$.fullPath))}filterPath($){let{stats:I}=$;if(I&&I.isSymbolicLink())return this.filterDir($);let U=this.entryPath($);return this.fsw._isntIgnored(U,I)&&this.fsw._hasReadPermissions(I)}filterDir($){return this.fsw._isntIgnored(this.entryPath($),$.stats)}}class DY extends VE{closed;options;_closers;_ignoredPaths;_throttled;_streams;_symlinkPaths;_watched;_pendingWrites;_pendingUnlinks;_readyCount;_emitReady;_closePromise;_userIgnored;_readyEmitted;_emitRaw;_boundRemove;_nodeFsHandler;constructor($={}){super();this.closed=!1,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._streams=new Set,this._symlinkPaths=new Map,this._watched=new Map,this._pendingWrites=new Map,this._pendingUnlinks=new Map,this._readyCount=0,this._readyEmitted=!1;let I=$.awaitWriteFinish,U={stabilityThreshold:2000,pollInterval:100},_={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...$,ignored:$.ignored?B2($.ignored):B2([]),awaitWriteFinish:I===!0?U:typeof I==="object"?{...U,...I}:!1};if(vY)_.usePolling=!0;if(_.atomic===void 0)_.atomic=!_.usePolling;let u=process.env.CHOKIDAR_USEPOLLING;if(u!==void 0){let v=u.toLowerCase();if(v==="false"||v==="0")_.usePolling=!1;else if(v==="true"||v==="1")_.usePolling=!0;else _.usePolling=!!v}let g=process.env.CHOKIDAR_INTERVAL;if(g)_.interval=Number.parseInt(g,10);let z=0;this._emitReady=()=>{if(z++,z>=this._readyCount)this._emitReady=D2,this._readyEmitted=!0,process.nextTick(()=>this.emit(H$.READY))},this._emitRaw=(...v)=>this.emit(H$.RAW,...v),this._boundRemove=this._remove.bind(this),this.options=_,this._nodeFsHandler=new B9(this),Object.freeze(_)}_addIgnoredPath($){if(R9($)){for(let I of this._ignoredPaths)if(R9(I)&&I.path===$.path&&I.recursive===$.recursive)return}this._ignoredPaths.add($)}_removeIgnoredPath($){if(this._ignoredPaths.delete($),typeof $==="string"){for(let I of this._ignoredPaths)if(R9(I)&&I.path===$)this._ignoredPaths.delete(I)}}add($,I,U){let{cwd:_}=this.options;this.closed=!1,this._closePromise=void 0;let u=GY($);if(_)u=u.map((g)=>{return SE(g,_)});if(u.forEach((g)=>{this._removeIgnoredPath(g)}),this._userIgnored=void 0,!this._readyCount)this._readyCount=0;return this._readyCount+=u.length,Promise.all(u.map(async(g)=>{let z=await this._nodeFsHandler._addToNodeFs(g,!U,void 0,0,I);if(z)this._emitReady();return z})).then((g)=>{if(this.closed)return;g.forEach((z)=>{if(z)this.add(a.dirname(z),a.basename(I||z))})}),this}unwatch($){if(this.closed)return this;let I=GY($),{cwd:U}=this.options;return I.forEach((_)=>{if(!a.isAbsolute(_)&&!this._closers.has(_)){if(U)_=a.join(U,_);_=a.resolve(_)}if(this._closePath(_),this._addIgnoredPath(_),this._watched.has(_))this._addIgnoredPath({path:_,recursive:!0});this._userIgnored=void 0}),this}close(){if(this._closePromise)return this._closePromise;this.closed=!0,this.removeAllListeners();let $=[];return this._closers.forEach((I)=>I.forEach((U)=>{let _=U();if(_ instanceof Promise)$.push(_)})),this._streams.forEach((I)=>I.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach((I)=>I.dispose()),this._closers.clear(),this._watched.clear(),this._streams.clear(),this._symlinkPaths.clear(),this._throttled.clear(),this._closePromise=$.length?Promise.all($).then(()=>{return}):Promise.resolve(),this._closePromise}getWatched(){let $={};return this._watched.forEach((I,U)=>{let u=(this.options.cwd?a.relative(this.options.cwd,U):U)||QY;$[u]=I.getChildren().sort()}),$}emitWithAll($,I){if(this.emit($,...I),$!==H$.ERROR)this.emit(H$.ALL,$,...I)}async _emit($,I,U){if(this.closed)return;let _=this.options;if(V9)I=a.normalize(I);if(_.cwd)I=a.relative(_.cwd,I);let u=[I];if(U!=null)u.push(U);let g=_.awaitWriteFinish,z;if(g&&(z=this._pendingWrites.get(I)))return z.lastChange=new Date,this;if(_.atomic){if($===H$.UNLINK)return this._pendingUnlinks.set(I,[$,...u]),setTimeout(()=>{this._pendingUnlinks.forEach((v,J)=>{this.emit(...v),this.emit(H$.ALL,...v),this._pendingUnlinks.delete(J)})},typeof _.atomic==="number"?_.atomic:100),this;if($===H$.ADD&&this._pendingUnlinks.has(I))$=H$.CHANGE,this._pendingUnlinks.delete(I)}if(g&&($===H$.ADD||$===H$.CHANGE)&&this._readyEmitted){let v=(J,N)=>{if(J)$=H$.ERROR,u[0]=J,this.emitWithAll($,u);else if(N){if(u.length>1)u[1]=N;else u.push(N);this.emitWithAll($,u)}};return this._awaitWriteFinish(I,g.stabilityThreshold,$,v),this}if($===H$.CHANGE){if(!this._throttle(H$.CHANGE,I,50))return this}if(_.alwaysStat&&U===void 0&&($===H$.ADD||$===H$.ADD_DIR||$===H$.CHANGE)){let v=_.cwd?a.join(_.cwd,I):I,J;try{J=await RE(v)}catch(N){}if(!J||this.closed)return;u.push(J)}return this.emitWithAll($,u),this}_handleError($){let I=$&&$.code;if($&&I!=="ENOENT"&&I!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||I!=="EPERM"&&I!=="EACCES"))this.emit(H$.ERROR,$);return $||this.closed}_throttle($,I,U){if(!this._throttled.has($))this._throttled.set($,new Map);let _=this._throttled.get($);if(!_)throw Error("invalid throttle");let u=_.get(I);if(u)return u.count++,!1;let g,z=()=>{let J=_.get(I),N=J?J.count:0;if(_.delete(I),clearTimeout(g),J)clearTimeout(J.timeoutObject);return N};g=setTimeout(z,U);let v={timeoutObject:g,clear:z,count:0};return _.set(I,v),v}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish($,I,U,_){let u=this.options.awaitWriteFinish;if(typeof u!=="object")return;let g=u.pollInterval,z,v=$;if(this.options.cwd&&!a.isAbsolute($))v=a.join(this.options.cwd,$);let J=new Date,N=this._pendingWrites;function X(G){BE(v,(q,T)=>{if(q||!N.has($)){if(q&&q.code!=="ENOENT")_(q);return}let H=Number(new Date);if(G&&T.size!==G.size)N.get($).lastChange=H;let Q=N.get($);if(H-Q.lastChange>=I)N.delete($),_(void 0,T);else z=setTimeout(X,g,T)})}if(!N.has($))N.set($,{lastChange:J,cancelWait:()=>{return N.delete($),clearTimeout(z),U}}),z=setTimeout(X,g)}_isIgnored($,I){if(this.options.atomic&&ZE.test($))return!0;if(!this._userIgnored){let{cwd:U}=this.options,u=(this.options.ignored||[]).map(qY(U)),z=[...[...this._ignoredPaths].map(qY(U)),...u];this._userIgnored=FE(z,void 0)}return this._userIgnored($,I)}_isntIgnored($,I){return!this._isIgnored($,I)}_getWatchHelpers($){return new OY($,this.options.followSymlinks,this)}_getWatchedDir($){let I=a.resolve($);if(!this._watched.has(I))this._watched.set(I,new YY(I,this._boundRemove));return this._watched.get(I)}_hasReadPermissions($){if(this.options.ignorePermissionErrors)return!0;return Boolean(Number($.mode)&256)}_remove($,I,U){let _=a.join($,I),u=a.resolve(_);if(U=U!=null?U:this._watched.has(_)||this._watched.has(u),!this._throttle("remove",_,100))return;if(!U&&this._watched.size===1)this.add($,I,!0);this._getWatchedDir(_).getChildren().forEach((G)=>this._remove(_,G));let v=this._getWatchedDir($),J=v.has(I);if(v.remove(I),this._symlinkPaths.has(u))this._symlinkPaths.delete(u);let N=_;if(this.options.cwd)N=a.relative(this.options.cwd,_);if(this.options.awaitWriteFinish&&this._pendingWrites.has(N)){if(this._pendingWrites.get(N).cancelWait()===H$.ADD)return}this._watched.delete(_),this._watched.delete(u);let X=U?H$.UNLINK_DIR:H$.UNLINK;if(J&&!this._isIgnored(_))this._emit(X,_);this._closePath(_)}_closePath($){this._closeFile($);let I=a.dirname($);this._getWatchedDir(I).remove(a.basename($))}_closeFile($){let I=this._closers.get($);if(!I)return;I.forEach((U)=>U()),this._closers.delete($)}_addPathCloser($,I){if(!I)return;let U=this._closers.get($);if(!U)U=[],this._closers.set($,U);U.push(I)}_readdirp($,I){if(this.closed)return;let U={type:H$.ALL,alwaysStat:!0,lstat:!0,...I,depth:0},_=uY($,U);return this._streams.add(_),_.once(zY,()=>{_=void 0}),_.once(D9,()=>{if(_)this._streams.delete(_),_=void 0}),_}}function M2($,I={}){let U=new DY(I);return U.add($),U}var RI=q$(b$(),1);var If=q$(QO(),1),uf=q$(A9(),1),Uf=q$(j9(),1),x9=q$(S2(),1),k9=q$(BO(),1);var MO=process.env.DASHBOARD_PORT?parseInt(process.env.DASHBOARD_PORT||"9847",10):9847;function Jf(){if(process.env.MEMORIES_DIR)return process.env.MEMORIES_DIR;let $=process.argv[3];if($)return Z4($,".serena","memories");return Z4(process.cwd(),".serena","memories")}function t0($){try{return zf($,"utf-8")}catch{return""}}function Nf($){try{let I=o0($);if(I.includes("orchestrator-session.md"))return Z4($,"orchestrator-session.md");let U=I.filter((_)=>/^session-.*\.md$/.test(_)).map((_)=>({name:_,mtime:n9(Z4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime);if(U.length>0&&U[0])return Z4($,U[0].name)}catch{}return null}function Gf($){let I=Nf($);if(!I)return{id:"N/A",status:"UNKNOWN"};let U=t0(I);if(!U)return{id:"N/A",status:"UNKNOWN"};let _=(U.match(/session-id:\s*(.+)/i)||[])[1]||(U.match(/# Session:\s*(.+)/i)||[])[1]||U.match(/(session-\d{8}-\d{6})/)?.[1]||RO(I,".md")||"N/A",u="UNKNOWN";if(/IN PROGRESS|RUNNING|## Active|\[IN PROGRESS\]/i.test(U))u="RUNNING";else if(/COMPLETED|DONE|## Completed|\[COMPLETED\]/i.test(U))u="COMPLETED";else if(/FAILED|ERROR|## Failed|\[FAILED\]/i.test(U))u="FAILED";else if(/Step \d+:.*\[/i.test(U))u="RUNNING";return{id:_.trim(),status:u}}function Xf($){let I=t0(Z4($,"task-board.md"));if(!I)return[];let U=[],_=I.split(`
432
- `);for(let u of _){if(!u.startsWith("|")||/^\|\s*-+/.test(u))continue;let g=u.split("|").map((v)=>v.trim()).filter(Boolean),z=g[0];if(g.length<2||!z||/^agent$/i.test(z))continue;U.push({agent:g[0]||"",status:g[1]||"pending",task:g[2]||""})}return U}function i9($,I){try{let U=o0($).filter((g)=>g.startsWith(`progress-${I}`)&&g.endsWith(".md")).sort().reverse();if(U.length===0)return null;let u=(U[0]?t0(Z4($,U[0])):"").match(/turn[:\s]*(\d+)/i);return u?.[1]?parseInt(u[1],10):null}catch{return null}}function qf($){try{return o0($).filter((U)=>U.endsWith(".md")&&U!==".gitkeep").map((U)=>({name:U,mtime:n9(Z4($,U)).mtimeMs})).sort((U,_)=>_.mtime-U.mtime).slice(0,5).map((U)=>{let _=U.name.replace(/^(progress|result|session|debug|task)-?/,"").replace(/[-_]agent/,"").replace(/[-_]completion/,"").replace(/\.md$/,"").replace(/[-_]/g," ").trim()||U.name.replace(/\.md$/,""),g=t0(Z4($,U.name)).split(`
433
- `).map((v)=>v.trim()).filter((v)=>v&&!v.startsWith("---")&&v.length>3),z="";for(let v=g.length-1;v>=0;v--){let J=g[v];if(!J)continue;if(/^\*\*|^#+|^-|^\d+\.|Status|Result|Action|Step/i.test(J)){if(z=J.replace(/^[#*\-\d.]+\s*/,"").replace(/\*\*/g,"").trim(),z.length>5)break}}if(z.length>80)z=`${z.substring(0,77)}...`;return{agent:_,message:z,file:U.name}}).filter((U)=>U.message)}catch{return[]}}function Qf($){let I=[],U=new Set;try{let _=o0($).filter((u)=>u.endsWith(".md")&&u!==".gitkeep").map((u)=>({name:u,mtime:n9(Z4($,u)).mtimeMs})).sort((u,g)=>g.mtime-u.mtime);for(let u of _){let g=t0(Z4($,u.name)),z=g.match(/\*\*Agent\*\*:\s*(.+)/i)||g.match(/Agent:\s*(.+)/i)||g.match(/^#+\s*(.+?)\s*Agent/im),v=null;if(z?.[1])v=z[1].trim();else if(/_agent|agent_|-agent/i.test(u.name))v=u.name.replace(/\.md$/,"").replace(/[-_]completion|[-_]progress|[-_]result/gi,"").replace(/[-_]/g," ").trim();if(v&&!U.has(v.toLowerCase())){U.add(v.toLowerCase());let J="unknown";if(/\[COMPLETED\]|## Completed|## Results/i.test(g))J="completed";else if(/\[IN PROGRESS\]|## Progress|IN PROGRESS/i.test(g))J="running";else if(/\[FAILED\]|## Failed|ERROR/i.test(g))J="failed";let N=g.match(/## Task\s*\n+(.+)/i)||g.match(/\*\*Task\*\*:\s*(.+)/i),X=N?.[1]?N[1].trim().substring(0,60):"";I.push({agent:v,status:J,task:X,turn:i9($,v)})}}}catch{}return I}function y9($){let I=Gf($),_=Xf($).map((u)=>({...u,turn:i9($,u.agent)}));if(_.length===0)_=Qf($);if(_.length===0)try{let u=o0($).filter((g)=>g.startsWith("progress-")&&g.endsWith(".md"));for(let g of u){let z=g.replace(/^progress-/,"").replace(/\.md$/,"");_.push({agent:z,status:"running",task:"",turn:i9($,z)})}}catch{}return{session:I,agents:_,activity:qf($),memoriesDir:$,updatedAt:new Date().toISOString()}}var Tf=`<!DOCTYPE html>
422
+ Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-my-agent](https://github.com/first-fluke/oh-my-agent)"},H2(M,`${JSON.stringify(A,null,2)}
423
+ `)}}catch{}if(B){let A=!1;try{T1("codex --version",{stdio:"ignore"}),A=!0}catch{}if(A){let f=!1;try{f=T1("claude plugin list",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).includes("codex@openai-codex")}catch{}if(f)try{T1("claude plugin update codex@openai-codex",{stdio:"ignore"})}catch{}else try{T1("claude plugin marketplace add openai/codex-plugin-cc",{stdio:"ignore"}),T1("claude plugin install codex@openai-codex",{stdio:"ignore"})}catch{}}}let F=ZT(_);if(z.stop(`Updated to version ${d$.default.cyan(v.version)}!`),F.length>0){let A=PT(_);if(A.length>0){let{created:f}=$2(_,F,A);if(f.length>0)U.note(f.map((b)=>`${d$.default.green("→")} ${b}`).join(`
424
+ `),"Symlinks updated")}}if(U.outro(`${v.metadata?.totalFiles??0} files updated successfully`),!I&&J1()&&r4()&&!N1()){let A=await O$({message:`${d$.default.yellow("⭐")} Star ${d$.default.cyan(L$)} on GitHub? It helps a lot!`});if(!e(A)&&A)try{T1(`gh api -X PUT /user/starred/${L$}`,{stdio:"ignore"}),o.success(`Starred ${d$.default.cyan(L$)}! Thank you! \uD83C\uDF1F`)}catch{o.warn(`Could not star automatically. Try: ${d$.default.dim(`gh api --method PUT /user/starred/${L$}`)}`)}}}finally{N()}}catch(v){if(z?.stop("Update failed"),U.logError(v instanceof Error?v.message:String(v)),I)throw v;process.exit(1)}}I4();var Q$=q$(b$(),1);var fH=30;function yH($){let I=Math.round($/100*fH),U=fH-I,_;if($>60)_=Q$.default.green;else if($>30)_=Q$.default.yellow;else _=Q$.default.red;let u=_("█".repeat(I)),g=Q$.default.dim("░".repeat(U));return`${u}${g}`}function xH($){let I=$.remainingPercent.toFixed(0).padStart(4),U=yH($.remainingPercent),_=$.supportsImages?Q$.default.dim(" img"):"",u=$.label.padEnd(26),g=$.isExhausted?Q$.default.red(`resets ${$.timeUntilReset}`):$.timeUntilReset!=="Ready"?Q$.default.dim(`resets ${$.timeUntilReset}`):"";return` ${u} ${U} ${I}%${_} ${g}`}function kH($,I){let U=yH(I.remainingPercent),_=I.remainingPercent.toFixed(0).padStart(4),u=`${I.available.toLocaleString()} / ${I.monthly.toLocaleString()}`;return[` ${U} ${_}%`,` ${Q$.default.dim(u)}`].join(`
425
+ `)}function Rw($){console.clear(),V$(Q$.default.bgCyan(Q$.default.black(" oh-my-agent usage ")));let I=[`${Q$.default.bold("User")} ${$.userName}${$.email?` (${Q$.default.dim($.email)})`:""}`,`${Q$.default.bold("Plan")} ${$.planName}${$.tierName?` ${Q$.default.dim(`(${$.tierName})`)}`:""}`];if($.defaultModel){let U=$.models.find((_)=>_.modelId===$.defaultModel)?.label;if(U)I.push(`${Q$.default.bold("Default")} ${U}`)}if(k(I.join(`
426
+ `),"Account"),$.promptCredits||$.flowCredits){let U=[];if($.promptCredits)U.push(Q$.default.bold(" Prompt"),kH("Prompt",$.promptCredits));if($.flowCredits){if(U.length>0)U.push("");U.push(Q$.default.bold(" Flow"),kH("Flow",$.flowCredits))}k(U.join(`
427
+ `),"Credits")}if($.models.length===0)k(Q$.default.dim(" No model quota data available"),"Models");else{let U=[...$.models].sort((z,v)=>z.label.localeCompare(v.label)),_=U.filter((z)=>z.isExhausted),u=U.filter((z)=>!z.isExhausted),g=[];if(u.length>0)for(let z of u)g.push(xH(z));if(_.length>0){if(g.length>0)g.push("");g.push(Q$.default.red(" ── Exhausted ──"));for(let z of _)g.push(xH(z))}k(g.join(`
428
+ `),`Models (${$.models.length})`)}d(Q$.default.dim(`Updated ${$.timestamp.toLocaleTimeString()}`))}async function iH($=!1,I=!1){if(I){let _=await YT();if(!_)console.error("Failed to connect to Antigravity"),process.exit(1);console.log(JSON.stringify(_,null,2));return}if(!$){let _=$4();_.start("Connecting to Antigravity...");let u=await k0();if(_.stop(u?"Connected":Q$.default.red("Failed to connect to Antigravity")),!u)k([`${Q$.default.yellow("Antigravity IDE must be running locally.")}`,"",Q$.default.dim("Make sure the language_server process is active."),Q$.default.dim("Try opening a project in Antigravity first.")].join(`
429
+ `),"Connection Failed"),process.exit(1);Rw(u);return}let U=await k0();if(!U)console.log(JSON.stringify({error:"Failed to connect"})),process.exit(1);console.log(JSON.stringify({userName:U.userName,email:U.email,planName:U.planName,tierName:U.tierName||null,promptCredits:U.promptCredits??null,flowCredits:U.flowCredits??null,defaultModel:U.defaultModel,models:[...U.models].sort((_,u)=>_.label.localeCompare(u.label)).map((_)=>({label:_.label,modelId:_.modelId,remainingPercent:_.remainingPercent,isExhausted:_.isExhausted,supportsImages:_.supportsImages,resetTime:_.resetTime?.toISOString()??null,timeUntilReset:_.timeUntilReset})),timestamp:U.timestamp.toISOString()},null,2))}I4();var i$=q$(b$(),1);import{execSync as Lw}from"node:child_process";import{existsSync as U6,readFileSync as q9}from"node:fs";import{join as w6}from"node:path";var rH=["backend","frontend","mobile","qa","debug","pm"];function n($,I,U){return{name:$,status:I,message:U}}function F$($,I){try{return Lw($,{encoding:"utf-8",cwd:I,stdio:["pipe","pipe","pipe"]}).trim()}catch{return null}}function Ww($,I){let U=w6($,".agents","plan.json");if(!U6(U))return n("Scope Check","skip","No plan.json found");let _;try{_=JSON.parse(q9(U,"utf-8"))}catch{return n("Scope Check","skip","Invalid plan.json")}let u=_.tasks?.filter((N)=>N.agent?.toLowerCase()===I);if(!u||u.length===0)return n("Scope Check","skip","No tasks for this agent");let g=u.flatMap((N)=>N.scope??[]);if(g.length===0)return n("Scope Check","skip","No scope defined in plan");let z=F$("git diff --name-only HEAD 2>/dev/null || git diff --name-only --cached 2>/dev/null",$);if(!z)return n("Scope Check","pass","No files changed");let v=z.split(`
430
+ `).filter(Boolean),J=[];for(let N of v)if(!g.some((G)=>N.startsWith(G)))J.push(N);if(J.length>0)return n("Scope Check","fail",`${J.length} out-of-scope: ${J[0]}${J.length>1?` +${J.length-1}`:""}`);return n("Scope Check","pass",`All ${v.length} files in scope`)}function Pw($,I){let U=w6($,".serena","memories",`result-${I}.md`);if(!U6(U))return n("Charter Preflight","skip","Result file not found");let _=q9(U,"utf-8");if(!_.includes("CHARTER_CHECK:"))return n("Charter Preflight","warn","Block missing from result");if(/\{[^}]+\}/.test(_.split("CHARTER_CHECK:")[1]?.split("```")[0]||""))return n("Charter Preflight","warn","Contains unfilled placeholders");return n("Charter Preflight","pass","Properly filled")}function Zw($){let I=["*.py","*.ts","*.tsx","*.js","*.dart"],U=`(password|secret|api_key|token)\\s*=\\s*['"][^'"]{8,}`;for(let _ of I){let u=F$(`grep -rn --include="${_}" -E "(password|secret|api_key|token)\\s*=\\s*['"][^'"]{8,}" . 2>/dev/null | grep -v test | grep -v example | grep -v node_modules | head -1`,$);if(u)return n("Hardcoded Secrets","fail",`Found in: ${u.split(":")[0]}`)}return n("Hardcoded Secrets","pass","None detected")}function Aw($){let I=F$('grep -rn --include="*.py" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.dart" -E "TODO|FIXME|HACK|XXX" . 2>/dev/null | grep -v node_modules | grep -v ".agents/" | wc -l',$),U=Number.parseInt(I||"0",10);if(U>0)return n("TODO/FIXME Comments","warn",`${U} found`);return n("TODO/FIXME Comments","pass","None found")}function bw($){if(!F$("which uv",$))return n("Python Syntax","skip","uv not available");let U=F$('find . -name "*.py" -not -path "*/node_modules/*" -not -path "*/.venv/*" -exec uv run python -m py_compile {} \\; 2>&1 | head -5',$);if(U&&U.length>0)return n("Python Syntax","fail","Syntax errors found");return n("Python Syntax","pass","Valid")}function jw($){if(F$(`grep -rn --include="*.py" -E "f['"].*SELECT|f['"].*INSERT|f['"].*UPDATE|f['"].*DELETE" . 2>/dev/null | grep -v test | grep -v node_modules | head -1`,$))return n("SQL Injection","fail","f-string with SQL keywords detected");return n("SQL Injection","pass","None detected")}function nH($){let I=F$("which uv",$),U=U6(w6($,"pyproject.toml"));if(!I||!U)return n("Python Tests","skip",!I?"uv not available":"pyproject.toml not found");let _=F$("uv run pytest -q --tb=no 2>&1",$);if(_?.includes("passed")||_?.includes("no tests ran"))return n("Python Tests","pass","Tests pass");return n("Python Tests","fail","Tests failing")}function Fw($){if(!U6(w6($,"tsconfig.json")))return n("TypeScript","skip","Not configured");let I=F$("npx tsc --noEmit 2>&1",$);if(I===null||I==="")return n("TypeScript","pass","Compilation clean");if(I.includes("error"))return n("TypeScript","fail","Type errors found");return n("TypeScript","pass","Compilation clean")}function Sw($){let I=F$(`grep -rn --include="*.tsx" --include="*.jsx" 'style={{' . 2>/dev/null | grep -v node_modules | wc -l`,$),U=Number.parseInt(I||"0",10);if(U>0)return n("Inline Styles","warn",`${U} found (prefer Tailwind)`);return n("Inline Styles","pass","None found")}function ww($){let I=F$(`grep -rn --include="*.ts" --include="*.tsx" ': any' . 2>/dev/null | grep -v node_modules | grep -v ".d.ts" | wc -l`,$),U=Number.parseInt(I||"0",10);if(U>3)return n("Any Types","fail",`${U} found (limit: 3)`);if(U>0)return n("Any Types","warn",`${U} found`);return n("Any Types","pass","None found")}function lH($){if(!U6(w6($,"package.json")))return n("Frontend Tests","skip","No package.json");let I=F$("npx vitest run --reporter=verbose 2>&1",$);if(I?.includes("passed")||I?.includes("✓"))return n("Frontend Tests","pass","Tests pass");return n("Frontend Tests","warn","Tests failed or vitest not configured")}function Ew($){if(!F$("which flutter",$)){if(!F$("which dart",$))return n("Flutter/Dart Analysis","skip","Not available");if(F$("dart analyze 2>&1",$)?.includes("No issues found"))return n("Dart Analysis","pass","Clean");return n("Dart Analysis","fail","Issues found")}if(F$("flutter analyze 2>&1",$)?.includes("No issues found"))return n("Flutter Analysis","pass","Clean");return n("Flutter Analysis","fail","Issues found")}function Cw($){if(!F$("which flutter",$))return n("Flutter Tests","skip","Flutter not available");if(F$("flutter test 2>&1",$)?.includes("All tests passed"))return n("Flutter Tests","pass","All tests pass");return n("Flutter Tests","fail","Tests failed")}function fw($){let I=w6($,".agents","plan.json");if(!U6(I))return n("PM Plan","warn","plan.json not found");try{return JSON.parse(q9(I,"utf-8")),n("PM Plan","pass","Valid JSON")}catch{return n("PM Plan","fail","Invalid JSON")}}function xw($,I){let U=[];switch($){case"backend":U.push(bw(I)),U.push(jw(I)),U.push(nH(I));break;case"frontend":U.push(Fw(I)),U.push(Sw(I)),U.push(ww(I)),U.push(lH(I));break;case"mobile":U.push(Ew(I)),U.push(Cw(I));break;case"qa":U.push(n("QA Report","pass","Verified by self-check.md"));break;case"debug":if(U6(w6(I,"pyproject.toml")))U.push(nH(I));else if(U6(w6(I,"package.json")))U.push(lH(I));else U.push(n("Debug Tests","skip","No test runner detected"));break;case"pm":U.push(fw(I));break}return U}async function mH($,I,U=!1){let _=$.toLowerCase();if(!rH.includes(_)){let q=`Invalid agent type: ${$}. Valid types: ${rH.join(", ")}`;if(U)console.log(JSON.stringify({ok:!1,error:q}));else o.error(q);process.exit(2)}let u=I||process.cwd();if(!U6(u)){let q=`Workspace not found: ${u}`;if(U)console.log(JSON.stringify({ok:!1,error:q}));else o.error(q);process.exit(2)}let g=[];g.push(Ww(u,_)),g.push(Pw(u,_)),g.push(Zw(u)),g.push(Aw(u)),g.push(...xw(_,u));let z=g.filter((q)=>q.status==="pass").length,v=g.filter((q)=>q.status==="fail").length,J=g.filter((q)=>q.status==="warn").length,N={ok:v===0,agent:_,workspace:u,checks:g,summary:{passed:z,failed:v,warned:J}};if(U)console.log(JSON.stringify(N,null,2)),process.exit(v>0?1:0);console.clear(),V$(i$.default.bgCyan(i$.default.white(` \uD83D\uDD0D Verify: ${_} agent `))),k(i$.default.dim(u),"Workspace");let X=["┌────────────────────────────┬────────┬─────────────────────────────┐",`│ ${i$.default.bold("Check")} │ ${i$.default.bold("Status")} │ ${i$.default.bold("Details")} │`,"├────────────────────────────┼────────┼─────────────────────────────┤",...g.map((q)=>{let T;switch(q.status){case"pass":T=i$.default.green("PASS");break;case"fail":T=i$.default.red("FAIL");break;case"warn":T=i$.default.yellow("WARN");break;default:T=i$.default.dim("SKIP")}let H=q.name.padEnd(26),Q=T.padEnd(6),Y=(q.message||"-").slice(0,27).padEnd(27);return`│ ${H} │ ${Q} │ ${Y} │`}),"└────────────────────────────┴────────┴─────────────────────────────┘"].join(`
431
+ `);console.log(X),console.log();let G=`${i$.default.green(`${z} passed`)}, ${i$.default.red(`${v} failed`)}, ${i$.default.yellow(`${J} warnings`)}`;if(v>0)d(i$.default.red(`❌ Verification failed: ${G}`)),process.exit(1);d(i$.default.green(`✅ Verification passed: ${G}`)),process.exit(0)}s4();var T$=q$(b$(),1);import{existsSync as kw,readdirSync as hH,readFileSync as yw}from"node:fs";import{join as P4}from"node:path";var cH=Object.fromEntries(Object.entries(O4).map(([$,I])=>[$,I.map((U)=>U.name)])),iw={"backend-engineer":"oma-backend","frontend-engineer":"oma-frontend","db-engineer":"oma-db","mobile-engineer":"oma-mobile","pm-planner":"oma-pm","qa-reviewer":"oma-qa","debug-investigator":"oma-debug"};function Q9($){let I=new Set;for(let U of $.matchAll(/_shared\/((?:[a-z][a-z0-9_-]*\/)*[a-z][a-z0-9_-]*)(?:\.md)?(?=[`)\s/}]|$)/gi))if(U[1])I.add(U[1]);return[...I]}function Y2($){try{return yw($,"utf-8")}catch{return""}}function T9($){try{return hH($).filter((I)=>!I.startsWith("."))}catch{return[]}}function rw($){try{return hH($,{withFileTypes:!0}).filter((I)=>!I.name.startsWith("."))}catch{return[]}}function dH($,I=""){let U=[];for(let _ of rw($)){let u=I?`${I}/${_.name}`:_.name;if(_.isDirectory()){U.push({path:u,isDirectory:!0}),U.push(...dH(P4($,_.name),u));continue}if(!_.name.endsWith(".md"))continue;U.push({path:u.replace(/\.md$/,""),isDirectory:!1})}return U}function pH($){let I=[{id:"root",label:"oh-my-agent",category:"root"}],U=new Set,_=[];function u(G,q,T){let H=`${G}|${q}`;if(U.has(H))return;U.add(H),_.push({from:G,to:q,type:T})}let g=P4($,".agents","skills");for(let[G,q]of Object.entries(cH))for(let T of q){let H=P4(g,T);if(!kw(H))continue;let Q=`skill:${T}`;I.push({id:Q,label:T,category:"skill",group:"Skills",subgroup:G});let Y=[Y2(P4(H,"SKILL.md")),Y2(P4(H,"resources","execution-protocol.md"))].join(`
432
+ `);for(let K of Q9(Y))u(Q,`shared:${K}`,"references")}let z=P4($,".agents","workflows");for(let G of T9(z).filter((q)=>q.endsWith(".md"))){let q=G.replace(".md",""),T=`workflow:${q}`;I.push({id:T,label:q,category:"workflow",group:"Workflows"});for(let H of Q9(Y2(P4(z,G))))u(T,`shared:${H}`,"references")}let v=P4(g,"_shared");for(let G of dH(v)){let q=`shared:${G.path}`;if(I.push({id:q,label:G.path,category:"shared",group:"Shared"}),!G.isDirectory){for(let T of Q9(Y2(P4(v,`${G.path}.md`))))if(T!==G.path)u(q,`shared:${T}`,"references")}}let J=P4($,".claude","agents");for(let G of T9(J).filter((q)=>q.endsWith(".md"))){let q=G.replace(".md",""),T=`agent:${q}`;I.push({id:T,label:q,category:"agent",group:"Claude Agents"});let H=iw[q];if(H)u(T,`skill:${H}`,"implements")}let N=P4($,".serena","memories");for(let G of T9(N).filter((q)=>q.endsWith(".md")))I.push({id:`memory:${G.replace(".md","")}`,label:G.replace(".md",""),category:"memory",group:"Serena Memories"});let X=new Set(I.map((G)=>G.id));return{nodes:I,edges:_.filter((G)=>X.has(G.from)&&X.has(G.to))}}var nw={root:($)=>T$.default.bold(T$.default.white($)),skill:T$.default.green,workflow:T$.default.blue,shared:T$.default.yellow,agent:T$.default.magenta,memory:T$.default.cyan};function N4($,I){return(nw[I]??T$.default.white)($)}function n4(...$){let I=$.sort((u,g)=>u[0]-g[0]),U="",_=0;for(let[u,g,z]of I){if(u>_)U+=" ".repeat(u-_);U+=g,_=u+z}return U}function lw($){let I=[],U=$.nodes.filter((b)=>b.category==="skill").length,_=$.nodes.filter((b)=>b.category==="workflow").length,u=$.nodes.filter((b)=>b.category==="shared").length,g=$.nodes.filter((b)=>b.category==="agent").length,z=$.nodes.filter((b)=>b.category==="memory").length,v=$.edges.filter((b)=>b.from.startsWith("skill:")&&b.to.startsWith("shared:")).length,J=$.edges.filter((b)=>b.from.startsWith("workflow:")&&b.to.startsWith("shared:")).length,N=$.edges.filter((b)=>b.type==="implements").length,X=$.edges.filter((b)=>b.from.startsWith("shared:")&&b.to.startsWith("shared:")).length,G=`Skills (${U})`,q=`Workflows (${_})`,T=`Shared (${u})`,H=`Agents (${g})`,Q=`Memories (${z})`,Y=10,K=29,R=48,P=19;I.push(n4([24,N4("oh-my-agent","root"),11])),I.push(n4([29,"│",1]));let O=Array(49).fill(" ");O[10]="┌",O[29]="┼",O[48]="┐";for(let b=11;b<48;b++)if(b!==29)O[b]="─";I.push(O.join("")),I.push(n4([10,"▼",1],[29,"▼",1],[48,"▼",1])),I.push(n4([10-(G.length>>1),N4(G,"skill"),G.length],[29-(q.length>>1),N4(q,"workflow"),q.length],[48-(Q.length>>1),N4(Q,"memory"),Q.length])),I.push(n4([10,"│",1],[29,"│",1]));let D=`${v} refs`,L=`${J} refs`;I.push(n4([10-(D.length>>1),T$.default.dim(D),D.length],[29-(L.length>>1),T$.default.dim(L),L.length])),I.push(n4([10,"│",1],[29,"│",1]));let B=Array(30).fill(" ");B[10]="└",B[19]="┬",B[29]="┘";for(let b=11;b<29;b++)if(b!==19)B[b]="─";I.push(B.join("")),I.push(n4([19,"▼",1]));let M=19-(T.length>>1),F=n4([M,N4(T,"shared"),T.length]);if(X>0)F+=` ${T$.default.dim(`◂── ${X} internal`)}`;I.push(F),I.push("");let A=10-(H.length>>1),f=`──[${N} implements]──▸`;return I.push(n4([A,N4(H,"agent"),H.length])+` ${T$.default.dim(f)} ${N4("Skills","skill")}`),I}function oH($){let I=[];I.push(...lw($)),I.push(""),I.push(T$.default.dim("─".repeat(56))),I.push("");let U=new Map,_=new Map;for(let G of $.edges){if(!U.has(G.from))U.set(G.from,[]);if(U.get(G.from)?.push(G),G.to.startsWith("shared:"))_.set(G.to,(_.get(G.to)??0)+1)}function u(G){let q=U.get(G);if(!q?.length)return"";let T=q.map((Q)=>$.nodes.find((Y)=>Y.id===Q.to)?.label.replace(/\.md$/,"")??Q.to.split(":")[1]),H=T.length>4?`${T.slice(0,3).join(", ")} +${T.length-3}`:T.join(", ");return` ${T$.default.dim("──▸")} ${T$.default.dim(H)}`}let g=$.nodes.filter((G)=>G.category==="skill"),z=Object.keys(cH);I.push(T$.default.bold(`Skills (${g.length})`));for(let G=0;G<z.length;G++){let q=z[G],T=g.filter((Y)=>Y.subgroup===q);if(!T.length)continue;let H=G===z.length-1;I.push(`${H?"└─":"├─"} ${T$.default.dim(q)}`);let Q=H?" ":"│ ";for(let Y of T){let K=Y===T.at(-1)?"└─":"├─";I.push(`${Q}${K} ${N4(Y.label,"skill")}${u(Y.id)}`)}}I.push("");let v=$.nodes.filter((G)=>G.category==="workflow");I.push(T$.default.bold(`Workflows (${v.length})`));for(let G of v){let q=G===v.at(-1)?"└─":"├─";I.push(`${q} ${N4(G.label,"workflow")}${u(G.id)}`)}I.push("");let J=[...$.nodes.filter((G)=>G.category==="shared")].sort((G,q)=>(_.get(q.id)??0)-(_.get(G.id)??0));I.push(T$.default.bold(`Shared (${J.length})`));for(let G of J){let q=G===J.at(-1)?"└─":"├─",T=_.get(G.id)??0,H=T>0?T$.default.dim(` (${T} refs)`):"";I.push(`${q} ${N4(G.label,"shared")}${H}${u(G.id)}`)}I.push("");let N=$.nodes.filter((G)=>G.category==="agent");I.push(T$.default.bold(`Claude Agents (${N.length})`));for(let G of N){let q=G===N.at(-1)?"└─":"├─",T=$.edges.find((Q)=>Q.from===G.id&&Q.type==="implements"),H=T?` ${T$.default.dim("──▸")} ${N4(T.to.split(":")[1]??"","skill")}`:"";I.push(`${q} ${N4(G.label,"agent")}${H}`)}I.push("");let X=$.nodes.filter((G)=>G.category==="memory");if(I.push(T$.default.bold(`Serena Memories (${X.length})`)),!X.length)I.push(`└─ ${T$.default.dim("(none)")}`);else for(let G of X){let q=G===X.at(-1)?"└─":"├─";I.push(`${q} ${N4(G.label,"memory")}`)}return I.join(`
433
+ `)}async function tH($){let I=pH(process.cwd());if($.json){console.log(JSON.stringify(I,null,2));return}console.log(oH(I))}import{existsSync as _f,mkdirSync as gf,readdirSync as e0,readFileSync as zf,statSync as l9}from"node:fs";import{createServer as vf}from"node:http";import{basename as RO,join as b4}from"node:path";import{EventEmitter as DE}from"node:events";import{stat as BE,Stats as Gm}from"node:fs";import{readdir as ME,stat as KE}from"node:fs/promises";import*as a from"node:path";import{lstat as aH,readdir as mw,realpath as hw,stat as cw}from"node:fs/promises";import{join as dw,relative as pw,resolve as eH,sep as ow}from"node:path";import{Readable as tw}from"node:stream";var G4={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},H9={root:".",fileFilter:($)=>!0,directoryFilter:($)=>!0,type:G4.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(H9);var uY="READDIRP_RECURSIVE_ERROR",aw=new Set(["ENOENT","EPERM","EACCES","ELOOP",uY]),sH=[G4.DIR_TYPE,G4.EVERYTHING_TYPE,G4.FILE_DIR_TYPE,G4.FILE_TYPE],ew=new Set([G4.DIR_TYPE,G4.EVERYTHING_TYPE,G4.FILE_DIR_TYPE]),sw=new Set([G4.EVERYTHING_TYPE,G4.FILE_DIR_TYPE,G4.FILE_TYPE]),$E=($)=>aw.has($.code),IE=process.platform==="win32",$Y=($)=>!0,IY=($)=>{if($===void 0)return $Y;if(typeof $==="function")return $;if(typeof $==="string"){let I=$.trim();return(U)=>U.basename===I}if(Array.isArray($)){let I=$.map((U)=>U.trim());return(U)=>I.some((_)=>U.basename===_)}return $Y};class Y9 extends tw{parents;reading;parent;_stat;_maxDepth;_wantsDir;_wantsFile;_wantsEverything;_root;_isDirent;_statsProp;_rdOptions;_fileFilter;_directoryFilter;constructor($={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:$.highWaterMark});let I={...H9,...$},{root:U,type:_}=I;this._fileFilter=IY(I.fileFilter),this._directoryFilter=IY(I.directoryFilter);let u=I.lstat?aH:cw;if(IE)this._stat=(g)=>u(g,{bigint:!0});else this._stat=u;this._maxDepth=I.depth!=null&&Number.isSafeInteger(I.depth)?I.depth:H9.depth,this._wantsDir=_?ew.has(_):!1,this._wantsFile=_?sw.has(_):!1,this._wantsEverything=_===G4.EVERYTHING_TYPE,this._root=eH(U),this._isDirent=!I.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(U,1)],this.reading=!1,this.parent=void 0}async _read($){if(this.reading)return;this.reading=!0;try{while(!this.destroyed&&$>0){let I=this.parent,U=I&&I.files;if(U&&U.length>0){let{path:_,depth:u}=I,g=U.splice(0,$).map((v)=>this._formatEntry(v,_)),z=await Promise.all(g);for(let v of z){if(!v)continue;if(this.destroyed)return;let J=await this._getEntryType(v);if(J==="directory"&&this._directoryFilter(v)){if(u<=this._maxDepth)this.parents.push(this._exploreDir(v.fullPath,u+1));if(this._wantsDir)this.push(v),$--}else if((J==="file"||this._includeAsFile(v))&&this._fileFilter(v)){if(this._wantsFile)this.push(v),$--}}}else{let _=this.parents.pop();if(!_){this.push(null);break}if(this.parent=await _,this.destroyed)return}}}catch(I){this.destroy(I)}finally{this.reading=!1}}async _exploreDir($,I){let U;try{U=await mw($,this._rdOptions)}catch(_){this._onError(_)}return{files:U,depth:I,path:$}}async _formatEntry($,I){let U,_=this._isDirent?$.name:$;try{let u=eH(dw(I,_));U={path:pw(this._root,u),fullPath:u,basename:_},U[this._statsProp]=this._isDirent?$:await this._stat(u)}catch(u){this._onError(u);return}return U}_onError($){if($E($)&&!this.destroyed)this.emit("warn",$);else this.destroy($)}async _getEntryType($){if(!$&&this._statsProp in $)return"";let I=$[this._statsProp];if(I.isFile())return"file";if(I.isDirectory())return"directory";if(I&&I.isSymbolicLink()){let U=$.fullPath;try{let _=await hw(U),u=await aH(_);if(u.isFile())return"file";if(u.isDirectory()){let g=_.length;if(U.startsWith(_)&&U.substr(g,1)===ow){let z=Error(`Circular symlink detected: "${U}" points to "${_}"`);return z.code=uY,this._onError(z)}return"directory"}}catch(_){return this._onError(_),""}}}_includeAsFile($){let I=$&&$[this._statsProp];return I&&this._wantsEverything&&!I.isDirectory()}}function UY($,I={}){let U=I.entryType||I.type;if(U==="both")U=G4.FILE_DIR_TYPE;if(U)I.type=U;if(!$)throw Error("readdirp: root argument is required. Usage: readdirp(root, options)");else if(typeof $!=="string")throw TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");else if(U&&!sH.includes(U))throw Error(`readdirp: Invalid type passed. Use one of ${sH.join(", ")}`);return I.root=$,new Y9(I)}import{watch as uE,unwatchFile as _Y,watchFile as UE}from"node:fs";import{realpath as O9,lstat as _E,open as gE,stat as zY}from"node:fs/promises";import{type as zE}from"node:os";import*as D$ from"node:path";var vE="data",B9="end",vY="close",B2=()=>{};var M2=process.platform,M9=M2==="win32",JE=M2==="darwin",NE=M2==="linux",GE=M2==="freebsd",JY=zE()==="OS400",H$={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},Z4=H$,XE="watch",qE={lstat:_E,stat:zY},Y1="listeners",O2="errHandlers",YI="rawEmitters",QE=[Y1,O2,YI],TE=new Set(["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),HE=($)=>TE.has(D$.extname($).slice(1).toLowerCase()),D9=($,I)=>{if($ instanceof Set)$.forEach(I);else I($)},n0=($,I,U)=>{let _=$[I];if(!(_ instanceof Set))$[I]=_=new Set([_]);_.add(U)},YE=($)=>(I)=>{let U=$[I];if(U instanceof Set)U.clear();else delete $[I]},l0=($,I,U)=>{let _=$[I];if(_ instanceof Set)_.delete(U);else if(_===U)delete $[I]},NY=($)=>$ instanceof Set?$.size===0:!$,V2=new Map;function gY($,I,U,_,u){let g=(z,v)=>{if(U($),u(z,v,{watchedPath:$}),v&&$!==v)D2(D$.resolve($,v),Y1,D$.join($,v))};try{return uE($,{persistent:I.persistent},g)}catch(z){_(z);return}}var D2=($,I,U,_,u)=>{let g=V2.get($);if(!g)return;D9(g[I],(z)=>{z(U,_,u)})},OE=($,I,U,_)=>{let{listener:u,errHandler:g,rawEmitter:z}=_,v=V2.get(I),J;if(!U.persistent){if(J=gY($,U,u,g,z),!J)return;return J.close.bind(J)}if(v)n0(v,Y1,u),n0(v,O2,g),n0(v,YI,z);else{if(J=gY($,U,D2.bind(null,I,Y1),g,D2.bind(null,I,YI)),!J)return;J.on(Z4.ERROR,async(N)=>{let X=D2.bind(null,I,O2);if(v)v.watcherUnusable=!0;if(M9&&N.code==="EPERM")try{await(await gE($,"r")).close(),X(N)}catch(G){}else X(N)}),v={listeners:u,errHandlers:g,rawEmitters:z,watcher:J},V2.set(I,v)}return()=>{if(l0(v,Y1,u),l0(v,O2,g),l0(v,YI,z),NY(v.listeners))v.watcher.close(),V2.delete(I),QE.forEach(YE(v)),v.watcher=void 0,Object.freeze(v)}},V9=new Map,VE=($,I,U,_)=>{let{listener:u,rawEmitter:g}=_,z=V9.get(I),v=z&&z.options;if(v&&(v.persistent<U.persistent||v.interval>U.interval))_Y(I),z=void 0;if(z)n0(z,Y1,u),n0(z,YI,g);else z={listeners:u,rawEmitters:g,options:U,watcher:UE(I,U,(J,N)=>{D9(z.rawEmitters,(G)=>{G(Z4.CHANGE,I,{curr:J,prev:N})});let X=J.mtimeMs;if(J.size!==N.size||X>N.mtimeMs||X===0)D9(z.listeners,(G)=>G($,J))})},V9.set(I,z);return()=>{if(l0(z,Y1,u),l0(z,YI,g),NY(z.listeners))V9.delete(I),_Y(I),z.options=z.watcher=void 0,Object.freeze(z)}};class K9{fsw;_boundHandleError;constructor($){this.fsw=$,this._boundHandleError=(I)=>$._handleError(I)}_watchWithNodeFs($,I){let U=this.fsw.options,_=D$.dirname($),u=D$.basename($);this.fsw._getWatchedDir(_).add(u);let z=D$.resolve($),v={persistent:U.persistent};if(!I)I=B2;let J;if(U.usePolling){let N=U.interval!==U.binaryInterval;v.interval=N&&HE(u)?U.binaryInterval:U.interval,J=VE($,z,v,{listener:I,rawEmitter:this.fsw._emitRaw})}else J=OE($,z,v,{listener:I,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return J}_handleFile($,I,U){if(this.fsw.closed)return;let _=D$.dirname($),u=D$.basename($),g=this.fsw._getWatchedDir(_),z=I;if(g.has(u))return;let v=async(N,X)=>{if(!this.fsw._throttle(XE,$,5))return;if(!X||X.mtimeMs===0)try{let G=await zY($);if(this.fsw.closed)return;let{atimeMs:q,mtimeMs:T}=G;if(!q||q<=T||T!==z.mtimeMs)this.fsw._emit(Z4.CHANGE,$,G);if((JE||NE||GE)&&z.ino!==G.ino){this.fsw._closeFile(N),z=G;let H=this._watchWithNodeFs($,v);if(H)this.fsw._addPathCloser(N,H)}else z=G}catch(G){this.fsw._remove(_,u)}else if(g.has(u)){let{atimeMs:G,mtimeMs:q}=X;if(!G||G<=q||q!==z.mtimeMs)this.fsw._emit(Z4.CHANGE,$,X);z=X}},J=this._watchWithNodeFs($,v);if(!(U&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored($)){if(!this.fsw._throttle(Z4.ADD,$,0))return;this.fsw._emit(Z4.ADD,$,I)}return J}async _handleSymlink($,I,U,_){if(this.fsw.closed)return;let u=$.fullPath,g=this.fsw._getWatchedDir(I);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let z;try{z=await O9(U)}catch(v){return this.fsw._emitReady(),!0}if(this.fsw.closed)return;if(g.has(_)){if(this.fsw._symlinkPaths.get(u)!==z)this.fsw._symlinkPaths.set(u,z),this.fsw._emit(Z4.CHANGE,U,$.stats)}else g.add(_),this.fsw._symlinkPaths.set(u,z),this.fsw._emit(Z4.ADD,U,$.stats);return this.fsw._emitReady(),!0}if(this.fsw._symlinkPaths.has(u))return!0;this.fsw._symlinkPaths.set(u,!0)}_handleRead($,I,U,_,u,g,z){$=D$.join($,"");let v=_?`${$}:${_}`:$;if(z=this.fsw._throttle("readdir",v,1000),!z)return;let J=this.fsw._getWatchedDir(U.path),N=new Set,X=this.fsw._readdirp($,{fileFilter:(G)=>U.filterPath(G),directoryFilter:(G)=>U.filterDir(G)});if(!X)return;return X.on(vE,async(G)=>{if(this.fsw.closed){X=void 0;return}let q=G.path,T=D$.join($,q);if(N.add(q),G.stats.isSymbolicLink()&&await this._handleSymlink(G,$,T,q))return;if(this.fsw.closed){X=void 0;return}if(q===_||!_&&!J.has(q))this.fsw._incrReadyCount(),T=D$.join(u,D$.relative(u,T)),this._addToNodeFs(T,I,U,g+1)}).on(Z4.ERROR,this._boundHandleError),new Promise((G,q)=>{if(!X)return q();X.once(B9,()=>{if(this.fsw.closed){X=void 0;return}let T=z?z.clear():!1;if(G(void 0),J.getChildren().filter((H)=>{return H!==$&&!N.has(H)}).forEach((H)=>{this.fsw._remove($,H)}),X=void 0,T)this._handleRead($,!1,U,_,u,g,z)})})}async _handleDir($,I,U,_,u,g,z){let v=this.fsw._getWatchedDir(D$.dirname($)),J=v.has(D$.basename($));if(!(U&&this.fsw.options.ignoreInitial)&&!u&&!J)this.fsw._emit(Z4.ADD_DIR,$,I);v.add(D$.basename($)),this.fsw._getWatchedDir($);let N,X,G=this.fsw.options.depth;if((G==null||_<=G)&&!this.fsw._symlinkPaths.has(z)){if(!u){if(await this._handleRead($,U,g,u,$,_,N),this.fsw.closed)return}X=this._watchWithNodeFs($,(q,T)=>{if(T&&T.mtimeMs===0)return;this._handleRead(q,!1,g,u,$,_,N)})}return X}async _addToNodeFs($,I,U,_,u){let g=this.fsw._emitReady;if(this.fsw._isIgnored($)||this.fsw.closed)return g(),!1;let z=this.fsw._getWatchHelpers($);if(U)z.filterPath=(v)=>U.filterPath(v),z.filterDir=(v)=>U.filterDir(v);try{let v=await qE[z.statMethod](z.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(z.watchPath,v))return g(),!1;let J=this.fsw.options.followSymlinks,N;if(v.isDirectory()){let X=D$.resolve($),G=J?await O9($):$;if(this.fsw.closed)return;if(N=await this._handleDir(z.watchPath,v,I,_,u,z,G),this.fsw.closed)return;if(X!==G&&G!==void 0)this.fsw._symlinkPaths.set(X,G)}else if(v.isSymbolicLink()){let X=J?await O9($):$;if(this.fsw.closed)return;let G=D$.dirname(z.watchPath);if(this.fsw._getWatchedDir(G).add(z.watchPath),this.fsw._emit(Z4.ADD,z.watchPath,v),N=await this._handleDir(G,v,I,_,$,z,X),this.fsw.closed)return;if(X!==void 0)this.fsw._symlinkPaths.set(D$.resolve($),X)}else N=this._handleFile(z.watchPath,v,I);if(g(),N)this.fsw._addPathCloser($,N);return!1}catch(v){if(this.fsw._handleError(v))return g(),$}}}/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */var R9="/",RE="//",TY=".",LE="..",WE="string",PE=/\\/g,HY=/\/\//g,ZE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,AE=/^\.[/\\]/;function K2($){return Array.isArray($)?$:[$]}var L9=($)=>typeof $==="object"&&$!==null&&!($ instanceof RegExp);function bE($){if(typeof $==="function")return $;if(typeof $==="string")return(I)=>$===I;if($ instanceof RegExp)return(I)=>$.test(I);if(typeof $==="object"&&$!==null)return(I)=>{if($.path===I)return!0;if($.recursive){let U=a.relative($.path,I);if(!U)return!1;return!U.startsWith("..")&&!a.isAbsolute(U)}return!1};return()=>!1}function jE($){if(typeof $!=="string")throw Error("string expected");$=a.normalize($),$=$.replace(/\\/g,"/");let I=!1;if($.startsWith("//"))I=!0;if($=$.replace(HY,"/"),I)$="/"+$;return $}function GY($,I,U){let _=jE(I);for(let u=0;u<$.length;u++){let g=$[u];if(g(_,U))return!0}return!1}function FE($,I){if($==null)throw TypeError("anymatch: specify first argument");let _=K2($).map((u)=>bE(u));if(I==null)return(u,g)=>{return GY(_,u,g)};return GY(_,I)}var XY=($)=>{let I=K2($).flat();if(!I.every((U)=>typeof U===WE))throw TypeError(`Non-string provided as watch path: ${I}`);return I.map(YY)},qY=($)=>{let I=$.replace(PE,R9),U=!1;if(I.startsWith(RE))U=!0;if(I=I.replace(HY,R9),U)I=R9+I;return I},YY=($)=>qY(a.normalize(qY($))),QY=($="")=>(I)=>{if(typeof I==="string")return YY(a.isAbsolute(I)?I:a.join($,I));else return I},SE=($,I)=>{if(a.isAbsolute($))return $;return a.join(I,$)},wE=Object.freeze(new Set);class OY{path;_removeWatcher;items;constructor($,I){this.path=$,this._removeWatcher=I,this.items=new Set}add($){let{items:I}=this;if(!I)return;if($!==TY&&$!==LE)I.add($)}async remove($){let{items:I}=this;if(!I)return;if(I.delete($),I.size>0)return;let U=this.path;try{await ME(U)}catch(_){if(this._removeWatcher)this._removeWatcher(a.dirname(U),a.basename(U))}}has($){let{items:I}=this;if(!I)return;return I.has($)}getChildren(){let{items:$}=this;if(!$)return[];return[...$.values()]}dispose(){this.items.clear(),this.path="",this._removeWatcher=B2,this.items=wE,Object.freeze(this)}}var EE="stat",CE="lstat";class VY{fsw;path;watchPath;fullWatchPath;dirParts;followSymlinks;statMethod;constructor($,I,U){this.fsw=U;let _=$;this.path=$=$.replace(AE,""),this.watchPath=_,this.fullWatchPath=a.resolve(_),this.dirParts=[],this.dirParts.forEach((u)=>{if(u.length>1)u.pop()}),this.followSymlinks=I,this.statMethod=I?EE:CE}entryPath($){return a.join(this.watchPath,a.relative(this.watchPath,$.fullPath))}filterPath($){let{stats:I}=$;if(I&&I.isSymbolicLink())return this.filterDir($);let U=this.entryPath($);return this.fsw._isntIgnored(U,I)&&this.fsw._hasReadPermissions(I)}filterDir($){return this.fsw._isntIgnored(this.entryPath($),$.stats)}}class DY extends DE{closed;options;_closers;_ignoredPaths;_throttled;_streams;_symlinkPaths;_watched;_pendingWrites;_pendingUnlinks;_readyCount;_emitReady;_closePromise;_userIgnored;_readyEmitted;_emitRaw;_boundRemove;_nodeFsHandler;constructor($={}){super();this.closed=!1,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._streams=new Set,this._symlinkPaths=new Map,this._watched=new Map,this._pendingWrites=new Map,this._pendingUnlinks=new Map,this._readyCount=0,this._readyEmitted=!1;let I=$.awaitWriteFinish,U={stabilityThreshold:2000,pollInterval:100},_={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...$,ignored:$.ignored?K2($.ignored):K2([]),awaitWriteFinish:I===!0?U:typeof I==="object"?{...U,...I}:!1};if(JY)_.usePolling=!0;if(_.atomic===void 0)_.atomic=!_.usePolling;let u=process.env.CHOKIDAR_USEPOLLING;if(u!==void 0){let v=u.toLowerCase();if(v==="false"||v==="0")_.usePolling=!1;else if(v==="true"||v==="1")_.usePolling=!0;else _.usePolling=!!v}let g=process.env.CHOKIDAR_INTERVAL;if(g)_.interval=Number.parseInt(g,10);let z=0;this._emitReady=()=>{if(z++,z>=this._readyCount)this._emitReady=B2,this._readyEmitted=!0,process.nextTick(()=>this.emit(H$.READY))},this._emitRaw=(...v)=>this.emit(H$.RAW,...v),this._boundRemove=this._remove.bind(this),this.options=_,this._nodeFsHandler=new K9(this),Object.freeze(_)}_addIgnoredPath($){if(L9($)){for(let I of this._ignoredPaths)if(L9(I)&&I.path===$.path&&I.recursive===$.recursive)return}this._ignoredPaths.add($)}_removeIgnoredPath($){if(this._ignoredPaths.delete($),typeof $==="string"){for(let I of this._ignoredPaths)if(L9(I)&&I.path===$)this._ignoredPaths.delete(I)}}add($,I,U){let{cwd:_}=this.options;this.closed=!1,this._closePromise=void 0;let u=XY($);if(_)u=u.map((g)=>{return SE(g,_)});if(u.forEach((g)=>{this._removeIgnoredPath(g)}),this._userIgnored=void 0,!this._readyCount)this._readyCount=0;return this._readyCount+=u.length,Promise.all(u.map(async(g)=>{let z=await this._nodeFsHandler._addToNodeFs(g,!U,void 0,0,I);if(z)this._emitReady();return z})).then((g)=>{if(this.closed)return;g.forEach((z)=>{if(z)this.add(a.dirname(z),a.basename(I||z))})}),this}unwatch($){if(this.closed)return this;let I=XY($),{cwd:U}=this.options;return I.forEach((_)=>{if(!a.isAbsolute(_)&&!this._closers.has(_)){if(U)_=a.join(U,_);_=a.resolve(_)}if(this._closePath(_),this._addIgnoredPath(_),this._watched.has(_))this._addIgnoredPath({path:_,recursive:!0});this._userIgnored=void 0}),this}close(){if(this._closePromise)return this._closePromise;this.closed=!0,this.removeAllListeners();let $=[];return this._closers.forEach((I)=>I.forEach((U)=>{let _=U();if(_ instanceof Promise)$.push(_)})),this._streams.forEach((I)=>I.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach((I)=>I.dispose()),this._closers.clear(),this._watched.clear(),this._streams.clear(),this._symlinkPaths.clear(),this._throttled.clear(),this._closePromise=$.length?Promise.all($).then(()=>{return}):Promise.resolve(),this._closePromise}getWatched(){let $={};return this._watched.forEach((I,U)=>{let u=(this.options.cwd?a.relative(this.options.cwd,U):U)||TY;$[u]=I.getChildren().sort()}),$}emitWithAll($,I){if(this.emit($,...I),$!==H$.ERROR)this.emit(H$.ALL,$,...I)}async _emit($,I,U){if(this.closed)return;let _=this.options;if(M9)I=a.normalize(I);if(_.cwd)I=a.relative(_.cwd,I);let u=[I];if(U!=null)u.push(U);let g=_.awaitWriteFinish,z;if(g&&(z=this._pendingWrites.get(I)))return z.lastChange=new Date,this;if(_.atomic){if($===H$.UNLINK)return this._pendingUnlinks.set(I,[$,...u]),setTimeout(()=>{this._pendingUnlinks.forEach((v,J)=>{this.emit(...v),this.emit(H$.ALL,...v),this._pendingUnlinks.delete(J)})},typeof _.atomic==="number"?_.atomic:100),this;if($===H$.ADD&&this._pendingUnlinks.has(I))$=H$.CHANGE,this._pendingUnlinks.delete(I)}if(g&&($===H$.ADD||$===H$.CHANGE)&&this._readyEmitted){let v=(J,N)=>{if(J)$=H$.ERROR,u[0]=J,this.emitWithAll($,u);else if(N){if(u.length>1)u[1]=N;else u.push(N);this.emitWithAll($,u)}};return this._awaitWriteFinish(I,g.stabilityThreshold,$,v),this}if($===H$.CHANGE){if(!this._throttle(H$.CHANGE,I,50))return this}if(_.alwaysStat&&U===void 0&&($===H$.ADD||$===H$.ADD_DIR||$===H$.CHANGE)){let v=_.cwd?a.join(_.cwd,I):I,J;try{J=await KE(v)}catch(N){}if(!J||this.closed)return;u.push(J)}return this.emitWithAll($,u),this}_handleError($){let I=$&&$.code;if($&&I!=="ENOENT"&&I!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||I!=="EPERM"&&I!=="EACCES"))this.emit(H$.ERROR,$);return $||this.closed}_throttle($,I,U){if(!this._throttled.has($))this._throttled.set($,new Map);let _=this._throttled.get($);if(!_)throw Error("invalid throttle");let u=_.get(I);if(u)return u.count++,!1;let g,z=()=>{let J=_.get(I),N=J?J.count:0;if(_.delete(I),clearTimeout(g),J)clearTimeout(J.timeoutObject);return N};g=setTimeout(z,U);let v={timeoutObject:g,clear:z,count:0};return _.set(I,v),v}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish($,I,U,_){let u=this.options.awaitWriteFinish;if(typeof u!=="object")return;let g=u.pollInterval,z,v=$;if(this.options.cwd&&!a.isAbsolute($))v=a.join(this.options.cwd,$);let J=new Date,N=this._pendingWrites;function X(G){BE(v,(q,T)=>{if(q||!N.has($)){if(q&&q.code!=="ENOENT")_(q);return}let H=Number(new Date);if(G&&T.size!==G.size)N.get($).lastChange=H;let Q=N.get($);if(H-Q.lastChange>=I)N.delete($),_(void 0,T);else z=setTimeout(X,g,T)})}if(!N.has($))N.set($,{lastChange:J,cancelWait:()=>{return N.delete($),clearTimeout(z),U}}),z=setTimeout(X,g)}_isIgnored($,I){if(this.options.atomic&&ZE.test($))return!0;if(!this._userIgnored){let{cwd:U}=this.options,u=(this.options.ignored||[]).map(QY(U)),z=[...[...this._ignoredPaths].map(QY(U)),...u];this._userIgnored=FE(z,void 0)}return this._userIgnored($,I)}_isntIgnored($,I){return!this._isIgnored($,I)}_getWatchHelpers($){return new VY($,this.options.followSymlinks,this)}_getWatchedDir($){let I=a.resolve($);if(!this._watched.has(I))this._watched.set(I,new OY(I,this._boundRemove));return this._watched.get(I)}_hasReadPermissions($){if(this.options.ignorePermissionErrors)return!0;return Boolean(Number($.mode)&256)}_remove($,I,U){let _=a.join($,I),u=a.resolve(_);if(U=U!=null?U:this._watched.has(_)||this._watched.has(u),!this._throttle("remove",_,100))return;if(!U&&this._watched.size===1)this.add($,I,!0);this._getWatchedDir(_).getChildren().forEach((G)=>this._remove(_,G));let v=this._getWatchedDir($),J=v.has(I);if(v.remove(I),this._symlinkPaths.has(u))this._symlinkPaths.delete(u);let N=_;if(this.options.cwd)N=a.relative(this.options.cwd,_);if(this.options.awaitWriteFinish&&this._pendingWrites.has(N)){if(this._pendingWrites.get(N).cancelWait()===H$.ADD)return}this._watched.delete(_),this._watched.delete(u);let X=U?H$.UNLINK_DIR:H$.UNLINK;if(J&&!this._isIgnored(_))this._emit(X,_);this._closePath(_)}_closePath($){this._closeFile($);let I=a.dirname($);this._getWatchedDir(I).remove(a.basename($))}_closeFile($){let I=this._closers.get($);if(!I)return;I.forEach((U)=>U()),this._closers.delete($)}_addPathCloser($,I){if(!I)return;let U=this._closers.get($);if(!U)U=[],this._closers.set($,U);U.push(I)}_readdirp($,I){if(this.closed)return;let U={type:H$.ALL,alwaysStat:!0,lstat:!0,...I,depth:0},_=UY($,U);return this._streams.add(_),_.once(vY,()=>{_=void 0}),_.once(B9,()=>{if(_)this._streams.delete(_),_=void 0}),_}}function R2($,I={}){let U=new DY(I);return U.add($),U}var LI=q$(b$(),1);var If=q$(TO(),1),uf=q$(j9(),1),Uf=q$(S9(),1),y9=q$(E2(),1),i9=q$(MO(),1);var KO=process.env.DASHBOARD_PORT?parseInt(process.env.DASHBOARD_PORT||"9847",10):9847;function Jf(){if(process.env.MEMORIES_DIR)return process.env.MEMORIES_DIR;let $=process.argv[3];if($)return b4($,".serena","memories");return b4(process.cwd(),".serena","memories")}function s0($){try{return zf($,"utf-8")}catch{return""}}function Nf($){try{let I=e0($);if(I.includes("orchestrator-session.md"))return b4($,"orchestrator-session.md");let U=I.filter((_)=>/^session-.*\.md$/.test(_)).map((_)=>({name:_,mtime:l9(b4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime);if(U.length>0&&U[0])return b4($,U[0].name)}catch{}return null}function Gf($){let I=Nf($);if(!I)return{id:"N/A",status:"UNKNOWN"};let U=s0(I);if(!U)return{id:"N/A",status:"UNKNOWN"};let _=(U.match(/session-id:\s*(.+)/i)||[])[1]||(U.match(/# Session:\s*(.+)/i)||[])[1]||U.match(/(session-\d{8}-\d{6})/)?.[1]||RO(I,".md")||"N/A",u="UNKNOWN";if(/IN PROGRESS|RUNNING|## Active|\[IN PROGRESS\]/i.test(U))u="RUNNING";else if(/COMPLETED|DONE|## Completed|\[COMPLETED\]/i.test(U))u="COMPLETED";else if(/FAILED|ERROR|## Failed|\[FAILED\]/i.test(U))u="FAILED";else if(/Step \d+:.*\[/i.test(U))u="RUNNING";return{id:_.trim(),status:u}}function Xf($){let I=s0(b4($,"task-board.md"));if(!I)return[];let U=[],_=I.split(`
434
+ `);for(let u of _){if(!u.startsWith("|")||/^\|\s*-+/.test(u))continue;let g=u.split("|").map((v)=>v.trim()).filter(Boolean),z=g[0];if(g.length<2||!z||/^agent$/i.test(z))continue;U.push({agent:g[0]||"",status:g[1]||"pending",task:g[2]||""})}return U}function n9($,I){try{let U=e0($).filter((g)=>g.startsWith(`progress-${I}`)&&g.endsWith(".md")).sort().reverse();if(U.length===0)return null;let u=(U[0]?s0(b4($,U[0])):"").match(/turn[:\s]*(\d+)/i);return u?.[1]?parseInt(u[1],10):null}catch{return null}}function qf($){try{return e0($).filter((U)=>U.endsWith(".md")&&U!==".gitkeep").map((U)=>({name:U,mtime:l9(b4($,U)).mtimeMs})).sort((U,_)=>_.mtime-U.mtime).slice(0,5).map((U)=>{let _=U.name.replace(/^(progress|result|session|debug|task)-?/,"").replace(/[-_]agent/,"").replace(/[-_]completion/,"").replace(/\.md$/,"").replace(/[-_]/g," ").trim()||U.name.replace(/\.md$/,""),g=s0(b4($,U.name)).split(`
435
+ `).map((v)=>v.trim()).filter((v)=>v&&!v.startsWith("---")&&v.length>3),z="";for(let v=g.length-1;v>=0;v--){let J=g[v];if(!J)continue;if(/^\*\*|^#+|^-|^\d+\.|Status|Result|Action|Step/i.test(J)){if(z=J.replace(/^[#*\-\d.]+\s*/,"").replace(/\*\*/g,"").trim(),z.length>5)break}}if(z.length>80)z=`${z.substring(0,77)}...`;return{agent:_,message:z,file:U.name}}).filter((U)=>U.message)}catch{return[]}}function Qf($){let I=[],U=new Set;try{let _=e0($).filter((u)=>u.endsWith(".md")&&u!==".gitkeep").map((u)=>({name:u,mtime:l9(b4($,u)).mtimeMs})).sort((u,g)=>g.mtime-u.mtime);for(let u of _){let g=s0(b4($,u.name)),z=g.match(/\*\*Agent\*\*:\s*(.+)/i)||g.match(/Agent:\s*(.+)/i)||g.match(/^#+\s*(.+?)\s*Agent/im),v=null;if(z?.[1])v=z[1].trim();else if(/_agent|agent_|-agent/i.test(u.name))v=u.name.replace(/\.md$/,"").replace(/[-_]completion|[-_]progress|[-_]result/gi,"").replace(/[-_]/g," ").trim();if(v&&!U.has(v.toLowerCase())){U.add(v.toLowerCase());let J="unknown";if(/\[COMPLETED\]|## Completed|## Results/i.test(g))J="completed";else if(/\[IN PROGRESS\]|## Progress|IN PROGRESS/i.test(g))J="running";else if(/\[FAILED\]|## Failed|ERROR/i.test(g))J="failed";let N=g.match(/## Task\s*\n+(.+)/i)||g.match(/\*\*Task\*\*:\s*(.+)/i),X=N?.[1]?N[1].trim().substring(0,60):"";I.push({agent:v,status:J,task:X,turn:n9($,v)})}}}catch{}return I}function r9($){let I=Gf($),_=Xf($).map((u)=>({...u,turn:n9($,u.agent)}));if(_.length===0)_=Qf($);if(_.length===0)try{let u=e0($).filter((g)=>g.startsWith("progress-")&&g.endsWith(".md"));for(let g of u){let z=g.replace(/^progress-/,"").replace(/\.md$/,"");_.push({agent:z,status:"running",task:"",turn:n9($,z)})}}catch{}return{session:I,agents:_,activity:qf($),memoriesDir:$,updatedAt:new Date().toISOString()}}var Tf=`<!DOCTYPE html>
434
436
  <html lang="en">
435
437
  <head>
436
438
  <meta charset="UTF-8">
@@ -487,15 +489,15 @@ Co-Authored-By: First Fluke <our.first.fluke@gmail.com>`,pr:"Generated with [oh-
487
489
  fetch('/api/state').then(r=>r.json()).then(renderState).catch(()=>{});connect();
488
490
  </script>
489
491
  </body>
490
- </html>`;function KO(){let $=Jf();if(!_f($))gf($,{recursive:!0});let I=vf((z,v)=>{if(z.url==="/api/state")v.writeHead(200,{"Content-Type":"application/json"}),v.end(JSON.stringify(y9($)));else v.writeHead(200,{"Content-Type":"text/html"}),v.end(Tf)}),U=new k9.default({server:I}),_=null;function u(z,v){if(_)clearTimeout(_);_=setTimeout(()=>{let J=JSON.stringify({type:"update",event:z,file:v,data:y9($)});U.clients.forEach((N)=>{if(N.readyState===x9.default.OPEN)N.send(J)})},100)}let g=M2($,{persistent:!0,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:200,pollInterval:50}});g.on("all",(z,v)=>u(z,RO(v))),U.on("connection",(z)=>{z.send(JSON.stringify({type:"full",data:y9($)})),z.on("error",()=>z.terminate())}),process.on("SIGINT",()=>{console.log(`
491
- Shutting down...`),g.close(),U.clients.forEach((z)=>{z.terminate()}),U.close(()=>I.close(()=>process.exit(0))),setTimeout(()=>process.exit(1),3000).unref()}),process.on("SIGTERM",()=>process.emit("SIGINT")),I.listen(MO,()=>{console.log(RI.magenta(`
492
- \uD83D\uDEF8 Serena Memory Dashboard`)),console.log(RI.white(` http://localhost:${MO}`)),console.log(RI.dim(` Watching: ${$}
493
- `))})}var LO={name:"oh-my-agent",version:"4.18.1",description:"Portable multi-agent harness for .agents-based skills and workflows across Antigravity, Claude Code, Codex, OpenCode, and more",type:"module",bin:{"oh-my-ag":"./bin/cli.js",oma:"./bin/cli.js"},files:["bin"],keywords:["oh-my-agent","antigravity",".agents","agent","skills","agent-skills","multi-agent","orchestrator","claude","claude-code","codex","opencode","copilot","cursor","chatgpt","pm","frontend","backend","mobile","qa","debug","terraform","database","workflow","bug-fixing","gemini"],author:"our.first.fluke <our.first.fluke@gmail.com>",contributors:["gracefullight <gracefullight.dev@gmail.com>","gahyun-git <go4it.gh@gmail.com>"],license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/first-fluke"},{type:"buymeacoffee",url:"https://buymeacoffee.com/firstfluke"}],scripts:{"sync:readme":"node ./scripts/sync-readme.mjs",build:"bun run sync:readme && bun build cli.ts --outfile bin/cli.js --target node --minify",dev:"bun run cli.ts",lint:"biome check --write --unsafe .",test:"vitest run",prepublishOnly:"bun run build"},dependencies:{"@clack/prompts":"^1.1.0",chokidar:"^5.0.0",commander:"^14.0.3","p-map":"^7.0.4",picocolors:"^1.1.1",ws:"^8.18.0",yaml:"^2.8.2",zod:"^4.3.6"},devDependencies:{"@biomejs/biome":"2.4.5","@types/bun":"^1.3.10","@types/ws":"^8.18.1",vitest:"^4.0.18"},peerDependencies:{typescript:"^6"},repository:{type:"git",url:"https://github.com/first-fluke/oh-my-agent"},antigravity:{skillsPath:".agents/skills",skills:["oma-brainstorm","oma-coordination","oma-pm","oma-frontend","oma-backend","oma-db","oma-mobile","oma-qa","oma-debug","oma-orchestrator","oma-dev-workflow","oma-tf-infra","oma-commit"]}};import{existsSync as Yf,mkdirSync as Of,readdirSync as a0,readFileSync as Df,statSync as l9}from"node:fs";import{basename as Vf,join as A4}from"node:path";var i$=q$(b$(),1),Bf="●",Mf="✓",Rf="✗",Kf="○",Lf="◌";function Pf(){if(process.env.MEMORIES_DIR)return process.env.MEMORIES_DIR;let $=process.argv[3];if($)return A4($,".serena","memories");return A4(process.cwd(),".serena","memories")}function e0($){try{return Df($,"utf-8")}catch{return""}}function Wf($){try{let I=a0($);if(I.includes("orchestrator-session.md"))return A4($,"orchestrator-session.md");let U=I.filter((_)=>/^session-.*\.md$/.test(_)).map((_)=>({name:_,mtime:l9(A4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime);if(U.length>0&&U[0])return A4($,U[0].name)}catch{}return null}function Zf($){let I=Wf($);if(!I)return{id:"N/A",status:"UNKNOWN"};let U=e0(I);if(!U)return{id:"N/A",status:"UNKNOWN"};let _=(U.match(/session-id:\s*(.+)/i)||[])[1]||(U.match(/# Session:\s*(.+)/i)||[])[1]||U.match(/(session-\d{8}-\d{6})/)?.[1]||Vf(I,".md"),u="UNKNOWN";if(/IN PROGRESS|RUNNING|## Active|\[IN PROGRESS\]/i.test(U))u="RUNNING";else if(/COMPLETED|DONE|## Completed|\[COMPLETED\]/i.test(U))u="COMPLETED";else if(/FAILED|ERROR|## Failed|\[FAILED\]/i.test(U))u="FAILED";else if(/Step \d+:.*\[/i.test(U))u="RUNNING";return{id:(_||"N/A").trim(),status:u}}function Af($){let I=e0(A4($,"task-board.md"));if(!I)return[];let U=[],_=I.split(`
494
- `);for(let u of _){if(!u.startsWith("|")||/^\|\s*-+/.test(u))continue;let g=u.split("|").map((N)=>N.trim()).filter(Boolean),z=g[0];if(g.length<2||!z||/^agent$/i.test(z))continue;let v=g[1],J=g[2];U.push({agent:z,status:v||"pending",task:J||""})}return U}function r9($,I){try{let U=a0($).filter((g)=>g.startsWith(`progress-${I}`)&&g.endsWith(".md")).sort().reverse();if(U.length===0||!U[0])return null;let u=e0(A4($,U[0])).match(/turn[:\s]*(\d+)/i);return u?.[1]?parseInt(u[1],10):null}catch{return null}}function bf($){try{let I=a0($).filter((_)=>_.endsWith(".md")&&_!==".gitkeep").map((_)=>({name:_,mtime:l9(A4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime).slice(0,5),U=[];for(let _ of I){let u=_.name.replace(/^(progress|result|session|debug|task)-?/,"").replace(/[-_]agent/,"").replace(/[-_]completion/,"").replace(/\.md$/,"").replace(/[-_]/g," ").trim()||_.name.replace(/\.md$/,""),z=e0(A4($,_.name)).split(`
495
- `).map((J)=>J.trim()).filter((J)=>J&&!J.startsWith("---")&&J.length>3),v="";for(let J=z.length-1;J>=0;J--){let N=z[J];if(!N)continue;if(/^\*\*|^#+|^-|^\d+\.|Status|Result|Action|Step/i.test(N)){if(v=N.replace(/^[#*\-\d.]+\s*/,"").replace(/\*\*/g,"").trim(),v.length>5)break}}if(v.length>52)v=`${v.substring(0,49)}...`;if(v)U.push({agent:u,message:v})}return U}catch{return[]}}function jf($){let I=[],U=new Set;try{let _=a0($).filter((u)=>u.endsWith(".md")&&u!==".gitkeep").map((u)=>({name:u,mtime:l9(A4($,u)).mtimeMs})).sort((u,g)=>g.mtime-u.mtime);for(let u of _){let g=e0(A4($,u.name)),z=g.match(/\*\*Agent\*\*:\s*(.+)/i)||g.match(/Agent:\s*(.+)/i)||g.match(/^#+\s*(.+?)\s*Agent/im),v=null;if(z?.[1])v=z[1].trim();else if(/_agent|agent_|-agent/i.test(u.name))v=u.name.replace(/\.md$/,"").replace(/[-_]completion|[-_]progress|[-_]result/gi,"").replace(/[-_]/g," ").trim();if(v&&!U.has(v.toLowerCase())){U.add(v.toLowerCase());let J="unknown";if(/\[COMPLETED\]|## Completed|## Results/i.test(g))J="completed";else if(/\[IN PROGRESS\]|## Progress|IN PROGRESS/i.test(g))J="running";else if(/\[FAILED\]|## Failed|ERROR/i.test(g))J="failed";let N=g.match(/## Task\s*\n+(.+)/i)||g.match(/\*\*Task\*\*:\s*(.+)/i),X=N?.[1]?N[1].trim().substring(0,20):"";I.push({agent:v,status:J,task:X,turn:r9($,v)})}}}catch{}return I}function Ff($){let I=$.toLowerCase();if(["running","active","in_progress","in-progress"].includes(I))return`${i$.default.green(Bf)} running`;else if(["completed","done","finished"].includes(I))return`${i$.default.cyan(Mf)} completed`;else if(["failed","error"].includes(I))return`${i$.default.red(Rf)} failed`;else if(["blocked","waiting"].includes(I))return`${i$.default.yellow(Kf)} blocked`;return`${i$.default.dim(Lf)} pending`}function PO($){console.clear();let I=Zf($),_=Af($).map((Q)=>({...Q,turn:r9($,Q.agent)}));if(_.length===0)_=jf($);if(_.length===0)try{let Q=a0($).filter((Y)=>Y.startsWith("progress-")&&Y.endsWith(".md"));for(let Y of Q){let R=Y.replace(/^progress-/,"").replace(/\.md$/,"");_.push({agent:R,status:"running",task:"",turn:r9($,R)})}}catch{}let u=56,g="═".repeat(u),z=(Q)=>" ".repeat(Math.max(0,Q)),v=(Q)=>i$.default.magenta(Q),J=(Q)=>i$.default.bold(Q),N=(Q)=>i$.default.dim(Q),X=i$.default.yellow;if(I.status==="RUNNING")X=i$.default.green;else if(I.status==="COMPLETED")X=i$.default.cyan;else if(I.status==="FAILED")X=i$.default.red;console.log(`${v(`╔${g}╗`)}`),console.log(`${v("║")} ${J(v("Serena Memory Dashboard"))}${z(u-25)}${v("║")}`);let G=`Session: ${J(I.id.padEnd(20))} [${X(I.status)}]`;if(console.log(`${v("║")} ${G}${z(u-4-G.length-9)}${v("║")}`),console.log(`${v(`╠${g}╣`)}`),console.log(`${v("║")} ${J(`${"Agent".padEnd(12)} ${"Status".padEnd(12)} ${"Turn".padEnd(6)} ${"Task".padEnd(20)}`)} ${v("║")}`),console.log(`${v("║")} ${N(`${"──────────".padEnd(12)} ${"──────────".padEnd(12)} ${"────".padEnd(6)} ${"──────────────────".padEnd(20)}`)} ${v("║")}`),_.length===0)console.log(`${v("║")} ${N(`No agents detected yet${z(32)}`)}${v("║")}`);else for(let Q of _){let Y=Ff(Q.status),R=Q.turn!=null?String(Q.turn):"-",K=Q.task.substring(0,20);console.log(`${v("║")} ${Q.agent.padEnd(12)} ${Y.padEnd(22)} ${R.padEnd(6)} ${K.padEnd(20)}${v("║")}`)}console.log(`${v(`╠${g}╣`)}`),console.log(`${v("║")} ${J("Latest Activity:")}${z(u-18)}${v("║")}`);let q=bf($);if(q.length===0)console.log(`${v("║")} ${N(`No activity yet${z(38)}`)}${v("║")}`);else for(let Q of q){let Y=`[${Q.agent}] ${Q.message}`;console.log(`${v("║")} ${N(Y.substring(0,52).padEnd(52))}${v("║")}`)}console.log(`${v(`╠${g}╣`)}`);let H=`Updated: ${new Date().toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})} | Ctrl+C to exit`;console.log(`${v("║")} ${N(H)}${z(u-4-H.length)}${v("║")}`),console.log(`${v(`╚${g}╝`)}`)}async function WO(){let $=Pf();if(!Yf($))Of($,{recursive:!0}),console.log(i$.default.yellow(`Created ${$} — waiting for memory files...`));console.log(i$.default.magenta(`
496
- \uD83D\uDEF8 Serena Terminal Dashboard`)),console.log(i$.default.dim(` Watching: ${$}
497
- `)),PO($);let I=M2($,{persistent:!0,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:200,pollInterval:50}});return I.on("all",()=>PO($)),new Promise((U)=>{process.on("SIGINT",()=>{console.log(`
498
- `),I.close(),U(),process.exit(0)}),process.on("SIGTERM",()=>process.emit("SIGINT"))})}var jO=LO.version,FO="OH_MY_AG_OUTPUT_FORMAT",s0=["text","json"],ZO=["gemini","claude","codex","qwen"],AO=["backend","frontend","mobile","qa","debug","pm"];function g6($,I="Output as JSON"){return $.option("--json",I).option("--output <format>","Output format (text/json)",(U)=>{let _=U.trim().toLowerCase();if(!s0.includes(_))throw Error(`Invalid output format: ${U}. Expected one of ${s0.join(", ")}`);return _})}function Sf($){if($?.json)return"json";let I=$?.output?.trim().toLowerCase();if(I&&s0.includes(I))return I;if(process.env[FO]?.trim().toLowerCase()==="json")return"json";return"text"}function r4($){return Sf($)==="json"}function SO($){let I=$.at(-1);return I instanceof m2?I:null}function wf($){let I=SO($);if(I)return I.opts();let U=$.at(-1);return U&&typeof U==="object"?U:{}}function Ef($){if($ instanceof Error)return $.message;return String($)}function f6($){throw Error($)}function h9($,I){for(let U of $){let _=U.charCodeAt(0);if(_>=0&&_<=31||_===127)f6(`${I} must not contain control characters`)}}function Cf($,I){if(h9($,I),/[?#%]/.test($))f6(`${I} must not contain ?, #, or %`);if($.includes(".."))f6(`${I} must not contain '..'`)}function ff($,I){h9($,I);try{new URL($)}catch{f6(`${I} must be a valid absolute URL`)}}function m9($,I,U="text"){if(typeof $==="string"){if(U==="identifier"){Cf($,I);return}if(U==="url"){ff($,I);return}h9($,I);return}if(Array.isArray($))for(let[_,u]of $.entries())m9(u,`${I}[${_}]`,U)}function bO($){let I=$.toLowerCase();if(I==="url"||I.endsWith("url"))return"url";if(I.includes("id")||I.includes("type")||I.includes("vendor")||I.includes("session"))return"identifier";return"text"}function xf($){let I=$.vendor;if(typeof I==="string"&&!ZO.includes(I))f6(`vendor must be one of ${ZO.join(", ")}`);let U=$.output;if(typeof U==="string"&&!s0.includes(U))f6(`output must be one of ${s0.join(", ")}`)}function kf($){let I=$.processedArgs??$.args??[];($.registeredArguments??[]).forEach((u,g)=>{let z=u.name?.()||String(g),v=I[g];if(m9(v,z,bO(z)),z==="agent-type"&&typeof v==="string"&&!AO.includes(v))f6(`agent-type must be one of ${AO.join(", ")}`)});let _=$.opts();xf(_);for(let[u,g]of Object.entries(_))m9(g,u,bO(u))}function yf($){return($.registeredArguments??[]).map((I)=>({name:I.name?.()||"",required:!!I.required,variadic:!!I.variadic}))}function nf($){return $.options.map((I)=>({flags:I.flags,long:I.long||void 0,short:I.short||void 0,description:I.description||"",required:!!I.required||!!I.mandatory,optional:!!I.optional,defaultValue:I.defaultValue}))}function wO($){let I=[],U=$;while(U?.parent)I.unshift(U.name()),U=U.parent;return I.join(" ")}function rf($){return $.options.some((I)=>I.long==="--json"||I.long==="--output")}function lf($){return $.options.some((I)=>I.long==="--dry-run")}function EO($){return{name:$.name(),path:wO($),summary:$.summary()||void 0,description:$.description(),arguments:yf($),options:nf($),supportsJsonOutput:rf($),supportsDryRun:lf($),subcommands:$.commands.map((I)=>EO(I))}}function mf($,I){if(!I)return $;let U=I.trim();if(!U)return $;let _=[...$.commands];while(_.length>0){let u=_.shift();if(!u)continue;if(u.name()===U||wO(u)===U)return u;_.push(...u.commands)}return null}function hf($,I){let U=mf($,I);if(!U)f6(`Unknown command: ${I}`);let _={name:$.name(),version:$.version(),description:$.description(),env:{[FO]:"Set to json to force machine-readable output on commands that support it."},command:EO(U)};console.log(JSON.stringify(_,null,2))}function M$($,I={}){return async(...U)=>{let _=SO(U),u=wf(U);try{if(_)kf(_);await $(...U)}catch(g){let z=Ef(g);if(I.supportsJsonOutput&&r4(u))console.log(JSON.stringify({error:z},null,2));else console.error(z);process.exitCode=1}}}var X$=new m2;X$.name("oh-my-agent").description("Multi-Agent Orchestrator for AI IDEs").version(jO).showSuggestionAfterError().showHelpAfterError().addHelpText("after",`
492
+ </html>`;function LO(){let $=Jf();if(!_f($))gf($,{recursive:!0});let I=vf((z,v)=>{if(z.url==="/api/state")v.writeHead(200,{"Content-Type":"application/json"}),v.end(JSON.stringify(r9($)));else v.writeHead(200,{"Content-Type":"text/html"}),v.end(Tf)}),U=new i9.default({server:I}),_=null;function u(z,v){if(_)clearTimeout(_);_=setTimeout(()=>{let J=JSON.stringify({type:"update",event:z,file:v,data:r9($)});U.clients.forEach((N)=>{if(N.readyState===y9.default.OPEN)N.send(J)})},100)}let g=R2($,{persistent:!0,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:200,pollInterval:50}});g.on("all",(z,v)=>u(z,RO(v))),U.on("connection",(z)=>{z.send(JSON.stringify({type:"full",data:r9($)})),z.on("error",()=>z.terminate())}),process.on("SIGINT",()=>{console.log(`
493
+ Shutting down...`),g.close(),U.clients.forEach((z)=>{z.terminate()}),U.close(()=>I.close(()=>process.exit(0))),setTimeout(()=>process.exit(1),3000).unref()}),process.on("SIGTERM",()=>process.emit("SIGINT")),I.listen(KO,()=>{console.log(LI.magenta(`
494
+ \uD83D\uDEF8 Serena Memory Dashboard`)),console.log(LI.white(` http://localhost:${KO}`)),console.log(LI.dim(` Watching: ${$}
495
+ `))})}var WO={name:"oh-my-agent",version:"4.18.2",description:"Portable multi-agent harness for .agents-based skills and workflows across Antigravity, Claude Code, Codex, OpenCode, and more",type:"module",bin:{"oh-my-ag":"./bin/cli.js",oma:"./bin/cli.js"},files:["bin"],keywords:["oh-my-agent","antigravity",".agents","agent","skills","agent-skills","multi-agent","orchestrator","claude","claude-code","codex","opencode","copilot","cursor","chatgpt","pm","frontend","backend","mobile","qa","debug","terraform","database","workflow","bug-fixing","gemini"],author:"our.first.fluke <our.first.fluke@gmail.com>",contributors:["gracefullight <gracefullight.dev@gmail.com>","gahyun-git <go4it.gh@gmail.com>"],license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/first-fluke"},{type:"buymeacoffee",url:"https://buymeacoffee.com/firstfluke"}],scripts:{"sync:readme":"node ./scripts/sync-readme.mjs",build:"bun run sync:readme && bun build cli.ts --outfile bin/cli.js --target node --minify",dev:"bun run cli.ts",lint:"biome check --write --unsafe .",test:"vitest run",prepublishOnly:"bun run build"},dependencies:{"@clack/prompts":"^1.1.0",chokidar:"^5.0.0",commander:"^14.0.3","p-map":"^7.0.4",picocolors:"^1.1.1",ws:"^8.18.0",yaml:"^2.8.2",zod:"^4.3.6"},devDependencies:{"@biomejs/biome":"2.4.5","@types/bun":"^1.3.10","@types/ws":"^8.18.1",vitest:"^4.0.18"},peerDependencies:{typescript:"^6"},repository:{type:"git",url:"https://github.com/first-fluke/oh-my-agent"},antigravity:{skillsPath:".agents/skills",skills:["oma-brainstorm","oma-coordination","oma-pm","oma-frontend","oma-backend","oma-db","oma-mobile","oma-qa","oma-debug","oma-orchestrator","oma-dev-workflow","oma-tf-infra","oma-commit"]}};import{existsSync as Yf,mkdirSync as Of,readdirSync as $u,readFileSync as Vf,statSync as h9}from"node:fs";import{basename as Df,join as j4}from"node:path";var r$=q$(b$(),1),Bf="●",Mf="✓",Kf="✗",Rf="○",Lf="◌";function Wf(){if(process.env.MEMORIES_DIR)return process.env.MEMORIES_DIR;let $=process.argv[3];if($)return j4($,".serena","memories");return j4(process.cwd(),".serena","memories")}function Iu($){try{return Vf($,"utf-8")}catch{return""}}function Pf($){try{let I=$u($);if(I.includes("orchestrator-session.md"))return j4($,"orchestrator-session.md");let U=I.filter((_)=>/^session-.*\.md$/.test(_)).map((_)=>({name:_,mtime:h9(j4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime);if(U.length>0&&U[0])return j4($,U[0].name)}catch{}return null}function Zf($){let I=Pf($);if(!I)return{id:"N/A",status:"UNKNOWN"};let U=Iu(I);if(!U)return{id:"N/A",status:"UNKNOWN"};let _=(U.match(/session-id:\s*(.+)/i)||[])[1]||(U.match(/# Session:\s*(.+)/i)||[])[1]||U.match(/(session-\d{8}-\d{6})/)?.[1]||Df(I,".md"),u="UNKNOWN";if(/IN PROGRESS|RUNNING|## Active|\[IN PROGRESS\]/i.test(U))u="RUNNING";else if(/COMPLETED|DONE|## Completed|\[COMPLETED\]/i.test(U))u="COMPLETED";else if(/FAILED|ERROR|## Failed|\[FAILED\]/i.test(U))u="FAILED";else if(/Step \d+:.*\[/i.test(U))u="RUNNING";return{id:(_||"N/A").trim(),status:u}}function Af($){let I=Iu(j4($,"task-board.md"));if(!I)return[];let U=[],_=I.split(`
496
+ `);for(let u of _){if(!u.startsWith("|")||/^\|\s*-+/.test(u))continue;let g=u.split("|").map((N)=>N.trim()).filter(Boolean),z=g[0];if(g.length<2||!z||/^agent$/i.test(z))continue;let v=g[1],J=g[2];U.push({agent:z,status:v||"pending",task:J||""})}return U}function m9($,I){try{let U=$u($).filter((g)=>g.startsWith(`progress-${I}`)&&g.endsWith(".md")).sort().reverse();if(U.length===0||!U[0])return null;let u=Iu(j4($,U[0])).match(/turn[:\s]*(\d+)/i);return u?.[1]?parseInt(u[1],10):null}catch{return null}}function bf($){try{let I=$u($).filter((_)=>_.endsWith(".md")&&_!==".gitkeep").map((_)=>({name:_,mtime:h9(j4($,_)).mtimeMs})).sort((_,u)=>u.mtime-_.mtime).slice(0,5),U=[];for(let _ of I){let u=_.name.replace(/^(progress|result|session|debug|task)-?/,"").replace(/[-_]agent/,"").replace(/[-_]completion/,"").replace(/\.md$/,"").replace(/[-_]/g," ").trim()||_.name.replace(/\.md$/,""),z=Iu(j4($,_.name)).split(`
497
+ `).map((J)=>J.trim()).filter((J)=>J&&!J.startsWith("---")&&J.length>3),v="";for(let J=z.length-1;J>=0;J--){let N=z[J];if(!N)continue;if(/^\*\*|^#+|^-|^\d+\.|Status|Result|Action|Step/i.test(N)){if(v=N.replace(/^[#*\-\d.]+\s*/,"").replace(/\*\*/g,"").trim(),v.length>5)break}}if(v.length>52)v=`${v.substring(0,49)}...`;if(v)U.push({agent:u,message:v})}return U}catch{return[]}}function jf($){let I=[],U=new Set;try{let _=$u($).filter((u)=>u.endsWith(".md")&&u!==".gitkeep").map((u)=>({name:u,mtime:h9(j4($,u)).mtimeMs})).sort((u,g)=>g.mtime-u.mtime);for(let u of _){let g=Iu(j4($,u.name)),z=g.match(/\*\*Agent\*\*:\s*(.+)/i)||g.match(/Agent:\s*(.+)/i)||g.match(/^#+\s*(.+?)\s*Agent/im),v=null;if(z?.[1])v=z[1].trim();else if(/_agent|agent_|-agent/i.test(u.name))v=u.name.replace(/\.md$/,"").replace(/[-_]completion|[-_]progress|[-_]result/gi,"").replace(/[-_]/g," ").trim();if(v&&!U.has(v.toLowerCase())){U.add(v.toLowerCase());let J="unknown";if(/\[COMPLETED\]|## Completed|## Results/i.test(g))J="completed";else if(/\[IN PROGRESS\]|## Progress|IN PROGRESS/i.test(g))J="running";else if(/\[FAILED\]|## Failed|ERROR/i.test(g))J="failed";let N=g.match(/## Task\s*\n+(.+)/i)||g.match(/\*\*Task\*\*:\s*(.+)/i),X=N?.[1]?N[1].trim().substring(0,20):"";I.push({agent:v,status:J,task:X,turn:m9($,v)})}}}catch{}return I}function Ff($){let I=$.toLowerCase();if(["running","active","in_progress","in-progress"].includes(I))return`${r$.default.green(Bf)} running`;else if(["completed","done","finished"].includes(I))return`${r$.default.cyan(Mf)} completed`;else if(["failed","error"].includes(I))return`${r$.default.red(Kf)} failed`;else if(["blocked","waiting"].includes(I))return`${r$.default.yellow(Rf)} blocked`;return`${r$.default.dim(Lf)} pending`}function PO($){console.clear();let I=Zf($),_=Af($).map((Q)=>({...Q,turn:m9($,Q.agent)}));if(_.length===0)_=jf($);if(_.length===0)try{let Q=$u($).filter((Y)=>Y.startsWith("progress-")&&Y.endsWith(".md"));for(let Y of Q){let K=Y.replace(/^progress-/,"").replace(/\.md$/,"");_.push({agent:K,status:"running",task:"",turn:m9($,K)})}}catch{}let u=56,g="═".repeat(u),z=(Q)=>" ".repeat(Math.max(0,Q)),v=(Q)=>r$.default.magenta(Q),J=(Q)=>r$.default.bold(Q),N=(Q)=>r$.default.dim(Q),X=r$.default.yellow;if(I.status==="RUNNING")X=r$.default.green;else if(I.status==="COMPLETED")X=r$.default.cyan;else if(I.status==="FAILED")X=r$.default.red;console.log(`${v(`╔${g}╗`)}`),console.log(`${v("║")} ${J(v("Serena Memory Dashboard"))}${z(u-25)}${v("║")}`);let G=`Session: ${J(I.id.padEnd(20))} [${X(I.status)}]`;if(console.log(`${v("║")} ${G}${z(u-4-G.length-9)}${v("║")}`),console.log(`${v(`╠${g}╣`)}`),console.log(`${v("║")} ${J(`${"Agent".padEnd(12)} ${"Status".padEnd(12)} ${"Turn".padEnd(6)} ${"Task".padEnd(20)}`)} ${v("║")}`),console.log(`${v("║")} ${N(`${"──────────".padEnd(12)} ${"──────────".padEnd(12)} ${"────".padEnd(6)} ${"──────────────────".padEnd(20)}`)} ${v("║")}`),_.length===0)console.log(`${v("║")} ${N(`No agents detected yet${z(32)}`)}${v("║")}`);else for(let Q of _){let Y=Ff(Q.status),K=Q.turn!=null?String(Q.turn):"-",R=Q.task.substring(0,20);console.log(`${v("║")} ${Q.agent.padEnd(12)} ${Y.padEnd(22)} ${K.padEnd(6)} ${R.padEnd(20)}${v("║")}`)}console.log(`${v(`╠${g}╣`)}`),console.log(`${v("║")} ${J("Latest Activity:")}${z(u-18)}${v("║")}`);let q=bf($);if(q.length===0)console.log(`${v("║")} ${N(`No activity yet${z(38)}`)}${v("║")}`);else for(let Q of q){let Y=`[${Q.agent}] ${Q.message}`;console.log(`${v("║")} ${N(Y.substring(0,52).padEnd(52))}${v("║")}`)}console.log(`${v(`╠${g}╣`)}`);let H=`Updated: ${new Date().toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})} | Ctrl+C to exit`;console.log(`${v("║")} ${N(H)}${z(u-4-H.length)}${v("║")}`),console.log(`${v(`╚${g}╝`)}`)}async function ZO(){let $=Wf();if(!Yf($))Of($,{recursive:!0}),console.log(r$.default.yellow(`Created ${$} — waiting for memory files...`));console.log(r$.default.magenta(`
498
+ \uD83D\uDEF8 Serena Terminal Dashboard`)),console.log(r$.default.dim(` Watching: ${$}
499
+ `)),PO($);let I=R2($,{persistent:!0,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:200,pollInterval:50}});return I.on("all",()=>PO($)),new Promise((U)=>{process.on("SIGINT",()=>{console.log(`
500
+ `),I.close(),U(),process.exit(0)}),process.on("SIGTERM",()=>process.emit("SIGINT"))})}var FO=WO.version,SO="OH_MY_AG_OUTPUT_FORMAT",uu=["text","json"],AO=["gemini","claude","codex","qwen"],bO=["backend","frontend","mobile","qa","debug","pm"];function v6($,I="Output as JSON"){return $.option("--json",I).option("--output <format>","Output format (text/json)",(U)=>{let _=U.trim().toLowerCase();if(!uu.includes(_))throw Error(`Invalid output format: ${U}. Expected one of ${uu.join(", ")}`);return _})}function Sf($){if($?.json)return"json";let I=$?.output?.trim().toLowerCase();if(I&&uu.includes(I))return I;if(process.env[SO]?.trim().toLowerCase()==="json")return"json";return"text"}function m4($){return Sf($)==="json"}function wO($){let I=$.at(-1);return I instanceof c2?I:null}function wf($){let I=wO($);if(I)return I.opts();let U=$.at(-1);return U&&typeof U==="object"?U:{}}function Ef($){if($ instanceof Error)return $.message;return String($)}function k6($){throw Error($)}function d9($,I){for(let U of $){let _=U.charCodeAt(0);if(_>=0&&_<=31||_===127)k6(`${I} must not contain control characters`)}}function Cf($,I){if(d9($,I),/[?#%]/.test($))k6(`${I} must not contain ?, #, or %`);if($.includes(".."))k6(`${I} must not contain '..'`)}function ff($,I){d9($,I);try{new URL($)}catch{k6(`${I} must be a valid absolute URL`)}}function c9($,I,U="text"){if(typeof $==="string"){if(U==="identifier"){Cf($,I);return}if(U==="url"){ff($,I);return}d9($,I);return}if(Array.isArray($))for(let[_,u]of $.entries())c9(u,`${I}[${_}]`,U)}function jO($){let I=$.toLowerCase();if(I==="url"||I.endsWith("url"))return"url";if(I.includes("id")||I.includes("type")||I.includes("vendor")||I.includes("session"))return"identifier";return"text"}function xf($){let I=$.vendor;if(typeof I==="string"&&!AO.includes(I))k6(`vendor must be one of ${AO.join(", ")}`);let U=$.output;if(typeof U==="string"&&!uu.includes(U))k6(`output must be one of ${uu.join(", ")}`)}function kf($){let I=$.processedArgs??$.args??[];($.registeredArguments??[]).forEach((u,g)=>{let z=u.name?.()||String(g),v=I[g];if(c9(v,z,jO(z)),z==="agent-type"&&typeof v==="string"&&!bO.includes(v))k6(`agent-type must be one of ${bO.join(", ")}`)});let _=$.opts();xf(_);for(let[u,g]of Object.entries(_))c9(g,u,jO(u))}function yf($){return($.registeredArguments??[]).map((I)=>({name:I.name?.()||"",required:!!I.required,variadic:!!I.variadic}))}function rf($){return $.options.map((I)=>({flags:I.flags,long:I.long||void 0,short:I.short||void 0,description:I.description||"",required:!!I.required||!!I.mandatory,optional:!!I.optional,defaultValue:I.defaultValue}))}function EO($){let I=[],U=$;while(U?.parent)I.unshift(U.name()),U=U.parent;return I.join(" ")}function nf($){return $.options.some((I)=>I.long==="--json"||I.long==="--output")}function lf($){return $.options.some((I)=>I.long==="--dry-run")}function CO($){return{name:$.name(),path:EO($),summary:$.summary()||void 0,description:$.description(),arguments:yf($),options:rf($),supportsJsonOutput:nf($),supportsDryRun:lf($),subcommands:$.commands.map((I)=>CO(I))}}function mf($,I){if(!I)return $;let U=I.trim();if(!U)return $;let _=[...$.commands];while(_.length>0){let u=_.shift();if(!u)continue;if(u.name()===U||EO(u)===U)return u;_.push(...u.commands)}return null}function hf($,I){let U=mf($,I);if(!U)k6(`Unknown command: ${I}`);let _={name:$.name(),version:$.version(),description:$.description(),env:{[SO]:"Set to json to force machine-readable output on commands that support it."},command:CO(U)};console.log(JSON.stringify(_,null,2))}function M$($,I={}){return async(...U)=>{let _=wO(U),u=wf(U);try{if(_)kf(_);await $(...U)}catch(g){let z=Ef(g);if(I.supportsJsonOutput&&m4(u))console.log(JSON.stringify({error:z},null,2));else console.error(z);process.exitCode=1}}}var X$=new c2;X$.name("oh-my-agent").description("Multi-Agent Orchestrator for AI IDEs").version(FO).showSuggestionAfterError().showHelpAfterError().addHelpText("after",`
499
501
  Aliases:
500
502
  oma Alias for oh-my-agent after global installation.
501
- `).action(M$(async()=>{await v2()}));X$.command("install").description("Install oh-my-agent skills and configurations").action(M$(async()=>{await v2()}));X$.command("describe [command-path]").description("Describe CLI commands as JSON for runtime introspection").action(M$(($)=>{hf(X$,$)},{supportsJsonOutput:!0}));X$.command("dashboard").description("Start terminal dashboard (real-time agent monitoring)").action(M$(async()=>{await WO()}));X$.command("dashboard:web").description("Start web dashboard on http://localhost:9847").action(M$(()=>{KO()}));g6(X$.command("auth:status").description("Check authentication status of all supported CLIs")).action(M$(async($)=>{await ZT(r4($))},{supportsJsonOutput:!0}));g6(X$.command("usage:anti").description("Show model usage quotas (connects to local Antigravity IDE)").option("--raw","Dump raw RPC response")).action(M$(async($)=>{await yH(r4($),$.raw)},{supportsJsonOutput:!0}));X$.command("update").description("Update skills to latest version from registry").option("-f, --force","Overwrite user-customized config files").option("--ci","Run in non-interactive CI mode (skip prompts)").action(M$(async($)=>{await EH($.force??!1,$.ci??!1)}));g6(X$.command("doctor").description("Check CLI installations, MCP configs, and skill status"),"Output as JSON for CI/CD").action(M$(async($)=>{await xT(r4($))},{supportsJsonOutput:!0}));g6(X$.command("stats").description("View productivity metrics").option("--reset","Reset metrics data")).action(M$(async($)=>{await ZH(r4($),$.reset)},{supportsJsonOutput:!0}));g6(X$.command("retro [window]").description("Engineering retrospective with metrics & trends").option("--interactive","Interactive mode (manual entry)").option("--compare","Compare current window vs prior same-length window")).action(M$(async($,I)=>{await RH($,{json:r4(I),compare:I.compare,interactive:I.interactive})},{supportsJsonOutput:!0}));g6(X$.command("cleanup").description("Clean up orphaned subagent processes and temp files").option("--dry-run","Show what would be cleaned without making changes").option("-y, --yes","Skip confirmation prompts and clean everything")).action(M$(async($)=>{await CT($.dryRun,r4($),$.yes)},{supportsJsonOutput:!0}));X$.command("bridge [url]").description("Bridge MCP stdio to Streamable HTTP (for Serena)").action(M$(async($)=>{await wT($)}));X$.command("agent:spawn <agent-id> <prompt> <session-id>").description("Spawn a subagent (prompt can be inline text or a file path)").option("-m, --model <vendor>","CLI vendor override (gemini/claude/codex/qwen)").option("-w, --workspace <path>","Working directory for the agent (auto-detected if omitted)").action(M$(async($,I,U,_)=>{await w7($,I,U,_.workspace||".",_.model)}));X$.command("agent:status <session-id> [agent-ids...]").description("Check status of subagents").option("-r, --root <path>","Root path for memory checks",process.cwd()).action(M$(async($,I,U)=>{await E7($,I,U.root)}));X$.command("agent:parallel [tasks...]").description("Run multiple sub-agents in parallel").option("-m, --model <vendor>","CLI vendor override (gemini/claude/codex/qwen)").option("-i, --inline","Inline mode: specify tasks as agent:task arguments").option("--no-wait","Don't wait for completion (background mode)").action(M$(async($,I)=>{await C7($,{vendor:I.model,inline:I.inline,noWait:!I.wait})}));X$.command("agent:review").description("Run code review using external CLI (codex/claude/gemini)").option("-m, --model <vendor>","CLI vendor (codex/claude/gemini)").option("-p, --prompt <prompt>","Custom review prompt").option("-w, --workspace <path>","Working directory (default: current)").option("--no-uncommitted","Review committed changes only").action(M$(async($)=>{await f7({prompt:$.prompt,model:$.model,workspace:$.workspace,uncommitted:$.uncommitted})}));g6(X$.command("memory:init").description("Initialize Serena memory schema in .serena/memories").option("--force","Overwrite empty or existing schema files")).action(M$(async($)=>{await cT(r4($),$.force)},{supportsJsonOutput:!0}));g6(X$.command("verify <agent-type>").description("Verify subagent output (backend/frontend/mobile/qa/debug/pm)").option("-w, --workspace <path>","Workspace path",process.cwd())).action(M$(async($,I)=>{await lH($,I.workspace,r4(I))},{supportsJsonOutput:!0}));X$.command("star").description("Star oh-my-agent on GitHub").action(M$(async()=>{await LH()}));g6(X$.command("visualize").alias("viz").description("Visualize project structure as a dependency graph")).action(M$(async($)=>{await oH({json:r4($)})},{supportsJsonOutput:!0}));X$.command("help").description("Show help information").action(M$(()=>{X$.help()}));X$.command("version").description("Show version number").action(M$(()=>{console.log(jO)}));X$.parse();
503
+ `).action(M$(async()=>{await N2()}));X$.command("install").description("Install oh-my-agent skills and configurations").action(M$(async()=>{await N2()}));X$.command("describe [command-path]").description("Describe CLI commands as JSON for runtime introspection").action(M$(($)=>{hf(X$,$)},{supportsJsonOutput:!0}));X$.command("dashboard").description("Start terminal dashboard (real-time agent monitoring)").action(M$(async()=>{await ZO()}));X$.command("dashboard:web").description("Start web dashboard on http://localhost:9847").action(M$(()=>{LO()}));v6(X$.command("auth:status").description("Check authentication status of all supported CLIs")).action(M$(async($)=>{await bT(m4($))},{supportsJsonOutput:!0}));v6(X$.command("usage:anti").description("Show model usage quotas (connects to local Antigravity IDE)").option("--raw","Dump raw RPC response")).action(M$(async($)=>{await iH(m4($),$.raw)},{supportsJsonOutput:!0}));X$.command("update").description("Update skills to latest version from registry").option("-f, --force","Overwrite user-customized config files").option("--ci","Run in non-interactive CI mode (skip prompts)").action(M$(async($)=>{await CH($.force??!1,$.ci??!1)}));v6(X$.command("doctor").description("Check CLI installations, MCP configs, and skill status"),"Output as JSON for CI/CD").action(M$(async($)=>{await yT(m4($))},{supportsJsonOutput:!0}));v6(X$.command("stats").description("View productivity metrics").option("--reset","Reset metrics data")).action(M$(async($)=>{await AH(m4($),$.reset)},{supportsJsonOutput:!0}));v6(X$.command("retro [window]").description("Engineering retrospective with metrics & trends").option("--interactive","Interactive mode (manual entry)").option("--compare","Compare current window vs prior same-length window")).action(M$(async($,I)=>{await RH($,{json:m4(I),compare:I.compare,interactive:I.interactive})},{supportsJsonOutput:!0}));v6(X$.command("cleanup").description("Clean up orphaned subagent processes and temp files").option("--dry-run","Show what would be cleaned without making changes").option("-y, --yes","Skip confirmation prompts and clean everything")).action(M$(async($)=>{await xT($.dryRun,m4($),$.yes)},{supportsJsonOutput:!0}));X$.command("bridge [url]").description("Bridge MCP stdio to Streamable HTTP (for Serena)").action(M$(async($)=>{await CT($)}));X$.command("agent:spawn <agent-id> <prompt> <session-id>").description("Spawn a subagent (prompt can be inline text or a file path)").option("-m, --model <vendor>","CLI vendor override (gemini/claude/codex/qwen)").option("-w, --workspace <path>","Working directory for the agent (auto-detected if omitted)").action(M$(async($,I,U,_)=>{await C7($,I,U,_.workspace||".",_.model)}));X$.command("agent:status <session-id> [agent-ids...]").description("Check status of subagents").option("-r, --root <path>","Root path for memory checks",process.cwd()).action(M$(async($,I,U)=>{await f7($,I,U.root)}));X$.command("agent:parallel [tasks...]").description("Run multiple sub-agents in parallel").option("-m, --model <vendor>","CLI vendor override (gemini/claude/codex/qwen)").option("-i, --inline","Inline mode: specify tasks as agent:task arguments").option("--no-wait","Don't wait for completion (background mode)").action(M$(async($,I)=>{await x7($,{vendor:I.model,inline:I.inline,noWait:!I.wait})}));X$.command("agent:review").description("Run code review using external CLI (codex/claude/gemini)").option("-m, --model <vendor>","CLI vendor (codex/claude/gemini)").option("-p, --prompt <prompt>","Custom review prompt").option("-w, --workspace <path>","Working directory (default: current)").option("--no-uncommitted","Review committed changes only").action(M$(async($)=>{await k7({prompt:$.prompt,model:$.model,workspace:$.workspace,uncommitted:$.uncommitted})}));v6(X$.command("memory:init").description("Initialize Serena memory schema in .serena/memories").option("--force","Overwrite empty or existing schema files")).action(M$(async($)=>{await dT(m4($),$.force)},{supportsJsonOutput:!0}));v6(X$.command("verify <agent-type>").description("Verify subagent output (backend/frontend/mobile/qa/debug/pm)").option("-w, --workspace <path>","Workspace path",process.cwd())).action(M$(async($,I)=>{await mH($,I.workspace,m4(I))},{supportsJsonOutput:!0}));X$.command("star").description("Star oh-my-agent on GitHub").action(M$(async()=>{await WH()}));v6(X$.command("visualize").alias("viz").description("Visualize project structure as a dependency graph")).action(M$(async($)=>{await tH({json:m4($)})},{supportsJsonOutput:!0}));X$.command("help").description("Show help information").action(M$(()=>{X$.help()}));X$.command("version").description("Show version number").action(M$(()=>{console.log(FO)}));X$.parse();