"use strict";
/**
 * Bundled from external-pack
 * This is a zero-dependency bundle created by rolldown.
 */
'use strict';

//#region \0rolldown/runtime.js
var __create = Object.create;
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", {
	value,
	configurable: true
});
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
var __exportAll = (all, no_symbols) => {
	let target = {};
	for (var name in all) {
		__defProp(target, name, {
			get: all[name],
			enumerable: true
		});
	}
	if (!no_symbols) {
		__defProp(target, Symbol.toStringTag, { value: "Module" });
	}
	return target;
};
var __copyProps = (to, from, except, desc) => {
	if (from && typeof from === "object" || typeof from === "function") {
		for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
			key = keys[i];
			if (!__hasOwnProp.call(to, key) && key !== except) {
				__defProp(to, key, {
					get: ((k) => from[k]).bind(null, key),
					enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
				});
			}
		}
	}
	return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
	value: mod,
	enumerable: true
}) : target, mod));
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);

//#endregion
let node_process = require("node:process");
node_process = __toESM(node_process, 1);
let node_os = require("node:os");
node_os = __toESM(node_os, 1);
let node_tty = require("node:tty");
node_tty = __toESM(node_tty, 1);
let process$1 = require("process");
process$1 = __toESM(process$1, 1);
let node_async_hooks = require("node:async_hooks");
let node_util = require("node:util");
let node_readline = require("node:readline");
node_readline = __toESM(node_readline, 1);
let node_path = require("node:path");
const { ArrayFrom: _p_ArrayFrom, ArrayIsArray: _p_ArrayIsArray } = require('../primordials/array.js')

const { ErrorCtor: _p_ErrorCtor } = require('../primordials/error.js')

const { SetCtor: _p_SetCtor } = require('../primordials/map-set.js')

const { MathFloor: _p_MathFloor, MathMax: _p_MathMax, MathMin: _p_MathMin, MathRandom: _p_MathRandom } = require('../primordials/math.js')

const { NumberIsNaN: _p_NumberIsNaN, NumberParseFloat: _p_NumberParseFloat, NumberParseInt: _p_NumberParseInt } = require('../primordials/number.js')

const { ObjectAssign: _p_ObjectAssign, ObjectDefineProperty: _p_ObjectDefineProperty, ObjectEntries: _p_ObjectEntries, ObjectGetPrototypeOf: _p_ObjectGetPrototypeOf, ObjectIs: _p_ObjectIs, ObjectKeys: _p_ObjectKeys } = require('../primordials/object.js')

const { PromiseCtor: _p_PromiseCtor } = require('../primordials/promise.js')

const { RegExpCtor: _p_RegExpCtor } = require('../primordials/regexp.js')

const { StringPrototypeCodePointAt: _p_StringPrototypeCodePointAt, StringPrototypeReplaceAll: _p_StringPrototypeReplaceAll, StringPrototypeStartsWith: _p_StringPrototypeStartsWith } = require('../primordials/string.js')

node_path = __toESM(node_path, 1);

//#region node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/signals.js
var require_signals = /* @__PURE__ */ __commonJSMin(((exports) => {
	_p_ObjectDefineProperty(exports, "__esModule", { value: true });
	exports.signals = void 0;
	/**
	* This is not the set of all possible signals.
	*
	* It IS, however, the set of all signals that trigger
	* an exit on either Linux or BSD systems.  Linux is a
	* superset of the signal names supported on BSD, and
	* the unknown signals just fail to register, so we can
	* catch that easily enough.
	*
	* Windows signals are a different set, since there are
	* signals that terminate Windows processes, but don't
	* terminate (or don't even exist) on Posix systems.
	*
	* Don't bother with SIGKILL.  It's uncatchable, which
	* means that we can't fire any callbacks anyway.
	*
	* If a user does happen to register a handler on a non-
	* fatal signal like SIGWINCH or something, and then
	* exit, it'll end up firing `process.emit('exit')`, so
	* the handler will be fired anyway.
	*
	* SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
	* artificially, inherently leave the process in a
	* state from which it is not safe to try and enter JS
	* listeners.
	*/
	exports.signals = [];
	exports.signals.push("SIGHUP", "SIGINT", "SIGTERM");
	if (process.platform !== "win32") exports.signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
	if (process.platform === "linux") exports.signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
}));

//#endregion
//#region node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/index.js
var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
	var _a;
	_p_ObjectDefineProperty(exports, "__esModule", { value: true });
	exports.unload = exports.load = exports.onExit = exports.signals = void 0;
	const signals_js_1 = require_signals();
	_p_ObjectDefineProperty(exports, "signals", {
		enumerable: true,
		get: function() {
			return signals_js_1.signals;
		}
	});
	const processOk = (process) => !!process && typeof process === "object" && typeof process.removeListener === "function" && typeof process.emit === "function" && typeof process.reallyExit === "function" && typeof process.listeners === "function" && typeof process.kill === "function" && typeof process.pid === "number" && typeof process.on === "function";
	const kExitEmitter = Symbol.for("signal-exit emitter");
	const global = globalThis;
	const ObjectDefineProperty = Object.defineProperty.bind(Object);
	var Emitter = class {
		emitted = {
			afterExit: false,
			exit: false
		};
		listeners = {
			afterExit: [],
			exit: []
		};
		count = 0;
		id = _p_MathRandom();
		constructor() {
			if (global[kExitEmitter]) return global[kExitEmitter];
			ObjectDefineProperty(global, kExitEmitter, {
				value: this,
				writable: false,
				enumerable: false,
				configurable: false
			});
		}
		on(ev, fn) {
			this.listeners[ev].push(fn);
		}
		removeListener(ev, fn) {
			const list = this.listeners[ev];
			const i = list.indexOf(fn);
			/* c8 ignore start */
			if (i === -1) return;
			/* c8 ignore stop */
			if (i === 0 && list.length === 1) list.length = 0;
			else list.splice(i, 1);
		}
		emit(ev, code, signal) {
			if (this.emitted[ev]) return false;
			this.emitted[ev] = true;
			let ret = false;
			for (const fn of this.listeners[ev]) ret = fn(code, signal) === true || ret;
			if (ev === "exit") ret = this.emit("afterExit", code, signal) || ret;
			return ret;
		}
	};
	var SignalExitBase = class {};
	const signalExitWrap = (handler) => {
		return {
			onExit(cb, opts) {
				return handler.onExit(cb, opts);
			},
			load() {
				return handler.load();
			},
			unload() {
				return handler.unload();
			}
		};
	};
	var SignalExitFallback = class extends SignalExitBase {
		onExit() {
			return () => {};
		}
		load() {}
		unload() {}
	};
	var SignalExit = class extends SignalExitBase {
		/* c8 ignore start */
		#hupSig = process.platform === "win32" ? "SIGINT" : "SIGHUP";
		/* c8 ignore stop */
		#emitter = new Emitter();
		#process;
		#originalProcessEmit;
		#originalProcessReallyExit;
		#sigListeners = {};
		#loaded = false;
		constructor(process) {
			super();
			this.#process = process;
			this.#sigListeners = {};
			for (const sig of signals_js_1.signals) this.#sigListeners[sig] = () => {
				const listeners = this.#process.listeners(sig);
				let { count } = this.#emitter;
				/* c8 ignore start */
				const p = process;
				if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") count += p.__signal_exit_emitter__.count;
				/* c8 ignore stop */
				if (listeners.length === count) {
					this.unload();
					const ret = this.#emitter.emit("exit", null, sig);
					/* c8 ignore start */
					const s = sig === "SIGHUP" ? this.#hupSig : sig;
					if (!ret) process.kill(process.pid, s);
				}
			};
			this.#originalProcessReallyExit = process.reallyExit;
			this.#originalProcessEmit = process.emit;
		}
		onExit(cb, opts) {
			/* c8 ignore start */
			if (!processOk(this.#process)) return () => {};
			/* c8 ignore stop */
			if (this.#loaded === false) this.load();
			const ev = opts?.alwaysLast ? "afterExit" : "exit";
			this.#emitter.on(ev, cb);
			return () => {
				this.#emitter.removeListener(ev, cb);
				if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) this.unload();
			};
		}
		load() {
			if (this.#loaded) return;
			this.#loaded = true;
			this.#emitter.count += 1;
			for (const sig of signals_js_1.signals) try {
				const fn = this.#sigListeners[sig];
				if (fn) this.#process.on(sig, fn);
			} catch (_) {}
			this.#process.emit = (ev, ...a) => {
				return this.#processEmit(ev, ...a);
			};
			this.#process.reallyExit = (code) => {
				return this.#processReallyExit(code);
			};
		}
		unload() {
			if (!this.#loaded) return;
			this.#loaded = false;
			signals_js_1.signals.forEach((sig) => {
				const listener = this.#sigListeners[sig];
				/* c8 ignore start */
				if (!listener) throw new _p_ErrorCtor("Listener not defined for signal: " + sig);
				/* c8 ignore stop */
				try {
					this.#process.removeListener(sig, listener);
				} catch (_) {}
				/* c8 ignore stop */
			});
			this.#process.emit = this.#originalProcessEmit;
			this.#process.reallyExit = this.#originalProcessReallyExit;
			this.#emitter.count -= 1;
		}
		#processReallyExit(code) {
			/* c8 ignore start */
			if (!processOk(this.#process)) return 0;
			this.#process.exitCode = code || 0;
			/* c8 ignore stop */
			this.#emitter.emit("exit", this.#process.exitCode, null);
			return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
		}
		#processEmit(ev, ...args) {
			const og = this.#originalProcessEmit;
			if (ev === "exit" && processOk(this.#process)) {
				if (typeof args[0] === "number") this.#process.exitCode = args[0];
				/* c8 ignore start */
				const ret = og.call(this.#process, ev, ...args);
				/* c8 ignore start */
				this.#emitter.emit("exit", this.#process.exitCode, null);
				/* c8 ignore stop */
				return ret;
			} else return og.call(this.#process, ev, ...args);
		}
	};
	const process = globalThis.process;
	_a = signalExitWrap(processOk(process) ? new SignalExit(process) : new SignalExitFallback()), exports.onExit = _a.onExit, exports.load = _a.load, exports.unload = _a.unload;
}));

//#endregion
//#region node_modules/.pnpm/supports-color@10.2.2/node_modules/supports-color/index.js
var supports_color_exports = /* @__PURE__ */ __exportAll({
	createSupportsColor: () => createSupportsColor,
	default: () => supportsColor$1
});
function hasFlag$2(flag, argv = globalThis.Deno ? globalThis.Deno.args : node_process.default.argv) {
	const prefix = _p_StringPrototypeStartsWith(flag, "-") ? "" : flag.length === 1 ? "-" : "--";
	const position = argv.indexOf(prefix + flag);
	const terminatorPosition = argv.indexOf("--");
	return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
}
function envForceColor() {
	if (!("FORCE_COLOR" in env)) return;
	if (env.FORCE_COLOR === "true") return 1;
	if (env.FORCE_COLOR === "false") return 0;
	if (env.FORCE_COLOR.length === 0) return 1;
	const level = _p_MathMin(_p_NumberParseInt(env.FORCE_COLOR, 10), 3);
	if (![
		0,
		1,
		2,
		3
	].includes(level)) return;
	return level;
}
function translateLevel(level) {
	if (level === 0) return false;
	return {
		level,
		hasBasic: true,
		has256: level >= 2,
		has16m: level >= 3
	};
}
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
	const noFlagForceColor = envForceColor();
	if (noFlagForceColor !== void 0) flagForceColor = noFlagForceColor;
	const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
	if (forceColor === 0) return 0;
	if (sniffFlags) {
		if (hasFlag$2("color=16m") || hasFlag$2("color=full") || hasFlag$2("color=truecolor")) return 3;
		if (hasFlag$2("color=256")) return 2;
	}
	if ("TF_BUILD" in env && "AGENT_NAME" in env) return 1;
	if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
	const min = forceColor || 0;
	if (env.TERM === "dumb") return min;
	if (node_process.default.platform === "win32") {
		const osRelease = node_os.default.release().split(".");
		if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
		return 1;
	}
	if ("CI" in env) {
		if ([
			"GITHUB_ACTIONS",
			"GITEA_ACTIONS",
			"CIRCLECI"
		].some((key) => key in env)) return 3;
		if ([
			"TRAVIS",
			"APPVEYOR",
			"GITLAB_CI",
			"BUILDKITE",
			"DRONE"
		].some((sign) => sign in env) || env.CI_NAME === "codeship") return 1;
		return min;
	}
	if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
	if (env.COLORTERM === "truecolor") return 3;
	if (env.TERM === "xterm-kitty") return 3;
	if (env.TERM === "xterm-ghostty") return 3;
	if (env.TERM === "wezterm") return 3;
	if ("TERM_PROGRAM" in env) {
		const version = _p_NumberParseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
		switch (env.TERM_PROGRAM) {
			case "iTerm.app": return version >= 3 ? 3 : 2;
			case "Apple_Terminal": return 2;
		}
	}
	if (/-256(color)?$/i.test(env.TERM)) return 2;
	if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
	if ("COLORTERM" in env) return 1;
	return min;
}
function createSupportsColor(stream, options = {}) {
	return translateLevel(_supportsColor(stream, {
		streamIsTTY: stream && stream.isTTY,
		...options
	}));
}
var env, flagForceColor, supportsColor$1;
var init_supports_color = __esmMin((() => {
	__name(hasFlag$2, "hasFlag");
	({env} = node_process.default);
	;
	if (hasFlag$2("no-color") || hasFlag$2("no-colors") || hasFlag$2("color=false") || hasFlag$2("color=never")) flagForceColor = 0;
	else if (hasFlag$2("color") || hasFlag$2("colors") || hasFlag$2("color=true") || hasFlag$2("color=always")) flagForceColor = 1;
	supportsColor$1 = {
		stdout: createSupportsColor({ isTTY: node_tty.default.isatty(1) }),
		stderr: createSupportsColor({ isTTY: node_tty.default.isatty(2) })
	};
}));

//#endregion
//#region node_modules/.pnpm/has-flag@5.0.1/node_modules/has-flag/index.js
var has_flag_exports = /* @__PURE__ */ __exportAll({ default: () => hasFlag$1 });
function hasFlag$1(flag, argv = process$1.default.argv) {
	const prefix = _p_StringPrototypeStartsWith(flag, "-") ? "" : flag.length === 1 ? "-" : "--";
	const position = argv.indexOf(prefix + flag);
	const terminatorPosition = argv.indexOf("--");
	return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
}
var init_has_flag = __esmMin((() => {
	__name(hasFlag$1, "hasFlag");
}));

//#endregion
//#region node_modules/.pnpm/yoctocolors-cjs@2.1.3/node_modules/yoctocolors-cjs/index.js
var require_yoctocolors_cjs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	const hasColors = require("node:tty")?.WriteStream?.prototype?.hasColors?.() ?? false;
	const format = (open, close) => {
		if (!hasColors) return (input) => input;
		const openCode = `\u001B[${open}m`;
		const closeCode = `\u001B[${close}m`;
		return (input) => {
			const string = input + "";
			let index = string.indexOf(closeCode);
			if (index === -1) return openCode + string + closeCode;
			let result = openCode;
			let lastIndex = 0;
			const replaceCode = (close === 22 ? closeCode : "") + openCode;
			while (index !== -1) {
				result += string.slice(lastIndex, index) + replaceCode;
				lastIndex = index + closeCode.length;
				index = string.indexOf(closeCode, lastIndex);
			}
			result += string.slice(lastIndex) + closeCode;
			return result;
		};
	};
	const colors = {};
	colors.reset = format(0, 0);
	colors.bold = format(1, 22);
	colors.dim = format(2, 22);
	colors.italic = format(3, 23);
	colors.underline = format(4, 24);
	colors.overline = format(53, 55);
	colors.inverse = format(7, 27);
	colors.hidden = format(8, 28);
	colors.strikethrough = format(9, 29);
	colors.black = format(30, 39);
	colors.red = format(31, 39);
	colors.green = format(32, 39);
	colors.yellow = format(33, 39);
	colors.blue = format(34, 39);
	colors.magenta = format(35, 39);
	colors.cyan = format(36, 39);
	colors.white = format(37, 39);
	colors.gray = format(90, 39);
	colors.bgBlack = format(40, 49);
	colors.bgRed = format(41, 49);
	colors.bgGreen = format(42, 49);
	colors.bgYellow = format(43, 49);
	colors.bgBlue = format(44, 49);
	colors.bgMagenta = format(45, 49);
	colors.bgCyan = format(46, 49);
	colors.bgWhite = format(47, 49);
	colors.bgGray = format(100, 49);
	colors.redBright = format(91, 39);
	colors.greenBright = format(92, 39);
	colors.yellowBright = format(93, 39);
	colors.blueBright = format(94, 39);
	colors.magentaBright = format(95, 39);
	colors.cyanBright = format(96, 39);
	colors.whiteBright = format(97, 39);
	colors.bgRedBright = format(101, 49);
	colors.bgGreenBright = format(102, 49);
	colors.bgYellowBright = format(103, 49);
	colors.bgBlueBright = format(104, 49);
	colors.bgMagentaBright = format(105, 49);
	colors.bgCyanBright = format(106, 49);
	colors.bgWhiteBright = format(107, 49);
	module.exports = colors;
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/key.js
var isUpKey, isDownKey, isSpaceKey, isBackspaceKey, isTabKey, isNumberKey, isEnterKey;
var init_key = __esmMin((() => {
	isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
	isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
	isSpaceKey = (key) => key.name === "space";
	isBackspaceKey = (key) => key.name === "backspace";
	isTabKey = (key) => key.name === "tab";
	isNumberKey = (key) => "1234567890".includes(key.name);
	isEnterKey = (key) => key.name === "enter" || key.name === "return";
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/errors.js
var AbortPromptError, CancelPromptError, ExitPromptError, HookError, ValidationError;
var init_errors = __esmMin((() => {
	AbortPromptError = class extends Error {
		name = "AbortPromptError";
		message = "Prompt was aborted";
		constructor(options) {
			super();
			this.cause = options?.cause;
		}
	};
	CancelPromptError = class extends Error {
		name = "CancelPromptError";
		message = "Prompt was canceled";
	};
	ExitPromptError = class extends Error {
		name = "ExitPromptError";
	};
	HookError = class extends Error {
		name = "HookError";
	};
	ValidationError = class extends Error {
		name = "ValidationError";
	};
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/hook-engine.js
function createStore(rl) {
	return {
		rl,
		hooks: [],
		hooksCleanup: [],
		hooksEffect: [],
		index: 0,
		handleChange() {}
	};
}
function withHooks(rl, cb) {
	const store = createStore(rl);
	return hookStorage.run(store, () => {
		function cycle(render) {
			store.handleChange = () => {
				store.index = 0;
				render();
			};
			store.handleChange();
		}
		return cb(cycle);
	});
}
function getStore() {
	const store = hookStorage.getStore();
	if (!store) throw new HookError("[Inquirer] Hook functions can only be called from within a prompt");
	return store;
}
function readline() {
	return getStore().rl;
}
function withUpdates(fn) {
	const wrapped = (...args) => {
		const store = getStore();
		let shouldUpdate = false;
		const oldHandleChange = store.handleChange;
		store.handleChange = () => {
			shouldUpdate = true;
		};
		const returnValue = fn(...args);
		if (shouldUpdate) oldHandleChange();
		store.handleChange = oldHandleChange;
		return returnValue;
	};
	return node_async_hooks.AsyncResource.bind(wrapped);
}
function withPointer(cb) {
	const store = getStore();
	const { index } = store;
	const returnValue = cb({
		get() {
			return store.hooks[index];
		},
		set(value) {
			store.hooks[index] = value;
		},
		initialized: index in store.hooks
	});
	store.index++;
	return returnValue;
}
function handleChange() {
	getStore().handleChange();
}
var hookStorage, effectScheduler;
var init_hook_engine = __esmMin((() => {
	init_errors();
	hookStorage = new node_async_hooks.AsyncLocalStorage();
	effectScheduler = {
		queue(cb) {
			const store = getStore();
			const { index } = store;
			store.hooksEffect.push(() => {
				store.hooksCleanup[index]?.();
				const cleanFn = cb(readline());
				if (cleanFn != null && typeof cleanFn !== "function") throw new ValidationError("useEffect return value must be a cleanup function or nothing.");
				store.hooksCleanup[index] = cleanFn;
			});
		},
		run() {
			const store = getStore();
			withUpdates(() => {
				store.hooksEffect.forEach((effect) => {
					effect();
				});
				store.hooksEffect.length = 0;
			})();
		},
		clearAll() {
			const store = getStore();
			store.hooksCleanup.forEach((cleanFn) => {
				cleanFn?.();
			});
			store.hooksEffect.length = 0;
			store.hooksCleanup.length = 0;
		}
	};
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-state.js
function isFactory(value) {
	return typeof value === "function";
}
function useState(defaultValue) {
	return withPointer((pointer) => {
		const setState = node_async_hooks.AsyncResource.bind(function setState(newValue) {
			if (pointer.get() !== newValue) {
				pointer.set(newValue);
				handleChange();
			}
		});
		if (pointer.initialized) return [pointer.get(), setState];
		const value = isFactory(defaultValue) ? defaultValue() : defaultValue;
		pointer.set(value);
		return [value, setState];
	});
}
var init_use_state = __esmMin((() => {
	init_hook_engine();
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-effect.js
function useEffect(cb, depArray) {
	withPointer((pointer) => {
		const oldDeps = pointer.get();
		if (!_p_ArrayIsArray(oldDeps) || depArray.some((dep, i) => !_p_ObjectIs(dep, oldDeps[i]))) effectScheduler.queue(cb);
		pointer.set(depArray);
	});
}
var init_use_effect = __esmMin((() => {
	init_hook_engine();
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+figures@2.0.5/node_modules/@inquirer/figures/dist/index.js
function isUnicodeSupported() {
	if (!node_process.default.platform.startsWith("win")) return node_process.default.env["TERM"] !== "linux";
	return Boolean(false) || Boolean(node_process.default.env["WT_SESSION"]) || Boolean(node_process.default.env["TERMINUS_SUBLIME"]) || node_process.default.env["ConEmuTask"] === "{cmd::Cmder}" || node_process.default.env["TERM_PROGRAM"] === "Terminus-Sublime" || node_process.default.env["TERM_PROGRAM"] === "vscode" || node_process.default.env["TERM"] === "xterm-256color" || node_process.default.env["TERM"] === "alacritty" || node_process.default.env["TERMINAL_EMULATOR"] === "JetBrains-JediTerm";
}
var common, specialMainSymbols, specialFallbackSymbols, mainSymbols, fallbackSymbols, shouldUseMain, figures, replacements;
var init_dist$10 = __esmMin((() => {
	common = {
		circleQuestionMark: "(?)",
		questionMarkPrefix: "(?)",
		square: "█",
		squareDarkShade: "▓",
		squareMediumShade: "▒",
		squareLightShade: "░",
		squareTop: "▀",
		squareBottom: "▄",
		squareLeft: "▌",
		squareRight: "▐",
		squareCenter: "■",
		bullet: "●",
		dot: "․",
		ellipsis: "…",
		pointerSmall: "›",
		triangleUp: "▲",
		triangleUpSmall: "▴",
		triangleDown: "▼",
		triangleDownSmall: "▾",
		triangleLeftSmall: "◂",
		triangleRightSmall: "▸",
		home: "⌂",
		heart: "♥",
		musicNote: "♪",
		musicNoteBeamed: "♫",
		arrowUp: "↑",
		arrowDown: "↓",
		arrowLeft: "←",
		arrowRight: "→",
		arrowLeftRight: "↔",
		arrowUpDown: "↕",
		almostEqual: "≈",
		notEqual: "≠",
		lessOrEqual: "≤",
		greaterOrEqual: "≥",
		identical: "≡",
		infinity: "∞",
		subscriptZero: "₀",
		subscriptOne: "₁",
		subscriptTwo: "₂",
		subscriptThree: "₃",
		subscriptFour: "₄",
		subscriptFive: "₅",
		subscriptSix: "₆",
		subscriptSeven: "₇",
		subscriptEight: "₈",
		subscriptNine: "₉",
		oneHalf: "½",
		oneThird: "⅓",
		oneQuarter: "¼",
		oneFifth: "⅕",
		oneSixth: "⅙",
		oneEighth: "⅛",
		twoThirds: "⅔",
		twoFifths: "⅖",
		threeQuarters: "¾",
		threeFifths: "⅗",
		threeEighths: "⅜",
		fourFifths: "⅘",
		fiveSixths: "⅚",
		fiveEighths: "⅝",
		sevenEighths: "⅞",
		line: "─",
		lineBold: "━",
		lineDouble: "═",
		lineDashed0: "┄",
		lineDashed1: "┅",
		lineDashed2: "┈",
		lineDashed3: "┉",
		lineDashed4: "╌",
		lineDashed5: "╍",
		lineDashed6: "╴",
		lineDashed7: "╶",
		lineDashed8: "╸",
		lineDashed9: "╺",
		lineDashed10: "╼",
		lineDashed11: "╾",
		lineDashed12: "−",
		lineDashed13: "–",
		lineDashed14: "‐",
		lineDashed15: "⁃",
		lineVertical: "│",
		lineVerticalBold: "┃",
		lineVerticalDouble: "║",
		lineVerticalDashed0: "┆",
		lineVerticalDashed1: "┇",
		lineVerticalDashed2: "┊",
		lineVerticalDashed3: "┋",
		lineVerticalDashed4: "╎",
		lineVerticalDashed5: "╏",
		lineVerticalDashed6: "╵",
		lineVerticalDashed7: "╷",
		lineVerticalDashed8: "╹",
		lineVerticalDashed9: "╻",
		lineVerticalDashed10: "╽",
		lineVerticalDashed11: "╿",
		lineDownLeft: "┐",
		lineDownLeftArc: "╮",
		lineDownBoldLeftBold: "┓",
		lineDownBoldLeft: "┒",
		lineDownLeftBold: "┑",
		lineDownDoubleLeftDouble: "╗",
		lineDownDoubleLeft: "╖",
		lineDownLeftDouble: "╕",
		lineDownRight: "┌",
		lineDownRightArc: "╭",
		lineDownBoldRightBold: "┏",
		lineDownBoldRight: "┎",
		lineDownRightBold: "┍",
		lineDownDoubleRightDouble: "╔",
		lineDownDoubleRight: "╓",
		lineDownRightDouble: "╒",
		lineUpLeft: "┘",
		lineUpLeftArc: "╯",
		lineUpBoldLeftBold: "┛",
		lineUpBoldLeft: "┚",
		lineUpLeftBold: "┙",
		lineUpDoubleLeftDouble: "╝",
		lineUpDoubleLeft: "╜",
		lineUpLeftDouble: "╛",
		lineUpRight: "└",
		lineUpRightArc: "╰",
		lineUpBoldRightBold: "┗",
		lineUpBoldRight: "┖",
		lineUpRightBold: "┕",
		lineUpDoubleRightDouble: "╚",
		lineUpDoubleRight: "╙",
		lineUpRightDouble: "╘",
		lineUpDownLeft: "┤",
		lineUpBoldDownBoldLeftBold: "┫",
		lineUpBoldDownBoldLeft: "┨",
		lineUpDownLeftBold: "┥",
		lineUpBoldDownLeftBold: "┩",
		lineUpDownBoldLeftBold: "┪",
		lineUpDownBoldLeft: "┧",
		lineUpBoldDownLeft: "┦",
		lineUpDoubleDownDoubleLeftDouble: "╣",
		lineUpDoubleDownDoubleLeft: "╢",
		lineUpDownLeftDouble: "╡",
		lineUpDownRight: "├",
		lineUpBoldDownBoldRightBold: "┣",
		lineUpBoldDownBoldRight: "┠",
		lineUpDownRightBold: "┝",
		lineUpBoldDownRightBold: "┡",
		lineUpDownBoldRightBold: "┢",
		lineUpDownBoldRight: "┟",
		lineUpBoldDownRight: "┞",
		lineUpDoubleDownDoubleRightDouble: "╠",
		lineUpDoubleDownDoubleRight: "╟",
		lineUpDownRightDouble: "╞",
		lineDownLeftRight: "┬",
		lineDownBoldLeftBoldRightBold: "┳",
		lineDownLeftBoldRightBold: "┯",
		lineDownBoldLeftRight: "┰",
		lineDownBoldLeftBoldRight: "┱",
		lineDownBoldLeftRightBold: "┲",
		lineDownLeftRightBold: "┮",
		lineDownLeftBoldRight: "┭",
		lineDownDoubleLeftDoubleRightDouble: "╦",
		lineDownDoubleLeftRight: "╥",
		lineDownLeftDoubleRightDouble: "╤",
		lineUpLeftRight: "┴",
		lineUpBoldLeftBoldRightBold: "┻",
		lineUpLeftBoldRightBold: "┷",
		lineUpBoldLeftRight: "┸",
		lineUpBoldLeftBoldRight: "┹",
		lineUpBoldLeftRightBold: "┺",
		lineUpLeftRightBold: "┶",
		lineUpLeftBoldRight: "┵",
		lineUpDoubleLeftDoubleRightDouble: "╩",
		lineUpDoubleLeftRight: "╨",
		lineUpLeftDoubleRightDouble: "╧",
		lineUpDownLeftRight: "┼",
		lineUpBoldDownBoldLeftBoldRightBold: "╋",
		lineUpDownBoldLeftBoldRightBold: "╈",
		lineUpBoldDownLeftBoldRightBold: "╇",
		lineUpBoldDownBoldLeftRightBold: "╊",
		lineUpBoldDownBoldLeftBoldRight: "╉",
		lineUpBoldDownLeftRight: "╀",
		lineUpDownBoldLeftRight: "╁",
		lineUpDownLeftBoldRight: "┽",
		lineUpDownLeftRightBold: "┾",
		lineUpBoldDownBoldLeftRight: "╂",
		lineUpDownLeftBoldRightBold: "┿",
		lineUpBoldDownLeftBoldRight: "╃",
		lineUpBoldDownLeftRightBold: "╄",
		lineUpDownBoldLeftBoldRight: "╅",
		lineUpDownBoldLeftRightBold: "╆",
		lineUpDoubleDownDoubleLeftDoubleRightDouble: "╬",
		lineUpDoubleDownDoubleLeftRight: "╫",
		lineUpDownLeftDoubleRightDouble: "╪",
		lineCross: "╳",
		lineBackslash: "╲",
		lineSlash: "╱"
	};
	specialMainSymbols = {
		tick: "✔",
		info: "ℹ",
		warning: "⚠",
		cross: "✘",
		squareSmall: "◻",
		squareSmallFilled: "◼",
		circle: "◯",
		circleFilled: "◉",
		circleDotted: "◌",
		circleDouble: "◎",
		circleCircle: "ⓞ",
		circleCross: "ⓧ",
		circlePipe: "Ⓘ",
		radioOn: "◉",
		radioOff: "◯",
		checkboxOn: "☒",
		checkboxOff: "☐",
		checkboxCircleOn: "ⓧ",
		checkboxCircleOff: "Ⓘ",
		pointer: "❯",
		triangleUpOutline: "△",
		triangleLeft: "◀",
		triangleRight: "▶",
		lozenge: "◆",
		lozengeOutline: "◇",
		hamburger: "☰",
		smiley: "㋡",
		mustache: "෴",
		star: "★",
		play: "▶",
		nodejs: "⬢",
		oneSeventh: "⅐",
		oneNinth: "⅑",
		oneTenth: "⅒"
	};
	specialFallbackSymbols = {
		tick: "√",
		info: "i",
		warning: "‼",
		cross: "×",
		squareSmall: "□",
		squareSmallFilled: "■",
		circle: "( )",
		circleFilled: "(*)",
		circleDotted: "( )",
		circleDouble: "( )",
		circleCircle: "(○)",
		circleCross: "(×)",
		circlePipe: "(│)",
		radioOn: "(*)",
		radioOff: "( )",
		checkboxOn: "[×]",
		checkboxOff: "[ ]",
		checkboxCircleOn: "(×)",
		checkboxCircleOff: "( )",
		pointer: ">",
		triangleUpOutline: "∆",
		triangleLeft: "◄",
		triangleRight: "►",
		lozenge: "♦",
		lozengeOutline: "◊",
		hamburger: "≡",
		smiley: "☺",
		mustache: "┌─┐",
		star: "✶",
		play: "►",
		nodejs: "♦",
		oneSeventh: "1/7",
		oneNinth: "1/9",
		oneTenth: "1/10"
	};
	mainSymbols = {
		...common,
		...specialMainSymbols
	};
	fallbackSymbols = {
		...common,
		...specialFallbackSymbols
	};
	shouldUseMain = isUnicodeSupported();
	figures = shouldUseMain ? mainSymbols : fallbackSymbols;
	replacements = _p_ObjectEntries(specialMainSymbols);
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/theme.js
var defaultTheme;
var init_theme = __esmMin((() => {
	init_dist$10();
	defaultTheme = {
		prefix: {
			idle: (0, node_util.styleText)("blue", "?"),
			done: (0, node_util.styleText)("green", figures.tick)
		},
		spinner: {
			interval: 80,
			frames: [
				"⠋",
				"⠙",
				"⠹",
				"⠸",
				"⠼",
				"⠴",
				"⠦",
				"⠧",
				"⠇",
				"⠏"
			].map((frame) => (0, node_util.styleText)("yellow", frame))
		},
		style: {
			answer: (text) => (0, node_util.styleText)("cyan", text),
			message: (text) => (0, node_util.styleText)("bold", text),
			error: (text) => (0, node_util.styleText)("red", `> ${text}`),
			defaultAnswer: (text) => (0, node_util.styleText)("dim", `(${text})`),
			help: (text) => (0, node_util.styleText)("dim", text),
			highlight: (text) => (0, node_util.styleText)("cyan", text),
			key: (text) => (0, node_util.styleText)("cyan", (0, node_util.styleText)("bold", `<${text}>`))
		}
	};
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/make-theme.js
function isPlainObject(value) {
	if (typeof value !== "object" || value === null) return false;
	let proto = value;
	while (_p_ObjectGetPrototypeOf(proto) !== null) proto = _p_ObjectGetPrototypeOf(proto);
	return _p_ObjectGetPrototypeOf(value) === proto;
}
function deepMerge(...objects) {
	const output = {};
	for (const obj of objects) for (const [key, value] of _p_ObjectEntries(obj)) {
		const prevValue = output[key];
		output[key] = isPlainObject(prevValue) && isPlainObject(value) ? deepMerge(prevValue, value) : value;
	}
	return output;
}
function makeTheme(...themes) {
	return deepMerge(...[defaultTheme, ...themes.filter((theme) => theme != null)]);
}
var init_make_theme = __esmMin((() => {
	init_theme();
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-prefix.js
function usePrefix({ status = "idle", theme }) {
	const [showLoader, setShowLoader] = useState(false);
	const [tick, setTick] = useState(0);
	const { prefix, spinner } = makeTheme(theme);
	useEffect(() => {
		if (status === "loading") {
			let tickInterval;
			let inc = -1;
			const delayTimeout = setTimeout(() => {
				setShowLoader(true);
				tickInterval = setInterval(() => {
					inc = inc + 1;
					setTick(inc % spinner.frames.length);
				}, spinner.interval);
			}, 300);
			return () => {
				clearTimeout(delayTimeout);
				clearInterval(tickInterval);
			};
		} else setShowLoader(false);
	}, [status]);
	if (showLoader) return spinner.frames[tick];
	return typeof prefix === "string" ? prefix : prefix[status === "loading" ? "idle" : status] ?? prefix["idle"];
}
var init_use_prefix = __esmMin((() => {
	init_use_state();
	init_use_effect();
	init_make_theme();
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-memo.js
function useMemo(fn, dependencies) {
	return withPointer((pointer) => {
		const prev = pointer.get();
		if (!prev || prev.dependencies.length !== dependencies.length || prev.dependencies.some((dep, i) => dep !== dependencies[i])) {
			const value = fn();
			pointer.set({
				value,
				dependencies
			});
			return value;
		}
		return prev.value;
	});
}
var init_use_memo = __esmMin((() => {
	init_hook_engine();
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-ref.js
function useRef(val) {
	return useState({ current: val })[0];
}
var init_use_ref = __esmMin((() => {
	init_use_state();
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/use-keypress.js
function useKeypress(userHandler) {
	const signal = useRef(userHandler);
	signal.current = userHandler;
	useEffect((rl) => {
		let ignore = false;
		const handler = withUpdates((_input, event) => {
			if (ignore) return;
			signal.current(event, rl);
		});
		rl.input.on("keypress", handler);
		return () => {
			ignore = true;
			rl.input.removeListener("keypress", handler);
		};
	}, []);
}
var init_use_keypress = __esmMin((() => {
	init_use_ref();
	init_use_effect();
	init_hook_engine();
}));

//#endregion
//#region node_modules/.pnpm/cli-width@4.1.0/node_modules/cli-width/index.js
var require_cli_width = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	module.exports = cliWidth;
	function normalizeOpts(options) {
		const defaultOpts = {
			defaultWidth: 0,
			output: process.stdout,
			tty: require("tty")
		};
		if (!options) return defaultOpts;
		_p_ObjectKeys(defaultOpts).forEach(function(key) {
			if (!options[key]) options[key] = defaultOpts[key];
		});
		return options;
	}
	function cliWidth(options) {
		const opts = normalizeOpts(options);
		if (opts.output.getWindowSize) return opts.output.getWindowSize()[0] || opts.defaultWidth;
		if (opts.tty.getWindowSize) return opts.tty.getWindowSize()[1] || opts.defaultWidth;
		if (opts.output.columns) return opts.output.columns;
		if (process.env.CLI_WIDTH) {
			const width = parseInt(process.env.CLI_WIDTH, 10);
			if (!isNaN(width) && width !== 0) return width;
		}
		return opts.defaultWidth;
	}
}));

//#endregion
//#region node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
var getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji;
var init_utils$1 = __esmMin((() => {
	getCodePointsLength = (() => {
		const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
		return (input) => {
			let surrogatePairsNr = 0;
			SURROGATE_PAIR_RE.lastIndex = 0;
			while (SURROGATE_PAIR_RE.test(input)) surrogatePairsNr += 1;
			return input.length - surrogatePairsNr;
		};
	})();
	isFullWidth = (x) => {
		return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
	};
	isWideNotCJKTNotEmoji = (x) => {
		return x === 8987 || x === 9001 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
	};
}));

//#endregion
//#region node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/index.js
var ANSI_RE, CONTROL_RE, CJKT_WIDE_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION$1, getStringTruncatedWidth;
var init_dist$9 = __esmMin((() => {
	init_utils$1();
	ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;
	CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
	CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy;
	TAB_RE = /\t{1,1000}/y;
	EMOJI_RE = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy;
	LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
	MODIFIER_RE = /\p{M}+/gu;
	NO_TRUNCATION$1 = {
		limit: Infinity,
		ellipsis: ""
	};
	getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {}) => {
		const LIMIT = truncationOptions.limit ?? Infinity;
		const ELLIPSIS = truncationOptions.ellipsis ?? "";
		const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION$1, widthOptions).width : 0);
		const ANSI_WIDTH = 0;
		const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
		const TAB_WIDTH = widthOptions.tabWidth ?? 8;
		const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
		const FULL_WIDTH_WIDTH = 2;
		const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
		const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;
		const PARSE_BLOCKS = [
			[LATIN_RE, REGULAR_WIDTH],
			[ANSI_RE, ANSI_WIDTH],
			[CONTROL_RE, CONTROL_WIDTH],
			[TAB_RE, TAB_WIDTH],
			[EMOJI_RE, EMOJI_WIDTH],
			[CJKT_WIDE_RE, WIDE_WIDTH]
		];
		let indexPrev = 0;
		let index = 0;
		let length = input.length;
		let lengthExtra = 0;
		let truncationEnabled = false;
		let truncationIndex = length;
		let truncationLimit = _p_MathMax(0, LIMIT - ELLIPSIS_WIDTH);
		let unmatchedStart = 0;
		let unmatchedEnd = 0;
		let width = 0;
		let widthExtra = 0;
		outer: while (true) {
			if (unmatchedEnd > unmatchedStart || index >= length && index > indexPrev) {
				const unmatched = input.slice(unmatchedStart, unmatchedEnd) || input.slice(indexPrev, index);
				lengthExtra = 0;
				for (const char of _p_StringPrototypeReplaceAll(unmatched, MODIFIER_RE, "")) {
					const codePoint = _p_StringPrototypeCodePointAt(char, 0) || 0;
					if (isFullWidth(codePoint)) widthExtra = FULL_WIDTH_WIDTH;
					else if (isWideNotCJKTNotEmoji(codePoint)) widthExtra = WIDE_WIDTH;
					else widthExtra = REGULAR_WIDTH;
					if (width + widthExtra > truncationLimit) truncationIndex = _p_MathMin(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);
					if (width + widthExtra > LIMIT) {
						truncationEnabled = true;
						break outer;
					}
					lengthExtra += char.length;
					width += widthExtra;
				}
				unmatchedStart = unmatchedEnd = 0;
			}
			if (index >= length) break outer;
			for (let i = 0, l = PARSE_BLOCKS.length; i < l; i++) {
				const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i];
				BLOCK_RE.lastIndex = index;
				if (BLOCK_RE.test(input)) {
					lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;
					widthExtra = lengthExtra * BLOCK_WIDTH;
					if (width + widthExtra > truncationLimit) truncationIndex = _p_MathMin(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));
					if (width + widthExtra > LIMIT) {
						truncationEnabled = true;
						break outer;
					}
					width += widthExtra;
					unmatchedStart = indexPrev;
					unmatchedEnd = index;
					index = indexPrev = BLOCK_RE.lastIndex;
					continue outer;
				}
			}
			index += 1;
		}
		return {
			width: truncationEnabled ? truncationLimit : width,
			index: truncationEnabled ? truncationIndex : length,
			truncated: truncationEnabled,
			ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH
		};
	};
}));

//#endregion
//#region node_modules/.pnpm/fast-string-width@3.0.2/node_modules/fast-string-width/dist/index.js
var NO_TRUNCATION, fastStringWidth;
var init_dist$8 = __esmMin((() => {
	init_dist$9();
	NO_TRUNCATION = {
		limit: Infinity,
		ellipsis: "",
		ellipsisWidth: 0
	};
	fastStringWidth = (input, options = {}) => {
		return getStringTruncatedWidth(input, NO_TRUNCATION, options).width;
	};
}));

//#endregion
//#region node_modules/.pnpm/fast-wrap-ansi@0.2.0/node_modules/fast-wrap-ansi/lib/main.js
function wrapAnsi(string, columns, options) {
	return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
}
var ESC$1, CSI, END_CODE, ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_SGR_TERMINATOR, ANSI_ESCAPE_LINK, GROUP_REGEX, getClosingCode, wrapAnsiCode, wrapAnsiHyperlink, wrapWord, stringVisibleTrimSpacesRight, exec, CRLF_OR_LF;
var init_main = __esmMin((() => {
	init_dist$8();
	ESC$1 = "\x1B";
	CSI = "";
	END_CODE = 39;
	ANSI_ESCAPE_BELL = "\x07";
	ANSI_CSI = "[";
	ANSI_OSC = "]";
	ANSI_SGR_TERMINATOR = "m";
	ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
	GROUP_REGEX = new _p_RegExpCtor(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`, "y");
	getClosingCode = (openingCode) => {
		if (openingCode >= 30 && openingCode <= 37) return 39;
		if (openingCode >= 90 && openingCode <= 97) return 39;
		if (openingCode >= 40 && openingCode <= 47) return 49;
		if (openingCode >= 100 && openingCode <= 107) return 49;
		if (openingCode === 1 || openingCode === 2) return 22;
		if (openingCode === 3) return 23;
		if (openingCode === 4) return 24;
		if (openingCode === 7) return 27;
		if (openingCode === 8) return 28;
		if (openingCode === 9) return 29;
		if (openingCode === 0) return 0;
	};
	wrapAnsiCode = (code) => `${ESC$1}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
	wrapAnsiHyperlink = (url) => `${ESC$1}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
	wrapWord = (rows, word, columns) => {
		const characters = word[Symbol.iterator]();
		let isInsideEscape = false;
		let isInsideLinkEscape = false;
		let lastRow = rows.at(-1);
		let visible = lastRow === void 0 ? 0 : fastStringWidth(lastRow);
		let currentCharacter = characters.next();
		let nextCharacter = characters.next();
		let rawCharacterIndex = 0;
		while (!currentCharacter.done) {
			const character = currentCharacter.value;
			const characterLength = fastStringWidth(character);
			if (visible + characterLength <= columns) rows[rows.length - 1] += character;
			else {
				rows.push(character);
				visible = 0;
			}
			if (character === ESC$1 || character === CSI) {
				isInsideEscape = true;
				isInsideLinkEscape = word.startsWith(ANSI_ESCAPE_LINK, rawCharacterIndex + 1);
			}
			if (isInsideEscape) {
				if (isInsideLinkEscape) {
					if (character === ANSI_ESCAPE_BELL) {
						isInsideEscape = false;
						isInsideLinkEscape = false;
					}
				} else if (character === ANSI_SGR_TERMINATOR) isInsideEscape = false;
			} else {
				visible += characterLength;
				if (visible === columns && !nextCharacter.done) {
					rows.push("");
					visible = 0;
				}
			}
			currentCharacter = nextCharacter;
			nextCharacter = characters.next();
			rawCharacterIndex += character.length;
		}
		lastRow = rows.at(-1);
		if (!visible && lastRow !== void 0 && lastRow.length && rows.length > 1) rows[rows.length - 2] += rows.pop();
	};
	stringVisibleTrimSpacesRight = (string) => {
		const words = string.split(" ");
		let last = words.length;
		while (last) {
			if (fastStringWidth(words[last - 1])) break;
			last--;
		}
		if (last === words.length) return string;
		return words.slice(0, last).join(" ") + words.slice(last).join("");
	};
	exec = (string, columns, options = {}) => {
		if (options.trim !== false && string.trim() === "") return "";
		let returnValue = "";
		let escapeCode;
		let escapeUrl;
		const words = string.split(" ");
		let rows = [""];
		let rowLength = 0;
		for (let index = 0; index < words.length; index++) {
			const word = words[index];
			if (options.trim !== false) {
				const row = rows.at(-1) ?? "";
				const trimmed = row.trimStart();
				if (row.length !== trimmed.length) {
					rows[rows.length - 1] = trimmed;
					rowLength = fastStringWidth(trimmed);
				}
			}
			if (index !== 0) {
				if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
					rows.push("");
					rowLength = 0;
				}
				if (rowLength || options.trim === false) {
					rows[rows.length - 1] += " ";
					rowLength++;
				}
			}
			const wordLength = fastStringWidth(word);
			if (options.hard && wordLength > columns) {
				const remainingColumns = columns - rowLength;
				const breaksStartingThisLine = 1 + _p_MathFloor((wordLength - remainingColumns - 1) / columns);
				if (_p_MathFloor((wordLength - 1) / columns) < breaksStartingThisLine) rows.push("");
				wrapWord(rows, word, columns);
				rowLength = fastStringWidth(rows.at(-1) ?? "");
				continue;
			}
			if (rowLength + wordLength > columns && rowLength && wordLength) {
				if (options.wordWrap === false && rowLength < columns) {
					wrapWord(rows, word, columns);
					rowLength = fastStringWidth(rows.at(-1) ?? "");
					continue;
				}
				rows.push("");
				rowLength = 0;
			}
			if (rowLength + wordLength > columns && options.wordWrap === false) {
				wrapWord(rows, word, columns);
				rowLength = fastStringWidth(rows.at(-1) ?? "");
				continue;
			}
			rows[rows.length - 1] += word;
			rowLength += wordLength;
		}
		if (options.trim !== false) rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
		const preString = rows.join("\n");
		let inSurrogate = false;
		for (let i = 0; i < preString.length; i++) {
			const character = preString[i];
			returnValue += character;
			if (!inSurrogate) {
				inSurrogate = character >= "\ud800" && character <= "\udbff";
				if (inSurrogate) continue;
			} else inSurrogate = false;
			if (character === ESC$1 || character === CSI) {
				GROUP_REGEX.lastIndex = i + 1;
				const groups = GROUP_REGEX.exec(preString)?.groups;
				if (groups?.code !== void 0) {
					const code = _p_NumberParseFloat(groups.code);
					escapeCode = code === END_CODE ? void 0 : code;
				} else if (groups?.uri !== void 0) escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
			}
			if (preString[i + 1] === "\n") {
				if (escapeUrl) returnValue += wrapAnsiHyperlink("");
				const closingCode = escapeCode ? getClosingCode(escapeCode) : void 0;
				if (escapeCode && closingCode) returnValue += wrapAnsiCode(closingCode);
			} else if (character === "\n") {
				if (escapeCode && getClosingCode(escapeCode)) returnValue += wrapAnsiCode(escapeCode);
				if (escapeUrl) returnValue += wrapAnsiHyperlink(escapeUrl);
			}
		}
		return returnValue;
	};
	CRLF_OR_LF = /\r?\n/;
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/utils.js
/**
* Force line returns at specific width. This function is ANSI code friendly and it'll
* ignore invisible codes during width calculation.
* @param {string} content
* @param {number} width
* @return {string}
*/
function breakLines(content, width) {
	return content.split("\n").flatMap((line) => wrapAnsi(line, width, {
		trim: false,
		hard: true
	}).split("\n").map((str) => str.trimEnd())).join("\n");
}
/**
* Returns the width of the active readline, or 80 as default value.
* @returns {number}
*/
function readlineWidth() {
	return (0, import_cli_width.default)({
		defaultWidth: 80,
		output: readline().output
	});
}
var import_cli_width;
var init_utils = __esmMin((() => {
	import_cli_width = /* @__PURE__ */ __toESM(require_cli_width(), 1);
	init_main();
	init_hook_engine();
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
	const state = useRef({
		lastPointer: active,
		lastActive: void 0
	});
	const { lastPointer, lastActive } = state.current;
	const middle = _p_MathFloor(pageSize / 2);
	const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
	const defaultPointerPosition = renderedItems.slice(0, active).reduce((acc, item) => acc + item.length, 0);
	let pointer = defaultPointerPosition;
	if (renderedLength > pageSize) if (loop) {
		/**
		* Creates the next position for the pointer considering an infinitely
		* looping list of items to be rendered on the page.
		*
		* The goal is to progressively move the cursor to the middle position as the user move down, and then keep
		* the cursor there. When the user move up, maintain the cursor position.
		*/
		pointer = lastPointer;
		if (lastActive != null && lastActive < active && active - lastActive < pageSize) pointer = _p_MathMin(middle, Math.abs(active - lastActive) === 1 ? Math.min(lastPointer + (renderedItems[lastActive]?.length ?? 0), Math.max(defaultPointerPosition, lastPointer)) : lastPointer + active - lastActive);
	} else {
		/**
		* Creates the next position for the pointer considering a finite list of
		* items to be rendered on a page.
		*
		* The goal is to keep the pointer in the middle of the page whenever possible, until
		* we reach the bounds of the list (top or bottom). In which case, the cursor moves progressively
		* to the bottom or top of the list.
		*/
		const spaceUnderActive = renderedItems.slice(active).reduce((acc, item) => acc + item.length, 0);
		pointer = spaceUnderActive < pageSize - middle ? pageSize - spaceUnderActive : _p_MathMin(defaultPointerPosition, middle);
	}
	state.current.lastPointer = pointer;
	state.current.lastActive = active;
	return pointer;
}
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
	const width = readlineWidth();
	const bound = (num) => (num % items.length + items.length) % items.length;
	const renderedItems = items.map((item, index) => {
		if (item == null) return [];
		return breakLines(renderItem({
			item,
			index,
			isActive: index === active
		}), width).split("\n");
	});
	const renderedLength = renderedItems.reduce((acc, item) => acc + item.length, 0);
	const renderItemAtIndex = (index) => renderedItems[index] ?? [];
	const pointer = usePointerPosition({
		active,
		renderedItems,
		pageSize,
		loop
	});
	const activeItem = renderItemAtIndex(active).slice(0, pageSize);
	const activeItemPosition = pointer + activeItem.length <= pageSize ? pointer : pageSize - activeItem.length;
	const pageBuffer = _p_ArrayFrom({ length: pageSize });
	pageBuffer.splice(activeItemPosition, activeItem.length, ...activeItem);
	const itemVisited = new _p_SetCtor([active]);
	let bufferPointer = activeItemPosition + activeItem.length;
	let itemPointer = bound(active + 1);
	while (bufferPointer < pageSize && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer > active)) {
		const linesToAdd = renderItemAtIndex(itemPointer).slice(0, pageSize - bufferPointer);
		pageBuffer.splice(bufferPointer, linesToAdd.length, ...linesToAdd);
		itemVisited.add(itemPointer);
		bufferPointer += linesToAdd.length;
		itemPointer = bound(itemPointer + 1);
	}
	bufferPointer = activeItemPosition - 1;
	itemPointer = bound(active - 1);
	while (bufferPointer >= 0 && !itemVisited.has(itemPointer) && (loop && renderedLength > pageSize ? itemPointer !== active : itemPointer < active)) {
		const lines = renderItemAtIndex(itemPointer);
		const linesToAdd = lines.slice(_p_MathMax(0, lines.length - bufferPointer - 1));
		pageBuffer.splice(bufferPointer - linesToAdd.length + 1, linesToAdd.length, ...linesToAdd);
		itemVisited.add(itemPointer);
		bufferPointer -= linesToAdd.length;
		itemPointer = bound(itemPointer - 1);
	}
	return pageBuffer.filter((line) => typeof line === "string").join("\n");
}
var init_use_pagination = __esmMin((() => {
	init_use_ref();
	init_utils();
}));

//#endregion
//#region node_modules/.pnpm/mute-stream@3.0.0/node_modules/mute-stream/lib/index.js
var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
	const Stream = require("stream");
	var MuteStream = class extends Stream {
		#isTTY = null;
		constructor(opts = {}) {
			super(opts);
			this.writable = this.readable = true;
			this.muted = false;
			this.on("pipe", this._onpipe);
			this.replace = opts.replace;
			this._prompt = opts.prompt || null;
			this._hadControl = false;
		}
		#destSrc(key, def) {
			if (this._dest) return this._dest[key];
			if (this._src) return this._src[key];
			return def;
		}
		#proxy(method, ...args) {
			if (typeof this._dest?.[method] === "function") this._dest[method](...args);
			if (typeof this._src?.[method] === "function") this._src[method](...args);
		}
		get isTTY() {
			if (this.#isTTY !== null) return this.#isTTY;
			return this.#destSrc("isTTY", false);
		}
		set isTTY(val) {
			this.#isTTY = val;
		}
		get rows() {
			return this.#destSrc("rows");
		}
		get columns() {
			return this.#destSrc("columns");
		}
		mute() {
			this.muted = true;
		}
		unmute() {
			this.muted = false;
		}
		_onpipe(src) {
			this._src = src;
		}
		pipe(dest, options) {
			this._dest = dest;
			return super.pipe(dest, options);
		}
		pause() {
			if (this._src) return this._src.pause();
		}
		resume() {
			if (this._src) return this._src.resume();
		}
		write(c) {
			if (this.muted) {
				if (!this.replace) return true;
				if (c.match(/^\u001b/)) {
					if (c.indexOf(this._prompt) === 0) {
						c = c.slice(this._prompt.length);
						c = c.replace(/./g, this.replace);
						c = this._prompt + c;
					}
					this._hadControl = true;
					return this.emit("data", c);
				} else {
					if (this._prompt && this._hadControl && c.indexOf(this._prompt) === 0) {
						this._hadControl = false;
						this.emit("data", this._prompt);
						c = c.slice(this._prompt.length);
					}
					c = c.toString().replace(/./g, this.replace);
				}
			}
			this.emit("data", c);
		}
		end(c) {
			if (this.muted) if (c && this.replace) c = c.toString().replace(/./g, this.replace);
			else c = null;
			if (c) this.emit("data", c);
			this.emit("end");
		}
		destroy(...args) {
			return this.#proxy("destroy", ...args);
		}
		destroySoon(...args) {
			return this.#proxy("destroySoon", ...args);
		}
		close(...args) {
			return this.#proxy("close", ...args);
		}
	};
	module.exports = MuteStream;
}));

//#endregion
//#region node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
var signals;
var init_signals = __esmMin((() => {
	signals = [];
	signals.push("SIGHUP", "SIGINT", "SIGTERM");
	if (process.platform !== "win32") signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
	if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
}));

//#endregion
//#region node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
var processOk, kExitEmitter, global, ObjectDefineProperty, Emitter, SignalExitBase, signalExitWrap, SignalExitFallback, SignalExit, process$2, onExit, load, unload;
var init_mjs = __esmMin((() => {
	init_signals();
	processOk = (process) => !!process && typeof process === "object" && typeof process.removeListener === "function" && typeof process.emit === "function" && typeof process.reallyExit === "function" && typeof process.listeners === "function" && typeof process.kill === "function" && typeof process.pid === "number" && typeof process.on === "function";
	kExitEmitter = Symbol.for("signal-exit emitter");
	global = globalThis;
	ObjectDefineProperty = Object.defineProperty.bind(Object);
	Emitter = class {
		emitted = {
			afterExit: false,
			exit: false
		};
		listeners = {
			afterExit: [],
			exit: []
		};
		count = 0;
		id = _p_MathRandom();
		constructor() {
			if (global[kExitEmitter]) return global[kExitEmitter];
			ObjectDefineProperty(global, kExitEmitter, {
				value: this,
				writable: false,
				enumerable: false,
				configurable: false
			});
		}
		on(ev, fn) {
			this.listeners[ev].push(fn);
		}
		removeListener(ev, fn) {
			const list = this.listeners[ev];
			const i = list.indexOf(fn);
			/* c8 ignore start */
			if (i === -1) return;
			/* c8 ignore stop */
			if (i === 0 && list.length === 1) list.length = 0;
			else list.splice(i, 1);
		}
		emit(ev, code, signal) {
			if (this.emitted[ev]) return false;
			this.emitted[ev] = true;
			let ret = false;
			for (const fn of this.listeners[ev]) ret = fn(code, signal) === true || ret;
			if (ev === "exit") ret = this.emit("afterExit", code, signal) || ret;
			return ret;
		}
	};
	SignalExitBase = class {};
	signalExitWrap = (handler) => {
		return {
			onExit(cb, opts) {
				return handler.onExit(cb, opts);
			},
			load() {
				return handler.load();
			},
			unload() {
				return handler.unload();
			}
		};
	};
	SignalExitFallback = class extends SignalExitBase {
		onExit() {
			return () => {};
		}
		load() {}
		unload() {}
	};
	SignalExit = class extends SignalExitBase {
		/* c8 ignore start */
		#hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
		/* c8 ignore stop */
		#emitter = new Emitter();
		#process;
		#originalProcessEmit;
		#originalProcessReallyExit;
		#sigListeners = {};
		#loaded = false;
		constructor(process) {
			super();
			this.#process = process;
			this.#sigListeners = {};
			for (const sig of signals) this.#sigListeners[sig] = () => {
				const listeners = this.#process.listeners(sig);
				let { count } = this.#emitter;
				/* c8 ignore start */
				const p = process;
				if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") count += p.__signal_exit_emitter__.count;
				/* c8 ignore stop */
				if (listeners.length === count) {
					this.unload();
					const ret = this.#emitter.emit("exit", null, sig);
					/* c8 ignore start */
					const s = sig === "SIGHUP" ? this.#hupSig : sig;
					if (!ret) process.kill(process.pid, s);
				}
			};
			this.#originalProcessReallyExit = process.reallyExit;
			this.#originalProcessEmit = process.emit;
		}
		onExit(cb, opts) {
			/* c8 ignore start */
			if (!processOk(this.#process)) return () => {};
			/* c8 ignore stop */
			if (this.#loaded === false) this.load();
			const ev = opts?.alwaysLast ? "afterExit" : "exit";
			this.#emitter.on(ev, cb);
			return () => {
				this.#emitter.removeListener(ev, cb);
				if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) this.unload();
			};
		}
		load() {
			if (this.#loaded) return;
			this.#loaded = true;
			this.#emitter.count += 1;
			for (const sig of signals) try {
				const fn = this.#sigListeners[sig];
				if (fn) this.#process.on(sig, fn);
			} catch (_) {}
			this.#process.emit = (ev, ...a) => {
				return this.#processEmit(ev, ...a);
			};
			this.#process.reallyExit = (code) => {
				return this.#processReallyExit(code);
			};
		}
		unload() {
			if (!this.#loaded) return;
			this.#loaded = false;
			signals.forEach((sig) => {
				const listener = this.#sigListeners[sig];
				/* c8 ignore start */
				if (!listener) throw new _p_ErrorCtor("Listener not defined for signal: " + sig);
				/* c8 ignore stop */
				try {
					this.#process.removeListener(sig, listener);
				} catch (_) {}
				/* c8 ignore stop */
			});
			this.#process.emit = this.#originalProcessEmit;
			this.#process.reallyExit = this.#originalProcessReallyExit;
			this.#emitter.count -= 1;
		}
		#processReallyExit(code) {
			/* c8 ignore start */
			if (!processOk(this.#process)) return 0;
			this.#process.exitCode = code || 0;
			/* c8 ignore stop */
			this.#emitter.emit("exit", this.#process.exitCode, null);
			return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
		}
		#processEmit(ev, ...args) {
			const og = this.#originalProcessEmit;
			if (ev === "exit" && processOk(this.#process)) {
				if (typeof args[0] === "number") this.#process.exitCode = args[0];
				/* c8 ignore start */
				const ret = og.call(this.#process, ev, ...args);
				/* c8 ignore start */
				this.#emitter.emit("exit", this.#process.exitCode, null);
				/* c8 ignore stop */
				return ret;
			} else return og.call(this.#process, ev, ...args);
		}
	};
	process$2 = globalThis.process;
	({onExit, load, unload} = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback()));
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+ansi@2.0.5/node_modules/@inquirer/ansi/dist/index.js
var ESC, cursorHide, cursorShow, cursorUp, cursorDown, cursorTo, eraseLine, eraseLines;
var init_dist$7 = __esmMin((() => {
	ESC = "\x1B[";
	cursorHide = "\x1B[?25l";
	cursorShow = "\x1B[?25h";
	cursorUp = (rows = 1) => rows > 0 ? `${ESC}${rows}A` : "";
	cursorDown = (rows = 1) => rows > 0 ? `${ESC}${rows}B` : "";
	cursorTo = (x, y) => {
		if (typeof y === "number" && !_p_NumberIsNaN(y)) return `${ESC}${y + 1};${x + 1}H`;
		return `${ESC}${x + 1}G`;
	};
	eraseLine = "\x1B[2K";
	eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + "\x1B[2K\x1B[G" : "";
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/screen-manager.js
var height, lastLine, ScreenManager;
var init_screen_manager = __esmMin((() => {
	init_utils();
	init_dist$7();
	height = (content) => content.split("\n").length;
	lastLine = (content) => content.split("\n").pop() ?? "";
	ScreenManager = class {
		height = 0;
		extraLinesUnderPrompt = 0;
		cursorPos;
		rl;
		constructor(rl) {
			this.rl = rl;
			this.cursorPos = rl.getCursorPos();
		}
		write(content) {
			this.rl.output.unmute();
			this.rl.output.write(content);
			this.rl.output.mute();
		}
		render(content, bottomContent = "") {
			const rawPromptLine = (0, node_util.stripVTControlCharacters)(lastLine(content));
			let prompt = rawPromptLine;
			if (this.rl.line.length > 0) prompt = prompt.slice(0, -this.rl.line.length);
			this.rl.setPrompt(prompt);
			this.cursorPos = this.rl.getCursorPos();
			const width = readlineWidth();
			content = breakLines(content, width);
			bottomContent = breakLines(bottomContent, width);
			if (rawPromptLine.length % width === 0) content += "\n";
			let output = content + (bottomContent ? "\n" + bottomContent : "");
			const bottomContentHeight = _p_MathFloor(rawPromptLine.length / width) - this.cursorPos.rows + (bottomContent ? height(bottomContent) : 0);
			if (bottomContentHeight > 0) output += cursorUp(bottomContentHeight);
			output += cursorTo(this.cursorPos.cols);
			/**
			* Render and store state for future re-rendering
			*/
			this.write(cursorDown(this.extraLinesUnderPrompt) + eraseLines(this.height) + output);
			this.extraLinesUnderPrompt = bottomContentHeight;
			this.height = height(output);
		}
		checkCursorPos() {
			const cursorPos = this.rl.getCursorPos();
			if (cursorPos.cols !== this.cursorPos.cols) {
				this.write(cursorTo(cursorPos.cols));
				this.cursorPos = cursorPos;
			}
		}
		done({ clearContent }) {
			this.rl.setPrompt("");
			let output = cursorDown(this.extraLinesUnderPrompt);
			output += clearContent ? eraseLines(this.height) : "\n";
			output += cursorShow;
			this.write(output);
			this.rl.close();
		}
	};
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
var PromisePolyfill;
var init_promise_polyfill = __esmMin((() => {
	PromisePolyfill = class extends Promise {
		static withResolver() {
			let resolve;
			let reject;
			return {
				promise: new _p_PromiseCtor((res, rej) => {
					resolve = res;
					reject = rej;
				}),
				resolve,
				reject
			};
		}
	};
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/create-prompt.js
function getCallSites() {
	const _prepareStackTrace = Error.prepareStackTrace;
	let result = [];
	try {
		Error.prepareStackTrace = (_, callSites) => {
			const callSitesWithoutCurrent = callSites.slice(1);
			result = callSitesWithoutCurrent;
			return callSitesWithoutCurrent;
		};
		(/* @__PURE__ */ new _p_ErrorCtor()).stack;
	} catch {
		return result;
	}
	Error.prepareStackTrace = _prepareStackTrace;
	return result;
}
function createPrompt(view) {
	const callSites = getCallSites();
	const prompt = (config, context = {}) => {
		const { input = process.stdin, signal } = context;
		const cleanups = /* @__PURE__ */ new _p_SetCtor();
		const output = new import_lib.default();
		output.pipe(context.output ?? process.stdout);
		output.mute();
		const rl = node_readline.createInterface({
			terminal: true,
			input,
			output
		});
		const screen = new ScreenManager(rl);
		const { promise, resolve, reject } = PromisePolyfill.withResolver();
		const cancel = () => reject(new CancelPromptError());
		if (signal) {
			const abort = () => reject(new AbortPromptError({ cause: signal.reason }));
			if (signal.aborted) {
				abort();
				return _p_ObjectAssign(promise, { cancel });
			}
			signal.addEventListener("abort", abort);
			cleanups.add(() => signal.removeEventListener("abort", abort));
		}
		cleanups.add(onExit((code, signal) => {
			reject(new ExitPromptError(`User force closed the prompt with ${code} ${signal}`));
		}));
		const sigint = () => reject(new ExitPromptError(`User force closed the prompt with SIGINT`));
		rl.on("SIGINT", sigint);
		cleanups.add(() => rl.removeListener("SIGINT", sigint));
		return withHooks(rl, (cycle) => {
			const hooksCleanup = node_async_hooks.AsyncResource.bind(() => effectScheduler.clearAll());
			rl.on("close", hooksCleanup);
			cleanups.add(() => rl.removeListener("close", hooksCleanup));
			const startCycle = () => {
				const checkCursorPos = () => screen.checkCursorPos();
				rl.input.on("keypress", checkCursorPos);
				cleanups.add(() => rl.input.removeListener("keypress", checkCursorPos));
				let pendingDone = null;
				cycle(() => {
					let effectsSettled = false;
					try {
						const nextView = view(config, (value) => {
							if (effectsSettled) resolve(value);
							else pendingDone = { value };
						});
						if (nextView === void 0) {
							let callerFilename = callSites[1]?.getFileName();
							if (callerFilename && !callerFilename.startsWith("file://")) callerFilename = node_path.default.resolve(callerFilename);
							throw new Error(`Prompt functions must return a string.\n    at ${callerFilename}`);
						}
						const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
						screen.render(content, bottomContent);
						effectScheduler.run();
					} catch (error) {
						reject(error);
					}
					effectsSettled = true;
					if (pendingDone !== null) {
						const { value } = pendingDone;
						pendingDone = null;
						resolve(value);
					}
				});
			};
			if ("readableFlowing" in input) nativeSetImmediate(startCycle);
			else startCycle();
			return Object.assign(promise.then((answer) => {
				effectScheduler.clearAll();
				return answer;
			}, (error) => {
				effectScheduler.clearAll();
				throw error;
			}).finally(() => {
				cleanups.forEach((cleanup) => cleanup());
				screen.done({ clearContent: Boolean(context.clearPromptOnDone) });
				output.end();
			}).then(() => promise), { cancel });
		});
	};
	return prompt;
}
var import_lib, nativeSetImmediate;
var init_create_prompt = __esmMin((() => {
	import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
	init_mjs();
	init_screen_manager();
	init_promise_polyfill();
	init_hook_engine();
	init_errors();
	nativeSetImmediate = globalThis.setImmediate;
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/lib/Separator.js
var Separator;
var init_Separator = __esmMin((() => {
	init_dist$10();
	Separator = class {
		separator = (0, node_util.styleText)("dim", Array.from({ length: 15 }).join(figures.line));
		type = "separator";
		constructor(separator) {
			if (separator) this.separator = separator;
		}
		static isSeparator(choice) {
			return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
		}
	};
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@24.9.2/node_modules/@inquirer/core/dist/index.js
var init_dist$6 = __esmMin((() => {
	init_key();
	init_errors();
	init_use_prefix();
	init_use_state();
	init_use_effect();
	init_use_memo();
	init_use_ref();
	init_use_keypress();
	init_make_theme();
	init_use_pagination();
	init_create_prompt();
	init_Separator();
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+checkbox@5.1.3_@types+node@24.9.2/node_modules/@inquirer/checkbox/dist/index.js
var dist_exports$5 = /* @__PURE__ */ __exportAll({
	Separator: () => Separator,
	default: () => dist_default$5
});
function isSelectable$2(item) {
	return !Separator.isSeparator(item) && !item.disabled;
}
function isNavigable$1(item) {
	return !Separator.isSeparator(item);
}
function isChecked(item) {
	return !Separator.isSeparator(item) && item.checked;
}
function toggle(item) {
	return isSelectable$2(item) ? {
		...item,
		checked: !item.checked
	} : item;
}
function check(checked) {
	return function(item) {
		return isSelectable$2(item) ? {
			...item,
			checked
		} : item;
	};
}
function normalizeChoices$2(choices) {
	return choices.map((choice) => {
		if (Separator.isSeparator(choice)) return choice;
		if (typeof choice !== "object" || choice === null || !("value" in choice)) {
			const name = String(choice);
			return {
				value: choice,
				name,
				short: name,
				checkedName: name,
				disabled: false,
				checked: false
			};
		}
		const name = choice.name ?? String(choice.value);
		const normalizedChoice = {
			value: choice.value,
			name,
			short: choice.short ?? name,
			checkedName: choice.checkedName ?? name,
			disabled: choice.disabled ?? false,
			checked: choice.checked ?? false
		};
		if (choice.description) normalizedChoice.description = choice.description;
		return normalizedChoice;
	});
}
var checkboxTheme, dist_default$5;
var init_dist$5 = __esmMin((() => {
	init_dist$6();
	init_dist$7();
	init_dist$10();
	checkboxTheme = {
		icon: {
			checked: (0, node_util.styleText)("green", figures.circleFilled),
			unchecked: figures.circle,
			cursor: figures.pointer,
			disabledChecked: (0, node_util.styleText)("green", figures.circleDouble),
			disabledUnchecked: "-"
		},
		style: {
			disabled: (text) => (0, node_util.styleText)("dim", text),
			renderSelectedChoices: (selectedChoices) => selectedChoices.map((choice) => choice.short).join(", "),
			description: (text) => (0, node_util.styleText)("cyan", text),
			keysHelpTip: (keys) => keys.map(([key, action]) => `${(0, node_util.styleText)("bold", key)} ${(0, node_util.styleText)("dim", action)}`).join((0, node_util.styleText)("dim", " • "))
		},
		i18n: { disabledError: "This option is disabled and cannot be toggled." },
		keybindings: []
	};
	__name(isSelectable$2, "isSelectable");
	__name(isNavigable$1, "isNavigable");
	__name(normalizeChoices$2, "normalizeChoices");
	dist_default$5 = createPrompt((config, done) => {
		const { pageSize = 7, loop = true, required, validate = () => true } = config;
		const shortcuts = {
			all: "a",
			invert: "i",
			...config.shortcuts
		};
		const theme = makeTheme(checkboxTheme, config.theme);
		const { keybindings } = theme;
		const [status, setStatus] = useState("idle");
		const prefix = usePrefix({
			status,
			theme
		});
		const [items, setItems] = useState(normalizeChoices$2(config.choices));
		const bounds = useMemo(() => {
			const first = items.findIndex(isNavigable$1);
			const last = items.findLastIndex(isNavigable$1);
			if (first === -1) throw new ValidationError("[checkbox prompt] No selectable choices. All choices are disabled.");
			return {
				first,
				last
			};
		}, [items]);
		const [active, setActive] = useState(bounds.first);
		const [errorMsg, setError] = useState();
		useKeypress(async (key) => {
			if (isEnterKey(key)) {
				const selection = items.filter(isChecked);
				const isValid = await validate([...selection]);
				if (required && !selection.length) setError("At least one choice must be selected");
				else if (isValid === true) {
					setStatus("done");
					done(selection.map((choice) => choice.value));
				} else setError(isValid || "You must select a valid value");
			} else if (isUpKey(key, keybindings) || isDownKey(key, keybindings)) {
				if (errorMsg) setError(void 0);
				if (loop || isUpKey(key, keybindings) && active !== bounds.first || isDownKey(key, keybindings) && active !== bounds.last) {
					const offset = isUpKey(key, keybindings) ? -1 : 1;
					let next = active;
					do
						next = (next + offset + items.length) % items.length;
					while (!isNavigable$1(items[next]));
					setActive(next);
				}
			} else if (isSpaceKey(key)) {
				const activeItem = items[active];
				if (activeItem && !Separator.isSeparator(activeItem)) if (activeItem.disabled) setError(theme.i18n.disabledError);
				else {
					setError(void 0);
					setItems(items.map((choice, i) => i === active ? toggle(choice) : choice));
				}
			} else if (key.name === shortcuts.all) {
				const selectAll = items.some((choice) => isSelectable$2(choice) && !choice.checked);
				setItems(items.map(check(selectAll)));
			} else if (key.name === shortcuts.invert) setItems(items.map(toggle));
			else if (isNumberKey(key)) {
				const selectedIndex = Number(key.name) - 1;
				let selectableIndex = -1;
				const position = items.findIndex((item) => {
					if (Separator.isSeparator(item)) return false;
					selectableIndex++;
					return selectableIndex === selectedIndex;
				});
				const selectedItem = items[position];
				if (selectedItem && isSelectable$2(selectedItem)) {
					setActive(position);
					setItems(items.map((choice, i) => i === position ? toggle(choice) : choice));
				}
			}
		});
		const message = theme.style.message(config.message, status);
		let description;
		const page = usePagination({
			items,
			active,
			renderItem({ item, isActive }) {
				if (Separator.isSeparator(item)) return ` ${item.separator}`;
				const cursor = isActive ? theme.icon.cursor : " ";
				if (item.disabled) {
					const disabledLabel = typeof item.disabled === "string" ? item.disabled : "(disabled)";
					const checkbox = item.checked ? theme.icon.disabledChecked : theme.icon.disabledUnchecked;
					return theme.style.disabled(`${cursor}${checkbox} ${item.name} ${disabledLabel}`);
				}
				if (isActive) description = item.description;
				const checkbox = item.checked ? theme.icon.checked : theme.icon.unchecked;
				const name = item.checked ? item.checkedName : item.name;
				return (isActive ? theme.style.highlight : (x) => x)(`${cursor}${checkbox} ${name}`);
			},
			pageSize,
			loop
		});
		if (status === "done") {
			const selection = items.filter(isChecked);
			return [
				prefix,
				message,
				theme.style.answer(theme.style.renderSelectedChoices(selection, items))
			].filter(Boolean).join(" ");
		}
		const keys = [["↑↓", "navigate"], ["space", "select"]];
		if (shortcuts.all) keys.push([shortcuts.all, "all"]);
		if (shortcuts.invert) keys.push([shortcuts.invert, "invert"]);
		keys.push(["⏎", "submit"]);
		const helpLine = theme.style.keysHelpTip(keys);
		return `${[
			[prefix, message].filter(Boolean).join(" "),
			page,
			" ",
			description ? theme.style.description(description) : "",
			errorMsg ? theme.style.error(errorMsg) : "",
			helpLine
		].filter(Boolean).join("\n").trimEnd()}${cursorHide}`;
	});
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+confirm@6.0.11_@types+node@24.9.2/node_modules/@inquirer/confirm/dist/index.js
var dist_exports$4 = /* @__PURE__ */ __exportAll({ default: () => dist_default$4 });
function getBooleanValue(value, defaultValue) {
	let answer = defaultValue !== false;
	if (/^(y|yes)/i.test(value)) answer = true;
	else if (/^(n|no)/i.test(value)) answer = false;
	return answer;
}
function boolToString(value) {
	return value ? "Yes" : "No";
}
var dist_default$4;
var init_dist$4 = __esmMin((() => {
	init_dist$6();
	dist_default$4 = createPrompt((config, done) => {
		const { transformer = boolToString } = config;
		const [status, setStatus] = useState("idle");
		const [value, setValue] = useState("");
		const theme = makeTheme(config.theme);
		const prefix = usePrefix({
			status,
			theme
		});
		useKeypress((key, rl) => {
			if (status !== "idle") return;
			if (isEnterKey(key)) {
				const answer = getBooleanValue(value, config.default);
				setValue(transformer(answer));
				setStatus("done");
				done(answer);
			} else if (isTabKey(key)) {
				const answer = boolToString(!getBooleanValue(value, config.default));
				rl.clearLine(0);
				rl.write(answer);
				setValue(answer);
			} else setValue(rl.line);
		});
		let formattedValue = value;
		let defaultValue = "";
		if (status === "done") formattedValue = theme.style.answer(value);
		else defaultValue = ` ${theme.style.defaultAnswer(config.default === false ? "y/N" : "Y/n")}`;
		return `${prefix} ${theme.style.message(config.message, status)}${defaultValue} ${formattedValue}`;
	});
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+input@5.0.11_@types+node@24.9.2/node_modules/@inquirer/input/dist/index.js
var dist_exports$3 = /* @__PURE__ */ __exportAll({ default: () => dist_default$3 });
var inputTheme, dist_default$3;
var init_dist$3 = __esmMin((() => {
	init_dist$6();
	inputTheme = { validationFailureMode: "keep" };
	dist_default$3 = createPrompt((config, done) => {
		const { prefill = "tab" } = config;
		const theme = makeTheme(inputTheme, config.theme);
		const [status, setStatus] = useState("idle");
		const [defaultValue, setDefaultValue] = useState(String(config.default ?? ""));
		const [errorMsg, setError] = useState();
		const [value, setValue] = useState("");
		const prefix = usePrefix({
			status,
			theme
		});
		async function validate(value) {
			const { required, pattern, patternError = "Invalid input" } = config;
			if (required && !value) return "You must provide a value";
			if (pattern && !pattern.test(value)) return patternError;
			if (typeof config.validate === "function") return await config.validate(value) || "You must provide a valid value";
			return true;
		}
		useKeypress(async (key, rl) => {
			if (status !== "idle") return;
			if (isEnterKey(key)) {
				const answer = value || defaultValue;
				setStatus("loading");
				const isValid = await validate(answer);
				if (isValid === true) {
					setValue(answer);
					setStatus("done");
					done(answer);
				} else {
					if (theme.validationFailureMode === "clear") setValue("");
					else rl.write(value);
					setError(isValid);
					setStatus("idle");
				}
			} else if (isBackspaceKey(key) && !value) setDefaultValue("");
			else if (isTabKey(key) && !value) {
				setDefaultValue("");
				rl.clearLine(0);
				rl.write(defaultValue);
				setValue(defaultValue);
			} else {
				setValue(rl.line);
				setError(void 0);
			}
		});
		useEffect((rl) => {
			if (prefill === "editable" && defaultValue) {
				rl.write(defaultValue);
				setValue(defaultValue);
			}
		}, []);
		const message = theme.style.message(config.message, status);
		let formattedValue = value;
		if (typeof config.transformer === "function") formattedValue = config.transformer(value, { isFinal: status === "done" });
		else if (status === "done") formattedValue = theme.style.answer(value);
		let defaultStr;
		if (defaultValue && status !== "done" && !value) defaultStr = theme.style.defaultAnswer(defaultValue);
		let error = "";
		if (errorMsg) error = theme.style.error(errorMsg);
		return [[
			prefix,
			message,
			defaultStr,
			formattedValue
		].filter((v) => v !== void 0).join(" "), error];
	});
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+password@5.0.11_@types+node@24.9.2/node_modules/@inquirer/password/dist/index.js
var dist_exports$2 = /* @__PURE__ */ __exportAll({ default: () => dist_default$2 });
var passwordTheme, dist_default$2;
var init_dist$2 = __esmMin((() => {
	init_dist$6();
	init_dist$7();
	passwordTheme = { style: { maskedText: "[input is masked]" } };
	dist_default$2 = createPrompt((config, done) => {
		const { validate = () => true } = config;
		const theme = makeTheme(passwordTheme, config.theme);
		const [status, setStatus] = useState("idle");
		const [errorMsg, setError] = useState();
		const [value, setValue] = useState("");
		const prefix = usePrefix({
			status,
			theme
		});
		useKeypress(async (key, rl) => {
			if (status !== "idle") return;
			if (isEnterKey(key)) {
				const answer = value;
				setStatus("loading");
				const isValid = await validate(answer);
				if (isValid === true) {
					setValue(answer);
					setStatus("done");
					done(answer);
				} else {
					rl.write(value);
					setError(isValid || "You must provide a valid value");
					setStatus("idle");
				}
			} else {
				setValue(rl.line);
				setError(void 0);
			}
		});
		const message = theme.style.message(config.message, status);
		let formattedValue = "";
		let helpTip;
		if (config.mask) formattedValue = (typeof config.mask === "string" ? config.mask : "*").repeat(value.length);
		else if (status !== "done") helpTip = `${theme.style.help(theme.style.maskedText)}${cursorHide}`;
		if (status === "done") formattedValue = theme.style.answer(formattedValue);
		let error = "";
		if (errorMsg) error = theme.style.error(errorMsg);
		return [[
			prefix,
			message,
			config.mask ? formattedValue : helpTip
		].join(" "), error];
	});
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+search@4.1.7_@types+node@24.9.2/node_modules/@inquirer/search/dist/index.js
var dist_exports$1 = /* @__PURE__ */ __exportAll({
	Separator: () => Separator,
	default: () => dist_default$1
});
function isSelectable$1(item) {
	return !Separator.isSeparator(item) && !item.disabled;
}
function normalizeChoices$1(choices) {
	return choices.map((choice) => {
		if (Separator.isSeparator(choice)) return choice;
		if (typeof choice !== "object" || choice === null || !("value" in choice)) {
			const name = String(choice);
			return {
				value: choice,
				name,
				short: name,
				disabled: false
			};
		}
		const name = choice.name ?? String(choice.value);
		const normalizedChoice = {
			value: choice.value,
			name,
			short: choice.short ?? name,
			disabled: choice.disabled ?? false
		};
		if (choice.description) normalizedChoice.description = choice.description;
		return normalizedChoice;
	});
}
var searchTheme, dist_default$1;
var init_dist$1 = __esmMin((() => {
	init_dist$6();
	init_dist$10();
	searchTheme = {
		icon: { cursor: figures.pointer },
		style: {
			disabled: (text) => (0, node_util.styleText)("dim", `- ${text}`),
			searchTerm: (text) => (0, node_util.styleText)("cyan", text),
			description: (text) => (0, node_util.styleText)("cyan", text),
			keysHelpTip: (keys) => keys.map(([key, action]) => `${(0, node_util.styleText)("bold", key)} ${(0, node_util.styleText)("dim", action)}`).join((0, node_util.styleText)("dim", " • "))
		}
	};
	__name(isSelectable$1, "isSelectable");
	__name(normalizeChoices$1, "normalizeChoices");
	dist_default$1 = createPrompt((config, done) => {
		const { pageSize = 7, validate = () => true } = config;
		const theme = makeTheme(searchTheme, config.theme);
		const [status, setStatus] = useState("loading");
		const [searchTerm, setSearchTerm] = useState("");
		const [searchResults, setSearchResults] = useState([]);
		const [searchError, setSearchError] = useState();
		const defaultApplied = useRef(false);
		const prefix = usePrefix({
			status,
			theme
		});
		const bounds = useMemo(() => {
			return {
				first: searchResults.findIndex(isSelectable$1),
				last: searchResults.findLastIndex(isSelectable$1)
			};
		}, [searchResults]);
		const [active = bounds.first, setActive] = useState();
		useEffect(() => {
			const controller = new AbortController();
			setStatus("loading");
			setSearchError(void 0);
			const fetchResults = async () => {
				try {
					const results = await config.source(searchTerm || void 0, { signal: controller.signal });
					if (!controller.signal.aborted) {
						const normalized = normalizeChoices$1(results);
						let initialActive;
						if (!defaultApplied.current && "default" in config) {
							const defaultIndex = normalized.findIndex((item) => isSelectable$1(item) && item.value === config.default);
							initialActive = defaultIndex === -1 ? void 0 : defaultIndex;
							defaultApplied.current = true;
						}
						setActive(initialActive);
						setSearchError(void 0);
						setSearchResults(normalized);
						setStatus("idle");
					}
				} catch (error) {
					if (!controller.signal.aborted && error instanceof Error) setSearchError(error.message);
				}
			};
			fetchResults();
			return () => {
				controller.abort();
			};
		}, [searchTerm]);
		const selectedChoice = searchResults[active];
		useKeypress(async (key, rl) => {
			if (isEnterKey(key)) if (selectedChoice) {
				setStatus("loading");
				const isValid = await validate(selectedChoice.value);
				setStatus("idle");
				if (isValid === true) {
					setStatus("done");
					done(selectedChoice.value);
				} else if (selectedChoice.name === searchTerm) setSearchError(isValid || "You must provide a valid value");
				else {
					rl.write(selectedChoice.name);
					setSearchTerm(selectedChoice.name);
				}
			} else rl.write(searchTerm);
			else if (isTabKey(key) && selectedChoice) {
				rl.clearLine(0);
				rl.write(selectedChoice.name);
				setSearchTerm(selectedChoice.name);
			} else if (status !== "loading" && (isUpKey(key) || isDownKey(key))) {
				rl.clearLine(0);
				if (isUpKey(key) && active !== bounds.first || isDownKey(key) && active !== bounds.last) {
					const offset = isUpKey(key) ? -1 : 1;
					let next = active;
					do
						next = (next + offset + searchResults.length) % searchResults.length;
					while (!isSelectable$1(searchResults[next]));
					setActive(next);
				}
			} else setSearchTerm(rl.line);
		});
		const message = theme.style.message(config.message, status);
		const helpLine = theme.style.keysHelpTip([["↑↓", "navigate"], ["⏎", "select"]]);
		const page = usePagination({
			items: searchResults,
			active,
			renderItem({ item, isActive }) {
				if (Separator.isSeparator(item)) return ` ${item.separator}`;
				if (item.disabled) {
					const disabledLabel = typeof item.disabled === "string" ? item.disabled : "(disabled)";
					return theme.style.disabled(`${item.name} ${disabledLabel}`);
				}
				return (isActive ? theme.style.highlight : (x) => x)(`${isActive ? theme.icon.cursor : ` `} ${item.name}`);
			},
			pageSize,
			loop: false
		});
		let error;
		if (searchError) error = theme.style.error(searchError);
		else if (searchResults.length === 0 && searchTerm !== "" && status === "idle") error = theme.style.error("No results found");
		let searchStr;
		if (status === "done" && selectedChoice) return [
			prefix,
			message,
			theme.style.answer(selectedChoice.short)
		].filter(Boolean).join(" ").trimEnd();
		else searchStr = theme.style.searchTerm(searchTerm);
		const description = selectedChoice?.description;
		return [[
			prefix,
			message,
			searchStr
		].filter(Boolean).join(" ").trimEnd(), [
			error ?? page,
			" ",
			description ? theme.style.description(description) : "",
			helpLine
		].filter(Boolean).join("\n").trimEnd()];
	});
}));

//#endregion
//#region node_modules/.pnpm/@inquirer+select@5.1.3_@types+node@24.9.2/node_modules/@inquirer/select/dist/index.js
var dist_exports = /* @__PURE__ */ __exportAll({
	Separator: () => Separator,
	default: () => dist_default
});
function isSelectable(item) {
	return !Separator.isSeparator(item) && !item.disabled;
}
function isNavigable(item) {
	return !Separator.isSeparator(item);
}
function normalizeChoices(choices) {
	return choices.map((choice) => {
		if (Separator.isSeparator(choice)) return choice;
		if (typeof choice !== "object" || choice === null || !("value" in choice)) {
			const name = String(choice);
			return {
				value: choice,
				name,
				short: name,
				disabled: false
			};
		}
		const name = choice.name ?? String(choice.value);
		const normalizedChoice = {
			value: choice.value,
			name,
			short: choice.short ?? name,
			disabled: choice.disabled ?? false
		};
		if (choice.description) normalizedChoice.description = choice.description;
		return normalizedChoice;
	});
}
var selectTheme, dist_default;
var init_dist = __esmMin((() => {
	init_dist$6();
	init_dist$7();
	init_dist$10();
	selectTheme = {
		icon: { cursor: figures.pointer },
		style: {
			disabled: (text) => (0, node_util.styleText)("dim", text),
			description: (text) => (0, node_util.styleText)("cyan", text),
			keysHelpTip: (keys) => keys.map(([key, action]) => `${(0, node_util.styleText)("bold", key)} ${(0, node_util.styleText)("dim", action)}`).join((0, node_util.styleText)("dim", " • "))
		},
		i18n: { disabledError: "This option is disabled and cannot be selected." },
		indexMode: "hidden",
		keybindings: []
	};
	dist_default = createPrompt((config, done) => {
		const { loop = true, pageSize = 7 } = config;
		const theme = makeTheme(selectTheme, config.theme);
		const { keybindings } = theme;
		const [status, setStatus] = useState("idle");
		const prefix = usePrefix({
			status,
			theme
		});
		const searchTimeoutRef = useRef();
		const searchEnabled = !keybindings.includes("vim");
		const items = useMemo(() => normalizeChoices(config.choices), [config.choices]);
		const bounds = useMemo(() => {
			const first = items.findIndex(isNavigable);
			const last = items.findLastIndex(isNavigable);
			if (first === -1) throw new ValidationError("[select prompt] No selectable choices. All choices are disabled.");
			return {
				first,
				last
			};
		}, [items]);
		const defaultItemIndex = useMemo(() => {
			if (!("default" in config)) return -1;
			return items.findIndex((item) => isSelectable(item) && item.value === config.default);
		}, [config.default, items]);
		const [active, setActive] = useState(defaultItemIndex === -1 ? bounds.first : defaultItemIndex);
		const selectedChoice = items[active];
		if (selectedChoice == null || Separator.isSeparator(selectedChoice)) throw new _p_ErrorCtor("Active index does not point to a choice");
		const [errorMsg, setError] = useState();
		useKeypress((key, rl) => {
			clearTimeout(searchTimeoutRef.current);
			if (errorMsg) setError(void 0);
			if (isEnterKey(key)) if (selectedChoice.disabled) setError(theme.i18n.disabledError);
			else {
				setStatus("done");
				done(selectedChoice.value);
			}
			else if (isUpKey(key, keybindings) || isDownKey(key, keybindings)) {
				rl.clearLine(0);
				if (loop || isUpKey(key, keybindings) && active !== bounds.first || isDownKey(key, keybindings) && active !== bounds.last) {
					const offset = isUpKey(key, keybindings) ? -1 : 1;
					let next = active;
					do
						next = (next + offset + items.length) % items.length;
					while (!isNavigable(items[next]));
					setActive(next);
				}
			} else if (isNumberKey(key) && !_p_NumberIsNaN(Number(rl.line))) {
				const selectedIndex = Number(rl.line) - 1;
				let selectableIndex = -1;
				const position = items.findIndex((item) => {
					if (Separator.isSeparator(item)) return false;
					selectableIndex++;
					return selectableIndex === selectedIndex;
				});
				const item = items[position];
				if (item != null && isSelectable(item)) setActive(position);
				searchTimeoutRef.current = setTimeout(() => {
					rl.clearLine(0);
				}, 700);
			} else if (isBackspaceKey(key)) rl.clearLine(0);
			else if (searchEnabled) {
				const searchTerm = rl.line.toLowerCase();
				const matchIndex = items.findIndex((item) => {
					if (Separator.isSeparator(item) || !isSelectable(item)) return false;
					return item.name.toLowerCase().startsWith(searchTerm);
				});
				if (matchIndex !== -1) setActive(matchIndex);
				searchTimeoutRef.current = setTimeout(() => {
					rl.clearLine(0);
				}, 700);
			}
		});
		useEffect(() => () => {
			clearTimeout(searchTimeoutRef.current);
		}, []);
		const message = theme.style.message(config.message, status);
		const helpLine = theme.style.keysHelpTip([["↑↓", "navigate"], ["⏎", "select"]]);
		let separatorCount = 0;
		const page = usePagination({
			items,
			active,
			renderItem({ item, isActive, index }) {
				if (Separator.isSeparator(item)) {
					separatorCount++;
					return ` ${item.separator}`;
				}
				const cursor = isActive ? theme.icon.cursor : " ";
				const indexLabel = theme.indexMode === "number" ? `${index + 1 - separatorCount}. ` : "";
				if (item.disabled) {
					const disabledLabel = typeof item.disabled === "string" ? item.disabled : "(disabled)";
					const disabledCursor = isActive ? theme.icon.cursor : "-";
					return theme.style.disabled(`${disabledCursor} ${indexLabel}${item.name} ${disabledLabel}`);
				}
				return (isActive ? theme.style.highlight : (x) => x)(`${cursor} ${indexLabel}${item.name}`);
			},
			pageSize,
			loop
		});
		if (status === "done") return [
			prefix,
			message,
			theme.style.answer(selectedChoice.short)
		].filter(Boolean).join(" ");
		const { description } = selectedChoice;
		return `${[
			[prefix, message].filter(Boolean).join(" "),
			page,
			" ",
			description ? theme.style.description(description) : "",
			errorMsg ? theme.style.error(errorMsg) : "",
			helpLine
		].filter(Boolean).join("\n").trimEnd()}${cursorHide}`;
	});
}));

//#endregion
//#region src/external/external-pack.js
const signalExit = require_cjs();
const supportsColor = (init_supports_color(), __toCommonJS(supports_color_exports));
const hasFlag = (init_has_flag(), __toCommonJS(has_flag_exports));
const yoctocolorsCjs = require_yoctocolors_cjs();
const checkbox = (init_dist$5(), __toCommonJS(dist_exports$5));
const confirm = (init_dist$4(), __toCommonJS(dist_exports$4));
const input = (init_dist$3(), __toCommonJS(dist_exports$3));
const password = (init_dist$2(), __toCommonJS(dist_exports$2));
const search = (init_dist$1(), __toCommonJS(dist_exports$1));
const select = (init_dist(), __toCommonJS(dist_exports));
module.exports = {
	checkbox,
	confirm,
	hasFlag,
	input,
	password,
	search,
	select,
	signalExit,
	supportsColor,
	yoctocolorsCjs
};

//#endregion