@socketsecurity/lib 3.3.8 → 3.3.10

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.
@@ -904,10 +904,6 @@ var require_cli_width = __commonJS({
904
904
  });
905
905
 
906
906
  // node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
907
- var ansi_regex_exports = {};
908
- __export(ansi_regex_exports, {
909
- default: () => ansiRegex
910
- });
911
907
  function ansiRegex({ onlyFirst = false } = {}) {
912
908
  const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
913
909
  const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
@@ -921,1222 +917,350 @@ var init_ansi_regex = __esm({
921
917
  }
922
918
  });
923
919
 
924
- // node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js
925
- var require_strip_ansi = __commonJS({
926
- "node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports2, module2) {
927
- "use strict";
928
- var ansiRegex2 = (init_ansi_regex(), __toCommonJS(ansi_regex_exports));
929
- module2.exports = (string) => typeof string === "string" ? string.replace(ansiRegex2(), "") : string;
920
+ // node_modules/.pnpm/strip-ansi@7.1.2/node_modules/strip-ansi/index.js
921
+ function stripAnsi(string) {
922
+ if (typeof string !== "string") {
923
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
930
924
  }
931
- });
932
-
933
- // node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js
934
- var require_is_fullwidth_code_point = __commonJS({
935
- "node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports2, module2) {
936
- "use strict";
937
- var isFullwidthCodePoint = /* @__PURE__ */ __name((codePoint) => {
938
- if (Number.isNaN(codePoint)) {
939
- return false;
940
- }
941
- if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
942
- codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
943
- codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
944
- // CJK Radicals Supplement .. Enclosed CJK Letters and Months
945
- 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
946
- 12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
947
- 19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
948
- 43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
949
- 44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
950
- 63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
951
- 65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
952
- 65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
953
- 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
954
- 110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
955
- 127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
956
- 131072 <= codePoint && codePoint <= 262141)) {
957
- return true;
958
- }
959
- return false;
960
- }, "isFullwidthCodePoint");
961
- module2.exports = isFullwidthCodePoint;
962
- module2.exports.default = isFullwidthCodePoint;
925
+ return string.replace(regex, "");
926
+ }
927
+ var regex;
928
+ var init_strip_ansi = __esm({
929
+ "node_modules/.pnpm/strip-ansi@7.1.2/node_modules/strip-ansi/index.js"() {
930
+ init_ansi_regex();
931
+ regex = ansiRegex();
932
+ __name(stripAnsi, "stripAnsi");
963
933
  }
964
934
  });
965
935
 
966
- // node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js
967
- var require_emoji_regex = __commonJS({
968
- "node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports2, module2) {
969
- "use strict";
970
- module2.exports = function() {
971
- return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\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\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])|\uD83C[\uDF3E\uDF73\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])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\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])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\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\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*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\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\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\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[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
972
- };
936
+ // node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/lookup.js
937
+ function isAmbiguous(x) {
938
+ return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
939
+ }
940
+ function isFullWidth(x) {
941
+ return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
942
+ }
943
+ function isWide(x) {
944
+ return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
945
+ }
946
+ var init_lookup = __esm({
947
+ "node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/lookup.js"() {
948
+ __name(isAmbiguous, "isAmbiguous");
949
+ __name(isFullWidth, "isFullWidth");
950
+ __name(isWide, "isWide");
973
951
  }
974
952
  });
975
953
 
976
- // node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js
977
- var require_string_width = __commonJS({
978
- "node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports2, module2) {
979
- "use strict";
980
- var stripAnsi = require_strip_ansi();
981
- var isFullwidthCodePoint = require_is_fullwidth_code_point();
982
- var emojiRegex = require_emoji_regex();
983
- var stringWidth = /* @__PURE__ */ __name((string) => {
984
- if (typeof string !== "string" || string.length === 0) {
985
- return 0;
986
- }
987
- string = stripAnsi(string);
988
- if (string.length === 0) {
989
- return 0;
990
- }
991
- string = string.replace(emojiRegex(), " ");
992
- let width = 0;
993
- for (let i = 0; i < string.length; i++) {
994
- const code = string.codePointAt(i);
995
- if (code <= 31 || code >= 127 && code <= 159) {
996
- continue;
997
- }
998
- if (code >= 768 && code <= 879) {
999
- continue;
1000
- }
1001
- if (code > 65535) {
1002
- i++;
1003
- }
1004
- width += isFullwidthCodePoint(code) ? 2 : 1;
1005
- }
1006
- return width;
1007
- }, "stringWidth");
1008
- module2.exports = stringWidth;
1009
- module2.exports.default = stringWidth;
954
+ // node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/index.js
955
+ function validate(codePoint) {
956
+ if (!Number.isSafeInteger(codePoint)) {
957
+ throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
1010
958
  }
1011
- });
1012
-
1013
- // node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js
1014
- var require_color_name = __commonJS({
1015
- "node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(exports2, module2) {
1016
- "use strict";
1017
- module2.exports = {
1018
- "aliceblue": [240, 248, 255],
1019
- "antiquewhite": [250, 235, 215],
1020
- "aqua": [0, 255, 255],
1021
- "aquamarine": [127, 255, 212],
1022
- "azure": [240, 255, 255],
1023
- "beige": [245, 245, 220],
1024
- "bisque": [255, 228, 196],
1025
- "black": [0, 0, 0],
1026
- "blanchedalmond": [255, 235, 205],
1027
- "blue": [0, 0, 255],
1028
- "blueviolet": [138, 43, 226],
1029
- "brown": [165, 42, 42],
1030
- "burlywood": [222, 184, 135],
1031
- "cadetblue": [95, 158, 160],
1032
- "chartreuse": [127, 255, 0],
1033
- "chocolate": [210, 105, 30],
1034
- "coral": [255, 127, 80],
1035
- "cornflowerblue": [100, 149, 237],
1036
- "cornsilk": [255, 248, 220],
1037
- "crimson": [220, 20, 60],
1038
- "cyan": [0, 255, 255],
1039
- "darkblue": [0, 0, 139],
1040
- "darkcyan": [0, 139, 139],
1041
- "darkgoldenrod": [184, 134, 11],
1042
- "darkgray": [169, 169, 169],
1043
- "darkgreen": [0, 100, 0],
1044
- "darkgrey": [169, 169, 169],
1045
- "darkkhaki": [189, 183, 107],
1046
- "darkmagenta": [139, 0, 139],
1047
- "darkolivegreen": [85, 107, 47],
1048
- "darkorange": [255, 140, 0],
1049
- "darkorchid": [153, 50, 204],
1050
- "darkred": [139, 0, 0],
1051
- "darksalmon": [233, 150, 122],
1052
- "darkseagreen": [143, 188, 143],
1053
- "darkslateblue": [72, 61, 139],
1054
- "darkslategray": [47, 79, 79],
1055
- "darkslategrey": [47, 79, 79],
1056
- "darkturquoise": [0, 206, 209],
1057
- "darkviolet": [148, 0, 211],
1058
- "deeppink": [255, 20, 147],
1059
- "deepskyblue": [0, 191, 255],
1060
- "dimgray": [105, 105, 105],
1061
- "dimgrey": [105, 105, 105],
1062
- "dodgerblue": [30, 144, 255],
1063
- "firebrick": [178, 34, 34],
1064
- "floralwhite": [255, 250, 240],
1065
- "forestgreen": [34, 139, 34],
1066
- "fuchsia": [255, 0, 255],
1067
- "gainsboro": [220, 220, 220],
1068
- "ghostwhite": [248, 248, 255],
1069
- "gold": [255, 215, 0],
1070
- "goldenrod": [218, 165, 32],
1071
- "gray": [128, 128, 128],
1072
- "green": [0, 128, 0],
1073
- "greenyellow": [173, 255, 47],
1074
- "grey": [128, 128, 128],
1075
- "honeydew": [240, 255, 240],
1076
- "hotpink": [255, 105, 180],
1077
- "indianred": [205, 92, 92],
1078
- "indigo": [75, 0, 130],
1079
- "ivory": [255, 255, 240],
1080
- "khaki": [240, 230, 140],
1081
- "lavender": [230, 230, 250],
1082
- "lavenderblush": [255, 240, 245],
1083
- "lawngreen": [124, 252, 0],
1084
- "lemonchiffon": [255, 250, 205],
1085
- "lightblue": [173, 216, 230],
1086
- "lightcoral": [240, 128, 128],
1087
- "lightcyan": [224, 255, 255],
1088
- "lightgoldenrodyellow": [250, 250, 210],
1089
- "lightgray": [211, 211, 211],
1090
- "lightgreen": [144, 238, 144],
1091
- "lightgrey": [211, 211, 211],
1092
- "lightpink": [255, 182, 193],
1093
- "lightsalmon": [255, 160, 122],
1094
- "lightseagreen": [32, 178, 170],
1095
- "lightskyblue": [135, 206, 250],
1096
- "lightslategray": [119, 136, 153],
1097
- "lightslategrey": [119, 136, 153],
1098
- "lightsteelblue": [176, 196, 222],
1099
- "lightyellow": [255, 255, 224],
1100
- "lime": [0, 255, 0],
1101
- "limegreen": [50, 205, 50],
1102
- "linen": [250, 240, 230],
1103
- "magenta": [255, 0, 255],
1104
- "maroon": [128, 0, 0],
1105
- "mediumaquamarine": [102, 205, 170],
1106
- "mediumblue": [0, 0, 205],
1107
- "mediumorchid": [186, 85, 211],
1108
- "mediumpurple": [147, 112, 219],
1109
- "mediumseagreen": [60, 179, 113],
1110
- "mediumslateblue": [123, 104, 238],
1111
- "mediumspringgreen": [0, 250, 154],
1112
- "mediumturquoise": [72, 209, 204],
1113
- "mediumvioletred": [199, 21, 133],
1114
- "midnightblue": [25, 25, 112],
1115
- "mintcream": [245, 255, 250],
1116
- "mistyrose": [255, 228, 225],
1117
- "moccasin": [255, 228, 181],
1118
- "navajowhite": [255, 222, 173],
1119
- "navy": [0, 0, 128],
1120
- "oldlace": [253, 245, 230],
1121
- "olive": [128, 128, 0],
1122
- "olivedrab": [107, 142, 35],
1123
- "orange": [255, 165, 0],
1124
- "orangered": [255, 69, 0],
1125
- "orchid": [218, 112, 214],
1126
- "palegoldenrod": [238, 232, 170],
1127
- "palegreen": [152, 251, 152],
1128
- "paleturquoise": [175, 238, 238],
1129
- "palevioletred": [219, 112, 147],
1130
- "papayawhip": [255, 239, 213],
1131
- "peachpuff": [255, 218, 185],
1132
- "peru": [205, 133, 63],
1133
- "pink": [255, 192, 203],
1134
- "plum": [221, 160, 221],
1135
- "powderblue": [176, 224, 230],
1136
- "purple": [128, 0, 128],
1137
- "rebeccapurple": [102, 51, 153],
1138
- "red": [255, 0, 0],
1139
- "rosybrown": [188, 143, 143],
1140
- "royalblue": [65, 105, 225],
1141
- "saddlebrown": [139, 69, 19],
1142
- "salmon": [250, 128, 114],
1143
- "sandybrown": [244, 164, 96],
1144
- "seagreen": [46, 139, 87],
1145
- "seashell": [255, 245, 238],
1146
- "sienna": [160, 82, 45],
1147
- "silver": [192, 192, 192],
1148
- "skyblue": [135, 206, 235],
1149
- "slateblue": [106, 90, 205],
1150
- "slategray": [112, 128, 144],
1151
- "slategrey": [112, 128, 144],
1152
- "snow": [255, 250, 250],
1153
- "springgreen": [0, 255, 127],
1154
- "steelblue": [70, 130, 180],
1155
- "tan": [210, 180, 140],
1156
- "teal": [0, 128, 128],
1157
- "thistle": [216, 191, 216],
1158
- "tomato": [255, 99, 71],
1159
- "turquoise": [64, 224, 208],
1160
- "violet": [238, 130, 238],
1161
- "wheat": [245, 222, 179],
1162
- "white": [255, 255, 255],
1163
- "whitesmoke": [245, 245, 245],
1164
- "yellow": [255, 255, 0],
1165
- "yellowgreen": [154, 205, 50]
1166
- };
959
+ }
960
+ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
961
+ validate(codePoint);
962
+ if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) {
963
+ return 2;
1167
964
  }
1168
- });
1169
-
1170
- // node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js
1171
- var require_conversions = __commonJS({
1172
- "node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js"(exports2, module2) {
1173
- var cssKeywords = require_color_name();
1174
- var reverseKeywords = {};
1175
- for (const key of Object.keys(cssKeywords)) {
1176
- reverseKeywords[cssKeywords[key]] = key;
1177
- }
1178
- var convert = {
1179
- rgb: { channels: 3, labels: "rgb" },
1180
- hsl: { channels: 3, labels: "hsl" },
1181
- hsv: { channels: 3, labels: "hsv" },
1182
- hwb: { channels: 3, labels: "hwb" },
1183
- cmyk: { channels: 4, labels: "cmyk" },
1184
- xyz: { channels: 3, labels: "xyz" },
1185
- lab: { channels: 3, labels: "lab" },
1186
- lch: { channels: 3, labels: "lch" },
1187
- hex: { channels: 1, labels: ["hex"] },
1188
- keyword: { channels: 1, labels: ["keyword"] },
1189
- ansi16: { channels: 1, labels: ["ansi16"] },
1190
- ansi256: { channels: 1, labels: ["ansi256"] },
1191
- hcg: { channels: 3, labels: ["h", "c", "g"] },
1192
- apple: { channels: 3, labels: ["r16", "g16", "b16"] },
1193
- gray: { channels: 1, labels: ["gray"] }
1194
- };
1195
- module2.exports = convert;
1196
- for (const model of Object.keys(convert)) {
1197
- if (!("channels" in convert[model])) {
1198
- throw new Error("missing channels property: " + model);
1199
- }
1200
- if (!("labels" in convert[model])) {
1201
- throw new Error("missing channel labels property: " + model);
1202
- }
1203
- if (convert[model].labels.length !== convert[model].channels) {
1204
- throw new Error("channel and label counts mismatch: " + model);
1205
- }
1206
- const { channels, labels } = convert[model];
1207
- delete convert[model].channels;
1208
- delete convert[model].labels;
1209
- Object.defineProperty(convert[model], "channels", { value: channels });
1210
- Object.defineProperty(convert[model], "labels", { value: labels });
1211
- }
1212
- convert.rgb.hsl = function(rgb) {
1213
- const r = rgb[0] / 255;
1214
- const g = rgb[1] / 255;
1215
- const b = rgb[2] / 255;
1216
- const min = Math.min(r, g, b);
1217
- const max = Math.max(r, g, b);
1218
- const delta = max - min;
1219
- let h;
1220
- let s;
1221
- if (max === min) {
1222
- h = 0;
1223
- } else if (r === max) {
1224
- h = (g - b) / delta;
1225
- } else if (g === max) {
1226
- h = 2 + (b - r) / delta;
1227
- } else if (b === max) {
1228
- h = 4 + (r - g) / delta;
1229
- }
1230
- h = Math.min(h * 60, 360);
1231
- if (h < 0) {
1232
- h += 360;
1233
- }
1234
- const l = (min + max) / 2;
1235
- if (max === min) {
1236
- s = 0;
1237
- } else if (l <= 0.5) {
1238
- s = delta / (max + min);
1239
- } else {
1240
- s = delta / (2 - max - min);
1241
- }
1242
- return [h, s * 100, l * 100];
1243
- };
1244
- convert.rgb.hsv = function(rgb) {
1245
- let rdif;
1246
- let gdif;
1247
- let bdif;
1248
- let h;
1249
- let s;
1250
- const r = rgb[0] / 255;
1251
- const g = rgb[1] / 255;
1252
- const b = rgb[2] / 255;
1253
- const v = Math.max(r, g, b);
1254
- const diff = v - Math.min(r, g, b);
1255
- const diffc = /* @__PURE__ */ __name(function(c) {
1256
- return (v - c) / 6 / diff + 1 / 2;
1257
- }, "diffc");
1258
- if (diff === 0) {
1259
- h = 0;
1260
- s = 0;
1261
- } else {
1262
- s = diff / v;
1263
- rdif = diffc(r);
1264
- gdif = diffc(g);
1265
- bdif = diffc(b);
1266
- if (r === v) {
1267
- h = bdif - gdif;
1268
- } else if (g === v) {
1269
- h = 1 / 3 + rdif - bdif;
1270
- } else if (b === v) {
1271
- h = 2 / 3 + gdif - rdif;
1272
- }
1273
- if (h < 0) {
1274
- h += 1;
1275
- } else if (h > 1) {
1276
- h -= 1;
1277
- }
1278
- }
1279
- return [
1280
- h * 360,
1281
- s * 100,
1282
- v * 100
1283
- ];
1284
- };
1285
- convert.rgb.hwb = function(rgb) {
1286
- const r = rgb[0];
1287
- const g = rgb[1];
1288
- let b = rgb[2];
1289
- const h = convert.rgb.hsl(rgb)[0];
1290
- const w = 1 / 255 * Math.min(r, Math.min(g, b));
1291
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
1292
- return [h, w * 100, b * 100];
1293
- };
1294
- convert.rgb.cmyk = function(rgb) {
1295
- const r = rgb[0] / 255;
1296
- const g = rgb[1] / 255;
1297
- const b = rgb[2] / 255;
1298
- const k = Math.min(1 - r, 1 - g, 1 - b);
1299
- const c = (1 - r - k) / (1 - k) || 0;
1300
- const m = (1 - g - k) / (1 - k) || 0;
1301
- const y = (1 - b - k) / (1 - k) || 0;
1302
- return [c * 100, m * 100, y * 100, k * 100];
1303
- };
1304
- function comparativeDistance(x, y) {
1305
- return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
1306
- }
1307
- __name(comparativeDistance, "comparativeDistance");
1308
- convert.rgb.keyword = function(rgb) {
1309
- const reversed = reverseKeywords[rgb];
1310
- if (reversed) {
1311
- return reversed;
1312
- }
1313
- let currentClosestDistance = Infinity;
1314
- let currentClosestKeyword;
1315
- for (const keyword of Object.keys(cssKeywords)) {
1316
- const value = cssKeywords[keyword];
1317
- const distance = comparativeDistance(rgb, value);
1318
- if (distance < currentClosestDistance) {
1319
- currentClosestDistance = distance;
1320
- currentClosestKeyword = keyword;
1321
- }
1322
- }
1323
- return currentClosestKeyword;
1324
- };
1325
- convert.keyword.rgb = function(keyword) {
1326
- return cssKeywords[keyword];
1327
- };
1328
- convert.rgb.xyz = function(rgb) {
1329
- let r = rgb[0] / 255;
1330
- let g = rgb[1] / 255;
1331
- let b = rgb[2] / 255;
1332
- r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
1333
- g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
1334
- b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
1335
- const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
1336
- const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
1337
- const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
1338
- return [x * 100, y * 100, z * 100];
1339
- };
1340
- convert.rgb.lab = function(rgb) {
1341
- const xyz = convert.rgb.xyz(rgb);
1342
- let x = xyz[0];
1343
- let y = xyz[1];
1344
- let z = xyz[2];
1345
- x /= 95.047;
1346
- y /= 100;
1347
- z /= 108.883;
1348
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
1349
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
1350
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
1351
- const l = 116 * y - 16;
1352
- const a = 500 * (x - y);
1353
- const b = 200 * (y - z);
1354
- return [l, a, b];
1355
- };
1356
- convert.hsl.rgb = function(hsl) {
1357
- const h = hsl[0] / 360;
1358
- const s = hsl[1] / 100;
1359
- const l = hsl[2] / 100;
1360
- let t2;
1361
- let t3;
1362
- let val;
1363
- if (s === 0) {
1364
- val = l * 255;
1365
- return [val, val, val];
1366
- }
1367
- if (l < 0.5) {
1368
- t2 = l * (1 + s);
1369
- } else {
1370
- t2 = l + s - l * s;
1371
- }
1372
- const t1 = 2 * l - t2;
1373
- const rgb = [0, 0, 0];
1374
- for (let i = 0; i < 3; i++) {
1375
- t3 = h + 1 / 3 * -(i - 1);
1376
- if (t3 < 0) {
1377
- t3++;
1378
- }
1379
- if (t3 > 1) {
1380
- t3--;
1381
- }
1382
- if (6 * t3 < 1) {
1383
- val = t1 + (t2 - t1) * 6 * t3;
1384
- } else if (2 * t3 < 1) {
1385
- val = t2;
1386
- } else if (3 * t3 < 2) {
1387
- val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
1388
- } else {
1389
- val = t1;
1390
- }
1391
- rgb[i] = val * 255;
1392
- }
1393
- return rgb;
1394
- };
1395
- convert.hsl.hsv = function(hsl) {
1396
- const h = hsl[0];
1397
- let s = hsl[1] / 100;
1398
- let l = hsl[2] / 100;
1399
- let smin = s;
1400
- const lmin = Math.max(l, 0.01);
1401
- l *= 2;
1402
- s *= l <= 1 ? l : 2 - l;
1403
- smin *= lmin <= 1 ? lmin : 2 - lmin;
1404
- const v = (l + s) / 2;
1405
- const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
1406
- return [h, sv * 100, v * 100];
1407
- };
1408
- convert.hsv.rgb = function(hsv) {
1409
- const h = hsv[0] / 60;
1410
- const s = hsv[1] / 100;
1411
- let v = hsv[2] / 100;
1412
- const hi = Math.floor(h) % 6;
1413
- const f = h - Math.floor(h);
1414
- const p = 255 * v * (1 - s);
1415
- const q = 255 * v * (1 - s * f);
1416
- const t = 255 * v * (1 - s * (1 - f));
1417
- v *= 255;
1418
- switch (hi) {
1419
- case 0:
1420
- return [v, t, p];
1421
- case 1:
1422
- return [q, v, p];
1423
- case 2:
1424
- return [p, v, t];
1425
- case 3:
1426
- return [p, q, v];
1427
- case 4:
1428
- return [t, p, v];
1429
- case 5:
1430
- return [v, p, q];
1431
- }
1432
- };
1433
- convert.hsv.hsl = function(hsv) {
1434
- const h = hsv[0];
1435
- const s = hsv[1] / 100;
1436
- const v = hsv[2] / 100;
1437
- const vmin = Math.max(v, 0.01);
1438
- let sl;
1439
- let l;
1440
- l = (2 - s) * v;
1441
- const lmin = (2 - s) * vmin;
1442
- sl = s * vmin;
1443
- sl /= lmin <= 1 ? lmin : 2 - lmin;
1444
- sl = sl || 0;
1445
- l /= 2;
1446
- return [h, sl * 100, l * 100];
1447
- };
1448
- convert.hwb.rgb = function(hwb) {
1449
- const h = hwb[0] / 360;
1450
- let wh = hwb[1] / 100;
1451
- let bl = hwb[2] / 100;
1452
- const ratio = wh + bl;
1453
- let f;
1454
- if (ratio > 1) {
1455
- wh /= ratio;
1456
- bl /= ratio;
1457
- }
1458
- const i = Math.floor(6 * h);
1459
- const v = 1 - bl;
1460
- f = 6 * h - i;
1461
- if ((i & 1) !== 0) {
1462
- f = 1 - f;
1463
- }
1464
- const n = wh + f * (v - wh);
1465
- let r;
1466
- let g;
1467
- let b;
1468
- switch (i) {
1469
- default:
1470
- case 6:
1471
- case 0:
1472
- r = v;
1473
- g = n;
1474
- b = wh;
1475
- break;
1476
- case 1:
1477
- r = n;
1478
- g = v;
1479
- b = wh;
1480
- break;
1481
- case 2:
1482
- r = wh;
1483
- g = v;
1484
- b = n;
1485
- break;
1486
- case 3:
1487
- r = wh;
1488
- g = n;
1489
- b = v;
1490
- break;
1491
- case 4:
1492
- r = n;
1493
- g = wh;
1494
- b = v;
1495
- break;
1496
- case 5:
1497
- r = v;
1498
- g = wh;
1499
- b = n;
1500
- break;
1501
- }
1502
- return [r * 255, g * 255, b * 255];
1503
- };
1504
- convert.cmyk.rgb = function(cmyk) {
1505
- const c = cmyk[0] / 100;
1506
- const m = cmyk[1] / 100;
1507
- const y = cmyk[2] / 100;
1508
- const k = cmyk[3] / 100;
1509
- const r = 1 - Math.min(1, c * (1 - k) + k);
1510
- const g = 1 - Math.min(1, m * (1 - k) + k);
1511
- const b = 1 - Math.min(1, y * (1 - k) + k);
1512
- return [r * 255, g * 255, b * 255];
1513
- };
1514
- convert.xyz.rgb = function(xyz) {
1515
- const x = xyz[0] / 100;
1516
- const y = xyz[1] / 100;
1517
- const z = xyz[2] / 100;
1518
- let r;
1519
- let g;
1520
- let b;
1521
- r = x * 3.2406 + y * -1.5372 + z * -0.4986;
1522
- g = x * -0.9689 + y * 1.8758 + z * 0.0415;
1523
- b = x * 0.0557 + y * -0.204 + z * 1.057;
1524
- r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
1525
- g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
1526
- b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
1527
- r = Math.min(Math.max(0, r), 1);
1528
- g = Math.min(Math.max(0, g), 1);
1529
- b = Math.min(Math.max(0, b), 1);
1530
- return [r * 255, g * 255, b * 255];
1531
- };
1532
- convert.xyz.lab = function(xyz) {
1533
- let x = xyz[0];
1534
- let y = xyz[1];
1535
- let z = xyz[2];
1536
- x /= 95.047;
1537
- y /= 100;
1538
- z /= 108.883;
1539
- x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
1540
- y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
1541
- z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
1542
- const l = 116 * y - 16;
1543
- const a = 500 * (x - y);
1544
- const b = 200 * (y - z);
1545
- return [l, a, b];
1546
- };
1547
- convert.lab.xyz = function(lab) {
1548
- const l = lab[0];
1549
- const a = lab[1];
1550
- const b = lab[2];
1551
- let x;
1552
- let y;
1553
- let z;
1554
- y = (l + 16) / 116;
1555
- x = a / 500 + y;
1556
- z = y - b / 200;
1557
- const y2 = y ** 3;
1558
- const x2 = x ** 3;
1559
- const z2 = z ** 3;
1560
- y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
1561
- x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
1562
- z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
1563
- x *= 95.047;
1564
- y *= 100;
1565
- z *= 108.883;
1566
- return [x, y, z];
1567
- };
1568
- convert.lab.lch = function(lab) {
1569
- const l = lab[0];
1570
- const a = lab[1];
1571
- const b = lab[2];
1572
- let h;
1573
- const hr = Math.atan2(b, a);
1574
- h = hr * 360 / 2 / Math.PI;
1575
- if (h < 0) {
1576
- h += 360;
1577
- }
1578
- const c = Math.sqrt(a * a + b * b);
1579
- return [l, c, h];
1580
- };
1581
- convert.lch.lab = function(lch) {
1582
- const l = lch[0];
1583
- const c = lch[1];
1584
- const h = lch[2];
1585
- const hr = h / 360 * 2 * Math.PI;
1586
- const a = c * Math.cos(hr);
1587
- const b = c * Math.sin(hr);
1588
- return [l, a, b];
1589
- };
1590
- convert.rgb.ansi16 = function(args, saturation = null) {
1591
- const [r, g, b] = args;
1592
- let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
1593
- value = Math.round(value / 50);
1594
- if (value === 0) {
1595
- return 30;
1596
- }
1597
- let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
1598
- if (value === 2) {
1599
- ansi += 60;
1600
- }
1601
- return ansi;
1602
- };
1603
- convert.hsv.ansi16 = function(args) {
1604
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
1605
- };
1606
- convert.rgb.ansi256 = function(args) {
1607
- const r = args[0];
1608
- const g = args[1];
1609
- const b = args[2];
1610
- if (r === g && g === b) {
1611
- if (r < 8) {
1612
- return 16;
1613
- }
1614
- if (r > 248) {
1615
- return 231;
1616
- }
1617
- return Math.round((r - 8) / 247 * 24) + 232;
1618
- }
1619
- const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
1620
- return ansi;
1621
- };
1622
- convert.ansi16.rgb = function(args) {
1623
- let color = args % 10;
1624
- if (color === 0 || color === 7) {
1625
- if (args > 50) {
1626
- color += 3.5;
1627
- }
1628
- color = color / 10.5 * 255;
1629
- return [color, color, color];
1630
- }
1631
- const mult = (~~(args > 50) + 1) * 0.5;
1632
- const r = (color & 1) * mult * 255;
1633
- const g = (color >> 1 & 1) * mult * 255;
1634
- const b = (color >> 2 & 1) * mult * 255;
1635
- return [r, g, b];
1636
- };
1637
- convert.ansi256.rgb = function(args) {
1638
- if (args >= 232) {
1639
- const c = (args - 232) * 10 + 8;
1640
- return [c, c, c];
1641
- }
1642
- args -= 16;
1643
- let rem;
1644
- const r = Math.floor(args / 36) / 5 * 255;
1645
- const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
1646
- const b = rem % 6 / 5 * 255;
1647
- return [r, g, b];
1648
- };
1649
- convert.rgb.hex = function(args) {
1650
- const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
1651
- const string = integer.toString(16).toUpperCase();
1652
- return "000000".substring(string.length) + string;
1653
- };
1654
- convert.hex.rgb = function(args) {
1655
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
1656
- if (!match) {
1657
- return [0, 0, 0];
1658
- }
1659
- let colorString = match[0];
1660
- if (match[0].length === 3) {
1661
- colorString = colorString.split("").map((char) => {
1662
- return char + char;
1663
- }).join("");
1664
- }
1665
- const integer = parseInt(colorString, 16);
1666
- const r = integer >> 16 & 255;
1667
- const g = integer >> 8 & 255;
1668
- const b = integer & 255;
1669
- return [r, g, b];
1670
- };
1671
- convert.rgb.hcg = function(rgb) {
1672
- const r = rgb[0] / 255;
1673
- const g = rgb[1] / 255;
1674
- const b = rgb[2] / 255;
1675
- const max = Math.max(Math.max(r, g), b);
1676
- const min = Math.min(Math.min(r, g), b);
1677
- const chroma = max - min;
1678
- let grayscale;
1679
- let hue;
1680
- if (chroma < 1) {
1681
- grayscale = min / (1 - chroma);
1682
- } else {
1683
- grayscale = 0;
1684
- }
1685
- if (chroma <= 0) {
1686
- hue = 0;
1687
- } else if (max === r) {
1688
- hue = (g - b) / chroma % 6;
1689
- } else if (max === g) {
1690
- hue = 2 + (b - r) / chroma;
1691
- } else {
1692
- hue = 4 + (r - g) / chroma;
1693
- }
1694
- hue /= 6;
1695
- hue %= 1;
1696
- return [hue * 360, chroma * 100, grayscale * 100];
1697
- };
1698
- convert.hsl.hcg = function(hsl) {
1699
- const s = hsl[1] / 100;
1700
- const l = hsl[2] / 100;
1701
- const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
1702
- let f = 0;
1703
- if (c < 1) {
1704
- f = (l - 0.5 * c) / (1 - c);
1705
- }
1706
- return [hsl[0], c * 100, f * 100];
1707
- };
1708
- convert.hsv.hcg = function(hsv) {
1709
- const s = hsv[1] / 100;
1710
- const v = hsv[2] / 100;
1711
- const c = s * v;
1712
- let f = 0;
1713
- if (c < 1) {
1714
- f = (v - c) / (1 - c);
1715
- }
1716
- return [hsv[0], c * 100, f * 100];
1717
- };
1718
- convert.hcg.rgb = function(hcg) {
1719
- const h = hcg[0] / 360;
1720
- const c = hcg[1] / 100;
1721
- const g = hcg[2] / 100;
1722
- if (c === 0) {
1723
- return [g * 255, g * 255, g * 255];
1724
- }
1725
- const pure = [0, 0, 0];
1726
- const hi = h % 1 * 6;
1727
- const v = hi % 1;
1728
- const w = 1 - v;
1729
- let mg = 0;
1730
- switch (Math.floor(hi)) {
1731
- case 0:
1732
- pure[0] = 1;
1733
- pure[1] = v;
1734
- pure[2] = 0;
1735
- break;
1736
- case 1:
1737
- pure[0] = w;
1738
- pure[1] = 1;
1739
- pure[2] = 0;
1740
- break;
1741
- case 2:
1742
- pure[0] = 0;
1743
- pure[1] = 1;
1744
- pure[2] = v;
1745
- break;
1746
- case 3:
1747
- pure[0] = 0;
1748
- pure[1] = w;
1749
- pure[2] = 1;
1750
- break;
1751
- case 4:
1752
- pure[0] = v;
1753
- pure[1] = 0;
1754
- pure[2] = 1;
1755
- break;
1756
- default:
1757
- pure[0] = 1;
1758
- pure[1] = 0;
1759
- pure[2] = w;
1760
- }
1761
- mg = (1 - c) * g;
1762
- return [
1763
- (c * pure[0] + mg) * 255,
1764
- (c * pure[1] + mg) * 255,
1765
- (c * pure[2] + mg) * 255
1766
- ];
1767
- };
1768
- convert.hcg.hsv = function(hcg) {
1769
- const c = hcg[1] / 100;
1770
- const g = hcg[2] / 100;
1771
- const v = c + g * (1 - c);
1772
- let f = 0;
1773
- if (v > 0) {
1774
- f = c / v;
1775
- }
1776
- return [hcg[0], f * 100, v * 100];
1777
- };
1778
- convert.hcg.hsl = function(hcg) {
1779
- const c = hcg[1] / 100;
1780
- const g = hcg[2] / 100;
1781
- const l = g * (1 - c) + 0.5 * c;
1782
- let s = 0;
1783
- if (l > 0 && l < 0.5) {
1784
- s = c / (2 * l);
1785
- } else if (l >= 0.5 && l < 1) {
1786
- s = c / (2 * (1 - l));
1787
- }
1788
- return [hcg[0], s * 100, l * 100];
1789
- };
1790
- convert.hcg.hwb = function(hcg) {
1791
- const c = hcg[1] / 100;
1792
- const g = hcg[2] / 100;
1793
- const v = c + g * (1 - c);
1794
- return [hcg[0], (v - c) * 100, (1 - v) * 100];
1795
- };
1796
- convert.hwb.hcg = function(hwb) {
1797
- const w = hwb[1] / 100;
1798
- const b = hwb[2] / 100;
1799
- const v = 1 - b;
1800
- const c = v - w;
1801
- let g = 0;
1802
- if (c < 1) {
1803
- g = (v - c) / (1 - c);
1804
- }
1805
- return [hwb[0], c * 100, g * 100];
1806
- };
1807
- convert.apple.rgb = function(apple) {
1808
- return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
1809
- };
1810
- convert.rgb.apple = function(rgb) {
1811
- return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
1812
- };
1813
- convert.gray.rgb = function(args) {
1814
- return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
1815
- };
1816
- convert.gray.hsl = function(args) {
1817
- return [0, 0, args[0]];
1818
- };
1819
- convert.gray.hsv = convert.gray.hsl;
1820
- convert.gray.hwb = function(gray) {
1821
- return [0, 100, gray[0]];
1822
- };
1823
- convert.gray.cmyk = function(gray) {
1824
- return [0, 0, 0, gray[0]];
1825
- };
1826
- convert.gray.lab = function(gray) {
1827
- return [gray[0], 0, 0];
1828
- };
1829
- convert.gray.hex = function(gray) {
1830
- const val = Math.round(gray[0] / 100 * 255) & 255;
1831
- const integer = (val << 16) + (val << 8) + val;
1832
- const string = integer.toString(16).toUpperCase();
1833
- return "000000".substring(string.length) + string;
1834
- };
1835
- convert.rgb.gray = function(rgb) {
1836
- const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
1837
- return [val / 255 * 100];
1838
- };
965
+ return 1;
966
+ }
967
+ var init_get_east_asian_width = __esm({
968
+ "node_modules/.pnpm/get-east-asian-width@1.3.0/node_modules/get-east-asian-width/index.js"() {
969
+ init_lookup();
970
+ __name(validate, "validate");
971
+ __name(eastAsianWidth, "eastAsianWidth");
1839
972
  }
1840
973
  });
1841
974
 
1842
- // node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js
1843
- var require_route = __commonJS({
1844
- "node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js"(exports2, module2) {
1845
- var conversions = require_conversions();
1846
- function buildGraph() {
1847
- const graph = {};
1848
- const models = Object.keys(conversions);
1849
- for (let len = models.length, i = 0; i < len; i++) {
1850
- graph[models[i]] = {
1851
- // http://jsperf.com/1-vs-infinity
1852
- // micro-opt, but this is simple.
1853
- distance: -1,
1854
- parent: null
1855
- };
1856
- }
1857
- return graph;
1858
- }
1859
- __name(buildGraph, "buildGraph");
1860
- function deriveBFS(fromModel) {
1861
- const graph = buildGraph();
1862
- const queue = [fromModel];
1863
- graph[fromModel].distance = 0;
1864
- while (queue.length) {
1865
- const current = queue.pop();
1866
- const adjacents = Object.keys(conversions[current]);
1867
- for (let len = adjacents.length, i = 0; i < len; i++) {
1868
- const adjacent = adjacents[i];
1869
- const node = graph[adjacent];
1870
- if (node.distance === -1) {
1871
- node.distance = graph[current].distance + 1;
1872
- node.parent = current;
1873
- queue.unshift(adjacent);
1874
- }
1875
- }
975
+ // node_modules/.pnpm/string-width@8.1.0/node_modules/string-width/index.js
976
+ function baseVisible(segment) {
977
+ return segment.replace(leadingNonPrintingRegex, "");
978
+ }
979
+ function isZeroWidthCluster(segment) {
980
+ return zeroWidthClusterRegex.test(segment);
981
+ }
982
+ function trailingHalfwidthWidth(segment, eastAsianWidthOptions) {
983
+ let extra = 0;
984
+ if (segment.length > 1) {
985
+ for (const char of segment.slice(1)) {
986
+ if (char >= "＀" && char <= "￯") {
987
+ extra += eastAsianWidth(char.codePointAt(0), eastAsianWidthOptions);
1876
988
  }
1877
- return graph;
1878
989
  }
1879
- __name(deriveBFS, "deriveBFS");
1880
- function link(from, to) {
1881
- return function(args) {
1882
- return to(from(args));
1883
- };
990
+ }
991
+ return extra;
992
+ }
993
+ function stringWidth(input, options = {}) {
994
+ if (typeof input !== "string" || input.length === 0) {
995
+ return 0;
996
+ }
997
+ const {
998
+ ambiguousIsNarrow = true,
999
+ countAnsiEscapeCodes = false
1000
+ } = options;
1001
+ let string = input;
1002
+ if (!countAnsiEscapeCodes) {
1003
+ string = stripAnsi(string);
1004
+ }
1005
+ if (string.length === 0) {
1006
+ return 0;
1007
+ }
1008
+ let width = 0;
1009
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
1010
+ for (const { segment } of segmenter.segment(string)) {
1011
+ if (isZeroWidthCluster(segment)) {
1012
+ continue;
1884
1013
  }
1885
- __name(link, "link");
1886
- function wrapConversion(toModel, graph) {
1887
- const path = [graph[toModel].parent, toModel];
1888
- let fn = conversions[graph[toModel].parent][toModel];
1889
- let cur = graph[toModel].parent;
1890
- while (graph[cur].parent) {
1891
- path.unshift(graph[cur].parent);
1892
- fn = link(conversions[graph[cur].parent][cur], fn);
1893
- cur = graph[cur].parent;
1894
- }
1895
- fn.conversion = path;
1896
- return fn;
1014
+ if (rgiEmojiRegex.test(segment)) {
1015
+ width += 2;
1016
+ continue;
1897
1017
  }
1898
- __name(wrapConversion, "wrapConversion");
1899
- module2.exports = function(fromModel) {
1900
- const graph = deriveBFS(fromModel);
1901
- const conversion = {};
1902
- const models = Object.keys(graph);
1903
- for (let len = models.length, i = 0; i < len; i++) {
1904
- const toModel = models[i];
1905
- const node = graph[toModel];
1906
- if (node.parent === null) {
1907
- continue;
1908
- }
1909
- conversion[toModel] = wrapConversion(toModel, graph);
1910
- }
1911
- return conversion;
1912
- };
1018
+ const codePoint = baseVisible(segment).codePointAt(0);
1019
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
1020
+ width += trailingHalfwidthWidth(segment, eastAsianWidthOptions);
1021
+ }
1022
+ return width;
1023
+ }
1024
+ var segmenter, zeroWidthClusterRegex, leadingNonPrintingRegex, rgiEmojiRegex;
1025
+ var init_string_width = __esm({
1026
+ "node_modules/.pnpm/string-width@8.1.0/node_modules/string-width/index.js"() {
1027
+ init_strip_ansi();
1028
+ init_get_east_asian_width();
1029
+ segmenter = new Intl.Segmenter();
1030
+ zeroWidthClusterRegex = new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Mark}|\\p{Surrogate})+$", "v");
1031
+ leadingNonPrintingRegex = new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+", "v");
1032
+ rgiEmojiRegex = new RegExp("^\\p{RGI_Emoji}$", "v");
1033
+ __name(baseVisible, "baseVisible");
1034
+ __name(isZeroWidthCluster, "isZeroWidthCluster");
1035
+ __name(trailingHalfwidthWidth, "trailingHalfwidthWidth");
1036
+ __name(stringWidth, "stringWidth");
1913
1037
  }
1914
1038
  });
1915
1039
 
1916
- // node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js
1917
- var require_color_convert = __commonJS({
1918
- "node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"(exports2, module2) {
1919
- var conversions = require_conversions();
1920
- var route = require_route();
1921
- var convert = {};
1922
- var models = Object.keys(conversions);
1923
- function wrapRaw(fn) {
1924
- const wrappedFn = /* @__PURE__ */ __name(function(...args) {
1925
- const arg0 = args[0];
1926
- if (arg0 === void 0 || arg0 === null) {
1927
- return arg0;
1928
- }
1929
- if (arg0.length > 1) {
1930
- args = arg0;
1931
- }
1932
- return fn(args);
1933
- }, "wrappedFn");
1934
- if ("conversion" in fn) {
1935
- wrappedFn.conversion = fn.conversion;
1936
- }
1937
- return wrappedFn;
1938
- }
1939
- __name(wrapRaw, "wrapRaw");
1940
- function wrapRounded(fn) {
1941
- const wrappedFn = /* @__PURE__ */ __name(function(...args) {
1942
- const arg0 = args[0];
1943
- if (arg0 === void 0 || arg0 === null) {
1944
- return arg0;
1945
- }
1946
- if (arg0.length > 1) {
1947
- args = arg0;
1948
- }
1949
- const result = fn(args);
1950
- if (typeof result === "object") {
1951
- for (let len = result.length, i = 0; i < len; i++) {
1952
- result[i] = Math.round(result[i]);
1953
- }
1954
- }
1955
- return result;
1956
- }, "wrappedFn");
1957
- if ("conversion" in fn) {
1958
- wrappedFn.conversion = fn.conversion;
1959
- }
1960
- return wrappedFn;
1040
+ // node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
1041
+ function assembleStyles() {
1042
+ const codes = /* @__PURE__ */ new Map();
1043
+ for (const [groupName, group] of Object.entries(styles)) {
1044
+ for (const [styleName, style] of Object.entries(group)) {
1045
+ styles[styleName] = {
1046
+ open: `\x1B[${style[0]}m`,
1047
+ close: `\x1B[${style[1]}m`
1048
+ };
1049
+ group[styleName] = styles[styleName];
1050
+ codes.set(style[0], style[1]);
1961
1051
  }
1962
- __name(wrapRounded, "wrapRounded");
1963
- models.forEach((fromModel) => {
1964
- convert[fromModel] = {};
1965
- Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
1966
- Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
1967
- const routes = route(fromModel);
1968
- const routeModels = Object.keys(routes);
1969
- routeModels.forEach((toModel) => {
1970
- const fn = routes[toModel];
1971
- convert[fromModel][toModel] = wrapRounded(fn);
1972
- convert[fromModel][toModel].raw = wrapRaw(fn);
1973
- });
1052
+ Object.defineProperty(styles, groupName, {
1053
+ value: group,
1054
+ enumerable: false
1974
1055
  });
1975
- module2.exports = convert;
1976
1056
  }
1977
- });
1978
-
1979
- // node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js
1980
- var require_ansi_styles = __commonJS({
1981
- "node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js"(exports2, module2) {
1982
- "use strict";
1983
- var wrapAnsi16 = /* @__PURE__ */ __name((fn, offset) => (...args) => {
1984
- const code = fn(...args);
1985
- return `\x1B[${code + offset}m`;
1986
- }, "wrapAnsi16");
1987
- var wrapAnsi256 = /* @__PURE__ */ __name((fn, offset) => (...args) => {
1988
- const code = fn(...args);
1989
- return `\x1B[${38 + offset};5;${code}m`;
1990
- }, "wrapAnsi256");
1991
- var wrapAnsi16m = /* @__PURE__ */ __name((fn, offset) => (...args) => {
1992
- const rgb = fn(...args);
1993
- return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
1994
- }, "wrapAnsi16m");
1995
- var ansi2ansi = /* @__PURE__ */ __name((n) => n, "ansi2ansi");
1996
- var rgb2rgb = /* @__PURE__ */ __name((r, g, b) => [r, g, b], "rgb2rgb");
1997
- var setLazyProperty = /* @__PURE__ */ __name((object, property, get) => {
1998
- Object.defineProperty(object, property, {
1999
- get: /* @__PURE__ */ __name(() => {
2000
- const value = get();
2001
- Object.defineProperty(object, property, {
2002
- value,
2003
- enumerable: true,
2004
- configurable: true
2005
- });
2006
- return value;
2007
- }, "get"),
2008
- enumerable: true,
2009
- configurable: true
2010
- });
2011
- }, "setLazyProperty");
2012
- var colorConvert;
2013
- var makeDynamicStyles = /* @__PURE__ */ __name((wrap, targetSpace, identity, isBackground) => {
2014
- if (colorConvert === void 0) {
2015
- colorConvert = require_color_convert();
2016
- }
2017
- const offset = isBackground ? 10 : 0;
2018
- const styles = {};
2019
- for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
2020
- const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
2021
- if (sourceSpace === targetSpace) {
2022
- styles[name] = wrap(identity, offset);
2023
- } else if (typeof suite === "object") {
2024
- styles[name] = wrap(suite[targetSpace], offset);
2025
- }
2026
- }
2027
- return styles;
2028
- }, "makeDynamicStyles");
2029
- function assembleStyles() {
2030
- const codes = /* @__PURE__ */ new Map();
2031
- const styles = {
2032
- modifier: {
2033
- reset: [0, 0],
2034
- // 21 isn't widely supported and 22 does the same thing
2035
- bold: [1, 22],
2036
- dim: [2, 22],
2037
- italic: [3, 23],
2038
- underline: [4, 24],
2039
- inverse: [7, 27],
2040
- hidden: [8, 28],
2041
- strikethrough: [9, 29]
2042
- },
2043
- color: {
2044
- black: [30, 39],
2045
- red: [31, 39],
2046
- green: [32, 39],
2047
- yellow: [33, 39],
2048
- blue: [34, 39],
2049
- magenta: [35, 39],
2050
- cyan: [36, 39],
2051
- white: [37, 39],
2052
- // Bright color
2053
- blackBright: [90, 39],
2054
- redBright: [91, 39],
2055
- greenBright: [92, 39],
2056
- yellowBright: [93, 39],
2057
- blueBright: [94, 39],
2058
- magentaBright: [95, 39],
2059
- cyanBright: [96, 39],
2060
- whiteBright: [97, 39]
2061
- },
2062
- bgColor: {
2063
- bgBlack: [40, 49],
2064
- bgRed: [41, 49],
2065
- bgGreen: [42, 49],
2066
- bgYellow: [43, 49],
2067
- bgBlue: [44, 49],
2068
- bgMagenta: [45, 49],
2069
- bgCyan: [46, 49],
2070
- bgWhite: [47, 49],
2071
- // Bright color
2072
- bgBlackBright: [100, 49],
2073
- bgRedBright: [101, 49],
2074
- bgGreenBright: [102, 49],
2075
- bgYellowBright: [103, 49],
2076
- bgBlueBright: [104, 49],
2077
- bgMagentaBright: [105, 49],
2078
- bgCyanBright: [106, 49],
2079
- bgWhiteBright: [107, 49]
1057
+ Object.defineProperty(styles, "codes", {
1058
+ value: codes,
1059
+ enumerable: false
1060
+ });
1061
+ styles.color.close = "\x1B[39m";
1062
+ styles.bgColor.close = "\x1B[49m";
1063
+ styles.color.ansi = wrapAnsi16();
1064
+ styles.color.ansi256 = wrapAnsi256();
1065
+ styles.color.ansi16m = wrapAnsi16m();
1066
+ styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
1067
+ styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
1068
+ styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
1069
+ Object.defineProperties(styles, {
1070
+ rgbToAnsi256: {
1071
+ value(red, green, blue) {
1072
+ if (red === green && green === blue) {
1073
+ if (red < 8) {
1074
+ return 16;
1075
+ }
1076
+ if (red > 248) {
1077
+ return 231;
1078
+ }
1079
+ return Math.round((red - 8) / 247 * 24) + 232;
2080
1080
  }
2081
- };
2082
- styles.color.gray = styles.color.blackBright;
2083
- styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
2084
- styles.color.grey = styles.color.blackBright;
2085
- styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
2086
- for (const [groupName, group] of Object.entries(styles)) {
2087
- for (const [styleName, style] of Object.entries(group)) {
2088
- styles[styleName] = {
2089
- open: `\x1B[${style[0]}m`,
2090
- close: `\x1B[${style[1]}m`
2091
- };
2092
- group[styleName] = styles[styleName];
2093
- codes.set(style[0], style[1]);
1081
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
1082
+ },
1083
+ enumerable: false
1084
+ },
1085
+ hexToRgb: {
1086
+ value(hex) {
1087
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
1088
+ if (!matches) {
1089
+ return [0, 0, 0];
1090
+ }
1091
+ let [colorString] = matches;
1092
+ if (colorString.length === 3) {
1093
+ colorString = [...colorString].map((character) => character + character).join("");
1094
+ }
1095
+ const integer = Number.parseInt(colorString, 16);
1096
+ return [
1097
+ /* eslint-disable no-bitwise */
1098
+ integer >> 16 & 255,
1099
+ integer >> 8 & 255,
1100
+ integer & 255
1101
+ /* eslint-enable no-bitwise */
1102
+ ];
1103
+ },
1104
+ enumerable: false
1105
+ },
1106
+ hexToAnsi256: {
1107
+ value: /* @__PURE__ */ __name((hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)), "value"),
1108
+ enumerable: false
1109
+ },
1110
+ ansi256ToAnsi: {
1111
+ value(code) {
1112
+ if (code < 8) {
1113
+ return 30 + code;
1114
+ }
1115
+ if (code < 16) {
1116
+ return 90 + (code - 8);
1117
+ }
1118
+ let red;
1119
+ let green;
1120
+ let blue;
1121
+ if (code >= 232) {
1122
+ red = ((code - 232) * 10 + 8) / 255;
1123
+ green = red;
1124
+ blue = red;
1125
+ } else {
1126
+ code -= 16;
1127
+ const remainder = code % 36;
1128
+ red = Math.floor(code / 36) / 5;
1129
+ green = Math.floor(remainder / 6) / 5;
1130
+ blue = remainder % 6 / 5;
2094
1131
  }
2095
- Object.defineProperty(styles, groupName, {
2096
- value: group,
2097
- enumerable: false
2098
- });
2099
- }
2100
- Object.defineProperty(styles, "codes", {
2101
- value: codes,
2102
- enumerable: false
2103
- });
2104
- styles.color.close = "\x1B[39m";
2105
- styles.bgColor.close = "\x1B[49m";
2106
- setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
2107
- setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
2108
- setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
2109
- setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
2110
- setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
2111
- setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
2112
- return styles;
1132
+ const value = Math.max(red, green, blue) * 2;
1133
+ if (value === 0) {
1134
+ return 30;
1135
+ }
1136
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
1137
+ if (value === 2) {
1138
+ result += 60;
1139
+ }
1140
+ return result;
1141
+ },
1142
+ enumerable: false
1143
+ },
1144
+ rgbToAnsi: {
1145
+ value: /* @__PURE__ */ __name((red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), "value"),
1146
+ enumerable: false
1147
+ },
1148
+ hexToAnsi: {
1149
+ value: /* @__PURE__ */ __name((hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), "value"),
1150
+ enumerable: false
2113
1151
  }
1152
+ });
1153
+ return styles;
1154
+ }
1155
+ var ANSI_BACKGROUND_OFFSET, wrapAnsi16, wrapAnsi256, wrapAnsi16m, styles, modifierNames, foregroundColorNames, backgroundColorNames, colorNames, ansiStyles, ansi_styles_default;
1156
+ var init_ansi_styles = __esm({
1157
+ "node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js"() {
1158
+ ANSI_BACKGROUND_OFFSET = 10;
1159
+ wrapAnsi16 = /* @__PURE__ */ __name((offset = 0) => (code) => `\x1B[${code + offset}m`, "wrapAnsi16");
1160
+ wrapAnsi256 = /* @__PURE__ */ __name((offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, "wrapAnsi256");
1161
+ wrapAnsi16m = /* @__PURE__ */ __name((offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`, "wrapAnsi16m");
1162
+ styles = {
1163
+ modifier: {
1164
+ reset: [0, 0],
1165
+ // 21 isn't widely supported and 22 does the same thing
1166
+ bold: [1, 22],
1167
+ dim: [2, 22],
1168
+ italic: [3, 23],
1169
+ underline: [4, 24],
1170
+ overline: [53, 55],
1171
+ inverse: [7, 27],
1172
+ hidden: [8, 28],
1173
+ strikethrough: [9, 29]
1174
+ },
1175
+ color: {
1176
+ black: [30, 39],
1177
+ red: [31, 39],
1178
+ green: [32, 39],
1179
+ yellow: [33, 39],
1180
+ blue: [34, 39],
1181
+ magenta: [35, 39],
1182
+ cyan: [36, 39],
1183
+ white: [37, 39],
1184
+ // Bright color
1185
+ blackBright: [90, 39],
1186
+ gray: [90, 39],
1187
+ // Alias of `blackBright`
1188
+ grey: [90, 39],
1189
+ // Alias of `blackBright`
1190
+ redBright: [91, 39],
1191
+ greenBright: [92, 39],
1192
+ yellowBright: [93, 39],
1193
+ blueBright: [94, 39],
1194
+ magentaBright: [95, 39],
1195
+ cyanBright: [96, 39],
1196
+ whiteBright: [97, 39]
1197
+ },
1198
+ bgColor: {
1199
+ bgBlack: [40, 49],
1200
+ bgRed: [41, 49],
1201
+ bgGreen: [42, 49],
1202
+ bgYellow: [43, 49],
1203
+ bgBlue: [44, 49],
1204
+ bgMagenta: [45, 49],
1205
+ bgCyan: [46, 49],
1206
+ bgWhite: [47, 49],
1207
+ // Bright color
1208
+ bgBlackBright: [100, 49],
1209
+ bgGray: [100, 49],
1210
+ // Alias of `bgBlackBright`
1211
+ bgGrey: [100, 49],
1212
+ // Alias of `bgBlackBright`
1213
+ bgRedBright: [101, 49],
1214
+ bgGreenBright: [102, 49],
1215
+ bgYellowBright: [103, 49],
1216
+ bgBlueBright: [104, 49],
1217
+ bgMagentaBright: [105, 49],
1218
+ bgCyanBright: [106, 49],
1219
+ bgWhiteBright: [107, 49]
1220
+ }
1221
+ };
1222
+ modifierNames = Object.keys(styles.modifier);
1223
+ foregroundColorNames = Object.keys(styles.color);
1224
+ backgroundColorNames = Object.keys(styles.bgColor);
1225
+ colorNames = [...foregroundColorNames, ...backgroundColorNames];
2114
1226
  __name(assembleStyles, "assembleStyles");
2115
- Object.defineProperty(module2, "exports", {
2116
- enumerable: true,
2117
- get: assembleStyles
2118
- });
1227
+ ansiStyles = assembleStyles();
1228
+ ansi_styles_default = ansiStyles;
2119
1229
  }
2120
1230
  });
2121
1231
 
2122
- // node_modules/.pnpm/wrap-ansi@6.2.0/node_modules/wrap-ansi/index.js
2123
- var require_wrap_ansi = __commonJS({
2124
- "node_modules/.pnpm/wrap-ansi@6.2.0/node_modules/wrap-ansi/index.js"(exports2, module2) {
2125
- "use strict";
2126
- var stringWidth = require_string_width();
2127
- var stripAnsi = require_strip_ansi();
2128
- var ansiStyles = require_ansi_styles();
2129
- var ESCAPES = /* @__PURE__ */ new Set([
1232
+ // node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js
1233
+ var wrap_ansi_exports = {};
1234
+ __export(wrap_ansi_exports, {
1235
+ default: () => wrapAnsi
1236
+ });
1237
+ function wrapAnsi(string, columns, options) {
1238
+ return String(string).normalize().replaceAll("\r\n", "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
1239
+ }
1240
+ var ESCAPES, END_CODE, ANSI_ESCAPE_BELL, ANSI_CSI, ANSI_OSC, ANSI_SGR_TERMINATOR, ANSI_ESCAPE_LINK, wrapAnsiCode, wrapAnsiHyperlink, wordLengths, wrapWord, stringVisibleTrimSpacesRight, exec;
1241
+ var init_wrap_ansi = __esm({
1242
+ "node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js"() {
1243
+ init_string_width();
1244
+ init_strip_ansi();
1245
+ init_ansi_styles();
1246
+ ESCAPES = /* @__PURE__ */ new Set([
2130
1247
  "\x1B",
2131
1248
  "›"
2132
1249
  ]);
2133
- var END_CODE = 39;
2134
- var wrapAnsi = /* @__PURE__ */ __name((code) => `${ESCAPES.values().next().value}[${code}m`, "wrapAnsi");
2135
- var wordLengths = /* @__PURE__ */ __name((string) => string.split(" ").map((character) => stringWidth(character)), "wordLengths");
2136
- var wrapWord = /* @__PURE__ */ __name((rows, word, columns) => {
1250
+ END_CODE = 39;
1251
+ ANSI_ESCAPE_BELL = "\x07";
1252
+ ANSI_CSI = "[";
1253
+ ANSI_OSC = "]";
1254
+ ANSI_SGR_TERMINATOR = "m";
1255
+ ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
1256
+ wrapAnsiCode = /* @__PURE__ */ __name((code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`, "wrapAnsiCode");
1257
+ wrapAnsiHyperlink = /* @__PURE__ */ __name((url) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`, "wrapAnsiHyperlink");
1258
+ wordLengths = /* @__PURE__ */ __name((string) => string.split(" ").map((character) => stringWidth(character)), "wordLengths");
1259
+ wrapWord = /* @__PURE__ */ __name((rows, word, columns) => {
2137
1260
  const characters = [...word];
2138
1261
  let isInsideEscape = false;
2139
- let visible = stringWidth(stripAnsi(rows[rows.length - 1]));
1262
+ let isInsideLinkEscape = false;
1263
+ let visible = stringWidth(stripAnsi(rows.at(-1)));
2140
1264
  for (const [index, character] of characters.entries()) {
2141
1265
  const characterLength = stringWidth(character);
2142
1266
  if (visible + characterLength <= columns) {
@@ -2147,11 +1271,18 @@ var require_wrap_ansi = __commonJS({
2147
1271
  }
2148
1272
  if (ESCAPES.has(character)) {
2149
1273
  isInsideEscape = true;
2150
- } else if (isInsideEscape && character === "m") {
2151
- isInsideEscape = false;
2152
- continue;
1274
+ const ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join("");
1275
+ isInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;
2153
1276
  }
2154
1277
  if (isInsideEscape) {
1278
+ if (isInsideLinkEscape) {
1279
+ if (character === ANSI_ESCAPE_BELL) {
1280
+ isInsideEscape = false;
1281
+ isInsideLinkEscape = false;
1282
+ }
1283
+ } else if (character === ANSI_SGR_TERMINATOR) {
1284
+ isInsideEscape = false;
1285
+ }
2155
1286
  continue;
2156
1287
  }
2157
1288
  visible += characterLength;
@@ -2160,12 +1291,12 @@ var require_wrap_ansi = __commonJS({
2160
1291
  visible = 0;
2161
1292
  }
2162
1293
  }
2163
- if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
1294
+ if (!visible && rows.at(-1).length > 0 && rows.length > 1) {
2164
1295
  rows[rows.length - 2] += rows.pop();
2165
1296
  }
2166
1297
  }, "wrapWord");
2167
- var stringVisibleTrimSpacesRight = /* @__PURE__ */ __name((str) => {
2168
- const words = str.split(" ");
1298
+ stringVisibleTrimSpacesRight = /* @__PURE__ */ __name((string) => {
1299
+ const words = string.split(" ");
2169
1300
  let last = words.length;
2170
1301
  while (last > 0) {
2171
1302
  if (stringWidth(words[last - 1]) > 0) {
@@ -2174,24 +1305,24 @@ var require_wrap_ansi = __commonJS({
2174
1305
  last--;
2175
1306
  }
2176
1307
  if (last === words.length) {
2177
- return str;
1308
+ return string;
2178
1309
  }
2179
1310
  return words.slice(0, last).join(" ") + words.slice(last).join("");
2180
1311
  }, "stringVisibleTrimSpacesRight");
2181
- var exec = /* @__PURE__ */ __name((string, columns, options = {}) => {
1312
+ exec = /* @__PURE__ */ __name((string, columns, options = {}) => {
2182
1313
  if (options.trim !== false && string.trim() === "") {
2183
1314
  return "";
2184
1315
  }
2185
- let pre = "";
2186
- let ret = "";
1316
+ let returnValue = "";
2187
1317
  let escapeCode;
1318
+ let escapeUrl;
2188
1319
  const lengths = wordLengths(string);
2189
1320
  let rows = [""];
2190
1321
  for (const [index, word] of string.split(" ").entries()) {
2191
1322
  if (options.trim !== false) {
2192
- rows[rows.length - 1] = rows[rows.length - 1].trimLeft();
1323
+ rows[rows.length - 1] = rows.at(-1).trimStart();
2193
1324
  }
2194
- let rowLength = stringWidth(rows[rows.length - 1]);
1325
+ let rowLength = stringWidth(rows.at(-1));
2195
1326
  if (index !== 0) {
2196
1327
  if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
2197
1328
  rows.push("");
@@ -2226,29 +1357,43 @@ var require_wrap_ansi = __commonJS({
2226
1357
  rows[rows.length - 1] += word;
2227
1358
  }
2228
1359
  if (options.trim !== false) {
2229
- rows = rows.map(stringVisibleTrimSpacesRight);
1360
+ rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
2230
1361
  }
2231
- pre = rows.join("\n");
2232
- for (const [index, character] of [...pre].entries()) {
2233
- ret += character;
1362
+ const preString = rows.join("\n");
1363
+ const pre = [...preString];
1364
+ let preStringIndex = 0;
1365
+ for (const [index, character] of pre.entries()) {
1366
+ returnValue += character;
2234
1367
  if (ESCAPES.has(character)) {
2235
- const code2 = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4)));
2236
- escapeCode = code2 === END_CODE ? null : code2;
2237
- }
2238
- const code = ansiStyles.codes.get(Number(escapeCode));
2239
- if (escapeCode && code) {
2240
- if (pre[index + 1] === "\n") {
2241
- ret += wrapAnsi(code);
2242
- } else if (character === "\n") {
2243
- ret += wrapAnsi(escapeCode);
1368
+ const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || { groups: {} };
1369
+ if (groups.code !== void 0) {
1370
+ const code2 = Number.parseFloat(groups.code);
1371
+ escapeCode = code2 === END_CODE ? void 0 : code2;
1372
+ } else if (groups.uri !== void 0) {
1373
+ escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
1374
+ }
1375
+ }
1376
+ const code = ansi_styles_default.codes.get(Number(escapeCode));
1377
+ if (pre[index + 1] === "\n") {
1378
+ if (escapeUrl) {
1379
+ returnValue += wrapAnsiHyperlink("");
1380
+ }
1381
+ if (escapeCode && code) {
1382
+ returnValue += wrapAnsiCode(code);
1383
+ }
1384
+ } else if (character === "\n") {
1385
+ if (escapeCode && code) {
1386
+ returnValue += wrapAnsiCode(escapeCode);
1387
+ }
1388
+ if (escapeUrl) {
1389
+ returnValue += wrapAnsiHyperlink(escapeUrl);
2244
1390
  }
2245
1391
  }
1392
+ preStringIndex += character.length;
2246
1393
  }
2247
- return ret;
1394
+ return returnValue;
2248
1395
  }, "exec");
2249
- module2.exports = (string, columns, options) => {
2250
- return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
2251
- };
1396
+ __name(wrapAnsi, "wrapAnsi");
2252
1397
  }
2253
1398
  });
2254
1399
 
@@ -2263,7 +1408,7 @@ var require_utils = __commonJS({
2263
1408
  exports2.breakLines = breakLines;
2264
1409
  exports2.readlineWidth = readlineWidth;
2265
1410
  var cli_width_1 = __importDefault(require_cli_width());
2266
- var wrap_ansi_1 = __importDefault(require_wrap_ansi());
1411
+ var wrap_ansi_1 = __importDefault((init_wrap_ansi(), __toCommonJS(wrap_ansi_exports)));
2267
1412
  var hook_engine_ts_1 = require_hook_engine();
2268
1413
  function breakLines(content, width) {
2269
1414
  return content.split("\n").flatMap((line) => (0, wrap_ansi_1.default)(line, width, { trim: false, hard: true }).split("\n").map((str) => str.trimEnd())).join("\n");
@@ -3305,7 +2450,7 @@ var require_commonjs4 = __commonJS({
3305
2450
  var core_1 = require_commonjs3();
3306
2451
  var ansi_escapes_1 = __importDefault(require_ansi_escapes());
3307
2452
  exports2.default = (0, core_1.createPrompt)((config, done) => {
3308
- const { validate = /* @__PURE__ */ __name(() => true, "validate") } = config;
2453
+ const { validate: validate2 = /* @__PURE__ */ __name(() => true, "validate") } = config;
3309
2454
  const theme = (0, core_1.makeTheme)(config.theme);
3310
2455
  const [status, setStatus] = (0, core_1.useState)("idle");
3311
2456
  const [errorMsg, setError] = (0, core_1.useState)();
@@ -3318,7 +2463,7 @@ var require_commonjs4 = __commonJS({
3318
2463
  if ((0, core_1.isEnterKey)(key)) {
3319
2464
  const answer = value;
3320
2465
  setStatus("loading");
3321
- const isValid = await validate(answer);
2466
+ const isValid = await validate2(answer);
3322
2467
  if (isValid === true) {
3323
2468
  setValue(answer);
3324
2469
  setStatus("done");