UNPKG

storybook

Version:

Storybook: Develop, document, and test UI components in isolation

948 lines (921 loc) • 209 kB
import CJS_COMPAT_NODE_URL_yr66iw5gef from 'node:url'; import CJS_COMPAT_NODE_PATH_yr66iw5gef from 'node:path'; import CJS_COMPAT_NODE_MODULE_yr66iw5gef from "node:module"; var __filename = CJS_COMPAT_NODE_URL_yr66iw5gef.fileURLToPath(import.meta.url); var __dirname = CJS_COMPAT_NODE_PATH_yr66iw5gef.dirname(__filename); var require = CJS_COMPAT_NODE_MODULE_yr66iw5gef.createRequire(import.meta.url); // ------------------------------------------------------------ // end of CJS compatibility banner, injected by Storybook's esbuild configuration // ------------------------------------------------------------ import { require_picocolors } from "./chunk-RZ2YFNVH.js"; import { __commonJS, __export, __require, __toESM } from "./chunk-J4VC4I2M.js"; // ../node_modules/are-we-there-yet/lib/tracker-base.js var require_tracker_base = __commonJS({ "../node_modules/are-we-there-yet/lib/tracker-base.js"(exports, module) { "use strict"; var EventEmitter = __require("events"), trackerId = 0, TrackerBase = class extends EventEmitter { constructor(name) { super(), this.id = ++trackerId, this.name = name; } }; module.exports = TrackerBase; } }); // ../node_modules/are-we-there-yet/lib/tracker.js var require_tracker = __commonJS({ "../node_modules/are-we-there-yet/lib/tracker.js"(exports, module) { "use strict"; var TrackerBase = require_tracker_base(), Tracker = class extends TrackerBase { constructor(name, todo) { super(name), this.workDone = 0, this.workTodo = todo || 0; } completed() { return this.workTodo === 0 ? 0 : this.workDone / this.workTodo; } addWork(work) { this.workTodo += work, this.emit("change", this.name, this.completed(), this); } completeWork(work) { this.workDone += work, 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); } }; module.exports = Tracker; } }); // ../node_modules/are-we-there-yet/lib/tracker-stream.js var require_tracker_stream = __commonJS({ "../node_modules/are-we-there-yet/lib/tracker-stream.js"(exports, module) { "use strict"; var stream = __require("stream"), Tracker = require_tracker(), TrackerStream = class extends stream.Transform { constructor(name, size, options) { super(options), this.tracker = new Tracker(name, size), this.name = name, this.id = this.tracker.id, this.tracker.on("change", this.trackerChange.bind(this)); } trackerChange(name, completion) { this.emit("change", name, completion, this); } _transform(data, encoding, cb) { this.tracker.completeWork(data.length ? data.length : 1), this.push(data), cb(); } _flush(cb) { this.tracker.finish(), cb(); } completed() { return this.tracker.completed(); } addWork(work) { return this.tracker.addWork(work); } finish() { return this.tracker.finish(); } }; module.exports = TrackerStream; } }); // ../node_modules/are-we-there-yet/lib/tracker-group.js var require_tracker_group = __commonJS({ "../node_modules/are-we-there-yet/lib/tracker-group.js"(exports, module) { "use strict"; var TrackerBase = require_tracker_base(), Tracker = require_tracker(), TrackerStream = require_tracker_stream(), TrackerGroup = class _TrackerGroup extends TrackerBase { parentGroup = null; trackers = []; completion = {}; weight = {}; totalWeight = 0; finished = !1; bubbleChange = bubbleChange(this); nameInTree() { for (var names = [], from = this; from; ) names.unshift(from.name), from = from.parentGroup; return names.join("/"); } addUnit(unit, weight) { if (unit.addUnit) { for (var toTest = this; toTest; ) { if (unit === toTest) throw new Error( "Attempted to add tracker group " + unit.name + " to tree that already includes it " + this.nameInTree(this) ); toTest = toTest.parentGroup; } unit.parentGroup = this; } return this.weight[unit.id] = weight || 1, this.totalWeight += this.weight[unit.id], this.trackers.push(unit), this.completion[unit.id] = unit.completed(), unit.on("change", this.bubbleChange), this.finished || this.emit("change", unit.name, this.completion[unit.id], unit), unit; } completed() { if (this.trackers.length === 0) return 0; for (var valPerWeight = 1 / this.totalWeight, completed = 0, ii = 0; ii < this.trackers.length; ii++) { var trackerId = this.trackers[ii].id; completed += valPerWeight * this.weight[trackerId] * this.completion[trackerId]; } return completed; } newGroup(name, weight) { return this.addUnit(new _TrackerGroup(name), weight); } newItem(name, todo, weight) { return this.addUnit(new Tracker(name, todo), weight); } newStream(name, todo, weight) { return this.addUnit(new TrackerStream(name, todo), weight); } finish() { this.finished = !0, this.trackers.length || this.addUnit(new Tracker(), 1, !0); for (var ii = 0; ii < this.trackers.length; ii++) { var tracker = this.trackers[ii]; tracker.finish(), tracker.removeListener("change", this.bubbleChange); } this.emit("change", this.name, 1, this); } debug(depth = 0) { let indent = " ".repeat(depth), output = `${indent}${this.name || "top"}: ${this.completed()} `; return this.trackers.forEach(function(tracker) { output += tracker instanceof _TrackerGroup ? tracker.debug(depth + 1) : `${indent} ${tracker.name}: ${tracker.completed()} `; }), output; } }; function bubbleChange(trackerGroup) { return function(name, completed, tracker) { trackerGroup.completion[tracker.id] = completed, !trackerGroup.finished && trackerGroup.emit("change", name || trackerGroup.name, trackerGroup.completed(), trackerGroup); }; } module.exports = TrackerGroup; } }); // ../node_modules/are-we-there-yet/lib/index.js var require_lib = __commonJS({ "../node_modules/are-we-there-yet/lib/index.js"(exports) { "use strict"; exports.TrackerGroup = require_tracker_group(); exports.Tracker = require_tracker(); exports.TrackerStream = require_tracker_stream(); } }); // ../node_modules/console-control-strings/index.js var require_console_control_strings = __commonJS({ "../node_modules/console-control-strings/index.js"(exports) { "use strict"; var prefix = "\x1B["; exports.up = function(num) { return prefix + (num || "") + "A"; }; exports.down = function(num) { return prefix + (num || "") + "B"; }; exports.forward = function(num) { return prefix + (num || "") + "C"; }; exports.back = function(num) { return prefix + (num || "") + "D"; }; exports.nextLine = function(num) { return prefix + (num || "") + "E"; }; exports.previousLine = function(num) { return prefix + (num || "") + "F"; }; exports.horizontalAbsolute = function(num) { if (num == null) throw new Error("horizontalAboslute requires a column to position to"); return prefix + num + "G"; }; exports.eraseData = function() { return prefix + "J"; }; exports.eraseLine = function() { return prefix + "K"; }; exports.goto = function(x3, y2) { return prefix + y2 + ";" + x3 + "H"; }; exports.gotoSOL = function() { return "\r"; }; exports.beep = function() { return "\x07"; }; exports.hideCursor = function() { return prefix + "?25l"; }; exports.showCursor = function() { return prefix + "?25h"; }; var colors2 = { 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 }; exports.color = function(colorWith) { return (arguments.length !== 1 || !Array.isArray(colorWith)) && (colorWith = Array.prototype.slice.call(arguments)), prefix + colorWith.map(colorNameToCode).join(";") + "m"; }; function colorNameToCode(color) { if (colors2[color] != null) return colors2[color]; throw new Error("Unknown color or style name: " + color); } } }); // ../node_modules/string-width/node_modules/ansi-regex/index.js var require_ansi_regex = __commonJS({ "../node_modules/string-width/node_modules/ansi-regex/index.js"(exports, module) { "use strict"; module.exports = ({ onlyFirst = !1 } = {}) => { let pattern = [ "[\\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(pattern, onlyFirst ? void 0 : "g"); }; } }); // ../node_modules/string-width/node_modules/strip-ansi/index.js var require_strip_ansi = __commonJS({ "../node_modules/string-width/node_modules/strip-ansi/index.js"(exports, module) { "use strict"; var ansiRegex2 = require_ansi_regex(); module.exports = (string) => typeof string == "string" ? string.replace(ansiRegex2(), "") : string; } }); // ../node_modules/is-fullwidth-code-point/index.js var require_is_fullwidth_code_point = __commonJS({ "../node_modules/is-fullwidth-code-point/index.js"(exports, module) { "use strict"; var isFullwidthCodePoint = (codePoint) => Number.isNaN(codePoint) ? !1 : codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET // CJK Radicals Supplement .. Enclosed CJK Letters and Months 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A 12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals 19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A 43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables 44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs 63744 <= codePoint && codePoint <= 64255 || // Vertical Forms 65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants 65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement 110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement 127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane 131072 <= codePoint && codePoint <= 262141); module.exports = isFullwidthCodePoint; module.exports.default = isFullwidthCodePoint; } }); // ../node_modules/string-width/node_modules/emoji-regex/index.js var require_emoji_regex = __commonJS({ "../node_modules/string-width/node_modules/emoji-regex/index.js"(exports, module) { "use strict"; module.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 require_string_width = __commonJS({ "../node_modules/string-width/index.js"(exports, module) { "use strict"; var stripAnsi3 = require_strip_ansi(), isFullwidthCodePoint = require_is_fullwidth_code_point(), emojiRegex2 = require_emoji_regex(), stringWidth2 = (string) => { if (typeof string != "string" || string.length === 0 || (string = stripAnsi3(string), string.length === 0)) return 0; string = string.replace(emojiRegex2(), " "); let width = 0; for (let i = 0; i < string.length; i++) { let code = string.codePointAt(i); code <= 31 || code >= 127 && code <= 159 || code >= 768 && code <= 879 || (code > 65535 && i++, width += isFullwidthCodePoint(code) ? 2 : 1); } return width; }; module.exports = stringWidth2; module.exports.default = stringWidth2; } }); // ../node_modules/wide-align/align.js var require_align = __commonJS({ "../node_modules/wide-align/align.js"(exports) { "use strict"; var stringWidth2 = require_string_width(); exports.center = alignCenter; exports.left = alignLeft; exports.right = alignRight; function createPadding(width) { var result = "", string = " ", n = width; do n % 2 && (result += string), n = Math.floor(n / 2), string += string; while (n); return result; } function alignLeft(str, width) { var trimmed = str.trimRight(); if (trimmed.length === 0 && str.length >= width) return str; var padding = "", strWidth = stringWidth2(trimmed); return strWidth < width && (padding = createPadding(width - strWidth)), trimmed + padding; } function alignRight(str, width) { var trimmed = str.trimLeft(); if (trimmed.length === 0 && str.length >= width) return str; var padding = "", strWidth = stringWidth2(trimmed); return strWidth < width && (padding = createPadding(width - strWidth)), padding + trimmed; } function alignCenter(str, width) { var trimmed = str.trim(); if (trimmed.length === 0 && str.length >= width) return str; var padLeft = "", padRight = "", strWidth = stringWidth2(trimmed); if (strWidth < width) { var padLeftBy = parseInt((width - strWidth) / 2, 10); padLeft = createPadding(padLeftBy), padRight = createPadding(width - (strWidth + padLeftBy)); } return padLeft + trimmed + padRight; } } }); // ../node_modules/aproba/index.js var require_aproba = __commonJS({ "../node_modules/aproba/index.js"(exports, module) { "use strict"; module.exports = validate; function isArguments(thingy) { return thingy != null && typeof thingy == "object" && thingy.hasOwnProperty("callee"); } var types = { "*": { label: "any", check: () => !0 }, A: { label: "array", check: (_2) => Array.isArray(_2) || isArguments(_2) }, S: { label: "string", check: (_2) => typeof _2 == "string" }, N: { label: "number", check: (_2) => typeof _2 == "number" }, F: { label: "function", check: (_2) => typeof _2 == "function" }, O: { label: "object", check: (_2) => typeof _2 == "object" && _2 != null && !types.A.check(_2) && !types.E.check(_2) }, B: { label: "boolean", check: (_2) => typeof _2 == "boolean" }, E: { label: "error", check: (_2) => _2 instanceof Error }, Z: { label: "null", check: (_2) => _2 == null } }; function addSchema(schema, arity) { let group = arity[schema.length] = arity[schema.length] || []; group.indexOf(schema) === -1 && group.push(schema); } function validate(rawSchemas, args) { if (arguments.length !== 2) throw wrongNumberOfArgs(["SA"], arguments.length); if (!rawSchemas) throw missingRequiredArg(0, "rawSchemas"); if (!args) throw missingRequiredArg(1, "args"); if (!types.S.check(rawSchemas)) throw invalidType(0, ["string"], rawSchemas); if (!types.A.check(args)) throw invalidType(1, ["array"], args); let schemas = rawSchemas.split("|"), arity = {}; schemas.forEach((schema) => { for (let ii = 0; ii < schema.length; ++ii) { let type = schema[ii]; if (!types[type]) throw unknownType(ii, type); } if (/E.*E/.test(schema)) throw moreThanOneError(schema); addSchema(schema, arity), /E/.test(schema) && (addSchema(schema.replace(/E.*$/, "E"), arity), addSchema(schema.replace(/E/, "Z"), arity), schema.length === 1 && addSchema("", arity)); }); let matching = arity[args.length]; if (!matching) throw wrongNumberOfArgs(Object.keys(arity), args.length); for (let ii = 0; ii < args.length; ++ii) { let newMatching = matching.filter((schema) => { let type = schema[ii], typeCheck = types[type].check; return typeCheck(args[ii]); }); if (!newMatching.length) { let labels = matching.map((_2) => types[_2[ii]].label).filter((_2) => _2 != null); throw invalidType(ii, labels, args[ii]); } matching = newMatching; } } function missingRequiredArg(num) { return newException("EMISSINGARG", "Missing required argument #" + (num + 1)); } function unknownType(num, type) { return newException("EUNKNOWNTYPE", "Unknown type " + type + " in argument #" + (num + 1)); } function invalidType(num, expectedTypes, value) { let valueType; return Object.keys(types).forEach((typeCode) => { types[typeCode].check(value) && (valueType = types[typeCode].label); }), newException("EINVALIDTYPE", "Argument #" + (num + 1) + ": Expected " + englishList(expectedTypes) + " but got " + valueType); } function englishList(list) { return list.join(", ").replace(/, ([^,]+)$/, " or $1"); } function wrongNumberOfArgs(expected, got) { let english = englishList(expected), args = expected.every((ex) => ex.length === 1) ? "argument" : "arguments"; return newException("EWRONGARGCOUNT", "Expected " + english + " " + args + " but got " + got); } function moreThanOneError(schema) { return newException( "ETOOMANYERRORTYPES", 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"' ); } function newException(code, msg) { let err = new TypeError(msg); return err.code = code, Error.captureStackTrace && Error.captureStackTrace(err, validate), err; } } }); // ../node_modules/gauge/node_modules/ansi-regex/index.js var require_ansi_regex2 = __commonJS({ "../node_modules/gauge/node_modules/ansi-regex/index.js"(exports, module) { "use strict"; module.exports = ({ onlyFirst = !1 } = {}) => { let pattern = [ "[\\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(pattern, onlyFirst ? void 0 : "g"); }; } }); // ../node_modules/gauge/node_modules/strip-ansi/index.js var require_strip_ansi2 = __commonJS({ "../node_modules/gauge/node_modules/strip-ansi/index.js"(exports, module) { "use strict"; var ansiRegex2 = require_ansi_regex2(); module.exports = (string) => typeof string == "string" ? string.replace(ansiRegex2(), "") : string; } }); // ../node_modules/gauge/lib/wide-truncate.js var require_wide_truncate = __commonJS({ "../node_modules/gauge/lib/wide-truncate.js"(exports, module) { "use strict"; var stringWidth2 = require_string_width(), stripAnsi3 = require_strip_ansi2(); module.exports = wideTruncate; function wideTruncate(str, target) { if (stringWidth2(str) === 0) return str; if (target <= 0) return ""; if (stringWidth2(str) <= target) return str; for (var noAnsi = stripAnsi3(str), ansiSize = str.length + noAnsi.length, truncated = str.slice(0, target + ansiSize); stringWidth2(truncated) > target; ) truncated = truncated.slice(0, -1); return truncated; } } }); // ../node_modules/gauge/lib/error.js var require_error = __commonJS({ "../node_modules/gauge/lib/error.js"(exports) { "use strict"; var util = __require("util"), User = exports.User = function User2(msg) { var err = new Error(msg); return Error.captureStackTrace(err, User2), err.code = "EGAUGE", err; }; exports.MissingTemplateValue = function MissingTemplateValue(item, values) { var err = new User(util.format('Missing template value "%s"', item.type)); return Error.captureStackTrace(err, MissingTemplateValue), err.template = item, err.values = values, err; }; exports.Internal = function Internal(msg) { var err = new Error(msg); return Error.captureStackTrace(err, Internal), err.code = "EGAUGEINTERNAL", err; }; } }); // ../node_modules/gauge/lib/template-item.js var require_template_item = __commonJS({ "../node_modules/gauge/lib/template-item.js"(exports, module) { "use strict"; var stringWidth2 = require_string_width(); module.exports = TemplateItem; function isPercent(num) { return typeof num != "string" ? !1 : num.slice(-1) === "%"; } function percent(num) { return Number(num.slice(0, -1)) / 100; } function TemplateItem(values, outputLength) { if (this.overallOutputLength = outputLength, 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 values == "string") this.value = values; else for (var prop in values) this[prop] = values[prop]; return isPercent(this.length) && (this.length = Math.round(this.overallOutputLength * percent(this.length))), isPercent(this.minLength) && (this.minLength = Math.round(this.overallOutputLength * percent(this.minLength))), isPercent(this.maxLength) && (this.maxLength = Math.round(this.overallOutputLength * percent(this.maxLength))), this; } TemplateItem.prototype = {}; TemplateItem.prototype.getBaseLength = function() { var length = this.length; return length == null && typeof this.value == "string" && this.maxLength == null && this.minLength == null && (length = stringWidth2(this.value)), length; }; TemplateItem.prototype.getLength = function() { var length = this.getBaseLength(); return length == null ? null : length + this.padLeft + this.padRight; }; TemplateItem.prototype.getMaxLength = function() { return this.maxLength == null ? null : this.maxLength + this.padLeft + this.padRight; }; TemplateItem.prototype.getMinLength = function() { return this.minLength == null ? null : this.minLength + this.padLeft + this.padRight; }; } }); // ../node_modules/gauge/lib/render-template.js var require_render_template = __commonJS({ "../node_modules/gauge/lib/render-template.js"(exports, module) { "use strict"; var align = require_align(), validate = require_aproba(), wideTruncate = require_wide_truncate(), error2 = require_error(), TemplateItem = require_template_item(); function renderValueWithValues(values) { return function(item) { return renderValue(item, values); }; } var renderTemplate = module.exports = function(width, template, values) { var items = prepareItems(width, template, values), rendered = items.map(renderValueWithValues(values)).join(""); return align.left(wideTruncate(rendered, width), width); }; function preType(item) { var cappedTypeName = item.type[0].toUpperCase() + item.type.slice(1); return "pre" + cappedTypeName; } function postType(item) { var cappedTypeName = item.type[0].toUpperCase() + item.type.slice(1); return "post" + cappedTypeName; } function hasPreOrPost(item, values) { if (item.type) return values[preType(item)] || values[postType(item)]; } function generatePreAndPost(baseItem, parentValues) { var item = Object.assign({}, baseItem), values = Object.create(parentValues), template = [], pre = preType(item), post = postType(item); return values[pre] && (template.push({ value: values[pre] }), values[pre] = null), item.minLength = null, item.length = null, item.maxLength = null, template.push(item), values[item.type] = values[item.type], values[post] && (template.push({ value: values[post] }), values[post] = null), function($1, $2, length) { return renderTemplate(length, template, values); }; } function prepareItems(width, template, values) { function cloneAndObjectify(item, index, arr) { var cloned = new TemplateItem(item, width), type = cloned.type; if (cloned.value == null) if (type in values) cloned.value = values[type]; else { if (cloned.default == null) throw new error2.MissingTemplateValue(cloned, values); cloned.value = cloned.default; } return cloned.value == null || cloned.value === "" ? null : (cloned.index = index, cloned.first = index === 0, cloned.last = index === arr.length - 1, hasPreOrPost(cloned, values) && (cloned.value = generatePreAndPost(cloned, values)), cloned); } var output = template.map(cloneAndObjectify).filter(function(item) { return item != null; }), remainingSpace = width, variableCount = output.length; function consumeSpace(length) { length > remainingSpace && (length = remainingSpace), remainingSpace -= length; } function finishSizing(item, length) { if (item.finished) throw new error2.Internal("Tried to finish template item that was already finished"); if (length === 1 / 0) throw new error2.Internal("Length of template item cannot be infinity"); if (length != null && (item.length = length), item.minLength = null, item.maxLength = null, --variableCount, item.finished = !0, item.length == null && (item.length = item.getBaseLength()), item.length == null) throw new error2.Internal("Finished template items must have a length"); consumeSpace(item.getLength()); } output.forEach(function(item) { if (item.kerning) { var prevPadRight = item.first ? 0 : output[item.index - 1].padRight; !item.first && prevPadRight < item.kerning && (item.padLeft = item.kerning - prevPadRight), item.last || (item.padRight = item.kerning); } }), output.forEach(function(item) { item.getBaseLength() != null && finishSizing(item); }); var resized = 0, resizing, hunkSize; do resizing = !1, hunkSize = Math.round(remainingSpace / variableCount), output.forEach(function(item) { item.finished || item.maxLength && item.getMaxLength() < hunkSize && (finishSizing(item, item.maxLength), resizing = !0); }); while (resizing && resized++ < output.length); if (resizing) throw new error2.Internal("Resize loop iterated too many times while determining maxLength"); resized = 0; do resizing = !1, hunkSize = Math.round(remainingSpace / variableCount), output.forEach(function(item) { item.finished || item.minLength && item.getMinLength() >= hunkSize && (finishSizing(item, item.minLength), resizing = !0); }); while (resizing && resized++ < output.length); if (resizing) throw new error2.Internal("Resize loop iterated too many times while determining minLength"); return hunkSize = Math.round(remainingSpace / variableCount), output.forEach(function(item) { item.finished || finishSizing(item, hunkSize); }), output; } function renderFunction(item, values, length) { return validate("OON", arguments), item.type ? item.value(values, values[item.type + "Theme"] || {}, length) : item.value(values, {}, length); } function renderValue(item, values) { var length = item.getBaseLength(), value = typeof item.value == "function" ? renderFunction(item, values, length) : item.value; if (value == null || value === "") return ""; var alignWith = align[item.align] || align.left, leftPadding = item.padLeft ? align.left("", item.padLeft) : "", rightPadding = item.padRight ? align.right("", item.padRight) : "", truncated = wideTruncate(String(value), length), aligned = alignWith(truncated, length); return leftPadding + aligned + rightPadding; } } }); // ../node_modules/gauge/lib/plumbing.js var require_plumbing = __commonJS({ "../node_modules/gauge/lib/plumbing.js"(exports, module) { "use strict"; var consoleControl = require_console_control_strings(), renderTemplate = require_render_template(), validate = require_aproba(), Plumbing = module.exports = function(theme, template, width) { width || (width = 80), validate("OAN", [theme, template, width]), this.showing = !1, this.theme = theme, this.width = width, this.template = template; }; Plumbing.prototype = {}; Plumbing.prototype.setTheme = function(theme) { validate("O", [theme]), this.theme = theme; }; Plumbing.prototype.setTemplate = function(template) { validate("A", [template]), this.template = template; }; Plumbing.prototype.setWidth = function(width) { validate("N", [width]), this.width = width; }; Plumbing.prototype.hide = function() { return consoleControl.gotoSOL() + consoleControl.eraseLine(); }; Plumbing.prototype.hideCursor = consoleControl.hideCursor; Plumbing.prototype.showCursor = consoleControl.showCursor; Plumbing.prototype.show = function(status) { var values = Object.create(this.theme); for (var key in status) values[key] = status[key]; return renderTemplate(this.width, this.template, values).trim() + consoleControl.color("reset") + consoleControl.eraseLine() + consoleControl.gotoSOL(); }; } }); // ../node_modules/has-unicode/index.js var require_has_unicode = __commonJS({ "../node_modules/has-unicode/index.js"(exports, module) { "use strict"; var os = __require("os"), hasUnicode = module.exports = function() { if (os.type() == "Windows_NT") return !1; var isUTF8 = /UTF-?8$/i, ctype = process.env.LC_ALL || process.env.LC_CTYPE || process.env.LANG; return isUTF8.test(ctype); }; } }); // ../node_modules/color-support/index.js var require_color_support = __commonJS({ "../node_modules/color-support/index.js"(exports, module) { module.exports = colorSupport({ alwaysReturn: !0 }, colorSupport); function hasNone(obj, options) { return obj.level = 0, obj.hasBasic = !1, obj.has256 = !1, obj.has16m = !1, options.alwaysReturn ? obj : !1; } function hasBasic(obj) { return obj.hasBasic = !0, obj.has256 = !1, obj.has16m = !1, obj.level = 1, obj; } function has256(obj) { return obj.hasBasic = !0, obj.has256 = !0, obj.has16m = !1, obj.level = 2, obj; } function has16m(obj) { return obj.hasBasic = !0, obj.has256 = !0, obj.has16m = !0, obj.level = 3, obj; } function colorSupport(options, obj) { if (options = options || {}, obj = obj || {}, typeof options.level == "number") switch (options.level) { case 0: return hasNone(obj, options); case 1: return hasBasic(obj); case 2: return has256(obj); case 3: return has16m(obj); } if (obj.level = 0, obj.hasBasic = !1, obj.has256 = !1, obj.has16m = !1, typeof process > "u" || !process || !process.stdout || !process.env || !process.platform) return hasNone(obj, options); var env = options.env || process.env, stream = options.stream || process.stdout, term = options.term || env.TERM || "", platform = options.platform || process.platform; if (!options.ignoreTTY && !stream.isTTY || !options.ignoreDumb && term === "dumb" && !env.COLORTERM) return hasNone(obj, options); if (platform === "win32") return hasBasic(obj); if (env.TMUX) return has256(obj); if (!options.ignoreCI && (env.CI || env.TEAMCITY_VERSION)) return env.TRAVIS ? has256(obj) : hasNone(obj, options); switch (env.TERM_PROGRAM) { case "iTerm.app": var ver = env.TERM_PROGRAM_VERSION || "0."; return /^[0-2]\./.test(ver) ? has256(obj) : has16m(obj); case "HyperTerm": case "Hyper": return has16m(obj); case "MacTerm": return has16m(obj); case "Apple_Terminal": return has256(obj); } return /^xterm-256/.test(term) ? has256(obj) : /^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(term) || env.COLORTERM ? hasBasic(obj) : hasNone(obj, options); } } }); // ../node_modules/gauge/lib/has-color.js var require_has_color = __commonJS({ "../node_modules/gauge/lib/has-color.js"(exports, module) { "use strict"; var colorSupport = require_color_support(); module.exports = colorSupport().hasBasic; } }); // ../node_modules/gauge/node_modules/signal-exit/dist/cjs/signals.js var require_signals = __commonJS({ "../node_modules/gauge/node_modules/signal-exit/dist/cjs/signals.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: !0 }); exports.signals = void 0; exports.signals = []; exports.signals.push("SIGHUP", "SIGINT", "SIGTERM"); process.platform !== "win32" && exports.signals.push( "SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT" // should detect profiler and enable/disable accordingly. // see #21 // 'SIGPROF' ); process.platform === "linux" && exports.signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT"); } }); // ../node_modules/gauge/node_modules/signal-exit/dist/cjs/index.js var require_cjs = __commonJS({ "../node_modules/gauge/node_modules/signal-exit/dist/cjs/index.js"(exports) { "use strict"; var _a; Object.defineProperty(exports, "__esModule", { value: !0 }); exports.unload = exports.load = exports.onExit = exports.signals = void 0; var signals_js_1 = require_signals(); Object.defineProperty(exports, "signals", { enumerable: !0, get: function() { return signals_js_1.signals; } }); var processOk = (process3) => !!process3 && typeof process3 == "object" && typeof process3.removeListener == "function" && typeof process3.emit == "function" && typeof process3.reallyExit == "function" && typeof process3.listeners == "function" && typeof process3.kill == "function" && typeof process3.pid == "number" && typeof process3.on == "function", kExitEmitter = Symbol.for("signal-exit emitter"), global = globalThis, ObjectDefineProperty = Object.defineProperty.bind(Object), Emitter = class { emitted = { afterExit: !1, exit: !1 }; listeners = { afterExit: [], exit: [] }; count = 0; id = Math.random(); constructor() { if (global[kExitEmitter]) return global[kExitEmitter]; ObjectDefineProperty(global, kExitEmitter, { value: this, writable: !1, enumerable: !1, configurable: !1 }); } on(ev, fn) { this.listeners[ev].push(fn); } removeListener(ev, fn) { let list = this.listeners[ev], i = list.indexOf(fn); i !== -1 && (i === 0 && list.length === 1 ? list.length = 0 : list.splice(i, 1)); } emit(ev, code, signal) { if (this.emitted[ev]) return !1; this.emitted[ev] = !0; let ret = !1; for (let fn of this.listeners[ev]) ret = fn(code, signal) === !0 || ret; return ev === "exit" && (ret = this.emit("afterExit", code, signal) || ret), ret; } }, SignalExitBase = class { }, signalExitWrap = (handler) => ({ onExit(cb, opts) { return handler.onExit(cb, opts); }, load() { return handler.load(); }, unload() { return handler.unload(); } }), SignalExitFallback = class extends SignalExitBase { onExit() { return () => { }; } load() { } unload() { } }, SignalExit = class extends SignalExitBase { // "SIGHUP" throws an `ENOSYS` error on Windows, // so use a supported signal instead /* c8 ignore start */ #hupSig = process2.platform === "win32" ? "SIGINT" : "SIGHUP"; /* c8 ignore stop */ #emitter = new Emitter(); #process; #originalProcessEmit; #originalProcessReallyExit; #sigListeners = {}; #loaded = !1; constructor(process3) { super(), this.#process = process3, this.#sigListeners = {}; for (let sig of signals_js_1.signals) this.#sigListeners[sig] = () => { let listeners = this.#process.listeners(sig), { count } = this.#emitter, p = process3; if (typeof p.__signal_exit_emitter__ == "object" && typeof p.__signal_exit_emitter__.count == "number" && (count += p.__signal_exit_emitter__.count), listeners.length === count) { this.unload(); let ret = this.#emitter.emit("exit", null, sig), s = sig === "SIGHUP" ? this.#hupSig : sig; ret || process3.kill(process3.pid, s); } }; this.#originalProcessReallyExit = process3.reallyExit, this.#originalProcessEmit = process3.emit; } onExit(cb, opts) { if (!processOk(this.#process)) return () => { }; this.#loaded === !1 && this.load(); let ev = opts?.alwaysLast ? "afterExit" : "exit"; return this.#emitter.on(ev, cb), () => { this.#emitter.removeListener(ev, cb), this.#emitter.listeners.exit.length === 0 && this.#emitter.listeners.afterExit.length === 0 && this.unload(); }; } load() { if (!this.#loaded) { this.#loaded = !0, this.#emitter.count += 1; for (let sig of signals_js_1.signals) try { let fn = this.#sigListeners[sig]; fn && this.#process.on(sig, fn); } catch { } this.#process.emit = (ev, ...a) => this.#processEmit(ev, ...a), this.#process.reallyExit = (code) => this.#processReallyExit(code); } } unload() { this.#loaded && (this.#loaded = !1, signals_js_1.signals.forEach((sig) => { let listener = this.#sigListeners[sig]; if (!listener) throw new Error("Listener not defined for signal: " + sig); try { this.#process.removeListener(sig, listener); } catch { } }), this.#process.emit = this.#originalProcessEmit, this.#process.reallyExit = this.#originalProcessReallyExit, this.#emitter.count -= 1); } #processReallyExit(code) { return processOk(this.#process) ? (this.#process.exitCode = code || 0, this.#emitter.emit("