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jB,iBAAiB,GACjB,kBAAkB,GAClB,EAAS,OACX,CACA,OAAO,OAAO,IACZ,YAAY,EAAI","file":"/npm/websim-cli@0.1.5/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/websim-cli@0.1.5/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","#!/usr/bin/env node\n\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __esm = (fn, res) => function __init() {\n  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __commonJS = (cb, mod) => function __require() {\n  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n};\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n  // If the importer is in node compatibility mode or this is not an ESM\n  // file that has been converted to a CommonJS file using a Babel-\n  // compatible transform (i.e. \"__esModule\" has not been set), then set\n  // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n  isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n  mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// ../node_modules/commander/lib/error.js\nvar require_error = __commonJS({\n  \"../node_modules/commander/lib/error.js\"(exports) {\n    var CommanderError2 = class extends Error {\n      /**\n       * Constructs the CommanderError class\n       * @param {number} exitCode suggested exit code which could be used with process.exit\n       * @param {string} code an id string representing the error\n       * @param {string} message human-readable description of the error\n       */\n      constructor(exitCode, code, message) {\n        super(message);\n        Error.captureStackTrace(this, this.constructor);\n        this.name = this.constructor.name;\n        this.code = code;\n        this.exitCode = exitCode;\n        this.nestedError = void 0;\n      }\n    };\n    var InvalidArgumentError2 = class extends CommanderError2 {\n      /**\n       * Constructs the InvalidArgumentError class\n       * @param {string} [message] explanation of why argument is invalid\n       */\n      constructor(message) {\n        super(1, \"commander.invalidArgument\", message);\n        Error.captureStackTrace(this, this.constructor);\n        this.name = this.constructor.name;\n      }\n    };\n    exports.CommanderError = CommanderError2;\n    exports.InvalidArgumentError = InvalidArgumentError2;\n  }\n});\n\n// ../node_modules/commander/lib/argument.js\nvar require_argument = __commonJS({\n  \"../node_modules/commander/lib/argument.js\"(exports) {\n    var { InvalidArgumentError: InvalidArgumentError2 } = require_error();\n    var Argument2 = class {\n      /**\n       * Initialize a new command argument with the given name and description.\n       * The default is that the argument is required, and you can explicitly\n       * indicate this with <> around the name. Put [] around the name for an optional argument.\n       *\n       * @param {string} name\n       * @param {string} [description]\n       */\n      constructor(name, description) {\n        this.description = description || \"\";\n        this.variadic = false;\n        this.parseArg = void 0;\n        this.defaultValue = void 0;\n        this.defaultValueDescription = void 0;\n        this.argChoices = void 0;\n        switch (name[0]) {\n          case \"<\":\n            this.required = true;\n            this._name = name.slice(1, -1);\n            break;\n          case \"[\":\n            this.required = false;\n            this._name = name.slice(1, -1);\n            break;\n          default:\n            this.required = true;\n            this._name = name;\n            break;\n        }\n        if (this._name.length > 3 && this._name.slice(-3) === \"...\") {\n          this.variadic = true;\n          this._name = this._name.slice(0, -3);\n        }\n      }\n      /**\n       * Return argument name.\n       *\n       * @return {string}\n       */\n      name() {\n        return this._name;\n      }\n      /**\n       * @package\n       */\n      _concatValue(value, previous) {\n        if (previous === this.defaultValue || !Array.isArray(previous)) {\n          return [value];\n        }\n        return previous.concat(value);\n      }\n      /**\n       * Set the default value, and optionally supply the description to be displayed in the help.\n       *\n       * @param {*} value\n       * @param {string} [description]\n       * @return {Argument}\n       */\n      default(value, description) {\n        this.defaultValue = value;\n        this.defaultValueDescription = description;\n        return this;\n      }\n      /**\n       * Set the custom handler for processing CLI command arguments into argument values.\n       *\n       * @param {Function} [fn]\n       * @return {Argument}\n       */\n      argParser(fn) {\n        this.parseArg = fn;\n        return this;\n      }\n      /**\n       * Only allow argument value to be one of choices.\n       *\n       * @param {string[]} values\n       * @return {Argument}\n       */\n      choices(values) {\n        this.argChoices = values.slice();\n        this.parseArg = (arg, previous) => {\n          if (!this.argChoices.includes(arg)) {\n            throw new InvalidArgumentError2(\n              `Allowed choices are ${this.argChoices.join(\", \")}.`\n            );\n          }\n          if (this.variadic) {\n            return this._concatValue(arg, previous);\n          }\n          return arg;\n        };\n        return this;\n      }\n      /**\n       * Make argument required.\n       *\n       * @returns {Argument}\n       */\n      argRequired() {\n        this.required = true;\n        return this;\n      }\n      /**\n       * Make argument optional.\n       *\n       * @returns {Argument}\n       */\n      argOptional() {\n        this.required = false;\n        return this;\n      }\n    };\n    function humanReadableArgName(arg) {\n      const nameOutput = arg.name() + (arg.variadic === true ? \"...\" : \"\");\n      return arg.required ? \"<\" + nameOutput + \">\" : \"[\" + nameOutput + \"]\";\n    }\n    exports.Argument = Argument2;\n    exports.humanReadableArgName = humanReadableArgName;\n  }\n});\n\n// ../node_modules/commander/lib/help.js\nvar require_help = __commonJS({\n  \"../node_modules/commander/lib/help.js\"(exports) {\n    var { humanReadableArgName } = require_argument();\n    var Help2 = class {\n      constructor() {\n        this.helpWidth = void 0;\n        this.sortSubcommands = false;\n        this.sortOptions = false;\n        this.showGlobalOptions = false;\n      }\n      /**\n       * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one.\n       *\n       * @param {Command} cmd\n       * @returns {Command[]}\n       */\n      visibleCommands(cmd) {\n        const visibleCommands = cmd.commands.filter((cmd2) => !cmd2._hidden);\n        const helpCommand = cmd._getHelpCommand();\n        if (helpCommand && !helpCommand._hidden) {\n          visibleCommands.push(helpCommand);\n        }\n        if (this.sortSubcommands) {\n          visibleCommands.sort((a, b) => {\n            return a.name().localeCompare(b.name());\n          });\n        }\n        return visibleCommands;\n      }\n      /**\n       * Compare options for sort.\n       *\n       * @param {Option} a\n       * @param {Option} b\n       * @returns {number}\n       */\n      compareOptions(a, b) {\n        const getSortKey = (option) => {\n          return option.short ? option.short.replace(/^-/, \"\") : option.long.replace(/^--/, \"\");\n        };\n        return getSortKey(a).localeCompare(getSortKey(b));\n      }\n      /**\n       * Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one.\n       *\n       * @param {Command} cmd\n       * @returns {Option[]}\n       */\n      visibleOptions(cmd) {\n        const visibleOptions = cmd.options.filter((option) => !option.hidden);\n        const helpOption = cmd._getHelpOption();\n        if (helpOption && !helpOption.hidden) {\n          const removeShort = helpOption.short && cmd._findOption(helpOption.short);\n          const removeLong = helpOption.long && cmd._findOption(helpOption.long);\n          if (!removeShort && !removeLong) {\n            visibleOptions.push(helpOption);\n          } else if (helpOption.long && !removeLong) {\n            visibleOptions.push(\n              cmd.createOption(helpOption.long, helpOption.description)\n            );\n          } else if (helpOption.short && !removeShort) {\n            visibleOptions.push(\n              cmd.createOption(helpOption.short, helpOption.description)\n            );\n          }\n        }\n        if (this.sortOptions) {\n          visibleOptions.sort(this.compareOptions);\n        }\n        return visibleOptions;\n      }\n      /**\n       * Get an array of the visible global options. (Not including help.)\n       *\n       * @param {Command} cmd\n       * @returns {Option[]}\n       */\n      visibleGlobalOptions(cmd) {\n        if (!this.showGlobalOptions)\n          return [];\n        const globalOptions = [];\n        for (let ancestorCmd = cmd.parent; ancestorCmd; ancestorCmd = ancestorCmd.parent) {\n          const visibleOptions = ancestorCmd.options.filter(\n            (option) => !option.hidden\n          );\n          globalOptions.push(...visibleOptions);\n        }\n        if (this.sortOptions) {\n          globalOptions.sort(this.compareOptions);\n        }\n        return globalOptions;\n      }\n      /**\n       * Get an array of the arguments if any have a description.\n       *\n       * @param {Command} cmd\n       * @returns {Argument[]}\n       */\n      visibleArguments(cmd) {\n        if (cmd._argsDescription) {\n          cmd.registeredArguments.forEach((argument) => {\n            argument.description = argument.description || cmd._argsDescription[argument.name()] || \"\";\n          });\n        }\n        if (cmd.registeredArguments.find((argument) => argument.description)) {\n          return cmd.registeredArguments;\n        }\n        return [];\n      }\n      /**\n       * Get the command term to show in the list of subcommands.\n       *\n       * @param {Command} cmd\n       * @returns {string}\n       */\n      subcommandTerm(cmd) {\n        const args = cmd.registeredArguments.map((arg) => humanReadableArgName(arg)).join(\" \");\n        return cmd._name + (cmd._aliases[0] ? \"|\" + cmd._aliases[0] : \"\") + (cmd.options.length ? \" [options]\" : \"\") + // simplistic check for non-help option\n        (args ? \" \" + args : \"\");\n      }\n      /**\n       * Get the option term to show in the list of options.\n       *\n       * @param {Option} option\n       * @returns {string}\n       */\n      optionTerm(option) {\n        return option.flags;\n      }\n      /**\n       * Get the argument term to show in the list of arguments.\n       *\n       * @param {Argument} argument\n       * @returns {string}\n       */\n      argumentTerm(argument) {\n        return argument.name();\n      }\n      /**\n       * Get the longest command term length.\n       *\n       * @param {Command} cmd\n       * @param {Help} helper\n       * @returns {number}\n       */\n      longestSubcommandTermLength(cmd, helper) {\n        return helper.visibleCommands(cmd).reduce((max, command) => {\n          return Math.max(max, helper.subcommandTerm(command).length);\n        }, 0);\n      }\n      /**\n       * Get the longest option term length.\n       *\n       * @param {Command} cmd\n       * @param {Help} helper\n       * @returns {number}\n       */\n      longestOptionTermLength(cmd, helper) {\n        return helper.visibleOptions(cmd).reduce((max, option) => {\n          return Math.max(max, helper.optionTerm(option).length);\n        }, 0);\n      }\n      /**\n       * Get the longest global option term length.\n       *\n       * @param {Command} cmd\n       * @param {Help} helper\n       * @returns {number}\n       */\n      longestGlobalOptionTermLength(cmd, helper) {\n        return helper.visibleGlobalOptions(cmd).reduce((max, option) => {\n          return Math.max(max, helper.optionTerm(option).length);\n        }, 0);\n      }\n      /**\n       * Get the longest argument term length.\n       *\n       * @param {Command} cmd\n       * @param {Help} helper\n       * @returns {number}\n       */\n      longestArgumentTermLength(cmd, helper) {\n        return helper.visibleArguments(cmd).reduce((max, argument) => {\n          return Math.max(max, helper.argumentTerm(argument).length);\n        }, 0);\n      }\n      /**\n       * Get the command usage to be displayed at the top of the built-in help.\n       *\n       * @param {Command} cmd\n       * @returns {string}\n       */\n      commandUsage(cmd) {\n        let cmdName = cmd._name;\n        if (cmd._aliases[0]) {\n          cmdName = cmdName + \"|\" + cmd._aliases[0];\n        }\n        let ancestorCmdNames = \"\";\n        for (let ancestorCmd = cmd.parent; ancestorCmd; ancestorCmd = ancestorCmd.parent) {\n          ancestorCmdNames = ancestorCmd.name() + \" \" + ancestorCmdNames;\n        }\n        return ancestorCmdNames + cmdName + \" \" + cmd.usage();\n      }\n      /**\n       * Get the description for the command.\n       *\n       * @param {Command} cmd\n       * @returns {string}\n       */\n      commandDescription(cmd) {\n        return cmd.description();\n      }\n      /**\n       * Get the subcommand summary to show in the list of subcommands.\n       * (Fallback to description for backwards compatibility.)\n       *\n       * @param {Command} cmd\n       * @returns {string}\n       */\n      subcommandDescription(cmd) {\n        return cmd.summary() || cmd.description();\n      }\n      /**\n       * Get the option description to show in the list of options.\n       *\n       * @param {Option} option\n       * @return {string}\n       */\n      optionDescription(option) {\n        const extraInfo = [];\n        if (option.argChoices) {\n          extraInfo.push(\n            // use stringify to match the display of the default value\n            `choices: ${option.argChoices.map((choice) => JSON.stringify(choice)).join(\", \")}`\n          );\n        }\n        if (option.defaultValue !== void 0) {\n          const showDefault = option.required || option.optional || option.isBoolean() && typeof option.defaultValue === \"boolean\";\n          if (showDefault) {\n            extraInfo.push(\n              `default: ${option.defaultValueDescription || JSON.stringify(option.defaultValue)}`\n            );\n          }\n        }\n        if (option.presetArg !== void 0 && option.optional) {\n          extraInfo.push(`preset: ${JSON.stringify(option.presetArg)}`);\n        }\n        if (option.envVar !== void 0) {\n          extraInfo.push(`env: ${option.envVar}`);\n        }\n        if (extraInfo.length > 0) {\n          return `${option.description} (${extraInfo.join(\", \")})`;\n        }\n        return option.description;\n      }\n      /**\n       * Get the argument description to show in the list of arguments.\n       *\n       * @param {Argument} argument\n       * @return {string}\n       */\n      argumentDescription(argument) {\n        const extraInfo = [];\n        if (argument.argChoices) {\n          extraInfo.push(\n            // use stringify to match the display of the default value\n            `choices: ${argument.argChoices.map((choice) => JSON.stringify(choice)).join(\", \")}`\n          );\n        }\n        if (argument.defaultValue !== void 0) {\n          extraInfo.push(\n            `default: ${argument.defaultValueDescription || JSON.stringify(argument.defaultValue)}`\n          );\n        }\n        if (extraInfo.length > 0) {\n          const extraDescripton = `(${extraInfo.join(\", \")})`;\n          if (argument.description) {\n            return `${argument.description} ${extraDescripton}`;\n          }\n          return extraDescripton;\n        }\n        return argument.description;\n      }\n      /**\n       * Generate the built-in help text.\n       *\n       * @param {Command} cmd\n       * @param {Help} helper\n       * @returns {string}\n       */\n      formatHelp(cmd, helper) {\n        const termWidth = helper.padWidth(cmd, helper);\n        const helpWidth = helper.helpWidth || 80;\n        const itemIndentWidth = 2;\n        const itemSeparatorWidth = 2;\n        function formatItem(term, description) {\n          if (description) {\n            const fullText = `${term.padEnd(termWidth + itemSeparatorWidth)}${description}`;\n            return helper.wrap(\n              fullText,\n              helpWidth - itemIndentWidth,\n              termWidth + itemSeparatorWidth\n            );\n          }\n          return term;\n        }\n        function formatList(textArray) {\n          return textArray.join(\"\\n\").replace(/^/gm, \" \".repeat(itemIndentWidth));\n        }\n        let output = [`Usage: ${helper.commandUsage(cmd)}`, \"\"];\n        const commandDescription = helper.commandDescription(cmd);\n        if (commandDescription.length > 0) {\n          output = output.concat([\n            helper.wrap(commandDescription, helpWidth, 0),\n            \"\"\n          ]);\n        }\n        const argumentList = helper.visibleArguments(cmd).map((argument) => {\n          return formatItem(\n            helper.argumentTerm(argument),\n            helper.argumentDescription(argument)\n          );\n        });\n        if (argumentList.length > 0) {\n          output = output.concat([\"Arguments:\", formatList(argumentList), \"\"]);\n        }\n        const optionList = helper.visibleOptions(cmd).map((option) => {\n          return formatItem(\n            helper.optionTerm(option),\n            helper.optionDescription(option)\n          );\n        });\n        if (optionList.length > 0) {\n          output = output.concat([\"Options:\", formatList(optionList), \"\"]);\n        }\n        if (this.showGlobalOptions) {\n          const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {\n            return formatItem(\n              helper.optionTerm(option),\n              helper.optionDescription(option)\n            );\n          });\n          if (globalOptionList.length > 0) {\n            output = output.concat([\n              \"Global Options:\",\n              formatList(globalOptionList),\n              \"\"\n            ]);\n          }\n        }\n        const commandList = helper.visibleCommands(cmd).map((cmd2) => {\n          return formatItem(\n            helper.subcommandTerm(cmd2),\n            helper.subcommandDescription(cmd2)\n          );\n        });\n        if (commandList.length > 0) {\n          output = output.concat([\"Commands:\", formatList(commandList), \"\"]);\n        }\n        return output.join(\"\\n\");\n      }\n      /**\n       * Calculate the pad width from the maximum term length.\n       *\n       * @param {Command} cmd\n       * @param {Help} helper\n       * @returns {number}\n       */\n      padWidth(cmd, helper) {\n        return Math.max(\n          helper.longestOptionTermLength(cmd, helper),\n          helper.longestGlobalOptionTermLength(cmd, helper),\n          helper.longestSubcommandTermLength(cmd, helper),\n          helper.longestArgumentTermLength(cmd, helper)\n        );\n      }\n      /**\n       * Wrap the given string to width characters per line, with lines after the first indented.\n       * Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted.\n       *\n       * @param {string} str\n       * @param {number} width\n       * @param {number} indent\n       * @param {number} [minColumnWidth=40]\n       * @return {string}\n       *\n       */\n      wrap(str, width, indent, minColumnWidth = 40) {\n        const indents = \" \\\\f\\\\t\\\\v\\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000\\uFEFF\";\n        const manualIndent = new RegExp(`[\\\\n][${indents}]+`);\n        if (str.match(manualIndent))\n          return str;\n        const columnWidth = width - indent;\n        if (columnWidth < minColumnWidth)\n          return str;\n        const leadingStr = str.slice(0, indent);\n        const columnText = str.slice(indent).replace(\"\\r\\n\", \"\\n\");\n        const indentString = \" \".repeat(indent);\n        const zeroWidthSpace = \"\\u200B\";\n        const breaks = `\\\\s${zeroWidthSpace}`;\n        const regex = new RegExp(\n          `\n|.{1,${columnWidth - 1}}([${breaks}]|$)|[^${breaks}]+?([${breaks}]|$)`,\n          \"g\"\n        );\n        const lines = columnText.match(regex) || [];\n        return leadingStr + lines.map((line, i) => {\n          if (line === \"\\n\")\n            return \"\";\n          return (i > 0 ? indentString : \"\") + line.trimEnd();\n        }).join(\"\\n\");\n      }\n    };\n    exports.Help = Help2;\n  }\n});\n\n// ../node_modules/commander/lib/option.js\nvar require_option = __commonJS({\n  \"../node_modules/commander/lib/option.js\"(exports) {\n    var { InvalidArgumentError: InvalidArgumentError2 } = require_error();\n    var Option2 = class {\n      /**\n       * Initialize a new `Option` with the given `flags` and `description`.\n       *\n       * @param {string} flags\n       * @param {string} [description]\n       */\n      constructor(flags, description) {\n        this.flags = flags;\n        this.description = description || \"\";\n        this.required = flags.includes(\"<\");\n        this.optional = flags.includes(\"[\");\n        this.variadic = /\\w\\.\\.\\.[>\\]]$/.test(flags);\n        this.mandatory = false;\n        const optionFlags = splitOptionFlags(flags);\n        this.short = optionFlags.shortFlag;\n        this.long = optionFlags.longFlag;\n        this.negate = false;\n        if (this.long) {\n          this.negate = this.long.startsWith(\"--no-\");\n        }\n        this.defaultValue = void 0;\n        this.defaultValueDescription = void 0;\n        this.presetArg = void 0;\n        this.envVar = void 0;\n        this.parseArg = void 0;\n        this.hidden = false;\n        this.argChoices = void 0;\n        this.conflictsWith = [];\n        this.implied = void 0;\n      }\n      /**\n       * Set the default value, and optionally supply the description to be displayed in the help.\n       *\n       * @param {*} value\n       * @param {string} [description]\n       * @return {Option}\n       */\n      default(value, description) {\n        this.defaultValue = value;\n        this.defaultValueDescription = description;\n        return this;\n      }\n      /**\n       * Preset to use when option used without option-argument, especially optional but also boolean and negated.\n       * The custom processing (parseArg) is called.\n       *\n       * @example\n       * new Option('--color').default('GREYSCALE').preset('RGB');\n       * new Option('--donate [amount]').preset('20').argParser(parseFloat);\n       *\n       * @param {*} arg\n       * @return {Option}\n       */\n      preset(arg) {\n        this.presetArg = arg;\n        return this;\n      }\n      /**\n       * Add option name(s) that conflict with this option.\n       * An error will be displayed if conflicting options are found during parsing.\n       *\n       * @example\n       * new Option('--rgb').conflicts('cmyk');\n       * new Option('--js').conflicts(['ts', 'jsx']);\n       *\n       * @param {(string | string[])} names\n       * @return {Option}\n       */\n      conflicts(names) {\n        this.conflictsWith = this.conflictsWith.concat(names);\n        return this;\n      }\n      /**\n       * Specify implied option values for when this option is set and the implied options are not.\n       *\n       * The custom processing (parseArg) is not called on the implied values.\n       *\n       * @example\n       * program\n       *   .addOption(new Option('--log', 'write logging information to file'))\n       *   .addOption(new Option('--trace', 'log extra details').implies({ log: 'trace.txt' }));\n       *\n       * @param {object} impliedOptionValues\n       * @return {Option}\n       */\n      implies(impliedOptionValues) {\n        let newImplied = impliedOptionValues;\n        if (typeof impliedOptionValues === \"string\") {\n          newImplied = { [impliedOptionValues]: true };\n        }\n        this.implied = Object.assign(this.implied || {}, newImplied);\n        return this;\n      }\n      /**\n       * Set environment variable to check for option value.\n       *\n       * An environment variable is only used if when processed the current option value is\n       * undefined, or the source of the current value is 'default' or 'config' or 'env'.\n       *\n       * @param {string} name\n       * @return {Option}\n       */\n      env(name) {\n        this.envVar = name;\n        return this;\n      }\n      /**\n       * Set the custom handler for processing CLI option arguments into option values.\n       *\n       * @param {Function} [fn]\n       * @return {Option}\n       */\n      argParser(fn) {\n        this.parseArg = fn;\n        return this;\n      }\n      /**\n       * Whether the option is mandatory and must have a value after parsing.\n       *\n       * @param {boolean} [mandatory=true]\n       * @return {Option}\n       */\n      makeOptionMandatory(mandatory = true) {\n        this.mandatory = !!mandatory;\n        return this;\n      }\n      /**\n       * Hide option in help.\n       *\n       * @param {boolean} [hide=true]\n       * @return {Option}\n       */\n      hideHelp(hide = true) {\n        this.hidden = !!hide;\n        return this;\n      }\n      /**\n       * @package\n       */\n      _concatValue(value, previous) {\n        if (previous === this.defaultValue || !Array.isArray(previous)) {\n          return [value];\n        }\n        return previous.concat(value);\n      }\n      /**\n       * Only allow option value to be one of choices.\n       *\n       * @param {string[]} values\n       * @return {Option}\n       */\n      choices(values) {\n        this.argChoices = values.slice();\n        this.parseArg = (arg, previous) => {\n          if (!this.argChoices.includes(arg)) {\n            throw new InvalidArgumentError2(\n              `Allowed choices are ${this.argChoices.join(\", \")}.`\n            );\n          }\n          if (this.variadic) {\n            return this._concatValue(arg, previous);\n          }\n          return arg;\n        };\n        return this;\n      }\n      /**\n       * Return option name.\n       *\n       * @return {string}\n       */\n      name() {\n        if (this.long) {\n          return this.long.replace(/^--/, \"\");\n        }\n        return this.short.replace(/^-/, \"\");\n      }\n      /**\n       * Return option name, in a camelcase format that can be used\n       * as a object attribute key.\n       *\n       * @return {string}\n       */\n      attributeName() {\n        return camelcase(this.name().replace(/^no-/, \"\"));\n      }\n      /**\n       * Check if `arg` matches the short or long flag.\n       *\n       * @param {string} arg\n       * @return {boolean}\n       * @package\n       */\n      is(arg) {\n        return this.short === arg || this.long === arg;\n      }\n      /**\n       * Return whether a boolean option.\n       *\n       * Options are one of boolean, negated, required argument, or optional argument.\n       *\n       * @return {boolean}\n       * @package\n       */\n      isBoolean() {\n        return !this.required && !this.optional && !this.negate;\n      }\n    };\n    var DualOptions = class {\n      /**\n       * @param {Option[]} options\n       */\n      constructor(options) {\n        this.positiveOptions = /* @__PURE__ */ new Map();\n        this.negativeOptions = /* @__PURE__ */ new Map();\n        this.dualOptions = /* @__PURE__ */ new Set();\n        options.forEach((option) => {\n          if (option.negate) {\n            this.negativeOptions.set(option.attributeName(), option);\n          } else {\n            this.positiveOptions.set(option.attributeName(), option);\n          }\n        });\n        this.negativeOptions.forEach((value, key) => {\n          if (this.positiveOptions.has(key)) {\n            this.dualOptions.add(key);\n          }\n        });\n      }\n      /**\n       * Did the value come from the option, and not from possible matching dual option?\n       *\n       * @param {*} value\n       * @param {Option} option\n       * @returns {boolean}\n       */\n      valueFromOption(value, option) {\n        const optionKey = option.attributeName();\n        if (!this.dualOptions.has(optionKey))\n          return true;\n        const preset = this.negativeOptions.get(optionKey).presetArg;\n        const negativeValue = preset !== void 0 ? preset : false;\n        return option.negate === (negativeValue === value);\n      }\n    };\n    function camelcase(str) {\n      return str.split(\"-\").reduce((str2, word) => {\n        return str2 + word[0].toUpperCase() + word.slice(1);\n      });\n    }\n    function splitOptionFlags(flags) {\n      let shortFlag;\n      let longFlag;\n      const flagParts = flags.split(/[ |,]+/);\n      if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1]))\n        shortFlag = flagParts.shift();\n      longFlag = flagParts.shift();\n      if (!shortFlag && /^-[^-]$/.test(longFlag)) {\n        shortFlag = longFlag;\n        longFlag = void 0;\n      }\n      return { shortFlag, longFlag };\n    }\n    exports.Option = Option2;\n    exports.DualOptions = DualOptions;\n  }\n});\n\n// ../node_modules/commander/lib/suggestSimilar.js\nvar require_suggestSimilar = __commonJS({\n  \"../node_modules/commander/lib/suggestSimilar.js\"(exports) {\n    var maxDistance = 3;\n    function editDistance(a, b) {\n      if (Math.abs(a.length - b.length) > maxDistance)\n        return Math.max(a.length, b.length);\n      const d = [];\n      for (let i = 0; i <= a.length; i++) {\n        d[i] = [i];\n      }\n      for (let j = 0; j <= b.length; j++) {\n        d[0][j] = j;\n      }\n      for (let j = 1; j <= b.length; j++) {\n        for (let i = 1; i <= a.length; i++) {\n          let cost = 1;\n          if (a[i - 1] === b[j - 1]) {\n            cost = 0;\n          } else {\n            cost = 1;\n          }\n          d[i][j] = Math.min(\n            d[i - 1][j] + 1,\n            // deletion\n            d[i][j - 1] + 1,\n            // insertion\n            d[i - 1][j - 1] + cost\n            // substitution\n          );\n          if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {\n            d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + 1);\n          }\n        }\n      }\n      return d[a.length][b.length];\n    }\n    function suggestSimilar(word, candidates) {\n      if (!candidates || candidates.length === 0)\n        return \"\";\n      candidates = Array.from(new Set(candidates));\n      const searchingOptions = word.startsWith(\"--\");\n      if (searchingOptions) {\n        word = word.slice(2);\n        candidates = candidates.map((candidate) => candidate.slice(2));\n      }\n      let similar = [];\n      let bestDistance = maxDistance;\n      const minSimilarity = 0.4;\n      candidates.forEach((candidate) => {\n        if (candidate.length <= 1)\n          return;\n        const distance = editDistance(word, candidate);\n        const length = Math.max(word.length, candidate.length);\n        const similarity = (length - distance) / length;\n        if (similarity > minSimilarity) {\n          if (distance < bestDistance) {\n            bestDistance = distance;\n            similar = [candidate];\n          } else if (distance === bestDistance) {\n            similar.push(candidate);\n          }\n        }\n      });\n      similar.sort((a, b) => a.localeCompare(b));\n      if (searchingOptions) {\n        similar = similar.map((candidate) => `--${candidate}`);\n      }\n      if (similar.length > 1) {\n        return `\n(Did you mean one of ${similar.join(\", \")}?)`;\n      }\n      if (similar.length === 1) {\n        return `\n(Did you mean ${similar[0]}?)`;\n      }\n      return \"\";\n    }\n    exports.suggestSimilar = suggestSimilar;\n  }\n});\n\n// ../node_modules/commander/lib/command.js\nvar require_command = __commonJS({\n  \"../node_modules/commander/lib/command.js\"(exports) {\n    var EventEmitter = require(\"node:events\").EventEmitter;\n    var childProcess2 = require(\"node:child_process\");\n    var path5 = require(\"node:path\");\n    var fs7 = require(\"node:fs\");\n    var process7 = require(\"node:process\");\n    var { Argument: Argument2, humanReadableArgName } = require_argument();\n    var { CommanderError: CommanderError2 } = require_error();\n    var { Help: Help2 } = require_help();\n    var { Option: Option2, DualOptions } = require_option();\n    var { suggestSimilar } = require_suggestSimilar();\n    var Command2 = class extends EventEmitter {\n      /**\n       * Initialize a new `Command`.\n       *\n       * @param {string} [name]\n       */\n      constructor(name) {\n        super();\n        this.commands = [];\n        this.options = [];\n        this.parent = null;\n        this._allowUnknownOption = false;\n        this._allowExcessArguments = true;\n        this.registeredArguments = [];\n        this._args = this.registeredArguments;\n        this.args = [];\n        this.rawArgs = [];\n        this.processedArgs = [];\n        this._scriptPath = null;\n        this._name = name || \"\";\n        this._optionValues = {};\n        this._optionValueSources = {};\n        this._storeOptionsAsProperties = false;\n        this._actionHandler = null;\n        this._executableHandler = false;\n        this._executableFile = null;\n        this._executableDir = null;\n        this._defaultCommandName = null;\n        this._exitCallback = null;\n        this._aliases = [];\n        this._combineFlagAndOptionalValue = true;\n        this._description = \"\";\n        this._summary = \"\";\n        this._argsDescription = void 0;\n        this._enablePositionalOptions = false;\n        this._passThroughOptions = false;\n        this._lifeCycleHooks = {};\n        this._showHelpAfterError = false;\n        this._showSuggestionAfterError = true;\n        this._outputConfiguration = {\n          writeOut: (str) => process7.stdout.write(str),\n          writeErr: (str) => process7.stderr.write(str),\n          getOutHelpWidth: () => process7.stdout.isTTY ? process7.stdout.columns : void 0,\n          getErrHelpWidth: () => process7.stderr.isTTY ? process7.stderr.columns : void 0,\n          outputError: (str, write) => write(str)\n        };\n        this._hidden = false;\n        this._helpOption = void 0;\n        this._addImplicitHelpCommand = void 0;\n        this._helpCommand = void 0;\n        this._helpConfiguration = {};\n      }\n      /**\n       * Copy settings that are useful to have in common across root command and subcommands.\n       *\n       * (Used internally when adding a command using `.command()` so subcommands inherit parent settings.)\n       *\n       * @param {Command} sourceCommand\n       * @return {Command} `this` command for chaining\n       */\n      copyInheritedSettings(sourceCommand) {\n        this._outputConfiguration = sourceCommand._outputConfiguration;\n        this._helpOption = sourceCommand._helpOption;\n        this._helpCommand = sourceCommand._helpCommand;\n        this._helpConfiguration = sourceCommand._helpConfiguration;\n        this._exitCallback = sourceCommand._exitCallback;\n        this._storeOptionsAsProperties = sourceCommand._storeOptionsAsProperties;\n        this._combineFlagAndOptionalValue = sourceCommand._combineFlagAndOptionalValue;\n        this._allowExcessArguments = sourceCommand._allowExcessArguments;\n        this._enablePositionalOptions = sourceCommand._enablePositionalOptions;\n        this._showHelpAfterError = sourceCommand._showHelpAfterError;\n        this._showSuggestionAfterError = sourceCommand._showSuggestionAfterError;\n        return this;\n      }\n      /**\n       * @returns {Command[]}\n       * @private\n       */\n      _getCommandAndAncestors() {\n        const result = [];\n        for (let command = this; command; command = command.parent) {\n          result.push(command);\n        }\n        return result;\n      }\n      /**\n       * Define a command.\n       *\n       * There are two styles of command: pay attention to where to put the description.\n       *\n       * @example\n       * // Command implemented using action handler (description is supplied separately to `.command`)\n       * program\n       *   .command('clone <source> [destination]')\n       *   .description('clone a repository into a newly created directory')\n       *   .action((source, destination) => {\n       *     console.log('clone command called');\n       *   });\n       *\n       * // Command implemented using separate executable file (description is second parameter to `.command`)\n       * program\n       *   .command('start <service>', 'start named service')\n       *   .command('stop [service]', 'stop named service, or all if no name supplied');\n       *\n       * @param {string} nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`\n       * @param {(object | string)} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable)\n       * @param {object} [execOpts] - configuration options (for executable)\n       * @return {Command} returns new command for action handler, or `this` for executable command\n       */\n      command(nameAndArgs, actionOptsOrExecDesc, execOpts) {\n        let desc = actionOptsOrExecDesc;\n        let opts = execOpts;\n        if (typeof desc === \"object\" && desc !== null) {\n          opts = desc;\n          desc = null;\n        }\n        opts = opts || {};\n        const [, name, args] = nameAndArgs.match(/([^ ]+) *(.*)/);\n        const cmd = this.createCommand(name);\n        if (desc) {\n          cmd.description(desc);\n          cmd._executableHandler = true;\n        }\n        if (opts.isDefault)\n          this._defaultCommandName = cmd._name;\n        cmd._hidden = !!(opts.noHelp || opts.hidden);\n        cmd._executableFile = opts.executableFile || null;\n        if (args)\n          cmd.arguments(args);\n        this._registerCommand(cmd);\n        cmd.parent = this;\n        cmd.copyInheritedSettings(this);\n        if (desc)\n          return this;\n        return cmd;\n      }\n      /**\n       * Factory routine to create a new unattached command.\n       *\n       * See .command() for creating an attached subcommand, which uses this routine to\n       * create the command. You can override createCommand to customise subcommands.\n       *\n       * @param {string} [name]\n       * @return {Command} new command\n       */\n      createCommand(name) {\n        return new Command2(name);\n      }\n      /**\n       * You can customise the help with a subclass of Help by overriding createHelp,\n       * or by overriding Help properties using configureHelp().\n       *\n       * @return {Help}\n       */\n      createHelp() {\n        return Object.assign(new Help2(), this.configureHelp());\n      }\n      /**\n       * You can customise the help by overriding Help properties using configureHelp(),\n       * or with a subclass of Help by overriding createHelp().\n       *\n       * @param {object} [configuration] - configuration options\n       * @return {(Command | object)} `this` command for chaining, or stored configuration\n       */\n      configureHelp(configuration) {\n        if (configuration === void 0)\n          return this._helpConfiguration;\n        this._helpConfiguration = configuration;\n        return this;\n      }\n      /**\n       * The default output goes to stdout and stderr. You can customise this for special\n       * applications. You can also customise the display of errors by overriding outputError.\n       *\n       * The configuration properties are all functions:\n       *\n       *     // functions to change where being written, stdout and stderr\n       *     writeOut(str)\n       *     writeErr(str)\n       *     // matching functions to specify width for wrapping help\n       *     getOutHelpWidth()\n       *     getErrHelpWidth()\n       *     // functions based on what is being written out\n       *     outputError(str, write) // used for displaying errors, and not used for displaying help\n       *\n       * @param {object} [configuration] - configuration options\n       * @return {(Command | object)} `this` command for chaining, or stored configuration\n       */\n      configureOutput(configuration) {\n        if (configuration === void 0)\n          return this._outputConfiguration;\n        Object.assign(this._outputConfiguration, configuration);\n        return this;\n      }\n      /**\n       * Display the help or a custom message after an error occurs.\n       *\n       * @param {(boolean|string)} [displayHelp]\n       * @return {Command} `this` command for chaining\n       */\n      showHelpAfterError(displayHelp = true) {\n        if (typeof displayHelp !== \"string\")\n          displayHelp = !!displayHelp;\n        this._showHelpAfterError = displayHelp;\n        return this;\n      }\n      /**\n       * Display suggestion of similar commands for unknown commands, or options for unknown options.\n       *\n       * @param {boolean} [displaySuggestion]\n       * @return {Command} `this` command for chaining\n       */\n      showSuggestionAfterError(displaySuggestion = true) {\n        this._showSuggestionAfterError = !!displaySuggestion;\n        return this;\n      }\n      /**\n       * Add a prepared subcommand.\n       *\n       * See .command() for creating an attached subcommand which inherits settings from its parent.\n       *\n       * @param {Command} cmd - new subcommand\n       * @param {object} [opts] - configuration options\n       * @return {Command} `this` command for chaining\n       */\n      addCommand(cmd, opts) {\n        if (!cmd._name) {\n          throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`);\n        }\n        opts = opts || {};\n        if (opts.isDefault)\n          this._defaultCommandName = cmd._name;\n        if (opts.noHelp || opts.hidden)\n          cmd._hidden = true;\n        this._registerCommand(cmd);\n        cmd.parent = this;\n        cmd._checkForBrokenPassThrough();\n        return this;\n      }\n      /**\n       * Factory routine to create a new unattached argument.\n       *\n       * See .argument() for creating an attached argument, which uses this routine to\n       * create the argument. You can override createArgument to return a custom argument.\n       *\n       * @param {string} name\n       * @param {string} [description]\n       * @return {Argument} new argument\n       */\n      createArgument(name, description) {\n        return new Argument2(name, description);\n      }\n      /**\n       * Define argument syntax for command.\n       *\n       * The default is that the argument is required, and you can explicitly\n       * indicate this with <> around the name. Put [] around the name for an optional argument.\n       *\n       * @example\n       * program.argument('<input-file>');\n       * program.argument('[output-file]');\n       *\n       * @param {string} name\n       * @param {string} [description]\n       * @param {(Function|*)} [fn] - custom argument processing function\n       * @param {*} [defaultValue]\n       * @return {Command} `this` command for chaining\n       */\n      argument(name, description, fn, defaultValue) {\n        const argument = this.createArgument(name, description);\n        if (typeof fn === \"function\") {\n          argument.default(defaultValue).argParser(fn);\n        } else {\n          argument.default(fn);\n        }\n        this.addArgument(argument);\n        return this;\n      }\n      /**\n       * Define argument syntax for command, adding multiple at once (without descriptions).\n       *\n       * See also .argument().\n       *\n       * @example\n       * program.arguments('<cmd> [env]');\n       *\n       * @param {string} names\n       * @return {Command} `this` command for chaining\n       */\n      arguments(names) {\n        names.trim().split(/ +/).forEach((detail) => {\n          this.argument(detail);\n        });\n        return this;\n      }\n      /**\n       * Define argument syntax for command, adding a prepared argument.\n       *\n       * @param {Argument} argument\n       * @return {Command} `this` command for chaining\n       */\n      addArgument(argument) {\n        const previousArgument = this.registeredArguments.slice(-1)[0];\n        if (previousArgument && previousArgument.variadic) {\n          throw new Error(\n            `only the last argument can be variadic '${previousArgument.name()}'`\n          );\n        }\n        if (argument.required && argument.defaultValue !== void 0 && argument.parseArg === void 0) {\n          throw new Error(\n            `a default value for a required argument is never used: '${argument.name()}'`\n          );\n        }\n        this.registeredArguments.push(argument);\n        return this;\n      }\n      /**\n       * Customise or override default help command. By default a help command is automatically added if your command has subcommands.\n       *\n       * @example\n       *    program.helpCommand('help [cmd]');\n       *    program.helpCommand('help [cmd]', 'show help');\n       *    program.helpCommand(false); // suppress default help command\n       *    program.helpCommand(true); // add help command even if no subcommands\n       *\n       * @param {string|boolean} enableOrNameAndArgs - enable with custom name and/or arguments, or boolean to override whether added\n       * @param {string} [description] - custom description\n       * @return {Command} `this` command for chaining\n       */\n      helpCommand(enableOrNameAndArgs, description) {\n        if (typeof enableOrNameAndArgs === \"boolean\") {\n          this._addImplicitHelpCommand = enableOrNameAndArgs;\n          return this;\n        }\n        enableOrNameAndArgs = enableOrNameAndArgs ?? \"help [command]\";\n        const [, helpName, helpArgs] = enableOrNameAndArgs.match(/([^ ]+) *(.*)/);\n        const helpDescription = description ?? \"display help for command\";\n        const helpCommand = this.createCommand(helpName);\n        helpCommand.helpOption(false);\n        if (helpArgs)\n          helpCommand.arguments(helpArgs);\n        if (helpDescription)\n          helpCommand.description(helpDescription);\n        this._addImplicitHelpCommand = true;\n        this._helpCommand = helpCommand;\n        return this;\n      }\n      /**\n       * Add prepared custom help command.\n       *\n       * @param {(Command|string|boolean)} helpCommand - custom help command, or deprecated enableOrNameAndArgs as for `.helpCommand()`\n       * @param {string} [deprecatedDescription] - deprecated custom description used with custom name only\n       * @return {Command} `this` command for chaining\n       */\n      addHelpCommand(helpCommand, deprecatedDescription) {\n        if (typeof helpCommand !== \"object\") {\n          this.helpCommand(helpCommand, deprecatedDescription);\n          return this;\n        }\n        this._addImplicitHelpCommand = true;\n        this._helpCommand = helpCommand;\n        return this;\n      }\n      /**\n       * Lazy create help command.\n       *\n       * @return {(Command|null)}\n       * @package\n       */\n      _getHelpCommand() {\n        const hasImplicitHelpCommand = this._addImplicitHelpCommand ?? (this.commands.length && !this._actionHandler && !this._findCommand(\"help\"));\n        if (hasImplicitHelpCommand) {\n          if (this._helpCommand === void 0) {\n            this.helpCommand(void 0, void 0);\n          }\n          return this._helpCommand;\n        }\n        return null;\n      }\n      /**\n       * Add hook for life cycle event.\n       *\n       * @param {string} event\n       * @param {Function} listener\n       * @return {Command} `this` command for chaining\n       */\n      hook(event, listener) {\n        const allowedValues = [\"preSubcommand\", \"preAction\", \"postAction\"];\n        if (!allowedValues.includes(event)) {\n          throw new Error(`Unexpected value for event passed to hook : '${event}'.\nExpecting one of '${allowedValues.join(\"', '\")}'`);\n        }\n        if (this._lifeCycleHooks[event]) {\n          this._lifeCycleHooks[event].push(listener);\n        } else {\n          this._lifeCycleHooks[event] = [listener];\n        }\n        return this;\n      }\n      /**\n       * Register callback to use as replacement for calling process.exit.\n       *\n       * @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing\n       * @return {Command} `this` command for chaining\n       */\n      exitOverride(fn) {\n        if (fn) {\n          this._exitCallback = fn;\n        } else {\n          this._exitCallback = (err) => {\n            if (err.code !== \"commander.executeSubCommandAsync\") {\n              throw err;\n            } else {\n            }\n          };\n        }\n        return this;\n      }\n      /**\n       * Call process.exit, and _exitCallback if defined.\n       *\n       * @param {number} exitCode exit code for using with process.exit\n       * @param {string} code an id string representing the error\n       * @param {string} message human-readable description of the error\n       * @return never\n       * @private\n       */\n      _exit(exitCode, code, message) {\n        if (this._exitCallback) {\n          this._exitCallback(new CommanderError2(exitCode, code, message));\n        }\n        process7.exit(exitCode);\n      }\n      /**\n       * Register callback `fn` for the command.\n       *\n       * @example\n       * program\n       *   .command('serve')\n       *   .description('start service')\n       *   .action(function() {\n       *      // do work here\n       *   });\n       *\n       * @param {Function} fn\n       * @return {Command} `this` command for chaining\n       */\n      action(fn) {\n        const listener = (args) => {\n          const expectedArgsCount = this.registeredArguments.length;\n          const actionArgs = args.slice(0, expectedArgsCount);\n          if (this._storeOptionsAsProperties) {\n            actionArgs[expectedArgsCount] = this;\n          } else {\n            actionArgs[expectedArgsCount] = this.opts();\n          }\n          actionArgs.push(this);\n          return fn.apply(this, actionArgs);\n        };\n        this._actionHandler = listener;\n        return this;\n      }\n      /**\n       * Factory routine to create a new unattached option.\n       *\n       * See .option() for creating an attached option, which uses this routine to\n       * create the option. You can override createOption to return a custom option.\n       *\n       * @param {string} flags\n       * @param {string} [description]\n       * @return {Option} new option\n       */\n      createOption(flags, description) {\n        return new Option2(flags, description);\n      }\n      /**\n       * Wrap parseArgs to catch 'commander.invalidArgument'.\n       *\n       * @param {(Option | Argument)} target\n       * @param {string} value\n       * @param {*} previous\n       * @param {string} invalidArgumentMessage\n       * @private\n       */\n      _callParseArg(target, value, previous, invalidArgumentMessage) {\n        try {\n          return target.parseArg(value, previous);\n        } catch (err) {\n          if (err.code === \"commander.invalidArgument\") {\n            const message = `${invalidArgumentMessage} ${err.message}`;\n            this.error(message, { exitCode: err.exitCode, code: err.code });\n          }\n          throw err;\n        }\n      }\n      /**\n       * Check for option flag conflicts.\n       * Register option if no conflicts found, or throw on conflict.\n       *\n       * @param {Option} option\n       * @private\n       */\n      _registerOption(option) {\n        const matchingOption = option.short && this._findOption(option.short) || option.long && this._findOption(option.long);\n        if (matchingOption) {\n          const matchingFlag = option.long && this._findOption(option.long) ? option.long : option.short;\n          throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'\n-  already used by option '${matchingOption.flags}'`);\n        }\n        this.options.push(option);\n      }\n      /**\n       * Check for command name and alias conflicts with existing commands.\n       * Register command if no conflicts found, or throw on conflict.\n       *\n       * @param {Command} command\n       * @private\n       */\n      _registerCommand(command) {\n        const knownBy = (cmd) => {\n          return [cmd.name()].concat(cmd.aliases());\n        };\n        const alreadyUsed = knownBy(command).find(\n          (name) => this._findCommand(name)\n        );\n        if (alreadyUsed) {\n          const existingCmd = knownBy(this._findCommand(alreadyUsed)).join(\"|\");\n          const newCmd = knownBy(command).join(\"|\");\n          throw new Error(\n            `cannot add command '${newCmd}' as already have command '${existingCmd}'`\n          );\n        }\n        this.commands.push(command);\n      }\n      /**\n       * Add an option.\n       *\n       * @param {Option} option\n       * @return {Command} `this` command for chaining\n       */\n      addOption(option) {\n        this._registerOption(option);\n        const oname = option.name();\n        const name = option.attributeName();\n        if (option.negate) {\n          const positiveLongFlag = option.long.replace(/^--no-/, \"--\");\n          if (!this._findOption(positiveLongFlag)) {\n            this.setOptionValueWithSource(\n              name,\n              option.defaultValue === void 0 ? true : option.defaultValue,\n              \"default\"\n            );\n          }\n        } else if (option.defaultValue !== void 0) {\n          this.setOptionValueWithSource(name, option.defaultValue, \"default\");\n        }\n        const handleOptionValue = (val, invalidValueMessage, valueSource) => {\n          if (val == null && option.presetArg !== void 0) {\n            val = option.presetArg;\n          }\n          const oldValue = this.getOptionValue(name);\n          if (val !== null && option.parseArg) {\n            val = this._callParseArg(option, val, oldValue, invalidValueMessage);\n          } else if (val !== null && option.variadic) {\n            val = option._concatValue(val, oldValue);\n          }\n          if (val == null) {\n            if (option.negate) {\n              val = false;\n            } else if (option.isBoolean() || option.optional) {\n              val = true;\n            } else {\n              val = \"\";\n            }\n          }\n          this.setOptionValueWithSource(name, val, valueSource);\n        };\n        this.on(\"option:\" + oname, (val) => {\n          const invalidValueMessage = `error: option '${option.flags}' argument '${val}' is invalid.`;\n          handleOptionValue(val, invalidValueMessage, \"cli\");\n        });\n        if (option.envVar) {\n          this.on(\"optionEnv:\" + oname, (val) => {\n            const invalidValueMessage = `error: option '${option.flags}' value '${val}' from env '${option.envVar}' is invalid.`;\n            handleOptionValue(val, invalidValueMessage, \"env\");\n          });\n        }\n        return this;\n      }\n      /**\n       * Internal implementation shared by .option() and .requiredOption()\n       *\n       * @return {Command} `this` command for chaining\n       * @private\n       */\n      _optionEx(config, flags, description, fn, defaultValue) {\n        if (typeof flags === \"object\" && flags instanceof Option2) {\n          throw new Error(\n            \"To add an Option object use addOption() instead of option() or requiredOption()\"\n          );\n        }\n        const option = this.createOption(flags, description);\n        option.makeOptionMandatory(!!config.mandatory);\n        if (typeof fn === \"function\") {\n          option.default(defaultValue).argParser(fn);\n        } else if (fn instanceof RegExp) {\n          const regex = fn;\n          fn = (val, def) => {\n            const m = regex.exec(val);\n            return m ? m[0] : def;\n          };\n          option.default(defaultValue).argParser(fn);\n        } else {\n          option.default(fn);\n        }\n        return this.addOption(option);\n      }\n      /**\n       * Define option with `flags`, `description`, and optional argument parsing function or `defaultValue` or both.\n       *\n       * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. A required\n       * option-argument is indicated by `<>` and an optional option-argument by `[]`.\n       *\n       * See the README for more details, and see also addOption() and requiredOption().\n       *\n       * @example\n       * program\n       *     .option('-p, --pepper', 'add pepper')\n       *     .option('-p, --pizza-type <TYPE>', 'type of pizza') // required option-argument\n       *     .option('-c, --cheese [CHEESE]', 'add extra cheese', 'mozzarella') // optional option-argument with default\n       *     .option('-t, --tip <VALUE>', 'add tip to purchase cost', parseFloat) // custom parse function\n       *\n       * @param {string} flags\n       * @param {string} [description]\n       * @param {(Function|*)} [parseArg] - custom option processing function or default value\n       * @param {*} [defaultValue]\n       * @return {Command} `this` command for chaining\n       */\n      option(flags, description, parseArg, defaultValue) {\n        return this._optionEx({}, flags, description, parseArg, defaultValue);\n      }\n      /**\n       * Add a required option which must have a value after parsing. This usually means\n       * the option must be specified on the command line. (Otherwise the same as .option().)\n       *\n       * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space.\n       *\n       * @param {string} flags\n       * @param {string} [description]\n       * @param {(Function|*)} [parseArg] - custom option processing function or default value\n       * @param {*} [defaultValue]\n       * @return {Command} `this` command for chaining\n       */\n      requiredOption(flags, description, parseArg, defaultValue) {\n        return this._optionEx(\n          { mandatory: true },\n          flags,\n          description,\n          parseArg,\n          defaultValue\n        );\n      }\n      /**\n       * Alter parsing of short flags with optional values.\n       *\n       * @example\n       * // for `.option('-f,--flag [value]'):\n       * program.combineFlagAndOptionalValue(true);  // `-f80` is treated like `--flag=80`, this is the default behaviour\n       * program.combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b`\n       *\n       * @param {boolean} [combine] - if `true` or omitted, an optional value can be specified directly after the flag.\n       * @return {Command} `this` command for chaining\n       */\n      combineFlagAndOptionalValue(combine = true) {\n        this._combineFlagAndOptionalValue = !!combine;\n        return this;\n      }\n      /**\n       * Allow unknown options on the command line.\n       *\n       * @param {boolean} [allowUnknown] - if `true` or omitted, no error will be thrown for unknown options.\n       * @return {Command} `this` command for chaining\n       */\n      allowUnknownOption(allowUnknown = true) {\n        this._allowUnknownOption = !!allowUnknown;\n        return this;\n      }\n      /**\n       * Allow excess command-arguments on the command line. Pass false to make excess arguments an error.\n       *\n       * @param {boolean} [allowExcess] - if `true` or omitted, no error will be thrown for excess arguments.\n       * @return {Command} `this` command for chaining\n       */\n      allowExcessArguments(allowExcess = true) {\n        this._allowExcessArguments = !!allowExcess;\n        return this;\n      }\n      /**\n       * Enable positional options. Positional means global options are specified before subcommands which lets\n       * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions.\n       * The default behaviour is non-positional and global options may appear anywhere on the command line.\n       *\n       * @param {boolean} [positional]\n       * @return {Command} `this` command for chaining\n       */\n      enablePositionalOptions(positional = true) {\n        this._enablePositionalOptions = !!positional;\n        return this;\n      }\n      /**\n       * Pass through options that come after command-arguments rather than treat them as command-options,\n       * so actual command-options come before command-arguments. Turning this on for a subcommand requires\n       * positional options to have been enabled on the program (parent commands).\n       * The default behaviour is non-positional and options may appear before or after command-arguments.\n       *\n       * @param {boolean} [passThrough] for unknown options.\n       * @return {Command} `this` command for chaining\n       */\n      passThroughOptions(passThrough = true) {\n        this._passThroughOptions = !!passThrough;\n        this._checkForBrokenPassThrough();\n        return this;\n      }\n      /**\n       * @private\n       */\n      _checkForBrokenPassThrough() {\n        if (this.parent && this._passThroughOptions && !this.parent._enablePositionalOptions) {\n          throw new Error(\n            `passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`\n          );\n        }\n      }\n      /**\n       * Whether to store option values as properties on command object,\n       * or store separately (specify false). In both cases the option values can be accessed using .opts().\n       *\n       * @param {boolean} [storeAsProperties=true]\n       * @return {Command} `this` command for chaining\n       */\n      storeOptionsAsProperties(storeAsProperties = true) {\n        if (this.options.length) {\n          throw new Error(\"call .storeOptionsAsProperties() before adding options\");\n        }\n        if (Object.keys(this._optionValues).length) {\n          throw new Error(\n            \"call .storeOptionsAsProperties() before setting option values\"\n          );\n        }\n        this._storeOptionsAsProperties = !!storeAsProperties;\n        return this;\n      }\n      /**\n       * Retrieve option value.\n       *\n       * @param {string} key\n       * @return {object} value\n       */\n      getOptionValue(key) {\n        if (this._storeOptionsAsProperties) {\n          return this[key];\n        }\n        return this._optionValues[key];\n      }\n      /**\n       * Store option value.\n       *\n       * @param {string} key\n       * @param {object} value\n       * @return {Command} `this` command for chaining\n       */\n      setOptionValue(key, value) {\n        return this.setOptionValueWithSource(key, value, void 0);\n      }\n      /**\n       * Store option value and where the value came from.\n       *\n       * @param {string} key\n       * @param {object} value\n       * @param {string} source - expected values are default/config/env/cli/implied\n       * @return {Command} `this` command for chaining\n       */\n      setOptionValueWithSource(key, value, source) {\n        if (this._storeOptionsAsProperties) {\n          this[key] = value;\n        } else {\n          this._optionValues[key] = value;\n        }\n        this._optionValueSources[key] = source;\n        return this;\n      }\n      /**\n       * Get source of option value.\n       * Expected values are default | config | env | cli | implied\n       *\n       * @param {string} key\n       * @return {string}\n       */\n      getOptionValueSource(key) {\n        return this._optionValueSources[key];\n      }\n      /**\n       * Get source of option value. See also .optsWithGlobals().\n       * Expected values are default | config | env | cli | implied\n       *\n       * @param {string} key\n       * @return {string}\n       */\n      getOptionValueSourceWithGlobals(key) {\n        let source;\n        this._getCommandAndAncestors().forEach((cmd) => {\n          if (cmd.getOptionValueSource(key) !== void 0) {\n            source = cmd.getOptionValueSource(key);\n          }\n        });\n        return source;\n      }\n      /**\n       * Get user arguments from implied or explicit arguments.\n       * Side-effects: set _scriptPath if args included script. Used for default program name, and subcommand searches.\n       *\n       * @private\n       */\n      _prepareUserArgs(argv, parseOptions) {\n        if (argv !== void 0 && !Array.isArray(argv)) {\n          throw new Error(\"first parameter to parse must be array or undefined\");\n        }\n        parseOptions = parseOptions || {};\n        if (argv === void 0 && parseOptions.from === void 0) {\n          if (process7.versions?.electron) {\n            parseOptions.from = \"electron\";\n          }\n          const execArgv = process7.execArgv ?? [];\n          if (execArgv.includes(\"-e\") || execArgv.includes(\"--eval\") || execArgv.includes(\"-p\") || execArgv.includes(\"--print\")) {\n            parseOptions.from = \"eval\";\n          }\n        }\n        if (argv === void 0) {\n          argv = process7.argv;\n        }\n        this.rawArgs = argv.slice();\n        let userArgs;\n        switch (parseOptions.from) {\n          case void 0:\n          case \"node\":\n            this._scriptPath = argv[1];\n            userArgs = argv.slice(2);\n            break;\n          case \"electron\":\n            if (process7.defaultApp) {\n              this._scriptPath = argv[1];\n              userArgs = argv.slice(2);\n            } else {\n              userArgs = argv.slice(1);\n            }\n            break;\n          case \"user\":\n            userArgs = argv.slice(0);\n            break;\n          case \"eval\":\n            userArgs = argv.slice(1);\n            break;\n          default:\n            throw new Error(\n              `unexpected parse option { from: '${parseOptions.from}' }`\n            );\n        }\n        if (!this._name && this._scriptPath)\n          this.nameFromFilename(this._scriptPath);\n        this._name = this._name || \"program\";\n        return userArgs;\n      }\n      /**\n       * Parse `argv`, setting options and invoking commands when defined.\n       *\n       * Use parseAsync instead of parse if any of your action handlers are async.\n       *\n       * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode!\n       *\n       * Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`:\n       * - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that\n       * - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged\n       * - `'user'`: just user arguments\n       *\n       * @example\n       * program.parse(); // parse process.argv and auto-detect electron and special node flags\n       * program.parse(process.argv); // assume argv[0] is app and argv[1] is script\n       * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]\n       *\n       * @param {string[]} [argv] - optional, defaults to process.argv\n       * @param {object} [parseOptions] - optionally specify style of options with from: node/user/electron\n       * @param {string} [parseOptions.from] - where the args are from: 'node', 'user', 'electron'\n       * @return {Command} `this` command for chaining\n       */\n      parse(argv, parseOptions) {\n        const userArgs = this._prepareUserArgs(argv, parseOptions);\n        this._parseCommand([], userArgs);\n        return this;\n      }\n      /**\n       * Parse `argv`, setting options and invoking commands when defined.\n       *\n       * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode!\n       *\n       * Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`:\n       * - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that\n       * - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged\n       * - `'user'`: just user arguments\n       *\n       * @example\n       * await program.parseAsync(); // parse process.argv and auto-detect electron and special node flags\n       * await program.parseAsync(process.argv); // assume argv[0] is app and argv[1] is script\n       * await program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]\n       *\n       * @param {string[]} [argv]\n       * @param {object} [parseOptions]\n       * @param {string} parseOptions.from - where the args are from: 'node', 'user', 'electron'\n       * @return {Promise}\n       */\n      async parseAsync(argv, parseOptions) {\n        const userArgs = this._prepareUserArgs(argv, parseOptions);\n        await this._parseCommand([], userArgs);\n        return this;\n      }\n      /**\n       * Execute a sub-command executable.\n       *\n       * @private\n       */\n      _executeSubCommand(subcommand, args) {\n        args = args.slice();\n        let launchWithNode = false;\n        const sourceExt = [\".js\", \".ts\", \".tsx\", \".mjs\", \".cjs\"];\n        function findFile(baseDir, baseName) {\n          const localBin = path5.resolve(baseDir, baseName);\n          if (fs7.existsSync(localBin))\n            return localBin;\n          if (sourceExt.includes(path5.extname(baseName)))\n            return void 0;\n          const foundExt = sourceExt.find(\n            (ext) => fs7.existsSync(`${localBin}${ext}`)\n          );\n          if (foundExt)\n            return `${localBin}${foundExt}`;\n          return void 0;\n        }\n        this._checkForMissingMandatoryOptions();\n        this._checkForConflictingOptions();\n        let executableFile = subcommand._executableFile || `${this._name}-${subcommand._name}`;\n        let executableDir = this._executableDir || \"\";\n        if (this._scriptPath) {\n          let resolvedScriptPath;\n          try {\n            resolvedScriptPath = fs7.realpathSync(this._scriptPath);\n          } catch (err) {\n            resolvedScriptPath = this._scriptPath;\n          }\n          executableDir = path5.resolve(\n            path5.dirname(resolvedScriptPath),\n            executableDir\n          );\n        }\n        if (executableDir) {\n          let localFile = findFile(executableDir, executableFile);\n          if (!localFile && !subcommand._executableFile && this._scriptPath) {\n            const legacyName = path5.basename(\n              this._scriptPath,\n              path5.extname(this._scriptPath)\n            );\n            if (legacyName !== this._name) {\n              localFile = findFile(\n                executableDir,\n                `${legacyName}-${subcommand._name}`\n              );\n            }\n          }\n          executableFile = localFile || executableFile;\n        }\n        launchWithNode = sourceExt.includes(path5.extname(executableFile));\n        let proc;\n        if (process7.platform !== \"win32\") {\n          if (launchWithNode) {\n            args.unshift(executableFile);\n            args = incrementNodeInspectorPort(process7.execArgv).concat(args);\n            proc = childProcess2.spawn(process7.argv[0], args, { stdio: \"inherit\" });\n          } else {\n            proc = childProcess2.spawn(executableFile, args, { stdio: \"inherit\" });\n          }\n        } else {\n          args.unshift(executableFile);\n          args = incrementNodeInspectorPort(process7.execArgv).concat(args);\n          proc = childProcess2.spawn(process7.execPath, args, { stdio: \"inherit\" });\n        }\n        if (!proc.killed) {\n          const signals = [\"SIGUSR1\", \"SIGUSR2\", \"SIGTERM\", \"SIGINT\", \"SIGHUP\"];\n          signals.forEach((signal) => {\n            process7.on(signal, () => {\n              if (proc.killed === false && proc.exitCode === null) {\n                proc.kill(signal);\n              }\n            });\n          });\n        }\n        const exitCallback = this._exitCallback;\n        proc.on(\"close\", (code) => {\n          code = code ?? 1;\n          if (!exitCallback) {\n            process7.exit(code);\n          } else {\n            exitCallback(\n              new CommanderError2(\n                code,\n                \"commander.executeSubCommandAsync\",\n                \"(close)\"\n              )\n            );\n          }\n        });\n        proc.on(\"error\", (err) => {\n          if (err.code === \"ENOENT\") {\n            const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : \"no directory for search for local subcommand, use .executableDir() to supply a custom directory\";\n            const executableMissing = `'${executableFile}' does not exist\n - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${executableDirMessage}`;\n            throw new Error(executableMissing);\n          } else if (err.code === \"EACCES\") {\n            throw new Error(`'${executableFile}' not executable`);\n          }\n          if (!exitCallback) {\n            process7.exit(1);\n          } else {\n            const wrappedError = new CommanderError2(\n              1,\n              \"commander.executeSubCommandAsync\",\n              \"(error)\"\n            );\n            wrappedError.nestedError = err;\n            exitCallback(wrappedError);\n          }\n        });\n        this.runningCommand = proc;\n      }\n      /**\n       * @private\n       */\n      _dispatchSubcommand(commandName, operands, unknown) {\n        const subCommand = this._findCommand(commandName);\n        if (!subCommand)\n          this.help({ error: true });\n        let promiseChain;\n        promiseChain = this._chainOrCallSubCommandHook(\n          promiseChain,\n          subCommand,\n          \"preSubcommand\"\n        );\n        promiseChain = this._chainOrCall(promiseChain, () => {\n          if (subCommand._executableHandler) {\n            this._executeSubCommand(subCommand, operands.concat(unknown));\n          } else {\n            return subCommand._parseCommand(operands, unknown);\n          }\n        });\n        return promiseChain;\n      }\n      /**\n       * Invoke help directly if possible, or dispatch if necessary.\n       * e.g. help foo\n       *\n       * @private\n       */\n      _dispatchHelpCommand(subcommandName) {\n        if (!subcommandName) {\n          this.help();\n        }\n        const subCommand = this._findCommand(subcommandName);\n        if (subCommand && !subCommand._executableHandler) {\n          subCommand.help();\n        }\n        return this._dispatchSubcommand(\n          subcommandName,\n          [],\n          [this._getHelpOption()?.long ?? this._getHelpOption()?.short ?? \"--help\"]\n        );\n      }\n      /**\n       * Check this.args against expected this.registeredArguments.\n       *\n       * @private\n       */\n      _checkNumberOfArguments() {\n        this.registeredArguments.forEach((arg, i) => {\n          if (arg.required && this.args[i] == null) {\n            this.missingArgument(arg.name());\n          }\n        });\n        if (this.registeredArguments.length > 0 && this.registeredArguments[this.registeredArguments.length - 1].variadic) {\n          return;\n        }\n        if (this.args.length > this.registeredArguments.length) {\n          this._excessArguments(this.args);\n        }\n      }\n      /**\n       * Process this.args using this.registeredArguments and save as this.processedArgs!\n       *\n       * @private\n       */\n      _processArguments() {\n        const myParseArg = (argument, value, previous) => {\n          let parsedValue = value;\n          if (value !== null && argument.parseArg) {\n            const invalidValueMessage = `error: command-argument value '${value}' is invalid for argument '${argument.name()}'.`;\n            parsedValue = this._callParseArg(\n              argument,\n              value,\n              previous,\n              invalidValueMessage\n            );\n          }\n          return parsedValue;\n        };\n        this._checkNumberOfArguments();\n        const processedArgs = [];\n        this.registeredArguments.forEach((declaredArg, index) => {\n          let value = declaredArg.defaultValue;\n          if (declaredArg.variadic) {\n            if (index < this.args.length) {\n              value = this.args.slice(index);\n              if (declaredArg.parseArg) {\n                value = value.reduce((processed, v) => {\n                  return myParseArg(declaredArg, v, processed);\n                }, declaredArg.defaultValue);\n              }\n            } else if (value === void 0) {\n              value = [];\n            }\n          } else if (index < this.args.length) {\n            value = this.args[index];\n            if (declaredArg.parseArg) {\n              value = myParseArg(declaredArg, value, declaredArg.defaultValue);\n            }\n          }\n          processedArgs[index] = value;\n        });\n        this.processedArgs = processedArgs;\n      }\n      /**\n       * Once we have a promise we chain, but call synchronously until then.\n       *\n       * @param {(Promise|undefined)} promise\n       * @param {Function} fn\n       * @return {(Promise|undefined)}\n       * @private\n       */\n      _chainOrCall(promise, fn) {\n        if (promise && promise.then && typeof promise.then === \"function\") {\n          return promise.then(() => fn());\n        }\n        return fn();\n      }\n      /**\n       *\n       * @param {(Promise|undefined)} promise\n       * @param {string} event\n       * @return {(Promise|undefined)}\n       * @private\n       */\n      _chainOrCallHooks(promise, event) {\n        let result = promise;\n        const hooks = [];\n        this._getCommandAndAncestors().reverse().filter((cmd) => cmd._lifeCycleHooks[event] !== void 0).forEach((hookedCommand) => {\n          hookedCommand._lifeCycleHooks[event].forEach((callback) => {\n            hooks.push({ hookedCommand, callback });\n          });\n        });\n        if (event === \"postAction\") {\n          hooks.reverse();\n        }\n        hooks.forEach((hookDetail) => {\n          result = this._chainOrCall(result, () => {\n            return hookDetail.callback(hookDetail.hookedCommand, this);\n          });\n        });\n        return result;\n      }\n      /**\n       *\n       * @param {(Promise|undefined)} promise\n       * @param {Command} subCommand\n       * @param {string} event\n       * @return {(Promise|undefined)}\n       * @private\n       */\n      _chainOrCallSubCommandHook(promise, subCommand, event) {\n        let result = promise;\n        if (this._lifeCycleHooks[event] !== void 0) {\n          this._lifeCycleHooks[event].forEach((hook) => {\n            result = this._chainOrCall(result, () => {\n              return hook(this, subCommand);\n            });\n          });\n        }\n        return result;\n      }\n      /**\n       * Process arguments in context of this command.\n       * Returns action result, in case it is a promise.\n       *\n       * @private\n       */\n      _parseCommand(operands, unknown) {\n        const parsed = this.parseOptions(unknown);\n        this._parseOptionsEnv();\n        this._parseOptionsImplied();\n        operands = operands.concat(parsed.operands);\n        unknown = parsed.unknown;\n        this.args = operands.concat(unknown);\n        if (operands && this._findCommand(operands[0])) {\n          return this._dispatchSubcommand(operands[0], operands.slice(1), unknown);\n        }\n        if (this._getHelpCommand() && operands[0] === this._getHelpCommand().name()) {\n          return this._dispatchHelpCommand(operands[1]);\n        }\n        if (this._defaultCommandName) {\n          this._outputHelpIfRequested(unknown);\n          return this._dispatchSubcommand(\n            this._defaultCommandName,\n            operands,\n            unknown\n          );\n        }\n        if (this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName) {\n          this.help({ error: true });\n        }\n        this._outputHelpIfRequested(parsed.unknown);\n        this._checkForMissingMandatoryOptions();\n        this._checkForConflictingOptions();\n        const checkForUnknownOptions = () => {\n          if (parsed.unknown.length > 0) {\n            this.unknownOption(parsed.unknown[0]);\n          }\n        };\n        const commandEvent = `command:${this.name()}`;\n        if (this._actionHandler) {\n          checkForUnknownOptions();\n          this._processArguments();\n          let promiseChain;\n          promiseChain = this._chainOrCallHooks(promiseChain, \"preAction\");\n          promiseChain = this._chainOrCall(\n            promiseChain,\n            () => this._actionHandler(this.processedArgs)\n          );\n          if (this.parent) {\n            promiseChain = this._chainOrCall(promiseChain, () => {\n              this.parent.emit(commandEvent, operands, unknown);\n            });\n          }\n          promiseChain = this._chainOrCallHooks(promiseChain, \"postAction\");\n          return promiseChain;\n        }\n        if (this.parent && this.parent.listenerCount(commandEvent)) {\n          checkForUnknownOptions();\n          this._processArguments();\n          this.parent.emit(commandEvent, operands, unknown);\n        } else if (operands.length) {\n          if (this._findCommand(\"*\")) {\n            return this._dispatchSubcommand(\"*\", operands, unknown);\n          }\n          if (this.listenerCount(\"command:*\")) {\n            this.emit(\"command:*\", operands, unknown);\n          } else if (this.commands.length) {\n            this.unknownCommand();\n          } else {\n            checkForUnknownOptions();\n            this._processArguments();\n          }\n        } else if (this.commands.length) {\n          checkForUnknownOptions();\n          this.help({ error: true });\n        } else {\n          checkForUnknownOptions();\n          this._processArguments();\n        }\n      }\n      /**\n       * Find matching command.\n       *\n       * @private\n       * @return {Command | undefined}\n       */\n      _findCommand(name) {\n        if (!name)\n          return void 0;\n        return this.commands.find(\n          (cmd) => cmd._name === name || cmd._aliases.includes(name)\n        );\n      }\n      /**\n       * Return an option matching `arg` if any.\n       *\n       * @param {string} arg\n       * @return {Option}\n       * @package\n       */\n      _findOption(arg) {\n        return this.options.find((option) => option.is(arg));\n      }\n      /**\n       * Display an error message if a mandatory option does not have a value.\n       * Called after checking for help flags in leaf subcommand.\n       *\n       * @private\n       */\n      _checkForMissingMandatoryOptions() {\n        this._getCommandAndAncestors().forEach((cmd) => {\n          cmd.options.forEach((anOption) => {\n            if (anOption.mandatory && cmd.getOptionValue(anOption.attributeName()) === void 0) {\n              cmd.missingMandatoryOptionValue(anOption);\n            }\n          });\n        });\n      }\n      /**\n       * Display an error message if conflicting options are used together in this.\n       *\n       * @private\n       */\n      _checkForConflictingLocalOptions() {\n        const definedNonDefaultOptions = this.options.filter((option) => {\n          const optionKey = option.attributeName();\n          if (this.getOptionValue(optionKey) === void 0) {\n            return false;\n          }\n          return this.getOptionValueSource(optionKey) !== \"default\";\n        });\n        const optionsWithConflicting = definedNonDefaultOptions.filter(\n          (option) => option.conflictsWith.length > 0\n        );\n        optionsWithConflicting.forEach((option) => {\n          const conflictingAndDefined = definedNonDefaultOptions.find(\n            (defined) => option.conflictsWith.includes(defined.attributeName())\n          );\n          if (conflictingAndDefined) {\n            this._conflictingOption(option, conflictingAndDefined);\n          }\n        });\n      }\n      /**\n       * Display an error message if conflicting options are used together.\n       * Called after checking for help flags in leaf subcommand.\n       *\n       * @private\n       */\n      _checkForConflictingOptions() {\n        this._getCommandAndAncestors().forEach((cmd) => {\n          cmd._checkForConflictingLocalOptions();\n        });\n      }\n      /**\n       * Parse options from `argv` removing known options,\n       * and return argv split into operands and unknown arguments.\n       *\n       * Examples:\n       *\n       *     argv => operands, unknown\n       *     --known kkk op => [op], []\n       *     op --known kkk => [op], []\n       *     sub --unknown uuu op => [sub], [--unknown uuu op]\n       *     sub -- --unknown uuu op => [sub --unknown uuu op], []\n       *\n       * @param {string[]} argv\n       * @return {{operands: string[], unknown: string[]}}\n       */\n      parseOptions(argv) {\n        const operands = [];\n        const unknown = [];\n        let dest = operands;\n        const args = argv.slice();\n        function maybeOption(arg) {\n          return arg.length > 1 && arg[0] === \"-\";\n        }\n        let activeVariadicOption = null;\n        while (args.length) {\n          const arg = args.shift();\n          if (arg === \"--\") {\n            if (dest === unknown)\n              dest.push(arg);\n            dest.push(...args);\n            break;\n          }\n          if (activeVariadicOption && !maybeOption(arg)) {\n            this.emit(`option:${activeVariadicOption.name()}`, arg);\n            continue;\n          }\n          activeVariadicOption = null;\n          if (maybeOption(arg)) {\n            const option = this._findOption(arg);\n            if (option) {\n              if (option.required) {\n                const value = args.shift();\n                if (value === void 0)\n                  this.optionMissingArgument(option);\n                this.emit(`option:${option.name()}`, value);\n              } else if (option.optional) {\n                let value = null;\n                if (args.length > 0 && !maybeOption(args[0])) {\n                  value = args.shift();\n                }\n                this.emit(`option:${option.name()}`, value);\n              } else {\n                this.emit(`option:${option.name()}`);\n              }\n              activeVariadicOption = option.variadic ? option : null;\n              continue;\n            }\n          }\n          if (arg.length > 2 && arg[0] === \"-\" && arg[1] !== \"-\") {\n            const option = this._findOption(`-${arg[1]}`);\n            if (option) {\n              if (option.required || option.optional && this._combineFlagAndOptionalValue) {\n                this.emit(`option:${option.name()}`, arg.slice(2));\n              } else {\n                this.emit(`option:${option.name()}`);\n                args.unshift(`-${arg.slice(2)}`);\n              }\n              continue;\n            }\n          }\n          if (/^--[^=]+=/.test(arg)) {\n            const index = arg.indexOf(\"=\");\n            const option = this._findOption(arg.slice(0, index));\n            if (option && (option.required || option.optional)) {\n              this.emit(`option:${option.name()}`, arg.slice(index + 1));\n              continue;\n            }\n          }\n          if (maybeOption(arg)) {\n            dest = unknown;\n          }\n          if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown.length === 0) {\n            if (this._findCommand(arg)) {\n              operands.push(arg);\n              if (args.length > 0)\n                unknown.push(...args);\n              break;\n            } else if (this._getHelpCommand() && arg === this._getHelpCommand().name()) {\n              operands.push(arg);\n              if (args.length > 0)\n                operands.push(...args);\n              break;\n            } else if (this._defaultCommandName) {\n              unknown.push(arg);\n              if (args.length > 0)\n                unknown.push(...args);\n              break;\n            }\n          }\n          if (this._passThroughOptions) {\n            dest.push(arg);\n            if (args.length > 0)\n              dest.push(...args);\n            break;\n          }\n          dest.push(arg);\n        }\n        return { operands, unknown };\n      }\n      /**\n       * Return an object containing local option values as key-value pairs.\n       *\n       * @return {object}\n       */\n      opts() {\n        if (this._storeOptionsAsProperties) {\n          const result = {};\n          const len = this.options.length;\n          for (let i = 0; i < len; i++) {\n            const key = this.options[i].attributeName();\n            result[key] = key === this._versionOptionName ? this._version : this[key];\n          }\n          return result;\n        }\n        return this._optionValues;\n      }\n      /**\n       * Return an object containing merged local and global option values as key-value pairs.\n       *\n       * @return {object}\n       */\n      optsWithGlobals() {\n        return this._getCommandAndAncestors().reduce(\n          (combinedOptions, cmd) => Object.assign(combinedOptions, cmd.opts()),\n          {}\n        );\n      }\n      /**\n       * Display error message and exit (or call exitOverride).\n       *\n       * @param {string} message\n       * @param {object} [errorOptions]\n       * @param {string} [errorOptions.code] - an id string representing the error\n       * @param {number} [errorOptions.exitCode] - used with process.exit\n       */\n      error(message, errorOptions) {\n        this._outputConfiguration.outputError(\n          `${message}\n`,\n          this._outputConfiguration.writeErr\n        );\n        if (typeof this._showHelpAfterError === \"string\") {\n          this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`);\n        } else if (this._showHelpAfterError) {\n          this._outputConfiguration.writeErr(\"\\n\");\n          this.outputHelp({ error: true });\n        }\n        const config = errorOptions || {};\n        const exitCode = config.exitCode || 1;\n        const code = config.code || \"commander.error\";\n        this._exit(exitCode, code, message);\n      }\n      /**\n       * Apply any option related environment variables, if option does\n       * not have a value from cli or client code.\n       *\n       * @private\n       */\n      _parseOptionsEnv() {\n        this.options.forEach((option) => {\n          if (option.envVar && option.envVar in process7.env) {\n            const optionKey = option.attributeName();\n            if (this.getOptionValue(optionKey) === void 0 || [\"default\", \"config\", \"env\"].includes(\n              this.getOptionValueSource(optionKey)\n            )) {\n              if (option.required || option.optional) {\n                this.emit(`optionEnv:${option.name()}`, process7.env[option.envVar]);\n              } else {\n                this.emit(`optionEnv:${option.name()}`);\n              }\n            }\n          }\n        });\n      }\n      /**\n       * Apply any implied option values, if option is undefined or default value.\n       *\n       * @private\n       */\n      _parseOptionsImplied() {\n        const dualHelper = new DualOptions(this.options);\n        const hasCustomOptionValue = (optionKey) => {\n          return this.getOptionValue(optionKey) !== void 0 && ![\"default\", \"implied\"].includes(this.getOptionValueSource(optionKey));\n        };\n        this.options.filter(\n          (option) => option.implied !== void 0 && hasCustomOptionValue(option.attributeName()) && dualHelper.valueFromOption(\n            this.getOptionValue(option.attributeName()),\n            option\n          )\n        ).forEach((option) => {\n          Object.keys(option.implied).filter((impliedKey) => !hasCustomOptionValue(impliedKey)).forEach((impliedKey) => {\n            this.setOptionValueWithSource(\n              impliedKey,\n              option.implied[impliedKey],\n              \"implied\"\n            );\n          });\n        });\n      }\n      /**\n       * Argument `name` is missing.\n       *\n       * @param {string} name\n       * @private\n       */\n      missingArgument(name) {\n        const message = `error: missing required argument '${name}'`;\n        this.error(message, { code: \"commander.missingArgument\" });\n      }\n      /**\n       * `Option` is missing an argument.\n       *\n       * @param {Option} option\n       * @private\n       */\n      optionMissingArgument(option) {\n        const message = `error: option '${option.flags}' argument missing`;\n        this.error(message, { code: \"commander.optionMissingArgument\" });\n      }\n      /**\n       * `Option` does not have a value, and is a mandatory option.\n       *\n       * @param {Option} option\n       * @private\n       */\n      missingMandatoryOptionValue(option) {\n        const message = `error: required option '${option.flags}' not specified`;\n        this.error(message, { code: \"commander.missingMandatoryOptionValue\" });\n      }\n      /**\n       * `Option` conflicts with another option.\n       *\n       * @param {Option} option\n       * @param {Option} conflictingOption\n       * @private\n       */\n      _conflictingOption(option, conflictingOption) {\n        const findBestOptionFromValue = (option2) => {\n          const optionKey = option2.attributeName();\n          const optionValue = this.getOptionValue(optionKey);\n          const negativeOption = this.options.find(\n            (target) => target.negate && optionKey === target.attributeName()\n          );\n          const positiveOption = this.options.find(\n            (target) => !target.negate && optionKey === target.attributeName()\n          );\n          if (negativeOption && (negativeOption.presetArg === void 0 && optionValue === false || negativeOption.presetArg !== void 0 && optionValue === negativeOption.presetArg)) {\n            return negativeOption;\n          }\n          return positiveOption || option2;\n        };\n        const getErrorMessage = (option2) => {\n          const bestOption = findBestOptionFromValue(option2);\n          const optionKey = bestOption.attributeName();\n          const source = this.getOptionValueSource(optionKey);\n          if (source === \"env\") {\n            return `environment variable '${bestOption.envVar}'`;\n          }\n          return `option '${bestOption.flags}'`;\n        };\n        const message = `error: ${getErrorMessage(option)} cannot be used with ${getErrorMessage(conflictingOption)}`;\n        this.error(message, { code: \"commander.conflictingOption\" });\n      }\n      /**\n       * Unknown option `flag`.\n       *\n       * @param {string} flag\n       * @private\n       */\n      unknownOption(flag) {\n        if (this._allowUnknownOption)\n          return;\n        let suggestion = \"\";\n        if (flag.startsWith(\"--\") && this._showSuggestionAfterError) {\n          let candidateFlags = [];\n          let command = this;\n          do {\n            const moreFlags = command.createHelp().visibleOptions(command).filter((option) => option.long).map((option) => option.long);\n            candidateFlags = candidateFlags.concat(moreFlags);\n            command = command.parent;\n          } while (command && !command._enablePositionalOptions);\n          suggestion = suggestSimilar(flag, candidateFlags);\n        }\n        const message = `error: unknown option '${flag}'${suggestion}`;\n        this.error(message, { code: \"commander.unknownOption\" });\n      }\n      /**\n       * Excess arguments, more than expected.\n       *\n       * @param {string[]} receivedArgs\n       * @private\n       */\n      _excessArguments(receivedArgs) {\n        if (this._allowExcessArguments)\n          return;\n        const expected = this.registeredArguments.length;\n        const s = expected === 1 ? \"\" : \"s\";\n        const forSubcommand = this.parent ? ` for '${this.name()}'` : \"\";\n        const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`;\n        this.error(message, { code: \"commander.excessArguments\" });\n      }\n      /**\n       * Unknown command.\n       *\n       * @private\n       */\n      unknownCommand() {\n        const unknownName = this.args[0];\n        let suggestion = \"\";\n        if (this._showSuggestionAfterError) {\n          const candidateNames = [];\n          this.createHelp().visibleCommands(this).forEach((command) => {\n            candidateNames.push(command.name());\n            if (command.alias())\n              candidateNames.push(command.alias());\n          });\n          suggestion = suggestSimilar(unknownName, candidateNames);\n        }\n        const message = `error: unknown command '${unknownName}'${suggestion}`;\n        this.error(message, { code: \"commander.unknownCommand\" });\n      }\n      /**\n       * Get or set the program version.\n       *\n       * This method auto-registers the \"-V, --version\" option which will print the version number.\n       *\n       * You can optionally supply the flags and description to override the defaults.\n       *\n       * @param {string} [str]\n       * @param {string} [flags]\n       * @param {string} [description]\n       * @return {(this | string | undefined)} `this` command for chaining, or version string if no arguments\n       */\n      version(str, flags, description) {\n        if (str === void 0)\n          return this._version;\n        this._version = str;\n        flags = flags || \"-V, --version\";\n        description = description || \"output the version number\";\n        const versionOption = this.createOption(flags, description);\n        this._versionOptionName = versionOption.attributeName();\n        this._registerOption(versionOption);\n        this.on(\"option:\" + versionOption.name(), () => {\n          this._outputConfiguration.writeOut(`${str}\n`);\n          this._exit(0, \"commander.version\", str);\n        });\n        return this;\n      }\n      /**\n       * Set the description.\n       *\n       * @param {string} [str]\n       * @param {object} [argsDescription]\n       * @return {(string|Command)}\n       */\n      description(str, argsDescription) {\n        if (str === void 0 && argsDescription === void 0)\n          return this._description;\n        this._description = str;\n        if (argsDescription) {\n          this._argsDescription = argsDescription;\n        }\n        return this;\n      }\n      /**\n       * Set the summary. Used when listed as subcommand of parent.\n       *\n       * @param {string} [str]\n       * @return {(string|Command)}\n       */\n      summary(str) {\n        if (str === void 0)\n          return this._summary;\n        this._summary = str;\n        return this;\n      }\n      /**\n       * Set an alias for the command.\n       *\n       * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.\n       *\n       * @param {string} [alias]\n       * @return {(string|Command)}\n       */\n      alias(alias) {\n        if (alias === void 0)\n          return this._aliases[0];\n        let command = this;\n        if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) {\n          command = this.commands[this.commands.length - 1];\n        }\n        if (alias === command._name)\n          throw new Error(\"Command alias can't be the same as its name\");\n        const matchingCommand = this.parent?._findCommand(alias);\n        if (matchingCommand) {\n          const existingCmd = [matchingCommand.name()].concat(matchingCommand.aliases()).join(\"|\");\n          throw new Error(\n            `cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'`\n          );\n        }\n        command._aliases.push(alias);\n        return this;\n      }\n      /**\n       * Set aliases for the command.\n       *\n       * Only the first alias is shown in the auto-generated help.\n       *\n       * @param {string[]} [aliases]\n       * @return {(string[]|Command)}\n       */\n      aliases(aliases) {\n        if (aliases === void 0)\n          return this._aliases;\n        aliases.forEach((alias) => this.alias(alias));\n        return this;\n      }\n      /**\n       * Set / get the command usage `str`.\n       *\n       * @param {string} [str]\n       * @return {(string|Command)}\n       */\n      usage(str) {\n        if (str === void 0) {\n          if (this._usage)\n            return this._usage;\n          const args = this.registeredArguments.map((arg) => {\n            return humanReadableArgName(arg);\n          });\n          return [].concat(\n            this.options.length || this._helpOption !== null ? \"[options]\" : [],\n            this.commands.length ? \"[command]\" : [],\n            this.registeredArguments.length ? args : []\n          ).join(\" \");\n        }\n        this._usage = str;\n        return this;\n      }\n      /**\n       * Get or set the name of the command.\n       *\n       * @param {string} [str]\n       * @return {(string|Command)}\n       */\n      name(str) {\n        if (str === void 0)\n          return this._name;\n        this._name = str;\n        return this;\n      }\n      /**\n       * Set the name of the command from script filename, such as process.argv[1],\n       * or require.main.filename, or __filename.\n       *\n       * (Used internally and public although not documented in README.)\n       *\n       * @example\n       * program.nameFromFilename(require.main.filename);\n       *\n       * @param {string} filename\n       * @return {Command}\n       */\n      nameFromFilename(filename) {\n        this._name = path5.basename(filename, path5.extname(filename));\n        return this;\n      }\n      /**\n       * Get or set the directory for searching for executable subcommands of this command.\n       *\n       * @example\n       * program.executableDir(__dirname);\n       * // or\n       * program.executableDir('subcommands');\n       *\n       * @param {string} [path]\n       * @return {(string|null|Command)}\n       */\n      executableDir(path6) {\n        if (path6 === void 0)\n          return this._executableDir;\n        this._executableDir = path6;\n        return this;\n      }\n      /**\n       * Return program help documentation.\n       *\n       * @param {{ error: boolean }} [contextOptions] - pass {error:true} to wrap for stderr instead of stdout\n       * @return {string}\n       */\n      helpInformation(contextOptions) {\n        const helper = this.createHelp();\n        if (helper.helpWidth === void 0) {\n          helper.helpWidth = contextOptions && contextOptions.error ? this._outputConfiguration.getErrHelpWidth() : this._outputConfiguration.getOutHelpWidth();\n        }\n        return helper.formatHelp(this, helper);\n      }\n      /**\n       * @private\n       */\n      _getHelpContext(contextOptions) {\n        contextOptions = contextOptions || {};\n        const context = { error: !!contextOptions.error };\n        let write;\n        if (context.error) {\n          write = (arg) => this._outputConfiguration.writeErr(arg);\n        } else {\n          write = (arg) => this._outputConfiguration.writeOut(arg);\n        }\n        context.write = contextOptions.write || write;\n        context.command = this;\n        return context;\n      }\n      /**\n       * Output help information for this command.\n       *\n       * Outputs built-in help, and custom text added using `.addHelpText()`.\n       *\n       * @param {{ error: boolean } | Function} [contextOptions] - pass {error:true} to write to stderr instead of stdout\n       */\n      outputHelp(contextOptions) {\n        let deprecatedCallback;\n        if (typeof contextOptions === \"function\") {\n          deprecatedCallback = contextOptions;\n          contextOptions = void 0;\n        }\n        const context = this._getHelpContext(contextOptions);\n        this._getCommandAndAncestors().reverse().forEach((command) => command.emit(\"beforeAllHelp\", context));\n        this.emit(\"beforeHelp\", context);\n        let helpInformation = this.helpInformation(context);\n        if (deprecatedCallback) {\n          helpInformation = deprecatedCallback(helpInformation);\n          if (typeof helpInformation !== \"string\" && !Buffer.isBuffer(helpInformation)) {\n            throw new Error(\"outputHelp callback must return a string or a Buffer\");\n          }\n        }\n        context.write(helpInformation);\n        if (this._getHelpOption()?.long) {\n          this.emit(this._getHelpOption().long);\n        }\n        this.emit(\"afterHelp\", context);\n        this._getCommandAndAncestors().forEach(\n          (command) => command.emit(\"afterAllHelp\", context)\n        );\n      }\n      /**\n       * You can pass in flags and a description to customise the built-in help option.\n       * Pass in false to disable the built-in help option.\n       *\n       * @example\n       * program.helpOption('-?, --help' 'show help'); // customise\n       * program.helpOption(false); // disable\n       *\n       * @param {(string | boolean)} flags\n       * @param {string} [description]\n       * @return {Command} `this` command for chaining\n       */\n      helpOption(flags, description) {\n        if (typeof flags === \"boolean\") {\n          if (flags) {\n            this._helpOption = this._helpOption ?? void 0;\n          } else {\n            this._helpOption = null;\n          }\n          return this;\n        }\n        flags = flags ?? \"-h, --help\";\n        description = description ?? \"display help for command\";\n        this._helpOption = this.createOption(flags, description);\n        return this;\n      }\n      /**\n       * Lazy create help option.\n       * Returns null if has been disabled with .helpOption(false).\n       *\n       * @returns {(Option | null)} the help option\n       * @package\n       */\n      _getHelpOption() {\n        if (this._helpOption === void 0) {\n          this.helpOption(void 0, void 0);\n        }\n        return this._helpOption;\n      }\n      /**\n       * Supply your own option to use for the built-in help option.\n       * This is an alternative to using helpOption() to customise the flags and description etc.\n       *\n       * @param {Option} option\n       * @return {Command} `this` command for chaining\n       */\n      addHelpOption(option) {\n        this._helpOption = option;\n        return this;\n      }\n      /**\n       * Output help information and exit.\n       *\n       * Outputs built-in help, and custom text added using `.addHelpText()`.\n       *\n       * @param {{ error: boolean }} [contextOptions] - pass {error:true} to write to stderr instead of stdout\n       */\n      help(contextOptions) {\n        this.outputHelp(contextOptions);\n        let exitCode = process7.exitCode || 0;\n        if (exitCode === 0 && contextOptions && typeof contextOptions !== \"function\" && contextOptions.error) {\n          exitCode = 1;\n        }\n        this._exit(exitCode, \"commander.help\", \"(outputHelp)\");\n      }\n      /**\n       * Add additional text to be displayed with the built-in help.\n       *\n       * Position is 'before' or 'after' to affect just this command,\n       * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands.\n       *\n       * @param {string} position - before or after built-in help\n       * @param {(string | Function)} text - string to add, or a function returning a string\n       * @return {Command} `this` command for chaining\n       */\n      addHelpText(position, text) {\n        const allowedValues = [\"beforeAll\", \"before\", \"after\", \"afterAll\"];\n        if (!allowedValues.includes(position)) {\n          throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${allowedValues.join(\"', '\")}'`);\n        }\n        const helpEvent = `${position}Help`;\n        this.on(helpEvent, (context) => {\n          let helpStr;\n          if (typeof text === \"function\") {\n            helpStr = text({ error: context.error, command: context.command });\n          } else {\n            helpStr = text;\n          }\n          if (helpStr) {\n            context.write(`${helpStr}\n`);\n          }\n        });\n        return this;\n      }\n      /**\n       * Output help information if help flags specified\n       *\n       * @param {Array} args - array of options to search for help flags\n       * @private\n       */\n      _outputHelpIfRequested(args) {\n        const helpOption = this._getHelpOption();\n        const helpRequested = helpOption && args.find((arg) => helpOption.is(arg));\n        if (helpRequested) {\n          this.outputHelp();\n          this._exit(0, \"commander.helpDisplayed\", \"(outputHelp)\");\n        }\n      }\n    };\n    function incrementNodeInspectorPort(args) {\n      return args.map((arg) => {\n        if (!arg.startsWith(\"--inspect\")) {\n          return arg;\n        }\n        let debugOption;\n        let debugHost = \"127.0.0.1\";\n        let debugPort = \"9229\";\n        let match;\n        if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) {\n          debugOption = match[1];\n        } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) {\n          debugOption = match[1];\n          if (/^\\d+$/.test(match[3])) {\n            debugPort = match[3];\n          } else {\n            debugHost = match[3];\n          }\n        } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\\d+)$/)) !== null) {\n          debugOption = match[1];\n          debugHost = match[3];\n          debugPort = match[4];\n        }\n        if (debugOption && debugPort !== \"0\") {\n          return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;\n        }\n        return arg;\n      });\n    }\n    exports.Command = Command2;\n  }\n});\n\n// ../node_modules/commander/index.js\nvar require_commander = __commonJS({\n  \"../node_modules/commander/index.js\"(exports) {\n    var { Argument: Argument2 } = require_argument();\n    var { Command: Command2 } = require_command();\n    var { CommanderError: CommanderError2, InvalidArgumentError: InvalidArgumentError2 } = require_error();\n    var { Help: Help2 } = require_help();\n    var { Option: Option2 } = require_option();\n    exports.program = new Command2();\n    exports.createCommand = (name) => new Command2(name);\n    exports.createOption = (flags, description) => new Option2(flags, description);\n    exports.createArgument = (name, description) => new Argument2(name, description);\n    exports.Command = Command2;\n    exports.Option = Option2;\n    exports.Argument = Argument2;\n    exports.Help = Help2;\n    exports.CommanderError = CommanderError2;\n    exports.InvalidArgumentError = InvalidArgumentError2;\n    exports.InvalidOptionArgumentError = InvalidArgumentError2;\n  }\n});\n\n// ../node_modules/is-docker/index.js\nfunction hasDockerEnv() {\n  try {\n    import_node_fs.default.statSync(\"/.dockerenv\");\n    return true;\n  } catch {\n    return false;\n  }\n}\nfunction hasDockerCGroup() {\n  try {\n    return import_node_fs.default.readFileSync(\"/proc/self/cgroup\", \"utf8\").includes(\"docker\");\n  } catch {\n    return false;\n  }\n}\nfunction isDocker() {\n  if (isDockerCached === void 0) {\n    isDockerCached = hasDockerEnv() || hasDockerCGroup();\n  }\n  return isDockerCached;\n}\nvar import_node_fs, isDockerCached;\nvar init_is_docker = __esm({\n  \"../node_modules/is-docker/index.js\"() {\n    import_node_fs = __toESM(require(\"node:fs\"), 1);\n  }\n});\n\n// ../node_modules/is-inside-container/index.js\nfunction isInsideContainer() {\n  if (cachedResult === void 0) {\n    cachedResult = hasContainerEnv() || isDocker();\n  }\n  return cachedResult;\n}\nvar import_node_fs2, cachedResult, hasContainerEnv;\nvar init_is_inside_container = __esm({\n  \"../node_modules/is-inside-container/index.js\"() {\n    import_node_fs2 = __toESM(require(\"node:fs\"), 1);\n    init_is_docker();\n    hasContainerEnv = () => {\n      try {\n        import_node_fs2.default.statSync(\"/run/.containerenv\");\n        return true;\n      } catch {\n        return false;\n      }\n    };\n  }\n});\n\n// ../node_modules/is-wsl/index.js\nvar import_node_process, import_node_os, import_node_fs3, isWsl, is_wsl_default;\nvar init_is_wsl = __esm({\n  \"../node_modules/is-wsl/index.js\"() {\n    import_node_process = __toESM(require(\"node:process\"), 1);\n    import_node_os = __toESM(require(\"node:os\"), 1);\n    import_node_fs3 = __toESM(require(\"node:fs\"), 1);\n    init_is_inside_container();\n    isWsl = () => {\n      if (import_node_process.default.platform !== \"linux\") {\n        return false;\n      }\n      if (import_node_os.default.release().toLowerCase().includes(\"microsoft\")) {\n        if (isInsideContainer()) {\n          return false;\n        }\n        return true;\n      }\n      try {\n        return import_node_fs3.default.readFileSync(\"/proc/version\", \"utf8\").toLowerCase().includes(\"microsoft\") ? !isInsideContainer() : false;\n      } catch {\n        return false;\n      }\n    };\n    is_wsl_default = import_node_process.default.env.__IS_WSL_TEST__ ? isWsl : isWsl();\n  }\n});\n\n// ../node_modules/define-lazy-prop/index.js\nfunction defineLazyProperty(object, propertyName, valueGetter) {\n  const define = (value) => Object.defineProperty(object, propertyName, { value, enumerable: true, writable: true });\n  Object.defineProperty(object, propertyName, {\n    configurable: true,\n    enumerable: true,\n    get() {\n      const result = valueGetter();\n      define(result);\n      return result;\n    },\n    set(value) {\n      define(value);\n    }\n  });\n  return object;\n}\nvar init_define_lazy_prop = __esm({\n  \"../node_modules/define-lazy-prop/index.js\"() {\n  }\n});\n\n// ../node_modules/default-browser-id/index.js\nasync function defaultBrowserId() {\n  if (import_node_process2.default.platform !== \"darwin\") {\n    throw new Error(\"macOS only\");\n  }\n  const { stdout } = await execFileAsync(\"defaults\", [\"read\", \"com.apple.LaunchServices/com.apple.launchservices.secure\", \"LSHandlers\"]);\n  const match = /LSHandlerRoleAll = \"(?!-)(?<id>[^\"]+?)\";\\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);\n  return match?.groups.id ?? \"com.apple.Safari\";\n}\nvar import_node_util, import_node_process2, import_node_child_process, execFileAsync;\nvar init_default_browser_id = __esm({\n  \"../node_modules/default-browser-id/index.js\"() {\n    import_node_util = require(\"node:util\");\n    import_node_process2 = __toESM(require(\"node:process\"), 1);\n    import_node_child_process = require(\"node:child_process\");\n    execFileAsync = (0, import_node_util.promisify)(import_node_child_process.execFile);\n  }\n});\n\n// ../node_modules/run-applescript/index.js\nasync function runAppleScript(script, { humanReadableOutput = true } = {}) {\n  if (import_node_process3.default.platform !== \"darwin\") {\n    throw new Error(\"macOS only\");\n  }\n  const outputArguments = humanReadableOutput ? [] : [\"-ss\"];\n  const { stdout } = await execFileAsync2(\"osascript\", [\"-e\", script, outputArguments]);\n  return stdout.trim();\n}\nvar import_node_process3, import_node_util2, import_node_child_process2, execFileAsync2;\nvar init_run_applescript = __esm({\n  \"../node_modules/run-applescript/index.js\"() {\n    import_node_process3 = __toESM(require(\"node:process\"), 1);\n    import_node_util2 = require(\"node:util\");\n    import_node_child_process2 = require(\"node:child_process\");\n    execFileAsync2 = (0, import_node_util2.promisify)(import_node_child_process2.execFile);\n  }\n});\n\n// ../node_modules/bundle-name/index.js\nasync function bundleName(bundleId) {\n  return runAppleScript(`tell application \"Finder\" to set app_path to application file id \"${bundleId}\" as string\ntell application \"System Events\" to get value of property list item \"CFBundleName\" of property list file (app_path & \":Contents:Info.plist\")`);\n}\nvar init_bundle_name = __esm({\n  \"../node_modules/bundle-name/index.js\"() {\n    init_run_applescript();\n  }\n});\n\n// ../node_modules/default-browser/windows.js\nasync function defaultBrowser(_execFileAsync = execFileAsync3) {\n  const { stdout } = await _execFileAsync(\"reg\", [\n    \"QUERY\",\n    \" HKEY_CURRENT_USER\\\\Software\\\\Microsoft\\\\Windows\\\\Shell\\\\Associations\\\\UrlAssociations\\\\http\\\\UserChoice\",\n    \"/v\",\n    \"ProgId\"\n  ]);\n  const match = /ProgId\\s*REG_SZ\\s*(?<id>\\S+)/.exec(stdout);\n  if (!match) {\n    throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);\n  }\n  const { id } = match.groups;\n  const browser = windowsBrowserProgIds[id];\n  if (!browser) {\n    throw new UnknownBrowserError(`Unknown browser ID: ${id}`);\n  }\n  return browser;\n}\nvar import_node_util3, import_node_child_process3, execFileAsync3, windowsBrowserProgIds, UnknownBrowserError;\nvar init_windows = __esm({\n  \"../node_modules/default-browser/windows.js\"() {\n    import_node_util3 = require(\"node:util\");\n    import_node_child_process3 = require(\"node:child_process\");\n    execFileAsync3 = (0, import_node_util3.promisify)(import_node_child_process3.execFile);\n    windowsBrowserProgIds = {\n      AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: \"Edge\", id: \"com.microsoft.edge.old\" },\n      MSEdgeDHTML: { name: \"Edge\", id: \"com.microsoft.edge\" },\n      // On macOS, it's \"com.microsoft.edgemac\"\n      MSEdgeHTM: { name: \"Edge\", id: \"com.microsoft.edge\" },\n      // Newer Edge/Win10 releases\n      \"IE.HTTP\": { name: \"Internet Explorer\", id: \"com.microsoft.ie\" },\n      FirefoxURL: { name: \"Firefox\", id: \"org.mozilla.firefox\" },\n      ChromeHTML: { name: \"Chrome\", id: \"com.google.chrome\" },\n      BraveHTML: { name: \"Brave\", id: \"com.brave.Browser\" },\n      BraveBHTML: { name: \"Brave Beta\", id: \"com.brave.Browser.beta\" },\n      BraveSSHTM: { name: \"Brave Nightly\", id: \"com.brave.Browser.nightly\" }\n    };\n    UnknownBrowserError = class extends Error {\n    };\n  }\n});\n\n// ../node_modules/default-browser/index.js\nasync function defaultBrowser2() {\n  if (import_node_process4.default.platform === \"darwin\") {\n    const id = await defaultBrowserId();\n    const name = await bundleName(id);\n    return { name, id };\n  }\n  if (import_node_process4.default.platform === \"linux\") {\n    const { stdout } = await execFileAsync4(\"xdg-mime\", [\"query\", \"default\", \"x-scheme-handler/http\"]);\n    const id = stdout.trim();\n    const name = titleize(id.replace(/.desktop$/, \"\").replace(\"-\", \" \"));\n    return { name, id };\n  }\n  if (import_node_process4.default.platform === \"win32\") {\n    return defaultBrowser();\n  }\n  throw new Error(\"Only macOS, Linux, and Windows are supported\");\n}\nvar import_node_util4, import_node_process4, import_node_child_process4, execFileAsync4, titleize;\nvar init_default_browser = __esm({\n  \"../node_modules/default-browser/index.js\"() {\n    import_node_util4 = require(\"node:util\");\n    import_node_process4 = __toESM(require(\"node:process\"), 1);\n    import_node_child_process4 = require(\"node:child_process\");\n    init_default_browser_id();\n    init_bundle_name();\n    init_windows();\n    execFileAsync4 = (0, import_node_util4.promisify)(import_node_child_process4.execFile);\n    titleize = (string) => string.toLowerCase().replaceAll(/(?:^|\\s|-)\\S/g, (x) => x.toUpperCase());\n  }\n});\n\n// ../node_modules/open/index.js\nvar open_exports = {};\n__export(open_exports, {\n  apps: () => apps,\n  default: () => open_default,\n  openApp: () => openApp\n});\nfunction detectArchBinary(binary) {\n  if (typeof binary === \"string\" || Array.isArray(binary)) {\n    return binary;\n  }\n  const { [arch]: archBinary } = binary;\n  if (!archBinary) {\n    throw new Error(`${arch} is not supported`);\n  }\n  return archBinary;\n}\nfunction detectPlatformBinary({ [platform]: platformBinary }, { wsl }) {\n  if (wsl && is_wsl_default) {\n    return detectArchBinary(wsl);\n  }\n  if (!platformBinary) {\n    throw new Error(`${platform} is not supported`);\n  }\n  return detectArchBinary(platformBinary);\n}\nvar import_node_process5, import_node_buffer, import_node_path, import_node_url, import_node_child_process5, import_promises, import_meta, __dirname2, localXdgOpenPath, platform, arch, getWslDrivesMountPoint, pTryEach, baseOpen, open, openApp, apps, open_default;\nvar init_open = __esm({\n  \"../node_modules/open/index.js\"() {\n    import_node_process5 = __toESM(require(\"node:process\"), 1);\n    import_node_buffer = require(\"node:buffer\");\n    import_node_path = __toESM(require(\"node:path\"), 1);\n    import_node_url = require(\"node:url\");\n    import_node_child_process5 = __toESM(require(\"node:child_process\"), 1);\n    import_promises = __toESM(require(\"node:fs/promises\"), 1);\n    init_is_wsl();\n    init_define_lazy_prop();\n    init_default_browser();\n    init_is_inside_container();\n    import_meta = {};\n    __dirname2 = import_node_path.default.dirname((0, import_node_url.fileURLToPath)(import_meta.url));\n    localXdgOpenPath = import_node_path.default.join(__dirname2, \"xdg-open\");\n    ({ platform, arch } = import_node_process5.default);\n    getWslDrivesMountPoint = (() => {\n      const defaultMountPoint = \"/mnt/\";\n      let mountPoint;\n      return async function() {\n        if (mountPoint) {\n          return mountPoint;\n        }\n        const configFilePath = \"/etc/wsl.conf\";\n        let isConfigFileExists = false;\n        try {\n          await import_promises.default.access(configFilePath, import_promises.constants.F_OK);\n          isConfigFileExists = true;\n        } catch {\n        }\n        if (!isConfigFileExists) {\n          return defaultMountPoint;\n        }\n        const configContent = await import_promises.default.readFile(configFilePath, { encoding: \"utf8\" });\n        const configMountPoint = /(?<!#.*)root\\s*=\\s*(?<mountPoint>.*)/g.exec(configContent);\n        if (!configMountPoint) {\n          return defaultMountPoint;\n        }\n        mountPoint = configMountPoint.groups.mountPoint.trim();\n        mountPoint = mountPoint.endsWith(\"/\") ? mountPoint : `${mountPoint}/`;\n        return mountPoint;\n      };\n    })();\n    pTryEach = async (array, mapper) => {\n      let latestError;\n      for (const item of array) {\n        try {\n          return await mapper(item);\n        } catch (error) {\n          latestError = error;\n        }\n      }\n      throw latestError;\n    };\n    baseOpen = async (options) => {\n      options = {\n        wait: false,\n        background: false,\n        newInstance: false,\n        allowNonzeroExitCode: false,\n        ...options\n      };\n      if (Array.isArray(options.app)) {\n        return pTryEach(options.app, (singleApp) => baseOpen({\n          ...options,\n          app: singleApp\n        }));\n      }\n      let { name: app, arguments: appArguments = [] } = options.app ?? {};\n      appArguments = [...appArguments];\n      if (Array.isArray(app)) {\n        return pTryEach(app, (appName) => baseOpen({\n          ...options,\n          app: {\n            name: appName,\n            arguments: appArguments\n          }\n        }));\n      }\n      if (app === \"browser\" || app === \"browserPrivate\") {\n        const ids = {\n          \"com.google.chrome\": \"chrome\",\n          \"google-chrome.desktop\": \"chrome\",\n          \"org.mozilla.firefox\": \"firefox\",\n          \"firefox.desktop\": \"firefox\",\n          \"com.microsoft.msedge\": \"edge\",\n          \"com.microsoft.edge\": \"edge\",\n          \"microsoft-edge.desktop\": \"edge\"\n        };\n        const flags = {\n          chrome: \"--incognito\",\n          firefox: \"--private-window\",\n          edge: \"--inPrivate\"\n        };\n        const browser = await defaultBrowser2();\n        if (browser.id in ids) {\n          const browserName = ids[browser.id];\n          if (app === \"browserPrivate\") {\n            appArguments.push(flags[browserName]);\n          }\n          return baseOpen({\n            ...options,\n            app: {\n              name: apps[browserName],\n              arguments: appArguments\n            }\n          });\n        }\n        throw new Error(`${browser.name} is not supported as a default browser`);\n      }\n      let command;\n      const cliArguments = [];\n      const childProcessOptions = {};\n      if (platform === \"darwin\") {\n        command = \"open\";\n        if (options.wait) {\n          cliArguments.push(\"--wait-apps\");\n        }\n        if (options.background) {\n          cliArguments.push(\"--background\");\n        }\n        if (options.newInstance) {\n          cliArguments.push(\"--new\");\n        }\n        if (app) {\n          cliArguments.push(\"-a\", app);\n        }\n      } else if (platform === \"win32\" || is_wsl_default && !isInsideContainer() && !app) {\n        const mountPoint = await getWslDrivesMountPoint();\n        command = is_wsl_default ? `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe` : `${import_node_process5.default.env.SYSTEMROOT || import_node_process5.default.env.windir || \"C:\\\\Windows\"}\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell`;\n        cliArguments.push(\n          \"-NoProfile\",\n          \"-NonInteractive\",\n          \"-ExecutionPolicy\",\n          \"Bypass\",\n          \"-EncodedCommand\"\n        );\n        if (!is_wsl_default) {\n          childProcessOptions.windowsVerbatimArguments = true;\n        }\n        const encodedArguments = [\"Start\"];\n        if (options.wait) {\n          encodedArguments.push(\"-Wait\");\n        }\n        if (app) {\n          encodedArguments.push(`\"\\`\"${app}\\`\"\"`);\n          if (options.target) {\n            appArguments.push(options.target);\n          }\n        } else if (options.target) {\n          encodedArguments.push(`\"${options.target}\"`);\n        }\n        if (appArguments.length > 0) {\n          appArguments = appArguments.map((argument) => `\"\\`\"${argument}\\`\"\"`);\n          encodedArguments.push(\"-ArgumentList\", appArguments.join(\",\"));\n        }\n        options.target = import_node_buffer.Buffer.from(encodedArguments.join(\" \"), \"utf16le\").toString(\"base64\");\n      } else {\n        if (app) {\n          command = app;\n        } else {\n          const isBundled = !__dirname2 || __dirname2 === \"/\";\n          let exeLocalXdgOpen = false;\n          try {\n            await import_promises.default.access(localXdgOpenPath, import_promises.constants.X_OK);\n            exeLocalXdgOpen = true;\n          } catch {\n          }\n          const useSystemXdgOpen = import_node_process5.default.versions.electron ?? (platform === \"android\" || isBundled || !exeLocalXdgOpen);\n          command = useSystemXdgOpen ? \"xdg-open\" : localXdgOpenPath;\n        }\n        if (appArguments.length > 0) {\n          cliArguments.push(...appArguments);\n        }\n        if (!options.wait) {\n          childProcessOptions.stdio = \"ignore\";\n          childProcessOptions.detached = true;\n        }\n      }\n      if (platform === \"darwin\" && appArguments.length > 0) {\n        cliArguments.push(\"--args\", ...appArguments);\n      }\n      if (options.target) {\n        cliArguments.push(options.target);\n      }\n      const subprocess = import_node_child_process5.default.spawn(command, cliArguments, childProcessOptions);\n      if (options.wait) {\n        return new Promise((resolve, reject) => {\n          subprocess.once(\"error\", reject);\n          subprocess.once(\"close\", (exitCode) => {\n            if (!options.allowNonzeroExitCode && exitCode > 0) {\n              reject(new Error(`Exited with code ${exitCode}`));\n              return;\n            }\n            resolve(subprocess);\n          });\n        });\n      }\n      subprocess.unref();\n      return subprocess;\n    };\n    open = (target, options) => {\n      if (typeof target !== \"string\") {\n        throw new TypeError(\"Expected a `target`\");\n      }\n      return baseOpen({\n        ...options,\n        target\n      });\n    };\n    openApp = (name, options) => {\n      if (typeof name !== \"string\" && !Array.isArray(name)) {\n        throw new TypeError(\"Expected a valid `name`\");\n      }\n      const { arguments: appArguments = [] } = options ?? {};\n      if (appArguments !== void 0 && appArguments !== null && !Array.isArray(appArguments)) {\n        throw new TypeError(\"Expected `appArguments` as Array type\");\n      }\n      return baseOpen({\n        ...options,\n        app: {\n          name,\n          arguments: appArguments\n        }\n      });\n    };\n    apps = {};\n    defineLazyProperty(apps, \"chrome\", () => detectPlatformBinary({\n      darwin: \"google chrome\",\n      win32: \"chrome\",\n      linux: [\"google-chrome\", \"google-chrome-stable\", \"chromium\"]\n    }, {\n      wsl: {\n        ia32: \"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe\",\n        x64: [\"/mnt/c/Program Files/Google/Chrome/Application/chrome.exe\", \"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe\"]\n      }\n    }));\n    defineLazyProperty(apps, \"firefox\", () => detectPlatformBinary({\n      darwin: \"firefox\",\n      win32: \"C:\\\\Program Files\\\\Mozilla Firefox\\\\firefox.exe\",\n      linux: \"firefox\"\n    }, {\n      wsl: \"/mnt/c/Program Files/Mozilla Firefox/firefox.exe\"\n    }));\n    defineLazyProperty(apps, \"edge\", () => detectPlatformBinary({\n      darwin: \"microsoft edge\",\n      win32: \"msedge\",\n      linux: [\"microsoft-edge\", \"microsoft-edge-dev\"]\n    }, {\n      wsl: \"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe\"\n    }));\n    defineLazyProperty(apps, \"browser\", () => \"browser\");\n    defineLazyProperty(apps, \"browserPrivate\", () => \"browserPrivate\");\n    open_default = open;\n  }\n});\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n  handleLogin: () => handleLogin\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// ../node_modules/commander/esm.mjs\nvar import_index = __toESM(require_commander(), 1);\nvar {\n  program,\n  createCommand,\n  createArgument,\n  createOption,\n  CommanderError,\n  InvalidArgumentError,\n  InvalidOptionArgumentError,\n  // deprecated old name\n  Command,\n  Argument,\n  Option,\n  Help\n} = import_index.default;\n\n// src/index.ts\nvar import_path3 = __toESM(require(\"path\"));\n\n// node_modules/@websim/router/src/client.js\nfunction createClient(options) {\n  const { baseUrl, headers = {} } = options;\n  return {\n    ref(route) {\n      return {\n        async fetch(fetchOptions = {}) {\n          const { params = {}, query = {}, body } = fetchOptions;\n          let url = route;\n          Object.entries(params).forEach(([key, value]) => {\n            url = url.replace(`:${key}`, value);\n          });\n          const [method, path5] = url.split(\" \");\n          const fullUrl = new URL(path5, baseUrl);\n          Object.entries(query).forEach(([key, value]) => {\n            fullUrl.searchParams.append(key, value);\n          });\n          const response = await fetch(fullUrl.toString(), {\n            method: method || \"GET\",\n            headers: {\n              \"Content-Type\": \"application/json\",\n              ...headers\n            },\n            body: body ? JSON.stringify(body) : void 0\n          });\n          const responseBody = await response.json();\n          return {\n            ok: response.ok,\n            status: response.status,\n            body: responseBody\n          };\n        }\n      };\n    }\n  };\n}\n\n// src/api-client.ts\nvar import_crypto = __toESM(require(\"crypto\"));\nvar import_fs = __toESM(require(\"fs\"));\nvar import_path = __toESM(require(\"path\"));\nasync function calculateFileHash(filePath) {\n  const buffer = await import_fs.default.promises.readFile(filePath);\n  const hash = import_crypto.default.createHash(\"sha256\");\n  hash.update(buffer);\n  return hash.digest(\"hex\");\n}\nfunction getAssetUrl(contentOrigin, {\n  path: path5,\n  project_id,\n  project_version\n}) {\n  let url = new URL(path5, contentOrigin.replace(\"{PROJECT_ID}\", project_id));\n  url.searchParams.set(\"v\", project_version.toString());\n  return url.toString();\n}\nvar WebsimApiClient = class {\n  client;\n  baseUrl;\n  authToken;\n  constructor({ baseUrl, authToken }) {\n    this.baseUrl = baseUrl;\n    this.authToken = authToken;\n    this.client = createClient({\n      baseUrl: this.baseUrl,\n      headers: {\n        Authorization: `Bearer ${this.authToken}`\n      }\n    });\n  }\n  setAuthToken(token) {\n    this.authToken = token;\n    this.client = createClient({\n      baseUrl: this.baseUrl,\n      headers: {\n        Authorization: `Bearer ${this.authToken}`\n      }\n    });\n  }\n  // Project Management Methods\n  // ------------------------\n  async getProject(projectId) {\n    const response = await this.client.ref(\"GET /projects/:id\").fetch({\n      params: { id: projectId }\n    });\n    if (!response.ok) {\n      console.error(\"Failed to get project\", response.body);\n      throw response.body;\n    }\n    return response.body;\n  }\n  async getProjectName(projectId) {\n    const projectResponse = await this.getProject(projectId);\n    if (!projectResponse.project) {\n      throw new Error(\"Project not found\");\n    }\n    return projectResponse.project.title || `project-${projectId}`;\n  }\n  async getLatestRevisionVersion(projectId) {\n    const projectResponse = await this.getProject(projectId);\n    if (!projectResponse.project_revision) {\n      throw new Error(\"No project revision found\");\n    }\n    return projectResponse.project_revision.version;\n  }\n  // Revision Management Methods\n  // -------------------------\n  async createProjectRevision(projectId, parentVersion) {\n    if (!parentVersion) {\n      parentVersion = await this.getLatestRevisionVersion(projectId);\n    }\n    const response = await this.client.ref(\"POST /projects/:id/revisions\").fetch({\n      params: { id: projectId },\n      body: { parent_version: parentVersion }\n    });\n    if (!response.ok) {\n      throw response.body;\n    }\n    return response.body;\n  }\n  async getRevisionAssets(projectId, revisionVersion) {\n    const response = await this.client.ref(\"GET /projects/:id/revisions/:version/assets\").fetch({\n      params: {\n        id: projectId,\n        version: revisionVersion\n      }\n    });\n    if (!response.ok) {\n      throw response.body;\n    }\n    return response.body;\n  }\n  async finalizeRevision(projectId, revisionVersion) {\n    const response = await fetch(\n      `${this.baseUrl}/projects/${projectId}/revisions/${revisionVersion}`,\n      {\n        method: \"PATCH\",\n        headers: {\n          Authorization: `Bearer ${this.authToken}`,\n          \"Content-Type\": \"application/json\"\n        },\n        body: JSON.stringify({ draft: false })\n      }\n    );\n    if (!response.ok) {\n      throw await response.json();\n    }\n    return await response.json();\n  }\n  // Asset Management Methods\n  // ----------------------\n  async uploadAssets(projectId, revisionVersion, filesInfos) {\n    const existingAssetIdsPromise = this.getExistingAssetIds(\n      projectId,\n      revisionVersion,\n      filesInfos\n    );\n    const files = await Promise.all(\n      filesInfos.map(async (file) => {\n        const buffer = await import_fs.default.promises.readFile(file.filePath);\n        return new File([buffer], file.targetPath);\n      })\n    );\n    const existingAssetIds = await existingAssetIdsPromise;\n    const BATCH_SIZE = 10;\n    const results = [];\n    for (let i = 0; i < files.length; i += BATCH_SIZE) {\n      const batchFiles = files.slice(i, i + BATCH_SIZE);\n      const batchExistingIds = existingAssetIds.slice(i, i + BATCH_SIZE);\n      console.log(\n        `Uploading batch ${Math.floor(i / BATCH_SIZE) + 1}/${Math.ceil(\n          files.length / BATCH_SIZE\n        )} (${batchFiles.length} files)...`\n      );\n      const formData = new FormData();\n      const contents = batchFiles.map((file, index) => ({\n        size: file.size,\n        existingAssetId: batchExistingIds?.[index]\n      }));\n      formData.append(\"contents\", JSON.stringify(contents));\n      batchFiles.forEach((file, index) => {\n        formData.append(String(index), file);\n      });\n      const response = await fetch(\n        `${this.baseUrl}/projects/${projectId}/revisions/${revisionVersion}/assets`,\n        {\n          method: \"POST\",\n          body: formData,\n          headers: {\n            Authorization: `Bearer ${this.authToken}`\n          }\n        }\n      );\n      if (!response.ok) {\n        console.error(\n          `Failed to upload batch ${Math.floor(i / BATCH_SIZE) + 1}`,\n          response.body\n        );\n        throw response.body;\n      }\n      const batchResult = await response.json();\n      results.push(batchResult[\"assets\"]);\n    }\n    return results.flat();\n  }\n  async getExistingAssetIds(projectId, revisionVersion, filesInfos) {\n    try {\n      const assetsResponse = await this.getRevisionAssets(\n        projectId,\n        revisionVersion\n      );\n      const currentAssets = assetsResponse.assets || [];\n      const assetsByPath = {};\n      currentAssets.forEach((asset) => {\n        assetsByPath[asset.path] = asset.id;\n      });\n      return filesInfos.map((file) => assetsByPath[file.targetPath]);\n    } catch (error) {\n      console.warn(\"Failed to fetch existing assets:\", error);\n      return [];\n    }\n  }\n  // Screenshot Management Methods\n  // ---------------------------\n  // async triggerScreenshot(projectId: string, revisionVersion: number) {\n  //   const response = await fetch(\n  //     `${this.baseUrl}/projects/${projectId}/revisions/${revisionVersion}/screenshots`,\n  //     {\n  //       method: \"POST\",\n  //       headers: {\n  //         Authorization: `Bearer ${this.authToken}`,\n  //         \"Content-Type\": \"application/json\",\n  //       },\n  //     }\n  //   );\n  //   if (!response.ok) {\n  //     throw await response.json();\n  //   }\n  //   return await response.json();\n  // }\n  // Directory Sync Methods\n  // --------------------\n  async getFilesRecursively(dir) {\n    const entries = await import_fs.default.promises.readdir(dir, { withFileTypes: true });\n    const subPromises = await Promise.all(\n      entries.map(async (entry) => {\n        const fullPath = import_path.default.join(dir, entry.name);\n        const targetPath = import_path.default.relative(process.cwd(), fullPath).replace(/\\\\/g, \"/\");\n        if (entry.name === \".websim.json\" || entry.name === \".cursor\" || entry.name === \".websim-manifest.json\") {\n          return [];\n        }\n        if (entry.isDirectory()) {\n          return this.getFilesRecursively(fullPath);\n        } else {\n          const contentHash = await calculateFileHash(fullPath);\n          return [{ filePath: fullPath, targetPath, contentHash }];\n        }\n      })\n    );\n    return subPromises.flat();\n  }\n  async syncDirectoryToRevision(projectId, revisionVersion, directoryPath) {\n    const files = await this.getFilesRecursively(directoryPath);\n    const manifest = this.loadFileManifest(directoryPath);\n    let filesToUpload = files;\n    if (manifest) {\n      console.log(`Found manifest with ${manifest.files.length} files`);\n      const hashMap = /* @__PURE__ */ new Map();\n      manifest.files.forEach((file) => {\n        hashMap.set(file.path, file.hash);\n      });\n      filesToUpload = files.filter((file) => {\n        const previousHash = hashMap.get(file.targetPath);\n        return !previousHash || previousHash !== file.contentHash;\n      });\n      console.log(\n        `Detected ${filesToUpload.length} new or modified files out of ${files.length} total files`\n      );\n    } else {\n      console.log(\n        `No valid manifest found, uploading all ${files.length} files`\n      );\n    }\n    const uploadResult = await this.uploadAssets(\n      projectId,\n      revisionVersion,\n      filesToUpload\n    );\n    console.log(\"Finalizing revision...\");\n    await this.finalizeRevision(projectId, revisionVersion);\n    this.saveFileManifest(directoryPath, files);\n    return uploadResult;\n  }\n  // Project Configuration Methods\n  // ---------------------------\n  getWebsimConfigPath(directoryPath) {\n    return import_path.default.join(directoryPath, \".websim.json\");\n  }\n  getCursorRulesPath(directoryPath) {\n    return import_path.default.join(directoryPath, \".cursor\", \"rules\");\n  }\n  getManifestPath(directoryPath) {\n    return import_path.default.join(directoryPath, \".websim-manifest.json\");\n  }\n  writeWebsimConfig(directoryPath, projectId) {\n    const configPath = this.getWebsimConfigPath(directoryPath);\n    const config = { projectId };\n    import_fs.default.writeFileSync(configPath, JSON.stringify(config, null, 2), \"utf8\");\n  }\n  saveFileManifest(directoryPath, filesInfo) {\n    const manifestPath = this.getManifestPath(directoryPath);\n    const manifest = {\n      files: filesInfo.map((file) => ({\n        path: file.targetPath,\n        hash: file.contentHash || \"\"\n      }))\n    };\n    import_fs.default.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2), \"utf8\");\n    console.log(`File manifest saved with ${manifest.files.length} files`);\n  }\n  loadFileManifest(directoryPath) {\n    const manifestPath = this.getManifestPath(directoryPath);\n    try {\n      if (import_fs.default.existsSync(manifestPath)) {\n        const manifestData = import_fs.default.readFileSync(manifestPath, \"utf8\");\n        return JSON.parse(manifestData);\n      }\n    } catch (error) {\n      console.warn(\"Failed to read file manifest:\", error);\n    }\n    return null;\n  }\n  writeCursorRules(directoryPath) {\n    const rulesDir = this.getCursorRulesPath(directoryPath);\n    import_fs.default.mkdirSync(rulesDir, { recursive: true });\n    const sourceRulesDir = import_path.default.join(__dirname, \"rules\");\n    try {\n      const ruleFiles = import_fs.default.readdirSync(sourceRulesDir).filter((file) => file.endsWith(\".mdc\"));\n      for (const ruleFile of ruleFiles) {\n        const sourceRulePath = import_path.default.join(sourceRulesDir, ruleFile);\n        const targetRulePath = import_path.default.join(rulesDir, ruleFile);\n        const ruleContent = import_fs.default.readFileSync(sourceRulePath, \"utf8\");\n        import_fs.default.writeFileSync(targetRulePath, ruleContent, \"utf8\");\n      }\n    } catch (error) {\n      console.warn(\"Failed to write Cursor rules:\", error);\n    }\n  }\n  readWebsimConfig(directoryPath) {\n    const configPath = this.getWebsimConfigPath(directoryPath);\n    try {\n      if (import_fs.default.existsSync(configPath)) {\n        const config = JSON.parse(import_fs.default.readFileSync(configPath, \"utf8\"));\n        return config.projectId;\n      }\n    } catch (error) {\n      console.warn(\"Failed to read .websim.json:\", error);\n    }\n    return null;\n  }\n  // Directory Pull Methods\n  // --------------------\n  async pullRevisionToDirectory(projectId, revisionVersion, directoryPath, isClone = false) {\n    if (!import_fs.default.existsSync(directoryPath)) {\n      import_fs.default.mkdirSync(directoryPath, { recursive: true });\n    }\n    if (isClone) {\n      this.writeWebsimConfig(directoryPath, projectId);\n      this.writeCursorRules(directoryPath);\n    }\n    const assetsResponse = await this.getRevisionAssets(\n      projectId,\n      revisionVersion\n    );\n    const assets = assetsResponse.assets || [];\n    const projectResponse = await this.getProject(projectId);\n    const siteId = projectResponse.project_revision?.site_id;\n    if (!siteId) {\n      throw new Error(\"No site ID found for project\");\n    }\n    const indexHtmlContent = await this.fetchIndexHtmlContent(siteId);\n    if (indexHtmlContent) {\n      await this.writeIndexHtml(directoryPath, indexHtmlContent);\n    }\n    let successCount = 0;\n    let errorCount = 0;\n    const downloadedFiles = [];\n    const MAX_CONCURRENT_DOWNLOADS = 10;\n    const assetBatches = [];\n    for (let i = 0; i < assets.length; i += MAX_CONCURRENT_DOWNLOADS) {\n      assetBatches.push(assets.slice(i, i + MAX_CONCURRENT_DOWNLOADS));\n    }\n    for (const batch of assetBatches) {\n      const downloadPromises = batch.map(async (asset) => {\n        const localFilePath = import_path.default.join(directoryPath, asset.path);\n        if (this.isIndexHtml(asset.path) && indexHtmlContent !== null) {\n          return { success: true };\n        }\n        try {\n          await this.downloadAssetToFile(\n            asset.path,\n            getAssetUrl(\"https://{PROJECT_ID}.c.websim.com\", asset),\n            localFilePath\n          );\n          const contentHash = await calculateFileHash(localFilePath);\n          downloadedFiles.push({\n            filePath: localFilePath,\n            targetPath: asset.path,\n            contentHash\n          });\n          return { success: true };\n        } catch (error) {\n          console.error(`Error downloading ${asset.path}: ${error}`);\n          return { success: false };\n        }\n      });\n      const results = await Promise.all(downloadPromises);\n      successCount += results.filter((r) => r.success).length;\n      errorCount += results.filter((r) => !r.success).length;\n    }\n    this.saveFileManifest(directoryPath, downloadedFiles);\n    return {\n      success: errorCount === 0,\n      message: `Downloaded ${successCount} assets to ${directoryPath}${errorCount > 0 ? `, ${errorCount} assets failed` : \"\"}`\n    };\n  }\n  async downloadAssetToFile(assetPath, assetUrl, localFilePath) {\n    const dirPath = import_path.default.dirname(localFilePath);\n    if (!import_fs.default.existsSync(dirPath)) {\n      import_fs.default.mkdirSync(dirPath, { recursive: true });\n    }\n    const response = await fetch(assetUrl, {\n      method: \"GET\",\n      headers: {\n        Authorization: `Bearer ${this.authToken}`\n      }\n    });\n    if (!response.ok) {\n      console.error(\n        `Failed to download ${assetPath}: ${response.status} ${response.statusText}`\n      );\n      throw new Error(\n        `Failed to download ${assetPath}: ${response.status} ${response.statusText}`\n      );\n    }\n    const contentType = response.headers.get(\"content-type\");\n    const isText = this.isTextContent(contentType);\n    await this.writeAssetToFile(response, localFilePath, isText);\n    console.log(`Downloaded: ${assetPath}`);\n  }\n  async fetchIndexHtmlContent(siteId) {\n    if (!siteId) {\n      return null;\n    }\n    try {\n      console.log(`Fetching HTML content from site ${siteId}...`);\n      const response = await fetch(`${this.baseUrl}/sites/${siteId}/html`, {\n        method: \"GET\",\n        headers: {\n          Authorization: `Bearer ${this.authToken}`,\n          \"Content-Type\": \"application/json\"\n        }\n      });\n      if (!response.ok) {\n        console.warn(\n          `Failed to fetch HTML content: ${response.status} ${response.statusText}`\n        );\n        return null;\n      }\n      const htmlContent = await response.text();\n      return this.processHtmlContent(htmlContent);\n    } catch (error) {\n      console.warn(\"Error fetching HTML content:\", error);\n      return null;\n    }\n  }\n  async writeIndexHtml(directoryPath, content) {\n    try {\n      const indexHtmlPath = import_path.default.join(directoryPath, \"index.html\");\n      const dirPath = import_path.default.dirname(indexHtmlPath);\n      if (!import_fs.default.existsSync(dirPath)) {\n        import_fs.default.mkdirSync(dirPath, { recursive: true });\n      }\n      import_fs.default.writeFileSync(indexHtmlPath, content, \"utf8\");\n      console.log(\"Written index.html to disk\");\n    } catch (error) {\n      console.error(`Error writing index.html: ${error}`);\n    }\n  }\n  // Utility Methods\n  // -------------\n  processHtmlContent(html) {\n    return html.split(\"\\n\").filter((line) => !line.includes(\"<base href=\")).join(\"\\n\");\n  }\n  isIndexHtml(path5) {\n    return path5 === \"index.html\" || path5.endsWith(\"/index.html\");\n  }\n  isTextContent(contentType) {\n    if (!contentType)\n      return false;\n    const isText = contentType?.startsWith(\"text/\") || [\n      \"application/json\",\n      \"application/javascript\",\n      \"application/xml\"\n    ].includes(contentType ?? \"\");\n    return isText;\n  }\n  async writeAssetToFile(response, filePath, isText) {\n    if (isText) {\n      const content = await response.text();\n      import_fs.default.writeFileSync(filePath, content, \"utf8\");\n    } else {\n      const content = await response.arrayBuffer();\n      import_fs.default.writeFileSync(filePath, new Uint8Array(content));\n    }\n  }\n  async initiateCliLogin() {\n    console.log(\"Initiating CLI login challenge...\");\n    const response = await this.client.ref(\"POST /auth/cli/initiate\").fetch({\n      body: void 0,\n      params: {}\n    });\n    if (!response.ok) {\n      console.error(\"Failed to initiate CLI login challenge\", response.body);\n      throw response.body;\n    }\n    return response.body;\n  }\n  async pollCliLogin(challengeId) {\n    console.log(\"Waiting for browser login completion...\");\n    const MAX_POLL_ATTEMPTS = 60;\n    const POLL_INTERVAL_MS = 5e3;\n    for (let attempt = 1; attempt <= MAX_POLL_ATTEMPTS; attempt++) {\n      try {\n        const response = await this.client.ref(\"GET /auth/cli/poll\").fetch({\n          query: { challengeId }\n        });\n        if (response.ok && response.body.status === \"completed\") {\n          console.log(\"Token received.\");\n          return response.body.authToken;\n        }\n        if (response.status === 202 && response.body.status === \"pending\") {\n          process.stdout.write(\".\");\n        } else if (response.status === 410 || response.status === 404 && response.body.status === \"expired\") {\n          console.error(\"\\nLogin challenge expired or not found.\");\n          throw new Error(\"Login challenge expired or not found.\");\n        } else {\n          console.error(\n            `\nUnexpected poll status: ${response.status}`,\n            response.body\n          );\n          throw new Error(`Unexpected poll status: ${response.status}`);\n        }\n      } catch (error) {\n        if (error.status === 410 || error.status === 404) {\n          console.error(\"\\nLogin challenge expired or not found.\");\n          throw new Error(\"Login challenge expired or not found.\");\n        }\n        console.error(\"\\nError polling for login status:\", error);\n        process.stdout.write(\"x\");\n      }\n      await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));\n    }\n    console.error(\"\\nLogin polling timed out.\");\n    throw new Error(\"Login timed out. Please try again.\");\n  }\n};\n\n// src/auth.ts\nvar import_fs2 = __toESM(require(\"fs\"));\nvar import_os = __toESM(require(\"os\"));\nvar import_path2 = __toESM(require(\"path\"));\nvar CONFIG_FILE = import_path2.default.join(import_os.default.homedir(), \".websim-cli.json\");\nasync function getAuthToken() {\n  try {\n    if (import_fs2.default.existsSync(CONFIG_FILE)) {\n      const config = JSON.parse(\n        import_fs2.default.readFileSync(CONFIG_FILE, \"utf8\")\n      );\n      return config.authToken;\n    }\n  } catch (error) {\n    console.error(\"Error reading auth token:\", error);\n  }\n  await handleLogin();\n  return getAuthToken();\n}\nfunction saveAuthToken(token) {\n  const config = { authToken: token };\n  try {\n    import_fs2.default.writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2));\n    import_fs2.default.chmodSync(CONFIG_FILE, 384);\n  } catch (error) {\n    console.error(\"Error saving auth token:\", error);\n    throw error;\n  }\n}\nasync function handleAuthError() {\n  console.log(\"\\nAuth token appears to be invalid or expired.\");\n  return getAuthToken();\n}\n\n// src/index.ts\nvar CLI_CONFIG = {\n  name: \"websim-cli\",\n  version: \"0.1.0\",\n  auth: {\n    baseUrl: \"https://websim.com\"\n    // baseUrl: \"http://websim.localhost:8080\",\n  }\n};\nasync function handleSync(projectId, parentVersion) {\n  const directoryPath = process.cwd();\n  try {\n    let authToken = await getAuthToken();\n    const client = new WebsimApiClient({\n      baseUrl: CLI_CONFIG.auth.baseUrl + \"/api/v1\",\n      authToken\n    });\n    if (!projectId) {\n      projectId = client.readWebsimConfig(directoryPath) ?? void 0;\n      if (!projectId) {\n        throw new Error(\n          \"No project ID provided and no .websim.json found in current directory\"\n        );\n      }\n      console.log(`Using project ID from .websim.json: ${projectId}`);\n    }\n    try {\n      let version = parentVersion;\n      if (!version) {\n        console.log(`Creating new revision based on latest version`);\n        version = await client.getLatestRevisionVersion(projectId);\n      } else {\n        console.log(`Creating new revision based on version ${version}`);\n      }\n      const revisionResponse = await client.createProjectRevision(\n        projectId,\n        version\n      );\n      const newVersion = revisionResponse.project_revision.version;\n      console.log(`Created revision ${newVersion}`);\n      console.log(`Syncing files to revision ${newVersion}`);\n      const result = await client.syncDirectoryToRevision(\n        projectId,\n        newVersion,\n        directoryPath\n      );\n      console.log(`Successfully synced assets`);\n      const url = `${CLI_CONFIG.auth.baseUrl}/p/${projectId}/${newVersion}`;\n      console.log(`New revision created: ${url}`);\n      try {\n        const open2 = (await Promise.resolve().then(() => (init_open(), open_exports))).default;\n        await open2(url);\n      } catch (e) {\n        console.log(\"Could not open browser automatically\");\n      }\n      return result;\n    } catch (error) {\n      if (error.status === 401) {\n        authToken = await handleAuthError();\n        client.setAuthToken(authToken);\n        return handleSync(projectId, parentVersion);\n      }\n      throw error;\n    }\n  } catch (error) {\n    handleError(error);\n  }\n}\nasync function handlePull(projectId, options) {\n  const directoryPath = process.cwd();\n  try {\n    let authToken = await getAuthToken();\n    console.log(authToken);\n    const client = new WebsimApiClient({\n      baseUrl: CLI_CONFIG.auth.baseUrl + \"/api/v1\",\n      authToken\n    });\n    if (!projectId) {\n      projectId = client.readWebsimConfig(directoryPath) ?? void 0;\n      if (!projectId) {\n        throw new Error(\n          \"No project ID provided and no .websim.json found in current directory\"\n        );\n      }\n      console.log(`Using project ID from .websim.json: ${projectId}`);\n    }\n    console.log(`Pulling files from project ${projectId} to ${directoryPath}`);\n    try {\n      const revisionVersion = options.version || await client.getLatestRevisionVersion(projectId);\n      console.log(`Pulling files from revision ${revisionVersion}`);\n      const result = await client.pullRevisionToDirectory(\n        projectId,\n        revisionVersion,\n        directoryPath\n      );\n      if (result.success) {\n        console.log(\n          `Successfully pulled assets from revision: ${revisionVersion}`\n        );\n      } else {\n        console.log(\n          `Partially pulled assets from revision: ${revisionVersion} (some files failed)`\n        );\n        console.log(\n          `You may want to try again or check for specific file issues`\n        );\n      }\n      console.log(\n        `URL: ${CLI_CONFIG.auth.baseUrl}/p/${projectId}/${revisionVersion}`\n      );\n      return result;\n    } catch (error) {\n      if (error.status === 401) {\n        authToken = await handleAuthError();\n        client.setAuthToken(authToken);\n        return handlePull(projectId, options);\n      }\n      throw error;\n    }\n  } catch (error) {\n    handleError(error);\n  }\n}\nasync function handleClone(projectId, options) {\n  try {\n    let authToken = await getAuthToken();\n    const client = new WebsimApiClient({\n      baseUrl: CLI_CONFIG.auth.baseUrl + \"/api/v1\",\n      authToken\n    });\n    try {\n      const revisionVersion = options.version || await client.getLatestRevisionVersion(projectId);\n      console.log(\n        `Using ${options.version ? \"specified\" : \"latest\"} version: ${revisionVersion}`\n      );\n      const projectName = await client.getProjectName(projectId);\n      console.log(`Project name: ${projectName}`);\n      const projectDirPath = import_path3.default.join(process.cwd(), projectName);\n      console.log(`Cloning project to: ${projectDirPath}`);\n      const result = await client.pullRevisionToDirectory(\n        projectId,\n        revisionVersion,\n        projectDirPath,\n        true\n        // isClone = true to write .websim.json\n      );\n      if (result.success) {\n        console.log(`Successfully cloned project to ${projectDirPath}`);\n      } else {\n        console.log(\n          `Partially cloned project to ${projectDirPath} (some files failed)`\n        );\n        console.log(\n          `You may want to try again or check for specific file issues`\n        );\n      }\n      console.log(\n        `URL: ${CLI_CONFIG.auth.baseUrl}/p/${projectId}/${revisionVersion}`\n      );\n      return result;\n    } catch (error) {\n      if (error.status === 401) {\n        authToken = await handleAuthError();\n        client.setAuthToken(authToken);\n        return handleClone(projectId, options);\n      }\n      throw error;\n    }\n  } catch (error) {\n    handleError(error);\n  }\n}\nasync function handleLogin() {\n  try {\n    const client = new WebsimApiClient({\n      baseUrl: CLI_CONFIG.auth.baseUrl + \"/api/v1\",\n      authToken: \"\"\n      // Provide a dummy token initially, it won't be used for login initiation\n    });\n    const { challengeId, loginUrl } = await client.initiateCliLogin();\n    console.log(`\nPlease open this URL in your browser to log in:\n\n${loginUrl}\n`);\n    try {\n      const open2 = (await Promise.resolve().then(() => (init_open(), open_exports))).default;\n      await open2(loginUrl);\n    } catch (err) {\n      console.warn(\n        `Failed to automatically open browser: ${err instanceof Error ? err.message : err}`\n      );\n      console.log(`Please copy and paste the URL manually.`);\n    }\n    const authToken = await client.pollCliLogin(challengeId);\n    console.log(\"\\nLogin process completed.\");\n    saveAuthToken(authToken);\n    console.log(`Token saved to ${CONFIG_FILE}`);\n    console.log(\"Validating new token...\");\n    client.setAuthToken(authToken);\n    const testProjectId = \"k33p7t4u4nwfp4yux80i\";\n    try {\n      await client.getProject(testProjectId);\n      console.log(\"\\u2705 Token validated successfully!\");\n      console.log(\"You are now logged in.\");\n    } catch (validationError) {\n      console.error(\"\\n\\u274C Failed to validate the new token:\", validationError);\n      console.error(\n        \"The token was saved, but might be invalid or there was a network issue.\"\n      );\n      console.error(\n        \"Please try running a command like 'websim pull <project-id>' to test.\"\n      );\n    }\n  } catch (error) {\n    if (error instanceof Error) {\n      console.error(`\n\\u274C Login failed: ${error.message}`);\n    } else {\n      handleError(error);\n    }\n    process.exit(1);\n  }\n}\nfunction handleError(error) {\n  console.error(\"Error:\", error instanceof Error ? error.message : error);\n  process.exit(1);\n}\nfunction setupLoginCommand(program2) {\n  program2.command(\"login\").description(\"Log in to Websim by providing an auth token\").action(() => {\n    handleLogin();\n  });\n}\nfunction setupSyncCommand(program2) {\n  program2.command(\"sync\").description(\n    \"Sync files from current directory to a Websim project (includes screenshot and finalization)\"\n  ).argument(\n    \"[project-id]\",\n    \"Websim project ID (optional if .websim.json exists)\"\n  ).argument(\n    \"[parent-version]\",\n    \"Parent revision version number (uses latest if not specified)\",\n    parseInt\n  ).action((projectId, parentVersion) => {\n    handleSync(projectId, parentVersion);\n  });\n}\nfunction setupPullCommand(program2) {\n  program2.command(\"pull\").description(\"Pull files from a Websim project to current directory\").argument(\n    \"[project-id]\",\n    \"Websim project ID (optional if .websim.json exists)\"\n  ).argument(\n    \"[version]\",\n    \"Revision version number to pull (uses latest if not specified)\",\n    parseInt\n  ).action((projectId, version) => {\n    handlePull(projectId, { version });\n  });\n}\nfunction setupCloneCommand(program2) {\n  program2.command(\"clone\").description(\n    \"Clone a Websim project into a new directory named after the project in current directory\"\n  ).argument(\"<project-id>\", \"Websim project ID\").argument(\n    \"[version]\",\n    \"Revision version number to clone (uses latest if not specified)\",\n    parseInt\n  ).action((projectId, version) => {\n    handleClone(projectId, { version });\n  });\n}\nasync function main() {\n  const program2 = new Command();\n  program2.name(CLI_CONFIG.name).version(CLI_CONFIG.version);\n  setupLoginCommand(program2);\n  setupSyncCommand(program2);\n  setupPullCommand(program2);\n  setupCloneCommand(program2);\n  program2.parse();\n}\nmain().catch((err) => {\n  handleError(err);\n});\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  handleLogin\n});\n"]}