@hippo-memo/cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,14 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Hippo Memory</title>
8
+ <script type="module" crossorigin src="/assets/index-Du773V7N.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-D7VmMQvy.css">
10
+ </head>
11
+ <body>
12
+ <div id="root"></div>
13
+ </body>
14
+ </html>
package/dist/index.js ADDED
@@ -0,0 +1,106 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire as ZJ}from"node:module";var tY=Object.create;var{getPrototypeOf:fJ,defineProperty:i1,getOwnPropertyNames:$J}=Object;var MJ=Object.prototype.hasOwnProperty;function YJ(f){return this[f]}var JJ,zJ,Q0=(f,$,M)=>{var Y=f!=null&&typeof f==="object";if(Y){var J=$?JJ??=new WeakMap:zJ??=new WeakMap,z=J.get(f);if(z)return z}M=f!=null?tY(fJ(f)):{};let Z=$||!f||!f.__esModule?i1(M,"default",{value:f,enumerable:!0}):M;for(let X of $J(f))if(!MJ.call(Z,X))i1(Z,X,{get:YJ.bind(f,X),enumerable:!0});if(Y)J.set(f,Z);return Z};var S=(f,$)=>()=>($||f(($={exports:{}}).exports,$),$.exports);var e=ZJ(import.meta.url);var lf=S((XJ)=>{class p0 extends Error{constructor(f,$,M){super(M);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=$,this.exitCode=f,this.nestedError=void 0}}class o1 extends p0{constructor(f){super(1,"commander.invalidArgument",f);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}XJ.CommanderError=p0;XJ.InvalidArgumentError=o1});var D0=S((WJ)=>{var{InvalidArgumentError:QJ}=lf();class s1{constructor(f,$){switch(this.description=$||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,f[0]){case"<":this.required=!0,this._name=f.slice(1,-1);break;case"[":this.required=!1,this._name=f.slice(1,-1);break;default:this.required=!0,this._name=f;break}if(this._name.length>3&&this._name.slice(-3)==="...")this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_concatValue(f,$){if($===this.defaultValue||!Array.isArray($))return[f];return $.concat(f)}default(f,$){return this.defaultValue=f,this.defaultValueDescription=$,this}argParser(f){return this.parseArg=f,this}choices(f){return this.argChoices=f.slice(),this.parseArg=($,M)=>{if(!this.argChoices.includes($))throw new QJ(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue($,M);return $},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function DJ(f){let $=f.name()+(f.variadic===!0?"...":"");return f.required?"<"+$+">":"["+$+"]"}WJ.Argument=s1;WJ.humanReadableArgName=DJ});var l0=S((BJ)=>{var{humanReadableArgName:KJ}=D0();class a1{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(f){let $=f.commands.filter((Y)=>!Y._hidden),M=f._getHelpCommand();if(M&&!M._hidden)$.push(M);if(this.sortSubcommands)$.sort((Y,J)=>{return Y.name().localeCompare(J.name())});return $}compareOptions(f,$){let M=(Y)=>{return Y.short?Y.short.replace(/^-/,""):Y.long.replace(/^--/,"")};return M(f).localeCompare(M($))}visibleOptions(f){let $=f.options.filter((Y)=>!Y.hidden),M=f._getHelpOption();if(M&&!M.hidden){let Y=M.short&&f._findOption(M.short),J=M.long&&f._findOption(M.long);if(!Y&&!J)$.push(M);else if(M.long&&!J)$.push(f.createOption(M.long,M.description));else if(M.short&&!Y)$.push(f.createOption(M.short,M.description))}if(this.sortOptions)$.sort(this.compareOptions);return $}visibleGlobalOptions(f){if(!this.showGlobalOptions)return[];let $=[];for(let M=f.parent;M;M=M.parent){let Y=M.options.filter((J)=>!J.hidden);$.push(...Y)}if(this.sortOptions)$.sort(this.compareOptions);return $}visibleArguments(f){if(f._argsDescription)f.registeredArguments.forEach(($)=>{$.description=$.description||f._argsDescription[$.name()]||""});if(f.registeredArguments.find(($)=>$.description))return f.registeredArguments;return[]}subcommandTerm(f){let $=f.registeredArguments.map((M)=>KJ(M)).join(" ");return f._name+(f._aliases[0]?"|"+f._aliases[0]:"")+(f.options.length?" [options]":"")+($?" "+$:"")}optionTerm(f){return f.flags}argumentTerm(f){return f.name()}longestSubcommandTermLength(f,$){return $.visibleCommands(f).reduce((M,Y)=>{return Math.max(M,$.subcommandTerm(Y).length)},0)}longestOptionTermLength(f,$){return $.visibleOptions(f).reduce((M,Y)=>{return Math.max(M,$.optionTerm(Y).length)},0)}longestGlobalOptionTermLength(f,$){return $.visibleGlobalOptions(f).reduce((M,Y)=>{return Math.max(M,$.optionTerm(Y).length)},0)}longestArgumentTermLength(f,$){return $.visibleArguments(f).reduce((M,Y)=>{return Math.max(M,$.argumentTerm(Y).length)},0)}commandUsage(f){let $=f._name;if(f._aliases[0])$=$+"|"+f._aliases[0];let M="";for(let Y=f.parent;Y;Y=Y.parent)M=Y.name()+" "+M;return M+$+" "+f.usage()}commandDescription(f){return f.description()}subcommandDescription(f){return f.summary()||f.description()}optionDescription(f){let $=[];if(f.argChoices)$.push(`choices: ${f.argChoices.map((M)=>JSON.stringify(M)).join(", ")}`);if(f.defaultValue!==void 0){if(f.required||f.optional||f.isBoolean()&&typeof f.defaultValue==="boolean")$.push(`default: ${f.defaultValueDescription||JSON.stringify(f.defaultValue)}`)}if(f.presetArg!==void 0&&f.optional)$.push(`preset: ${JSON.stringify(f.presetArg)}`);if(f.envVar!==void 0)$.push(`env: ${f.envVar}`);if($.length>0)return`${f.description} (${$.join(", ")})`;return f.description}argumentDescription(f){let $=[];if(f.argChoices)$.push(`choices: ${f.argChoices.map((M)=>JSON.stringify(M)).join(", ")}`);if(f.defaultValue!==void 0)$.push(`default: ${f.defaultValueDescription||JSON.stringify(f.defaultValue)}`);if($.length>0){let M=`(${$.join(", ")})`;if(f.description)return`${f.description} ${M}`;return M}return f.description}formatHelp(f,$){let M=$.padWidth(f,$),Y=$.helpWidth||80,J=2,z=2;function Z(W,H){if(H){let R=`${W.padEnd(M+2)}${H}`;return $.wrap(R,Y-2,M+2)}return W}function X(W){return W.join(`
3
+ `).replace(/^/gm," ".repeat(2))}let G=[`Usage: ${$.commandUsage(f)}`,""],q=$.commandDescription(f);if(q.length>0)G=G.concat([$.wrap(q,Y,0),""]);let Q=$.visibleArguments(f).map((W)=>{return Z($.argumentTerm(W),$.argumentDescription(W))});if(Q.length>0)G=G.concat(["Arguments:",X(Q),""]);let D=$.visibleOptions(f).map((W)=>{return Z($.optionTerm(W),$.optionDescription(W))});if(D.length>0)G=G.concat(["Options:",X(D),""]);if(this.showGlobalOptions){let W=$.visibleGlobalOptions(f).map((H)=>{return Z($.optionTerm(H),$.optionDescription(H))});if(W.length>0)G=G.concat(["Global Options:",X(W),""])}let V=$.visibleCommands(f).map((W)=>{return Z($.subcommandTerm(W),$.subcommandDescription(W))});if(V.length>0)G=G.concat(["Commands:",X(V),""]);return G.join(`
4
+ `)}padWidth(f,$){return Math.max($.longestOptionTermLength(f,$),$.longestGlobalOptionTermLength(f,$),$.longestSubcommandTermLength(f,$),$.longestArgumentTermLength(f,$))}wrap(f,$,M,Y=40){let z=new RegExp(`[\\n][${" \\f\\t\\v   -    \uFEFF"}]+`);if(f.match(z))return f;let Z=$-M;if(Z<Y)return f;let X=f.slice(0,M),G=f.slice(M).replace(`\r
5
+ `,`
6
+ `),q=" ".repeat(M),D=`\\s${"​"}`,V=new RegExp(`
7
+ |.{1,${Z-1}}([${D}]|$)|[^${D}]+?([${D}]|$)`,"g"),W=G.match(V)||[];return X+W.map((H,R)=>{if(H===`
8
+ `)return"";return(R>0?q:"")+H.trimEnd()}).join(`
9
+ `)}}BJ.Help=a1});var d0=S((PJ)=>{var{InvalidArgumentError:yJ}=lf();class e1{constructor(f,$){this.flags=f,this.description=$||"",this.required=f.includes("<"),this.optional=f.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(f),this.mandatory=!1;let M=FJ(f);if(this.short=M.shortFlag,this.long=M.longFlag,this.negate=!1,this.long)this.negate=this.long.startsWith("--no-");this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(f,$){return this.defaultValue=f,this.defaultValueDescription=$,this}preset(f){return this.presetArg=f,this}conflicts(f){return this.conflictsWith=this.conflictsWith.concat(f),this}implies(f){let $=f;if(typeof f==="string")$={[f]:!0};return this.implied=Object.assign(this.implied||{},$),this}env(f){return this.envVar=f,this}argParser(f){return this.parseArg=f,this}makeOptionMandatory(f=!0){return this.mandatory=!!f,this}hideHelp(f=!0){return this.hidden=!!f,this}_concatValue(f,$){if($===this.defaultValue||!Array.isArray($))return[f];return $.concat(f)}choices(f){return this.argChoices=f.slice(),this.parseArg=($,M)=>{if(!this.argChoices.includes($))throw new yJ(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._concatValue($,M);return $},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){return SJ(this.name().replace(/^no-/,""))}is(f){return this.short===f||this.long===f}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class t1{constructor(f){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,f.forEach(($)=>{if($.negate)this.negativeOptions.set($.attributeName(),$);else this.positiveOptions.set($.attributeName(),$)}),this.negativeOptions.forEach(($,M)=>{if(this.positiveOptions.has(M))this.dualOptions.add(M)})}valueFromOption(f,$){let M=$.attributeName();if(!this.dualOptions.has(M))return!0;let Y=this.negativeOptions.get(M).presetArg,J=Y!==void 0?Y:!1;return $.negate===(J===f)}}function SJ(f){return f.split("-").reduce(($,M)=>{return $+M[0].toUpperCase()+M.slice(1)})}function FJ(f){let $,M,Y=f.split(/[ |,]+/);if(Y.length>1&&!/^[[<]/.test(Y[1]))$=Y.shift();if(M=Y.shift(),!$&&/^-[^-]$/.test(M))$=M,M=void 0;return{shortFlag:$,longFlag:M}}PJ.Option=e1;PJ.DualOptions=t1});var f$=S((LJ)=>{function jJ(f,$){if(Math.abs(f.length-$.length)>3)return Math.max(f.length,$.length);let M=[];for(let Y=0;Y<=f.length;Y++)M[Y]=[Y];for(let Y=0;Y<=$.length;Y++)M[0][Y]=Y;for(let Y=1;Y<=$.length;Y++)for(let J=1;J<=f.length;J++){let z=1;if(f[J-1]===$[Y-1])z=0;else z=1;if(M[J][Y]=Math.min(M[J-1][Y]+1,M[J][Y-1]+1,M[J-1][Y-1]+z),J>1&&Y>1&&f[J-1]===$[Y-2]&&f[J-2]===$[Y-1])M[J][Y]=Math.min(M[J][Y],M[J-2][Y-2]+1)}return M[f.length][$.length]}function RJ(f,$){if(!$||$.length===0)return"";$=Array.from(new Set($));let M=f.startsWith("--");if(M)f=f.slice(2),$=$.map((Z)=>Z.slice(2));let Y=[],J=3,z=0.4;if($.forEach((Z)=>{if(Z.length<=1)return;let X=jJ(f,Z),G=Math.max(f.length,Z.length);if((G-X)/G>z){if(X<J)J=X,Y=[Z];else if(X===J)Y.push(Z)}}),Y.sort((Z,X)=>Z.localeCompare(X)),M)Y=Y.map((Z)=>`--${Z}`);if(Y.length>1)return`
10
+ (Did you mean one of ${Y.join(", ")}?)`;if(Y.length===1)return`
11
+ (Did you mean ${Y[0]}?)`;return""}LJ.suggestSimilar=RJ});var J$=S((CJ)=>{var NJ=e("node:events").EventEmitter,n0=e("node:child_process"),Yf=e("node:path"),i0=e("node:fs"),x=e("node:process"),{Argument:OJ,humanReadableArgName:xJ}=D0(),{CommanderError:o0}=lf(),{Help:IJ}=l0(),{Option:$$,DualOptions:kJ}=d0(),{suggestSimilar:M$}=f$();class s0 extends NJ{constructor(f){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=f||"",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._outputConfiguration={writeOut:($)=>x.stdout.write($),writeErr:($)=>x.stderr.write($),getOutHelpWidth:()=>x.stdout.isTTY?x.stdout.columns:void 0,getErrHelpWidth:()=>x.stderr.isTTY?x.stderr.columns:void 0,outputError:($,M)=>M($)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(f){return this._outputConfiguration=f._outputConfiguration,this._helpOption=f._helpOption,this._helpCommand=f._helpCommand,this._helpConfiguration=f._helpConfiguration,this._exitCallback=f._exitCallback,this._storeOptionsAsProperties=f._storeOptionsAsProperties,this._combineFlagAndOptionalValue=f._combineFlagAndOptionalValue,this._allowExcessArguments=f._allowExcessArguments,this._enablePositionalOptions=f._enablePositionalOptions,this._showHelpAfterError=f._showHelpAfterError,this._showSuggestionAfterError=f._showSuggestionAfterError,this}_getCommandAndAncestors(){let f=[];for(let $=this;$;$=$.parent)f.push($);return f}command(f,$,M){let Y=$,J=M;if(typeof Y==="object"&&Y!==null)J=Y,Y=null;J=J||{};let[,z,Z]=f.match(/([^ ]+) *(.*)/),X=this.createCommand(z);if(Y)X.description(Y),X._executableHandler=!0;if(J.isDefault)this._defaultCommandName=X._name;if(X._hidden=!!(J.noHelp||J.hidden),X._executableFile=J.executableFile||null,Z)X.arguments(Z);if(this._registerCommand(X),X.parent=this,X.copyInheritedSettings(this),Y)return this;return X}createCommand(f){return new s0(f)}createHelp(){return Object.assign(new IJ,this.configureHelp())}configureHelp(f){if(f===void 0)return this._helpConfiguration;return this._helpConfiguration=f,this}configureOutput(f){if(f===void 0)return this._outputConfiguration;return Object.assign(this._outputConfiguration,f),this}showHelpAfterError(f=!0){if(typeof f!=="string")f=!!f;return this._showHelpAfterError=f,this}showSuggestionAfterError(f=!0){return this._showSuggestionAfterError=!!f,this}addCommand(f,$){if(!f._name)throw Error(`Command passed to .addCommand() must have a name
12
+ - specify the name in Command constructor or using .name()`);if($=$||{},$.isDefault)this._defaultCommandName=f._name;if($.noHelp||$.hidden)f._hidden=!0;return this._registerCommand(f),f.parent=this,f._checkForBrokenPassThrough(),this}createArgument(f,$){return new OJ(f,$)}argument(f,$,M,Y){let J=this.createArgument(f,$);if(typeof M==="function")J.default(Y).argParser(M);else J.default(M);return this.addArgument(J),this}arguments(f){return f.trim().split(/ +/).forEach(($)=>{this.argument($)}),this}addArgument(f){let $=this.registeredArguments.slice(-1)[0];if($&&$.variadic)throw Error(`only the last argument can be variadic '${$.name()}'`);if(f.required&&f.defaultValue!==void 0&&f.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${f.name()}'`);return this.registeredArguments.push(f),this}helpCommand(f,$){if(typeof f==="boolean")return this._addImplicitHelpCommand=f,this;f=f??"help [command]";let[,M,Y]=f.match(/([^ ]+) *(.*)/),J=$??"display help for command",z=this.createCommand(M);if(z.helpOption(!1),Y)z.arguments(Y);if(J)z.description(J);return this._addImplicitHelpCommand=!0,this._helpCommand=z,this}addHelpCommand(f,$){if(typeof f!=="object")return this.helpCommand(f,$),this;return this._addImplicitHelpCommand=!0,this._helpCommand=f,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(f,$){let M=["preSubcommand","preAction","postAction"];if(!M.includes(f))throw Error(`Unexpected value for event passed to hook : '${f}'.
13
+ Expecting one of '${M.join("', '")}'`);if(this._lifeCycleHooks[f])this._lifeCycleHooks[f].push($);else this._lifeCycleHooks[f]=[$];return this}exitOverride(f){if(f)this._exitCallback=f;else this._exitCallback=($)=>{if($.code!=="commander.executeSubCommandAsync")throw $};return this}_exit(f,$,M){if(this._exitCallback)this._exitCallback(new o0(f,$,M));x.exit(f)}action(f){let $=(M)=>{let Y=this.registeredArguments.length,J=M.slice(0,Y);if(this._storeOptionsAsProperties)J[Y]=this;else J[Y]=this.opts();return J.push(this),f.apply(this,J)};return this._actionHandler=$,this}createOption(f,$){return new $$(f,$)}_callParseArg(f,$,M,Y){try{return f.parseArg($,M)}catch(J){if(J.code==="commander.invalidArgument"){let z=`${Y} ${J.message}`;this.error(z,{exitCode:J.exitCode,code:J.code})}throw J}}_registerOption(f){let $=f.short&&this._findOption(f.short)||f.long&&this._findOption(f.long);if($){let M=f.long&&this._findOption(f.long)?f.long:f.short;throw Error(`Cannot add option '${f.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${M}'
14
+ - already used by option '${$.flags}'`)}this.options.push(f)}_registerCommand(f){let $=(Y)=>{return[Y.name()].concat(Y.aliases())},M=$(f).find((Y)=>this._findCommand(Y));if(M){let Y=$(this._findCommand(M)).join("|"),J=$(f).join("|");throw Error(`cannot add command '${J}' as already have command '${Y}'`)}this.commands.push(f)}addOption(f){this._registerOption(f);let $=f.name(),M=f.attributeName();if(f.negate){let J=f.long.replace(/^--no-/,"--");if(!this._findOption(J))this.setOptionValueWithSource(M,f.defaultValue===void 0?!0:f.defaultValue,"default")}else if(f.defaultValue!==void 0)this.setOptionValueWithSource(M,f.defaultValue,"default");let Y=(J,z,Z)=>{if(J==null&&f.presetArg!==void 0)J=f.presetArg;let X=this.getOptionValue(M);if(J!==null&&f.parseArg)J=this._callParseArg(f,J,X,z);else if(J!==null&&f.variadic)J=f._concatValue(J,X);if(J==null)if(f.negate)J=!1;else if(f.isBoolean()||f.optional)J=!0;else J="";this.setOptionValueWithSource(M,J,Z)};if(this.on("option:"+$,(J)=>{let z=`error: option '${f.flags}' argument '${J}' is invalid.`;Y(J,z,"cli")}),f.envVar)this.on("optionEnv:"+$,(J)=>{let z=`error: option '${f.flags}' value '${J}' from env '${f.envVar}' is invalid.`;Y(J,z,"env")});return this}_optionEx(f,$,M,Y,J){if(typeof $==="object"&&$ instanceof $$)throw Error("To add an Option object use addOption() instead of option() or requiredOption()");let z=this.createOption($,M);if(z.makeOptionMandatory(!!f.mandatory),typeof Y==="function")z.default(J).argParser(Y);else if(Y instanceof RegExp){let Z=Y;Y=(X,G)=>{let q=Z.exec(X);return q?q[0]:G},z.default(J).argParser(Y)}else z.default(Y);return this.addOption(z)}option(f,$,M,Y){return this._optionEx({},f,$,M,Y)}requiredOption(f,$,M,Y){return this._optionEx({mandatory:!0},f,$,M,Y)}combineFlagAndOptionalValue(f=!0){return this._combineFlagAndOptionalValue=!!f,this}allowUnknownOption(f=!0){return this._allowUnknownOption=!!f,this}allowExcessArguments(f=!0){return this._allowExcessArguments=!!f,this}enablePositionalOptions(f=!0){return this._enablePositionalOptions=!!f,this}passThroughOptions(f=!0){return this._passThroughOptions=!!f,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(f=!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=!!f,this}getOptionValue(f){if(this._storeOptionsAsProperties)return this[f];return this._optionValues[f]}setOptionValue(f,$){return this.setOptionValueWithSource(f,$,void 0)}setOptionValueWithSource(f,$,M){if(this._storeOptionsAsProperties)this[f]=$;else this._optionValues[f]=$;return this._optionValueSources[f]=M,this}getOptionValueSource(f){return this._optionValueSources[f]}getOptionValueSourceWithGlobals(f){let $;return this._getCommandAndAncestors().forEach((M)=>{if(M.getOptionValueSource(f)!==void 0)$=M.getOptionValueSource(f)}),$}_prepareUserArgs(f,$){if(f!==void 0&&!Array.isArray(f))throw Error("first parameter to parse must be array or undefined");if($=$||{},f===void 0&&$.from===void 0){if(x.versions?.electron)$.from="electron";let Y=x.execArgv??[];if(Y.includes("-e")||Y.includes("--eval")||Y.includes("-p")||Y.includes("--print"))$.from="eval"}if(f===void 0)f=x.argv;this.rawArgs=f.slice();let M;switch($.from){case void 0:case"node":this._scriptPath=f[1],M=f.slice(2);break;case"electron":if(x.defaultApp)this._scriptPath=f[1],M=f.slice(2);else M=f.slice(1);break;case"user":M=f.slice(0);break;case"eval":M=f.slice(1);break;default:throw Error(`unexpected parse option { from: '${$.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",M}parse(f,$){let M=this._prepareUserArgs(f,$);return this._parseCommand([],M),this}async parseAsync(f,$){let M=this._prepareUserArgs(f,$);return await this._parseCommand([],M),this}_executeSubCommand(f,$){$=$.slice();let M=!1,Y=[".js",".ts",".tsx",".mjs",".cjs"];function J(q,Q){let D=Yf.resolve(q,Q);if(i0.existsSync(D))return D;if(Y.includes(Yf.extname(Q)))return;let V=Y.find((W)=>i0.existsSync(`${D}${W}`));if(V)return`${D}${V}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let z=f._executableFile||`${this._name}-${f._name}`,Z=this._executableDir||"";if(this._scriptPath){let q;try{q=i0.realpathSync(this._scriptPath)}catch(Q){q=this._scriptPath}Z=Yf.resolve(Yf.dirname(q),Z)}if(Z){let q=J(Z,z);if(!q&&!f._executableFile&&this._scriptPath){let Q=Yf.basename(this._scriptPath,Yf.extname(this._scriptPath));if(Q!==this._name)q=J(Z,`${Q}-${f._name}`)}z=q||z}M=Y.includes(Yf.extname(z));let X;if(x.platform!=="win32")if(M)$.unshift(z),$=Y$(x.execArgv).concat($),X=n0.spawn(x.argv[0],$,{stdio:"inherit"});else X=n0.spawn(z,$,{stdio:"inherit"});else $.unshift(z),$=Y$(x.execArgv).concat($),X=n0.spawn(x.execPath,$,{stdio:"inherit"});if(!X.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((Q)=>{x.on(Q,()=>{if(X.killed===!1&&X.exitCode===null)X.kill(Q)})});let G=this._exitCallback;X.on("close",(q)=>{if(q=q??1,!G)x.exit(q);else G(new o0(q,"commander.executeSubCommandAsync","(close)"))}),X.on("error",(q)=>{if(q.code==="ENOENT"){let Q=Z?`searched for local subcommand relative to directory '${Z}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",D=`'${z}' does not exist
15
+ - if '${f._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
16
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
17
+ - ${Q}`;throw Error(D)}else if(q.code==="EACCES")throw Error(`'${z}' not executable`);if(!G)x.exit(1);else{let Q=new o0(1,"commander.executeSubCommandAsync","(error)");Q.nestedError=q,G(Q)}}),this.runningCommand=X}_dispatchSubcommand(f,$,M){let Y=this._findCommand(f);if(!Y)this.help({error:!0});let J;return J=this._chainOrCallSubCommandHook(J,Y,"preSubcommand"),J=this._chainOrCall(J,()=>{if(Y._executableHandler)this._executeSubCommand(Y,$.concat(M));else return Y._parseCommand($,M)}),J}_dispatchHelpCommand(f){if(!f)this.help();let $=this._findCommand(f);if($&&!$._executableHandler)$.help();return this._dispatchSubcommand(f,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){if(this.registeredArguments.forEach((f,$)=>{if(f.required&&this.args[$]==null)this.missingArgument(f.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 f=(M,Y,J)=>{let z=Y;if(Y!==null&&M.parseArg){let Z=`error: command-argument value '${Y}' is invalid for argument '${M.name()}'.`;z=this._callParseArg(M,Y,J,Z)}return z};this._checkNumberOfArguments();let $=[];this.registeredArguments.forEach((M,Y)=>{let J=M.defaultValue;if(M.variadic){if(Y<this.args.length){if(J=this.args.slice(Y),M.parseArg)J=J.reduce((z,Z)=>{return f(M,Z,z)},M.defaultValue)}else if(J===void 0)J=[]}else if(Y<this.args.length){if(J=this.args[Y],M.parseArg)J=f(M,J,M.defaultValue)}$[Y]=J}),this.processedArgs=$}_chainOrCall(f,$){if(f&&f.then&&typeof f.then==="function")return f.then(()=>$());return $()}_chainOrCallHooks(f,$){let M=f,Y=[];if(this._getCommandAndAncestors().reverse().filter((J)=>J._lifeCycleHooks[$]!==void 0).forEach((J)=>{J._lifeCycleHooks[$].forEach((z)=>{Y.push({hookedCommand:J,callback:z})})}),$==="postAction")Y.reverse();return Y.forEach((J)=>{M=this._chainOrCall(M,()=>{return J.callback(J.hookedCommand,this)})}),M}_chainOrCallSubCommandHook(f,$,M){let Y=f;if(this._lifeCycleHooks[M]!==void 0)this._lifeCycleHooks[M].forEach((J)=>{Y=this._chainOrCall(Y,()=>{return J(this,$)})});return Y}_parseCommand(f,$){let M=this.parseOptions($);if(this._parseOptionsEnv(),this._parseOptionsImplied(),f=f.concat(M.operands),$=M.unknown,this.args=f.concat($),f&&this._findCommand(f[0]))return this._dispatchSubcommand(f[0],f.slice(1),$);if(this._getHelpCommand()&&f[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(f[1]);if(this._defaultCommandName)return this._outputHelpIfRequested($),this._dispatchSubcommand(this._defaultCommandName,f,$);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});this._outputHelpIfRequested(M.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let Y=()=>{if(M.unknown.length>0)this.unknownOption(M.unknown[0])},J=`command:${this.name()}`;if(this._actionHandler){Y(),this._processArguments();let z;if(z=this._chainOrCallHooks(z,"preAction"),z=this._chainOrCall(z,()=>this._actionHandler(this.processedArgs)),this.parent)z=this._chainOrCall(z,()=>{this.parent.emit(J,f,$)});return z=this._chainOrCallHooks(z,"postAction"),z}if(this.parent&&this.parent.listenerCount(J))Y(),this._processArguments(),this.parent.emit(J,f,$);else if(f.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",f,$);if(this.listenerCount("command:*"))this.emit("command:*",f,$);else if(this.commands.length)this.unknownCommand();else Y(),this._processArguments()}else if(this.commands.length)Y(),this.help({error:!0});else Y(),this._processArguments()}_findCommand(f){if(!f)return;return this.commands.find(($)=>$._name===f||$._aliases.includes(f))}_findOption(f){return this.options.find(($)=>$.is(f))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((f)=>{f.options.forEach(($)=>{if($.mandatory&&f.getOptionValue($.attributeName())===void 0)f.missingMandatoryOptionValue($)})})}_checkForConflictingLocalOptions(){let f=this.options.filter((M)=>{let Y=M.attributeName();if(this.getOptionValue(Y)===void 0)return!1;return this.getOptionValueSource(Y)!=="default"});f.filter((M)=>M.conflictsWith.length>0).forEach((M)=>{let Y=f.find((J)=>M.conflictsWith.includes(J.attributeName()));if(Y)this._conflictingOption(M,Y)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((f)=>{f._checkForConflictingLocalOptions()})}parseOptions(f){let $=[],M=[],Y=$,J=f.slice();function z(X){return X.length>1&&X[0]==="-"}let Z=null;while(J.length){let X=J.shift();if(X==="--"){if(Y===M)Y.push(X);Y.push(...J);break}if(Z&&!z(X)){this.emit(`option:${Z.name()}`,X);continue}if(Z=null,z(X)){let G=this._findOption(X);if(G){if(G.required){let q=J.shift();if(q===void 0)this.optionMissingArgument(G);this.emit(`option:${G.name()}`,q)}else if(G.optional){let q=null;if(J.length>0&&!z(J[0]))q=J.shift();this.emit(`option:${G.name()}`,q)}else this.emit(`option:${G.name()}`);Z=G.variadic?G:null;continue}}if(X.length>2&&X[0]==="-"&&X[1]!=="-"){let G=this._findOption(`-${X[1]}`);if(G){if(G.required||G.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${G.name()}`,X.slice(2));else this.emit(`option:${G.name()}`),J.unshift(`-${X.slice(2)}`);continue}}if(/^--[^=]+=/.test(X)){let G=X.indexOf("="),q=this._findOption(X.slice(0,G));if(q&&(q.required||q.optional)){this.emit(`option:${q.name()}`,X.slice(G+1));continue}}if(z(X))Y=M;if((this._enablePositionalOptions||this._passThroughOptions)&&$.length===0&&M.length===0){if(this._findCommand(X)){if($.push(X),J.length>0)M.push(...J);break}else if(this._getHelpCommand()&&X===this._getHelpCommand().name()){if($.push(X),J.length>0)$.push(...J);break}else if(this._defaultCommandName){if(M.push(X),J.length>0)M.push(...J);break}}if(this._passThroughOptions){if(Y.push(X),J.length>0)Y.push(...J);break}Y.push(X)}return{operands:$,unknown:M}}opts(){if(this._storeOptionsAsProperties){let f={},$=this.options.length;for(let M=0;M<$;M++){let Y=this.options[M].attributeName();f[Y]=Y===this._versionOptionName?this._version:this[Y]}return f}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((f,$)=>Object.assign(f,$.opts()),{})}error(f,$){if(this._outputConfiguration.outputError(`${f}
18
+ `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
19
+ `);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
20
+ `),this.outputHelp({error:!0});let M=$||{},Y=M.exitCode||1,J=M.code||"commander.error";this._exit(Y,J,f)}_parseOptionsEnv(){this.options.forEach((f)=>{if(f.envVar&&f.envVar in x.env){let $=f.attributeName();if(this.getOptionValue($)===void 0||["default","config","env"].includes(this.getOptionValueSource($)))if(f.required||f.optional)this.emit(`optionEnv:${f.name()}`,x.env[f.envVar]);else this.emit(`optionEnv:${f.name()}`)}})}_parseOptionsImplied(){let f=new kJ(this.options),$=(M)=>{return this.getOptionValue(M)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(M))};this.options.filter((M)=>M.implied!==void 0&&$(M.attributeName())&&f.valueFromOption(this.getOptionValue(M.attributeName()),M)).forEach((M)=>{Object.keys(M.implied).filter((Y)=>!$(Y)).forEach((Y)=>{this.setOptionValueWithSource(Y,M.implied[Y],"implied")})})}missingArgument(f){let $=`error: missing required argument '${f}'`;this.error($,{code:"commander.missingArgument"})}optionMissingArgument(f){let $=`error: option '${f.flags}' argument missing`;this.error($,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(f){let $=`error: required option '${f.flags}' not specified`;this.error($,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(f,$){let M=(z)=>{let Z=z.attributeName(),X=this.getOptionValue(Z),G=this.options.find((Q)=>Q.negate&&Z===Q.attributeName()),q=this.options.find((Q)=>!Q.negate&&Z===Q.attributeName());if(G&&(G.presetArg===void 0&&X===!1||G.presetArg!==void 0&&X===G.presetArg))return G;return q||z},Y=(z)=>{let Z=M(z),X=Z.attributeName();if(this.getOptionValueSource(X)==="env")return`environment variable '${Z.envVar}'`;return`option '${Z.flags}'`},J=`error: ${Y(f)} cannot be used with ${Y($)}`;this.error(J,{code:"commander.conflictingOption"})}unknownOption(f){if(this._allowUnknownOption)return;let $="";if(f.startsWith("--")&&this._showSuggestionAfterError){let Y=[],J=this;do{let z=J.createHelp().visibleOptions(J).filter((Z)=>Z.long).map((Z)=>Z.long);Y=Y.concat(z),J=J.parent}while(J&&!J._enablePositionalOptions);$=M$(f,Y)}let M=`error: unknown option '${f}'${$}`;this.error(M,{code:"commander.unknownOption"})}_excessArguments(f){if(this._allowExcessArguments)return;let $=this.registeredArguments.length,M=$===1?"":"s",J=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${$} argument${M} but got ${f.length}.`;this.error(J,{code:"commander.excessArguments"})}unknownCommand(){let f=this.args[0],$="";if(this._showSuggestionAfterError){let Y=[];this.createHelp().visibleCommands(this).forEach((J)=>{if(Y.push(J.name()),J.alias())Y.push(J.alias())}),$=M$(f,Y)}let M=`error: unknown command '${f}'${$}`;this.error(M,{code:"commander.unknownCommand"})}version(f,$,M){if(f===void 0)return this._version;this._version=f,$=$||"-V, --version",M=M||"output the version number";let Y=this.createOption($,M);return this._versionOptionName=Y.attributeName(),this._registerOption(Y),this.on("option:"+Y.name(),()=>{this._outputConfiguration.writeOut(`${f}
21
+ `),this._exit(0,"commander.version",f)}),this}description(f,$){if(f===void 0&&$===void 0)return this._description;if(this._description=f,$)this._argsDescription=$;return this}summary(f){if(f===void 0)return this._summary;return this._summary=f,this}alias(f){if(f===void 0)return this._aliases[0];let $=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)$=this.commands[this.commands.length-1];if(f===$._name)throw Error("Command alias can't be the same as its name");let M=this.parent?._findCommand(f);if(M){let Y=[M.name()].concat(M.aliases()).join("|");throw Error(`cannot add alias '${f}' to command '${this.name()}' as already have command '${Y}'`)}return $._aliases.push(f),this}aliases(f){if(f===void 0)return this._aliases;return f.forEach(($)=>this.alias($)),this}usage(f){if(f===void 0){if(this._usage)return this._usage;let $=this.registeredArguments.map((M)=>{return xJ(M)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?$:[]).join(" ")}return this._usage=f,this}name(f){if(f===void 0)return this._name;return this._name=f,this}nameFromFilename(f){return this._name=Yf.basename(f,Yf.extname(f)),this}executableDir(f){if(f===void 0)return this._executableDir;return this._executableDir=f,this}helpInformation(f){let $=this.createHelp();if($.helpWidth===void 0)$.helpWidth=f&&f.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth();return $.formatHelp(this,$)}_getHelpContext(f){f=f||{};let $={error:!!f.error},M;if($.error)M=(Y)=>this._outputConfiguration.writeErr(Y);else M=(Y)=>this._outputConfiguration.writeOut(Y);return $.write=f.write||M,$.command=this,$}outputHelp(f){let $;if(typeof f==="function")$=f,f=void 0;let M=this._getHelpContext(f);this._getCommandAndAncestors().reverse().forEach((J)=>J.emit("beforeAllHelp",M)),this.emit("beforeHelp",M);let Y=this.helpInformation(M);if($){if(Y=$(Y),typeof Y!=="string"&&!Buffer.isBuffer(Y))throw Error("outputHelp callback must return a string or a Buffer")}if(M.write(Y),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",M),this._getCommandAndAncestors().forEach((J)=>J.emit("afterAllHelp",M))}helpOption(f,$){if(typeof f==="boolean"){if(f)this._helpOption=this._helpOption??void 0;else this._helpOption=null;return this}return f=f??"-h, --help",$=$??"display help for command",this._helpOption=this.createOption(f,$),this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(f){return this._helpOption=f,this}help(f){this.outputHelp(f);let $=x.exitCode||0;if($===0&&f&&typeof f!=="function"&&f.error)$=1;this._exit($,"commander.help","(outputHelp)")}addHelpText(f,$){let M=["beforeAll","before","after","afterAll"];if(!M.includes(f))throw Error(`Unexpected value for position to addHelpText.
22
+ Expecting one of '${M.join("', '")}'`);let Y=`${f}Help`;return this.on(Y,(J)=>{let z;if(typeof $==="function")z=$({error:J.error,command:J.command});else z=$;if(z)J.write(`${z}
23
+ `)}),this}_outputHelpIfRequested(f){let $=this._getHelpOption();if($&&f.find((Y)=>$.is(Y)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function Y$(f){return f.map(($)=>{if(!$.startsWith("--inspect"))return $;let M,Y="127.0.0.1",J="9229",z;if((z=$.match(/^(--inspect(-brk)?)$/))!==null)M=z[1];else if((z=$.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(M=z[1],/^\d+$/.test(z[3]))J=z[3];else Y=z[3];else if((z=$.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)M=z[1],Y=z[3],J=z[4];if(M&&J!=="0")return`${M}=${Y}:${parseInt(J)+1}`;return $})}CJ.Command=s0});var G$=S((EJ)=>{var{Argument:z$}=D0(),{Command:a0}=J$(),{CommanderError:vJ,InvalidArgumentError:Z$}=lf(),{Help:_J}=l0(),{Option:X$}=d0();EJ.program=new a0;EJ.createCommand=(f)=>new a0(f);EJ.createOption=(f,$)=>new X$(f,$);EJ.createArgument=(f,$)=>new z$(f,$);EJ.Command=a0;EJ.Option=X$;EJ.Argument=z$;EJ.Help=_J;EJ.CommanderError=vJ;EJ.InvalidArgumentError=Z$;EJ.InvalidOptionArgumentError=Z$});var $1=S((t0,f1)=>{(function(f,$){typeof t0=="object"&&typeof f1<"u"?f1.exports=$():typeof define=="function"&&define.amd?define($):(f=typeof globalThis<"u"?globalThis:f||self).dayjs=$()})(t0,function(){var f=1000,$=60000,M=3600000,Y="millisecond",J="second",z="minute",Z="hour",X="day",G="week",q="month",Q="quarter",D="year",V="date",W="Invalid Date",H=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,P={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var K=["th","st","nd","rd"],U=T%100;return"["+T+(K[(U-20)%10]||K[U]||K[0])+"]"}},A=function(T,K,U){var y=String(T);return!y||y.length>=K?T:""+Array(K+1-y.length).join(U)+T},i={s:A,z:function(T){var K=-T.utcOffset(),U=Math.abs(K),y=Math.floor(U/60),B=U%60;return(K<=0?"+":"-")+A(y,2,"0")+":"+A(B,2,"0")},m:function T(K,U){if(K.date()<U.date())return-T(U,K);var y=12*(U.year()-K.year())+(U.month()-K.month()),B=K.clone().add(y,q),w=U-B<0,j=K.clone().add(y+(w?-1:1),q);return+(-(y+(U-B)/(w?B-j:j-B))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:q,y:D,w:G,d:X,D:V,h:Z,m:z,s:J,ms:Y,Q}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},o="en",s={};s[o]=P;var rf="$isDayjsObject",l=function(T){return T instanceof m||!(!T||!T[rf])},wf=function T(K,U,y){var B;if(!K)return o;if(typeof K=="string"){var w=K.toLowerCase();s[w]&&(B=w),U&&(s[w]=U,B=w);var j=K.split("-");if(!B&&j.length>1)return T(j[0])}else{var O=K.name;s[O]=K,B=O}return!y&&B&&(o=B),B||!y&&o},k=function(T,K){if(l(T))return T.clone();var U=typeof K=="object"?K:{};return U.date=T,U.args=arguments,new m(U)},L=i;L.l=wf,L.i=l,L.w=function(T,K){return k(T,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var m=function(){function T(U){this.$L=wf(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[rf]=!0}var K=T.prototype;return K.parse=function(U){this.$d=function(y){var{date:B,utc:w}=y;if(B===null)return new Date(NaN);if(L.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var j=B.match(H);if(j){var O=j[2]-1||0,C=(j[7]||"0").substring(0,3);return w?new Date(Date.UTC(j[1],O,j[3]||1,j[4]||0,j[5]||0,j[6]||0,C)):new Date(j[1],O,j[3]||1,j[4]||0,j[5]||0,j[6]||0,C)}}return new Date(B)}(U),this.init()},K.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},K.$utils=function(){return L},K.isValid=function(){return this.$d.toString()!==W},K.isSame=function(U,y){var B=k(U);return this.startOf(y)<=B&&B<=this.endOf(y)},K.isAfter=function(U,y){return k(U)<this.startOf(y)},K.isBefore=function(U,y){return this.endOf(y)<k(U)},K.$g=function(U,y,B){return L.u(U)?this[y]:this.set(B,U)},K.unix=function(){return Math.floor(this.valueOf()/1000)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(U,y){var B=this,w=!!L.u(y)||y,j=L.p(U),O=function(Qf,r){var zf=L.w(B.$u?Date.UTC(B.$y,r,Qf):new Date(B.$y,r,Qf),B);return w?zf:zf.endOf(X)},C=function(Qf,r){return L.w(B.toDate()[Qf].apply(B.toDate("s"),(w?[0,0,0,0]:[23,59,59,999]).slice(r)),B)},_=this.$W,E=this.$M,d=this.$D,jf="set"+(this.$u?"UTC":"");switch(j){case D:return w?O(1,0):O(31,11);case q:return w?O(1,E):O(0,E+1);case G:var qf=this.$locale().weekStart||0,cf=(_<qf?_+7:_)-qf;return O(w?d-cf:d+(6-cf),E);case X:case V:return C(jf+"Hours",0);case Z:return C(jf+"Minutes",1);case z:return C(jf+"Seconds",2);case J:return C(jf+"Milliseconds",3);default:return this.clone()}},K.endOf=function(U){return this.startOf(U,!1)},K.$set=function(U,y){var B,w=L.p(U),j="set"+(this.$u?"UTC":""),O=(B={},B[X]=j+"Date",B[V]=j+"Date",B[q]=j+"Month",B[D]=j+"FullYear",B[Z]=j+"Hours",B[z]=j+"Minutes",B[J]=j+"Seconds",B[Y]=j+"Milliseconds",B)[w],C=w===X?this.$D+(y-this.$W):y;if(w===q||w===D){var _=this.clone().set(V,1);_.$d[O](C),_.init(),this.$d=_.set(V,Math.min(this.$D,_.daysInMonth())).$d}else O&&this.$d[O](C);return this.init(),this},K.set=function(U,y){return this.clone().$set(U,y)},K.get=function(U){return this[L.p(U)]()},K.add=function(U,y){var B,w=this;U=Number(U);var j=L.p(y),O=function(E){var d=k(w);return L.w(d.date(d.date()+Math.round(E*U)),w)};if(j===q)return this.set(q,this.$M+U);if(j===D)return this.set(D,this.$y+U);if(j===X)return O(1);if(j===G)return O(7);var C=(B={},B[z]=$,B[Z]=M,B[J]=f,B)[j]||1,_=this.$d.getTime()+U*C;return L.w(_,this)},K.subtract=function(U,y){return this.add(-1*U,y)},K.format=function(U){var y=this,B=this.$locale();if(!this.isValid())return B.invalidDate||W;var w=U||"YYYY-MM-DDTHH:mm:ssZ",j=L.z(this),O=this.$H,C=this.$m,_=this.$M,E=B.weekdays,d=B.months,jf=B.meridiem,qf=function(r,zf,pf,q0){return r&&(r[zf]||r(y,w))||pf[zf].slice(0,q0)},cf=function(r){return L.s(O%12||12,r,"0")},Qf=jf||function(r,zf,pf){var q0=r<12?"AM":"PM";return pf?q0.toLowerCase():q0};return w.replace(R,function(r,zf){return zf||function(pf){switch(pf){case"YY":return String(y.$y).slice(-2);case"YYYY":return L.s(y.$y,4,"0");case"M":return _+1;case"MM":return L.s(_+1,2,"0");case"MMM":return qf(B.monthsShort,_,d,3);case"MMMM":return qf(d,_);case"D":return y.$D;case"DD":return L.s(y.$D,2,"0");case"d":return String(y.$W);case"dd":return qf(B.weekdaysMin,y.$W,E,2);case"ddd":return qf(B.weekdaysShort,y.$W,E,3);case"dddd":return E[y.$W];case"H":return String(O);case"HH":return L.s(O,2,"0");case"h":return cf(1);case"hh":return cf(2);case"a":return Qf(O,C,!0);case"A":return Qf(O,C,!1);case"m":return String(C);case"mm":return L.s(C,2,"0");case"s":return String(y.$s);case"ss":return L.s(y.$s,2,"0");case"SSS":return L.s(y.$ms,3,"0");case"Z":return j}return null}(r)||j.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(U,y,B){var w,j=this,O=L.p(y),C=k(U),_=(C.utcOffset()-this.utcOffset())*$,E=this-C,d=function(){return L.m(j,C)};switch(O){case D:w=d()/12;break;case q:w=d();break;case Q:w=d()/3;break;case G:w=(E-_)/604800000;break;case X:w=(E-_)/86400000;break;case Z:w=E/M;break;case z:w=E/$;break;case J:w=E/f;break;default:w=E}return B?w:L.a(w)},K.daysInMonth=function(){return this.endOf(q).$D},K.$locale=function(){return s[this.$L]},K.locale=function(U,y){if(!U)return this.$L;var B=this.clone(),w=wf(U,y,!0);return w&&(B.$L=w),B},K.clone=function(){return L.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},T}(),Mf=m.prototype;return k.prototype=Mf,[["$ms",Y],["$s",J],["$m",z],["$H",Z],["$W",X],["$M",q],["$y",D],["$D",V]].forEach(function(T){Mf[T[1]]=function(K){return this.$g(K,T[0],T[1])}}),k.extend=function(T,K){return T.$i||(T(K,m,k),T.$i=!0),k},k.locale=wf,k.isDayjs=l,k.unix=function(T){return k(1000*T)},k.en=s[o],k.Ls=s,k.p={},k})});var V$=S((M1,Y1)=>{(function(f,$){typeof M1=="object"&&typeof Y1<"u"?Y1.exports=$($1()):typeof define=="function"&&define.amd?define(["dayjs"],$):(f=typeof globalThis<"u"?globalThis:f||self).dayjs_locale_zh_cn=$(f.dayjs)})(M1,function(f){function $(J){return J&&typeof J=="object"&&"default"in J?J:{default:J}}var M=$(f),Y={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(J,z){return z==="W"?J+"周":J+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(J,z){var Z=100*J+z;return Z<600?"凌晨":Z<900?"早上":Z<1100?"上午":Z<1300?"中午":Z<1800?"下午":"晚上"}};return M.default.locale(Y,null,!0),Y})});var of=S((h9,H$)=>{var aJ=Object.prototype.toString;H$.exports=function($){if($===void 0)return"undefined";if($===null)return"null";var M=typeof $;if(M==="boolean")return"boolean";if(M==="string")return"string";if(M==="number")return"number";if(M==="symbol")return"symbol";if(M==="function")return M5($)?"generatorfunction":"function";if(eJ($))return"array";if(z5($))return"buffer";if(J5($))return"arguments";if(f5($))return"date";if(tJ($))return"error";if($5($))return"regexp";switch(B$($)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(Y5($))return"generator";switch(M=aJ.call($),M){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return M.slice(8,-1).toLowerCase().replace(/\s/g,"")};function B$(f){return typeof f.constructor==="function"?f.constructor.name:null}function eJ(f){if(Array.isArray)return Array.isArray(f);return f instanceof Array}function tJ(f){return f instanceof Error||typeof f.message==="string"&&f.constructor&&typeof f.constructor.stackTraceLimit==="number"}function f5(f){if(f instanceof Date)return!0;return typeof f.toDateString==="function"&&typeof f.getDate==="function"&&typeof f.setDate==="function"}function $5(f){if(f instanceof RegExp)return!0;return typeof f.flags==="string"&&typeof f.ignoreCase==="boolean"&&typeof f.multiline==="boolean"&&typeof f.global==="boolean"}function M5(f,$){return B$(f)==="GeneratorFunction"}function Y5(f){return typeof f.throw==="function"&&typeof f.return==="function"&&typeof f.next==="function"}function J5(f){try{if(typeof f.length==="number"&&typeof f.callee==="function")return!0}catch($){if($.message.indexOf("callee")!==-1)return!0}return!1}function z5(f){if(f.constructor&&typeof f.constructor.isBuffer==="function")return f.constructor.isBuffer(f);return!1}});var S$=S((g9,y$)=>{/*!
24
+ * is-extendable <https://github.com/jonschlinkert/is-extendable>
25
+ *
26
+ * Copyright (c) 2015, Jon Schlinkert.
27
+ * Licensed under the MIT License.
28
+ */y$.exports=function($){return typeof $<"u"&&$!==null&&(typeof $==="object"||typeof $==="function")}});var T$=S((m9,P$)=>{var F$=S$();P$.exports=function($){if(!F$($))$={};var M=arguments.length;for(var Y=1;Y<M;Y++){var J=arguments[Y];if(F$(J))Z5($,J)}return $};function Z5(f,$){for(var M in $)if(X5($,M))f[M]=$[M]}function X5(f,$){return Object.prototype.hasOwnProperty.call(f,$)}});var R$=S((r9,j$)=>{var G5=of(),q5=T$();j$.exports=function(f,$){if(typeof $==="function")$={parse:$};var M=D5(f),Y={section_delimiter:"---",parse:V5},J=q5({},Y,$),z=J.section_delimiter,Z=M.content.split(/\r?\n/),X=null,G=w$(),q=[],Q=[];function D(A){M.content=A,X=[],q=[]}function V(A){if(Q.length)G.key=W5(Q[0],z),G.content=A,J.parse(G,X),X.push(G),G=w$(),q=[],Q=[]}for(var W=0;W<Z.length;W++){var H=Z[W],R=Q.length,P=H.trim();if(Q5(P,z)){if(P.length===3&&W!==0){if(R===0||R===2){q.push(H);continue}Q.push(P),G.data=q.join(`
29
+ `),q=[];continue}if(X===null)D(q.join(`
30
+ `));if(R===2)V(q.join(`
31
+ `));Q.push(P);continue}q.push(H)}if(X===null)D(q.join(`
32
+ `));else V(q.join(`
33
+ `));return M.sections=X,M};function Q5(f,$){if(f.slice(0,$.length)!==$)return!1;if(f.charAt($.length+1)===$.slice(-1))return!1;return!0}function D5(f){if(G5(f)!=="object")f={content:f};if(typeof f.content!=="string"&&!U5(f.content))throw TypeError("expected a buffer or string");return f.content=f.content.toString(),f.sections=[],f}function W5(f,$){return f?f.slice($.length).trim():""}function w$(){return{key:"",data:"",content:""}}function V5(f){return f}function U5(f){if(f&&f.constructor&&typeof f.constructor.isBuffer==="function")return f.constructor.isBuffer(f);return!1}});var Wf=S((F5,Df)=>{function L$(f){return typeof f>"u"||f===null}function K5(f){return typeof f==="object"&&f!==null}function B5(f){if(Array.isArray(f))return f;else if(L$(f))return[];return[f]}function H5(f,$){var M,Y,J,z;if($){z=Object.keys($);for(M=0,Y=z.length;M<Y;M+=1)J=z[M],f[J]=$[J]}return f}function y5(f,$){var M="",Y;for(Y=0;Y<$;Y+=1)M+=f;return M}function S5(f){return f===0&&Number.NEGATIVE_INFINITY===1/f}F5.isNothing=L$;F5.isObject=K5;F5.toArray=B5;F5.repeat=y5;F5.isNegativeZero=S5;F5.extend=H5});var Rf=S((c9,A$)=>{function sf(f,$){if(Error.call(this),this.name="YAMLException",this.reason=f,this.mark=$,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}sf.prototype=Object.create(Error.prototype);sf.prototype.constructor=sf;sf.prototype.toString=function($){var M=this.name+": ";if(M+=this.reason||"(unknown reason)",!$&&this.mark)M+=" "+this.mark.toString();return M};A$.exports=sf});var x$=S((p9,O$)=>{var N$=Wf();function J1(f,$,M,Y,J){this.name=f,this.buffer=$,this.position=M,this.line=Y,this.column=J}J1.prototype.getSnippet=function($,M){var Y,J,z,Z,X;if(!this.buffer)return null;$=$||4,M=M||75,Y="",J=this.position;while(J>0&&`\x00\r
34
+ …\u2028\u2029`.indexOf(this.buffer.charAt(J-1))===-1)if(J-=1,this.position-J>M/2-1){Y=" ... ",J+=5;break}z="",Z=this.position;while(Z<this.buffer.length&&`\x00\r
35
+ …\u2028\u2029`.indexOf(this.buffer.charAt(Z))===-1)if(Z+=1,Z-this.position>M/2-1){z=" ... ",Z-=5;break}return X=this.buffer.slice(J,Z),N$.repeat(" ",$)+Y+X+z+`
36
+ `+N$.repeat(" ",$+this.position-J+Y.length)+"^"};J1.prototype.toString=function($){var M,Y="";if(this.name)Y+='in "'+this.name+'" ';if(Y+="at line "+(this.line+1)+", column "+(this.column+1),!$){if(M=this.getSnippet(),M)Y+=`:
37
+ `+M}return Y};O$.exports=J1});var v=S((l9,k$)=>{var I$=Rf(),A5=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],N5=["scalar","sequence","mapping"];function O5(f){var $={};if(f!==null)Object.keys(f).forEach(function(M){f[M].forEach(function(Y){$[String(Y)]=M})});return $}function x5(f,$){if($=$||{},Object.keys($).forEach(function(M){if(A5.indexOf(M)===-1)throw new I$('Unknown option "'+M+'" is met in definition of "'+f+'" YAML type.')}),this.tag=f,this.kind=$.kind||null,this.resolve=$.resolve||function(){return!0},this.construct=$.construct||function(M){return M},this.instanceOf=$.instanceOf||null,this.predicate=$.predicate||null,this.represent=$.represent||null,this.defaultStyle=$.defaultStyle||null,this.styleAliases=O5($.styleAliases||null),N5.indexOf(this.kind)===-1)throw new I$('Unknown kind "'+this.kind+'" is specified for "'+f+'" YAML type.')}k$.exports=x5});var Vf=S((d9,b$)=>{var C$=Wf(),B0=Rf(),I5=v();function z1(f,$,M){var Y=[];return f.include.forEach(function(J){M=z1(J,$,M)}),f[$].forEach(function(J){M.forEach(function(z,Z){if(z.tag===J.tag&&z.kind===J.kind)Y.push(Z)}),M.push(J)}),M.filter(function(J,z){return Y.indexOf(z)===-1})}function k5(){var f={scalar:{},sequence:{},mapping:{},fallback:{}},$,M;function Y(J){f[J.kind][J.tag]=f.fallback[J.tag]=J}for($=0,M=arguments.length;$<M;$+=1)arguments[$].forEach(Y);return f}function Lf(f){this.include=f.include||[],this.implicit=f.implicit||[],this.explicit=f.explicit||[],this.implicit.forEach(function($){if($.loadKind&&$.loadKind!=="scalar")throw new B0("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=z1(this,"implicit",[]),this.compiledExplicit=z1(this,"explicit",[]),this.compiledTypeMap=k5(this.compiledImplicit,this.compiledExplicit)}Lf.DEFAULT=null;Lf.create=function(){var $,M;switch(arguments.length){case 1:$=Lf.DEFAULT,M=arguments[0];break;case 2:$=arguments[0],M=arguments[1];break;default:throw new B0("Wrong number of arguments for Schema.create function")}if($=C$.toArray($),M=C$.toArray(M),!$.every(function(Y){return Y instanceof Lf}))throw new B0("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!M.every(function(Y){return Y instanceof I5}))throw new B0("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Lf({include:$,explicit:M})};b$.exports=Lf});var _$=S((n9,v$)=>{var C5=v();v$.exports=new C5("tag:yaml.org,2002:str",{kind:"scalar",construct:function(f){return f!==null?f:""}})});var u$=S((i9,E$)=>{var b5=v();E$.exports=new b5("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(f){return f!==null?f:[]}})});var g$=S((o9,h$)=>{var v5=v();h$.exports=new v5("tag:yaml.org,2002:map",{kind:"mapping",construct:function(f){return f!==null?f:{}}})});var H0=S((s9,m$)=>{var _5=Vf();m$.exports=new _5({explicit:[_$(),u$(),g$()]})});var c$=S((a9,r$)=>{var E5=v();function u5(f){if(f===null)return!0;var $=f.length;return $===1&&f==="~"||$===4&&(f==="null"||f==="Null"||f==="NULL")}function h5(){return null}function g5(f){return f===null}r$.exports=new E5("tag:yaml.org,2002:null",{kind:"scalar",resolve:u5,construct:h5,predicate:g5,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var l$=S((e9,p$)=>{var m5=v();function r5(f){if(f===null)return!1;var $=f.length;return $===4&&(f==="true"||f==="True"||f==="TRUE")||$===5&&(f==="false"||f==="False"||f==="FALSE")}function c5(f){return f==="true"||f==="True"||f==="TRUE"}function p5(f){return Object.prototype.toString.call(f)==="[object Boolean]"}p$.exports=new m5("tag:yaml.org,2002:bool",{kind:"scalar",resolve:r5,construct:c5,predicate:p5,represent:{lowercase:function(f){return f?"true":"false"},uppercase:function(f){return f?"TRUE":"FALSE"},camelcase:function(f){return f?"True":"False"}},defaultStyle:"lowercase"})});var n$=S((t9,d$)=>{var l5=Wf(),d5=v();function n5(f){return 48<=f&&f<=57||65<=f&&f<=70||97<=f&&f<=102}function i5(f){return 48<=f&&f<=55}function o5(f){return 48<=f&&f<=57}function s5(f){if(f===null)return!1;var $=f.length,M=0,Y=!1,J;if(!$)return!1;if(J=f[M],J==="-"||J==="+")J=f[++M];if(J==="0"){if(M+1===$)return!0;if(J=f[++M],J==="b"){M++;for(;M<$;M++){if(J=f[M],J==="_")continue;if(J!=="0"&&J!=="1")return!1;Y=!0}return Y&&J!=="_"}if(J==="x"){M++;for(;M<$;M++){if(J=f[M],J==="_")continue;if(!n5(f.charCodeAt(M)))return!1;Y=!0}return Y&&J!=="_"}for(;M<$;M++){if(J=f[M],J==="_")continue;if(!i5(f.charCodeAt(M)))return!1;Y=!0}return Y&&J!=="_"}if(J==="_")return!1;for(;M<$;M++){if(J=f[M],J==="_")continue;if(J===":")break;if(!o5(f.charCodeAt(M)))return!1;Y=!0}if(!Y||J==="_")return!1;if(J!==":")return!0;return/^(:[0-5]?[0-9])+$/.test(f.slice(M))}function a5(f){var $=f,M=1,Y,J,z=[];if($.indexOf("_")!==-1)$=$.replace(/_/g,"");if(Y=$[0],Y==="-"||Y==="+"){if(Y==="-")M=-1;$=$.slice(1),Y=$[0]}if($==="0")return 0;if(Y==="0"){if($[1]==="b")return M*parseInt($.slice(2),2);if($[1]==="x")return M*parseInt($,16);return M*parseInt($,8)}if($.indexOf(":")!==-1)return $.split(":").forEach(function(Z){z.unshift(parseInt(Z,10))}),$=0,J=1,z.forEach(function(Z){$+=Z*J,J*=60}),M*$;return M*parseInt($,10)}function e5(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1===0&&!l5.isNegativeZero(f))}d$.exports=new d5("tag:yaml.org,2002:int",{kind:"scalar",resolve:s5,construct:a5,predicate:e5,represent:{binary:function(f){return f>=0?"0b"+f.toString(2):"-0b"+f.toString(2).slice(1)},octal:function(f){return f>=0?"0"+f.toString(8):"-0"+f.toString(8).slice(1)},decimal:function(f){return f.toString(10)},hexadecimal:function(f){return f>=0?"0x"+f.toString(16).toUpperCase():"-0x"+f.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var s$=S((fZ,o$)=>{var i$=Wf(),t5=v(),fz=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function $z(f){if(f===null)return!1;if(!fz.test(f)||f[f.length-1]==="_")return!1;return!0}function Mz(f){var $,M,Y,J;if($=f.replace(/_/g,"").toLowerCase(),M=$[0]==="-"?-1:1,J=[],"+-".indexOf($[0])>=0)$=$.slice(1);if($===".inf")return M===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if($===".nan")return NaN;else if($.indexOf(":")>=0)return $.split(":").forEach(function(z){J.unshift(parseFloat(z,10))}),$=0,Y=1,J.forEach(function(z){$+=z*Y,Y*=60}),M*$;return M*parseFloat($,10)}var Yz=/^[-+]?[0-9]+e/;function Jz(f,$){var M;if(isNaN(f))switch($){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===f)switch($){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===f)switch($){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i$.isNegativeZero(f))return"-0.0";return M=f.toString(10),Yz.test(M)?M.replace("e",".e"):M}function zz(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1!==0||i$.isNegativeZero(f))}o$.exports=new t5("tag:yaml.org,2002:float",{kind:"scalar",resolve:$z,construct:Mz,predicate:zz,represent:Jz,defaultStyle:"lowercase"})});var Z1=S(($Z,a$)=>{var Zz=Vf();a$.exports=new Zz({include:[H0()],implicit:[c$(),l$(),n$(),s$()]})});var X1=S((MZ,e$)=>{var Xz=Vf();e$.exports=new Xz({include:[Z1()]})});var M2=S((YZ,$2)=>{var Gz=v(),t$=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),f2=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function qz(f){if(f===null)return!1;if(t$.exec(f)!==null)return!0;if(f2.exec(f)!==null)return!0;return!1}function Qz(f){var $,M,Y,J,z,Z,X,G=0,q=null,Q,D,V;if($=t$.exec(f),$===null)$=f2.exec(f);if($===null)throw Error("Date resolve error");if(M=+$[1],Y=+$[2]-1,J=+$[3],!$[4])return new Date(Date.UTC(M,Y,J));if(z=+$[4],Z=+$[5],X=+$[6],$[7]){G=$[7].slice(0,3);while(G.length<3)G+="0";G=+G}if($[9]){if(Q=+$[10],D=+($[11]||0),q=(Q*60+D)*60000,$[9]==="-")q=-q}if(V=new Date(Date.UTC(M,Y,J,z,Z,X,G)),q)V.setTime(V.getTime()-q);return V}function Dz(f){return f.toISOString()}$2.exports=new Gz("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:qz,construct:Qz,instanceOf:Date,represent:Dz})});var J2=S((JZ,Y2)=>{var Wz=v();function Vz(f){return f==="<<"||f===null}Y2.exports=new Wz("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Vz})});var Z2=S((zZ,z2)=>{var Uf;try{G1=e,Uf=G1("buffer").Buffer}catch(f){}var G1,Uz=v(),q1=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
38
+ \r`;function Kz(f){if(f===null)return!1;var $,M,Y=0,J=f.length,z=q1;for(M=0;M<J;M++){if($=z.indexOf(f.charAt(M)),$>64)continue;if($<0)return!1;Y+=6}return Y%8===0}function Bz(f){var $,M,Y=f.replace(/[\r\n=]/g,""),J=Y.length,z=q1,Z=0,X=[];for($=0;$<J;$++){if($%4===0&&$)X.push(Z>>16&255),X.push(Z>>8&255),X.push(Z&255);Z=Z<<6|z.indexOf(Y.charAt($))}if(M=J%4*6,M===0)X.push(Z>>16&255),X.push(Z>>8&255),X.push(Z&255);else if(M===18)X.push(Z>>10&255),X.push(Z>>2&255);else if(M===12)X.push(Z>>4&255);if(Uf)return Uf.from?Uf.from(X):new Uf(X);return X}function Hz(f){var $="",M=0,Y,J,z=f.length,Z=q1;for(Y=0;Y<z;Y++){if(Y%3===0&&Y)$+=Z[M>>18&63],$+=Z[M>>12&63],$+=Z[M>>6&63],$+=Z[M&63];M=(M<<8)+f[Y]}if(J=z%3,J===0)$+=Z[M>>18&63],$+=Z[M>>12&63],$+=Z[M>>6&63],$+=Z[M&63];else if(J===2)$+=Z[M>>10&63],$+=Z[M>>4&63],$+=Z[M<<2&63],$+=Z[64];else if(J===1)$+=Z[M>>2&63],$+=Z[M<<4&63],$+=Z[64],$+=Z[64];return $}function yz(f){return Uf&&Uf.isBuffer(f)}z2.exports=new Uz("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Kz,construct:Bz,predicate:yz,represent:Hz})});var G2=S((XZ,X2)=>{var Sz=v(),Fz=Object.prototype.hasOwnProperty,Pz=Object.prototype.toString;function Tz(f){if(f===null)return!0;var $=[],M,Y,J,z,Z,X=f;for(M=0,Y=X.length;M<Y;M+=1){if(J=X[M],Z=!1,Pz.call(J)!=="[object Object]")return!1;for(z in J)if(Fz.call(J,z))if(!Z)Z=!0;else return!1;if(!Z)return!1;if($.indexOf(z)===-1)$.push(z);else return!1}return!0}function wz(f){return f!==null?f:[]}X2.exports=new Sz("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Tz,construct:wz})});var Q2=S((GZ,q2)=>{var jz=v(),Rz=Object.prototype.toString;function Lz(f){if(f===null)return!0;var $,M,Y,J,z,Z=f;z=Array(Z.length);for($=0,M=Z.length;$<M;$+=1){if(Y=Z[$],Rz.call(Y)!=="[object Object]")return!1;if(J=Object.keys(Y),J.length!==1)return!1;z[$]=[J[0],Y[J[0]]]}return!0}function Az(f){if(f===null)return[];var $,M,Y,J,z,Z=f;z=Array(Z.length);for($=0,M=Z.length;$<M;$+=1)Y=Z[$],J=Object.keys(Y),z[$]=[J[0],Y[J[0]]];return z}q2.exports=new jz("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Lz,construct:Az})});var W2=S((qZ,D2)=>{var Nz=v(),Oz=Object.prototype.hasOwnProperty;function xz(f){if(f===null)return!0;var $,M=f;for($ in M)if(Oz.call(M,$)){if(M[$]!==null)return!1}return!0}function Iz(f){return f!==null?f:{}}D2.exports=new Nz("tag:yaml.org,2002:set",{kind:"mapping",resolve:xz,construct:Iz})});var Af=S((QZ,V2)=>{var kz=Vf();V2.exports=new kz({include:[X1()],implicit:[M2(),J2()],explicit:[Z2(),G2(),Q2(),W2()]})});var K2=S((DZ,U2)=>{var Cz=v();function bz(){return!0}function vz(){return}function _z(){return""}function Ez(f){return typeof f>"u"}U2.exports=new Cz("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:bz,construct:vz,predicate:Ez,represent:_z})});var H2=S((WZ,B2)=>{var uz=v();function hz(f){if(f===null)return!1;if(f.length===0)return!1;var $=f,M=/\/([gim]*)$/.exec(f),Y="";if($[0]==="/"){if(M)Y=M[1];if(Y.length>3)return!1;if($[$.length-Y.length-1]!=="/")return!1}return!0}function gz(f){var $=f,M=/\/([gim]*)$/.exec(f),Y="";if($[0]==="/"){if(M)Y=M[1];$=$.slice(1,$.length-Y.length-1)}return new RegExp($,Y)}function mz(f){var $="/"+f.source+"/";if(f.global)$+="g";if(f.multiline)$+="m";if(f.ignoreCase)$+="i";return $}function rz(f){return Object.prototype.toString.call(f)==="[object RegExp]"}B2.exports=new uz("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:hz,construct:gz,predicate:rz,represent:mz})});var S2=S((VZ,y2)=>{var y0;try{Q1=e,y0=Q1("esprima")}catch(f){if(typeof window<"u")y0=window.esprima}var Q1,cz=v();function pz(f){if(f===null)return!1;try{var $="("+f+")",M=y0.parse($,{range:!0});if(M.type!=="Program"||M.body.length!==1||M.body[0].type!=="ExpressionStatement"||M.body[0].expression.type!=="ArrowFunctionExpression"&&M.body[0].expression.type!=="FunctionExpression")return!1;return!0}catch(Y){return!1}}function lz(f){var $="("+f+")",M=y0.parse($,{range:!0}),Y=[],J;if(M.type!=="Program"||M.body.length!==1||M.body[0].type!=="ExpressionStatement"||M.body[0].expression.type!=="ArrowFunctionExpression"&&M.body[0].expression.type!=="FunctionExpression")throw Error("Failed to resolve function");if(M.body[0].expression.params.forEach(function(z){Y.push(z.name)}),J=M.body[0].expression.body.range,M.body[0].expression.body.type==="BlockStatement")return Function(Y,$.slice(J[0]+1,J[1]-1));return Function(Y,"return "+$.slice(J[0],J[1]))}function dz(f){return f.toString()}function nz(f){return Object.prototype.toString.call(f)==="[object Function]"}y2.exports=new cz("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:pz,construct:lz,predicate:nz,represent:dz})});var af=S((KZ,P2)=>{var F2=Vf();P2.exports=F2.DEFAULT=new F2({include:[Af()],explicit:[K2(),H2(),S2()]})});var m2=S((H6,ef)=>{var Jf=Wf(),N2=Rf(),iz=x$(),O2=Af(),oz=af(),Gf=Object.prototype.hasOwnProperty,S0=1,x2=2,I2=3,F0=4,D1=1,sz=2,T2=3,az=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ez=/[\x85\u2028\u2029]/,tz=/[,\[\]\{\}]/,k2=/^(?:!|!!|![a-z\-]+!)$/i,C2=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function w2(f){return Object.prototype.toString.call(f)}function t(f){return f===10||f===13}function Kf(f){return f===9||f===32}function c(f){return f===9||f===32||f===10||f===13}function Nf(f){return f===44||f===91||f===93||f===123||f===125}function f6(f){var $;if(48<=f&&f<=57)return f-48;if($=f|32,97<=$&&$<=102)return $-97+10;return-1}function $6(f){if(f===120)return 2;if(f===117)return 4;if(f===85)return 8;return 0}function M6(f){if(48<=f&&f<=57)return f-48;return-1}function j2(f){return f===48?"\x00":f===97?"\x07":f===98?"\b":f===116?"\t":f===9?"\t":f===110?`
39
+ `:f===118?"\v":f===102?"\f":f===114?"\r":f===101?"\x1B":f===32?" ":f===34?'"':f===47?"/":f===92?"\\":f===78?"…":f===95?" ":f===76?"\u2028":f===80?"\u2029":""}function Y6(f){if(f<=65535)return String.fromCharCode(f);return String.fromCharCode((f-65536>>10)+55296,(f-65536&1023)+56320)}function b2(f,$,M){if($==="__proto__")Object.defineProperty(f,$,{configurable:!0,enumerable:!0,writable:!0,value:M});else f[$]=M}var v2=Array(256),_2=Array(256);for(Zf=0;Zf<256;Zf++)v2[Zf]=j2(Zf)?1:0,_2[Zf]=j2(Zf);var Zf;function J6(f,$){this.input=f,this.filename=$.filename||null,this.schema=$.schema||oz,this.onWarning=$.onWarning||null,this.legacy=$.legacy||!1,this.json=$.json||!1,this.listener=$.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=f.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function E2(f,$){return new N2($,new iz(f.filename,f.input,f.position,f.line,f.position-f.lineStart))}function F(f,$){throw E2(f,$)}function P0(f,$){if(f.onWarning)f.onWarning.call(null,E2(f,$))}var R2={YAML:function($,M,Y){var J,z,Z;if($.version!==null)F($,"duplication of %YAML directive");if(Y.length!==1)F($,"YAML directive accepts exactly one argument");if(J=/^([0-9]+)\.([0-9]+)$/.exec(Y[0]),J===null)F($,"ill-formed argument of the YAML directive");if(z=parseInt(J[1],10),Z=parseInt(J[2],10),z!==1)F($,"unacceptable YAML version of the document");if($.version=Y[0],$.checkLineBreaks=Z<2,Z!==1&&Z!==2)P0($,"unsupported YAML version of the document")},TAG:function($,M,Y){var J,z;if(Y.length!==2)F($,"TAG directive accepts exactly two arguments");if(J=Y[0],z=Y[1],!k2.test(J))F($,"ill-formed tag handle (first argument) of the TAG directive");if(Gf.call($.tagMap,J))F($,'there is a previously declared suffix for "'+J+'" tag handle');if(!C2.test(z))F($,"ill-formed tag prefix (second argument) of the TAG directive");$.tagMap[J]=z}};function Xf(f,$,M,Y){var J,z,Z,X;if($<M){if(X=f.input.slice($,M),Y){for(J=0,z=X.length;J<z;J+=1)if(Z=X.charCodeAt(J),!(Z===9||32<=Z&&Z<=1114111))F(f,"expected valid JSON character")}else if(az.test(X))F(f,"the stream contains non-printable characters");f.result+=X}}function L2(f,$,M,Y){var J,z,Z,X;if(!Jf.isObject(M))F(f,"cannot merge mappings; the provided source object is unacceptable");J=Object.keys(M);for(Z=0,X=J.length;Z<X;Z+=1)if(z=J[Z],!Gf.call($,z))b2($,z,M[z]),Y[z]=!0}function Of(f,$,M,Y,J,z,Z,X){var G,q;if(Array.isArray(J)){J=Array.prototype.slice.call(J);for(G=0,q=J.length;G<q;G+=1){if(Array.isArray(J[G]))F(f,"nested arrays are not supported inside keys");if(typeof J==="object"&&w2(J[G])==="[object Object]")J[G]="[object Object]"}}if(typeof J==="object"&&w2(J)==="[object Object]")J="[object Object]";if(J=String(J),$===null)$={};if(Y==="tag:yaml.org,2002:merge")if(Array.isArray(z))for(G=0,q=z.length;G<q;G+=1)L2(f,$,z[G],M);else L2(f,$,z,M);else{if(!f.json&&!Gf.call(M,J)&&Gf.call($,J))f.line=Z||f.line,f.position=X||f.position,F(f,"duplicated mapping key");b2($,J,z),delete M[J]}return $}function W1(f){var $=f.input.charCodeAt(f.position);if($===10)f.position++;else if($===13){if(f.position++,f.input.charCodeAt(f.position)===10)f.position++}else F(f,"a line break is expected");f.line+=1,f.lineStart=f.position}function b(f,$,M){var Y=0,J=f.input.charCodeAt(f.position);while(J!==0){while(Kf(J))J=f.input.charCodeAt(++f.position);if($&&J===35)do J=f.input.charCodeAt(++f.position);while(J!==10&&J!==13&&J!==0);if(t(J)){W1(f),J=f.input.charCodeAt(f.position),Y++,f.lineIndent=0;while(J===32)f.lineIndent++,J=f.input.charCodeAt(++f.position)}else break}if(M!==-1&&Y!==0&&f.lineIndent<M)P0(f,"deficient indentation");return Y}function T0(f){var $=f.position,M;if(M=f.input.charCodeAt($),(M===45||M===46)&&M===f.input.charCodeAt($+1)&&M===f.input.charCodeAt($+2)){if($+=3,M=f.input.charCodeAt($),M===0||c(M))return!0}return!1}function V1(f,$){if($===1)f.result+=" ";else if($>1)f.result+=Jf.repeat(`
40
+ `,$-1)}function z6(f,$,M){var Y,J,z,Z,X,G,q,Q,D=f.kind,V=f.result,W;if(W=f.input.charCodeAt(f.position),c(W)||Nf(W)||W===35||W===38||W===42||W===33||W===124||W===62||W===39||W===34||W===37||W===64||W===96)return!1;if(W===63||W===45){if(J=f.input.charCodeAt(f.position+1),c(J)||M&&Nf(J))return!1}f.kind="scalar",f.result="",z=Z=f.position,X=!1;while(W!==0){if(W===58){if(J=f.input.charCodeAt(f.position+1),c(J)||M&&Nf(J))break}else if(W===35){if(Y=f.input.charCodeAt(f.position-1),c(Y))break}else if(f.position===f.lineStart&&T0(f)||M&&Nf(W))break;else if(t(W))if(G=f.line,q=f.lineStart,Q=f.lineIndent,b(f,!1,-1),f.lineIndent>=$){X=!0,W=f.input.charCodeAt(f.position);continue}else{f.position=Z,f.line=G,f.lineStart=q,f.lineIndent=Q;break}if(X)Xf(f,z,Z,!1),V1(f,f.line-G),z=Z=f.position,X=!1;if(!Kf(W))Z=f.position+1;W=f.input.charCodeAt(++f.position)}if(Xf(f,z,Z,!1),f.result)return!0;return f.kind=D,f.result=V,!1}function Z6(f,$){var M,Y,J;if(M=f.input.charCodeAt(f.position),M!==39)return!1;f.kind="scalar",f.result="",f.position++,Y=J=f.position;while((M=f.input.charCodeAt(f.position))!==0)if(M===39)if(Xf(f,Y,f.position,!0),M=f.input.charCodeAt(++f.position),M===39)Y=f.position,f.position++,J=f.position;else return!0;else if(t(M))Xf(f,Y,J,!0),V1(f,b(f,!1,$)),Y=J=f.position;else if(f.position===f.lineStart&&T0(f))F(f,"unexpected end of the document within a single quoted scalar");else f.position++,J=f.position;F(f,"unexpected end of the stream within a single quoted scalar")}function X6(f,$){var M,Y,J,z,Z,X;if(X=f.input.charCodeAt(f.position),X!==34)return!1;f.kind="scalar",f.result="",f.position++,M=Y=f.position;while((X=f.input.charCodeAt(f.position))!==0)if(X===34)return Xf(f,M,f.position,!0),f.position++,!0;else if(X===92){if(Xf(f,M,f.position,!0),X=f.input.charCodeAt(++f.position),t(X))b(f,!1,$);else if(X<256&&v2[X])f.result+=_2[X],f.position++;else if((Z=$6(X))>0){J=Z,z=0;for(;J>0;J--)if(X=f.input.charCodeAt(++f.position),(Z=f6(X))>=0)z=(z<<4)+Z;else F(f,"expected hexadecimal character");f.result+=Y6(z),f.position++}else F(f,"unknown escape sequence");M=Y=f.position}else if(t(X))Xf(f,M,Y,!0),V1(f,b(f,!1,$)),M=Y=f.position;else if(f.position===f.lineStart&&T0(f))F(f,"unexpected end of the document within a double quoted scalar");else f.position++,Y=f.position;F(f,"unexpected end of the stream within a double quoted scalar")}function G6(f,$){var M=!0,Y,J=f.tag,z,Z=f.anchor,X,G,q,Q,D,V={},W,H,R,P;if(P=f.input.charCodeAt(f.position),P===91)G=93,D=!1,z=[];else if(P===123)G=125,D=!0,z={};else return!1;if(f.anchor!==null)f.anchorMap[f.anchor]=z;P=f.input.charCodeAt(++f.position);while(P!==0){if(b(f,!0,$),P=f.input.charCodeAt(f.position),P===G)return f.position++,f.tag=J,f.anchor=Z,f.kind=D?"mapping":"sequence",f.result=z,!0;else if(!M)F(f,"missed comma between flow collection entries");if(H=W=R=null,q=Q=!1,P===63){if(X=f.input.charCodeAt(f.position+1),c(X))q=Q=!0,f.position++,b(f,!0,$)}if(Y=f.line,xf(f,$,S0,!1,!0),H=f.tag,W=f.result,b(f,!0,$),P=f.input.charCodeAt(f.position),(Q||f.line===Y)&&P===58)q=!0,P=f.input.charCodeAt(++f.position),b(f,!0,$),xf(f,$,S0,!1,!0),R=f.result;if(D)Of(f,z,V,H,W,R);else if(q)z.push(Of(f,null,V,H,W,R));else z.push(W);if(b(f,!0,$),P=f.input.charCodeAt(f.position),P===44)M=!0,P=f.input.charCodeAt(++f.position);else M=!1}F(f,"unexpected end of the stream within a flow collection")}function q6(f,$){var M,Y,J=D1,z=!1,Z=!1,X=$,G=0,q=!1,Q,D;if(D=f.input.charCodeAt(f.position),D===124)Y=!1;else if(D===62)Y=!0;else return!1;f.kind="scalar",f.result="";while(D!==0)if(D=f.input.charCodeAt(++f.position),D===43||D===45)if(D1===J)J=D===43?T2:sz;else F(f,"repeat of a chomping mode identifier");else if((Q=M6(D))>=0)if(Q===0)F(f,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!Z)X=$+Q-1,Z=!0;else F(f,"repeat of an indentation width identifier");else break;if(Kf(D)){do D=f.input.charCodeAt(++f.position);while(Kf(D));if(D===35)do D=f.input.charCodeAt(++f.position);while(!t(D)&&D!==0)}while(D!==0){W1(f),f.lineIndent=0,D=f.input.charCodeAt(f.position);while((!Z||f.lineIndent<X)&&D===32)f.lineIndent++,D=f.input.charCodeAt(++f.position);if(!Z&&f.lineIndent>X)X=f.lineIndent;if(t(D)){G++;continue}if(f.lineIndent<X){if(J===T2)f.result+=Jf.repeat(`
41
+ `,z?1+G:G);else if(J===D1){if(z)f.result+=`
42
+ `}break}if(Y)if(Kf(D))q=!0,f.result+=Jf.repeat(`
43
+ `,z?1+G:G);else if(q)q=!1,f.result+=Jf.repeat(`
44
+ `,G+1);else if(G===0){if(z)f.result+=" "}else f.result+=Jf.repeat(`
45
+ `,G);else f.result+=Jf.repeat(`
46
+ `,z?1+G:G);z=!0,Z=!0,G=0,M=f.position;while(!t(D)&&D!==0)D=f.input.charCodeAt(++f.position);Xf(f,M,f.position,!1)}return!0}function A2(f,$){var M,Y=f.tag,J=f.anchor,z=[],Z,X=!1,G;if(f.anchor!==null)f.anchorMap[f.anchor]=z;G=f.input.charCodeAt(f.position);while(G!==0){if(G!==45)break;if(Z=f.input.charCodeAt(f.position+1),!c(Z))break;if(X=!0,f.position++,b(f,!0,-1)){if(f.lineIndent<=$){z.push(null),G=f.input.charCodeAt(f.position);continue}}if(M=f.line,xf(f,$,I2,!1,!0),z.push(f.result),b(f,!0,-1),G=f.input.charCodeAt(f.position),(f.line===M||f.lineIndent>$)&&G!==0)F(f,"bad indentation of a sequence entry");else if(f.lineIndent<$)break}if(X)return f.tag=Y,f.anchor=J,f.kind="sequence",f.result=z,!0;return!1}function Q6(f,$,M){var Y,J,z,Z,X=f.tag,G=f.anchor,q={},Q={},D=null,V=null,W=null,H=!1,R=!1,P;if(f.anchor!==null)f.anchorMap[f.anchor]=q;P=f.input.charCodeAt(f.position);while(P!==0){if(Y=f.input.charCodeAt(f.position+1),z=f.line,Z=f.position,(P===63||P===58)&&c(Y)){if(P===63){if(H)Of(f,q,Q,D,V,null),D=V=W=null;R=!0,H=!0,J=!0}else if(H)H=!1,J=!0;else F(f,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");f.position+=1,P=Y}else if(xf(f,M,x2,!1,!0))if(f.line===z){P=f.input.charCodeAt(f.position);while(Kf(P))P=f.input.charCodeAt(++f.position);if(P===58){if(P=f.input.charCodeAt(++f.position),!c(P))F(f,"a whitespace character is expected after the key-value separator within a block mapping");if(H)Of(f,q,Q,D,V,null),D=V=W=null;R=!0,H=!1,J=!1,D=f.tag,V=f.result}else if(R)F(f,"can not read an implicit mapping pair; a colon is missed");else return f.tag=X,f.anchor=G,!0}else if(R)F(f,"can not read a block mapping entry; a multiline key may not be an implicit key");else return f.tag=X,f.anchor=G,!0;else break;if(f.line===z||f.lineIndent>$){if(xf(f,$,F0,!0,J))if(H)V=f.result;else W=f.result;if(!H)Of(f,q,Q,D,V,W,z,Z),D=V=W=null;b(f,!0,-1),P=f.input.charCodeAt(f.position)}if(f.lineIndent>$&&P!==0)F(f,"bad indentation of a mapping entry");else if(f.lineIndent<$)break}if(H)Of(f,q,Q,D,V,null);if(R)f.tag=X,f.anchor=G,f.kind="mapping",f.result=q;return R}function D6(f){var $,M=!1,Y=!1,J,z,Z;if(Z=f.input.charCodeAt(f.position),Z!==33)return!1;if(f.tag!==null)F(f,"duplication of a tag property");if(Z=f.input.charCodeAt(++f.position),Z===60)M=!0,Z=f.input.charCodeAt(++f.position);else if(Z===33)Y=!0,J="!!",Z=f.input.charCodeAt(++f.position);else J="!";if($=f.position,M){do Z=f.input.charCodeAt(++f.position);while(Z!==0&&Z!==62);if(f.position<f.length)z=f.input.slice($,f.position),Z=f.input.charCodeAt(++f.position);else F(f,"unexpected end of the stream within a verbatim tag")}else{while(Z!==0&&!c(Z)){if(Z===33)if(!Y){if(J=f.input.slice($-1,f.position+1),!k2.test(J))F(f,"named tag handle cannot contain such characters");Y=!0,$=f.position+1}else F(f,"tag suffix cannot contain exclamation marks");Z=f.input.charCodeAt(++f.position)}if(z=f.input.slice($,f.position),tz.test(z))F(f,"tag suffix cannot contain flow indicator characters")}if(z&&!C2.test(z))F(f,"tag name cannot contain such characters: "+z);if(M)f.tag=z;else if(Gf.call(f.tagMap,J))f.tag=f.tagMap[J]+z;else if(J==="!")f.tag="!"+z;else if(J==="!!")f.tag="tag:yaml.org,2002:"+z;else F(f,'undeclared tag handle "'+J+'"');return!0}function W6(f){var $,M;if(M=f.input.charCodeAt(f.position),M!==38)return!1;if(f.anchor!==null)F(f,"duplication of an anchor property");M=f.input.charCodeAt(++f.position),$=f.position;while(M!==0&&!c(M)&&!Nf(M))M=f.input.charCodeAt(++f.position);if(f.position===$)F(f,"name of an anchor node must contain at least one character");return f.anchor=f.input.slice($,f.position),!0}function V6(f){var $,M,Y;if(Y=f.input.charCodeAt(f.position),Y!==42)return!1;Y=f.input.charCodeAt(++f.position),$=f.position;while(Y!==0&&!c(Y)&&!Nf(Y))Y=f.input.charCodeAt(++f.position);if(f.position===$)F(f,"name of an alias node must contain at least one character");if(M=f.input.slice($,f.position),!Gf.call(f.anchorMap,M))F(f,'unidentified alias "'+M+'"');return f.result=f.anchorMap[M],b(f,!0,-1),!0}function xf(f,$,M,Y,J){var z,Z,X,G=1,q=!1,Q=!1,D,V,W,H,R;if(f.listener!==null)f.listener("open",f);if(f.tag=null,f.anchor=null,f.kind=null,f.result=null,z=Z=X=F0===M||I2===M,Y){if(b(f,!0,-1)){if(q=!0,f.lineIndent>$)G=1;else if(f.lineIndent===$)G=0;else if(f.lineIndent<$)G=-1}}if(G===1)while(D6(f)||W6(f))if(b(f,!0,-1)){if(q=!0,X=z,f.lineIndent>$)G=1;else if(f.lineIndent===$)G=0;else if(f.lineIndent<$)G=-1}else X=!1;if(X)X=q||J;if(G===1||F0===M){if(S0===M||x2===M)H=$;else H=$+1;if(R=f.position-f.lineStart,G===1)if(X&&(A2(f,R)||Q6(f,R,H))||G6(f,H))Q=!0;else{if(Z&&q6(f,H)||Z6(f,H)||X6(f,H))Q=!0;else if(V6(f)){if(Q=!0,f.tag!==null||f.anchor!==null)F(f,"alias node should not have any properties")}else if(z6(f,H,S0===M)){if(Q=!0,f.tag===null)f.tag="?"}if(f.anchor!==null)f.anchorMap[f.anchor]=f.result}else if(G===0)Q=X&&A2(f,R)}if(f.tag!==null&&f.tag!=="!")if(f.tag==="?"){if(f.result!==null&&f.kind!=="scalar")F(f,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+f.kind+'"');for(D=0,V=f.implicitTypes.length;D<V;D+=1)if(W=f.implicitTypes[D],W.resolve(f.result)){if(f.result=W.construct(f.result),f.tag=W.tag,f.anchor!==null)f.anchorMap[f.anchor]=f.result;break}}else if(Gf.call(f.typeMap[f.kind||"fallback"],f.tag)){if(W=f.typeMap[f.kind||"fallback"][f.tag],f.result!==null&&W.kind!==f.kind)F(f,"unacceptable node kind for !<"+f.tag+'> tag; it should be "'+W.kind+'", not "'+f.kind+'"');if(!W.resolve(f.result))F(f,"cannot resolve a node with !<"+f.tag+"> explicit tag");else if(f.result=W.construct(f.result),f.anchor!==null)f.anchorMap[f.anchor]=f.result}else F(f,"unknown tag !<"+f.tag+">");if(f.listener!==null)f.listener("close",f);return f.tag!==null||f.anchor!==null||Q}function U6(f){var $=f.position,M,Y,J,z=!1,Z;f.version=null,f.checkLineBreaks=f.legacy,f.tagMap={},f.anchorMap={};while((Z=f.input.charCodeAt(f.position))!==0){if(b(f,!0,-1),Z=f.input.charCodeAt(f.position),f.lineIndent>0||Z!==37)break;z=!0,Z=f.input.charCodeAt(++f.position),M=f.position;while(Z!==0&&!c(Z))Z=f.input.charCodeAt(++f.position);if(Y=f.input.slice(M,f.position),J=[],Y.length<1)F(f,"directive name must not be less than one character in length");while(Z!==0){while(Kf(Z))Z=f.input.charCodeAt(++f.position);if(Z===35){do Z=f.input.charCodeAt(++f.position);while(Z!==0&&!t(Z));break}if(t(Z))break;M=f.position;while(Z!==0&&!c(Z))Z=f.input.charCodeAt(++f.position);J.push(f.input.slice(M,f.position))}if(Z!==0)W1(f);if(Gf.call(R2,Y))R2[Y](f,Y,J);else P0(f,'unknown document directive "'+Y+'"')}if(b(f,!0,-1),f.lineIndent===0&&f.input.charCodeAt(f.position)===45&&f.input.charCodeAt(f.position+1)===45&&f.input.charCodeAt(f.position+2)===45)f.position+=3,b(f,!0,-1);else if(z)F(f,"directives end mark is expected");if(xf(f,f.lineIndent-1,F0,!1,!0),b(f,!0,-1),f.checkLineBreaks&&ez.test(f.input.slice($,f.position)))P0(f,"non-ASCII line breaks are interpreted as content");if(f.documents.push(f.result),f.position===f.lineStart&&T0(f)){if(f.input.charCodeAt(f.position)===46)f.position+=3,b(f,!0,-1);return}if(f.position<f.length-1)F(f,"end of the stream or a document separator is expected");else return}function u2(f,$){if(f=String(f),$=$||{},f.length!==0){if(f.charCodeAt(f.length-1)!==10&&f.charCodeAt(f.length-1)!==13)f+=`
47
+ `;if(f.charCodeAt(0)===65279)f=f.slice(1)}var M=new J6(f,$),Y=f.indexOf("\x00");if(Y!==-1)M.position=Y,F(M,"null byte is not allowed in input");M.input+="\x00";while(M.input.charCodeAt(M.position)===32)M.lineIndent+=1,M.position+=1;while(M.position<M.length-1)U6(M);return M.documents}function h2(f,$,M){if($!==null&&typeof $==="object"&&typeof M>"u")M=$,$=null;var Y=u2(f,M);if(typeof $!=="function")return Y;for(var J=0,z=Y.length;J<z;J+=1)$(Y[J])}function g2(f,$){var M=u2(f,$);if(M.length===0)return;else if(M.length===1)return M[0];throw new N2("expected a single document in the stream, but found more")}function K6(f,$,M){if(typeof $==="object"&&$!==null&&typeof M>"u")M=$,$=null;return h2(f,$,Jf.extend({schema:O2},M))}function B6(f,$){return g2(f,Jf.extend({schema:O2},$))}H6.loadAll=h2;H6.load=g2;H6.safeLoadAll=K6;H6.safeLoad=B6});var QM=S((M8,H1)=>{var f0=Wf(),$0=Rf(),T6=af(),w6=Af(),o2=Object.prototype.toString,s2=Object.prototype.hasOwnProperty,j6=9,tf=10,R6=13,L6=32,A6=33,N6=34,a2=35,O6=37,x6=38,I6=39,k6=42,e2=44,C6=45,t2=58,b6=61,v6=62,_6=63,E6=64,fM=91,$M=93,u6=96,MM=123,h6=124,YM=125,u={};u[0]="\\0";u[7]="\\a";u[8]="\\b";u[9]="\\t";u[10]="\\n";u[11]="\\v";u[12]="\\f";u[13]="\\r";u[27]="\\e";u[34]="\\\"";u[92]="\\\\";u[133]="\\N";u[160]="\\_";u[8232]="\\L";u[8233]="\\P";var g6=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function m6(f,$){var M,Y,J,z,Z,X,G;if($===null)return{};M={},Y=Object.keys($);for(J=0,z=Y.length;J<z;J+=1){if(Z=Y[J],X=String($[Z]),Z.slice(0,2)==="!!")Z="tag:yaml.org,2002:"+Z.slice(2);if(G=f.compiledTypeMap.fallback[Z],G&&s2.call(G.styleAliases,X))X=G.styleAliases[X];M[Z]=X}return M}function r2(f){var $,M,Y;if($=f.toString(16).toUpperCase(),f<=255)M="x",Y=2;else if(f<=65535)M="u",Y=4;else if(f<=4294967295)M="U",Y=8;else throw new $0("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+M+f0.repeat("0",Y-$.length)+$}function r6(f){this.schema=f.schema||T6,this.indent=Math.max(1,f.indent||2),this.noArrayIndent=f.noArrayIndent||!1,this.skipInvalid=f.skipInvalid||!1,this.flowLevel=f0.isNothing(f.flowLevel)?-1:f.flowLevel,this.styleMap=m6(this.schema,f.styles||null),this.sortKeys=f.sortKeys||!1,this.lineWidth=f.lineWidth||80,this.noRefs=f.noRefs||!1,this.noCompatMode=f.noCompatMode||!1,this.condenseFlow=f.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function c2(f,$){var M=f0.repeat(" ",$),Y=0,J=-1,z="",Z,X=f.length;while(Y<X){if(J=f.indexOf(`
48
+ `,Y),J===-1)Z=f.slice(Y),Y=X;else Z=f.slice(Y,J+1),Y=J+1;if(Z.length&&Z!==`
49
+ `)z+=M;z+=Z}return z}function U1(f,$){return`
50
+ `+f0.repeat(" ",f.indent*$)}function c6(f,$){var M,Y,J;for(M=0,Y=f.implicitTypes.length;M<Y;M+=1)if(J=f.implicitTypes[M],J.resolve($))return!0;return!1}function B1(f){return f===L6||f===j6}function If(f){return 32<=f&&f<=126||161<=f&&f<=55295&&f!==8232&&f!==8233||57344<=f&&f<=65533&&f!==65279||65536<=f&&f<=1114111}function p6(f){return If(f)&&!B1(f)&&f!==65279&&f!==R6&&f!==tf}function p2(f,$){return If(f)&&f!==65279&&f!==e2&&f!==fM&&f!==$M&&f!==MM&&f!==YM&&f!==t2&&(f!==a2||$&&p6($))}function l6(f){return If(f)&&f!==65279&&!B1(f)&&f!==C6&&f!==_6&&f!==t2&&f!==e2&&f!==fM&&f!==$M&&f!==MM&&f!==YM&&f!==a2&&f!==x6&&f!==k6&&f!==A6&&f!==h6&&f!==b6&&f!==v6&&f!==I6&&f!==N6&&f!==O6&&f!==E6&&f!==u6}function JM(f){var $=/^\n* /;return $.test(f)}var zM=1,ZM=2,XM=3,GM=4,w0=5;function d6(f,$,M,Y,J){var z,Z,X,G=!1,q=!1,Q=Y!==-1,D=-1,V=l6(f.charCodeAt(0))&&!B1(f.charCodeAt(f.length-1));if($)for(z=0;z<f.length;z++){if(Z=f.charCodeAt(z),!If(Z))return w0;X=z>0?f.charCodeAt(z-1):null,V=V&&p2(Z,X)}else{for(z=0;z<f.length;z++){if(Z=f.charCodeAt(z),Z===tf){if(G=!0,Q)q=q||z-D-1>Y&&f[D+1]!==" ",D=z}else if(!If(Z))return w0;X=z>0?f.charCodeAt(z-1):null,V=V&&p2(Z,X)}q=q||Q&&(z-D-1>Y&&f[D+1]!==" ")}if(!G&&!q)return V&&!J(f)?zM:ZM;if(M>9&&JM(f))return w0;return q?GM:XM}function n6(f,$,M,Y){f.dump=function(){if($.length===0)return"''";if(!f.noCompatMode&&g6.indexOf($)!==-1)return"'"+$+"'";var J=f.indent*Math.max(1,M),z=f.lineWidth===-1?-1:Math.max(Math.min(f.lineWidth,40),f.lineWidth-J),Z=Y||f.flowLevel>-1&&M>=f.flowLevel;function X(G){return c6(f,G)}switch(d6($,Z,f.indent,z,X)){case zM:return $;case ZM:return"'"+$.replace(/'/g,"''")+"'";case XM:return"|"+l2($,f.indent)+d2(c2($,J));case GM:return">"+l2($,f.indent)+d2(c2(i6($,z),J));case w0:return'"'+o6($,z)+'"';default:throw new $0("impossible error: invalid scalar style")}}()}function l2(f,$){var M=JM(f)?String($):"",Y=f[f.length-1]===`
51
+ `,J=Y&&(f[f.length-2]===`
52
+ `||f===`
53
+ `),z=J?"+":Y?"":"-";return M+z+`
54
+ `}function d2(f){return f[f.length-1]===`
55
+ `?f.slice(0,-1):f}function i6(f,$){var M=/(\n+)([^\n]*)/g,Y=function(){var q=f.indexOf(`
56
+ `);return q=q!==-1?q:f.length,M.lastIndex=q,n2(f.slice(0,q),$)}(),J=f[0]===`
57
+ `||f[0]===" ",z,Z;while(Z=M.exec(f)){var X=Z[1],G=Z[2];z=G[0]===" ",Y+=X+(!J&&!z&&G!==""?`
58
+ `:"")+n2(G,$),J=z}return Y}function n2(f,$){if(f===""||f[0]===" ")return f;var M=/ [^ ]/g,Y,J=0,z,Z=0,X=0,G="";while(Y=M.exec(f)){if(X=Y.index,X-J>$)z=Z>J?Z:X,G+=`
59
+ `+f.slice(J,z),J=z+1;Z=X}if(G+=`
60
+ `,f.length-J>$&&Z>J)G+=f.slice(J,Z)+`
61
+ `+f.slice(Z+1);else G+=f.slice(J);return G.slice(1)}function o6(f){var $="",M,Y,J;for(var z=0;z<f.length;z++){if(M=f.charCodeAt(z),M>=55296&&M<=56319){if(Y=f.charCodeAt(z+1),Y>=56320&&Y<=57343){$+=r2((M-55296)*1024+Y-56320+65536),z++;continue}}J=u[M],$+=!J&&If(M)?f[z]:J||r2(M)}return $}function s6(f,$,M){var Y="",J=f.tag,z,Z;for(z=0,Z=M.length;z<Z;z+=1)if(Bf(f,$,M[z],!1,!1)){if(z!==0)Y+=","+(!f.condenseFlow?" ":"");Y+=f.dump}f.tag=J,f.dump="["+Y+"]"}function a6(f,$,M,Y){var J="",z=f.tag,Z,X;for(Z=0,X=M.length;Z<X;Z+=1)if(Bf(f,$+1,M[Z],!0,!0)){if(!Y||Z!==0)J+=U1(f,$);if(f.dump&&tf===f.dump.charCodeAt(0))J+="-";else J+="- ";J+=f.dump}f.tag=z,f.dump=J||"[]"}function e6(f,$,M){var Y="",J=f.tag,z=Object.keys(M),Z,X,G,q,Q;for(Z=0,X=z.length;Z<X;Z+=1){if(Q="",Z!==0)Q+=", ";if(f.condenseFlow)Q+='"';if(G=z[Z],q=M[G],!Bf(f,$,G,!1,!1))continue;if(f.dump.length>1024)Q+="? ";if(Q+=f.dump+(f.condenseFlow?'"':"")+":"+(f.condenseFlow?"":" "),!Bf(f,$,q,!1,!1))continue;Q+=f.dump,Y+=Q}f.tag=J,f.dump="{"+Y+"}"}function t6(f,$,M,Y){var J="",z=f.tag,Z=Object.keys(M),X,G,q,Q,D,V;if(f.sortKeys===!0)Z.sort();else if(typeof f.sortKeys==="function")Z.sort(f.sortKeys);else if(f.sortKeys)throw new $0("sortKeys must be a boolean or a function");for(X=0,G=Z.length;X<G;X+=1){if(V="",!Y||X!==0)V+=U1(f,$);if(q=Z[X],Q=M[q],!Bf(f,$+1,q,!0,!0,!0))continue;if(D=f.tag!==null&&f.tag!=="?"||f.dump&&f.dump.length>1024,D)if(f.dump&&tf===f.dump.charCodeAt(0))V+="?";else V+="? ";if(V+=f.dump,D)V+=U1(f,$);if(!Bf(f,$+1,Q,!0,D))continue;if(f.dump&&tf===f.dump.charCodeAt(0))V+=":";else V+=": ";V+=f.dump,J+=V}f.tag=z,f.dump=J||"{}"}function i2(f,$,M){var Y,J,z,Z,X,G;J=M?f.explicitTypes:f.implicitTypes;for(z=0,Z=J.length;z<Z;z+=1)if(X=J[z],(X.instanceOf||X.predicate)&&(!X.instanceOf||typeof $==="object"&&$ instanceof X.instanceOf)&&(!X.predicate||X.predicate($))){if(f.tag=M?X.tag:"?",X.represent){if(G=f.styleMap[X.tag]||X.defaultStyle,o2.call(X.represent)==="[object Function]")Y=X.represent($,G);else if(s2.call(X.represent,G))Y=X.represent[G]($,G);else throw new $0("!<"+X.tag+'> tag resolver accepts not "'+G+'" style');f.dump=Y}return!0}return!1}function Bf(f,$,M,Y,J,z){if(f.tag=null,f.dump=M,!i2(f,M,!1))i2(f,M,!0);var Z=o2.call(f.dump);if(Y)Y=f.flowLevel<0||f.flowLevel>$;var X=Z==="[object Object]"||Z==="[object Array]",G,q;if(X)G=f.duplicates.indexOf(M),q=G!==-1;if(f.tag!==null&&f.tag!=="?"||q||f.indent!==2&&$>0)J=!1;if(q&&f.usedDuplicates[G])f.dump="*ref_"+G;else{if(X&&q&&!f.usedDuplicates[G])f.usedDuplicates[G]=!0;if(Z==="[object Object]"){if(Y&&Object.keys(f.dump).length!==0){if(t6(f,$,f.dump,J),q)f.dump="&ref_"+G+f.dump}else if(e6(f,$,f.dump),q)f.dump="&ref_"+G+" "+f.dump}else if(Z==="[object Array]"){var Q=f.noArrayIndent&&$>0?$-1:$;if(Y&&f.dump.length!==0){if(a6(f,Q,f.dump,J),q)f.dump="&ref_"+G+f.dump}else if(s6(f,Q,f.dump),q)f.dump="&ref_"+G+" "+f.dump}else if(Z==="[object String]"){if(f.tag!=="?")n6(f,f.dump,$,z)}else{if(f.skipInvalid)return!1;throw new $0("unacceptable kind of an object to dump "+Z)}if(f.tag!==null&&f.tag!=="?")f.dump="!<"+f.tag+"> "+f.dump}return!0}function f8(f,$){var M=[],Y=[],J,z;K1(f,M,Y);for(J=0,z=Y.length;J<z;J+=1)$.duplicates.push(M[Y[J]]);$.usedDuplicates=Array(z)}function K1(f,$,M){var Y,J,z;if(f!==null&&typeof f==="object")if(J=$.indexOf(f),J!==-1){if(M.indexOf(J)===-1)M.push(J)}else if($.push(f),Array.isArray(f))for(J=0,z=f.length;J<z;J+=1)K1(f[J],$,M);else{Y=Object.keys(f);for(J=0,z=Y.length;J<z;J+=1)K1(f[Y[J]],$,M)}}function qM(f,$){$=$||{};var M=new r6($);if(!M.noRefs)f8(f,M);if(Bf(M,0,f,!0,!0))return M.dump+`
62
+ `;return""}function $8(f,$){return qM(f,f0.extend({schema:w6},$))}M8.dump=qM;M8.safeDump=$8});var WM=S((z8,I)=>{var j0=m2(),DM=QM();function R0(f){return function(){throw Error("Function "+f+" is deprecated and cannot be used.")}}z8.Type=v();z8.Schema=Vf();z8.FAILSAFE_SCHEMA=H0();z8.JSON_SCHEMA=Z1();z8.CORE_SCHEMA=X1();z8.DEFAULT_SAFE_SCHEMA=Af();z8.DEFAULT_FULL_SCHEMA=af();z8.load=j0.load;z8.loadAll=j0.loadAll;z8.safeLoad=j0.safeLoad;z8.safeLoadAll=j0.safeLoadAll;z8.dump=DM.dump;z8.safeDump=DM.safeDump;z8.YAMLException=Rf();z8.MINIMAL_SCHEMA=H0();z8.SAFE_SCHEMA=Af();z8.DEFAULT_SCHEMA=af();z8.scan=R0("scan");z8.parse=R0("parse");z8.compose=R0("compose");z8.addConstructor=R0("addConstructor")});var UM=S((BZ,VM)=>{var A8=WM();VM.exports=A8});var P1=S((S1,F1)=>{var L0=UM(),y1=S1=F1.exports;y1.yaml={parse:L0.safeLoad.bind(L0),stringify:L0.safeDump.bind(L0)};y1.json={parse:JSON.parse.bind(JSON),stringify:function(f,$){let M=Object.assign({replacer:null,space:2},$);return JSON.stringify(f,M.replacer,M.space)}};y1.javascript={parse:function parse(str,options,wrap){try{if(wrap!==!1)str=`(function() {
63
+ return `+str.trim()+`;
64
+ }());`;return eval(str)||{}}catch(f){if(wrap!==!1&&/(unexpected|identifier)/i.test(f.message))return parse(str,options,!1);throw SyntaxError(f)}},stringify:function(){throw Error("stringifying JavaScript is not supported")}}});var BM=S((HZ,KM)=>{/*!
65
+ * strip-bom-string <https://github.com/jonschlinkert/strip-bom-string>
66
+ *
67
+ * Copyright (c) 2015, 2017, Jon Schlinkert.
68
+ * Released under the MIT License.
69
+ */KM.exports=function(f){if(typeof f==="string"&&f.charAt(0)==="\uFEFF")return f.slice(1);return f}});var A0=S((N8)=>{var HM=BM(),yM=of();N8.define=function(f,$,M){Reflect.defineProperty(f,$,{enumerable:!1,configurable:!0,writable:!0,value:M})};N8.isBuffer=function(f){return yM(f)==="buffer"};N8.isObject=function(f){return yM(f)==="object"};N8.toBuffer=function(f){return typeof f==="string"?Buffer.from(f):f};N8.toString=function(f){if(N8.isBuffer(f))return HM(String(f));if(typeof f!=="string")throw TypeError("expected input to be a string or buffer");return HM(f)};N8.arrayify=function(f){return f?Array.isArray(f)?f:[f]:[]};N8.startsWith=function(f,$,M){if(typeof M!=="number")M=$.length;return f.slice(0,M)===$}});var M0=S((SZ,FM)=>{var v8=P1(),_8=A0();FM.exports=function(f){let $=Object.assign({},f);if($.delimiters=_8.arrayify($.delims||$.delimiters||"---"),$.delimiters.length===1)$.delimiters.push($.delimiters[0]);return $.language=($.language||$.lang||"yaml").toLowerCase(),$.engines=Object.assign({},v8,$.parsers,$.engines),$}});var T1=S((FZ,PM)=>{PM.exports=function(f,$){let M=$.engines[f]||$.engines[E8(f)];if(typeof M>"u")throw Error('gray-matter engine "'+f+'" is not registered');if(typeof M==="function")M={parse:M};return M};function E8(f){switch(f.toLowerCase()){case"js":case"javascript":return"javascript";case"coffee":case"coffeescript":case"cson":return"coffee";case"yaml":case"yml":return"yaml";default:return f}}});var w1=S((PZ,TM)=>{var u8=of(),h8=T1(),g8=M0();TM.exports=function(f,$,M){if($==null&&M==null)switch(u8(f)){case"object":$=f.data,M={};break;case"string":return f;default:throw TypeError("expected file to be a string or object")}let Y=f.content,J=g8(M);if($==null){if(!J.data)return f;$=J.data}let z=f.language||J.language,Z=h8(z,J);if(typeof Z.stringify!=="function")throw TypeError('expected "'+z+'.stringify" to be a function');$=Object.assign({},f.data,$);let X=J.delimiters[0],G=J.delimiters[1],q=Z.stringify($,M).trim(),Q="";if(q!=="{}")Q=kf(X)+kf(q)+kf(G);if(typeof f.excerpt==="string"&&f.excerpt!==""){if(Y.indexOf(f.excerpt.trim())===-1)Q+=kf(f.excerpt)+kf(G)}return Q+kf(Y)};function kf(f){return f.slice(-1)!==`
70
+ `?f+`
71
+ `:f}});var jM=S((TZ,wM)=>{var m8=M0();wM.exports=function(f,$){let M=m8($);if(f.data==null)f.data={};if(typeof M.excerpt==="function")return M.excerpt(f,M);let Y=f.data.excerpt_separator||M.excerpt_separator;if(Y==null&&(M.excerpt===!1||M.excerpt==null))return f;let J=typeof M.excerpt==="string"?M.excerpt:Y||M.delimiters[0],z=f.content.indexOf(J);if(z!==-1)f.excerpt=f.content.slice(0,z);return f}});var AM=S((wZ,LM)=>{var RM=of(),r8=w1(),Cf=A0();LM.exports=function(f){if(RM(f)!=="object")f={content:f};if(RM(f.data)!=="object")f.data={};if(f.contents&&f.content==null)f.content=f.contents;return Cf.define(f,"orig",Cf.toBuffer(f.content)),Cf.define(f,"language",f.language||""),Cf.define(f,"matter",f.matter||""),Cf.define(f,"stringify",function($,M){if(M&&M.language)f.language=M.language;return r8(f,$,M)}),f.content=Cf.toString(f.content),f.isEmpty=!1,f.excerpt="",f}});var OM=S((jZ,NM)=>{var c8=T1(),p8=M0();NM.exports=function(f,$,M){let Y=p8(M),J=c8(f,Y);if(typeof J.parse!=="function")throw TypeError('expected "'+f+'.parse" to be a function');return J.parse($,Y)}});var CM=S((RZ,kM)=>{var l8=e("fs"),d8=R$(),j1=M0(),n8=w1(),xM=jM(),i8=P1(),o8=AM(),s8=OM(),IM=A0();function h(f,$){if(f==="")return{data:{},content:f,excerpt:"",orig:f};let M=o8(f),Y=h.cache[M.content];if(!$){if(Y)return M=Object.assign({},Y),M.orig=Y.orig,M;h.cache[M.content]=M}return a8(M,$)}function a8(f,$){let M=j1($),Y=M.delimiters[0],J=`
72
+ `+M.delimiters[1],z=f.content;if(M.language)f.language=M.language;let Z=Y.length;if(!IM.startsWith(z,Y,Z))return xM(f,M),f;if(z.charAt(Z)===Y.slice(-1))return f;z=z.slice(Z);let X=z.length,G=h.language(z,M);if(G.name)f.language=G.name,z=z.slice(G.raw.length);let q=z.indexOf(J);if(q===-1)q=X;if(f.matter=z.slice(0,q),f.matter.replace(/^\s*#[^\n]+/gm,"").trim()==="")f.isEmpty=!0,f.empty=f.content,f.data={};else f.data=s8(f.language,f.matter,M);if(q===X)f.content="";else{if(f.content=z.slice(q+J.length),f.content[0]==="\r")f.content=f.content.slice(1);if(f.content[0]===`
73
+ `)f.content=f.content.slice(1)}if(xM(f,M),M.sections===!0||typeof M.section==="function")d8(f,M.section);return f}h.engines=i8;h.stringify=function(f,$,M){if(typeof f==="string")f=h(f,M);return n8(f,$,M)};h.read=function(f,$){let M=l8.readFileSync(f,"utf8"),Y=h(M,$);return Y.path=f,Y};h.test=function(f,$){return IM.startsWith(f,j1($).delimiters[0])};h.language=function(f,$){let Y=j1($).delimiters[0];if(h.test(f))f=f.slice(Y.length);let J=f.slice(0,f.search(/\r?\n/));return{raw:J,name:J?J.trim():""}};h.cache={};h.clearCache=function(){h.cache={}};kM.exports=h});var q$=Q0(G$(),1),{program:B9,createCommand:H9,createArgument:y9,createOption:S9,CommanderError:F9,InvalidArgumentError:P9,InvalidOptionArgumentError:T9,Command:Q$,Argument:w9,Option:j9,Help:R9}=q$.default;import{access as O1,constants as x1,mkdir as Z4,readFile as I1,writeFile as aM}from"node:fs/promises";import{EOL as oM}from"node:os";import{join as _f}from"node:path";import{mkdir as dM,readdir as Y4,readFile as L1,stat as J4,unlink as nM,writeFile as vf}from"node:fs/promises";import{dirname as iM,extname as z4,join as A1}from"node:path";var W0=".memory",D$=".",df="system://boot",nf="system://index",e0="system://recent",W$=["system://agent","system://soul","system://user"];var V0="---",U0=".md";var U$=Q0($1(),1),b9=Q0(V$(),1);function oJ(f,$="YYYY-MM-DD HH:mm"){return U$.default(f).format($)}function K0(f){return oJ(f,"YYYY-MM-DD HH:mm")}var sJ=5;async function K$(f){let $=[];for(let Z of W$)try{let X=await f.getMemory(Z);if(X)$.push(`${X.content}`)}catch{}let Y=(await f.getAllMemories({includeDeleted:!1})).sort((Z,X)=>{let G=new Date(Z.updatedAt).getTime();return new Date(X.updatedAt).getTime()-G}).slice(0,sJ),J=[];if($.length>0)J.push(`# Core Memories
74
+
75
+ `),J.push($.join(`
76
+
77
+ ---
78
+
79
+ `));if(Y.length>0){J.push(`
80
+
81
+ ---
82
+
83
+ # Recently Modified Memories
84
+
85
+ `);for(let Z of Y){let X=await f.getMemory(Z.uri);if(X){let G=K0(Z.updatedAt),q=X.priority>7?` [★${X.priority}]`:"",Q=X.disclosure?` disclosure: ${X.disclosure}
86
+ `:"";J.push(`${Z.uri}${q} modified: ${G}
87
+ ${Q}
88
+ `)}}}let z=J.join("");return{uri:df,memoryId:df,content:z,priority:10,disclosure:"",isAlias:!1,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),deleted:!1}}var bM=Q0(CM(),1);function N0(f){return bM.default(f,{delimiters:V0})}function Hf(f){let $=[V0],M=[["memoryId",f.memoryId],["uri",f.uri],["priority",f.priority],["isAlias",f.isAlias],["createdAt",f.createdAt],["updatedAt",f.updatedAt]];if(f.disclosure)M.push(["disclosure",f.disclosure]);if(f.targetUri)M.push(["targetUri",f.targetUri]);if(f.deleted)M.push(["deleted",!0]);for(let[Y,J]of M)if(typeof J==="string")$.push(`${Y}: "${J}"`);else if(typeof J==="boolean")$.push(`${Y}: ${J?"true":"false"}`);else $.push(`${Y}: ${J}`);return $.push(V0,""),$.join(`
89
+ `)}var vM=/^([^:]+):\/\/(.+)$/;function ff(f){let $=f.match(vM);if(!$)throw Error(`Invalid URI format: ${f}`);return{domain:$[1],path:$[2]}}function $f(f){return vM.test(f)}function _M(f){return ff(f).path.split("/").filter(Boolean)}function R1(f,$){let M=ff(f),Y=ff($);if(M.domain!==Y.domain)return null;let J=_M(f),z=_M($),Z=z.length-J.length;if(Z===1){if(EM(J,z))return{isDirect:!0,parentUri:f,childUri:$}}else if(Z===-1){if(EM(z,J))return{isDirect:!0,parentUri:$,childUri:f}}return null}function EM(f,$){if(f.length>=$.length)return!1;for(let M=0;M<f.length;M++)if(f[M]!==$[M])return!1;return!0}import{webcrypto as hM}from"node:crypto";var uM="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var e8=128,yf,bf;function t8(f){if(!yf||yf.length<f)yf=Buffer.allocUnsafe(f*e8),hM.getRandomValues(yf),bf=0;else if(bf+f>yf.length)hM.getRandomValues(yf),bf=0;bf+=f}function gM(f=21){t8(f|=0);let $="";for(let M=bf-f;M<bf;M++)$+=uM[yf[M]&63];return $}var f4="mem",$4=12;function mM(){return`${f4}_${gM($4)}`}async function rM(f){let $=await f.getAllMemories({includeDeleted:!1}),M=new Map;for(let Z of $){let{domain:X}=ff(Z.uri);if(!M.has(X))M.set(X,[]);M.get(X).push(Z)}let Y=[];Y.push(`# Memory Index
90
+ `),Y.push(`# Total entries: ${$.length}
91
+ `),Y.push(`Legend: [ID] = Memory ID (same ID = alias), [★N] = priority
92
+ `);let J=Array.from(M.keys()).sort();for(let Z of J){let X=M.get(Z);Y.push(`
93
+ ## ${Z}://
94
+ `);let G=new Map;for(let Q of X){let{path:D}=ff(Q.uri),V=D.split("/");if(V.length>1){let W=V[0];if(!G.has(W))G.set(W,[]);G.get(W).push(Q)}else{if(!G.has(""))G.set("",[]);G.get("").push(Q)}}let q=Array.from(G.keys()).sort();for(let Q of q){let D=G.get(Q);if(Q==="")for(let V of D){let{path:W}=ff(V.uri),H=V.priority>7?` [★${V.priority}]`:"";Y.push(`
95
+ ### ${W}
96
+ `),Y.push(` - ${V.uri} [${V.memoryId}]${H}
97
+ `)}else{Y.push(`
98
+ ### ${Q}
99
+ `);for(let V of D){let W=V.priority>7?` [★${V.priority}]`:"";Y.push(` - ${V.uri} [${V.memoryId}]${W}
100
+ `)}}}}let z=Y.join("");return{uri:nf,memoryId:nf,content:z,priority:10,disclosure:"",isAlias:!1,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),deleted:!1}}import{sep as cM}from"node:path";var M4="/";function n(f,$){let M=ff(f),J=M.path.split(M4).filter(Boolean).join(cM);return[$,M.domain,`${J}${U0}`].join(cM)}var pM="system://recent";async function lM(f,$){let J=10,z=$.match(/^system:\/\/recent(?:\/(\d+))?$/);if(z?.[1]){let D=Number.parseInt(z[1],10);if(Number.isNaN(D)||D<1)J=10;else if(D>1000)J=1000;else J=D}let X=(await f.getAllMemories({includeDeleted:!1})).sort((D,V)=>{let W=new Date(D.updatedAt).getTime();return new Date(V.updatedAt).getTime()-W}).slice(0,J),G=[];for(let D of X){let V=await f.getMemory(D.uri);if(V)G.push(V)}let q=[];q.push(`# Recently Modified Memories
101
+ `),q.push(`# Showing: ${J} most recent entries
102
+ `);for(let D of G){let V=D.priority>7?` [★${D.priority}]`:"",W=K0(D.updatedAt);if(q.push(`${D.uri}${V} modified: ${W}
103
+ `),D.disclosure)q.push(`disclosure: ${D.disclosure}
104
+ `)}let Q=q.join("");return{uri:pM,memoryId:pM,content:Q,priority:10,disclosure:"",isAlias:!1,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),deleted:!1}}class N1{memoryRoot;constructor(f){let $=f.memoryRoot??D$;this.memoryRoot=A1($,W0)}async _getMemoryRaw(f){try{let $=n(f,this.memoryRoot),M=await L1($,"utf-8"),{data:Y,content:J}=N0(M);return{uri:Y.uri,memoryId:Y.memoryId,content:J,priority:Y.priority,disclosure:Y.disclosure,isAlias:Y.isAlias??!1,targetUri:Y.targetUri,createdAt:Y.createdAt,updatedAt:Y.updatedAt,deleted:Y.deleted??!1}}catch{return null}}async _targetFileExists(f){try{let $=n(f,this.memoryRoot);return await J4($),!0}catch{return!1}}async getMemory(f,$){if(!$f(f))throw Error(`Invalid URI format: ${f}. Expected format: 'domain://path/to/memory'`);if(f===df)return K$(this);if(f===nf)return rM(this);if(f===e0||f.startsWith(`${e0}/`))return lM(this,f);let M=$?.includeDeleted??!1;try{let Y=n(f,this.memoryRoot),J=await L1(Y,"utf-8"),{data:z,content:Z}=N0(J);if(!M&&(z.deleted??!1))return null;if(z.isAlias&&z.targetUri){let X=await this._getMemoryRaw(z.targetUri);return{uri:z.uri,memoryId:z.memoryId,content:X?.content??"",priority:z.priority,disclosure:z.disclosure,isAlias:!0,targetUri:z.targetUri,createdAt:z.createdAt,updatedAt:z.updatedAt,deleted:z.deleted??!1}}return{uri:z.uri,memoryId:z.memoryId,content:Z,priority:z.priority,disclosure:z.disclosure,isAlias:z.isAlias??!1,targetUri:z.targetUri,createdAt:z.createdAt,updatedAt:z.updatedAt,deleted:z.deleted??!1}}catch{return null}}async createMemory(f){if(!$f(f.uri))throw Error(`Invalid URI format: ${f.uri}. Expected format: 'domain://path/to/memory'`);let $=await this._getMemoryRaw(f.uri);if($&&!$.deleted)throw Error(`Memory already exists at URI: ${f.uri}`);let M=mM(),Y=new Date().toISOString(),J=f.uri,z=n(J,this.memoryRoot),Z=iM(z);await dM(Z,{recursive:!0});let G=Hf({memoryId:M,uri:J,priority:f.priority??5,disclosure:f.disclosure,isAlias:!1,createdAt:Y,updatedAt:Y})+f.content;return await vf(z,G,"utf-8"),{uri:J,memoryId:M,content:f.content,priority:f.priority??5,disclosure:f.disclosure,isAlias:!1,createdAt:Y,updatedAt:Y,deleted:!1}}async updateMemory(f){if(!$f(f.uri))throw Error(`Invalid URI format: ${f.uri}. Expected format: 'domain://path/to/memory'`);let $=await this._getMemoryRaw(f.uri);if(!$||$.deleted)throw Error("Memory not found");if($.isAlias&&$.targetUri){if(!await this._targetFileExists($.targetUri))throw Error("Target memory file not found");let G=await this._getMemoryRaw($.targetUri);if(G){let q=n($.targetUri,this.memoryRoot),Q=new Date().toISOString(),V=Hf({memoryId:G.memoryId,uri:G.uri,priority:G.priority,disclosure:G.disclosure,isAlias:G.isAlias,targetUri:G.targetUri,createdAt:G.createdAt,updatedAt:Q,deleted:G.deleted})+f.content;return await vf(q,V,"utf-8"),{...$,content:f.content,updatedAt:Q}}throw Error("Target memory not found")}let M=n(f.uri,this.memoryRoot),Y=new Date().toISOString(),z=Hf({memoryId:$.memoryId,uri:$.uri,priority:f.priority??$.priority,disclosure:f.disclosure??$.disclosure,isAlias:$.isAlias,targetUri:$.targetUri,createdAt:$.createdAt,updatedAt:Y,deleted:$.deleted})+f.content;return await vf(M,z,"utf-8"),{...$,content:f.content,priority:f.priority??$.priority,disclosure:f.disclosure??$.disclosure,updatedAt:Y}}async deleteMemory(f,$={}){if(!$f(f))throw Error(`Invalid URI format: ${f}. Expected format: 'domain://path/to/memory'`);let{recursive:M=!1,permanent:Y=!1}=$;if(!Y){let z=await this.getMemory(f);if(!z||z.deleted)throw Error("Memory not found");let Z=n(f,this.memoryRoot),X=new Date().toISOString(),q=Hf({memoryId:z.memoryId,uri:z.uri,priority:z.priority,disclosure:z.disclosure,isAlias:z.isAlias,targetUri:z.targetUri,createdAt:z.createdAt,updatedAt:X,deleted:!0})+z.content;if(await vf(Z,q,"utf-8"),M){let Q=await this.getAllMemories({includeDeleted:!1});for(let D of Q)if(D.uri.startsWith(`${f}/`))await this.deleteMemory(D.uri,{recursive:!0,permanent:!1})}return}let J=n(f,this.memoryRoot);if(await nM(J),M){let z=await this.getAllMemories({includeDeleted:!1});for(let Z of z)if(Z.uri.startsWith(`${f}/`)){let X=n(Z.uri,this.memoryRoot);await nM(X)}}}async restoreMemory(f){if(!$f(f))throw Error(`Invalid URI format: ${f}. Expected format: 'domain://path/to/memory'`);let $=await this._getMemoryRaw(f);if(!$)throw Error("Memory not found");if(!$.deleted)throw Error("Memory is not deleted");let M=n(f,this.memoryRoot),Y=new Date().toISOString(),z=Hf({memoryId:$.memoryId,uri:$.uri,priority:$.priority,disclosure:$.disclosure,isAlias:$.isAlias,targetUri:$.targetUri,createdAt:$.createdAt,updatedAt:Y,deleted:!1})+$.content;return await vf(M,z,"utf-8"),{...$,updatedAt:Y,deleted:!1}}async addAlias(f){if(!$f(f.newUri))throw Error(`Invalid URI format for newUri: ${f.newUri}. Expected format: 'domain://path/to/memory'`);if(!$f(f.targetUri))throw Error(`Invalid URI format for targetUri: ${f.targetUri}. Expected format: 'domain://path/to/memory'`);let $=await this.getMemory(f.targetUri);if(!$)throw Error("Target memory not found");if(await this.getMemory(f.newUri))throw Error(`Memory already exists at alias URI: ${f.newUri}`);let Y=new Date().toISOString(),J=$.memoryId,z=n(f.newUri,this.memoryRoot),Z=iM(z);await dM(Z,{recursive:!0});let X=Hf({memoryId:J,uri:f.newUri,priority:f.priority??$.priority,disclosure:f.disclosure??$.disclosure,isAlias:!0,targetUri:f.targetUri,createdAt:Y,updatedAt:Y});return await vf(z,X,"utf-8"),{uri:f.newUri,memoryId:J,content:$.content,priority:f.priority??$.priority,disclosure:f.disclosure??$.disclosure,isAlias:!0,targetUri:f.targetUri,createdAt:Y,updatedAt:Y,deleted:!1}}async searchMemory(f,$={}){let M=await this.getAllMemories({domain:$.domain,includeDeleted:!1}),Y=f.toLowerCase(),J=[],z=$.limit??10;for(let Z of M){if(J.length>=z)break;try{let X=await this.getMemory(Z.uri);if(!X||X.deleted)continue;let G=X.uri.toLowerCase().includes(Y),q=X.content.toLowerCase().includes(Y);if(G||q)J.push(X)}catch{}}return J}async getChildren(f){if(!$f(f))return[];try{let $=await this.getAllMemories({includeDeleted:!1}),M=[];for(let Y of $){let J=R1(f,Y.uri);if(J?.isDirect&&J?.parentUri===f)M.push(Y)}return M.sort((Y,J)=>J.priority-Y.priority)}catch{return[]}}async getAllMemories(f={}){let $=[],M=f.domain?A1(this.memoryRoot,f.domain):this.memoryRoot,Y=async(J)=>{try{let z=await Y4(J,{withFileTypes:!0});for(let Z of z){let X=A1(J,Z.name);if(Z.isDirectory())await Y(X);else if(z4(Z.name)===U0){let G=await L1(X,"utf-8"),{data:q,content:Q}=N0(G);if(!q.deleted||f.includeDeleted)$.push({uri:q.uri,memoryId:q.memoryId,content:Q,priority:q.priority,disclosure:q.disclosure,isAlias:q.isAlias??!1,targetUri:q.targetUri,createdAt:q.createdAt,updatedAt:q.updatedAt,deleted:q.deleted??!1})}}}catch{}};return await Y(M),$}async getRelationships(f){let{uri:$,domain:M}=f||{},Y=[],J=await this.getAllMemories({domain:M,includeDeleted:!0});if($){if(!$f($))return Y;let z=await this.getMemory($);if(!z)return Y;for(let Z of J){if(Z.uri===$)continue;let X=R1($,Z.uri);if(X)Y.push({fromUri:X.parentUri,toUri:X.childUri,type:"parent_child",weight:1});if(Z.isAlias&&Z.targetUri===$)Y.push({fromUri:Z.uri,toUri:$,type:"alias",weight:1});try{let G=await this.getMemory(Z.uri);if(G){let q=G.content.includes($),Q=z.content.includes(Z.uri);if(q||Q)Y.push({fromUri:q?Z.uri:$,toUri:q?$:Z.uri,type:"reference",weight:0.5})}}catch{}}}else{let z=J.map((X)=>X.uri),Z=new Set;for(let X of z){let G=await this.getRelationships({uri:X,domain:M});for(let q of G){let Q=`${q.fromUri}-${q.toUri}-${q.type}`;if(!Z.has(Q))Z.add(Q),Y.push(q)}}}return Y}}function O0(f){switch(f.type){case"filesystem":return new N1(f.config);case"sqlite":throw Error("SQLite adapter not implemented yet");default:throw Error(`Unknown store type: ${f.type}`)}}function x0(f){return{memoryRoot:f}}var eM=import.meta.dirname,X4=_f(eM,"../../template/system"),G4=_f(eM,"../../template/mcp/AGENTS.md"),q4={agent:"system://agent",soul:"system://soul",user:"system://user"};async function Q4(f){return I1(_f(X4,f),"utf-8")}function D4(f){return f.split(`
105
+ `).find((Y)=>Y.trim()!=="")?.trim()||""}function W4(f,$){return f.split(`
106
+ `).find((J)=>J.trim()!=="")?.trim()===$}async function sM(f,$){try{let M="";try{M=await I1(f,"utf-8")}catch{M=""}let Y=D4($);if(M&&W4(M,Y)){console.log("› Skipped: content already exists");return}let J=M?`${oM}${oM}`:"",z=`${$}${J}${M}`;await aM(f,z,"utf-8"),console.log(`✔ Injected: ${f}`)}catch(M){throw console.error(`✖ Failed: ${f}`,M),M}}async function V4(f){let $=_f(f,"AGENTS.md"),M=_f(f,"CLAUDE.md"),Y=!1,J=!1;try{await O1($,x1.F_OK),Y=!0}catch{}try{await O1(M,x1.F_OK),J=!0}catch{}let z=await I1(G4,"utf-8");if(J)console.log("› Found: CLAUDE.md"),await sM(M,z);else if(Y)console.log("› Found: AGENTS.md"),await sM($,z);else console.log("✔ Created: AGENTS.md"),await aM($,z,"utf-8")}async function tM(f){let $=_f(f,W0);try{await O1($,x1.F_OK),console.log(`Memory directory already exists at ${$}`)}catch{await Z4($,{recursive:!0});let M=O0({type:"filesystem",config:x0(f)});await Promise.all(Object.entries(q4).map(async([Y,J])=>{let z=await Q4(`${Y}.md`);await M.createMemory({uri:J,content:z,priority:10})})),console.log(`Initialized hippo memory at ${$}`)}console.log("◇ Checking AGENTS.md and CLAUDE.md..."),await V4(f)}import{join as sY}from"node:path";import{createServer as U4}from"http";import{Http2ServerRequest as K4}from"http2";import{Http2ServerRequest as k1}from"http2";import{Readable as fY}from"stream";import A4 from"crypto";var Sf=class extends Error{constructor(f,$){super(f,$);this.name="RequestError"}},B4=(f)=>{if(f instanceof Sf)return f;return new Sf(f.message,{cause:f})},H4=global.Request,Y0=class extends H4{constructor(f,$){if(typeof f==="object"&&hf in f)f=f[hf]();if(typeof $?.body?.getReader<"u")$.duplex??="half";super(f,$)}},y4=(f)=>{let $=[],M=f.rawHeaders;for(let Y=0;Y<M.length;Y+=2){let{[Y]:J,[Y+1]:z}=M;if(J.charCodeAt(0)!==58)$.push([J,z])}return new Headers($)},MY=Symbol("wrapBodyStream"),S4=(f,$,M,Y,J)=>{let z={method:f,headers:M,signal:J.signal};if(f==="TRACE"){z.method="GET";let Z=new Y0($,z);return Object.defineProperty(Z,"method",{get(){return"TRACE"}}),Z}if(!(f==="GET"||f==="HEAD"))if("rawBody"in Y&&Y.rawBody instanceof Buffer)z.body=new ReadableStream({start(Z){Z.enqueue(Y.rawBody),Z.close()}});else if(Y[MY]){let Z;z.body=new ReadableStream({async pull(X){try{Z||=fY.toWeb(Y).getReader();let{done:G,value:q}=await Z.read();if(G)X.close();else X.enqueue(q)}catch(G){X.error(G)}}})}else z.body=fY.toWeb(Y);return new Y0($,z)},hf=Symbol("getRequestCache"),F4=Symbol("requestCache"),I0=Symbol("incomingKey"),k0=Symbol("urlKey"),P4=Symbol("headersKey"),uf=Symbol("abortControllerKey"),T4=Symbol("getAbortController"),C0={get method(){return this[I0].method||"GET"},get url(){return this[k0]},get headers(){return this[P4]||=y4(this[I0])},[T4](){return this[hf](),this[uf]},[hf](){return this[uf]||=new AbortController,this[F4]||=S4(this.method,this[k0],this.headers,this[I0],this[uf])}};["body","bodyUsed","cache","credentials","destination","integrity","mode","redirect","referrer","referrerPolicy","signal","keepalive"].forEach((f)=>{Object.defineProperty(C0,f,{get(){return this[hf]()[f]}})});["arrayBuffer","blob","clone","formData","json","text"].forEach((f)=>{Object.defineProperty(C0,f,{value:function(){return this[hf]()[f]()}})});Object.setPrototypeOf(C0,Y0.prototype);var w4=(f,$)=>{let M=Object.create(C0);M[I0]=f;let Y=f.url||"";if(Y[0]!=="/"&&(Y.startsWith("http://")||Y.startsWith("https://"))){if(f instanceof k1)throw new Sf("Absolute URL for :path is not allowed in HTTP/2");try{let X=new URL(Y);M[k0]=X.href}catch(X){throw new Sf("Invalid absolute URL",{cause:X})}return M}let J=(f instanceof k1?f.authority:f.headers.host)||$;if(!J)throw new Sf("Missing host header");let z;if(f instanceof k1){if(z=f.scheme,!(z==="http"||z==="https"))throw new Sf("Unsupported scheme")}else z=f.socket&&f.socket.encrypted?"https":"http";let Z=new URL(`${z}://${J}${Y}`);if(Z.hostname.length!==J.length&&Z.hostname!==J.replace(/:\d+$/,""))throw new Sf("Invalid host header");return M[k0]=Z.href,M},$Y=Symbol("responseCache"),Ef=Symbol("getResponseCache"),Ff=Symbol("cache"),b1=global.Response,J0=class f{#$;#f;[Ef](){return delete this[Ff],this[$Y]||=new b1(this.#$,this.#f)}constructor($,M){let Y;if(this.#$=$,M instanceof f){let J=M[$Y];if(J){this.#f=J,this[Ef]();return}else this.#f=M.#f,Y=new Headers(M.#f.headers)}else this.#f=M;if(typeof $==="string"||typeof $?.getReader<"u"||$ instanceof Blob||$ instanceof Uint8Array)Y||=M?.headers||{"content-type":"text/plain; charset=UTF-8"},this[Ff]=[M?.status||200,$,Y]}get headers(){let $=this[Ff];if($){if(!($[2]instanceof Headers))$[2]=new Headers($[2]);return $[2]}return this[Ef]().headers}get status(){return this[Ff]?.[0]??this[Ef]().status}get ok(){let $=this.status;return $>=200&&$<300}};["body","bodyUsed","redirected","statusText","trailers","type","url"].forEach((f)=>{Object.defineProperty(J0.prototype,f,{get(){return this[Ef]()[f]}})});["arrayBuffer","blob","clone","formData","json","text"].forEach((f)=>{Object.defineProperty(J0.prototype,f,{value:function(){return this[Ef]()[f]()}})});Object.setPrototypeOf(J0,b1);Object.setPrototypeOf(J0.prototype,b1.prototype);async function j4(f){return Promise.race([f,Promise.resolve().then(()=>Promise.resolve(void 0))])}function YY(f,$,M){let Y=(X)=>{f.cancel(X).catch(()=>{})};return $.on("close",Y),$.on("error",Y),(M??f.read()).then(Z,J),f.closed.finally(()=>{$.off("close",Y),$.off("error",Y)});function J(X){if(X)$.destroy(X)}function z(){f.read().then(Z,J)}function Z({done:X,value:G}){try{if(X)$.end();else if(!$.write(G))$.once("drain",z);else return f.read().then(Z,J)}catch(q){J(q)}}}function R4(f,$){if(f.locked)throw TypeError("ReadableStream is locked.");else if($.destroyed)return;return YY(f.getReader(),$)}var JY=(f)=>{let $={};if(!(f instanceof Headers))f=new Headers(f??void 0);let M=[];for(let[Y,J]of f)if(Y==="set-cookie")M.push(J);else $[Y]=J;if(M.length>0)$["set-cookie"]=M;return $["content-type"]??="text/plain; charset=UTF-8",$},L4="x-hono-already-sent";if(typeof global.crypto>"u")global.crypto=A4;var v1=Symbol("outgoingEnded"),N4=()=>new Response(null,{status:400}),zY=(f)=>new Response(null,{status:f instanceof Error&&(f.name==="TimeoutError"||f.constructor.name==="TimeoutError")?504:500}),C1=(f,$)=>{let M=f instanceof Error?f:Error("unknown error",{cause:f});if(M.code==="ERR_STREAM_PREMATURE_CLOSE")console.info("The user aborted a request.");else{if(console.error(f),!$.headersSent)$.writeHead(500,{"Content-Type":"text/plain"});$.end(`Error: ${M.message}`),$.destroy(M)}},ZY=(f)=>{if("flushHeaders"in f&&f.writable)f.flushHeaders()},XY=async(f,$)=>{let[M,Y,J]=f[Ff];if(J instanceof Headers)J=JY(J);if(typeof Y==="string")J["Content-Length"]=Buffer.byteLength(Y);else if(Y instanceof Uint8Array)J["Content-Length"]=Y.byteLength;else if(Y instanceof Blob)J["Content-Length"]=Y.size;if($.writeHead(M,J),typeof Y==="string"||Y instanceof Uint8Array)$.end(Y);else if(Y instanceof Blob)$.end(new Uint8Array(await Y.arrayBuffer()));else ZY($),await R4(Y,$)?.catch((z)=>C1(z,$));$[v1]?.()},O4=(f)=>typeof f.then==="function",x4=async(f,$,M={})=>{if(O4(f))if(M.errorHandler)try{f=await f}catch(J){let z=await M.errorHandler(J);if(!z)return;f=z}else f=await f.catch(zY);if(Ff in f)return XY(f,$);let Y=JY(f.headers);if(f.body){let J=f.body.getReader(),z=[],Z=!1,X=void 0;if(Y["transfer-encoding"]!=="chunked"){let G=2;for(let q=0;q<G;q++){X||=J.read();let Q=await j4(X).catch((D)=>{console.error(D),Z=!0});if(!Q){if(q===1){await new Promise((D)=>setTimeout(D)),G=3;continue}break}if(X=void 0,Q.value)z.push(Q.value);if(Q.done){Z=!0;break}}if(Z&&!("content-length"in Y))Y["content-length"]=z.reduce((q,Q)=>q+Q.length,0)}if($.writeHead(f.status,Y),z.forEach((G)=>{$.write(G)}),Z)$.end();else{if(z.length===0)ZY($);await YY(J,$,X)}}else if(Y[L4]);else $.writeHead(f.status,Y),$.end();$[v1]?.()},I4=(f,$={})=>{let M=$.autoCleanupIncoming??!0;if($.overrideGlobalObjects!==!1&&global.Request!==Y0)Object.defineProperty(global,"Request",{value:Y0}),Object.defineProperty(global,"Response",{value:J0});return async(Y,J)=>{let z,Z;try{Z=w4(Y,$.hostname);let X=!M||Y.method==="GET"||Y.method==="HEAD";if(!X){if(Y[MY]=!0,Y.on("end",()=>{X=!0}),Y instanceof K4)J[v1]=()=>{if(!X)setTimeout(()=>{if(!X)setTimeout(()=>{Y.destroy(),J.destroy()})})}}if(J.on("close",()=>{if(Z[uf]){if(Y.errored)Z[uf].abort(Y.errored.toString());else if(!J.writableFinished)Z[uf].abort("Client connection prematurely closed.")}if(!X)setTimeout(()=>{if(!X)setTimeout(()=>{Y.destroy()})})}),z=f(Z,{incoming:Y,outgoing:J}),Ff in z)return XY(z,J)}catch(X){if(!z)if($.errorHandler){if(z=await $.errorHandler(Z?X:B4(X)),!z)return}else if(!Z)z=N4();else z=zY(X);else return C1(X,J)}try{return await x4(z,J,$)}catch(X){return C1(X,J)}}},k4=(f)=>{let $=f.fetch,M=I4($,{hostname:f.hostname,overrideGlobalObjects:f.overrideGlobalObjects,autoCleanupIncoming:f.autoCleanupIncoming});return(f.createServer||U4)(f.serverOptions||{},M)},GY=(f,$)=>{let M=k4(f);return M.listen(f?.port??3000,f.hostname,()=>{let Y=M.address();$&&$(Y)}),M};var qY=(f,$=b4)=>{let M=/\.([a-zA-Z0-9]+?)$/,Y=f.match(M);if(!Y)return;let J=$[Y[1]];if(J&&J.startsWith("text"))J+="; charset=utf-8";return J};var C4={aac:"audio/aac",avi:"video/x-msvideo",avif:"image/avif",av1:"video/av1",bin:"application/octet-stream",bmp:"image/bmp",css:"text/css",csv:"text/csv",eot:"application/vnd.ms-fontobject",epub:"application/epub+zip",gif:"image/gif",gz:"application/gzip",htm:"text/html",html:"text/html",ico:"image/x-icon",ics:"text/calendar",jpeg:"image/jpeg",jpg:"image/jpeg",js:"text/javascript",json:"application/json",jsonld:"application/ld+json",map:"application/json",mid:"audio/x-midi",midi:"audio/x-midi",mjs:"text/javascript",mp3:"audio/mpeg",mp4:"video/mp4",mpeg:"video/mpeg",oga:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",opus:"audio/opus",otf:"font/otf",pdf:"application/pdf",png:"image/png",rtf:"application/rtf",svg:"image/svg+xml",tif:"image/tiff",tiff:"image/tiff",ts:"video/mp2t",ttf:"font/ttf",txt:"text/plain",wasm:"application/wasm",webm:"video/webm",weba:"audio/webm",webmanifest:"application/manifest+json",webp:"image/webp",woff:"font/woff",woff2:"font/woff2",xhtml:"application/xhtml+xml",xml:"application/xml",zip:"application/zip","3gp":"video/3gpp","3g2":"video/3gpp2",gltf:"model/gltf+json",glb:"model/gltf-binary"},b4=C4;import{createReadStream as QY,statSync as v4,existsSync as _4}from"fs";import{join as DY}from"path";import{versions as E4}from"process";import{Readable as u4}from"stream";var h4=/^\s*(?:text\/[^;\s]+|application\/(?:javascript|json|xml|xml-dtd|ecmascript|dart|postscript|rtf|tar|toml|vnd\.dart|vnd\.ms-fontobject|vnd\.ms-opentype|wasm|x-httpd-php|x-javascript|x-ns-proxy-autoconfig|x-sh|x-tar|x-virtualbox-hdd|x-virtualbox-ova|x-virtualbox-ovf|x-virtualbox-vbox|x-virtualbox-vdi|x-virtualbox-vhd|x-virtualbox-vmdk|x-www-form-urlencoded)|font\/(?:otf|ttf)|image\/(?:bmp|vnd\.adobe\.photoshop|vnd\.microsoft\.icon|vnd\.ms-dds|x-icon|x-ms-bmp)|message\/rfc822|model\/gltf-binary|x-shader\/x-fragment|x-shader\/x-vertex|[^;\s]+?\+(?:json|text|xml|yaml))(?:[;\s]|$)/i,E1={br:".br",zstd:".zst",gzip:".gz"},g4=Object.keys(E1),m4=()=>{let[f,$]=E4.node.split(".").map((M)=>parseInt(M));return f>=23||f===22&&$>=7||f===20&&$>=18},r4=m4(),WY=(f)=>{if(r4)return u4.toWeb(f);return new ReadableStream({start(M){f.on("data",(Y)=>{M.enqueue(Y)}),f.on("error",(Y)=>{M.error(Y)}),f.on("end",()=>{M.close()})},cancel(){f.destroy()}})},_1=(f)=>{let $;try{$=v4(f)}catch{}return $},u1=(f={root:""})=>{let $=f.root||"",M=f.path;if($!==""&&!_4($))console.error(`serveStatic: root path '${$}' is not found, are you sure it's correct?`);return async(Y,J)=>{if(Y.finalized)return J();let z;if(M)z=M;else try{if(z=decodeURIComponent(Y.req.path),/(?:^|[\/\\])\.\.(?:$|[\/\\])/.test(z))throw Error()}catch{return await f.onNotFound?.(Y.req.path,Y),J()}let Z=DY($,!M&&f.rewriteRequestPath?f.rewriteRequestPath(z,Y):z),X=_1(Z);if(X&&X.isDirectory()){let V=f.index??"index.html";Z=DY(Z,V),X=_1(Z)}if(!X)return await f.onNotFound?.(Z,Y),J();let G=qY(Z);if(Y.header("Content-Type",G||"application/octet-stream"),f.precompressed&&(!G||h4.test(G))){let V=new Set(Y.req.header("Accept-Encoding")?.split(",").map((W)=>W.trim()));for(let W of g4){if(!V.has(W))continue;let H=_1(Z+E1[W]);if(H){Y.header("Content-Encoding",W),Y.header("Vary","Accept-Encoding",{append:!0}),X=H,Z=Z+E1[W];break}}}let q,Q=X.size,D=Y.req.header("range")||"";if(Y.req.method=="HEAD"||Y.req.method=="OPTIONS")Y.header("Content-Length",Q.toString()),Y.status(200),q=Y.body(null);else if(!D)Y.header("Content-Length",Q.toString()),q=Y.body(WY(QY(Z)),200);else{Y.header("Accept-Ranges","bytes"),Y.header("Date",X.birthtime.toUTCString());let V=D.replace(/bytes=/,"").split("-",2),W=parseInt(V[0],10)||0,H=parseInt(V[1],10)||Q-1;if(Q<H-W+1)H=Q-1;let R=H-W+1,P=QY(Z,{start:W,end:H});Y.header("Content-Length",R.toString()),Y.header("Content-Range",`bytes ${W}-${H}/${X.size}`),q=Y.body(WY(P),206)}return await f.onFound?.(Z,Y),q}};var h1=(f,$,M)=>{return(Y,J)=>{let z=-1;return Z(0);async function Z(X){if(X<=z)throw Error("next() called multiple times");z=X;let G,q=!1,Q;if(f[X])Q=f[X][0][0],Y.req.routeIndex=X;else Q=X===f.length&&J||void 0;if(Q)try{G=await Q(Y,()=>Z(X+1))}catch(D){if(D instanceof Error&&$)Y.error=D,G=await $(D,Y),q=!0;else throw D}else if(Y.finalized===!1&&M)G=await M(Y);if(G&&(Y.finalized===!1||q))Y.res=G;return Y}}};var VY=Symbol();var UY=async(f,$=Object.create(null))=>{let{all:M=!1,dot:Y=!1}=$,z=(f instanceof b0?f.raw.headers:f.headers).get("Content-Type");if(z?.startsWith("multipart/form-data")||z?.startsWith("application/x-www-form-urlencoded"))return c4(f,{all:M,dot:Y});return{}};async function c4(f,$){let M=await f.formData();if(M)return p4(M,$);return{}}function p4(f,$){let M=Object.create(null);if(f.forEach((Y,J)=>{if(!($.all||J.endsWith("[]")))M[J]=Y;else l4(M,J,Y)}),$.dot)Object.entries(M).forEach(([Y,J])=>{if(Y.includes("."))d4(M,Y,J),delete M[Y]});return M}var l4=(f,$,M)=>{if(f[$]!==void 0)if(Array.isArray(f[$]))f[$].push(M);else f[$]=[f[$],M];else if(!$.endsWith("[]"))f[$]=M;else f[$]=[M]},d4=(f,$,M)=>{let Y=f,J=$.split(".");J.forEach((z,Z)=>{if(Z===J.length-1)Y[z]=M;else{if(!Y[z]||typeof Y[z]!=="object"||Array.isArray(Y[z])||Y[z]instanceof File)Y[z]=Object.create(null);Y=Y[z]}})};var m1=(f)=>{let $=f.split("/");if($[0]==="")$.shift();return $},KY=(f)=>{let{groups:$,path:M}=n4(f),Y=m1(M);return i4(Y,$)},n4=(f)=>{let $=[];return f=f.replace(/\{[^}]+\}/g,(M,Y)=>{let J=`@${Y}`;return $.push([J,M]),J}),{groups:$,path:f}},i4=(f,$)=>{for(let M=$.length-1;M>=0;M--){let[Y]=$[M];for(let J=f.length-1;J>=0;J--)if(f[J].includes(Y)){f[J]=f[J].replace(Y,$[M][1]);break}}return f},v0={},BY=(f,$)=>{if(f==="*")return"*";let M=f.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/);if(M){let Y=`${f}#${$}`;if(!v0[Y])if(M[2])v0[Y]=$&&$[0]!==":"&&$[0]!=="*"?[Y,M[1],new RegExp(`^${M[2]}(?=/${$})`)]:[f,M[1],new RegExp(`^${M[2]}$`)];else v0[Y]=[f,M[1],!0];return v0[Y]}return null},_0=(f,$)=>{try{return $(f)}catch{return f.replace(/(?:%[0-9A-Fa-f]{2})+/g,(M)=>{try{return $(M)}catch{return M}})}},o4=(f)=>_0(f,decodeURI),r1=(f)=>{let $=f.url,M=$.indexOf("/",$.indexOf(":")+4),Y=M;for(;Y<$.length;Y++){let J=$.charCodeAt(Y);if(J===37){let z=$.indexOf("?",Y),Z=$.indexOf("#",Y),X=z===-1?Z===-1?void 0:Z:Z===-1?z:Math.min(z,Z),G=$.slice(M,X);return o4(G.includes("%25")?G.replace(/%25/g,"%2525"):G)}else if(J===63||J===35)break}return $.slice(M,Y)};var HY=(f)=>{let $=r1(f);return $.length>1&&$.at(-1)==="/"?$.slice(0,-1):$},Pf=(f,$,...M)=>{if(M.length)$=Pf($,...M);return`${f?.[0]==="/"?"":"/"}${f}${$==="/"?"":`${f?.at(-1)==="/"?"":"/"}${$?.[0]==="/"?$.slice(1):$}`}`},E0=(f)=>{if(f.charCodeAt(f.length-1)!==63||!f.includes(":"))return null;let $=f.split("/"),M=[],Y="";return $.forEach((J)=>{if(J!==""&&!/\:/.test(J))Y+="/"+J;else if(/\:/.test(J))if(/\?/.test(J)){if(M.length===0&&Y==="")M.push("/");else M.push(Y);let z=J.replace("?","");Y+="/"+z,M.push(Y)}else Y+="/"+J}),M.filter((J,z,Z)=>Z.indexOf(J)===z)},g1=(f)=>{if(!/[%+]/.test(f))return f;if(f.indexOf("+")!==-1)f=f.replace(/\+/g," ");return f.indexOf("%")!==-1?_0(f,c1):f},yY=(f,$,M)=>{let Y;if(!M&&$&&!/[%+]/.test($)){let Z=f.indexOf("?",8);if(Z===-1)return;if(!f.startsWith($,Z+1))Z=f.indexOf(`&${$}`,Z+1);while(Z!==-1){let X=f.charCodeAt(Z+$.length+1);if(X===61){let G=Z+$.length+2,q=f.indexOf("&",G);return g1(f.slice(G,q===-1?void 0:q))}else if(X==38||isNaN(X))return"";Z=f.indexOf(`&${$}`,Z+1)}if(Y=/[%+]/.test(f),!Y)return}let J={};Y??=/[%+]/.test(f);let z=f.indexOf("?",8);while(z!==-1){let Z=f.indexOf("&",z+1),X=f.indexOf("=",z);if(X>Z&&Z!==-1)X=-1;let G=f.slice(z+1,X===-1?Z===-1?void 0:Z:X);if(Y)G=g1(G);if(z=Z,G==="")continue;let q;if(X===-1)q="";else if(q=f.slice(X+1,Z===-1?void 0:Z),Y)q=g1(q);if(M){if(!(J[G]&&Array.isArray(J[G])))J[G]=[];J[G].push(q)}else J[G]??=q}return $?J[$]:J},SY=yY,FY=(f,$)=>{return yY(f,$,!0)},c1=decodeURIComponent;var PY=(f)=>_0(f,c1),b0=class{raw;#$;#f;routeIndex=0;path;bodyCache={};constructor(f,$="/",M=[[]]){this.raw=f,this.path=$,this.#f=M,this.#$={}}param(f){return f?this.#M(f):this.#z()}#M(f){let $=this.#f[0][this.routeIndex][1][f],M=this.#J($);return M&&/\%/.test(M)?PY(M):M}#z(){let f={},$=Object.keys(this.#f[0][this.routeIndex][1]);for(let M of $){let Y=this.#J(this.#f[0][this.routeIndex][1][M]);if(Y!==void 0)f[M]=/\%/.test(Y)?PY(Y):Y}return f}#J(f){return this.#f[1]?this.#f[1][f]:f}query(f){return SY(this.url,f)}queries(f){return FY(this.url,f)}header(f){if(f)return this.raw.headers.get(f)??void 0;let $={};return this.raw.headers.forEach((M,Y)=>{$[Y]=M}),$}async parseBody(f){return this.bodyCache.parsedBody??=await UY(this,f)}#Y=(f)=>{let{bodyCache:$,raw:M}=this,Y=$[f];if(Y)return Y;let J=Object.keys($)[0];if(J)return $[J].then((z)=>{if(J==="json")z=JSON.stringify(z);return new Response(z)[f]()});return $[f]=M[f]()};json(){return this.#Y("text").then((f)=>JSON.parse(f))}text(){return this.#Y("text")}arrayBuffer(){return this.#Y("arrayBuffer")}blob(){return this.#Y("blob")}formData(){return this.#Y("formData")}addValidatedData(f,$){this.#$[f]=$}valid(f){return this.#$[f]}get url(){return this.raw.url}get method(){return this.raw.method}get[VY](){return this.#f}get matchedRoutes(){return this.#f[0].map(([[,f]])=>f)}get routePath(){return this.#f[0].map(([[,f]])=>f)[this.routeIndex].path}};var TY={Stringify:1,BeforeStream:2,Stream:3},s4=(f,$)=>{let M=new String(f);return M.isEscaped=!0,M.callbacks=$,M};var p1=async(f,$,M,Y,J)=>{if(typeof f==="object"&&!(f instanceof String)){if(!(f instanceof Promise))f=f.toString();if(f instanceof Promise)f=await f}let z=f.callbacks;if(!z?.length)return Promise.resolve(f);if(J)J[0]+=f;else J=[f];let Z=Promise.all(z.map((X)=>X({phase:$,buffer:J,context:Y}))).then((X)=>Promise.all(X.filter(Boolean).map((G)=>p1(G,$,!1,Y,J))).then(()=>J[0]));if(M)return s4(await Z,z);else return Z};var a4="text/plain; charset=UTF-8",l1=(f,$)=>{return{"Content-Type":f,...$}},gf=(f,$)=>new Response(f,$),wY=class{#$;#f;env={};#M;finalized=!1;error;#z;#J;#Y;#Q;#G;#q;#X;#D;#W;constructor(f,$){if(this.#$=f,$)this.#J=$.executionCtx,this.env=$.env,this.#q=$.notFoundHandler,this.#W=$.path,this.#D=$.matchResult}get req(){return this.#f??=new b0(this.#$,this.#W,this.#D),this.#f}get event(){if(this.#J&&"respondWith"in this.#J)return this.#J;else throw Error("This context has no FetchEvent")}get executionCtx(){if(this.#J)return this.#J;else throw Error("This context has no ExecutionContext")}get res(){return this.#Y||=gf(null,{headers:this.#X??=new Headers})}set res(f){if(this.#Y&&f){f=gf(f.body,f);for(let[$,M]of this.#Y.headers.entries()){if($==="content-type")continue;if($==="set-cookie"){let Y=this.#Y.headers.getSetCookie();f.headers.delete("set-cookie");for(let J of Y)f.headers.append("set-cookie",J)}else f.headers.set($,M)}}this.#Y=f,this.finalized=!0}render=(...f)=>{return this.#G??=($)=>this.html($),this.#G(...f)};setLayout=(f)=>this.#Q=f;getLayout=()=>this.#Q;setRenderer=(f)=>{this.#G=f};header=(f,$,M)=>{if(this.finalized)this.#Y=gf(this.#Y.body,this.#Y);let Y=this.#Y?this.#Y.headers:this.#X??=new Headers;if($===void 0)Y.delete(f);else if(M?.append)Y.append(f,$);else Y.set(f,$)};status=(f)=>{this.#z=f};set=(f,$)=>{this.#M??=new Map,this.#M.set(f,$)};get=(f)=>{return this.#M?this.#M.get(f):void 0};get var(){if(!this.#M)return{};return Object.fromEntries(this.#M)}#Z(f,$,M){let Y=this.#Y?new Headers(this.#Y.headers):this.#X??new Headers;if(typeof $==="object"&&"headers"in $){let z=$.headers instanceof Headers?$.headers:new Headers($.headers);for(let[Z,X]of z)if(Z.toLowerCase()==="set-cookie")Y.append(Z,X);else Y.set(Z,X)}if(M)for(let[z,Z]of Object.entries(M))if(typeof Z==="string")Y.set(z,Z);else{Y.delete(z);for(let X of Z)Y.append(z,X)}let J=typeof $==="number"?$:$?.status??this.#z;return gf(f,{status:J,headers:Y})}newResponse=(...f)=>this.#Z(...f);body=(f,$,M)=>this.#Z(f,$,M);#V(){return!this.#X&&!this.#z&&!this.finalized}text=(f,$,M)=>{return this.#V()&&!$&&!M?gf(f):this.#Z(f,$,l1(a4,M))};json=(f,$,M)=>{return this.#V()&&!$&&!M?Response.json(f):this.#Z(JSON.stringify(f),$,l1("application/json",M))};html=(f,$,M)=>{let Y=(J)=>this.#Z(J,$,l1("text/html; charset=UTF-8",M));return typeof f==="object"?p1(f,TY.Stringify,!1,{}).then(Y):Y(f)};redirect=(f,$)=>{let M=String(f);return this.header("Location",!/[^\x00-\xFF]/.test(M)?M:encodeURI(M)),this.newResponse(null,$??302)};notFound=()=>{return this.#q??=()=>gf(),this.#q(this)}};var N="ALL",jY="all",RY=["get","post","put","delete","options","patch"],u0="Can not add a route since the matcher is already built.",h0=class extends Error{};var LY="__COMPOSED_HANDLER";var e4=(f)=>{return f.text("404 Not Found",404)},AY=(f,$)=>{if("getResponse"in f){let M=f.getResponse();return $.newResponse(M.body,M)}return console.error(f),$.text("Internal Server Error",500)},NY=class f{get;post;put;delete;options;patch;all;on;use;router;getPath;_basePath="/";#$="/";routes=[];constructor($={}){[...RY,jY].forEach((z)=>{this[z]=(Z,...X)=>{if(typeof Z==="string")this.#$=Z;else this.#z(z,this.#$,Z);return X.forEach((G)=>{this.#z(z,this.#$,G)}),this}}),this.on=(z,Z,...X)=>{for(let G of[Z].flat()){this.#$=G;for(let q of[z].flat())X.map((Q)=>{this.#z(q.toUpperCase(),this.#$,Q)})}return this},this.use=(z,...Z)=>{if(typeof z==="string")this.#$=z;else this.#$="*",Z.unshift(z);return Z.forEach((X)=>{this.#z(N,this.#$,X)}),this};let{strict:Y,...J}=$;Object.assign(this,J),this.getPath=Y??!0?$.getPath??r1:HY}#f(){let $=new f({router:this.router,getPath:this.getPath});return $.errorHandler=this.errorHandler,$.#M=this.#M,$.routes=this.routes,$}#M=e4;errorHandler=AY;route($,M){let Y=this.basePath($);return M.routes.map((J)=>{let z;if(M.errorHandler===AY)z=J.handler;else z=async(Z,X)=>(await h1([],M.errorHandler)(Z,()=>J.handler(Z,X))).res,z[LY]=J.handler;Y.#z(J.method,J.path,z)}),this}basePath($){let M=this.#f();return M._basePath=Pf(this._basePath,$),M}onError=($)=>{return this.errorHandler=$,this};notFound=($)=>{return this.#M=$,this};mount($,M,Y){let J,z;if(Y)if(typeof Y==="function")z=Y;else if(z=Y.optionHandler,Y.replaceRequest===!1)J=(G)=>G;else J=Y.replaceRequest;let Z=z?(G)=>{let q=z(G);return Array.isArray(q)?q:[q]}:(G)=>{let q=void 0;try{q=G.executionCtx}catch{}return[G.env,q]};J||=(()=>{let G=Pf(this._basePath,$),q=G==="/"?0:G.length;return(Q)=>{let D=new URL(Q.url);return D.pathname=D.pathname.slice(q)||"/",new Request(D,Q)}})();let X=async(G,q)=>{let Q=await M(J(G.req.raw),...Z(G));if(Q)return Q;await q()};return this.#z(N,Pf($,"*"),X),this}#z($,M,Y){$=$.toUpperCase(),M=Pf(this._basePath,M);let J={basePath:this._basePath,path:M,method:$,handler:Y};this.router.add($,M,[Y,J]),this.routes.push(J)}#J($,M){if($ instanceof Error)return this.errorHandler($,M);throw $}#Y($,M,Y,J){if(J==="HEAD")return(async()=>new Response(null,await this.#Y($,M,Y,"GET")))();let z=this.getPath($,{env:Y}),Z=this.router.match(J,z),X=new wY($,{path:z,matchResult:Z,env:Y,executionCtx:M,notFoundHandler:this.#M});if(Z[0].length===1){let q;try{q=Z[0][0][0][0](X,async()=>{X.res=await this.#M(X)})}catch(Q){return this.#J(Q,X)}return q instanceof Promise?q.then((Q)=>Q||(X.finalized?X.res:this.#M(X))).catch((Q)=>this.#J(Q,X)):q??this.#M(X)}let G=h1(Z[0],this.errorHandler,this.#M);return(async()=>{try{let q=await G(X);if(!q.finalized)throw Error("Context is not finalized. Did you forget to return a Response object or `await next()`?");return q.res}catch(q){return this.#J(q,X)}})()}fetch=($,...M)=>{return this.#Y($,M[1],M[0],$.method)};request=($,M,Y,J)=>{if($ instanceof Request)return this.fetch(M?new Request($,M):$,Y,J);return $=$.toString(),this.fetch(new Request(/^https?:\/\//.test($)?$:`http://localhost${Pf("/",$)}`,M),Y,J)};fire=()=>{addEventListener("fetch",($)=>{$.respondWith(this.#Y($.request,$,void 0,$.request.method))})}};var z0=[];function g0(f,$){let M=this.buildAllMatchers(),Y=(J,z)=>{let Z=M[J]||M[N],X=Z[2][z];if(X)return X;let G=z.match(Z[0]);if(!G)return[[],z0];let q=G.indexOf("",1);return[Z[1][q],G]};return this.match=Y,Y(f,$)}var m0="[^/]+",Z0=".*",X0="(?:|/.*)",Tf=Symbol(),t4=new Set(".\\+*[^]$()");function f9(f,$){if(f.length===1)return $.length===1?f<$?-1:1:-1;if($.length===1)return 1;if(f===Z0||f===X0)return 1;else if($===Z0||$===X0)return-1;if(f===m0)return 1;else if($===m0)return-1;return f.length===$.length?f<$?-1:1:$.length-f.length}var OY=class f{#$;#f;#M=Object.create(null);insert($,M,Y,J,z){if($.length===0){if(this.#$!==void 0)throw Tf;if(z)return;this.#$=M;return}let[Z,...X]=$,G=Z==="*"?X.length===0?["","",Z0]:["","",m0]:Z==="/*"?["","",X0]:Z.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/),q;if(G){let Q=G[1],D=G[2]||m0;if(Q&&G[2]){if(D===".*")throw Tf;if(D=D.replace(/^\((?!\?:)(?=[^)]+\)$)/,"(?:"),/\((?!\?:)/.test(D))throw Tf}if(q=this.#M[D],!q){if(Object.keys(this.#M).some((V)=>V!==Z0&&V!==X0))throw Tf;if(z)return;if(q=this.#M[D]=new f,Q!=="")q.#f=J.varIndex++}if(!z&&Q!=="")Y.push([Q,q.#f])}else if(q=this.#M[Z],!q){if(Object.keys(this.#M).some((Q)=>Q.length>1&&Q!==Z0&&Q!==X0))throw Tf;if(z)return;q=this.#M[Z]=new f}q.insert(X,M,Y,J,z)}buildRegExpStr(){let M=Object.keys(this.#M).sort(f9).map((Y)=>{let J=this.#M[Y];return(typeof J.#f==="number"?`(${Y})@${J.#f}`:t4.has(Y)?`\\${Y}`:Y)+J.buildRegExpStr()});if(typeof this.#$==="number")M.unshift(`#${this.#$}`);if(M.length===0)return"";if(M.length===1)return M[0];return"(?:"+M.join("|")+")"}};var xY=class{#$={varIndex:0};#f=new OY;insert(f,$,M){let Y=[],J=[];for(let Z=0;;){let X=!1;if(f=f.replace(/\{[^}]+\}/g,(G)=>{let q=`@\\${Z}`;return J[Z]=[q,G],Z++,X=!0,q}),!X)break}let z=f.match(/(?::[^\/]+)|(?:\/\*$)|./g)||[];for(let Z=J.length-1;Z>=0;Z--){let[X]=J[Z];for(let G=z.length-1;G>=0;G--)if(z[G].indexOf(X)!==-1){z[G]=z[G].replace(X,J[Z][1]);break}}return this.#f.insert(z,$,Y,this.#$,M),Y}buildRegExp(){let f=this.#f.buildRegExpStr();if(f==="")return[/^$/,[],[]];let $=0,M=[],Y=[];return f=f.replace(/#(\d+)|@(\d+)|\.\*\$/g,(J,z,Z)=>{if(z!==void 0)return M[++$]=Number(z),"$()";if(Z!==void 0)return Y[Number(Z)]=++$,"";return""}),[new RegExp(`^${f}`),M,Y]}};var $9=[/^$/,[],Object.create(null)],IY=Object.create(null);function kY(f){return IY[f]??=new RegExp(f==="*"?"":`^${f.replace(/\/\*$|([.\\+*[^\]$()])/g,($,M)=>M?`\\${M}`:"(?:|/.*)")}$`)}function M9(){IY=Object.create(null)}function Y9(f){let $=new xY,M=[];if(f.length===0)return $9;let Y=f.map((q)=>[!/\*|\/:/.test(q[0]),...q]).sort(([q,Q],[D,V])=>q?1:D?-1:Q.length-V.length),J=Object.create(null);for(let q=0,Q=-1,D=Y.length;q<D;q++){let[V,W,H]=Y[q];if(V)J[W]=[H.map(([P])=>[P,Object.create(null)]),z0];else Q++;let R;try{R=$.insert(W,Q,V)}catch(P){throw P===Tf?new h0(W):P}if(V)continue;M[Q]=H.map(([P,A])=>{let i=Object.create(null);A-=1;for(;A>=0;A--){let[o,s]=R[A];i[o]=s}return[P,i]})}let[z,Z,X]=$.buildRegExp();for(let q=0,Q=M.length;q<Q;q++)for(let D=0,V=M[q].length;D<V;D++){let W=M[q][D]?.[1];if(!W)continue;let H=Object.keys(W);for(let R=0,P=H.length;R<P;R++)W[H[R]]=X[W[H[R]]]}let G=[];for(let q in Z)G[q]=M[Z[q]];return[z,G,J]}function mf(f,$){if(!f)return;for(let M of Object.keys(f).sort((Y,J)=>J.length-Y.length))if(kY(M).test($))return[...f[M]];return}var r0=class{name="RegExpRouter";#$;#f;constructor(){this.#$={[N]:Object.create(null)},this.#f={[N]:Object.create(null)}}add(f,$,M){let Y=this.#$,J=this.#f;if(!Y||!J)throw Error(u0);if(!Y[f])[Y,J].forEach((X)=>{X[f]=Object.create(null),Object.keys(X[N]).forEach((G)=>{X[f][G]=[...X[N][G]]})});if($==="/*")$="*";let z=($.match(/\/:/g)||[]).length;if(/\*$/.test($)){let X=kY($);if(f===N)Object.keys(Y).forEach((G)=>{Y[G][$]||=mf(Y[G],$)||mf(Y[N],$)||[]});else Y[f][$]||=mf(Y[f],$)||mf(Y[N],$)||[];Object.keys(Y).forEach((G)=>{if(f===N||f===G)Object.keys(Y[G]).forEach((q)=>{X.test(q)&&Y[G][q].push([M,z])})}),Object.keys(J).forEach((G)=>{if(f===N||f===G)Object.keys(J[G]).forEach((q)=>X.test(q)&&J[G][q].push([M,z]))});return}let Z=E0($)||[$];for(let X=0,G=Z.length;X<G;X++){let q=Z[X];Object.keys(J).forEach((Q)=>{if(f===N||f===Q)J[Q][q]||=[...mf(Y[Q],q)||mf(Y[N],q)||[]],J[Q][q].push([M,z-G+X+1])})}}match=g0;buildAllMatchers(){let f=Object.create(null);return Object.keys(this.#f).concat(Object.keys(this.#$)).forEach(($)=>{f[$]||=this.#M($)}),this.#$=this.#f=void 0,M9(),f}#M(f){let $=[],M=f===N;if([this.#$,this.#f].forEach((Y)=>{let J=Y[f]?Object.keys(Y[f]).map((z)=>[z,Y[f][z]]):[];if(J.length!==0)M||=!0,$.push(...J);else if(f!==N)$.push(...Object.keys(Y[N]).map((z)=>[z,Y[N][z]]))}),!M)return null;else return Y9($)}};var J9=class{name="PreparedRegExpRouter";#$;#f;constructor(f,$){this.#$=f,this.#f=$}#M(f,$){let M=this.#$[f];M[1].forEach((Y)=>Y&&Y.push($)),Object.values(M[2]).forEach((Y)=>Y[0].push($))}#z(f,$,M,Y,J){let z=this.#$[f];if(!J)z[2][$][0].push([M,{}]);else Y.forEach((Z)=>{if(typeof Z==="number")z[1][Z].push([M,J]);else z[2][Z||$][0].push([M,J])})}add(f,$,M){if(!this.#$[f]){let J=this.#$[N],z={};for(let Z in J[2])z[Z]=[J[2][Z][0].slice(),z0];this.#$[f]=[J[0],J[1].map((Z)=>Array.isArray(Z)?Z.slice():0),z]}if($==="/*"||$==="*"){let J=[M,{}];if(f===N)for(let z in this.#$)this.#M(z,J);else this.#M(f,J);return}let Y=this.#f[$];if(!Y)throw Error(`Path ${$} is not registered`);for(let[J,z]of Y)if(f===N)for(let Z in this.#$)this.#z(Z,$,M,J,z);else this.#z(f,$,M,J,z)}buildAllMatchers(){return this.#$}match=g0};var d1=class{name="SmartRouter";#$=[];#f=[];constructor(f){this.#$=f.routers}add(f,$,M){if(!this.#f)throw Error(u0);this.#f.push([f,$,M])}match(f,$){if(!this.#f)throw Error("Fatal error");let M=this.#$,Y=this.#f,J=M.length,z=0,Z;for(;z<J;z++){let X=M[z];try{for(let G=0,q=Y.length;G<q;G++)X.add(...Y[G]);Z=X.match(f,$)}catch(G){if(G instanceof h0)continue;throw G}this.match=X.match.bind(X),this.#$=[X],this.#f=void 0;break}if(z===J)throw Error("Fatal error");return this.name=`SmartRouter + ${this.activeRouter.name}`,Z}get activeRouter(){if(this.#f||this.#$.length!==1)throw Error("No active router has been determined yet.");return this.#$[0]}};var G0=Object.create(null),z9=(f)=>{for(let $ in f)return!0;return!1},CY=class f{#$;#f;#M;#z=0;#J=G0;constructor($,M,Y){if(this.#f=Y||Object.create(null),this.#$=[],$&&M){let J=Object.create(null);J[$]={handler:M,possibleKeys:[],score:0},this.#$=[J]}this.#M=[]}insert($,M,Y){this.#z=++this.#z;let J=this,z=KY(M),Z=[];for(let X=0,G=z.length;X<G;X++){let q=z[X],Q=z[X+1],D=BY(q,Q),V=Array.isArray(D)?D[0]:q;if(V in J.#f){if(J=J.#f[V],D)Z.push(D[1]);continue}if(J.#f[V]=new f,D)J.#M.push(D),Z.push(D[1]);J=J.#f[V]}return J.#$.push({[$]:{handler:Y,possibleKeys:Z.filter((X,G,q)=>q.indexOf(X)===G),score:this.#z}}),J}#Y($,M,Y,J,z){for(let Z=0,X=M.#$.length;Z<X;Z++){let G=M.#$[Z],q=G[Y]||G[N],Q={};if(q!==void 0){if(q.params=Object.create(null),$.push(q),J!==G0||z&&z!==G0)for(let D=0,V=q.possibleKeys.length;D<V;D++){let W=q.possibleKeys[D],H=Q[q.score];q.params[W]=z?.[W]&&!H?z[W]:J[W]??z?.[W],Q[q.score]=!0}}}}search($,M){let Y=[];this.#J=G0;let z=[this],Z=m1(M),X=[],G=Z.length,q=null;for(let Q=0;Q<G;Q++){let D=Z[Q],V=Q===G-1,W=[];for(let R=0,P=z.length;R<P;R++){let A=z[R],i=A.#f[D];if(i)if(i.#J=A.#J,V){if(i.#f["*"])this.#Y(Y,i.#f["*"],$,A.#J);this.#Y(Y,i,$,A.#J)}else W.push(i);for(let o=0,s=A.#M.length;o<s;o++){let rf=A.#M[o],l=A.#J===G0?{}:{...A.#J};if(rf==="*"){let Mf=A.#f["*"];if(Mf)this.#Y(Y,Mf,$,A.#J),Mf.#J=l,W.push(Mf);continue}let[wf,k,L]=rf;if(!D&&!(L instanceof RegExp))continue;let m=A.#f[wf];if(L instanceof RegExp){if(q===null){q=Array(G);let K=M[0]==="/"?1:0;for(let U=0;U<G;U++)q[U]=K,K+=Z[U].length+1}let Mf=M.substring(q[Q]),T=L.exec(Mf);if(T){if(l[k]=T[0],this.#Y(Y,m,$,A.#J,l),z9(m.#f)){m.#J=l;let K=T[0].match(/\//)?.length??0;(X[K]||=[]).push(m)}continue}}if(L===!0||L.test(D))if(l[k]=D,V){if(this.#Y(Y,m,$,l,A.#J),m.#f["*"])this.#Y(Y,m.#f["*"],$,l,A.#J)}else m.#J=l,W.push(m)}}let H=X.shift();z=H?W.concat(H):W}if(Y.length>1)Y.sort((Q,D)=>{return Q.score-D.score});return[Y.map(({handler:Q,params:D})=>[Q,D])]}};var n1=class{name="TrieRouter";#$;constructor(){this.#$=new CY}add(f,$,M){let Y=E0($);if(Y){for(let J=0,z=Y.length;J<z;J++)this.#$.insert(f,Y[J],M);return}this.#$.insert(f,$,M)}match(f,$){return this.#$.search(f,$)}};var p=class extends NY{constructor(f={}){super(f);this.router=f.router??new d1({routers:[new r0,new n1]})}};function g(f,$){return f.json({code:1,data:$,msg:""})}function a(f,$){return f.json({code:-1,data:null,msg:$})}function bY(f){return async($)=>{let M=await $.req.json(),Y=await f.addAlias(M);if(!Y.success)return a($,Y.error);return g($,Y.data)}}function vY(f){return async($)=>{let M=decodeURIComponent($.req.param("uri")??""),Y=await f.getChildren(M);return g($,Y)}}function _Y(f){return async($)=>{let M=$.req.query("domain"),Y=await f.getAllMemories({domain:M,includeDeleted:!0});return g($,Y)}}function EY(f){return async($)=>{let M=$.req.query("uri"),Y=$.req.query("domain"),J=await f.getRelationships({uri:M,domain:Y});return g($,J)}}function uY(f){return async($)=>{let M=decodeURIComponent($.req.param("uri")??""),Y=$.req.query("includeDeleted")==="true";try{let J=await f.getMemory(M,{includeDeleted:Y});if(!J)return a($,"Memory not found");return g($,J)}catch(J){return a($,J instanceof Error?J.message:String(J))}}}function hY(f){return async($)=>{let M=await $.req.json();try{let Y=await f.createMemory(M);return g($,Y)}catch(Y){return a($,Y instanceof Error?Y.message:String(Y))}}}function gY(f){return async($)=>{let M=decodeURIComponent($.req.param("uri")??""),Y=await $.req.json();try{let J=await f.updateMemory({...Y,uri:M});return g($,J)}catch(J){return a($,J instanceof Error?J.message:String(J))}}}function mY(f){return async($)=>{let M=decodeURIComponent($.req.param("uri")??""),Y=$.req.query("recursive")==="true",J=$.req.query("permanent")==="true";try{return await f.deleteMemory(M,{recursive:Y,permanent:J}),g($,null)}catch(z){return a($,z instanceof Error?z.message:String(z))}}}function rY(f){return async($)=>{let M=decodeURIComponent($.req.param("uri")??"");try{let Y=await f.restoreMemory(M);return g($,Y)}catch(Y){return a($,Y instanceof Error?Y.message:String(Y))}}}function cY(f){return async($)=>{let M=$.req.query("q")??"",Y=$.req.query("domain"),J=$.req.query("limit")?Number.parseInt($.req.query("limit"),10):10;if(!M)return a($,"Query parameter 'q' is required");let z=await f.searchMemory(M,{query:M,domain:Y,limit:J});return g($,z)}}function pY(f){let $=new p().basePath("/alias");return $.post("/",bY(f)),$}function lY(f){let $=new p().basePath("/children");return $.get("/:uri",vY(f)),$}function dY(f){let $=new p().basePath("/graph");return $.get("/nodes",_Y(f)),$.get("/relationships",EY(f)),$}function nY(f){let $=new p().basePath("/memories");return $.get("/:uri",uY(f)),$.post("/",hY(f)),$.put("/:uri",gY(f)),$.delete("/:uri",mY(f)),$.post("/:uri/restore",rY(f)),$}function iY(f){let $=new p().basePath("/search");return $.get("/",cY(f)),$}function oY(f,$){let M=f.basePath("/api");M.route("/",nY($)),M.route("/",iY($)),M.route("/",lY($)),M.route("/",dY($)),M.route("/",pY($))}var __dirname="/home/runner/work/hippo-memo/hippo-memo/packages/cli/src/api";function Z9(f){let $=new p,M=process.env.WEB_DIST||sY(__dirname,"../../dist");return oY($,f),$.get("/*",u1({root:M})),$.get("*",u1({path:sY(M,"index.html")})),$}async function aY(f,$){let M=Z9(f);GY({fetch:M.fetch,port:$}),console.log(`Hippo web server started on http://localhost:${$}`),console.log("Press Ctrl+C to stop")}async function eY(f,$,M){let Y=x0(f),J=O0({type:M,config:Y});await aY(J,$)}var c0=new Q$;c0.name("hippo").description("Hippo Memory Store CLI").version("1.0.0");c0.command("init").description("Initialize a new hippo memory directory").argument("[directory]","Directory to initialize",".").action(async(f)=>{await tM(f)});c0.command("web").description("Start the web server").argument("[directory]","Project directory",".").option("-p, --port <port>","Port to listen on","3000").option("-s, --store-type <type>","Store type (filesystem or sqlite)","filesystem").action(async(f,$)=>{let M=Number.parseInt($.port,10),Y=$.storeType;await eY(f,M,Y)});c0.parse();
@@ -0,0 +1,53 @@
1
+ # Hippo Memory Templates
2
+
3
+ Hippo Memory 的预设内存模板集合。
4
+
5
+ ## 用途
6
+
7
+ 提供开箱即用的内存模板,用于:
8
+
9
+ - **系统初始化** - 创建系统核心内存结构
10
+ - **MCP 服务器配置** - 预定义的系统节点
11
+ - **快速启动** - 标准化的内存组织结构
12
+
13
+ ## 目录结构
14
+
15
+ ```
16
+ template/
17
+ ├── mcp/ # MCP 服务器相关模板
18
+ │ └── system/ # 系统级内存模板
19
+ └── system/ # 通用系统模板
20
+ ```
21
+
22
+ ## 系统模板
23
+
24
+ ### system://boot
25
+
26
+ 会话启动时的引导模板,包含:
27
+ - 核心协议说明
28
+ - 系统节点概述
29
+ - 初始化指令
30
+
31
+ ### system://soul
32
+
33
+ AI 身份和行为模式定义
34
+
35
+ ### system://user
36
+
37
+ 用户信息和偏好设置
38
+
39
+ ### system://agent
40
+
41
+ AI 能力边界定义
42
+
43
+ ### system://index
44
+
45
+ 内存索引和分类
46
+
47
+ ### system://recent
48
+
49
+ 近期事件记录
50
+
51
+ ## 使用方式
52
+
53
+ 模板通常在初始化新的 Hippo Memory 实例时自动应用,通过 `@hippo-memo/core` 包的初始化功能加载。