"use strict"; var Pm = Object.create; var qt = Object.defineProperty; var Om = Object.getOwnPropertyDescriptor; var Cm = Object.getOwnPropertyNames; var Im = Object.getPrototypeOf, Dm = Object.prototype.hasOwnProperty; var s = (t, e) => qt(t, "name", { value: e, configurable: !0 }); var de = (t, e) => () => (t && (e = t(t = 0)), e); var d = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), yt = (t, e) => { for (var r in e) qt(t, r, { get: e[r], enumerable: !0 }); }, ia = (t, e, r, i) => { if (e && typeof e == "object" || typeof e == "function") for (let n of Cm(e)) !Dm.call(t, n) && n !== r && qt(t, n, { get: () => e[n], enumerable: !(i = Om(e, n)) || i.enumerable }); return t; }; var B = (t, e, r) => (r = t != null ? Pm(Im(t)) : {}, ia( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. e || !t || !t.__esModule ? qt(r, "default", { value: t, enumerable: !0 }) : r, t )), fr = (t) => ia(qt({}, "__esModule", { value: !0 }), t); // ../node_modules/ts-dedent/dist/index.js var Ht = d((Ft) => { "use strict"; Object.defineProperty(Ft, "__esModule", { value: !0 }); Ft.dedent = void 0; function sa(t) { for (var e = [], r = 1; r < arguments.length; r++) e[r - 1] = arguments[r]; var i = Array.from(typeof t == "string" ? [t] : t); i[i.length - 1] = i[i.length - 1].replace(/\r?\n([\t ]*)$/, ""); var n = i.reduce(function(l, u) { var c = u.match(/\n([\t ]+|(?!\s).)/g); return c ? l.concat(c.map(function(p) { var f, h; return (h = (f = p.match(/[\t ]/g)) === null || f === void 0 ? void 0 : f.length) !== null && h !== void 0 ? h : 0; })) : l; }, []); if (n.length) { var o = new RegExp(` [ ]{` + Math.min.apply(Math, n) + "}", "g"); i = i.map(function(l) { return l.replace(o, ` `); }); } i[0] = i[0].replace(/^\r?\n/, ""); var a = i[0]; return e.forEach(function(l, u) { var c = a.match(/(?:^|\n)( *)$/), p = c ? c[1] : "", f = l; typeof l == "string" && l.includes(` `) && (f = String(l).split(` `).map(function(h, E) { return E === 0 ? h : "" + p + h; }).join(` `)), a += f + i[u + 1]; }), a; } s(sa, "dedent"); Ft.dedent = sa; Ft.default = sa; }); // ../node_modules/camelcase/index.js var ya = {}; yt(ya, { default: () => ga }); function ga(t, e) { if (!(typeof t == "string" || Array.isArray(t))) throw new TypeError("Expected the input to be `string | string[]`"); if (e = { pascalCase: !1, preserveConsecutiveUppercase: !1, ...e }, Array.isArray(t) ? t = t.map((o) => o.trim()).filter((o) => o.length).join("-") : t = t.trim(), t.length === 0) return ""; let r = e.locale === !1 ? (o) => o.toLowerCase() : (o) => o.toLocaleLowerCase(e.locale), i = e.locale === !1 ? (o) => o.toUpperCase() : (o) => o. toLocaleUpperCase(e.locale); return t.length === 1 ? Ti.test(t) ? "" : e.pascalCase ? i(t) : r(t) : (t !== r(t) && (t = Mm(t, r, i, e.preserveConsecutiveUppercase)), t = t.replace(km, ""), t = e.preserveConsecutiveUppercase ? $m(t, r) : r(t), e.pascalCase && (t = i(t.charAt(0)) + t.slice(1)), qm(t, i)); } var Nm, Lm, pa, ma, Ti, km, da, fa, Mm, $m, qm, _a = de(() => { Nm = /[\p{Lu}]/u, Lm = /[\p{Ll}]/u, pa = /^[\p{Lu}](?![\p{Lu}])/gu, ma = /([\p{Alpha}\p{N}_]|$)/u, Ti = /[_.\- ]+/, km = new RegExp("^" + Ti. source), da = new RegExp(Ti.source + ma.source, "gu"), fa = new RegExp("\\d+" + ma.source, "gu"), Mm = /* @__PURE__ */ s((t, e, r, i) => { let n = !1, o = !1, a = !1, l = !1; for (let u = 0; u < t.length; u++) { let c = t[u]; l = u > 2 ? t[u - 3] === "-" : !0, n && Nm.test(c) ? (t = t.slice(0, u) + "-" + t.slice(u), n = !1, a = o, o = !0, u++) : o && a && Lm. test(c) && (!l || i) ? (t = t.slice(0, u - 1) + "-" + t.slice(u - 1), a = o, o = !1, n = !0) : (n = e(c) === c && r(c) !== c, a = o, o = r(c) === c && e(c) !== c); } return t; }, "preserveCamelCase"), $m = /* @__PURE__ */ s((t, e) => (pa.lastIndex = 0, t.replaceAll(pa, (r) => e(r))), "preserveConsecutiveUppercase"), qm = /* @__PURE__ */ s((t, e) => (da.lastIndex = 0, fa.lastIndex = 0, t.replaceAll(fa, (r, i, n) => ["_", "-"].includes(t.charAt(n + r.length)) ? r : e(r)).replaceAll(da, (r, i) => e(i))), "postProcess"); s(ga, "camelCase"); }); // ../node_modules/@sindresorhus/merge-streams/index.js function Li(t) { if (!Array.isArray(t)) throw new TypeError(`Expected an array, got \`${typeof t}\`.`); for (let n of t) Ii(n); let e = t.some(({ readableObjectMode: n }) => n), r = Fm(t, e), i = new Ci({ objectMode: e, writableHighWaterMark: r, readableHighWaterMark: r }); for (let n of t) i.add(n); return t.length === 0 && La(i), i; } var xr, Ia, Ni, Fm, Ci, Hm, jm, Bm, Ii, Um, Da, Gm, Wm, Ym, Na, La, Di, ka, Vm, _r, Oa, Ca, Ma = de(() => { xr = require("node:events"), Ia = require("node:stream"), Ni = require("node:stream/promises"); s(Li, "mergeStreams"); Fm = /* @__PURE__ */ s((t, e) => { if (t.length === 0) return 16384; let r = t.filter(({ readableObjectMode: i }) => i === e).map(({ readableHighWaterMark: i }) => i); return Math.max(...r); }, "getHighWaterMark"), Ci = class extends Ia.PassThrough { static { s(this, "MergedStream"); } #e = /* @__PURE__ */ new Set([]); #r = /* @__PURE__ */ new Set([]); #i = /* @__PURE__ */ new Set([]); #t; add(e) { Ii(e), !this.#e.has(e) && (this.#e.add(e), this.#t ??= Hm(this, this.#e), Um({ passThroughStream: this, stream: e, streams: this.#e, ended: this.#r, aborted: this.#i, onFinished: this.#t }), e.pipe(this, { end: !1 })); } remove(e) { return Ii(e), this.#e.has(e) ? (e.unpipe(this), !0) : !1; } }, Hm = /* @__PURE__ */ s(async (t, e) => { _r(t, Oa); let r = new AbortController(); try { await Promise.race([ jm(t, r), Bm(t, e, r) ]); } finally { r.abort(), _r(t, -Oa); } }, "onMergedStreamFinished"), jm = /* @__PURE__ */ s(async (t, { signal: e }) => { await (0, Ni.finished)(t, { signal: e, cleanup: !0 }); }, "onMergedStreamEnd"), Bm = /* @__PURE__ */ s(async (t, e, { signal: r }) => { for await (let [i] of (0, xr.on)(t, "unpipe", { signal: r })) e.has(i) && i.emit(Na); }, "onInputStreamsUnpipe"), Ii = /* @__PURE__ */ s((t) => { if (typeof t?.pipe != "function") throw new TypeError(`Expected a readable stream, got: \`${typeof t}\`.`); }, "validateStream"), Um = /* @__PURE__ */ s(async ({ passThroughStream: t, stream: e, streams: r, ended: i, aborted: n, onFinished: o }) => { _r(t, Ca); let a = new AbortController(); try { await Promise.race([ Gm(o, e), Wm({ passThroughStream: t, stream: e, streams: r, ended: i, aborted: n, controller: a }), Ym({ stream: e, streams: r, ended: i, aborted: n, controller: a }) ]); } finally { a.abort(), _r(t, -Ca); } r.size === i.size + n.size && (i.size === 0 && n.size > 0 ? Di(t) : La(t)); }, "endWhenStreamsDone"), Da = /* @__PURE__ */ s((t) => t?.code === "ERR_STREAM_PREMATURE_CLOSE", "isAbortError"), Gm = /* @__PURE__ */ s( async (t, e) => { try { await t, Di(e); } catch (r) { Da(r) ? Di(e) : ka(e, r); } }, "afterMergedStreamFinished"), Wm = /* @__PURE__ */ s(async ({ passThroughStream: t, stream: e, streams: r, ended: i, aborted: n, controller: { signal: o } }) => { try { await (0, Ni.finished)(e, { signal: o, cleanup: !0, readable: !0, writable: !1 }), r.has(e) && i.add(e); } catch (a) { if (o.aborted || !r.has(e)) return; Da(a) ? n.add(e) : ka(t, a); } }, "onInputStreamEnd"), Ym = /* @__PURE__ */ s(async ({ stream: t, streams: e, ended: r, aborted: i, controller: { signal: n } }) => { await (0, xr.once)(t, Na, { signal: n }), e.delete(t), r.delete(t), i.delete(t); }, "onInputStreamUnpipe"), Na = Symbol("unpipe"), La = /* @__PURE__ */ s((t) => { t.writable && t.end(); }, "endStream"), Di = /* @__PURE__ */ s((t) => { (t.readable || t.writable) && t.destroy(); }, "abortStream"), ka = /* @__PURE__ */ s((t, e) => { t.destroyed || (t.once("error", Vm), t.destroy(e)); }, "errorStream"), Vm = /* @__PURE__ */ s(() => { }, "noop"), _r = /* @__PURE__ */ s((t, e) => { let r = t.getMaxListeners(); r !== 0 && r !== Number.POSITIVE_INFINITY && t.setMaxListeners(r + e); }, "updateMaxListeners"), Oa = 2, Ca = 1; }); // ../node_modules/fast-glob/out/utils/array.js var $a = d((xt) => { "use strict"; Object.defineProperty(xt, "__esModule", { value: !0 }); xt.splitWhen = xt.flatten = void 0; function zm(t) { return t.reduce((e, r) => [].concat(e, r), []); } s(zm, "flatten"); xt.flatten = zm; function Km(t, e) { let r = [[]], i = 0; for (let n of t) e(n) ? (i++, r[i] = []) : r[i].push(n); return r; } s(Km, "splitWhen"); xt.splitWhen = Km; }); // ../node_modules/fast-glob/out/utils/errno.js var qa = d((br) => { "use strict"; Object.defineProperty(br, "__esModule", { value: !0 }); br.isEnoentCodeError = void 0; function Qm(t) { return t.code === "ENOENT"; } s(Qm, "isEnoentCodeError"); br.isEnoentCodeError = Qm; }); // ../node_modules/fast-glob/out/utils/fs.js var Fa = d((Sr) => { "use strict"; Object.defineProperty(Sr, "__esModule", { value: !0 }); Sr.createDirentFromStats = void 0; var ki = class { static { s(this, "DirentFromStats"); } constructor(e, r) { this.name = e, this.isBlockDevice = r.isBlockDevice.bind(r), this.isCharacterDevice = r.isCharacterDevice.bind(r), this.isDirectory = r. isDirectory.bind(r), this.isFIFO = r.isFIFO.bind(r), this.isFile = r.isFile.bind(r), this.isSocket = r.isSocket.bind(r), this.isSymbolicLink = r.isSymbolicLink.bind(r); } }; function Xm(t, e) { return new ki(t, e); } s(Xm, "createDirentFromStats"); Sr.createDirentFromStats = Xm; }); // ../node_modules/fast-glob/out/utils/path.js var Ua = d((X) => { "use strict"; Object.defineProperty(X, "__esModule", { value: !0 }); X.convertPosixPathToPattern = X.convertWindowsPathToPattern = X.convertPathToPattern = X.escapePosixPath = X.escapeWindowsPath = X.escape = X.removeLeadingDotSegment = X.makeAbsolute = X.unixify = void 0; var Zm = require("os"), Jm = require("path"), Ha = Zm.platform() === "win32", eg = 2, tg = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g, rg = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g, ig = /^\\\\([.?])/, sg = /\\(?![!()+@[\]{}])/g; function ng(t) { return t.replace(/\\/g, "/"); } s(ng, "unixify"); X.unixify = ng; function og(t, e) { return Jm.resolve(t, e); } s(og, "makeAbsolute"); X.makeAbsolute = og; function ag(t) { if (t.charAt(0) === ".") { let e = t.charAt(1); if (e === "/" || e === "\\") return t.slice(eg); } return t; } s(ag, "removeLeadingDotSegment"); X.removeLeadingDotSegment = ag; X.escape = Ha ? Mi : $i; function Mi(t) { return t.replace(rg, "\\$2"); } s(Mi, "escapeWindowsPath"); X.escapeWindowsPath = Mi; function $i(t) { return t.replace(tg, "\\$2"); } s($i, "escapePosixPath"); X.escapePosixPath = $i; X.convertPathToPattern = Ha ? ja : Ba; function ja(t) { return Mi(t).replace(ig, "//$1").replace(sg, "/"); } s(ja, "convertWindowsPathToPattern"); X.convertWindowsPathToPattern = ja; function Ba(t) { return $i(t); } s(Ba, "convertPosixPathToPattern"); X.convertPosixPathToPattern = Ba; }); // ../node_modules/is-extglob/index.js var Wa = d((PT, Ga) => { Ga.exports = /* @__PURE__ */ s(function(e) { if (typeof e != "string" || e === "") return !1; for (var r; r = /(\\).|([@?!+*]\(.*\))/g.exec(e); ) { if (r[2]) return !0; e = e.slice(r.index + r[0].length); } return !1; }, "isExtglob"); }); // ../node_modules/is-glob/index.js var za = d((CT, Va) => { var lg = Wa(), Ya = { "{": "}", "(": ")", "[": "]" }, ug = /* @__PURE__ */ s(function(t) { if (t[0] === "!") return !0; for (var e = 0, r = -2, i = -2, n = -2, o = -2, a = -2; e < t.length; ) { if (t[e] === "*" || t[e + 1] === "?" && /[\].+)]/.test(t[e]) || i !== -1 && t[e] === "[" && t[e + 1] !== "]" && (i < e && (i = t.indexOf( "]", e)), i > e && (a === -1 || a > i || (a = t.indexOf("\\", e), a === -1 || a > i))) || n !== -1 && t[e] === "{" && t[e + 1] !== "}" && (n = t.indexOf("}", e), n > e && (a = t.indexOf("\\", e), a === -1 || a > n)) || o !== -1 && t[e] === "(" && t[e + 1] === "?" && /[:!=]/. test(t[e + 2]) && t[e + 3] !== ")" && (o = t.indexOf(")", e), o > e && (a = t.indexOf("\\", e), a === -1 || a > o)) || r !== -1 && t[e] === "(" && t[e + 1] !== "|" && (r < e && (r = t.indexOf("|", e)), r !== -1 && t[r + 1] !== ")" && (o = t.indexOf(")", r), o > r && (a = t. indexOf("\\", r), a === -1 || a > o)))) return !0; if (t[e] === "\\") { var l = t[e + 1]; e += 2; var u = Ya[l]; if (u) { var c = t.indexOf(u, e); c !== -1 && (e = c + 1); } if (t[e] === "!") return !0; } else e++; } return !1; }, "strictCheck"), cg = /* @__PURE__ */ s(function(t) { if (t[0] === "!") return !0; for (var e = 0; e < t.length; ) { if (/[*?{}()[\]]/.test(t[e])) return !0; if (t[e] === "\\") { var r = t[e + 1]; e += 2; var i = Ya[r]; if (i) { var n = t.indexOf(i, e); n !== -1 && (e = n + 1); } if (t[e] === "!") return !0; } else e++; } return !1; }, "relaxedCheck"); Va.exports = /* @__PURE__ */ s(function(e, r) { if (typeof e != "string" || e === "") return !1; if (lg(e)) return !0; var i = ug; return r && r.strict === !1 && (i = cg), i(e); }, "isGlob"); }); // ../node_modules/glob-parent/index.js var Qa = d((DT, Ka) => { "use strict"; var hg = za(), pg = require("path").posix.dirname, dg = require("os").platform() === "win32", qi = "/", fg = /\\/g, mg = /[\{\[].*[\}\]]$/, gg = /(^|[^\\])([\{\[]|\([^\)]+$)/, yg = /\\([\!\*\?\|\[\]\(\)\{\}])/g; Ka.exports = /* @__PURE__ */ s(function(e, r) { var i = Object.assign({ flipBackslashes: !0 }, r); i.flipBackslashes && dg && e.indexOf(qi) < 0 && (e = e.replace(fg, qi)), mg.test(e) && (e += qi), e += "a"; do e = pg(e); while (hg(e) || gg.test(e)); return e.replace(yg, "$1"); }, "globParent"); }); // ../node_modules/braces/lib/utils.js var Er = d((fe) => { "use strict"; fe.isInteger = (t) => typeof t == "number" ? Number.isInteger(t) : typeof t == "string" && t.trim() !== "" ? Number.isInteger(Number(t)) : !1; fe.find = (t, e) => t.nodes.find((r) => r.type === e); fe.exceedsLimit = (t, e, r = 1, i) => i === !1 || !fe.isInteger(t) || !fe.isInteger(e) ? !1 : (Number(e) - Number(t)) / Number(r) >= i; fe.escapeNode = (t, e = 0, r) => { let i = t.nodes[e]; i && (r && i.type === r || i.type === "open" || i.type === "close") && i.escaped !== !0 && (i.value = "\\" + i.value, i.escaped = !0); }; fe.encloseBrace = (t) => t.type !== "brace" || t.commas >> 0 + t.ranges >> 0 ? !1 : (t.invalid = !0, !0); fe.isInvalidBrace = (t) => t.type !== "brace" ? !1 : t.invalid === !0 || t.dollar ? !0 : !(t.commas >> 0 + t.ranges >> 0) || t.open !== !0 || t.close !== !0 ? (t.invalid = !0, !0) : !1; fe.isOpenOrClose = (t) => t.type === "open" || t.type === "close" ? !0 : t.open === !0 || t.close === !0; fe.reduce = (t) => t.reduce((e, r) => (r.type === "text" && e.push(r.value), r.type === "range" && (r.type = "text"), e), []); fe.flatten = (...t) => { let e = [], r = /* @__PURE__ */ s((i) => { for (let n = 0; n < i.length; n++) { let o = i[n]; if (Array.isArray(o)) { r(o); continue; } o !== void 0 && e.push(o); } return e; }, "flat"); return r(t), e; }; }); // ../node_modules/braces/lib/stringify.js var vr = d((MT, Za) => { "use strict"; var Xa = Er(); Za.exports = (t, e = {}) => { let r = /* @__PURE__ */ s((i, n = {}) => { let o = e.escapeInvalid && Xa.isInvalidBrace(n), a = i.invalid === !0 && e.escapeInvalid === !0, l = ""; if (i.value) return (o || a) && Xa.isOpenOrClose(i) ? "\\" + i.value : i.value; if (i.value) return i.value; if (i.nodes) for (let u of i.nodes) l += r(u); return l; }, "stringify"); return r(t); }; }); // ../node_modules/to-regex-range/node_modules/is-number/index.js var el = d((qT, Ja) => { "use strict"; Ja.exports = function(t) { return typeof t == "number" ? t - t === 0 : typeof t == "string" && t.trim() !== "" ? Number.isFinite ? Number.isFinite(+t) : isFinite(+t) : !1; }; }); // ../node_modules/to-regex-range/index.js var ul = d((FT, ll) => { "use strict"; var tl = el(), ut = /* @__PURE__ */ s((t, e, r) => { if (tl(t) === !1) throw new TypeError("toRegexRange: expected the first argument to be a number"); if (e === void 0 || t === e) return String(t); if (tl(e) === !1) throw new TypeError("toRegexRange: expected the second argument to be a number."); let i = { relaxZeros: !0, ...r }; typeof i.strictZeros == "boolean" && (i.relaxZeros = i.strictZeros === !1); let n = String(i.relaxZeros), o = String(i.shorthand), a = String(i.capture), l = String(i.wrap), u = t + ":" + e + "=" + n + o + a + l; if (ut.cache.hasOwnProperty(u)) return ut.cache[u].result; let c = Math.min(t, e), p = Math.max(t, e); if (Math.abs(c - p) === 1) { let x = t + "|" + e; return i.capture ? `(${x})` : i.wrap === !1 ? x : `(?:${x})`; } let f = al(t) || al(e), h = { min: t, max: e, a: c, b: p }, E = [], m = []; if (f && (h.isPadded = f, h.maxLen = String(h.max).length), c < 0) { let x = p < 0 ? Math.abs(p) : 1; m = rl(x, Math.abs(c), h, i), c = h.a = 0; } return p >= 0 && (E = rl(c, p, h, i)), h.negatives = m, h.positives = E, h.result = _g(m, E, i), i.capture === !0 ? h.result = `(${h.result}\ )` : i.wrap !== !1 && E.length + m.length > 1 && (h.result = `(?:${h.result})`), ut.cache[u] = h, h.result; }, "toRegexRange"); function _g(t, e, r) { let i = Fi(t, e, "-", !1, r) || [], n = Fi(e, t, "", !1, r) || [], o = Fi(t, e, "-?", !0, r) || []; return i.concat(o).concat(n).join("|"); } s(_g, "collatePatterns"); function xg(t, e) { let r = 1, i = 1, n = sl(t, r), o = /* @__PURE__ */ new Set([e]); for (; t <= n && n <= e; ) o.add(n), r += 1, n = sl(t, r); for (n = nl(e + 1, i) - 1; t < n && n <= e; ) o.add(n), i += 1, n = nl(e + 1, i) - 1; return o = [...o], o.sort(Eg), o; } s(xg, "splitToRanges"); function bg(t, e, r) { if (t === e) return { pattern: t, count: [], digits: 0 }; let i = Sg(t, e), n = i.length, o = "", a = 0; for (let l = 0; l < n; l++) { let [u, c] = i[l]; u === c ? o += u : u !== "0" || c !== "9" ? o += vg(u, c, r) : a++; } return a && (o += r.shorthand === !0 ? "\\d" : "[0-9]"), { pattern: o, count: [a], digits: n }; } s(bg, "rangeToPattern"); function rl(t, e, r, i) { let n = xg(t, e), o = [], a = t, l; for (let u = 0; u < n.length; u++) { let c = n[u], p = bg(String(a), String(c), i), f = ""; if (!r.isPadded && l && l.pattern === p.pattern) { l.count.length > 1 && l.count.pop(), l.count.push(p.count[0]), l.string = l.pattern + ol(l.count), a = c + 1; continue; } r.isPadded && (f = wg(c, r, i)), p.string = f + p.pattern + ol(p.count), o.push(p), a = c + 1, l = p; } return o; } s(rl, "splitToPatterns"); function Fi(t, e, r, i, n) { let o = []; for (let a of t) { let { string: l } = a; !i && !il(e, "string", l) && o.push(r + l), i && il(e, "string", l) && o.push(r + l); } return o; } s(Fi, "filterPatterns"); function Sg(t, e) { let r = []; for (let i = 0; i < t.length; i++) r.push([t[i], e[i]]); return r; } s(Sg, "zip"); function Eg(t, e) { return t > e ? 1 : e > t ? -1 : 0; } s(Eg, "compare"); function il(t, e, r) { return t.some((i) => i[e] === r); } s(il, "contains"); function sl(t, e) { return Number(String(t).slice(0, -e) + "9".repeat(e)); } s(sl, "countNines"); function nl(t, e) { return t - t % Math.pow(10, e); } s(nl, "countZeros"); function ol(t) { let [e = 0, r = ""] = t; return r || e > 1 ? `{${e + (r ? "," + r : "")}}` : ""; } s(ol, "toQuantifier"); function vg(t, e, r) { return `[${t}${e - t === 1 ? "" : "-"}${e}]`; } s(vg, "toCharacterClass"); function al(t) { return /^-?(0+)\d/.test(t); } s(al, "hasPadding"); function wg(t, e, r) { if (!e.isPadded) return t; let i = Math.abs(e.maxLen - String(t).length), n = r.relaxZeros !== !1; switch (i) { case 0: return ""; case 1: return n ? "0?" : "0"; case 2: return n ? "0{0,2}" : "00"; default: return n ? `0{0,${i}}` : `0{${i}}`; } } s(wg, "padZeros"); ut.cache = {}; ut.clearCache = () => ut.cache = {}; ll.exports = ut; }); // ../node_modules/fill-range/index.js var Bi = d((jT, gl) => { "use strict"; var Rg = require("util"), hl = ul(), cl = /* @__PURE__ */ s((t) => t !== null && typeof t == "object" && !Array.isArray(t), "isObject"), Tg = /* @__PURE__ */ s( (t) => (e) => t === !0 ? Number(e) : String(e), "transform"), Hi = /* @__PURE__ */ s((t) => typeof t == "number" || typeof t == "string" && t !== "", "isValidValue"), Bt = /* @__PURE__ */ s((t) => Number.isInteger(+t), "isNumber"), ji = /* @__PURE__ */ s((t) => { let e = `${t}`, r = -1; if (e[0] === "-" && (e = e.slice(1)), e === "0") return !1; for (; e[++r] === "0"; ) ; return r > 0; }, "zeros"), Ag = /* @__PURE__ */ s((t, e, r) => typeof t == "string" || typeof e == "string" ? !0 : r.stringify === !0, "stringify"), Pg = /* @__PURE__ */ s( (t, e, r) => { if (e > 0) { let i = t[0] === "-" ? "-" : ""; i && (t = t.slice(1)), t = i + t.padStart(i ? e - 1 : e, "0"); } return r === !1 ? String(t) : t; }, "pad"), Rr = /* @__PURE__ */ s((t, e) => { let r = t[0] === "-" ? "-" : ""; for (r && (t = t.slice(1), e--); t.length < e; ) t = "0" + t; return r ? "-" + t : t; }, "toMaxLen"), Og = /* @__PURE__ */ s((t, e, r) => { t.negatives.sort((l, u) => l < u ? -1 : l > u ? 1 : 0), t.positives.sort((l, u) => l < u ? -1 : l > u ? 1 : 0); let i = e.capture ? "" : "?:", n = "", o = "", a; return t.positives.length && (n = t.positives.map((l) => Rr(String(l), r)).join("|")), t.negatives.length && (o = `-(${i}${t.negatives.map( (l) => Rr(String(l), r)).join("|")})`), n && o ? a = `${n}|${o}` : a = n || o, e.wrap ? `(${i}${a})` : a; }, "toSequence"), pl = /* @__PURE__ */ s((t, e, r, i) => { if (r) return hl(t, e, { wrap: !1, ...i }); let n = String.fromCharCode(t); if (t === e) return n; let o = String.fromCharCode(e); return `[${n}-${o}]`; }, "toRange"), dl = /* @__PURE__ */ s((t, e, r) => { if (Array.isArray(t)) { let i = r.wrap === !0, n = r.capture ? "" : "?:"; return i ? `(${n}${t.join("|")})` : t.join("|"); } return hl(t, e, r); }, "toRegex"), fl = /* @__PURE__ */ s((...t) => new RangeError("Invalid range arguments: " + Rg.inspect(...t)), "rangeError"), ml = /* @__PURE__ */ s( (t, e, r) => { if (r.strictRanges === !0) throw fl([t, e]); return []; }, "invalidRange"), Cg = /* @__PURE__ */ s((t, e) => { if (e.strictRanges === !0) throw new TypeError(`Expected step "${t}" to be a number`); return []; }, "invalidStep"), Ig = /* @__PURE__ */ s((t, e, r = 1, i = {}) => { let n = Number(t), o = Number(e); if (!Number.isInteger(n) || !Number.isInteger(o)) { if (i.strictRanges === !0) throw fl([t, e]); return []; } n === 0 && (n = 0), o === 0 && (o = 0); let a = n > o, l = String(t), u = String(e), c = String(r); r = Math.max(Math.abs(r), 1); let p = ji(l) || ji(u) || ji(c), f = p ? Math.max(l.length, u.length, c.length) : 0, h = p === !1 && Ag(t, e, i) === !1, E = i.transform || Tg(h); if (i.toRegex && r === 1) return pl(Rr(t, f), Rr(e, f), !0, i); let m = { negatives: [], positives: [] }, x = /* @__PURE__ */ s((N) => m[N < 0 ? "negatives" : "positives"].push(Math.abs(N)), "push"), w = [], R = 0; for (; a ? n >= o : n <= o; ) i.toRegex === !0 && r > 1 ? x(n) : w.push(Pg(E(n, R), f, h)), n = a ? n - r : n + r, R++; return i.toRegex === !0 ? r > 1 ? Og(m, i, f) : dl(w, null, { wrap: !1, ...i }) : w; }, "fillNumbers"), Dg = /* @__PURE__ */ s((t, e, r = 1, i = {}) => { if (!Bt(t) && t.length > 1 || !Bt(e) && e.length > 1) return ml(t, e, i); let n = i.transform || ((h) => String.fromCharCode(h)), o = `${t}`.charCodeAt(0), a = `${e}`.charCodeAt(0), l = o > a, u = Math.min(o, a), c = Math.max(o, a); if (i.toRegex && r === 1) return pl(u, c, !1, i); let p = [], f = 0; for (; l ? o >= a : o <= a; ) p.push(n(o, f)), o = l ? o - r : o + r, f++; return i.toRegex === !0 ? dl(p, null, { wrap: !1, options: i }) : p; }, "fillLetters"), wr = /* @__PURE__ */ s((t, e, r, i = {}) => { if (e == null && Hi(t)) return [t]; if (!Hi(t) || !Hi(e)) return ml(t, e, i); if (typeof r == "function") return wr(t, e, 1, { transform: r }); if (cl(r)) return wr(t, e, 0, r); let n = { ...i }; return n.capture === !0 && (n.wrap = !0), r = r || n.step || 1, Bt(r) ? Bt(t) && Bt(e) ? Ig(t, e, r, n) : Dg(t, e, Math.max(Math.abs(r), 1), n) : r != null && !cl(r) ? Cg(r, n) : wr(t, e, 1, r); }, "fill"); gl.exports = wr; }); // ../node_modules/braces/lib/compile.js var xl = d((UT, _l) => { "use strict"; var Ng = Bi(), yl = Er(), Lg = /* @__PURE__ */ s((t, e = {}) => { let r = /* @__PURE__ */ s((i, n = {}) => { let o = yl.isInvalidBrace(n), a = i.invalid === !0 && e.escapeInvalid === !0, l = o === !0 || a === !0, u = e.escapeInvalid === !0 ? "\ \\" : "", c = ""; if (i.isOpen === !0) return u + i.value; if (i.isClose === !0) return console.log("node.isClose", u, i.value), u + i.value; if (i.type === "open") return l ? u + i.value : "("; if (i.type === "close") return l ? u + i.value : ")"; if (i.type === "comma") return i.prev.type === "comma" ? "" : l ? i.value : "|"; if (i.value) return i.value; if (i.nodes && i.ranges > 0) { let p = yl.reduce(i.nodes), f = Ng(...p, { ...e, wrap: !1, toRegex: !0, strictZeros: !0 }); if (f.length !== 0) return p.length > 1 && f.length > 1 ? `(${f})` : f; } if (i.nodes) for (let p of i.nodes) c += r(p, i); return c; }, "walk"); return r(t); }, "compile"); _l.exports = Lg; }); // ../node_modules/braces/lib/expand.js var El = d((WT, Sl) => { "use strict"; var kg = Bi(), bl = vr(), bt = Er(), ct = /* @__PURE__ */ s((t = "", e = "", r = !1) => { let i = []; if (t = [].concat(t), e = [].concat(e), !e.length) return t; if (!t.length) return r ? bt.flatten(e).map((n) => `{${n}}`) : e; for (let n of t) if (Array.isArray(n)) for (let o of n) i.push(ct(o, e, r)); else for (let o of e) r === !0 && typeof o == "string" && (o = `{${o}}`), i.push(Array.isArray(o) ? ct(n, o, r) : n + o); return bt.flatten(i); }, "append"), Mg = /* @__PURE__ */ s((t, e = {}) => { let r = e.rangeLimit === void 0 ? 1e3 : e.rangeLimit, i = /* @__PURE__ */ s((n, o = {}) => { n.queue = []; let a = o, l = o.queue; for (; a.type !== "brace" && a.type !== "root" && a.parent; ) a = a.parent, l = a.queue; if (n.invalid || n.dollar) { l.push(ct(l.pop(), bl(n, e))); return; } if (n.type === "brace" && n.invalid !== !0 && n.nodes.length === 2) { l.push(ct(l.pop(), ["{}"])); return; } if (n.nodes && n.ranges > 0) { let f = bt.reduce(n.nodes); if (bt.exceedsLimit(...f, e.step, r)) throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit."); let h = kg(...f, e); h.length === 0 && (h = bl(n, e)), l.push(ct(l.pop(), h)), n.nodes = []; return; } let u = bt.encloseBrace(n), c = n.queue, p = n; for (; p.type !== "brace" && p.type !== "root" && p.parent; ) p = p.parent, c = p.queue; for (let f = 0; f < n.nodes.length; f++) { let h = n.nodes[f]; if (h.type === "comma" && n.type === "brace") { f === 1 && c.push(""), c.push(""); continue; } if (h.type === "close") { l.push(ct(l.pop(), c, u)); continue; } if (h.value && h.type !== "open") { c.push(ct(c.pop(), h.value)); continue; } h.nodes && i(h, n); } return c; }, "walk"); return bt.flatten(i(t)); }, "expand"); Sl.exports = Mg; }); // ../node_modules/braces/lib/constants.js var wl = d((VT, vl) => { "use strict"; vl.exports = { MAX_LENGTH: 1e4, // Digits CHAR_0: "0", /* 0 */ CHAR_9: "9", /* 9 */ // Alphabet chars. CHAR_UPPERCASE_A: "A", /* A */ CHAR_LOWERCASE_A: "a", /* a */ CHAR_UPPERCASE_Z: "Z", /* Z */ CHAR_LOWERCASE_Z: "z", /* z */ CHAR_LEFT_PARENTHESES: "(", /* ( */ CHAR_RIGHT_PARENTHESES: ")", /* ) */ CHAR_ASTERISK: "*", /* * */ // Non-alphabetic chars. CHAR_AMPERSAND: "&", /* & */ CHAR_AT: "@", /* @ */ CHAR_BACKSLASH: "\\", /* \ */ CHAR_BACKTICK: "`", /* ` */ CHAR_CARRIAGE_RETURN: "\r", /* \r */ CHAR_CIRCUMFLEX_ACCENT: "^", /* ^ */ CHAR_COLON: ":", /* : */ CHAR_COMMA: ",", /* , */ CHAR_DOLLAR: "$", /* . */ CHAR_DOT: ".", /* . */ CHAR_DOUBLE_QUOTE: '"', /* " */ CHAR_EQUAL: "=", /* = */ CHAR_EXCLAMATION_MARK: "!", /* ! */ CHAR_FORM_FEED: "\f", /* \f */ CHAR_FORWARD_SLASH: "/", /* / */ CHAR_HASH: "#", /* # */ CHAR_HYPHEN_MINUS: "-", /* - */ CHAR_LEFT_ANGLE_BRACKET: "<", /* < */ CHAR_LEFT_CURLY_BRACE: "{", /* { */ CHAR_LEFT_SQUARE_BRACKET: "[", /* [ */ CHAR_LINE_FEED: ` `, /* \n */ CHAR_NO_BREAK_SPACE: "\xA0", /* \u00A0 */ CHAR_PERCENT: "%", /* % */ CHAR_PLUS: "+", /* + */ CHAR_QUESTION_MARK: "?", /* ? */ CHAR_RIGHT_ANGLE_BRACKET: ">", /* > */ CHAR_RIGHT_CURLY_BRACE: "}", /* } */ CHAR_RIGHT_SQUARE_BRACKET: "]", /* ] */ CHAR_SEMICOLON: ";", /* ; */ CHAR_SINGLE_QUOTE: "'", /* ' */ CHAR_SPACE: " ", /* */ CHAR_TAB: " ", /* \t */ CHAR_UNDERSCORE: "_", /* _ */ CHAR_VERTICAL_LINE: "|", /* | */ CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF" /* \uFEFF */ }; }); // ../node_modules/braces/lib/parse.js var Ol = d((zT, Pl) => { "use strict"; var $g = vr(), { MAX_LENGTH: Rl, CHAR_BACKSLASH: Ui, /* \ */ CHAR_BACKTICK: qg, /* ` */ CHAR_COMMA: Fg, /* , */ CHAR_DOT: Hg, /* . */ CHAR_LEFT_PARENTHESES: jg, /* ( */ CHAR_RIGHT_PARENTHESES: Bg, /* ) */ CHAR_LEFT_CURLY_BRACE: Ug, /* { */ CHAR_RIGHT_CURLY_BRACE: Gg, /* } */ CHAR_LEFT_SQUARE_BRACKET: Tl, /* [ */ CHAR_RIGHT_SQUARE_BRACKET: Al, /* ] */ CHAR_DOUBLE_QUOTE: Wg, /* " */ CHAR_SINGLE_QUOTE: Yg, /* ' */ CHAR_NO_BREAK_SPACE: Vg, CHAR_ZERO_WIDTH_NOBREAK_SPACE: zg } = wl(), Kg = /* @__PURE__ */ s((t, e = {}) => { if (typeof t != "string") throw new TypeError("Expected a string"); let r = e || {}, i = typeof r.maxLength == "number" ? Math.min(Rl, r.maxLength) : Rl; if (t.length > i) throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${i})`); let n = { type: "root", input: t, nodes: [] }, o = [n], a = n, l = n, u = 0, c = t.length, p = 0, f = 0, h, E = /* @__PURE__ */ s(() => t[p++], "advance"), m = /* @__PURE__ */ s((x) => { if (x.type === "text" && l.type === "dot" && (l.type = "text"), l && l.type === "text" && x.type === "text") { l.value += x.value; return; } return a.nodes.push(x), x.parent = a, x.prev = l, l = x, x; }, "push"); for (m({ type: "bos" }); p < c; ) if (a = o[o.length - 1], h = E(), !(h === zg || h === Vg)) { if (h === Ui) { m({ type: "text", value: (e.keepEscaping ? h : "") + E() }); continue; } if (h === Al) { m({ type: "text", value: "\\" + h }); continue; } if (h === Tl) { u++; let x; for (; p < c && (x = E()); ) { if (h += x, x === Tl) { u++; continue; } if (x === Ui) { h += E(); continue; } if (x === Al && (u--, u === 0)) break; } m({ type: "text", value: h }); continue; } if (h === jg) { a = m({ type: "paren", nodes: [] }), o.push(a), m({ type: "text", value: h }); continue; } if (h === Bg) { if (a.type !== "paren") { m({ type: "text", value: h }); continue; } a = o.pop(), m({ type: "text", value: h }), a = o[o.length - 1]; continue; } if (h === Wg || h === Yg || h === qg) { let x = h, w; for (e.keepQuotes !== !0 && (h = ""); p < c && (w = E()); ) { if (w === Ui) { h += w + E(); continue; } if (w === x) { e.keepQuotes === !0 && (h += w); break; } h += w; } m({ type: "text", value: h }); continue; } if (h === Ug) { f++; let w = { type: "brace", open: !0, close: !1, dollar: l.value && l.value.slice(-1) === "$" || a.dollar === !0, depth: f, commas: 0, ranges: 0, nodes: [] }; a = m(w), o.push(a), m({ type: "open", value: h }); continue; } if (h === Gg) { if (a.type !== "brace") { m({ type: "text", value: h }); continue; } let x = "close"; a = o.pop(), a.close = !0, m({ type: x, value: h }), f--, a = o[o.length - 1]; continue; } if (h === Fg && f > 0) { if (a.ranges > 0) { a.ranges = 0; let x = a.nodes.shift(); a.nodes = [x, { type: "text", value: $g(a) }]; } m({ type: "comma", value: h }), a.commas++; continue; } if (h === Hg && f > 0 && a.commas === 0) { let x = a.nodes; if (f === 0 || x.length === 0) { m({ type: "text", value: h }); continue; } if (l.type === "dot") { if (a.range = [], l.value += h, l.type = "range", a.nodes.length !== 3 && a.nodes.length !== 5) { a.invalid = !0, a.ranges = 0, l.type = "text"; continue; } a.ranges++, a.args = []; continue; } if (l.type === "range") { x.pop(); let w = x[x.length - 1]; w.value += l.value + h, l = w, a.ranges--; continue; } m({ type: "dot", value: h }); continue; } m({ type: "text", value: h }); } do if (a = o.pop(), a.type !== "root") { a.nodes.forEach((R) => { R.nodes || (R.type === "open" && (R.isOpen = !0), R.type === "close" && (R.isClose = !0), R.nodes || (R.type = "text"), R.invalid = !0); }); let x = o[o.length - 1], w = x.nodes.indexOf(a); x.nodes.splice(w, 1, ...a.nodes); } while (o.length > 0); return m({ type: "eos" }), n; }, "parse"); Pl.exports = Kg; }); // ../node_modules/braces/index.js var Dl = d((QT, Il) => { "use strict"; var Cl = vr(), Qg = xl(), Xg = El(), Zg = Ol(), ce = /* @__PURE__ */ s((t, e = {}) => { let r = []; if (Array.isArray(t)) for (let i of t) { let n = ce.create(i, e); Array.isArray(n) ? r.push(...n) : r.push(n); } else r = [].concat(ce.create(t, e)); return e && e.expand === !0 && e.nodupes === !0 && (r = [...new Set(r)]), r; }, "braces"); ce.parse = (t, e = {}) => Zg(t, e); ce.stringify = (t, e = {}) => Cl(typeof t == "string" ? ce.parse(t, e) : t, e); ce.compile = (t, e = {}) => (typeof t == "string" && (t = ce.parse(t, e)), Qg(t, e)); ce.expand = (t, e = {}) => { typeof t == "string" && (t = ce.parse(t, e)); let r = Xg(t, e); return e.noempty === !0 && (r = r.filter(Boolean)), e.nodupes === !0 && (r = [...new Set(r)]), r; }; ce.create = (t, e = {}) => t === "" || t.length < 3 ? [t] : e.expand !== !0 ? ce.compile(t, e) : ce.expand(t, e); Il.exports = ce; }); // ../node_modules/picomatch/lib/constants.js var Ut = d((ZT, $l) => { "use strict"; var Jg = require("path"), Pe = "\\\\/", Nl = `[^${Pe}]`, qe = "\\.", ey = "\\+", ty = "\\?", Tr = "\\/", ry = "(?=.)", Ll = "[^/]", Gi = `\ (?:${Tr}|$)`, kl = `(?:^|${Tr})`, Wi = `${qe}{1,2}${Gi}`, iy = `(?!${qe})`, sy = `(?!${kl}${Wi})`, ny = `(?!${qe}{0,1}${Gi})`, oy = `(?!${Wi}\ )`, ay = `[^.${Tr}]`, ly = `${Ll}*?`, Ml = { DOT_LITERAL: qe, PLUS_LITERAL: ey, QMARK_LITERAL: ty, SLASH_LITERAL: Tr, ONE_CHAR: ry, QMARK: Ll, END_ANCHOR: Gi, DOTS_SLASH: Wi, NO_DOT: iy, NO_DOTS: sy, NO_DOT_SLASH: ny, NO_DOTS_SLASH: oy, QMARK_NO_DOT: ay, STAR: ly, START_ANCHOR: kl }, uy = { ...Ml, SLASH_LITERAL: `[${Pe}]`, QMARK: Nl, STAR: `${Nl}*?`, DOTS_SLASH: `${qe}{1,2}(?:[${Pe}]|$)`, NO_DOT: `(?!${qe})`, NO_DOTS: `(?!(?:^|[${Pe}])${qe}{1,2}(?:[${Pe}]|$))`, NO_DOT_SLASH: `(?!${qe}{0,1}(?:[${Pe}]|$))`, NO_DOTS_SLASH: `(?!${qe}{1,2}(?:[${Pe}]|$))`, QMARK_NO_DOT: `[^.${Pe}]`, START_ANCHOR: `(?:^|[${Pe}])`, END_ANCHOR: `(?:[${Pe}]|$)` }, cy = { alnum: "a-zA-Z0-9", alpha: "a-zA-Z", ascii: "\\x00-\\x7F", blank: " \\t", cntrl: "\\x00-\\x1F\\x7F", digit: "0-9", graph: "\\x21-\\x7E", lower: "a-z", print: "\\x20-\\x7E ", punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", space: " \\t\\r\\n\\v\\f", upper: "A-Z", word: "A-Za-z0-9_", xdigit: "A-Fa-f0-9" }; $l.exports = { MAX_LENGTH: 1024 * 64, POSIX_REGEX_SOURCE: cy, // regular expressions REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, // Replace globs with equivalent patterns to reduce parsing time. REPLACEMENTS: { "***": "*", "**/**": "**", "**/**/**": "**" }, // Digits CHAR_0: 48, /* 0 */ CHAR_9: 57, /* 9 */ // Alphabet chars. CHAR_UPPERCASE_A: 65, /* A */ CHAR_LOWERCASE_A: 97, /* a */ CHAR_UPPERCASE_Z: 90, /* Z */ CHAR_LOWERCASE_Z: 122, /* z */ CHAR_LEFT_PARENTHESES: 40, /* ( */ CHAR_RIGHT_PARENTHESES: 41, /* ) */ CHAR_ASTERISK: 42, /* * */ // Non-alphabetic chars. CHAR_AMPERSAND: 38, /* & */ CHAR_AT: 64, /* @ */ CHAR_BACKWARD_SLASH: 92, /* \ */ CHAR_CARRIAGE_RETURN: 13, /* \r */ CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ CHAR_COLON: 58, /* : */ CHAR_COMMA: 44, /* , */ CHAR_DOT: 46, /* . */ CHAR_DOUBLE_QUOTE: 34, /* " */ CHAR_EQUAL: 61, /* = */ CHAR_EXCLAMATION_MARK: 33, /* ! */ CHAR_FORM_FEED: 12, /* \f */ CHAR_FORWARD_SLASH: 47, /* / */ CHAR_GRAVE_ACCENT: 96, /* ` */ CHAR_HASH: 35, /* # */ CHAR_HYPHEN_MINUS: 45, /* - */ CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ CHAR_LEFT_CURLY_BRACE: 123, /* { */ CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ CHAR_LINE_FEED: 10, /* \n */ CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ CHAR_PERCENT: 37, /* % */ CHAR_PLUS: 43, /* + */ CHAR_QUESTION_MARK: 63, /* ? */ CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ CHAR_RIGHT_CURLY_BRACE: 125, /* } */ CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ CHAR_SEMICOLON: 59, /* ; */ CHAR_SINGLE_QUOTE: 39, /* ' */ CHAR_SPACE: 32, /* */ CHAR_TAB: 9, /* \t */ CHAR_UNDERSCORE: 95, /* _ */ CHAR_VERTICAL_LINE: 124, /* | */ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ SEP: Jg.sep, /** * Create EXTGLOB_CHARS */ extglobChars(t) { return { "!": { type: "negate", open: "(?:(?!(?:", close: `))${t.STAR})` }, "?": { type: "qmark", open: "(?:", close: ")?" }, "+": { type: "plus", open: "(?:", close: ")+" }, "*": { type: "star", open: "(?:", close: ")*" }, "@": { type: "at", open: "(?:", close: ")" } }; }, /** * Create GLOB_CHARS */ globChars(t) { return t === !0 ? uy : Ml; } }; }); // ../node_modules/picomatch/lib/utils.js var Gt = d((oe) => { "use strict"; var hy = require("path"), py = process.platform === "win32", { REGEX_BACKSLASH: dy, REGEX_REMOVE_BACKSLASH: fy, REGEX_SPECIAL_CHARS: my, REGEX_SPECIAL_CHARS_GLOBAL: gy } = Ut(); oe.isObject = (t) => t !== null && typeof t == "object" && !Array.isArray(t); oe.hasRegexChars = (t) => my.test(t); oe.isRegexChar = (t) => t.length === 1 && oe.hasRegexChars(t); oe.escapeRegex = (t) => t.replace(gy, "\\$1"); oe.toPosixSlashes = (t) => t.replace(dy, "/"); oe.removeBackslashes = (t) => t.replace(fy, (e) => e === "\\" ? "" : e); oe.supportsLookbehinds = () => { let t = process.version.slice(1).split(".").map(Number); return t.length === 3 && t[0] >= 9 || t[0] === 8 && t[1] >= 10; }; oe.isWindows = (t) => t && typeof t.windows == "boolean" ? t.windows : py === !0 || hy.sep === "\\"; oe.escapeLast = (t, e, r) => { let i = t.lastIndexOf(e, r); return i === -1 ? t : t[i - 1] === "\\" ? oe.escapeLast(t, e, i - 1) : `${t.slice(0, i)}\\${t.slice(i)}`; }; oe.removePrefix = (t, e = {}) => { let r = t; return r.startsWith("./") && (r = r.slice(2), e.prefix = "./"), r; }; oe.wrapOutput = (t, e = {}, r = {}) => { let i = r.contains ? "" : "^", n = r.contains ? "" : "$", o = `${i}(?:${t})${n}`; return e.negated === !0 && (o = `(?:^(?!${o}).*$)`), o; }; }); // ../node_modules/picomatch/lib/scan.js var Wl = d((eA, Gl) => { "use strict"; var ql = Gt(), { CHAR_ASTERISK: Yi, /* * */ CHAR_AT: yy, /* @ */ CHAR_BACKWARD_SLASH: Wt, /* \ */ CHAR_COMMA: _y, /* , */ CHAR_DOT: Vi, /* . */ CHAR_EXCLAMATION_MARK: zi, /* ! */ CHAR_FORWARD_SLASH: Ul, /* / */ CHAR_LEFT_CURLY_BRACE: Ki, /* { */ CHAR_LEFT_PARENTHESES: Qi, /* ( */ CHAR_LEFT_SQUARE_BRACKET: xy, /* [ */ CHAR_PLUS: by, /* + */ CHAR_QUESTION_MARK: Fl, /* ? */ CHAR_RIGHT_CURLY_BRACE: Sy, /* } */ CHAR_RIGHT_PARENTHESES: Hl, /* ) */ CHAR_RIGHT_SQUARE_BRACKET: Ey /* ] */ } = Ut(), jl = /* @__PURE__ */ s((t) => t === Ul || t === Wt, "isPathSeparator"), Bl = /* @__PURE__ */ s((t) => { t.isPrefix !== !0 && (t.depth = t.isGlobstar ? 1 / 0 : 1); }, "depth"), vy = /* @__PURE__ */ s((t, e) => { let r = e || {}, i = t.length - 1, n = r.parts === !0 || r.scanToEnd === !0, o = [], a = [], l = [], u = t, c = -1, p = 0, f = 0, h = !1, E = !1, m = !1, x = !1, w = !1, R = !1, N = !1, C = !1, W = !1, P = !1, k = 0, O, A, M = { value: "", depth: 0, isGlob: !1 }, J = /* @__PURE__ */ s( () => c >= i, "eos"), _ = /* @__PURE__ */ s(() => u.charCodeAt(c + 1), "peek"), U = /* @__PURE__ */ s(() => (O = A, u.charCodeAt(++c)), "\ advance"); for (; c < i; ) { A = U(); let ie; if (A === Wt) { N = M.backslashes = !0, A = U(), A === Ki && (R = !0); continue; } if (R === !0 || A === Ki) { for (k++; J() !== !0 && (A = U()); ) { if (A === Wt) { N = M.backslashes = !0, U(); continue; } if (A === Ki) { k++; continue; } if (R !== !0 && A === Vi && (A = U()) === Vi) { if (h = M.isBrace = !0, m = M.isGlob = !0, P = !0, n === !0) continue; break; } if (R !== !0 && A === _y) { if (h = M.isBrace = !0, m = M.isGlob = !0, P = !0, n === !0) continue; break; } if (A === Sy && (k--, k === 0)) { R = !1, h = M.isBrace = !0, P = !0; break; } } if (n === !0) continue; break; } if (A === Ul) { if (o.push(c), a.push(M), M = { value: "", depth: 0, isGlob: !1 }, P === !0) continue; if (O === Vi && c === p + 1) { p += 2; continue; } f = c + 1; continue; } if (r.noext !== !0 && (A === by || A === yy || A === Yi || A === Fl || A === zi) === !0 && _() === Qi) { if (m = M.isGlob = !0, x = M.isExtglob = !0, P = !0, A === zi && c === p && (W = !0), n === !0) { for (; J() !== !0 && (A = U()); ) { if (A === Wt) { N = M.backslashes = !0, A = U(); continue; } if (A === Hl) { m = M.isGlob = !0, P = !0; break; } } continue; } break; } if (A === Yi) { if (O === Yi && (w = M.isGlobstar = !0), m = M.isGlob = !0, P = !0, n === !0) continue; break; } if (A === Fl) { if (m = M.isGlob = !0, P = !0, n === !0) continue; break; } if (A === xy) { for (; J() !== !0 && (ie = U()); ) { if (ie === Wt) { N = M.backslashes = !0, U(); continue; } if (ie === Ey) { E = M.isBracket = !0, m = M.isGlob = !0, P = !0; break; } } if (n === !0) continue; break; } if (r.nonegate !== !0 && A === zi && c === p) { C = M.negated = !0, p++; continue; } if (r.noparen !== !0 && A === Qi) { if (m = M.isGlob = !0, n === !0) { for (; J() !== !0 && (A = U()); ) { if (A === Qi) { N = M.backslashes = !0, A = U(); continue; } if (A === Hl) { P = !0; break; } } continue; } break; } if (m === !0) { if (P = !0, n === !0) continue; break; } } r.noext === !0 && (x = !1, m = !1); let H = u, Ke = "", g = ""; p > 0 && (Ke = u.slice(0, p), u = u.slice(p), f -= p), H && m === !0 && f > 0 ? (H = u.slice(0, f), g = u.slice(f)) : m === !0 ? (H = "", g = u) : H = u, H && H !== "" && H !== "/" && H !== u && jl(H.charCodeAt(H.length - 1)) && (H = H.slice(0, -1)), r.unescape === !0 && (g && (g = ql.removeBackslashes(g)), H && N === !0 && (H = ql.removeBackslashes(H))); let y = { prefix: Ke, input: t, start: p, base: H, glob: g, isBrace: h, isBracket: E, isGlob: m, isExtglob: x, isGlobstar: w, negated: C, negatedExtglob: W }; if (r.tokens === !0 && (y.maxDepth = 0, jl(A) || a.push(M), y.tokens = a), r.parts === !0 || r.tokens === !0) { let ie; for (let L = 0; L < o.length; L++) { let Te = ie ? ie + 1 : p, Ae = o[L], ue = t.slice(Te, Ae); r.tokens && (L === 0 && p !== 0 ? (a[L].isPrefix = !0, a[L].value = Ke) : a[L].value = ue, Bl(a[L]), y.maxDepth += a[L].depth), (L !== 0 || ue !== "") && l.push(ue), ie = Ae; } if (ie && ie + 1 < t.length) { let L = t.slice(ie + 1); l.push(L), r.tokens && (a[a.length - 1].value = L, Bl(a[a.length - 1]), y.maxDepth += a[a.length - 1].depth); } y.slashes = o, y.parts = l; } return y; }, "scan"); Gl.exports = vy; }); // ../node_modules/picomatch/lib/parse.js var zl = d((rA, Vl) => { "use strict"; var Ar = Ut(), he = Gt(), { MAX_LENGTH: Pr, POSIX_REGEX_SOURCE: wy, REGEX_NON_SPECIAL_CHARS: Ry, REGEX_SPECIAL_CHARS_BACKREF: Ty, REPLACEMENTS: Yl } = Ar, Ay = /* @__PURE__ */ s((t, e) => { if (typeof e.expandRange == "function") return e.expandRange(...t, e); t.sort(); let r = `[${t.join("-")}]`; try { new RegExp(r); } catch { return t.map((n) => he.escapeRegex(n)).join(".."); } return r; }, "expandRange"), St = /* @__PURE__ */ s((t, e) => `Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`, "syntaxError"), Xi = /* @__PURE__ */ s( (t, e) => { if (typeof t != "string") throw new TypeError("Expected a string"); t = Yl[t] || t; let r = { ...e }, i = typeof r.maxLength == "number" ? Math.min(Pr, r.maxLength) : Pr, n = t.length; if (n > i) throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`); let o = { type: "bos", value: "", output: r.prepend || "" }, a = [o], l = r.capture ? "" : "?:", u = he.isWindows(e), c = Ar.globChars(u), p = Ar.extglobChars(c), { DOT_LITERAL: f, PLUS_LITERAL: h, SLASH_LITERAL: E, ONE_CHAR: m, DOTS_SLASH: x, NO_DOT: w, NO_DOT_SLASH: R, NO_DOTS_SLASH: N, QMARK: C, QMARK_NO_DOT: W, STAR: P, START_ANCHOR: k } = c, O = /* @__PURE__ */ s((S) => `(${l}(?:(?!${k}${S.dot ? x : f}).)*?)`, "globstar"), A = r.dot ? "" : w, M = r.dot ? C : W, J = r.bash === !0 ? O(r) : P; r.capture && (J = `(${J})`), typeof r.noext == "boolean" && (r.noextglob = r.noext); let _ = { input: t, index: -1, start: 0, dot: r.dot === !0, consumed: "", output: "", prefix: "", backtrack: !1, negated: !1, brackets: 0, braces: 0, parens: 0, quotes: 0, globstar: !1, tokens: a }; t = he.removePrefix(t, _), n = t.length; let U = [], H = [], Ke = [], g = o, y, ie = /* @__PURE__ */ s(() => _.index === n - 1, "eos"), L = _.peek = (S = 1) => t[_.index + S], Te = _. advance = () => t[++_.index] || "", Ae = /* @__PURE__ */ s(() => t.slice(_.index + 1), "remaining"), ue = /* @__PURE__ */ s((S = "", j = 0) => { _.consumed += S, _.index += j; }, "consume"), cr = /* @__PURE__ */ s((S) => { _.output += S.output != null ? S.output : S.value, ue(S.value); }, "append"), Tm = /* @__PURE__ */ s(() => { let S = 1; for (; L() === "!" && (L(2) !== "(" || L(3) === "?"); ) Te(), _.start++, S++; return S % 2 === 0 ? !1 : (_.negated = !0, _.start++, !0); }, "negate"), hr = /* @__PURE__ */ s((S) => { _[S]++, Ke.push(S); }, "increment"), lt = /* @__PURE__ */ s((S) => { _[S]--, Ke.pop(); }, "decrement"), D = /* @__PURE__ */ s((S) => { if (g.type === "globstar") { let j = _.braces > 0 && (S.type === "comma" || S.type === "brace"), b = S.extglob === !0 || U.length && (S.type === "pipe" || S.type === "paren"); S.type !== "slash" && S.type !== "paren" && !j && !b && (_.output = _.output.slice(0, -g.output.length), g.type = "star", g.value = "\ *", g.output = J, _.output += g.output); } if (U.length && S.type !== "paren" && (U[U.length - 1].inner += S.value), (S.value || S.output) && cr(S), g && g.type === "text" && S. type === "text") { g.value += S.value, g.output = (g.output || "") + S.value; return; } S.prev = g, a.push(S), g = S; }, "push"), pr = /* @__PURE__ */ s((S, j) => { let b = { ...p[j], conditions: 1, inner: "" }; b.prev = g, b.parens = _.parens, b.output = _.output; let I = (r.capture ? "(" : "") + b.open; hr("parens"), D({ type: S, value: j, output: _.output ? "" : m }), D({ type: "paren", extglob: !0, value: Te(), output: I }), U.push(b); }, "extglobOpen"), Am = /* @__PURE__ */ s((S) => { let j = S.close + (r.capture ? ")" : ""), b; if (S.type === "negate") { let I = J; if (S.inner && S.inner.length > 1 && S.inner.includes("/") && (I = O(r)), (I !== J || ie() || /^\)+$/.test(Ae())) && (j = S.close = `\ )$))${I}`), S.inner.includes("*") && (b = Ae()) && /^\.[^\\/.]+$/.test(b)) { let Y = Xi(b, { ...e, fastpaths: !1 }).output; j = S.close = `)${Y})${I})`; } S.prev.type === "bos" && (_.negatedExtglob = !0); } D({ type: "paren", extglob: !0, value: y, output: j }), lt("parens"); }, "extglobClose"); if (r.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(t)) { let S = !1, j = t.replace(Ty, (b, I, Y, se, Z, vi) => se === "\\" ? (S = !0, b) : se === "?" ? I ? I + se + (Z ? C.repeat(Z.length) : "") : vi === 0 ? M + (Z ? C.repeat(Z.length) : "") : C.repeat(Y.length) : se === "." ? f.repeat(Y.length) : se === "*" ? I ? I + se + (Z ? J : "") : J : I ? b : `\\${b}`); return S === !0 && (r.unescape === !0 ? j = j.replace(/\\/g, "") : j = j.replace(/\\+/g, (b) => b.length % 2 === 0 ? "\\\\" : b ? "\\" : "")), j === t && r.contains === !0 ? (_.output = t, _) : (_.output = he.wrapOutput(j, _, e), _); } for (; !ie(); ) { if (y = Te(), y === "\0") continue; if (y === "\\") { let b = L(); if (b === "/" && r.bash !== !0 || b === "." || b === ";") continue; if (!b) { y += "\\", D({ type: "text", value: y }); continue; } let I = /^\\+/.exec(Ae()), Y = 0; if (I && I[0].length > 2 && (Y = I[0].length, _.index += Y, Y % 2 !== 0 && (y += "\\")), r.unescape === !0 ? y = Te() : y += Te(), _. brackets === 0) { D({ type: "text", value: y }); continue; } } if (_.brackets > 0 && (y !== "]" || g.value === "[" || g.value === "[^")) { if (r.posix !== !1 && y === ":") { let b = g.value.slice(1); if (b.includes("[") && (g.posix = !0, b.includes(":"))) { let I = g.value.lastIndexOf("["), Y = g.value.slice(0, I), se = g.value.slice(I + 2), Z = wy[se]; if (Z) { g.value = Y + Z, _.backtrack = !0, Te(), !o.output && a.indexOf(g) === 1 && (o.output = m); continue; } } } (y === "[" && L() !== ":" || y === "-" && L() === "]") && (y = `\\${y}`), y === "]" && (g.value === "[" || g.value === "[^") && (y = `\\${y}`), r.posix === !0 && y === "!" && g.value === "[" && (y = "^"), g.value += y, cr({ value: y }); continue; } if (_.quotes === 1 && y !== '"') { y = he.escapeRegex(y), g.value += y, cr({ value: y }); continue; } if (y === '"') { _.quotes = _.quotes === 1 ? 0 : 1, r.keepQuotes === !0 && D({ type: "text", value: y }); continue; } if (y === "(") { hr("parens"), D({ type: "paren", value: y }); continue; } if (y === ")") { if (_.parens === 0 && r.strictBrackets === !0) throw new SyntaxError(St("opening", "(")); let b = U[U.length - 1]; if (b && _.parens === b.parens + 1) { Am(U.pop()); continue; } D({ type: "paren", value: y, output: _.parens ? ")" : "\\)" }), lt("parens"); continue; } if (y === "[") { if (r.nobracket === !0 || !Ae().includes("]")) { if (r.nobracket !== !0 && r.strictBrackets === !0) throw new SyntaxError(St("closing", "]")); y = `\\${y}`; } else hr("brackets"); D({ type: "bracket", value: y }); continue; } if (y === "]") { if (r.nobracket === !0 || g && g.type === "bracket" && g.value.length === 1) { D({ type: "text", value: y, output: `\\${y}` }); continue; } if (_.brackets === 0) { if (r.strictBrackets === !0) throw new SyntaxError(St("opening", "[")); D({ type: "text", value: y, output: `\\${y}` }); continue; } lt("brackets"); let b = g.value.slice(1); if (g.posix !== !0 && b[0] === "^" && !b.includes("/") && (y = `/${y}`), g.value += y, cr({ value: y }), r.literalBrackets === !1 || he.hasRegexChars(b)) continue; let I = he.escapeRegex(g.value); if (_.output = _.output.slice(0, -g.value.length), r.literalBrackets === !0) { _.output += I, g.value = I; continue; } g.value = `(${l}${I}|${g.value})`, _.output += g.value; continue; } if (y === "{" && r.nobrace !== !0) { hr("braces"); let b = { type: "brace", value: y, output: "(", outputIndex: _.output.length, tokensIndex: _.tokens.length }; H.push(b), D(b); continue; } if (y === "}") { let b = H[H.length - 1]; if (r.nobrace === !0 || !b) { D({ type: "text", value: y, output: y }); continue; } let I = ")"; if (b.dots === !0) { let Y = a.slice(), se = []; for (let Z = Y.length - 1; Z >= 0 && (a.pop(), Y[Z].type !== "brace"); Z--) Y[Z].type !== "dots" && se.unshift(Y[Z].value); I = Ay(se, r), _.backtrack = !0; } if (b.comma !== !0 && b.dots !== !0) { let Y = _.output.slice(0, b.outputIndex), se = _.tokens.slice(b.tokensIndex); b.value = b.output = "\\{", y = I = "\\}", _.output = Y; for (let Z of se) _.output += Z.output || Z.value; } D({ type: "brace", value: y, output: I }), lt("braces"), H.pop(); continue; } if (y === "|") { U.length > 0 && U[U.length - 1].conditions++, D({ type: "text", value: y }); continue; } if (y === ",") { let b = y, I = H[H.length - 1]; I && Ke[Ke.length - 1] === "braces" && (I.comma = !0, b = "|"), D({ type: "comma", value: y, output: b }); continue; } if (y === "/") { if (g.type === "dot" && _.index === _.start + 1) { _.start = _.index + 1, _.consumed = "", _.output = "", a.pop(), g = o; continue; } D({ type: "slash", value: y, output: E }); continue; } if (y === ".") { if (_.braces > 0 && g.type === "dot") { g.value === "." && (g.output = f); let b = H[H.length - 1]; g.type = "dots", g.output += y, g.value += y, b.dots = !0; continue; } if (_.braces + _.parens === 0 && g.type !== "bos" && g.type !== "slash") { D({ type: "text", value: y, output: f }); continue; } D({ type: "dot", value: y, output: f }); continue; } if (y === "?") { if (!(g && g.value === "(") && r.noextglob !== !0 && L() === "(" && L(2) !== "?") { pr("qmark", y); continue; } if (g && g.type === "paren") { let I = L(), Y = y; if (I === "<" && !he.supportsLookbehinds()) throw new Error("Node.js v10 or higher is required for regex lookbehinds"); (g.value === "(" && !/[!=<:]/.test(I) || I === "<" && !/<([!=]|\w+>)/.test(Ae())) && (Y = `\\${y}`), D({ type: "text", value: y, output: Y }); continue; } if (r.dot !== !0 && (g.type === "slash" || g.type === "bos")) { D({ type: "qmark", value: y, output: W }); continue; } D({ type: "qmark", value: y, output: C }); continue; } if (y === "!") { if (r.noextglob !== !0 && L() === "(" && (L(2) !== "?" || !/[!=<:]/.test(L(3)))) { pr("negate", y); continue; } if (r.nonegate !== !0 && _.index === 0) { Tm(); continue; } } if (y === "+") { if (r.noextglob !== !0 && L() === "(" && L(2) !== "?") { pr("plus", y); continue; } if (g && g.value === "(" || r.regex === !1) { D({ type: "plus", value: y, output: h }); continue; } if (g && (g.type === "bracket" || g.type === "paren" || g.type === "brace") || _.parens > 0) { D({ type: "plus", value: y }); continue; } D({ type: "plus", value: h }); continue; } if (y === "@") { if (r.noextglob !== !0 && L() === "(" && L(2) !== "?") { D({ type: "at", extglob: !0, value: y, output: "" }); continue; } D({ type: "text", value: y }); continue; } if (y !== "*") { (y === "$" || y === "^") && (y = `\\${y}`); let b = Ry.exec(Ae()); b && (y += b[0], _.index += b[0].length), D({ type: "text", value: y }); continue; } if (g && (g.type === "globstar" || g.star === !0)) { g.type = "star", g.star = !0, g.value += y, g.output = J, _.backtrack = !0, _.globstar = !0, ue(y); continue; } let S = Ae(); if (r.noextglob !== !0 && /^\([^?]/.test(S)) { pr("star", y); continue; } if (g.type === "star") { if (r.noglobstar === !0) { ue(y); continue; } let b = g.prev, I = b.prev, Y = b.type === "slash" || b.type === "bos", se = I && (I.type === "star" || I.type === "globstar"); if (r.bash === !0 && (!Y || S[0] && S[0] !== "/")) { D({ type: "star", value: y, output: "" }); continue; } let Z = _.braces > 0 && (b.type === "comma" || b.type === "brace"), vi = U.length && (b.type === "pipe" || b.type === "paren"); if (!Y && b.type !== "paren" && !Z && !vi) { D({ type: "star", value: y, output: "" }); continue; } for (; S.slice(0, 3) === "/**"; ) { let dr = t[_.index + 4]; if (dr && dr !== "/") break; S = S.slice(3), ue("/**", 3); } if (b.type === "bos" && ie()) { g.type = "globstar", g.value += y, g.output = O(r), _.output = g.output, _.globstar = !0, ue(y); continue; } if (b.type === "slash" && b.prev.type !== "bos" && !se && ie()) { _.output = _.output.slice(0, -(b.output + g.output).length), b.output = `(?:${b.output}`, g.type = "globstar", g.output = O(r) + (r. strictSlashes ? ")" : "|$)"), g.value += y, _.globstar = !0, _.output += b.output + g.output, ue(y); continue; } if (b.type === "slash" && b.prev.type !== "bos" && S[0] === "/") { let dr = S[1] !== void 0 ? "|$" : ""; _.output = _.output.slice(0, -(b.output + g.output).length), b.output = `(?:${b.output}`, g.type = "globstar", g.output = `${O(r)}${E}\ |${E}${dr})`, g.value += y, _.output += b.output + g.output, _.globstar = !0, ue(y + Te()), D({ type: "slash", value: "/", output: "" }); continue; } if (b.type === "bos" && S[0] === "/") { g.type = "globstar", g.value += y, g.output = `(?:^|${E}|${O(r)}${E})`, _.output = g.output, _.globstar = !0, ue(y + Te()), D({ type: "\ slash", value: "/", output: "" }); continue; } _.output = _.output.slice(0, -g.output.length), g.type = "globstar", g.output = O(r), g.value += y, _.output += g.output, _.globstar = !0, ue(y); continue; } let j = { type: "star", value: y, output: J }; if (r.bash === !0) { j.output = ".*?", (g.type === "bos" || g.type === "slash") && (j.output = A + j.output), D(j); continue; } if (g && (g.type === "bracket" || g.type === "paren") && r.regex === !0) { j.output = y, D(j); continue; } (_.index === _.start || g.type === "slash" || g.type === "dot") && (g.type === "dot" ? (_.output += R, g.output += R) : r.dot === !0 ? (_.output += N, g.output += N) : (_.output += A, g.output += A), L() !== "*" && (_.output += m, g.output += m)), D(j); } for (; _.brackets > 0; ) { if (r.strictBrackets === !0) throw new SyntaxError(St("closing", "]")); _.output = he.escapeLast(_.output, "["), lt("brackets"); } for (; _.parens > 0; ) { if (r.strictBrackets === !0) throw new SyntaxError(St("closing", ")")); _.output = he.escapeLast(_.output, "("), lt("parens"); } for (; _.braces > 0; ) { if (r.strictBrackets === !0) throw new SyntaxError(St("closing", "}")); _.output = he.escapeLast(_.output, "{"), lt("braces"); } if (r.strictSlashes !== !0 && (g.type === "star" || g.type === "bracket") && D({ type: "maybe_slash", value: "", output: `${E}?` }), _.backtrack === !0) { _.output = ""; for (let S of _.tokens) _.output += S.output != null ? S.output : S.value, S.suffix && (_.output += S.suffix); } return _; }, "parse"); Xi.fastpaths = (t, e) => { let r = { ...e }, i = typeof r.maxLength == "number" ? Math.min(Pr, r.maxLength) : Pr, n = t.length; if (n > i) throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`); t = Yl[t] || t; let o = he.isWindows(e), { DOT_LITERAL: a, SLASH_LITERAL: l, ONE_CHAR: u, DOTS_SLASH: c, NO_DOT: p, NO_DOTS: f, NO_DOTS_SLASH: h, STAR: E, START_ANCHOR: m } = Ar.globChars(o), x = r.dot ? f : p, w = r.dot ? h : p, R = r.capture ? "" : "?:", N = { negated: !1, prefix: "" }, C = r.bash === !0 ? ".*?" : E; r.capture && (C = `(${C})`); let W = /* @__PURE__ */ s((A) => A.noglobstar === !0 ? C : `(${R}(?:(?!${m}${A.dot ? c : a}).)*?)`, "globstar"), P = /* @__PURE__ */ s((A) => { switch (A) { case "*": return `${x}${u}${C}`; case ".*": return `${a}${u}${C}`; case "*.*": return `${x}${C}${a}${u}${C}`; case "*/*": return `${x}${C}${l}${u}${w}${C}`; case "**": return x + W(r); case "**/*": return `(?:${x}${W(r)}${l})?${w}${u}${C}`; case "**/*.*": return `(?:${x}${W(r)}${l})?${w}${C}${a}${u}${C}`; case "**/.*": return `(?:${x}${W(r)}${l})?${a}${u}${C}`; default: { let M = /^(.*?)\.(\w+)$/.exec(A); if (!M) return; let J = P(M[1]); return J ? J + a + M[2] : void 0; } } }, "create"), k = he.removePrefix(t, N), O = P(k); return O && r.strictSlashes !== !0 && (O += `${l}?`), O; }; Vl.exports = Xi; }); // ../node_modules/picomatch/lib/picomatch.js var Ql = d((sA, Kl) => { "use strict"; var Py = require("path"), Oy = Wl(), Zi = zl(), Ji = Gt(), Cy = Ut(), Iy = /* @__PURE__ */ s((t) => t && typeof t == "object" && !Array.isArray( t), "isObject"), Q = /* @__PURE__ */ s((t, e, r = !1) => { if (Array.isArray(t)) { let p = t.map((h) => Q(h, e, r)); return /* @__PURE__ */ s((h) => { for (let E of p) { let m = E(h); if (m) return m; } return !1; }, "arrayMatcher"); } let i = Iy(t) && t.tokens && t.input; if (t === "" || typeof t != "string" && !i) throw new TypeError("Expected pattern to be a non-empty string"); let n = e || {}, o = Ji.isWindows(e), a = i ? Q.compileRe(t, e) : Q.makeRe(t, e, !1, !0), l = a.state; delete a.state; let u = /* @__PURE__ */ s(() => !1, "isIgnored"); if (n.ignore) { let p = { ...e, ignore: null, onMatch: null, onResult: null }; u = Q(n.ignore, p, r); } let c = /* @__PURE__ */ s((p, f = !1) => { let { isMatch: h, match: E, output: m } = Q.test(p, a, e, { glob: t, posix: o }), x = { glob: t, state: l, regex: a, posix: o, input: p, output: m, match: E, isMatch: h }; return typeof n.onResult == "function" && n.onResult(x), h === !1 ? (x.isMatch = !1, f ? x : !1) : u(p) ? (typeof n.onIgnore == "funct\ ion" && n.onIgnore(x), x.isMatch = !1, f ? x : !1) : (typeof n.onMatch == "function" && n.onMatch(x), f ? x : !0); }, "matcher"); return r && (c.state = l), c; }, "picomatch"); Q.test = (t, e, r, { glob: i, posix: n } = {}) => { if (typeof t != "string") throw new TypeError("Expected input to be a string"); if (t === "") return { isMatch: !1, output: "" }; let o = r || {}, a = o.format || (n ? Ji.toPosixSlashes : null), l = t === i, u = l && a ? a(t) : t; return l === !1 && (u = a ? a(t) : t, l = u === i), (l === !1 || o.capture === !0) && (o.matchBase === !0 || o.basename === !0 ? l = Q.matchBase( t, e, r, n) : l = e.exec(u)), { isMatch: !!l, match: l, output: u }; }; Q.matchBase = (t, e, r, i = Ji.isWindows(r)) => (e instanceof RegExp ? e : Q.makeRe(e, r)).test(Py.basename(t)); Q.isMatch = (t, e, r) => Q(e, r)(t); Q.parse = (t, e) => Array.isArray(t) ? t.map((r) => Q.parse(r, e)) : Zi(t, { ...e, fastpaths: !1 }); Q.scan = (t, e) => Oy(t, e); Q.compileRe = (t, e, r = !1, i = !1) => { if (r === !0) return t.output; let n = e || {}, o = n.contains ? "" : "^", a = n.contains ? "" : "$", l = `${o}(?:${t.output})${a}`; t && t.negated === !0 && (l = `^(?!${l}).*$`); let u = Q.toRegex(l, e); return i === !0 && (u.state = t), u; }; Q.makeRe = (t, e = {}, r = !1, i = !1) => { if (!t || typeof t != "string") throw new TypeError("Expected a non-empty string"); let n = { negated: !1, fastpaths: !0 }; return e.fastpaths !== !1 && (t[0] === "." || t[0] === "*") && (n.output = Zi.fastpaths(t, e)), n.output || (n = Zi(t, e)), Q.compileRe( n, e, r, i); }; Q.toRegex = (t, e) => { try { let r = e || {}; return new RegExp(t, r.flags || (r.nocase ? "i" : "")); } catch (r) { if (e && e.debug === !0) throw r; return /$^/; } }; Q.constants = Cy; Kl.exports = Q; }); // ../node_modules/picomatch/index.js var Zl = d((oA, Xl) => { "use strict"; Xl.exports = Ql(); }); // ../node_modules/micromatch/index.js var iu = d((aA, ru) => { "use strict"; var eu = require("util"), tu = Dl(), Oe = Zl(), es = Gt(), Jl = /* @__PURE__ */ s((t) => t === "" || t === "./", "isEmptyString"), G = /* @__PURE__ */ s( (t, e, r) => { e = [].concat(e), t = [].concat(t); let i = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), a = 0, l = /* @__PURE__ */ s((p) => { o.add(p.output), r && r.onResult && r.onResult(p); }, "onResult"); for (let p = 0; p < e.length; p++) { let f = Oe(String(e[p]), { ...r, onResult: l }, !0), h = f.state.negated || f.state.negatedExtglob; h && a++; for (let E of t) { let m = f(E, !0); (h ? !m.isMatch : m.isMatch) && (h ? i.add(m.output) : (i.delete(m.output), n.add(m.output))); } } let c = (a === e.length ? [...o] : [...n]).filter((p) => !i.has(p)); if (r && c.length === 0) { if (r.failglob === !0) throw new Error(`No matches found for "${e.join(", ")}"`); if (r.nonull === !0 || r.nullglob === !0) return r.unescape ? e.map((p) => p.replace(/\\/g, "")) : e; } return c; }, "micromatch"); G.match = G; G.matcher = (t, e) => Oe(t, e); G.isMatch = (t, e, r) => Oe(e, r)(t); G.any = G.isMatch; G.not = (t, e, r = {}) => { e = [].concat(e).map(String); let i = /* @__PURE__ */ new Set(), n = [], o = /* @__PURE__ */ s((l) => { r.onResult && r.onResult(l), n.push(l.output); }, "onResult"), a = new Set(G(t, e, { ...r, onResult: o })); for (let l of n) a.has(l) || i.add(l); return [...i]; }; G.contains = (t, e, r) => { if (typeof t != "string") throw new TypeError(`Expected a string: "${eu.inspect(t)}"`); if (Array.isArray(e)) return e.some((i) => G.contains(t, i, r)); if (typeof e == "string") { if (Jl(t) || Jl(e)) return !1; if (t.includes(e) || t.startsWith("./") && t.slice(2).includes(e)) return !0; } return G.isMatch(t, e, { ...r, contains: !0 }); }; G.matchKeys = (t, e, r) => { if (!es.isObject(t)) throw new TypeError("Expected the first argument to be an object"); let i = G(Object.keys(t), e, r), n = {}; for (let o of i) n[o] = t[o]; return n; }; G.some = (t, e, r) => { let i = [].concat(t); for (let n of [].concat(e)) { let o = Oe(String(n), r); if (i.some((a) => o(a))) return !0; } return !1; }; G.every = (t, e, r) => { let i = [].concat(t); for (let n of [].concat(e)) { let o = Oe(String(n), r); if (!i.every((a) => o(a))) return !1; } return !0; }; G.all = (t, e, r) => { if (typeof t != "string") throw new TypeError(`Expected a string: "${eu.inspect(t)}"`); return [].concat(e).every((i) => Oe(i, r)(t)); }; G.capture = (t, e, r) => { let i = es.isWindows(r), o = Oe.makeRe(String(t), { ...r, capture: !0 }).exec(i ? es.toPosixSlashes(e) : e); if (o) return o.slice(1).map((a) => a === void 0 ? "" : a); }; G.makeRe = (...t) => Oe.makeRe(...t); G.scan = (...t) => Oe.scan(...t); G.parse = (t, e) => { let r = []; for (let i of [].concat(t || [])) for (let n of tu(String(i), e)) r.push(Oe.parse(n, e)); return r; }; G.braces = (t, e) => { if (typeof t != "string") throw new TypeError("Expected a string"); return e && e.nobrace === !0 || !/\{.*\}/.test(t) ? [t] : tu(t, e); }; G.braceExpand = (t, e) => { if (typeof t != "string") throw new TypeError("Expected a string"); return G.braces(t, { ...e, expand: !0 }); }; ru.exports = G; }); // ../node_modules/fast-glob/out/utils/pattern.js var hu = d((T) => { "use strict"; Object.defineProperty(T, "__esModule", { value: !0 }); T.removeDuplicateSlashes = T.matchAny = T.convertPatternsToRe = T.makeRe = T.getPatternParts = T.expandBraceExpansion = T.expandPatternsWithBraceExpansion = T.isAffectDepthOfReadingPattern = T.endsWithSlashGlobStar = T.hasGlobStar = T.getBaseDirectory = T.isPatternRelatedToParentDirectory = T.getPatternsOutsideCurrentDirectory = T.getPatternsInsideCurrentDirectory = T.getPositivePatterns = T.getNegativePatterns = T.isPositivePattern = T.isNegativePattern = T.convertToNegativePattern = T.convertToPositivePattern = T.isDynamicPattern = T.isStaticPattern = void 0; var Dy = require("path"), Ny = Qa(), ts = iu(), su = "**", Ly = "\\", ky = /[*?]|^!/, My = /\[[^[]*]/, $y = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/, qy = /[!*+?@]\([^(]*\)/, Fy = /,|\.\./, Hy = /(?!^)\/{2,}/g; function nu(t, e = {}) { return !ou(t, e); } s(nu, "isStaticPattern"); T.isStaticPattern = nu; function ou(t, e = {}) { return t === "" ? !1 : !!(e.caseSensitiveMatch === !1 || t.includes(Ly) || ky.test(t) || My.test(t) || $y.test(t) || e.extglob !== !1 && qy.test(t) || e.braceExpansion !== !1 && jy(t)); } s(ou, "isDynamicPattern"); T.isDynamicPattern = ou; function jy(t) { let e = t.indexOf("{"); if (e === -1) return !1; let r = t.indexOf("}", e + 1); if (r === -1) return !1; let i = t.slice(e, r); return Fy.test(i); } s(jy, "hasBraceExpansion"); function By(t) { return Or(t) ? t.slice(1) : t; } s(By, "convertToPositivePattern"); T.convertToPositivePattern = By; function Uy(t) { return "!" + t; } s(Uy, "convertToNegativePattern"); T.convertToNegativePattern = Uy; function Or(t) { return t.startsWith("!") && t[1] !== "("; } s(Or, "isNegativePattern"); T.isNegativePattern = Or; function au(t) { return !Or(t); } s(au, "isPositivePattern"); T.isPositivePattern = au; function Gy(t) { return t.filter(Or); } s(Gy, "getNegativePatterns"); T.getNegativePatterns = Gy; function Wy(t) { return t.filter(au); } s(Wy, "getPositivePatterns"); T.getPositivePatterns = Wy; function Yy(t) { return t.filter((e) => !rs(e)); } s(Yy, "getPatternsInsideCurrentDirectory"); T.getPatternsInsideCurrentDirectory = Yy; function Vy(t) { return t.filter(rs); } s(Vy, "getPatternsOutsideCurrentDirectory"); T.getPatternsOutsideCurrentDirectory = Vy; function rs(t) { return t.startsWith("..") || t.startsWith("./.."); } s(rs, "isPatternRelatedToParentDirectory"); T.isPatternRelatedToParentDirectory = rs; function zy(t) { return Ny(t, { flipBackslashes: !1 }); } s(zy, "getBaseDirectory"); T.getBaseDirectory = zy; function Ky(t) { return t.includes(su); } s(Ky, "hasGlobStar"); T.hasGlobStar = Ky; function lu(t) { return t.endsWith("/" + su); } s(lu, "endsWithSlashGlobStar"); T.endsWithSlashGlobStar = lu; function Qy(t) { let e = Dy.basename(t); return lu(t) || nu(e); } s(Qy, "isAffectDepthOfReadingPattern"); T.isAffectDepthOfReadingPattern = Qy; function Xy(t) { return t.reduce((e, r) => e.concat(uu(r)), []); } s(Xy, "expandPatternsWithBraceExpansion"); T.expandPatternsWithBraceExpansion = Xy; function uu(t) { let e = ts.braces(t, { expand: !0, nodupes: !0, keepEscaping: !0 }); return e.sort((r, i) => r.length - i.length), e.filter((r) => r !== ""); } s(uu, "expandBraceExpansion"); T.expandBraceExpansion = uu; function Zy(t, e) { let { parts: r } = ts.scan(t, Object.assign(Object.assign({}, e), { parts: !0 })); return r.length === 0 && (r = [t]), r[0].startsWith("/") && (r[0] = r[0].slice(1), r.unshift("")), r; } s(Zy, "getPatternParts"); T.getPatternParts = Zy; function cu(t, e) { return ts.makeRe(t, e); } s(cu, "makeRe"); T.makeRe = cu; function Jy(t, e) { return t.map((r) => cu(r, e)); } s(Jy, "convertPatternsToRe"); T.convertPatternsToRe = Jy; function e_(t, e) { return e.some((r) => r.test(t)); } s(e_, "matchAny"); T.matchAny = e_; function t_(t) { return t.replace(Hy, "/"); } s(t_, "removeDuplicateSlashes"); T.removeDuplicateSlashes = t_; }); // ../node_modules/merge2/index.js var mu = d((hA, fu) => { "use strict"; var r_ = require("stream"), pu = r_.PassThrough, i_ = Array.prototype.slice; fu.exports = s_; function s_() { let t = [], e = i_.call(arguments), r = !1, i = e[e.length - 1]; i && !Array.isArray(i) && i.pipe == null ? e.pop() : i = {}; let n = i.end !== !1, o = i.pipeError === !0; i.objectMode == null && (i.objectMode = !0), i.highWaterMark == null && (i.highWaterMark = 64 * 1024); let a = pu(i); function l() { for (let p = 0, f = arguments.length; p < f; p++) t.push(du(arguments[p], i)); return u(), this; } s(l, "addStream"); function u() { if (r) return; r = !0; let p = t.shift(); if (!p) { process.nextTick(c); return; } Array.isArray(p) || (p = [p]); let f = p.length + 1; function h() { --f > 0 || (r = !1, u()); } s(h, "next"); function E(m) { function x() { m.removeListener("merge2UnpipeEnd", x), m.removeListener("end", x), o && m.removeListener("error", w), h(); } s(x, "onend"); function w(R) { a.emit("error", R); } if (s(w, "onerror"), m._readableState.endEmitted) return h(); m.on("merge2UnpipeEnd", x), m.on("end", x), o && m.on("error", w), m.pipe(a, { end: !1 }), m.resume(); } s(E, "pipe"); for (let m = 0; m < p.length; m++) E(p[m]); h(); } s(u, "mergeStream"); function c() { r = !1, a.emit("queueDrain"), n && a.end(); } return s(c, "endStream"), a.setMaxListeners(0), a.add = l, a.on("unpipe", function(p) { p.emit("merge2UnpipeEnd"); }), e.length && l.apply(null, e), a; } s(s_, "merge2"); function du(t, e) { if (Array.isArray(t)) for (let r = 0, i = t.length; r < i; r++) t[r] = du(t[r], e); else { if (!t._readableState && t.pipe && (t = t.pipe(pu(e))), !t._readableState || !t.pause || !t.pipe) throw new Error("Only readable stream can be merged."); t.pause(); } return t; } s(du, "pauseStreams"); }); // ../node_modules/fast-glob/out/utils/stream.js var yu = d((Cr) => { "use strict"; Object.defineProperty(Cr, "__esModule", { value: !0 }); Cr.merge = void 0; var n_ = mu(); function o_(t) { let e = n_(t); return t.forEach((r) => { r.once("error", (i) => e.emit("error", i)); }), e.once("close", () => gu(t)), e.once("end", () => gu(t)), e; } s(o_, "merge"); Cr.merge = o_; function gu(t) { t.forEach((e) => e.emit("close")); } s(gu, "propagateCloseEventToSources"); }); // ../node_modules/fast-glob/out/utils/string.js var _u = d((Et) => { "use strict"; Object.defineProperty(Et, "__esModule", { value: !0 }); Et.isEmpty = Et.isString = void 0; function a_(t) { return typeof t == "string"; } s(a_, "isString"); Et.isString = a_; function l_(t) { return t === ""; } s(l_, "isEmpty"); Et.isEmpty = l_; }); // ../node_modules/fast-glob/out/utils/index.js var Fe = d((te) => { "use strict"; Object.defineProperty(te, "__esModule", { value: !0 }); te.string = te.stream = te.pattern = te.path = te.fs = te.errno = te.array = void 0; var u_ = $a(); te.array = u_; var c_ = qa(); te.errno = c_; var h_ = Fa(); te.fs = h_; var p_ = Ua(); te.path = p_; var d_ = hu(); te.pattern = d_; var f_ = yu(); te.stream = f_; var m_ = _u(); te.string = m_; }); // ../node_modules/fast-glob/out/managers/tasks.js var Eu = d((re) => { "use strict"; Object.defineProperty(re, "__esModule", { value: !0 }); re.convertPatternGroupToTask = re.convertPatternGroupsToTasks = re.groupPatternsByBaseDirectory = re.getNegativePatternsAsPositive = re.getPositivePatterns = re.convertPatternsToTasks = re.generate = void 0; var xe = Fe(); function g_(t, e) { let r = xu(t, e), i = xu(e.ignore, e), n = bu(r), o = Su(r, i), a = n.filter((p) => xe.pattern.isStaticPattern(p, e)), l = n.filter((p) => xe. pattern.isDynamicPattern(p, e)), u = is( a, o, /* dynamic */ !1 ), c = is( l, o, /* dynamic */ !0 ); return u.concat(c); } s(g_, "generate"); re.generate = g_; function xu(t, e) { let r = t; return e.braceExpansion && (r = xe.pattern.expandPatternsWithBraceExpansion(r)), e.baseNameMatch && (r = r.map((i) => i.includes("/") ? i : `**/${i}`)), r.map((i) => xe.pattern.removeDuplicateSlashes(i)); } s(xu, "processPatterns"); function is(t, e, r) { let i = [], n = xe.pattern.getPatternsOutsideCurrentDirectory(t), o = xe.pattern.getPatternsInsideCurrentDirectory(t), a = ss(n), l = ss( o); return i.push(...ns(a, e, r)), "." in l ? i.push(os(".", o, e, r)) : i.push(...ns(l, e, r)), i; } s(is, "convertPatternsToTasks"); re.convertPatternsToTasks = is; function bu(t) { return xe.pattern.getPositivePatterns(t); } s(bu, "getPositivePatterns"); re.getPositivePatterns = bu; function Su(t, e) { return xe.pattern.getNegativePatterns(t).concat(e).map(xe.pattern.convertToPositivePattern); } s(Su, "getNegativePatternsAsPositive"); re.getNegativePatternsAsPositive = Su; function ss(t) { let e = {}; return t.reduce((r, i) => { let n = xe.pattern.getBaseDirectory(i); return n in r ? r[n].push(i) : r[n] = [i], r; }, e); } s(ss, "groupPatternsByBaseDirectory"); re.groupPatternsByBaseDirectory = ss; function ns(t, e, r) { return Object.keys(t).map((i) => os(i, t[i], e, r)); } s(ns, "convertPatternGroupsToTasks"); re.convertPatternGroupsToTasks = ns; function os(t, e, r, i) { return { dynamic: i, positive: e, negative: r, base: t, patterns: [].concat(e, r.map(xe.pattern.convertToNegativePattern)) }; } s(os, "convertPatternGroupToTask"); re.convertPatternGroupToTask = os; }); // ../node_modules/@nodelib/fs.stat/out/providers/async.js var wu = d((Ir) => { "use strict"; Object.defineProperty(Ir, "__esModule", { value: !0 }); Ir.read = void 0; function y_(t, e, r) { e.fs.lstat(t, (i, n) => { if (i !== null) { vu(r, i); return; } if (!n.isSymbolicLink() || !e.followSymbolicLink) { as(r, n); return; } e.fs.stat(t, (o, a) => { if (o !== null) { if (e.throwErrorOnBrokenSymbolicLink) { vu(r, o); return; } as(r, n); return; } e.markSymbolicLink && (a.isSymbolicLink = () => !0), as(r, a); }); }); } s(y_, "read"); Ir.read = y_; function vu(t, e) { t(e); } s(vu, "callFailureCallback"); function as(t, e) { t(null, e); } s(as, "callSuccessCallback"); }); // ../node_modules/@nodelib/fs.stat/out/providers/sync.js var Ru = d((Dr) => { "use strict"; Object.defineProperty(Dr, "__esModule", { value: !0 }); Dr.read = void 0; function __(t, e) { let r = e.fs.lstatSync(t); if (!r.isSymbolicLink() || !e.followSymbolicLink) return r; try { let i = e.fs.statSync(t); return e.markSymbolicLink && (i.isSymbolicLink = () => !0), i; } catch (i) { if (!e.throwErrorOnBrokenSymbolicLink) return r; throw i; } } s(__, "read"); Dr.read = __; }); // ../node_modules/@nodelib/fs.stat/out/adapters/fs.js var Tu = d((Xe) => { "use strict"; Object.defineProperty(Xe, "__esModule", { value: !0 }); Xe.createFileSystemAdapter = Xe.FILE_SYSTEM_ADAPTER = void 0; var Nr = require("fs"); Xe.FILE_SYSTEM_ADAPTER = { lstat: Nr.lstat, stat: Nr.stat, lstatSync: Nr.lstatSync, statSync: Nr.statSync }; function x_(t) { return t === void 0 ? Xe.FILE_SYSTEM_ADAPTER : Object.assign(Object.assign({}, Xe.FILE_SYSTEM_ADAPTER), t); } s(x_, "createFileSystemAdapter"); Xe.createFileSystemAdapter = x_; }); // ../node_modules/@nodelib/fs.stat/out/settings.js var Au = d((us) => { "use strict"; Object.defineProperty(us, "__esModule", { value: !0 }); var b_ = Tu(), ls = class { static { s(this, "Settings"); } constructor(e = {}) { this._options = e, this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, !0), this.fs = b_.createFileSystemAdapter( this._options.fs), this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, !1), this.throwErrorOnBrokenSymbolicLink = this. _getValue(this._options.throwErrorOnBrokenSymbolicLink, !0); } _getValue(e, r) { return e ?? r; } }; us.default = ls; }); // ../node_modules/@nodelib/fs.stat/out/index.js var ht = d((Ze) => { "use strict"; Object.defineProperty(Ze, "__esModule", { value: !0 }); Ze.statSync = Ze.stat = Ze.Settings = void 0; var Pu = wu(), S_ = Ru(), cs = Au(); Ze.Settings = cs.default; function E_(t, e, r) { if (typeof e == "function") { Pu.read(t, hs(), e); return; } Pu.read(t, hs(e), r); } s(E_, "stat"); Ze.stat = E_; function v_(t, e) { let r = hs(e); return S_.read(t, r); } s(v_, "statSync"); Ze.statSync = v_; function hs(t = {}) { return t instanceof cs.default ? t : new cs.default(t); } s(hs, "getSettings"); }); // ../node_modules/queue-microtask/index.js var Iu = d((CA, Cu) => { var Ou; Cu.exports = typeof queueMicrotask == "function" ? queueMicrotask.bind(typeof window < "u" ? window : global) : (t) => (Ou || (Ou = Promise. resolve())).then(t).catch((e) => setTimeout(() => { throw e; }, 0)); }); // ../node_modules/run-parallel/index.js var Nu = d((IA, Du) => { Du.exports = R_; var w_ = Iu(); function R_(t, e) { let r, i, n, o = !0; Array.isArray(t) ? (r = [], i = t.length) : (n = Object.keys(t), r = {}, i = n.length); function a(u) { function c() { e && e(u, r), e = null; } s(c, "end"), o ? w_(c) : c(); } s(a, "done"); function l(u, c, p) { r[u] = p, (--i === 0 || c) && a(c); } s(l, "each"), i ? n ? n.forEach(function(u) { t[u](function(c, p) { l(u, c, p); }); }) : t.forEach(function(u, c) { u(function(p, f) { l(c, p, f); }); }) : a(null), o = !1; } s(R_, "runParallel"); }); // ../node_modules/@nodelib/fs.scandir/out/constants.js var ps = d((kr) => { "use strict"; Object.defineProperty(kr, "__esModule", { value: !0 }); kr.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; var Lr = process.versions.node.split("."); if (Lr[0] === void 0 || Lr[1] === void 0) throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); var Lu = Number.parseInt(Lr[0], 10), T_ = Number.parseInt(Lr[1], 10), ku = 10, A_ = 10, P_ = Lu > ku, O_ = Lu === ku && T_ >= A_; kr.IS_SUPPORT_READDIR_WITH_FILE_TYPES = P_ || O_; }); // ../node_modules/@nodelib/fs.scandir/out/utils/fs.js var Mu = d((Mr) => { "use strict"; Object.defineProperty(Mr, "__esModule", { value: !0 }); Mr.createDirentFromStats = void 0; var ds = class { static { s(this, "DirentFromStats"); } constructor(e, r) { this.name = e, this.isBlockDevice = r.isBlockDevice.bind(r), this.isCharacterDevice = r.isCharacterDevice.bind(r), this.isDirectory = r. isDirectory.bind(r), this.isFIFO = r.isFIFO.bind(r), this.isFile = r.isFile.bind(r), this.isSocket = r.isSocket.bind(r), this.isSymbolicLink = r.isSymbolicLink.bind(r); } }; function C_(t, e) { return new ds(t, e); } s(C_, "createDirentFromStats"); Mr.createDirentFromStats = C_; }); // ../node_modules/@nodelib/fs.scandir/out/utils/index.js var fs = d(($r) => { "use strict"; Object.defineProperty($r, "__esModule", { value: !0 }); $r.fs = void 0; var I_ = Mu(); $r.fs = I_; }); // ../node_modules/@nodelib/fs.scandir/out/providers/common.js var ms = d((qr) => { "use strict"; Object.defineProperty(qr, "__esModule", { value: !0 }); qr.joinPathSegments = void 0; function D_(t, e, r) { return t.endsWith(r) ? t + e : t + r + e; } s(D_, "joinPathSegments"); qr.joinPathSegments = D_; }); // ../node_modules/@nodelib/fs.scandir/out/providers/async.js var Bu = d((Je) => { "use strict"; Object.defineProperty(Je, "__esModule", { value: !0 }); Je.readdir = Je.readdirWithFileTypes = Je.read = void 0; var N_ = ht(), $u = Nu(), L_ = ps(), qu = fs(), Fu = ms(); function k_(t, e, r) { if (!e.stats && L_.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { Hu(t, e, r); return; } ju(t, e, r); } s(k_, "read"); Je.read = k_; function Hu(t, e, r) { e.fs.readdir(t, { withFileTypes: !0 }, (i, n) => { if (i !== null) { Fr(r, i); return; } let o = n.map((l) => ({ dirent: l, name: l.name, path: Fu.joinPathSegments(t, l.name, e.pathSegmentSeparator) })); if (!e.followSymbolicLinks) { gs(r, o); return; } let a = o.map((l) => M_(l, e)); $u(a, (l, u) => { if (l !== null) { Fr(r, l); return; } gs(r, u); }); }); } s(Hu, "readdirWithFileTypes"); Je.readdirWithFileTypes = Hu; function M_(t, e) { return (r) => { if (!t.dirent.isSymbolicLink()) { r(null, t); return; } e.fs.stat(t.path, (i, n) => { if (i !== null) { if (e.throwErrorOnBrokenSymbolicLink) { r(i); return; } r(null, t); return; } t.dirent = qu.fs.createDirentFromStats(t.name, n), r(null, t); }); }; } s(M_, "makeRplTaskEntry"); function ju(t, e, r) { e.fs.readdir(t, (i, n) => { if (i !== null) { Fr(r, i); return; } let o = n.map((a) => { let l = Fu.joinPathSegments(t, a, e.pathSegmentSeparator); return (u) => { N_.stat(l, e.fsStatSettings, (c, p) => { if (c !== null) { u(c); return; } let f = { name: a, path: l, dirent: qu.fs.createDirentFromStats(a, p) }; e.stats && (f.stats = p), u(null, f); }); }; }); $u(o, (a, l) => { if (a !== null) { Fr(r, a); return; } gs(r, l); }); }); } s(ju, "readdir"); Je.readdir = ju; function Fr(t, e) { t(e); } s(Fr, "callFailureCallback"); function gs(t, e) { t(null, e); } s(gs, "callSuccessCallback"); }); // ../node_modules/@nodelib/fs.scandir/out/providers/sync.js var Vu = d((et) => { "use strict"; Object.defineProperty(et, "__esModule", { value: !0 }); et.readdir = et.readdirWithFileTypes = et.read = void 0; var $_ = ht(), q_ = ps(), Uu = fs(), Gu = ms(); function F_(t, e) { return !e.stats && q_.IS_SUPPORT_READDIR_WITH_FILE_TYPES ? Wu(t, e) : Yu(t, e); } s(F_, "read"); et.read = F_; function Wu(t, e) { return e.fs.readdirSync(t, { withFileTypes: !0 }).map((i) => { let n = { dirent: i, name: i.name, path: Gu.joinPathSegments(t, i.name, e.pathSegmentSeparator) }; if (n.dirent.isSymbolicLink() && e.followSymbolicLinks) try { let o = e.fs.statSync(n.path); n.dirent = Uu.fs.createDirentFromStats(n.name, o); } catch (o) { if (e.throwErrorOnBrokenSymbolicLink) throw o; } return n; }); } s(Wu, "readdirWithFileTypes"); et.readdirWithFileTypes = Wu; function Yu(t, e) { return e.fs.readdirSync(t).map((i) => { let n = Gu.joinPathSegments(t, i, e.pathSegmentSeparator), o = $_.statSync(n, e.fsStatSettings), a = { name: i, path: n, dirent: Uu.fs.createDirentFromStats(i, o) }; return e.stats && (a.stats = o), a; }); } s(Yu, "readdir"); et.readdir = Yu; }); // ../node_modules/@nodelib/fs.scandir/out/adapters/fs.js var zu = d((tt) => { "use strict"; Object.defineProperty(tt, "__esModule", { value: !0 }); tt.createFileSystemAdapter = tt.FILE_SYSTEM_ADAPTER = void 0; var vt = require("fs"); tt.FILE_SYSTEM_ADAPTER = { lstat: vt.lstat, stat: vt.stat, lstatSync: vt.lstatSync, statSync: vt.statSync, readdir: vt.readdir, readdirSync: vt.readdirSync }; function H_(t) { return t === void 0 ? tt.FILE_SYSTEM_ADAPTER : Object.assign(Object.assign({}, tt.FILE_SYSTEM_ADAPTER), t); } s(H_, "createFileSystemAdapter"); tt.createFileSystemAdapter = H_; }); // ../node_modules/@nodelib/fs.scandir/out/settings.js var Ku = d((_s) => { "use strict"; Object.defineProperty(_s, "__esModule", { value: !0 }); var j_ = require("path"), B_ = ht(), U_ = zu(), ys = class { static { s(this, "Settings"); } constructor(e = {}) { this._options = e, this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, !1), this.fs = U_.createFileSystemAdapter( this._options.fs), this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, j_.sep), this.stats = this._getValue( this._options.stats, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !0), this. fsStatSettings = new B_.Settings({ followSymbolicLink: this.followSymbolicLinks, fs: this.fs, throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink }); } _getValue(e, r) { return e ?? r; } }; _s.default = ys; }); // ../node_modules/@nodelib/fs.scandir/out/index.js var Hr = d((rt) => { "use strict"; Object.defineProperty(rt, "__esModule", { value: !0 }); rt.Settings = rt.scandirSync = rt.scandir = void 0; var Qu = Bu(), G_ = Vu(), xs = Ku(); rt.Settings = xs.default; function W_(t, e, r) { if (typeof e == "function") { Qu.read(t, bs(), e); return; } Qu.read(t, bs(e), r); } s(W_, "scandir"); rt.scandir = W_; function Y_(t, e) { let r = bs(e); return G_.read(t, r); } s(Y_, "scandirSync"); rt.scandirSync = Y_; function bs(t = {}) { return t instanceof xs.default ? t : new xs.default(t); } s(bs, "getSettings"); }); // ../node_modules/reusify/reusify.js var Zu = d((KA, Xu) => { "use strict"; function V_(t) { var e = new t(), r = e; function i() { var o = e; return o.next ? e = o.next : (e = new t(), r = e), o.next = null, o; } s(i, "get"); function n(o) { r.next = o, r = o; } return s(n, "release"), { get: i, release: n }; } s(V_, "reusify"); Xu.exports = V_; }); // ../node_modules/fastq/queue.js var ec = d((XA, Ss) => { "use strict"; var z_ = Zu(); function Ju(t, e, r) { if (typeof t == "function" && (r = e, e = t, t = null), r < 1) throw new Error("fastqueue concurrency must be greater than 1"); var i = z_(K_), n = null, o = null, a = 0, l = null, u = { push: x, drain: me, saturated: me, pause: p, paused: !1, concurrency: r, running: c, resume: E, idle: m, length: f, getQueue: h, unshift: w, empty: me, kill: N, killAndDrain: C, error: W }; return u; function c() { return a; } function p() { u.paused = !0; } function f() { for (var P = n, k = 0; P; ) P = P.next, k++; return k; } function h() { for (var P = n, k = []; P; ) k.push(P.value), P = P.next; return k; } function E() { if (u.paused) { u.paused = !1; for (var P = 0; P < u.concurrency; P++) a++, R(); } } function m() { return a === 0 && u.length() === 0; } function x(P, k) { var O = i.get(); O.context = t, O.release = R, O.value = P, O.callback = k || me, O.errorHandler = l, a === u.concurrency || u.paused ? o ? (o.next = O, o = O) : (n = O, o = O, u.saturated()) : (a++, e.call(t, O.value, O.worked)); } function w(P, k) { var O = i.get(); O.context = t, O.release = R, O.value = P, O.callback = k || me, a === u.concurrency || u.paused ? n ? (O.next = n, n = O) : (n = O, o = O, u.saturated()) : (a++, e.call(t, O.value, O.worked)); } function R(P) { P && i.release(P); var k = n; k ? u.paused ? a-- : (o === n && (o = null), n = k.next, k.next = null, e.call(t, k.value, k.worked), o === null && u.empty()) : --a === 0 && u.drain(); } function N() { n = null, o = null, u.drain = me; } function C() { n = null, o = null, u.drain(), u.drain = me; } function W(P) { l = P; } } s(Ju, "fastqueue"); function me() { } s(me, "noop"); function K_() { this.value = null, this.callback = me, this.next = null, this.release = me, this.context = null, this.errorHandler = null; var t = this; this.worked = /* @__PURE__ */ s(function(r, i) { var n = t.callback, o = t.errorHandler, a = t.value; t.value = null, t.callback = me, t.errorHandler && o(r, a), n.call(t.context, r, i), t.release(t); }, "worked"); } s(K_, "Task"); function Q_(t, e, r) { typeof t == "function" && (r = e, e = t, t = null); function i(p, f) { e.call(this, p).then(function(h) { f(null, h); }, f); } s(i, "asyncWrapper"); var n = Ju(t, i, r), o = n.push, a = n.unshift; return n.push = l, n.unshift = u, n.drained = c, n; function l(p) { var f = new Promise(function(h, E) { o(p, function(m, x) { if (m) { E(m); return; } h(x); }); }); return f.catch(me), f; } s(l, "push"); function u(p) { var f = new Promise(function(h, E) { a(p, function(m, x) { if (m) { E(m); return; } h(x); }); }); return f.catch(me), f; } s(u, "unshift"); function c() { if (n.idle()) return new Promise(function(h) { h(); }); var p = n.drain, f = new Promise(function(h) { n.drain = function() { p(), h(); }; }); return f; } s(c, "drained"); } s(Q_, "queueAsPromised"); Ss.exports = Ju; Ss.exports.promise = Q_; }); // ../node_modules/@nodelib/fs.walk/out/readers/common.js var jr = d((Ce) => { "use strict"; Object.defineProperty(Ce, "__esModule", { value: !0 }); Ce.joinPathSegments = Ce.replacePathSegmentSeparator = Ce.isAppliedFilter = Ce.isFatalError = void 0; function X_(t, e) { return t.errorFilter === null ? !0 : !t.errorFilter(e); } s(X_, "isFatalError"); Ce.isFatalError = X_; function Z_(t, e) { return t === null || t(e); } s(Z_, "isAppliedFilter"); Ce.isAppliedFilter = Z_; function J_(t, e) { return t.split(/[/\\]/).join(e); } s(J_, "replacePathSegmentSeparator"); Ce.replacePathSegmentSeparator = J_; function ex(t, e, r) { return t === "" ? e : t.endsWith(r) ? t + e : t + r + e; } s(ex, "joinPathSegments"); Ce.joinPathSegments = ex; }); // ../node_modules/@nodelib/fs.walk/out/readers/reader.js var ws = d((vs) => { "use strict"; Object.defineProperty(vs, "__esModule", { value: !0 }); var tx = jr(), Es = class { static { s(this, "Reader"); } constructor(e, r) { this._root = e, this._settings = r, this._root = tx.replacePathSegmentSeparator(e, r.pathSegmentSeparator); } }; vs.default = Es; }); // ../node_modules/@nodelib/fs.walk/out/readers/async.js var As = d((Ts) => { "use strict"; Object.defineProperty(Ts, "__esModule", { value: !0 }); var rx = require("events"), ix = Hr(), sx = ec(), Br = jr(), nx = ws(), Rs = class extends nx.default { static { s(this, "AsyncReader"); } constructor(e, r) { super(e, r), this._settings = r, this._scandir = ix.scandir, this._emitter = new rx.EventEmitter(), this._queue = sx(this._worker.bind( this), this._settings.concurrency), this._isFatalError = !1, this._isDestroyed = !1, this._queue.drain = () => { this._isFatalError || this._emitter.emit("end"); }; } read() { return this._isFatalError = !1, this._isDestroyed = !1, setImmediate(() => { this._pushToQueue(this._root, this._settings.basePath); }), this._emitter; } get isDestroyed() { return this._isDestroyed; } destroy() { if (this._isDestroyed) throw new Error("The reader is already destroyed"); this._isDestroyed = !0, this._queue.killAndDrain(); } onEntry(e) { this._emitter.on("entry", e); } onError(e) { this._emitter.once("error", e); } onEnd(e) { this._emitter.once("end", e); } _pushToQueue(e, r) { let i = { directory: e, base: r }; this._queue.push(i, (n) => { n !== null && this._handleError(n); }); } _worker(e, r) { this._scandir(e.directory, this._settings.fsScandirSettings, (i, n) => { if (i !== null) { r(i, void 0); return; } for (let o of n) this._handleEntry(o, e.base); r(null, void 0); }); } _handleError(e) { this._isDestroyed || !Br.isFatalError(this._settings, e) || (this._isFatalError = !0, this._isDestroyed = !0, this._emitter.emit("erro\ r", e)); } _handleEntry(e, r) { if (this._isDestroyed || this._isFatalError) return; let i = e.path; r !== void 0 && (e.path = Br.joinPathSegments(r, e.name, this._settings.pathSegmentSeparator)), Br.isAppliedFilter(this._settings.entryFilter, e) && this._emitEntry(e), e.dirent.isDirectory() && Br.isAppliedFilter(this._settings.deepFilter, e) && this._pushToQueue(i, r === void 0 ? void 0 : e.path); } _emitEntry(e) { this._emitter.emit("entry", e); } }; Ts.default = Rs; }); // ../node_modules/@nodelib/fs.walk/out/providers/async.js var tc = d((Os) => { "use strict"; Object.defineProperty(Os, "__esModule", { value: !0 }); var ox = As(), Ps = class { static { s(this, "AsyncProvider"); } constructor(e, r) { this._root = e, this._settings = r, this._reader = new ox.default(this._root, this._settings), this._storage = []; } read(e) { this._reader.onError((r) => { ax(e, r); }), this._reader.onEntry((r) => { this._storage.push(r); }), this._reader.onEnd(() => { lx(e, this._storage); }), this._reader.read(); } }; Os.default = Ps; function ax(t, e) { t(e); } s(ax, "callFailureCallback"); function lx(t, e) { t(null, e); } s(lx, "callSuccessCallback"); }); // ../node_modules/@nodelib/fs.walk/out/providers/stream.js var rc = d((Is) => { "use strict"; Object.defineProperty(Is, "__esModule", { value: !0 }); var ux = require("stream"), cx = As(), Cs = class { static { s(this, "StreamProvider"); } constructor(e, r) { this._root = e, this._settings = r, this._reader = new cx.default(this._root, this._settings), this._stream = new ux.Readable({ objectMode: !0, read: /* @__PURE__ */ s(() => { }, "read"), destroy: /* @__PURE__ */ s(() => { this._reader.isDestroyed || this._reader.destroy(); }, "destroy") }); } read() { return this._reader.onError((e) => { this._stream.emit("error", e); }), this._reader.onEntry((e) => { this._stream.push(e); }), this._reader.onEnd(() => { this._stream.push(null); }), this._reader.read(), this._stream; } }; Is.default = Cs; }); // ../node_modules/@nodelib/fs.walk/out/readers/sync.js var ic = d((Ns) => { "use strict"; Object.defineProperty(Ns, "__esModule", { value: !0 }); var hx = Hr(), Ur = jr(), px = ws(), Ds = class extends px.default { static { s(this, "SyncReader"); } constructor() { super(...arguments), this._scandir = hx.scandirSync, this._storage = [], this._queue = /* @__PURE__ */ new Set(); } read() { return this._pushToQueue(this._root, this._settings.basePath), this._handleQueue(), this._storage; } _pushToQueue(e, r) { this._queue.add({ directory: e, base: r }); } _handleQueue() { for (let e of this._queue.values()) this._handleDirectory(e.directory, e.base); } _handleDirectory(e, r) { try { let i = this._scandir(e, this._settings.fsScandirSettings); for (let n of i) this._handleEntry(n, r); } catch (i) { this._handleError(i); } } _handleError(e) { if (Ur.isFatalError(this._settings, e)) throw e; } _handleEntry(e, r) { let i = e.path; r !== void 0 && (e.path = Ur.joinPathSegments(r, e.name, this._settings.pathSegmentSeparator)), Ur.isAppliedFilter(this._settings.entryFilter, e) && this._pushToStorage(e), e.dirent.isDirectory() && Ur.isAppliedFilter(this._settings.deepFilter, e) && this._pushToQueue(i, r === void 0 ? void 0 : e.path); } _pushToStorage(e) { this._storage.push(e); } }; Ns.default = Ds; }); // ../node_modules/@nodelib/fs.walk/out/providers/sync.js var sc = d((ks) => { "use strict"; Object.defineProperty(ks, "__esModule", { value: !0 }); var dx = ic(), Ls = class { static { s(this, "SyncProvider"); } constructor(e, r) { this._root = e, this._settings = r, this._reader = new dx.default(this._root, this._settings); } read() { return this._reader.read(); } }; ks.default = Ls; }); // ../node_modules/@nodelib/fs.walk/out/settings.js var nc = d(($s) => { "use strict"; Object.defineProperty($s, "__esModule", { value: !0 }); var fx = require("path"), mx = Hr(), Ms = class { static { s(this, "Settings"); } constructor(e = {}) { this._options = e, this.basePath = this._getValue(this._options.basePath, void 0), this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY), this.deepFilter = this._getValue(this._options.deepFilter, null), this.entryFilter = this._getValue(this._options. entryFilter, null), this.errorFilter = this._getValue(this._options.errorFilter, null), this.pathSegmentSeparator = this._getValue(this. _options.pathSegmentSeparator, fx.sep), this.fsScandirSettings = new mx.Settings({ followSymbolicLinks: this._options.followSymbolicLinks, fs: this._options.fs, pathSegmentSeparator: this._options.pathSegmentSeparator, stats: this._options.stats, throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink }); } _getValue(e, r) { return e ?? r; } }; $s.default = Ms; }); // ../node_modules/@nodelib/fs.walk/out/index.js var Wr = d((Ie) => { "use strict"; Object.defineProperty(Ie, "__esModule", { value: !0 }); Ie.Settings = Ie.walkStream = Ie.walkSync = Ie.walk = void 0; var oc = tc(), gx = rc(), yx = sc(), qs = nc(); Ie.Settings = qs.default; function _x(t, e, r) { if (typeof e == "function") { new oc.default(t, Gr()).read(e); return; } new oc.default(t, Gr(e)).read(r); } s(_x, "walk"); Ie.walk = _x; function xx(t, e) { let r = Gr(e); return new yx.default(t, r).read(); } s(xx, "walkSync"); Ie.walkSync = xx; function bx(t, e) { let r = Gr(e); return new gx.default(t, r).read(); } s(bx, "walkStream"); Ie.walkStream = bx; function Gr(t = {}) { return t instanceof qs.default ? t : new qs.default(t); } s(Gr, "getSettings"); }); // ../node_modules/fast-glob/out/readers/reader.js var Yr = d((Hs) => { "use strict"; Object.defineProperty(Hs, "__esModule", { value: !0 }); var Sx = require("path"), Ex = ht(), ac = Fe(), Fs = class { static { s(this, "Reader"); } constructor(e) { this._settings = e, this._fsStatSettings = new Ex.Settings({ followSymbolicLink: this._settings.followSymbolicLinks, fs: this._settings.fs, throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks }); } _getFullEntryPath(e) { return Sx.resolve(this._settings.cwd, e); } _makeEntry(e, r) { let i = { name: r, path: r, dirent: ac.fs.createDirentFromStats(r, e) }; return this._settings.stats && (i.stats = e), i; } _isFatalError(e) { return !ac.errno.isEnoentCodeError(e) && !this._settings.suppressErrors; } }; Hs.default = Fs; }); // ../node_modules/fast-glob/out/readers/stream.js var Us = d((Bs) => { "use strict"; Object.defineProperty(Bs, "__esModule", { value: !0 }); var vx = require("stream"), wx = ht(), Rx = Wr(), Tx = Yr(), js = class extends Tx.default { static { s(this, "ReaderStream"); } constructor() { super(...arguments), this._walkStream = Rx.walkStream, this._stat = wx.stat; } dynamic(e, r) { return this._walkStream(e, r); } static(e, r) { let i = e.map(this._getFullEntryPath, this), n = new vx.PassThrough({ objectMode: !0 }); n._write = (o, a, l) => this._getEntry(i[o], e[o], r).then((u) => { u !== null && r.entryFilter(u) && n.push(u), o === i.length - 1 && n.end(), l(); }).catch(l); for (let o = 0; o < i.length; o++) n.write(o); return n; } _getEntry(e, r, i) { return this._getStat(e).then((n) => this._makeEntry(n, r)).catch((n) => { if (i.errorFilter(n)) return null; throw n; }); } _getStat(e) { return new Promise((r, i) => { this._stat(e, this._fsStatSettings, (n, o) => n === null ? r(o) : i(n)); }); } }; Bs.default = js; }); // ../node_modules/fast-glob/out/readers/async.js var lc = d((Ws) => { "use strict"; Object.defineProperty(Ws, "__esModule", { value: !0 }); var Ax = Wr(), Px = Yr(), Ox = Us(), Gs = class extends Px.default { static { s(this, "ReaderAsync"); } constructor() { super(...arguments), this._walkAsync = Ax.walk, this._readerStream = new Ox.default(this._settings); } dynamic(e, r) { return new Promise((i, n) => { this._walkAsync(e, r, (o, a) => { o === null ? i(a) : n(o); }); }); } async static(e, r) { let i = [], n = this._readerStream.static(e, r); return new Promise((o, a) => { n.once("error", a), n.on("data", (l) => i.push(l)), n.once("end", () => o(i)); }); } }; Ws.default = Gs; }); // ../node_modules/fast-glob/out/providers/matchers/matcher.js var uc = d((Vs) => { "use strict"; Object.defineProperty(Vs, "__esModule", { value: !0 }); var Yt = Fe(), Ys = class { static { s(this, "Matcher"); } constructor(e, r, i) { this._patterns = e, this._settings = r, this._micromatchOptions = i, this._storage = [], this._fillStorage(); } _fillStorage() { for (let e of this._patterns) { let r = this._getPatternSegments(e), i = this._splitSegmentsIntoSections(r); this._storage.push({ complete: i.length <= 1, pattern: e, segments: r, sections: i }); } } _getPatternSegments(e) { return Yt.pattern.getPatternParts(e, this._micromatchOptions).map((i) => Yt.pattern.isDynamicPattern(i, this._settings) ? { dynamic: !0, pattern: i, patternRe: Yt.pattern.makeRe(i, this._micromatchOptions) } : { dynamic: !1, pattern: i }); } _splitSegmentsIntoSections(e) { return Yt.array.splitWhen(e, (r) => r.dynamic && Yt.pattern.hasGlobStar(r.pattern)); } }; Vs.default = Ys; }); // ../node_modules/fast-glob/out/providers/matchers/partial.js var cc = d((Ks) => { "use strict"; Object.defineProperty(Ks, "__esModule", { value: !0 }); var Cx = uc(), zs = class extends Cx.default { static { s(this, "PartialMatcher"); } match(e) { let r = e.split("/"), i = r.length, n = this._storage.filter((o) => !o.complete || o.segments.length > i); for (let o of n) { let a = o.sections[0]; if (!o.complete && i > a.length || r.every((u, c) => { let p = o.segments[c]; return !!(p.dynamic && p.patternRe.test(u) || !p.dynamic && p.pattern === u); })) return !0; } return !1; } }; Ks.default = zs; }); // ../node_modules/fast-glob/out/providers/filters/deep.js var hc = d((Xs) => { "use strict"; Object.defineProperty(Xs, "__esModule", { value: !0 }); var Vr = Fe(), Ix = cc(), Qs = class { static { s(this, "DeepFilter"); } constructor(e, r) { this._settings = e, this._micromatchOptions = r; } getFilter(e, r, i) { let n = this._getMatcher(r), o = this._getNegativePatternsRe(i); return (a) => this._filter(e, a, n, o); } _getMatcher(e) { return new Ix.default(e, this._settings, this._micromatchOptions); } _getNegativePatternsRe(e) { let r = e.filter(Vr.pattern.isAffectDepthOfReadingPattern); return Vr.pattern.convertPatternsToRe(r, this._micromatchOptions); } _filter(e, r, i, n) { if (this._isSkippedByDeep(e, r.path) || this._isSkippedSymbolicLink(r)) return !1; let o = Vr.path.removeLeadingDotSegment(r.path); return this._isSkippedByPositivePatterns(o, i) ? !1 : this._isSkippedByNegativePatterns(o, n); } _isSkippedByDeep(e, r) { return this._settings.deep === 1 / 0 ? !1 : this._getEntryLevel(e, r) >= this._settings.deep; } _getEntryLevel(e, r) { let i = r.split("/").length; if (e === "") return i; let n = e.split("/").length; return i - n; } _isSkippedSymbolicLink(e) { return !this._settings.followSymbolicLinks && e.dirent.isSymbolicLink(); } _isSkippedByPositivePatterns(e, r) { return !this._settings.baseNameMatch && !r.match(e); } _isSkippedByNegativePatterns(e, r) { return !Vr.pattern.matchAny(e, r); } }; Xs.default = Qs; }); // ../node_modules/fast-glob/out/providers/filters/entry.js var pc = d((Js) => { "use strict"; Object.defineProperty(Js, "__esModule", { value: !0 }); var pt = Fe(), Zs = class { static { s(this, "EntryFilter"); } constructor(e, r) { this._settings = e, this._micromatchOptions = r, this.index = /* @__PURE__ */ new Map(); } getFilter(e, r) { let i = pt.pattern.convertPatternsToRe(e, this._micromatchOptions), n = pt.pattern.convertPatternsToRe(r, Object.assign(Object.assign( {}, this._micromatchOptions), { dot: !0 })); return (o) => this._filter(o, i, n); } _filter(e, r, i) { let n = pt.path.removeLeadingDotSegment(e.path); if (this._settings.unique && this._isDuplicateEntry(n) || this._onlyFileFilter(e) || this._onlyDirectoryFilter(e) || this._isSkippedByAbsoluteNegativePatterns( n, i)) return !1; let o = e.dirent.isDirectory(), a = this._isMatchToPatterns(n, r, o) && !this._isMatchToPatterns(n, i, o); return this._settings.unique && a && this._createIndexRecord(n), a; } _isDuplicateEntry(e) { return this.index.has(e); } _createIndexRecord(e) { this.index.set(e, void 0); } _onlyFileFilter(e) { return this._settings.onlyFiles && !e.dirent.isFile(); } _onlyDirectoryFilter(e) { return this._settings.onlyDirectories && !e.dirent.isDirectory(); } _isSkippedByAbsoluteNegativePatterns(e, r) { if (!this._settings.absolute) return !1; let i = pt.path.makeAbsolute(this._settings.cwd, e); return pt.pattern.matchAny(i, r); } _isMatchToPatterns(e, r, i) { let n = pt.pattern.matchAny(e, r); return !n && i ? pt.pattern.matchAny(e + "/", r) : n; } }; Js.default = Zs; }); // ../node_modules/fast-glob/out/providers/filters/error.js var dc = d((tn) => { "use strict"; Object.defineProperty(tn, "__esModule", { value: !0 }); var Dx = Fe(), en = class { static { s(this, "ErrorFilter"); } constructor(e) { this._settings = e; } getFilter() { return (e) => this._isNonFatalError(e); } _isNonFatalError(e) { return Dx.errno.isEnoentCodeError(e) || this._settings.suppressErrors; } }; tn.default = en; }); // ../node_modules/fast-glob/out/providers/transformers/entry.js var mc = d((sn) => { "use strict"; Object.defineProperty(sn, "__esModule", { value: !0 }); var fc = Fe(), rn = class { static { s(this, "EntryTransformer"); } constructor(e) { this._settings = e; } getTransformer() { return (e) => this._transform(e); } _transform(e) { let r = e.path; return this._settings.absolute && (r = fc.path.makeAbsolute(this._settings.cwd, r), r = fc.path.unixify(r)), this._settings.markDirectories && e.dirent.isDirectory() && (r += "/"), this._settings.objectMode ? Object.assign(Object.assign({}, e), { path: r }) : r; } }; sn.default = rn; }); // ../node_modules/fast-glob/out/providers/provider.js var zr = d((on) => { "use strict"; Object.defineProperty(on, "__esModule", { value: !0 }); var Nx = require("path"), Lx = hc(), kx = pc(), Mx = dc(), $x = mc(), nn = class { static { s(this, "Provider"); } constructor(e) { this._settings = e, this.errorFilter = new Mx.default(this._settings), this.entryFilter = new kx.default(this._settings, this._getMicromatchOptions()), this.deepFilter = new Lx.default(this._settings, this._getMicromatchOptions()), this.entryTransformer = new $x.default(this._settings); } _getRootDirectory(e) { return Nx.resolve(this._settings.cwd, e.base); } _getReaderOptions(e) { let r = e.base === "." ? "" : e.base; return { basePath: r, pathSegmentSeparator: "/", concurrency: this._settings.concurrency, deepFilter: this.deepFilter.getFilter(r, e.positive, e.negative), entryFilter: this.entryFilter.getFilter(e.positive, e.negative), errorFilter: this.errorFilter.getFilter(), followSymbolicLinks: this._settings.followSymbolicLinks, fs: this._settings.fs, stats: this._settings.stats, throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, transform: this.entryTransformer.getTransformer() }; } _getMicromatchOptions() { return { dot: this._settings.dot, matchBase: this._settings.baseNameMatch, nobrace: !this._settings.braceExpansion, nocase: !this._settings.caseSensitiveMatch, noext: !this._settings.extglob, noglobstar: !this._settings.globstar, posix: !0, strictSlashes: !1 }; } }; on.default = nn; }); // ../node_modules/fast-glob/out/providers/async.js var gc = d((ln) => { "use strict"; Object.defineProperty(ln, "__esModule", { value: !0 }); var qx = lc(), Fx = zr(), an = class extends Fx.default { static { s(this, "ProviderAsync"); } constructor() { super(...arguments), this._reader = new qx.default(this._settings); } async read(e) { let r = this._getRootDirectory(e), i = this._getReaderOptions(e); return (await this.api(r, e, i)).map((o) => i.transform(o)); } api(e, r, i) { return r.dynamic ? this._reader.dynamic(e, i) : this._reader.static(r.patterns, i); } }; ln.default = an; }); // ../node_modules/fast-glob/out/providers/stream.js var yc = d((cn) => { "use strict"; Object.defineProperty(cn, "__esModule", { value: !0 }); var Hx = require("stream"), jx = Us(), Bx = zr(), un = class extends Bx.default { static { s(this, "ProviderStream"); } constructor() { super(...arguments), this._reader = new jx.default(this._settings); } read(e) { let r = this._getRootDirectory(e), i = this._getReaderOptions(e), n = this.api(r, e, i), o = new Hx.Readable({ objectMode: !0, read: /* @__PURE__ */ s( () => { }, "read") }); return n.once("error", (a) => o.emit("error", a)).on("data", (a) => o.emit("data", i.transform(a))).once("end", () => o.emit("end")), o. once("close", () => n.destroy()), o; } api(e, r, i) { return r.dynamic ? this._reader.dynamic(e, i) : this._reader.static(r.patterns, i); } }; cn.default = un; }); // ../node_modules/fast-glob/out/readers/sync.js var _c = d((pn) => { "use strict"; Object.defineProperty(pn, "__esModule", { value: !0 }); var Ux = ht(), Gx = Wr(), Wx = Yr(), hn = class extends Wx.default { static { s(this, "ReaderSync"); } constructor() { super(...arguments), this._walkSync = Gx.walkSync, this._statSync = Ux.statSync; } dynamic(e, r) { return this._walkSync(e, r); } static(e, r) { let i = []; for (let n of e) { let o = this._getFullEntryPath(n), a = this._getEntry(o, n, r); a === null || !r.entryFilter(a) || i.push(a); } return i; } _getEntry(e, r, i) { try { let n = this._getStat(e); return this._makeEntry(n, r); } catch (n) { if (i.errorFilter(n)) return null; throw n; } } _getStat(e) { return this._statSync(e, this._fsStatSettings); } }; pn.default = hn; }); // ../node_modules/fast-glob/out/providers/sync.js var xc = d((fn) => { "use strict"; Object.defineProperty(fn, "__esModule", { value: !0 }); var Yx = _c(), Vx = zr(), dn = class extends Vx.default { static { s(this, "ProviderSync"); } constructor() { super(...arguments), this._reader = new Yx.default(this._settings); } read(e) { let r = this._getRootDirectory(e), i = this._getReaderOptions(e); return this.api(r, e, i).map(i.transform); } api(e, r, i) { return r.dynamic ? this._reader.dynamic(e, i) : this._reader.static(r.patterns, i); } }; fn.default = dn; }); // ../node_modules/fast-glob/out/settings.js var bc = d((Rt) => { "use strict"; Object.defineProperty(Rt, "__esModule", { value: !0 }); Rt.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; var wt = require("fs"), zx = require("os"), Kx = Math.max(zx.cpus().length, 1); Rt.DEFAULT_FILE_SYSTEM_ADAPTER = { lstat: wt.lstat, lstatSync: wt.lstatSync, stat: wt.stat, statSync: wt.statSync, readdir: wt.readdir, readdirSync: wt.readdirSync }; var mn = class { static { s(this, "Settings"); } constructor(e = {}) { this._options = e, this.absolute = this._getValue(this._options.absolute, !1), this.baseNameMatch = this._getValue(this._options.baseNameMatch, !1), this.braceExpansion = this._getValue(this._options.braceExpansion, !0), this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, !0), this.concurrency = this._getValue(this._options.concurrency, Kx), this.cwd = this._getValue(this._options.cwd, process.cwd()), this. deep = this._getValue(this._options.deep, 1 / 0), this.dot = this._getValue(this._options.dot, !1), this.extglob = this._getValue(this. _options.extglob, !0), this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, !0), this.fs = this._getFileSystemMethods( this._options.fs), this.globstar = this._getValue(this._options.globstar, !0), this.ignore = this._getValue(this._options.ignore, []), this.markDirectories = this._getValue(this._options.markDirectories, !1), this.objectMode = this._getValue(this._options.objectMode, !1), this.onlyDirectories = this._getValue(this._options.onlyDirectories, !1), this.onlyFiles = this._getValue(this._options.onlyFiles, !0), this.stats = this._getValue(this._options.stats, !1), this.suppressErrors = this._getValue(this._options.suppressErrors, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !1), this.unique = this._getValue(this._options.unique, !0), this.onlyDirectories && (this.onlyFiles = !1), this.stats && (this.objectMode = !0), this.ignore = [].concat(this.ignore); } _getValue(e, r) { return e === void 0 ? r : e; } _getFileSystemMethods(e = {}) { return Object.assign(Object.assign({}, Rt.DEFAULT_FILE_SYSTEM_ADAPTER), e); } }; Rt.default = mn; }); // ../node_modules/fast-glob/out/index.js var xn = d((VP, Ec) => { "use strict"; var Sc = Eu(), Qx = gc(), Xx = yc(), Zx = xc(), gn = bc(), ge = Fe(); async function yn(t, e) { be(t); let r = _n(t, Qx.default, e), i = await Promise.all(r); return ge.array.flatten(i); } s(yn, "FastGlob"); (function(t) { t.glob = t, t.globSync = e, t.globStream = r, t.async = t; function e(c, p) { be(c); let f = _n(c, Zx.default, p); return ge.array.flatten(f); } s(e, "sync"), t.sync = e; function r(c, p) { be(c); let f = _n(c, Xx.default, p); return ge.stream.merge(f); } s(r, "stream"), t.stream = r; function i(c, p) { be(c); let f = [].concat(c), h = new gn.default(p); return Sc.generate(f, h); } s(i, "generateTasks"), t.generateTasks = i; function n(c, p) { be(c); let f = new gn.default(p); return ge.pattern.isDynamicPattern(c, f); } s(n, "isDynamicPattern"), t.isDynamicPattern = n; function o(c) { return be(c), ge.path.escape(c); } s(o, "escapePath"), t.escapePath = o; function a(c) { return be(c), ge.path.convertPathToPattern(c); } s(a, "convertPathToPattern"), t.convertPathToPattern = a; let l; (function(c) { function p(h) { return be(h), ge.path.escapePosixPath(h); } s(p, "escapePath"), c.escapePath = p; function f(h) { return be(h), ge.path.convertPosixPathToPattern(h); } s(f, "convertPathToPattern"), c.convertPathToPattern = f; })(l = t.posix || (t.posix = {})); let u; (function(c) { function p(h) { return be(h), ge.path.escapeWindowsPath(h); } s(p, "escapePath"), c.escapePath = p; function f(h) { return be(h), ge.path.convertWindowsPathToPattern(h); } s(f, "convertPathToPattern"), c.convertPathToPattern = f; })(u = t.win32 || (t.win32 = {})); })(yn || (yn = {})); function _n(t, e, r) { let i = [].concat(t), n = new gn.default(r), o = Sc.generate(i, n), a = new e(n); return o.map(a.read, a); } s(_n, "getWorks"); function be(t) { if (![].concat(t).every((i) => ge.string.isString(i) && !ge.string.isEmpty(i))) throw new TypeError("Patterns must be a string (non empty) or an array of strings"); } s(be, "assertPatternsInput"); Ec.exports = yn; }); // ../node_modules/globby/node_modules/path-type/index.js async function bn(t, e, r) { if (typeof r != "string") throw new TypeError(`Expected a string, got ${typeof r}`); try { return (await Kr.promises[t](r))[e](); } catch (i) { if (i.code === "ENOENT") return !1; throw i; } } function Sn(t, e, r) { if (typeof r != "string") throw new TypeError(`Expected a string, got ${typeof r}`); try { return Kr.default[t](r)[e](); } catch (i) { if (i.code === "ENOENT") return !1; throw i; } } var Kr, KP, vc, QP, XP, wc, ZP, Rc = de(() => { Kr = B(require("fs"), 1); s(bn, "isType"); s(Sn, "isTypeSync"); KP = bn.bind(null, "stat", "isFile"), vc = bn.bind(null, "stat", "isDirectory"), QP = bn.bind(null, "lstat", "isSymbolicLink"), XP = Sn.bind( null, "statSync", "isFile"), wc = Sn.bind(null, "statSync", "isDirectory"), ZP = Sn.bind(null, "lstatSync", "isSymbolicLink"); }); // ../node_modules/unicorn-magic/default.js var Tc = de(() => { }); // ../node_modules/unicorn-magic/node.js function Vt(t) { return t instanceof URL ? (0, Ac.fileURLToPath)(t) : t; } var Ac, En = de(() => { Ac = require("node:url"); Tc(); s(Vt, "toPath"); }); // ../node_modules/ignore/index.js var Mc = d((oO, kc) => { function Pc(t) { return Array.isArray(t) ? t : [t]; } s(Pc, "makeArray"); var Rn = "", Oc = " ", vn = "\\", Jx = /^\s+$/, eb = /(?:[^\\]|^)\\$/, tb = /^\\!/, rb = /^\\#/, ib = /\r?\n/g, sb = /^\.*\/|^\.+$/, wn = "\ /", Dc = "node-ignore"; typeof Symbol < "u" && (Dc = Symbol.for("node-ignore")); var Cc = Dc, nb = /* @__PURE__ */ s((t, e, r) => Object.defineProperty(t, e, { value: r }), "define"), ob = /([0-z])-([0-z])/g, Nc = /* @__PURE__ */ s( () => !1, "RETURN_FALSE"), ab = /* @__PURE__ */ s((t) => t.replace( ob, (e, r, i) => r.charCodeAt(0) <= i.charCodeAt(0) ? e : Rn ), "sanitizeRange"), lb = /* @__PURE__ */ s((t) => { let { length: e } = t; return t.slice(0, e - e % 2); }, "cleanRangeBackSlash"), ub = [ [ // remove BOM // TODO: // Other similar zero-width characters? /^\uFEFF/, () => Rn ], // > Trailing spaces are ignored unless they are quoted with backslash ("\") [ // (a\ ) -> (a ) // (a ) -> (a) // (a \ ) -> (a ) /\\?\s+$/, (t) => t.indexOf("\\") === 0 ? Oc : Rn ], // replace (\ ) with ' ' [ /\\\s/g, () => Oc ], // Escape metacharacters // which is written down by users but means special for regular expressions. // > There are 12 characters with special meanings: // > - the backslash \, // > - the caret ^, // > - the dollar sign $, // > - the period or dot ., // > - the vertical bar or pipe symbol |, // > - the question mark ?, // > - the asterisk or star *, // > - the plus sign +, // > - the opening parenthesis (, // > - the closing parenthesis ), // > - and the opening square bracket [, // > - the opening curly brace {, // > These special characters are often called "metacharacters". [ /[\\$.|*+(){^]/g, (t) => `\\${t}` ], [ // > a question mark (?) matches a single character /(?!\\)\?/g, () => "[^/]" ], // leading slash [ // > A leading slash matches the beginning of the pathname. // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". // A leading slash matches the beginning of the pathname /^\//, () => "^" ], // replace special metacharacter slash after the leading slash [ /\//g, () => "\\/" ], [ // > A leading "**" followed by a slash means match in all directories. // > For example, "**/foo" matches file or directory "foo" anywhere, // > the same as pattern "foo". // > "**/foo/bar" matches file or directory "bar" anywhere that is directly // > under directory "foo". // Notice that the '*'s have been replaced as '\\*' /^\^*\\\*\\\*\\\//, // '**/foo' <-> 'foo' () => "^(?:.*\\/)?" ], // starting [ // there will be no leading '/' // (which has been replaced by section "leading slash") // If starts with '**', adding a '^' to the regular expression also works /^(?=[^^])/, /* @__PURE__ */ s(function() { return /\/(?!$)/.test(this) ? "^" : "(?:^|\\/)"; }, "startingReplacer") ], // two globstars [ // Use lookahead assertions so that we could match more than one `'/**'` /\\\/\\\*\\\*(?=\\\/|$)/g, // Zero, one or several directories // should not use '*', or it will be replaced by the next replacer // Check if it is not the last `'/**'` (t, e, r) => e + 6 < r.length ? "(?:\\/[^\\/]+)*" : "\\/.+" ], // normal intermediate wildcards [ // Never replace escaped '*' // ignore rule '\*' will match the path '*' // 'abc.*/' -> go // 'abc.*' -> skip this rule, // coz trailing single wildcard will be handed by [trailing wildcard] /(^|[^\\]+)(\\\*)+(?=.+)/g, // '*.js' matches '.js' // '*.js' doesn't match 'abc' (t, e, r) => { let i = r.replace(/\\\*/g, "[^\\/]*"); return e + i; } ], [ // unescape, revert step 3 except for back slash // For example, if a user escape a '\\*', // after step 3, the result will be '\\\\\\*' /\\\\\\(?=[$.|*+(){^])/g, () => vn ], [ // '\\\\' -> '\\' /\\\\/g, () => vn ], [ // > The range notation, e.g. [a-zA-Z], // > can be used to match one of the characters in a range. // `\` is escaped by step 3 /(\\)?\[([^\]/]*?)(\\*)($|\])/g, (t, e, r, i, n) => e === vn ? `\\[${r}${lb(i)}${n}` : n === "]" && i.length % 2 === 0 ? `[${ab(r)}${i}]` : "[]" ], // ending [ // 'js' will not match 'js.' // 'ab' will not match 'abc' /(?:[^*])$/, // WTF! // https://git-scm.com/docs/gitignore // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) // which re-fixes #24, #38 // > If there is a separator at the end of the pattern then the pattern // > will only match directories, otherwise the pattern can match both // > files and directories. // 'js*' will not match 'a.js' // 'js/' will not match 'a.js' // 'js' will match 'a.js' and 'a.js/' (t) => /\/$/.test(t) ? `${t}$` : `${t}(?=$|\\/$)` ], // trailing wildcard [ /(\^|\\\/)?\\\*$/, (t, e) => `${e ? `${e}[^/]+` : "[^/]*"}(?=$|\\/$)` ] ], Ic = /* @__PURE__ */ Object.create(null), cb = /* @__PURE__ */ s((t, e) => { let r = Ic[t]; return r || (r = ub.reduce( (i, n) => i.replace(n[0], n[1].bind(t)), t ), Ic[t] = r), e ? new RegExp(r, "i") : new RegExp(r); }, "makeRegex"), Pn = /* @__PURE__ */ s((t) => typeof t == "string", "isString"), hb = /* @__PURE__ */ s((t) => t && Pn(t) && !Jx.test(t) && !eb.test(t) && t.indexOf("#") !== 0, "checkPattern"), pb = /* @__PURE__ */ s((t) => t.split(ib), "splitPattern"), Tn = class { static { s(this, "IgnoreRule"); } constructor(e, r, i, n) { this.origin = e, this.pattern = r, this.negative = i, this.regex = n; } }, db = /* @__PURE__ */ s((t, e) => { let r = t, i = !1; t.indexOf("!") === 0 && (i = !0, t = t.substr(1)), t = t.replace(tb, "!").replace(rb, "#"); let n = cb(t, e); return new Tn( r, t, i, n ); }, "createRule"), fb = /* @__PURE__ */ s((t, e) => { throw new e(t); }, "throwError"), He = /* @__PURE__ */ s((t, e, r) => Pn(t) ? t ? He.isNotRelative(t) ? r( `path should be a \`path.relative()\`d string, but got "${e}"`, RangeError ) : !0 : r("path must not be empty", TypeError) : r( `path must be a string, but got \`${e}\``, TypeError ), "checkPath"), Lc = /* @__PURE__ */ s((t) => sb.test(t), "isNotRelative"); He.isNotRelative = Lc; He.convert = (t) => t; var An = class { static { s(this, "Ignore"); } constructor({ ignorecase: e = !0, ignoreCase: r = e, allowRelativePaths: i = !1 } = {}) { nb(this, Cc, !0), this._rules = [], this._ignoreCase = r, this._allowRelativePaths = i, this._initCache(); } _initCache() { this._ignoreCache = /* @__PURE__ */ Object.create(null), this._testCache = /* @__PURE__ */ Object.create(null); } _addPattern(e) { if (e && e[Cc]) { this._rules = this._rules.concat(e._rules), this._added = !0; return; } if (hb(e)) { let r = db(e, this._ignoreCase); this._added = !0, this._rules.push(r); } } // @param {Array | string | Ignore} pattern add(e) { return this._added = !1, Pc( Pn(e) ? pb(e) : e ).forEach(this._addPattern, this), this._added && this._initCache(), this; } // legacy addPattern(e) { return this.add(e); } // | ignored : unignored // negative | 0:0 | 0:1 | 1:0 | 1:1 // -------- | ------- | ------- | ------- | -------- // 0 | TEST | TEST | SKIP | X // 1 | TESTIF | SKIP | TEST | X // - SKIP: always skip // - TEST: always test // - TESTIF: only test if checkUnignored // - X: that never happen // @param {boolean} whether should check if the path is unignored, // setting `checkUnignored` to `false` could reduce additional // path matching. // @returns {TestResult} true if a file is ignored _testOne(e, r) { let i = !1, n = !1; return this._rules.forEach((o) => { let { negative: a } = o; if (n === a && i !== n || a && !i && !n && !r) return; o.regex.test(e) && (i = !a, n = a); }), { ignored: i, unignored: n }; } // @returns {TestResult} _test(e, r, i, n) { let o = e && He.convert(e); return He( o, e, this._allowRelativePaths ? Nc : fb ), this._t(o, r, i, n); } _t(e, r, i, n) { if (e in r) return r[e]; if (n || (n = e.split(wn)), n.pop(), !n.length) return r[e] = this._testOne(e, i); let o = this._t( n.join(wn) + wn, r, i, n ); return r[e] = o.ignored ? o : this._testOne(e, i); } ignores(e) { return this._test(e, this._ignoreCache, !1).ignored; } createFilter() { return (e) => !this.ignores(e); } filter(e) { return Pc(e).filter(this.createFilter()); } // @returns {TestResult} test(e) { return this._test(e, this._testCache, !0); } }, Qr = /* @__PURE__ */ s((t) => new An(t), "factory"), mb = /* @__PURE__ */ s((t) => He(t && He.convert(t), t, Nc), "isPathValid"); Qr.isPathValid = mb; Qr.default = Qr; kc.exports = Qr; if ( // Detect `process` so that it can run in browsers. typeof process < "u" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") ) { let t = /* @__PURE__ */ s((r) => /^\\\\\?\\/.test(r) || /["<>|\u0000-\u001F]+/u.test(r) ? r : r.replace(/\\/g, "/"), "makePosix"); He.convert = t; let e = /^[a-z]:\//i; He.isNotRelative = (r) => e.test(r) || Lc(r); } }); // ../node_modules/slash/index.js function Tt(t) { return t.startsWith("\\\\?\\") ? t : t.replace(/\\/g, "/"); } var $c = de(() => { s(Tt, "slash"); }); // ../node_modules/globby/utilities.js var zt, On = de(() => { zt = /* @__PURE__ */ s((t) => t[0] === "!", "isNegativePattern"); }); // ../node_modules/globby/ignore.js var qc, Fc, Hc, dt, Cn, jc, gb, Bc, Xr, yb, _b, xb, Uc, Gc, In, Dn, Wc, Yc, Nn = de(() => { qc = B(require("node:process"), 1), Fc = B(require("node:fs"), 1), Hc = B(require("node:fs/promises"), 1), dt = B(require("node:path"), 1), Cn = B(xn(), 1), jc = B(Mc(), 1); $c(); En(); On(); gb = [ "**/node_modules", "**/flow-typed", "**/coverage", "**/.git" ], Bc = { absolute: !0, dot: !0 }, Xr = "**/.gitignore", yb = /* @__PURE__ */ s((t, e) => zt(t) ? "!" + dt.default.posix.join(e, t.slice(1)) : dt.default.posix.join(e, t), "applyBaseToPattern"), _b = /* @__PURE__ */ s((t, e) => { let r = Tt(dt.default.relative(e, dt.default.dirname(t.filePath))); return t.content.split(/\r?\n/).filter((i) => i && !i.startsWith("#")).map((i) => yb(i, r)); }, "parseIgnoreFile"), xb = /* @__PURE__ */ s((t, e) => { if (e = Tt(e), dt.default.isAbsolute(t)) { if (Tt(t).startsWith(e)) return dt.default.relative(e, t); throw new Error(`Path ${t} is not in cwd ${e}`); } return t; }, "toRelativePath"), Uc = /* @__PURE__ */ s((t, e) => { let r = t.flatMap((n) => _b(n, e)), i = (0, jc.default)().add(r); return (n) => (n = Vt(n), n = xb(n, e), n ? i.ignores(Tt(n)) : !1); }, "getIsIgnoredPredicate"), Gc = /* @__PURE__ */ s((t = {}) => ({ cwd: Vt(t.cwd) ?? qc.default.cwd(), suppressErrors: !!t.suppressErrors, deep: typeof t.deep == "number" ? t.deep : Number.POSITIVE_INFINITY, ignore: [...t.ignore ?? [], ...gb] }), "normalizeOptions"), In = /* @__PURE__ */ s(async (t, e) => { let { cwd: r, suppressErrors: i, deep: n, ignore: o } = Gc(e), a = await (0, Cn.default)(t, { cwd: r, suppressErrors: i, deep: n, ignore: o, ...Bc }), l = await Promise.all( a.map(async (u) => ({ filePath: u, content: await Hc.default.readFile(u, "utf8") })) ); return Uc(l, r); }, "isIgnoredByIgnoreFiles"), Dn = /* @__PURE__ */ s((t, e) => { let { cwd: r, suppressErrors: i, deep: n, ignore: o } = Gc(e), l = Cn.default.sync(t, { cwd: r, suppressErrors: i, deep: n, ignore: o, ...Bc }).map((u) => ({ filePath: u, content: Fc.default.readFileSync(u, "utf8") })); return Uc(l, r); }, "isIgnoredByIgnoreFilesSync"), Wc = /* @__PURE__ */ s((t) => In(Xr, t), "isGitIgnored"), Yc = /* @__PURE__ */ s((t) => Dn(Xr, t), "isGi\ tIgnoredSync"); }); // ../node_modules/globby/index.js var ah = {}; yt(ah, { convertPathToPattern: () => Ob, generateGlobTasks: () => Ab, generateGlobTasksSync: () => Pb, globby: () => vb, globbyStream: () => Rb, globbySync: () => wb, isDynamicPattern: () => Tb, isGitIgnored: () => Wc, isGitIgnoredSync: () => Yc }); var Ln, Kc, ft, At, bb, Qc, Xc, Vc, zc, kn, Sb, Zc, Jc, Zr, eh, Eb, th, rh, ih, sh, nh, oh, Mn, vb, wb, Rb, Tb, Ab, Pb, Ob, lh = de(() => { Ln = B(require("node:process"), 1), Kc = B(require("node:fs"), 1), ft = B(require("node:path"), 1); Ma(); At = B(xn(), 1); Rc(); En(); Nn(); On(); Nn(); bb = /* @__PURE__ */ s((t) => { if (t.some((e) => typeof e != "string")) throw new TypeError("Patterns must be a string or an array of strings"); }, "assertPatternsInput"), Qc = /* @__PURE__ */ s((t, e) => { let r = zt(t) ? t.slice(1) : t; return ft.default.isAbsolute(r) ? r : ft.default.join(e, r); }, "normalizePathForDirectoryGlob"), Xc = /* @__PURE__ */ s(({ directoryPath: t, files: e, extensions: r }) => { let i = r?.length > 0 ? `.${r.length > 1 ? `{${r.join(",")}}` : r[0]}` : ""; return e ? e.map((n) => ft.default.posix.join(t, `**/${ft.default.extname(n) ? n : `${n}${i}`}`)) : [ft.default.posix.join(t, `**${i ? `\ /*${i}` : ""}`)]; }, "getDirectoryGlob"), Vc = /* @__PURE__ */ s(async (t, { cwd: e = Ln.default.cwd(), files: r, extensions: i } = {}) => (await Promise.all( t.map(async (o) => await vc(Qc(o, e)) ? Xc({ directoryPath: o, files: r, extensions: i }) : o) )).flat(), "directoryToGlob"), zc = /* @__PURE__ */ s((t, { cwd: e = Ln.default.cwd(), files: r, extensions: i } = {}) => t.flatMap((n) => wc(Qc(n, e)) ? Xc({ directoryPath: n, files: r, extensions: i }) : n), "directoryToGlobSync"), kn = /* @__PURE__ */ s( (t) => (t = [...new Set([t].flat())], bb(t), t), "toPatternsArray"), Sb = /* @__PURE__ */ s((t) => { if (!t) return; let e; try { e = Kc.default.statSync(t); } catch { return; } if (!e.isDirectory()) throw new Error("The `cwd` option must be a path to a directory"); }, "checkCwdOption"), Zc = /* @__PURE__ */ s((t = {}) => (t = { ...t, ignore: t.ignore ?? [], expandDirectories: t.expandDirectories ?? !0, cwd: Vt(t.cwd) }, Sb(t.cwd), t), "normalizeOptions"), Jc = /* @__PURE__ */ s((t) => async (e, r) => t(kn(e), Zc(r)), "normalizeArguments"), Zr = /* @__PURE__ */ s( (t) => (e, r) => t(kn(e), Zc(r)), "normalizeArgumentsSync"), eh = /* @__PURE__ */ s((t) => { let { ignoreFiles: e, gitignore: r } = t, i = e ? kn(e) : []; return r && i.push(Xr), i; }, "getIgnoreFilesPatterns"), Eb = /* @__PURE__ */ s(async (t) => { let e = eh(t); return rh( e.length > 0 && await In(e, t) ); }, "getFilter"), th = /* @__PURE__ */ s((t) => { let e = eh(t); return rh( e.length > 0 && Dn(e, t) ); }, "getFilterSync"), rh = /* @__PURE__ */ s((t) => { let e = /* @__PURE__ */ new Set(); return (r) => { let i = ft.default.normalize(r.path ?? r); return e.has(i) || t && t(i) ? !1 : (e.add(i), !0); }; }, "createFilterFunction"), ih = /* @__PURE__ */ s((t, e) => t.flat().filter((r) => e(r)), "unionFastGlobResults"), sh = /* @__PURE__ */ s( (t, e) => { let r = []; for (; t.length > 0; ) { let i = t.findIndex((o) => zt(o)); if (i === -1) { r.push({ patterns: t, options: e }); break; } let n = t[i].slice(1); for (let o of r) o.options.ignore.push(n); i !== 0 && r.push({ patterns: t.slice(0, i), options: { ...e, ignore: [ ...e.ignore, n ] } }), t = t.slice(i + 1); } return r; }, "convertNegativePatterns"), nh = /* @__PURE__ */ s((t, e) => ({ ...e ? { cwd: e } : {}, ...Array.isArray(t) ? { files: t } : t }), "normalizeExpandDirectoriesOption"), oh = /* @__PURE__ */ s(async (t, e) => { let r = sh(t, e), { cwd: i, expandDirectories: n } = e; if (!n) return r; let o = nh(n, i); return Promise.all( r.map(async (a) => { let { patterns: l, options: u } = a; return [ l, u.ignore ] = await Promise.all([ Vc(l, o), Vc(u.ignore, { cwd: i }) ]), { patterns: l, options: u }; }) ); }, "generateTasks"), Mn = /* @__PURE__ */ s((t, e) => { let r = sh(t, e), { cwd: i, expandDirectories: n } = e; if (!n) return r; let o = nh(n, i); return r.map((a) => { let { patterns: l, options: u } = a; return l = zc(l, o), u.ignore = zc(u.ignore, { cwd: i }), { patterns: l, options: u }; }); }, "generateTasksSync"), vb = Jc(async (t, e) => { let [ r, i ] = await Promise.all([ oh(t, e), Eb(e) ]), n = await Promise.all(r.map((o) => (0, At.default)(o.patterns, o.options))); return ih(n, i); }), wb = Zr((t, e) => { let r = Mn(t, e), i = th(e), n = r.map((o) => At.default.sync(o.patterns, o.options)); return ih(n, i); }), Rb = Zr((t, e) => { let r = Mn(t, e), i = th(e), n = r.map((a) => At.default.stream(a.patterns, a.options)); return Li(n).filter((a) => i(a)); }), Tb = Zr( (t, e) => t.some((r) => At.default.isDynamicPattern(r, e)) ), Ab = Jc(oh), Pb = Zr(Mn), { convertPathToPattern: Ob } = At.default; }); // ../node_modules/picocolors/picocolors.js var Sh = d((zO, $n) => { var xh = process.argv || [], si = process.env, Lb = !("NO_COLOR" in si || xh.includes("--no-color")) && ("FORCE_COLOR" in si || xh.includes( "--color") || process.platform === "win32" || require != null && require("tty").isatty(1) && si.TERM !== "dumb" || "CI" in si), kb = /* @__PURE__ */ s( (t, e, r = t) => (i) => { let n = "" + i, o = n.indexOf(e, t.length); return ~o ? t + Mb(n, e, r, o) + e : t + n + e; }, "formatter"), Mb = /* @__PURE__ */ s((t, e, r, i) => { let n = "", o = 0; do n += t.substring(o, i) + r, o = i + e.length, i = t.indexOf(e, o); while (~i); return n + t.substring(o); }, "replaceClose"), bh = /* @__PURE__ */ s((t = Lb) => { let e = t ? kb : () => String; return { isColorSupported: t, reset: e("\x1B[0m", "\x1B[0m"), bold: e("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"), dim: e("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"), italic: e("\x1B[3m", "\x1B[23m"), underline: e("\x1B[4m", "\x1B[24m"), inverse: e("\x1B[7m", "\x1B[27m"), hidden: e("\x1B[8m", "\x1B[28m"), strikethrough: e("\x1B[9m", "\x1B[29m"), black: e("\x1B[30m", "\x1B[39m"), red: e("\x1B[31m", "\x1B[39m"), green: e("\x1B[32m", "\x1B[39m"), yellow: e("\x1B[33m", "\x1B[39m"), blue: e("\x1B[34m", "\x1B[39m"), magenta: e("\x1B[35m", "\x1B[39m"), cyan: e("\x1B[36m", "\x1B[39m"), white: e("\x1B[37m", "\x1B[39m"), gray: e("\x1B[90m", "\x1B[39m"), bgBlack: e("\x1B[40m", "\x1B[49m"), bgRed: e("\x1B[41m", "\x1B[49m"), bgGreen: e("\x1B[42m", "\x1B[49m"), bgYellow: e("\x1B[43m", "\x1B[49m"), bgBlue: e("\x1B[44m", "\x1B[49m"), bgMagenta: e("\x1B[45m", "\x1B[49m"), bgCyan: e("\x1B[46m", "\x1B[49m"), bgWhite: e("\x1B[47m", "\x1B[49m"), blackBright: e("\x1B[90m", "\x1B[39m"), redBright: e("\x1B[91m", "\x1B[39m"), greenBright: e("\x1B[92m", "\x1B[39m"), yellowBright: e("\x1B[93m", "\x1B[39m"), blueBright: e("\x1B[94m", "\x1B[39m"), magentaBright: e("\x1B[95m", "\x1B[39m"), cyanBright: e("\x1B[96m", "\x1B[39m"), whiteBright: e("\x1B[97m", "\x1B[39m"), bgBlackBright: e("\x1B[100m", "\x1B[49m"), bgRedBright: e("\x1B[101m", "\x1B[49m"), bgGreenBright: e("\x1B[102m", "\x1B[49m"), bgYellowBright: e("\x1B[103m", "\x1B[49m"), bgBlueBright: e("\x1B[104m", "\x1B[49m"), bgMagentaBright: e("\x1B[105m", "\x1B[49m"), bgCyanBright: e("\x1B[106m", "\x1B[49m"), bgWhiteBright: e("\x1B[107m", "\x1B[49m") }; }, "createColors"); $n.exports = bh(); $n.exports.createColors = bh; }); // ../node_modules/totalist/sync/index.mjs var vh = {}; yt(vh, { totalist: () => Eh }); function Eh(t, e, r = "") { t = (0, Ct.resolve)(".", t); let i = (0, ni.readdirSync)(t), n = 0, o, a; for (; n < i.length; n++) o = (0, Ct.join)(t, i[n]), a = (0, ni.statSync)(o), a.isDirectory() ? Eh(o, e, (0, Ct.join)(r, i[n])) : e((0, Ct.join)(r, i[n]), o, a); } var Ct, ni, wh = de(() => { Ct = require("path"), ni = require("fs"); s(Eh, "totalist"); }); // ../node_modules/@polka/url/build.mjs var Th = {}; yt(Th, { parse: () => $b }); function $b(t) { let e = t.url; if (e == null) return; let r = t._parsedUrl; if (r && r.raw === e) return r; let i = e, n = "", o; if (e.length > 1) { let a = e.indexOf("?", 1); a !== -1 && (n = e.substring(a), i = e.substring(0, a), n.length > 1 && (o = Rh.parse(n.substring(1)))); } return t._parsedUrl = { pathname: i, search: n, query: o, raw: e }; } var Rh, Ah = de(() => { Rh = B(require("querystring"), 1); s($b, "parse"); }); // ../node_modules/mrmime/index.mjs var Oh = {}; yt(Oh, { lookup: () => qb, mimes: () => Ph }); function qb(t) { let e = ("" + t).trim().toLowerCase(), r = e.lastIndexOf("."); return Ph[~r ? e.substring(++r) : e]; } var Ph, Ch = de(() => { Ph = { "3g2": "video/3gpp2", "3gp": "video/3gpp", "3gpp": "video/3gpp", "3mf": "model/3mf", aac: "audio/aac", ac: "application/pkix-attr-cert", adp: "audio/adpcm", adts: "audio/aac", ai: "application/postscript", aml: "application/automationml-aml+xml", amlx: "application/automationml-amlx+zip", amr: "audio/amr", apng: "image/apng", appcache: "text/cache-manifest", appinstaller: "application/appinstaller", appx: "application/appx", appxbundle: "application/appxbundle", asc: "application/pgp-keys", atom: "application/atom+xml", atomcat: "application/atomcat+xml", atomdeleted: "application/atomdeleted+xml", atomsvc: "application/atomsvc+xml", au: "audio/basic", avci: "image/avci", avcs: "image/avcs", avif: "image/avif", aw: "application/applixware", bdoc: "application/bdoc", bin: "application/octet-stream", bmp: "image/bmp", bpk: "application/octet-stream", btf: "image/prs.btif", btif: "image/prs.btif", buffer: "application/octet-stream", ccxml: "application/ccxml+xml", cdfx: "application/cdfx+xml", cdmia: "application/cdmi-capability", cdmic: "application/cdmi-container", cdmid: "application/cdmi-domain", cdmio: "application/cdmi-object", cdmiq: "application/cdmi-queue", cer: "application/pkix-cert", cgm: "image/cgm", cjs: "application/node", class: "application/java-vm", coffee: "text/coffeescript", conf: "text/plain", cpl: "application/cpl+xml", cpt: "application/mac-compactpro", crl: "application/pkix-crl", css: "text/css", csv: "text/csv", cu: "application/cu-seeme", cwl: "application/cwl", cww: "application/prs.cww", davmount: "application/davmount+xml", dbk: "application/docbook+xml", deb: "application/octet-stream", def: "text/plain", deploy: "application/octet-stream", dib: "image/bmp", "disposition-notification": "message/disposition-notification", dist: "application/octet-stream", distz: "application/octet-stream", dll: "application/octet-stream", dmg: "application/octet-stream", dms: "application/octet-stream", doc: "application/msword", dot: "application/msword", dpx: "image/dpx", drle: "image/dicom-rle", dsc: "text/prs.lines.tag", dssc: "application/dssc+der", dtd: "application/xml-dtd", dump: "application/octet-stream", dwd: "application/atsc-dwd+xml", ear: "application/java-archive", ecma: "application/ecmascript", elc: "application/octet-stream", emf: "image/emf", eml: "message/rfc822", emma: "application/emma+xml", emotionml: "application/emotionml+xml", eps: "application/postscript", epub: "application/epub+zip", exe: "application/octet-stream", exi: "application/exi", exp: "application/express", exr: "image/aces", ez: "application/andrew-inset", fdf: "application/fdf", fdt: "application/fdt+xml", fits: "image/fits", g3: "image/g3fax", gbr: "application/rpki-ghostbusters", geojson: "application/geo+json", gif: "image/gif", glb: "model/gltf-binary", gltf: "model/gltf+json", gml: "application/gml+xml", gpx: "application/gpx+xml", gram: "application/srgs", grxml: "application/srgs+xml", gxf: "application/gxf", gz: "application/gzip", h261: "video/h261", h263: "video/h263", h264: "video/h264", heic: "image/heic", heics: "image/heic-sequence", heif: "image/heif", heifs: "image/heif-sequence", hej2: "image/hej2k", held: "application/atsc-held+xml", hjson: "application/hjson", hlp: "application/winhlp", hqx: "application/mac-binhex40", hsj2: "image/hsj2", htm: "text/html", html: "text/html", ics: "text/calendar", ief: "image/ief", ifb: "text/calendar", iges: "model/iges", igs: "model/iges", img: "application/octet-stream", in: "text/plain", ini: "text/plain", ink: "application/inkml+xml", inkml: "application/inkml+xml", ipfix: "application/ipfix", iso: "application/octet-stream", its: "application/its+xml", jade: "text/jade", jar: "application/java-archive", jhc: "image/jphc", jls: "image/jls", jp2: "image/jp2", jpe: "image/jpeg", jpeg: "image/jpeg", jpf: "image/jpx", jpg: "image/jpeg", jpg2: "image/jp2", jpgm: "image/jpm", jpgv: "video/jpeg", jph: "image/jph", jpm: "image/jpm", jpx: "image/jpx", js: "text/javascript", json: "application/json", json5: "application/json5", jsonld: "application/ld+json", jsonml: "application/jsonml+json", jsx: "text/jsx", jt: "model/jt", jxr: "image/jxr", jxra: "image/jxra", jxrs: "image/jxrs", jxs: "image/jxs", jxsc: "image/jxsc", jxsi: "image/jxsi", jxss: "image/jxss", kar: "audio/midi", ktx: "image/ktx", ktx2: "image/ktx2", less: "text/less", lgr: "application/lgr+xml", list: "text/plain", litcoffee: "text/coffeescript", log: "text/plain", lostxml: "application/lost+xml", lrf: "application/octet-stream", m1v: "video/mpeg", m21: "application/mp21", m2a: "audio/mpeg", m2v: "video/mpeg", m3a: "audio/mpeg", m4a: "audio/mp4", m4p: "application/mp4", m4s: "video/iso.segment", ma: "application/mathematica", mads: "application/mads+xml", maei: "application/mmt-aei+xml", man: "text/troff", manifest: "text/cache-manifest", map: "application/json", mar: "application/octet-stream", markdown: "text/markdown", mathml: "application/mathml+xml", mb: "application/mathematica", mbox: "application/mbox", md: "text/markdown", mdx: "text/mdx", me: "text/troff", mesh: "model/mesh", meta4: "application/metalink4+xml", metalink: "application/metalink+xml", mets: "application/mets+xml", mft: "application/rpki-manifest", mid: "audio/midi", midi: "audio/midi", mime: "message/rfc822", mj2: "video/mj2", mjp2: "video/mj2", mjs: "text/javascript", mml: "text/mathml", mods: "application/mods+xml", mov: "video/quicktime", mp2: "audio/mpeg", mp21: "application/mp21", mp2a: "audio/mpeg", mp3: "audio/mpeg", mp4: "video/mp4", mp4a: "audio/mp4", mp4s: "application/mp4", mp4v: "video/mp4", mpd: "application/dash+xml", mpe: "video/mpeg", mpeg: "video/mpeg", mpf: "application/media-policy-dataset+xml", mpg: "video/mpeg", mpg4: "video/mp4", mpga: "audio/mpeg", mpp: "application/dash-patch+xml", mrc: "application/marc", mrcx: "application/marcxml+xml", ms: "text/troff", mscml: "application/mediaservercontrol+xml", msh: "model/mesh", msi: "application/octet-stream", msix: "application/msix", msixbundle: "application/msixbundle", msm: "application/octet-stream", msp: "application/octet-stream", mtl: "model/mtl", musd: "application/mmt-usd+xml", mxf: "application/mxf", mxmf: "audio/mobile-xmf", mxml: "application/xv+xml", n3: "text/n3", nb: "application/mathematica", nq: "application/n-quads", nt: "application/n-triples", obj: "model/obj", oda: "application/oda", oga: "audio/ogg", ogg: "audio/ogg", ogv: "video/ogg", ogx: "application/ogg", omdoc: "application/omdoc+xml", onepkg: "application/onenote", onetmp: "application/onenote", onetoc: "application/onenote", onetoc2: "application/onenote", opf: "application/oebps-package+xml", opus: "audio/ogg", otf: "font/otf", owl: "application/rdf+xml", oxps: "application/oxps", p10: "application/pkcs10", p7c: "application/pkcs7-mime", p7m: "application/pkcs7-mime", p7s: "application/pkcs7-signature", p8: "application/pkcs8", pdf: "application/pdf", pfr: "application/font-tdpfr", pgp: "application/pgp-encrypted", pkg: "application/octet-stream", pki: "application/pkixcmp", pkipath: "application/pkix-pkipath", pls: "application/pls+xml", png: "image/png", prc: "model/prc", prf: "application/pics-rules", provx: "application/provenance+xml", ps: "application/postscript", pskcxml: "application/pskc+xml", pti: "image/prs.pti", qt: "video/quicktime", raml: "application/raml+yaml", rapd: "application/route-apd+xml", rdf: "application/rdf+xml", relo: "application/p2p-overlay+xml", rif: "application/reginfo+xml", rl: "application/resource-lists+xml", rld: "application/resource-lists-diff+xml", rmi: "audio/midi", rnc: "application/relax-ng-compact-syntax", rng: "application/xml", roa: "application/rpki-roa", roff: "text/troff", rq: "application/sparql-query", rs: "application/rls-services+xml", rsat: "application/atsc-rsat+xml", rsd: "application/rsd+xml", rsheet: "application/urc-ressheet+xml", rss: "application/rss+xml", rtf: "text/rtf", rtx: "text/richtext", rusd: "application/route-usd+xml", s3m: "audio/s3m", sbml: "application/sbml+xml", scq: "application/scvp-cv-request", scs: "application/scvp-cv-response", sdp: "application/sdp", senmlx: "application/senml+xml", sensmlx: "application/sensml+xml", ser: "application/java-serialized-object", setpay: "application/set-payment-initiation", setreg: "application/set-registration-initiation", sgi: "image/sgi", sgm: "text/sgml", sgml: "text/sgml", shex: "text/shex", shf: "application/shf+xml", shtml: "text/html", sieve: "application/sieve", sig: "application/pgp-signature", sil: "audio/silk", silo: "model/mesh", siv: "application/sieve", slim: "text/slim", slm: "text/slim", sls: "application/route-s-tsid+xml", smi: "application/smil+xml", smil: "application/smil+xml", snd: "audio/basic", so: "application/octet-stream", spdx: "text/spdx", spp: "application/scvp-vp-response", spq: "application/scvp-vp-request", spx: "audio/ogg", sql: "application/sql", sru: "application/sru+xml", srx: "application/sparql-results+xml", ssdl: "application/ssdl+xml", ssml: "application/ssml+xml", stk: "application/hyperstudio", stl: "model/stl", stpx: "model/step+xml", stpxz: "model/step-xml+zip", stpz: "model/step+zip", styl: "text/stylus", stylus: "text/stylus", svg: "image/svg+xml", svgz: "image/svg+xml", swidtag: "application/swid+xml", t: "text/troff", t38: "image/t38", td: "application/urc-targetdesc+xml", tei: "application/tei+xml", teicorpus: "application/tei+xml", text: "text/plain", tfi: "application/thraud+xml", tfx: "image/tiff-fx", tif: "image/tiff", tiff: "image/tiff", toml: "application/toml", tr: "text/troff", trig: "application/trig", ts: "video/mp2t", tsd: "application/timestamped-data", tsv: "text/tab-separated-values", ttc: "font/collection", ttf: "font/ttf", ttl: "text/turtle", ttml: "application/ttml+xml", txt: "text/plain", u3d: "model/u3d", u8dsn: "message/global-delivery-status", u8hdr: "message/global-headers", u8mdn: "message/global-disposition-notification", u8msg: "message/global", ubj: "application/ubjson", uri: "text/uri-list", uris: "text/uri-list", urls: "text/uri-list", vcard: "text/vcard", vrml: "model/vrml", vtt: "text/vtt", vxml: "application/voicexml+xml", war: "application/java-archive", wasm: "application/wasm", wav: "audio/wav", weba: "audio/webm", webm: "video/webm", webmanifest: "application/manifest+json", webp: "image/webp", wgsl: "text/wgsl", wgt: "application/widget", wif: "application/watcherinfo+xml", wmf: "image/wmf", woff: "font/woff", woff2: "font/woff2", wrl: "model/vrml", wsdl: "application/wsdl+xml", wspolicy: "application/wspolicy+xml", x3d: "model/x3d+xml", x3db: "model/x3d+fastinfoset", x3dbz: "model/x3d+binary", x3dv: "model/x3d-vrml", x3dvz: "model/x3d+vrml", x3dz: "model/x3d+xml", xaml: "application/xaml+xml", xav: "application/xcap-att+xml", xca: "application/xcap-caps+xml", xcs: "application/calendar+xml", xdf: "application/xcap-diff+xml", xdssc: "application/dssc+xml", xel: "application/xcap-el+xml", xenc: "application/xenc+xml", xer: "application/patch-ops-error+xml", xfdf: "application/xfdf", xht: "application/xhtml+xml", xhtml: "application/xhtml+xml", xhvml: "application/xv+xml", xlf: "application/xliff+xml", xm: "audio/xm", xml: "text/xml", xns: "application/xcap-ns+xml", xop: "application/xop+xml", xpl: "application/xproc+xml", xsd: "application/xml", xsf: "application/prs.xsf+xml", xsl: "application/xml", xslt: "application/xml", xspf: "application/xspf+xml", xvm: "application/xv+xml", xvml: "application/xv+xml", yaml: "text/yaml", yang: "application/yang", yin: "application/yin+xml", yml: "text/yaml", zip: "application/zip" }; s(qb, "lookup"); }); // ../node_modules/sirv/build.js var Lh = d((JO, Nh) => { var qn = require("fs"), { join: Fb, normalize: Hb, resolve: jb } = require("path"), { totalist: Bb } = (wh(), fr(vh)), { parse: Ub } = (Ah(), fr(Th)), { lookup: Gb } = (Ch(), fr(Oh)), Wb = /* @__PURE__ */ s(() => { }, "noop"); function Yb(t, e) { for (let r = 0; r < e.length; r++) if (e[r].test(t)) return !0; } s(Yb, "isMatch"); function Ih(t, e) { let r = 0, i, n = t.length - 1; t.charCodeAt(n) === 47 && (t = t.substring(0, n)); let o = [], a = `${t}/index`; for (; r < e.length; r++) i = e[r] ? `.${e[r]}` : "", t && o.push(t + i), o.push(a + i); return o; } s(Ih, "toAssume"); function Vb(t, e, r) { let i = 0, n, o = Ih(e, r); for (; i < o.length; i++) if (n = t[o[i]]) return n; } s(Vb, "viaCache"); function zb(t, e, r, i) { let n = 0, o = Ih(r, i), a, l, u, c; for (; n < o.length; n++) if (a = Hb(Fb(t, u = o[n])), a.startsWith(t) && qn.existsSync(a)) { if (l = qn.statSync(a), l.isDirectory()) continue; return c = Dh(u, l, e), c["Cache-Control"] = e ? "no-cache" : "no-store", { abs: a, stats: l, headers: c }; } } s(zb, "viaLocal"); function Kb(t, e) { return e.statusCode = 404, e.end(); } s(Kb, "is404"); function Qb(t, e, r, i, n) { let o = 200, a, l = {}; n = { ...n }; for (let u in n) a = e.getHeader(u), a && (n[u] = a); if ((a = e.getHeader("content-type")) && (n["Content-Type"] = a), t.headers.range) { o = 206; let [u, c] = t.headers.range.replace("bytes=", "").split("-"), p = l.end = parseInt(c, 10) || i.size - 1, f = l.start = parseInt(u, 10) || 0; if (p >= i.size && (p = i.size - 1), f >= i.size) return e.setHeader("Content-Range", `bytes */${i.size}`), e.statusCode = 416, e.end(); n["Content-Range"] = `bytes ${f}-${p}/${i.size}`, n["Content-Length"] = p - f + 1, n["Accept-Ranges"] = "bytes"; } e.writeHead(o, n), qn.createReadStream(r, l).pipe(e); } s(Qb, "send"); var Xb = { ".br": "br", ".gz": "gzip" }; function Dh(t, e, r) { let i = Xb[t.slice(-3)], n = Gb(t.slice(0, i && -3)) || ""; n === "text/html" && (n += ";charset=utf-8"); let o = { "Content-Length": e.size, "Content-Type": n, "Last-Modified": e.mtime.toUTCString() }; return i && (o["Content-Encoding"] = i), r && (o.ETag = `W/"${e.size}-${e.mtime.getTime()}"`), o; } s(Dh, "toHeaders"); Nh.exports = function(t, e = {}) { t = jb(t || "."); let r = e.onNoMatch || Kb, i = e.setHeaders || Wb, n = e.extensions || ["html", "htm"], o = e.gzip && n.map((m) => `${m}.gz`).concat("gz"), a = e.brotli && n.map((m) => `${m}.br`).concat("br"), l = {}, u = "/", c = !!e.etag, p = !!e.single; if (typeof e.single == "string") { let m = e.single.lastIndexOf("."); u += ~m ? e.single.substring(0, m) : e.single; } let f = []; e.ignores !== !1 && (f.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/), e.dotfiles ? f.push(/\/\.\w/) : f.push(/\/\.well-known/), [].concat(e. ignores || []).forEach((m) => { f.push(new RegExp(m, "i")); })); let h = e.maxAge != null && `public,max-age=${e.maxAge}`; h && e.immutable ? h += ",immutable" : h && e.maxAge === 0 && (h += ",must-revalidate"), e.dev || Bb(t, (m, x, w) => { if (!/\.well-known[\\+\/]/.test(m)) { if (!e.dotfiles && /(^\.|[\\+|\/+]\.)/.test(m)) return; } let R = Dh(m, w, c); h && (R["Cache-Control"] = h), l["/" + m.normalize().replace(/\\+/g, "/")] = { abs: x, stats: w, headers: R }; }); let E = e.dev ? zb.bind(0, t, c) : Vb.bind(0, l); return function(m, x, w) { let R = [""], N = Ub(m).pathname, C = m.headers["accept-encoding"] || ""; if (o && C.includes("gzip") && R.unshift(...o), a && /(br|brotli)/i.test(C) && R.unshift(...a), R.push(...n), N.indexOf("%") !== -1) try { N = decodeURI(N); } catch { } let W = E(N, R) || p && !Yb(N, f) && E(u, R); if (!W) return w ? w() : r(m, x); if (c && m.headers["if-none-match"] === W.headers.ETag) return x.writeHead(304), x.end(); (o || a) && x.setHeader("Vary", "Accept-Encoding"), i(x, N, W.stats), Qb(m, x, W.abs, W.stats, W.headers); }; }; }); // ../node_modules/prompts/node_modules/kleur/index.js var V = d((nC, Hh) => { "use strict"; var { FORCE_COLOR: rS, NODE_DISABLE_COLORS: iS, TERM: sS } = process.env, $ = { enabled: !iS && sS !== "dumb" && rS !== "0", // modifiers reset: F(0, 0), bold: F(1, 22), dim: F(2, 22), italic: F(3, 23), underline: F(4, 24), inverse: F(7, 27), hidden: F(8, 28), strikethrough: F(9, 29), // colors black: F(30, 39), red: F(31, 39), green: F(32, 39), yellow: F(33, 39), blue: F(34, 39), magenta: F(35, 39), cyan: F(36, 39), white: F(37, 39), gray: F(90, 39), grey: F(90, 39), // background colors bgBlack: F(40, 49), bgRed: F(41, 49), bgGreen: F(42, 49), bgYellow: F(43, 49), bgBlue: F(44, 49), bgMagenta: F(45, 49), bgCyan: F(46, 49), bgWhite: F(47, 49) }; function Fh(t, e) { let r = 0, i, n = "", o = ""; for (; r < t.length; r++) i = t[r], n += i.open, o += i.close, e.includes(i.close) && (e = e.replace(i.rgx, i.close + i.open)); return n + e + o; } s(Fh, "run"); function nS(t, e) { let r = { has: t, keys: e }; return r.reset = $.reset.bind(r), r.bold = $.bold.bind(r), r.dim = $.dim.bind(r), r.italic = $.italic.bind(r), r.underline = $.underline. bind(r), r.inverse = $.inverse.bind(r), r.hidden = $.hidden.bind(r), r.strikethrough = $.strikethrough.bind(r), r.black = $.black.bind(r), r.red = $.red.bind(r), r.green = $.green.bind(r), r.yellow = $.yellow.bind(r), r.blue = $.blue.bind(r), r.magenta = $.magenta.bind(r), r. cyan = $.cyan.bind(r), r.white = $.white.bind(r), r.gray = $.gray.bind(r), r.grey = $.grey.bind(r), r.bgBlack = $.bgBlack.bind(r), r.bgRed = $.bgRed.bind(r), r.bgGreen = $.bgGreen.bind(r), r.bgYellow = $.bgYellow.bind(r), r.bgBlue = $.bgBlue.bind(r), r.bgMagenta = $.bgMagenta. bind(r), r.bgCyan = $.bgCyan.bind(r), r.bgWhite = $.bgWhite.bind(r), r; } s(nS, "chain"); function F(t, e) { let r = { open: `\x1B[${t}m`, close: `\x1B[${e}m`, rgx: new RegExp(`\\x1b\\[${e}m`, "g") }; return function(i) { return this !== void 0 && this.has !== void 0 ? (this.has.includes(t) || (this.has.push(t), this.keys.push(r)), i === void 0 ? this : $. enabled ? Fh(this.keys, i + "") : i + "") : i === void 0 ? nS([t], [r]) : $.enabled ? Fh([r], i + "") : i + ""; }; } s(F, "init"); Hh.exports = $; }); // ../node_modules/prompts/dist/util/action.js var Bh = d((aC, jh) => { "use strict"; jh.exports = (t, e) => { if (!(t.meta && t.name !== "escape")) { if (t.ctrl) { if (t.name === "a") return "first"; if (t.name === "c" || t.name === "d") return "abort"; if (t.name === "e") return "last"; if (t.name === "g") return "reset"; } if (e) { if (t.name === "j") return "down"; if (t.name === "k") return "up"; } return t.name === "return" || t.name === "enter" ? "submit" : t.name === "backspace" ? "delete" : t.name === "delete" ? "deleteForward" : t.name === "abort" ? "abort" : t.name === "escape" ? "exit" : t.name === "tab" ? "next" : t.name === "pagedown" ? "nextPage" : t.name === "pageup" ? "prevPage" : t.name === "home" ? "home" : t.name === "end" ? "end" : t.name === "up" ? "up" : t.name === "down" ? "down" : t. name === "right" ? "right" : t.name === "left" ? "left" : !1; } }; }); // ../node_modules/prompts/dist/util/strip.js var oi = d((lC, Uh) => { "use strict"; Uh.exports = (t) => { let e = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"), r = new RegExp(e, "g"); return typeof t == "string" ? t.replace(r, "") : t; }; }); // ../node_modules/sisteransi/src/index.js var K = d((uC, Gh) => { "use strict"; var jn = "\x1B", z = `${jn}[`, oS = "\x07", Bn = { to(t, e) { return e ? `${z}${e + 1};${t + 1}H` : `${z}${t + 1}G`; }, move(t, e) { let r = ""; return t < 0 ? r += `${z}${-t}D` : t > 0 && (r += `${z}${t}C`), e < 0 ? r += `${z}${-e}A` : e > 0 && (r += `${z}${e}B`), r; }, up: /* @__PURE__ */ s((t = 1) => `${z}${t}A`, "up"), down: /* @__PURE__ */ s((t = 1) => `${z}${t}B`, "down"), forward: /* @__PURE__ */ s((t = 1) => `${z}${t}C`, "forward"), backward: /* @__PURE__ */ s((t = 1) => `${z}${t}D`, "backward"), nextLine: /* @__PURE__ */ s((t = 1) => `${z}E`.repeat(t), "nextLine"), prevLine: /* @__PURE__ */ s((t = 1) => `${z}F`.repeat(t), "prevLine"), left: `${z}G`, hide: `${z}?25l`, show: `${z}?25h`, save: `${jn}7`, restore: `${jn}8` }, aS = { up: /* @__PURE__ */ s((t = 1) => `${z}S`.repeat(t), "up"), down: /* @__PURE__ */ s((t = 1) => `${z}T`.repeat(t), "down") }, lS = { screen: `${z}2J`, up: /* @__PURE__ */ s((t = 1) => `${z}1J`.repeat(t), "up"), down: /* @__PURE__ */ s((t = 1) => `${z}J`.repeat(t), "down"), line: `${z}2K`, lineEnd: `${z}K`, lineStart: `${z}1K`, lines(t) { let e = ""; for (let r = 0; r < t; r++) e += this.line + (r < t - 1 ? Bn.up() : ""); return t && (e += Bn.left), e; } }; Gh.exports = { cursor: Bn, scroll: aS, erase: lS, beep: oS }; }); // ../node_modules/prompts/dist/util/clear.js var Kh = d((hC, zh) => { "use strict"; function uS(t, e) { var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"]; if (!r) { if (Array.isArray(t) || (r = cS(t)) || e && t && typeof t.length == "number") { r && (t = r); var i = 0, n = /* @__PURE__ */ s(function() { }, "F"); return { s: n, n: /* @__PURE__ */ s(function() { return i >= t.length ? { done: !0 } : { done: !1, value: t[i++] }; }, "n"), e: /* @__PURE__ */ s(function(c) { throw c; }, "e"), f: n }; } throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } var o = !0, a = !1, l; return { s: /* @__PURE__ */ s(function() { r = r.call(t); }, "s"), n: /* @__PURE__ */ s(function() { var c = r.next(); return o = c.done, c; }, "n"), e: /* @__PURE__ */ s(function(c) { a = !0, l = c; }, "e"), f: /* @__PURE__ */ s(function() { try { !o && r.return != null && r.return(); } finally { if (a) throw l; } }, "f") }; } s(uS, "_createForOfIteratorHelper"); function cS(t, e) { if (t) { if (typeof t == "string") return Wh(t, e); var r = Object.prototype.toString.call(t).slice(8, -1); if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") return Array.from(t); if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Wh(t, e); } } s(cS, "_unsupportedIterableToArray"); function Wh(t, e) { (e == null || e > t.length) && (e = t.length); for (var r = 0, i = new Array(e); r < e; r++) i[r] = t[r]; return i; } s(Wh, "_arrayLikeToArray"); var hS = oi(), Vh = K(), Yh = Vh.erase, pS = Vh.cursor, dS = /* @__PURE__ */ s((t) => [...hS(t)].length, "width"); zh.exports = function(t, e) { if (!e) return Yh.line + pS.to(0); let r = 0, i = t.split(/\r?\n/); var n = uS(i), o; try { for (n.s(); !(o = n.n()).done; ) { let a = o.value; r += 1 + Math.floor(Math.max(dS(a) - 1, 0) / e); } } catch (a) { n.e(a); } finally { n.f(); } return Yh.lines(r); }; }); // ../node_modules/prompts/dist/util/figures.js var Un = d((dC, Qh) => { "use strict"; var Zt = { arrowUp: "\u2191", arrowDown: "\u2193", arrowLeft: "\u2190", arrowRight: "\u2192", radioOn: "\u25C9", radioOff: "\u25EF", tick: "\u2714", cross: "\u2716", ellipsis: "\u2026", pointerSmall: "\u203A", line: "\u2500", pointer: "\u276F" }, fS = { arrowUp: Zt.arrowUp, arrowDown: Zt.arrowDown, arrowLeft: Zt.arrowLeft, arrowRight: Zt.arrowRight, radioOn: "(*)", radioOff: "( )", tick: "\u221A", cross: "\xD7", ellipsis: "...", pointerSmall: "\xBB", line: "\u2500", pointer: ">" }, mS = process.platform === "win32" ? fS : Zt; Qh.exports = mS; }); // ../node_modules/prompts/dist/util/style.js var Zh = d((fC, Xh) => { "use strict"; var It = V(), mt = Un(), Gn = Object.freeze({ password: { scale: 1, render: /* @__PURE__ */ s((t) => "*".repeat(t.length), "render") }, emoji: { scale: 2, render: /* @__PURE__ */ s((t) => "\u{1F603}".repeat(t.length), "render") }, invisible: { scale: 0, render: /* @__PURE__ */ s((t) => "", "render") }, default: { scale: 1, render: /* @__PURE__ */ s((t) => `${t}`, "render") } }), gS = /* @__PURE__ */ s((t) => Gn[t] || Gn.default, "render"), Jt = Object.freeze({ aborted: It.red(mt.cross), done: It.green(mt.tick), exited: It.yellow(mt.cross), default: It.cyan("?") }), yS = /* @__PURE__ */ s((t, e, r) => e ? Jt.aborted : r ? Jt.exited : t ? Jt.done : Jt.default, "symbol"), _S = /* @__PURE__ */ s((t) => It. gray(t ? mt.ellipsis : mt.pointerSmall), "delimiter"), xS = /* @__PURE__ */ s((t, e) => It.gray(t ? e ? mt.pointerSmall : "+" : mt.line), "\ item"); Xh.exports = { styles: Gn, render: gS, symbols: Jt, symbol: yS, delimiter: _S, item: xS }; }); // ../node_modules/prompts/dist/util/lines.js var ep = d((gC, Jh) => { "use strict"; var bS = oi(); Jh.exports = function(t, e) { let r = String(bS(t) || "").split(/\r?\n/); return e ? r.map((i) => Math.ceil(i.length / e)).reduce((i, n) => i + n) : r.length; }; }); // ../node_modules/prompts/dist/util/wrap.js var rp = d((yC, tp) => { "use strict"; tp.exports = (t, e = {}) => { let r = Number.isSafeInteger(parseInt(e.margin)) ? new Array(parseInt(e.margin)).fill(" ").join("") : e.margin || "", i = e.width; return (t || "").split(/\r?\n/g).map((n) => n.split(/\s+/g).reduce((o, a) => (a.length + r.length >= i || o[o.length - 1].length + a.length + 1 < i ? o[o.length - 1] += ` ${a}` : o.push(`${r}${a}`), o), [r]).join(` `)).join(` `); }; }); // ../node_modules/prompts/dist/util/entriesToDisplay.js var sp = d((_C, ip) => { "use strict"; ip.exports = (t, e, r) => { r = r || e; let i = Math.min(e - r, t - Math.floor(r / 2)); i < 0 && (i = 0); let n = Math.min(i + r, e); return { startIndex: i, endIndex: n }; }; }); // ../node_modules/prompts/dist/util/index.js var Ee = d((xC, np) => { "use strict"; np.exports = { action: Bh(), clear: Kh(), style: Zh(), strip: oi(), figures: Un(), lines: ep(), wrap: rp(), entriesToDisplay: sp() }; }); // ../node_modules/prompts/dist/elements/prompt.js var Be = d((bC, lp) => { "use strict"; var op = require("readline"), SS = Ee(), ES = SS.action, vS = require("events"), ap = K(), wS = ap.beep, RS = ap.cursor, TS = V(), Wn = class extends vS { static { s(this, "Prompt"); } constructor(e = {}) { super(), this.firstRender = !0, this.in = e.stdin || process.stdin, this.out = e.stdout || process.stdout, this.onRender = (e.onRender || (() => { })).bind(this); let r = op.createInterface({ input: this.in, escapeCodeTimeout: 50 }); op.emitKeypressEvents(this.in, r), this.in.isTTY && this.in.setRawMode(!0); let i = ["SelectPrompt", "MultiselectPrompt"].indexOf(this.constructor.name) > -1, n = /* @__PURE__ */ s((o, a) => { let l = ES(a, i); l === !1 ? this._ && this._(o, a) : typeof this[l] == "function" ? this[l](a) : this.bell(); }, "keypress"); this.close = () => { this.out.write(RS.show), this.in.removeListener("keypress", n), this.in.isTTY && this.in.setRawMode(!1), r.close(), this.emit(this.aborted ? "abort" : this.exited ? "exit" : "submit", this.value), this.closed = !0; }, this.in.on("keypress", n); } fire() { this.emit("state", { value: this.value, aborted: !!this.aborted, exited: !!this.exited }); } bell() { this.out.write(wS); } render() { this.onRender(TS), this.firstRender && (this.firstRender = !1); } }; lp.exports = Wn; }); // ../node_modules/prompts/dist/elements/text.js var dp = d((EC, pp) => { "use strict"; function up(t, e, r, i, n, o, a) { try { var l = t[o](a), u = l.value; } catch (c) { r(c); return; } l.done ? e(u) : Promise.resolve(u).then(i, n); } s(up, "asyncGeneratorStep"); function cp(t) { return function() { var e = this, r = arguments; return new Promise(function(i, n) { var o = t.apply(e, r); function a(u) { up(o, i, n, a, l, "next", u); } s(a, "_next"); function l(u) { up(o, i, n, a, l, "throw", u); } s(l, "_throw"), a(void 0); }); }; } s(cp, "_asyncToGenerator"); var ai = V(), AS = Be(), hp = K(), PS = hp.erase, er = hp.cursor, li = Ee(), Yn = li.style, Vn = li.clear, OS = li.lines, CS = li.figures, zn = class extends AS { static { s(this, "TextPrompt"); } constructor(e = {}) { super(e), this.transform = Yn.render(e.style), this.scale = this.transform.scale, this.msg = e.message, this.initial = e.initial || "", this.validator = e.validate || (() => !0), this.value = "", this.errorMsg = e.error || "Please Enter A Valid Value", this.cursor = +!!this. initial, this.cursorOffset = 0, this.clear = Vn("", this.out.columns), this.render(); } set value(e) { !e && this.initial ? (this.placeholder = !0, this.rendered = ai.gray(this.transform.render(this.initial))) : (this.placeholder = !1, this. rendered = this.transform.render(e)), this._value = e, this.fire(); } get value() { return this._value; } reset() { this.value = "", this.cursor = +!!this.initial, this.cursorOffset = 0, this.fire(), this.render(); } exit() { this.abort(); } abort() { this.value = this.value || this.initial, this.done = this.aborted = !0, this.error = !1, this.red = !1, this.fire(), this.render(), this. out.write(` `), this.close(); } validate() { var e = this; return cp(function* () { let r = yield e.validator(e.value); typeof r == "string" && (e.errorMsg = r, r = !1), e.error = !r; })(); } submit() { var e = this; return cp(function* () { if (e.value = e.value || e.initial, e.cursorOffset = 0, e.cursor = e.rendered.length, yield e.validate(), e.error) { e.red = !0, e.fire(), e.render(); return; } e.done = !0, e.aborted = !1, e.fire(), e.render(), e.out.write(` `), e.close(); })(); } next() { if (!this.placeholder) return this.bell(); this.value = this.initial, this.cursor = this.rendered.length, this.fire(), this.render(); } moveCursor(e) { this.placeholder || (this.cursor = this.cursor + e, this.cursorOffset += e); } _(e, r) { let i = this.value.slice(0, this.cursor), n = this.value.slice(this.cursor); this.value = `${i}${e}${n}`, this.red = !1, this.cursor = this.placeholder ? 0 : i.length + 1, this.render(); } delete() { if (this.isCursorAtStart()) return this.bell(); let e = this.value.slice(0, this.cursor - 1), r = this.value.slice(this.cursor); this.value = `${e}${r}`, this.red = !1, this.isCursorAtStart() ? this.cursorOffset = 0 : (this.cursorOffset++, this.moveCursor(-1)), this. render(); } deleteForward() { if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell(); let e = this.value.slice(0, this.cursor), r = this.value.slice(this.cursor + 1); this.value = `${e}${r}`, this.red = !1, this.isCursorAtEnd() ? this.cursorOffset = 0 : this.cursorOffset++, this.render(); } first() { this.cursor = 0, this.render(); } last() { this.cursor = this.value.length, this.render(); } left() { if (this.cursor <= 0 || this.placeholder) return this.bell(); this.moveCursor(-1), this.render(); } right() { if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell(); this.moveCursor(1), this.render(); } isCursorAtStart() { return this.cursor === 0 || this.placeholder && this.cursor === 1; } isCursorAtEnd() { return this.cursor === this.rendered.length || this.placeholder && this.cursor === this.rendered.length + 1; } render() { this.closed || (this.firstRender || (this.outputError && this.out.write(er.down(OS(this.outputError, this.out.columns) - 1) + Vn(this. outputError, this.out.columns)), this.out.write(Vn(this.outputText, this.out.columns))), super.render(), this.outputError = "", this.outputText = [Yn.symbol(this.done, this.aborted), ai.bold(this.msg), Yn.delimiter(this.done), this.red ? ai.red(this.rendered) : this.rendered].join( " "), this.error && (this.outputError += this.errorMsg.split(` `).reduce((e, r, i) => e + ` ${i ? " " : CS.pointerSmall} ${ai.red().italic(r)}`, "")), this.out.write(PS.line + er.to(0) + this.outputText + er.save + this.outputError + er.restore + er.move(this.cursorOffset, 0))); } }; pp.exports = zn; }); // ../node_modules/prompts/dist/elements/select.js var yp = d((wC, gp) => { "use strict"; var Ue = V(), IS = Be(), tr = Ee(), fp = tr.style, mp = tr.clear, ui = tr.figures, DS = tr.wrap, NS = tr.entriesToDisplay, LS = K(), kS = LS. cursor, Kn = class extends IS { static { s(this, "SelectPrompt"); } constructor(e = {}) { super(e), this.msg = e.message, this.hint = e.hint || "- Use arrow-keys. Return to submit.", this.warn = e.warn || "- This option is d\ isabled", this.cursor = e.initial || 0, this.choices = e.choices.map((r, i) => (typeof r == "string" && (r = { title: r, value: i }), { title: r && (r.title || r.value || r), value: r && (r.value === void 0 ? i : r.value), description: r && r.description, selected: r && r.selected, disabled: r && r.disabled })), this.optionsPerPage = e.optionsPerPage || 10, this.value = (this.choices[this.cursor] || {}).value, this.clear = mp("", this.out. columns), this.render(); } moveCursor(e) { this.cursor = e, this.value = this.choices[e].value, this.fire(); } reset() { this.moveCursor(0), this.fire(), this.render(); } exit() { this.abort(); } abort() { this.done = this.aborted = !0, this.fire(), this.render(), this.out.write(` `), this.close(); } submit() { this.selection.disabled ? this.bell() : (this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(` `), this.close()); } first() { this.moveCursor(0), this.render(); } last() { this.moveCursor(this.choices.length - 1), this.render(); } up() { this.cursor === 0 ? this.moveCursor(this.choices.length - 1) : this.moveCursor(this.cursor - 1), this.render(); } down() { this.cursor === this.choices.length - 1 ? this.moveCursor(0) : this.moveCursor(this.cursor + 1), this.render(); } next() { this.moveCursor((this.cursor + 1) % this.choices.length), this.render(); } _(e, r) { if (e === " ") return this.submit(); } get selection() { return this.choices[this.cursor]; } render() { if (this.closed) return; this.firstRender ? this.out.write(kS.hide) : this.out.write(mp(this.outputText, this.out.columns)), super.render(); let e = NS(this.cursor, this.choices.length, this.optionsPerPage), r = e.startIndex, i = e.endIndex; if (this.outputText = [fp.symbol(this.done, this.aborted), Ue.bold(this.msg), fp.delimiter(!1), this.done ? this.selection.title : this. selection.disabled ? Ue.yellow(this.warn) : Ue.gray(this.hint)].join(" "), !this.done) { this.outputText += ` `; for (let n = r; n < i; n++) { let o, a, l = "", u = this.choices[n]; n === r && r > 0 ? a = ui.arrowUp : n === i - 1 && i < this.choices.length ? a = ui.arrowDown : a = " ", u.disabled ? (o = this.cursor === n ? Ue.gray().underline(u.title) : Ue.strikethrough().gray(u.title), a = (this.cursor === n ? Ue.bold().gray(ui.pointer) + " " : "\ ") + a) : (o = this.cursor === n ? Ue.cyan().underline(u.title) : u.title, a = (this.cursor === n ? Ue.cyan(ui.pointer) + " " : " ") + a, u.description && this.cursor === n && (l = ` - ${u.description}`, (a.length + o.length + l.length >= this.out.columns || u.description. split(/\r?\n/).length > 1) && (l = ` ` + DS(u.description, { margin: 3, width: this.out.columns })))), this.outputText += `${a} ${o}${Ue.gray(l)} `; } } this.out.write(this.outputText); } }; gp.exports = Kn; }); // ../node_modules/prompts/dist/elements/toggle.js var vp = d((TC, Ep) => { "use strict"; var ci = V(), MS = Be(), bp = Ee(), _p = bp.style, $S = bp.clear, Sp = K(), xp = Sp.cursor, qS = Sp.erase, Qn = class extends MS { static { s(this, "TogglePrompt"); } constructor(e = {}) { super(e), this.msg = e.message, this.value = !!e.initial, this.active = e.active || "on", this.inactive = e.inactive || "off", this.initialValue = this.value, this.render(); } reset() { this.value = this.initialValue, this.fire(), this.render(); } exit() { this.abort(); } abort() { this.done = this.aborted = !0, this.fire(), this.render(), this.out.write(` `), this.close(); } submit() { this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(` `), this.close(); } deactivate() { if (this.value === !1) return this.bell(); this.value = !1, this.render(); } activate() { if (this.value === !0) return this.bell(); this.value = !0, this.render(); } delete() { this.deactivate(); } left() { this.deactivate(); } right() { this.activate(); } down() { this.deactivate(); } up() { this.activate(); } next() { this.value = !this.value, this.fire(), this.render(); } _(e, r) { if (e === " ") this.value = !this.value; else if (e === "1") this.value = !0; else if (e === "0") this.value = !1; else return this.bell(); this.render(); } render() { this.closed || (this.firstRender ? this.out.write(xp.hide) : this.out.write($S(this.outputText, this.out.columns)), super.render(), this. outputText = [_p.symbol(this.done, this.aborted), ci.bold(this.msg), _p.delimiter(this.done), this.value ? this.inactive : ci.cyan().underline( this.inactive), ci.gray("/"), this.value ? ci.cyan().underline(this.active) : this.active].join(" "), this.out.write(qS.line + xp.to(0) + this.outputText)); } }; Ep.exports = Qn; }); // ../node_modules/prompts/dist/dateparts/datepart.js var De = d((PC, wp) => { "use strict"; var Xn = class t { static { s(this, "DatePart"); } constructor({ token: e, date: r, parts: i, locales: n }) { this.token = e, this.date = r || /* @__PURE__ */ new Date(), this.parts = i || [this], this.locales = n || {}; } up() { } down() { } next() { let e = this.parts.indexOf(this); return this.parts.find((r, i) => i > e && r instanceof t); } setTo(e) { } prev() { let e = [].concat(this.parts).reverse(), r = e.indexOf(this); return e.find((i, n) => n > r && i instanceof t); } toString() { return String(this.date); } }; wp.exports = Xn; }); // ../node_modules/prompts/dist/dateparts/meridiem.js var Tp = d((CC, Rp) => { "use strict"; var FS = De(), Zn = class extends FS { static { s(this, "Meridiem"); } constructor(e = {}) { super(e); } up() { this.date.setHours((this.date.getHours() + 12) % 24); } down() { this.up(); } toString() { let e = this.date.getHours() > 12 ? "pm" : "am"; return /\A/.test(this.token) ? e.toUpperCase() : e; } }; Rp.exports = Zn; }); // ../node_modules/prompts/dist/dateparts/day.js var Pp = d((DC, Ap) => { "use strict"; var HS = De(), jS = /* @__PURE__ */ s((t) => (t = t % 10, t === 1 ? "st" : t === 2 ? "nd" : t === 3 ? "rd" : "th"), "pos"), Jn = class extends HS { static { s(this, "Day"); } constructor(e = {}) { super(e); } up() { this.date.setDate(this.date.getDate() + 1); } down() { this.date.setDate(this.date.getDate() - 1); } setTo(e) { this.date.setDate(parseInt(e.substr(-2))); } toString() { let e = this.date.getDate(), r = this.date.getDay(); return this.token === "DD" ? String(e).padStart(2, "0") : this.token === "Do" ? e + jS(e) : this.token === "d" ? r + 1 : this.token === "ddd" ? this.locales.weekdaysShort[r] : this.token === "dddd" ? this.locales.weekdays[r] : e; } }; Ap.exports = Jn; }); // ../node_modules/prompts/dist/dateparts/hours.js var Cp = d((LC, Op) => { "use strict"; var BS = De(), eo = class extends BS { static { s(this, "Hours"); } constructor(e = {}) { super(e); } up() { this.date.setHours(this.date.getHours() + 1); } down() { this.date.setHours(this.date.getHours() - 1); } setTo(e) { this.date.setHours(parseInt(e.substr(-2))); } toString() { let e = this.date.getHours(); return /h/.test(this.token) && (e = e % 12 || 12), this.token.length > 1 ? String(e).padStart(2, "0") : e; } }; Op.exports = eo; }); // ../node_modules/prompts/dist/dateparts/milliseconds.js var Dp = d((MC, Ip) => { "use strict"; var US = De(), to = class extends US { static { s(this, "Milliseconds"); } constructor(e = {}) { super(e); } up() { this.date.setMilliseconds(this.date.getMilliseconds() + 1); } down() { this.date.setMilliseconds(this.date.getMilliseconds() - 1); } setTo(e) { this.date.setMilliseconds(parseInt(e.substr(-this.token.length))); } toString() { return String(this.date.getMilliseconds()).padStart(4, "0").substr(0, this.token.length); } }; Ip.exports = to; }); // ../node_modules/prompts/dist/dateparts/minutes.js var Lp = d((qC, Np) => { "use strict"; var GS = De(), ro = class extends GS { static { s(this, "Minutes"); } constructor(e = {}) { super(e); } up() { this.date.setMinutes(this.date.getMinutes() + 1); } down() { this.date.setMinutes(this.date.getMinutes() - 1); } setTo(e) { this.date.setMinutes(parseInt(e.substr(-2))); } toString() { let e = this.date.getMinutes(); return this.token.length > 1 ? String(e).padStart(2, "0") : e; } }; Np.exports = ro; }); // ../node_modules/prompts/dist/dateparts/month.js var Mp = d((HC, kp) => { "use strict"; var WS = De(), io = class extends WS { static { s(this, "Month"); } constructor(e = {}) { super(e); } up() { this.date.setMonth(this.date.getMonth() + 1); } down() { this.date.setMonth(this.date.getMonth() - 1); } setTo(e) { e = parseInt(e.substr(-2)) - 1, this.date.setMonth(e < 0 ? 0 : e); } toString() { let e = this.date.getMonth(), r = this.token.length; return r === 2 ? String(e + 1).padStart(2, "0") : r === 3 ? this.locales.monthsShort[e] : r === 4 ? this.locales.months[e] : String(e + 1); } }; kp.exports = io; }); // ../node_modules/prompts/dist/dateparts/seconds.js var qp = d((BC, $p) => { "use strict"; var YS = De(), so = class extends YS { static { s(this, "Seconds"); } constructor(e = {}) { super(e); } up() { this.date.setSeconds(this.date.getSeconds() + 1); } down() { this.date.setSeconds(this.date.getSeconds() - 1); } setTo(e) { this.date.setSeconds(parseInt(e.substr(-2))); } toString() { let e = this.date.getSeconds(); return this.token.length > 1 ? String(e).padStart(2, "0") : e; } }; $p.exports = so; }); // ../node_modules/prompts/dist/dateparts/year.js var Hp = d((GC, Fp) => { "use strict"; var VS = De(), no = class extends VS { static { s(this, "Year"); } constructor(e = {}) { super(e); } up() { this.date.setFullYear(this.date.getFullYear() + 1); } down() { this.date.setFullYear(this.date.getFullYear() - 1); } setTo(e) { this.date.setFullYear(e.substr(-4)); } toString() { let e = String(this.date.getFullYear()).padStart(4, "0"); return this.token.length === 2 ? e.substr(-2) : e; } }; Fp.exports = no; }); // ../node_modules/prompts/dist/dateparts/index.js var Bp = d((YC, jp) => { "use strict"; jp.exports = { DatePart: De(), Meridiem: Tp(), Day: Pp(), Hours: Cp(), Milliseconds: Dp(), Minutes: Lp(), Month: Mp(), Seconds: qp(), Year: Hp() }; }); // ../node_modules/prompts/dist/elements/date.js var Zp = d((VC, Xp) => { "use strict"; function Up(t, e, r, i, n, o, a) { try { var l = t[o](a), u = l.value; } catch (c) { r(c); return; } l.done ? e(u) : Promise.resolve(u).then(i, n); } s(Up, "asyncGeneratorStep"); function Gp(t) { return function() { var e = this, r = arguments; return new Promise(function(i, n) { var o = t.apply(e, r); function a(u) { Up(o, i, n, a, l, "next", u); } s(a, "_next"); function l(u) { Up(o, i, n, a, l, "throw", u); } s(l, "_throw"), a(void 0); }); }; } s(Gp, "_asyncToGenerator"); var oo = V(), zS = Be(), lo = Ee(), Wp = lo.style, Yp = lo.clear, KS = lo.figures, Qp = K(), QS = Qp.erase, Vp = Qp.cursor, Ge = Bp(), zp = Ge. DatePart, XS = Ge.Meridiem, ZS = Ge.Day, JS = Ge.Hours, eE = Ge.Milliseconds, tE = Ge.Minutes, rE = Ge.Month, iE = Ge.Seconds, sE = Ge.Year, nE = /\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g, Kp = { 1: ({ token: t }) => t.replace(/\\(.)/g, "$1"), 2: (t) => new ZS(t), // Day // TODO 3: (t) => new rE(t), // Month 4: (t) => new sE(t), // Year 5: (t) => new XS(t), // AM/PM // TODO (special) 6: (t) => new JS(t), // Hours 7: (t) => new tE(t), // Minutes 8: (t) => new iE(t), // Seconds 9: (t) => new eE(t) // Fractional seconds }, oE = { months: "January,February,March,April,May,June,July,August,September,October,November,December".split(","), monthsShort: "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","), weekdays: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","), weekdaysShort: "Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",") }, ao = class extends zS { static { s(this, "DatePrompt"); } constructor(e = {}) { super(e), this.msg = e.message, this.cursor = 0, this.typed = "", this.locales = Object.assign(oE, e.locales), this._date = e.initial || /* @__PURE__ */ new Date(), this.errorMsg = e.error || "Please Enter A Valid Value", this.validator = e.validate || (() => !0), this.mask = e.mask || "YYYY-MM-DD HH:mm:ss", this.clear = Yp("", this.out.columns), this.render(); } get value() { return this.date; } get date() { return this._date; } set date(e) { e && this._date.setTime(e.getTime()); } set mask(e) { let r; for (this.parts = []; r = nE.exec(e); ) { let n = r.shift(), o = r.findIndex((a) => a != null); this.parts.push(o in Kp ? Kp[o]({ token: r[o] || n, date: this.date, parts: this.parts, locales: this.locales }) : r[o] || n); } let i = this.parts.reduce((n, o) => (typeof o == "string" && typeof n[n.length - 1] == "string" ? n[n.length - 1] += o : n.push(o), n), []); this.parts.splice(0), this.parts.push(...i), this.reset(); } moveCursor(e) { this.typed = "", this.cursor = e, this.fire(); } reset() { this.moveCursor(this.parts.findIndex((e) => e instanceof zp)), this.fire(), this.render(); } exit() { this.abort(); } abort() { this.done = this.aborted = !0, this.error = !1, this.fire(), this.render(), this.out.write(` `), this.close(); } validate() { var e = this; return Gp(function* () { let r = yield e.validator(e.value); typeof r == "string" && (e.errorMsg = r, r = !1), e.error = !r; })(); } submit() { var e = this; return Gp(function* () { if (yield e.validate(), e.error) { e.color = "red", e.fire(), e.render(); return; } e.done = !0, e.aborted = !1, e.fire(), e.render(), e.out.write(` `), e.close(); })(); } up() { this.typed = "", this.parts[this.cursor].up(), this.render(); } down() { this.typed = "", this.parts[this.cursor].down(), this.render(); } left() { let e = this.parts[this.cursor].prev(); if (e == null) return this.bell(); this.moveCursor(this.parts.indexOf(e)), this.render(); } right() { let e = this.parts[this.cursor].next(); if (e == null) return this.bell(); this.moveCursor(this.parts.indexOf(e)), this.render(); } next() { let e = this.parts[this.cursor].next(); this.moveCursor(e ? this.parts.indexOf(e) : this.parts.findIndex((r) => r instanceof zp)), this.render(); } _(e) { /\d/.test(e) && (this.typed += e, this.parts[this.cursor].setTo(this.typed), this.render()); } render() { this.closed || (this.firstRender ? this.out.write(Vp.hide) : this.out.write(Yp(this.outputText, this.out.columns)), super.render(), this. outputText = [Wp.symbol(this.done, this.aborted), oo.bold(this.msg), Wp.delimiter(!1), this.parts.reduce((e, r, i) => e.concat(i === this. cursor && !this.done ? oo.cyan().underline(r.toString()) : r), []).join("")].join(" "), this.error && (this.outputText += this.errorMsg. split(` `).reduce((e, r, i) => e + ` ${i ? " " : KS.pointerSmall} ${oo.red().italic(r)}`, "")), this.out.write(QS.line + Vp.to(0) + this.outputText)); } }; Xp.exports = ao; }); // ../node_modules/prompts/dist/elements/number.js var nd = d((KC, sd) => { "use strict"; function Jp(t, e, r, i, n, o, a) { try { var l = t[o](a), u = l.value; } catch (c) { r(c); return; } l.done ? e(u) : Promise.resolve(u).then(i, n); } s(Jp, "asyncGeneratorStep"); function ed(t) { return function() { var e = this, r = arguments; return new Promise(function(i, n) { var o = t.apply(e, r); function a(u) { Jp(o, i, n, a, l, "next", u); } s(a, "_next"); function l(u) { Jp(o, i, n, a, l, "throw", u); } s(l, "_throw"), a(void 0); }); }; } s(ed, "_asyncToGenerator"); var hi = V(), aE = Be(), id = K(), pi = id.cursor, lE = id.erase, di = Ee(), uo = di.style, uE = di.figures, td = di.clear, cE = di.lines, hE = /[0-9]/, co = /* @__PURE__ */ s((t) => t !== void 0, "isDef"), rd = /* @__PURE__ */ s((t, e) => { let r = Math.pow(10, e); return Math.round(t * r) / r; }, "round"), ho = class extends aE { static { s(this, "NumberPrompt"); } constructor(e = {}) { super(e), this.transform = uo.render(e.style), this.msg = e.message, this.initial = co(e.initial) ? e.initial : "", this.float = !!e.float, this.round = e.round || 2, this.inc = e.increment || 1, this.min = co(e.min) ? e.min : -1 / 0, this.max = co(e.max) ? e.max : 1 / 0, this. errorMsg = e.error || "Please Enter A Valid Value", this.validator = e.validate || (() => !0), this.color = "cyan", this.value = "", this. typed = "", this.lastHit = 0, this.render(); } set value(e) { !e && e !== 0 ? (this.placeholder = !0, this.rendered = hi.gray(this.transform.render(`${this.initial}`)), this._value = "") : (this.placeholder = !1, this.rendered = this.transform.render(`${rd(e, this.round)}`), this._value = rd(e, this.round)), this.fire(); } get value() { return this._value; } parse(e) { return this.float ? parseFloat(e) : parseInt(e); } valid(e) { return e === "-" || e === "." && this.float || hE.test(e); } reset() { this.typed = "", this.value = "", this.fire(), this.render(); } exit() { this.abort(); } abort() { let e = this.value; this.value = e !== "" ? e : this.initial, this.done = this.aborted = !0, this.error = !1, this.fire(), this.render(), this.out.write(`\ `), this.close(); } validate() { var e = this; return ed(function* () { let r = yield e.validator(e.value); typeof r == "string" && (e.errorMsg = r, r = !1), e.error = !r; })(); } submit() { var e = this; return ed(function* () { if (yield e.validate(), e.error) { e.color = "red", e.fire(), e.render(); return; } let r = e.value; e.value = r !== "" ? r : e.initial, e.done = !0, e.aborted = !1, e.error = !1, e.fire(), e.render(), e.out.write(` `), e.close(); })(); } up() { if (this.typed = "", this.value === "" && (this.value = this.min - this.inc), this.value >= this.max) return this.bell(); this.value += this.inc, this.color = "cyan", this.fire(), this.render(); } down() { if (this.typed = "", this.value === "" && (this.value = this.min + this.inc), this.value <= this.min) return this.bell(); this.value -= this.inc, this.color = "cyan", this.fire(), this.render(); } delete() { let e = this.value.toString(); if (e.length === 0) return this.bell(); this.value = this.parse(e = e.slice(0, -1)) || "", this.value !== "" && this.value < this.min && (this.value = this.min), this.color = "cyan", this.fire(), this.render(); } next() { this.value = this.initial, this.fire(), this.render(); } _(e, r) { if (!this.valid(e)) return this.bell(); let i = Date.now(); if (i - this.lastHit > 1e3 && (this.typed = ""), this.typed += e, this.lastHit = i, this.color = "cyan", e === ".") return this.fire(); this.value = Math.min(this.parse(this.typed), this.max), this.value > this.max && (this.value = this.max), this.value < this.min && (this. value = this.min), this.fire(), this.render(); } render() { this.closed || (this.firstRender || (this.outputError && this.out.write(pi.down(cE(this.outputError, this.out.columns) - 1) + td(this. outputError, this.out.columns)), this.out.write(td(this.outputText, this.out.columns))), super.render(), this.outputError = "", this.outputText = [uo.symbol(this.done, this.aborted), hi.bold(this.msg), uo.delimiter(this.done), !this.done || !this.done && !this.placeholder ? hi[this. color]().underline(this.rendered) : this.rendered].join(" "), this.error && (this.outputError += this.errorMsg.split(` `).reduce((e, r, i) => e + ` ${i ? " " : uE.pointerSmall} ${hi.red().italic(r)}`, "")), this.out.write(lE.line + pi.to(0) + this.outputText + pi.save + this.outputError + pi.restore)); } }; sd.exports = ho; }); // ../node_modules/prompts/dist/elements/multiselect.js var fo = d((XC, ld) => { "use strict"; var Ne = V(), pE = K(), dE = pE.cursor, fE = Be(), rr = Ee(), od = rr.clear, st = rr.figures, ad = rr.style, mE = rr.wrap, gE = rr.entriesToDisplay, po = class extends fE { static { s(this, "MultiselectPrompt"); } constructor(e = {}) { super(e), this.msg = e.message, this.cursor = e.cursor || 0, this.scrollIndex = e.cursor || 0, this.hint = e.hint || "", this.warn = e. warn || "- This option is disabled -", this.minSelected = e.min, this.showMinError = !1, this.maxChoices = e.max, this.instructions = e. instructions, this.optionsPerPage = e.optionsPerPage || 10, this.value = e.choices.map((r, i) => (typeof r == "string" && (r = { title: r, value: i }), { title: r && (r.title || r.value || r), description: r && r.description, value: r && (r.value === void 0 ? i : r.value), selected: r && r.selected, disabled: r && r.disabled })), this.clear = od("", this.out.columns), e.overrideRender || this.render(); } reset() { this.value.map((e) => !e.selected), this.cursor = 0, this.fire(), this.render(); } selected() { return this.value.filter((e) => e.selected); } exit() { this.abort(); } abort() { this.done = this.aborted = !0, this.fire(), this.render(), this.out.write(` `), this.close(); } submit() { let e = this.value.filter((r) => r.selected); this.minSelected && e.length < this.minSelected ? (this.showMinError = !0, this.render()) : (this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(` `), this.close()); } first() { this.cursor = 0, this.render(); } last() { this.cursor = this.value.length - 1, this.render(); } next() { this.cursor = (this.cursor + 1) % this.value.length, this.render(); } up() { this.cursor === 0 ? this.cursor = this.value.length - 1 : this.cursor--, this.render(); } down() { this.cursor === this.value.length - 1 ? this.cursor = 0 : this.cursor++, this.render(); } left() { this.value[this.cursor].selected = !1, this.render(); } right() { if (this.value.filter((e) => e.selected).length >= this.maxChoices) return this.bell(); this.value[this.cursor].selected = !0, this.render(); } handleSpaceToggle() { let e = this.value[this.cursor]; if (e.selected) e.selected = !1, this.render(); else { if (e.disabled || this.value.filter((r) => r.selected).length >= this.maxChoices) return this.bell(); e.selected = !0, this.render(); } } toggleAll() { if (this.maxChoices !== void 0 || this.value[this.cursor].disabled) return this.bell(); let e = !this.value[this.cursor].selected; this.value.filter((r) => !r.disabled).forEach((r) => r.selected = e), this.render(); } _(e, r) { if (e === " ") this.handleSpaceToggle(); else if (e === "a") this.toggleAll(); else return this.bell(); } renderInstructions() { return this.instructions === void 0 || this.instructions ? typeof this.instructions == "string" ? this.instructions : ` Instructions: ${st.arrowUp}/${st.arrowDown}: Highlight option ${st.arrowLeft}/${st.arrowRight}/[space]: Toggle selection ` + (this.maxChoices === void 0 ? ` a: Toggle all ` : "") + " enter/return: Complete answer" : ""; } renderOption(e, r, i, n) { let o = (r.selected ? Ne.green(st.radioOn) : st.radioOff) + " " + n + " ", a, l; return r.disabled ? a = e === i ? Ne.gray().underline(r.title) : Ne.strikethrough().gray(r.title) : (a = e === i ? Ne.cyan().underline( r.title) : r.title, e === i && r.description && (l = ` - ${r.description}`, (o.length + a.length + l.length >= this.out.columns || r.description. split(/\r?\n/).length > 1) && (l = ` ` + mE(r.description, { margin: o.length, width: this.out.columns })))), o + a + Ne.gray(l || ""); } // shared with autocompleteMultiselect paginateOptions(e) { if (e.length === 0) return Ne.red("No matches for this query."); let r = gE(this.cursor, e.length, this.optionsPerPage), i = r.startIndex, n = r.endIndex, o, a = []; for (let l = i; l < n; l++) l === i && i > 0 ? o = st.arrowUp : l === n - 1 && n < e.length ? o = st.arrowDown : o = " ", a.push(this.renderOption(this.cursor, e[l], l, o)); return ` ` + a.join(` `); } // shared with autocomleteMultiselect renderOptions(e) { return this.done ? "" : this.paginateOptions(e); } renderDoneOrInstructions() { if (this.done) return this.value.filter((r) => r.selected).map((r) => r.title).join(", "); let e = [Ne.gray(this.hint), this.renderInstructions()]; return this.value[this.cursor].disabled && e.push(Ne.yellow(this.warn)), e.join(" "); } render() { if (this.closed) return; this.firstRender && this.out.write(dE.hide), super.render(); let e = [ad.symbol(this.done, this.aborted), Ne.bold(this.msg), ad.delimiter(!1), this.renderDoneOrInstructions()].join(" "); this.showMinError && (e += Ne.red(`You must select a minimum of ${this.minSelected} choices.`), this.showMinError = !1), e += this.renderOptions( this.value), this.out.write(this.clear + e), this.clear = od(e, this.out.columns); } }; ld.exports = po; }); // ../node_modules/prompts/dist/elements/autocomplete.js var md = d((JC, fd) => { "use strict"; function ud(t, e, r, i, n, o, a) { try { var l = t[o](a), u = l.value; } catch (c) { r(c); return; } l.done ? e(u) : Promise.resolve(u).then(i, n); } s(ud, "asyncGeneratorStep"); function yE(t) { return function() { var e = this, r = arguments; return new Promise(function(i, n) { var o = t.apply(e, r); function a(u) { ud(o, i, n, a, l, "next", u); } s(a, "_next"); function l(u) { ud(o, i, n, a, l, "throw", u); } s(l, "_throw"), a(void 0); }); }; } s(yE, "_asyncToGenerator"); var ir = V(), _E = Be(), dd = K(), xE = dd.erase, cd = dd.cursor, sr = Ee(), mo = sr.style, hd = sr.clear, go = sr.figures, bE = sr.wrap, SE = sr. entriesToDisplay, pd = /* @__PURE__ */ s((t, e) => t[e] && (t[e].value || t[e].title || t[e]), "getVal"), EE = /* @__PURE__ */ s((t, e) => t[e] && (t[e].title || t[e].value || t[e]), "getTitle"), vE = /* @__PURE__ */ s((t, e) => { let r = t.findIndex((i) => i.value === e || i.title === e); return r > -1 ? r : void 0; }, "getIndex"), yo = class extends _E { static { s(this, "AutocompletePrompt"); } constructor(e = {}) { super(e), this.msg = e.message, this.suggest = e.suggest, this.choices = e.choices, this.initial = typeof e.initial == "number" ? e.initial : vE(e.choices, e.initial), this.select = this.initial || e.cursor || 0, this.i18n = { noMatches: e.noMatches || "no matches found" }, this.fallback = e.fallback || this.initial, this.clearFirst = e.clearFirst || !1, this.suggestions = [], this.input = "", this.limit = e.limit || 10, this.cursor = 0, this.transform = mo.render(e.style), this.scale = this.transform.scale, this.render = this.render.bind( this), this.complete = this.complete.bind(this), this.clear = hd("", this.out.columns), this.complete(this.render), this.render(); } set fallback(e) { this._fb = Number.isSafeInteger(parseInt(e)) ? parseInt(e) : e; } get fallback() { let e; return typeof this._fb == "number" ? e = this.choices[this._fb] : typeof this._fb == "string" && (e = { title: this._fb }), e || this._fb || { title: this.i18n.noMatches }; } moveSelect(e) { this.select = e, this.suggestions.length > 0 ? this.value = pd(this.suggestions, e) : this.value = this.fallback.value, this.fire(); } complete(e) { var r = this; return yE(function* () { let i = r.completing = r.suggest(r.input, r.choices), n = yield i; if (r.completing !== i) return; r.suggestions = n.map((a, l, u) => ({ title: EE(u, l), value: pd(u, l), description: a.description })), r.completing = !1; let o = Math.max(n.length - 1, 0); r.moveSelect(Math.min(o, r.select)), e && e(); })(); } reset() { this.input = "", this.complete(() => { this.moveSelect(this.initial !== void 0 ? this.initial : 0), this.render(); }), this.render(); } exit() { this.clearFirst && this.input.length > 0 ? this.reset() : (this.done = this.exited = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(` `), this.close()); } abort() { this.done = this.aborted = !0, this.exited = !1, this.fire(), this.render(), this.out.write(` `), this.close(); } submit() { this.done = !0, this.aborted = this.exited = !1, this.fire(), this.render(), this.out.write(` `), this.close(); } _(e, r) { let i = this.input.slice(0, this.cursor), n = this.input.slice(this.cursor); this.input = `${i}${e}${n}`, this.cursor = i.length + 1, this.complete(this.render), this.render(); } delete() { if (this.cursor === 0) return this.bell(); let e = this.input.slice(0, this.cursor - 1), r = this.input.slice(this.cursor); this.input = `${e}${r}`, this.complete(this.render), this.cursor = this.cursor - 1, this.render(); } deleteForward() { if (this.cursor * this.scale >= this.rendered.length) return this.bell(); let e = this.input.slice(0, this.cursor), r = this.input.slice(this.cursor + 1); this.input = `${e}${r}`, this.complete(this.render), this.render(); } first() { this.moveSelect(0), this.render(); } last() { this.moveSelect(this.suggestions.length - 1), this.render(); } up() { this.select === 0 ? this.moveSelect(this.suggestions.length - 1) : this.moveSelect(this.select - 1), this.render(); } down() { this.select === this.suggestions.length - 1 ? this.moveSelect(0) : this.moveSelect(this.select + 1), this.render(); } next() { this.select === this.suggestions.length - 1 ? this.moveSelect(0) : this.moveSelect(this.select + 1), this.render(); } nextPage() { this.moveSelect(Math.min(this.select + this.limit, this.suggestions.length - 1)), this.render(); } prevPage() { this.moveSelect(Math.max(this.select - this.limit, 0)), this.render(); } left() { if (this.cursor <= 0) return this.bell(); this.cursor = this.cursor - 1, this.render(); } right() { if (this.cursor * this.scale >= this.rendered.length) return this.bell(); this.cursor = this.cursor + 1, this.render(); } renderOption(e, r, i, n) { let o, a = i ? go.arrowUp : n ? go.arrowDown : " ", l = r ? ir.cyan().underline(e.title) : e.title; return a = (r ? ir.cyan(go.pointer) + " " : " ") + a, e.description && (o = ` - ${e.description}`, (a.length + l.length + o.length >= this.out.columns || e.description.split(/\r?\n/).length > 1) && (o = ` ` + bE(e.description, { margin: 3, width: this.out.columns }))), a + " " + l + ir.gray(o || ""); } render() { if (this.closed) return; this.firstRender ? this.out.write(cd.hide) : this.out.write(hd(this.outputText, this.out.columns)), super.render(); let e = SE(this.select, this.choices.length, this.limit), r = e.startIndex, i = e.endIndex; if (this.outputText = [mo.symbol(this.done, this.aborted, this.exited), ir.bold(this.msg), mo.delimiter(this.completing), this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)].join(" "), !this. done) { let n = this.suggestions.slice(r, i).map((o, a) => this.renderOption(o, this.select === a + r, a === 0 && r > 0, a + r === i - 1 && i < this.choices.length)).join(` `); this.outputText += ` ` + (n || ir.gray(this.fallback.title)); } this.out.write(xE.line + cd.to(0) + this.outputText); } }; fd.exports = yo; }); // ../node_modules/prompts/dist/elements/autocompleteMultiselect.js var xd = d((t1, _d) => { "use strict"; var We = V(), wE = K(), RE = wE.cursor, TE = fo(), xo = Ee(), gd = xo.clear, yd = xo.style, Dt = xo.figures, _o = class extends TE { static { s(this, "AutocompleteMultiselectPrompt"); } constructor(e = {}) { e.overrideRender = !0, super(e), this.inputValue = "", this.clear = gd("", this.out.columns), this.filteredOptions = this.value, this. render(); } last() { this.cursor = this.filteredOptions.length - 1, this.render(); } next() { this.cursor = (this.cursor + 1) % this.filteredOptions.length, this.render(); } up() { this.cursor === 0 ? this.cursor = this.filteredOptions.length - 1 : this.cursor--, this.render(); } down() { this.cursor === this.filteredOptions.length - 1 ? this.cursor = 0 : this.cursor++, this.render(); } left() { this.filteredOptions[this.cursor].selected = !1, this.render(); } right() { if (this.value.filter((e) => e.selected).length >= this.maxChoices) return this.bell(); this.filteredOptions[this.cursor].selected = !0, this.render(); } delete() { this.inputValue.length && (this.inputValue = this.inputValue.substr(0, this.inputValue.length - 1), this.updateFilteredOptions()); } updateFilteredOptions() { let e = this.filteredOptions[this.cursor]; this.filteredOptions = this.value.filter((i) => this.inputValue ? !!(typeof i.title == "string" && i.title.toLowerCase().includes(this. inputValue.toLowerCase()) || typeof i.value == "string" && i.value.toLowerCase().includes(this.inputValue.toLowerCase())) : !0); let r = this.filteredOptions.findIndex((i) => i === e); this.cursor = r < 0 ? 0 : r, this.render(); } handleSpaceToggle() { let e = this.filteredOptions[this.cursor]; if (e.selected) e.selected = !1, this.render(); else { if (e.disabled || this.value.filter((r) => r.selected).length >= this.maxChoices) return this.bell(); e.selected = !0, this.render(); } } handleInputChange(e) { this.inputValue = this.inputValue + e, this.updateFilteredOptions(); } _(e, r) { e === " " ? this.handleSpaceToggle() : this.handleInputChange(e); } renderInstructions() { return this.instructions === void 0 || this.instructions ? typeof this.instructions == "string" ? this.instructions : ` Instructions: ${Dt.arrowUp}/${Dt.arrowDown}: Highlight option ${Dt.arrowLeft}/${Dt.arrowRight}/[space]: Toggle selection [a,b,c]/delete: Filter choices enter/return: Complete answer ` : ""; } renderCurrentInput() { return ` Filtered results for: ${this.inputValue ? this.inputValue : We.gray("Enter something to filter")} `; } renderOption(e, r, i) { let n; return r.disabled ? n = e === i ? We.gray().underline(r.title) : We.strikethrough().gray(r.title) : n = e === i ? We.cyan().underline( r.title) : r.title, (r.selected ? We.green(Dt.radioOn) : Dt.radioOff) + " " + n; } renderDoneOrInstructions() { if (this.done) return this.value.filter((r) => r.selected).map((r) => r.title).join(", "); let e = [We.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()]; return this.filteredOptions.length && this.filteredOptions[this.cursor].disabled && e.push(We.yellow(this.warn)), e.join(" "); } render() { if (this.closed) return; this.firstRender && this.out.write(RE.hide), super.render(); let e = [yd.symbol(this.done, this.aborted), We.bold(this.msg), yd.delimiter(!1), this.renderDoneOrInstructions()].join(" "); this.showMinError && (e += We.red(`You must select a minimum of ${this.minSelected} choices.`), this.showMinError = !1), e += this.renderOptions( this.filteredOptions), this.out.write(this.clear + e), this.clear = gd(e, this.out.columns); } }; _d.exports = _o; }); // ../node_modules/prompts/dist/elements/confirm.js var Td = d((i1, Rd) => { "use strict"; var bd = V(), AE = Be(), vd = Ee(), Sd = vd.style, PE = vd.clear, wd = K(), OE = wd.erase, Ed = wd.cursor, bo = class extends AE { static { s(this, "ConfirmPrompt"); } constructor(e = {}) { super(e), this.msg = e.message, this.value = e.initial, this.initialValue = !!e.initial, this.yesMsg = e.yes || "yes", this.yesOption = e.yesOption || "(Y/n)", this.noMsg = e.no || "no", this.noOption = e.noOption || "(y/N)", this.render(); } reset() { this.value = this.initialValue, this.fire(), this.render(); } exit() { this.abort(); } abort() { this.done = this.aborted = !0, this.fire(), this.render(), this.out.write(` `), this.close(); } submit() { this.value = this.value || !1, this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(` `), this.close(); } _(e, r) { return e.toLowerCase() === "y" ? (this.value = !0, this.submit()) : e.toLowerCase() === "n" ? (this.value = !1, this.submit()) : this. bell(); } render() { this.closed || (this.firstRender ? this.out.write(Ed.hide) : this.out.write(PE(this.outputText, this.out.columns)), super.render(), this. outputText = [Sd.symbol(this.done, this.aborted), bd.bold(this.msg), Sd.delimiter(this.done), this.done ? this.value ? this.yesMsg : this. noMsg : bd.gray(this.initialValue ? this.yesOption : this.noOption)].join(" "), this.out.write(OE.line + Ed.to(0) + this.outputText)); } }; Rd.exports = bo; }); // ../node_modules/prompts/dist/elements/index.js var Pd = d((n1, Ad) => { "use strict"; Ad.exports = { TextPrompt: dp(), SelectPrompt: yp(), TogglePrompt: vp(), DatePrompt: Zp(), NumberPrompt: nd(), MultiselectPrompt: fo(), AutocompletePrompt: md(), AutocompleteMultiselectPrompt: xd(), ConfirmPrompt: Td() }; }); // ../node_modules/prompts/dist/prompts.js var Cd = d((Od) => { "use strict"; var ae = Od, CE = Pd(), fi = /* @__PURE__ */ s((t) => t, "noop"); function Le(t, e, r = {}) { return new Promise((i, n) => { let o = new CE[t](e), a = r.onAbort || fi, l = r.onSubmit || fi, u = r.onExit || fi; o.on("state", e.onState || fi), o.on("submit", (c) => i(l(c))), o.on("exit", (c) => i(u(c))), o.on("abort", (c) => n(a(c))); }); } s(Le, "toPrompt"); ae.text = (t) => Le("TextPrompt", t); ae.password = (t) => (t.style = "password", ae.text(t)); ae.invisible = (t) => (t.style = "invisible", ae.text(t)); ae.number = (t) => Le("NumberPrompt", t); ae.date = (t) => Le("DatePrompt", t); ae.confirm = (t) => Le("ConfirmPrompt", t); ae.list = (t) => { let e = t.separator || ","; return Le("TextPrompt", t, { onSubmit: /* @__PURE__ */ s((r) => r.split(e).map((i) => i.trim()), "onSubmit") }); }; ae.toggle = (t) => Le("TogglePrompt", t); ae.select = (t) => Le("SelectPrompt", t); ae.multiselect = (t) => { t.choices = [].concat(t.choices || []); let e = /* @__PURE__ */ s((r) => r.filter((i) => i.selected).map((i) => i.value), "toSelected"); return Le("MultiselectPrompt", t, { onAbort: e, onSubmit: e }); }; ae.autocompleteMultiselect = (t) => { t.choices = [].concat(t.choices || []); let e = /* @__PURE__ */ s((r) => r.filter((i) => i.selected).map((i) => i.value), "toSelected"); return Le("AutocompleteMultiselectPrompt", t, { onAbort: e, onSubmit: e }); }; var IE = /* @__PURE__ */ s((t, e) => Promise.resolve(e.filter((r) => r.title.slice(0, t.length).toLowerCase() === t.toLowerCase())), "byTi\ tle"); ae.autocomplete = (t) => (t.suggest = t.suggest || IE, t.choices = [].concat(t.choices || []), Le("AutocompletePrompt", t)); }); // ../node_modules/prompts/dist/index.js var qd = d((l1, $d) => { "use strict"; function Id(t, e) { var r = Object.keys(t); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(t); e && (i = i.filter(function(n) { return Object.getOwnPropertyDescriptor(t, n).enumerable; })), r.push.apply(r, i); } return r; } s(Id, "ownKeys"); function Dd(t) { for (var e = 1; e < arguments.length; e++) { var r = arguments[e] != null ? arguments[e] : {}; e % 2 ? Id(Object(r), !0).forEach(function(i) { DE(t, i, r[i]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Id(Object(r)).forEach(function(i) { Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(r, i)); }); } return t; } s(Dd, "_objectSpread"); function DE(t, e, r) { return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t; } s(DE, "_defineProperty"); function NE(t, e) { var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"]; if (!r) { if (Array.isArray(t) || (r = LE(t)) || e && t && typeof t.length == "number") { r && (t = r); var i = 0, n = /* @__PURE__ */ s(function() { }, "F"); return { s: n, n: /* @__PURE__ */ s(function() { return i >= t.length ? { done: !0 } : { done: !1, value: t[i++] }; }, "n"), e: /* @__PURE__ */ s(function(c) { throw c; }, "e"), f: n }; } throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } var o = !0, a = !1, l; return { s: /* @__PURE__ */ s(function() { r = r.call(t); }, "s"), n: /* @__PURE__ */ s(function() { var c = r.next(); return o = c.done, c; }, "n"), e: /* @__PURE__ */ s(function(c) { a = !0, l = c; }, "e"), f: /* @__PURE__ */ s(function() { try { !o && r.return != null && r.return(); } finally { if (a) throw l; } }, "f") }; } s(NE, "_createForOfIteratorHelper"); function LE(t, e) { if (t) { if (typeof t == "string") return Nd(t, e); var r = Object.prototype.toString.call(t).slice(8, -1); if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") return Array.from(t); if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Nd(t, e); } } s(LE, "_unsupportedIterableToArray"); function Nd(t, e) { (e == null || e > t.length) && (e = t.length); for (var r = 0, i = new Array(e); r < e; r++) i[r] = t[r]; return i; } s(Nd, "_arrayLikeToArray"); function Ld(t, e, r, i, n, o, a) { try { var l = t[o](a), u = l.value; } catch (c) { r(c); return; } l.done ? e(u) : Promise.resolve(u).then(i, n); } s(Ld, "asyncGeneratorStep"); function kd(t) { return function() { var e = this, r = arguments; return new Promise(function(i, n) { var o = t.apply(e, r); function a(u) { Ld(o, i, n, a, l, "next", u); } s(a, "_next"); function l(u) { Ld(o, i, n, a, l, "throw", u); } s(l, "_throw"), a(void 0); }); }; } s(kd, "_asyncToGenerator"); var So = Cd(), kE = ["suggest", "format", "onState", "validate", "onRender", "type"], Md = /* @__PURE__ */ s(() => { }, "noop"); function nt() { return Eo.apply(this, arguments); } s(nt, "prompt"); function Eo() { return Eo = kd(function* (t = [], { onSubmit: e = Md, onCancel: r = Md } = {}) { let i = {}, n = nt._override || {}; t = [].concat(t); let o, a, l, u, c, p, f = /* @__PURE__ */ function() { var w = kd(function* (R, N, C = !1) { if (!(!C && R.validate && R.validate(N) !== !0)) return R.format ? yield R.format(N, i) : N; }); return /* @__PURE__ */ s(function(N, C) { return w.apply(this, arguments); }, "getFormattedAnswer"); }(); var h = NE(t), E; try { for (h.s(); !(E = h.n()).done; ) { a = E.value; var m = a; if (u = m.name, c = m.type, typeof c == "function" && (c = yield c(o, Dd({}, i), a), a.type = c), !!c) { for (let w in a) { if (kE.includes(w)) continue; let R = a[w]; a[w] = typeof R == "function" ? yield R(o, Dd({}, i), p) : R; } if (p = a, typeof a.message != "string") throw new Error("prompt message is required"); var x = a; if (u = x.name, c = x.type, So[c] === void 0) throw new Error(`prompt type (${c}) is not defined`); if (n[a.name] !== void 0 && (o = yield f(a, n[a.name]), o !== void 0)) { i[u] = o; continue; } try { o = nt._injected ? ME(nt._injected, a.initial) : yield So[c](a), i[u] = o = yield f(a, o, !0), l = yield e(a, o, i); } catch { l = !(yield r(a, i)); } if (l) return i; } } } catch (w) { h.e(w); } finally { h.f(); } return i; }), Eo.apply(this, arguments); } s(Eo, "_prompt"); function ME(t, e) { let r = t.shift(); if (r instanceof Error) throw r; return r === void 0 ? e : r; } s(ME, "getInjectedAnswer"); function $E(t) { nt._injected = (nt._injected || []).concat(t); } s($E, "inject"); function qE(t) { nt._override = Object.assign({}, t); } s(qE, "override"); $d.exports = Object.assign(nt, { prompt: nt, prompts: So, inject: $E, override: qE }); }); // ../node_modules/prompts/lib/util/action.js var Hd = d((c1, Fd) => { "use strict"; Fd.exports = (t, e) => { if (!(t.meta && t.name !== "escape")) { if (t.ctrl) { if (t.name === "a") return "first"; if (t.name === "c" || t.name === "d") return "abort"; if (t.name === "e") return "last"; if (t.name === "g") return "reset"; } if (e) { if (t.name === "j") return "down"; if (t.name === "k") return "up"; } return t.name === "return" || t.name === "enter" ? "submit" : t.name === "backspace" ? "delete" : t.name === "delete" ? "deleteForward" : t.name === "abort" ? "abort" : t.name === "escape" ? "exit" : t.name === "tab" ? "next" : t.name === "pagedown" ? "nextPage" : t.name === "pageup" ? "prevPage" : t.name === "home" ? "home" : t.name === "end" ? "end" : t.name === "up" ? "up" : t.name === "down" ? "down" : t. name === "right" ? "right" : t.name === "left" ? "left" : !1; } }; }); // ../node_modules/prompts/lib/util/strip.js var mi = d((h1, jd) => { "use strict"; jd.exports = (t) => { let e = [ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))" ].join("|"), r = new RegExp(e, "g"); return typeof t == "string" ? t.replace(r, "") : t; }; }); // ../node_modules/prompts/lib/util/clear.js var Gd = d((p1, Ud) => { "use strict"; var FE = mi(), { erase: Bd, cursor: HE } = K(), jE = /* @__PURE__ */ s((t) => [...FE(t)].length, "width"); Ud.exports = function(t, e) { if (!e) return Bd.line + HE.to(0); let r = 0, i = t.split(/\r?\n/); for (let n of i) r += 1 + Math.floor(Math.max(jE(n) - 1, 0) / e); return Bd.lines(r); }; }); // ../node_modules/prompts/lib/util/figures.js var vo = d((f1, Wd) => { "use strict"; var nr = { arrowUp: "\u2191", arrowDown: "\u2193", arrowLeft: "\u2190", arrowRight: "\u2192", radioOn: "\u25C9", radioOff: "\u25EF", tick: "\u2714", cross: "\u2716", ellipsis: "\u2026", pointerSmall: "\u203A", line: "\u2500", pointer: "\u276F" }, BE = { arrowUp: nr.arrowUp, arrowDown: nr.arrowDown, arrowLeft: nr.arrowLeft, arrowRight: nr.arrowRight, radioOn: "(*)", radioOff: "( )", tick: "\u221A", cross: "\xD7", ellipsis: "...", pointerSmall: "\xBB", line: "\u2500", pointer: ">" }, UE = process.platform === "win32" ? BE : nr; Wd.exports = UE; }); // ../node_modules/prompts/lib/util/style.js var Vd = d((m1, Yd) => { "use strict"; var Nt = V(), gt = vo(), wo = Object.freeze({ password: { scale: 1, render: /* @__PURE__ */ s((t) => "*".repeat(t.length), "render") }, emoji: { scale: 2, render: /* @__PURE__ */ s((t) => "\u{1F603}".repeat(t.length), "render") }, invisible: { scale: 0, render: /* @__PURE__ */ s((t) => "", "render") }, default: { scale: 1, render: /* @__PURE__ */ s((t) => `${t}`, "render") } }), GE = /* @__PURE__ */ s((t) => wo[t] || wo.default, "render"), or = Object.freeze({ aborted: Nt.red(gt.cross), done: Nt.green(gt.tick), exited: Nt.yellow(gt.cross), default: Nt.cyan("?") }), WE = /* @__PURE__ */ s((t, e, r) => e ? or.aborted : r ? or.exited : t ? or.done : or.default, "symbol"), YE = /* @__PURE__ */ s((t) => Nt. gray(t ? gt.ellipsis : gt.pointerSmall), "delimiter"), VE = /* @__PURE__ */ s((t, e) => Nt.gray(t ? e ? gt.pointerSmall : "+" : gt.line), "\ item"); Yd.exports = { styles: wo, render: GE, symbols: or, symbol: WE, delimiter: YE, item: VE }; }); // ../node_modules/prompts/lib/util/lines.js var Kd = d((y1, zd) => { "use strict"; var zE = mi(); zd.exports = function(t, e) { let r = String(zE(t) || "").split(/\r?\n/); return e ? r.map((i) => Math.ceil(i.length / e)).reduce((i, n) => i + n) : r.length; }; }); // ../node_modules/prompts/lib/util/wrap.js var Xd = d((_1, Qd) => { "use strict"; Qd.exports = (t, e = {}) => { let r = Number.isSafeInteger(parseInt(e.margin)) ? new Array(parseInt(e.margin)).fill(" ").join("") : e.margin || "", i = e.width; return (t || "").split(/\r?\n/g).map((n) => n.split(/\s+/g).reduce((o, a) => (a.length + r.length >= i || o[o.length - 1].length + a.length + 1 < i ? o[o.length - 1] += ` ${a}` : o.push(`${r}${a}`), o), [r]).join(` `)).join(` `); }; }); // ../node_modules/prompts/lib/util/entriesToDisplay.js var Jd = d((x1, Zd) => { "use strict"; Zd.exports = (t, e, r) => { r = r || e; let i = Math.min(e - r, t - Math.floor(r / 2)); i < 0 && (i = 0); let n = Math.min(i + r, e); return { startIndex: i, endIndex: n }; }; }); // ../node_modules/prompts/lib/util/index.js var ve = d((b1, ef) => { "use strict"; ef.exports = { action: Hd(), clear: Gd(), style: Vd(), strip: mi(), figures: vo(), lines: Kd(), wrap: Xd(), entriesToDisplay: Jd() }; }); // ../node_modules/prompts/lib/elements/prompt.js var Ye = d((S1, rf) => { "use strict"; var tf = require("readline"), { action: KE } = ve(), QE = require("events"), { beep: XE, cursor: ZE } = K(), JE = V(), Ro = class extends QE { static { s(this, "Prompt"); } constructor(e = {}) { super(), this.firstRender = !0, this.in = e.stdin || process.stdin, this.out = e.stdout || process.stdout, this.onRender = (e.onRender || (() => { })).bind(this); let r = tf.createInterface({ input: this.in, escapeCodeTimeout: 50 }); tf.emitKeypressEvents(this.in, r), this.in.isTTY && this.in.setRawMode(!0); let i = ["SelectPrompt", "MultiselectPrompt"].indexOf(this.constructor.name) > -1, n = /* @__PURE__ */ s((o, a) => { let l = KE(a, i); l === !1 ? this._ && this._(o, a) : typeof this[l] == "function" ? this[l](a) : this.bell(); }, "keypress"); this.close = () => { this.out.write(ZE.show), this.in.removeListener("keypress", n), this.in.isTTY && this.in.setRawMode(!1), r.close(), this.emit(this.aborted ? "abort" : this.exited ? "exit" : "submit", this.value), this.closed = !0; }, this.in.on("keypress", n); } fire() { this.emit("state", { value: this.value, aborted: !!this.aborted, exited: !!this.exited }); } bell() { this.out.write(XE); } render() { this.onRender(JE), this.firstRender && (this.firstRender = !1); } }; rf.exports = Ro; }); // ../node_modules/prompts/lib/elements/text.js var nf = d((v1, sf) => { var gi = V(), ev = Ye(), { erase: tv, cursor: ar } = K(), { style: To, clear: Ao, lines: rv, figures: iv } = ve(), Po = class extends ev { static { s(this, "TextPrompt"); } constructor(e = {}) { super(e), this.transform = To.render(e.style), this.scale = this.transform.scale, this.msg = e.message, this.initial = e.initial || "", this.validator = e.validate || (() => !0), this.value = "", this.errorMsg = e.error || "Please Enter A Valid Value", this.cursor = +!!this. initial, this.cursorOffset = 0, this.clear = Ao("", this.out.columns), this.render(); } set value(e) { !e && this.initial ? (this.placeholder = !0, this.rendered = gi.gray(this.transform.render(this.initial))) : (this.placeholder = !1, this. rendered = this.transform.render(e)), this._value = e, this.fire(); } get value() { return this._value; } reset() { this.value = "", this.cursor = +!!this.initial, this.cursorOffset = 0, this.fire(), this.render(); } exit() { this.abort(); } abort() { this.value = this.value || this.initial, this.done = this.aborted = !0, this.error = !1, this.red = !1, this.fire(), this.render(), this. out.write(` `), this.close(); } async validate() { let e = await this.validator(this.value); typeof e == "string" && (this.errorMsg = e, e = !1), this.error = !e; } async submit() { if (this.value = this.value || this.initial, this.cursorOffset = 0, this.cursor = this.rendered.length, await this.validate(), this.error) { this.red = !0, this.fire(), this.render(); return; } this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(` `), this.close(); } next() { if (!this.placeholder) return this.bell(); this.value = this.initial, this.cursor = this.rendered.length, this.fire(), this.render(); } moveCursor(e) { this.placeholder || (this.cursor = this.cursor + e, this.cursorOffset += e); } _(e, r) { let i = this.value.slice(0, this.cursor), n = this.value.slice(this.cursor); this.value = `${i}${e}${n}`, this.red = !1, this.cursor = this.placeholder ? 0 : i.length + 1, this.render(); } delete() { if (this.isCursorAtStart()) return this.bell(); let e = this.value.slice(0, this.cursor - 1), r = this.value.slice(this.cursor); this.value = `${e}${r}`, this.red = !1, this.isCursorAtStart() ? this.cursorOffset = 0 : (this.cursorOffset++, this.moveCursor(-1)), this. render(); } deleteForward() { if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell(); let e = this.value.slice(0, this.cursor), r = this.value.slice(this.cursor + 1); this.value = `${e}${r}`, this.red = !1, this.isCursorAtEnd() ? this.cursorOffset = 0 : this.cursorOffset++, this.render(); } first() { this.cursor = 0, this.render(); } last() { this.cursor = this.value.length, this.render(); } left() { if (this.cursor <= 0 || this.placeholder) return this.bell(); this.moveCursor(-1), this.render(); } right() { if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell(); this.moveCursor(1), this.render(); } isCursorAtStart() { return this.cursor === 0 || this.placeholder && this.cursor === 1; } isCursorAtEnd() { return this.cursor === this.rendered.length || this.placeholder && this.cursor === this.rendered.length + 1; } render() { this.closed || (this.firstRender || (this.outputError && this.out.write(ar.down(rv(this.outputError, this.out.columns) - 1) + Ao(this. outputError, this.out.columns)), this.out.write(Ao(this.outputText, this.out.columns))), super.render(), this.outputError = "", this.outputText = [ To.symbol(this.done, this.aborted), gi.bold(this.msg), To.delimiter(this.done), this.red ? gi.red(this.rendered) : this.rendered ].join(" "), this.error && (this.outputError += this.errorMsg.split(` `).reduce((e, r, i) => e + ` ${i ? " " : iv.pointerSmall} ${gi.red().italic(r)}`, "")), this.out.write(tv.line + ar.to(0) + this.outputText + ar.save + this.outputError + ar.restore + ar.move(this.cursorOffset, 0))); } }; sf.exports = Po; }); // ../node_modules/prompts/lib/elements/select.js var uf = d((R1, lf) => { "use strict"; var Ve = V(), sv = Ye(), { style: of, clear: af, figures: yi, wrap: nv, entriesToDisplay: ov } = ve(), { cursor: av } = K(), Oo = class extends sv { static { s(this, "SelectPrompt"); } constructor(e = {}) { super(e), this.msg = e.message, this.hint = e.hint || "- Use arrow-keys. Return to submit.", this.warn = e.warn || "- This option is d\ isabled", this.cursor = e.initial || 0, this.choices = e.choices.map((r, i) => (typeof r == "string" && (r = { title: r, value: i }), { title: r && (r.title || r.value || r), value: r && (r.value === void 0 ? i : r.value), description: r && r.description, selected: r && r.selected, disabled: r && r.disabled })), this.optionsPerPage = e.optionsPerPage || 10, this.value = (this.choices[this.cursor] || {}).value, this.clear = af("", this.out. columns), this.render(); } moveCursor(e) { this.cursor = e, this.value = this.choices[e].value, this.fire(); } reset() { this.moveCursor(0), this.fire(), this.render(); } exit() { this.abort(); } abort() { this.done = this.aborted = !0, this.fire(), this.render(), this.out.write(` `), this.close(); } submit() { this.selection.disabled ? this.bell() : (this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(` `), this.close()); } first() { this.moveCursor(0), this.render(); } last() { this.moveCursor(this.choices.length - 1), this.render(); } up() { this.cursor === 0 ? this.moveCursor(this.choices.length - 1) : this.moveCursor(this.cursor - 1), this.render(); } down() { this.cursor === this.choices.length - 1 ? this.moveCursor(0) : this.moveCursor(this.cursor + 1), this.render(); } next() { this.moveCursor((this.cursor + 1) % this.choices.length), this.render(); } _(e, r) { if (e === " ") return this.submit(); } get selection() { return this.choices[this.cursor]; } render() { if (this.closed) return; this.firstRender ? this.out.write(av.hide) : this.out.write(af(this.outputText, this.out.columns)), super.render(); let { startIndex: e, endIndex: r } = ov(this.cursor, this.choices.length, this.optionsPerPage); if (this.outputText = [ of.symbol(this.done, this.aborted), Ve.bold(this.msg), of.delimiter(!1), this.done ? this.selection.title : this.selection.disabled ? Ve.yellow(this.warn) : Ve.gray(this.hint) ].join(" "), !this.done) { this.outputText += ` `; for (let i = e; i < r; i++) { let n, o, a = "", l = this.choices[i]; i === e && e > 0 ? o = yi.arrowUp : i === r - 1 && r < this.choices.length ? o = yi.arrowDown : o = " ", l.disabled ? (n = this.cursor === i ? Ve.gray().underline(l.title) : Ve.strikethrough().gray(l.title), o = (this.cursor === i ? Ve.bold().gray(yi.pointer) + " " : "\ ") + o) : (n = this.cursor === i ? Ve.cyan().underline(l.title) : l.title, o = (this.cursor === i ? Ve.cyan(yi.pointer) + " " : " ") + o, l.description && this.cursor === i && (a = ` - ${l.description}`, (o.length + n.length + a.length >= this.out.columns || l.description. split(/\r?\n/).length > 1) && (a = ` ` + nv(l.description, { margin: 3, width: this.out.columns })))), this.outputText += `${o} ${n}${Ve.gray(a)} `; } } this.out.write(this.outputText); } }; lf.exports = Oo; }); // ../node_modules/prompts/lib/elements/toggle.js var df = d((A1, pf) => { var _i = V(), lv = Ye(), { style: cf, clear: uv } = ve(), { cursor: hf, erase: cv } = K(), Co = class extends lv { static { s(this, "TogglePrompt"); } constructor(e = {}) { super(e), this.msg = e.message, this.value = !!e.initial, this.active = e.active || "on", this.inactive = e.inactive || "off", this.initialValue = this.value, this.render(); } reset() { this.value = this.initialValue, this.fire(), this.render(); } exit() { this.abort(); } abort() { this.done = this.aborted = !0, this.fire(), this.render(), this.out.write(` `), this.close(); } submit() { this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(` `), this.close(); } deactivate() { if (this.value === !1) return this.bell(); this.value = !1, this.render(); } activate() { if (this.value === !0) return this.bell(); this.value = !0, this.render(); } delete() { this.deactivate(); } left() { this.deactivate(); } right() { this.activate(); } down() { this.deactivate(); } up() { this.activate(); } next() { this.value = !this.value, this.fire(), this.render(); } _(e, r) { if (e === " ") this.value = !this.value; else if (e === "1") this.value = !0; else if (e === "0") this.value = !1; else return this.bell(); this.render(); } render() { this.closed || (this.firstRender ? this.out.write(hf.hide) : this.out.write(uv(this.outputText, this.out.columns)), super.render(), this. outputText = [ cf.symbol(this.done, this.aborted), _i.bold(this.msg), cf.delimiter(this.done), this.value ? this.inactive : _i.cyan().underline(this.inactive), _i.gray("/"), this.value ? _i.cyan().underline(this.active) : this.active ].join(" "), this.out.write(cv.line + hf.to(0) + this.outputText)); } }; pf.exports = Co; }); // ../node_modules/prompts/lib/dateparts/datepart.js var ke = d((O1, ff) => { "use strict"; var Io = class t { static { s(this, "DatePart"); } constructor({ token: e, date: r, parts: i, locales: n }) { this.token = e, this.date = r || /* @__PURE__ */ new Date(), this.parts = i || [this], this.locales = n || {}; } up() { } down() { } next() { let e = this.parts.indexOf(this); return this.parts.find((r, i) => i > e && r instanceof t); } setTo(e) { } prev() { let e = [].concat(this.parts).reverse(), r = e.indexOf(this); return e.find((i, n) => n > r && i instanceof t); } toString() { return String(this.date); } }; ff.exports = Io; }); // ../node_modules/prompts/lib/dateparts/meridiem.js var gf = d((I1, mf) => { "use strict"; var hv = ke(), Do = class extends hv { static { s(this, "Meridiem"); } constructor(e = {}) { super(e); } up() { this.date.setHours((this.date.getHours() + 12) % 24); } down() { this.up(); } toString() { let e = this.date.getHours() > 12 ? "pm" : "am"; return /\A/.test(this.token) ? e.toUpperCase() : e; } }; mf.exports = Do; }); // ../node_modules/prompts/lib/dateparts/day.js var _f = d((N1, yf) => { "use strict"; var pv = ke(), dv = /* @__PURE__ */ s((t) => (t = t % 10, t === 1 ? "st" : t === 2 ? "nd" : t === 3 ? "rd" : "th"), "pos"), No = class extends pv { static { s(this, "Day"); } constructor(e = {}) { super(e); } up() { this.date.setDate(this.date.getDate() + 1); } down() { this.date.setDate(this.date.getDate() - 1); } setTo(e) { this.date.setDate(parseInt(e.substr(-2))); } toString() { let e = this.date.getDate(), r = this.date.getDay(); return this.token === "DD" ? String(e).padStart(2, "0") : this.token === "Do" ? e + dv(e) : this.token === "d" ? r + 1 : this.token === "ddd" ? this.locales.weekdaysShort[r] : this.token === "dddd" ? this.locales.weekdays[r] : e; } }; yf.exports = No; }); // ../node_modules/prompts/lib/dateparts/hours.js var bf = d((k1, xf) => { "use strict"; var fv = ke(), Lo = class extends fv { static { s(this, "Hours"); } constructor(e = {}) { super(e); } up() { this.date.setHours(this.date.getHours() + 1); } down() { this.date.setHours(this.date.getHours() - 1); } setTo(e) { this.date.setHours(parseInt(e.substr(-2))); } toString() { let e = this.date.getHours(); return /h/.test(this.token) && (e = e % 12 || 12), this.token.length > 1 ? String(e).padStart(2, "0") : e; } }; xf.exports = Lo; }); // ../node_modules/prompts/lib/dateparts/milliseconds.js var Ef = d(($1, Sf) => { "use strict"; var mv = ke(), ko = class extends mv { static { s(this, "Milliseconds"); } constructor(e = {}) { super(e); } up() { this.date.setMilliseconds(this.date.getMilliseconds() + 1); } down() { this.date.setMilliseconds(this.date.getMilliseconds() - 1); } setTo(e) { this.date.setMilliseconds(parseInt(e.substr(-this.token.length))); } toString() { return String(this.date.getMilliseconds()).padStart(4, "0").substr(0, this.token.length); } }; Sf.exports = ko; }); // ../node_modules/prompts/lib/dateparts/minutes.js var wf = d((F1, vf) => { "use strict"; var gv = ke(), Mo = class extends gv { static { s(this, "Minutes"); } constructor(e = {}) { super(e); } up() { this.date.setMinutes(this.date.getMinutes() + 1); } down() { this.date.setMinutes(this.date.getMinutes() - 1); } setTo(e) { this.date.setMinutes(parseInt(e.substr(-2))); } toString() { let e = this.date.getMinutes(); return this.token.length > 1 ? String(e).padStart(2, "0") : e; } }; vf.exports = Mo; }); // ../node_modules/prompts/lib/dateparts/month.js var Tf = d((j1, Rf) => { "use strict"; var yv = ke(), $o = class extends yv { static { s(this, "Month"); } constructor(e = {}) { super(e); } up() { this.date.setMonth(this.date.getMonth() + 1); } down() { this.date.setMonth(this.date.getMonth() - 1); } setTo(e) { e = parseInt(e.substr(-2)) - 1, this.date.setMonth(e < 0 ? 0 : e); } toString() { let e = this.date.getMonth(), r = this.token.length; return r === 2 ? String(e + 1).padStart(2, "0") : r === 3 ? this.locales.monthsShort[e] : r === 4 ? this.locales.months[e] : String(e + 1); } }; Rf.exports = $o; }); // ../node_modules/prompts/lib/dateparts/seconds.js var Pf = d((U1, Af) => { "use strict"; var _v = ke(), qo = class extends _v { static { s(this, "Seconds"); } constructor(e = {}) { super(e); } up() { this.date.setSeconds(this.date.getSeconds() + 1); } down() { this.date.setSeconds(this.date.getSeconds() - 1); } setTo(e) { this.date.setSeconds(parseInt(e.substr(-2))); } toString() { let e = this.date.getSeconds(); return this.token.length > 1 ? String(e).padStart(2, "0") : e; } }; Af.exports = qo; }); // ../node_modules/prompts/lib/dateparts/year.js var Cf = d((W1, Of) => { "use strict"; var xv = ke(), Fo = class extends xv { static { s(this, "Year"); } constructor(e = {}) { super(e); } up() { this.date.setFullYear(this.date.getFullYear() + 1); } down() { this.date.setFullYear(this.date.getFullYear() - 1); } setTo(e) { this.date.setFullYear(e.substr(-4)); } toString() { let e = String(this.date.getFullYear()).padStart(4, "0"); return this.token.length === 2 ? e.substr(-2) : e; } }; Of.exports = Fo; }); // ../node_modules/prompts/lib/dateparts/index.js var Df = d((V1, If) => { "use strict"; If.exports = { DatePart: ke(), Meridiem: gf(), Day: _f(), Hours: bf(), Milliseconds: Ef(), Minutes: wf(), Month: Tf(), Seconds: Pf(), Year: Cf() }; }); // ../node_modules/prompts/lib/elements/date.js var Ff = d((z1, qf) => { "use strict"; var Ho = V(), bv = Ye(), { style: Nf, clear: Lf, figures: Sv } = ve(), { erase: Ev, cursor: kf } = K(), { DatePart: Mf, Meridiem: vv, Day: wv, Hours: Rv, Milliseconds: Tv, Minutes: Av, Month: Pv, Seconds: Ov, Year: Cv } = Df(), Iv = /\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g, $f = { 1: ({ token: t }) => t.replace(/\\(.)/g, "$1"), 2: (t) => new wv(t), // Day // TODO 3: (t) => new Pv(t), // Month 4: (t) => new Cv(t), // Year 5: (t) => new vv(t), // AM/PM // TODO (special) 6: (t) => new Rv(t), // Hours 7: (t) => new Av(t), // Minutes 8: (t) => new Ov(t), // Seconds 9: (t) => new Tv(t) // Fractional seconds }, Dv = { months: "January,February,March,April,May,June,July,August,September,October,November,December".split(","), monthsShort: "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","), weekdays: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","), weekdaysShort: "Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",") }, jo = class extends bv { static { s(this, "DatePrompt"); } constructor(e = {}) { super(e), this.msg = e.message, this.cursor = 0, this.typed = "", this.locales = Object.assign(Dv, e.locales), this._date = e.initial || /* @__PURE__ */ new Date(), this.errorMsg = e.error || "Please Enter A Valid Value", this.validator = e.validate || (() => !0), this.mask = e.mask || "YYYY-MM-DD HH:mm:ss", this.clear = Lf("", this.out.columns), this.render(); } get value() { return this.date; } get date() { return this._date; } set date(e) { e && this._date.setTime(e.getTime()); } set mask(e) { let r; for (this.parts = []; r = Iv.exec(e); ) { let n = r.shift(), o = r.findIndex((a) => a != null); this.parts.push(o in $f ? $f[o]({ token: r[o] || n, date: this.date, parts: this.parts, locales: this.locales }) : r[o] || n); } let i = this.parts.reduce((n, o) => (typeof o == "string" && typeof n[n.length - 1] == "string" ? n[n.length - 1] += o : n.push(o), n), []); this.parts.splice(0), this.parts.push(...i), this.reset(); } moveCursor(e) { this.typed = "", this.cursor = e, this.fire(); } reset() { this.moveCursor(this.parts.findIndex((e) => e instanceof Mf)), this.fire(), this.render(); } exit() { this.abort(); } abort() { this.done = this.aborted = !0, this.error = !1, this.fire(), this.render(), this.out.write(` `), this.close(); } async validate() { let e = await this.validator(this.value); typeof e == "string" && (this.errorMsg = e, e = !1), this.error = !e; } async submit() { if (await this.validate(), this.error) { this.color = "red", this.fire(), this.render(); return; } this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(` `), this.close(); } up() { this.typed = "", this.parts[this.cursor].up(), this.render(); } down() { this.typed = "", this.parts[this.cursor].down(), this.render(); } left() { let e = this.parts[this.cursor].prev(); if (e == null) return this.bell(); this.moveCursor(this.parts.indexOf(e)), this.render(); } right() { let e = this.parts[this.cursor].next(); if (e == null) return this.bell(); this.moveCursor(this.parts.indexOf(e)), this.render(); } next() { let e = this.parts[this.cursor].next(); this.moveCursor(e ? this.parts.indexOf(e) : this.parts.findIndex((r) => r instanceof Mf)), this.render(); } _(e) { /\d/.test(e) && (this.typed += e, this.parts[this.cursor].setTo(this.typed), this.render()); } render() { this.closed || (this.firstRender ? this.out.write(kf.hide) : this.out.write(Lf(this.outputText, this.out.columns)), super.render(), this. outputText = [ Nf.symbol(this.done, this.aborted), Ho.bold(this.msg), Nf.delimiter(!1), this.parts.reduce((e, r, i) => e.concat(i === this.cursor && !this.done ? Ho.cyan().underline(r.toString()) : r), []).join("") ].join(" "), this.error && (this.outputText += this.errorMsg.split(` `).reduce( (e, r, i) => e + ` ${i ? " " : Sv.pointerSmall} ${Ho.red().italic(r)}`, "" )), this.out.write(Ev.line + kf.to(0) + this.outputText)); } }; qf.exports = jo; }); // ../node_modules/prompts/lib/elements/number.js var Uf = d((Q1, Bf) => { var xi = V(), Nv = Ye(), { cursor: bi, erase: Lv } = K(), { style: Bo, figures: kv, clear: Hf, lines: Mv } = ve(), $v = /[0-9]/, Uo = /* @__PURE__ */ s( (t) => t !== void 0, "isDef"), jf = /* @__PURE__ */ s((t, e) => { let r = Math.pow(10, e); return Math.round(t * r) / r; }, "round"), Go = class extends Nv { static { s(this, "NumberPrompt"); } constructor(e = {}) { super(e), this.transform = Bo.render(e.style), this.msg = e.message, this.initial = Uo(e.initial) ? e.initial : "", this.float = !!e.float, this.round = e.round || 2, this.inc = e.increment || 1, this.min = Uo(e.min) ? e.min : -1 / 0, this.max = Uo(e.max) ? e.max : 1 / 0, this. errorMsg = e.error || "Please Enter A Valid Value", this.validator = e.validate || (() => !0), this.color = "cyan", this.value = "", this. typed = "", this.lastHit = 0, this.render(); } set value(e) { !e && e !== 0 ? (this.placeholder = !0, this.rendered = xi.gray(this.transform.render(`${this.initial}`)), this._value = "") : (this.placeholder = !1, this.rendered = this.transform.render(`${jf(e, this.round)}`), this._value = jf(e, this.round)), this.fire(); } get value() { return this._value; } parse(e) { return this.float ? parseFloat(e) : parseInt(e); } valid(e) { return e === "-" || e === "." && this.float || $v.test(e); } reset() { this.typed = "", this.value = "", this.fire(), this.render(); } exit() { this.abort(); } abort() { let e = this.value; this.value = e !== "" ? e : this.initial, this.done = this.aborted = !0, this.error = !1, this.fire(), this.render(), this.out.write(`\ `), this.close(); } async validate() { let e = await this.validator(this.value); typeof e == "string" && (this.errorMsg = e, e = !1), this.error = !e; } async submit() { if (await this.validate(), this.error) { this.color = "red", this.fire(), this.render(); return; } let e = this.value; this.value = e !== "" ? e : this.initial, this.done = !0, this.aborted = !1, this.error = !1, this.fire(), this.render(), this.out.write( ` `), this.close(); } up() { if (this.typed = "", this.value === "" && (this.value = this.min - this.inc), this.value >= this.max) return this.bell(); this.value += this.inc, this.color = "cyan", this.fire(), this.render(); } down() { if (this.typed = "", this.value === "" && (this.value = this.min + this.inc), this.value <= this.min) return this.bell(); this.value -= this.inc, this.color = "cyan", this.fire(), this.render(); } delete() { let e = this.value.toString(); if (e.length === 0) return this.bell(); this.value = this.parse(e = e.slice(0, -1)) || "", this.value !== "" && this.value < this.min && (this.value = this.min), this.color = "cyan", this.fire(), this.render(); } next() { this.value = this.initial, this.fire(), this.render(); } _(e, r) { if (!this.valid(e)) return this.bell(); let i = Date.now(); if (i - this.lastHit > 1e3 && (this.typed = ""), this.typed += e, this.lastHit = i, this.color = "cyan", e === ".") return this.fire(); this.value = Math.min(this.parse(this.typed), this.max), this.value > this.max && (this.value = this.max), this.value < this.min && (this. value = this.min), this.fire(), this.render(); } render() { this.closed || (this.firstRender || (this.outputError && this.out.write(bi.down(Mv(this.outputError, this.out.columns) - 1) + Hf(this. outputError, this.out.columns)), this.out.write(Hf(this.outputText, this.out.columns))), super.render(), this.outputError = "", this.outputText = [ Bo.symbol(this.done, this.aborted), xi.bold(this.msg), Bo.delimiter(this.done), !this.done || !this.done && !this.placeholder ? xi[this.color]().underline(this.rendered) : this.rendered ].join(" "), this.error && (this.outputError += this.errorMsg.split(` `).reduce((e, r, i) => e + ` ${i ? " " : kv.pointerSmall} ${xi.red().italic(r)}`, "")), this.out.write(Lv.line + bi.to(0) + this.outputText + bi.save + this.outputError + bi.restore)); } }; Bf.exports = Go; }); // ../node_modules/prompts/lib/elements/multiselect.js var Yo = d((Z1, Yf) => { "use strict"; var Me = V(), { cursor: qv } = K(), Fv = Ye(), { clear: Gf, figures: ot, style: Wf, wrap: Hv, entriesToDisplay: jv } = ve(), Wo = class extends Fv { static { s(this, "MultiselectPrompt"); } constructor(e = {}) { super(e), this.msg = e.message, this.cursor = e.cursor || 0, this.scrollIndex = e.cursor || 0, this.hint = e.hint || "", this.warn = e. warn || "- This option is disabled -", this.minSelected = e.min, this.showMinError = !1, this.maxChoices = e.max, this.instructions = e. instructions, this.optionsPerPage = e.optionsPerPage || 10, this.value = e.choices.map((r, i) => (typeof r == "string" && (r = { title: r, value: i }), { title: r && (r.title || r.value || r), description: r && r.description, value: r && (r.value === void 0 ? i : r.value), selected: r && r.selected, disabled: r && r.disabled })), this.clear = Gf("", this.out.columns), e.overrideRender || this.render(); } reset() { this.value.map((e) => !e.selected), this.cursor = 0, this.fire(), this.render(); } selected() { return this.value.filter((e) => e.selected); } exit() { this.abort(); } abort() { this.done = this.aborted = !0, this.fire(), this.render(), this.out.write(` `), this.close(); } submit() { let e = this.value.filter((r) => r.selected); this.minSelected && e.length < this.minSelected ? (this.showMinError = !0, this.render()) : (this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(` `), this.close()); } first() { this.cursor = 0, this.render(); } last() { this.cursor = this.value.length - 1, this.render(); } next() { this.cursor = (this.cursor + 1) % this.value.length, this.render(); } up() { this.cursor === 0 ? this.cursor = this.value.length - 1 : this.cursor--, this.render(); } down() { this.cursor === this.value.length - 1 ? this.cursor = 0 : this.cursor++, this.render(); } left() { this.value[this.cursor].selected = !1, this.render(); } right() { if (this.value.filter((e) => e.selected).length >= this.maxChoices) return this.bell(); this.value[this.cursor].selected = !0, this.render(); } handleSpaceToggle() { let e = this.value[this.cursor]; if (e.selected) e.selected = !1, this.render(); else { if (e.disabled || this.value.filter((r) => r.selected).length >= this.maxChoices) return this.bell(); e.selected = !0, this.render(); } } toggleAll() { if (this.maxChoices !== void 0 || this.value[this.cursor].disabled) return this.bell(); let e = !this.value[this.cursor].selected; this.value.filter((r) => !r.disabled).forEach((r) => r.selected = e), this.render(); } _(e, r) { if (e === " ") this.handleSpaceToggle(); else if (e === "a") this.toggleAll(); else return this.bell(); } renderInstructions() { return this.instructions === void 0 || this.instructions ? typeof this.instructions == "string" ? this.instructions : ` Instructions: ${ot.arrowUp}/${ot.arrowDown}: Highlight option ${ot.arrowLeft}/${ot.arrowRight}/[space]: Toggle selection ` + (this.maxChoices === void 0 ? ` a: Toggle all ` : "") + " enter/return: Complete answer" : ""; } renderOption(e, r, i, n) { let o = (r.selected ? Me.green(ot.radioOn) : ot.radioOff) + " " + n + " ", a, l; return r.disabled ? a = e === i ? Me.gray().underline(r.title) : Me.strikethrough().gray(r.title) : (a = e === i ? Me.cyan().underline( r.title) : r.title, e === i && r.description && (l = ` - ${r.description}`, (o.length + a.length + l.length >= this.out.columns || r.description. split(/\r?\n/).length > 1) && (l = ` ` + Hv(r.description, { margin: o.length, width: this.out.columns })))), o + a + Me.gray(l || ""); } // shared with autocompleteMultiselect paginateOptions(e) { if (e.length === 0) return Me.red("No matches for this query."); let { startIndex: r, endIndex: i } = jv(this.cursor, e.length, this.optionsPerPage), n, o = []; for (let a = r; a < i; a++) a === r && r > 0 ? n = ot.arrowUp : a === i - 1 && i < e.length ? n = ot.arrowDown : n = " ", o.push(this.renderOption(this.cursor, e[a], a, n)); return ` ` + o.join(` `); } // shared with autocomleteMultiselect renderOptions(e) { return this.done ? "" : this.paginateOptions(e); } renderDoneOrInstructions() { if (this.done) return this.value.filter((r) => r.selected).map((r) => r.title).join(", "); let e = [Me.gray(this.hint), this.renderInstructions()]; return this.value[this.cursor].disabled && e.push(Me.yellow(this.warn)), e.join(" "); } render() { if (this.closed) return; this.firstRender && this.out.write(qv.hide), super.render(); let e = [ Wf.symbol(this.done, this.aborted), Me.bold(this.msg), Wf.delimiter(!1), this.renderDoneOrInstructions() ].join(" "); this.showMinError && (e += Me.red(`You must select a minimum of ${this.minSelected} choices.`), this.showMinError = !1), e += this.renderOptions( this.value), this.out.write(this.clear + e), this.clear = Gf(e, this.out.columns); } }; Yf.exports = Wo; }); // ../node_modules/prompts/lib/elements/autocomplete.js var Xf = d((e0, Qf) => { "use strict"; var lr = V(), Bv = Ye(), { erase: Uv, cursor: Vf } = K(), { style: Vo, clear: zf, figures: zo, wrap: Gv, entriesToDisplay: Wv } = ve(), Kf = /* @__PURE__ */ s( (t, e) => t[e] && (t[e].value || t[e].title || t[e]), "getVal"), Yv = /* @__PURE__ */ s((t, e) => t[e] && (t[e].title || t[e].value || t[e]), "getTitle"), Vv = /* @__PURE__ */ s((t, e) => { let r = t.findIndex((i) => i.value === e || i.title === e); return r > -1 ? r : void 0; }, "getIndex"), Ko = class extends Bv { static { s(this, "AutocompletePrompt"); } constructor(e = {}) { super(e), this.msg = e.message, this.suggest = e.suggest, this.choices = e.choices, this.initial = typeof e.initial == "number" ? e.initial : Vv(e.choices, e.initial), this.select = this.initial || e.cursor || 0, this.i18n = { noMatches: e.noMatches || "no matches found" }, this. fallback = e.fallback || this.initial, this.clearFirst = e.clearFirst || !1, this.suggestions = [], this.input = "", this.limit = e.limit || 10, this.cursor = 0, this.transform = Vo.render(e.style), this.scale = this.transform.scale, this.render = this.render.bind(this), this. complete = this.complete.bind(this), this.clear = zf("", this.out.columns), this.complete(this.render), this.render(); } set fallback(e) { this._fb = Number.isSafeInteger(parseInt(e)) ? parseInt(e) : e; } get fallback() { let e; return typeof this._fb == "number" ? e = this.choices[this._fb] : typeof this._fb == "string" && (e = { title: this._fb }), e || this. _fb || { title: this.i18n.noMatches }; } moveSelect(e) { this.select = e, this.suggestions.length > 0 ? this.value = Kf(this.suggestions, e) : this.value = this.fallback.value, this.fire(); } async complete(e) { let r = this.completing = this.suggest(this.input, this.choices), i = await r; if (this.completing !== r) return; this.suggestions = i.map((o, a, l) => ({ title: Yv(l, a), value: Kf(l, a), description: o.description })), this.completing = !1; let n = Math.max(i.length - 1, 0); this.moveSelect(Math.min(n, this.select)), e && e(); } reset() { this.input = "", this.complete(() => { this.moveSelect(this.initial !== void 0 ? this.initial : 0), this.render(); }), this.render(); } exit() { this.clearFirst && this.input.length > 0 ? this.reset() : (this.done = this.exited = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(` `), this.close()); } abort() { this.done = this.aborted = !0, this.exited = !1, this.fire(), this.render(), this.out.write(` `), this.close(); } submit() { this.done = !0, this.aborted = this.exited = !1, this.fire(), this.render(), this.out.write(` `), this.close(); } _(e, r) { let i = this.input.slice(0, this.cursor), n = this.input.slice(this.cursor); this.input = `${i}${e}${n}`, this.cursor = i.length + 1, this.complete(this.render), this.render(); } delete() { if (this.cursor === 0) return this.bell(); let e = this.input.slice(0, this.cursor - 1), r = this.input.slice(this.cursor); this.input = `${e}${r}`, this.complete(this.render), this.cursor = this.cursor - 1, this.render(); } deleteForward() { if (this.cursor * this.scale >= this.rendered.length) return this.bell(); let e = this.input.slice(0, this.cursor), r = this.input.slice(this.cursor + 1); this.input = `${e}${r}`, this.complete(this.render), this.render(); } first() { this.moveSelect(0), this.render(); } last() { this.moveSelect(this.suggestions.length - 1), this.render(); } up() { this.select === 0 ? this.moveSelect(this.suggestions.length - 1) : this.moveSelect(this.select - 1), this.render(); } down() { this.select === this.suggestions.length - 1 ? this.moveSelect(0) : this.moveSelect(this.select + 1), this.render(); } next() { this.select === this.suggestions.length - 1 ? this.moveSelect(0) : this.moveSelect(this.select + 1), this.render(); } nextPage() { this.moveSelect(Math.min(this.select + this.limit, this.suggestions.length - 1)), this.render(); } prevPage() { this.moveSelect(Math.max(this.select - this.limit, 0)), this.render(); } left() { if (this.cursor <= 0) return this.bell(); this.cursor = this.cursor - 1, this.render(); } right() { if (this.cursor * this.scale >= this.rendered.length) return this.bell(); this.cursor = this.cursor + 1, this.render(); } renderOption(e, r, i, n) { let o, a = i ? zo.arrowUp : n ? zo.arrowDown : " ", l = r ? lr.cyan().underline(e.title) : e.title; return a = (r ? lr.cyan(zo.pointer) + " " : " ") + a, e.description && (o = ` - ${e.description}`, (a.length + l.length + o.length >= this.out.columns || e.description.split(/\r?\n/).length > 1) && (o = ` ` + Gv(e.description, { margin: 3, width: this.out.columns }))), a + " " + l + lr.gray(o || ""); } render() { if (this.closed) return; this.firstRender ? this.out.write(Vf.hide) : this.out.write(zf(this.outputText, this.out.columns)), super.render(); let { startIndex: e, endIndex: r } = Wv(this.select, this.choices.length, this.limit); if (this.outputText = [ Vo.symbol(this.done, this.aborted, this.exited), lr.bold(this.msg), Vo.delimiter(this.completing), this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input) ].join(" "), !this.done) { let i = this.suggestions.slice(e, r).map((n, o) => this.renderOption( n, this.select === o + e, o === 0 && e > 0, o + e === r - 1 && r < this.choices.length )).join(` `); this.outputText += ` ` + (i || lr.gray(this.fallback.title)); } this.out.write(Uv.line + Vf.to(0) + this.outputText); } }; Qf.exports = Ko; }); // ../node_modules/prompts/lib/elements/autocompleteMultiselect.js var tm = d((r0, em) => { "use strict"; var ze = V(), { cursor: zv } = K(), Kv = Yo(), { clear: Zf, style: Jf, figures: Lt } = ve(), Qo = class extends Kv { static { s(this, "AutocompleteMultiselectPrompt"); } constructor(e = {}) { e.overrideRender = !0, super(e), this.inputValue = "", this.clear = Zf("", this.out.columns), this.filteredOptions = this.value, this. render(); } last() { this.cursor = this.filteredOptions.length - 1, this.render(); } next() { this.cursor = (this.cursor + 1) % this.filteredOptions.length, this.render(); } up() { this.cursor === 0 ? this.cursor = this.filteredOptions.length - 1 : this.cursor--, this.render(); } down() { this.cursor === this.filteredOptions.length - 1 ? this.cursor = 0 : this.cursor++, this.render(); } left() { this.filteredOptions[this.cursor].selected = !1, this.render(); } right() { if (this.value.filter((e) => e.selected).length >= this.maxChoices) return this.bell(); this.filteredOptions[this.cursor].selected = !0, this.render(); } delete() { this.inputValue.length && (this.inputValue = this.inputValue.substr(0, this.inputValue.length - 1), this.updateFilteredOptions()); } updateFilteredOptions() { let e = this.filteredOptions[this.cursor]; this.filteredOptions = this.value.filter((i) => this.inputValue ? !!(typeof i.title == "string" && i.title.toLowerCase().includes(this. inputValue.toLowerCase()) || typeof i.value == "string" && i.value.toLowerCase().includes(this.inputValue.toLowerCase())) : !0); let r = this.filteredOptions.findIndex((i) => i === e); this.cursor = r < 0 ? 0 : r, this.render(); } handleSpaceToggle() { let e = this.filteredOptions[this.cursor]; if (e.selected) e.selected = !1, this.render(); else { if (e.disabled || this.value.filter((r) => r.selected).length >= this.maxChoices) return this.bell(); e.selected = !0, this.render(); } } handleInputChange(e) { this.inputValue = this.inputValue + e, this.updateFilteredOptions(); } _(e, r) { e === " " ? this.handleSpaceToggle() : this.handleInputChange(e); } renderInstructions() { return this.instructions === void 0 || this.instructions ? typeof this.instructions == "string" ? this.instructions : ` Instructions: ${Lt.arrowUp}/${Lt.arrowDown}: Highlight option ${Lt.arrowLeft}/${Lt.arrowRight}/[space]: Toggle selection [a,b,c]/delete: Filter choices enter/return: Complete answer ` : ""; } renderCurrentInput() { return ` Filtered results for: ${this.inputValue ? this.inputValue : ze.gray("Enter something to filter")} `; } renderOption(e, r, i) { let n; return r.disabled ? n = e === i ? ze.gray().underline(r.title) : ze.strikethrough().gray(r.title) : n = e === i ? ze.cyan().underline( r.title) : r.title, (r.selected ? ze.green(Lt.radioOn) : Lt.radioOff) + " " + n; } renderDoneOrInstructions() { if (this.done) return this.value.filter((r) => r.selected).map((r) => r.title).join(", "); let e = [ze.gray(this.hint), this.renderInstructions(), this.renderCurrentInput()]; return this.filteredOptions.length && this.filteredOptions[this.cursor].disabled && e.push(ze.yellow(this.warn)), e.join(" "); } render() { if (this.closed) return; this.firstRender && this.out.write(zv.hide), super.render(); let e = [ Jf.symbol(this.done, this.aborted), ze.bold(this.msg), Jf.delimiter(!1), this.renderDoneOrInstructions() ].join(" "); this.showMinError && (e += ze.red(`You must select a minimum of ${this.minSelected} choices.`), this.showMinError = !1), e += this.renderOptions( this.filteredOptions), this.out.write(this.clear + e), this.clear = Zf(e, this.out.columns); } }; em.exports = Qo; }); // ../node_modules/prompts/lib/elements/confirm.js var om = d((s0, nm) => { var rm = V(), Qv = Ye(), { style: im, clear: Xv } = ve(), { erase: Zv, cursor: sm } = K(), Xo = class extends Qv { static { s(this, "ConfirmPrompt"); } constructor(e = {}) { super(e), this.msg = e.message, this.value = e.initial, this.initialValue = !!e.initial, this.yesMsg = e.yes || "yes", this.yesOption = e.yesOption || "(Y/n)", this.noMsg = e.no || "no", this.noOption = e.noOption || "(y/N)", this.render(); } reset() { this.value = this.initialValue, this.fire(), this.render(); } exit() { this.abort(); } abort() { this.done = this.aborted = !0, this.fire(), this.render(), this.out.write(` `), this.close(); } submit() { this.value = this.value || !1, this.done = !0, this.aborted = !1, this.fire(), this.render(), this.out.write(` `), this.close(); } _(e, r) { return e.toLowerCase() === "y" ? (this.value = !0, this.submit()) : e.toLowerCase() === "n" ? (this.value = !1, this.submit()) : this. bell(); } render() { this.closed || (this.firstRender ? this.out.write(sm.hide) : this.out.write(Xv(this.outputText, this.out.columns)), super.render(), this. outputText = [ im.symbol(this.done, this.aborted), rm.bold(this.msg), im.delimiter(this.done), this.done ? this.value ? this.yesMsg : this.noMsg : rm.gray(this.initialValue ? this.yesOption : this.noOption) ].join(" "), this.out.write(Zv.line + sm.to(0) + this.outputText)); } }; nm.exports = Xo; }); // ../node_modules/prompts/lib/elements/index.js var lm = d((o0, am) => { "use strict"; am.exports = { TextPrompt: nf(), SelectPrompt: uf(), TogglePrompt: df(), DatePrompt: Ff(), NumberPrompt: Uf(), MultiselectPrompt: Yo(), AutocompletePrompt: Xf(), AutocompleteMultiselectPrompt: tm(), ConfirmPrompt: om() }; }); // ../node_modules/prompts/lib/prompts.js var cm = d((um) => { "use strict"; var le = um, Jv = lm(), Si = /* @__PURE__ */ s((t) => t, "noop"); function $e(t, e, r = {}) { return new Promise((i, n) => { let o = new Jv[t](e), a = r.onAbort || Si, l = r.onSubmit || Si, u = r.onExit || Si; o.on("state", e.onState || Si), o.on("submit", (c) => i(l(c))), o.on("exit", (c) => i(u(c))), o.on("abort", (c) => n(a(c))); }); } s($e, "toPrompt"); le.text = (t) => $e("TextPrompt", t); le.password = (t) => (t.style = "password", le.text(t)); le.invisible = (t) => (t.style = "invisible", le.text(t)); le.number = (t) => $e("NumberPrompt", t); le.date = (t) => $e("DatePrompt", t); le.confirm = (t) => $e("ConfirmPrompt", t); le.list = (t) => { let e = t.separator || ","; return $e("TextPrompt", t, { onSubmit: /* @__PURE__ */ s((r) => r.split(e).map((i) => i.trim()), "onSubmit") }); }; le.toggle = (t) => $e("TogglePrompt", t); le.select = (t) => $e("SelectPrompt", t); le.multiselect = (t) => { t.choices = [].concat(t.choices || []); let e = /* @__PURE__ */ s((r) => r.filter((i) => i.selected).map((i) => i.value), "toSelected"); return $e("MultiselectPrompt", t, { onAbort: e, onSubmit: e }); }; le.autocompleteMultiselect = (t) => { t.choices = [].concat(t.choices || []); let e = /* @__PURE__ */ s((r) => r.filter((i) => i.selected).map((i) => i.value), "toSelected"); return $e("AutocompleteMultiselectPrompt", t, { onAbort: e, onSubmit: e }); }; var ew = /* @__PURE__ */ s((t, e) => Promise.resolve( e.filter((r) => r.title.slice(0, t.length).toLowerCase() === t.toLowerCase()) ), "byTitle"); le.autocomplete = (t) => (t.suggest = t.suggest || ew, t.choices = [].concat(t.choices || []), $e("AutocompletePrompt", t)); }); // ../node_modules/prompts/lib/index.js var dm = d((u0, pm) => { "use strict"; var Zo = cm(), tw = ["suggest", "format", "onState", "validate", "onRender", "type"], hm = /* @__PURE__ */ s(() => { }, "noop"); async function at(t = [], { onSubmit: e = hm, onCancel: r = hm } = {}) { let i = {}, n = at._override || {}; t = [].concat(t); let o, a, l, u, c, p, f = /* @__PURE__ */ s(async (h, E, m = !1) => { if (!(!m && h.validate && h.validate(E) !== !0)) return h.format ? await h.format(E, i) : E; }, "getFormattedAnswer"); for (a of t) if ({ name: u, type: c } = a, typeof c == "function" && (c = await c(o, { ...i }, a), a.type = c), !!c) { for (let h in a) { if (tw.includes(h)) continue; let E = a[h]; a[h] = typeof E == "function" ? await E(o, { ...i }, p) : E; } if (p = a, typeof a.message != "string") throw new Error("prompt message is required"); if ({ name: u, type: c } = a, Zo[c] === void 0) throw new Error(`prompt type (${c}) is not defined`); if (n[a.name] !== void 0 && (o = await f(a, n[a.name]), o !== void 0)) { i[u] = o; continue; } try { o = at._injected ? rw(at._injected, a.initial) : await Zo[c](a), i[u] = o = await f(a, o, !0), l = await e(a, o, i); } catch { l = !await r(a, i); } if (l) return i; } return i; } s(at, "prompt"); function rw(t, e) { let r = t.shift(); if (r instanceof Error) throw r; return r === void 0 ? e : r; } s(rw, "getInjectedAnswer"); function iw(t) { at._injected = (at._injected || []).concat(t); } s(iw, "inject"); function sw(t) { at._override = Object.assign({}, t); } s(sw, "override"); pm.exports = Object.assign(at, { prompt: at, prompts: Zo, inject: iw, override: sw }); }); // ../node_modules/prompts/index.js var mm = d((h0, fm) => { function nw(t) { t = (Array.isArray(t) ? t : t.split(".")).map(Number); let e = 0, r = process.versions.node.split(".").map(Number); for (; e < t.length; e++) { if (r[e] > t[e]) return !1; if (t[e] > r[e]) return !0; } return !1; } s(nw, "isNodeLT"); fm.exports = nw("8.6.0") ? qd() : dm(); }); // src/core-server/presets/common-preset.ts var Dw = {}; yt(Dw, { babel: () => dw, core: () => Ew, csfIndexer: () => Rm, docs: () => Tw, env: () => yw, experimental_indexers: () => ww, experimental_serverAPI: () => Sw, experimental_serverChannel: () => Pw, favicon: () => pw, features: () => vw, frameworkOptions: () => Rw, logLevel: () => mw, managerEntries: () => Iw, managerHead: () => Aw, previewBody: () => _w, previewHead: () => gw, resolvedReact: () => Ow, staticDirs: () => hw, tags: () => Cw, title: () => fw, typescript: () => xw }); module.exports = fr(Dw); var Ei = require("node:fs"), Sm = require("node:fs/promises"), pe = require("node:path"), Re = require("@storybook/core/common"), $t = require("@storybook/core/telemetry"), Em = require("@storybook/core/csf-tools"), vm = require("@storybook/core/node-logger"), wm = B(Ht(), 1); // src/core-events/index.ts var na = /* @__PURE__ */ ((v) => (v.CHANNEL_WS_DISCONNECT = "channelWSDisconnect", v.CHANNEL_CREATED = "channelCreated", v.CONFIG_ERROR = "c\ onfigError", v.STORY_INDEX_INVALIDATED = "storyIndexInvalidated", v.STORY_SPECIFIED = "storySpecified", v.SET_CONFIG = "setConfig", v.SET_STORIES = "setStories", v.SET_INDEX = "setIndex", v.SET_CURRENT_STORY = "setCurrentStory", v.CURRENT_STORY_WAS_SET = "currentStoryWasSet", v.FORCE_RE_RENDER = "forceReRender", v.FORCE_REMOUNT = "forceRemount", v.PRELOAD_ENTRIES = "preloadStories", v.STORY_PREPARED = "storyPrepared", v.DOCS_PREPARED = "docsPrepared", v.STORY_CHANGED = "storyChanged", v.STORY_UNCHANGED = "storyUnchanged", v.STORY_RENDERED = "storyRendered", v.STORY_MISSING = "storyMissing", v.STORY_ERRORED = "storyErrored", v.STORY_THREW_EXCEPTION = "storyThrewException", v.STORY_RENDER_PHASE_CHANGED = "storyRend\ erPhaseChanged", v.PLAY_FUNCTION_THREW_EXCEPTION = "playFunctionThrewException", v.UNHANDLED_ERRORS_WHILE_PLAYING = "unhandledErrorsWhilePla\ ying", v.UPDATE_STORY_ARGS = "updateStoryArgs", v.STORY_ARGS_UPDATED = "storyArgsUpdated", v.RESET_STORY_ARGS = "resetStoryArgs", v.SET_FILTER = "setFilter", v.SET_GLOBALS = "setGlobals", v.UPDATE_GLOBALS = "updateGlobals", v.GLOBALS_UPDATED = "globalsUpdated", v.REGISTER_SUBSCRIPTION = "registerSubscription", v.PREVIEW_KEYDOWN = "previewKeydown", v.PREVIEW_BUILDER_PROGRESS = "preview_builder_progress", v.SELECT_STORY = "sel\ ectStory", v.STORIES_COLLAPSE_ALL = "storiesCollapseAll", v.STORIES_EXPAND_ALL = "storiesExpandAll", v.DOCS_RENDERED = "docsRendered", v.SHARED_STATE_CHANGED = "sharedStateChanged", v.SHARED_STATE_SET = "sharedStateSet", v.NAVIGATE_URL = "navigateUrl", v.UPDATE_QUERY_PARAMS = "updateQueryParams", v. REQUEST_WHATS_NEW_DATA = "requestWhatsNewData", v.RESULT_WHATS_NEW_DATA = "resultWhatsNewData", v.SET_WHATS_NEW_CACHE = "setWhatsNewCache", v. TOGGLE_WHATS_NEW_NOTIFICATIONS = "toggleWhatsNewNotifications", v.TELEMETRY_ERROR = "telemetryError", v.FILE_COMPONENT_SEARCH_REQUEST = "fil\ eComponentSearchRequest", v.FILE_COMPONENT_SEARCH_RESPONSE = "fileComponentSearchResponse", v.SAVE_STORY_REQUEST = "saveStoryRequest", v.SAVE_STORY_RESPONSE = "saveStoryResponse", v.ARGTYPES_INFO_REQUEST = "argtypesInfoRequest", v.ARGTYPES_INFO_RESPONSE = "argtypesInfoResponse", v.CREATE_NEW_STORYFILE_REQUEST = "createNewStoryfileRequest", v.CREATE_NEW_STORYFILE_RESPONSE = "createNewStoryfileResponse", v.TESTING_MODULE_CRASH_REPORT = "testingModuleC\ rashReport", v.TESTING_MODULE_PROGRESS_REPORT = "testingModuleProgressReport", v.TESTING_MODULE_RUN_REQUEST = "testingModuleRunRequest", v.TESTING_MODULE_RUN_ALL_REQUEST = "testingModuleRunAllRequest", v.TESTING_MODULE_CANCEL_TEST_RUN_REQUEST = "testingModuleCancelTestRunRequest", v.TESTING_MODULE_CANCEL_TEST_RUN_RESPONSE = "testingModuleCancelTestRunResponse", v.TESTING_MODULE_WATCH_MODE_REQUEST = "testingModuleWatchModeRequest", v))(na || {}); var { CHANNEL_WS_DISCONNECT: Mw, CHANNEL_CREATED: $w, CONFIG_ERROR: qw, CREATE_NEW_STORYFILE_REQUEST: Fw, CREATE_NEW_STORYFILE_RESPONSE: Hw, CURRENT_STORY_WAS_SET: jw, DOCS_PREPARED: Bw, DOCS_RENDERED: Uw, FILE_COMPONENT_SEARCH_REQUEST: Gw, FILE_COMPONENT_SEARCH_RESPONSE: Ww, FORCE_RE_RENDER: Yw, FORCE_REMOUNT: Vw, GLOBALS_UPDATED: zw, NAVIGATE_URL: Kw, PLAY_FUNCTION_THREW_EXCEPTION: Qw, UNHANDLED_ERRORS_WHILE_PLAYING: Xw, PRELOAD_ENTRIES: Zw, PREVIEW_BUILDER_PROGRESS: Jw, PREVIEW_KEYDOWN: eR, REGISTER_SUBSCRIPTION: tR, RESET_STORY_ARGS: rR, SELECT_STORY: iR, SET_CONFIG: sR, SET_CURRENT_STORY: nR, SET_FILTER: oR, SET_GLOBALS: aR, SET_INDEX: lR, SET_STORIES: uR, SHARED_STATE_CHANGED: cR, SHARED_STATE_SET: hR, STORIES_COLLAPSE_ALL: pR, STORIES_EXPAND_ALL: dR, STORY_ARGS_UPDATED: fR, STORY_CHANGED: mR, STORY_ERRORED: gR, STORY_INDEX_INVALIDATED: yR, STORY_MISSING: _R, STORY_PREPARED: xR, STORY_RENDER_PHASE_CHANGED: bR, STORY_RENDERED: SR, STORY_SPECIFIED: ER, STORY_THREW_EXCEPTION: vR, STORY_UNCHANGED: wR, UPDATE_GLOBALS: RR, UPDATE_QUERY_PARAMS: TR, UPDATE_STORY_ARGS: AR, REQUEST_WHATS_NEW_DATA: PR, RESULT_WHATS_NEW_DATA: OR, SET_WHATS_NEW_CACHE: CR, TOGGLE_WHATS_NEW_NOTIFICATIONS: IR, TELEMETRY_ERROR: DR, SAVE_STORY_REQUEST: NR, SAVE_STORY_RESPONSE: LR, ARGTYPES_INFO_REQUEST: kR, ARGTYPES_INFO_RESPONSE: MR, TESTING_MODULE_CRASH_REPORT: oa, TESTING_MODULE_PROGRESS_REPORT: aa, TESTING_MODULE_RUN_REQUEST: $R, TESTING_MODULE_RUN_ALL_REQUEST: qR, TESTING_MODULE_CANCEL_TEST_RUN_REQUEST: FR, TESTING_MODULE_CANCEL_TEST_RUN_RESPONSE: HR, TESTING_MODULE_WATCH_MODE_REQUEST: la } = na; // src/telemetry/sanitize.ts var wi = B(require("node:path"), 1); function ua(t) { return t.replace(/[-[/{}()*+?.\\^$|]/g, "\\$&"); } s(ua, "regexpEscape"); function ca(t = "") { return t.replace(/\u001B\[[0-9;]*m/g, ""); } s(ca, "removeAnsiEscapeCodes"); function Ri(t, e = wi.default.sep) { if (!t) return t; let r = process.cwd().split(e); for (; r.length > 1; ) { let i = r.join(e), n = new RegExp(ua(i), "gi"); t = t.replace(n, "$SNIP"); let o = r.join(e + e), a = new RegExp(ua(o), "gi"); t = t.replace(a, "$SNIP"), r.pop(); } return t; } s(Ri, "cleanPaths"); function ha(t, e = wi.default.sep) { try { t = { ...JSON.parse(JSON.stringify(t)), message: ca(t.message), stack: ca(t.stack), cause: t.cause, name: t.name }; let r = Ri(JSON.stringify(t), e); return JSON.parse(r); } catch (r) { return `Sanitization error: ${r?.message}`; } } s(ha, "sanitizeError"); // src/core-server/server-channel/create-new-story-channel.ts var wa = require("node:fs"), Ra = require("node:fs/promises"), Oi = require("node:path"), Ta = require("@storybook/core/common"), gr = require("@storybook/core/telemetry"), _t = require("@storybook/core/core-events"); // src/core-server/utils/get-new-story-file.ts var jt = require("node:fs"), ee = require("node:path"), Qe = require("@storybook/core/common"); // src/core-server/utils/new-story-templates/javascript.ts var xa = B(Ht(), 1); // src/core-server/utils/get-component-variable-name.ts var mr = /* @__PURE__ */ s(async (t) => (await Promise.resolve().then(() => (_a(), ya))).default(t.replace(/^[^a-zA-Z_$]*/, ""), { pascalCase: !0 }). replace(/[^a-zA-Z_$]+/, ""), "getComponentVariableName"); // src/core-server/utils/new-story-templates/javascript.ts async function ba(t) { let e = t.componentIsDefaultExport ? await mr(t.basenameWithoutExtension) : t.componentExportName, r = t.componentIsDefaultExport ? `impor\ t ${e} from './${t.basenameWithoutExtension}';` : `import { ${e} } from './${t.basenameWithoutExtension}';`; return xa.dedent` ${r} const meta = { component: ${e}, }; export default meta; export const ${t.exportedStoryName} = {}; `; } s(ba, "getJavaScriptTemplateForNewStoryFile"); // src/core-server/utils/new-story-templates/typescript.ts var Sa = B(Ht(), 1); async function Ea(t) { let e = t.componentIsDefaultExport ? await mr(t.basenameWithoutExtension) : t.componentExportName, r = t.componentIsDefaultExport ? `impor\ t ${e} from './${t.basenameWithoutExtension}'` : `import { ${e} } from './${t.basenameWithoutExtension}'`; return Sa.dedent` import type { Meta, StoryObj } from '${t.rendererPackage}'; ${r}; const meta = { component: ${e}, } satisfies Meta; export default meta; type Story = StoryObj; export const ${t.exportedStoryName}: Story = {}; `; } s(Ea, "getTypeScriptTemplateForNewStoryFile"); // src/core-server/utils/get-new-story-file.ts async function va({ componentFilePath: t, componentExportName: e, componentIsDefaultExport: r, componentExportCount: i }, n) { let o = (0, Qe.getProjectRoot)(), a = await (0, Qe.getFrameworkName)(n), l = await (0, Qe.extractProperRendererNameFromFramework)(a), u = Object. entries(Qe.rendererPackages).find( ([, P]) => P === l )?.[0], c = (0, ee.basename)(t), p = (0, ee.extname)(t), f = c.replace(p, ""), h = (0, ee.dirname)(t), { storyFileName: E, isTypescript: m, storyFileExtension: x } = Ai(t), w = `${E}.${x}`, R = `${f}.${e}.stories.${x}`, N = "Default", C = m && u ? await Ea({ basenameWithoutExtension: f, componentExportName: e, componentIsDefaultExport: r, rendererPackage: u, exportedStoryName: N }) : await ba({ basenameWithoutExtension: f, componentExportName: e, componentIsDefaultExport: r, exportedStoryName: N }); return { storyFilePath: Pi((0, ee.join)(o, h), E) && i > 1 ? (0, ee.join)(o, h, R) : (0, ee.join)(o, h, w), exportedStoryName: N, storyFileContent: C, dirname: ee.dirname }; } s(va, "getNewStoryFile"); var Ai = /* @__PURE__ */ s((t) => { let e = /\.(ts|tsx|mts|cts)$/.test(t), r = (0, ee.basename)(t), i = (0, ee.extname)(t), n = r.replace(i, ""), o = e ? "tsx" : "jsx"; return { storyFileName: `${n}.stories`, storyFileExtension: o, isTypescript: e }; }, "getStoryMetadata"), Pi = /* @__PURE__ */ s((t, e) => (0, jt.existsSync)((0, ee.join)(t, `${e}.ts`)) || (0, jt.existsSync)((0, ee.join)(t, `${e}.tsx`)) || (0, jt.existsSync)((0, ee.join)(t, `${e}.js`)) || (0, jt.existsSync)((0, ee.join)(t, `${e}.jsx`)), "doesStoryFileExist"); // src/core-server/server-channel/create-new-story-channel.ts function Aa(t, e, r) { return t.on( _t.CREATE_NEW_STORYFILE_REQUEST, async (i) => { try { let { storyFilePath: n, exportedStoryName: o, storyFileContent: a } = await va( i.payload, e ), l = (0, Oi.relative)(process.cwd(), n), { storyId: u, kind: c } = await (0, Ta.getStoryId)({ storyFilePath: n, exportedStoryName: o }, e); if ((0, wa.existsSync)(n)) { t.emit(_t.CREATE_NEW_STORYFILE_RESPONSE, { success: !1, id: i.id, payload: { type: "STORY_FILE_EXISTS", kind: c }, error: `A story file already exists at ${l}` }), r.disableTelemetry || (0, gr.telemetry)("create-new-story-file", { success: !1, error: "STORY_FILE_EXISTS" }); return; } await (0, Ra.writeFile)(n, a, "utf-8"), t.emit(_t.CREATE_NEW_STORYFILE_RESPONSE, { success: !0, id: i.id, payload: { storyId: u, storyFilePath: (0, Oi.relative)(process.cwd(), n), exportedStoryName: o }, error: null }), r.disableTelemetry || (0, gr.telemetry)("create-new-story-file", { success: !0 }); } catch (n) { t.emit(_t.CREATE_NEW_STORYFILE_RESPONSE, { success: !1, id: i.id, error: n?.message }), r.disableTelemetry || await (0, gr.telemetry)("create-new-story-file", { success: !1, error: n }); } } ), t; } s(Aa, "initCreateNewStoryChannel"); // src/core-server/server-channel/file-search-channel.ts var ch = require("node:fs/promises"), Pt = require("node:path"), Ot = require("@storybook/core/common"), Jr = require("@storybook/core/telemetry"), Kt = require("@storybook/core/core-events"); // src/core-server/utils/parser/generic-parser.ts var ne = require("@storybook/core/babel"); var yr = class { static { s(this, "GenericParser"); } /** * Parse the content of a file and return the exports * * @param content The content of the file * @returns The exports of the file */ async parse(e) { let r = ne.parser.parse(e, { allowImportExportEverywhere: !0, allowAwaitOutsideFunction: !0, allowNewTargetOutsideFunction: !0, allowReturnOutsideFunction: !0, allowUndeclaredExports: !0, plugins: [ // Language features "typescript", "jsx", // Latest ECMAScript features "asyncGenerators", "bigInt", "classProperties", "classPrivateProperties", "classPrivateMethods", "classStaticBlock", "dynamicImport", "exportNamespaceFrom", "logicalAssignment", "moduleStringNames", "nullishCoalescingOperator", "numericSeparator", "objectRestSpread", "optionalCatchBinding", "optionalChaining", "privateIn", "regexpUnicodeSets", "topLevelAwait", // ECMAScript proposals "asyncDoExpressions", "decimal", "decorators", "decoratorAutoAccessors", "deferredImportEvaluation", "destructuringPrivate", "doExpressions", "explicitResourceManagement", "exportDefaultFrom", "functionBind", "functionSent", "importAttributes", "importReflection", "moduleBlocks", "partialApplication", "recordAndTuple", "sourcePhaseImports", "throwExpressions" ] }), i = []; return r.program.body.forEach(/* @__PURE__ */ s(function(o) { ne.types.isExportNamedDeclaration(o) ? (ne.types.isFunctionDeclaration(o.declaration) && ne.types.isIdentifier(o.declaration.id) && i. push({ name: o.declaration.id.name, default: !1 }), ne.types.isClassDeclaration(o.declaration) && ne.types.isIdentifier(o.declaration.id) && i.push({ name: o.declaration.id.name, default: !1 }), o.declaration === null && o.specifiers.length > 0 && o.specifiers.forEach((a) => { ne.types.isExportSpecifier(a) && ne.types.isIdentifier(a.exported) && i.push({ name: a.exported.name, default: !1 }); }), ne.types.isVariableDeclaration(o.declaration) && o.declaration.declarations.forEach((a) => { ne.types.isVariableDeclarator(a) && ne.types.isIdentifier(a.id) && i.push({ name: a.id.name, default: !1 }); })) : ne.types.isExportDefaultDeclaration(o) && i.push({ name: "default", default: !0 }); }, "traverse")), { exports: i }; } }; // src/core-server/utils/parser/index.ts function Pa(t) { switch (t) { default: return new yr(); } } s(Pa, "getParser"); // src/core-server/utils/search-files.ts var Cb = ["js", "mjs", "cjs", "jsx", "mts", "ts", "tsx", "cts"], Ib = [ "**/node_modules/**", "**/*.spec.*", "**/*.test.*", "**/*.stories.*", "**/storybook-static/**" ]; async function uh({ searchQuery: t, cwd: e, ignoredFiles: r = Ib, fileExtensions: i = Cb }) { let { globby: n, isDynamicPattern: o } = await Promise.resolve().then(() => (lh(), ah)), a = o(t, { cwd: e }), u = /(\.[a-z]+)$/i.test(t), c = `{${i.join(",")}}`, p = a ? t : u ? [`**/*${t}*`, `**/*${t}*/**`] : [ `**/*${t}*.${c}`, `**/*${t}*/**/*.${c}` ]; return (await n(p, { ignore: r, gitignore: !0, caseSensitiveMatch: !1, cwd: e, objectMode: !0 })).map((h) => h.path).filter((h) => i.some((E) => h.endsWith(`.${E}`))); } s(uh, "searchFiles"); // src/core-server/server-channel/file-search-channel.ts async function hh(t, e, r) { return t.on( Kt.FILE_COMPONENT_SEARCH_REQUEST, async (i) => { let n = i.id; try { if (!n) return; let o = await (0, Ot.getFrameworkName)(e), a = await (0, Ot.extractProperRendererNameFromFramework)( o ), l = (0, Ot.getProjectRoot)(), c = (await uh({ searchQuery: n, cwd: l })).map(async (p) => { let f = Pa(a); try { let h = await (0, ch.readFile)((0, Pt.join)(l, p), "utf-8"), { storyFileName: E } = Ai((0, Pt.join)(l, p)), m = (0, Pt.dirname)( p), x = Pi((0, Pt.join)(l, m), E), w = await f.parse(h); return { filepath: p, exportedComponents: w.exports, storyFileExists: x }; } catch (h) { return r.disableTelemetry || (0, Jr.telemetry)("create-new-story-file-search", { success: !1, error: `Could not parse file: ${h}` }), { filepath: p, storyFileExists: !1, exportedComponents: null }; } }); r.disableTelemetry || (0, Jr.telemetry)("create-new-story-file-search", { success: !0, payload: { fileCount: c.length } }), t.emit(Kt.FILE_COMPONENT_SEARCH_RESPONSE, { success: !0, id: n, payload: { files: await Promise.all(c) }, error: null }); } catch (o) { t.emit(Kt.FILE_COMPONENT_SEARCH_RESPONSE, { success: !1, id: n ?? "", error: `An error occurred while searching for components in the project. ${o?.message}` }), r.disableTelemetry || (0, Jr.telemetry)("create-new-story-file-search", { success: !1, error: `An error occured while searching for components: ${o}` }); } } ), t; } s(hh, "initFileSearchChannel"); // src/core-server/utils/constants.ts var ei = require("node:path"); var ph = [ { from: (0, ei.join)((0, ei.dirname)(require.resolve("@storybook/core/package.json")), "assets", "browser"), to: "/sb-common-assets" } ]; // src/core-server/utils/save-story/save-story.ts var mh = require("node:fs/promises"), ri = require("node:path"), gh = require("@storybook/core/common"), Qt = require("@storybook/core/telemetry"), Xt = require("@storybook/csf"), it = require("@storybook/core/core-events"), ii = require("@storybook/core/csf-tools"), yh = require("@storybook/core/node-logger"); // src/core-server/utils/save-story/duplicate-story-with-new-name.ts var je = require("@storybook/core/babel"); // src/core-server/utils/save-story/utils.ts var ye = class extends Error { static { s(this, "SaveStoryError"); } }; // src/core-server/utils/save-story/duplicate-story-with-new-name.ts var dh = /* @__PURE__ */ s((t, e, r) => { let i = t._storyExports[e], n = je.types.cloneNode(i); if (!n) throw new ye("cannot clone Node"); let o = !1; if ((0, je.traverse)(n, { Identifier(a) { o || a.node.name === e && (o = !0, a.node.name = r); }, ObjectProperty(a) { let l = a.get("key"); l.isIdentifier() && l.node.name === "args" && a.remove(); }, noScope: !0 }), je.types.isArrowFunctionExpression(n.init) || je.types.isCallExpression(n.init)) throw new ye("Creating a new story based on a CSF2 story is not supported"); return (0, je.traverse)(t._ast, { Program(a) { a.pushContainer( "body", je.types.exportNamedDeclaration(je.types.variableDeclaration("const", [n])) ); } }), n; }, "duplicateStoryWithNewName"); // src/core-server/utils/save-story/update-args-in-csf-file.ts var q = require("@storybook/core/babel"); // src/core-server/utils/save-story/valueToAST.ts var _e = require("@storybook/core/babel"); function ti(t) { if (t === null) return _e.types.nullLiteral(); switch (typeof t) { case "function": return _e.parser.parse(t.toString(), { allowReturnOutsideFunction: !0, allowSuperOutsideMethod: !0 }).program.body[0]?.expression; case "number": return _e.types.numericLiteral(t); case "string": return _e.types.stringLiteral(t); case "boolean": return _e.types.booleanLiteral(t); case "undefined": return _e.types.identifier("undefined"); default: return Array.isArray(t) ? _e.types.arrayExpression(t.map(ti)) : _e.types.objectExpression( Object.keys(t).filter((r) => typeof t[r] < "u").map((r) => { let i = t[r]; return _e.types.objectProperty(_e.types.stringLiteral(r), ti(i)); }) ); } } s(ti, "valueToAST"); // src/core-server/utils/save-story/update-args-in-csf-file.ts var fh = /* @__PURE__ */ s(async (t, e) => { let r = !1, i = Object.fromEntries( Object.entries(e).map(([n, o]) => [n, ti(o)]) ); if (q.types.isArrowFunctionExpression(t) || q.types.isCallExpression(t)) throw new ye("Updating a CSF2 story is not supported"); if (q.types.isObjectExpression(t)) { let n = t.properties, o = n.find((a) => { if (q.types.isObjectProperty(a)) { let l = a.key; return q.types.isIdentifier(l) && l.name === "args"; } return !1; }); if (o) { if (q.types.isObjectProperty(o)) { let a = o.value; if (q.types.isObjectExpression(a)) { a.properties.forEach((u) => { if (q.types.isObjectProperty(u)) { let c = u.key; q.types.isIdentifier(c) && c.name in i && (u.value = i[c.name], delete i[c.name]); } }); let l = Object.entries(i); Object.keys(i).length && l.forEach(([u, c]) => { a.properties.push(q.types.objectProperty(q.types.identifier(u), c)); }); } } } else n.unshift( q.types.objectProperty( q.types.identifier("args"), q.types.objectExpression( Object.entries(i).map(([a, l]) => q.types.objectProperty(q.types.identifier(a), l)) ) ) ); return; } (0, q.traverse)(t, { ObjectExpression(n) { if (r) return; r = !0; let a = n.get("properties").find((l) => { if (l.isObjectProperty()) { let u = l.get("key"); return u.isIdentifier() && u.node.name === "args"; } return !1; }); if (a) { if (a.isObjectProperty()) { let l = a.get("value"); if (l.isObjectExpression()) { l.traverse({ ObjectProperty(c) { let p = c.get("key"); p.isIdentifier() && p.node.name in i && (c.get("value").replaceWith(i[p.node.name]), delete i[p.node.name]); }, noScope: !0 }); let u = Object.entries(i); Object.keys(i).length && u.forEach(([c, p]) => { l.pushContainer("properties", q.types.objectProperty(q.types.identifier(c), p)); }); } } } else n.unshiftContainer( "properties", q.types.objectProperty( q.types.identifier("args"), q.types.objectExpression( Object.entries(i).map(([l, u]) => q.types.objectProperty(q.types.identifier(l), u)) ) ) ); }, noScope: !0 }); }, "updateArgsInCsfFile"); // src/core-server/utils/save-story/save-story.ts var Db = /* @__PURE__ */ s((t) => JSON.parse(t, (e, r) => r === "__sb_empty_function_arg__" ? () => { } : r), "parseArgs"), Nb = /* @__PURE__ */ s((t, e) => { let r = "([\\s\\S])", i = "(\\r\\n|\\r|\\n)", n = i + "};" + i, o = new RegExp( // Looks for an export by the given name, considers the first closing brace on its own line // to be the end of the story definition. `^(?${r}*)(?export const ${e} =${r}+?${n})(?${r}*)$` ), { before: a, story: l, after: u } = t.match(o)?.groups || {}; return l ? a + l.replaceAll(/(\r\n|\r|\n)(\r\n|\r|\n)([ \t]*[a-z0-9_]+): /gi, "$2$3:") + u : t; }, "removeExtraNewlines"); function _h(t, e, r) { t.on(it.SAVE_STORY_REQUEST, async ({ id: i, payload: n }) => { let { csfId: o, importPath: a, args: l, name: u } = n, c, p, f, h, E; try { f = (0, ri.basename)(a), h = (0, ri.join)(process.cwd(), a); let m = await (0, ii.readCsf)(h, { makeTitle: /* @__PURE__ */ s((k) => k || "myTitle", "makeTitle") }), x = m.parse(), w = Object.entries(x._stories), [R, N] = o.split("--"); p = u && (0, Xt.storyNameFromExport)(u), c = p && (0, Xt.toId)(R, p); let [C] = w.find(([k, O]) => O.id.endsWith(`--${N}`)) || []; if (!C) throw new ye("Source story not found."); if (u && m.getStoryExport(u)) throw new ye("Story already exists."); E = (0, Xt.storyNameFromExport)(C), await fh( u ? dh(x, C, u) : m.getStoryExport(C), l ? Db(l) : {} ); let W = await (0, gh.formatFileContent)( h, Nb((0, ii.printCsf)(m).code, u || C) ); await Promise.all([ new Promise((k) => { t.on(it.STORY_RENDERED, k), setTimeout(() => k(t.off(it.STORY_RENDERED, k)), 3e3); }), (0, mh.writeFile)(h, W) ]), t.emit(it.SAVE_STORY_RESPONSE, { id: i, success: !0, payload: { csfId: o, newStoryId: c, newStoryName: p, newStoryExportName: u, sourceFileContent: W, sourceFileName: f, sourceStoryName: E, sourceStoryExportName: C }, error: null }); let P = (0, Qt.isExampleStoryId)(c ?? o); !r.disableTelemetry && !P && await (0, Qt.telemetry)("save-story", { action: u ? "createStory" : "updateStory", success: !0 }); } catch (m) { t.emit(it.SAVE_STORY_RESPONSE, { id: i, success: !1, error: m instanceof ye ? m.message : "Unknown error" }), yh.logger.error( `Error writing to ${h}: ${m.stack || m.message || m.toString()}` ), !r.disableTelemetry && !(m instanceof ye) && await (0, Qt.telemetry)("save-story", { action: u ? "createStory" : "updateStory", success: !1, error: m }); } }); } s(_h, "initializeSaveStory"); // src/core-server/utils/server-statics.ts var kh = require("node:fs"), Se = require("node:path"), Zb = require("@storybook/core/common"), Jb = require("@storybook/core/node-logger"), Mh = B(Sh(), 1), eS = B(Lh(), 1), $h = B(Ht(), 1); var qh = /* @__PURE__ */ s(async (t) => { let e = t.lastIndexOf(":"), i = Se.win32.isAbsolute(t) && e === 1, n = e !== -1 && !i ? e : t.length, a = (t.substring(n + 1) || "/").split( Se.sep).join(Se.posix.sep), l = t.substring(0, n), u = (0, Se.isAbsolute)(l) ? l : `./${l}`, c = (0, Se.resolve)(u), p = a.replace(/^\/?/, "./"), f = p.substring(1); if (!(0, kh.existsSync)(c)) throw new Error( $h.dedent` Failed to load static files, no such directory: ${Mh.default.cyan(c)} Make sure this directory exists. ` ); return { staticDir: u, staticPath: c, targetDir: p, targetEndpoint: f }; }, "parseStaticDir"); // src/core-server/utils/whats-new.ts var ym = require("node:fs/promises"), ta = require("@storybook/core/common"), _m = require("@storybook/core/telemetry"), we = require("@storybook/core/core-events"), ur = require("@storybook/core/csf-tools"), ra = require("@storybook/core/node-logger"); // ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js var tS = process.env.NODE_ENV === "production", Fn = "Invariant failed"; function Hn(t, e) { if (!t) { if (tS) throw new Error(Fn); var r = typeof e == "function" ? e() : e, i = r ? "".concat(Fn, ": ").concat(r) : Fn; throw new Error(i); } } s(Hn, "invariant"); // src/core-server/withTelemetry.ts var kt = require("@storybook/core/common"), Mt = require("@storybook/core/telemetry"), ow = require("@storybook/core/node-logger"), gm = B(mm(), 1); var aw = /* @__PURE__ */ s(async () => { if (process.env.CI) return; let { enableCrashReports: t } = await (0, gm.default)({ type: "confirm", name: "enableCrashReports", message: "Would you like to help improve Storybook by sending anonymous crash reports?", initial: !0 }); return await kt.cache.set("enableCrashReports", t), t; }, "promptCrashReports"); async function lw({ cliOptions: t, presetOptions: e, skipPrompt: r }) { if (t.disableTelemetry) return "none"; if (!e) return "full"; let n = await (await (0, kt.loadAllPresets)(e)).apply("core"); if (n?.enableCrashReports !== void 0) return n.enableCrashReports ? "full" : "error"; if (n?.disableTelemetry) return "none"; let o = await kt.cache.get("enableCrashReports") ?? await kt.cache.get("enableCrashreports"); if (o !== void 0) return o ? "full" : "error"; if (r) return "error"; let a = await aw(); return a !== void 0 ? a ? "full" : "error" : "full"; } s(lw, "getErrorLevel"); async function Jo(t, e, r) { try { let i = "error"; try { i = await lw(r); } catch { } if (i !== "none") { let n = await (0, Mt.getPrecedingUpgrade)(), o = t, a; "message" in o ? a = o.message ? (0, Mt.oneWayHash)(o.message) : "EMPTY_MESSAGE" : a = "NO_MESSAGE"; let { code: l, name: u, category: c } = o; await (0, Mt.telemetry)( "error", { code: l, name: u, category: c, eventType: e, precedingUpgrade: n, error: i === "full" ? o : void 0, errorHash: a, // if we ever end up sending a non-error instance, we'd like to know isErrorInstance: o instanceof Error }, { immediate: !0, configDir: r.cliOptions.configDir || r.presetOptions?.configDir, enableCrashReports: i === "full" } ); } } catch { } } s(Jo, "sendTelemetryError"); // src/core-server/utils/whats-new.ts var ea = "whats-new-cache", uw = "https://storybook.js.org/whats-new/v1"; function xm(t, e, r) { t.on(we.SET_WHATS_NEW_CACHE, async (i) => { let n = await e.cache.get(ea).catch((o) => (ra.logger.verbose(o), {})); await e.cache.set(ea, { ...n, ...i }); }), t.on(we.REQUEST_WHATS_NEW_DATA, async () => { try { let i = await fetch(uw).then(async (c) => { if (c.ok) return c.json(); throw c; }), n = (0, ta.findConfigFile)("main", e.configDir); if (!n) throw new Error(`unable to find storybook main file in ${e.configDir}`); let a = (await (0, ur.readConfig)(n)).getFieldValue([ "core", "disableWhatsNewNotifications" ]), l = await e.cache.get(ea) ?? {}, u = { ...i, status: "SUCCESS", postIsRead: i.url === l.lastReadPost, showNotification: i.url !== l.lastDismissedPost && i.url !== l.lastReadPost, disableWhatsNewNotifications: a }; t.emit(we.RESULT_WHATS_NEW_DATA, { data: u }); } catch (i) { ra.logger.verbose(i instanceof Error ? i.message : String(i)), t.emit(we.RESULT_WHATS_NEW_DATA, { data: { status: "ERROR" } }); } }), t.on( we.TOGGLE_WHATS_NEW_NOTIFICATIONS, async ({ disableWhatsNewNotifications: i }) => { let n = r.disableTelemetry !== !0; try { let o = (0, ta.findConfigFile)("main", e.configDir); Hn(o, `unable to find storybook main file in ${e.configDir}`); let a = await (0, ur.readConfig)(o); a.setFieldValue(["core", "disableWhatsNewNotifications"], i), await (0, ym.writeFile)(o, (0, ur.printConfig)(a).code), n && await (0, _m.telemetry)( "core-config", { disableWhatsNewNotifications: i }); } catch (o) { Hn(o instanceof Error), n && await Jo(o, "core-config", { cliOptions: e, presetOptions: { ...e, corePresets: [], overridePresets: [] }, skipPrompt: !0 }); } } ), t.on(we.TELEMETRY_ERROR, async (i) => { r.disableTelemetry !== !0 && await Jo(i, "browser", { cliOptions: e, presetOptions: { ...e, corePresets: [], overridePresets: [] }, skipPrompt: !0 }); }); } s(xm, "initializeWhatsNew"); // src/core-server/presets/common-preset.ts var cw = /* @__PURE__ */ s((t, e = {}) => Object.entries(e).reduce((r, [i, n]) => r.replace(new RegExp(`%${i}%`, "g"), n), t), "interpolate"), bm = (0, pe.join)( (0, pe.dirname)(require.resolve("@storybook/core/package.json")), "/assets/browser/favicon.svg" ), hw = /* @__PURE__ */ s(async (t = []) => [ ...ph, ...t ], "staticDirs"), pw = /* @__PURE__ */ s(async (t, e) => { if (t) return t; let r = await e.presets.apply("staticDirs"), i = r ? r.map((n) => typeof n == "string" ? n : `${n.from}:${n.to}`) : []; if (i && i.length > 0) { let o = (await Promise.all( i.map(async (a) => { let l = [], u = r && !(0, pe.isAbsolute)(a) ? (0, Re.getDirectoryFromWorkingDir)({ configDir: e.configDir, workingDir: process.cwd(), directory: a }) : a, { staticPath: c, targetEndpoint: p } = await qh(u); if (p === "/") { let h = (0, pe.join)(c, "favicon.svg"); (0, Ei.existsSync)(h) && l.push(h); } if (p === "/") { let h = (0, pe.join)(c, "favicon.ico"); (0, Ei.existsSync)(h) && l.push(h); } return l; }) )).reduce((a, l) => a.concat(l), []); return o.length > 1 && vm.logger.warn(wm.dedent` Looks like multiple favicons were detected. Using the first one. ${o.join(", ")} `), o[0] || bm; } return bm; }, "favicon"), dw = /* @__PURE__ */ s(async (t, e) => { let { presets: r } = e, i = await r.apply("babelDefault", {}, e) ?? {}; return { ...i, // This override makes sure that we will never transpile babel further down then the browsers that storybook supports. // This is needed to support the mount property of the context described here: // https://storybook.js.org/docs/writing-tests/interaction-testing#run-code-before-each-test overrides: [ ...i?.overrides ?? [], { include: /\.(story|stories)\.[cm]?[jt]sx?$/, presets: [ [ "@babel/preset-env", { bugfixes: !0, targets: { // This is the same browser supports that we use to bundle our manager and preview code. chrome: 100, safari: 15, firefox: 91 } } ] ] } ] }; }, "babel"), fw = /* @__PURE__ */ s((t, e) => t || e.packageJson?.name || !1, "title"), mw = /* @__PURE__ */ s((t, e) => t || e.loglevel || "\ info", "logLevel"), gw = /* @__PURE__ */ s(async (t, { configDir: e, presets: r }) => { let i = await r.apply("env"); return (0, Re.getPreviewHeadTemplate)(e, i); }, "previewHead"), yw = /* @__PURE__ */ s(async () => (0, Re.loadEnvs)({ production: !0 }).raw, "env"), _w = /* @__PURE__ */ s(async (t, { configDir: e, presets: r }) => { let i = await r.apply("env"); return (0, Re.getPreviewBodyTemplate)(e, i); }, "previewBody"), xw = /* @__PURE__ */ s(() => ({ check: !1, // 'react-docgen' faster than `react-docgen-typescript` but produces lower quality results reactDocgen: "react-docgen", reactDocgenTypescriptOptions: { shouldExtractLiteralValuesFromEnum: !0, shouldRemoveUndefinedFromOptional: !0, propFilter: /* @__PURE__ */ s((t) => t.parent ? !/node_modules/.test(t.parent.fileName) : !0, "propFilter"), // NOTE: this default cannot be changed savePropValueAsString: !0 } }), "typescript"), bw = /* @__PURE__ */ s((t) => { if (t !== void 0) { if (t.toUpperCase() === "FALSE") return !1; if (t.toUpperCase() === "TRUE" || typeof t == "string") return !0; } }, "optionalEnvToBoolean"), Sw = /* @__PURE__ */ s((t, e) => { let r = Re.removeAddon; return e.disableTelemetry || (r = /* @__PURE__ */ s(async (i, n) => (await (0, $t.telemetry)("remove", { addon: i, source: "api" }), (0, Re.removeAddon)( i, n)), "removeAddon")), { ...t, removeAddon: r }; }, "experimental_serverAPI"), Ew = /* @__PURE__ */ s(async (t, e) => ({ ...t, disableTelemetry: e.disableTelemetry === !0 || e.test === !0, enableCrashReports: e.enableCrashReports || bw(process.env.STORYBOOK_ENABLE_CRASH_REPORTS) }), "core"), vw = /* @__PURE__ */ s(async (t) => ({ ...t, argTypeTargetsV7: !0, legacyDecoratorFileOrder: !1, disallowImplicitActionsInRenderV8: !0 }), "features"), Rm = { test: /(stories|story)\.(m?js|ts)x?$/, createIndex: /* @__PURE__ */ s(async (t, e) => (await (0, Em.readCsf)(t, e)).parse().indexInputs, "createIndex") }, ww = /* @__PURE__ */ s((t) => [Rm].concat(t || []), "experimental_indexers"), Rw = /* @__PURE__ */ s(async (t, e) => { let r = await e.presets.apply("framework"); return typeof r == "string" ? {} : typeof r > "u" ? null : r.options; }, "frameworkOptions"), Tw = /* @__PURE__ */ s((t, { docs: e }) => t && e !== void 0 ? { ...t, docsMode: e } : t, "docs"), Aw = /* @__PURE__ */ s(async (t, e) => { let r = (0, pe.join)(e.configDir, "manager-head.html"); if ((0, Ei.existsSync)(r)) { let i = (0, Sm.readFile)(r, { encoding: "utf8" }), n = e.presets.apply("env"); return cw(await i, await n); } return ""; }, "managerHead"), Pw = /* @__PURE__ */ s(async (t, e) => { let r = await e.presets.apply("core"); return xm(t, e, r), _h(t, e, r), hh(t, e, r), Aa(t, e, r), e.disableTelemetry || (t.on( la, async (i) => { await (0, $t.telemetry)("testing-module-watch-mode", { provider: i.providerId, watchMode: i.watchMode }); } ), t.on( aa, async (i) => { (i.status === "success" || i.status === "cancelled") && i.progress?.finishedAt && await (0, $t.telemetry)("testing-module-completed-re\ port", { provider: i.providerId, duration: i.progress.finishedAt - i.progress.startedAt, numTotalTests: i.progress.numTotalTests, numFailedTests: i.progress.numFailedTests, numPassedTests: i.progress.numPassedTests, status: i.status }), i.status === "failed" && await (0, $t.telemetry)("testing-module-completed-report", { provider: i.providerId, status: "failed", ...e.enableCrashReports && { error: ha(i.error) } }); } ), t.on(oa, async (i) => { await (0, $t.telemetry)("testing-module-crash-report", { provider: i.providerId, ...e.enableCrashReports && { error: Ri(i.error.message) } }); })), t; }, "experimental_serverChannel"), Ow = /* @__PURE__ */ s(async (t) => { try { return { ...t, react: (0, pe.dirname)(require.resolve("react/package.json")), reactDom: (0, pe.dirname)(require.resolve("react-dom/package.json")) }; } catch { return t; } }, "resolvedReact"), Cw = /* @__PURE__ */ s(async (t) => ({ ...t, "dev-only": { excludeFromDocsStories: !0 }, "docs-only": { excludeFromSidebar: !0 }, "test-only": { excludeFromSidebar: !0, excludeFromDocsStories: !0 } }), "tags"), Iw = /* @__PURE__ */ s(async (t, e) => [ (0, pe.join)( (0, pe.dirname)(require.resolve("@storybook/core/package.json")), "dist/core-server/presets/common-manager.js" ), ...t || [] ], "managerEntries");