UNPKG

storybook

Version:

Storybook framework-agnostic API

1,252 lines (1,218 loc) • 366 kB
"use strict"; var o0 = Object.create; var Bt = Object.defineProperty; var D0 = Object.getOwnPropertyDescriptor; var a0 = Object.getOwnPropertyNames; var l0 = Object.getPrototypeOf, h0 = Object.prototype.hasOwnProperty; var s = (t, e) => Bt(t, "name", { value: e, configurable: !0 }); var _n = (t, e) => () => (t && (e = t(t = 0)), e); var c = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), wt = (t, e) => { for (var r in e) Bt(t, r, { get: e[r], enumerable: !0 }); }, In = (t, e, r, u) => { if (e && typeof e == "object" || typeof e == "function") for (let n of a0(e)) !h0.call(t, n) && n !== r && Bt(t, n, { get: () => e[n], enumerable: !(u = D0(e, n)) || u.enumerable }); return t; }; var v = (t, e, r) => (r = t != null ? o0(l0(t)) : {}, In( // 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 ? Bt(r, "default", { value: t, enumerable: !0 }) : r, t )), Ln = (t) => In(Bt({}, "__esModule", { value: !0 }), t); // ../node_modules/are-we-there-yet/lib/tracker-base.js var bu = c((nE, kn) => { "use strict"; var c0 = require("events"), d0 = 0, Eu = class extends c0 { static { s(this, "TrackerBase"); } constructor(e) { super(), this.id = ++d0, this.name = e; } }; kn.exports = Eu; }); // ../node_modules/are-we-there-yet/lib/tracker.js var ar = c((DE, Pn) => { "use strict"; var f0 = bu(), xu = class extends f0 { static { s(this, "Tracker"); } constructor(e, r) { super(e), this.workDone = 0, this.workTodo = r || 0; } completed() { return this.workTodo === 0 ? 0 : this.workDone / this.workTodo; } addWork(e) { this.workTodo += e, this.emit("change", this.name, this.completed(), this); } completeWork(e) { this.workDone += e, this.workDone > this.workTodo && (this.workDone = this.workTodo), this.emit("change", this.name, this.completed(), this); } finish() { this.workTodo = this.workDone = 1, this.emit("change", this.name, 1, this); } }; Pn.exports = xu; }); // ../node_modules/are-we-there-yet/lib/tracker-stream.js var yu = c((lE, Mn) => { "use strict"; var p0 = require("stream"), m0 = ar(), vu = class extends p0.Transform { static { s(this, "TrackerStream"); } constructor(e, r, u) { super(u), this.tracker = new m0(e, r), this.name = e, this.id = this.tracker.id, this.tracker.on("change", this.trackerChange.bind(this)); } trackerChange(e, r) { this.emit("change", e, r, this); } _transform(e, r, u) { this.tracker.completeWork(e.length ? e.length : 1), this.push(e), u(); } _flush(e) { this.tracker.finish(), e(); } completed() { return this.tracker.completed(); } addWork(e) { return this.tracker.addWork(e); } finish() { return this.tracker.finish(); } }; Mn.exports = vu; }); // ../node_modules/are-we-there-yet/lib/tracker-group.js var Nn = c((cE, qn) => { "use strict"; var g0 = bu(), Rn = ar(), F0 = yu(), Bu = class t extends g0 { static { s(this, "TrackerGroup"); } parentGroup = null; trackers = []; completion = {}; weight = {}; totalWeight = 0; finished = !1; bubbleChange = C0(this); nameInTree() { for (var e = [], r = this; r; ) e.unshift(r.name), r = r.parentGroup; return e.join("/"); } addUnit(e, r) { if (e.addUnit) { for (var u = this; u; ) { if (e === u) throw new Error( "Attempted to add tracker group " + e.name + " to tree that already includes it " + this.nameInTree(this) ); u = u.parentGroup; } e.parentGroup = this; } return this.weight[e.id] = r || 1, this.totalWeight += this.weight[e.id], this.trackers.push(e), this.completion[e.id] = e.completed(), e.on("change", this.bubbleChange), this.finished || this.emit("change", e.name, this.completion[e.id], e), e; } completed() { if (this.trackers.length === 0) return 0; for (var e = 1 / this.totalWeight, r = 0, u = 0; u < this.trackers.length; u++) { var n = this.trackers[u].id; r += e * this.weight[n] * this.completion[n]; } return r; } newGroup(e, r) { return this.addUnit(new t(e), r); } newItem(e, r, u) { return this.addUnit(new Rn(e, r), u); } newStream(e, r, u) { return this.addUnit(new F0(e, r), u); } finish() { this.finished = !0, this.trackers.length || this.addUnit(new Rn(), 1, !0); for (var e = 0; e < this.trackers.length; e++) { var r = this.trackers[e]; r.finish(), r.removeListener("change", this.bubbleChange); } this.emit("change", this.name, 1, this); } debug(e = 0) { let r = " ".repeat(e), u = `${r}${this.name || "top"}: ${this.completed()} `; return this.trackers.forEach(function(n) { u += n instanceof t ? n.debug(e + 1) : `${r} ${n.name}: ${n.completed()} `; }), u; } }; function C0(t) { return function(e, r, u) { t.completion[u.id] = r, !t.finished && t.emit("change", e || t.name, t.completed(), t); }; } s(C0, "bubbleChange"); qn.exports = Bu; }); // ../node_modules/are-we-there-yet/lib/index.js var jn = c((lr) => { "use strict"; lr.TrackerGroup = Nn(); lr.Tracker = ar(); lr.TrackerStream = yu(); }); // ../node_modules/console-control-strings/index.js var hr = c((q) => { "use strict"; var Y = "\x1B["; q.up = /* @__PURE__ */ s(function(e) { return Y + (e || "") + "A"; }, "up"); q.down = /* @__PURE__ */ s(function(e) { return Y + (e || "") + "B"; }, "down"); q.forward = /* @__PURE__ */ s(function(e) { return Y + (e || "") + "C"; }, "forward"); q.back = /* @__PURE__ */ s(function(e) { return Y + (e || "") + "D"; }, "back"); q.nextLine = /* @__PURE__ */ s(function(e) { return Y + (e || "") + "E"; }, "nextLine"); q.previousLine = /* @__PURE__ */ s(function(e) { return Y + (e || "") + "F"; }, "previousLine"); q.horizontalAbsolute = /* @__PURE__ */ s(function(e) { if (e == null) throw new Error("horizontalAboslute requires a column to position to"); return Y + e + "G"; }, "horizontalAbsolute"); q.eraseData = /* @__PURE__ */ s(function() { return Y + "J"; }, "eraseData"); q.eraseLine = /* @__PURE__ */ s(function() { return Y + "K"; }, "eraseLine"); q.goto = function(t, e) { return Y + e + ";" + t + "H"; }; q.gotoSOL = function() { return "\r"; }; q.beep = function() { return "\x07"; }; q.hideCursor = /* @__PURE__ */ s(function() { return Y + "?25l"; }, "hideCursor"); q.showCursor = /* @__PURE__ */ s(function() { return Y + "?25h"; }, "showCursor"); var Gn = { reset: 0, // styles bold: 1, italic: 3, underline: 4, inverse: 7, // resets stopBold: 22, stopItalic: 23, stopUnderline: 24, stopInverse: 27, // colors white: 37, black: 30, blue: 34, cyan: 36, green: 32, magenta: 35, red: 31, yellow: 33, bgWhite: 47, bgBlack: 40, bgBlue: 44, bgCyan: 46, bgGreen: 42, bgMagenta: 45, bgRed: 41, bgYellow: 43, grey: 90, brightBlack: 90, brightRed: 91, brightGreen: 92, brightYellow: 93, brightBlue: 94, brightMagenta: 95, brightCyan: 96, brightWhite: 97, bgGrey: 100, bgBrightBlack: 100, bgBrightRed: 101, bgBrightGreen: 102, bgBrightYellow: 103, bgBrightBlue: 104, bgBrightMagenta: 105, bgBrightCyan: 106, bgBrightWhite: 107 }; q.color = /* @__PURE__ */ s(function(e) { return (arguments.length !== 1 || !Array.isArray(e)) && (e = Array.prototype.slice.call(arguments)), Y + e.map(E0).join(";") + "m"; }, "color"); function E0(t) { if (Gn[t] != null) return Gn[t]; throw new Error("Unknown color or style name: " + t); } s(E0, "colorNameToCode"); }); // ../node_modules/string-width/node_modules/ansi-regex/index.js var Vn = c((gE, Wn) => { "use strict"; Wn.exports = ({ onlyFirst: t = !1 } = {}) => { let e = [ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))" ].join("|"); return new RegExp(e, t ? void 0 : "g"); }; }); // ../node_modules/string-width/node_modules/strip-ansi/index.js var Yn = c((FE, Un) => { "use strict"; var b0 = Vn(); Un.exports = (t) => typeof t == "string" ? t.replace(b0(), "") : t; }); // ../node_modules/is-fullwidth-code-point/index.js var zn = c((CE, wu) => { "use strict"; var Hn = /* @__PURE__ */ s((t) => Number.isNaN(t) ? !1 : t >= 4352 && (t <= 4447 || // Hangul Jamo t === 9001 || // LEFT-POINTING ANGLE BRACKET t === 9002 || // RIGHT-POINTING ANGLE BRACKET // CJK Radicals Supplement .. Enclosed CJK Letters and Months 11904 <= t && t <= 12871 && t !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A 12880 <= t && t <= 19903 || // CJK Unified Ideographs .. Yi Radicals 19968 <= t && t <= 42182 || // Hangul Jamo Extended-A 43360 <= t && t <= 43388 || // Hangul Syllables 44032 <= t && t <= 55203 || // CJK Compatibility Ideographs 63744 <= t && t <= 64255 || // Vertical Forms 65040 <= t && t <= 65049 || // CJK Compatibility Forms .. Small Form Variants 65072 <= t && t <= 65131 || // Halfwidth and Fullwidth Forms 65281 <= t && t <= 65376 || 65504 <= t && t <= 65510 || // Kana Supplement 110592 <= t && t <= 110593 || // Enclosed Ideographic Supplement 127488 <= t && t <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane 131072 <= t && t <= 262141), "isFullwidthCodePoint"); wu.exports = Hn; wu.exports.default = Hn; }); // ../node_modules/string-width/node_modules/emoji-regex/index.js var Zn = c((bE, Kn) => { "use strict"; Kn.exports = function() { return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; }; }); // ../node_modules/string-width/index.js var Ke = c((xE, Au) => { "use strict"; var x0 = Yn(), v0 = zn(), y0 = Zn(), Jn = /* @__PURE__ */ s((t) => { if (typeof t != "string" || t.length === 0 || (t = x0(t), t.length === 0)) return 0; t = t.replace(y0(), " "); let e = 0; for (let r = 0; r < t.length; r++) { let u = t.codePointAt(r); u <= 31 || u >= 127 && u <= 159 || u >= 768 && u <= 879 || (u > 65535 && r++, e += v0(u) ? 2 : 1); } return e; }, "stringWidth"); Au.exports = Jn; Au.exports.default = Jn; }); // ../node_modules/wide-align/align.js var Xn = c((dr) => { "use strict"; var Su = Ke(); dr.center = A0; dr.left = B0; dr.right = w0; function cr(t) { var e = "", r = " ", u = t; do u % 2 && (e += r), u = Math.floor(u / 2), r += r; while (u); return e; } s(cr, "createPadding"); function B0(t, e) { var r = t.trimRight(); if (r.length === 0 && t.length >= e) return t; var u = "", n = Su(r); return n < e && (u = cr(e - n)), r + u; } s(B0, "alignLeft"); function w0(t, e) { var r = t.trimLeft(); if (r.length === 0 && t.length >= e) return t; var u = "", n = Su(r); return n < e && (u = cr(e - n)), u + r; } s(w0, "alignRight"); function A0(t, e) { var r = t.trim(); if (r.length === 0 && t.length >= e) return t; var u = "", n = "", o = Su(r); if (o < e) { var i = parseInt((e - o) / 2, 10); u = cr(i), n = cr(e - (o + i)); } return u + r + n; } s(A0, "alignCenter"); }); // ../node_modules/aproba/index.js var pr = c((wE, uo) => { "use strict"; uo.exports = to; function S0(t) { return t != null && typeof t == "object" && t.hasOwnProperty("callee"); } s(S0, "isArguments"); var ie = { "*": { label: "any", check: /* @__PURE__ */ s(() => !0, "check") }, A: { label: "array", check: /* @__PURE__ */ s((t) => Array.isArray(t) || S0(t), "check") }, S: { label: "string", check: /* @__PURE__ */ s((t) => typeof t == "string", "check") }, N: { label: "number", check: /* @__PURE__ */ s((t) => typeof t == "number", "check") }, F: { label: "function", check: /* @__PURE__ */ s((t) => typeof t == "function", "check") }, O: { label: "object", check: /* @__PURE__ */ s((t) => typeof t == "object" && t != null && !ie.A.check(t) && !ie.E.check(t), "check") }, B: { label: "boolean", check: /* @__PURE__ */ s((t) => typeof t == "boolean", "check") }, E: { label: "error", check: /* @__PURE__ */ s((t) => t instanceof Error, "check") }, Z: { label: "null", check: /* @__PURE__ */ s((t) => t == null, "check") } }; function fr(t, e) { let r = e[t.length] = e[t.length] || []; r.indexOf(t) === -1 && r.push(t); } s(fr, "addSchema"); function to(t, e) { if (arguments.length !== 2) throw eo(["SA"], arguments.length); if (!t) throw Qn(0, "rawSchemas"); if (!e) throw Qn(1, "args"); if (!ie.S.check(t)) throw Tu(0, ["string"], t); if (!ie.A.check(e)) throw Tu(1, ["array"], e); let r = t.split("|"), u = {}; r.forEach((o) => { for (let i = 0; i < o.length; ++i) { let D = o[i]; if (!ie[D]) throw T0(i, D); } if (/E.*E/.test(o)) throw $0(o); fr(o, u), /E/.test(o) && (fr(o.replace(/E.*$/, "E"), u), fr(o.replace(/E/, "Z"), u), o.length === 1 && fr("", u)); }); let n = u[e.length]; if (!n) throw eo(Object.keys(u), e.length); for (let o = 0; o < e.length; ++o) { let i = n.filter((D) => { let a = D[o], l = ie[a].check; return l(e[o]); }); if (!i.length) { let D = n.map((a) => ie[a[o]].label).filter((a) => a != null); throw Tu(o, D, e[o]); } n = i; } } s(to, "validate"); function Qn(t) { return At("EMISSINGARG", "Missing required argument #" + (t + 1)); } s(Qn, "missingRequiredArg"); function T0(t, e) { return At("EUNKNOWNTYPE", "Unknown type " + e + " in argument #" + (t + 1)); } s(T0, "unknownType"); function Tu(t, e, r) { let u; return Object.keys(ie).forEach((n) => { ie[n].check(r) && (u = ie[n].label); }), At("EINVALIDTYPE", "Argument #" + (t + 1) + ": Expected " + ro(e) + " but got " + u); } s(Tu, "invalidType"); function ro(t) { return t.join(", ").replace(/, ([^,]+)$/, " or $1"); } s(ro, "englishList"); function eo(t, e) { let r = ro(t), u = t.every((n) => n.length === 1) ? "argument" : "arguments"; return At("EWRONGARGCOUNT", "Expected " + r + " " + u + " but got " + e); } s(eo, "wrongNumberOfArgs"); function $0(t) { return At( "ETOOMANYERRORTYPES", 'Only one error type per argument signature is allowed, more than one found in "' + t + '"' ); } s($0, "moreThanOneError"); function At(t, e) { let r = new Error(e); return r.code = t, Error.captureStackTrace && Error.captureStackTrace(r, to), r; } s(At, "newException"); }); // ../node_modules/gauge/node_modules/ansi-regex/index.js var so = c((SE, io) => { "use strict"; io.exports = ({ onlyFirst: t = !1 } = {}) => { let e = [ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))" ].join("|"); return new RegExp(e, t ? void 0 : "g"); }; }); // ../node_modules/gauge/node_modules/strip-ansi/index.js var oo = c((TE, no) => { "use strict"; var O0 = so(); no.exports = (t) => typeof t == "string" ? t.replace(O0(), "") : t; }); // ../node_modules/gauge/lib/wide-truncate.js var Ou = c(($E, Do) => { "use strict"; var $u = Ke(), _0 = oo(); Do.exports = I0; function I0(t, e) { if ($u(t) === 0) return t; if (e <= 0) return ""; if ($u(t) <= e) return t; for (var r = _0(t), u = t.length + r.length, n = t.slice(0, e + u); $u(n) > e; ) n = n.slice(0, -1); return n; } s(I0, "wideTruncate"); }); // ../node_modules/gauge/lib/error.js var ao = c((mr) => { "use strict"; var L0 = require("util"), k0 = mr.User = /* @__PURE__ */ s(function t(e) { var r = new Error(e); return Error.captureStackTrace(r, t), r.code = "EGAUGE", r; }, "User"); mr.MissingTemplateValue = /* @__PURE__ */ s(function t(e, r) { var u = new k0(L0.format('Missing template value "%s"', e.type)); return Error.captureStackTrace(u, t), u.template = e, u.values = r, u; }, "MissingTemplateValue"); mr.Internal = /* @__PURE__ */ s(function t(e) { var r = new Error(e); return Error.captureStackTrace(r, t), r.code = "EGAUGEINTERNAL", r; }, "Internal"); }); // ../node_modules/gauge/lib/template-item.js var ho = c((LE, lo) => { "use strict"; var P0 = Ke(); lo.exports = Ze; function _u(t) { return typeof t != "string" ? !1 : t.slice(-1) === "%"; } s(_u, "isPercent"); function Iu(t) { return Number(t.slice(0, -1)) / 100; } s(Iu, "percent"); function Ze(t, e) { if (this.overallOutputLength = e, this.finished = !1, this.type = null, this.value = null, this.length = null, this.maxLength = null, this. minLength = null, this.kerning = null, this.align = "left", this.padLeft = 0, this.padRight = 0, this.index = null, this.first = null, this. last = null, typeof t == "string") this.value = t; else for (var r in t) this[r] = t[r]; return _u(this.length) && (this.length = Math.round(this.overallOutputLength * Iu(this.length))), _u(this.minLength) && (this.minLength = Math.round(this.overallOutputLength * Iu(this.minLength))), _u(this.maxLength) && (this.maxLength = Math.round(this.overallOutputLength * Iu(this.maxLength))), this; } s(Ze, "TemplateItem"); Ze.prototype = {}; Ze.prototype.getBaseLength = function() { var t = this.length; return t == null && typeof this.value == "string" && this.maxLength == null && this.minLength == null && (t = P0(this.value)), t; }; Ze.prototype.getLength = function() { var t = this.getBaseLength(); return t == null ? null : t + this.padLeft + this.padRight; }; Ze.prototype.getMaxLength = function() { return this.maxLength == null ? null : this.maxLength + this.padLeft + this.padRight; }; Ze.prototype.getMinLength = function() { return this.minLength == null ? null : this.minLength + this.padLeft + this.padRight; }; }); // ../node_modules/gauge/lib/render-template.js var Lu = c((PE, mo) => { "use strict"; var St = Xn(), M0 = pr(), co = Ou(), Je = ao(), R0 = ho(); function q0(t) { return function(e) { return U0(e, t); }; } s(q0, "renderValueWithValues"); var N0 = mo.exports = function(t, e, r) { var u = W0(t, e, r), n = u.map(q0(r)).join(""); return St.left(co(n, t), t); }; function fo(t) { var e = t.type[0].toUpperCase() + t.type.slice(1); return "pre" + e; } s(fo, "preType"); function po(t) { var e = t.type[0].toUpperCase() + t.type.slice(1); return "post" + e; } s(po, "postType"); function j0(t, e) { if (t.type) return e[fo(t)] || e[po(t)]; } s(j0, "hasPreOrPost"); function G0(t, e) { var r = Object.assign({}, t), u = Object.create(e), n = [], o = fo(r), i = po(r); return u[o] && (n.push({ value: u[o] }), u[o] = null), r.minLength = null, r.length = null, r.maxLength = null, n.push(r), u[r.type] = u[r. type], u[i] && (n.push({ value: u[i] }), u[i] = null), function(D, a, l) { return N0(l, n, u); }; } s(G0, "generatePreAndPost"); function W0(t, e, r) { function u(d, m, g) { var F = new R0(d, t), E = F.type; if (F.value == null) if (E in r) F.value = r[E]; else { if (F.default == null) throw new Je.MissingTemplateValue(F, r); F.value = F.default; } return F.value == null || F.value === "" ? null : (F.index = m, F.first = m === 0, F.last = m === g.length - 1, j0(F, r) && (F.value = G0(F, r)), F); } s(u, "cloneAndObjectify"); var n = e.map(u).filter(function(d) { return d != null; }), o = t, i = n.length; function D(d) { d > o && (d = o), o -= d; } s(D, "consumeSpace"); function a(d, m) { if (d.finished) throw new Je.Internal("Tried to finish template item that was already finished"); if (m === 1 / 0) throw new Je.Internal("Length of template item cannot be infinity"); if (m != null && (d.length = m), d.minLength = null, d.maxLength = null, --i, d.finished = !0, d.length == null && (d.length = d.getBaseLength()), d.length == null) throw new Je.Internal("Finished template items must have a length"); D(d.getLength()); } s(a, "finishSizing"), n.forEach(function(d) { if (d.kerning) { var m = d.first ? 0 : n[d.index - 1].padRight; !d.first && m < d.kerning && (d.padLeft = d.kerning - m), d.last || (d.padRight = d.kerning); } }), n.forEach(function(d) { d.getBaseLength() != null && a(d); }); var l = 0, h, p; do h = !1, p = Math.round(o / i), n.forEach(function(d) { d.finished || d.maxLength && d.getMaxLength() < p && (a(d, d.maxLength), h = !0); }); while (h && l++ < n.length); if (h) throw new Je.Internal("Resize loop iterated too many times while determining maxLength"); l = 0; do h = !1, p = Math.round(o / i), n.forEach(function(d) { d.finished || d.minLength && d.getMinLength() >= p && (a(d, d.minLength), h = !0); }); while (h && l++ < n.length); if (h) throw new Je.Internal("Resize loop iterated too many times while determining minLength"); return p = Math.round(o / i), n.forEach(function(d) { d.finished || a(d, p); }), n; } s(W0, "prepareItems"); function V0(t, e, r) { return M0("OON", arguments), t.type ? t.value(e, e[t.type + "Theme"] || {}, r) : t.value(e, {}, r); } s(V0, "renderFunction"); function U0(t, e) { var r = t.getBaseLength(), u = typeof t.value == "function" ? V0(t, e, r) : t.value; if (u == null || u === "") return ""; var n = St[t.align] || St.left, o = t.padLeft ? St.left("", t.padLeft) : "", i = t.padRight ? St.right("", t.padRight) : "", D = co(String( u), r), a = n(D, r); return o + a + i; } s(U0, "renderValue"); }); // ../node_modules/gauge/lib/plumbing.js var Fo = c((RE, go) => { "use strict"; var ke = hr(), Y0 = Lu(), gr = pr(), Ee = go.exports = function(t, e, r) { r || (r = 80), gr("OAN", [t, e, r]), this.showing = !1, this.theme = t, this.width = r, this.template = e; }; Ee.prototype = {}; Ee.prototype.setTheme = function(t) { gr("O", [t]), this.theme = t; }; Ee.prototype.setTemplate = function(t) { gr("A", [t]), this.template = t; }; Ee.prototype.setWidth = function(t) { gr("N", [t]), this.width = t; }; Ee.prototype.hide = function() { return ke.gotoSOL() + ke.eraseLine(); }; Ee.prototype.hideCursor = ke.hideCursor; Ee.prototype.showCursor = ke.showCursor; Ee.prototype.show = function(t) { var e = Object.create(this.theme); for (var r in t) e[r] = t[r]; return Y0(this.width, this.template, e).trim() + ke.color("reset") + ke.eraseLine() + ke.gotoSOL(); }; }); // ../node_modules/has-unicode/index.js var Eo = c((NE, Co) => { "use strict"; var H0 = require("os"), qE = Co.exports = function() { if (H0.type() == "Windows_NT") return !1; var t = /UTF-?8$/i, e = process.env.LC_ALL || process.env.LC_CTYPE || process.env.LANG; return t.test(e); }; }); // ../node_modules/color-support/index.js var vo = c((jE, xo) => { xo.exports = bo({ alwaysReturn: !0 }, bo); function Xe(t, e) { return t.level = 0, t.hasBasic = !1, t.has256 = !1, t.has16m = !1, e.alwaysReturn ? t : !1; } s(Xe, "hasNone"); function Fr(t) { return t.hasBasic = !0, t.has256 = !1, t.has16m = !1, t.level = 1, t; } s(Fr, "hasBasic"); function Qe(t) { return t.hasBasic = !0, t.has256 = !0, t.has16m = !1, t.level = 2, t; } s(Qe, "has256"); function Cr(t) { return t.hasBasic = !0, t.has256 = !0, t.has16m = !0, t.level = 3, t; } s(Cr, "has16m"); function bo(t, e) { if (t = t || {}, e = e || {}, typeof t.level == "number") switch (t.level) { case 0: return Xe(e, t); case 1: return Fr(e); case 2: return Qe(e); case 3: return Cr(e); } if (e.level = 0, e.hasBasic = !1, e.has256 = !1, e.has16m = !1, typeof process > "u" || !process || !process.stdout || !process.env || !process. platform) return Xe(e, t); var r = t.env || process.env, u = t.stream || process.stdout, n = t.term || r.TERM || "", o = t.platform || process.platform; if (!t.ignoreTTY && !u.isTTY || !t.ignoreDumb && n === "dumb" && !r.COLORTERM) return Xe(e, t); if (o === "win32") return Fr(e); if (r.TMUX) return Qe(e); if (!t.ignoreCI && (r.CI || r.TEAMCITY_VERSION)) return r.TRAVIS ? Qe(e) : Xe(e, t); switch (r.TERM_PROGRAM) { case "iTerm.app": var i = r.TERM_PROGRAM_VERSION || "0."; return /^[0-2]\./.test(i) ? Qe(e) : Cr(e); case "HyperTerm": case "Hyper": return Cr(e); case "MacTerm": return Cr(e); case "Apple_Terminal": return Qe(e); } return /^xterm-256/.test(n) ? Qe(e) : /^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(n) || r.COLORTERM ? Fr(e) : Xe(e, t); } s(bo, "colorSupport"); }); // ../node_modules/gauge/lib/has-color.js var Bo = c((WE, yo) => { "use strict"; var z0 = vo(); yo.exports = z0().hasBasic; }); // ../node_modules/gauge/node_modules/signal-exit/dist/mjs/signals.js var be, wo = _n(() => { be = []; be.push("SIGHUP", "SIGINT", "SIGTERM"); process.platform !== "win32" && be.push( "SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT" // should detect profiler and enable/disable accordingly. // see #21 // 'SIGPROF' ); process.platform === "linux" && be.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT"); }); // ../node_modules/gauge/node_modules/signal-exit/dist/mjs/index.js var Ao = {}; wt(Ao, { load: () => X0, onExit: () => J0, signals: () => be, unload: () => Q0 }); var Er, ku, Pu, K0, Mu, br, Z0, Ru, qu, Nu, J0, X0, Q0, So = _n(() => { wo(); Er = /* @__PURE__ */ s((t) => !!t && typeof t == "object" && typeof t.removeListener == "function" && typeof t.emit == "function" && typeof t. reallyExit == "function" && typeof t.listeners == "function" && typeof t.kill == "function" && typeof t.pid == "number" && typeof t.on == "\ function", "processOk"), ku = Symbol.for("signal-exit emitter"), Pu = globalThis, K0 = Object.defineProperty.bind(Object), Mu = class { static { s(this, "Emitter"); } emitted = { afterExit: !1, exit: !1 }; listeners = { afterExit: [], exit: [] }; count = 0; id = Math.random(); constructor() { if (Pu[ku]) return Pu[ku]; K0(Pu, ku, { value: this, writable: !1, enumerable: !1, configurable: !1 }); } on(e, r) { this.listeners[e].push(r); } removeListener(e, r) { let u = this.listeners[e], n = u.indexOf(r); n !== -1 && (n === 0 && u.length === 1 ? u.length = 0 : u.splice(n, 1)); } emit(e, r, u) { if (this.emitted[e]) return !1; this.emitted[e] = !0; let n = !1; for (let o of this.listeners[e]) n = o(r, u) === !0 || n; return e === "exit" && (n = this.emit("afterExit", r, u) || n), n; } }, br = class { static { s(this, "SignalExitBase"); } }, Z0 = /* @__PURE__ */ s((t) => ({ onExit(e, r) { return t.onExit(e, r); }, load() { return t.load(); }, unload() { return t.unload(); } }), "signalExitWrap"), Ru = class extends br { static { s(this, "SignalExitFallback"); } onExit() { return () => { }; } load() { } unload() { } }, qu = class extends br { static { s(this, "SignalExit"); } // "SIGHUP" throws an `ENOSYS` error on Windows, // so use a supported signal instead /* c8 ignore start */ #u = Nu.platform === "win32" ? "SIGINT" : "SIGHUP"; /* c8 ignore stop */ #t = new Mu(); #e; #s; #n; #i = {}; #r = !1; constructor(e) { super(), this.#e = e, this.#i = {}; for (let r of be) this.#i[r] = () => { let u = this.#e.listeners(r), { count: n } = this.#t, o = e; if (typeof o.__signal_exit_emitter__ == "object" && typeof o.__signal_exit_emitter__.count == "number" && (n += o.__signal_exit_emitter__. count), u.length === n) { this.unload(); let i = this.#t.emit("exit", null, r), D = r === "SIGHUP" ? this.#u : r; i || e.kill(e.pid, D); } }; this.#n = e.reallyExit, this.#s = e.emit; } onExit(e, r) { if (!Er(this.#e)) return () => { }; this.#r === !1 && this.load(); let u = r?.alwaysLast ? "afterExit" : "exit"; return this.#t.on(u, e), () => { this.#t.removeListener(u, e), this.#t.listeners.exit.length === 0 && this.#t.listeners.afterExit.length === 0 && this.unload(); }; } load() { if (!this.#r) { this.#r = !0, this.#t.count += 1; for (let e of be) try { let r = this.#i[e]; r && this.#e.on(e, r); } catch { } this.#e.emit = (e, ...r) => this.#D(e, ...r), this.#e.reallyExit = (e) => this.#o(e); } } unload() { this.#r && (this.#r = !1, be.forEach((e) => { let r = this.#i[e]; if (!r) throw new Error("Listener not defined for signal: " + e); try { this.#e.removeListener(e, r); } catch { } }), this.#e.emit = this.#s, this.#e.reallyExit = this.#n, this.#t.count -= 1); } #o(e) { return Er(this.#e) ? (this.#e.exitCode = e || 0, this.#t.emit("exit", this.#e.exitCode, null), this.#n.call(this.#e, this.#e.exitCode)) : 0; } #D(e, ...r) { let u = this.#s; if (e === "exit" && Er(this.#e)) { typeof r[0] == "number" && (this.#e.exitCode = r[0]); let n = u.call(this.#e, e, ...r); return this.#t.emit("exit", this.#e.exitCode, null), n; } else return u.call(this.#e, e, ...r); } }, Nu = globalThis.process, { onExit: ( /** * Called when the process is exiting, whether via signal, explicit * exit, or running out of stuff to do. * * If the global process object is not suitable for instrumentation, * then this will be a no-op. * * Returns a function that may be used to unload signal-exit. */ J0 ), load: ( /** * Load the listeners. Likely you never need to call this, unless * doing a rather deep integration with signal-exit functionality. * Mostly exposed for the benefit of testing. * * @internal */ X0 ), unload: ( /** * Unload the listeners. Likely you never need to call this, unless * doing a rather deep integration with signal-exit functionality. * Mostly exposed for the benefit of testing. * * @internal */ Q0 ) } = Z0(Er(Nu) ? new qu(Nu) : new Ru()); }); // ../node_modules/gauge/lib/spin.js var $o = c((HE, To) => { "use strict"; To.exports = /* @__PURE__ */ s(function(e, r) { return e[r % e.length]; }, "spin"); }); // ../node_modules/gauge/lib/progress-bar.js var Io = c((KE, _o) => { "use strict"; var ep = pr(), tp = Lu(), rp = Ou(), up = Ke(); _o.exports = function(t, e, r) { if (ep("ONN", [t, e, r]), r < 0 && (r = 0), r > 1 && (r = 1), e <= 0) return ""; var u = Math.round(e * r), n = e - u, o = [ { type: "complete", value: Oo(t.complete, u), length: u }, { type: "remaining", value: Oo(t.remaining, n), length: n } ]; return tp(e, o, t); }; function Oo(t, e) { var r = "", u = e; do u % 2 && (r += t), u = Math.floor(u / 2), t += t; while (u && up(r) < e); return rp(r, e); } s(Oo, "repeat"); }); // ../node_modules/gauge/lib/base-theme.js var ko = c((JE, Lo) => { "use strict"; var ip = $o(), sp = Io(); Lo.exports = { activityIndicator: /* @__PURE__ */ s(function(t, e) { if (t.spun != null) return ip(e, t.spun); }, "activityIndicator"), progressbar: /* @__PURE__ */ s(function(t, e, r) { if (t.completed != null) return sp(e, r, t.completed); }, "progressbar") }; }); // ../node_modules/gauge/lib/theme-set.js var Mo = c((QE, Po) => { "use strict"; Po.exports = function() { return H.newThemeSet(); }; var H = {}; H.baseTheme = ko(); H.newTheme = function(t, e) { return e || (e = t, t = this.baseTheme), Object.assign({}, t, e); }; H.getThemeNames = function() { return Object.keys(this.themes); }; H.addTheme = function(t, e, r) { this.themes[t] = this.newTheme(e, r); }; H.addToAllThemes = function(t) { var e = this.themes; Object.keys(e).forEach(function(r) { Object.assign(e[r], t); }), Object.assign(this.baseTheme, t); }; H.getTheme = function(t) { if (!this.themes[t]) throw this.newMissingThemeError(t); return this.themes[t]; }; H.setDefault = function(t, e) { e == null && (e = t, t = {}); var r = t.platform == null ? "fallback" : t.platform, u = !!t.hasUnicode, n = !!t.hasColor; this.defaults[r] || (this.defaults[r] = { true: {}, false: {} }), this.defaults[r][u][n] = e; }; H.getDefault = function(t) { t || (t = {}); var e = t.platform || process.platform, r = this.defaults[e] || this.defaults.fallback, u = !!t.hasUnicode, n = !!t.hasColor; if (!r) throw this.newMissingDefaultThemeError(e, u, n); if (!r[u][n]) { if (u && n && r[!u][n]) u = !1; else if (u && n && r[u][!n]) n = !1; else if (u && n && r[!u][!n]) u = !1, n = !1; else if (u && !n && r[!u][n]) u = !1; else if (!u && n && r[u][!n]) n = !1; else if (r === this.defaults.fallback) throw this.newMissingDefaultThemeError(e, u, n); } return r[u][n] ? this.getTheme(r[u][n]) : this.getDefault(Object.assign({}, t, { platform: "fallback" })); }; H.newMissingThemeError = /* @__PURE__ */ s(function t(e) { var r = new Error('Could not find a gauge theme named "' + e + '"'); return Error.captureStackTrace.call(r, t), r.theme = e, r.code = "EMISSINGTHEME", r; }, "newMissingThemeError"); H.newMissingDefaultThemeError = /* @__PURE__ */ s(function t(e, r, u) { var n = new Error( `Could not find a gauge theme for your platform/unicode/color use combo: platform = ` + e + ` hasUnicode = ` + r + ` hasColor = ` + u ); return Error.captureStackTrace.call(n, t), n.platform = e, n.hasUnicode = r, n.hasColor = u, n.code = "EMISSINGTHEME", n; }, "newMissingDefaultThemeError"); H.newThemeSet = function() { var t = /* @__PURE__ */ s(function(e) { return t.getDefault(e); }, "themeset"); return Object.assign(t, H, { themes: Object.assign({}, this.themes), baseTheme: Object.assign({}, this.baseTheme), defaults: JSON.parse(JSON.stringify(this.defaults || {})) }); }; }); // ../node_modules/gauge/lib/themes.js var qo = c((t8, Ro) => { "use strict"; var xe = hr().color, np = Mo(), K = Ro.exports = new np(); K.addTheme("ASCII", { preProgressbar: "[", postProgressbar: "]", progressbarTheme: { complete: "#", remaining: "." }, activityIndicatorTheme: "-\\|/", preSubsection: ">" }); K.addTheme("colorASCII", K.getTheme("ASCII"), { progressbarTheme: { preComplete: xe("bgBrightWhite", "brightWhite"), complete: "#", postComplete: xe("reset"), preRemaining: xe("bgBrightBlack", "brightBlack"), remaining: ".", postRemaining: xe("reset") } }); K.addTheme("brailleSpinner", { preProgressbar: "(", postProgressbar: ")", progressbarTheme: { complete: "#", remaining: "\u2802" }, activityIndicatorTheme: "\u280B\u2819\u2839\u2838\u283C\u2834\u2826\u2827\u2807\u280F", preSubsection: ">" }); K.addTheme("colorBrailleSpinner", K.getTheme("brailleSpinner"), { progressbarTheme: { preComplete: xe("bgBrightWhite", "brightWhite"), complete: "#", postComplete: xe("reset"), preRemaining: xe("bgBrightBlack", "brightBlack"), remaining: "\u2802", postRemaining: xe("reset") } }); K.setDefault({}, "ASCII"); K.setDefault({ hasColor: !0 }, "colorASCII"); K.setDefault({ platform: "darwin", hasUnicode: !0 }, "brailleSpinner"); K.setDefault({ platform: "darwin", hasUnicode: !0, hasColor: !0 }, "colorBrailleSpinner"); K.setDefault({ platform: "linux", hasUnicode: !0 }, "brailleSpinner"); K.setDefault({ platform: "linux", hasUnicode: !0, hasColor: !0 }, "colorBrailleSpinner"); }); // ../node_modules/gauge/lib/set-interval.js var jo = c((r8, No) => { "use strict"; No.exports = setInterval; }); // ../node_modules/gauge/lib/process.js var ju = c((u8, Go) => { "use strict"; Go.exports = process; }); // ../node_modules/gauge/lib/set-immediate.js var Wo = c((i8, Gu) => { "use strict"; var op = ju(); try { Gu.exports = setImmediate; } catch { Gu.exports = op.nextTick; } }); // ../node_modules/gauge/lib/index.js var Uo = c((s8, Vo) => { "use strict"; var Dp = Fo(), ap = Eo(), lp = Bo(), hp = (So(), Ln(Ao)).onExit, cp = qo(), dp = jo(), Pe = ju(), fp = Wo(); Vo.exports = P; function xr(t, e) { return function() { return e.call(t); }; } s(xr, "callWith"); function P(t, e) { var r, u; t && t.write ? (u = t, r = e || {}) : e && e.write ? (u = e, r = t || {}) : (u = Pe.stderr, r = t || e || {}), this._status = { spun: 0, section: "", subsection: "" }, this._paused = !1, this._disabled = !0, this._showing = !1, this._onScreen = !1, this._needsRedraw = !1, this._hideCursor = r.hideCursor == null ? !0 : r.hideCursor, this._fixedFramerate = r.fixedFramerate == null ? !/^v0\.8\./.test(Pe.version) : r.fixedFramerate, this._lastUpdateAt = null, this._updateInterval = r.updateInterval == null ? 50 : r.updateInterval, this._themes = r.themes || cp, this._theme = r.theme; var n = this._computeTheme(r.theme), o = r.template || [ { type: "progressbar", length: 20 }, { type: "activityIndicator", kerning: 1, length: 1 }, { type: "section", kerning: 1, default: "" }, { type: "subsection", kerning: 1, default: "" } ]; this.setWriteTo(u, r.tty); var i = r.Plumbing || Dp; this._gauge = new i(n, o, this.getWidth()), this._$$doRedraw = xr(this, this._doRedraw), this._$$handleSizeChange = xr(this, this._handleSizeChange), this._cleanupOnExit = r.cleanupOnExit == null || r.cleanupOnExit, this._removeOnExit = null, r.enabled || r.enabled