@bleedingdev/modern-js-utils 3.9.3-ultramodern.7 → 3.9.3-ultramodern.8
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/compiled/address/provenance.json +1 -1
- package/dist/compiled/browserslist/index.js +7 -7
- package/dist/compiled/browserslist/provenance.json +1 -1
- package/dist/compiled/chalk/provenance.json +1 -1
- package/dist/compiled/chokidar/index.d.mts +18 -9
- package/dist/compiled/chokidar/index.d.ts +18 -9
- package/dist/compiled/chokidar/index.js +194 -171
- package/dist/compiled/chokidar/index.mjs +94 -71
- package/dist/compiled/chokidar/provenance.json +2 -2
- package/dist/compiled/commander/provenance.json +1 -1
- package/dist/compiled/debug/provenance.json +1 -1
- package/dist/compiled/dotenv-expand/LICENSE +11 -7
- package/dist/compiled/dotenv-expand/declaration-licenses/dotenv-expand/LICENSE +11 -7
- package/dist/compiled/dotenv-expand/index.js +5545 -61
- package/dist/compiled/dotenv-expand/licenses-cjs.txt +12 -7
- package/dist/compiled/dotenv-expand/package.json +1 -1
- package/dist/compiled/dotenv-expand/provenance.json +7 -7
- package/dist/compiled/execa/index.d.mts +67 -33
- package/dist/compiled/execa/index.d.ts +67 -33
- package/dist/compiled/execa/index.js +1848 -1369
- package/dist/compiled/execa/index.mjs +1851 -1372
- package/dist/compiled/execa/package.json +1 -1
- package/dist/compiled/execa/provenance.json +3 -3
- package/dist/compiled/filesize/index.js +26 -25
- package/dist/compiled/filesize/index.js.LICENSE.txt +1 -1
- package/dist/compiled/filesize/index.mjs +25 -24
- package/dist/compiled/filesize/index.mjs.LICENSE.txt +1 -1
- package/dist/compiled/filesize/package.json +1 -1
- package/dist/compiled/filesize/provenance.json +4 -4
- package/dist/compiled/fs-extra/provenance.json +1 -1
- package/dist/compiled/glob/provenance.json +3 -3
- package/dist/compiled/globby/index.js +431 -139
- package/dist/compiled/globby/index.mjs +576 -284
- package/dist/compiled/globby/provenance.json +1 -1
- package/dist/compiled/gzip-size/provenance.json +1 -1
- package/dist/compiled/import-lazy/provenance.json +1 -1
- package/dist/compiled/inquirer/index.d.mts +10 -0
- package/dist/compiled/inquirer/index.d.ts +10 -0
- package/dist/compiled/inquirer/index.js +112 -96
- package/dist/compiled/inquirer/index.mjs +98 -82
- package/dist/compiled/inquirer/licenses-cjs.txt +26 -0
- package/dist/compiled/inquirer/licenses-esm.txt +26 -0
- package/dist/compiled/inquirer/package.json +1 -1
- package/dist/compiled/inquirer/provenance.json +18 -18
- package/dist/compiled/js-yaml/index.js +258 -208
- package/dist/compiled/js-yaml/index.js.LICENSE.txt +1 -1
- package/dist/compiled/js-yaml/index.mjs +328 -278
- package/dist/compiled/js-yaml/index.mjs.LICENSE.txt +1 -1
- package/dist/compiled/js-yaml/package.json +1 -1
- package/dist/compiled/js-yaml/provenance.json +4 -4
- package/dist/compiled/json5/provenance.json +1 -1
- package/dist/compiled/lodash/common/function.d.ts +2 -2
- package/dist/compiled/lodash/provenance.json +2 -2
- package/dist/compiled/mime-types/provenance.json +1 -1
- package/dist/compiled/minimist/provenance.json +1 -1
- package/dist/compiled/nanoid/index.d.mts +3 -3
- package/dist/compiled/nanoid/index.d.ts +3 -3
- package/dist/compiled/nanoid/index.js +10 -10
- package/dist/compiled/nanoid/index.mjs +10 -10
- package/dist/compiled/nanoid/package.json +1 -1
- package/dist/compiled/nanoid/provenance.json +4 -4
- package/dist/compiled/ora/index.js +310 -286
- package/dist/compiled/ora/index.mjs +651 -627
- package/dist/compiled/ora/provenance.json +1 -1
- package/dist/compiled/pkg-up/provenance.json +1 -1
- package/dist/compiled/semver/provenance.json +1 -1
- package/dist/compiled/signale/provenance.json +1 -1
- package/dist/compiled/slash/provenance.json +1 -1
- package/dist/compiled/strip-ansi/index.js +1 -1
- package/dist/compiled/strip-ansi/index.mjs +3 -3
- package/dist/compiled/strip-ansi/provenance.json +1 -1
- package/dist/compiled/tsconfig-paths/provenance.json +1 -1
- package/dist/compiled/upath/provenance.json +1 -1
- package/dist/compiled/url-join/index.js +56 -29
- package/dist/compiled/url-join/index.mjs +57 -30
- package/dist/compiled/url-join/package.json +1 -1
- package/dist/compiled/url-join/provenance.json +4 -4
- package/dist/types/compiled.d.ts +2 -2
- package/package.json +8 -8
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';
|
|
2
2
|
const require = createRequire(import.meta.url);
|
|
3
|
-
var
|
|
3
|
+
var t = {};
|
|
4
4
|
(()=>{
|
|
5
|
-
|
|
6
|
-
for(var i in n)if (
|
|
5
|
+
t.d = (e, n)=>{
|
|
6
|
+
for(var i in n)if (t.o(n, i) && !t.o(e, i)) Object.defineProperty(e, i, {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: n[i]
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
})();
|
|
12
12
|
(()=>{
|
|
13
|
-
|
|
13
|
+
t.o = (t, e)=>Object.prototype.hasOwnProperty.call(t, e);
|
|
14
14
|
})();
|
|
15
|
-
var
|
|
16
|
-
|
|
15
|
+
var e = {};
|
|
16
|
+
t.d(e, {
|
|
17
17
|
Ay: ()=>ora,
|
|
18
18
|
w1: ()=>oraPromise,
|
|
19
19
|
pT: ()=>z
|
|
20
20
|
});
|
|
21
21
|
const n = require("node:process");
|
|
22
22
|
const i = require("node:util");
|
|
23
|
-
const
|
|
24
|
-
const wrapAnsi16 = (
|
|
25
|
-
const wrapAnsi256 = (
|
|
26
|
-
const wrapAnsi16m = (
|
|
27
|
-
const
|
|
23
|
+
const s = 10;
|
|
24
|
+
const wrapAnsi16 = (t = 0)=>(e)=>`[${e + t}m`;
|
|
25
|
+
const wrapAnsi256 = (t = 0)=>(e)=>`[${38 + t};5;${e}m`;
|
|
26
|
+
const wrapAnsi16m = (t = 0)=>(e, n, i)=>`[${38 + t};2;${e};${n};${i}m`;
|
|
27
|
+
const r = {
|
|
28
28
|
modifier: {
|
|
29
29
|
reset: [
|
|
30
30
|
0,
|
|
@@ -212,65 +212,65 @@ const s = {
|
|
|
212
212
|
]
|
|
213
213
|
}
|
|
214
214
|
};
|
|
215
|
-
Object.keys(
|
|
216
|
-
const a = Object.keys(
|
|
217
|
-
const l = Object.keys(
|
|
215
|
+
Object.keys(r.modifier);
|
|
216
|
+
const a = Object.keys(r.color);
|
|
217
|
+
const l = Object.keys(r.bgColor);
|
|
218
218
|
[
|
|
219
219
|
...a,
|
|
220
220
|
...l
|
|
221
221
|
];
|
|
222
222
|
function assembleStyles() {
|
|
223
|
-
const
|
|
224
|
-
for (const [
|
|
225
|
-
for (const [
|
|
226
|
-
|
|
223
|
+
const t = new Map;
|
|
224
|
+
for (const [e, n] of Object.entries(r)){
|
|
225
|
+
for (const [e, i] of Object.entries(n)){
|
|
226
|
+
r[e] = {
|
|
227
227
|
open: `[${i[0]}m`,
|
|
228
228
|
close: `[${i[1]}m`
|
|
229
229
|
};
|
|
230
|
-
n[
|
|
231
|
-
|
|
230
|
+
n[e] = r[e];
|
|
231
|
+
t.set(i[0], i[1]);
|
|
232
232
|
}
|
|
233
|
-
Object.defineProperty(
|
|
233
|
+
Object.defineProperty(r, e, {
|
|
234
234
|
value: n,
|
|
235
235
|
enumerable: false
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
|
-
Object.defineProperty(
|
|
239
|
-
value:
|
|
238
|
+
Object.defineProperty(r, "codes", {
|
|
239
|
+
value: t,
|
|
240
240
|
enumerable: false
|
|
241
241
|
});
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
Object.defineProperties(
|
|
242
|
+
r.color.close = "[39m";
|
|
243
|
+
r.bgColor.close = "[49m";
|
|
244
|
+
r.color.ansi = wrapAnsi16();
|
|
245
|
+
r.color.ansi256 = wrapAnsi256();
|
|
246
|
+
r.color.ansi16m = wrapAnsi16m();
|
|
247
|
+
r.bgColor.ansi = wrapAnsi16(s);
|
|
248
|
+
r.bgColor.ansi256 = wrapAnsi256(s);
|
|
249
|
+
r.bgColor.ansi16m = wrapAnsi16m(s);
|
|
250
|
+
Object.defineProperties(r, {
|
|
251
251
|
rgbToAnsi256: {
|
|
252
|
-
value (
|
|
253
|
-
if (
|
|
254
|
-
if (
|
|
255
|
-
if (
|
|
256
|
-
return Math.round((
|
|
252
|
+
value (t, e, n) {
|
|
253
|
+
if (t === e && e === n) {
|
|
254
|
+
if (t < 8) return 16;
|
|
255
|
+
if (t > 248) return 231;
|
|
256
|
+
return Math.round((t - 8) / 247 * 24) + 232;
|
|
257
257
|
}
|
|
258
|
-
return 16 + 36 * Math.round(
|
|
258
|
+
return 16 + 36 * Math.round(t / 255 * 5) + 6 * Math.round(e / 255 * 5) + Math.round(n / 255 * 5);
|
|
259
259
|
},
|
|
260
260
|
enumerable: false
|
|
261
261
|
},
|
|
262
262
|
hexToRgb: {
|
|
263
|
-
value (
|
|
264
|
-
const
|
|
265
|
-
if (!
|
|
263
|
+
value (t) {
|
|
264
|
+
const e = /[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));
|
|
265
|
+
if (!e) return [
|
|
266
266
|
0,
|
|
267
267
|
0,
|
|
268
268
|
0
|
|
269
269
|
];
|
|
270
|
-
let [n] =
|
|
270
|
+
let [n] = e;
|
|
271
271
|
if (3 === n.length) n = [
|
|
272
272
|
...n
|
|
273
|
-
].map((
|
|
273
|
+
].map((t)=>t + t).join("");
|
|
274
274
|
const i = Number.parseInt(n, 16);
|
|
275
275
|
return [
|
|
276
276
|
i >> 16 & 255,
|
|
@@ -281,55 +281,55 @@ function assembleStyles() {
|
|
|
281
281
|
enumerable: false
|
|
282
282
|
},
|
|
283
283
|
hexToAnsi256: {
|
|
284
|
-
value: (
|
|
284
|
+
value: (t)=>r.rgbToAnsi256(...r.hexToRgb(t)),
|
|
285
285
|
enumerable: false
|
|
286
286
|
},
|
|
287
287
|
ansi256ToAnsi: {
|
|
288
|
-
value (
|
|
289
|
-
if (
|
|
290
|
-
if (
|
|
291
|
-
let
|
|
288
|
+
value (t) {
|
|
289
|
+
if (t < 8) return 30 + t;
|
|
290
|
+
if (t < 16) return 90 + (t - 8);
|
|
291
|
+
let e;
|
|
292
292
|
let n;
|
|
293
293
|
let i;
|
|
294
|
-
if (
|
|
295
|
-
|
|
296
|
-
n =
|
|
297
|
-
i =
|
|
294
|
+
if (t >= 232) {
|
|
295
|
+
e = ((t - 232) * 10 + 8) / 255;
|
|
296
|
+
n = e;
|
|
297
|
+
i = e;
|
|
298
298
|
} else {
|
|
299
|
-
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
n = Math.floor(
|
|
303
|
-
i =
|
|
299
|
+
t -= 16;
|
|
300
|
+
const s = t % 36;
|
|
301
|
+
e = Math.floor(t / 36) / 5;
|
|
302
|
+
n = Math.floor(s / 6) / 5;
|
|
303
|
+
i = s % 6 / 5;
|
|
304
304
|
}
|
|
305
|
-
const
|
|
306
|
-
if (0 ===
|
|
307
|
-
let
|
|
308
|
-
if (2 ===
|
|
309
|
-
return
|
|
305
|
+
const s = 2 * Math.max(e, n, i);
|
|
306
|
+
if (0 === s) return 30;
|
|
307
|
+
let r = 30 + (Math.round(i) << 2 | Math.round(n) << 1 | Math.round(e));
|
|
308
|
+
if (2 === s) r += 60;
|
|
309
|
+
return r;
|
|
310
310
|
},
|
|
311
311
|
enumerable: false
|
|
312
312
|
},
|
|
313
313
|
rgbToAnsi: {
|
|
314
|
-
value: (
|
|
314
|
+
value: (t, e, n)=>r.ansi256ToAnsi(r.rgbToAnsi256(t, e, n)),
|
|
315
315
|
enumerable: false
|
|
316
316
|
},
|
|
317
317
|
hexToAnsi: {
|
|
318
|
-
value: (
|
|
318
|
+
value: (t)=>r.ansi256ToAnsi(r.hexToAnsi256(t)),
|
|
319
319
|
enumerable: false
|
|
320
320
|
}
|
|
321
321
|
});
|
|
322
|
-
return
|
|
322
|
+
return r;
|
|
323
323
|
}
|
|
324
|
-
const
|
|
325
|
-
const u =
|
|
324
|
+
const f = assembleStyles();
|
|
325
|
+
const u = f;
|
|
326
326
|
const h = require("node:os");
|
|
327
327
|
const d = require("node:tty");
|
|
328
|
-
function hasFlag(
|
|
329
|
-
const i =
|
|
330
|
-
const
|
|
331
|
-
const
|
|
332
|
-
return -1 !==
|
|
328
|
+
function hasFlag(t, e = globalThis.Deno ? globalThis.Deno.args : n.argv) {
|
|
329
|
+
const i = t.startsWith("-") ? "" : 1 === t.length ? "-" : "--";
|
|
330
|
+
const s = e.indexOf(i + t);
|
|
331
|
+
const r = e.indexOf("--");
|
|
332
|
+
return -1 !== s && (-1 === r || s < r);
|
|
333
333
|
}
|
|
334
334
|
const { env: m } = n;
|
|
335
335
|
let p;
|
|
@@ -342,31 +342,31 @@ function envForceColor() {
|
|
|
342
342
|
return 0 === m.FORCE_COLOR.length ? 1 : Math.min(Number.parseInt(m.FORCE_COLOR, 10), 3);
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
|
-
function translateLevel(
|
|
346
|
-
if (0 ===
|
|
345
|
+
function translateLevel(t) {
|
|
346
|
+
if (0 === t) return false;
|
|
347
347
|
return {
|
|
348
|
-
level:
|
|
348
|
+
level: t,
|
|
349
349
|
hasBasic: true,
|
|
350
|
-
has256:
|
|
351
|
-
has16m:
|
|
350
|
+
has256: t >= 2,
|
|
351
|
+
has16m: t >= 3
|
|
352
352
|
};
|
|
353
353
|
}
|
|
354
|
-
function _supportsColor(
|
|
355
|
-
const
|
|
356
|
-
if (void 0 !==
|
|
357
|
-
const
|
|
358
|
-
if (0 ===
|
|
354
|
+
function _supportsColor(t, { streamIsTTY: e, sniffFlags: i = true } = {}) {
|
|
355
|
+
const s = envForceColor();
|
|
356
|
+
if (void 0 !== s) p = s;
|
|
357
|
+
const r = i ? p : s;
|
|
358
|
+
if (0 === r) return 0;
|
|
359
359
|
if (i) {
|
|
360
360
|
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
|
|
361
361
|
if (hasFlag("color=256")) return 2;
|
|
362
362
|
}
|
|
363
363
|
if ("TF_BUILD" in m && "AGENT_NAME" in m) return 1;
|
|
364
|
-
if (
|
|
365
|
-
const o =
|
|
364
|
+
if (t && !e && void 0 === r) return 0;
|
|
365
|
+
const o = r || 0;
|
|
366
366
|
if ("dumb" === m.TERM) return o;
|
|
367
367
|
if ("win32" === n.platform) {
|
|
368
|
-
const
|
|
369
|
-
if (Number(
|
|
368
|
+
const t = h.release().split(".");
|
|
369
|
+
if (Number(t[0]) >= 10 && Number(t[2]) >= 10586) return Number(t[2]) >= 14931 ? 3 : 2;
|
|
370
370
|
return 1;
|
|
371
371
|
}
|
|
372
372
|
if ("CI" in m) {
|
|
@@ -374,14 +374,14 @@ function _supportsColor(e, { streamIsTTY: t, sniffFlags: i = true } = {}) {
|
|
|
374
374
|
"GITHUB_ACTIONS",
|
|
375
375
|
"GITEA_ACTIONS",
|
|
376
376
|
"CIRCLECI"
|
|
377
|
-
].some((
|
|
377
|
+
].some((t)=>t in m)) return 3;
|
|
378
378
|
if ([
|
|
379
379
|
"TRAVIS",
|
|
380
380
|
"APPVEYOR",
|
|
381
381
|
"GITLAB_CI",
|
|
382
382
|
"BUILDKITE",
|
|
383
383
|
"DRONE"
|
|
384
|
-
].some((
|
|
384
|
+
].some((t)=>t in m) || "codeship" === m.CI_NAME) return 1;
|
|
385
385
|
return o;
|
|
386
386
|
}
|
|
387
387
|
if ("TEAMCITY_VERSION" in m) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(m.TEAMCITY_VERSION) ? 1 : 0;
|
|
@@ -390,10 +390,10 @@ function _supportsColor(e, { streamIsTTY: t, sniffFlags: i = true } = {}) {
|
|
|
390
390
|
if ("xterm-ghostty" === m.TERM) return 3;
|
|
391
391
|
if ("wezterm" === m.TERM) return 3;
|
|
392
392
|
if ("TERM_PROGRAM" in m) {
|
|
393
|
-
const
|
|
393
|
+
const t = Number.parseInt((m.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
394
394
|
switch(m.TERM_PROGRAM){
|
|
395
395
|
case "iTerm.app":
|
|
396
|
-
return
|
|
396
|
+
return t >= 3 ? 3 : 2;
|
|
397
397
|
case "Apple_Terminal":
|
|
398
398
|
return 2;
|
|
399
399
|
}
|
|
@@ -403,10 +403,10 @@ function _supportsColor(e, { streamIsTTY: t, sniffFlags: i = true } = {}) {
|
|
|
403
403
|
if ("COLORTERM" in m) return 1;
|
|
404
404
|
return o;
|
|
405
405
|
}
|
|
406
|
-
function createSupportsColor(
|
|
407
|
-
const n = _supportsColor(
|
|
408
|
-
streamIsTTY:
|
|
409
|
-
...
|
|
406
|
+
function createSupportsColor(t, e = {}) {
|
|
407
|
+
const n = _supportsColor(t, {
|
|
408
|
+
streamIsTTY: t && t.isTTY,
|
|
409
|
+
...e
|
|
410
410
|
});
|
|
411
411
|
return translateLevel(n);
|
|
412
412
|
}
|
|
@@ -419,31 +419,31 @@ const _ = {
|
|
|
419
419
|
})
|
|
420
420
|
};
|
|
421
421
|
const g = _;
|
|
422
|
-
function stringReplaceAll(
|
|
423
|
-
let i =
|
|
424
|
-
if (-1 === i) return
|
|
425
|
-
const
|
|
426
|
-
let
|
|
422
|
+
function stringReplaceAll(t, e, n) {
|
|
423
|
+
let i = t.indexOf(e);
|
|
424
|
+
if (-1 === i) return t;
|
|
425
|
+
const s = e.length;
|
|
426
|
+
let r = 0;
|
|
427
427
|
let o = "";
|
|
428
428
|
do {
|
|
429
|
-
o +=
|
|
430
|
-
|
|
431
|
-
i =
|
|
429
|
+
o += t.slice(r, i) + e + n;
|
|
430
|
+
r = i + s;
|
|
431
|
+
i = t.indexOf(e, r);
|
|
432
432
|
}while (-1 !== i);
|
|
433
|
-
o +=
|
|
433
|
+
o += t.slice(r);
|
|
434
434
|
return o;
|
|
435
435
|
}
|
|
436
|
-
function stringEncaseCRLFWithFirstIndex(
|
|
437
|
-
let
|
|
438
|
-
let
|
|
436
|
+
function stringEncaseCRLFWithFirstIndex(t, e, n, i) {
|
|
437
|
+
let s = 0;
|
|
438
|
+
let r = "";
|
|
439
439
|
do {
|
|
440
|
-
const o = "\r" ===
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
i =
|
|
440
|
+
const o = "\r" === t[i - 1];
|
|
441
|
+
r += t.slice(s, o ? i - 1 : i) + e + (o ? "\r\n" : "\n") + n;
|
|
442
|
+
s = i + 1;
|
|
443
|
+
i = t.indexOf("\n", s);
|
|
444
444
|
}while (-1 !== i);
|
|
445
|
-
|
|
446
|
-
return
|
|
445
|
+
r += t.slice(s);
|
|
446
|
+
return r;
|
|
447
447
|
}
|
|
448
448
|
const { stdout: b, stderr: v } = g;
|
|
449
449
|
const x = Symbol("GENERATOR");
|
|
@@ -456,25 +456,25 @@ const w = [
|
|
|
456
456
|
"ansi16m"
|
|
457
457
|
];
|
|
458
458
|
const E = Object.create(null);
|
|
459
|
-
const applyOptions = (
|
|
460
|
-
if (
|
|
459
|
+
const applyOptions = (t, e = {})=>{
|
|
460
|
+
if (e.level && !(Number.isInteger(e.level) && e.level >= 0 && e.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
|
|
461
461
|
const n = b ? b.level : 0;
|
|
462
|
-
|
|
462
|
+
t.level = void 0 === e.level ? n : e.level;
|
|
463
463
|
};
|
|
464
|
-
const chalkFactory = (
|
|
465
|
-
const chalk = (...
|
|
466
|
-
applyOptions(chalk,
|
|
464
|
+
const chalkFactory = (t)=>{
|
|
465
|
+
const chalk = (...t)=>t.join(" ");
|
|
466
|
+
applyOptions(chalk, t);
|
|
467
467
|
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
468
468
|
return chalk;
|
|
469
469
|
};
|
|
470
|
-
function createChalk(
|
|
471
|
-
return chalkFactory(
|
|
470
|
+
function createChalk(t) {
|
|
471
|
+
return chalkFactory(t);
|
|
472
472
|
}
|
|
473
473
|
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
474
|
-
for (const [
|
|
474
|
+
for (const [t, e] of Object.entries(u))E[t] = {
|
|
475
475
|
get () {
|
|
476
|
-
const n = createBuilder(this, createStyler(
|
|
477
|
-
Object.defineProperty(this,
|
|
476
|
+
const n = createBuilder(this, createStyler(e.open, e.close, this[T]), this[y]);
|
|
477
|
+
Object.defineProperty(this, t, {
|
|
478
478
|
value: n
|
|
479
479
|
});
|
|
480
480
|
return n;
|
|
@@ -482,43 +482,43 @@ for (const [e, t] of Object.entries(u))E[e] = {
|
|
|
482
482
|
};
|
|
483
483
|
E.visible = {
|
|
484
484
|
get () {
|
|
485
|
-
const
|
|
485
|
+
const t = createBuilder(this, this[T], true);
|
|
486
486
|
Object.defineProperty(this, "visible", {
|
|
487
|
-
value:
|
|
487
|
+
value: t
|
|
488
488
|
});
|
|
489
|
-
return
|
|
489
|
+
return t;
|
|
490
490
|
}
|
|
491
491
|
};
|
|
492
|
-
const getModelAnsi = (
|
|
493
|
-
if ("rgb" ===
|
|
494
|
-
if ("ansi16m" ===
|
|
495
|
-
if ("ansi256" ===
|
|
492
|
+
const getModelAnsi = (t, e, n, ...i)=>{
|
|
493
|
+
if ("rgb" === t) {
|
|
494
|
+
if ("ansi16m" === e) return u[n].ansi16m(...i);
|
|
495
|
+
if ("ansi256" === e) return u[n].ansi256(u.rgbToAnsi256(...i));
|
|
496
496
|
return u[n].ansi(u.rgbToAnsi(...i));
|
|
497
497
|
}
|
|
498
|
-
if ("hex" ===
|
|
499
|
-
return u[n][
|
|
498
|
+
if ("hex" === t) return getModelAnsi("rgb", e, n, ...u.hexToRgb(...i));
|
|
499
|
+
return u[n][t](...i);
|
|
500
500
|
};
|
|
501
501
|
const S = [
|
|
502
502
|
"rgb",
|
|
503
503
|
"hex",
|
|
504
504
|
"ansi256"
|
|
505
505
|
];
|
|
506
|
-
for (const
|
|
507
|
-
E[
|
|
506
|
+
for (const t of S){
|
|
507
|
+
E[t] = {
|
|
508
508
|
get () {
|
|
509
|
-
const { level:
|
|
509
|
+
const { level: e } = this;
|
|
510
510
|
return function(...n) {
|
|
511
|
-
const i = createStyler(getModelAnsi(
|
|
511
|
+
const i = createStyler(getModelAnsi(t, w[e], "color", ...n), u.color.close, this[T]);
|
|
512
512
|
return createBuilder(this, i, this[y]);
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
515
|
};
|
|
516
|
-
const
|
|
517
|
-
E[
|
|
516
|
+
const e = "bg" + t[0].toUpperCase() + t.slice(1);
|
|
517
|
+
E[e] = {
|
|
518
518
|
get () {
|
|
519
|
-
const { level:
|
|
519
|
+
const { level: e } = this;
|
|
520
520
|
return function(...n) {
|
|
521
|
-
const i = createStyler(getModelAnsi(
|
|
521
|
+
const i = createStyler(getModelAnsi(t, w[e], "bgColor", ...n), u.bgColor.close, this[T]);
|
|
522
522
|
return createBuilder(this, i, this[y]);
|
|
523
523
|
};
|
|
524
524
|
}
|
|
@@ -531,49 +531,49 @@ const R = Object.defineProperties(()=>{}, {
|
|
|
531
531
|
get () {
|
|
532
532
|
return this[x].level;
|
|
533
533
|
},
|
|
534
|
-
set (
|
|
535
|
-
this[x].level =
|
|
534
|
+
set (t) {
|
|
535
|
+
this[x].level = t;
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
});
|
|
539
|
-
const createStyler = (
|
|
539
|
+
const createStyler = (t, e, n)=>{
|
|
540
540
|
let i;
|
|
541
|
-
let
|
|
541
|
+
let s;
|
|
542
542
|
if (void 0 === n) {
|
|
543
|
-
i =
|
|
544
|
-
|
|
543
|
+
i = t;
|
|
544
|
+
s = e;
|
|
545
545
|
} else {
|
|
546
|
-
i = n.openAll +
|
|
547
|
-
|
|
546
|
+
i = n.openAll + t;
|
|
547
|
+
s = e + n.closeAll;
|
|
548
548
|
}
|
|
549
549
|
return {
|
|
550
|
-
open:
|
|
551
|
-
close:
|
|
550
|
+
open: t,
|
|
551
|
+
close: e,
|
|
552
552
|
openAll: i,
|
|
553
|
-
closeAll:
|
|
553
|
+
closeAll: s,
|
|
554
554
|
parent: n
|
|
555
555
|
};
|
|
556
556
|
};
|
|
557
|
-
const createBuilder = (
|
|
558
|
-
const builder = (...
|
|
557
|
+
const createBuilder = (t, e, n)=>{
|
|
558
|
+
const builder = (...t)=>applyStyle(builder, 1 === t.length ? "" + t[0] : t.join(" "));
|
|
559
559
|
Object.setPrototypeOf(builder, R);
|
|
560
|
-
builder[x] =
|
|
561
|
-
builder[T] =
|
|
560
|
+
builder[x] = t;
|
|
561
|
+
builder[T] = e;
|
|
562
562
|
builder[y] = n;
|
|
563
563
|
return builder;
|
|
564
564
|
};
|
|
565
|
-
const applyStyle = (
|
|
566
|
-
if (
|
|
567
|
-
let n =
|
|
568
|
-
if (void 0 === n) return
|
|
569
|
-
const { openAll: i, closeAll:
|
|
570
|
-
if (
|
|
571
|
-
|
|
565
|
+
const applyStyle = (t, e)=>{
|
|
566
|
+
if (t.level <= 0 || !e) return t[y] ? "" : e;
|
|
567
|
+
let n = t[T];
|
|
568
|
+
if (void 0 === n) return e;
|
|
569
|
+
const { openAll: i, closeAll: s } = n;
|
|
570
|
+
if (e.includes("")) while(void 0 !== n){
|
|
571
|
+
e = stringReplaceAll(e, n.close, n.open);
|
|
572
572
|
n = n.parent;
|
|
573
573
|
}
|
|
574
|
-
const
|
|
575
|
-
if (-1 !==
|
|
576
|
-
return i +
|
|
574
|
+
const r = e.indexOf("\n");
|
|
575
|
+
if (-1 !== r) e = stringEncaseCRLFWithFirstIndex(e, s, i, r);
|
|
576
|
+
return i + e + s;
|
|
577
577
|
};
|
|
578
578
|
Object.defineProperties(createChalk.prototype, E);
|
|
579
579
|
const C = createChalk();
|
|
@@ -581,75 +581,75 @@ createChalk({
|
|
|
581
581
|
level: v ? v.level : 0
|
|
582
582
|
});
|
|
583
583
|
const I = C;
|
|
584
|
-
const copyProperty = (
|
|
584
|
+
const copyProperty = (t, e, n, i)=>{
|
|
585
585
|
if ("length" === n || "prototype" === n) return;
|
|
586
586
|
if ("arguments" === n || "caller" === n) return;
|
|
587
|
-
const r = Object.getOwnPropertyDescriptor(e, n);
|
|
588
587
|
const s = Object.getOwnPropertyDescriptor(t, n);
|
|
589
|
-
|
|
590
|
-
|
|
588
|
+
const r = Object.getOwnPropertyDescriptor(e, n);
|
|
589
|
+
if (!canCopyProperty(s, r) && i) return;
|
|
590
|
+
Object.defineProperty(t, n, r);
|
|
591
591
|
};
|
|
592
|
-
const canCopyProperty = function(
|
|
593
|
-
return void 0 ===
|
|
592
|
+
const canCopyProperty = function(t, e) {
|
|
593
|
+
return void 0 === t || t.configurable || t.writable === e.writable && t.enumerable === e.enumerable && t.configurable === e.configurable && (t.writable || t.value === e.value);
|
|
594
594
|
};
|
|
595
|
-
const changePrototype = (
|
|
596
|
-
const n = Object.getPrototypeOf(
|
|
597
|
-
if (n === Object.getPrototypeOf(
|
|
598
|
-
Object.setPrototypeOf(
|
|
595
|
+
const changePrototype = (t, e)=>{
|
|
596
|
+
const n = Object.getPrototypeOf(e);
|
|
597
|
+
if (n === Object.getPrototypeOf(t)) return;
|
|
598
|
+
Object.setPrototypeOf(t, n);
|
|
599
599
|
};
|
|
600
|
-
const wrappedToString = (
|
|
600
|
+
const wrappedToString = (t, e)=>`/* Wrapped ${t}*/\n${e}`;
|
|
601
601
|
const P = Object.getOwnPropertyDescriptor(Function.prototype, "toString");
|
|
602
602
|
const A = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name");
|
|
603
|
-
const changeToString = (
|
|
603
|
+
const changeToString = (t, e, n)=>{
|
|
604
604
|
const i = "" === n ? "" : `with ${n.trim()}() `;
|
|
605
|
-
const
|
|
606
|
-
Object.defineProperty(
|
|
607
|
-
const { writable:
|
|
608
|
-
Object.defineProperty(
|
|
609
|
-
value:
|
|
610
|
-
writable:
|
|
605
|
+
const s = wrappedToString.bind(null, i, e.toString());
|
|
606
|
+
Object.defineProperty(s, "name", A);
|
|
607
|
+
const { writable: r, enumerable: o, configurable: a } = P;
|
|
608
|
+
Object.defineProperty(t, "toString", {
|
|
609
|
+
value: s,
|
|
610
|
+
writable: r,
|
|
611
611
|
enumerable: o,
|
|
612
612
|
configurable: a
|
|
613
613
|
});
|
|
614
614
|
};
|
|
615
|
-
function mimicFunction(
|
|
616
|
-
const { name: i } =
|
|
617
|
-
for (const i of Reflect.ownKeys(
|
|
618
|
-
changePrototype(
|
|
619
|
-
changeToString(
|
|
620
|
-
return
|
|
615
|
+
function mimicFunction(t, e, { ignoreNonConfigurable: n = false } = {}) {
|
|
616
|
+
const { name: i } = t;
|
|
617
|
+
for (const i of Reflect.ownKeys(e))copyProperty(t, e, i, n);
|
|
618
|
+
changePrototype(t, e);
|
|
619
|
+
changeToString(t, e, i);
|
|
620
|
+
return t;
|
|
621
621
|
}
|
|
622
622
|
const M = new WeakMap;
|
|
623
|
-
const onetime = (
|
|
624
|
-
if ("function" != typeof
|
|
623
|
+
const onetime = (t, e = {})=>{
|
|
624
|
+
if ("function" != typeof t) throw new TypeError("Expected a function");
|
|
625
625
|
let n;
|
|
626
626
|
let i = 0;
|
|
627
|
-
const
|
|
628
|
-
const onetime = function(...
|
|
627
|
+
const s = t.displayName || t.name || "<anonymous>";
|
|
628
|
+
const onetime = function(...r) {
|
|
629
629
|
M.set(onetime, ++i);
|
|
630
630
|
if (1 === i) {
|
|
631
|
-
n =
|
|
632
|
-
|
|
633
|
-
} else if (true ===
|
|
631
|
+
n = t.apply(this, r);
|
|
632
|
+
t = void 0;
|
|
633
|
+
} else if (true === e.throw) throw new Error(`Function \`${s}\` can only be called once`);
|
|
634
634
|
return n;
|
|
635
635
|
};
|
|
636
|
-
mimicFunction(onetime,
|
|
636
|
+
mimicFunction(onetime, t);
|
|
637
637
|
M.set(onetime, i);
|
|
638
638
|
return onetime;
|
|
639
639
|
};
|
|
640
|
-
onetime.callCount = (
|
|
641
|
-
if (!M.has(
|
|
642
|
-
return M.get(
|
|
640
|
+
onetime.callCount = (t)=>{
|
|
641
|
+
if (!M.has(t)) throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);
|
|
642
|
+
return M.get(t);
|
|
643
643
|
};
|
|
644
644
|
const F = onetime;
|
|
645
645
|
const B = [];
|
|
646
646
|
B.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
647
647
|
if ("win32" !== process.platform) B.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
648
648
|
if ("linux" === process.platform) B.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
649
|
-
const processOk = (
|
|
650
|
-
const
|
|
649
|
+
const processOk = (t)=>!!t && "object" == typeof t && "function" == typeof t.removeListener && "function" == typeof t.emit && "function" == typeof t.reallyExit && "function" == typeof t.listeners && "function" == typeof t.kill && "number" == typeof t.pid && "function" == typeof t.on;
|
|
650
|
+
const k = Symbol.for("signal-exit emitter");
|
|
651
651
|
const L = globalThis;
|
|
652
|
-
const
|
|
652
|
+
const W = Object.defineProperty.bind(Object);
|
|
653
653
|
class Emitter {
|
|
654
654
|
emitted = {
|
|
655
655
|
afterExit: false,
|
|
@@ -662,44 +662,44 @@ class Emitter {
|
|
|
662
662
|
count = 0;
|
|
663
663
|
id = Math.random();
|
|
664
664
|
constructor(){
|
|
665
|
-
if (L[
|
|
666
|
-
|
|
665
|
+
if (L[k]) return L[k];
|
|
666
|
+
W(L, k, {
|
|
667
667
|
value: this,
|
|
668
668
|
writable: false,
|
|
669
669
|
enumerable: false,
|
|
670
670
|
configurable: false
|
|
671
671
|
});
|
|
672
672
|
}
|
|
673
|
-
on(
|
|
674
|
-
this.listeners[
|
|
673
|
+
on(t, e) {
|
|
674
|
+
this.listeners[t].push(e);
|
|
675
675
|
}
|
|
676
|
-
removeListener(
|
|
677
|
-
const n = this.listeners[
|
|
678
|
-
const i = n.indexOf(
|
|
676
|
+
removeListener(t, e) {
|
|
677
|
+
const n = this.listeners[t];
|
|
678
|
+
const i = n.indexOf(e);
|
|
679
679
|
if (-1 === i) return;
|
|
680
680
|
if (0 === i && 1 === n.length) n.length = 0;
|
|
681
681
|
else n.splice(i, 1);
|
|
682
682
|
}
|
|
683
|
-
emit(
|
|
684
|
-
if (this.emitted[
|
|
685
|
-
this.emitted[
|
|
683
|
+
emit(t, e, n) {
|
|
684
|
+
if (this.emitted[t]) return false;
|
|
685
|
+
this.emitted[t] = true;
|
|
686
686
|
let i = false;
|
|
687
|
-
for (const
|
|
688
|
-
if ("exit" ===
|
|
687
|
+
for (const s of this.listeners[t])i = true === s(e, n) || i;
|
|
688
|
+
if ("exit" === t) i = this.emit("afterExit", e, n) || i;
|
|
689
689
|
return i;
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
692
|
class SignalExitBase {
|
|
693
693
|
}
|
|
694
|
-
const signalExitWrap = (
|
|
695
|
-
onExit (
|
|
696
|
-
return
|
|
694
|
+
const signalExitWrap = (t)=>({
|
|
695
|
+
onExit (e, n) {
|
|
696
|
+
return t.onExit(e, n);
|
|
697
697
|
},
|
|
698
698
|
load () {
|
|
699
|
-
return
|
|
699
|
+
return t.load();
|
|
700
700
|
},
|
|
701
701
|
unload () {
|
|
702
|
-
return
|
|
702
|
+
return t.unload();
|
|
703
703
|
}
|
|
704
704
|
});
|
|
705
705
|
class SignalExitFallback extends SignalExitBase {
|
|
@@ -710,90 +710,90 @@ class SignalExitFallback extends SignalExitBase {
|
|
|
710
710
|
unload() {}
|
|
711
711
|
}
|
|
712
712
|
class SignalExit extends SignalExitBase {
|
|
713
|
-
#
|
|
714
|
-
#
|
|
713
|
+
#t = "win32" === j.platform ? "SIGINT" : "SIGHUP";
|
|
714
|
+
#e = new Emitter;
|
|
715
715
|
#n;
|
|
716
716
|
#i;
|
|
717
|
-
#
|
|
718
|
-
#
|
|
717
|
+
#s;
|
|
718
|
+
#r = {};
|
|
719
719
|
#o = false;
|
|
720
|
-
constructor(
|
|
720
|
+
constructor(t){
|
|
721
721
|
super();
|
|
722
|
-
this.#n =
|
|
723
|
-
this.#
|
|
724
|
-
for (const
|
|
725
|
-
const n = this.#n.listeners(
|
|
726
|
-
let { count: i } = this.#
|
|
727
|
-
const
|
|
728
|
-
if ("object" == typeof
|
|
722
|
+
this.#n = t;
|
|
723
|
+
this.#r = {};
|
|
724
|
+
for (const e of B)this.#r[e] = ()=>{
|
|
725
|
+
const n = this.#n.listeners(e);
|
|
726
|
+
let { count: i } = this.#e;
|
|
727
|
+
const s = t;
|
|
728
|
+
if ("object" == typeof s.__signal_exit_emitter__ && "number" == typeof s.__signal_exit_emitter__.count) i += s.__signal_exit_emitter__.count;
|
|
729
729
|
if (n.length === i) {
|
|
730
730
|
this.unload();
|
|
731
|
-
const n = this.#
|
|
732
|
-
const i = "SIGHUP" ===
|
|
733
|
-
if (!n)
|
|
731
|
+
const n = this.#e.emit("exit", null, e);
|
|
732
|
+
const i = "SIGHUP" === e ? this.#t : e;
|
|
733
|
+
if (!n) t.kill(t.pid, i);
|
|
734
734
|
}
|
|
735
735
|
};
|
|
736
|
-
this.#
|
|
737
|
-
this.#i =
|
|
736
|
+
this.#s = t.reallyExit;
|
|
737
|
+
this.#i = t.emit;
|
|
738
738
|
}
|
|
739
|
-
onExit(
|
|
739
|
+
onExit(t, e) {
|
|
740
740
|
if (!processOk(this.#n)) return ()=>{};
|
|
741
741
|
if (false === this.#o) this.load();
|
|
742
|
-
const n =
|
|
743
|
-
this.#
|
|
742
|
+
const n = e?.alwaysLast ? "afterExit" : "exit";
|
|
743
|
+
this.#e.on(n, t);
|
|
744
744
|
return ()=>{
|
|
745
|
-
this.#
|
|
746
|
-
if (0 === this.#
|
|
745
|
+
this.#e.removeListener(n, t);
|
|
746
|
+
if (0 === this.#e.listeners["exit"].length && 0 === this.#e.listeners["afterExit"].length) this.unload();
|
|
747
747
|
};
|
|
748
748
|
}
|
|
749
749
|
load() {
|
|
750
750
|
if (this.#o) return;
|
|
751
751
|
this.#o = true;
|
|
752
|
-
this.#
|
|
753
|
-
for (const
|
|
754
|
-
const
|
|
755
|
-
if (
|
|
756
|
-
} catch (
|
|
757
|
-
this.#n.emit = (
|
|
758
|
-
this.#n.reallyExit = (
|
|
752
|
+
this.#e.count += 1;
|
|
753
|
+
for (const t of B)try {
|
|
754
|
+
const e = this.#r[t];
|
|
755
|
+
if (e) this.#n.on(t, e);
|
|
756
|
+
} catch (t) {}
|
|
757
|
+
this.#n.emit = (t, ...e)=>this.#a(t, ...e);
|
|
758
|
+
this.#n.reallyExit = (t)=>this.#l(t);
|
|
759
759
|
}
|
|
760
760
|
unload() {
|
|
761
761
|
if (!this.#o) return;
|
|
762
762
|
this.#o = false;
|
|
763
|
-
B.forEach((
|
|
764
|
-
const
|
|
765
|
-
if (!
|
|
763
|
+
B.forEach((t)=>{
|
|
764
|
+
const e = this.#r[t];
|
|
765
|
+
if (!e) throw new Error("Listener not defined for signal: " + t);
|
|
766
766
|
try {
|
|
767
|
-
this.#n.removeListener(
|
|
768
|
-
} catch (
|
|
767
|
+
this.#n.removeListener(t, e);
|
|
768
|
+
} catch (t) {}
|
|
769
769
|
});
|
|
770
770
|
this.#n.emit = this.#i;
|
|
771
|
-
this.#n.reallyExit = this.#
|
|
772
|
-
this.#
|
|
771
|
+
this.#n.reallyExit = this.#s;
|
|
772
|
+
this.#e.count -= 1;
|
|
773
773
|
}
|
|
774
|
-
#l(
|
|
774
|
+
#l(t) {
|
|
775
775
|
if (!processOk(this.#n)) return 0;
|
|
776
|
-
this.#n.exitCode =
|
|
777
|
-
this.#
|
|
778
|
-
return this.#
|
|
776
|
+
this.#n.exitCode = t || 0;
|
|
777
|
+
this.#e.emit("exit", this.#n.exitCode, null);
|
|
778
|
+
return this.#s.call(this.#n, this.#n.exitCode);
|
|
779
779
|
}
|
|
780
|
-
#a(
|
|
780
|
+
#a(t, ...e) {
|
|
781
781
|
const n = this.#i;
|
|
782
|
-
if (!("exit" ===
|
|
782
|
+
if (!("exit" === t && processOk(this.#n))) return n.call(this.#n, t, ...e);
|
|
783
783
|
else {
|
|
784
|
-
if ("number" == typeof
|
|
785
|
-
const i = n.call(this.#n,
|
|
786
|
-
this.#
|
|
784
|
+
if ("number" == typeof e[0]) this.#n.exitCode = e[0];
|
|
785
|
+
const i = n.call(this.#n, t, ...e);
|
|
786
|
+
this.#e.emit("exit", this.#n.exitCode, null);
|
|
787
787
|
return i;
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
791
|
const j = globalThis.process;
|
|
792
|
-
const { onExit:
|
|
793
|
-
const
|
|
794
|
-
const $ =
|
|
795
|
-
|
|
796
|
-
|
|
792
|
+
const { onExit: N, load: G, unload: D } = signalExitWrap(processOk(j) ? new SignalExit(j) : new SignalExitFallback);
|
|
793
|
+
const H = n.stderr.isTTY ? n.stderr : n.stdout.isTTY ? n.stdout : void 0;
|
|
794
|
+
const $ = H ? F(()=>{
|
|
795
|
+
N(()=>{
|
|
796
|
+
H.write("[?25h");
|
|
797
797
|
}, {
|
|
798
798
|
alwaysLast: true
|
|
799
799
|
});
|
|
@@ -801,45 +801,45 @@ const $ = D ? F(()=>{
|
|
|
801
801
|
const Y = $;
|
|
802
802
|
let U = false;
|
|
803
803
|
const V = {};
|
|
804
|
-
V.show = (
|
|
805
|
-
if (!
|
|
804
|
+
V.show = (t = n.stderr)=>{
|
|
805
|
+
if (!t.isTTY) return;
|
|
806
806
|
U = false;
|
|
807
|
-
|
|
807
|
+
t.write("[?25h");
|
|
808
808
|
};
|
|
809
|
-
V.hide = (
|
|
810
|
-
if (!
|
|
809
|
+
V.hide = (t = n.stderr)=>{
|
|
810
|
+
if (!t.isTTY) return;
|
|
811
811
|
Y();
|
|
812
812
|
U = true;
|
|
813
|
-
|
|
813
|
+
t.write("[?25l");
|
|
814
814
|
};
|
|
815
|
-
V.toggle = (
|
|
816
|
-
if (void 0 !==
|
|
817
|
-
if (U) V.show(
|
|
818
|
-
else V.hide(
|
|
815
|
+
V.toggle = (t, e)=>{
|
|
816
|
+
if (void 0 !== t) U = t;
|
|
817
|
+
if (U) V.show(e);
|
|
818
|
+
else V.hide(e);
|
|
819
819
|
};
|
|
820
820
|
const J = V;
|
|
821
821
|
const q = JSON.parse('{"dots":{"interval":80,"frames":["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"]},"dots2":{"interval":80,"frames":["⣾","⣽","⣻","⢿","⡿","⣟","⣯","⣷"]},"dots3":{"interval":80,"frames":["⠋","⠙","⠚","⠞","⠖","⠦","⠴","⠲","⠳","⠓"]},"dots4":{"interval":80,"frames":["⠄","⠆","⠇","⠋","⠙","⠸","⠰","⠠","⠰","⠸","⠙","⠋","⠇","⠆"]},"dots5":{"interval":80,"frames":["⠋","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋"]},"dots6":{"interval":80,"frames":["⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠴","⠲","⠒","⠂","⠂","⠒","⠚","⠙","⠉","⠁"]},"dots7":{"interval":80,"frames":["⠈","⠉","⠋","⠓","⠒","⠐","⠐","⠒","⠖","⠦","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈"]},"dots8":{"interval":80,"frames":["⠁","⠁","⠉","⠙","⠚","⠒","⠂","⠂","⠒","⠲","⠴","⠤","⠄","⠄","⠤","⠠","⠠","⠤","⠦","⠖","⠒","⠐","⠐","⠒","⠓","⠋","⠉","⠈","⠈"]},"dots9":{"interval":80,"frames":["⢹","⢺","⢼","⣸","⣇","⡧","⡗","⡏"]},"dots10":{"interval":80,"frames":["⢄","⢂","⢁","⡁","⡈","⡐","⡠"]},"dots11":{"interval":100,"frames":["⠁","⠂","⠄","⡀","⢀","⠠","⠐","⠈"]},"dots12":{"interval":80,"frames":["⢀⠀","⡀⠀","⠄⠀","⢂⠀","⡂⠀","⠅⠀","⢃⠀","⡃⠀","⠍⠀","⢋⠀","⡋⠀","⠍⠁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⢈⠩","⡀⢙","⠄⡙","⢂⠩","⡂⢘","⠅⡘","⢃⠨","⡃⢐","⠍⡐","⢋⠠","⡋⢀","⠍⡁","⢋⠁","⡋⠁","⠍⠉","⠋⠉","⠋⠉","⠉⠙","⠉⠙","⠉⠩","⠈⢙","⠈⡙","⠈⠩","⠀⢙","⠀⡙","⠀⠩","⠀⢘","⠀⡘","⠀⠨","⠀⢐","⠀⡐","⠀⠠","⠀⢀","⠀⡀"]},"dots13":{"interval":80,"frames":["⣼","⣹","⢻","⠿","⡟","⣏","⣧","⣶"]},"dots14":{"interval":80,"frames":["⠉⠉","⠈⠙","⠀⠹","⠀⢸","⠀⣰","⢀⣠","⣀⣀","⣄⡀","⣆⠀","⡇⠀","⠏⠀","⠋⠁"]},"dots8Bit":{"interval":80,"frames":["⠀","⠁","⠂","⠃","⠄","⠅","⠆","⠇","⡀","⡁","⡂","⡃","⡄","⡅","⡆","⡇","⠈","⠉","⠊","⠋","⠌","⠍","⠎","⠏","⡈","⡉","⡊","⡋","⡌","⡍","⡎","⡏","⠐","⠑","⠒","⠓","⠔","⠕","⠖","⠗","⡐","⡑","⡒","⡓","⡔","⡕","⡖","⡗","⠘","⠙","⠚","⠛","⠜","⠝","⠞","⠟","⡘","⡙","⡚","⡛","⡜","⡝","⡞","⡟","⠠","⠡","⠢","⠣","⠤","⠥","⠦","⠧","⡠","⡡","⡢","⡣","⡤","⡥","⡦","⡧","⠨","⠩","⠪","⠫","⠬","⠭","⠮","⠯","⡨","⡩","⡪","⡫","⡬","⡭","⡮","⡯","⠰","⠱","⠲","⠳","⠴","⠵","⠶","⠷","⡰","⡱","⡲","⡳","⡴","⡵","⡶","⡷","⠸","⠹","⠺","⠻","⠼","⠽","⠾","⠿","⡸","⡹","⡺","⡻","⡼","⡽","⡾","⡿","⢀","⢁","⢂","⢃","⢄","⢅","⢆","⢇","⣀","⣁","⣂","⣃","⣄","⣅","⣆","⣇","⢈","⢉","⢊","⢋","⢌","⢍","⢎","⢏","⣈","⣉","⣊","⣋","⣌","⣍","⣎","⣏","⢐","⢑","⢒","⢓","⢔","⢕","⢖","⢗","⣐","⣑","⣒","⣓","⣔","⣕","⣖","⣗","⢘","⢙","⢚","⢛","⢜","⢝","⢞","⢟","⣘","⣙","⣚","⣛","⣜","⣝","⣞","⣟","⢠","⢡","⢢","⢣","⢤","⢥","⢦","⢧","⣠","⣡","⣢","⣣","⣤","⣥","⣦","⣧","⢨","⢩","⢪","⢫","⢬","⢭","⢮","⢯","⣨","⣩","⣪","⣫","⣬","⣭","⣮","⣯","⢰","⢱","⢲","⢳","⢴","⢵","⢶","⢷","⣰","⣱","⣲","⣳","⣴","⣵","⣶","⣷","⢸","⢹","⢺","⢻","⢼","⢽","⢾","⢿","⣸","⣹","⣺","⣻","⣼","⣽","⣾","⣿"]},"dotsCircle":{"interval":80,"frames":["⢎ ","⠎⠁","⠊⠑","⠈⠱"," ⡱","⢀⡰","⢄⡠","⢆⡀"]},"sand":{"interval":80,"frames":["⠁","⠂","⠄","⡀","⡈","⡐","⡠","⣀","⣁","⣂","⣄","⣌","⣔","⣤","⣥","⣦","⣮","⣶","⣷","⣿","⡿","⠿","⢟","⠟","⡛","⠛","⠫","⢋","⠋","⠍","⡉","⠉","⠑","⠡","⢁"]},"line":{"interval":130,"frames":["-","\\\\","|","/"]},"line2":{"interval":100,"frames":["⠂","-","–","—","–","-"]},"rollingLine":{"interval":80,"frames":["/ "," - "," \\\\ "," |"," |"," \\\\ "," - ","/ "]},"pipe":{"interval":100,"frames":["┤","┘","┴","└","├","┌","┬","┐"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["✶","✸","✹","✺","✹","✷"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","\'","´","-","_","_","_"]},"hamburger":{"interval":100,"frames":["☱","☲","☴"]},"growVertical":{"interval":120,"frames":["▁","▃","▄","▅","▆","▇","▆","▅","▄","▃"]},"growHorizontal":{"interval":120,"frames":["▏","▎","▍","▌","▋","▊","▉","▊","▋","▌","▍","▎"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","°","O","o","."]},"noise":{"interval":100,"frames":["▓","▒","░"]},"bounce":{"interval":120,"frames":["⠁","⠂","⠄","⠂"]},"boxBounce":{"interval":120,"frames":["▖","▘","▝","▗"]},"boxBounce2":{"interval":100,"frames":["▌","▀","▐","▄"]},"triangle":{"interval":50,"frames":["◢","◣","◤","◥"]},"binary":{"interval":80,"frames":["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},"arc":{"interval":100,"frames":["◜","◠","◝","◞","◡","◟"]},"circle":{"interval":120,"frames":["◡","⊙","◠"]},"squareCorners":{"interval":180,"frames":["◰","◳","◲","◱"]},"circleQuarters":{"interval":120,"frames":["◴","◷","◶","◵"]},"circleHalves":{"interval":50,"frames":["◐","◓","◑","◒"]},"squish":{"interval":100,"frames":["╫","╪"]},"toggle":{"interval":250,"frames":["⊶","⊷"]},"toggle2":{"interval":80,"frames":["▫","▪"]},"toggle3":{"interval":120,"frames":["□","■"]},"toggle4":{"interval":100,"frames":["■","□","▪","▫"]},"toggle5":{"interval":100,"frames":["▮","▯"]},"toggle6":{"interval":300,"frames":["ဝ","၀"]},"toggle7":{"interval":80,"frames":["⦾","⦿"]},"toggle8":{"interval":100,"frames":["◍","◌"]},"toggle9":{"interval":100,"frames":["◉","◎"]},"toggle10":{"interval":100,"frames":["㊂","㊀","㊁"]},"toggle11":{"interval":50,"frames":["⧇","⧆"]},"toggle12":{"interval":120,"frames":["☗","☖"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["←","↖","↑","↗","→","↘","↓","↙"]},"arrow2":{"interval":80,"frames":["⬆️ ","↗️ ","➡️ ","↘️ ","⬇️ ","↙️ ","⬅️ ","↖️ "]},"arrow3":{"interval":120,"frames":["▹▹▹▹▹","▸▹▹▹▹","▹▸▹▹▹","▹▹▸▹▹","▹▹▹▸▹","▹▹▹▹▸"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( ● )","( ● )","( ● )","( ● )","( ●)","( ● )","( ● )","( ● )","( ● )","(● )"]},"smiley":{"interval":200,"frames":["😄 ","😝 "]},"monkey":{"interval":300,"frames":["🙈 ","🙈 ","🙉 ","🙊 "]},"hearts":{"interval":100,"frames":["💛 ","💙 ","💜 ","💚 ","💗 "]},"clock":{"interval":100,"frames":["🕛 ","🕐 ","🕑 ","🕒 ","🕓 ","🕔 ","🕕 ","🕖 ","🕗 ","🕘 ","🕙 ","🕚 "]},"earth":{"interval":180,"frames":["🌍 ","🌎 ","🌏 "]},"material":{"interval":17,"frames":["█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁","███████▁▁▁▁▁▁▁▁▁▁▁▁▁","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","██████████▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","█████████████▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁██████████████▁▁▁▁","▁▁▁██████████████▁▁▁","▁▁▁▁█████████████▁▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁██████████████▁▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁██████████████▁","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁██████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁█████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁████████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁███████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁██████████","▁▁▁▁▁▁▁▁▁▁▁▁████████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","██████▁▁▁▁▁▁▁▁▁▁▁▁▁█","████████▁▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","█████████▁▁▁▁▁▁▁▁▁▁▁","███████████▁▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","████████████▁▁▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","██████████████▁▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁██████████████▁▁▁▁▁","▁▁▁█████████████▁▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁████████████▁▁▁","▁▁▁▁▁▁███████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁█████████▁▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁█████████▁▁","▁▁▁▁▁▁▁▁▁▁█████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁████████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁███████▁","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁███████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁","▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"]},"moon":{"interval":80,"frames":["🌑 ","🌒 ","🌓 ","🌔 ","🌕 ","🌖 ","🌗 ","🌘 "]},"runner":{"interval":140,"frames":["🚶 ","🏃 "]},"pong":{"interval":80,"frames":["▐⠂ ▌","▐⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂▌","▐ ⠠▌","▐ ⡀▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐ ⠠ ▌","▐ ⠂ ▌","▐ ⠈ ▌","▐ ⠂ ▌","▐ ⠠ ▌","▐ ⡀ ▌","▐⠠ ▌"]},"shark":{"interval":120,"frames":["▐|\\\\____________▌","▐_|\\\\___________▌","▐__|\\\\__________▌","▐___|\\\\_________▌","▐____|\\\\________▌","▐_____|\\\\_______▌","▐______|\\\\______▌","▐_______|\\\\_____▌","▐________|\\\\____▌","▐_________|\\\\___▌","▐__________|\\\\__▌","▐___________|\\\\_▌","▐____________|\\\\▌","▐____________/|▌","▐___________/|_▌","▐__________/|__▌","▐_________/|___▌","▐________/|____▌","▐_______/|_____▌","▐______/|______▌","▐_____/|_______▌","▐____/|________▌","▐___/|_________▌","▐__/|__________▌","▐_/|___________▌","▐/|____________▌"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["☀️ ","☀️ ","☀️ ","🌤 ","⛅️ ","🌥 ","☁️ ","🌧 ","🌨 ","🌧 ","🌨 ","🌧 ","🌨 ","⛈ ","🌨 ","🌧 ","🌨 ","☁️ ","🌥 ","⛅️ ","🌤 ","☀️ ","☀️ "]},"christmas":{"interval":400,"frames":["🌲","🎄"]},"grenade":{"interval":80,"frames":["، ","′ "," ´ "," ‾ "," ⸌"," ⸊"," |"," ⁎"," ⁕"," ෴ "," ⁓"," "," "," "]},"point":{"interval":125,"frames":["∙∙∙","●∙∙","∙●∙","∙∙●","∙∙∙"]},"layer":{"interval":150,"frames":["-","=","≡"]},"betaWave":{"interval":80,"frames":["ρββββββ","βρβββββ","ββρββββ","βββρβββ","ββββρββ","βββββρβ","ββββββρ"]},"fingerDance":{"interval":160,"frames":["🤘 ","🤟 ","🖖 ","✋ ","🤚 ","👆 "]},"fistBump":{"interval":80,"frames":["🤜 🤛 ","🤜 🤛 ","🤜 🤛 "," 🤜 🤛 "," 🤜🤛 "," 🤜✨🤛 ","🤜 ✨ 🤛 "]},"soccerHeader":{"interval":80,"frames":[" 🧑⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 ","🧑 ⚽️ 🧑 "]},"mindblown":{"interval":160,"frames":["😐 ","😐 ","😮 ","😮 ","😦 ","😦 ","😧 ","😧 ","🤯 ","💥 ","✨ "," "," "," "]},"speaker":{"interval":160,"frames":["🔈 ","🔉 ","🔊 ","🔉 "]},"orangePulse":{"interval":100,"frames":["🔸 ","🔶 ","🟠 ","🟠 ","🔶 "]},"bluePulse":{"interval":100,"frames":["🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},"orangeBluePulse":{"interval":100,"frames":["🔸 ","🔶 ","🟠 ","🟠 ","🔶 ","🔹 ","🔷 ","🔵 ","🔵 ","🔷 "]},"timeTravel":{"interval":100,"frames":["🕛 ","🕚 ","🕙 ","🕘 ","🕗 ","🕖 ","🕕 ","🕔 ","🕓 ","🕒 ","🕑 ","🕐 "]},"aesthetic":{"interval":80,"frames":["▰▱▱▱▱▱▱","▰▰▱▱▱▱▱","▰▰▰▱▱▱▱","▰▰▰▰▱▱▱","▰▰▰▰▰▱▱","▰▰▰▰▰▰▱","▰▰▰▰▰▰▰","▰▱▱▱▱▱▱"]},"dwarfFortress":{"interval":80,"frames":[" ██████£££ ","☺██████£££ ","☺██████£££ ","☺▓█████£££ ","☺▓█████£££ ","☺▒█████£££ ","☺▒█████£££ ","☺░█████£££ ","☺░█████£££ ","☺ █████£££ "," ☺█████£££ "," ☺█████£££ "," ☺▓████£££ "," ☺▓████£££ "," ☺▒████£££ "," ☺▒████£££ "," ☺░████£££ "," ☺░████£££ "," ☺ ████£££ "," ☺████£££ "," ☺████£££ "," ☺▓███£££ "," ☺▓███£££ "," ☺▒███£££ "," ☺▒███£££ "," ☺░███£££ "," ☺░███£££ "," ☺ ███£££ "," ☺███£££ "," ☺███£££ "," ☺▓██£££ "," ☺▓██£££ "," ☺▒██£££ "," ☺▒██£££ "," ☺░██£££ "," ☺░██£££ "," ☺ ██£££ "," ☺██£££ "," ☺██£££ "," ☺▓█£££ "," ☺▓█£££ "," ☺▒█£££ "," ☺▒█£££ "," ☺░█£££ "," ☺░█£££ "," ☺ █£££ "," ☺█£££ "," ☺█£££ "," ☺▓£££ "," ☺▓£££ "," ☺▒£££ "," ☺▒£££ "," ☺░£££ "," ☺░£££ "," ☺ £££ "," ☺£££ "," ☺£££ "," ☺▓££ "," ☺▓££ "," ☺▒££ "," ☺▒££ "," ☺░££ "," ☺░££ "," ☺ ££ "," ☺££ "," ☺££ "," ☺▓£ "," ☺▓£ "," ☺▒£ "," ☺▒£ "," ☺░£ "," ☺░£ "," ☺ £ "," ☺£ "," ☺£ "," ☺▓ "," ☺▓ "," ☺▒ "," ☺▒ "," ☺░ "," ☺░ "," ☺ "," ☺ &"," ☺ ☼&"," ☺ ☼ &"," ☺☼ &"," ☺☼ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & "," ‼ & "," ☺ & ","‼ & "," & "," & "," & ░ "," & ▒ "," & ▓ "," & £ "," & ░£ "," & ▒£ "," & ▓£ "," & ££ "," & ░££ "," & ▒££ ","& ▓££ ","& £££ "," ░£££ "," ▒£££ "," ▓£££ "," █£££ "," ░█£££ "," ▒█£££ "," ▓█£££ "," ██£££ "," ░██£££ "," ▒██£££ "," ▓██£££ "," ███£££ "," ░███£££ "," ▒███£££ "," ▓███£££ "," ████£££ "," ░████£££ "," ▒████£££ "," ▓████£££ "," █████£££ "," ░█████£££ "," ▒█████£££ "," ▓█████£££ "," ██████£££ "," ██████£££ "]},"fish":{"interval":80,"frames":["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","º> ~~~~~~~~~~~~~~~~~","(º> ~~~~~~~~~~~~~~~~","((º> ~~~~~~~~~~~~~~~","<((º> ~~~~~~~~~~~~~~","><((º> ~~~~~~~~~~~~~"," ><((º> ~~~~~~~~~~~~","~ ><((º> ~~~~~~~~~~~","~~ <>((º> ~~~~~~~~~~","~~~ ><((º> ~~~~~~~~~","~~~~ <>((º> ~~~~~~~~","~~~~~ ><((º> ~~~~~~~","~~~~~~ <>((º> ~~~~~~","~~~~~~~ ><((º> ~~~~~","~~~~~~~~ <>((º> ~~~~","~~~~~~~~~ ><((º> ~~~","~~~~~~~~~~ <>((º> ~~","~~~~~~~~~~~ ><((º> ~","~~~~~~~~~~~~ <>((º> ","~~~~~~~~~~~~~ ><((º>","~~~~~~~~~~~~~~ <>((º","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}}');
|
|
822
822
|
const z = q;
|
|
823
823
|
Object.keys(q);
|
|
824
|
-
const
|
|
825
|
-
const format = (
|
|
826
|
-
if (!
|
|
827
|
-
const n = `[${
|
|
828
|
-
const i = `[${
|
|
829
|
-
return (
|
|
830
|
-
const
|
|
831
|
-
let
|
|
832
|
-
if (-1 ===
|
|
824
|
+
const Q = d?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
825
|
+
const format = (t, e)=>{
|
|
826
|
+
if (!Q) return (t)=>t;
|
|
827
|
+
const n = `[${t}m`;
|
|
828
|
+
const i = `[${e}m`;
|
|
829
|
+
return (t)=>{
|
|
830
|
+
const s = t + "";
|
|
831
|
+
let r = s.indexOf(i);
|
|
832
|
+
if (-1 === r) return n + s + i;
|
|
833
833
|
let o = n;
|
|
834
834
|
let a = 0;
|
|
835
|
-
const l = 22 ===
|
|
836
|
-
const
|
|
837
|
-
while(-1 !==
|
|
838
|
-
o +=
|
|
839
|
-
a =
|
|
840
|
-
|
|
835
|
+
const l = 22 === e;
|
|
836
|
+
const c = (l ? i : "") + n;
|
|
837
|
+
while(-1 !== r){
|
|
838
|
+
o += s.slice(a, r) + c;
|
|
839
|
+
a = r + i.length;
|
|
840
|
+
r = s.indexOf(i, a);
|
|
841
841
|
}
|
|
842
|
-
o +=
|
|
842
|
+
o += s.slice(a) + i;
|
|
843
843
|
return o;
|
|
844
844
|
};
|
|
845
845
|
};
|
|
@@ -848,15 +848,19 @@ format(1, 22);
|
|
|
848
848
|
format(2, 22);
|
|
849
849
|
format(3, 23);
|
|
850
850
|
format(4, 24);
|
|
851
|
+
format("4:2", 24);
|
|
852
|
+
format("4:3", 24);
|
|
853
|
+
format("4:4", 24);
|
|
854
|
+
format("4:5", 24);
|
|
851
855
|
format(53, 55);
|
|
852
856
|
format(7, 27);
|
|
853
857
|
format(8, 28);
|
|
854
858
|
format(9, 29);
|
|
855
859
|
format(30, 39);
|
|
856
|
-
const
|
|
857
|
-
const
|
|
858
|
-
const
|
|
859
|
-
const
|
|
860
|
+
const ht = format(31, 39);
|
|
861
|
+
const dt = format(32, 39);
|
|
862
|
+
const mt = format(33, 39);
|
|
863
|
+
const pt = format(34, 39);
|
|
860
864
|
format(35, 39);
|
|
861
865
|
format(36, 39);
|
|
862
866
|
format(37, 39);
|
|
@@ -884,33 +888,49 @@ format(104, 49);
|
|
|
884
888
|
format(105, 49);
|
|
885
889
|
format(106, 49);
|
|
886
890
|
format(107, 49);
|
|
891
|
+
format("58;5;0", 59);
|
|
892
|
+
format("58;5;1", 59);
|
|
893
|
+
format("58;5;2", 59);
|
|
894
|
+
format("58;5;3", 59);
|
|
895
|
+
format("58;5;4", 59);
|
|
896
|
+
format("58;5;5", 59);
|
|
897
|
+
format("58;5;6", 59);
|
|
898
|
+
format("58;5;7", 59);
|
|
899
|
+
format("58;5;8", 59);
|
|
900
|
+
format("58;5;9", 59);
|
|
901
|
+
format("58;5;10", 59);
|
|
902
|
+
format("58;5;11", 59);
|
|
903
|
+
format("58;5;12", 59);
|
|
904
|
+
format("58;5;13", 59);
|
|
905
|
+
format("58;5;14", 59);
|
|
906
|
+
format("58;5;15", 59);
|
|
887
907
|
function isUnicodeSupported() {
|
|
888
|
-
const { env:
|
|
889
|
-
const { TERM:
|
|
890
|
-
if ("win32" !== n.platform) return "linux" !==
|
|
891
|
-
return Boolean(
|
|
908
|
+
const { env: t } = n;
|
|
909
|
+
const { TERM: e, TERM_PROGRAM: i } = t;
|
|
910
|
+
if ("win32" !== n.platform) return "linux" !== e;
|
|
911
|
+
return Boolean(t.WT_SESSION) || Boolean(t.TERMINUS_SUBLIME) || "{cmd::Cmder}" === t.ConEmuTask || "Terminus-Sublime" === i || "vscode" === i || "xterm-256color" === e || "alacritty" === e || "rxvt-unicode" === e || "rxvt-unicode-256color" === e || "JetBrains-JediTerm" === t.TERMINAL_EMULATOR;
|
|
892
912
|
}
|
|
893
|
-
const
|
|
894
|
-
const
|
|
895
|
-
const
|
|
896
|
-
const
|
|
897
|
-
const
|
|
898
|
-
function ansiRegex({ onlyFirst:
|
|
899
|
-
const
|
|
900
|
-
const n = `(?:\\u001B\\][\\
|
|
913
|
+
const re = isUnicodeSupported();
|
|
914
|
+
const oe = pt(re ? "ℹ" : "i");
|
|
915
|
+
const ae = dt(re ? "✔" : "√");
|
|
916
|
+
const le = mt(re ? "⚠" : "‼");
|
|
917
|
+
const ce = ht(re ? "✖" : "×");
|
|
918
|
+
function ansiRegex({ onlyFirst: t = false } = {}) {
|
|
919
|
+
const e = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
920
|
+
const n = `(?:(?:\\u001B\\]|\\u009D)[^\\u0007\\u001B\\u009C\\u009D]*${e})`;
|
|
901
921
|
const i = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
902
|
-
const
|
|
903
|
-
return new RegExp(
|
|
922
|
+
const s = `${n}|${i}`;
|
|
923
|
+
return new RegExp(s, t ? void 0 : "g");
|
|
904
924
|
}
|
|
905
|
-
const
|
|
906
|
-
function stripAnsi(
|
|
907
|
-
if ("string" != typeof
|
|
908
|
-
if (!
|
|
909
|
-
return
|
|
925
|
+
const fe = ansiRegex();
|
|
926
|
+
function stripAnsi(t) {
|
|
927
|
+
if ("string" != typeof t) throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
|
|
928
|
+
if (!t.includes("") && !t.includes("")) return t;
|
|
929
|
+
return t.replace(fe, "");
|
|
910
930
|
}
|
|
911
|
-
const
|
|
912
|
-
const
|
|
913
|
-
const
|
|
931
|
+
const ue = 161;
|
|
932
|
+
const he = 1114109;
|
|
933
|
+
const de = [
|
|
914
934
|
161,
|
|
915
935
|
161,
|
|
916
936
|
164,
|
|
@@ -1270,9 +1290,9 @@ const Je = [
|
|
|
1270
1290
|
1048576,
|
|
1271
1291
|
1114109
|
|
1272
1292
|
];
|
|
1273
|
-
const
|
|
1274
|
-
const
|
|
1275
|
-
const
|
|
1293
|
+
const me = 12288;
|
|
1294
|
+
const pe = 65510;
|
|
1295
|
+
const _e = [
|
|
1276
1296
|
12288,
|
|
1277
1297
|
12288,
|
|
1278
1298
|
65281,
|
|
@@ -1280,9 +1300,9 @@ const Ze = [
|
|
|
1280
1300
|
65504,
|
|
1281
1301
|
65510
|
|
1282
1302
|
];
|
|
1283
|
-
const
|
|
1284
|
-
const
|
|
1285
|
-
const
|
|
1303
|
+
const we = 4352;
|
|
1304
|
+
const Ee = 262141;
|
|
1305
|
+
const Se = [
|
|
1286
1306
|
4352,
|
|
1287
1307
|
4447,
|
|
1288
1308
|
8986,
|
|
@@ -1404,11 +1424,15 @@ const st = [
|
|
|
1404
1424
|
94192,
|
|
1405
1425
|
94198,
|
|
1406
1426
|
94208,
|
|
1407
|
-
|
|
1427
|
+
101594,
|
|
1408
1428
|
101631,
|
|
1409
|
-
|
|
1429
|
+
101664,
|
|
1410
1430
|
101760,
|
|
1411
1431
|
101874,
|
|
1432
|
+
101888,
|
|
1433
|
+
102801,
|
|
1434
|
+
102816,
|
|
1435
|
+
102866,
|
|
1412
1436
|
110576,
|
|
1413
1437
|
110579,
|
|
1414
1438
|
110581,
|
|
@@ -1416,7 +1440,7 @@ const st = [
|
|
|
1416
1440
|
110589,
|
|
1417
1441
|
110590,
|
|
1418
1442
|
110592,
|
|
1419
|
-
|
|
1443
|
+
110888,
|
|
1420
1444
|
110898,
|
|
1421
1445
|
110898,
|
|
1422
1446
|
110928,
|
|
@@ -1424,7 +1448,7 @@ const st = [
|
|
|
1424
1448
|
110933,
|
|
1425
1449
|
110933,
|
|
1426
1450
|
110948,
|
|
1427
|
-
|
|
1451
|
+
110952,
|
|
1428
1452
|
110960,
|
|
1429
1453
|
111355,
|
|
1430
1454
|
119552,
|
|
@@ -1439,6 +1463,8 @@ const st = [
|
|
|
1439
1463
|
127374,
|
|
1440
1464
|
127377,
|
|
1441
1465
|
127386,
|
|
1466
|
+
127406,
|
|
1467
|
+
127406,
|
|
1442
1468
|
127488,
|
|
1443
1469
|
127490,
|
|
1444
1470
|
127504,
|
|
@@ -1492,13 +1518,15 @@ const st = [
|
|
|
1492
1518
|
128720,
|
|
1493
1519
|
128722,
|
|
1494
1520
|
128725,
|
|
1495
|
-
|
|
1521
|
+
128729,
|
|
1496
1522
|
128732,
|
|
1497
1523
|
128735,
|
|
1498
1524
|
128747,
|
|
1499
1525
|
128748,
|
|
1500
1526
|
128756,
|
|
1501
1527
|
128764,
|
|
1528
|
+
128986,
|
|
1529
|
+
128986,
|
|
1502
1530
|
128992,
|
|
1503
1531
|
129003,
|
|
1504
1532
|
129008,
|
|
@@ -1512,227 +1540,223 @@ const st = [
|
|
|
1512
1540
|
129648,
|
|
1513
1541
|
129660,
|
|
1514
1542
|
129664,
|
|
1515
|
-
129674,
|
|
1516
|
-
129678,
|
|
1517
1543
|
129734,
|
|
1518
1544
|
129736,
|
|
1519
1545
|
129736,
|
|
1520
|
-
|
|
1521
|
-
|
|
1546
|
+
129740,
|
|
1547
|
+
129757,
|
|
1522
1548
|
129759,
|
|
1523
|
-
|
|
1549
|
+
129771,
|
|
1524
1550
|
129775,
|
|
1525
|
-
|
|
1551
|
+
129786,
|
|
1526
1552
|
131072,
|
|
1527
1553
|
196605,
|
|
1528
1554
|
196608,
|
|
1529
1555
|
262141
|
|
1530
1556
|
];
|
|
1531
|
-
const utilities_isInRange = (
|
|
1557
|
+
const utilities_isInRange = (t, e)=>{
|
|
1532
1558
|
let n = 0;
|
|
1533
|
-
let i = Math.floor(
|
|
1559
|
+
let i = Math.floor(t.length / 2) - 1;
|
|
1534
1560
|
while(n <= i){
|
|
1535
|
-
const
|
|
1536
|
-
const
|
|
1537
|
-
if (
|
|
1561
|
+
const s = Math.floor((n + i) / 2);
|
|
1562
|
+
const r = 2 * s;
|
|
1563
|
+
if (e < t[r]) i = s - 1;
|
|
1538
1564
|
else {
|
|
1539
|
-
if (!(
|
|
1540
|
-
n =
|
|
1565
|
+
if (!(e > t[r + 1])) return true;
|
|
1566
|
+
n = s + 1;
|
|
1541
1567
|
}
|
|
1542
1568
|
}
|
|
1543
1569
|
return false;
|
|
1544
1570
|
};
|
|
1545
|
-
const
|
|
1546
|
-
const [
|
|
1547
|
-
function findWideFastPathRange(
|
|
1548
|
-
let
|
|
1549
|
-
let n =
|
|
1550
|
-
for(let i = 0; i <
|
|
1551
|
-
const
|
|
1552
|
-
const
|
|
1553
|
-
if (
|
|
1554
|
-
|
|
1555
|
-
|
|
1571
|
+
const Re = 19968;
|
|
1572
|
+
const [Ce, Oe] = findWideFastPathRange(Se);
|
|
1573
|
+
function findWideFastPathRange(t) {
|
|
1574
|
+
let e = t[0];
|
|
1575
|
+
let n = t[1];
|
|
1576
|
+
for(let i = 0; i < t.length; i += 2){
|
|
1577
|
+
const s = t[i];
|
|
1578
|
+
const r = t[i + 1];
|
|
1579
|
+
if (Re >= s && Re <= r) return [
|
|
1580
|
+
s,
|
|
1581
|
+
r
|
|
1556
1582
|
];
|
|
1557
|
-
if (
|
|
1558
|
-
|
|
1559
|
-
n =
|
|
1583
|
+
if (r - s > n - e) {
|
|
1584
|
+
e = s;
|
|
1585
|
+
n = r;
|
|
1560
1586
|
}
|
|
1561
1587
|
}
|
|
1562
1588
|
return [
|
|
1563
|
-
|
|
1589
|
+
e,
|
|
1564
1590
|
n
|
|
1565
1591
|
];
|
|
1566
1592
|
}
|
|
1567
|
-
const isAmbiguous = (
|
|
1568
|
-
if (
|
|
1569
|
-
return utilities_isInRange(
|
|
1593
|
+
const isAmbiguous = (t)=>{
|
|
1594
|
+
if (t < ue || t > he) return false;
|
|
1595
|
+
return utilities_isInRange(de, t);
|
|
1570
1596
|
};
|
|
1571
|
-
const
|
|
1572
|
-
if (
|
|
1573
|
-
return utilities_isInRange(
|
|
1597
|
+
const isFullwidth = (t)=>{
|
|
1598
|
+
if (t < me || t > pe) return false;
|
|
1599
|
+
return utilities_isInRange(_e, t);
|
|
1574
1600
|
};
|
|
1575
|
-
const isWide = (
|
|
1576
|
-
if (
|
|
1577
|
-
if (
|
|
1578
|
-
return utilities_isInRange(
|
|
1601
|
+
const isWide = (t)=>{
|
|
1602
|
+
if (t >= Ce && t <= Oe) return true;
|
|
1603
|
+
if (t < we || t > Ee) return false;
|
|
1604
|
+
return utilities_isInRange(Se, t);
|
|
1579
1605
|
};
|
|
1580
|
-
function validate(
|
|
1581
|
-
if (!Number.isSafeInteger(
|
|
1606
|
+
function validate(t) {
|
|
1607
|
+
if (!Number.isSafeInteger(t)) throw new TypeError(`Expected a code point, got \`${typeof t}\`.`);
|
|
1582
1608
|
}
|
|
1583
|
-
function eastAsianWidth(
|
|
1584
|
-
validate(
|
|
1585
|
-
if (
|
|
1609
|
+
function eastAsianWidth(t, { ambiguousAsWide: e = false } = {}) {
|
|
1610
|
+
validate(t);
|
|
1611
|
+
if (isFullwidth(t) || isWide(t) || e && isAmbiguous(t)) return 2;
|
|
1586
1612
|
return 1;
|
|
1587
1613
|
}
|
|
1588
|
-
const
|
|
1589
|
-
const
|
|
1590
|
-
const
|
|
1591
|
-
const
|
|
1592
|
-
const
|
|
1593
|
-
const
|
|
1594
|
-
function isDoubleWidthNonRgiEmojiSequence(
|
|
1595
|
-
if (
|
|
1596
|
-
if (
|
|
1597
|
-
if (
|
|
1598
|
-
const
|
|
1599
|
-
return null !==
|
|
1614
|
+
const Ie = new Intl.Segmenter;
|
|
1615
|
+
const Pe = /[^\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Nonspacing_Mark}\p{Enclosing_Mark}\p{Surrogate}]/v;
|
|
1616
|
+
const Ae = /\p{Spacing_Mark}/v;
|
|
1617
|
+
const Me = /^\p{RGI_Emoji}$/v;
|
|
1618
|
+
const Fe = /^[\d#*]\u20E3$/;
|
|
1619
|
+
const Be = /\p{Extended_Pictographic}/gu;
|
|
1620
|
+
function isDoubleWidthNonRgiEmojiSequence(t) {
|
|
1621
|
+
if (t.length > 50) return false;
|
|
1622
|
+
if (Fe.test(t)) return true;
|
|
1623
|
+
if (t.includes("")) {
|
|
1624
|
+
const e = t.match(Be);
|
|
1625
|
+
return null !== e && e.length >= 2;
|
|
1600
1626
|
}
|
|
1601
1627
|
return false;
|
|
1602
1628
|
}
|
|
1603
|
-
function baseVisible(
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
function isZeroWidthCluster(e) {
|
|
1607
|
-
return ct.test(e);
|
|
1629
|
+
function baseVisible(t) {
|
|
1630
|
+
const e = t.search(Pe);
|
|
1631
|
+
return -1 === e ? void 0 : t.slice(e);
|
|
1608
1632
|
}
|
|
1609
|
-
function isHangulLeadingJamo(
|
|
1610
|
-
return
|
|
1633
|
+
function isHangulLeadingJamo(t) {
|
|
1634
|
+
return t >= 4352 && t <= 4447 || t >= 43360 && t <= 43388;
|
|
1611
1635
|
}
|
|
1612
|
-
function isHangulVowelJamo(
|
|
1613
|
-
return
|
|
1636
|
+
function isHangulVowelJamo(t) {
|
|
1637
|
+
return t >= 4448 && t <= 4519 || t >= 55216 && t <= 55238;
|
|
1614
1638
|
}
|
|
1615
|
-
function isHangulTrailingJamo(
|
|
1616
|
-
return
|
|
1639
|
+
function isHangulTrailingJamo(t) {
|
|
1640
|
+
return t >= 4520 && t <= 4607 || t >= 55243 && t <= 55291;
|
|
1617
1641
|
}
|
|
1618
|
-
function isHangulJamo(
|
|
1619
|
-
return isHangulLeadingJamo(
|
|
1642
|
+
function isHangulJamo(t) {
|
|
1643
|
+
return isHangulLeadingJamo(t) || isHangulVowelJamo(t) || isHangulTrailingJamo(t);
|
|
1620
1644
|
}
|
|
1621
|
-
function hangulClusterWidth(
|
|
1645
|
+
function hangulClusterWidth(t, e) {
|
|
1622
1646
|
const n = [];
|
|
1623
|
-
for (const
|
|
1647
|
+
for (const e of t)if (Pe.test(e)) n.push(e.codePointAt(0));
|
|
1624
1648
|
if (0 === n.length) return;
|
|
1625
1649
|
let i = 0;
|
|
1626
|
-
for(let
|
|
1627
|
-
const
|
|
1628
|
-
if (!isHangulJamo(
|
|
1650
|
+
for(let t = 0; t < n.length; t++){
|
|
1651
|
+
const s = n[t];
|
|
1652
|
+
if (!isHangulJamo(s)) {
|
|
1629
1653
|
if (0 === i) return;
|
|
1630
|
-
for(let
|
|
1654
|
+
for(let s = t; s < n.length; s++)i += eastAsianWidth(n[s], e);
|
|
1631
1655
|
break;
|
|
1632
1656
|
}
|
|
1633
|
-
if (isHangulLeadingJamo(
|
|
1657
|
+
if (isHangulLeadingJamo(s) && isHangulVowelJamo(n[t + 1])) {
|
|
1634
1658
|
i += 2;
|
|
1635
|
-
|
|
1659
|
+
t += isHangulTrailingJamo(n[t + 2]) ? 2 : 1;
|
|
1636
1660
|
continue;
|
|
1637
1661
|
}
|
|
1638
|
-
i += eastAsianWidth(
|
|
1662
|
+
i += eastAsianWidth(s, e);
|
|
1639
1663
|
}
|
|
1640
1664
|
return i;
|
|
1641
1665
|
}
|
|
1642
|
-
function
|
|
1666
|
+
function trailingWidth(t, e) {
|
|
1643
1667
|
let n = 0;
|
|
1644
1668
|
let i = true;
|
|
1645
|
-
for (const
|
|
1669
|
+
for (const s of t){
|
|
1646
1670
|
if (i) {
|
|
1647
1671
|
i = false;
|
|
1648
1672
|
continue;
|
|
1649
1673
|
}
|
|
1650
|
-
if (
|
|
1674
|
+
if (Ae.test(s) || s >= "" && s <= "") n += eastAsianWidth(s.codePointAt(0), e);
|
|
1651
1675
|
}
|
|
1652
1676
|
return n;
|
|
1653
1677
|
}
|
|
1654
|
-
function stringWidth(
|
|
1655
|
-
if ("string" != typeof
|
|
1656
|
-
const { ambiguousIsNarrow: n = true, countAnsiEscapeCodes: i = false } =
|
|
1657
|
-
let
|
|
1658
|
-
if (!i && (
|
|
1659
|
-
if (0 ===
|
|
1660
|
-
if (/^[\u0020-\u007E]*$/.test(
|
|
1661
|
-
let
|
|
1678
|
+
function stringWidth(t, e = {}) {
|
|
1679
|
+
if ("string" != typeof t || 0 === t.length) return 0;
|
|
1680
|
+
const { ambiguousIsNarrow: n = true, countAnsiEscapeCodes: i = false } = e;
|
|
1681
|
+
let s = t;
|
|
1682
|
+
if (!i && (s.includes("") || s.includes(""))) s = stripAnsi(s);
|
|
1683
|
+
if (0 === s.length) return 0;
|
|
1684
|
+
if (/^[\u0020-\u007E]*$/.test(s)) return s.length;
|
|
1685
|
+
let r = 0;
|
|
1662
1686
|
const o = {
|
|
1663
1687
|
ambiguousAsWide: !n
|
|
1664
1688
|
};
|
|
1665
|
-
for (const { segment:
|
|
1666
|
-
|
|
1667
|
-
if (
|
|
1668
|
-
|
|
1689
|
+
for (const { segment: t } of Ie.segment(s)){
|
|
1690
|
+
const e = baseVisible(t);
|
|
1691
|
+
if (void 0 === e) continue;
|
|
1692
|
+
if (Me.test(t) || isDoubleWidthNonRgiEmojiSequence(t)) {
|
|
1693
|
+
r += 2;
|
|
1669
1694
|
continue;
|
|
1670
1695
|
}
|
|
1671
|
-
const
|
|
1672
|
-
const n = hangulClusterWidth(t, o);
|
|
1696
|
+
const n = hangulClusterWidth(e, o);
|
|
1673
1697
|
if (void 0 !== n) {
|
|
1674
|
-
|
|
1698
|
+
r += n;
|
|
1675
1699
|
continue;
|
|
1676
1700
|
}
|
|
1677
|
-
const i =
|
|
1678
|
-
|
|
1679
|
-
|
|
1701
|
+
const i = e.codePointAt(0);
|
|
1702
|
+
r += eastAsianWidth(i, o);
|
|
1703
|
+
r += trailingWidth(e, o);
|
|
1680
1704
|
}
|
|
1681
|
-
return
|
|
1705
|
+
return r;
|
|
1682
1706
|
}
|
|
1683
|
-
function isInteractive({ stream:
|
|
1684
|
-
return Boolean(
|
|
1707
|
+
function isInteractive({ stream: t = process.stdout } = {}) {
|
|
1708
|
+
return Boolean(t && t.isTTY && "dumb" !== process.env.TERM && !("CI" in process.env));
|
|
1685
1709
|
}
|
|
1686
|
-
const
|
|
1710
|
+
const ke = 3;
|
|
1687
1711
|
class StdinDiscarder {
|
|
1688
|
-
#
|
|
1689
|
-
#
|
|
1712
|
+
#c = 0;
|
|
1713
|
+
#f;
|
|
1690
1714
|
#u = false;
|
|
1691
1715
|
#h = false;
|
|
1692
|
-
#d = (
|
|
1693
|
-
if (!
|
|
1694
|
-
const
|
|
1695
|
-
if (
|
|
1716
|
+
#d = (t)=>{
|
|
1717
|
+
if (!t?.length) return;
|
|
1718
|
+
const e = "string" == typeof t ? t.codePointAt(0) : t[0];
|
|
1719
|
+
if (e === ke) n.kill(n.pid, "SIGINT");
|
|
1696
1720
|
};
|
|
1697
1721
|
start() {
|
|
1698
|
-
this.#
|
|
1699
|
-
if (1 === this.#
|
|
1722
|
+
this.#c++;
|
|
1723
|
+
if (1 === this.#c) this.#m();
|
|
1700
1724
|
}
|
|
1701
1725
|
stop() {
|
|
1702
|
-
if (0 === this.#
|
|
1703
|
-
if (0 === --this.#
|
|
1726
|
+
if (0 === this.#c) return;
|
|
1727
|
+
if (0 === --this.#c) this.#p();
|
|
1704
1728
|
}
|
|
1705
1729
|
#m() {
|
|
1706
|
-
const { stdin:
|
|
1707
|
-
if ("win32" === n.platform || !
|
|
1708
|
-
this.#
|
|
1730
|
+
const { stdin: t } = n;
|
|
1731
|
+
if ("win32" === n.platform || !t?.isTTY || "function" != typeof t.setRawMode) {
|
|
1732
|
+
this.#f = void 0;
|
|
1709
1733
|
return;
|
|
1710
1734
|
}
|
|
1711
|
-
this.#
|
|
1712
|
-
this.#u =
|
|
1713
|
-
this.#h = Boolean(
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
if (this.#u)
|
|
1735
|
+
this.#f = t;
|
|
1736
|
+
this.#u = t.isPaused();
|
|
1737
|
+
this.#h = Boolean(t.isRaw);
|
|
1738
|
+
t.setRawMode(true);
|
|
1739
|
+
t.prependListener("data", this.#d);
|
|
1740
|
+
if (this.#u) t.resume();
|
|
1717
1741
|
}
|
|
1718
1742
|
#p() {
|
|
1719
|
-
if (!this.#
|
|
1720
|
-
const
|
|
1721
|
-
|
|
1722
|
-
if (
|
|
1723
|
-
if (this.#u)
|
|
1724
|
-
this.#
|
|
1743
|
+
if (!this.#f) return;
|
|
1744
|
+
const t = this.#f;
|
|
1745
|
+
t.off("data", this.#d);
|
|
1746
|
+
if (t.isTTY) t.setRawMode?.(this.#h);
|
|
1747
|
+
if (this.#u) t.pause();
|
|
1748
|
+
this.#f = void 0;
|
|
1725
1749
|
this.#u = false;
|
|
1726
1750
|
this.#h = false;
|
|
1727
1751
|
}
|
|
1728
1752
|
}
|
|
1729
|
-
const
|
|
1730
|
-
const
|
|
1731
|
-
const
|
|
1732
|
-
const
|
|
1733
|
-
const
|
|
1734
|
-
const
|
|
1735
|
-
const
|
|
1753
|
+
const Le = new StdinDiscarder;
|
|
1754
|
+
const We = Object.freeze(Le);
|
|
1755
|
+
const je = 200;
|
|
1756
|
+
const Ne = "[?2026h";
|
|
1757
|
+
const Ge = "[?2026l";
|
|
1758
|
+
const De = new Map;
|
|
1759
|
+
const He = new Set([
|
|
1736
1760
|
"black",
|
|
1737
1761
|
"red",
|
|
1738
1762
|
"green",
|
|
@@ -1757,10 +1781,10 @@ class Ora {
|
|
|
1757
1781
|
#R;
|
|
1758
1782
|
#C = false;
|
|
1759
1783
|
#O;
|
|
1760
|
-
#I(
|
|
1784
|
+
#I(t) {
|
|
1761
1785
|
this.#E = true;
|
|
1762
1786
|
try {
|
|
1763
|
-
return
|
|
1787
|
+
return t();
|
|
1764
1788
|
} finally{
|
|
1765
1789
|
this.#E = false;
|
|
1766
1790
|
}
|
|
@@ -1768,26 +1792,26 @@ class Ora {
|
|
|
1768
1792
|
#P() {
|
|
1769
1793
|
if (this.isSpinning) this.render();
|
|
1770
1794
|
}
|
|
1771
|
-
#A(
|
|
1772
|
-
if (null ==
|
|
1773
|
-
if ("string" == typeof
|
|
1774
|
-
if (Buffer.isBuffer(
|
|
1775
|
-
const n = "string" == typeof
|
|
1776
|
-
return Buffer.from(
|
|
1795
|
+
#A(t, e) {
|
|
1796
|
+
if (null == t) return "";
|
|
1797
|
+
if ("string" == typeof t) return t;
|
|
1798
|
+
if (Buffer.isBuffer(t) || ArrayBuffer.isView(t)) {
|
|
1799
|
+
const n = "string" == typeof e && e && "buffer" !== e ? e : "utf8";
|
|
1800
|
+
return Buffer.from(t).toString(n);
|
|
1777
1801
|
}
|
|
1778
|
-
return String(
|
|
1802
|
+
return String(t);
|
|
1779
1803
|
}
|
|
1780
|
-
#M(
|
|
1781
|
-
if (!
|
|
1782
|
-
const
|
|
1783
|
-
return "\n" ===
|
|
1804
|
+
#M(t) {
|
|
1805
|
+
if (!t) return false;
|
|
1806
|
+
const e = t.at(-1);
|
|
1807
|
+
return "\n" === e || "\r" === e;
|
|
1784
1808
|
}
|
|
1785
1809
|
#F() {
|
|
1786
1810
|
if (this.#R) return;
|
|
1787
1811
|
this.#R = setTimeout(()=>{
|
|
1788
1812
|
this.#R = void 0;
|
|
1789
1813
|
if (this.isSpinning) this.#P();
|
|
1790
|
-
},
|
|
1814
|
+
}, je);
|
|
1791
1815
|
if ("function" == typeof this.#R?.unref) this.#R.unref();
|
|
1792
1816
|
}
|
|
1793
1817
|
#B() {
|
|
@@ -1796,23 +1820,23 @@ class Ora {
|
|
|
1796
1820
|
this.#R = void 0;
|
|
1797
1821
|
}
|
|
1798
1822
|
}
|
|
1799
|
-
#
|
|
1800
|
-
const
|
|
1801
|
-
const
|
|
1802
|
-
const o = "string" == typeof
|
|
1803
|
-
const a = this.#
|
|
1804
|
-
return
|
|
1823
|
+
#k(t, e, n, i) {
|
|
1824
|
+
const s = this.#L(n, " ");
|
|
1825
|
+
const r = t ? " " : "";
|
|
1826
|
+
const o = "string" == typeof e ? r + e : "";
|
|
1827
|
+
const a = this.#W(i, " ");
|
|
1828
|
+
return s + t + o + a;
|
|
1805
1829
|
}
|
|
1806
|
-
constructor(
|
|
1807
|
-
if ("string" == typeof
|
|
1808
|
-
text:
|
|
1830
|
+
constructor(t){
|
|
1831
|
+
if ("string" == typeof t) t = {
|
|
1832
|
+
text: t
|
|
1809
1833
|
};
|
|
1810
1834
|
this.#v = {
|
|
1811
1835
|
color: "cyan",
|
|
1812
1836
|
stream: n.stderr,
|
|
1813
1837
|
discardStdin: true,
|
|
1814
1838
|
hideCursor: true,
|
|
1815
|
-
...
|
|
1839
|
+
...t
|
|
1816
1840
|
};
|
|
1817
1841
|
this.color = this.#v.color;
|
|
1818
1842
|
this.#T = this.#v.stream;
|
|
@@ -1821,9 +1845,9 @@ class Ora {
|
|
|
1821
1845
|
});
|
|
1822
1846
|
if ("boolean" != typeof this.#v.isSilent) this.#v.isSilent = false;
|
|
1823
1847
|
if (void 0 !== this.#v.interval && !(Number.isInteger(this.#v.interval) && this.#v.interval > 0)) throw new Error("The `interval` option must be a positive integer");
|
|
1824
|
-
const
|
|
1848
|
+
const e = this.#v.interval;
|
|
1825
1849
|
this.spinner = this.#v.spinner;
|
|
1826
|
-
this.#v.interval =
|
|
1850
|
+
this.#v.interval = e;
|
|
1827
1851
|
this.text = this.#v.text;
|
|
1828
1852
|
this.prefixText = this.#v.prefixText;
|
|
1829
1853
|
this.suffixText = this.#v.suffixText;
|
|
@@ -1835,8 +1859,8 @@ class Ora {
|
|
|
1835
1859
|
get () {
|
|
1836
1860
|
return this.#_;
|
|
1837
1861
|
},
|
|
1838
|
-
set (
|
|
1839
|
-
this.#_ =
|
|
1862
|
+
set (t) {
|
|
1863
|
+
this.#_ = t;
|
|
1840
1864
|
}
|
|
1841
1865
|
});
|
|
1842
1866
|
Object.defineProperty(this, "_frameIndex", {
|
|
@@ -1846,14 +1870,14 @@ class Ora {
|
|
|
1846
1870
|
});
|
|
1847
1871
|
Object.defineProperty(this, "_lineCount", {
|
|
1848
1872
|
get () {
|
|
1849
|
-
const
|
|
1850
|
-
const
|
|
1873
|
+
const t = this.#T.columns ?? 80;
|
|
1874
|
+
const e = "function" == typeof this.#v.prefixText ? "" : this.#v.prefixText;
|
|
1851
1875
|
const n = "function" == typeof this.#v.suffixText ? "" : this.#v.suffixText;
|
|
1852
|
-
const i = "string" == typeof
|
|
1853
|
-
const
|
|
1854
|
-
const
|
|
1855
|
-
const o = " ".repeat(this.#v.indent) + i +
|
|
1856
|
-
return this.#j(o,
|
|
1876
|
+
const i = "string" == typeof e && "" !== e ? e + " " : "";
|
|
1877
|
+
const s = "string" == typeof n && "" !== n ? " " + n : "";
|
|
1878
|
+
const r = "-";
|
|
1879
|
+
const o = " ".repeat(this.#v.indent) + i + r + ("string" == typeof this.#v.text ? " " + this.#v.text : "") + s;
|
|
1880
|
+
return this.#j(o, t);
|
|
1857
1881
|
}
|
|
1858
1882
|
});
|
|
1859
1883
|
}
|
|
@@ -1861,9 +1885,9 @@ class Ora {
|
|
|
1861
1885
|
get indent() {
|
|
1862
1886
|
return this.#v.indent;
|
|
1863
1887
|
}
|
|
1864
|
-
set indent(
|
|
1865
|
-
if (!(
|
|
1866
|
-
this.#v.indent =
|
|
1888
|
+
set indent(t = 0) {
|
|
1889
|
+
if (!(t >= 0 && Number.isInteger(t))) throw new Error("The `indent` option must be an integer from 0 and up");
|
|
1890
|
+
this.#v.indent = t;
|
|
1867
1891
|
}
|
|
1868
1892
|
get interval() {
|
|
1869
1893
|
return this.#v.interval ?? this.#x.interval ?? 100;
|
|
@@ -1871,96 +1895,96 @@ class Ora {
|
|
|
1871
1895
|
get spinner() {
|
|
1872
1896
|
return this.#x;
|
|
1873
1897
|
}
|
|
1874
|
-
set spinner(
|
|
1898
|
+
set spinner(t) {
|
|
1875
1899
|
this.#g = -1;
|
|
1876
1900
|
this.#v.interval = void 0;
|
|
1877
|
-
if ("object" == typeof
|
|
1878
|
-
if (!Array.isArray(
|
|
1879
|
-
if (void 0 !==
|
|
1880
|
-
this.#x =
|
|
1881
|
-
} else if (isUnicodeSupported()) if (void 0 ===
|
|
1882
|
-
else if ("default" !==
|
|
1883
|
-
else throw new Error(`There is no built-in spinner named '${
|
|
1901
|
+
if ("object" == typeof t) {
|
|
1902
|
+
if (!Array.isArray(t.frames) || 0 === t.frames.length || t.frames.some((t)=>"string" != typeof t)) throw new Error("The given spinner must have a non-empty `frames` array of strings");
|
|
1903
|
+
if (void 0 !== t.interval && !(Number.isInteger(t.interval) && t.interval > 0)) throw new Error("`spinner.interval` must be a positive integer if provided");
|
|
1904
|
+
this.#x = t;
|
|
1905
|
+
} else if (isUnicodeSupported()) if (void 0 === t) this.#x = z.dots;
|
|
1906
|
+
else if ("default" !== t && z[t]) this.#x = z[t];
|
|
1907
|
+
else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`);
|
|
1884
1908
|
else this.#x = z.line;
|
|
1885
1909
|
}
|
|
1886
1910
|
get text() {
|
|
1887
1911
|
return this.#v.text;
|
|
1888
1912
|
}
|
|
1889
|
-
set text(
|
|
1890
|
-
this.#v.text =
|
|
1913
|
+
set text(t = "") {
|
|
1914
|
+
this.#v.text = t;
|
|
1891
1915
|
}
|
|
1892
1916
|
get prefixText() {
|
|
1893
1917
|
return this.#v.prefixText;
|
|
1894
1918
|
}
|
|
1895
|
-
set prefixText(
|
|
1896
|
-
this.#v.prefixText =
|
|
1919
|
+
set prefixText(t = "") {
|
|
1920
|
+
this.#v.prefixText = t;
|
|
1897
1921
|
}
|
|
1898
1922
|
get suffixText() {
|
|
1899
1923
|
return this.#v.suffixText;
|
|
1900
1924
|
}
|
|
1901
|
-
set suffixText(
|
|
1902
|
-
this.#v.suffixText =
|
|
1925
|
+
set suffixText(t = "") {
|
|
1926
|
+
this.#v.suffixText = t;
|
|
1903
1927
|
}
|
|
1904
1928
|
get isSpinning() {
|
|
1905
1929
|
return void 0 !== this.#y;
|
|
1906
1930
|
}
|
|
1907
|
-
#
|
|
1908
|
-
const i = "function" == typeof
|
|
1909
|
-
if ("string" == typeof i && "" !== i) return n ?
|
|
1931
|
+
#N(t, e, n = false) {
|
|
1932
|
+
const i = "function" == typeof t ? t() : t;
|
|
1933
|
+
if ("string" == typeof i && "" !== i) return n ? e + i : i + e;
|
|
1910
1934
|
return "";
|
|
1911
1935
|
}
|
|
1912
|
-
#L(
|
|
1913
|
-
return this.#
|
|
1936
|
+
#L(t = this.#v.prefixText, e = " ") {
|
|
1937
|
+
return this.#N(t, e, false);
|
|
1914
1938
|
}
|
|
1915
|
-
#
|
|
1916
|
-
return this.#
|
|
1939
|
+
#W(t = this.#v.suffixText, e = " ") {
|
|
1940
|
+
return this.#N(t, e, true);
|
|
1917
1941
|
}
|
|
1918
|
-
#j(
|
|
1942
|
+
#j(t, e) {
|
|
1919
1943
|
let n = 0;
|
|
1920
|
-
for (const
|
|
1944
|
+
for (const s of (0, i.stripVTControlCharacters)(t).split("\n"))n += Math.max(1, Math.ceil(stringWidth(s) / e));
|
|
1921
1945
|
return n;
|
|
1922
1946
|
}
|
|
1923
1947
|
get color() {
|
|
1924
1948
|
return this.#O;
|
|
1925
1949
|
}
|
|
1926
|
-
set color(
|
|
1927
|
-
if (void 0 !==
|
|
1928
|
-
this.#O =
|
|
1950
|
+
set color(t) {
|
|
1951
|
+
if (void 0 !== t && false !== t && !He.has(t)) throw new Error("The `color` option must be a valid color or `false` to disable");
|
|
1952
|
+
this.#O = t;
|
|
1929
1953
|
}
|
|
1930
1954
|
get isEnabled() {
|
|
1931
1955
|
return this.#v.isEnabled && !this.#v.isSilent;
|
|
1932
1956
|
}
|
|
1933
|
-
set isEnabled(
|
|
1934
|
-
if ("boolean" != typeof
|
|
1935
|
-
this.#v.isEnabled =
|
|
1957
|
+
set isEnabled(t) {
|
|
1958
|
+
if ("boolean" != typeof t) throw new TypeError("The `isEnabled` option must be a boolean");
|
|
1959
|
+
this.#v.isEnabled = t;
|
|
1936
1960
|
}
|
|
1937
1961
|
get isSilent() {
|
|
1938
1962
|
return this.#v.isSilent;
|
|
1939
1963
|
}
|
|
1940
|
-
set isSilent(
|
|
1941
|
-
if ("boolean" != typeof
|
|
1942
|
-
this.#v.isSilent =
|
|
1964
|
+
set isSilent(t) {
|
|
1965
|
+
if ("boolean" != typeof t) throw new TypeError("The `isSilent` option must be a boolean");
|
|
1966
|
+
this.#v.isSilent = t;
|
|
1943
1967
|
}
|
|
1944
1968
|
frame() {
|
|
1945
|
-
const
|
|
1946
|
-
if (-1 === this.#g ||
|
|
1969
|
+
const t = Date.now();
|
|
1970
|
+
if (-1 === this.#g || t - this.#b >= this.interval) {
|
|
1947
1971
|
this.#g = (this.#g + 1) % this.#x.frames.length;
|
|
1948
|
-
this.#b =
|
|
1972
|
+
this.#b = t;
|
|
1949
1973
|
}
|
|
1950
|
-
const { frames:
|
|
1951
|
-
let n =
|
|
1974
|
+
const { frames: e } = this.#x;
|
|
1975
|
+
let n = e[this.#g];
|
|
1952
1976
|
if (this.#O) n = I[this.#O](n);
|
|
1953
1977
|
const i = this.#L(this.#v.prefixText, " ");
|
|
1954
|
-
const
|
|
1955
|
-
const
|
|
1956
|
-
return i + n +
|
|
1978
|
+
const s = "string" == typeof this.text ? " " + this.text : "";
|
|
1979
|
+
const r = this.#W(this.#v.suffixText, " ");
|
|
1980
|
+
return i + n + s + r;
|
|
1957
1981
|
}
|
|
1958
1982
|
clear() {
|
|
1959
1983
|
if (!this.isEnabled || !this.#T.isTTY) return this;
|
|
1960
1984
|
this.#I(()=>{
|
|
1961
1985
|
this.#T.cursorTo(0);
|
|
1962
|
-
for(let
|
|
1963
|
-
if (
|
|
1986
|
+
for(let t = 0; t < this.#_; t++){
|
|
1987
|
+
if (t > 0) this.#T.moveCursor(0, -1);
|
|
1964
1988
|
this.#T.clearLine(1);
|
|
1965
1989
|
}
|
|
1966
1990
|
if (this.#v.indent) this.#T.cursorTo(this.#v.indent);
|
|
@@ -1968,64 +1992,64 @@ class Ora {
|
|
|
1968
1992
|
this.#_ = 0;
|
|
1969
1993
|
return this;
|
|
1970
1994
|
}
|
|
1971
|
-
#
|
|
1972
|
-
if (!
|
|
1973
|
-
if (
|
|
1974
|
-
const
|
|
1975
|
-
this.#w.set(
|
|
1976
|
-
|
|
1977
|
-
|
|
1995
|
+
#G(t) {
|
|
1996
|
+
if (!t || this.#w.has(t) || !t.isTTY || "function" != typeof t.write) return;
|
|
1997
|
+
if (De.has(t)) console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.");
|
|
1998
|
+
const e = t.write;
|
|
1999
|
+
this.#w.set(t, e);
|
|
2000
|
+
De.set(t, this);
|
|
2001
|
+
t.write = (n, i, s)=>this.#D(t, e, n, i, s);
|
|
1978
2002
|
}
|
|
1979
|
-
#
|
|
2003
|
+
#H() {
|
|
1980
2004
|
if (!this.isEnabled || this.#w.size > 0) return;
|
|
1981
|
-
const
|
|
2005
|
+
const t = new Set([
|
|
1982
2006
|
this.#T,
|
|
1983
2007
|
n.stdout,
|
|
1984
2008
|
n.stderr
|
|
1985
2009
|
]);
|
|
1986
|
-
for (const
|
|
2010
|
+
for (const e of t)this.#G(e);
|
|
1987
2011
|
}
|
|
1988
2012
|
#$() {
|
|
1989
|
-
for (const [
|
|
1990
|
-
|
|
1991
|
-
if (
|
|
2013
|
+
for (const [t, e] of this.#w){
|
|
2014
|
+
t.write = e;
|
|
2015
|
+
if (De.get(t) === this) De.delete(t);
|
|
1992
2016
|
}
|
|
1993
2017
|
this.#w.clear();
|
|
1994
2018
|
}
|
|
1995
|
-
#
|
|
2019
|
+
#D(t, e, n, i, s) {
|
|
1996
2020
|
if ("function" == typeof i) {
|
|
1997
|
-
|
|
2021
|
+
s = i;
|
|
1998
2022
|
i = void 0;
|
|
1999
2023
|
}
|
|
2000
|
-
if (this.#E) return
|
|
2024
|
+
if (this.#E) return e.call(t, n, i, s);
|
|
2001
2025
|
this.clear();
|
|
2002
|
-
const
|
|
2003
|
-
const o = this.#M(
|
|
2004
|
-
const a =
|
|
2026
|
+
const r = this.#A(n, i);
|
|
2027
|
+
const o = this.#M(r);
|
|
2028
|
+
const a = e.call(t, n, i, s);
|
|
2005
2029
|
if (o) this.#B();
|
|
2006
|
-
else if (
|
|
2030
|
+
else if (r.length > 0) this.#F();
|
|
2007
2031
|
if (this.isSpinning && !this.#R) this.render();
|
|
2008
2032
|
return a;
|
|
2009
2033
|
}
|
|
2010
2034
|
render() {
|
|
2011
2035
|
if (!this.isEnabled || this.#S || this.#R) return this;
|
|
2012
|
-
const
|
|
2013
|
-
let
|
|
2036
|
+
const t = this.#T.isTTY;
|
|
2037
|
+
let e = false;
|
|
2014
2038
|
try {
|
|
2015
|
-
if (
|
|
2016
|
-
this.#I(()=>this.#T.write(
|
|
2017
|
-
|
|
2039
|
+
if (t) {
|
|
2040
|
+
this.#I(()=>this.#T.write(Ne));
|
|
2041
|
+
e = true;
|
|
2018
2042
|
}
|
|
2019
2043
|
this.clear();
|
|
2020
2044
|
let n = this.frame();
|
|
2021
2045
|
const i = this.#T.columns ?? 80;
|
|
2022
|
-
const
|
|
2023
|
-
const
|
|
2024
|
-
if (
|
|
2025
|
-
const
|
|
2026
|
-
const
|
|
2046
|
+
const s = this.#j(n, i);
|
|
2047
|
+
const r = this.#T.rows;
|
|
2048
|
+
if (r && r > 1 && s > r) {
|
|
2049
|
+
const t = n.split("\n");
|
|
2050
|
+
const e = r - 1;
|
|
2027
2051
|
n = [
|
|
2028
|
-
...
|
|
2052
|
+
...t.slice(0, e),
|
|
2029
2053
|
"... (content truncated to fit terminal)"
|
|
2030
2054
|
].join("\n");
|
|
2031
2055
|
}
|
|
@@ -2039,26 +2063,26 @@ class Ora {
|
|
|
2039
2063
|
}
|
|
2040
2064
|
this.#_ = this.#j(n, i);
|
|
2041
2065
|
} finally{
|
|
2042
|
-
if (
|
|
2066
|
+
if (e) this.#I(()=>this.#T.write(Ge));
|
|
2043
2067
|
}
|
|
2044
2068
|
return this;
|
|
2045
2069
|
}
|
|
2046
|
-
start(
|
|
2047
|
-
if (void 0 !==
|
|
2070
|
+
start(t) {
|
|
2071
|
+
if (void 0 !== t) this.text = t;
|
|
2048
2072
|
if (this.isSilent) return this;
|
|
2049
2073
|
if (!this.isEnabled) {
|
|
2050
|
-
const
|
|
2051
|
-
const
|
|
2052
|
-
if ("" !==
|
|
2074
|
+
const t = this.text ? "-" : "";
|
|
2075
|
+
const e = " ".repeat(this.#v.indent) + this.#k(t, this.text, this.#v.prefixText, this.#v.suffixText);
|
|
2076
|
+
if ("" !== e.trim()) this.#I(()=>this.#T.write(e + "\n"));
|
|
2053
2077
|
return this;
|
|
2054
2078
|
}
|
|
2055
2079
|
if (this.isSpinning) return this;
|
|
2056
2080
|
if (this.#v.hideCursor) J.hide(this.#T);
|
|
2057
2081
|
if (this.#v.discardStdin && n.stdin.isTTY) {
|
|
2058
|
-
|
|
2082
|
+
We.start();
|
|
2059
2083
|
this.#C = true;
|
|
2060
2084
|
}
|
|
2061
|
-
this.#
|
|
2085
|
+
this.#H();
|
|
2062
2086
|
this.render();
|
|
2063
2087
|
this.#y = setInterval(this.render.bind(this), this.interval);
|
|
2064
2088
|
return this;
|
|
@@ -2080,76 +2104,76 @@ class Ora {
|
|
|
2080
2104
|
}
|
|
2081
2105
|
if (this.#C) {
|
|
2082
2106
|
this.#C = false;
|
|
2083
|
-
|
|
2107
|
+
We.stop();
|
|
2084
2108
|
}
|
|
2085
2109
|
return this;
|
|
2086
2110
|
}
|
|
2087
|
-
succeed(
|
|
2111
|
+
succeed(t) {
|
|
2088
2112
|
return this.stopAndPersist({
|
|
2089
|
-
symbol:
|
|
2090
|
-
text:
|
|
2113
|
+
symbol: ae,
|
|
2114
|
+
text: t
|
|
2091
2115
|
});
|
|
2092
2116
|
}
|
|
2093
|
-
fail(
|
|
2117
|
+
fail(t) {
|
|
2094
2118
|
return this.stopAndPersist({
|
|
2095
|
-
symbol:
|
|
2096
|
-
text:
|
|
2119
|
+
symbol: ce,
|
|
2120
|
+
text: t
|
|
2097
2121
|
});
|
|
2098
2122
|
}
|
|
2099
|
-
warn(
|
|
2123
|
+
warn(t) {
|
|
2100
2124
|
return this.stopAndPersist({
|
|
2101
|
-
symbol:
|
|
2102
|
-
text:
|
|
2125
|
+
symbol: le,
|
|
2126
|
+
text: t
|
|
2103
2127
|
});
|
|
2104
2128
|
}
|
|
2105
|
-
info(
|
|
2129
|
+
info(t) {
|
|
2106
2130
|
return this.stopAndPersist({
|
|
2107
|
-
symbol:
|
|
2108
|
-
text:
|
|
2131
|
+
symbol: oe,
|
|
2132
|
+
text: t
|
|
2109
2133
|
});
|
|
2110
2134
|
}
|
|
2111
|
-
stopAndPersist(
|
|
2135
|
+
stopAndPersist(t = {}) {
|
|
2112
2136
|
if (this.isSilent) return this;
|
|
2113
|
-
const
|
|
2114
|
-
const n =
|
|
2115
|
-
const i =
|
|
2116
|
-
const
|
|
2117
|
-
const
|
|
2137
|
+
const e = t.symbol ?? " ";
|
|
2138
|
+
const n = t.text ?? this.text;
|
|
2139
|
+
const i = t.prefixText ?? this.#v.prefixText;
|
|
2140
|
+
const s = t.suffixText ?? this.#v.suffixText;
|
|
2141
|
+
const r = this.#k(e, n, i, s) + "\n";
|
|
2118
2142
|
this.stop();
|
|
2119
|
-
this.#I(()=>this.#T.write(
|
|
2143
|
+
this.#I(()=>this.#T.write(r));
|
|
2120
2144
|
return this;
|
|
2121
2145
|
}
|
|
2122
2146
|
}
|
|
2123
|
-
function ora(
|
|
2124
|
-
return new Ora(
|
|
2147
|
+
function ora(t) {
|
|
2148
|
+
return new Ora(t);
|
|
2125
2149
|
}
|
|
2126
|
-
async function oraPromise(
|
|
2127
|
-
const n = "function" == typeof
|
|
2128
|
-
const i = "function" == typeof
|
|
2150
|
+
async function oraPromise(t, e) {
|
|
2151
|
+
const n = "function" == typeof t;
|
|
2152
|
+
const i = "function" == typeof t?.then;
|
|
2129
2153
|
if (!n && !i) throw new TypeError("Parameter `action` must be a Function or a Promise");
|
|
2130
|
-
const { successText:
|
|
2131
|
-
const l = ora(
|
|
2154
|
+
const { successText: s, failText: r, successSymbol: o, failSymbol: a } = "object" == typeof e && null !== e ? e : {};
|
|
2155
|
+
const l = ora(e).start();
|
|
2132
2156
|
try {
|
|
2133
|
-
const
|
|
2134
|
-
const i = await
|
|
2135
|
-
const
|
|
2136
|
-
if (void 0 === o) l.succeed(
|
|
2157
|
+
const e = n ? t(l) : t;
|
|
2158
|
+
const i = await e;
|
|
2159
|
+
const r = void 0 === s ? void 0 : "string" == typeof s ? s : s(i);
|
|
2160
|
+
if (void 0 === o) l.succeed(r);
|
|
2137
2161
|
else l.stopAndPersist({
|
|
2138
2162
|
symbol: o,
|
|
2139
|
-
text:
|
|
2163
|
+
text: r
|
|
2140
2164
|
});
|
|
2141
2165
|
return i;
|
|
2142
|
-
} catch (
|
|
2143
|
-
const
|
|
2144
|
-
if (void 0 === a) l.fail(
|
|
2166
|
+
} catch (t) {
|
|
2167
|
+
const e = void 0 === r ? void 0 : "string" == typeof r ? r : r(t);
|
|
2168
|
+
if (void 0 === a) l.fail(e);
|
|
2145
2169
|
else l.stopAndPersist({
|
|
2146
2170
|
symbol: a,
|
|
2147
|
-
text:
|
|
2171
|
+
text: e
|
|
2148
2172
|
});
|
|
2149
|
-
throw
|
|
2173
|
+
throw t;
|
|
2150
2174
|
}
|
|
2151
2175
|
}
|
|
2152
|
-
var
|
|
2153
|
-
var
|
|
2154
|
-
var
|
|
2155
|
-
export {
|
|
2176
|
+
var $e = e.Ay;
|
|
2177
|
+
var Ye = e.w1;
|
|
2178
|
+
var Ue = e.pT;
|
|
2179
|
+
export { $e as default, Ye as oraPromise, Ue as spinners };
|