@bomb.sh/tab 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,826 +0,0 @@
1
- import { formatWithOptions } from "node:util";
2
- import { sep } from "node:path";
3
- import process$1 from "node:process";
4
- import * as tty from "node:tty";
5
-
6
- //#region node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/core.mjs
7
- const LogLevels = {
8
- silent: Number.NEGATIVE_INFINITY,
9
- fatal: 0,
10
- error: 0,
11
- warn: 1,
12
- log: 2,
13
- info: 3,
14
- success: 3,
15
- fail: 3,
16
- ready: 3,
17
- start: 3,
18
- box: 3,
19
- debug: 4,
20
- trace: 5,
21
- verbose: Number.POSITIVE_INFINITY
22
- };
23
- const LogTypes = {
24
- silent: { level: -1 },
25
- fatal: { level: LogLevels.fatal },
26
- error: { level: LogLevels.error },
27
- warn: { level: LogLevels.warn },
28
- log: { level: LogLevels.log },
29
- info: { level: LogLevels.info },
30
- success: { level: LogLevels.success },
31
- fail: { level: LogLevels.fail },
32
- ready: { level: LogLevels.info },
33
- start: { level: LogLevels.info },
34
- box: { level: LogLevels.info },
35
- debug: { level: LogLevels.debug },
36
- trace: { level: LogLevels.trace },
37
- verbose: { level: LogLevels.verbose }
38
- };
39
- function isObject(value) {
40
- return value !== null && typeof value === "object";
41
- }
42
- function _defu(baseObject, defaults, namespace = ".", merger) {
43
- if (!isObject(defaults)) return _defu(baseObject, {}, namespace, merger);
44
- const object = Object.assign({}, defaults);
45
- for (const key in baseObject) {
46
- if (key === "__proto__" || key === "constructor") continue;
47
- const value = baseObject[key];
48
- if (value === null || value === void 0) continue;
49
- if (merger && merger(object, key, value, namespace)) continue;
50
- if (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];
51
- else if (isObject(value) && isObject(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
52
- else object[key] = value;
53
- }
54
- return object;
55
- }
56
- function createDefu(merger) {
57
- return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
58
- }
59
- const defu = createDefu();
60
- function isPlainObject(obj) {
61
- return Object.prototype.toString.call(obj) === "[object Object]";
62
- }
63
- function isLogObj(arg) {
64
- if (!isPlainObject(arg)) return false;
65
- if (!arg.message && !arg.args) return false;
66
- if (arg.stack) return false;
67
- return true;
68
- }
69
- let paused = false;
70
- const queue = [];
71
- var Consola = class Consola {
72
- constructor(options = {}) {
73
- const types = options.types || LogTypes;
74
- this.options = defu({
75
- ...options,
76
- defaults: { ...options.defaults },
77
- level: _normalizeLogLevel(options.level, types),
78
- reporters: [...options.reporters || []]
79
- }, {
80
- types: LogTypes,
81
- throttle: 1e3,
82
- throttleMin: 5,
83
- formatOptions: {
84
- date: true,
85
- colors: false,
86
- compact: true
87
- }
88
- });
89
- for (const type in types) {
90
- const defaults = {
91
- type,
92
- ...this.options.defaults,
93
- ...types[type]
94
- };
95
- this[type] = this._wrapLogFn(defaults);
96
- this[type].raw = this._wrapLogFn(defaults, true);
97
- }
98
- if (this.options.mockFn) this.mockTypes();
99
- this._lastLog = {};
100
- }
101
- get level() {
102
- return this.options.level;
103
- }
104
- set level(level) {
105
- this.options.level = _normalizeLogLevel(level, this.options.types, this.options.level);
106
- }
107
- prompt(message, opts) {
108
- if (!this.options.prompt) throw new Error("prompt is not supported!");
109
- return this.options.prompt(message, opts);
110
- }
111
- create(options) {
112
- const instance = new Consola({
113
- ...this.options,
114
- ...options
115
- });
116
- if (this._mockFn) instance.mockTypes(this._mockFn);
117
- return instance;
118
- }
119
- withDefaults(defaults) {
120
- return this.create({
121
- ...this.options,
122
- defaults: {
123
- ...this.options.defaults,
124
- ...defaults
125
- }
126
- });
127
- }
128
- withTag(tag) {
129
- return this.withDefaults({ tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag });
130
- }
131
- addReporter(reporter) {
132
- this.options.reporters.push(reporter);
133
- return this;
134
- }
135
- removeReporter(reporter) {
136
- if (reporter) {
137
- const i = this.options.reporters.indexOf(reporter);
138
- if (i >= 0) return this.options.reporters.splice(i, 1);
139
- } else this.options.reporters.splice(0);
140
- return this;
141
- }
142
- setReporters(reporters) {
143
- this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
144
- return this;
145
- }
146
- wrapAll() {
147
- this.wrapConsole();
148
- this.wrapStd();
149
- }
150
- restoreAll() {
151
- this.restoreConsole();
152
- this.restoreStd();
153
- }
154
- wrapConsole() {
155
- for (const type in this.options.types) {
156
- if (!console["__" + type]) console["__" + type] = console[type];
157
- console[type] = this[type].raw;
158
- }
159
- }
160
- restoreConsole() {
161
- for (const type in this.options.types) if (console["__" + type]) {
162
- console[type] = console["__" + type];
163
- delete console["__" + type];
164
- }
165
- }
166
- wrapStd() {
167
- this._wrapStream(this.options.stdout, "log");
168
- this._wrapStream(this.options.stderr, "log");
169
- }
170
- _wrapStream(stream, type) {
171
- if (!stream) return;
172
- if (!stream.__write) stream.__write = stream.write;
173
- stream.write = (data) => {
174
- this[type].raw(String(data).trim());
175
- };
176
- }
177
- restoreStd() {
178
- this._restoreStream(this.options.stdout);
179
- this._restoreStream(this.options.stderr);
180
- }
181
- _restoreStream(stream) {
182
- if (!stream) return;
183
- if (stream.__write) {
184
- stream.write = stream.__write;
185
- delete stream.__write;
186
- }
187
- }
188
- pauseLogs() {
189
- paused = true;
190
- }
191
- resumeLogs() {
192
- paused = false;
193
- const _queue = queue.splice(0);
194
- for (const item of _queue) item[0]._logFn(item[1], item[2]);
195
- }
196
- mockTypes(mockFn) {
197
- const _mockFn = mockFn || this.options.mockFn;
198
- this._mockFn = _mockFn;
199
- if (typeof _mockFn !== "function") return;
200
- for (const type in this.options.types) {
201
- this[type] = _mockFn(type, this.options.types[type]) || this[type];
202
- this[type].raw = this[type];
203
- }
204
- }
205
- _wrapLogFn(defaults, isRaw) {
206
- return (...args) => {
207
- if (paused) {
208
- queue.push([
209
- this,
210
- defaults,
211
- args,
212
- isRaw
213
- ]);
214
- return;
215
- }
216
- return this._logFn(defaults, args, isRaw);
217
- };
218
- }
219
- _logFn(defaults, args, isRaw) {
220
- if ((defaults.level || 0) > this.level) return false;
221
- const logObj = {
222
- date: /* @__PURE__ */ new Date(),
223
- args: [],
224
- ...defaults,
225
- level: _normalizeLogLevel(defaults.level, this.options.types)
226
- };
227
- if (!isRaw && args.length === 1 && isLogObj(args[0])) Object.assign(logObj, args[0]);
228
- else logObj.args = [...args];
229
- if (logObj.message) {
230
- logObj.args.unshift(logObj.message);
231
- delete logObj.message;
232
- }
233
- if (logObj.additional) {
234
- if (!Array.isArray(logObj.additional)) logObj.additional = logObj.additional.split("\n");
235
- logObj.args.push("\n" + logObj.additional.join("\n"));
236
- delete logObj.additional;
237
- }
238
- logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
239
- logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
240
- const resolveLog = (newLog = false) => {
241
- const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
242
- if (this._lastLog.object && repeated > 0) {
243
- const args2 = [...this._lastLog.object.args];
244
- if (repeated > 1) args2.push(`(repeated ${repeated} times)`);
245
- this._log({
246
- ...this._lastLog.object,
247
- args: args2
248
- });
249
- this._lastLog.count = 1;
250
- }
251
- if (newLog) {
252
- this._lastLog.object = logObj;
253
- this._log(logObj);
254
- }
255
- };
256
- clearTimeout(this._lastLog.timeout);
257
- const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
258
- this._lastLog.time = logObj.date;
259
- if (diffTime < this.options.throttle) try {
260
- const serializedLog = JSON.stringify([
261
- logObj.type,
262
- logObj.tag,
263
- logObj.args
264
- ]);
265
- const isSameLog = this._lastLog.serialized === serializedLog;
266
- this._lastLog.serialized = serializedLog;
267
- if (isSameLog) {
268
- this._lastLog.count = (this._lastLog.count || 0) + 1;
269
- if (this._lastLog.count > this.options.throttleMin) {
270
- this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
271
- return;
272
- }
273
- }
274
- } catch {}
275
- resolveLog(true);
276
- }
277
- _log(logObj) {
278
- for (const reporter of this.options.reporters) reporter.log(logObj, { options: this.options });
279
- }
280
- };
281
- function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
282
- if (input === void 0) return defaultLevel;
283
- if (typeof input === "number") return input;
284
- if (types[input] && types[input].level !== void 0) return types[input].level;
285
- return defaultLevel;
286
- }
287
- Consola.prototype.add = Consola.prototype.addReporter;
288
- Consola.prototype.remove = Consola.prototype.removeReporter;
289
- Consola.prototype.clear = Consola.prototype.removeReporter;
290
- Consola.prototype.withScope = Consola.prototype.withTag;
291
- Consola.prototype.mock = Consola.prototype.mockTypes;
292
- Consola.prototype.pause = Consola.prototype.pauseLogs;
293
- Consola.prototype.resume = Consola.prototype.resumeLogs;
294
- function createConsola(options = {}) {
295
- return new Consola(options);
296
- }
297
-
298
- //#endregion
299
- //#region node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.06ad8a64.mjs
300
- function parseStack(stack) {
301
- const cwd = process.cwd() + sep;
302
- return stack.split("\n").splice(1).map((l) => l.trim().replace("file://", "").replace(cwd, ""));
303
- }
304
- function writeStream(data, stream) {
305
- return (stream.__write || stream.write).call(stream, data);
306
- }
307
- const bracket = (x) => x ? `[${x}]` : "";
308
- var BasicReporter = class {
309
- formatStack(stack, opts) {
310
- return " " + parseStack(stack).join("\n ");
311
- }
312
- formatArgs(args, opts) {
313
- const _args = args.map((arg) => {
314
- if (arg && typeof arg.stack === "string") return arg.message + "\n" + this.formatStack(arg.stack, opts);
315
- return arg;
316
- });
317
- return formatWithOptions(opts, ..._args);
318
- }
319
- formatDate(date, opts) {
320
- return opts.date ? date.toLocaleTimeString() : "";
321
- }
322
- filterAndJoin(arr) {
323
- return arr.filter(Boolean).join(" ");
324
- }
325
- formatLogObj(logObj, opts) {
326
- const message = this.formatArgs(logObj.args, opts);
327
- if (logObj.type === "box") return "\n" + [
328
- bracket(logObj.tag),
329
- logObj.title && logObj.title,
330
- ...message.split("\n")
331
- ].filter(Boolean).map((l) => " > " + l).join("\n") + "\n";
332
- return this.filterAndJoin([
333
- bracket(logObj.type),
334
- bracket(logObj.tag),
335
- message
336
- ]);
337
- }
338
- log(logObj, ctx) {
339
- const line = this.formatLogObj(logObj, {
340
- columns: ctx.options.stdout.columns || 0,
341
- ...ctx.options.formatOptions
342
- });
343
- return writeStream(line + "\n", logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
344
- }
345
- };
346
-
347
- //#endregion
348
- //#region node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/utils.mjs
349
- const { env = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process;
350
- const isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
351
- const isForced = "FORCE_COLOR" in env || argv.includes("--color");
352
- const isWindows = platform === "win32";
353
- const isDumbTerminal = env.TERM === "dumb";
354
- const isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
355
- const isCI$1 = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
356
- const isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI$1);
357
- function replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
358
- return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
359
- }
360
- function clearBleed(index, string, open, close, replace) {
361
- return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
362
- }
363
- function filterEmpty(open, close, replace = open, at = open.length + 1) {
364
- return (string) => string || !(string === "" || string === void 0) ? clearBleed(("" + string).indexOf(close, at), string, open, close, replace) : "";
365
- }
366
- function init(open, close, replace) {
367
- return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
368
- }
369
- const colorDefs = {
370
- reset: init(0, 0),
371
- bold: init(1, 22, "\x1B[22m\x1B[1m"),
372
- dim: init(2, 22, "\x1B[22m\x1B[2m"),
373
- italic: init(3, 23),
374
- underline: init(4, 24),
375
- inverse: init(7, 27),
376
- hidden: init(8, 28),
377
- strikethrough: init(9, 29),
378
- black: init(30, 39),
379
- red: init(31, 39),
380
- green: init(32, 39),
381
- yellow: init(33, 39),
382
- blue: init(34, 39),
383
- magenta: init(35, 39),
384
- cyan: init(36, 39),
385
- white: init(37, 39),
386
- gray: init(90, 39),
387
- bgBlack: init(40, 49),
388
- bgRed: init(41, 49),
389
- bgGreen: init(42, 49),
390
- bgYellow: init(43, 49),
391
- bgBlue: init(44, 49),
392
- bgMagenta: init(45, 49),
393
- bgCyan: init(46, 49),
394
- bgWhite: init(47, 49),
395
- blackBright: init(90, 39),
396
- redBright: init(91, 39),
397
- greenBright: init(92, 39),
398
- yellowBright: init(93, 39),
399
- blueBright: init(94, 39),
400
- magentaBright: init(95, 39),
401
- cyanBright: init(96, 39),
402
- whiteBright: init(97, 39),
403
- bgBlackBright: init(100, 49),
404
- bgRedBright: init(101, 49),
405
- bgGreenBright: init(102, 49),
406
- bgYellowBright: init(103, 49),
407
- bgBlueBright: init(104, 49),
408
- bgMagentaBright: init(105, 49),
409
- bgCyanBright: init(106, 49),
410
- bgWhiteBright: init(107, 49)
411
- };
412
- function createColors(useColor = isColorSupported) {
413
- return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
414
- }
415
- const colors = createColors();
416
- function getColor$1(color, fallback = "reset") {
417
- return colors[color] || colors[fallback];
418
- }
419
- const ansiRegex$1 = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
420
- function stripAnsi(text) {
421
- return text.replace(new RegExp(ansiRegex$1, "g"), "");
422
- }
423
- const boxStylePresets = {
424
- solid: {
425
- tl: "┌",
426
- tr: "┐",
427
- bl: "└",
428
- br: "┘",
429
- h: "─",
430
- v: "│"
431
- },
432
- double: {
433
- tl: "╔",
434
- tr: "╗",
435
- bl: "╚",
436
- br: "╝",
437
- h: "═",
438
- v: "║"
439
- },
440
- doubleSingle: {
441
- tl: "╓",
442
- tr: "╖",
443
- bl: "╙",
444
- br: "╜",
445
- h: "─",
446
- v: "║"
447
- },
448
- doubleSingleRounded: {
449
- tl: "╭",
450
- tr: "╮",
451
- bl: "╰",
452
- br: "╯",
453
- h: "─",
454
- v: "║"
455
- },
456
- singleThick: {
457
- tl: "┏",
458
- tr: "┓",
459
- bl: "┗",
460
- br: "┛",
461
- h: "━",
462
- v: "┃"
463
- },
464
- singleDouble: {
465
- tl: "╒",
466
- tr: "╕",
467
- bl: "╘",
468
- br: "╛",
469
- h: "═",
470
- v: "│"
471
- },
472
- singleDoubleRounded: {
473
- tl: "╭",
474
- tr: "╮",
475
- bl: "╰",
476
- br: "╯",
477
- h: "═",
478
- v: "│"
479
- },
480
- rounded: {
481
- tl: "╭",
482
- tr: "╮",
483
- bl: "╰",
484
- br: "╯",
485
- h: "─",
486
- v: "│"
487
- }
488
- };
489
- const defaultStyle = {
490
- borderColor: "white",
491
- borderStyle: "rounded",
492
- valign: "center",
493
- padding: 2,
494
- marginLeft: 1,
495
- marginTop: 1,
496
- marginBottom: 1
497
- };
498
- function box(text, _opts = {}) {
499
- const opts = {
500
- ..._opts,
501
- style: {
502
- ...defaultStyle,
503
- ..._opts.style
504
- }
505
- };
506
- const textLines = text.split("\n");
507
- const boxLines = [];
508
- const _color = getColor$1(opts.style.borderColor);
509
- const borderStyle = { ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle };
510
- if (_color) for (const key in borderStyle) borderStyle[key] = _color(borderStyle[key]);
511
- const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
512
- const height = textLines.length + paddingOffset;
513
- const width = Math.max(...textLines.map((line) => line.length)) + paddingOffset;
514
- const widthOffset = width + paddingOffset;
515
- const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
516
- if (opts.style.marginTop > 0) boxLines.push("".repeat(opts.style.marginTop));
517
- if (opts.title) {
518
- const left = borderStyle.h.repeat(Math.floor((width - stripAnsi(opts.title).length) / 2));
519
- const right = borderStyle.h.repeat(width - stripAnsi(opts.title).length - stripAnsi(left).length + paddingOffset);
520
- boxLines.push(`${leftSpace}${borderStyle.tl}${left}${opts.title}${right}${borderStyle.tr}`);
521
- } else boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
522
- const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
523
- for (let i = 0; i < height; i++) if (i < valignOffset || i >= valignOffset + textLines.length) boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
524
- else {
525
- const line = textLines[i - valignOffset];
526
- const left = " ".repeat(paddingOffset);
527
- const right = " ".repeat(width - stripAnsi(line).length);
528
- boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
529
- }
530
- boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
531
- if (opts.style.marginBottom > 0) boxLines.push("".repeat(opts.style.marginBottom));
532
- return boxLines.join("\n");
533
- }
534
-
535
- //#endregion
536
- //#region node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.36c0034f.mjs
537
- const providers = [
538
- ["APPVEYOR"],
539
- ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
540
- ["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],
541
- ["APPCIRCLE", "AC_APPCIRCLE"],
542
- ["BAMBOO", "bamboo_planKey"],
543
- ["BITBUCKET", "BITBUCKET_COMMIT"],
544
- ["BITRISE", "BITRISE_IO"],
545
- ["BUDDY", "BUDDY_WORKSPACE_ID"],
546
- ["BUILDKITE"],
547
- ["CIRCLE", "CIRCLECI"],
548
- ["CIRRUS", "CIRRUS_CI"],
549
- [
550
- "CLOUDFLARE_PAGES",
551
- "CF_PAGES",
552
- { ci: true }
553
- ],
554
- ["CODEBUILD", "CODEBUILD_BUILD_ARN"],
555
- ["CODEFRESH", "CF_BUILD_ID"],
556
- ["DRONE"],
557
- ["DRONE", "DRONE_BUILD_EVENT"],
558
- ["DSARI"],
559
- ["GITHUB_ACTIONS"],
560
- ["GITLAB", "GITLAB_CI"],
561
- ["GITLAB", "CI_MERGE_REQUEST_ID"],
562
- ["GOCD", "GO_PIPELINE_LABEL"],
563
- ["LAYERCI"],
564
- ["HUDSON", "HUDSON_URL"],
565
- ["JENKINS", "JENKINS_URL"],
566
- ["MAGNUM"],
567
- ["NETLIFY"],
568
- [
569
- "NETLIFY",
570
- "NETLIFY_LOCAL",
571
- { ci: false }
572
- ],
573
- ["NEVERCODE"],
574
- ["RENDER"],
575
- ["SAIL", "SAILCI"],
576
- ["SEMAPHORE"],
577
- ["SCREWDRIVER"],
578
- ["SHIPPABLE"],
579
- ["SOLANO", "TDDIUM"],
580
- ["STRIDER"],
581
- ["TEAMCITY", "TEAMCITY_VERSION"],
582
- ["TRAVIS"],
583
- ["VERCEL", "NOW_BUILDER"],
584
- ["APPCENTER", "APPCENTER_BUILD_ID"],
585
- [
586
- "CODESANDBOX",
587
- "CODESANDBOX_SSE",
588
- { ci: false }
589
- ],
590
- ["STACKBLITZ"],
591
- ["STORMKIT"],
592
- ["CLEAVR"]
593
- ];
594
- function detectProvider(env$1) {
595
- for (const provider of providers) {
596
- const envName = provider[1] || provider[0];
597
- if (env$1[envName]) return {
598
- name: provider[0].toLowerCase(),
599
- ...provider[2]
600
- };
601
- }
602
- if (env$1.SHELL && env$1.SHELL === "/bin/jsh") return {
603
- name: "stackblitz",
604
- ci: false
605
- };
606
- return {
607
- name: "",
608
- ci: false
609
- };
610
- }
611
- const processShim = typeof process !== "undefined" ? process : {};
612
- const envShim = processShim.env || {};
613
- const providerInfo = detectProvider(envShim);
614
- const nodeENV = typeof process !== "undefined" && process.env && process.env.NODE_ENV || "";
615
- processShim.platform;
616
- providerInfo.name;
617
- const isCI = toBoolean(envShim.CI) || providerInfo.ci !== false;
618
- toBoolean(processShim.stdout && processShim.stdout.isTTY);
619
- const isDebug = toBoolean(envShim.DEBUG);
620
- const isTest = nodeENV === "test" || toBoolean(envShim.TEST);
621
- toBoolean(envShim.MINIMAL);
622
- function toBoolean(val) {
623
- return val ? val !== "false" : false;
624
- }
625
- function ansiRegex({ onlyFirst = false } = {}) {
626
- const 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("|");
627
- return new RegExp(pattern, onlyFirst ? void 0 : "g");
628
- }
629
- const regex = ansiRegex();
630
- function stripAnsi$1(string) {
631
- if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
632
- return string.replace(regex, "");
633
- }
634
- function getDefaultExportFromCjs(x) {
635
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
636
- }
637
- var eastasianwidth = { exports: {} };
638
- (function(module) {
639
- var eaw = {};
640
- module.exports = eaw;
641
- eaw.eastAsianWidth = function(character) {
642
- var x = character.charCodeAt(0);
643
- var y = character.length == 2 ? character.charCodeAt(1) : 0;
644
- var codePoint = x;
645
- if (55296 <= x && x <= 56319 && 56320 <= y && y <= 57343) {
646
- x &= 1023;
647
- y &= 1023;
648
- codePoint = x << 10 | y;
649
- codePoint += 65536;
650
- }
651
- if (12288 == codePoint || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510) return "F";
652
- if (8361 == codePoint || 65377 <= codePoint && codePoint <= 65470 || 65474 <= codePoint && codePoint <= 65479 || 65482 <= codePoint && codePoint <= 65487 || 65490 <= codePoint && codePoint <= 65495 || 65498 <= codePoint && codePoint <= 65500 || 65512 <= codePoint && codePoint <= 65518) return "H";
653
- if (4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141) return "W";
654
- if (32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || 172 == codePoint || 175 == codePoint || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630) return "Na";
655
- if (161 == codePoint || 164 == codePoint || 167 <= codePoint && codePoint <= 168 || 170 == codePoint || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || 198 == codePoint || 208 == codePoint || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || 230 == codePoint || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || 240 == codePoint || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || 252 == codePoint || 254 == codePoint || 257 == codePoint || 273 == codePoint || 275 == codePoint || 283 == codePoint || 294 <= codePoint && codePoint <= 295 || 299 == codePoint || 305 <= codePoint && codePoint <= 307 || 312 == codePoint || 319 <= codePoint && codePoint <= 322 || 324 == codePoint || 328 <= codePoint && codePoint <= 331 || 333 == codePoint || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || 363 == codePoint || 462 == codePoint || 464 == codePoint || 466 == codePoint || 468 == codePoint || 470 == codePoint || 472 == codePoint || 474 == codePoint || 476 == codePoint || 593 == codePoint || 609 == codePoint || 708 == codePoint || 711 == codePoint || 713 <= codePoint && codePoint <= 715 || 717 == codePoint || 720 == codePoint || 728 <= codePoint && codePoint <= 731 || 733 == codePoint || 735 == codePoint || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || 1025 == codePoint || 1040 <= codePoint && codePoint <= 1103 || 1105 == codePoint || 8208 == codePoint || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || 8240 == codePoint || 8242 <= codePoint && codePoint <= 8243 || 8245 == codePoint || 8251 == codePoint || 8254 == codePoint || 8308 == codePoint || 8319 == codePoint || 8321 <= codePoint && codePoint <= 8324 || 8364 == codePoint || 8451 == codePoint || 8453 == codePoint || 8457 == codePoint || 8467 == codePoint || 8470 == codePoint || 8481 <= codePoint && codePoint <= 8482 || 8486 == codePoint || 8491 == codePoint || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || 8585 == codePoint || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || 8658 == codePoint || 8660 == codePoint || 8679 == codePoint || 8704 == codePoint || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || 8715 == codePoint || 8719 == codePoint || 8721 == codePoint || 8725 == codePoint || 8730 == codePoint || 8733 <= codePoint && codePoint <= 8736 || 8739 == codePoint || 8741 == codePoint || 8743 <= codePoint && codePoint <= 8748 || 8750 == codePoint || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || 8776 == codePoint || 8780 == codePoint || 8786 == codePoint || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || 8853 == codePoint || 8857 == codePoint || 8869 == codePoint || 8895 == codePoint || 8978 == codePoint || 9312 <= codePoint && codePoint <= 9449 || 9451 <= codePoint && codePoint <= 9547 || 9552 <= codePoint && codePoint <= 9587 || 9600 <= codePoint && codePoint <= 9615 || 9618 <= codePoint && codePoint <= 9621 || 9632 <= codePoint && codePoint <= 9633 || 9635 <= codePoint && codePoint <= 9641 || 9650 <= codePoint && codePoint <= 9651 || 9654 <= codePoint && codePoint <= 9655 || 9660 <= codePoint && codePoint <= 9661 || 9664 <= codePoint && codePoint <= 9665 || 9670 <= codePoint && codePoint <= 9672 || 9675 == codePoint || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || 9711 == codePoint || 9733 <= codePoint && codePoint <= 9734 || 9737 == codePoint || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || 9756 == codePoint || 9758 == codePoint || 9792 == codePoint || 9794 == codePoint || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || 9839 == codePoint || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || 9955 == codePoint || 9960 <= codePoint && codePoint <= 9983 || 10045 == codePoint || 10071 == codePoint || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || 65533 == codePoint || 127232 <= codePoint && codePoint <= 127242 || 127248 <= codePoint && codePoint <= 127277 || 127280 <= codePoint && codePoint <= 127337 || 127344 <= codePoint && codePoint <= 127386 || 917760 <= codePoint && codePoint <= 917999 || 983040 <= codePoint && codePoint <= 1048573 || 1048576 <= codePoint && codePoint <= 1114109) return "A";
656
- return "N";
657
- };
658
- eaw.characterLength = function(character) {
659
- var code = this.eastAsianWidth(character);
660
- if (code == "F" || code == "W" || code == "A") return 2;
661
- else return 1;
662
- };
663
- function stringToArray(string) {
664
- return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
665
- }
666
- eaw.length = function(string) {
667
- var characters = stringToArray(string);
668
- var len = 0;
669
- for (var i = 0; i < characters.length; i++) len = len + this.characterLength(characters[i]);
670
- return len;
671
- };
672
- eaw.slice = function(text, start, end) {
673
- textLen = eaw.length(text);
674
- start = start ? start : 0;
675
- end = end ? end : 1;
676
- if (start < 0) start = textLen + start;
677
- if (end < 0) end = textLen + end;
678
- var result = "";
679
- var eawLen = 0;
680
- var chars = stringToArray(text);
681
- for (var i = 0; i < chars.length; i++) {
682
- var char = chars[i];
683
- var charLen = eaw.length(char);
684
- if (eawLen >= start - (charLen == 2 ? 1 : 0)) if (eawLen + charLen <= end) result += char;
685
- else break;
686
- eawLen += charLen;
687
- }
688
- return result;
689
- };
690
- })(eastasianwidth);
691
- var eastasianwidthExports = eastasianwidth.exports;
692
- const eastAsianWidth = /* @__PURE__ */ getDefaultExportFromCjs(eastasianwidthExports);
693
- const emojiRegex = () => {
694
- return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
695
- };
696
- function stringWidth$1(string, options) {
697
- if (typeof string !== "string" || string.length === 0) return 0;
698
- options = {
699
- ambiguousIsNarrow: true,
700
- countAnsiEscapeCodes: false,
701
- ...options
702
- };
703
- if (!options.countAnsiEscapeCodes) string = stripAnsi$1(string);
704
- if (string.length === 0) return 0;
705
- const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
706
- let width = 0;
707
- for (const { segment: character } of new Intl.Segmenter().segment(string)) {
708
- const codePoint = character.codePointAt(0);
709
- if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue;
710
- if (codePoint >= 768 && codePoint <= 879) continue;
711
- if (emojiRegex().test(character)) {
712
- width += 2;
713
- continue;
714
- }
715
- switch (eastAsianWidth.eastAsianWidth(character)) {
716
- case "F":
717
- case "W":
718
- width += 2;
719
- break;
720
- case "A":
721
- width += ambiguousCharacterWidth;
722
- break;
723
- default: width += 1;
724
- }
725
- }
726
- return width;
727
- }
728
- function isUnicodeSupported() {
729
- if (process$1.platform !== "win32") return process$1.env.TERM !== "linux";
730
- return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) || Boolean(process$1.env.TERMINUS_SUBLIME) || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
731
- }
732
- const TYPE_COLOR_MAP = {
733
- info: "cyan",
734
- fail: "red",
735
- success: "green",
736
- ready: "green",
737
- start: "magenta"
738
- };
739
- const LEVEL_COLOR_MAP = {
740
- 0: "red",
741
- 1: "yellow"
742
- };
743
- const unicode = isUnicodeSupported();
744
- const s = (c, fallback) => unicode ? c : fallback;
745
- const TYPE_ICONS = {
746
- error: s("✖", "×"),
747
- fatal: s("✖", "×"),
748
- ready: s("✔", "√"),
749
- warn: s("⚠", "‼"),
750
- info: s("ℹ", "i"),
751
- success: s("✔", "√"),
752
- debug: s("⚙", "D"),
753
- trace: s("→", "→"),
754
- fail: s("✖", "×"),
755
- start: s("◐", "o"),
756
- log: ""
757
- };
758
- function stringWidth(str) {
759
- if (!Intl.Segmenter) return stripAnsi(str).length;
760
- return stringWidth$1(str);
761
- }
762
- var FancyReporter = class extends BasicReporter {
763
- formatStack(stack) {
764
- return "\n" + parseStack(stack).map((line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_, m) => `(${colors.cyan(m)})`)).join("\n");
765
- }
766
- formatType(logObj, isBadge, opts) {
767
- const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
768
- if (isBadge) return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
769
- const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
770
- return _type ? getColor(typeColor)(_type) : "";
771
- }
772
- formatLogObj(logObj, opts) {
773
- const [message, ...additional] = this.formatArgs(logObj.args, opts).split("\n");
774
- if (logObj.type === "box") return box(characterFormat(message + (additional.length > 0 ? "\n" + additional.join("\n") : "")), {
775
- title: logObj.title ? characterFormat(logObj.title) : void 0,
776
- style: logObj.style
777
- });
778
- const date = this.formatDate(logObj.date, opts);
779
- const coloredDate = date && colors.gray(date);
780
- const isBadge = logObj.badge ?? logObj.level < 2;
781
- const type = this.formatType(logObj, isBadge, opts);
782
- const tag = logObj.tag ? colors.gray(logObj.tag) : "";
783
- let line;
784
- const left = this.filterAndJoin([type, characterFormat(message)]);
785
- const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
786
- const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
787
- line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
788
- line += characterFormat(additional.length > 0 ? "\n" + additional.join("\n") : "");
789
- if (logObj.type === "trace") {
790
- const _err = /* @__PURE__ */ new Error("Trace: " + logObj.message);
791
- line += this.formatStack(_err.stack || "");
792
- }
793
- return isBadge ? "\n" + line + "\n" : line;
794
- }
795
- };
796
- function characterFormat(str) {
797
- return str.replace(/`([^`]+)`/gm, (_, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_, m) => ` ${colors.underline(m)} `);
798
- }
799
- function getColor(color = "white") {
800
- return colors[color] || colors.white;
801
- }
802
- function getBgColor(color = "bgWhite") {
803
- return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
804
- }
805
- function createConsola$1(options = {}) {
806
- let level = _getDefaultLogLevel();
807
- if (process.env.CONSOLA_LEVEL) level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
808
- return createConsola({
809
- level,
810
- defaults: { level },
811
- stdout: process.stdout,
812
- stderr: process.stderr,
813
- prompt: (...args) => import("./prompt-Cjrbe4Tk.js").then((m) => m.prompt(...args)),
814
- reporters: options.reporters || [options.fancy ?? !(isCI || isTest) ? new FancyReporter() : new BasicReporter()],
815
- ...options
816
- });
817
- }
818
- function _getDefaultLogLevel() {
819
- if (isDebug) return LogLevels.debug;
820
- if (isTest) return LogLevels.warn;
821
- return LogLevels.info;
822
- }
823
- const consola = createConsola$1();
824
-
825
- //#endregion
826
- export { colors, getDefaultExportFromCjs, isUnicodeSupported };