@innei/pretty-logger-core 0.3.3 → 0.3.4

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.
package/dist/index.mjs CHANGED
@@ -1,372 +1,305 @@
1
- // consola.instance.ts
2
- import { isDevelopment as isDevelopment2 } from "std-env";
3
-
4
- // consola/index.ts
5
- import { isCI as isCI2, isDebug, isTest } from "std-env";
6
-
7
- // consola/consola.ts
1
+ import { isCI, isDebug, isDevelopment, isTest } from "std-env";
8
2
  import { defu } from "defu";
3
+ import { formatWithOptions } from "node:util";
4
+ import path, { dirname, sep } from "node:path";
5
+ import * as tty from "node:tty";
6
+ import * as fs from "node:fs";
7
+ import { createWriteStream } from "node:fs";
8
+ import { CronJob } from "cron";
9
+ import picocolors from "picocolors";
10
+ import EventEmitter from "node:events";
9
11
 
10
- // consola/constants.ts
11
- var LogLevels = {
12
- silent: Number.NEGATIVE_INFINITY,
13
- fatal: 0,
14
- error: 0,
15
- warn: 1,
16
- log: 2,
17
- info: 3,
18
- success: 3,
19
- fail: 3,
20
- ready: 3,
21
- start: 3,
22
- box: 3,
23
- debug: 4,
24
- trace: 5,
25
- verbose: Number.POSITIVE_INFINITY
12
+ //#region rolldown:runtime
13
+ var __create = Object.create;
14
+ var __defProp = Object.defineProperty;
15
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
16
+ var __getOwnPropNames = Object.getOwnPropertyNames;
17
+ var __getProtoOf = Object.getPrototypeOf;
18
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
19
+ var __commonJS = (cb, mod) => function() {
20
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
26
21
  };
27
- var LogTypes = {
28
- // Silent
29
- silent: {
30
- level: -1
31
- },
32
- // Level 0
33
- fatal: {
34
- level: LogLevels.fatal
35
- },
36
- error: {
37
- level: LogLevels.error
38
- },
39
- // Level 1
40
- warn: {
41
- level: LogLevels.warn
42
- },
43
- // Level 2
44
- log: {
45
- level: LogLevels.log
46
- },
47
- // Level 3
48
- info: {
49
- level: LogLevels.info
50
- },
51
- success: {
52
- level: LogLevels.success
53
- },
54
- fail: {
55
- level: LogLevels.fail
56
- },
57
- ready: {
58
- level: LogLevels.info
59
- },
60
- start: {
61
- level: LogLevels.info
62
- },
63
- box: {
64
- level: LogLevels.info
65
- },
66
- // Level 4
67
- debug: {
68
- level: LogLevels.debug
69
- },
70
- // Level 5
71
- trace: {
72
- level: LogLevels.trace
73
- },
74
- // Verbose
75
- verbose: {
76
- level: LogLevels.verbose
77
- }
22
+ var __copyProps = (to, from, except, desc) => {
23
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
24
+ key = keys[i];
25
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
26
+ get: ((k) => from[k]).bind(null, key),
27
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
28
+ });
29
+ }
30
+ return to;
78
31
  };
32
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
33
+ value: mod,
34
+ enumerable: true
35
+ }) : target, mod));
79
36
 
80
- // consola/utils/log.ts
37
+ //#endregion
38
+ //#region consola/constants.ts
39
+ const LogLevels = {
40
+ silent: Number.NEGATIVE_INFINITY,
41
+ fatal: 0,
42
+ error: 0,
43
+ warn: 1,
44
+ log: 2,
45
+ info: 3,
46
+ success: 3,
47
+ fail: 3,
48
+ ready: 3,
49
+ start: 3,
50
+ box: 3,
51
+ debug: 4,
52
+ trace: 5,
53
+ verbose: Number.POSITIVE_INFINITY
54
+ };
55
+ const LogTypes = {
56
+ silent: { level: -1 },
57
+ fatal: { level: LogLevels.fatal },
58
+ error: { level: LogLevels.error },
59
+ warn: { level: LogLevels.warn },
60
+ log: { level: LogLevels.log },
61
+ info: { level: LogLevels.info },
62
+ success: { level: LogLevels.success },
63
+ fail: { level: LogLevels.fail },
64
+ ready: { level: LogLevels.info },
65
+ start: { level: LogLevels.info },
66
+ box: { level: LogLevels.info },
67
+ debug: { level: LogLevels.debug },
68
+ trace: { level: LogLevels.trace },
69
+ verbose: { level: LogLevels.verbose }
70
+ };
71
+
72
+ //#endregion
73
+ //#region consola/utils/log.ts
81
74
  function isPlainObject(obj) {
82
- return Object.prototype.toString.call(obj) === "[object Object]";
75
+ return Object.prototype.toString.call(obj) === "[object Object]";
83
76
  }
84
77
  function isLogObj(arg) {
85
- if (!isPlainObject(arg)) {
86
- return false;
87
- }
88
- if (!arg.message && !arg.args) {
89
- return false;
90
- }
91
- if (arg.stack) {
92
- return false;
93
- }
94
- return true;
78
+ if (!isPlainObject(arg)) return false;
79
+ if (!arg.message && !arg.args) return false;
80
+ if (arg.stack) return false;
81
+ return true;
95
82
  }
96
83
 
97
- // consola/consola.ts
98
- var paused = false;
99
- var queue = [];
100
- var Consola = class _Consola {
101
- constructor(options = {}) {
102
- const types = options.types || LogTypes;
103
- this.options = defu(
104
- {
105
- ...options,
106
- defaults: { ...options.defaults },
107
- level: _normalizeLogLevel(options.level, types),
108
- reporters: [...options.reporters || []]
109
- },
110
- {
111
- types: LogTypes,
112
- throttle: 1e3,
113
- throttleMin: 5,
114
- formatOptions: {
115
- date: true,
116
- colors: false,
117
- compact: true
118
- }
119
- }
120
- );
121
- for (const type in types) {
122
- const defaults = {
123
- type,
124
- ...this.options.defaults,
125
- ...types[type]
126
- };
127
- this[type] = this._wrapLogFn(defaults);
128
- this[type].raw = this._wrapLogFn(
129
- defaults,
130
- true
131
- );
132
- }
133
- if (this.options.mockFn) {
134
- this.mockTypes();
135
- }
136
- this._lastLog = {};
137
- }
138
- get level() {
139
- return this.options.level;
140
- }
141
- set level(level) {
142
- this.options.level = _normalizeLogLevel(
143
- level,
144
- this.options.types,
145
- this.options.level
146
- );
147
- }
148
- create(options) {
149
- const instance = new _Consola({
150
- ...this.options,
151
- ...options
152
- });
153
- if (this._mockFn) {
154
- instance.mockTypes(this._mockFn);
155
- }
156
- return instance;
157
- }
158
- withDefaults(defaults) {
159
- return this.create({
160
- ...this.options,
161
- defaults: {
162
- ...this.options.defaults,
163
- ...defaults
164
- }
165
- });
166
- }
167
- withTag(tag) {
168
- return this.withDefaults({
169
- tag: this.options.defaults.tag ? `${this.options.defaults.tag}:${tag}` : tag
170
- });
171
- }
172
- addReporter(reporter) {
173
- this.options.reporters.push(reporter);
174
- return this;
175
- }
176
- removeReporter(reporter) {
177
- if (reporter) {
178
- const i = this.options.reporters.indexOf(reporter);
179
- if (i >= 0) {
180
- return this.options.reporters.splice(i, 1);
181
- }
182
- } else {
183
- this.options.reporters.splice(0);
184
- }
185
- return this;
186
- }
187
- setReporters(reporters) {
188
- this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
189
- return this;
190
- }
191
- wrapAll() {
192
- this.wrapConsole();
193
- this.wrapStd();
194
- }
195
- restoreAll() {
196
- this.restoreConsole();
197
- this.restoreStd();
198
- }
199
- wrapConsole() {
200
- for (const type in this.options.types) {
201
- if (!console[`__${type}`]) {
202
- ;
203
- console[`__${type}`] = console[type];
204
- }
205
- ;
206
- console[type] = this[type].raw;
207
- }
208
- }
209
- restoreConsole() {
210
- for (const type in this.options.types) {
211
- if (console[`__${type}`]) {
212
- ;
213
- console[type] = console[`__${type}`];
214
- delete console[`__${type}`];
215
- }
216
- }
217
- }
218
- wrapStd() {
219
- this._wrapStream(this.options.stdout, "log");
220
- this._wrapStream(this.options.stderr, "log");
221
- }
222
- _wrapStream(stream, type) {
223
- if (!stream) {
224
- return;
225
- }
226
- if (!stream.__write) {
227
- ;
228
- stream.__write = stream.write;
229
- }
230
- ;
231
- stream.write = (data) => {
232
- ;
233
- this[type].raw(String(data).trim());
234
- };
235
- }
236
- restoreStd() {
237
- this._restoreStream(this.options.stdout);
238
- this._restoreStream(this.options.stderr);
239
- }
240
- _restoreStream(stream) {
241
- if (!stream) {
242
- return;
243
- }
244
- if (stream.__write) {
245
- stream.write = stream.__write;
246
- delete stream.__write;
247
- }
248
- }
249
- pauseLogs() {
250
- paused = true;
251
- }
252
- resumeLogs() {
253
- paused = false;
254
- const _queue = queue.splice(0);
255
- for (const item of _queue) {
256
- item[0]._logFn(item[1], item[2]);
257
- }
258
- }
259
- mockTypes(mockFn) {
260
- const _mockFn = mockFn || this.options.mockFn;
261
- this._mockFn = _mockFn;
262
- if (typeof _mockFn !== "function") {
263
- return;
264
- }
265
- for (const type in this.options.types) {
266
- ;
267
- this[type] = _mockFn(type, this.options.types[type]) || this[type];
268
- this[type].raw = this[type];
269
- }
270
- }
271
- _wrapLogFn(defaults, isRaw) {
272
- return (...args) => {
273
- if (paused) {
274
- queue.push([this, defaults, args, isRaw]);
275
- return;
276
- }
277
- return this._logFn(defaults, args, isRaw);
278
- };
279
- }
280
- _logFn(defaults, args, isRaw) {
281
- if ((defaults.level || 0) > this.level) {
282
- return false;
283
- }
284
- const logObj = {
285
- date: /* @__PURE__ */ new Date(),
286
- args: [],
287
- ...defaults,
288
- level: _normalizeLogLevel(defaults.level, this.options.types)
289
- };
290
- if (!isRaw && args.length === 1 && isLogObj(args[0])) {
291
- Object.assign(logObj, args[0]);
292
- } else {
293
- logObj.args = [...args];
294
- }
295
- if (logObj.message) {
296
- logObj.args.unshift(logObj.message);
297
- delete logObj.message;
298
- }
299
- if (logObj.additional) {
300
- if (!Array.isArray(logObj.additional)) {
301
- logObj.additional = logObj.additional.split("\n");
302
- }
303
- logObj.args.push(`
304
- ${logObj.additional.join("\n")}`);
305
- delete logObj.additional;
306
- }
307
- logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
308
- logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
309
- const resolveLog = (newLog = false) => {
310
- const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
311
- if (this._lastLog.object && repeated > 0) {
312
- const args2 = [...this._lastLog.object.args];
313
- if (repeated > 1) {
314
- args2.push(`(repeated ${repeated} times)`);
315
- }
316
- this._log({ ...this._lastLog.object, args: args2 });
317
- this._lastLog.count = 1;
318
- }
319
- if (newLog) {
320
- this._lastLog.object = logObj;
321
- this._log(logObj);
322
- }
323
- };
324
- clearTimeout(this._lastLog.timeout);
325
- const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
326
- this._lastLog.time = logObj.date;
327
- if (diffTime < this.options.throttle) {
328
- try {
329
- const serializedLog = JSON.stringify([
330
- logObj.type,
331
- logObj.tag,
332
- logObj.args
333
- ]);
334
- const isSameLog = this._lastLog.serialized === serializedLog;
335
- this._lastLog.serialized = serializedLog;
336
- if (isSameLog) {
337
- this._lastLog.count = (this._lastLog.count || 0) + 1;
338
- if (this._lastLog.count > this.options.throttleMin) {
339
- this._lastLog.timeout = setTimeout(
340
- resolveLog,
341
- this.options.throttle
342
- );
343
- return;
344
- }
345
- }
346
- } catch {
347
- }
348
- }
349
- resolveLog(true);
350
- }
351
- _log(logObj) {
352
- for (const reporter of this.options.reporters) {
353
- reporter.log(logObj, {
354
- options: this.options
355
- });
356
- }
357
- }
84
+ //#endregion
85
+ //#region consola/consola.ts
86
+ let paused = false;
87
+ const queue = [];
88
+ var Consola = class Consola {
89
+ constructor(options = {}) {
90
+ const types = options.types || LogTypes;
91
+ this.options = defu({
92
+ ...options,
93
+ defaults: { ...options.defaults },
94
+ level: _normalizeLogLevel(options.level, types),
95
+ reporters: [...options.reporters || []]
96
+ }, {
97
+ types: LogTypes,
98
+ throttle: 1e3,
99
+ throttleMin: 5,
100
+ formatOptions: {
101
+ date: true,
102
+ colors: false,
103
+ compact: true
104
+ }
105
+ });
106
+ for (const type in types) {
107
+ const defaults = {
108
+ type,
109
+ ...this.options.defaults,
110
+ ...types[type]
111
+ };
112
+ this[type] = this._wrapLogFn(defaults);
113
+ this[type].raw = this._wrapLogFn(defaults, true);
114
+ }
115
+ if (this.options.mockFn) this.mockTypes();
116
+ this._lastLog = {};
117
+ }
118
+ get level() {
119
+ return this.options.level;
120
+ }
121
+ set level(level) {
122
+ this.options.level = _normalizeLogLevel(level, this.options.types, this.options.level);
123
+ }
124
+ create(options) {
125
+ const instance = new Consola({
126
+ ...this.options,
127
+ ...options
128
+ });
129
+ if (this._mockFn) instance.mockTypes(this._mockFn);
130
+ return instance;
131
+ }
132
+ withDefaults(defaults) {
133
+ return this.create({
134
+ ...this.options,
135
+ defaults: {
136
+ ...this.options.defaults,
137
+ ...defaults
138
+ }
139
+ });
140
+ }
141
+ withTag(tag) {
142
+ return this.withDefaults({ tag: this.options.defaults.tag ? `${this.options.defaults.tag}:${tag}` : tag });
143
+ }
144
+ addReporter(reporter) {
145
+ this.options.reporters.push(reporter);
146
+ return this;
147
+ }
148
+ removeReporter(reporter) {
149
+ if (reporter) {
150
+ const i = this.options.reporters.indexOf(reporter);
151
+ if (i !== -1) return this.options.reporters.splice(i, 1);
152
+ } else this.options.reporters.splice(0);
153
+ return this;
154
+ }
155
+ setReporters(reporters) {
156
+ this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
157
+ return this;
158
+ }
159
+ wrapAll() {
160
+ this.wrapConsole();
161
+ this.wrapStd();
162
+ }
163
+ restoreAll() {
164
+ this.restoreConsole();
165
+ this.restoreStd();
166
+ }
167
+ wrapConsole() {
168
+ for (const type in this.options.types) {
169
+ if (!console[`__${type}`]) console[`__${type}`] = console[type];
170
+ console[type] = this[type].raw;
171
+ }
172
+ }
173
+ restoreConsole() {
174
+ for (const type in this.options.types) if (console[`__${type}`]) {
175
+ console[type] = console[`__${type}`];
176
+ delete console[`__${type}`];
177
+ }
178
+ }
179
+ wrapStd() {
180
+ this._wrapStream(this.options.stdout, "log");
181
+ this._wrapStream(this.options.stderr, "log");
182
+ }
183
+ _wrapStream(stream, type) {
184
+ if (!stream) return;
185
+ if (!stream.__write) stream.__write = stream.write;
186
+ stream.write = (data) => {
187
+ this[type].raw(String(data).trim());
188
+ };
189
+ }
190
+ restoreStd() {
191
+ this._restoreStream(this.options.stdout);
192
+ this._restoreStream(this.options.stderr);
193
+ }
194
+ _restoreStream(stream) {
195
+ if (!stream) return;
196
+ if (stream.__write) {
197
+ stream.write = stream.__write;
198
+ delete stream.__write;
199
+ }
200
+ }
201
+ pauseLogs() {
202
+ paused = true;
203
+ }
204
+ resumeLogs() {
205
+ paused = false;
206
+ const _queue = queue.splice(0);
207
+ for (const item of _queue) item[0]._logFn(item[1], item[2]);
208
+ }
209
+ mockTypes(mockFn) {
210
+ const _mockFn = mockFn || this.options.mockFn;
211
+ this._mockFn = _mockFn;
212
+ if (typeof _mockFn !== "function") return;
213
+ for (const type in this.options.types) {
214
+ this[type] = _mockFn(type, this.options.types[type]) || this[type];
215
+ this[type].raw = this[type];
216
+ }
217
+ }
218
+ _wrapLogFn(defaults, isRaw) {
219
+ return (...args) => {
220
+ if (paused) {
221
+ queue.push([
222
+ this,
223
+ defaults,
224
+ args,
225
+ isRaw
226
+ ]);
227
+ return;
228
+ }
229
+ return this._logFn(defaults, args, isRaw);
230
+ };
231
+ }
232
+ _logFn(defaults, args, isRaw) {
233
+ if ((defaults.level || 0) > this.level) return false;
234
+ const logObj = {
235
+ date: new Date(),
236
+ args: [],
237
+ ...defaults,
238
+ level: _normalizeLogLevel(defaults.level, this.options.types)
239
+ };
240
+ if (!isRaw && args.length === 1 && isLogObj(args[0])) Object.assign(logObj, args[0]);
241
+ else logObj.args = [...args];
242
+ if (logObj.message) {
243
+ logObj.args.unshift(logObj.message);
244
+ delete logObj.message;
245
+ }
246
+ if (logObj.additional) {
247
+ if (!Array.isArray(logObj.additional)) logObj.additional = logObj.additional.split("\n");
248
+ logObj.args.push(`\n${logObj.additional.join("\n")}`);
249
+ delete logObj.additional;
250
+ }
251
+ logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
252
+ logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
253
+ /**
254
+ * @param newLog false if the throttle expired and
255
+ * we don't want to log a duplicate
256
+ */
257
+ const resolveLog = (newLog = false) => {
258
+ const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
259
+ if (this._lastLog.object && repeated > 0) {
260
+ const args$1 = [...this._lastLog.object.args];
261
+ if (repeated > 1) args$1.push(`(repeated ${repeated} times)`);
262
+ this._log({
263
+ ...this._lastLog.object,
264
+ args: args$1
265
+ });
266
+ this._lastLog.count = 1;
267
+ }
268
+ if (newLog) {
269
+ this._lastLog.object = logObj;
270
+ this._log(logObj);
271
+ }
272
+ };
273
+ clearTimeout(this._lastLog.timeout);
274
+ const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
275
+ this._lastLog.time = logObj.date;
276
+ if (diffTime < this.options.throttle) try {
277
+ const serializedLog = JSON.stringify([
278
+ logObj.type,
279
+ logObj.tag,
280
+ logObj.args
281
+ ]);
282
+ const isSameLog = this._lastLog.serialized === serializedLog;
283
+ this._lastLog.serialized = serializedLog;
284
+ if (isSameLog) {
285
+ this._lastLog.count = (this._lastLog.count || 0) + 1;
286
+ if (this._lastLog.count > this.options.throttleMin) {
287
+ this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
288
+ return;
289
+ }
290
+ }
291
+ } catch {}
292
+ resolveLog(true);
293
+ }
294
+ _log(logObj) {
295
+ for (const reporter of this.options.reporters) reporter.log(logObj, { options: this.options });
296
+ }
358
297
  };
359
298
  function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
360
- if (input === void 0) {
361
- return defaultLevel;
362
- }
363
- if (typeof input === "number") {
364
- return input;
365
- }
366
- if (types[input] && types[input].level !== void 0) {
367
- return types[input].level;
368
- }
369
- return defaultLevel;
299
+ if (input === void 0) return defaultLevel;
300
+ if (typeof input === "number") return input;
301
+ if (types[input] && types[input].level !== void 0) return types[input].level;
302
+ return defaultLevel;
370
303
  }
371
304
  Consola.prototype.add = Consola.prototype.addReporter;
372
305
  Consola.prototype.remove = Consola.prototype.removeReporter;
@@ -375,750 +308,612 @@ Consola.prototype.withScope = Consola.prototype.withTag;
375
308
  Consola.prototype.mock = Consola.prototype.mockTypes;
376
309
  Consola.prototype.pause = Consola.prototype.pauseLogs;
377
310
  Consola.prototype.resume = Consola.prototype.resumeLogs;
378
- function createConsola(options = {}) {
379
- return new Consola(options);
311
+ function createConsola$1(options = {}) {
312
+ return new Consola(options);
380
313
  }
381
314
 
382
- // consola/reporters/basic.ts
383
- import { formatWithOptions } from "util";
384
-
385
- // consola/utils/error.ts
386
- import { sep } from "path";
315
+ //#endregion
316
+ //#region consola/utils/error.ts
387
317
  function parseStack(stack) {
388
- const cwd = process.cwd() + sep;
389
- const lines = stack.split("\n").splice(1).map((l) => l.trim().replace("file://", "").replace(cwd, ""));
390
- return lines;
318
+ const cwd = process.cwd() + sep;
319
+ const lines = stack.split("\n").splice(1).map((l) => l.trim().replace("file://", "").replace(cwd, ""));
320
+ return lines;
391
321
  }
392
322
 
393
- // consola/utils/stream.ts
323
+ //#endregion
324
+ //#region consola/utils/stream.ts
394
325
  function writeStream(data, stream) {
395
- const write = stream.__write || stream.write;
396
- return write.call(stream, data);
326
+ const write = stream.__write || stream.write;
327
+ return write.call(stream, data);
397
328
  }
398
329
 
399
- // consola/reporters/basic.ts
400
- var bracket = (x) => x ? `[${x}]` : "";
330
+ //#endregion
331
+ //#region consola/reporters/basic.ts
332
+ const bracket = (x) => x ? `[${x}]` : "";
401
333
  var BasicReporter = class {
402
- formatStack(stack, opts) {
403
- return ` ${parseStack(stack).join("\n ")}`;
404
- }
405
- formatArgs(args, opts) {
406
- const _args = args.map((arg) => {
407
- if (arg && typeof arg.stack === "string") {
408
- return `${arg.message}
409
- ${this.formatStack(arg.stack, opts)}`;
410
- }
411
- return arg;
412
- });
413
- return formatWithOptions(opts, ..._args);
414
- }
415
- formatDate(date, opts) {
416
- return opts.date ? date.toLocaleTimeString() : "";
417
- }
418
- filterAndJoin(arr) {
419
- return arr.filter(Boolean).join(" ");
420
- }
421
- formatLogObj(logObj, opts) {
422
- const message = this.formatArgs(logObj.args, opts);
423
- if (logObj.type === "box") {
424
- return `
425
- ${[
426
- bracket(logObj.tag),
427
- logObj.title && logObj.title,
428
- ...message.split("\n")
429
- ].filter(Boolean).map((l) => ` > ${l}`).join("\n")}
430
- `;
431
- }
432
- return this.filterAndJoin([
433
- bracket(logObj.type),
434
- bracket(logObj.tag),
435
- message
436
- ]);
437
- }
438
- log(logObj, ctx) {
439
- const line = this.formatLogObj(logObj, {
440
- columns: ctx.options.stdout.columns || 0,
441
- ...ctx.options.formatOptions
442
- });
443
- return writeStream(
444
- `${line}
445
- `,
446
- logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout
447
- );
448
- }
334
+ formatStack(stack, _opts) {
335
+ return ` ${parseStack(stack).join("\n ")}`;
336
+ }
337
+ formatArgs(args, opts) {
338
+ const _args = args.map((arg) => {
339
+ if (arg && typeof arg.stack === "string") return `${arg.message}\n${this.formatStack(arg.stack, opts)}`;
340
+ return arg;
341
+ });
342
+ return formatWithOptions(opts, ..._args);
343
+ }
344
+ formatDate(date, opts) {
345
+ return opts.date ? date.toLocaleTimeString() : "";
346
+ }
347
+ filterAndJoin(arr) {
348
+ return arr.filter(Boolean).join(" ");
349
+ }
350
+ formatLogObj(logObj, opts) {
351
+ const message = this.formatArgs(logObj.args, opts);
352
+ if (logObj.type === "box") return `\n${[
353
+ bracket(logObj.tag),
354
+ logObj.title && logObj.title,
355
+ ...message.split("\n")
356
+ ].filter(Boolean).map((l) => ` > ${l}`).join("\n")}\n`;
357
+ return this.filterAndJoin([
358
+ bracket(logObj.type),
359
+ bracket(logObj.tag),
360
+ message
361
+ ]);
362
+ }
363
+ log(logObj, ctx) {
364
+ const line = this.formatLogObj(logObj, {
365
+ columns: ctx.options.stdout.columns || 0,
366
+ ...ctx.options.formatOptions
367
+ });
368
+ return writeStream(`${line}\n`, logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
369
+ }
449
370
  };
450
371
 
451
- // ../../node_modules/.pnpm/@innei+string-width@7.1.1-fork.0/node_modules/@innei/string-width/dist/index.mjs
452
- function ansiRegex({ onlyFirst = false } = {}) {
453
- const pattern = [
454
- "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
455
- "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
456
- ].join("|");
457
- return new RegExp(pattern, onlyFirst ? void 0 : "g");
372
+ //#endregion
373
+ //#region ../../node_modules/.pnpm/ansi-regex@6.1.0/node_modules/ansi-regex/index.js
374
+ function ansiRegex$1({ onlyFirst = false } = {}) {
375
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
376
+ const pattern = [`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`, "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
377
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
458
378
  }
459
- var regex = ansiRegex();
460
- function stripAnsi(string) {
461
- if (typeof string !== "string") {
462
- throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
463
- }
464
- return string.replace(regex, "");
379
+
380
+ //#endregion
381
+ //#region ../../node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js
382
+ const regex = ansiRegex$1();
383
+ function stripAnsi$1(string) {
384
+ if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
385
+ return string.replace(regex, "");
465
386
  }
387
+
388
+ //#endregion
389
+ //#region ../../node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/lookup.js
466
390
  function isAmbiguous(x) {
467
- return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
391
+ return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
468
392
  }
469
393
  function isFullWidth(x) {
470
- return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
394
+ return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
471
395
  }
472
396
  function isWide(x) {
473
- return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
397
+ return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
474
398
  }
399
+
400
+ //#endregion
401
+ //#region ../../node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/index.js
475
402
  function validate(codePoint) {
476
- if (!Number.isSafeInteger(codePoint)) {
477
- throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
478
- }
403
+ if (!Number.isSafeInteger(codePoint)) throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
479
404
  }
480
405
  function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
481
- validate(codePoint);
482
- if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
483
- return 2;
484
- }
485
- return 1;
406
+ validate(codePoint);
407
+ if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) return 2;
408
+ return 1;
486
409
  }
487
- var emoji_regex_default = () => {
488
- 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\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]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\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])?|[\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-\uDF43\uDF45-\uDF4A\uDF4C-\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]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\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(?:[\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\uDEB5](?:\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-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\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])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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;
489
- };
490
- var segmenter = new Intl.Segmenter();
491
- function stringWidth(string, options = {}) {
492
- if (typeof string !== "string" || string.length === 0) {
493
- return 0;
494
- }
495
- const {
496
- ambiguousIsNarrow = true,
497
- countAnsiEscapeCodes = false
498
- } = options;
499
- if (!countAnsiEscapeCodes) {
500
- string = stripAnsi(string);
501
- }
502
- if (string.length === 0) {
503
- return 0;
504
- }
505
- let width = 0;
506
- const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
507
- for (const { segment: character } of segmenter.segment(string)) {
508
- const codePoint = character.codePointAt(0);
509
- if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
510
- continue;
511
- }
512
- if (codePoint >= 768 && codePoint <= 879) {
513
- continue;
514
- }
515
- if (emoji_regex_default().test(character)) {
516
- width += 2;
517
- continue;
518
- }
519
- width += eastAsianWidth(codePoint, eastAsianWidthOptions);
520
- }
521
- return width;
410
+
411
+ //#endregion
412
+ //#region ../../node_modules/.pnpm/emoji-regex@10.4.0/node_modules/emoji-regex/index.js
413
+ var require_emoji_regex = __commonJS({ "../../node_modules/.pnpm/emoji-regex@10.4.0/node_modules/emoji-regex/index.js"(exports, module) {
414
+ module.exports = () => {
415
+ 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\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](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\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]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\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])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\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-\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]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\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(?:[\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\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\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-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\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-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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;
416
+ };
417
+ } });
418
+
419
+ //#endregion
420
+ //#region ../../node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js
421
+ var import_emoji_regex = __toESM(require_emoji_regex(), 1);
422
+ const segmenter = new Intl.Segmenter();
423
+ const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
424
+ function stringWidth$1(string, options = {}) {
425
+ if (typeof string !== "string" || string.length === 0) return 0;
426
+ const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;
427
+ if (!countAnsiEscapeCodes) string = stripAnsi$1(string);
428
+ if (string.length === 0) return 0;
429
+ let width = 0;
430
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
431
+ for (const { segment: character } of segmenter.segment(string)) {
432
+ const codePoint = character.codePointAt(0);
433
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue;
434
+ if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) continue;
435
+ if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) continue;
436
+ if (codePoint >= 55296 && codePoint <= 57343) continue;
437
+ if (codePoint >= 65024 && codePoint <= 65039) continue;
438
+ if (defaultIgnorableCodePointRegex.test(character)) continue;
439
+ if ((0, import_emoji_regex.default)().test(character)) {
440
+ width += 2;
441
+ continue;
442
+ }
443
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
444
+ }
445
+ return width;
522
446
  }
523
447
 
524
- // consola/utils/color.ts
525
- import * as tty from "tty";
526
- var {
527
- env = {},
528
- argv = [],
529
- platform = ""
530
- } = typeof process === "undefined" ? {} : process;
531
- var isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
532
- var isForced = "FORCE_COLOR" in env || argv.includes("--color");
533
- var isWindows = platform === "win32";
534
- var isDumbTerminal = env.TERM === "dumb";
535
- var isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
536
- var isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
537
- var isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
448
+ //#endregion
449
+ //#region consola/utils/color.ts
450
+ const { env = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process;
451
+ const isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
452
+ const isForced = "FORCE_COLOR" in env || argv.includes("--color");
453
+ const isWindows = platform === "win32";
454
+ const isDumbTerminal = env.TERM === "dumb";
455
+ const isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
456
+ const isCI$1 = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
457
+ const isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI$1);
538
458
  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)) {
539
- return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
459
+ return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
540
460
  }
541
461
  function clearBleed(index, string, open, close, replace) {
542
- return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
462
+ return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
543
463
  }
544
464
  function filterEmpty(open, close, replace = open, at = open.length + 1) {
545
- return (string) => string || !(string === "" || string === void 0) ? clearBleed(`${string}`.indexOf(close, at), string, open, close, replace) : "";
465
+ return (string) => string || !(string === "" || string === void 0) ? clearBleed(`${string}`.indexOf(close, at), string, open, close, replace) : "";
546
466
  }
547
467
  function init(open, close, replace) {
548
- return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
468
+ return filterEmpty(`\u001B[${open}m`, `\u001B[${close}m`, replace);
549
469
  }
550
- var colorDefs = {
551
- reset: init(0, 0),
552
- bold: init(1, 22, "\x1B[22m\x1B[1m"),
553
- dim: init(2, 22, "\x1B[22m\x1B[2m"),
554
- italic: init(3, 23),
555
- underline: init(4, 24),
556
- inverse: init(7, 27),
557
- hidden: init(8, 28),
558
- strikethrough: init(9, 29),
559
- black: init(30, 39),
560
- red: init(31, 39),
561
- green: init(32, 39),
562
- yellow: init(33, 39),
563
- blue: init(34, 39),
564
- magenta: init(35, 39),
565
- cyan: init(36, 39),
566
- white: init(37, 39),
567
- gray: init(90, 39),
568
- bgBlack: init(40, 49),
569
- bgRed: init(41, 49),
570
- bgGreen: init(42, 49),
571
- bgYellow: init(43, 49),
572
- bgBlue: init(44, 49),
573
- bgMagenta: init(45, 49),
574
- bgCyan: init(46, 49),
575
- bgWhite: init(47, 49),
576
- blackBright: init(90, 39),
577
- redBright: init(91, 39),
578
- greenBright: init(92, 39),
579
- yellowBright: init(93, 39),
580
- blueBright: init(94, 39),
581
- magentaBright: init(95, 39),
582
- cyanBright: init(96, 39),
583
- whiteBright: init(97, 39),
584
- bgBlackBright: init(100, 49),
585
- bgRedBright: init(101, 49),
586
- bgGreenBright: init(102, 49),
587
- bgYellowBright: init(103, 49),
588
- bgBlueBright: init(104, 49),
589
- bgMagentaBright: init(105, 49),
590
- bgCyanBright: init(106, 49),
591
- bgWhiteBright: init(107, 49)
470
+ const colorDefs = {
471
+ reset: init(0, 0),
472
+ bold: init(1, 22, "\x1B[22m\x1B[1m"),
473
+ dim: init(2, 22, "\x1B[22m\x1B[2m"),
474
+ italic: init(3, 23),
475
+ underline: init(4, 24),
476
+ inverse: init(7, 27),
477
+ hidden: init(8, 28),
478
+ strikethrough: init(9, 29),
479
+ black: init(30, 39),
480
+ red: init(31, 39),
481
+ green: init(32, 39),
482
+ yellow: init(33, 39),
483
+ blue: init(34, 39),
484
+ magenta: init(35, 39),
485
+ cyan: init(36, 39),
486
+ white: init(37, 39),
487
+ gray: init(90, 39),
488
+ bgBlack: init(40, 49),
489
+ bgRed: init(41, 49),
490
+ bgGreen: init(42, 49),
491
+ bgYellow: init(43, 49),
492
+ bgBlue: init(44, 49),
493
+ bgMagenta: init(45, 49),
494
+ bgCyan: init(46, 49),
495
+ bgWhite: init(47, 49),
496
+ blackBright: init(90, 39),
497
+ redBright: init(91, 39),
498
+ greenBright: init(92, 39),
499
+ yellowBright: init(93, 39),
500
+ blueBright: init(94, 39),
501
+ magentaBright: init(95, 39),
502
+ cyanBright: init(96, 39),
503
+ whiteBright: init(97, 39),
504
+ bgBlackBright: init(100, 49),
505
+ bgRedBright: init(101, 49),
506
+ bgGreenBright: init(102, 49),
507
+ bgYellowBright: init(103, 49),
508
+ bgBlueBright: init(104, 49),
509
+ bgMagentaBright: init(105, 49),
510
+ bgCyanBright: init(106, 49),
511
+ bgWhiteBright: init(107, 49)
592
512
  };
593
513
  function createColors(useColor = isColorSupported) {
594
- return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
514
+ return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
595
515
  }
596
- var colors = createColors();
597
- function getColor(color, fallback = "reset") {
598
- return colors[color] || colors[fallback];
516
+ const colors = createColors();
517
+ function getColor$1(color, fallback = "reset") {
518
+ return colors[color] || colors[fallback];
599
519
  }
600
520
 
601
- // consola/utils/string.ts
602
- var ansiRegex2 = [
603
- "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
604
- "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
605
- ].join("|");
606
- function stripAnsi2(text) {
607
- return text.replace(new RegExp(ansiRegex2, "g"), "");
521
+ //#endregion
522
+ //#region consola/utils/string.ts
523
+ const ansiRegex = ["[\\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("|");
524
+ function stripAnsi(text) {
525
+ return text.replaceAll(new RegExp(ansiRegex, "g"), "");
608
526
  }
609
527
 
610
- // consola/utils/box.ts
611
- var boxStylePresets = {
612
- solid: {
613
- tl: "\u250C",
614
- tr: "\u2510",
615
- bl: "\u2514",
616
- br: "\u2518",
617
- h: "\u2500",
618
- v: "\u2502"
619
- },
620
- double: {
621
- tl: "\u2554",
622
- tr: "\u2557",
623
- bl: "\u255A",
624
- br: "\u255D",
625
- h: "\u2550",
626
- v: "\u2551"
627
- },
628
- doubleSingle: {
629
- tl: "\u2553",
630
- tr: "\u2556",
631
- bl: "\u2559",
632
- br: "\u255C",
633
- h: "\u2500",
634
- v: "\u2551"
635
- },
636
- doubleSingleRounded: {
637
- tl: "\u256D",
638
- tr: "\u256E",
639
- bl: "\u2570",
640
- br: "\u256F",
641
- h: "\u2500",
642
- v: "\u2551"
643
- },
644
- singleThick: {
645
- tl: "\u250F",
646
- tr: "\u2513",
647
- bl: "\u2517",
648
- br: "\u251B",
649
- h: "\u2501",
650
- v: "\u2503"
651
- },
652
- singleDouble: {
653
- tl: "\u2552",
654
- tr: "\u2555",
655
- bl: "\u2558",
656
- br: "\u255B",
657
- h: "\u2550",
658
- v: "\u2502"
659
- },
660
- singleDoubleRounded: {
661
- tl: "\u256D",
662
- tr: "\u256E",
663
- bl: "\u2570",
664
- br: "\u256F",
665
- h: "\u2550",
666
- v: "\u2502"
667
- },
668
- rounded: {
669
- tl: "\u256D",
670
- tr: "\u256E",
671
- bl: "\u2570",
672
- br: "\u256F",
673
- h: "\u2500",
674
- v: "\u2502"
675
- }
528
+ //#endregion
529
+ //#region consola/utils/box.ts
530
+ const boxStylePresets = {
531
+ solid: {
532
+ tl: "",
533
+ tr: "",
534
+ bl: "",
535
+ br: "",
536
+ h: "",
537
+ v: "│"
538
+ },
539
+ double: {
540
+ tl: "",
541
+ tr: "",
542
+ bl: "",
543
+ br: "",
544
+ h: "",
545
+ v: "║"
546
+ },
547
+ doubleSingle: {
548
+ tl: "",
549
+ tr: "",
550
+ bl: "",
551
+ br: "",
552
+ h: "",
553
+ v: "║"
554
+ },
555
+ doubleSingleRounded: {
556
+ tl: "",
557
+ tr: "",
558
+ bl: "",
559
+ br: "",
560
+ h: "",
561
+ v: "║"
562
+ },
563
+ singleThick: {
564
+ tl: "",
565
+ tr: "",
566
+ bl: "",
567
+ br: "",
568
+ h: "",
569
+ v: "┃"
570
+ },
571
+ singleDouble: {
572
+ tl: "",
573
+ tr: "",
574
+ bl: "",
575
+ br: "",
576
+ h: "",
577
+ v: "│"
578
+ },
579
+ singleDoubleRounded: {
580
+ tl: "",
581
+ tr: "",
582
+ bl: "",
583
+ br: "",
584
+ h: "",
585
+ v: "│"
586
+ },
587
+ rounded: {
588
+ tl: "",
589
+ tr: "",
590
+ bl: "",
591
+ br: "",
592
+ h: "",
593
+ v: "│"
594
+ }
676
595
  };
677
- var defaultStyle = {
678
- borderColor: "white",
679
- borderStyle: "rounded",
680
- valign: "center",
681
- padding: 2,
682
- marginLeft: 1,
683
- marginTop: 1,
684
- marginBottom: 1
596
+ const defaultStyle = {
597
+ borderColor: "white",
598
+ borderStyle: "rounded",
599
+ valign: "center",
600
+ padding: 2,
601
+ marginLeft: 1,
602
+ marginTop: 1,
603
+ marginBottom: 1
685
604
  };
686
605
  function box(text, _opts = {}) {
687
- const opts = {
688
- ..._opts,
689
- style: {
690
- ...defaultStyle,
691
- ..._opts.style
692
- }
693
- };
694
- const textLines = text.split("\n");
695
- const boxLines = [];
696
- const _color = getColor(opts.style.borderColor);
697
- const borderStyle = {
698
- ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle
699
- };
700
- if (_color) {
701
- for (const key in borderStyle) {
702
- borderStyle[key] = _color(
703
- borderStyle[key]
704
- );
705
- }
706
- }
707
- const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
708
- const height = textLines.length + paddingOffset;
709
- const width = Math.max(...textLines.map((line) => line.length)) + paddingOffset;
710
- const widthOffset = width + paddingOffset;
711
- const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
712
- if (opts.style.marginTop > 0) {
713
- boxLines.push("".repeat(opts.style.marginTop));
714
- }
715
- if (opts.title) {
716
- const left = borderStyle.h.repeat(
717
- Math.floor((width - stripAnsi2(opts.title).length) / 2)
718
- );
719
- const right = borderStyle.h.repeat(
720
- width - stripAnsi2(opts.title).length - stripAnsi2(left).length + paddingOffset
721
- );
722
- boxLines.push(
723
- `${leftSpace}${borderStyle.tl}${left}${opts.title}${right}${borderStyle.tr}`
724
- );
725
- } else {
726
- boxLines.push(
727
- `${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`
728
- );
729
- }
730
- const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
731
- for (let i = 0; i < height; i++) {
732
- if (i < valignOffset || i >= valignOffset + textLines.length) {
733
- boxLines.push(
734
- `${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`
735
- );
736
- } else {
737
- const line = textLines[i - valignOffset];
738
- const left = " ".repeat(paddingOffset);
739
- const right = " ".repeat(width - stripAnsi2(line).length);
740
- boxLines.push(
741
- `${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`
742
- );
743
- }
744
- }
745
- boxLines.push(
746
- `${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`
747
- );
748
- if (opts.style.marginBottom > 0) {
749
- boxLines.push("".repeat(opts.style.marginBottom));
750
- }
751
- return boxLines.join("\n");
606
+ const opts = {
607
+ ..._opts,
608
+ style: {
609
+ ...defaultStyle,
610
+ ..._opts.style
611
+ }
612
+ };
613
+ const textLines = text.split("\n");
614
+ const boxLines = [];
615
+ const _color = getColor$1(opts.style.borderColor);
616
+ const borderStyle = { ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle };
617
+ if (_color) for (const key in borderStyle) borderStyle[key] = _color(borderStyle[key]);
618
+ const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
619
+ const height = textLines.length + paddingOffset;
620
+ const width = Math.max(...textLines.map((line) => line.length)) + paddingOffset;
621
+ const widthOffset = width + paddingOffset;
622
+ const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
623
+ if (opts.style.marginTop > 0) boxLines.push("".repeat(opts.style.marginTop));
624
+ if (opts.title) {
625
+ const left = borderStyle.h.repeat(Math.floor((width - stripAnsi(opts.title).length) / 2));
626
+ const right = borderStyle.h.repeat(width - stripAnsi(opts.title).length - stripAnsi(left).length + paddingOffset);
627
+ boxLines.push(`${leftSpace}${borderStyle.tl}${left}${opts.title}${right}${borderStyle.tr}`);
628
+ } else boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
629
+ const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
630
+ for (let i = 0; i < height; i++) if (i < valignOffset || i >= valignOffset + textLines.length) boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
631
+ else {
632
+ const line = textLines[i - valignOffset];
633
+ const left = " ".repeat(paddingOffset);
634
+ const right = " ".repeat(width - stripAnsi(line).length);
635
+ boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
636
+ }
637
+ boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
638
+ if (opts.style.marginBottom > 0) boxLines.push("".repeat(opts.style.marginBottom));
639
+ return boxLines.join("\n");
752
640
  }
753
641
 
754
- // consola/utils/tester.ts
642
+ //#endregion
643
+ //#region consola/utils/tester.ts
755
644
  function isUnicodeSupported() {
756
- if (process.platform !== "win32") {
757
- return process.env.TERM !== "linux";
758
- }
759
- return Boolean(process.env.WT_SESSION) || // Windows Terminal
760
- Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
761
- process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
762
- process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
645
+ if (process.platform !== "win32") return process.env.TERM !== "linux";
646
+ return Boolean(process.env.WT_SESSION) || Boolean(process.env.TERMINUS_SUBLIME) || process.env.ConEmuTask === "{cmd::Cmder}" || process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
763
647
  }
764
648
 
765
- // consola/reporters/fancy.ts
766
- var TYPE_COLOR_MAP = {
767
- info: "cyan",
768
- fail: "red",
769
- success: "green",
770
- ready: "green",
771
- start: "magenta"
649
+ //#endregion
650
+ //#region consola/reporters/fancy.ts
651
+ const TYPE_COLOR_MAP = {
652
+ info: "cyan",
653
+ fail: "red",
654
+ success: "green",
655
+ ready: "green",
656
+ start: "magenta"
772
657
  };
773
- var LEVEL_COLOR_MAP = {
774
- 0: "red",
775
- 1: "yellow"
658
+ const LEVEL_COLOR_MAP = {
659
+ 0: "red",
660
+ 1: "yellow"
776
661
  };
777
- var unicode = isUnicodeSupported();
778
- var s = (c, fallback) => unicode ? c : fallback;
779
- var TYPE_ICONS = {
780
- error: s("\u2716", "\xD7"),
781
- fatal: s("\u2716", "\xD7"),
782
- ready: s("\u2714", "\u221A"),
783
- warn: s("\u26A0", "\u203C"),
784
- info: s("\u2139", "i"),
785
- success: s("\u2714", "\u221A"),
786
- debug: s("\u2699", "D"),
787
- trace: s("\u2192", "\u2192"),
788
- fail: s("\u2716", "\xD7"),
789
- start: s("\u25D0", "o"),
790
- log: ""
662
+ const unicode = isUnicodeSupported();
663
+ const s = (c, fallback) => unicode ? c : fallback;
664
+ const TYPE_ICONS = {
665
+ error: s("", "×"),
666
+ fatal: s("", "×"),
667
+ ready: s("", ""),
668
+ warn: s("", ""),
669
+ info: s("", "i"),
670
+ success: s("", ""),
671
+ debug: s("", "D"),
672
+ trace: s("", ""),
673
+ fail: s("", "×"),
674
+ start: s("", "o"),
675
+ log: ""
791
676
  };
792
- function stringWidth2(str) {
793
- if (!Intl.Segmenter) {
794
- return stripAnsi2(str).length;
795
- }
796
- return stringWidth(str);
677
+ function stringWidth(str) {
678
+ if (!Intl.Segmenter) return stripAnsi(str).length;
679
+ return stringWidth$1(str);
797
680
  }
798
681
  var FancyReporter = class extends BasicReporter {
799
- formatStack(stack) {
800
- return `
801
- ${parseStack(stack).map(
802
- (line) => ` ${line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_, m) => `(${colors.cyan(m)})`)}`
803
- ).join("\n")}`;
804
- }
805
- formatType(logObj, isBadge, opts) {
806
- const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
807
- if (isBadge) {
808
- return getBgColor(typeColor)(
809
- colors.black(` ${logObj.type.toUpperCase()} `)
810
- );
811
- }
812
- const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
813
- return _type ? getColor2(typeColor)(_type) : "";
814
- }
815
- formatLogObj(logObj, opts) {
816
- const [message, ...additional] = this.formatArgs(logObj.args, opts).split(
817
- "\n"
818
- );
819
- if (logObj.type === "box") {
820
- return box(
821
- characterFormat(
822
- message + (additional.length > 0 ? `
823
- ${additional.join("\n")}` : "")
824
- ),
825
- {
826
- title: logObj.title ? characterFormat(logObj.title) : void 0,
827
- style: logObj.style
828
- }
829
- );
830
- }
831
- const date = this.formatDate(logObj.date, opts);
832
- const coloredDate = date && colors.gray(date);
833
- const isBadge = logObj.badge ?? logObj.level < 2;
834
- const type = this.formatType(logObj, isBadge, opts);
835
- const tag = logObj.tag ? colors.gray(logObj.tag) : "";
836
- let line;
837
- const left = this.filterAndJoin([type, characterFormat(message)]);
838
- const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
839
- const space = (opts.columns || 0) - stringWidth2(left) - stringWidth2(right) - 2;
840
- line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
841
- line += characterFormat(
842
- additional.length > 0 ? `
843
- ${additional.join("\n")}` : ""
844
- );
845
- if (logObj.type === "trace") {
846
- const _err = new Error(`Trace: ${logObj.message}`);
847
- line += this.formatStack(_err.stack || "");
848
- }
849
- return isBadge ? `
850
- ${line}
851
- ` : line;
852
- }
682
+ formatStack(stack) {
683
+ return `\n${parseStack(stack).map((line) => ` ${line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_, m) => `(${colors.cyan(m)})`)}`).join("\n")}`;
684
+ }
685
+ formatType(logObj, isBadge, _opts) {
686
+ const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
687
+ if (isBadge) return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
688
+ const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
689
+ return _type ? getColor(typeColor)(_type) : "";
690
+ }
691
+ formatLogObj(logObj, opts) {
692
+ const [message, ...additional] = this.formatArgs(logObj.args, opts).split("\n");
693
+ if (logObj.type === "box") return box(characterFormat(message + (additional.length > 0 ? `\n${additional.join("\n")}` : "")), {
694
+ title: logObj.title ? characterFormat(logObj.title) : void 0,
695
+ style: logObj.style
696
+ });
697
+ const date = this.formatDate(logObj.date, opts);
698
+ const coloredDate = date && colors.gray(date);
699
+ const isBadge = logObj.badge ?? logObj.level < 2;
700
+ const type = this.formatType(logObj, isBadge, opts);
701
+ const tag = logObj.tag ? colors.gray(logObj.tag) : "";
702
+ let line;
703
+ const left = this.filterAndJoin([type, characterFormat(message)]);
704
+ const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
705
+ const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
706
+ line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
707
+ line += characterFormat(additional.length > 0 ? `\n${additional.join("\n")}` : "");
708
+ if (logObj.type === "trace") {
709
+ const _err = new Error(`Trace: ${logObj.message}`);
710
+ line += this.formatStack(_err.stack || "");
711
+ }
712
+ return isBadge ? `\n${line}\n` : line;
713
+ }
853
714
  };
854
715
  function characterFormat(str) {
855
- return str.replace(/`([^`]+)`/gm, (_, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_, m) => ` ${colors.underline(m)} `);
716
+ return str.replaceAll(/`([^`]+)`/g, (_, m) => colors.cyan(m)).replaceAll(/\s+_([^_]+)_\s+/g, (_, m) => ` ${colors.underline(m)} `);
856
717
  }
857
- function getColor2(color = "white") {
858
- return colors[color] || colors.white;
718
+ function getColor(color = "white") {
719
+ return colors[color] || colors.white;
859
720
  }
860
721
  function getBgColor(color = "bgWhite") {
861
- return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
722
+ return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
862
723
  }
863
724
 
864
- // consola/index.ts
865
- function createConsola2(options = {}) {
866
- let level = _getDefaultLogLevel();
867
- if (process.env.CONSOLA_LEVEL) {
868
- level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
869
- }
870
- const consola2 = createConsola({
871
- level,
872
- defaults: { level },
873
- stdout: process.stdout,
874
- stderr: process.stderr,
875
- reporters: options.reporters || [
876
- options.fancy ?? !(isCI2 || isTest) ? new FancyReporter() : new BasicReporter()
877
- ],
878
- ...options
879
- });
880
- return consola2;
725
+ //#endregion
726
+ //#region consola/index.ts
727
+ function createConsola(options = {}) {
728
+ let level = _getDefaultLogLevel();
729
+ if (process.env.CONSOLA_LEVEL) level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
730
+ const consola$1 = createConsola$1({
731
+ level,
732
+ defaults: { level },
733
+ stdout: process.stdout,
734
+ stderr: process.stderr,
735
+ reporters: options.reporters || [options.fancy ?? !(isCI || isTest) ? new FancyReporter() : new BasicReporter()],
736
+ ...options
737
+ });
738
+ return consola$1;
881
739
  }
882
740
  function _getDefaultLogLevel() {
883
- if (isDebug) {
884
- return LogLevels.debug;
885
- }
886
- if (isTest) {
887
- return LogLevels.warn;
888
- }
889
- return LogLevels.info;
741
+ if (isDebug) return LogLevels.debug;
742
+ if (isTest) return LogLevels.warn;
743
+ return LogLevels.info;
890
744
  }
891
- var consola = createConsola2();
745
+ const consola = createConsola();
892
746
 
893
- // consola/reporters/file.ts
894
- import { createWriteStream } from "fs";
895
- import * as fs from "fs";
896
- import { dirname } from "path";
897
- import { CronJob } from "cron";
898
-
899
- // tool.util.ts
900
- import path from "path";
901
- var getShortTime = (date) => {
902
- return Intl.DateTimeFormat("en-US", {
903
- timeStyle: "medium",
904
- hour12: false
905
- }).format(date);
906
- };
907
- var getShortDate = (date) => {
908
- return Intl.DateTimeFormat("en-US", {
909
- dateStyle: "short"
910
- }).format(date).replace(/\//g, "-");
911
- };
912
- var getLogFilePath = (logDir, formatString) => path.resolve(logDir, formatString.replace(/%d/g, getShortDate(/* @__PURE__ */ new Date())));
747
+ //#endregion
748
+ //#region tool.util.ts
749
+ function getShortTime(date) {
750
+ return Intl.DateTimeFormat("en-US", {
751
+ timeStyle: "medium",
752
+ hour12: false
753
+ }).format(date);
754
+ }
755
+ function getShortDate(date) {
756
+ return Intl.DateTimeFormat("en-US", { dateStyle: "short" }).format(date).replaceAll("/", "-");
757
+ }
758
+ function getLogFilePath(logDir, formatString) {
759
+ return path.resolve(logDir, formatString.replaceAll("%d", getShortDate(new Date())));
760
+ }
913
761
 
914
- // consola/reporters/logger.ts
915
- import picocolors from "picocolors";
916
- import { isDevelopment } from "std-env";
762
+ //#endregion
763
+ //#region consola/reporters/logger.ts
917
764
  var LoggerReporter = class extends FancyReporter {
918
- constructor() {
919
- super(...arguments);
920
- this.latestLogTime = Date.now();
921
- }
922
- formatDate(date, opts) {
923
- const isInVirtualTerminal = typeof opts.columns === "undefined";
924
- if (isDevelopment) {
925
- const now = Date.now();
926
- const delta = now - this.latestLogTime;
927
- this.latestLogTime = now;
928
- return `+${delta | 0}ms ${super.formatDate(date, opts)}`;
929
- }
930
- return isInVirtualTerminal ? "" : super.formatDate(date, opts);
931
- }
932
- formatLogObj(logObj, opts) {
933
- const isInVirtualTerminal = typeof opts.columns === "undefined";
934
- return isInVirtualTerminal ? `${picocolors.gray(getShortTime(/* @__PURE__ */ new Date()))} ${super.formatLogObj(logObj, opts).replace(/^\n/, "")}`.trimEnd() : super.formatLogObj(logObj, opts);
935
- }
765
+ constructor(..._args) {
766
+ super(..._args);
767
+ this.latestLogTime = Date.now();
768
+ }
769
+ formatDate(date, opts) {
770
+ const isInVirtualTerminal = opts.columns === void 0;
771
+ if (isDevelopment) {
772
+ const now = Date.now();
773
+ const delta = now - this.latestLogTime;
774
+ this.latestLogTime = now;
775
+ return `+${delta | 0}ms ${super.formatDate(date, opts)}`;
776
+ }
777
+ return isInVirtualTerminal ? "" : super.formatDate(date, opts);
778
+ }
779
+ formatLogObj(logObj, opts) {
780
+ const isInVirtualTerminal = opts.columns === void 0;
781
+ return isInVirtualTerminal ? `${picocolors.gray(getShortTime(new Date()))} ${super.formatLogObj(logObj, opts).replace(/^\n/, "")}`.trimEnd() : super.formatLogObj(logObj, opts);
782
+ }
936
783
  };
937
784
 
938
- // consola/reporters/file.ts
785
+ //#endregion
786
+ //#region consola/reporters/file.ts
939
787
  var FileReporter = class extends LoggerReporter {
940
- constructor(configs) {
941
- super();
942
- this.configs = configs;
943
- this.refreshWriteStream();
944
- this.scheduleRefreshWriteStream();
945
- }
946
- scheduleRefreshWriteStream() {
947
- const { cron = "0 0 * * *" } = this.configs;
948
- const job = new CronJob(cron, this.refreshWriteStream.bind(this));
949
- job.start();
950
- this.__job = job;
951
- }
952
- teardown() {
953
- this.__job?.stop();
954
- this.stdoutStream?.end();
955
- this.stderrStream?.end();
956
- }
957
- refreshWriteStream() {
958
- const {
959
- loggerDir,
960
- stderrFileFormat = "error.log",
961
- stdoutFileFormat = "stdout_%d.log"
962
- } = this.configs;
963
- const stdoutPath = getLogFilePath(loggerDir, stdoutFileFormat);
964
- const stderrPath = getLogFilePath(loggerDir, stderrFileFormat);
965
- createLoggerFileIfNotExist(stdoutPath);
966
- createLoggerFileIfNotExist(stderrPath);
967
- const options = {
968
- encoding: "utf-8",
969
- flags: "a+"
970
- };
971
- [this.stderrStream, this.stdoutStream].forEach((stream) => {
972
- stream?.end();
973
- });
974
- this.stdoutStream = createWriteStream(stdoutPath, options);
975
- this.stderrStream = createWriteStream(stderrPath, options);
976
- [this.stderrStream, this.stdoutStream].forEach((stream) => {
977
- writeStream(
978
- "\n========================================================\n",
979
- stream
980
- );
981
- });
982
- }
983
- log(logObj, ctx) {
984
- if (!this.stdoutStream || !this.stderrStream) {
985
- return;
986
- }
987
- const finalStdout = this.stdoutStream;
988
- const finalStderr = this.stderrStream || this.stdoutStream;
989
- const line = super.formatLogObj(logObj, {
990
- ...ctx.options.formatOptions,
991
- columns: void 0
992
- });
993
- if (this.configs.errWriteToStdout && logObj.level < 2) {
994
- writeStream(`${line}
995
- `, finalStdout);
996
- }
997
- return writeStream(
998
- `${line}
999
- `,
1000
- logObj.level < 2 ? finalStderr : finalStdout
1001
- );
1002
- }
1003
- };
1004
- var createLoggerFileIfNotExist = (path2) => {
1005
- const dirPath = dirname(path2);
1006
- if (!fs.existsSync(dirPath)) {
1007
- fs.mkdirSync(dirPath, { recursive: true });
1008
- }
1009
- if (!fs.existsSync(path2)) {
1010
- fs.writeFileSync(path2, "", { flag: "wx" });
1011
- }
788
+ constructor(configs) {
789
+ super();
790
+ this.configs = configs;
791
+ this.refreshWriteStream();
792
+ this.scheduleRefreshWriteStream();
793
+ }
794
+ scheduleRefreshWriteStream() {
795
+ const { cron = "0 0 * * *" } = this.configs;
796
+ const job = new CronJob(cron, this.refreshWriteStream.bind(this));
797
+ job.start();
798
+ this.__job = job;
799
+ }
800
+ teardown() {
801
+ this.__job?.stop();
802
+ this.stdoutStream?.end();
803
+ this.stderrStream?.end();
804
+ }
805
+ refreshWriteStream() {
806
+ const { loggerDir, stderrFileFormat = "error.log", stdoutFileFormat = "stdout_%d.log" } = this.configs;
807
+ const stdoutPath = getLogFilePath(loggerDir, stdoutFileFormat);
808
+ const stderrPath = getLogFilePath(loggerDir, stderrFileFormat);
809
+ createLoggerFileIfNotExist(stdoutPath);
810
+ createLoggerFileIfNotExist(stderrPath);
811
+ const options = {
812
+ encoding: "utf-8",
813
+ flags: "a+"
814
+ };
815
+ [this.stderrStream, this.stdoutStream].forEach((stream) => {
816
+ stream?.end();
817
+ });
818
+ this.stdoutStream = createWriteStream(stdoutPath, options);
819
+ this.stderrStream = createWriteStream(stderrPath, options);
820
+ [this.stderrStream, this.stdoutStream].forEach((stream) => {
821
+ writeStream("\n========================================================\n", stream);
822
+ });
823
+ }
824
+ log(logObj, ctx) {
825
+ if (!this.stdoutStream || !this.stderrStream) return;
826
+ const finalStdout = this.stdoutStream;
827
+ const finalStderr = this.stderrStream || this.stdoutStream;
828
+ const line = super.formatLogObj(logObj, {
829
+ ...ctx.options.formatOptions,
830
+ columns: void 0
831
+ });
832
+ if (this.configs.errWriteToStdout && logObj.level < 2) writeStream(`${line}\n`, finalStdout);
833
+ return writeStream(`${line}\n`, logObj.level < 2 ? finalStderr : finalStdout);
834
+ }
1012
835
  };
836
+ function createLoggerFileIfNotExist(path$1) {
837
+ const dirPath = dirname(path$1);
838
+ if (!fs.existsSync(dirPath)) fs.mkdirSync(dirPath, { recursive: true });
839
+ if (!fs.existsSync(path$1)) fs.writeFileSync(path$1, "", { flag: "wx" });
840
+ }
1013
841
 
1014
- // consola/reporters/subscriber.ts
1015
- import EventEmitter from "events";
1016
- var wrapperSubscribers = (consola2) => {
1017
- Object.assign(consola2, {
1018
- onData: (handler) => SubscriberReporter.subscriber.on("log", handler),
1019
- onStdOut: (handler) => SubscriberReporter.subscriber.on("stdout", handler),
1020
- onStdErr: (handler) => SubscriberReporter.subscriber.on("stderr", handler)
1021
- });
1022
- return consola2;
1023
- };
1024
- var _SubscriberReporter = class _SubscriberReporter extends LoggerReporter {
1025
- log(logObj, ctx) {
1026
- const line = super.formatLogObj(logObj, ctx);
1027
- const event = logObj.level < 2 ? "stderr" : "stdout";
1028
- _SubscriberReporter.subscriber.emit(event, line);
1029
- _SubscriberReporter.subscriber.emit("log", line);
1030
- }
842
+ //#endregion
843
+ //#region consola/reporters/subscriber.ts
844
+ function wrapperSubscribers(consola$1) {
845
+ Object.assign(consola$1, {
846
+ onData: (handler) => SubscriberReporter.subscriber.on("log", handler),
847
+ onStdOut: (handler) => SubscriberReporter.subscriber.on("stdout", handler),
848
+ onStdErr: (handler) => SubscriberReporter.subscriber.on("stderr", handler)
849
+ });
850
+ return consola$1;
851
+ }
852
+ var SubscriberReporter = class SubscriberReporter extends LoggerReporter {
853
+ log(logObj, ctx) {
854
+ const line = super.formatLogObj(logObj, ctx);
855
+ const event = logObj.level < 2 ? "stderr" : "stdout";
856
+ SubscriberReporter.subscriber.emit(event, line);
857
+ SubscriberReporter.subscriber.emit("log", line);
858
+ }
1031
859
  };
1032
- _SubscriberReporter.subscriber = new EventEmitter();
1033
- var SubscriberReporter = _SubscriberReporter;
860
+ SubscriberReporter.subscriber = new EventEmitter();
1034
861
 
1035
- // consola.instance.ts
1036
- var createLoggerConsola = (options) => {
1037
- const reporters = [
1038
- new FancyReporter(),
1039
- new SubscriberReporter()
1040
- ];
1041
- if (options?.writeToFile) {
1042
- reporters.push(new FileReporter(options.writeToFile));
1043
- }
1044
- const consola2 = createConsola2({
1045
- formatOptions: {
1046
- date: true
1047
- },
1048
- reporters,
1049
- level: isDevelopment2 ? LogLevels.trace : LogLevels.info,
1050
- ...options
1051
- });
1052
- return wrapperSubscribers(consola2);
1053
- };
862
+ //#endregion
863
+ //#region consola.instance.ts
864
+ function createLoggerConsola(options) {
865
+ const reporters = [new FancyReporter(), new SubscriberReporter()];
866
+ if (options?.writeToFile) reporters.push(new FileReporter(options.writeToFile));
867
+ const consola$1 = createConsola({
868
+ formatOptions: { date: true },
869
+ reporters,
870
+ level: isDevelopment ? LogLevels.trace : LogLevels.info,
871
+ ...options
872
+ });
873
+ return wrapperSubscribers(consola$1);
874
+ }
1054
875
 
1055
- // consola/reporters/browser.ts
876
+ //#endregion
877
+ //#region consola/reporters/browser.ts
1056
878
  var BrowserReporter = class {
1057
- constructor(options) {
1058
- this.options = { ...options };
1059
- this.defaultColor = "#7f8c8d";
1060
- this.levelColorMap = {
1061
- 0: "#c0392b",
1062
- // Red
1063
- 1: "#f39c12",
1064
- // Yellow
1065
- 3: "#00BCD4"
1066
- // Cyan
1067
- };
1068
- this.typeColorMap = {
1069
- success: "#2ecc71"
1070
- // Green
1071
- };
1072
- }
1073
- _getLogFn(level) {
1074
- if (level < 1) {
1075
- return console.__error || console.error;
1076
- }
1077
- if (level === 1) {
1078
- return console.__warn || console.warn;
1079
- }
1080
- return console.__log || console.log;
1081
- }
1082
- log(logObj) {
1083
- const consoleLogFn = this._getLogFn(logObj.level);
1084
- const type = logObj.type === "log" ? "" : logObj.type;
1085
- const tag = logObj.tag || "";
1086
- const color = this.typeColorMap[logObj.type] || this.levelColorMap[logObj.level] || this.defaultColor;
1087
- const style = `
879
+ constructor(options) {
880
+ this.options = { ...options };
881
+ this.defaultColor = "#7f8c8d";
882
+ this.levelColorMap = {
883
+ 0: "#c0392b",
884
+ 1: "#f39c12",
885
+ 3: "#00BCD4"
886
+ };
887
+ this.typeColorMap = { success: "#2ecc71" };
888
+ }
889
+ _getLogFn(level) {
890
+ if (level < 1) return console.__error || console.error;
891
+ if (level === 1) return console.__warn || console.warn;
892
+ return console.__log || console.log;
893
+ }
894
+ log(logObj) {
895
+ const consoleLogFn = this._getLogFn(logObj.level);
896
+ const type = logObj.type === "log" ? "" : logObj.type;
897
+ const tag = logObj.tag || "";
898
+ const color = this.typeColorMap[logObj.type] || this.levelColorMap[logObj.level] || this.defaultColor;
899
+ const style = `
1088
900
  background: ${color};
1089
901
  border-radius: 0.5em;
1090
902
  color: white;
1091
903
  font-weight: bold;
1092
904
  padding: 2px 0.5em;
1093
905
  `;
1094
- const badge = `%c${[tag, type].filter(Boolean).join(":")}`;
1095
- if (typeof logObj.args[0] === "string") {
1096
- consoleLogFn(
1097
- `${badge}%c ${logObj.args[0]}`,
1098
- style,
1099
- // Empty string as style resets to default console style
1100
- "",
1101
- ...logObj.args.slice(1)
1102
- );
1103
- } else {
1104
- consoleLogFn(badge, style, ...logObj.args);
1105
- }
1106
- }
1107
- };
1108
- export {
1109
- BasicReporter,
1110
- BrowserReporter,
1111
- Consola,
1112
- FancyReporter,
1113
- FileReporter,
1114
- LEVEL_COLOR_MAP,
1115
- LogLevels,
1116
- LogTypes,
1117
- LoggerReporter,
1118
- SubscriberReporter,
1119
- TYPE_COLOR_MAP,
1120
- consola,
1121
- createConsola2 as createConsola,
1122
- createLoggerConsola,
1123
- wrapperSubscribers
906
+ const badge = `%c${[tag, type].filter(Boolean).join(":")}`;
907
+ if (typeof logObj.args[0] === "string") consoleLogFn(
908
+ `${badge}%c ${logObj.args[0]}`,
909
+ style,
910
+ // Empty string as style resets to default console style
911
+ "",
912
+ ...logObj.args.slice(1)
913
+ );
914
+ else consoleLogFn(badge, style, ...logObj.args);
915
+ }
1124
916
  };
917
+
918
+ //#endregion
919
+ export { BasicReporter, BrowserReporter, Consola, FancyReporter, FileReporter, LEVEL_COLOR_MAP, LogLevels, LogTypes, LoggerReporter, SubscriberReporter, TYPE_COLOR_MAP, consola, createConsola, createLoggerConsola, wrapperSubscribers };