create-rstack 1.8.0 → 1.8.1

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.js CHANGED
@@ -7,10 +7,10 @@ import * as __rspack_external_path from "path";
7
7
  import { __webpack_require__ } from "./rslib-runtime.js";
8
8
  import node_path, { dirname } from "node:path";
9
9
  import { fileURLToPath } from "node:url";
10
+ import node_util, { styleText } from "node:util";
10
11
  import node_process, { stdin, stdout } from "node:process";
11
12
  import node_readline from "node:readline";
12
13
  import node_tty from "node:tty";
13
- import { styleText } from "node:util";
14
14
  import node_os from "node:os";
15
15
  __webpack_require__.add({
16
16
  "./node_modules/.pnpm/@vercel+detect-agent@1.1.0/node_modules/@vercel/detect-agent/dist/index.js" (module, __unused_rspack_exports, __webpack_require__) {
@@ -930,35 +930,38 @@ __webpack_require__.add({
930
930
  }
931
931
  });
932
932
  const src = __webpack_require__("./node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js");
933
- const picocolors = __webpack_require__("./node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
934
- var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
935
- const dist_at = (t)=>161 === t || 164 === t || 167 === t || 168 === t || 170 === t || 173 === t || 174 === t || t >= 176 && t <= 180 || t >= 182 && t <= 186 || t >= 188 && t <= 191 || 198 === t || 208 === t || 215 === t || 216 === t || t >= 222 && t <= 225 || 230 === t || t >= 232 && t <= 234 || 236 === t || 237 === t || 240 === t || 242 === t || 243 === t || t >= 247 && t <= 250 || 252 === t || 254 === t || 257 === t || 273 === t || 275 === t || 283 === t || 294 === t || 295 === t || 299 === t || t >= 305 && t <= 307 || 312 === t || t >= 319 && t <= 322 || 324 === t || t >= 328 && t <= 331 || 333 === t || 338 === t || 339 === t || 358 === t || 359 === t || 363 === t || 462 === t || 464 === t || 466 === t || 468 === t || 470 === t || 472 === t || 474 === t || 476 === t || 593 === t || 609 === t || 708 === t || 711 === t || t >= 713 && t <= 715 || 717 === t || 720 === t || t >= 728 && t <= 731 || 733 === t || 735 === t || t >= 768 && t <= 879 || t >= 913 && t <= 929 || t >= 931 && t <= 937 || t >= 945 && t <= 961 || t >= 963 && t <= 969 || 1025 === t || t >= 1040 && t <= 1103 || 1105 === t || 8208 === t || t >= 8211 && t <= 8214 || 8216 === t || 8217 === t || 8220 === t || 8221 === t || t >= 8224 && t <= 8226 || t >= 8228 && t <= 8231 || 8240 === t || 8242 === t || 8243 === t || 8245 === t || 8251 === t || 8254 === t || 8308 === t || 8319 === t || t >= 8321 && t <= 8324 || 8364 === t || 8451 === t || 8453 === t || 8457 === t || 8467 === t || 8470 === t || 8481 === t || 8482 === t || 8486 === t || 8491 === t || 8531 === t || 8532 === t || t >= 8539 && t <= 8542 || t >= 8544 && t <= 8555 || t >= 8560 && t <= 8569 || 8585 === t || t >= 8592 && t <= 8601 || 8632 === t || 8633 === t || 8658 === t || 8660 === t || 8679 === t || 8704 === t || 8706 === t || 8707 === t || 8711 === t || 8712 === t || 8715 === t || 8719 === t || 8721 === t || 8725 === t || 8730 === t || t >= 8733 && t <= 8736 || 8739 === t || 8741 === t || t >= 8743 && t <= 8748 || 8750 === t || t >= 8756 && t <= 8759 || 8764 === t || 8765 === t || 8776 === t || 8780 === t || 8786 === t || 8800 === t || 8801 === t || t >= 8804 && t <= 8807 || 8810 === t || 8811 === t || 8814 === t || 8815 === t || 8834 === t || 8835 === t || 8838 === t || 8839 === t || 8853 === t || 8857 === t || 8869 === t || 8895 === t || 8978 === t || t >= 9312 && t <= 9449 || t >= 9451 && t <= 9547 || t >= 9552 && t <= 9587 || t >= 9600 && t <= 9615 || t >= 9618 && t <= 9621 || 9632 === t || 9633 === t || t >= 9635 && t <= 9641 || 9650 === t || 9651 === t || 9654 === t || 9655 === t || 9660 === t || 9661 === t || 9664 === t || 9665 === t || t >= 9670 && t <= 9672 || 9675 === t || t >= 9678 && t <= 9681 || t >= 9698 && t <= 9701 || 9711 === t || 9733 === t || 9734 === t || 9737 === t || 9742 === t || 9743 === t || 9756 === t || 9758 === t || 9792 === t || 9794 === t || 9824 === t || 9825 === t || t >= 9827 && t <= 9829 || t >= 9831 && t <= 9834 || 9836 === t || 9837 === t || 9839 === t || 9886 === t || 9887 === t || 9919 === t || t >= 9926 && t <= 9933 || t >= 9935 && t <= 9939 || t >= 9941 && t <= 9953 || 9955 === t || 9960 === t || 9961 === t || t >= 9963 && t <= 9969 || 9972 === t || t >= 9974 && t <= 9977 || 9979 === t || 9980 === t || 9982 === t || 9983 === t || 10045 === t || t >= 10102 && t <= 10111 || t >= 11094 && t <= 11097 || t >= 12872 && t <= 12879 || t >= 57344 && t <= 63743 || t >= 65024 && t <= 65039 || 65533 === t || t >= 127232 && t <= 127242 || t >= 127248 && t <= 127277 || t >= 127280 && t <= 127337 || t >= 127344 && t <= 127373 || 127375 === t || 127376 === t || t >= 127387 && t <= 127404 || t >= 917760 && t <= 917999 || t >= 983040 && t <= 1048573 || t >= 1048576 && t <= 1114109, dist_lt = (t)=>12288 === t || t >= 65281 && t <= 65376 || t >= 65504 && t <= 65510, ht = (t)=>t >= 4352 && t <= 4447 || 8986 === t || 8987 === t || 9001 === t || 9002 === t || t >= 9193 && t <= 9196 || 9200 === t || 9203 === t || 9725 === t || 9726 === t || 9748 === t || 9749 === t || t >= 9800 && t <= 9811 || 9855 === t || 9875 === t || 9889 === t || 9898 === t || 9899 === t || 9917 === t || 9918 === t || 9924 === t || 9925 === t || 9934 === t || 9940 === t || 9962 === t || 9970 === t || 9971 === t || 9973 === t || 9978 === t || 9981 === t || 9989 === t || 9994 === t || 9995 === t || 10024 === t || 10060 === t || 10062 === t || t >= 10067 && t <= 10069 || 10071 === t || t >= 10133 && t <= 10135 || 10160 === t || 10175 === t || 11035 === t || 11036 === t || 11088 === t || 11093 === t || t >= 11904 && t <= 11929 || t >= 11931 && t <= 12019 || t >= 12032 && t <= 12245 || t >= 12272 && t <= 12287 || t >= 12289 && t <= 12350 || t >= 12353 && t <= 12438 || t >= 12441 && t <= 12543 || t >= 12549 && t <= 12591 || t >= 12593 && t <= 12686 || t >= 12688 && t <= 12771 || t >= 12783 && t <= 12830 || t >= 12832 && t <= 12871 || t >= 12880 && t <= 19903 || t >= 19968 && t <= 42124 || t >= 42128 && t <= 42182 || t >= 43360 && t <= 43388 || t >= 44032 && t <= 55203 || t >= 63744 && t <= 64255 || t >= 65040 && t <= 65049 || t >= 65072 && t <= 65106 || t >= 65108 && t <= 65126 || t >= 65128 && t <= 65131 || t >= 94176 && t <= 94180 || 94192 === t || 94193 === t || t >= 94208 && t <= 100343 || t >= 100352 && t <= 101589 || t >= 101632 && t <= 101640 || t >= 110576 && t <= 110579 || t >= 110581 && t <= 110587 || 110589 === t || 110590 === t || t >= 110592 && t <= 110882 || 110898 === t || t >= 110928 && t <= 110930 || 110933 === t || t >= 110948 && t <= 110951 || t >= 110960 && t <= 111355 || 126980 === t || 127183 === t || 127374 === t || t >= 127377 && t <= 127386 || t >= 127488 && t <= 127490 || t >= 127504 && t <= 127547 || t >= 127552 && t <= 127560 || 127568 === t || 127569 === t || t >= 127584 && t <= 127589 || t >= 127744 && t <= 127776 || t >= 127789 && t <= 127797 || t >= 127799 && t <= 127868 || t >= 127870 && t <= 127891 || t >= 127904 && t <= 127946 || t >= 127951 && t <= 127955 || t >= 127968 && t <= 127984 || 127988 === t || t >= 127992 && t <= 128062 || 128064 === t || t >= 128066 && t <= 128252 || t >= 128255 && t <= 128317 || t >= 128331 && t <= 128334 || t >= 128336 && t <= 128359 || 128378 === t || 128405 === t || 128406 === t || 128420 === t || t >= 128507 && t <= 128591 || t >= 128640 && t <= 128709 || 128716 === t || t >= 128720 && t <= 128722 || t >= 128725 && t <= 128727 || t >= 128732 && t <= 128735 || 128747 === t || 128748 === t || t >= 128756 && t <= 128764 || t >= 128992 && t <= 129003 || 129008 === t || t >= 129292 && t <= 129338 || t >= 129340 && t <= 129349 || t >= 129351 && t <= 129535 || t >= 129648 && t <= 129660 || t >= 129664 && t <= 129672 || t >= 129680 && t <= 129725 || t >= 129727 && t <= 129733 || t >= 129742 && t <= 129755 || t >= 129760 && t <= 129768 || t >= 129776 && t <= 129784 || t >= 131072 && t <= 196605 || t >= 196608 && t <= 262141, dist_O = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, dist_y = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, M = /\t{1,1000}/y, P = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu, dist_L = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, dist_ct = /\p{M}+/gu, pt = {
933
+ function x(t, e, s) {
934
+ if (!s.some((u)=>!u.disabled)) return t;
935
+ const i = t + e, r = Math.max(s.length - 1, 0), n = i < 0 ? r : i > r ? 0 : i;
936
+ return s[n].disabled ? x(n, e < 0 ? -1 : 1, s) : n;
937
+ }
938
+ const dist_at = (t)=>161 === t || 164 === t || 167 === t || 168 === t || 170 === t || 173 === t || 174 === t || t >= 176 && t <= 180 || t >= 182 && t <= 186 || t >= 188 && t <= 191 || 198 === t || 208 === t || 215 === t || 216 === t || t >= 222 && t <= 225 || 230 === t || t >= 232 && t <= 234 || 236 === t || 237 === t || 240 === t || 242 === t || 243 === t || t >= 247 && t <= 250 || 252 === t || 254 === t || 257 === t || 273 === t || 275 === t || 283 === t || 294 === t || 295 === t || 299 === t || t >= 305 && t <= 307 || 312 === t || t >= 319 && t <= 322 || 324 === t || t >= 328 && t <= 331 || 333 === t || 338 === t || 339 === t || 358 === t || 359 === t || 363 === t || 462 === t || 464 === t || 466 === t || 468 === t || 470 === t || 472 === t || 474 === t || 476 === t || 593 === t || 609 === t || 708 === t || 711 === t || t >= 713 && t <= 715 || 717 === t || 720 === t || t >= 728 && t <= 731 || 733 === t || 735 === t || t >= 768 && t <= 879 || t >= 913 && t <= 929 || t >= 931 && t <= 937 || t >= 945 && t <= 961 || t >= 963 && t <= 969 || 1025 === t || t >= 1040 && t <= 1103 || 1105 === t || 8208 === t || t >= 8211 && t <= 8214 || 8216 === t || 8217 === t || 8220 === t || 8221 === t || t >= 8224 && t <= 8226 || t >= 8228 && t <= 8231 || 8240 === t || 8242 === t || 8243 === t || 8245 === t || 8251 === t || 8254 === t || 8308 === t || 8319 === t || t >= 8321 && t <= 8324 || 8364 === t || 8451 === t || 8453 === t || 8457 === t || 8467 === t || 8470 === t || 8481 === t || 8482 === t || 8486 === t || 8491 === t || 8531 === t || 8532 === t || t >= 8539 && t <= 8542 || t >= 8544 && t <= 8555 || t >= 8560 && t <= 8569 || 8585 === t || t >= 8592 && t <= 8601 || 8632 === t || 8633 === t || 8658 === t || 8660 === t || 8679 === t || 8704 === t || 8706 === t || 8707 === t || 8711 === t || 8712 === t || 8715 === t || 8719 === t || 8721 === t || 8725 === t || 8730 === t || t >= 8733 && t <= 8736 || 8739 === t || 8741 === t || t >= 8743 && t <= 8748 || 8750 === t || t >= 8756 && t <= 8759 || 8764 === t || 8765 === t || 8776 === t || 8780 === t || 8786 === t || 8800 === t || 8801 === t || t >= 8804 && t <= 8807 || 8810 === t || 8811 === t || 8814 === t || 8815 === t || 8834 === t || 8835 === t || 8838 === t || 8839 === t || 8853 === t || 8857 === t || 8869 === t || 8895 === t || 8978 === t || t >= 9312 && t <= 9449 || t >= 9451 && t <= 9547 || t >= 9552 && t <= 9587 || t >= 9600 && t <= 9615 || t >= 9618 && t <= 9621 || 9632 === t || 9633 === t || t >= 9635 && t <= 9641 || 9650 === t || 9651 === t || 9654 === t || 9655 === t || 9660 === t || 9661 === t || 9664 === t || 9665 === t || t >= 9670 && t <= 9672 || 9675 === t || t >= 9678 && t <= 9681 || t >= 9698 && t <= 9701 || 9711 === t || 9733 === t || 9734 === t || 9737 === t || 9742 === t || 9743 === t || 9756 === t || 9758 === t || 9792 === t || 9794 === t || 9824 === t || 9825 === t || t >= 9827 && t <= 9829 || t >= 9831 && t <= 9834 || 9836 === t || 9837 === t || 9839 === t || 9886 === t || 9887 === t || 9919 === t || t >= 9926 && t <= 9933 || t >= 9935 && t <= 9939 || t >= 9941 && t <= 9953 || 9955 === t || 9960 === t || 9961 === t || t >= 9963 && t <= 9969 || 9972 === t || t >= 9974 && t <= 9977 || 9979 === t || 9980 === t || 9982 === t || 9983 === t || 10045 === t || t >= 10102 && t <= 10111 || t >= 11094 && t <= 11097 || t >= 12872 && t <= 12879 || t >= 57344 && t <= 63743 || t >= 65024 && t <= 65039 || 65533 === t || t >= 127232 && t <= 127242 || t >= 127248 && t <= 127277 || t >= 127280 && t <= 127337 || t >= 127344 && t <= 127373 || 127375 === t || 127376 === t || t >= 127387 && t <= 127404 || t >= 917760 && t <= 917999 || t >= 983040 && t <= 1048573 || t >= 1048576 && t <= 1114109, lt = (t)=>12288 === t || t >= 65281 && t <= 65376 || t >= 65504 && t <= 65510, dist_ht = (t)=>t >= 4352 && t <= 4447 || 8986 === t || 8987 === t || 9001 === t || 9002 === t || t >= 9193 && t <= 9196 || 9200 === t || 9203 === t || 9725 === t || 9726 === t || 9748 === t || 9749 === t || t >= 9800 && t <= 9811 || 9855 === t || 9875 === t || 9889 === t || 9898 === t || 9899 === t || 9917 === t || 9918 === t || 9924 === t || 9925 === t || 9934 === t || 9940 === t || 9962 === t || 9970 === t || 9971 === t || 9973 === t || 9978 === t || 9981 === t || 9989 === t || 9994 === t || 9995 === t || 10024 === t || 10060 === t || 10062 === t || t >= 10067 && t <= 10069 || 10071 === t || t >= 10133 && t <= 10135 || 10160 === t || 10175 === t || 11035 === t || 11036 === t || 11088 === t || 11093 === t || t >= 11904 && t <= 11929 || t >= 11931 && t <= 12019 || t >= 12032 && t <= 12245 || t >= 12272 && t <= 12287 || t >= 12289 && t <= 12350 || t >= 12353 && t <= 12438 || t >= 12441 && t <= 12543 || t >= 12549 && t <= 12591 || t >= 12593 && t <= 12686 || t >= 12688 && t <= 12771 || t >= 12783 && t <= 12830 || t >= 12832 && t <= 12871 || t >= 12880 && t <= 19903 || t >= 19968 && t <= 42124 || t >= 42128 && t <= 42182 || t >= 43360 && t <= 43388 || t >= 44032 && t <= 55203 || t >= 63744 && t <= 64255 || t >= 65040 && t <= 65049 || t >= 65072 && t <= 65106 || t >= 65108 && t <= 65126 || t >= 65128 && t <= 65131 || t >= 94176 && t <= 94180 || 94192 === t || 94193 === t || t >= 94208 && t <= 100343 || t >= 100352 && t <= 101589 || t >= 101632 && t <= 101640 || t >= 110576 && t <= 110579 || t >= 110581 && t <= 110587 || 110589 === t || 110590 === t || t >= 110592 && t <= 110882 || 110898 === t || t >= 110928 && t <= 110930 || 110933 === t || t >= 110948 && t <= 110951 || t >= 110960 && t <= 111355 || 126980 === t || 127183 === t || 127374 === t || t >= 127377 && t <= 127386 || t >= 127488 && t <= 127490 || t >= 127504 && t <= 127547 || t >= 127552 && t <= 127560 || 127568 === t || 127569 === t || t >= 127584 && t <= 127589 || t >= 127744 && t <= 127776 || t >= 127789 && t <= 127797 || t >= 127799 && t <= 127868 || t >= 127870 && t <= 127891 || t >= 127904 && t <= 127946 || t >= 127951 && t <= 127955 || t >= 127968 && t <= 127984 || 127988 === t || t >= 127992 && t <= 128062 || 128064 === t || t >= 128066 && t <= 128252 || t >= 128255 && t <= 128317 || t >= 128331 && t <= 128334 || t >= 128336 && t <= 128359 || 128378 === t || 128405 === t || 128406 === t || 128420 === t || t >= 128507 && t <= 128591 || t >= 128640 && t <= 128709 || 128716 === t || t >= 128720 && t <= 128722 || t >= 128725 && t <= 128727 || t >= 128732 && t <= 128735 || 128747 === t || 128748 === t || t >= 128756 && t <= 128764 || t >= 128992 && t <= 129003 || 129008 === t || t >= 129292 && t <= 129338 || t >= 129340 && t <= 129349 || t >= 129351 && t <= 129535 || t >= 129648 && t <= 129660 || t >= 129664 && t <= 129672 || t >= 129680 && t <= 129725 || t >= 129727 && t <= 129733 || t >= 129742 && t <= 129755 || t >= 129760 && t <= 129768 || t >= 129776 && t <= 129784 || t >= 131072 && t <= 196605 || t >= 196608 && t <= 262141, dist_O = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, dist_y = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, dist_L = /\t{1,1000}/y, dist_P = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu, dist_M = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, ct = /\p{M}+/gu, ft = {
936
939
  limit: 1 / 0,
937
940
  ellipsis: ""
938
- }, dist_X = (t, e = {}, s = {})=>{
939
- const i = e.limit ?? 1 / 0, r = e.ellipsis ?? "", n = e?.ellipsisWidth ?? (r ? dist_X(r, pt, s).width : 0), u = s.ansiWidth ?? 0, a = s.controlWidth ?? 0, l = s.tabWidth ?? 8, E = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, m = s.fullWidthWidth ?? 2, A = s.regularWidth ?? 1, V = s.wideWidth ?? 2;
940
- let h = 0, o = 0, f = t.length, v = 0, F = !1, d = f, b = Math.max(0, i - n), C = 0, B = 0, c = 0, p = 0;
941
+ }, X = (t, e = {}, s = {})=>{
942
+ const i = e.limit ?? 1 / 0, r = e.ellipsis ?? "", n = e?.ellipsisWidth ?? (r ? X(r, ft, s).width : 0), u = s.ansiWidth ?? 0, a = s.controlWidth ?? 0, l = s.tabWidth ?? 8, E = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, m = s.fullWidthWidth ?? 2, A = s.regularWidth ?? 1, V = s.wideWidth ?? 2;
943
+ let h = 0, o = 0, p = t.length, v = 0, F = !1, d = p, b = Math.max(0, i - n), C = 0, w = 0, c = 0, f = 0;
941
944
  t: for(;;){
942
- if (B > C || o >= f && o > h) {
943
- const ut = t.slice(C, B) || t.slice(h, o);
945
+ if (w > C || o >= p && o > h) {
946
+ const ut = t.slice(C, w) || t.slice(h, o);
944
947
  v = 0;
945
- for (const Y of ut.replaceAll(dist_ct, "")){
948
+ for (const Y of ut.replaceAll(ct, "")){
946
949
  const $ = Y.codePointAt(0) || 0;
947
- if (dist_lt($) ? p = m : ht($) ? p = V : E !== A && dist_at($) ? p = E : p = A, c + p > b && (d = Math.min(d, Math.max(C, h) + v)), c + p > i) {
950
+ if (lt($) ? f = m : dist_ht($) ? f = V : E !== A && dist_at($) ? f = E : f = A, c + f > b && (d = Math.min(d, Math.max(C, h) + v)), c + f > i) {
948
951
  F = !0;
949
952
  break t;
950
953
  }
951
- v += Y.length, c += p;
954
+ v += Y.length, c += f;
952
955
  }
953
- C = B = 0;
956
+ C = w = 0;
954
957
  }
955
- if (o >= f) break;
956
- if (dist_L.lastIndex = o, dist_L.test(t)) {
957
- if (v = dist_L.lastIndex - o, p = v * A, c + p > b && (d = Math.min(d, o + Math.floor((b - c) / A))), c + p > i) {
958
+ if (o >= p) break;
959
+ if (dist_M.lastIndex = o, dist_M.test(t)) {
960
+ if (v = dist_M.lastIndex - o, f = v * A, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / A))), c + f > i) {
958
961
  F = !0;
959
962
  break;
960
963
  }
961
- c += p, C = h, B = o, o = h = dist_L.lastIndex;
964
+ c += f, C = h, w = o, o = h = dist_M.lastIndex;
962
965
  continue;
963
966
  }
964
967
  if (dist_O.lastIndex = o, dist_O.test(t)) {
@@ -966,46 +969,46 @@ const dist_at = (t)=>161 === t || 164 === t || 167 === t || 168 === t || 170 ===
966
969
  F = !0;
967
970
  break;
968
971
  }
969
- c += u, C = h, B = o, o = h = dist_O.lastIndex;
972
+ c += u, C = h, w = o, o = h = dist_O.lastIndex;
970
973
  continue;
971
974
  }
972
975
  if (dist_y.lastIndex = o, dist_y.test(t)) {
973
- if (v = dist_y.lastIndex - o, p = v * a, c + p > b && (d = Math.min(d, o + Math.floor((b - c) / a))), c + p > i) {
976
+ if (v = dist_y.lastIndex - o, f = v * a, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / a))), c + f > i) {
974
977
  F = !0;
975
978
  break;
976
979
  }
977
- c += p, C = h, B = o, o = h = dist_y.lastIndex;
980
+ c += f, C = h, w = o, o = h = dist_y.lastIndex;
978
981
  continue;
979
982
  }
980
- if (M.lastIndex = o, M.test(t)) {
981
- if (v = M.lastIndex - o, p = v * l, c + p > b && (d = Math.min(d, o + Math.floor((b - c) / l))), c + p > i) {
983
+ if (dist_L.lastIndex = o, dist_L.test(t)) {
984
+ if (v = dist_L.lastIndex - o, f = v * l, c + f > b && (d = Math.min(d, o + Math.floor((b - c) / l))), c + f > i) {
982
985
  F = !0;
983
986
  break;
984
987
  }
985
- c += p, C = h, B = o, o = h = M.lastIndex;
988
+ c += f, C = h, w = o, o = h = dist_L.lastIndex;
986
989
  continue;
987
990
  }
988
- if (P.lastIndex = o, P.test(t)) {
991
+ if (dist_P.lastIndex = o, dist_P.test(t)) {
989
992
  if (c + g > b && (d = Math.min(d, o)), c + g > i) {
990
993
  F = !0;
991
994
  break;
992
995
  }
993
- c += g, C = h, B = o, o = h = P.lastIndex;
996
+ c += g, C = h, w = o, o = h = dist_P.lastIndex;
994
997
  continue;
995
998
  }
996
999
  o += 1;
997
1000
  }
998
1001
  return {
999
1002
  width: F ? b : c,
1000
- index: F ? d : f,
1003
+ index: F ? d : p,
1001
1004
  truncated: F,
1002
1005
  ellipsed: F && i >= n
1003
1006
  };
1004
- }, ft = {
1007
+ }, pt = {
1005
1008
  limit: 1 / 0,
1006
1009
  ellipsis: "",
1007
1010
  ellipsisWidth: 0
1008
- }, dist_S = (t, e = {})=>dist_X(t, ft, e).width, dist_W = "\x1B", dist_Z = "\x9B", Ft = 39, dist_j = "\x07", Q = "[", dist_dt = "]", dist_tt = "m", dist_U = `${dist_dt}8;;`, et = new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${dist_U}(?<uri>.*)${dist_j})`, "y"), mt = (t)=>{
1011
+ }, dist_S = (t, e = {})=>X(t, pt, e).width, dist_T = "\x1B", dist_Z = "\x9B", Ft = 39, dist_j = "\x07", Q = "[", dist_dt = "]", tt = "m", U = `${dist_dt}8;;`, dist_et = new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${U}(?<uri>.*)${dist_j})`, "y"), mt = (t)=>{
1009
1012
  if (t >= 30 && t <= 37 || t >= 90 && t <= 97) return 39;
1010
1013
  if (t >= 40 && t <= 47 || t >= 100 && t <= 107) return 49;
1011
1014
  if (1 === t || 2 === t) return 22;
@@ -1015,12 +1018,12 @@ const dist_at = (t)=>161 === t || 164 === t || 167 === t || 168 === t || 170 ===
1015
1018
  if (8 === t) return 28;
1016
1019
  if (9 === t) return 29;
1017
1020
  if (0 === t) return 0;
1018
- }, dist_st = (t)=>`${dist_W}${Q}${t}${dist_tt}`, it = (t)=>`${dist_W}${dist_U}${t}${dist_j}`, gt = (t)=>t.map((e)=>dist_S(e)), G = (t, e, s)=>{
1021
+ }, dist_st = (t)=>`${dist_T}${Q}${t}${tt}`, dist_it = (t)=>`${dist_T}${U}${t}${dist_j}`, gt = (t)=>t.map((e)=>dist_S(e)), dist_G = (t, e, s)=>{
1019
1022
  const i = e[Symbol.iterator]();
1020
1023
  let r = !1, n = !1, u = t.at(-1), a = void 0 === u ? 0 : dist_S(u), l = i.next(), E = i.next(), g = 0;
1021
1024
  for(; !l.done;){
1022
1025
  const m = l.value, A = dist_S(m);
1023
- a + A <= s ? t[t.length - 1] += m : (t.push(m), a = 0), (m === dist_W || m === dist_Z) && (r = !0, n = e.startsWith(dist_U, g + 1)), r ? n ? m === dist_j && (r = !1, n = !1) : m === dist_tt && (r = !1) : (a += A, a !== s || E.done || (t.push(""), a = 0)), l = E, E = i.next(), g += m.length;
1026
+ a + A <= s ? t[t.length - 1] += m : (t.push(m), a = 0), (m === dist_T || m === dist_Z) && (r = !0, n = e.startsWith(U, g + 1)), r ? n ? m === dist_j && (r = !1, n = !1) : m === tt && (r = !1) : (a += A, a !== s || E.done || (t.push(""), a = 0)), l = E, E = i.next(), g += m.length;
1024
1027
  }
1025
1028
  u = t.at(-1), !a && void 0 !== u && u.length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
1026
1029
  }, vt = (t)=>{
@@ -1037,21 +1040,21 @@ const dist_at = (t)=>161 === t || 164 === t || 167 === t || 168 === t || 170 ===
1037
1040
  ];
1038
1041
  for (const [h, o] of u.entries()){
1039
1042
  !1 !== s.trim && (l[l.length - 1] = (l.at(-1) ?? "").trimStart());
1040
- let f = dist_S(l.at(-1) ?? "");
1041
- if (0 !== h && (f >= e && (!1 === s.wordWrap || !1 === s.trim) && (l.push(""), f = 0), (f > 0 || !1 === s.trim) && (l[l.length - 1] += " ", f++)), s.hard && a[h] > e) {
1042
- const v = e - f, F = 1 + Math.floor((a[h] - v - 1) / e);
1043
- Math.floor((a[h] - 1) / e) < F && l.push(""), G(l, o, e);
1043
+ let p = dist_S(l.at(-1) ?? "");
1044
+ if (0 !== h && (p >= e && (!1 === s.wordWrap || !1 === s.trim) && (l.push(""), p = 0), (p > 0 || !1 === s.trim) && (l[l.length - 1] += " ", p++)), s.hard && a[h] > e) {
1045
+ const v = e - p, F = 1 + Math.floor((a[h] - v - 1) / e);
1046
+ Math.floor((a[h] - 1) / e) < F && l.push(""), dist_G(l, o, e);
1044
1047
  continue;
1045
1048
  }
1046
- if (f + a[h] > e && f > 0 && a[h] > 0) {
1047
- if (!1 === s.wordWrap && f < e) {
1048
- G(l, o, e);
1049
+ if (p + a[h] > e && p > 0 && a[h] > 0) {
1050
+ if (!1 === s.wordWrap && p < e) {
1051
+ dist_G(l, o, e);
1049
1052
  continue;
1050
1053
  }
1051
1054
  l.push("");
1052
1055
  }
1053
- if (f + a[h] > e && !1 === s.wordWrap) {
1054
- G(l, o, e);
1056
+ if (p + a[h] > e && !1 === s.wordWrap) {
1057
+ dist_G(l, o, e);
1055
1058
  continue;
1056
1059
  }
1057
1060
  l[l.length - 1] += o;
@@ -1062,18 +1065,18 @@ const dist_at = (t)=>161 === t || 164 === t || 167 === t || 168 === t || 170 ===
1062
1065
  let m = g.next(), A = g.next(), V = 0;
1063
1066
  for(; !m.done;){
1064
1067
  const h = m.value, o = A.value;
1065
- if (i += h, h === dist_W || h === dist_Z) {
1066
- et.lastIndex = V + 1;
1067
- const F = et.exec(E)?.groups;
1068
+ if (i += h, h === dist_T || h === dist_Z) {
1069
+ dist_et.lastIndex = V + 1;
1070
+ const F = dist_et.exec(E)?.groups;
1068
1071
  if (F?.code !== void 0) {
1069
1072
  const d = Number.parseFloat(F.code);
1070
1073
  r = d === Ft ? void 0 : d;
1071
1074
  } else F?.uri !== void 0 && (n = 0 === F.uri.length ? void 0 : F.uri);
1072
1075
  }
1073
- const f = r ? mt(r) : void 0;
1076
+ const p = r ? mt(r) : void 0;
1074
1077
  o === `
1075
- ` ? (n && (i += it("")), r && f && (i += dist_st(f))) : h === `
1076
- ` && (r && f && (i += dist_st(r)), n && (i += it(n))), V += h.length, m = A, A = g.next();
1078
+ ` ? (n && (i += dist_it("")), r && p && (i += dist_st(p))) : h === `
1079
+ ` && (r && p && (i += dist_st(r)), n && (i += dist_it(n))), V += h.length, m = A, A = g.next();
1077
1080
  }
1078
1081
  return i;
1079
1082
  };
@@ -1149,11 +1152,11 @@ const z = Symbol("clack:cancel");
1149
1152
  function Ct(t) {
1150
1153
  return t === z;
1151
1154
  }
1152
- function dist_T(t, e) {
1155
+ function W(t, e) {
1153
1156
  const s = t;
1154
1157
  s.isTTY && s.setRawMode(e);
1155
1158
  }
1156
- const dist_rt = (t)=>"columns" in t && "number" == typeof t.columns ? t.columns : 80, dist_nt = (t)=>"rows" in t && "number" == typeof t.rows ? t.rows : 20;
1159
+ const dist_rt = (t)=>"columns" in t && "number" == typeof t.columns ? t.columns : 80, nt = (t)=>"rows" in t && "number" == typeof t.rows ? t.rows : 20;
1157
1160
  function Bt(t, e, s, i = s) {
1158
1161
  const r = dist_rt(t ?? stdout);
1159
1162
  return K(e, r - s.length, {
@@ -1163,7 +1166,7 @@ function Bt(t, e, s, i = s) {
1163
1166
  `).map((n, u)=>`${0 === u ? i : s}${n}`).join(`
1164
1167
  `);
1165
1168
  }
1166
- class x {
1169
+ class dist_B {
1167
1170
  input;
1168
1171
  output;
1169
1172
  _abortSignal;
@@ -1221,10 +1224,10 @@ class x {
1221
1224
  prompt: "",
1222
1225
  escapeCodeTimeout: 50,
1223
1226
  terminal: !0
1224
- }), this.rl.prompt(), void 0 !== this.opts.initialUserInput && this._setUserInput(this.opts.initialUserInput, !0), this.input.on("keypress", this.onKeypress), dist_T(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", ()=>{
1225
- this.output.write(src.cursor.show), this.output.off("resize", this.render), dist_T(this.input, !1), e(this.value);
1227
+ }), this.rl.prompt(), void 0 !== this.opts.initialUserInput && this._setUserInput(this.opts.initialUserInput, !0), this.input.on("keypress", this.onKeypress), W(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", ()=>{
1228
+ this.output.write(src.cursor.show), this.output.off("resize", this.render), W(this.input, !1), e(this.value);
1226
1229
  }), this.once("cancel", ()=>{
1227
- this.output.write(src.cursor.show), this.output.off("resize", this.render), dist_T(this.input, !1), e(z);
1230
+ this.output.write(src.cursor.show), this.output.off("resize", this.render), W(this.input, !1), e(z);
1228
1231
  });
1229
1232
  });
1230
1233
  }
@@ -1262,7 +1265,7 @@ class x {
1262
1265
  }
1263
1266
  close() {
1264
1267
  this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
1265
- `), dist_T(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
1268
+ `), W(this.input, !1), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
1266
1269
  }
1267
1270
  restoreCursor() {
1268
1271
  const e = K(this._prevFrame, process.stdout.columns, {
@@ -1280,7 +1283,7 @@ class x {
1280
1283
  if (e !== this._prevFrame) {
1281
1284
  if ("initial" === this.state) this.output.write(src.cursor.hide);
1282
1285
  else {
1283
- const s = _t(this._prevFrame, e), i = dist_nt(this.output);
1286
+ const s = _t(this._prevFrame, e), i = nt(this.output);
1284
1287
  if (this.restoreCursor(), s) {
1285
1288
  const r = Math.max(0, s.numLinesAfter - i), n = Math.max(0, s.numLinesBefore - i);
1286
1289
  let u = s.lines.find((a)=>a >= r);
@@ -1315,11 +1318,7 @@ class x {
1315
1318
  }
1316
1319
  }
1317
1320
  }
1318
- function dist_D(t, e, s) {
1319
- const i = t + e, r = Math.max(s.length - 1, 0), n = i < 0 ? r : i > r ? 0 : i;
1320
- return s[n].disabled ? dist_D(n, e < 0 ? -1 : 1, s) : n;
1321
- }
1322
- class Mt extends x {
1321
+ let Lt = class extends dist_B {
1323
1322
  options;
1324
1323
  cursor = 0;
1325
1324
  get _value() {
@@ -1351,17 +1350,17 @@ class Mt extends x {
1351
1350
  ...e.initialValues ?? []
1352
1351
  ];
1353
1352
  const s = Math.max(this.options.findIndex(({ value: i })=>i === e.cursorAt), 0);
1354
- this.cursor = this.options[s].disabled ? dist_D(s, 1, this.options) : s, this.on("key", (i)=>{
1353
+ this.cursor = this.options[s].disabled ? x(s, 1, this.options) : s, this.on("key", (i)=>{
1355
1354
  "a" === i && this.toggleAll(), "i" === i && this.toggleInvert();
1356
1355
  }), this.on("cursor", (i)=>{
1357
1356
  switch(i){
1358
1357
  case "left":
1359
1358
  case "up":
1360
- this.cursor = dist_D(this.cursor, -1, this.options);
1359
+ this.cursor = x(this.cursor, -1, this.options);
1361
1360
  break;
1362
1361
  case "down":
1363
1362
  case "right":
1364
- this.cursor = dist_D(this.cursor, 1, this.options);
1363
+ this.cursor = x(this.cursor, 1, this.options);
1365
1364
  break;
1366
1365
  case "space":
1367
1366
  this.toggleValue();
@@ -1369,8 +1368,8 @@ class Mt extends x {
1369
1368
  }
1370
1369
  });
1371
1370
  }
1372
- }
1373
- class Wt extends x {
1371
+ };
1372
+ class Tt extends dist_B {
1374
1373
  options;
1375
1374
  cursor = 0;
1376
1375
  get _selectedValue() {
@@ -1382,28 +1381,28 @@ class Wt extends x {
1382
1381
  constructor(e){
1383
1382
  super(e, !1), this.options = e.options;
1384
1383
  const s = this.options.findIndex(({ value: r })=>r === e.initialValue), i = -1 === s ? 0 : s;
1385
- this.cursor = this.options[i].disabled ? dist_D(i, 1, this.options) : i, this.changeValue(), this.on("cursor", (r)=>{
1384
+ this.cursor = this.options[i].disabled ? x(i, 1, this.options) : i, this.changeValue(), this.on("cursor", (r)=>{
1386
1385
  switch(r){
1387
1386
  case "left":
1388
1387
  case "up":
1389
- this.cursor = dist_D(this.cursor, -1, this.options);
1388
+ this.cursor = x(this.cursor, -1, this.options);
1390
1389
  break;
1391
1390
  case "down":
1392
1391
  case "right":
1393
- this.cursor = dist_D(this.cursor, 1, this.options);
1392
+ this.cursor = x(this.cursor, 1, this.options);
1394
1393
  break;
1395
1394
  }
1396
1395
  this.changeValue();
1397
1396
  });
1398
1397
  }
1399
1398
  }
1400
- class dist_$t extends x {
1399
+ class dist_$t extends dist_B {
1401
1400
  get userInputWithCursor() {
1402
1401
  if ("submit" === this.state) return this.userInput;
1403
1402
  const e = this.userInput;
1404
1403
  if (this.cursor >= e.length) return `${this.userInput}\u2588`;
1405
1404
  const s = e.slice(0, this.cursor), [i, ...r] = e.slice(this.cursor);
1406
- return `${s}${picocolors.inverse(i)}${r.join("")}`;
1405
+ return `${s}${styleText("inverse", i)}${r.join("")}`;
1407
1406
  }
1408
1407
  get cursor() {
1409
1408
  return this._cursor;
@@ -1420,107 +1419,107 @@ class dist_$t extends x {
1420
1419
  }
1421
1420
  }
1422
1421
  const external_node_fs_ = __webpack_require__("node:fs");
1423
- function dist_ht() {
1422
+ function dist_pt() {
1424
1423
  return "win32" !== node_process.platform ? "linux" !== node_process.env.TERM : !!node_process.env.CI || !!node_process.env.WT_SESSION || !!node_process.env.TERMINUS_SUBLIME || "{cmd::Cmder}" === node_process.env.ConEmuTask || "Terminus-Sublime" === node_process.env.TERM_PROGRAM || "vscode" === node_process.env.TERM_PROGRAM || "xterm-256color" === node_process.env.TERM || "alacritty" === node_process.env.TERM || "JetBrains-JediTerm" === node_process.env.TERMINAL_EMULATOR;
1425
1424
  }
1426
- const ee = dist_ht(), dist_w = (e, r)=>ee ? e : r, Me = dist_w("\u25C6", "*"), ce = dist_w("\u25A0", "x"), de = dist_w("\u25B2", "x"), dist_k = dist_w("\u25C7", "o"), dist_h = (dist_w("\u250C", "T"), dist_w("\u2502", "|")), dist_x = dist_w("\u2514", "\u2014"), dist_Y = (dist_w("\u2510", "T"), dist_w("\u2518", "\u2014"), dist_w("\u25CF", ">")), dist_K = dist_w("\u25CB", " "), te = dist_w("\u25FB", "[\u2022]"), dist_G = dist_w("\u25FC", "[+]"), dist_z = dist_w("\u25FB", "[ ]"), se = (dist_w("\u25AA", "\u2022"), dist_w("\u2500", "-")), he = dist_w("\u256E", "+"), Ne = dist_w("\u251C", "+"), me = dist_w("\u256F", "+"), pe = dist_w("\u2570", "+"), N = (dist_w("\u256D", "+"), dist_w("\u25CF", "\u2022"), dist_w("\u25C6", "*"), dist_w("\u25B2", "!"), dist_w("\u25A0", "x"), (e)=>{
1425
+ const ee = dist_pt(), dist_I = (e, r)=>ee ? e : r, Re = dist_I("\u25C6", "*"), $e = dist_I("\u25A0", "x"), de = dist_I("\u25B2", "x"), dist_V = dist_I("\u25C7", "o"), dist_h = (dist_I("\u250C", "T"), dist_I("\u2502", "|")), dist_x = dist_I("\u2514", "\u2014"), dist_z = (dist_I("\u2510", "T"), dist_I("\u2518", "\u2014"), dist_I("\u25CF", ">")), dist_H = dist_I("\u25CB", " "), te = dist_I("\u25FB", "[\u2022]"), dist_U = dist_I("\u25FC", "[+]"), dist_q = dist_I("\u25FB", "[ ]"), se = (dist_I("\u25AA", "\u2022"), dist_I("\u2500", "-")), pe = dist_I("\u256E", "+"), We = dist_I("\u251C", "+"), me = dist_I("\u256F", "+"), ge = dist_I("\u2570", "+"), dist_W = (dist_I("\u256D", "+"), dist_I("\u25CF", "\u2022"), dist_I("\u25C6", "*"), dist_I("\u25B2", "!"), dist_I("\u25A0", "x"), (e)=>{
1427
1426
  switch(e){
1428
1427
  case "initial":
1429
1428
  case "active":
1430
- return picocolors_default().cyan(Me);
1429
+ return styleText("cyan", Re);
1431
1430
  case "cancel":
1432
- return picocolors.red(ce);
1431
+ return styleText("red", $e);
1433
1432
  case "error":
1434
- return picocolors.yellow(de);
1433
+ return styleText("yellow", de);
1435
1434
  case "submit":
1436
- return picocolors.green(dist_k);
1435
+ return styleText("green", dist_V);
1437
1436
  }
1438
- }), Ee = (e)=>{
1437
+ }), ve = (e)=>{
1439
1438
  switch(e){
1440
1439
  case "initial":
1441
1440
  case "active":
1442
- return picocolors_default().cyan(dist_h);
1441
+ return styleText("cyan", dist_h);
1443
1442
  case "cancel":
1444
- return picocolors.red(dist_h);
1443
+ return styleText("red", dist_h);
1445
1444
  case "error":
1446
- return picocolors.yellow(dist_h);
1445
+ return styleText("yellow", dist_h);
1447
1446
  case "submit":
1448
- return picocolors.green(dist_h);
1447
+ return styleText("green", dist_h);
1449
1448
  }
1450
- }, dist_mt = (e)=>161 === e || 164 === e || 167 === e || 168 === e || 170 === e || 173 === e || 174 === e || e >= 176 && e <= 180 || e >= 182 && e <= 186 || e >= 188 && e <= 191 || 198 === e || 208 === e || 215 === e || 216 === e || e >= 222 && e <= 225 || 230 === e || e >= 232 && e <= 234 || 236 === e || 237 === e || 240 === e || 242 === e || 243 === e || e >= 247 && e <= 250 || 252 === e || 254 === e || 257 === e || 273 === e || 275 === e || 283 === e || 294 === e || 295 === e || 299 === e || e >= 305 && e <= 307 || 312 === e || e >= 319 && e <= 322 || 324 === e || e >= 328 && e <= 331 || 333 === e || 338 === e || 339 === e || 358 === e || 359 === e || 363 === e || 462 === e || 464 === e || 466 === e || 468 === e || 470 === e || 472 === e || 474 === e || 476 === e || 593 === e || 609 === e || 708 === e || 711 === e || e >= 713 && e <= 715 || 717 === e || 720 === e || e >= 728 && e <= 731 || 733 === e || 735 === e || e >= 768 && e <= 879 || e >= 913 && e <= 929 || e >= 931 && e <= 937 || e >= 945 && e <= 961 || e >= 963 && e <= 969 || 1025 === e || e >= 1040 && e <= 1103 || 1105 === e || 8208 === e || e >= 8211 && e <= 8214 || 8216 === e || 8217 === e || 8220 === e || 8221 === e || e >= 8224 && e <= 8226 || e >= 8228 && e <= 8231 || 8240 === e || 8242 === e || 8243 === e || 8245 === e || 8251 === e || 8254 === e || 8308 === e || 8319 === e || e >= 8321 && e <= 8324 || 8364 === e || 8451 === e || 8453 === e || 8457 === e || 8467 === e || 8470 === e || 8481 === e || 8482 === e || 8486 === e || 8491 === e || 8531 === e || 8532 === e || e >= 8539 && e <= 8542 || e >= 8544 && e <= 8555 || e >= 8560 && e <= 8569 || 8585 === e || e >= 8592 && e <= 8601 || 8632 === e || 8633 === e || 8658 === e || 8660 === e || 8679 === e || 8704 === e || 8706 === e || 8707 === e || 8711 === e || 8712 === e || 8715 === e || 8719 === e || 8721 === e || 8725 === e || 8730 === e || e >= 8733 && e <= 8736 || 8739 === e || 8741 === e || e >= 8743 && e <= 8748 || 8750 === e || e >= 8756 && e <= 8759 || 8764 === e || 8765 === e || 8776 === e || 8780 === e || 8786 === e || 8800 === e || 8801 === e || e >= 8804 && e <= 8807 || 8810 === e || 8811 === e || 8814 === e || 8815 === e || 8834 === e || 8835 === e || 8838 === e || 8839 === e || 8853 === e || 8857 === e || 8869 === e || 8895 === e || 8978 === e || e >= 9312 && e <= 9449 || e >= 9451 && e <= 9547 || e >= 9552 && e <= 9587 || e >= 9600 && e <= 9615 || e >= 9618 && e <= 9621 || 9632 === e || 9633 === e || e >= 9635 && e <= 9641 || 9650 === e || 9651 === e || 9654 === e || 9655 === e || 9660 === e || 9661 === e || 9664 === e || 9665 === e || e >= 9670 && e <= 9672 || 9675 === e || e >= 9678 && e <= 9681 || e >= 9698 && e <= 9701 || 9711 === e || 9733 === e || 9734 === e || 9737 === e || 9742 === e || 9743 === e || 9756 === e || 9758 === e || 9792 === e || 9794 === e || 9824 === e || 9825 === e || e >= 9827 && e <= 9829 || e >= 9831 && e <= 9834 || 9836 === e || 9837 === e || 9839 === e || 9886 === e || 9887 === e || 9919 === e || e >= 9926 && e <= 9933 || e >= 9935 && e <= 9939 || e >= 9941 && e <= 9953 || 9955 === e || 9960 === e || 9961 === e || e >= 9963 && e <= 9969 || 9972 === e || e >= 9974 && e <= 9977 || 9979 === e || 9980 === e || 9982 === e || 9983 === e || 10045 === e || e >= 10102 && e <= 10111 || e >= 11094 && e <= 11097 || e >= 12872 && e <= 12879 || e >= 57344 && e <= 63743 || e >= 65024 && e <= 65039 || 65533 === e || e >= 127232 && e <= 127242 || e >= 127248 && e <= 127277 || e >= 127280 && e <= 127337 || e >= 127344 && e <= 127373 || 127375 === e || 127376 === e || e >= 127387 && e <= 127404 || e >= 917760 && e <= 917999 || e >= 983040 && e <= 1048573 || e >= 1048576 && e <= 1114109, dist_pt = (e)=>12288 === e || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510, dist_gt = (e)=>e >= 4352 && e <= 4447 || 8986 === e || 8987 === e || 9001 === e || 9002 === e || e >= 9193 && e <= 9196 || 9200 === e || 9203 === e || 9725 === e || 9726 === e || 9748 === e || 9749 === e || e >= 9800 && e <= 9811 || 9855 === e || 9875 === e || 9889 === e || 9898 === e || 9899 === e || 9917 === e || 9918 === e || 9924 === e || 9925 === e || 9934 === e || 9940 === e || 9962 === e || 9970 === e || 9971 === e || 9973 === e || 9978 === e || 9981 === e || 9989 === e || 9994 === e || 9995 === e || 10024 === e || 10060 === e || 10062 === e || e >= 10067 && e <= 10069 || 10071 === e || e >= 10133 && e <= 10135 || 10160 === e || 10175 === e || 11035 === e || 11036 === e || 11088 === e || 11093 === e || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || 94192 === e || 94193 === e || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101632 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || 110589 === e || 110590 === e || e >= 110592 && e <= 110882 || 110898 === e || e >= 110928 && e <= 110930 || 110933 === e || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || 126980 === e || 127183 === e || 127374 === e || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || 127568 === e || 127569 === e || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || 127988 === e || e >= 127992 && e <= 128062 || 128064 === e || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || 128378 === e || 128405 === e || 128406 === e || 128420 === e || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || 128716 === e || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || 128747 === e || 128748 === e || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || 129008 === e || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141, ve = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, re = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, ie = /\t{1,1000}/y, Ae = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu, ne = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, dist_ft = /\p{M}+/gu, dist_Ft = {
1449
+ }, dist_mt = (e)=>161 === e || 164 === e || 167 === e || 168 === e || 170 === e || 173 === e || 174 === e || e >= 176 && e <= 180 || e >= 182 && e <= 186 || e >= 188 && e <= 191 || 198 === e || 208 === e || 215 === e || 216 === e || e >= 222 && e <= 225 || 230 === e || e >= 232 && e <= 234 || 236 === e || 237 === e || 240 === e || 242 === e || 243 === e || e >= 247 && e <= 250 || 252 === e || 254 === e || 257 === e || 273 === e || 275 === e || 283 === e || 294 === e || 295 === e || 299 === e || e >= 305 && e <= 307 || 312 === e || e >= 319 && e <= 322 || 324 === e || e >= 328 && e <= 331 || 333 === e || 338 === e || 339 === e || 358 === e || 359 === e || 363 === e || 462 === e || 464 === e || 466 === e || 468 === e || 470 === e || 472 === e || 474 === e || 476 === e || 593 === e || 609 === e || 708 === e || 711 === e || e >= 713 && e <= 715 || 717 === e || 720 === e || e >= 728 && e <= 731 || 733 === e || 735 === e || e >= 768 && e <= 879 || e >= 913 && e <= 929 || e >= 931 && e <= 937 || e >= 945 && e <= 961 || e >= 963 && e <= 969 || 1025 === e || e >= 1040 && e <= 1103 || 1105 === e || 8208 === e || e >= 8211 && e <= 8214 || 8216 === e || 8217 === e || 8220 === e || 8221 === e || e >= 8224 && e <= 8226 || e >= 8228 && e <= 8231 || 8240 === e || 8242 === e || 8243 === e || 8245 === e || 8251 === e || 8254 === e || 8308 === e || 8319 === e || e >= 8321 && e <= 8324 || 8364 === e || 8451 === e || 8453 === e || 8457 === e || 8467 === e || 8470 === e || 8481 === e || 8482 === e || 8486 === e || 8491 === e || 8531 === e || 8532 === e || e >= 8539 && e <= 8542 || e >= 8544 && e <= 8555 || e >= 8560 && e <= 8569 || 8585 === e || e >= 8592 && e <= 8601 || 8632 === e || 8633 === e || 8658 === e || 8660 === e || 8679 === e || 8704 === e || 8706 === e || 8707 === e || 8711 === e || 8712 === e || 8715 === e || 8719 === e || 8721 === e || 8725 === e || 8730 === e || e >= 8733 && e <= 8736 || 8739 === e || 8741 === e || e >= 8743 && e <= 8748 || 8750 === e || e >= 8756 && e <= 8759 || 8764 === e || 8765 === e || 8776 === e || 8780 === e || 8786 === e || 8800 === e || 8801 === e || e >= 8804 && e <= 8807 || 8810 === e || 8811 === e || 8814 === e || 8815 === e || 8834 === e || 8835 === e || 8838 === e || 8839 === e || 8853 === e || 8857 === e || 8869 === e || 8895 === e || 8978 === e || e >= 9312 && e <= 9449 || e >= 9451 && e <= 9547 || e >= 9552 && e <= 9587 || e >= 9600 && e <= 9615 || e >= 9618 && e <= 9621 || 9632 === e || 9633 === e || e >= 9635 && e <= 9641 || 9650 === e || 9651 === e || 9654 === e || 9655 === e || 9660 === e || 9661 === e || 9664 === e || 9665 === e || e >= 9670 && e <= 9672 || 9675 === e || e >= 9678 && e <= 9681 || e >= 9698 && e <= 9701 || 9711 === e || 9733 === e || 9734 === e || 9737 === e || 9742 === e || 9743 === e || 9756 === e || 9758 === e || 9792 === e || 9794 === e || 9824 === e || 9825 === e || e >= 9827 && e <= 9829 || e >= 9831 && e <= 9834 || 9836 === e || 9837 === e || 9839 === e || 9886 === e || 9887 === e || 9919 === e || e >= 9926 && e <= 9933 || e >= 9935 && e <= 9939 || e >= 9941 && e <= 9953 || 9955 === e || 9960 === e || 9961 === e || e >= 9963 && e <= 9969 || 9972 === e || e >= 9974 && e <= 9977 || 9979 === e || 9980 === e || 9982 === e || 9983 === e || 10045 === e || e >= 10102 && e <= 10111 || e >= 11094 && e <= 11097 || e >= 12872 && e <= 12879 || e >= 57344 && e <= 63743 || e >= 65024 && e <= 65039 || 65533 === e || e >= 127232 && e <= 127242 || e >= 127248 && e <= 127277 || e >= 127280 && e <= 127337 || e >= 127344 && e <= 127373 || 127375 === e || 127376 === e || e >= 127387 && e <= 127404 || e >= 917760 && e <= 917999 || e >= 983040 && e <= 1048573 || e >= 1048576 && e <= 1114109, dist_gt = (e)=>12288 === e || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510, dist_ft = (e)=>e >= 4352 && e <= 4447 || 8986 === e || 8987 === e || 9001 === e || 9002 === e || e >= 9193 && e <= 9196 || 9200 === e || 9203 === e || 9725 === e || 9726 === e || 9748 === e || 9749 === e || e >= 9800 && e <= 9811 || 9855 === e || 9875 === e || 9889 === e || 9898 === e || 9899 === e || 9917 === e || 9918 === e || 9924 === e || 9925 === e || 9934 === e || 9940 === e || 9962 === e || 9970 === e || 9971 === e || 9973 === e || 9978 === e || 9981 === e || 9989 === e || 9994 === e || 9995 === e || 10024 === e || 10060 === e || 10062 === e || e >= 10067 && e <= 10069 || 10071 === e || e >= 10133 && e <= 10135 || 10160 === e || 10175 === e || 11035 === e || 11036 === e || 11088 === e || 11093 === e || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || 94192 === e || 94193 === e || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101632 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || 110589 === e || 110590 === e || e >= 110592 && e <= 110882 || 110898 === e || e >= 110928 && e <= 110930 || 110933 === e || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || 126980 === e || 127183 === e || 127374 === e || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || 127568 === e || 127569 === e || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || 127988 === e || e >= 127992 && e <= 128062 || 128064 === e || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || 128378 === e || 128405 === e || 128406 === e || 128420 === e || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || 128716 === e || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || 128747 === e || 128748 === e || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || 129008 === e || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141, we = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, re = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, ie = /\t{1,1000}/y, Ae = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu, ne = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, dist_Ft = /\p{M}+/gu, dist_yt = {
1451
1450
  limit: 1 / 0,
1452
1451
  ellipsis: ""
1453
1452
  }, Le = (e, r = {}, s = {})=>{
1454
- const i = r.limit ?? 1 / 0, n = r.ellipsis ?? "", o = r?.ellipsisWidth ?? (n ? Le(n, dist_Ft, s).width : 0), u = s.ansiWidth ?? 0, l = s.controlWidth ?? 0, a = s.tabWidth ?? 8, d = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, E = s.fullWidthWidth ?? 2, p = s.regularWidth ?? 1, y = s.wideWidth ?? 2;
1455
- let $ = 0, c = 0, m = e.length, f = 0, F = !1, v = m, S = Math.max(0, i - o), B = 0, b = 0, A = 0, C = 0;
1453
+ const i = r.limit ?? 1 / 0, a = r.ellipsis ?? "", o = r?.ellipsisWidth ?? (a ? Le(a, dist_yt, s).width : 0), u = s.ansiWidth ?? 0, l = s.controlWidth ?? 0, n = s.tabWidth ?? 8, c = s.ambiguousWidth ?? 1, p = s.emojiWidth ?? 2, f = s.fullWidthWidth ?? 2, g = s.regularWidth ?? 1, E = s.wideWidth ?? 2;
1454
+ let $ = 0, m = 0, d = e.length, F = 0, y = !1, v = d, C = Math.max(0, i - o), A = 0, b = 0, w = 0, S = 0;
1456
1455
  e: for(;;){
1457
- if (b > B || c >= m && c > $) {
1458
- const _ = e.slice(B, b) || e.slice($, c);
1459
- f = 0;
1460
- for (const D of _.replaceAll(dist_ft, "")){
1461
- const T = D.codePointAt(0) || 0;
1462
- if (dist_pt(T) ? C = E : dist_gt(T) ? C = y : d !== p && dist_mt(T) ? C = d : C = p, A + C > S && (v = Math.min(v, Math.max(B, $) + f)), A + C > i) {
1463
- F = !0;
1456
+ if (b > A || m >= d && m > $) {
1457
+ const T = e.slice(A, b) || e.slice($, m);
1458
+ F = 0;
1459
+ for (const M of T.replaceAll(dist_Ft, "")){
1460
+ const O = M.codePointAt(0) || 0;
1461
+ if (dist_gt(O) ? S = f : dist_ft(O) ? S = E : c !== g && dist_mt(O) ? S = c : S = g, w + S > C && (v = Math.min(v, Math.max(A, $) + F)), w + S > i) {
1462
+ y = !0;
1464
1463
  break e;
1465
1464
  }
1466
- f += D.length, A += C;
1465
+ F += M.length, w += S;
1467
1466
  }
1468
- B = b = 0;
1467
+ A = b = 0;
1469
1468
  }
1470
- if (c >= m) break;
1471
- if (ne.lastIndex = c, ne.test(e)) {
1472
- if (f = ne.lastIndex - c, C = f * p, A + C > S && (v = Math.min(v, c + Math.floor((S - A) / p))), A + C > i) {
1473
- F = !0;
1469
+ if (m >= d) break;
1470
+ if (ne.lastIndex = m, ne.test(e)) {
1471
+ if (F = ne.lastIndex - m, S = F * g, w + S > C && (v = Math.min(v, m + Math.floor((C - w) / g))), w + S > i) {
1472
+ y = !0;
1474
1473
  break;
1475
1474
  }
1476
- A += C, B = $, b = c, c = $ = ne.lastIndex;
1475
+ w += S, A = $, b = m, m = $ = ne.lastIndex;
1477
1476
  continue;
1478
1477
  }
1479
- if (ve.lastIndex = c, ve.test(e)) {
1480
- if (A + u > S && (v = Math.min(v, c)), A + u > i) {
1481
- F = !0;
1478
+ if (we.lastIndex = m, we.test(e)) {
1479
+ if (w + u > C && (v = Math.min(v, m)), w + u > i) {
1480
+ y = !0;
1482
1481
  break;
1483
1482
  }
1484
- A += u, B = $, b = c, c = $ = ve.lastIndex;
1483
+ w += u, A = $, b = m, m = $ = we.lastIndex;
1485
1484
  continue;
1486
1485
  }
1487
- if (re.lastIndex = c, re.test(e)) {
1488
- if (f = re.lastIndex - c, C = f * l, A + C > S && (v = Math.min(v, c + Math.floor((S - A) / l))), A + C > i) {
1489
- F = !0;
1486
+ if (re.lastIndex = m, re.test(e)) {
1487
+ if (F = re.lastIndex - m, S = F * l, w + S > C && (v = Math.min(v, m + Math.floor((C - w) / l))), w + S > i) {
1488
+ y = !0;
1490
1489
  break;
1491
1490
  }
1492
- A += C, B = $, b = c, c = $ = re.lastIndex;
1491
+ w += S, A = $, b = m, m = $ = re.lastIndex;
1493
1492
  continue;
1494
1493
  }
1495
- if (ie.lastIndex = c, ie.test(e)) {
1496
- if (f = ie.lastIndex - c, C = f * a, A + C > S && (v = Math.min(v, c + Math.floor((S - A) / a))), A + C > i) {
1497
- F = !0;
1494
+ if (ie.lastIndex = m, ie.test(e)) {
1495
+ if (F = ie.lastIndex - m, S = F * n, w + S > C && (v = Math.min(v, m + Math.floor((C - w) / n))), w + S > i) {
1496
+ y = !0;
1498
1497
  break;
1499
1498
  }
1500
- A += C, B = $, b = c, c = $ = ie.lastIndex;
1499
+ w += S, A = $, b = m, m = $ = ie.lastIndex;
1501
1500
  continue;
1502
1501
  }
1503
- if (Ae.lastIndex = c, Ae.test(e)) {
1504
- if (A + g > S && (v = Math.min(v, c)), A + g > i) {
1505
- F = !0;
1502
+ if (Ae.lastIndex = m, Ae.test(e)) {
1503
+ if (w + p > C && (v = Math.min(v, m)), w + p > i) {
1504
+ y = !0;
1506
1505
  break;
1507
1506
  }
1508
- A += g, B = $, b = c, c = $ = Ae.lastIndex;
1507
+ w += p, A = $, b = m, m = $ = Ae.lastIndex;
1509
1508
  continue;
1510
1509
  }
1511
- c += 1;
1510
+ m += 1;
1512
1511
  }
1513
1512
  return {
1514
- width: F ? S : A,
1515
- index: F ? v : m,
1516
- truncated: F,
1517
- ellipsed: F && i >= o
1513
+ width: y ? C : w,
1514
+ index: y ? v : d,
1515
+ truncated: y,
1516
+ ellipsed: y && i >= o
1518
1517
  };
1519
- }, dist_yt = {
1518
+ }, dist_Et = {
1520
1519
  limit: 1 / 0,
1521
1520
  ellipsis: "",
1522
1521
  ellipsisWidth: 0
1523
- }, dist_M = (e, r = {})=>Le(e, dist_yt, r).width, ae = "\x1B", je = "\x9B", dist_Et = 39, Ce = "\x07", Ve = "[", dist_vt = "]", ke = "m", we = `${dist_vt}8;;`, Ge = new RegExp(`(?:\\${Ve}(?<code>\\d+)m|\\${we}(?<uri>.*)${Ce})`, "y"), dist_At = (e)=>{
1522
+ }, D = (e, r = {})=>Le(e, dist_Et, r).width, ae = "\x1B", je = "\x9B", dist_vt = 39, Ce = "\x07", ke = "[", dist_wt = "]", Ve = "m", Se = `${dist_wt}8;;`, He = new RegExp(`(?:\\${ke}(?<code>\\d+)m|\\${Se}(?<uri>.*)${Ce})`, "y"), dist_At = (e)=>{
1524
1523
  if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
1525
1524
  if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
1526
1525
  if (1 === e || 2 === e) return 22;
@@ -1530,129 +1529,137 @@ const ee = dist_ht(), dist_w = (e, r)=>ee ? e : r, Me = dist_w("\u25C6", "*"), c
1530
1529
  if (8 === e) return 28;
1531
1530
  if (9 === e) return 29;
1532
1531
  if (0 === e) return 0;
1533
- }, He = (e)=>`${ae}${Ve}${e}${ke}`, Ue = (e)=>`${ae}${we}${e}${Ce}`, dist_Ct = (e)=>e.map((r)=>dist_M(r)), Se = (e, r, s)=>{
1532
+ }, Ue = (e)=>`${ae}${ke}${e}${Ve}`, Ke = (e)=>`${ae}${Se}${e}${Ce}`, dist_Ct = (e)=>e.map((r)=>D(r)), Ie = (e, r, s)=>{
1534
1533
  const i = r[Symbol.iterator]();
1535
- let n = !1, o = !1, u = e.at(-1), l = void 0 === u ? 0 : dist_M(u), a = i.next(), d = i.next(), g = 0;
1536
- for(; !a.done;){
1537
- const E = a.value, p = dist_M(E);
1538
- l + p <= s ? e[e.length - 1] += E : (e.push(E), l = 0), (E === ae || E === je) && (n = !0, o = r.startsWith(we, g + 1)), n ? o ? E === Ce && (n = !1, o = !1) : E === ke && (n = !1) : (l += p, l !== s || d.done || (e.push(""), l = 0)), a = d, d = i.next(), g += E.length;
1534
+ let a = !1, o = !1, u = e.at(-1), l = void 0 === u ? 0 : D(u), n = i.next(), c = i.next(), p = 0;
1535
+ for(; !n.done;){
1536
+ const f = n.value, g = D(f);
1537
+ l + g <= s ? e[e.length - 1] += f : (e.push(f), l = 0), (f === ae || f === je) && (a = !0, o = r.startsWith(Se, p + 1)), a ? o ? f === Ce && (a = !1, o = !1) : f === Ve && (a = !1) : (l += g, l !== s || c.done || (e.push(""), l = 0)), n = c, c = i.next(), p += f.length;
1539
1538
  }
1540
1539
  u = e.at(-1), !l && void 0 !== u && u.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
1541
- }, dist_wt = (e)=>{
1540
+ }, dist_St = (e)=>{
1542
1541
  const r = e.split(" ");
1543
1542
  let s = r.length;
1544
- for(; s > 0 && !(dist_M(r[s - 1]) > 0);)s--;
1543
+ for(; s > 0 && !(D(r[s - 1]) > 0);)s--;
1545
1544
  return s === r.length ? e : r.slice(0, s).join(" ") + r.slice(s).join("");
1546
- }, dist_St = (e, r, s = {})=>{
1545
+ }, dist_It = (e, r, s = {})=>{
1547
1546
  if (!1 !== s.trim && "" === e.trim()) return "";
1548
- let i = "", n, o;
1547
+ let i = "", a, o;
1549
1548
  const u = e.split(" "), l = dist_Ct(u);
1550
- let a = [
1549
+ let n = [
1551
1550
  ""
1552
1551
  ];
1553
- for (const [$, c] of u.entries()){
1554
- !1 !== s.trim && (a[a.length - 1] = (a.at(-1) ?? "").trimStart());
1555
- let m = dist_M(a.at(-1) ?? "");
1556
- if (0 !== $ && (m >= r && (!1 === s.wordWrap || !1 === s.trim) && (a.push(""), m = 0), (m > 0 || !1 === s.trim) && (a[a.length - 1] += " ", m++)), s.hard && l[$] > r) {
1557
- const f = r - m, F = 1 + Math.floor((l[$] - f - 1) / r);
1558
- Math.floor((l[$] - 1) / r) < F && a.push(""), Se(a, c, r);
1552
+ for (const [$, m] of u.entries()){
1553
+ !1 !== s.trim && (n[n.length - 1] = (n.at(-1) ?? "").trimStart());
1554
+ let d = D(n.at(-1) ?? "");
1555
+ if (0 !== $ && (d >= r && (!1 === s.wordWrap || !1 === s.trim) && (n.push(""), d = 0), (d > 0 || !1 === s.trim) && (n[n.length - 1] += " ", d++)), s.hard && l[$] > r) {
1556
+ const F = r - d, y = 1 + Math.floor((l[$] - F - 1) / r);
1557
+ Math.floor((l[$] - 1) / r) < y && n.push(""), Ie(n, m, r);
1559
1558
  continue;
1560
1559
  }
1561
- if (m + l[$] > r && m > 0 && l[$] > 0) {
1562
- if (!1 === s.wordWrap && m < r) {
1563
- Se(a, c, r);
1560
+ if (d + l[$] > r && d > 0 && l[$] > 0) {
1561
+ if (!1 === s.wordWrap && d < r) {
1562
+ Ie(n, m, r);
1564
1563
  continue;
1565
1564
  }
1566
- a.push("");
1565
+ n.push("");
1567
1566
  }
1568
- if (m + l[$] > r && !1 === s.wordWrap) {
1569
- Se(a, c, r);
1567
+ if (d + l[$] > r && !1 === s.wordWrap) {
1568
+ Ie(n, m, r);
1570
1569
  continue;
1571
1570
  }
1572
- a[a.length - 1] += c;
1571
+ n[n.length - 1] += m;
1573
1572
  }
1574
- !1 !== s.trim && (a = a.map(($)=>dist_wt($)));
1575
- const d = a.join(`
1576
- `), g = d[Symbol.iterator]();
1577
- let E = g.next(), p = g.next(), y = 0;
1578
- for(; !E.done;){
1579
- const $ = E.value, c = p.value;
1573
+ !1 !== s.trim && (n = n.map(($)=>dist_St($)));
1574
+ const c = n.join(`
1575
+ `), p = c[Symbol.iterator]();
1576
+ let f = p.next(), g = p.next(), E = 0;
1577
+ for(; !f.done;){
1578
+ const $ = f.value, m = g.value;
1580
1579
  if (i += $, $ === ae || $ === je) {
1581
- Ge.lastIndex = y + 1;
1582
- const F = Ge.exec(d)?.groups;
1583
- if (F?.code !== void 0) {
1584
- const v = Number.parseFloat(F.code);
1585
- n = v === dist_Et ? void 0 : v;
1586
- } else F?.uri !== void 0 && (o = 0 === F.uri.length ? void 0 : F.uri);
1587
- }
1588
- const m = n ? dist_At(n) : void 0;
1589
- c === `
1590
- ` ? (o && (i += Ue("")), n && m && (i += He(m))) : $ === `
1591
- ` && (n && m && (i += He(n)), o && (i += Ue(o))), y += $.length, E = p, p = g.next();
1580
+ He.lastIndex = E + 1;
1581
+ const y = He.exec(c)?.groups;
1582
+ if (y?.code !== void 0) {
1583
+ const v = Number.parseFloat(y.code);
1584
+ a = v === dist_vt ? void 0 : v;
1585
+ } else y?.uri !== void 0 && (o = 0 === y.uri.length ? void 0 : y.uri);
1586
+ }
1587
+ const d = a ? dist_At(a) : void 0;
1588
+ m === `
1589
+ ` ? (o && (i += Ke("")), a && d && (i += Ue(d))) : $ === `
1590
+ ` && (a && d && (i += Ue(a)), o && (i += Ke(o))), E += $.length, f = g, g = p.next();
1592
1591
  }
1593
1592
  return i;
1594
1593
  };
1595
- function dist_q(e, r, s) {
1594
+ function dist_J(e, r, s) {
1596
1595
  return String(e).normalize().replaceAll(`\r
1597
1596
  `, `
1598
1597
  `).split(`
1599
- `).map((i)=>dist_St(i, r, s)).join(`
1598
+ `).map((i)=>dist_It(i, r, s)).join(`
1600
1599
  `);
1601
1600
  }
1602
- const dist_It = (e, r, s, i, n)=>{
1601
+ const dist_bt = (e, r, s, i, a)=>{
1603
1602
  let o = r, u = 0;
1604
1603
  for(let l = s; l < i; l++){
1605
- const a = e[l];
1606
- if (o -= a.length, u++, o <= n) break;
1604
+ const n = e[l];
1605
+ if (o -= n.length, u++, o <= a) break;
1607
1606
  }
1608
1607
  return {
1609
1608
  lineCount: o,
1610
1609
  removals: u
1611
1610
  };
1612
- }, dist_J = (e)=>{
1613
- const { cursor: r, options: s, style: i } = e, n = e.output ?? process.stdout, o = dist_rt(n), u = e.columnPadding ?? 0, l = e.rowPadding ?? 4, a = o - u, d = dist_nt(n), g = picocolors_default().dim("..."), E = e.maxItems ?? 1 / 0, p = Math.max(d - l, 0), y = Math.max(Math.min(E, p), 5);
1614
- let $ = 0;
1615
- r >= y - 3 && ($ = Math.max(Math.min(r - y + 3, s.length - y), 0));
1616
- let c = y < s.length && $ > 0, m = y < s.length && $ + y < s.length;
1617
- const f = Math.min($ + y, s.length), F = [];
1618
- let v = 0;
1619
- c && v++, m && v++;
1620
- const S = $ + (c ? 1 : 0), B = f - (m ? 1 : 0);
1621
- for(let A = S; A < B; A++){
1622
- const C = dist_q(i(s[A], A === r), a, {
1611
+ }, dist_X = ({ cursor: e, options: r, style: s, output: i = process.stdout, maxItems: a = 1 / 0, columnPadding: o = 0, rowPadding: u = 4 })=>{
1612
+ const l = dist_rt(i) - o, n = nt(i), c = styleText("dim", "..."), p = Math.max(n - u, 0), f = Math.max(Math.min(a, p), 5);
1613
+ let g = 0;
1614
+ e >= f - 3 && (g = Math.max(Math.min(e - f + 3, r.length - f), 0));
1615
+ let E = f < r.length && g > 0, $ = f < r.length && g + f < r.length;
1616
+ const m = Math.min(g + f, r.length), d = [];
1617
+ let F = 0;
1618
+ E && F++, $ && F++;
1619
+ const y = g + (E ? 1 : 0), v = m - ($ ? 1 : 0);
1620
+ for(let A = y; A < v; A++){
1621
+ const b = dist_J(s(r[A], A === e), l, {
1623
1622
  hard: !0,
1624
1623
  trim: !1
1625
1624
  }).split(`
1626
1625
  `);
1627
- F.push(C), v += C.length;
1626
+ d.push(b), F += b.length;
1628
1627
  }
1629
- if (v > p) {
1630
- let A = 0, C = 0, _ = v;
1631
- const D = r - S, T = (W, I)=>dist_It(F, _, W, I, p);
1632
- c ? ({ lineCount: _, removals: A } = T(0, D), _ > p && ({ lineCount: _, removals: C } = T(D + 1, F.length))) : ({ lineCount: _, removals: C } = T(D + 1, F.length), _ > p && ({ lineCount: _, removals: A } = T(0, D))), A > 0 && (c = !0, F.splice(0, A)), C > 0 && (m = !0, F.splice(F.length - C, C));
1628
+ if (F > p) {
1629
+ let A = 0, b = 0, w = F;
1630
+ const S = e - y, T = (M, O)=>dist_bt(d, w, M, O, p);
1631
+ E ? ({ lineCount: w, removals: A } = T(0, S), w > p && ({ lineCount: w, removals: b } = T(S + 1, d.length))) : ({ lineCount: w, removals: b } = T(S + 1, d.length), w > p && ({ lineCount: w, removals: A } = T(0, S))), A > 0 && (E = !0, d.splice(0, A)), b > 0 && ($ = !0, d.splice(d.length - b, b));
1633
1632
  }
1634
- const b = [];
1635
- c && b.push(g);
1636
- for (const A of F)for (const C of A)b.push(C);
1637
- return m && b.push(g), b;
1633
+ const C = [];
1634
+ E && C.push(c);
1635
+ for (const A of d)for (const b of A)C.push(b);
1636
+ return $ && C.push(c), C;
1638
1637
  };
1639
- const Pt = (e = "", r)=>{
1640
- (r?.output ?? process.stdout).write(`${picocolors.gray(dist_x)} ${picocolors.red(e)}
1638
+ const Nt = (e = "", r)=>{
1639
+ const s = r?.output ?? process.stdout, i = r?.withGuide ?? dist_.withGuide ? `${styleText("gray", dist_x)} ` : "";
1640
+ s.write(`${i}${styleText("red", e)}
1641
1641
 
1642
1642
  `);
1643
- }, dist_Wt = (e = "", r)=>{
1644
- (r?.output ?? process.stdout).write(`${picocolors.gray(dist_h)}
1645
- ${picocolors.gray(dist_x)} ${e}
1643
+ }, Gt = (e = "", r)=>{
1644
+ const s = r?.output ?? process.stdout, i = r?.withGuide ?? dist_.withGuide ? `${styleText("gray", dist_h)}
1645
+ ${styleText("gray", dist_x)} ` : "";
1646
+ s.write(`${i}${e}
1646
1647
 
1647
1648
  `);
1648
1649
  }, dist_Q = (e, r)=>e.split(`
1649
1650
  `).map((s)=>r(s)).join(`
1650
1651
  `), dist_Lt = (e)=>{
1651
- const r = (i, n)=>{
1652
+ const r = (i, a)=>{
1652
1653
  const o = i.label ?? String(i.value);
1653
- return "disabled" === n ? `${picocolors.gray(dist_z)} ${dist_Q(o, (u)=>picocolors.strikethrough(picocolors.gray(u)))}${i.hint ? ` ${picocolors_default().dim(`(${i.hint ?? "disabled"})`)}` : ""}` : "active" === n ? `${picocolors_default().cyan(te)} ${o}${i.hint ? ` ${picocolors_default().dim(`(${i.hint})`)}` : ""}` : "selected" === n ? `${picocolors.green(dist_G)} ${dist_Q(o, picocolors.dim)}${i.hint ? ` ${picocolors_default().dim(`(${i.hint})`)}` : ""}` : "cancelled" === n ? `${dist_Q(o, (u)=>picocolors.strikethrough(picocolors_default().dim(u)))}` : "active-selected" === n ? `${picocolors.green(dist_G)} ${o}${i.hint ? ` ${picocolors_default().dim(`(${i.hint})`)}` : ""}` : "submitted" === n ? `${dist_Q(o, picocolors.dim)}` : `${picocolors_default().dim(dist_z)} ${dist_Q(o, picocolors.dim)}`;
1654
+ return "disabled" === a ? `${styleText("gray", dist_q)} ${dist_Q(o, (u)=>styleText([
1655
+ "strikethrough",
1656
+ "gray"
1657
+ ], u))}${i.hint ? ` ${styleText("dim", `(${i.hint ?? "disabled"})`)}` : ""}` : "active" === a ? `${styleText("cyan", te)} ${o}${i.hint ? ` ${styleText("dim", `(${i.hint})`)}` : ""}` : "selected" === a ? `${styleText("green", dist_U)} ${dist_Q(o, (u)=>styleText("dim", u))}${i.hint ? ` ${styleText("dim", `(${i.hint})`)}` : ""}` : "cancelled" === a ? `${dist_Q(o, (u)=>styleText([
1658
+ "strikethrough",
1659
+ "dim"
1660
+ ], u))}` : "active-selected" === a ? `${styleText("green", dist_U)} ${o}${i.hint ? ` ${styleText("dim", `(${i.hint})`)}` : ""}` : "submitted" === a ? `${dist_Q(o, (u)=>styleText("dim", u))}` : `${styleText("dim", dist_q)} ${dist_Q(o, (u)=>styleText("dim", u))}`;
1654
1661
  }, s = e.required ?? !0;
1655
- return new Mt({
1662
+ return new Lt({
1656
1663
  options: e.options,
1657
1664
  signal: e.signal,
1658
1665
  input: e.input,
@@ -1662,157 +1669,164 @@ ${picocolors.gray(dist_x)} ${e}
1662
1669
  cursorAt: e.cursorAt,
1663
1670
  validate (i) {
1664
1671
  if (s && (void 0 === i || 0 === i.length)) return `Please select at least one option.
1665
- ${picocolors_default().reset(picocolors_default().dim(`Press ${picocolors.gray(picocolors.bgWhite(picocolors.inverse(" space ")))} to select, ${picocolors.gray(picocolors.bgWhite(picocolors.inverse(" enter ")))} to submit`))}`;
1672
+ ${styleText("reset", styleText("dim", `Press ${styleText([
1673
+ "gray",
1674
+ "bgWhite",
1675
+ "inverse"
1676
+ ], " space ")} to select, ${styleText("gray", styleText("bgWhite", styleText("inverse", " enter ")))} to submit`))}`;
1666
1677
  },
1667
1678
  render () {
1668
- const i = Bt(e.output, e.message, `${Ee(this.state)} `, `${N(this.state)} `), n = `${picocolors.gray(dist_h)}
1679
+ const i = Bt(e.output, e.message, `${ve(this.state)} `, `${dist_W(this.state)} `), a = `${styleText("gray", dist_h)}
1669
1680
  ${i}
1670
- `, o = this.value ?? [], u = (l, a)=>{
1681
+ `, o = this.value ?? [], u = (l, n)=>{
1671
1682
  if (l.disabled) return r(l, "disabled");
1672
- const d = o.includes(l.value);
1673
- return a && d ? r(l, "active-selected") : d ? r(l, "selected") : r(l, a ? "active" : "inactive");
1683
+ const c = o.includes(l.value);
1684
+ return n && c ? r(l, "active-selected") : c ? r(l, "selected") : r(l, n ? "active" : "inactive");
1674
1685
  };
1675
1686
  switch(this.state){
1676
1687
  case "submit":
1677
1688
  {
1678
- const l = this.options.filter(({ value: d })=>o.includes(d)).map((d)=>r(d, "submitted")).join(picocolors_default().dim(", ")) || picocolors_default().dim("none"), a = Bt(e.output, l, `${picocolors.gray(dist_h)} `);
1679
- return `${n}${a}`;
1689
+ const l = this.options.filter(({ value: c })=>o.includes(c)).map((c)=>r(c, "submitted")).join(styleText("dim", ", ")) || styleText("dim", "none"), n = Bt(e.output, l, `${styleText("gray", dist_h)} `);
1690
+ return `${a}${n}`;
1680
1691
  }
1681
1692
  case "cancel":
1682
1693
  {
1683
- const l = this.options.filter(({ value: d })=>o.includes(d)).map((d)=>r(d, "cancelled")).join(picocolors_default().dim(", "));
1684
- if ("" === l.trim()) return `${n}${picocolors.gray(dist_h)}`;
1685
- const a = Bt(e.output, l, `${picocolors.gray(dist_h)} `);
1686
- return `${n}${a}
1687
- ${picocolors.gray(dist_h)}`;
1694
+ const l = this.options.filter(({ value: c })=>o.includes(c)).map((c)=>r(c, "cancelled")).join(styleText("dim", ", "));
1695
+ if ("" === l.trim()) return `${a}${styleText("gray", dist_h)}`;
1696
+ const n = Bt(e.output, l, `${styleText("gray", dist_h)} `);
1697
+ return `${a}${n}
1698
+ ${styleText("gray", dist_h)}`;
1688
1699
  }
1689
1700
  case "error":
1690
1701
  {
1691
- const l = `${picocolors.yellow(dist_h)} `, a = this.error.split(`
1692
- `).map((E, p)=>0 === p ? `${picocolors.yellow(dist_x)} ${picocolors.yellow(E)}` : ` ${E}`).join(`
1693
- `), d = n.split(`
1694
- `).length, g = a.split(`
1702
+ const l = `${styleText("yellow", dist_h)} `, n = this.error.split(`
1703
+ `).map((f, g)=>0 === g ? `${styleText("yellow", dist_x)} ${styleText("yellow", f)}` : ` ${f}`).join(`
1704
+ `), c = a.split(`
1705
+ `).length, p = n.split(`
1695
1706
  `).length + 1;
1696
- return `${n}${l}${dist_J({
1707
+ return `${a}${l}${dist_X({
1697
1708
  output: e.output,
1698
1709
  options: this.options,
1699
1710
  cursor: this.cursor,
1700
1711
  maxItems: e.maxItems,
1701
1712
  columnPadding: l.length,
1702
- rowPadding: d + g,
1713
+ rowPadding: c + p,
1703
1714
  style: u
1704
1715
  }).join(`
1705
1716
  ${l}`)}
1706
- ${a}
1717
+ ${n}
1707
1718
  `;
1708
1719
  }
1709
1720
  default:
1710
1721
  {
1711
- const l = `${picocolors_default().cyan(dist_h)} `, a = n.split(`
1722
+ const l = `${styleText("cyan", dist_h)} `, n = a.split(`
1712
1723
  `).length;
1713
- return `${n}${l}${dist_J({
1724
+ return `${a}${l}${dist_X({
1714
1725
  output: e.output,
1715
1726
  options: this.options,
1716
1727
  cursor: this.cursor,
1717
1728
  maxItems: e.maxItems,
1718
1729
  columnPadding: l.length,
1719
- rowPadding: a + 2,
1730
+ rowPadding: n + 2,
1720
1731
  style: u
1721
1732
  }).join(`
1722
1733
  ${l}`)}
1723
- ${picocolors_default().cyan(dist_x)}
1734
+ ${styleText("cyan", dist_x)}
1724
1735
  `;
1725
1736
  }
1726
1737
  }
1727
1738
  }
1728
1739
  }).prompt();
1729
- }, jt = (e)=>picocolors_default().dim(e), dist_Vt = (e, r, s)=>{
1740
+ }, jt = (e)=>styleText("dim", e), dist_kt = (e, r, s)=>{
1730
1741
  const i = {
1731
1742
  hard: !0,
1732
1743
  trim: !1
1733
- }, n = dist_q(e, r, i).split(`
1734
- `), o = n.reduce((a, d)=>Math.max(dist_M(d), a), 0), u = n.map(s).reduce((a, d)=>Math.max(dist_M(d), a), 0), l = r - (u - o);
1735
- return dist_q(e, l, i);
1736
- }, dist_kt = (e = "", r = "", s)=>{
1737
- const i = s?.output ?? node_process.stdout, n = (s?.withGuide ?? dist_.withGuide) !== !1, o = s?.format ?? jt, u = [
1744
+ }, a = dist_J(e, r, i).split(`
1745
+ `), o = a.reduce((n, c)=>Math.max(D(c), n), 0), u = a.map(s).reduce((n, c)=>Math.max(D(c), n), 0), l = r - (u - o);
1746
+ return dist_J(e, l, i);
1747
+ }, dist_Vt = (e = "", r = "", s)=>{
1748
+ const i = s?.output ?? node_process.stdout, a = s?.withGuide ?? dist_.withGuide, o = s?.format ?? jt, u = [
1738
1749
  "",
1739
- ...dist_Vt(e, dist_rt(i) - 6, o).split(`
1750
+ ...dist_kt(e, dist_rt(i) - 6, o).split(`
1740
1751
  `).map(o),
1741
1752
  ""
1742
- ], l = dist_M(r), a = Math.max(u.reduce((p, y)=>{
1743
- const $ = dist_M(y);
1744
- return $ > p ? $ : p;
1745
- }, 0), l) + 2, d = u.map((p)=>`${picocolors.gray(dist_h)} ${p}${" ".repeat(a - dist_M(p))}${picocolors.gray(dist_h)}`).join(`
1746
- `), g = n ? `${picocolors.gray(dist_h)}
1747
- ` : "", E = n ? Ne : pe;
1748
- i.write(`${g}${picocolors.green(dist_k)} ${picocolors_default().reset(r)} ${picocolors.gray(se.repeat(Math.max(a - l - 1, 1)) + he)}
1749
- ${d}
1750
- ${picocolors.gray(E + se.repeat(a + 2) + me)}
1753
+ ], l = D(r), n = Math.max(u.reduce((g, E)=>{
1754
+ const $ = D(E);
1755
+ return $ > g ? $ : g;
1756
+ }, 0), l) + 2, c = u.map((g)=>`${styleText("gray", dist_h)} ${g}${" ".repeat(n - D(g))}${styleText("gray", dist_h)}`).join(`
1757
+ `), p = a ? `${styleText("gray", dist_h)}
1758
+ ` : "", f = a ? We : ge;
1759
+ i.write(`${p}${styleText("green", dist_V)} ${styleText("reset", r)} ${styleText("gray", se.repeat(Math.max(n - l - 1, 1)) + pe)}
1760
+ ${c}
1761
+ ${styleText("gray", f + se.repeat(n + 2) + me)}
1751
1762
  `);
1752
1763
  };
1753
- picocolors.magenta, dist_w("\u2500", "-"), dist_w("\u2501", "="), dist_w("\u2588", "#");
1764
+ dist_I("\u2500", "-"), dist_I("\u2501", "="), dist_I("\u2588", "#");
1754
1765
  const oe = (e, r)=>e.includes(`
1755
1766
  `) ? e.split(`
1756
1767
  `).map((s)=>r(s)).join(`
1757
- `) : r(e), qt = (e)=>{
1768
+ `) : r(e), Jt = (e)=>{
1758
1769
  const r = (s, i)=>{
1759
- const n = s.label ?? String(s.value);
1770
+ const a = s.label ?? String(s.value);
1760
1771
  switch(i){
1761
1772
  case "disabled":
1762
- return `${picocolors.gray(dist_K)} ${oe(n, picocolors.gray)}${s.hint ? ` ${picocolors_default().dim(`(${s.hint ?? "disabled"})`)}` : ""}`;
1773
+ return `${styleText("gray", dist_H)} ${oe(a, (o)=>styleText("gray", o))}${s.hint ? ` ${styleText("dim", `(${s.hint ?? "disabled"})`)}` : ""}`;
1763
1774
  case "selected":
1764
- return `${oe(n, picocolors.dim)}`;
1775
+ return `${oe(a, (o)=>styleText("dim", o))}`;
1765
1776
  case "active":
1766
- return `${picocolors.green(dist_Y)} ${n}${s.hint ? ` ${picocolors_default().dim(`(${s.hint})`)}` : ""}`;
1777
+ return `${styleText("green", dist_z)} ${a}${s.hint ? ` ${styleText("dim", `(${s.hint})`)}` : ""}`;
1767
1778
  case "cancelled":
1768
- return `${oe(n, (o)=>picocolors.strikethrough(picocolors_default().dim(o)))}`;
1779
+ return `${oe(a, (o)=>styleText([
1780
+ "strikethrough",
1781
+ "dim"
1782
+ ], o))}`;
1769
1783
  default:
1770
- return `${picocolors_default().dim(dist_K)} ${oe(n, picocolors.dim)}`;
1784
+ return `${styleText("dim", dist_H)} ${oe(a, (o)=>styleText("dim", o))}`;
1771
1785
  }
1772
1786
  };
1773
- return new Wt({
1787
+ return new Tt({
1774
1788
  options: e.options,
1775
1789
  signal: e.signal,
1776
1790
  input: e.input,
1777
1791
  output: e.output,
1778
1792
  initialValue: e.initialValue,
1779
1793
  render () {
1780
- const s = `${N(this.state)} `, i = `${Ee(this.state)} `, n = Bt(e.output, e.message, i, s), o = `${picocolors.gray(dist_h)}
1781
- ${n}
1794
+ const s = e.withGuide ?? dist_.withGuide, i = `${dist_W(this.state)} `, a = `${ve(this.state)} `, o = Bt(e.output, e.message, a, i), u = `${s ? `${styleText("gray", dist_h)}
1795
+ ` : ""}${o}
1782
1796
  `;
1783
1797
  switch(this.state){
1784
1798
  case "submit":
1785
1799
  {
1786
- const u = `${picocolors.gray(dist_h)} `, l = Bt(e.output, r(this.options[this.cursor], "selected"), u);
1787
- return `${o}${l}`;
1800
+ const l = s ? `${styleText("gray", dist_h)} ` : "", n = Bt(e.output, r(this.options[this.cursor], "selected"), l);
1801
+ return `${u}${n}`;
1788
1802
  }
1789
1803
  case "cancel":
1790
1804
  {
1791
- const u = `${picocolors.gray(dist_h)} `, l = Bt(e.output, r(this.options[this.cursor], "cancelled"), u);
1792
- return `${o}${l}
1793
- ${picocolors.gray(dist_h)}`;
1805
+ const l = s ? `${styleText("gray", dist_h)} ` : "", n = Bt(e.output, r(this.options[this.cursor], "cancelled"), l);
1806
+ return `${u}${n}${s ? `
1807
+ ${styleText("gray", dist_h)}` : ""}`;
1794
1808
  }
1795
1809
  default:
1796
1810
  {
1797
- const u = `${picocolors_default().cyan(dist_h)} `, l = o.split(`
1798
- `).length;
1799
- return `${o}${u}${dist_J({
1811
+ const l = s ? `${styleText("cyan", dist_h)} ` : "", n = s ? styleText("cyan", dist_x) : "", c = u.split(`
1812
+ `).length, p = s ? 2 : 1;
1813
+ return `${u}${l}${dist_X({
1800
1814
  output: e.output,
1801
1815
  cursor: this.cursor,
1802
1816
  options: this.options,
1803
1817
  maxItems: e.maxItems,
1804
- columnPadding: u.length,
1805
- rowPadding: l + 2,
1806
- style: (a, d)=>r(a, a.disabled ? "disabled" : d ? "active" : "inactive")
1818
+ columnPadding: l.length,
1819
+ rowPadding: c + p,
1820
+ style: (f, g)=>r(f, f.disabled ? "disabled" : g ? "active" : "inactive")
1807
1821
  }).join(`
1808
- ${u}`)}
1809
- ${picocolors_default().cyan(dist_x)}
1822
+ ${l}`)}
1823
+ ${n}
1810
1824
  `;
1811
1825
  }
1812
1826
  }
1813
1827
  }
1814
1828
  }).prompt();
1815
- }, Qt = (picocolors.gray(dist_h), (e)=>new dist_$t({
1829
+ }, Zt = (styleText("gray", dist_h), (e)=>new dist_$t({
1816
1830
  validate: e.validate,
1817
1831
  placeholder: e.placeholder,
1818
1832
  defaultValue: e.defaultValue,
@@ -1821,47 +1835,68 @@ ${picocolors_default().cyan(dist_x)}
1821
1835
  signal: e.signal,
1822
1836
  input: e.input,
1823
1837
  render () {
1824
- const r = (e?.withGuide ?? dist_.withGuide) !== !1, s = `${r ? `${picocolors.gray(dist_h)}
1825
- ` : ""}${N(this.state)} ${e.message}
1826
- `, i = e.placeholder ? picocolors.inverse(e.placeholder[0]) + picocolors_default().dim(e.placeholder.slice(1)) : picocolors.inverse(picocolors.hidden("_")), n = this.userInput ? this.userInputWithCursor : i, o = this.value ?? "";
1838
+ const r = e?.withGuide ?? dist_.withGuide, s = `${r ? `${styleText("gray", dist_h)}
1839
+ ` : ""}${dist_W(this.state)} ${e.message}
1840
+ `, i = e.placeholder ? styleText("inverse", e.placeholder[0]) + styleText("dim", e.placeholder.slice(1)) : styleText([
1841
+ "inverse",
1842
+ "hidden"
1843
+ ], "_"), a = this.userInput ? this.userInputWithCursor : i, o = this.value ?? "";
1827
1844
  switch(this.state){
1828
1845
  case "error":
1829
1846
  {
1830
- const u = this.error ? ` ${picocolors.yellow(this.error)}` : "", l = r ? `${picocolors.yellow(dist_h)} ` : "", a = r ? picocolors.yellow(dist_x) : "";
1847
+ const u = this.error ? ` ${styleText("yellow", this.error)}` : "", l = r ? `${styleText("yellow", dist_h)} ` : "", n = r ? styleText("yellow", dist_x) : "";
1831
1848
  return `${s.trim()}
1832
- ${l}${n}
1833
- ${a}${u}
1849
+ ${l}${a}
1850
+ ${n}${u}
1834
1851
  `;
1835
1852
  }
1836
1853
  case "submit":
1837
1854
  {
1838
- const u = o ? ` ${picocolors_default().dim(o)}` : "", l = r ? picocolors.gray(dist_h) : "";
1855
+ const u = o ? ` ${styleText("dim", o)}` : "", l = r ? styleText("gray", dist_h) : "";
1839
1856
  return `${s}${l}${u}`;
1840
1857
  }
1841
1858
  case "cancel":
1842
1859
  {
1843
- const u = o ? ` ${picocolors.strikethrough(picocolors_default().dim(o))}` : "", l = r ? picocolors.gray(dist_h) : "";
1860
+ const u = o ? ` ${styleText([
1861
+ "strikethrough",
1862
+ "dim"
1863
+ ], o)}` : "", l = r ? styleText("gray", dist_h) : "";
1844
1864
  return `${s}${l}${u}${o.trim() ? `
1845
1865
  ${l}` : ""}`;
1846
1866
  }
1847
1867
  default:
1848
1868
  {
1849
- const u = r ? `${picocolors_default().cyan(dist_h)} ` : "", l = r ? picocolors_default().cyan(dist_x) : "";
1850
- return `${s}${u}${n}
1869
+ const u = r ? `${styleText("cyan", dist_h)} ` : "", l = r ? styleText("cyan", dist_x) : "";
1870
+ return `${s}${u}${a}
1851
1871
  ${l}
1852
1872
  `;
1853
1873
  }
1854
1874
  }
1855
1875
  }
1856
1876
  }).prompt());
1857
- const createStyler = (style)=>(text)=>styleText(style, String(text));
1858
- const bold = createStyler('bold');
1859
- const red = createStyler('red');
1860
- const green = createStyler('green');
1861
- const yellow = createStyler('yellow');
1862
- const magenta = createStyler('magenta');
1863
- const cyan = createStyler('cyan');
1864
- const gray = createStyler('gray');
1877
+ function checkNodeVersion() {
1878
+ const { versions } = process;
1879
+ if ("styleText" in node_util || !versions.node || versions.bun || versions.deno) return;
1880
+ throw new Error(`Unsupported Node.js version: "${process.versions.node || 'unknown'}". Expected Node.js >= 20.`);
1881
+ }
1882
+ checkNodeVersion();
1883
+ const createStyler = (style)=>(text)=>node_util.styleText(style, String(text));
1884
+ const color = {
1885
+ dim: createStyler('dim'),
1886
+ red: createStyler('red'),
1887
+ bold: createStyler('bold'),
1888
+ blue: createStyler('blue'),
1889
+ cyan: createStyler('cyan'),
1890
+ gray: createStyler('gray'),
1891
+ black: createStyler('black'),
1892
+ green: createStyler('green'),
1893
+ white: createStyler('white'),
1894
+ reset: createStyler('reset'),
1895
+ yellow: createStyler('yellow'),
1896
+ magenta: createStyler('magenta'),
1897
+ underline: createStyler('underline'),
1898
+ strikethrough: createStyler('strikethrough')
1899
+ };
1865
1900
  function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : node_process.argv) {
1866
1901
  const prefix = flag.startsWith('-') ? '' : 1 === flag.length ? '-' : '--';
1867
1902
  const position = argv.indexOf(prefix + flag);
@@ -1980,7 +2015,7 @@ let endColor = [
1980
2015
  ];
1981
2016
  let isWord = (char)=>!/[\s\n]/.test(char);
1982
2017
  let gradient = (message)=>{
1983
- if (colorLevel < 3) return 2 === colorLevel ? bold(cyan(message)) : message;
2018
+ if (colorLevel < 3) return 2 === colorLevel ? color.cyan(message) : message;
1984
2019
  let chars = [
1985
2020
  ...message
1986
2021
  ];
@@ -2000,7 +2035,7 @@ let gradient = (message)=>{
2000
2035
  }
2001
2036
  output += `\x1b[38;2;${Math.round(r)};${Math.round(g)};${Math.round(b)}m${char}\x1b[39m`;
2002
2037
  }
2003
- return bold(output);
2038
+ return color.bold(output);
2004
2039
  };
2005
2040
  let LOG_LEVEL = {
2006
2041
  silent: -1,
@@ -2014,32 +2049,32 @@ let LOG_TYPES = {
2014
2049
  error: {
2015
2050
  label: 'error',
2016
2051
  level: 'error',
2017
- color: red
2052
+ color: color.red
2018
2053
  },
2019
2054
  warn: {
2020
2055
  label: 'warn',
2021
2056
  level: 'warn',
2022
- color: yellow
2057
+ color: color.yellow
2023
2058
  },
2024
2059
  info: {
2025
2060
  label: 'info',
2026
2061
  level: 'info',
2027
- color: cyan
2062
+ color: color.cyan
2028
2063
  },
2029
2064
  start: {
2030
2065
  label: 'start',
2031
2066
  level: 'info',
2032
- color: cyan
2067
+ color: color.cyan
2033
2068
  },
2034
2069
  ready: {
2035
2070
  label: 'ready',
2036
2071
  level: 'info',
2037
- color: green
2072
+ color: color.green
2038
2073
  },
2039
2074
  success: {
2040
2075
  label: 'success',
2041
2076
  level: 'info',
2042
- color: green
2077
+ color: color.green
2043
2078
  },
2044
2079
  log: {
2045
2080
  level: 'info'
@@ -2047,14 +2082,14 @@ let LOG_TYPES = {
2047
2082
  debug: {
2048
2083
  label: 'debug',
2049
2084
  level: 'verbose',
2050
- color: magenta
2085
+ color: color.magenta
2051
2086
  }
2052
2087
  };
2053
2088
  const normalizeErrorMessage = (err)=>{
2054
2089
  if (err.stack) {
2055
2090
  let [name, ...rest] = err.stack.split('\n');
2056
2091
  if (name.startsWith('Error: ')) name = name.slice(7);
2057
- return `${name}\n${gray(rest.join('\n'))}`;
2092
+ return `${name}\n${color.gray(rest.join('\n'))}`;
2058
2093
  }
2059
2094
  return err.message;
2060
2095
  };
@@ -2069,18 +2104,18 @@ let createLogger = (options = {})=>{
2069
2104
  let text = '';
2070
2105
  if ('label' in logType) {
2071
2106
  label = (logType.label || '').padEnd(7);
2072
- label = bold(logType.color ? logType.color(label) : label);
2107
+ label = color.bold(logType.color ? logType.color(label) : label);
2073
2108
  }
2074
2109
  if (message instanceof Error) {
2075
2110
  text += normalizeErrorMessage(message);
2076
2111
  const { cause } = message;
2077
2112
  if (cause) {
2078
- text += yellow('\n [cause]: ');
2113
+ text += color.yellow('\n [cause]: ');
2079
2114
  text += cause instanceof Error ? normalizeErrorMessage(cause) : String(cause);
2080
2115
  }
2081
2116
  } else if ('error' === level && 'string' == typeof message) {
2082
2117
  let lines = message.split('\n');
2083
- text = lines.map((line)=>isErrorStackMessage(line) ? gray(line) : line).join('\n');
2118
+ text = lines.map((line)=>isErrorStackMessage(line) ? color.gray(line) : line).join('\n');
2084
2119
  } else text = `${message}`;
2085
2120
  const method = 'error' === level || 'warn' === level ? level : 'log';
2086
2121
  console[method](label.length ? `${label} ${text}` : text, ...args);
@@ -2110,10 +2145,12 @@ const cjs = __webpack_require__("./node_modules/.pnpm/deepmerge@4.3.1/node_modul
2110
2145
  var cjs_default = /*#__PURE__*/ __webpack_require__.n(cjs);
2111
2146
  const minimist = __webpack_require__("./node_modules/.pnpm/minimist@1.2.8/node_modules/minimist/index.js");
2112
2147
  var minimist_default = /*#__PURE__*/ __webpack_require__.n(minimist);
2148
+ const picocolors = __webpack_require__("./node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
2149
+ var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
2113
2150
  const src_filename = fileURLToPath(import.meta.url);
2114
2151
  const src_dirname = dirname(src_filename);
2115
2152
  function cancelAndExit() {
2116
- Pt('Operation cancelled.');
2153
+ Nt('Operation cancelled.');
2117
2154
  process.exit(0);
2118
2155
  }
2119
2156
  function checkCancel(value) {
@@ -2270,7 +2307,7 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
2270
2307
  packageManager
2271
2308
  };
2272
2309
  if (!version) version = (await readPackageJson(root)).version;
2273
- const projectName = argv.dir ?? checkCancel(await Qt({
2310
+ const projectName = argv.dir ?? checkCancel(await Zt({
2274
2311
  message: 'Project name or path',
2275
2312
  placeholder: `${name.toLowerCase()}-project`,
2276
2313
  defaultValue: `${name.toLowerCase()}-project`,
@@ -2283,7 +2320,7 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
2283
2320
  const packageName = argv.packageName || formatted.packageName;
2284
2321
  const distFolder = node_path.isAbsolute(targetDir) ? targetDir : node_path.join(cwd, targetDir);
2285
2322
  if (!argv.override && external_node_fs_["default"].existsSync(distFolder) && !isEmptyDir(distFolder)) {
2286
- const option = checkCancel(await qt({
2323
+ const option = checkCancel(await Jt({
2287
2324
  message: `"${targetDir}" is not empty, please choose:`,
2288
2325
  options: [
2289
2326
  {
@@ -2378,8 +2415,8 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
2378
2415
  `3. ${picocolors_default().cyan(`${packageManager} install`)}`,
2379
2416
  `4. ${picocolors_default().cyan(`${packageManager} run dev`)}`
2380
2417
  ];
2381
- if (nextSteps.length) dist_kt(nextSteps.map((step)=>picocolors_default().reset(step)).join('\n'), 'Next steps');
2382
- dist_Wt('All set, happy coding!');
2418
+ if (nextSteps.length) dist_Vt(nextSteps.map((step)=>picocolors_default().reset(step)).join('\n'), 'Next steps');
2419
+ Gt('All set, happy coding!');
2383
2420
  }
2384
2421
  function sortObjectKeys(obj) {
2385
2422
  const sortedKeys = Object.keys(obj).sort();
@@ -2542,4 +2579,4 @@ function collectAgentsFiles(agentsMdSearchDirs) {
2542
2579
  }
2543
2580
  return agentsFiles;
2544
2581
  }
2545
- export { BUILTIN_TOOLS, Qt as text, checkCancel, collectAgentsFiles, copyFolder, create, dist_Lt as multiselect, mergeAgentsFiles, mergePackageJson, qt as select };
2582
+ export { BUILTIN_TOOLS, Jt as select, Zt as text, checkCancel, collectAgentsFiles, copyFolder, create, dist_Lt as multiselect, mergeAgentsFiles, mergePackageJson };