create-rstack 1.1.0 → 1.2.0
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.d.ts +27 -1
- package/dist/index.js +312 -285
- package/package.json +7 -7
- package/template-eslint/react-js/package.json +6 -6
- package/template-eslint/react-ts/package.json +7 -7
- package/template-eslint/svelte-js/package.json +3 -3
- package/template-eslint/svelte-ts/package.json +4 -4
- package/template-eslint/vanilla-js/package.json +3 -3
- package/template-eslint/vanilla-ts/package.json +4 -4
- package/template-eslint/vue-js/package.json +3 -3
- package/template-eslint/vue-ts/package.json +4 -4
- package/template-prettier/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -57,12 +57,38 @@ declare interface MultiSelectOptions<Value> {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
declare type Option_2<Value> = Value extends Primitive ? {
|
|
60
|
+
/**
|
|
61
|
+
* Internal data for this option.
|
|
62
|
+
*/
|
|
60
63
|
value: Value;
|
|
64
|
+
/**
|
|
65
|
+
* The optional, user-facing text for this option.
|
|
66
|
+
*
|
|
67
|
+
* By default, the `value` is converted to a string.
|
|
68
|
+
*/
|
|
61
69
|
label?: string;
|
|
70
|
+
/**
|
|
71
|
+
* An optional hint to display to the user when
|
|
72
|
+
* this option might be selected.
|
|
73
|
+
*
|
|
74
|
+
* By default, no `hint` is displayed.
|
|
75
|
+
*/
|
|
62
76
|
hint?: string;
|
|
63
77
|
} : {
|
|
78
|
+
/**
|
|
79
|
+
* Internal data for this option.
|
|
80
|
+
*/
|
|
64
81
|
value: Value;
|
|
82
|
+
/**
|
|
83
|
+
* Required. The user-facing text for this option.
|
|
84
|
+
*/
|
|
65
85
|
label: string;
|
|
86
|
+
/**
|
|
87
|
+
* An optional hint to display to the user when
|
|
88
|
+
* this option might be selected.
|
|
89
|
+
*
|
|
90
|
+
* By default, no `hint` is displayed.
|
|
91
|
+
*/
|
|
66
92
|
hint?: string;
|
|
67
93
|
};
|
|
68
94
|
|
|
@@ -84,7 +110,7 @@ declare interface TextOptions {
|
|
|
84
110
|
placeholder?: string;
|
|
85
111
|
defaultValue?: string;
|
|
86
112
|
initialValue?: string;
|
|
87
|
-
validate?: (value: string) => string |
|
|
113
|
+
validate?: (value: string) => string | Error | undefined;
|
|
88
114
|
}
|
|
89
115
|
|
|
90
116
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import __rslib_shim_module__ from 'module';
|
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ from "node:fs";
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__ from "node:url";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__ from "node:util";
|
|
6
7
|
import * as __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__ from "node:process";
|
|
7
8
|
import * as __WEBPACK_EXTERNAL_MODULE_node_readline_91c31510__ from "node:readline";
|
|
8
9
|
import * as __WEBPACK_EXTERNAL_MODULE_node_tty_c64aab7e__ from "node:tty";
|
|
@@ -435,80 +436,80 @@ function __webpack_require__(moduleId) {
|
|
|
435
436
|
})();
|
|
436
437
|
var src = __webpack_require__("./node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js");
|
|
437
438
|
var picocolors = __webpack_require__("./node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
438
|
-
function
|
|
439
|
+
function dist_J({ onlyFirst: t = !1 } = {}) {
|
|
439
440
|
const F = "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))";
|
|
440
|
-
return new RegExp(F,
|
|
441
|
+
return new RegExp(F, t ? void 0 : "g");
|
|
441
442
|
}
|
|
442
|
-
const
|
|
443
|
-
function
|
|
444
|
-
if ("string" != typeof
|
|
445
|
-
return
|
|
443
|
+
const dist_Q = dist_J();
|
|
444
|
+
function T(t) {
|
|
445
|
+
if ("string" != typeof t) throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
|
|
446
|
+
return t.replace(dist_Q, "");
|
|
446
447
|
}
|
|
447
|
-
function
|
|
448
|
-
return
|
|
448
|
+
function dist_O(t) {
|
|
449
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
449
450
|
}
|
|
450
|
-
var
|
|
451
|
+
var dist_P = {
|
|
451
452
|
exports: {}
|
|
452
453
|
};
|
|
453
|
-
(function(
|
|
454
|
+
(function(t) {
|
|
454
455
|
var u = {};
|
|
455
|
-
|
|
456
|
-
var s =
|
|
457
|
-
return 55296 <= s && s <= 56319 && 56320 <=
|
|
458
|
-
}, u.characterLength = function(
|
|
459
|
-
var s = this.eastAsianWidth(
|
|
456
|
+
t.exports = u, u.eastAsianWidth = function(e) {
|
|
457
|
+
var s = e.charCodeAt(0), i = 2 == e.length ? e.charCodeAt(1) : 0, D = s;
|
|
458
|
+
return 55296 <= s && s <= 56319 && 56320 <= i && i <= 57343 && (s &= 1023, i &= 1023, D = s << 10 | i, D += 65536), 12288 == D || 65281 <= D && D <= 65376 || 65504 <= D && D <= 65510 ? "F" : 8361 == D || 65377 <= D && D <= 65470 || 65474 <= D && D <= 65479 || 65482 <= D && D <= 65487 || 65490 <= D && D <= 65495 || 65498 <= D && D <= 65500 || 65512 <= D && D <= 65518 ? "H" : 4352 <= D && D <= 4447 || 4515 <= D && D <= 4519 || 4602 <= D && D <= 4607 || 9001 <= D && D <= 9002 || 11904 <= D && D <= 11929 || 11931 <= D && D <= 12019 || 12032 <= D && D <= 12245 || 12272 <= D && D <= 12283 || 12289 <= D && D <= 12350 || 12353 <= D && D <= 12438 || 12441 <= D && D <= 12543 || 12549 <= D && D <= 12589 || 12593 <= D && D <= 12686 || 12688 <= D && D <= 12730 || 12736 <= D && D <= 12771 || 12784 <= D && D <= 12830 || 12832 <= D && D <= 12871 || 12880 <= D && D <= 13054 || 13056 <= D && D <= 19903 || 19968 <= D && D <= 42124 || 42128 <= D && D <= 42182 || 43360 <= D && D <= 43388 || 44032 <= D && D <= 55203 || 55216 <= D && D <= 55238 || 55243 <= D && D <= 55291 || 63744 <= D && D <= 64255 || 65040 <= D && D <= 65049 || 65072 <= D && D <= 65106 || 65108 <= D && D <= 65126 || 65128 <= D && D <= 65131 || 110592 <= D && D <= 110593 || 127488 <= D && D <= 127490 || 127504 <= D && D <= 127546 || 127552 <= D && D <= 127560 || 127568 <= D && D <= 127569 || 131072 <= D && D <= 194367 || 177984 <= D && D <= 196605 || 196608 <= D && D <= 262141 ? "W" : 32 <= D && D <= 126 || 162 <= D && D <= 163 || 165 <= D && D <= 166 || 172 == D || 175 == D || 10214 <= D && D <= 10221 || 10629 <= D && D <= 10630 ? "Na" : 161 == D || 164 == D || 167 <= D && D <= 168 || 170 == D || 173 <= D && D <= 174 || 176 <= D && D <= 180 || 182 <= D && D <= 186 || 188 <= D && D <= 191 || 198 == D || 208 == D || 215 <= D && D <= 216 || 222 <= D && D <= 225 || 230 == D || 232 <= D && D <= 234 || 236 <= D && D <= 237 || 240 == D || 242 <= D && D <= 243 || 247 <= D && D <= 250 || 252 == D || 254 == D || 257 == D || 273 == D || 275 == D || 283 == D || 294 <= D && D <= 295 || 299 == D || 305 <= D && D <= 307 || 312 == D || 319 <= D && D <= 322 || 324 == D || 328 <= D && D <= 331 || 333 == D || 338 <= D && D <= 339 || 358 <= D && D <= 359 || 363 == D || 462 == D || 464 == D || 466 == D || 468 == D || 470 == D || 472 == D || 474 == D || 476 == D || 593 == D || 609 == D || 708 == D || 711 == D || 713 <= D && D <= 715 || 717 == D || 720 == D || 728 <= D && D <= 731 || 733 == D || 735 == D || 768 <= D && D <= 879 || 913 <= D && D <= 929 || 931 <= D && D <= 937 || 945 <= D && D <= 961 || 963 <= D && D <= 969 || 1025 == D || 1040 <= D && D <= 1103 || 1105 == D || 8208 == D || 8211 <= D && D <= 8214 || 8216 <= D && D <= 8217 || 8220 <= D && D <= 8221 || 8224 <= D && D <= 8226 || 8228 <= D && D <= 8231 || 8240 == D || 8242 <= D && D <= 8243 || 8245 == D || 8251 == D || 8254 == D || 8308 == D || 8319 == D || 8321 <= D && D <= 8324 || 8364 == D || 8451 == D || 8453 == D || 8457 == D || 8467 == D || 8470 == D || 8481 <= D && D <= 8482 || 8486 == D || 8491 == D || 8531 <= D && D <= 8532 || 8539 <= D && D <= 8542 || 8544 <= D && D <= 8555 || 8560 <= D && D <= 8569 || 8585 == D || 8592 <= D && D <= 8601 || 8632 <= D && D <= 8633 || 8658 == D || 8660 == D || 8679 == D || 8704 == D || 8706 <= D && D <= 8707 || 8711 <= D && D <= 8712 || 8715 == D || 8719 == D || 8721 == D || 8725 == D || 8730 == D || 8733 <= D && D <= 8736 || 8739 == D || 8741 == D || 8743 <= D && D <= 8748 || 8750 == D || 8756 <= D && D <= 8759 || 8764 <= D && D <= 8765 || 8776 == D || 8780 == D || 8786 == D || 8800 <= D && D <= 8801 || 8804 <= D && D <= 8807 || 8810 <= D && D <= 8811 || 8814 <= D && D <= 8815 || 8834 <= D && D <= 8835 || 8838 <= D && D <= 8839 || 8853 == D || 8857 == D || 8869 == D || 8895 == D || 8978 == D || 9312 <= D && D <= 9449 || 9451 <= D && D <= 9547 || 9552 <= D && D <= 9587 || 9600 <= D && D <= 9615 || 9618 <= D && D <= 9621 || 9632 <= D && D <= 9633 || 9635 <= D && D <= 9641 || 9650 <= D && D <= 9651 || 9654 <= D && D <= 9655 || 9660 <= D && D <= 9661 || 9664 <= D && D <= 9665 || 9670 <= D && D <= 9672 || 9675 == D || 9678 <= D && D <= 9681 || 9698 <= D && D <= 9701 || 9711 == D || 9733 <= D && D <= 9734 || 9737 == D || 9742 <= D && D <= 9743 || 9748 <= D && D <= 9749 || 9756 == D || 9758 == D || 9792 == D || 9794 == D || 9824 <= D && D <= 9825 || 9827 <= D && D <= 9829 || 9831 <= D && D <= 9834 || 9836 <= D && D <= 9837 || 9839 == D || 9886 <= D && D <= 9887 || 9918 <= D && D <= 9919 || 9924 <= D && D <= 9933 || 9935 <= D && D <= 9953 || 9955 == D || 9960 <= D && D <= 9983 || 10045 == D || 10071 == D || 10102 <= D && D <= 10111 || 11093 <= D && D <= 11097 || 12872 <= D && D <= 12879 || 57344 <= D && D <= 63743 || 65024 <= D && D <= 65039 || 65533 == D || 127232 <= D && D <= 127242 || 127248 <= D && D <= 127277 || 127280 <= D && D <= 127337 || 127344 <= D && D <= 127386 || 917760 <= D && D <= 917999 || 983040 <= D && D <= 1048573 || 1048576 <= D && D <= 1114109 ? "A" : "N";
|
|
459
|
+
}, u.characterLength = function(e) {
|
|
460
|
+
var s = this.eastAsianWidth(e);
|
|
460
461
|
return "F" == s || "W" == s || "A" == s ? 2 : 1;
|
|
461
462
|
};
|
|
462
|
-
function F(
|
|
463
|
-
return
|
|
463
|
+
function F(e) {
|
|
464
|
+
return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
|
|
464
465
|
}
|
|
465
|
-
u.length = function(
|
|
466
|
-
for(var s = F(
|
|
467
|
-
return
|
|
468
|
-
}, u.slice = function(
|
|
469
|
-
textLen = u.length(
|
|
470
|
-
for(var D = "",
|
|
471
|
-
var
|
|
472
|
-
if (
|
|
473
|
-
if (
|
|
466
|
+
u.length = function(e) {
|
|
467
|
+
for(var s = F(e), i = 0, D = 0; D < s.length; D++)i += this.characterLength(s[D]);
|
|
468
|
+
return i;
|
|
469
|
+
}, u.slice = function(e, s, i) {
|
|
470
|
+
textLen = u.length(e), s = s || 0, i = i || 1, s < 0 && (s = textLen + s), i < 0 && (i = textLen + i);
|
|
471
|
+
for(var D = "", C = 0, o = F(e), E = 0; E < o.length; E++){
|
|
472
|
+
var a = o[E], n = u.length(a);
|
|
473
|
+
if (C >= s - (2 == n ? 1 : 0)) {
|
|
474
|
+
if (C + n <= i) D += a;
|
|
474
475
|
else break;
|
|
475
476
|
}
|
|
476
|
-
|
|
477
|
+
C += n;
|
|
477
478
|
}
|
|
478
479
|
return D;
|
|
479
480
|
};
|
|
480
|
-
})(
|
|
481
|
-
var
|
|
482
|
-
const
|
|
483
|
-
var
|
|
481
|
+
})(dist_P);
|
|
482
|
+
var X = dist_P.exports;
|
|
483
|
+
const DD = dist_O(X);
|
|
484
|
+
var uD = function() {
|
|
484
485
|
return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\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|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\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]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
|
|
485
486
|
};
|
|
486
|
-
const
|
|
487
|
-
function
|
|
488
|
-
if ("string" != typeof
|
|
487
|
+
const FD = dist_O(uD);
|
|
488
|
+
function A(t, u = {}) {
|
|
489
|
+
if ("string" != typeof t || 0 === t.length || (u = {
|
|
489
490
|
ambiguousIsNarrow: !0,
|
|
490
491
|
...u
|
|
491
|
-
},
|
|
492
|
-
|
|
492
|
+
}, t = T(t), 0 === t.length)) return 0;
|
|
493
|
+
t = t.replace(FD(), " ");
|
|
493
494
|
const F = u.ambiguousIsNarrow ? 1 : 2;
|
|
494
|
-
let
|
|
495
|
-
for (const s of
|
|
496
|
-
const
|
|
497
|
-
if (!(
|
|
495
|
+
let e = 0;
|
|
496
|
+
for (const s of t){
|
|
497
|
+
const i = s.codePointAt(0);
|
|
498
|
+
if (!(i <= 31) && (!(i >= 127) || !(i <= 159)) && (!(i >= 768) || !(i <= 879))) switch(DD.eastAsianWidth(s)){
|
|
498
499
|
case "F":
|
|
499
500
|
case "W":
|
|
500
|
-
|
|
501
|
+
e += 2;
|
|
501
502
|
break;
|
|
502
503
|
case "A":
|
|
503
|
-
|
|
504
|
+
e += F;
|
|
504
505
|
break;
|
|
505
506
|
default:
|
|
506
|
-
|
|
507
|
+
e += 1;
|
|
507
508
|
}
|
|
508
509
|
}
|
|
509
|
-
return
|
|
510
|
+
return e;
|
|
510
511
|
}
|
|
511
|
-
const
|
|
512
|
+
const m = 10, L = (t = 0)=>(u)=>`\x1B[${u + t}m`, N = (t = 0)=>(u)=>`\x1B[${38 + t};5;${u}m`, dist_I = (t = 0)=>(u, F, e)=>`\x1B[${38 + t};2;${u};${F};${e}m`, dist_r = {
|
|
512
513
|
modifier: {
|
|
513
514
|
reset: [
|
|
514
515
|
0,
|
|
@@ -697,29 +698,29 @@ const dist_d = 10, M = (e = 0)=>(u)=>`\x1B[${u + e}m`, P = (e = 0)=>(u)=>`\x1B[$
|
|
|
697
698
|
}
|
|
698
699
|
};
|
|
699
700
|
Object.keys(dist_r.modifier);
|
|
700
|
-
const
|
|
701
|
+
const tD = Object.keys(dist_r.color), eD = Object.keys(dist_r.bgColor);
|
|
701
702
|
[
|
|
702
|
-
...
|
|
703
|
+
...tD,
|
|
703
704
|
...eD
|
|
704
705
|
];
|
|
705
|
-
function
|
|
706
|
-
const
|
|
706
|
+
function sD() {
|
|
707
|
+
const t = new Map;
|
|
707
708
|
for (const [u, F] of Object.entries(dist_r)){
|
|
708
|
-
for (const [
|
|
709
|
+
for (const [e, s] of Object.entries(F))dist_r[e] = {
|
|
709
710
|
open: `\x1B[${s[0]}m`,
|
|
710
711
|
close: `\x1B[${s[1]}m`
|
|
711
|
-
}, F[
|
|
712
|
+
}, F[e] = dist_r[e], t.set(s[0], s[1]);
|
|
712
713
|
Object.defineProperty(dist_r, u, {
|
|
713
714
|
value: F,
|
|
714
715
|
enumerable: !1
|
|
715
716
|
});
|
|
716
717
|
}
|
|
717
718
|
return Object.defineProperty(dist_r, "codes", {
|
|
718
|
-
value:
|
|
719
|
+
value: t,
|
|
719
720
|
enumerable: !1
|
|
720
|
-
}), dist_r.color.close = "\x1B[39m", dist_r.bgColor.close = "\x1B[49m", dist_r.color.ansi =
|
|
721
|
+
}), dist_r.color.close = "\x1B[39m", dist_r.bgColor.close = "\x1B[49m", dist_r.color.ansi = L(), dist_r.color.ansi256 = N(), dist_r.color.ansi16m = dist_I(), dist_r.bgColor.ansi = L(m), dist_r.bgColor.ansi256 = N(m), dist_r.bgColor.ansi16m = dist_I(m), Object.defineProperties(dist_r, {
|
|
721
722
|
rgbToAnsi256: {
|
|
722
|
-
value: (u, F,
|
|
723
|
+
value: (u, F, e)=>u === F && F === e ? u < 8 ? 16 : u > 248 ? 231 : Math.round((u - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u / 255 * 5) + 6 * Math.round(F / 255 * 5) + Math.round(e / 255 * 5),
|
|
723
724
|
enumerable: !1
|
|
724
725
|
},
|
|
725
726
|
hexToRgb: {
|
|
@@ -730,11 +731,11 @@ function tD() {
|
|
|
730
731
|
0,
|
|
731
732
|
0
|
|
732
733
|
];
|
|
733
|
-
let [
|
|
734
|
-
3 ===
|
|
735
|
-
...
|
|
736
|
-
].map((
|
|
737
|
-
const s = Number.parseInt(
|
|
734
|
+
let [e] = F;
|
|
735
|
+
3 === e.length && (e = [
|
|
736
|
+
...e
|
|
737
|
+
].map((i)=>i + i).join(""));
|
|
738
|
+
const s = Number.parseInt(e, 16);
|
|
738
739
|
return [
|
|
739
740
|
s >> 16 & 255,
|
|
740
741
|
s >> 8 & 255,
|
|
@@ -751,22 +752,22 @@ function tD() {
|
|
|
751
752
|
value: (u)=>{
|
|
752
753
|
if (u < 8) return 30 + u;
|
|
753
754
|
if (u < 16) return 90 + (u - 8);
|
|
754
|
-
let F,
|
|
755
|
-
if (u >= 232) F = ((u - 232) * 10 + 8) / 255,
|
|
755
|
+
let F, e, s;
|
|
756
|
+
if (u >= 232) F = ((u - 232) * 10 + 8) / 255, e = F, s = F;
|
|
756
757
|
else {
|
|
757
758
|
u -= 16;
|
|
758
|
-
const
|
|
759
|
-
F = Math.floor(u / 36) / 5,
|
|
759
|
+
const C = u % 36;
|
|
760
|
+
F = Math.floor(u / 36) / 5, e = Math.floor(C / 6) / 5, s = C % 6 / 5;
|
|
760
761
|
}
|
|
761
|
-
const
|
|
762
|
-
if (0 ===
|
|
763
|
-
let D = 30 + (Math.round(s) << 2 | Math.round(
|
|
764
|
-
return 2 ===
|
|
762
|
+
const i = 2 * Math.max(F, e, s);
|
|
763
|
+
if (0 === i) return 30;
|
|
764
|
+
let D = 30 + (Math.round(s) << 2 | Math.round(e) << 1 | Math.round(F));
|
|
765
|
+
return 2 === i && (D += 60), D;
|
|
765
766
|
},
|
|
766
767
|
enumerable: !1
|
|
767
768
|
},
|
|
768
769
|
rgbToAnsi: {
|
|
769
|
-
value: (u, F,
|
|
770
|
+
value: (u, F, e)=>dist_r.ansi256ToAnsi(dist_r.rgbToAnsi256(u, F, e)),
|
|
770
771
|
enumerable: !1
|
|
771
772
|
},
|
|
772
773
|
hexToAnsi: {
|
|
@@ -775,215 +776,250 @@ function tD() {
|
|
|
775
776
|
}
|
|
776
777
|
}), dist_r;
|
|
777
778
|
}
|
|
778
|
-
const
|
|
779
|
+
const iD = sD(), v = new Set([
|
|
779
780
|
"\x1B",
|
|
780
781
|
"\x9B"
|
|
781
|
-
]), CD = 39,
|
|
782
|
-
const
|
|
782
|
+
]), CD = 39, dist_w = "\x07", dist_W = "[", rD = "]", R = "m", y = `${rD}8;;`, V = (t)=>`${v.values().next().value}${dist_W}${t}${R}`, dist_z = (t)=>`${v.values().next().value}${y}${t}${dist_w}`, ED = (t)=>t.split(" ").map((u)=>A(u)), dist_ = (t, u, F)=>{
|
|
783
|
+
const e = [
|
|
783
784
|
...u
|
|
784
785
|
];
|
|
785
|
-
let s = !1,
|
|
786
|
-
for (const [
|
|
787
|
-
const E =
|
|
788
|
-
if (D + E <= F ?
|
|
789
|
-
|
|
786
|
+
let s = !1, i = !1, D = A(T(t[t.length - 1]));
|
|
787
|
+
for (const [C, o] of e.entries()){
|
|
788
|
+
const E = A(o);
|
|
789
|
+
if (D + E <= F ? t[t.length - 1] += o : (t.push(o), D = 0), v.has(o) && (s = !0, i = e.slice(C + 1).join("").startsWith(y)), s) {
|
|
790
|
+
i ? o === dist_w && (s = !1, i = !1) : o === R && (s = !1);
|
|
790
791
|
continue;
|
|
791
792
|
}
|
|
792
|
-
D += E, D === F &&
|
|
793
|
+
D += E, D === F && C < e.length - 1 && (t.push(""), D = 0);
|
|
793
794
|
}
|
|
794
|
-
!D &&
|
|
795
|
-
},
|
|
796
|
-
const u =
|
|
795
|
+
!D && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
|
|
796
|
+
}, nD = (t)=>{
|
|
797
|
+
const u = t.split(" ");
|
|
797
798
|
let F = u.length;
|
|
798
|
-
for(; F > 0 && !(
|
|
799
|
-
return F === u.length ?
|
|
800
|
-
}, oD = (
|
|
801
|
-
if (!1 !== F.trim && "" ===
|
|
802
|
-
let
|
|
803
|
-
const D =
|
|
804
|
-
let
|
|
799
|
+
for(; F > 0 && !(A(u[F - 1]) > 0);)F--;
|
|
800
|
+
return F === u.length ? t : u.slice(0, F).join(" ") + u.slice(F).join("");
|
|
801
|
+
}, oD = (t, u, F = {})=>{
|
|
802
|
+
if (!1 !== F.trim && "" === t.trim()) return "";
|
|
803
|
+
let e = "", s, i;
|
|
804
|
+
const D = ED(t);
|
|
805
|
+
let C = [
|
|
805
806
|
""
|
|
806
807
|
];
|
|
807
|
-
for (const [E,
|
|
808
|
-
!1 !== F.trim && (
|
|
809
|
-
let
|
|
810
|
-
if (0 !== E && (
|
|
811
|
-
const B = u -
|
|
812
|
-
Math.floor((D[E] - 1) / u) < p &&
|
|
808
|
+
for (const [E, a] of t.split(" ").entries()){
|
|
809
|
+
!1 !== F.trim && (C[C.length - 1] = C[C.length - 1].trimStart());
|
|
810
|
+
let n = A(C[C.length - 1]);
|
|
811
|
+
if (0 !== E && (n >= u && (!1 === F.wordWrap || !1 === F.trim) && (C.push(""), n = 0), (n > 0 || !1 === F.trim) && (C[C.length - 1] += " ", n++)), F.hard && D[E] > u) {
|
|
812
|
+
const B = u - n, p = 1 + Math.floor((D[E] - B - 1) / u);
|
|
813
|
+
Math.floor((D[E] - 1) / u) < p && C.push(""), dist_(C, a, u);
|
|
813
814
|
continue;
|
|
814
815
|
}
|
|
815
|
-
if (
|
|
816
|
-
if (!1 === F.wordWrap &&
|
|
817
|
-
|
|
816
|
+
if (n + D[E] > u && n > 0 && D[E] > 0) {
|
|
817
|
+
if (!1 === F.wordWrap && n < u) {
|
|
818
|
+
dist_(C, a, u);
|
|
818
819
|
continue;
|
|
819
820
|
}
|
|
820
|
-
|
|
821
|
+
C.push("");
|
|
821
822
|
}
|
|
822
|
-
if (
|
|
823
|
-
|
|
823
|
+
if (n + D[E] > u && !1 === F.wordWrap) {
|
|
824
|
+
dist_(C, a, u);
|
|
824
825
|
continue;
|
|
825
826
|
}
|
|
826
|
-
|
|
827
|
+
C[C.length - 1] += a;
|
|
827
828
|
}
|
|
828
|
-
!1 !== F.trim && (
|
|
829
|
-
const
|
|
830
|
-
...
|
|
829
|
+
!1 !== F.trim && (C = C.map((E)=>nD(E)));
|
|
830
|
+
const o = [
|
|
831
|
+
...C.join(`
|
|
831
832
|
`)
|
|
832
833
|
];
|
|
833
|
-
for (const [E,
|
|
834
|
-
if (
|
|
835
|
-
const { groups: B } = new RegExp(`(?:\\${
|
|
834
|
+
for (const [E, a] of o.entries()){
|
|
835
|
+
if (e += a, v.has(a)) {
|
|
836
|
+
const { groups: B } = new RegExp(`(?:\\${dist_W}(?<code>\\d+)m|\\${y}(?<uri>.*)${dist_w})`).exec(o.slice(E).join("")) || {
|
|
836
837
|
groups: {}
|
|
837
838
|
};
|
|
838
839
|
if (void 0 !== B.code) {
|
|
839
840
|
const p = Number.parseFloat(B.code);
|
|
840
841
|
s = p === CD ? void 0 : p;
|
|
841
|
-
} else void 0 !== B.uri && (
|
|
842
|
+
} else void 0 !== B.uri && (i = 0 === B.uri.length ? void 0 : B.uri);
|
|
842
843
|
}
|
|
843
|
-
const
|
|
844
|
-
|
|
845
|
-
` ? (
|
|
846
|
-
` && (s &&
|
|
844
|
+
const n = iD.codes.get(Number(s));
|
|
845
|
+
o[E + 1] === `
|
|
846
|
+
` ? (i && (e += dist_z("")), s && n && (e += V(n))) : a === `
|
|
847
|
+
` && (s && n && (e += V(s)), i && (e += dist_z(i)));
|
|
847
848
|
}
|
|
848
|
-
return
|
|
849
|
+
return e;
|
|
849
850
|
};
|
|
850
|
-
function
|
|
851
|
-
return String(
|
|
851
|
+
function G(t, u, F) {
|
|
852
|
+
return String(t).normalize().replace(/\r\n/g, `
|
|
852
853
|
`).split(`
|
|
853
|
-
`).map((
|
|
854
|
+
`).map((e)=>oD(e, u, F)).join(`
|
|
854
855
|
`);
|
|
855
856
|
}
|
|
856
|
-
|
|
857
|
-
enumerable: !0,
|
|
858
|
-
configurable: !0,
|
|
859
|
-
writable: !0,
|
|
860
|
-
value: F
|
|
861
|
-
}) : e[u] = F, a = (e, u, F)=>(aD(e, "symbol" != typeof u ? u + "" : u, F), F);
|
|
862
|
-
function hD(e, u) {
|
|
863
|
-
if (e === u) return;
|
|
864
|
-
const F = e.split(`
|
|
865
|
-
`), t = u.split(`
|
|
866
|
-
`), s = [];
|
|
867
|
-
for(let C = 0; C < Math.max(F.length, t.length); C++)F[C] !== t[C] && s.push(C);
|
|
868
|
-
return s;
|
|
869
|
-
}
|
|
870
|
-
const V = Symbol("clack:cancel");
|
|
871
|
-
function lD(e) {
|
|
872
|
-
return e === V;
|
|
873
|
-
}
|
|
874
|
-
function v(e, u) {
|
|
875
|
-
e.isTTY && e.setRawMode(u);
|
|
876
|
-
}
|
|
877
|
-
const dist_z = new Map([
|
|
878
|
-
[
|
|
879
|
-
"k",
|
|
880
|
-
"up"
|
|
881
|
-
],
|
|
882
|
-
[
|
|
883
|
-
"j",
|
|
884
|
-
"down"
|
|
885
|
-
],
|
|
886
|
-
[
|
|
887
|
-
"h",
|
|
888
|
-
"left"
|
|
889
|
-
],
|
|
890
|
-
[
|
|
891
|
-
"l",
|
|
892
|
-
"right"
|
|
893
|
-
]
|
|
894
|
-
]), xD = new Set([
|
|
857
|
+
const aD = [
|
|
895
858
|
"up",
|
|
896
859
|
"down",
|
|
897
860
|
"left",
|
|
898
861
|
"right",
|
|
899
862
|
"space",
|
|
900
|
-
"enter"
|
|
901
|
-
|
|
863
|
+
"enter",
|
|
864
|
+
"cancel"
|
|
865
|
+
], dist_c = {
|
|
866
|
+
actions: new Set(aD),
|
|
867
|
+
aliases: new Map([
|
|
868
|
+
[
|
|
869
|
+
"k",
|
|
870
|
+
"up"
|
|
871
|
+
],
|
|
872
|
+
[
|
|
873
|
+
"j",
|
|
874
|
+
"down"
|
|
875
|
+
],
|
|
876
|
+
[
|
|
877
|
+
"h",
|
|
878
|
+
"left"
|
|
879
|
+
],
|
|
880
|
+
[
|
|
881
|
+
"l",
|
|
882
|
+
"right"
|
|
883
|
+
],
|
|
884
|
+
[
|
|
885
|
+
"",
|
|
886
|
+
"cancel"
|
|
887
|
+
],
|
|
888
|
+
[
|
|
889
|
+
"escape",
|
|
890
|
+
"cancel"
|
|
891
|
+
]
|
|
892
|
+
])
|
|
893
|
+
};
|
|
894
|
+
function k(t, u) {
|
|
895
|
+
if ("string" == typeof t) return dist_c.aliases.get(t) === u;
|
|
896
|
+
for (const F of t)if (void 0 !== F && k(F, u)) return !0;
|
|
897
|
+
return !1;
|
|
898
|
+
}
|
|
899
|
+
function lD(t, u) {
|
|
900
|
+
if (t === u) return;
|
|
901
|
+
const F = t.split(`
|
|
902
|
+
`), e = u.split(`
|
|
903
|
+
`), s = [];
|
|
904
|
+
for(let i = 0; i < Math.max(F.length, e.length); i++)F[i] !== e[i] && s.push(i);
|
|
905
|
+
return s;
|
|
906
|
+
}
|
|
907
|
+
globalThis.process.platform.startsWith("win");
|
|
908
|
+
const S = Symbol("clack:cancel");
|
|
909
|
+
function BD(t) {
|
|
910
|
+
return t === S;
|
|
911
|
+
}
|
|
912
|
+
function dist_d(t, u) {
|
|
913
|
+
const F = t;
|
|
914
|
+
F.isTTY && F.setRawMode(u);
|
|
915
|
+
}
|
|
916
|
+
var AD = Object.defineProperty, pD = (t, u, F)=>u in t ? AD(t, u, {
|
|
917
|
+
enumerable: !0,
|
|
918
|
+
configurable: !0,
|
|
919
|
+
writable: !0,
|
|
920
|
+
value: F
|
|
921
|
+
}) : t[u] = F, dist_h = (t, u, F)=>(pD(t, "symbol" != typeof u ? u + "" : u, F), F);
|
|
902
922
|
class dist_x {
|
|
903
|
-
constructor(
|
|
904
|
-
|
|
923
|
+
constructor(u, F = !0){
|
|
924
|
+
dist_h(this, "input"), dist_h(this, "output"), dist_h(this, "_abortSignal"), dist_h(this, "rl"), dist_h(this, "opts"), dist_h(this, "_render"), dist_h(this, "_track", !1), dist_h(this, "_prevFrame", ""), dist_h(this, "_subscribers", new Map), dist_h(this, "_cursor", 0), dist_h(this, "state", "initial"), dist_h(this, "error", ""), dist_h(this, "value");
|
|
925
|
+
const { input: e = __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__.stdin, output: s = __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__.stdout, render: i, signal: D, ...C } = u;
|
|
926
|
+
this.opts = C, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i.bind(this), this._track = F, this._abortSignal = D, this.input = e, this.output = s;
|
|
905
927
|
}
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
output: u,
|
|
913
|
-
tabSize: 2,
|
|
914
|
-
prompt: "",
|
|
915
|
-
escapeCodeTimeout: 50
|
|
916
|
-
}), __WEBPACK_EXTERNAL_MODULE_node_readline_91c31510__["default"].emitKeypressEvents(this.input, this.rl), this.rl.prompt(), void 0 !== this.opts.initialValue && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), v(this.input, !0), this.output.on("resize", this.render), this.render(), new Promise((F, t)=>{
|
|
917
|
-
this.once("submit", ()=>{
|
|
918
|
-
this.output.write(src.cursor.show), this.output.off("resize", this.render), v(this.input, !1), F(this.value);
|
|
919
|
-
}), this.once("cancel", ()=>{
|
|
920
|
-
this.output.write(src.cursor.show), this.output.off("resize", this.render), v(this.input, !1), F(V);
|
|
921
|
-
});
|
|
922
|
-
});
|
|
928
|
+
unsubscribe() {
|
|
929
|
+
this._subscribers.clear();
|
|
930
|
+
}
|
|
931
|
+
setSubscriber(u, F) {
|
|
932
|
+
const e = this._subscribers.get(u) ?? [];
|
|
933
|
+
e.push(F), this._subscribers.set(u, e);
|
|
923
934
|
}
|
|
924
935
|
on(u, F) {
|
|
925
|
-
|
|
926
|
-
t.push({
|
|
936
|
+
this.setSubscriber(u, {
|
|
927
937
|
cb: F
|
|
928
|
-
})
|
|
938
|
+
});
|
|
929
939
|
}
|
|
930
940
|
once(u, F) {
|
|
931
|
-
|
|
932
|
-
t.push({
|
|
941
|
+
this.setSubscriber(u, {
|
|
933
942
|
cb: F,
|
|
934
943
|
once: !0
|
|
935
|
-
})
|
|
944
|
+
});
|
|
936
945
|
}
|
|
937
946
|
emit(u, ...F) {
|
|
938
|
-
const
|
|
939
|
-
for (const
|
|
940
|
-
for (const
|
|
947
|
+
const e = this._subscribers.get(u) ?? [], s = [];
|
|
948
|
+
for (const i of e)i.cb(...F), i.once && s.push(()=>e.splice(e.indexOf(i), 1));
|
|
949
|
+
for (const i of s)i();
|
|
941
950
|
}
|
|
942
|
-
|
|
943
|
-
|
|
951
|
+
prompt() {
|
|
952
|
+
return new Promise((u, F)=>{
|
|
953
|
+
if (this._abortSignal) {
|
|
954
|
+
if (this._abortSignal.aborted) return this.state = "cancel", this.close(), u(S);
|
|
955
|
+
this._abortSignal.addEventListener("abort", ()=>{
|
|
956
|
+
this.state = "cancel", this.close();
|
|
957
|
+
}, {
|
|
958
|
+
once: !0
|
|
959
|
+
});
|
|
960
|
+
}
|
|
961
|
+
const e = new __WEBPACK_EXTERNAL_MODULE_node_tty_c64aab7e__.WriteStream(0);
|
|
962
|
+
e._write = (s, i, D)=>{
|
|
963
|
+
this._track && (this.value = this.rl?.line.replace(/\t/g, ""), this._cursor = this.rl?.cursor ?? 0, this.emit("value", this.value)), D();
|
|
964
|
+
}, this.input.pipe(e), this.rl = __WEBPACK_EXTERNAL_MODULE_node_readline_91c31510__["default"].createInterface({
|
|
965
|
+
input: this.input,
|
|
966
|
+
output: e,
|
|
967
|
+
tabSize: 2,
|
|
968
|
+
prompt: "",
|
|
969
|
+
escapeCodeTimeout: 50
|
|
970
|
+
}), __WEBPACK_EXTERNAL_MODULE_node_readline_91c31510__["default"].emitKeypressEvents(this.input, this.rl), this.rl.prompt(), void 0 !== this.opts.initialValue && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), dist_d(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", ()=>{
|
|
971
|
+
this.output.write(src.cursor.show), this.output.off("resize", this.render), dist_d(this.input, !1), u(this.value);
|
|
972
|
+
}), this.once("cancel", ()=>{
|
|
973
|
+
this.output.write(src.cursor.show), this.output.off("resize", this.render), dist_d(this.input, !1), u(S);
|
|
974
|
+
});
|
|
975
|
+
});
|
|
944
976
|
}
|
|
945
977
|
onKeypress(u, F) {
|
|
946
|
-
if ("error" === this.state && (this.state = "active"), F?.name && !this._track &&
|
|
978
|
+
if ("error" === this.state && (this.state = "active"), F?.name && (!this._track && dist_c.aliases.has(F.name) && this.emit("cursor", dist_c.aliases.get(F.name)), dist_c.actions.has(F.name) && this.emit("cursor", F.name)), u && ("y" === u.toLowerCase() || "n" === u.toLowerCase()) && this.emit("confirm", "y" === u.toLowerCase()), " " === u && this.opts.placeholder && (this.value || (this.rl?.write(this.opts.placeholder), this.emit("value", this.opts.placeholder))), u && this.emit("key", u.toLowerCase()), F?.name === "return") {
|
|
947
979
|
if (this.opts.validate) {
|
|
948
|
-
const
|
|
949
|
-
|
|
980
|
+
const e = this.opts.validate(this.value);
|
|
981
|
+
e && (this.error = e instanceof Error ? e.message : e, this.state = "error", this.rl?.write(this.value));
|
|
950
982
|
}
|
|
951
983
|
"error" !== this.state && (this.state = "submit");
|
|
952
984
|
}
|
|
953
|
-
|
|
985
|
+
k([
|
|
986
|
+
u,
|
|
987
|
+
F?.name,
|
|
988
|
+
F?.sequence
|
|
989
|
+
], "cancel") && (this.state = "cancel"), ("submit" === this.state || "cancel" === this.state) && this.emit("finalize"), this.render(), ("submit" === this.state || "cancel" === this.state) && this.close();
|
|
954
990
|
}
|
|
955
991
|
close() {
|
|
956
992
|
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
957
|
-
`),
|
|
993
|
+
`), dist_d(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
|
|
958
994
|
}
|
|
959
995
|
restoreCursor() {
|
|
960
|
-
const u =
|
|
996
|
+
const u = G(this._prevFrame, process.stdout.columns, {
|
|
961
997
|
hard: !0
|
|
962
998
|
}).split(`
|
|
963
999
|
`).length - 1;
|
|
964
1000
|
this.output.write(src.cursor.move(-999, -1 * u));
|
|
965
1001
|
}
|
|
966
1002
|
render() {
|
|
967
|
-
const u =
|
|
1003
|
+
const u = G(this._render(this) ?? "", process.stdout.columns, {
|
|
968
1004
|
hard: !0
|
|
969
1005
|
});
|
|
970
1006
|
if (u !== this._prevFrame) {
|
|
971
1007
|
if ("initial" === this.state) this.output.write(src.cursor.hide);
|
|
972
1008
|
else {
|
|
973
|
-
const F =
|
|
1009
|
+
const F = lD(this._prevFrame, u);
|
|
974
1010
|
if (this.restoreCursor(), F && F?.length === 1) {
|
|
975
|
-
const
|
|
976
|
-
this.output.write(src.cursor.move(0,
|
|
1011
|
+
const e = F[0];
|
|
1012
|
+
this.output.write(src.cursor.move(0, e)), this.output.write(src.erase.lines(1));
|
|
977
1013
|
const s = u.split(`
|
|
978
1014
|
`);
|
|
979
|
-
this.output.write(s[
|
|
1015
|
+
this.output.write(s[e]), this._prevFrame = u, this.output.write(src.cursor.move(0, s.length - e - 1));
|
|
980
1016
|
return;
|
|
981
1017
|
}
|
|
982
1018
|
if (F && F?.length > 1) {
|
|
983
|
-
const
|
|
984
|
-
this.output.write(src.cursor.move(0,
|
|
1019
|
+
const e = F[0];
|
|
1020
|
+
this.output.write(src.cursor.move(0, e)), this.output.write(src.erase.down());
|
|
985
1021
|
const s = u.split(`
|
|
986
|
-
`).slice(
|
|
1022
|
+
`).slice(e);
|
|
987
1023
|
this.output.write(s.join(`
|
|
988
1024
|
`)), this._prevFrame = u;
|
|
989
1025
|
return;
|
|
@@ -994,15 +1030,15 @@ class dist_x {
|
|
|
994
1030
|
}
|
|
995
1031
|
}
|
|
996
1032
|
}
|
|
997
|
-
var
|
|
1033
|
+
var bD = Object.defineProperty, mD = (t, u, F)=>u in t ? bD(t, u, {
|
|
998
1034
|
enumerable: !0,
|
|
999
1035
|
configurable: !0,
|
|
1000
1036
|
writable: !0,
|
|
1001
1037
|
value: F
|
|
1002
|
-
}) :
|
|
1003
|
-
let
|
|
1038
|
+
}) : t[u] = F, dist_Y = (t, u, F)=>(mD(t, "symbol" != typeof u ? u + "" : u, F), F);
|
|
1039
|
+
let wD = class extends dist_x {
|
|
1004
1040
|
constructor(u){
|
|
1005
|
-
super(u, !1),
|
|
1041
|
+
super(u, !1), dist_Y(this, "options"), dist_Y(this, "cursor", 0), this.options = u.options, this.value = [
|
|
1006
1042
|
...u.initialValues ?? []
|
|
1007
1043
|
], this.cursor = Math.max(this.options.findIndex(({ value: F })=>F === u.cursorAt), 0), this.on("key", (F)=>{
|
|
1008
1044
|
"a" === F && this.toggleAll();
|
|
@@ -1037,15 +1073,15 @@ let vD = class extends dist_x {
|
|
|
1037
1073
|
];
|
|
1038
1074
|
}
|
|
1039
1075
|
};
|
|
1040
|
-
var
|
|
1076
|
+
var SD = Object.defineProperty, $D = (t, u, F)=>u in t ? SD(t, u, {
|
|
1041
1077
|
enumerable: !0,
|
|
1042
1078
|
configurable: !0,
|
|
1043
1079
|
writable: !0,
|
|
1044
1080
|
value: F
|
|
1045
|
-
}) :
|
|
1046
|
-
|
|
1081
|
+
}) : t[u] = F, dist_q = (t, u, F)=>($D(t, "symbol" != typeof u ? u + "" : u, F), F);
|
|
1082
|
+
class jD extends dist_x {
|
|
1047
1083
|
constructor(u){
|
|
1048
|
-
super(u, !1),
|
|
1084
|
+
super(u, !1), dist_q(this, "options"), dist_q(this, "cursor", 0), this.options = u.options, this.cursor = this.options.findIndex(({ value: F })=>F === u.initialValue), -1 === this.cursor && (this.cursor = 0), this.changeValue(), this.on("cursor", (F)=>{
|
|
1049
1085
|
switch(F){
|
|
1050
1086
|
case "left":
|
|
1051
1087
|
case "up":
|
|
@@ -1065,55 +1101,48 @@ let $D = class extends dist_x {
|
|
|
1065
1101
|
changeValue() {
|
|
1066
1102
|
this.value = this._value.value;
|
|
1067
1103
|
}
|
|
1068
|
-
}
|
|
1069
|
-
var TD = Object.defineProperty, jD = (e, u, F)=>u in e ? TD(e, u, {
|
|
1070
|
-
enumerable: !0,
|
|
1071
|
-
configurable: !0,
|
|
1072
|
-
writable: !0,
|
|
1073
|
-
value: F
|
|
1074
|
-
}) : e[u] = F, MD = (e, u, F)=>(jD(e, "symbol" != typeof u ? u + "" : u, F), F);
|
|
1104
|
+
}
|
|
1075
1105
|
class PD extends dist_x {
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
else {
|
|
1082
|
-
const F = this.value.slice(0, this.cursor), t = this.value.slice(this.cursor);
|
|
1083
|
-
this.valueWithCursor = `${F}${picocolors.inverse(t[0])}${t.slice(1)}`;
|
|
1084
|
-
}
|
|
1085
|
-
});
|
|
1106
|
+
get valueWithCursor() {
|
|
1107
|
+
if ("submit" === this.state) return this.value;
|
|
1108
|
+
if (this.cursor >= this.value.length) return `${this.value}\u2588`;
|
|
1109
|
+
const u = this.value.slice(0, this.cursor), [F, ...e] = this.value.slice(this.cursor);
|
|
1110
|
+
return `${u}${picocolors.inverse(F)}${e.join("")}`;
|
|
1086
1111
|
}
|
|
1087
1112
|
get cursor() {
|
|
1088
1113
|
return this._cursor;
|
|
1089
1114
|
}
|
|
1115
|
+
constructor(u){
|
|
1116
|
+
super(u), this.on("finalize", ()=>{
|
|
1117
|
+
this.value || (this.value = u.defaultValue);
|
|
1118
|
+
});
|
|
1119
|
+
}
|
|
1090
1120
|
}
|
|
1091
|
-
|
|
1092
|
-
function dist_K() {
|
|
1121
|
+
function dist_X() {
|
|
1093
1122
|
return "win32" !== __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].platform ? "linux" !== __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERM : !!__WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.CI || !!__WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.WT_SESSION || !!__WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERMINUS_SUBLIME || "{cmd::Cmder}" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.ConEmuTask || "Terminus-Sublime" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERM_PROGRAM || "vscode" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERM_PROGRAM || "xterm-256color" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERM || "alacritty" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERM || "JetBrains-JediTerm" === __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__["default"].env.TERMINAL_EMULATOR;
|
|
1094
1123
|
}
|
|
1095
|
-
const
|
|
1124
|
+
const dist_E = dist_X(), dist_u = (s, n)=>dist_E ? s : n, ee = dist_u("\u25C6", "*"), dist_A = dist_u("\u25A0", "x"), dist_B = dist_u("\u25B2", "x"), dist_S = dist_u("\u25C7", "o"), dist_a = (dist_u("\u250C", "T"), dist_u("\u2502", "|")), dist_m = dist_u("\u2514", "\u2014"), dist_j = dist_u("\u25CF", ">"), dist_R = dist_u("\u25CB", " "), dist_V = dist_u("\u25FB", "[\u2022]"), M = dist_u("\u25FC", "[+]"), dist_G = dist_u("\u25FB", "[ ]"), dist_N = (dist_u("\u25AA", "\u2022"), dist_u("\u2500", "-")), re = dist_u("\u256E", "+"), ie = dist_u("\u251C", "+"), ne = dist_u("\u256F", "+"), dist_y = (dist_u("\u25CF", "\u2022"), dist_u("\u25C6", "*"), dist_u("\u25B2", "!"), dist_u("\u25A0", "x"), (s)=>{
|
|
1096
1125
|
switch(s){
|
|
1097
1126
|
case "initial":
|
|
1098
1127
|
case "active":
|
|
1099
|
-
return picocolors.cyan(
|
|
1128
|
+
return picocolors.cyan(ee);
|
|
1100
1129
|
case "cancel":
|
|
1101
|
-
return picocolors.red(
|
|
1130
|
+
return picocolors.red(dist_A);
|
|
1102
1131
|
case "error":
|
|
1103
|
-
return picocolors.yellow(
|
|
1132
|
+
return picocolors.yellow(dist_B);
|
|
1104
1133
|
case "submit":
|
|
1105
|
-
return picocolors.green(
|
|
1134
|
+
return picocolors.green(dist_S);
|
|
1106
1135
|
}
|
|
1107
|
-
}),
|
|
1108
|
-
const { cursor: n, options: t, style: i } = s, r = s.maxItems ??
|
|
1136
|
+
}), dist_k = (s)=>{
|
|
1137
|
+
const { cursor: n, options: t, style: i } = s, r = s.maxItems ?? Number.POSITIVE_INFINITY, c = Math.max(process.stdout.rows - 4, 0), o = Math.min(c, Math.max(r, 5));
|
|
1109
1138
|
let l = 0;
|
|
1110
|
-
n >= l +
|
|
1111
|
-
const
|
|
1112
|
-
return t.slice(l, l +
|
|
1113
|
-
const
|
|
1114
|
-
return
|
|
1139
|
+
n >= l + o - 3 ? l = Math.max(Math.min(n - o + 3, t.length - o), 0) : n < l + 2 && (l = Math.max(n - 2, 0));
|
|
1140
|
+
const $ = o < t.length && l > 0, d = o < t.length && l + o < t.length;
|
|
1141
|
+
return t.slice(l, l + o).map((w, b, C)=>{
|
|
1142
|
+
const I = 0 === b && $, x = b === C.length - 1 && d;
|
|
1143
|
+
return I || x ? picocolors.dim("...") : i(w, b + l === n);
|
|
1115
1144
|
});
|
|
1116
|
-
},
|
|
1145
|
+
}, ue = (s)=>new PD({
|
|
1117
1146
|
validate: s.validate,
|
|
1118
1147
|
placeholder: s.placeholder,
|
|
1119
1148
|
defaultValue: s.defaultValue,
|
|
@@ -1126,34 +1155,34 @@ ${dist_y(this.state)} ${s.message}
|
|
|
1126
1155
|
case "error":
|
|
1127
1156
|
return `${n.trim()}
|
|
1128
1157
|
${picocolors.yellow(dist_a)} ${i}
|
|
1129
|
-
${picocolors.yellow(
|
|
1158
|
+
${picocolors.yellow(dist_m)} ${picocolors.yellow(this.error)}
|
|
1130
1159
|
`;
|
|
1131
1160
|
case "submit":
|
|
1132
1161
|
return `${n}${picocolors.gray(dist_a)} ${picocolors.dim(this.value || s.placeholder)}`;
|
|
1133
1162
|
case "cancel":
|
|
1134
1163
|
return `${n}${picocolors.gray(dist_a)} ${picocolors.strikethrough(picocolors.dim(this.value ?? ""))}${this.value?.trim() ? `
|
|
1135
|
-
|
|
1164
|
+
${picocolors.gray(dist_a)}` : ""}`;
|
|
1136
1165
|
default:
|
|
1137
1166
|
return `${n}${picocolors.cyan(dist_a)} ${i}
|
|
1138
|
-
${picocolors.cyan(
|
|
1167
|
+
${picocolors.cyan(dist_m)}
|
|
1139
1168
|
`;
|
|
1140
1169
|
}
|
|
1141
1170
|
}
|
|
1142
|
-
}).prompt(),
|
|
1171
|
+
}).prompt(), de = (s)=>{
|
|
1143
1172
|
const n = (t, i)=>{
|
|
1144
1173
|
const r = t.label ?? String(t.value);
|
|
1145
1174
|
switch(i){
|
|
1146
1175
|
case "selected":
|
|
1147
1176
|
return `${picocolors.dim(r)}`;
|
|
1148
1177
|
case "active":
|
|
1149
|
-
return `${picocolors.green(
|
|
1178
|
+
return `${picocolors.green(dist_j)} ${r} ${t.hint ? picocolors.dim(`(${t.hint})`) : ""}`;
|
|
1150
1179
|
case "cancelled":
|
|
1151
1180
|
return `${picocolors.strikethrough(picocolors.dim(r))}`;
|
|
1152
1181
|
default:
|
|
1153
|
-
return `${picocolors.dim(
|
|
1182
|
+
return `${picocolors.dim(dist_R)} ${picocolors.dim(r)}`;
|
|
1154
1183
|
}
|
|
1155
1184
|
};
|
|
1156
|
-
return new
|
|
1185
|
+
return new jD({
|
|
1157
1186
|
options: s.options,
|
|
1158
1187
|
initialValue: s.initialValue,
|
|
1159
1188
|
render () {
|
|
@@ -1167,24 +1196,24 @@ ${dist_y(this.state)} ${s.message}
|
|
|
1167
1196
|
return `${t}${picocolors.gray(dist_a)} ${n(this.options[this.cursor], "cancelled")}
|
|
1168
1197
|
${picocolors.gray(dist_a)}`;
|
|
1169
1198
|
default:
|
|
1170
|
-
return `${t}${picocolors.cyan(dist_a)} ${
|
|
1199
|
+
return `${t}${picocolors.cyan(dist_a)} ${dist_k({
|
|
1171
1200
|
cursor: this.cursor,
|
|
1172
1201
|
options: this.options,
|
|
1173
1202
|
maxItems: s.maxItems,
|
|
1174
1203
|
style: (i, r)=>n(i, r ? "active" : "inactive")
|
|
1175
1204
|
}).join(`
|
|
1176
1205
|
${picocolors.cyan(dist_a)} `)}
|
|
1177
|
-
${picocolors.cyan(
|
|
1206
|
+
${picocolors.cyan(dist_m)}
|
|
1178
1207
|
`;
|
|
1179
1208
|
}
|
|
1180
1209
|
}
|
|
1181
1210
|
}).prompt();
|
|
1182
|
-
},
|
|
1211
|
+
}, pe = (s)=>{
|
|
1183
1212
|
const n = (t, i)=>{
|
|
1184
1213
|
const r = t.label ?? String(t.value);
|
|
1185
|
-
return "active" === i ? `${picocolors.cyan(
|
|
1214
|
+
return "active" === i ? `${picocolors.cyan(dist_V)} ${r} ${t.hint ? picocolors.dim(`(${t.hint})`) : ""}` : "selected" === i ? `${picocolors.green(M)} ${picocolors.dim(r)}` : "cancelled" === i ? `${picocolors.strikethrough(picocolors.dim(r))}` : "active-selected" === i ? `${picocolors.green(M)} ${r} ${t.hint ? picocolors.dim(`(${t.hint})`) : ""}` : "submitted" === i ? `${picocolors.dim(r)}` : `${picocolors.dim(dist_G)} ${picocolors.dim(r)}`;
|
|
1186
1215
|
};
|
|
1187
|
-
return new
|
|
1216
|
+
return new wD({
|
|
1188
1217
|
options: s.options,
|
|
1189
1218
|
initialValues: s.initialValues,
|
|
1190
1219
|
required: s.required ?? !0,
|
|
@@ -1194,75 +1223,73 @@ ${picocolors.cyan(dist_$)}
|
|
|
1194
1223
|
${picocolors.reset(picocolors.dim(`Press ${picocolors.gray(picocolors.bgWhite(picocolors.inverse(" space ")))} to select, ${picocolors.gray(picocolors.bgWhite(picocolors.inverse(" enter ")))} to submit`))}`;
|
|
1195
1224
|
},
|
|
1196
1225
|
render () {
|
|
1197
|
-
|
|
1226
|
+
const t = `${picocolors.gray(dist_a)}
|
|
1198
1227
|
${dist_y(this.state)} ${s.message}
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
return o && c ? n(r, "active-selected") : c ? n(r, "selected") : n(r, o ? "active" : "inactive");
|
|
1228
|
+
`, i = (r, c)=>{
|
|
1229
|
+
const o = this.value.includes(r.value);
|
|
1230
|
+
return c && o ? n(r, "active-selected") : o ? n(r, "selected") : n(r, c ? "active" : "inactive");
|
|
1203
1231
|
};
|
|
1204
1232
|
switch(this.state){
|
|
1205
1233
|
case "submit":
|
|
1206
1234
|
return `${t}${picocolors.gray(dist_a)} ${this.options.filter(({ value: r })=>this.value.includes(r)).map((r)=>n(r, "submitted")).join(picocolors.dim(", ")) || picocolors.dim("none")}`;
|
|
1207
1235
|
case "cancel":
|
|
1208
1236
|
{
|
|
1209
|
-
const r = this.options.filter(({ value:
|
|
1237
|
+
const r = this.options.filter(({ value: c })=>this.value.includes(c)).map((c)=>n(c, "cancelled")).join(picocolors.dim(", "));
|
|
1210
1238
|
return `${t}${picocolors.gray(dist_a)} ${r.trim() ? `${r}
|
|
1211
1239
|
${picocolors.gray(dist_a)}` : ""}`;
|
|
1212
1240
|
}
|
|
1213
1241
|
case "error":
|
|
1214
1242
|
{
|
|
1215
1243
|
const r = this.error.split(`
|
|
1216
|
-
`).map((
|
|
1244
|
+
`).map((c, o)=>0 === o ? `${picocolors.yellow(dist_m)} ${picocolors.yellow(c)}` : ` ${c}`).join(`
|
|
1217
1245
|
`);
|
|
1218
|
-
return t + picocolors.yellow(dist_a)
|
|
1246
|
+
return `${t + picocolors.yellow(dist_a)} ${dist_k({
|
|
1219
1247
|
options: this.options,
|
|
1220
1248
|
cursor: this.cursor,
|
|
1221
1249
|
maxItems: s.maxItems,
|
|
1222
1250
|
style: i
|
|
1223
1251
|
}).join(`
|
|
1224
|
-
${picocolors.yellow(dist_a)} `)
|
|
1225
|
-
|
|
1252
|
+
${picocolors.yellow(dist_a)} `)}
|
|
1253
|
+
${r}
|
|
1226
1254
|
`;
|
|
1227
1255
|
}
|
|
1228
1256
|
default:
|
|
1229
|
-
return `${t}${picocolors.cyan(dist_a)} ${
|
|
1257
|
+
return `${t}${picocolors.cyan(dist_a)} ${dist_k({
|
|
1230
1258
|
options: this.options,
|
|
1231
1259
|
cursor: this.cursor,
|
|
1232
1260
|
maxItems: s.maxItems,
|
|
1233
1261
|
style: i
|
|
1234
1262
|
}).join(`
|
|
1235
1263
|
${picocolors.cyan(dist_a)} `)}
|
|
1236
|
-
${picocolors.cyan(
|
|
1264
|
+
${picocolors.cyan(dist_m)}
|
|
1237
1265
|
`;
|
|
1238
1266
|
}
|
|
1239
1267
|
}
|
|
1240
1268
|
}).prompt();
|
|
1241
|
-
},
|
|
1269
|
+
}, ye = (s = "", n = "")=>{
|
|
1242
1270
|
const t = `
|
|
1243
1271
|
${s}
|
|
1244
1272
|
`.split(`
|
|
1245
|
-
`), i =
|
|
1273
|
+
`), i = (0, __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__.stripVTControlCharacters)(n).length, r = Math.max(t.reduce((o, l)=>{
|
|
1274
|
+
const $ = (0, __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__.stripVTControlCharacters)(l);
|
|
1275
|
+
return $.length > o ? $.length : o;
|
|
1276
|
+
}, 0), i) + 2, c = t.map((o)=>`${picocolors.gray(dist_a)} ${picocolors.dim(o)}${" ".repeat(r - (0, __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__.stripVTControlCharacters)(o).length)}${picocolors.gray(dist_a)}`).join(`
|
|
1246
1277
|
`);
|
|
1247
1278
|
process.stdout.write(`${picocolors.gray(dist_a)}
|
|
1248
|
-
${picocolors.green(
|
|
1249
|
-
${
|
|
1250
|
-
${picocolors.gray(
|
|
1279
|
+
${picocolors.green(dist_S)} ${picocolors.reset(n)} ${picocolors.gray(dist_N.repeat(Math.max(r - i - 1, 1)) + re)}
|
|
1280
|
+
${c}
|
|
1281
|
+
${picocolors.gray(ie + dist_N.repeat(r + 2) + ne)}
|
|
1251
1282
|
`);
|
|
1252
|
-
},
|
|
1253
|
-
process.stdout.write(`${picocolors.gray(
|
|
1283
|
+
}, ve = (s = "")=>{
|
|
1284
|
+
process.stdout.write(`${picocolors.gray(dist_m)} ${picocolors.red(s)}
|
|
1254
1285
|
|
|
1255
1286
|
`);
|
|
1256
|
-
},
|
|
1287
|
+
}, fe = (s = "")=>{
|
|
1257
1288
|
process.stdout.write(`${picocolors.gray(dist_a)}
|
|
1258
|
-
${picocolors.gray(
|
|
1289
|
+
${picocolors.gray(dist_m)} ${s}
|
|
1259
1290
|
|
|
1260
1291
|
`);
|
|
1261
1292
|
};
|
|
1262
|
-
function ye() {
|
|
1263
|
-
const s = "[\\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=><~]))";
|
|
1264
|
-
return new RegExp(s, "g");
|
|
1265
|
-
}
|
|
1266
1293
|
var cjs = __webpack_require__("./node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js");
|
|
1267
1294
|
var cjs_default = /*#__PURE__*/ __webpack_require__.n(cjs);
|
|
1268
1295
|
var minimist = __webpack_require__("./node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/index.js");
|
|
@@ -1505,11 +1532,11 @@ var logger = createLogger();
|
|
|
1505
1532
|
const src_filename = (0, __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__.fileURLToPath)(import.meta.url);
|
|
1506
1533
|
const src_dirname = (0, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.dirname)(src_filename);
|
|
1507
1534
|
function cancelAndExit() {
|
|
1508
|
-
|
|
1535
|
+
ve('Operation cancelled.');
|
|
1509
1536
|
process.exit(0);
|
|
1510
1537
|
}
|
|
1511
1538
|
function checkCancel(value) {
|
|
1512
|
-
if (
|
|
1539
|
+
if (BD(value)) cancelAndExit();
|
|
1513
1540
|
return value;
|
|
1514
1541
|
}
|
|
1515
1542
|
function formatProjectName(input) {
|
|
@@ -1554,7 +1581,7 @@ async function getTools({ tools, dir, template }) {
|
|
|
1554
1581
|
tools
|
|
1555
1582
|
];
|
|
1556
1583
|
if (dir && template) return [];
|
|
1557
|
-
return checkCancel(await
|
|
1584
|
+
return checkCancel(await pe({
|
|
1558
1585
|
message: 'Select additional tools (Use <space> to select, <enter> to continue)',
|
|
1559
1586
|
options: [
|
|
1560
1587
|
{
|
|
@@ -1595,7 +1622,7 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
|
|
|
1595
1622
|
const pkgManager = pkgInfo ? pkgInfo.name : 'npm';
|
|
1596
1623
|
const packageJsonPath = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(root, 'package.json');
|
|
1597
1624
|
if (!version) version = JSON.parse(await __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].promises.readFile(packageJsonPath, 'utf-8')).version;
|
|
1598
|
-
const projectName = argv.dir ?? checkCancel(await
|
|
1625
|
+
const projectName = argv.dir ?? checkCancel(await ue({
|
|
1599
1626
|
message: 'Project name or path',
|
|
1600
1627
|
placeholder: `${name}-project`,
|
|
1601
1628
|
defaultValue: `${name}-project`,
|
|
@@ -1606,7 +1633,7 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
|
|
|
1606
1633
|
const { targetDir, packageName } = formatProjectName(projectName);
|
|
1607
1634
|
const distFolder = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].isAbsolute(targetDir) ? targetDir : __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(cwd, targetDir);
|
|
1608
1635
|
if (!argv.override && __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].existsSync(distFolder) && !isEmptyDir(distFolder)) {
|
|
1609
|
-
const option = checkCancel(await
|
|
1636
|
+
const option = checkCancel(await de({
|
|
1610
1637
|
message: `"${targetDir}" is not empty, please choose:`,
|
|
1611
1638
|
options: [
|
|
1612
1639
|
{
|
|
@@ -1666,8 +1693,8 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
|
|
|
1666
1693
|
`${pkgManager} install`,
|
|
1667
1694
|
`${pkgManager} run dev`
|
|
1668
1695
|
];
|
|
1669
|
-
|
|
1670
|
-
|
|
1696
|
+
ye(nextSteps.join('\n'), 'Next steps');
|
|
1697
|
+
fe('Done.');
|
|
1671
1698
|
}
|
|
1672
1699
|
function sortObjectKeys(obj) {
|
|
1673
1700
|
const sortedKeys = Object.keys(obj).sort();
|
|
@@ -1742,4 +1769,4 @@ const updatePackageJson = (pkgJsonPath, version, name)=>{
|
|
|
1742
1769
|
if (name && '.' !== name) pkg.name = name;
|
|
1743
1770
|
__WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__["default"].writeFileSync(pkgJsonPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
1744
1771
|
};
|
|
1745
|
-
export { checkCancel, copyFolder, create, mergePackageJson,
|
|
1772
|
+
export { checkCancel, copyFolder, create, mergePackageJson, pe as multiselect, de as select, ue as text };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rstack",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Create a new Rstack project",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,18 +41,18 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@biomejs/biome": "^1.9.4",
|
|
44
|
-
"@clack/prompts": "^0.
|
|
45
|
-
"@microsoft/api-extractor": "^7.49.
|
|
46
|
-
"@rslib/core": "0.
|
|
44
|
+
"@clack/prompts": "^0.9.1",
|
|
45
|
+
"@microsoft/api-extractor": "^7.49.2",
|
|
46
|
+
"@rslib/core": "0.4.0",
|
|
47
47
|
"@types/minimist": "^1.2.5",
|
|
48
|
-
"@types/node": "22.
|
|
48
|
+
"@types/node": "22.13.0",
|
|
49
49
|
"deepmerge": "^4.3.1",
|
|
50
50
|
"minimist": "^1.2.8",
|
|
51
51
|
"rslog": "^1.2.3",
|
|
52
52
|
"simple-git-hooks": "^2.11.1",
|
|
53
|
-
"typescript": "^5.7.
|
|
53
|
+
"typescript": "^5.7.3"
|
|
54
54
|
},
|
|
55
|
-
"packageManager": "pnpm@9.
|
|
55
|
+
"packageManager": "pnpm@9.15.4",
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public",
|
|
58
58
|
"provenance": true,
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
"lint": "eslint ."
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@eslint/compat": "^1.2.
|
|
10
|
-
"@eslint/js": "^9.
|
|
11
|
-
"eslint": "^9.
|
|
12
|
-
"eslint-plugin-react": "^7.37.
|
|
13
|
-
"eslint-plugin-react-hooks": "^5.
|
|
14
|
-
"globals": "^15.
|
|
9
|
+
"@eslint/compat": "^1.2.6",
|
|
10
|
+
"@eslint/js": "^9.19.0",
|
|
11
|
+
"eslint": "^9.19.0",
|
|
12
|
+
"eslint-plugin-react": "^7.37.4",
|
|
13
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
|
14
|
+
"globals": "^15.14.0"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"lint": "eslint ."
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@eslint/compat": "^1.2.
|
|
10
|
-
"@eslint/js": "^9.
|
|
11
|
-
"eslint": "^9.
|
|
12
|
-
"eslint-plugin-react": "^7.37.
|
|
13
|
-
"eslint-plugin-react-hooks": "^5.
|
|
14
|
-
"globals": "^15.
|
|
15
|
-
"typescript-eslint": "^8.
|
|
9
|
+
"@eslint/compat": "^1.2.6",
|
|
10
|
+
"@eslint/js": "^9.19.0",
|
|
11
|
+
"eslint": "^9.19.0",
|
|
12
|
+
"eslint-plugin-react": "^7.37.4",
|
|
13
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
|
14
|
+
"globals": "^15.14.0",
|
|
15
|
+
"typescript-eslint": "^8.22.0"
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
"lint": "eslint ."
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@eslint/js": "^9.
|
|
10
|
-
"eslint": "^9.
|
|
9
|
+
"@eslint/js": "^9.19.0",
|
|
10
|
+
"eslint": "^9.19.0",
|
|
11
11
|
"eslint-plugin-svelte": "^2.46.1",
|
|
12
|
-
"globals": "^15.
|
|
13
|
-
"typescript-eslint": "^8.
|
|
12
|
+
"globals": "^15.14.0",
|
|
13
|
+
"typescript-eslint": "^8.22.0"
|
|
14
14
|
},
|
|
15
15
|
"type": "module"
|
|
16
16
|
}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"lint": "eslint ."
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@eslint/js": "^9.
|
|
10
|
-
"eslint": "^9.
|
|
11
|
-
"globals": "^15.
|
|
12
|
-
"typescript-eslint": "^8.
|
|
9
|
+
"@eslint/js": "^9.19.0",
|
|
10
|
+
"eslint": "^9.19.0",
|
|
11
|
+
"globals": "^15.14.0",
|
|
12
|
+
"typescript-eslint": "^8.22.0"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
"lint": "eslint ."
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@eslint/js": "^9.
|
|
10
|
-
"eslint": "^9.
|
|
9
|
+
"@eslint/js": "^9.19.0",
|
|
10
|
+
"eslint": "^9.19.0",
|
|
11
11
|
"eslint-plugin-vue": "^9.32.0",
|
|
12
|
-
"globals": "^15.
|
|
13
|
-
"typescript-eslint": "^8.
|
|
12
|
+
"globals": "^15.14.0",
|
|
13
|
+
"typescript-eslint": "^8.22.0"
|
|
14
14
|
}
|
|
15
15
|
}
|