toiljs 0.0.139 → 0.0.141

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.
@@ -29,62 +29,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
  mod
30
30
  ));
31
31
 
32
- // node_modules/sisteransi/src/index.js
33
- var require_src = __commonJS({
34
- "node_modules/sisteransi/src/index.js"(exports, module) {
35
- "use strict";
36
- var ESC2 = "\x1B";
37
- var CSI2 = `${ESC2}[`;
38
- var beep = "\x07";
39
- var cursor3 = {
40
- to(x, y2) {
41
- if (!y2) return `${CSI2}${x + 1}G`;
42
- return `${CSI2}${y2 + 1};${x + 1}H`;
43
- },
44
- move(x, y2) {
45
- let ret = "";
46
- if (x < 0) ret += `${CSI2}${-x}D`;
47
- else if (x > 0) ret += `${CSI2}${x}C`;
48
- if (y2 < 0) ret += `${CSI2}${-y2}A`;
49
- else if (y2 > 0) ret += `${CSI2}${y2}B`;
50
- return ret;
51
- },
52
- up: (count = 1) => `${CSI2}${count}A`,
53
- down: (count = 1) => `${CSI2}${count}B`,
54
- forward: (count = 1) => `${CSI2}${count}C`,
55
- backward: (count = 1) => `${CSI2}${count}D`,
56
- nextLine: (count = 1) => `${CSI2}E`.repeat(count),
57
- prevLine: (count = 1) => `${CSI2}F`.repeat(count),
58
- left: `${CSI2}G`,
59
- hide: `${CSI2}?25l`,
60
- show: `${CSI2}?25h`,
61
- save: `${ESC2}7`,
62
- restore: `${ESC2}8`
63
- };
64
- var scroll = {
65
- up: (count = 1) => `${CSI2}S`.repeat(count),
66
- down: (count = 1) => `${CSI2}T`.repeat(count)
67
- };
68
- var erase3 = {
69
- screen: `${CSI2}2J`,
70
- up: (count = 1) => `${CSI2}1J`.repeat(count),
71
- down: (count = 1) => `${CSI2}J`.repeat(count),
72
- line: `${CSI2}2K`,
73
- lineEnd: `${CSI2}K`,
74
- lineStart: `${CSI2}1K`,
75
- lines(count) {
76
- let clear = "";
77
- for (let i2 = 0; i2 < count; i2++)
78
- clear += this.line + (i2 < count - 1 ? cursor3.up() : "");
79
- if (count)
80
- clear += cursor3.left;
81
- return clear;
82
- }
83
- };
84
- module.exports = { cursor: cursor3, scroll, erase: erase3, beep };
85
- }
86
- });
87
-
88
32
  // node_modules/picocolors/picocolors.js
89
33
  var require_picocolors = __commonJS({
90
34
  "node_modules/picocolors/picocolors.js"(exports, module) {
@@ -97,13 +41,13 @@ var require_picocolors = __commonJS({
97
41
  return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
98
42
  };
99
43
  var replaceClose = (string, close, replace, index) => {
100
- let result = "", cursor3 = 0;
44
+ let result = "", cursor2 = 0;
101
45
  do {
102
- result += string.substring(cursor3, index) + replace;
103
- cursor3 = index + close.length;
104
- index = string.indexOf(close, cursor3);
46
+ result += string.substring(cursor2, index) + replace;
47
+ cursor2 = index + close.length;
48
+ index = string.indexOf(close, cursor2);
105
49
  } while (~index);
106
- return result + string.substring(cursor3);
50
+ return result + string.substring(cursor2);
107
51
  };
108
52
  var createColors = (enabled = isColorSupported) => {
109
53
  let f = enabled ? formatter : () => String;
@@ -167,6 +111,33 @@ var require_constants = __commonJS({
167
111
  9007199254740991;
168
112
  var MAX_SAFE_COMPONENT_LENGTH = 16;
169
113
  var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
114
+ var WHITESPACE_CHARACTERS = [
115
+ " ",
116
+ "\n",
117
+ "\v",
118
+ "\f",
119
+ "\r",
120
+ " ",
121
+ "\xA0",
122
+ "\u1680",
123
+ "\u2000",
124
+ "\u2001",
125
+ "\u2002",
126
+ "\u2003",
127
+ "\u2004",
128
+ "\u2005",
129
+ "\u2006",
130
+ "\u2007",
131
+ "\u2008",
132
+ "\u2009",
133
+ "\u200A",
134
+ "\u2028",
135
+ "\u2029",
136
+ "\u202F",
137
+ "\u205F",
138
+ "\u3000",
139
+ "\uFEFF"
140
+ ];
170
141
  var RELEASE_TYPES = [
171
142
  "major",
172
143
  "premajor",
@@ -181,6 +152,7 @@ var require_constants = __commonJS({
181
152
  MAX_SAFE_COMPONENT_LENGTH,
182
153
  MAX_SAFE_BUILD_LENGTH,
183
154
  MAX_SAFE_INTEGER,
155
+ WHITESPACE_CHARACTERS,
184
156
  RELEASE_TYPES,
185
157
  SEMVER_SPEC_VERSION,
186
158
  FLAG_INCLUDE_PRERELEASE: 1,
@@ -1081,6 +1053,197 @@ var require_lrucache = __commonJS({
1081
1053
  }
1082
1054
  });
1083
1055
 
1056
+ // node_modules/semver/internal/trim-comparator-whitespace.js
1057
+ var require_trim_comparator_whitespace = __commonJS({
1058
+ "node_modules/semver/internal/trim-comparator-whitespace.js"(exports, module) {
1059
+ "use strict";
1060
+ var {
1061
+ MAX_LENGTH,
1062
+ MAX_SAFE_BUILD_LENGTH,
1063
+ WHITESPACE_CHARACTERS
1064
+ } = require_constants();
1065
+ var whitespace = new Uint8Array(65536);
1066
+ for (const char of WHITESPACE_CHARACTERS) {
1067
+ whitespace[char.charCodeAt(0)] = 1;
1068
+ }
1069
+ var isWhitespace = (char) => char !== void 0 && whitespace[char.charCodeAt(0)] === 1;
1070
+ var isVersionPrefix = (char) => char === "v" || char === "=" || isWhitespace(char);
1071
+ var isDigit = (char) => char !== void 0 && char >= "0" && char <= "9";
1072
+ var isLetter = (char) => char !== void 0 && (char >= "a" && char <= "z" || char >= "A" && char <= "Z");
1073
+ var isIdentifierCharacter = (char) => isDigit(char) || isLetter(char) || char === "-";
1074
+ var isVersionStart = (char) => isDigit(char) || char === "x" || char === "X" || char === "*";
1075
+ var findDigitsEndIndex = (range, start2, limit, digitRuns) => {
1076
+ if (!isDigit(range[start2])) {
1077
+ return start2;
1078
+ }
1079
+ if (start2 >= digitRuns.start && start2 < digitRuns.end) {
1080
+ return Math.min(start2 + limit, digitRuns.end);
1081
+ }
1082
+ if (start2 >= digitRuns.previousStart && start2 < digitRuns.previousEnd) {
1083
+ return Math.min(start2 + limit, digitRuns.previousEnd);
1084
+ }
1085
+ let end = start2 + 1;
1086
+ while (isDigit(range[end])) {
1087
+ end++;
1088
+ }
1089
+ digitRuns.previousStart = digitRuns.start;
1090
+ digitRuns.previousEnd = digitRuns.end;
1091
+ digitRuns.start = start2;
1092
+ digitRuns.end = end;
1093
+ return Math.min(start2 + limit, end);
1094
+ };
1095
+ var findVersionNumberEndIndex = (range, start2, loose, digitRuns) => {
1096
+ if (!loose && range[start2] === "0") {
1097
+ return start2 + 1;
1098
+ }
1099
+ return findDigitsEndIndex(range, start2, loose ? MAX_LENGTH : MAX_LENGTH + 1, digitRuns);
1100
+ };
1101
+ var findPrereleaseIdentifierEndIndex = (range, start2, loose, digitRuns) => {
1102
+ const digitsEnd = findDigitsEndIndex(range, start2, MAX_LENGTH, digitRuns);
1103
+ if (isLetter(range[digitsEnd]) || range[digitsEnd] === "-") {
1104
+ let end = digitsEnd + 1;
1105
+ const limit = end + MAX_SAFE_BUILD_LENGTH;
1106
+ while (end < limit && isIdentifierCharacter(range[end])) {
1107
+ end++;
1108
+ }
1109
+ return end;
1110
+ }
1111
+ return findVersionNumberEndIndex(range, start2, loose, digitRuns);
1112
+ };
1113
+ var findPrereleaseEndIndex = (range, start2, loose, digitRuns) => {
1114
+ const hyphen = range[start2] === "-";
1115
+ if (!loose && !hyphen) {
1116
+ return start2;
1117
+ }
1118
+ const identifierStart = start2 + (hyphen ? 1 : 0);
1119
+ let end = findPrereleaseIdentifierEndIndex(range, identifierStart, loose, digitRuns);
1120
+ if (end === identifierStart) {
1121
+ if (!loose || !hyphen) {
1122
+ return start2;
1123
+ }
1124
+ end = findPrereleaseIdentifierEndIndex(range, start2, loose, digitRuns);
1125
+ }
1126
+ while (range[end] === ".") {
1127
+ const next = findPrereleaseIdentifierEndIndex(range, end + 1, loose, digitRuns);
1128
+ if (next === end + 1) {
1129
+ break;
1130
+ }
1131
+ end = next;
1132
+ }
1133
+ return end;
1134
+ };
1135
+ var findBuildIdentifierEndIndex = (range, start2) => {
1136
+ let end = start2;
1137
+ while (end - start2 < MAX_SAFE_BUILD_LENGTH && isIdentifierCharacter(range[end])) {
1138
+ end++;
1139
+ }
1140
+ return end;
1141
+ };
1142
+ var findBuildEndIndex = (range, start2) => {
1143
+ if (range[start2] !== "+") {
1144
+ return start2;
1145
+ }
1146
+ let end = findBuildIdentifierEndIndex(range, start2 + 1);
1147
+ if (end === start2 + 1) {
1148
+ return start2;
1149
+ }
1150
+ while (range[end] === ".") {
1151
+ const next = findBuildIdentifierEndIndex(range, end + 1);
1152
+ if (next === end + 1) {
1153
+ break;
1154
+ }
1155
+ end = next;
1156
+ }
1157
+ return end;
1158
+ };
1159
+ var findLooseFullVersionEndIndex = (range, start2, digitRuns) => {
1160
+ let end = start2;
1161
+ for (let component = 0; component < 3; component++) {
1162
+ const next = findVersionNumberEndIndex(range, end, true, digitRuns);
1163
+ if (next === end) {
1164
+ return start2;
1165
+ }
1166
+ end = next;
1167
+ if (component < 2) {
1168
+ if (range[end] !== ".") {
1169
+ return start2;
1170
+ }
1171
+ end++;
1172
+ }
1173
+ }
1174
+ const prereleaseEnd = findPrereleaseEndIndex(range, end, true, digitRuns);
1175
+ return findBuildEndIndex(range, prereleaseEnd);
1176
+ };
1177
+ var findPartialVersionComponentEndIndex = (range, start2, digitRuns) => {
1178
+ if (isDigit(range[start2])) {
1179
+ return findVersionNumberEndIndex(range, start2, false, digitRuns);
1180
+ }
1181
+ return isVersionStart(range[start2]) ? start2 + 1 : start2;
1182
+ };
1183
+ var findPartialVersionEndIndex = (range, start2, digitRuns) => {
1184
+ let end = findPartialVersionComponentEndIndex(range, start2, digitRuns);
1185
+ for (let component = 0; component < 2; component++) {
1186
+ if (range[end] !== ".") {
1187
+ return end;
1188
+ }
1189
+ const next = findPartialVersionComponentEndIndex(range, end + 1, digitRuns);
1190
+ if (next === end + 1) {
1191
+ return end;
1192
+ }
1193
+ end = next;
1194
+ }
1195
+ const prereleaseEnd = findPrereleaseEndIndex(range, end, false, digitRuns);
1196
+ return findBuildEndIndex(range, prereleaseEnd);
1197
+ };
1198
+ var findVersionEndIndex = (range, start2, digitRuns) => {
1199
+ const fullVersionEnd = findLooseFullVersionEndIndex(range, start2, digitRuns);
1200
+ return fullVersionEnd !== start2 ? fullVersionEnd : findPartialVersionEndIndex(range, start2, digitRuns);
1201
+ };
1202
+ var findRemovableWhitespaceIndex = (range, matchStart) => {
1203
+ let position = matchStart;
1204
+ if (isWhitespace(range[position])) {
1205
+ position++;
1206
+ }
1207
+ if (range[position] === "<" || range[position] === ">") {
1208
+ position++;
1209
+ }
1210
+ if (range[position] === "=") {
1211
+ position++;
1212
+ }
1213
+ return isWhitespace(range[position]) ? position : -1;
1214
+ };
1215
+ var trimComparatorWhitespace = (range) => {
1216
+ let result = "";
1217
+ let copyFrom = 0;
1218
+ let cursor2 = 0;
1219
+ const digitRuns = { start: -1, end: -1, previousStart: -1, previousEnd: -1 };
1220
+ while (cursor2 < range.length) {
1221
+ const matchStart = cursor2;
1222
+ if (range[cursor2] === "<" || range[cursor2] === ">") {
1223
+ cursor2++;
1224
+ } else if (!isVersionPrefix(range[cursor2]) && !isVersionStart(range[cursor2])) {
1225
+ cursor2++;
1226
+ continue;
1227
+ }
1228
+ while (cursor2 < range.length && isVersionPrefix(range[cursor2])) {
1229
+ cursor2++;
1230
+ }
1231
+ if (!isVersionStart(range[cursor2])) {
1232
+ continue;
1233
+ }
1234
+ const whitespacePosition = findRemovableWhitespaceIndex(range, matchStart);
1235
+ if (whitespacePosition !== -1) {
1236
+ result += range.slice(copyFrom, whitespacePosition);
1237
+ copyFrom = whitespacePosition + 1;
1238
+ }
1239
+ cursor2 = findVersionEndIndex(range, cursor2, digitRuns);
1240
+ }
1241
+ return result + range.slice(copyFrom);
1242
+ };
1243
+ module.exports = trimComparatorWhitespace;
1244
+ }
1245
+ });
1246
+
1084
1247
  // node_modules/semver/classes/range.js
1085
1248
  var require_range = __commonJS({
1086
1249
  "node_modules/semver/classes/range.js"(exports, module) {
@@ -1106,19 +1269,19 @@ var require_range = __commonJS({
1106
1269
  this.loose = !!options.loose;
1107
1270
  this.includePrerelease = !!options.includePrerelease;
1108
1271
  this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
1109
- this.set = this.raw.split("||").map((r2) => this.parseRange(r2.trim())).filter((c2) => c2.length);
1272
+ this.set = this.raw.split("||").map((r2) => this.parseRange(r2.trim())).filter((c3) => c3.length);
1110
1273
  if (!this.set.length) {
1111
1274
  throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
1112
1275
  }
1113
1276
  if (this.set.length > 1) {
1114
1277
  const first = this.set[0];
1115
- this.set = this.set.filter((c2) => !isNullSet(c2[0]));
1278
+ this.set = this.set.filter((c3) => !isNullSet(c3[0]));
1116
1279
  if (this.set.length === 0) {
1117
1280
  this.set = [first];
1118
1281
  } else if (this.set.length > 1) {
1119
- for (const c2 of this.set) {
1120
- if (c2.length === 1 && isAny(c2[0])) {
1121
- this.set = [c2];
1282
+ for (const c3 of this.set) {
1283
+ if (c3.length === 1 && isAny(c3[0])) {
1284
+ this.set = [c3];
1122
1285
  break;
1123
1286
  }
1124
1287
  }
@@ -1162,7 +1325,7 @@ var require_range = __commonJS({
1162
1325
  const hr = loose ? re[t2.HYPHENRANGELOOSE] : re[t2.HYPHENRANGE];
1163
1326
  range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
1164
1327
  debug("hyphen replace", range);
1165
- range = range.replace(re[t2.COMPARATORTRIM], comparatorTrimReplace);
1328
+ range = trimComparatorWhitespace(range);
1166
1329
  debug("comparator trim", range);
1167
1330
  range = range.replace(re[t2.TILDETRIM], tildeTrimReplace);
1168
1331
  debug("tilde trim", range);
@@ -1232,18 +1395,18 @@ var require_range = __commonJS({
1232
1395
  var Comparator = require_comparator();
1233
1396
  var debug = require_debug();
1234
1397
  var SemVer = require_semver();
1398
+ var trimComparatorWhitespace = require_trim_comparator_whitespace();
1235
1399
  var {
1236
1400
  safeRe: re,
1237
1401
  src,
1238
1402
  t: t2,
1239
- comparatorTrimReplace,
1240
1403
  tildeTrimReplace,
1241
1404
  caretTrimReplace
1242
1405
  } = require_re();
1243
1406
  var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
1244
1407
  var BUILDSTRIPRE = new RegExp(src[t2.BUILD], "g");
1245
- var isNullSet = (c2) => c2.value === "<0.0.0-0";
1246
- var isAny = (c2) => c2.value === "";
1408
+ var isNullSet = (c3) => c3.value === "<0.0.0-0";
1409
+ var isAny = (c3) => c3.value === "";
1247
1410
  var isSatisfiable = (comparators, options) => {
1248
1411
  let result = true;
1249
1412
  const remainingComparators = comparators.slice();
@@ -1272,7 +1435,7 @@ var require_range = __commonJS({
1272
1435
  var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
1273
1436
  var invalidXRangeOrder = (M, m2, p) => isX(M) && !isX(m2) || isX(m2) && p && !isX(p);
1274
1437
  var replaceTildes = (comp, options) => {
1275
- return comp.trim().split(/\s+/).map((c2) => replaceTilde(c2, options)).join(" ");
1438
+ return comp.trim().split(/\s+/).map((c3) => replaceTilde(c3, options)).join(" ");
1276
1439
  };
1277
1440
  var replaceTilde = (comp, options) => {
1278
1441
  const r2 = options.loose ? re[t2.TILDELOOSE] : re[t2.TILDE];
@@ -1297,7 +1460,7 @@ var require_range = __commonJS({
1297
1460
  });
1298
1461
  };
1299
1462
  var replaceCarets = (comp, options) => {
1300
- return comp.trim().split(/\s+/).map((c2) => replaceCaret(c2, options)).join(" ");
1463
+ return comp.trim().split(/\s+/).map((c3) => replaceCaret(c3, options)).join(" ");
1301
1464
  };
1302
1465
  var replaceCaret = (comp, options) => {
1303
1466
  debug("caret", comp, options);
@@ -1345,7 +1508,7 @@ var require_range = __commonJS({
1345
1508
  };
1346
1509
  var replaceXRanges = (comp, options) => {
1347
1510
  debug("replaceXRanges", comp, options);
1348
- return comp.split(/\s+/).map((c2) => replaceXRange(c2, options)).join(" ");
1511
+ return comp.split(/\s+/).map((c3) => replaceXRange(c3, options)).join(" ");
1349
1512
  };
1350
1513
  var replaceXRange = (comp, options) => {
1351
1514
  comp = comp.trim();
@@ -1601,7 +1764,7 @@ var require_to_comparators = __commonJS({
1601
1764
  "node_modules/semver/ranges/to-comparators.js"(exports, module) {
1602
1765
  "use strict";
1603
1766
  var Range = require_range();
1604
- var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c2) => c2.value).join(" ").trim().split(" "));
1767
+ var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c3) => c3.value).join(" ").trim().split(" "));
1605
1768
  module.exports = toComparators;
1606
1769
  }
1607
1770
  });
@@ -1946,13 +2109,13 @@ var require_subset = __commonJS({
1946
2109
  }
1947
2110
  const eqSet = /* @__PURE__ */ new Set();
1948
2111
  let gt, lt;
1949
- for (const c2 of sub) {
1950
- if (c2.operator === ">" || c2.operator === ">=") {
1951
- gt = higherGT(gt, c2, options);
1952
- } else if (c2.operator === "<" || c2.operator === "<=") {
1953
- lt = lowerLT(lt, c2, options);
2112
+ for (const c3 of sub) {
2113
+ if (c3.operator === ">" || c3.operator === ">=") {
2114
+ gt = higherGT(gt, c3, options);
2115
+ } else if (c3.operator === "<" || c3.operator === "<=") {
2116
+ lt = lowerLT(lt, c3, options);
1954
2117
  } else {
1955
- eqSet.add(c2.semver);
2118
+ eqSet.add(c3.semver);
1956
2119
  }
1957
2120
  }
1958
2121
  if (eqSet.size > 1) {
@@ -1974,8 +2137,8 @@ var require_subset = __commonJS({
1974
2137
  if (lt && !satisfies4(eq2, String(lt), options)) {
1975
2138
  return null;
1976
2139
  }
1977
- for (const c2 of dom) {
1978
- if (!satisfies4(eq2, String(c2), options)) {
2140
+ for (const c3 of dom) {
2141
+ if (!satisfies4(eq2, String(c3), options)) {
1979
2142
  return false;
1980
2143
  }
1981
2144
  }
@@ -1988,40 +2151,40 @@ var require_subset = __commonJS({
1988
2151
  if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
1989
2152
  needDomLTPre = false;
1990
2153
  }
1991
- for (const c2 of dom) {
1992
- hasDomGT = hasDomGT || c2.operator === ">" || c2.operator === ">=";
1993
- hasDomLT = hasDomLT || c2.operator === "<" || c2.operator === "<=";
2154
+ for (const c3 of dom) {
2155
+ hasDomGT = hasDomGT || c3.operator === ">" || c3.operator === ">=";
2156
+ hasDomLT = hasDomLT || c3.operator === "<" || c3.operator === "<=";
1994
2157
  if (gt) {
1995
2158
  if (needDomGTPre) {
1996
- if (c2.semver.prerelease && c2.semver.prerelease.length && c2.semver.major === needDomGTPre.major && c2.semver.minor === needDomGTPre.minor && c2.semver.patch === needDomGTPre.patch) {
2159
+ if (c3.semver.prerelease && c3.semver.prerelease.length && c3.semver.major === needDomGTPre.major && c3.semver.minor === needDomGTPre.minor && c3.semver.patch === needDomGTPre.patch) {
1997
2160
  needDomGTPre = false;
1998
2161
  }
1999
2162
  }
2000
- if (c2.operator === ">" || c2.operator === ">=") {
2001
- higher = higherGT(gt, c2, options);
2002
- if (higher === c2 && higher !== gt) {
2163
+ if (c3.operator === ">" || c3.operator === ">=") {
2164
+ higher = higherGT(gt, c3, options);
2165
+ if (higher === c3 && higher !== gt) {
2003
2166
  return false;
2004
2167
  }
2005
- } else if (gt.operator === ">=" && !c2.test(gt.semver)) {
2168
+ } else if (gt.operator === ">=" && !c3.test(gt.semver)) {
2006
2169
  return false;
2007
2170
  }
2008
2171
  }
2009
2172
  if (lt) {
2010
2173
  if (needDomLTPre) {
2011
- if (c2.semver.prerelease && c2.semver.prerelease.length && c2.semver.major === needDomLTPre.major && c2.semver.minor === needDomLTPre.minor && c2.semver.patch === needDomLTPre.patch) {
2174
+ if (c3.semver.prerelease && c3.semver.prerelease.length && c3.semver.major === needDomLTPre.major && c3.semver.minor === needDomLTPre.minor && c3.semver.patch === needDomLTPre.patch) {
2012
2175
  needDomLTPre = false;
2013
2176
  }
2014
2177
  }
2015
- if (c2.operator === "<" || c2.operator === "<=") {
2016
- lower = lowerLT(lt, c2, options);
2017
- if (lower === c2 && lower !== lt) {
2178
+ if (c3.operator === "<" || c3.operator === "<=") {
2179
+ lower = lowerLT(lt, c3, options);
2180
+ if (lower === c3 && lower !== lt) {
2018
2181
  return false;
2019
2182
  }
2020
- } else if (lt.operator === "<=" && !c2.test(lt.semver)) {
2183
+ } else if (lt.operator === "<=" && !c3.test(lt.semver)) {
2021
2184
  return false;
2022
2185
  }
2023
2186
  }
2024
- if (!c2.operator && (lt || gt) && gtltComp !== 0) {
2187
+ if (!c3.operator && (lt || gt) && gtltComp !== 0) {
2025
2188
  return false;
2026
2189
  }
2027
2190
  }
@@ -2161,8 +2324,8 @@ import path2 from "node:path";
2161
2324
  // node_modules/@clack/core/dist/index.mjs
2162
2325
  import { styleText } from "node:util";
2163
2326
  import { stdout, stdin } from "node:process";
2164
- import * as l from "node:readline";
2165
- import l__default from "node:readline";
2327
+ import * as f$1 from "node:readline";
2328
+ import f__default from "node:readline";
2166
2329
 
2167
2330
  // node_modules/fast-string-truncated-width/dist/utils.js
2168
2331
  var getCodePointsLength = /* @__PURE__ */ (() => {
@@ -2250,7 +2413,7 @@ var getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {})
2250
2413
  if (index >= length) {
2251
2414
  break outer;
2252
2415
  }
2253
- for (let i2 = 0, l2 = PARSE_BLOCKS.length; i2 < l2; i2++) {
2416
+ for (let i2 = 0, l = PARSE_BLOCKS.length; i2 < l; i2++) {
2254
2417
  const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i2];
2255
2418
  BLOCK_RE.lastIndex = index;
2256
2419
  if (BLOCK_RE.test(input)) {
@@ -2500,14 +2663,66 @@ function wrapAnsi(string, columns, options) {
2500
2663
  return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
2501
2664
  }
2502
2665
 
2666
+ // node_modules/sisteransi/dist/index.js
2667
+ var ESC2 = "\x1B";
2668
+ var CSI2 = `${ESC2}[`;
2669
+ var cursor = {
2670
+ to(x, y) {
2671
+ if (!y)
2672
+ return `${CSI2}${x + 1}G`;
2673
+ return `${CSI2}${y + 1};${x + 1}H`;
2674
+ },
2675
+ move(x, y) {
2676
+ let ret = "";
2677
+ if (x < 0)
2678
+ ret += `${CSI2}${-x}D`;
2679
+ else if (x > 0)
2680
+ ret += `${CSI2}${x}C`;
2681
+ if (y < 0)
2682
+ ret += `${CSI2}${-y}A`;
2683
+ else if (y > 0)
2684
+ ret += `${CSI2}${y}B`;
2685
+ return ret;
2686
+ },
2687
+ up: (count = 1) => `${CSI2}${count}A`,
2688
+ down: (count = 1) => `${CSI2}${count}B`,
2689
+ forward: (count = 1) => `${CSI2}${count}C`,
2690
+ backward: (count = 1) => `${CSI2}${count}D`,
2691
+ nextLine: (count = 1) => `${CSI2}E`.repeat(count),
2692
+ prevLine: (count = 1) => `${CSI2}F`.repeat(count),
2693
+ left: `${CSI2}G`,
2694
+ hide: `${CSI2}?25l`,
2695
+ show: `${CSI2}?25h`,
2696
+ save: `${ESC2}7`,
2697
+ restore: `${ESC2}8`
2698
+ };
2699
+ var erase = {
2700
+ screen: `${CSI2}2J`,
2701
+ up: (count = 1) => `${CSI2}1J`.repeat(count),
2702
+ down: (count = 1) => `${CSI2}J`.repeat(count),
2703
+ line: `${CSI2}2K`,
2704
+ lineEnd: `${CSI2}K`,
2705
+ lineStart: `${CSI2}1K`,
2706
+ lines(count) {
2707
+ let clear2 = "";
2708
+ for (let i2 = 0; i2 < count; i2++)
2709
+ clear2 += this.line + (i2 < count - 1 ? cursor.up() : "");
2710
+ if (count)
2711
+ clear2 += cursor.left;
2712
+ return clear2;
2713
+ }
2714
+ };
2715
+ var clear = {
2716
+ screen: `${ESC2}c`
2717
+ };
2718
+
2503
2719
  // node_modules/@clack/core/dist/index.mjs
2504
- var import_sisteransi = __toESM(require_src(), 1);
2505
2720
  import { ReadStream } from "node:tty";
2506
- function findCursor(s, o, l2) {
2507
- if (!l2.some((r2) => !r2.disabled))
2508
- return s;
2509
- const t2 = s + o, n3 = Math.max(l2.length - 1, 0), e = t2 < 0 ? n3 : t2 > n3 ? 0 : t2;
2510
- return l2[e]?.disabled ? findCursor(e, o < 0 ? -1 : 1, l2) : e;
2721
+ function findCursor(o, s, l) {
2722
+ if (!l.some((r2) => !r2.disabled))
2723
+ return o;
2724
+ const t2 = o + s, n3 = Math.max(l.length - 1, 0), e = t2 < 0 ? n3 : t2 > n3 ? 0 : t2;
2725
+ return l[e]?.disabled ? findCursor(e, s < 0 ? -1 : 1, l) : e;
2511
2726
  }
2512
2727
  var a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
2513
2728
  var t = [
@@ -2596,42 +2811,42 @@ function block({
2596
2811
  overwrite: o = true,
2597
2812
  hideCursor: n3 = true
2598
2813
  } = {}) {
2599
- const s = l.createInterface({
2814
+ const s = f$1.createInterface({
2600
2815
  input: e,
2601
2816
  output: r2,
2602
2817
  prompt: "",
2603
2818
  tabSize: 1
2604
2819
  });
2605
- l.emitKeypressEvents(e, s), e instanceof ReadStream && e.isTTY && e.setRawMode(true);
2606
- const t2 = (f, { name: a2, sequence: w }) => {
2607
- const c2 = String(f);
2608
- if (isActionKey([c2, a2, w], "cancel")) {
2609
- n3 && r2.write(import_sisteransi.cursor.show), process.exit(0);
2820
+ f$1.emitKeypressEvents(e, s), e instanceof ReadStream && e.isTTY && e.setRawMode(true);
2821
+ const t2 = (l, { name: i2, sequence: p }) => {
2822
+ const w = String(l);
2823
+ if (isActionKey([w, i2, p], "cancel")) {
2824
+ n3 && r2.write(cursor.show), process.exit(0);
2610
2825
  return;
2611
2826
  }
2612
2827
  if (!o) return;
2613
- const i2 = a2 === "return" ? 0 : -1, m2 = a2 === "return" ? -1 : 0;
2614
- l.moveCursor(r2, i2, m2, () => {
2615
- l.clearLine(r2, 1, () => {
2828
+ const c3 = i2 === "return" ? 0 : -1, a2 = i2 === "return" ? -1 : 0;
2829
+ f$1.moveCursor(r2, c3, a2, () => {
2830
+ f$1.clearLine(r2, 1, () => {
2616
2831
  e.once("keypress", t2);
2617
2832
  });
2618
2833
  });
2619
2834
  };
2620
- return n3 && r2.write(import_sisteransi.cursor.hide), e.once("keypress", t2), () => {
2621
- e.off("keypress", t2), n3 && r2.write(import_sisteransi.cursor.show), e instanceof ReadStream && e.isTTY && !R && e.setRawMode(false), s.terminal = false, s.close();
2835
+ return n3 && r2.write(cursor.hide), e.once("keypress", t2), () => {
2836
+ e.off("keypress", t2), n3 && r2.write(cursor.show), e instanceof ReadStream && e.isTTY && !R && e.setRawMode(false), s.terminal = false, s.close();
2622
2837
  };
2623
2838
  }
2624
2839
  var getColumns = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80;
2625
2840
  var getRows = (e) => "rows" in e && typeof e.rows == "number" ? e.rows : 20;
2626
2841
  function wrapTextWithPrefix(e, r2, o, n3 = o, s = o, t2) {
2627
- const f = getColumns(e ?? stdout);
2628
- return wrapAnsi(r2, f - o.length, {
2842
+ const l = getColumns(e ?? stdout), i2 = dist_default2(o);
2843
+ return wrapAnsi(r2, l - i2, {
2629
2844
  hard: true,
2630
2845
  trim: false
2631
2846
  }).split(`
2632
- `).map((c2, i2, m2) => {
2633
- const d = t2 ? t2(c2, i2) : c2;
2634
- return i2 === 0 ? `${n3}${d}` : i2 === m2.length - 1 ? `${s}${d}` : `${o}${d}`;
2847
+ `).map((c3, a2, g) => {
2848
+ const m2 = t2 ? t2(c3, a2) : c3;
2849
+ return a2 === 0 ? `${n3}${m2}` : a2 === g.length - 1 ? `${s}${m2}` : `${o}${m2}`;
2635
2850
  }).join(`
2636
2851
  `);
2637
2852
  }
@@ -2642,7 +2857,7 @@ function runValidation(e, a2) {
2642
2857
  }
2643
2858
  return e(a2);
2644
2859
  }
2645
- var y = class {
2860
+ var C$1 = class C {
2646
2861
  input;
2647
2862
  output;
2648
2863
  _abortSignal;
@@ -2724,16 +2939,16 @@ var y = class {
2724
2939
  { once: true }
2725
2940
  );
2726
2941
  }
2727
- this.rl = l__default.createInterface({
2942
+ this.rl = f__default.createInterface({
2728
2943
  input: this.input,
2729
2944
  tabSize: 2,
2730
2945
  prompt: "",
2731
2946
  escapeCodeTimeout: 50,
2732
2947
  terminal: true
2733
2948
  }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), setRawMode(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
2734
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(this.value);
2949
+ this.output.write(cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(this.value);
2735
2950
  }), this.once("cancel", () => {
2736
- this.output.write(import_sisteransi.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(CANCEL_SYMBOL);
2951
+ this.output.write(cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t2(CANCEL_SYMBOL);
2737
2952
  });
2738
2953
  });
2739
2954
  }
@@ -2770,18 +2985,18 @@ var y = class {
2770
2985
  `), setRawMode(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
2771
2986
  }
2772
2987
  restoreCursor() {
2773
- const t2 = wrapAnsi(this._prevFrame, process.stdout.columns, { hard: true, trim: false }).split(`
2988
+ const t2 = wrapAnsi(this._prevFrame, getColumns(this.output), { hard: true, trim: false }).split(`
2774
2989
  `).length - 1;
2775
- this.output.write(import_sisteransi.cursor.move(-999, t2 * -1));
2990
+ this.output.write(cursor.move(-999, t2 * -1));
2776
2991
  }
2777
2992
  render() {
2778
- const t2 = wrapAnsi(this._render(this) ?? "", process.stdout.columns, {
2993
+ const t2 = wrapAnsi(this._render(this) ?? "", getColumns(this.output), {
2779
2994
  hard: true,
2780
2995
  trim: false
2781
2996
  });
2782
2997
  if (t2 !== this._prevFrame) {
2783
2998
  if (this.state === "initial")
2784
- this.output.write(import_sisteransi.cursor.hide);
2999
+ this.output.write(cursor.hide);
2785
3000
  else {
2786
3001
  const e = diffLines(this._prevFrame, t2), i2 = getRows(this.output);
2787
3002
  if (this.restoreCursor(), e) {
@@ -2792,33 +3007,33 @@ var y = class {
2792
3007
  return;
2793
3008
  }
2794
3009
  if (e.lines.length === 1) {
2795
- this.output.write(import_sisteransi.cursor.move(0, n3 - r2)), this.output.write(import_sisteransi.erase.lines(1));
3010
+ this.output.write(cursor.move(0, n3 - r2)), this.output.write(erase.lines(1));
2796
3011
  const o = t2.split(`
2797
3012
  `);
2798
- this.output.write(o[n3]), this._prevFrame = t2, this.output.write(import_sisteransi.cursor.move(0, o.length - n3 - 1));
3013
+ this.output.write(o[n3]), this._prevFrame = t2, this.output.write(cursor.move(0, o.length - n3 - 1));
2799
3014
  return;
2800
3015
  } else if (e.lines.length > 1) {
2801
3016
  if (s < r2)
2802
3017
  n3 = s;
2803
3018
  else {
2804
3019
  const h2 = n3 - r2;
2805
- h2 > 0 && this.output.write(import_sisteransi.cursor.move(0, h2));
3020
+ h2 > 0 && this.output.write(cursor.move(0, h2));
2806
3021
  }
2807
- this.output.write(import_sisteransi.erase.down());
2808
- const f = t2.split(`
3022
+ this.output.write(erase.down());
3023
+ const m2 = t2.split(`
2809
3024
  `).slice(n3);
2810
- this.output.write(f.join(`
3025
+ this.output.write(m2.join(`
2811
3026
  `)), this._prevFrame = t2;
2812
3027
  return;
2813
3028
  }
2814
3029
  }
2815
- this.output.write(import_sisteransi.erase.down());
3030
+ this.output.write(erase.down());
2816
3031
  }
2817
3032
  this.output.write(t2), this.state === "initial" && (this.state = "active"), this._prevFrame = t2;
2818
3033
  }
2819
3034
  }
2820
3035
  };
2821
- var r = class extends y {
3036
+ var r = class extends C$1 {
2822
3037
  get cursor() {
2823
3038
  return this.value ? 0 : 1;
2824
3039
  }
@@ -2829,13 +3044,13 @@ var r = class extends y {
2829
3044
  super(t2, false), this.value = !!t2.initialValue, this.on("userInput", () => {
2830
3045
  this.value = this._value;
2831
3046
  }), this.on("confirm", (i2) => {
2832
- this.output.write(import_sisteransi.cursor.move(0, -1)), this.value = i2, this.state = "submit", this.close();
3047
+ this.output.write(cursor.move(0, -1)), this.value = i2, this.state = "submit", this.close();
2833
3048
  }), this.on("cursor", () => {
2834
3049
  this.value = !this.value;
2835
3050
  });
2836
3051
  }
2837
3052
  };
2838
- var a = class extends y {
3053
+ var a = class extends C$1 {
2839
3054
  options;
2840
3055
  cursor = 0;
2841
3056
  get _value() {
@@ -2866,8 +3081,8 @@ var a = class extends y {
2866
3081
  this.options.findIndex(({ value: t2 }) => t2 === e.cursorAt),
2867
3082
  0
2868
3083
  );
2869
- this.cursor = this.options[i2]?.disabled ? findCursor(i2, 1, this.options) : i2, this.on("key", (t2, l2) => {
2870
- l2.name === "a" && this.toggleAll(), l2.name === "i" && this.toggleInvert();
3084
+ this.cursor = this.options[i2]?.disabled ? findCursor(i2, 1, this.options) : i2, this.on("key", (t2, s) => {
3085
+ s.name === "a" && this.toggleAll(), s.name === "i" && this.toggleInvert(), s.name === void 0 && t2 === "\u3000" && this.toggleValue();
2871
3086
  }), this.on("cursor", (t2) => {
2872
3087
  switch (t2) {
2873
3088
  case "left":
@@ -2885,7 +3100,7 @@ var a = class extends y {
2885
3100
  });
2886
3101
  }
2887
3102
  };
2888
- var n$1 = class n extends y {
3103
+ var n$1 = class n extends C$1 {
2889
3104
  options;
2890
3105
  cursor = 0;
2891
3106
  get _selectedValue() {
@@ -2913,7 +3128,7 @@ var n$1 = class n extends y {
2913
3128
  });
2914
3129
  }
2915
3130
  };
2916
- var n2 = class extends y {
3131
+ var n2 = class extends C$1 {
2917
3132
  get userInputWithCursor() {
2918
3133
  if (this.state === "submit")
2919
3134
  return this.userInput;
@@ -2941,7 +3156,6 @@ var n2 = class extends y {
2941
3156
  // node_modules/@clack/prompts/dist/index.mjs
2942
3157
  import { styleText as styleText2, stripVTControlCharacters } from "node:util";
2943
3158
  import process$1 from "node:process";
2944
- var import_sisteransi2 = __toESM(require_src(), 1);
2945
3159
  function isUnicodeSupported() {
2946
3160
  if (process$1.platform !== "win32") {
2947
3161
  return process$1.env.TERM !== "linux";
@@ -2950,7 +3164,7 @@ function isUnicodeSupported() {
2950
3164
  }
2951
3165
  var unicode = isUnicodeSupported();
2952
3166
  var isCI = () => process.env.CI === "true";
2953
- var unicodeOr = (o, e) => unicode ? o : e;
3167
+ var unicodeOr = (e, o) => unicode ? e : o;
2954
3168
  var S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
2955
3169
  var S_STEP_CANCEL = unicodeOr("\u25A0", "x");
2956
3170
  var S_STEP_ERROR = unicodeOr("\u25B2", "x");
@@ -2976,8 +3190,8 @@ var S_INFO = unicodeOr("\u25CF", "\u2022");
2976
3190
  var S_SUCCESS = unicodeOr("\u25C6", "*");
2977
3191
  var S_WARN = unicodeOr("\u25B2", "!");
2978
3192
  var S_ERROR = unicodeOr("\u25A0", "x");
2979
- var symbol = (o) => {
2980
- switch (o) {
3193
+ var symbol = (e) => {
3194
+ switch (e) {
2981
3195
  case "initial":
2982
3196
  case "active":
2983
3197
  return styleText2("cyan", S_STEP_ACTIVE);
@@ -2991,8 +3205,8 @@ var symbol = (o) => {
2991
3205
  return styleText2("dim", S_STEP_ACTIVE);
2992
3206
  }
2993
3207
  };
2994
- var symbolBar = (o) => {
2995
- switch (o) {
3208
+ var symbolBar = (e) => {
3209
+ switch (e) {
2996
3210
  case "initial":
2997
3211
  case "active":
2998
3212
  return styleText2("cyan", S_BAR);
@@ -3004,49 +3218,50 @@ var symbolBar = (o) => {
3004
3218
  return styleText2("green", S_BAR);
3005
3219
  }
3006
3220
  };
3007
- function formatInstructionFooter(o, e) {
3008
- const r2 = [`${e ? `${styleText2("cyan", S_BAR)} ` : ""}${o.join(" \u2022 ")}`];
3009
- return e && r2.push(styleText2("cyan", S_BAR_END)), r2;
3221
+ function formatInstructionFooter(e, o, r2) {
3222
+ const s = r2 ? `${styleText2("cyan", S_BAR)} ` : "", n3 = wrapTextWithPrefix(e, o.join(" \u2022 "), s).split(`
3223
+ `);
3224
+ return r2 && n3.push(styleText2("cyan", S_BAR_END)), n3;
3010
3225
  }
3011
- var I = (l2, e, w, p, b, C2 = false) => {
3226
+ var E$1 = (l, e, w, p, b, C3 = false) => {
3012
3227
  let r2 = e, O = 0;
3013
- if (C2)
3228
+ if (C3)
3014
3229
  for (let i2 = p - 1; i2 >= w; i2--) {
3015
- const m2 = l2[i2];
3230
+ const m2 = l[i2];
3016
3231
  if (m2 && (r2 -= m2.length), O++, r2 <= b) break;
3017
3232
  }
3018
3233
  else
3019
3234
  for (let i2 = w; i2 < p; i2++) {
3020
- const m2 = l2[i2];
3235
+ const m2 = l[i2];
3021
3236
  if (m2 && (r2 -= m2.length), O++, r2 <= b) break;
3022
3237
  }
3023
3238
  return { lineCount: r2, removals: O };
3024
3239
  };
3025
3240
  var limitOptions = ({
3026
- cursor: l2,
3241
+ cursor: l,
3027
3242
  options: e,
3028
3243
  style: w,
3029
3244
  output: p = process.stdout,
3030
3245
  maxItems: b = Number.POSITIVE_INFINITY,
3031
- columnPadding: C2 = 0,
3246
+ columnPadding: C3 = 0,
3032
3247
  rowPadding: r2 = 4
3033
3248
  }) => {
3034
- const i2 = getColumns(p) - C2, m2 = getRows(p), M = styleText2("dim", "..."), v = Math.max(m2 - r2, 0), a2 = Math.max(Math.min(b, v), 5);
3249
+ const i2 = getColumns(p) - C3, m2 = getRows(p), M = styleText2("dim", "..."), v = Math.max(m2 - r2, 0), a2 = Math.max(Math.min(b, v), 5);
3035
3250
  let f = 0;
3036
- l2 >= a2 - 3 && (f = Math.max(
3037
- Math.min(l2 - a2 + 3, e.length - a2),
3251
+ l >= a2 - 3 && (f = Math.max(
3252
+ Math.min(l - a2 + 3, e.length - a2),
3038
3253
  0
3039
3254
  ));
3040
- let d = a2 < e.length && f > 0, c2 = a2 < e.length && f + a2 < e.length;
3041
- const W2 = Math.min(
3255
+ let d = a2 < e.length && f > 0, c3 = a2 < e.length && f + a2 < e.length;
3256
+ const I = Math.min(
3042
3257
  f + a2,
3043
3258
  e.length
3044
3259
  ), s = [];
3045
3260
  let g = 0;
3046
- d && g++, c2 && g++;
3047
- const T = f + (d ? 1 : 0), y2 = W2 - (c2 ? 1 : 0);
3048
- for (let t2 = T; t2 < y2; t2++) {
3049
- const n3 = e[t2], o = n3 ? w(n3, t2 === l2) : "", h2 = wrapAnsi(o, i2, {
3261
+ d && g++, c3 && g++;
3262
+ const T = f + (d ? 1 : 0), W2 = I - (c3 ? 1 : 0);
3263
+ for (let t2 = T; t2 < W2; t2++) {
3264
+ const n3 = e[t2], o = n3 !== void 0 ? w(n3, t2 === l) : "", h2 = wrapAnsi(o, i2, {
3050
3265
  hard: true,
3051
3266
  trim: false
3052
3267
  }).split(`
@@ -3055,9 +3270,9 @@ var limitOptions = ({
3055
3270
  }
3056
3271
  if (g > v) {
3057
3272
  let t2 = 0, n3 = 0, o = g;
3058
- const h2 = l2 - T;
3273
+ const h2 = l - T;
3059
3274
  let u3 = v;
3060
- const L = () => I(s, o, 0, h2, u3), E = () => I(
3275
+ const L = () => E$1(s, o, 0, h2, u3), y = () => E$1(
3061
3276
  s,
3062
3277
  o,
3063
3278
  h2 + 1,
@@ -3065,14 +3280,14 @@ var limitOptions = ({
3065
3280
  u3,
3066
3281
  true
3067
3282
  );
3068
- d ? ({ lineCount: o, removals: t2 } = L(), o > u3 && (c2 || (u3 -= 1), { lineCount: o, removals: n3 } = E())) : (c2 || (u3 -= 1), { lineCount: o, removals: n3 } = E(), o > u3 && (u3 -= 1, { lineCount: o, removals: t2 } = L())), t2 > 0 && (d = true, s.splice(0, t2)), n3 > 0 && (c2 = true, s.splice(s.length - n3, n3));
3283
+ d ? ({ lineCount: o, removals: t2 } = L(), o > u3 && (c3 || (u3 -= 1), { lineCount: o, removals: n3 } = y())) : (c3 || (u3 -= 1), { lineCount: o, removals: n3 } = y(), o > u3 && (u3 -= 1, { lineCount: o, removals: t2 } = L())), t2 > 0 && (d = true, s.splice(0, t2)), n3 > 0 && (c3 = true, s.splice(s.length - n3, n3));
3069
3284
  }
3070
3285
  const x = [];
3071
3286
  d && x.push(M);
3072
3287
  for (const t2 of s)
3073
3288
  for (const n3 of t2)
3074
3289
  x.push(n3);
3075
- return c2 && x.push(M), x;
3290
+ return c3 && x.push(M), x;
3076
3291
  };
3077
3292
  var confirm = (e) => {
3078
3293
  const a2 = e.active ?? "Yes", o = e.inactive ?? "No";
@@ -3084,22 +3299,22 @@ var confirm = (e) => {
3084
3299
  output: e.output,
3085
3300
  initialValue: e.initialValue ?? true,
3086
3301
  render() {
3087
- const i2 = e.withGuide ?? settings.withGuide, u3 = `${symbol(this.state)} `, l2 = i2 ? `${styleText2("gray", S_BAR)} ` : "", f = wrapTextWithPrefix(
3302
+ const i2 = e.withGuide ?? settings.withGuide, u3 = `${symbol(this.state)} `, l = i2 ? `${styleText2("gray", S_BAR)} ` : "", f = wrapTextWithPrefix(
3088
3303
  e.output,
3089
3304
  e.message,
3090
- l2,
3305
+ l,
3091
3306
  u3
3092
3307
  ), s = `${i2 ? `${styleText2("gray", S_BAR)}
3093
3308
  ` : ""}${f}
3094
- `, c2 = this.value ? a2 : o;
3309
+ `, c3 = this.value ? a2 : o;
3095
3310
  switch (this.state) {
3096
3311
  case "submit": {
3097
3312
  const r2 = i2 ? `${styleText2("gray", S_BAR)} ` : "";
3098
- return `${s}${r2}${styleText2("dim", c2)}`;
3313
+ return `${s}${r2}${styleText2("dim", c3)}`;
3099
3314
  }
3100
3315
  case "cancel": {
3101
3316
  const r2 = i2 ? `${styleText2("gray", S_BAR)} ` : "";
3102
- return `${s}${r2}${styleText2(["strikethrough", "dim"], c2)}${i2 ? `
3317
+ return `${s}${r2}${styleText2(["strikethrough", "dim"], c3)}${i2 ? `
3103
3318
  ${styleText2("gray", S_BAR)}` : ""}`;
3104
3319
  }
3105
3320
  default: {
@@ -3119,22 +3334,22 @@ var MULTISELECT_INSTRUCTIONS = [
3119
3334
  `${styleText2("dim", "Space:")} select`,
3120
3335
  `${styleText2("dim", "Enter:")} confirm`
3121
3336
  ];
3122
- var m = (i2, u3) => i2.split(`
3337
+ var m = (n3, u3) => n3.split(`
3123
3338
  `).map((d) => u3(d)).join(`
3124
3339
  `);
3125
- var multiselect = (i2) => {
3340
+ var multiselect = (n3) => {
3126
3341
  const u3 = (t2, a2) => {
3127
3342
  const r2 = t2.label ?? String(t2.value);
3128
3343
  return a2 === "disabled" ? `${styleText2("gray", S_CHECKBOX_INACTIVE)} ${m(r2, (o) => styleText2(["strikethrough", "gray"], o))}${t2.hint ? ` ${styleText2("dim", `(${t2.hint ?? "disabled"})`)}` : ""}` : a2 === "active" ? `${styleText2("cyan", S_CHECKBOX_ACTIVE)} ${r2}${t2.hint ? ` ${styleText2("dim", `(${t2.hint})`)}` : ""}` : a2 === "selected" ? `${styleText2("green", S_CHECKBOX_SELECTED)} ${m(r2, (o) => styleText2("dim", o))}${t2.hint ? ` ${styleText2("dim", `(${t2.hint})`)}` : ""}` : a2 === "cancelled" ? `${m(r2, (o) => styleText2(["strikethrough", "dim"], o))}` : a2 === "active-selected" ? `${styleText2("green", S_CHECKBOX_SELECTED)} ${r2}${t2.hint ? ` ${styleText2("dim", `(${t2.hint})`)}` : ""}` : a2 === "submitted" ? `${m(r2, (o) => styleText2("dim", o))}` : `${styleText2("dim", S_CHECKBOX_INACTIVE)} ${m(r2, (o) => styleText2("dim", o))}`;
3129
- }, d = i2.required ?? true, x = i2.showInstructions ?? true;
3344
+ }, d = n3.required ?? true, x = n3.showInstructions ?? true;
3130
3345
  return new a({
3131
- options: i2.options,
3132
- signal: i2.signal,
3133
- input: i2.input,
3134
- output: i2.output,
3135
- initialValues: i2.initialValues,
3346
+ options: n3.options,
3347
+ signal: n3.signal,
3348
+ input: n3.input,
3349
+ output: n3.output,
3350
+ initialValues: n3.initialValues,
3136
3351
  required: d,
3137
- cursorAt: i2.cursorAt,
3352
+ cursorAt: n3.cursorAt,
3138
3353
  validate(t2) {
3139
3354
  if (d && (t2 === void 0 || t2.length === 0))
3140
3355
  return `Please select at least one option.
@@ -3150,75 +3365,75 @@ ${styleText2(
3150
3365
  )}`;
3151
3366
  },
3152
3367
  render() {
3153
- const t2 = i2.withGuide ?? settings.withGuide, a2 = wrapTextWithPrefix(
3154
- i2.output,
3155
- i2.message,
3368
+ const t2 = n3.withGuide ?? settings.withGuide, a2 = wrapTextWithPrefix(
3369
+ n3.output,
3370
+ n3.message,
3156
3371
  t2 ? `${symbolBar(this.state)} ` : "",
3157
3372
  `${symbol(this.state)} `
3158
3373
  ), r2 = `${t2 ? `${styleText2("gray", S_BAR)}
3159
3374
  ` : ""}${a2}
3160
- `, o = this.value ?? [], g = (n3, l2) => {
3161
- if (n3.disabled)
3162
- return u3(n3, "disabled");
3163
- const s = o.includes(n3.value);
3164
- return l2 && s ? u3(n3, "active-selected") : s ? u3(n3, "selected") : u3(n3, l2 ? "active" : "inactive");
3375
+ `, o = this.value ?? [], g = (i2, l) => {
3376
+ if (i2.disabled)
3377
+ return u3(i2, "disabled");
3378
+ const s = o.includes(i2.value);
3379
+ return l && s ? u3(i2, "active-selected") : s ? u3(i2, "selected") : u3(i2, l ? "active" : "inactive");
3165
3380
  };
3166
3381
  switch (this.state) {
3167
3382
  case "submit": {
3168
- const n3 = this.options.filter(({ value: s }) => o.includes(s)).map((s) => u3(s, "submitted")).join(styleText2("dim", ", ")) || styleText2("dim", "none"), l2 = wrapTextWithPrefix(
3169
- i2.output,
3170
- n3,
3383
+ const i2 = this.options.filter(({ value: s }) => o.includes(s)).map((s) => u3(s, "submitted")).join(styleText2("dim", ", ")) || styleText2("dim", "none"), l = wrapTextWithPrefix(
3384
+ n3.output,
3385
+ i2,
3171
3386
  t2 ? `${styleText2("gray", S_BAR)} ` : ""
3172
3387
  );
3173
- return `${r2}${l2}`;
3388
+ return `${r2}${l}`;
3174
3389
  }
3175
3390
  case "cancel": {
3176
- const n3 = this.options.filter(({ value: s }) => o.includes(s)).map((s) => u3(s, "cancelled")).join(styleText2("dim", ", "));
3177
- if (n3.trim() === "")
3391
+ const i2 = this.options.filter(({ value: s }) => o.includes(s)).map((s) => u3(s, "cancelled")).join(styleText2("dim", ", "));
3392
+ if (i2.trim() === "")
3178
3393
  return `${r2}${styleText2("gray", S_BAR)}`;
3179
- const l2 = wrapTextWithPrefix(
3180
- i2.output,
3181
- n3,
3394
+ const l = wrapTextWithPrefix(
3395
+ n3.output,
3396
+ i2,
3182
3397
  t2 ? `${styleText2("gray", S_BAR)} ` : ""
3183
3398
  );
3184
- return `${r2}${l2}${t2 ? `
3399
+ return `${r2}${l}${t2 ? `
3185
3400
  ${styleText2("gray", S_BAR)}` : ""}`;
3186
3401
  }
3187
3402
  case "error": {
3188
- const n3 = t2 ? `${styleText2("yellow", S_BAR)} ` : "", l2 = this.error.split(`
3403
+ const i2 = t2 ? `${styleText2("yellow", S_BAR)} ` : "", l = this.error.split(`
3189
3404
  `).map(
3190
3405
  ($, v) => v === 0 ? `${t2 ? `${styleText2("yellow", S_BAR_END)} ` : ""}${styleText2("yellow", $)}` : ` ${$}`
3191
3406
  ).join(`
3192
3407
  `), s = r2.split(`
3193
- `).length, h2 = l2.split(`
3408
+ `).length, h2 = l.split(`
3194
3409
  `).length + 1;
3195
- return `${r2}${n3}${limitOptions({
3196
- output: i2.output,
3410
+ return `${r2}${i2}${limitOptions({
3411
+ output: n3.output,
3197
3412
  options: this.options,
3198
3413
  cursor: this.cursor,
3199
- maxItems: i2.maxItems,
3200
- columnPadding: n3.length,
3414
+ maxItems: n3.maxItems,
3415
+ columnPadding: i2.length,
3201
3416
  rowPadding: s + h2,
3202
3417
  style: g
3203
3418
  }).join(`
3204
- ${n3}`)}
3205
- ${l2}
3419
+ ${i2}`)}
3420
+ ${l}
3206
3421
  `;
3207
3422
  }
3208
3423
  default: {
3209
- const n3 = t2 ? `${styleText2("cyan", S_BAR)} ` : "", l2 = r2.split(`
3210
- `).length, s = x ? formatInstructionFooter(MULTISELECT_INSTRUCTIONS, t2) : t2 ? [styleText2("cyan", S_BAR_END)] : [], h2 = s.join(`
3424
+ const i2 = t2 ? `${styleText2("cyan", S_BAR)} ` : "", l = r2.split(`
3425
+ `).length, s = x ? formatInstructionFooter(n3.output, MULTISELECT_INSTRUCTIONS, t2) : t2 ? [styleText2("cyan", S_BAR_END)] : [], h2 = s.join(`
3211
3426
  `), $ = s.length + 1;
3212
- return `${r2}${n3}${limitOptions({
3213
- output: i2.output,
3427
+ return `${r2}${i2}${limitOptions({
3428
+ output: n3.output,
3214
3429
  options: this.options,
3215
3430
  cursor: this.cursor,
3216
- maxItems: i2.maxItems,
3217
- columnPadding: n3.length,
3218
- rowPadding: l2 + $,
3431
+ maxItems: n3.maxItems,
3432
+ columnPadding: i2.length,
3433
+ rowPadding: l + $,
3219
3434
  style: g
3220
3435
  }).join(`
3221
- ${n3}`)}
3436
+ ${i2}`)}
3222
3437
  ${h2}
3223
3438
  `;
3224
3439
  }
@@ -3244,18 +3459,18 @@ ${styleText2("gray", S_BAR_END)} ` : "";
3244
3459
 
3245
3460
  `);
3246
3461
  };
3247
- var W$1 = (o) => o;
3248
- var C = (o, e, s) => {
3462
+ var W = (o) => o;
3463
+ var C2 = (o, e, s) => {
3249
3464
  const a2 = {
3250
3465
  hard: true,
3251
3466
  trim: false
3252
3467
  }, i2 = wrapAnsi(o, e, a2).split(`
3253
- `), c2 = i2.reduce((n3, t2) => Math.max(dist_default2(t2), n3), 0), u3 = i2.map(s).reduce((n3, t2) => Math.max(dist_default2(t2), n3), 0), g = e - (u3 - c2);
3468
+ `), c3 = i2.reduce((n3, t2) => Math.max(dist_default2(t2), n3), 0), u3 = i2.map(s).reduce((n3, t2) => Math.max(dist_default2(t2), n3), 0), g = e - (u3 - c3);
3254
3469
  return wrapAnsi(o, g, a2);
3255
3470
  };
3256
3471
  var note = (o = "", e = "", s) => {
3257
- const a2 = s?.output ?? process$1.stdout, i2 = s?.withGuide ?? settings.withGuide, c2 = s?.format ?? W$1, g = ["", ...C(o, getColumns(a2) - 6, c2).split(`
3258
- `).map(c2), ""], n3 = dist_default2(e), t2 = Math.max(
3472
+ const a2 = s?.output ?? process$1.stdout, i2 = s?.withGuide ?? settings.withGuide, c3 = s?.format ?? W, g = ["", ...C2(o, getColumns(a2) - 6, c3).split(`
3473
+ `).map(c3), ""], n3 = dist_default2(e), t2 = Math.max(
3259
3474
  g.reduce((m2, F2) => {
3260
3475
  const O = dist_default2(F2);
3261
3476
  return O > m2 ? O : m2;
@@ -3276,83 +3491,102 @@ ${styleText2("gray", l$1 + S_BAR_H.repeat(t2 + 2) + S_CORNER_BOTTOM_RIGHT)}
3276
3491
  `
3277
3492
  );
3278
3493
  };
3279
- var W = (l2) => styleText2("magenta", l2);
3494
+ var Y = 3e4;
3495
+ var Z = (c3) => styleText2("magenta", c3);
3280
3496
  var spinner = ({
3281
- indicator: l2 = "dots",
3282
- onCancel: h2,
3497
+ indicator: c3 = "dots",
3498
+ onCancel: b,
3283
3499
  output: n3 = process.stdout,
3284
- cancelMessage: G,
3285
- errorMessage: O,
3286
- frames: E = unicode ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"],
3287
- delay: F2 = unicode ? 80 : 120,
3288
- signal: m2,
3289
- ...I2
3500
+ cancelMessage: _,
3501
+ errorMessage: C3,
3502
+ frames: M = unicode ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"],
3503
+ delay: O = unicode ? 80 : 120,
3504
+ signal: g,
3505
+ ...E
3290
3506
  } = {}) => {
3291
- const u3 = isCI();
3292
- let M, T, d = false, S = false, s = "", p, w = performance.now();
3293
- const x = getColumns(n3), k = I2?.styleFrame ?? W, g = (e) => {
3294
- const r2 = e > 1 ? O ?? settings.messages.error : G ?? settings.messages.cancel;
3295
- S = e === 1, d && (a2(r2, e), S && typeof h2 == "function" && h2());
3296
- }, f = () => g(2), i2 = () => g(1), A = () => {
3297
- process.on("uncaughtExceptionMonitor", f), process.on("unhandledRejection", f), process.on("SIGINT", i2), process.on("SIGTERM", i2), process.on("exit", g), m2 && m2.addEventListener("abort", i2);
3298
- }, H = () => {
3299
- process.removeListener("uncaughtExceptionMonitor", f), process.removeListener("unhandledRejection", f), process.removeListener("SIGINT", i2), process.removeListener("SIGTERM", i2), process.removeListener("exit", g), m2 && m2.removeEventListener("abort", i2);
3300
- }, y2 = () => {
3301
- if (p === void 0) return;
3507
+ const u3 = isCI(), h2 = isAccessible(E.accessible);
3508
+ let x, I, p = false, l = false, r2 = "", v, w = performance.now();
3509
+ const y = getColumns(n3), F2 = E?.styleFrame ?? Z, S = (e) => {
3510
+ const s = e > 1 ? C3 ?? settings.messages.error : _ ?? settings.messages.cancel;
3511
+ l = e === 1, p && (m2(s, e), l && typeof b == "function" && b());
3512
+ }, $ = () => S(2), a2 = () => S(1), H = () => {
3513
+ process.on("uncaughtExceptionMonitor", $), process.on("unhandledRejection", $), process.on("SIGINT", a2), process.on("SIGTERM", a2), process.on("exit", S), g && g.addEventListener("abort", a2);
3514
+ }, B = () => {
3515
+ process.removeListener("uncaughtExceptionMonitor", $), process.removeListener("unhandledRejection", $), process.removeListener("SIGINT", a2), process.removeListener("SIGTERM", a2), process.removeListener("exit", S), g && g.removeEventListener("abort", a2);
3516
+ }, R2 = () => {
3517
+ if (v === void 0) return;
3302
3518
  u3 && n3.write(`
3303
3519
  `);
3304
- const r2 = wrapAnsi(p, x, {
3520
+ const s = wrapAnsi(v, y, {
3305
3521
  hard: true,
3306
3522
  trim: false
3307
3523
  }).split(`
3308
3524
  `);
3309
- r2.length > 1 && n3.write(import_sisteransi2.cursor.up(r2.length - 1)), n3.write(import_sisteransi2.cursor.to(0)), n3.write(import_sisteransi2.erase.down());
3310
- }, C2 = (e) => e.replace(/\.+$/, ""), _ = (e) => {
3311
- const r2 = (performance.now() - e) / 1e3, t2 = Math.floor(r2 / 60), o = Math.floor(r2 % 60);
3312
- return t2 > 0 ? `[${t2}m ${o}s]` : `[${o}s]`;
3313
- }, N2 = I2.withGuide ?? settings.withGuide, P = (e = "") => {
3314
- d = true, M = block({ output: n3 }), s = C2(e), w = performance.now(), N2 && n3.write(`${styleText2("gray", S_BAR)}
3525
+ s.length > 1 && n3.write(cursor.up(s.length - 1)), n3.write(cursor.to(0)), n3.write(erase.down());
3526
+ }, L = (e) => e.replace(/\.+$/, ""), T = (e) => {
3527
+ const s = (performance.now() - e) / 1e3, i2 = Math.floor(s / 60), t2 = Math.floor(s % 60);
3528
+ return i2 > 0 ? `[${i2}m ${t2}s]` : `[${t2}s]`;
3529
+ }, N2 = E.withGuide ?? settings.withGuide, P = (e = "") => {
3530
+ if (p = true, l = false, r2 = L(e), w = performance.now(), H(), h2) {
3531
+ r2 !== "" && n3.write(`${r2}
3532
+ `), I = setInterval(() => {
3533
+ n3.write(r2 === "" ? `still working
3534
+ ` : `still working: ${r2}
3315
3535
  `);
3316
- let r2 = 0, t2 = 0;
3317
- A(), T = setInterval(() => {
3318
- if (u3 && s === p)
3536
+ }, Y);
3537
+ return;
3538
+ }
3539
+ x = block({ output: n3 }), N2 && n3.write(`${styleText2("gray", S_BAR)}
3540
+ `);
3541
+ let s = 0, i2 = 0;
3542
+ I = setInterval(() => {
3543
+ if (u3 && r2 === v)
3319
3544
  return;
3320
- y2(), p = s;
3321
- const o = k(E[r2]);
3322
- let v;
3545
+ R2(), v = r2;
3546
+ const t2 = F2(M[s]);
3547
+ let o;
3323
3548
  if (u3)
3324
- v = `${o} ${s}...`;
3325
- else if (l2 === "timer")
3326
- v = `${o} ${s} ${_(w)}`;
3549
+ o = `${t2} ${r2}...`;
3550
+ else if (c3 === "timer")
3551
+ o = `${t2} ${r2} ${T(w)}`;
3327
3552
  else {
3328
- const B = ".".repeat(Math.floor(t2)).slice(0, 3);
3329
- v = `${o} ${s}${B}`;
3553
+ const j = ".".repeat(Math.floor(i2)).slice(0, 3);
3554
+ o = `${t2} ${r2}${j}`;
3330
3555
  }
3331
- const j = wrapAnsi(v, x, {
3556
+ const D = wrapAnsi(o, y, {
3332
3557
  hard: true,
3333
3558
  trim: false
3334
3559
  });
3335
- n3.write(j), r2 = r2 + 1 < E.length ? r2 + 1 : 0, t2 = t2 < 4 ? t2 + 0.125 : 0;
3336
- }, F2);
3337
- }, a2 = (e = "", r2 = 0, t2 = false) => {
3338
- if (!d) return;
3339
- d = false, clearInterval(T), y2();
3340
- const o = r2 === 0 ? styleText2("green", S_STEP_SUBMIT) : r2 === 1 ? styleText2("red", S_STEP_CANCEL) : styleText2("red", S_STEP_ERROR);
3341
- s = e ?? s, t2 || (l2 === "timer" ? n3.write(`${o} ${s} ${_(w)}
3342
- `) : n3.write(`${o} ${s}
3343
- `)), H(), M();
3560
+ n3.write(D), s = s + 1 < M.length ? s + 1 : 0, i2 = i2 < 4 ? i2 + 0.125 : 0;
3561
+ }, O);
3562
+ }, m2 = (e = "", s = 0, i2 = false) => {
3563
+ if (p) {
3564
+ if (p = false, l = s === 1, clearInterval(I), h2 || R2(), r2 = e ?? r2, !i2)
3565
+ if (h2) {
3566
+ const t2 = s === 1 ? _ ?? settings.messages.cancel : s === 2 ? C3 ?? settings.messages.error : "Done", o = r2 || t2;
3567
+ c3 === "timer" ? n3.write(`${o} ${T(w)}
3568
+ `) : n3.write(`${o}
3569
+ `);
3570
+ } else {
3571
+ const t2 = s === 0 ? styleText2("green", S_STEP_SUBMIT) : s === 1 ? styleText2("red", S_STEP_CANCEL) : styleText2("red", S_STEP_ERROR);
3572
+ c3 === "timer" ? n3.write(`${t2} ${r2} ${T(w)}
3573
+ `) : n3.write(`${t2} ${r2}
3574
+ `);
3575
+ }
3576
+ B(), x?.();
3577
+ }
3344
3578
  };
3345
3579
  return {
3346
3580
  start: P,
3347
- stop: (e = "") => a2(e, 0),
3581
+ stop: (e = "") => m2(e, 0),
3348
3582
  message: (e = "") => {
3349
- s = C2(e ?? s);
3583
+ r2 = L(e ?? r2);
3350
3584
  },
3351
- cancel: (e = "") => a2(e, 1),
3352
- error: (e = "") => a2(e, 2),
3353
- clear: () => a2("", 0, true),
3585
+ cancel: (e = "") => m2(e, 1),
3586
+ error: (e = "") => m2(e, 2),
3587
+ clear: () => m2("", 0, true),
3354
3588
  get isCancelled() {
3355
- return S;
3589
+ return l;
3356
3590
  }
3357
3591
  };
3358
3592
  };
@@ -3365,7 +3599,7 @@ var SELECT_INSTRUCTIONS = [
3365
3599
  `${styleText2("dim", "\u2191/\u2193")} to navigate`,
3366
3600
  `${styleText2("dim", "Enter:")} confirm`
3367
3601
  ];
3368
- var c = (t2, o) => t2.includes(`
3602
+ var c2 = (t2, o) => t2.includes(`
3369
3603
  `) ? t2.split(`
3370
3604
  `).map((d) => o(d)).join(`
3371
3605
  `) : o(t2);
@@ -3376,15 +3610,15 @@ var select = (t2) => {
3376
3610
  const s = n3.label ?? String(n3.value);
3377
3611
  switch (m2) {
3378
3612
  case "disabled":
3379
- return `${styleText2("gray", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("gray", i2))}${n3.hint ? ` ${styleText2("dim", `(${n3.hint ?? "disabled"})`)}` : ""}`;
3613
+ return `${styleText2("gray", S_RADIO_INACTIVE)} ${c2(s, (i2) => styleText2("gray", i2))}${n3.hint ? ` ${styleText2("dim", `(${n3.hint ?? "disabled"})`)}` : ""}`;
3380
3614
  case "selected":
3381
- return `${c(s, (i2) => styleText2("dim", i2))}`;
3615
+ return `${c2(s, (i2) => styleText2("dim", i2))}`;
3382
3616
  case "active":
3383
3617
  return `${styleText2("green", S_RADIO_ACTIVE)} ${s}${n3.hint ? ` ${styleText2("dim", `(${n3.hint})`)}` : ""}`;
3384
3618
  case "cancelled":
3385
- return `${c(s, (i2) => styleText2(["strikethrough", "dim"], i2))}`;
3619
+ return `${c2(s, (i2) => styleText2(["strikethrough", "dim"], i2))}`;
3386
3620
  default:
3387
- return `${styleText2("dim", S_RADIO_INACTIVE)} ${c(s, (i2) => styleText2("dim", i2))}`;
3621
+ return `${styleText2("dim", S_RADIO_INACTIVE)} ${c2(s, (i2) => styleText2("dim", i2))}`;
3388
3622
  }
3389
3623
  }, d = t2.showInstructions ?? true;
3390
3624
  return new n$1({
@@ -3422,7 +3656,7 @@ ${styleText2("gray", S_BAR)}` : ""}`;
3422
3656
  }
3423
3657
  default: {
3424
3658
  const r2 = n3 ? `${styleText2("cyan", S_BAR)} ` : "", a2 = u3.split(`
3425
- `).length, p = d ? formatInstructionFooter(SELECT_INSTRUCTIONS, n3) : n3 ? [styleText2("cyan", S_BAR_END)] : [], f = p.join(`
3659
+ `).length, p = d ? formatInstructionFooter(t2.output, SELECT_INSTRUCTIONS, n3) : n3 ? [styleText2("cyan", S_BAR_END)] : [], f = p.join(`
3426
3660
  `), b = p.length + 1;
3427
3661
  return `${u3}${r2}${limitOptions({
3428
3662
  output: t2.output,
@@ -3451,7 +3685,7 @@ var text = (t2) => new n2({
3451
3685
  signal: t2.signal,
3452
3686
  input: t2.input,
3453
3687
  render() {
3454
- const r2 = t2?.withGuide ?? settings.withGuide, l2 = `${`${r2 ? `${styleText2("gray", S_BAR)}
3688
+ const r2 = t2?.withGuide ?? settings.withGuide, l = `${`${r2 ? `${styleText2("gray", S_BAR)}
3455
3689
  ` : ""}${symbol(this.state)} `}${t2.message}
3456
3690
  `, d = t2.placeholder && t2.placeholder.length > 0 ? (
3457
3691
  // biome-ignore lint/style/noNonNullAssertion: guarded by placeholder.length > 0
@@ -3459,30 +3693,30 @@ var text = (t2) => new n2({
3459
3693
  ) : styleText2(["inverse", "hidden"], "_"), o = this.userInput ? this.userInputWithCursor : d, s = this.value ?? "";
3460
3694
  switch (this.state) {
3461
3695
  case "validating": {
3462
- const n3 = r2 ? `${styleText2("cyan", S_BAR)} ` : "", i2 = r2 ? styleText2("cyan", S_BAR_END) : "", c2 = styleText2("dim", o), $ = styleText2("dim", "Validating...");
3463
- return `${l2}${n3}${c2}
3696
+ const n3 = r2 ? `${styleText2("cyan", S_BAR)} ` : "", i2 = r2 ? styleText2("cyan", S_BAR_END) : "", c3 = styleText2("dim", o), $ = styleText2("dim", "Validating...");
3697
+ return `${l}${n3}${c3}
3464
3698
  ${i2} ${$}
3465
3699
  `;
3466
3700
  }
3467
3701
  case "error": {
3468
- const n3 = this.error ? ` ${styleText2("yellow", this.error)}` : "", i2 = r2 ? `${styleText2("yellow", S_BAR)} ` : "", c2 = r2 ? styleText2("yellow", S_BAR_END) : "";
3469
- return `${l2.trim()}
3702
+ const n3 = this.error ? ` ${styleText2("yellow", this.error)}` : "", i2 = r2 ? `${styleText2("yellow", S_BAR)} ` : "", c3 = r2 ? styleText2("yellow", S_BAR_END) : "";
3703
+ return `${l.trim()}
3470
3704
  ${i2}${o}
3471
- ${c2}${n3}
3705
+ ${c3}${n3}
3472
3706
  `;
3473
3707
  }
3474
3708
  case "submit": {
3475
3709
  const n3 = s ? `${r2 ? " " : ""}${styleText2("dim", s)}` : "", i2 = r2 ? styleText2("gray", S_BAR) : "";
3476
- return `${l2}${i2}${n3}`;
3710
+ return `${l}${i2}${n3}`;
3477
3711
  }
3478
3712
  case "cancel": {
3479
3713
  const n3 = s ? ` ${styleText2(["strikethrough", "dim"], s)}` : "", i2 = r2 ? styleText2("gray", S_BAR) : "";
3480
- return `${l2}${i2}${n3}${s.trim() ? `
3714
+ return `${l}${i2}${n3}${s.trim() ? `
3481
3715
  ${i2}` : ""}`;
3482
3716
  }
3483
3717
  default: {
3484
3718
  const n3 = r2 ? `${styleText2("cyan", S_BAR)} ` : "", i2 = r2 ? styleText2("cyan", S_BAR_END) : "";
3485
- return `${l2}${n3}${o}
3719
+ return `${l}${n3}${o}
3486
3720
  ${i2}
3487
3721
  `;
3488
3722
  }
@@ -3510,11 +3744,11 @@ var PREPROCESSOR_PKG = {
3510
3744
  };
3511
3745
  var TAILWIND_PKGS = ["tailwindcss", "@tailwindcss/vite"];
3512
3746
  var PKG_VERSION = {
3513
- sass: "^1.106.1",
3747
+ sass: "^1.108.2",
3514
3748
  less: "^4.9.1",
3515
3749
  stylus: "^0.64.0",
3516
- tailwindcss: "^4.3.3",
3517
- "@tailwindcss/vite": "^4.3.3"
3750
+ tailwindcss: "^4.3.5",
3751
+ "@tailwindcss/vite": "^4.3.5"
3518
3752
  };
3519
3753
  var TAILWIND_ENTRY = "styles/tailwind.css";
3520
3754
  var TAILWIND_CSS = `@import 'tailwindcss';
@@ -3555,12 +3789,12 @@ function setStyleImports(source, f) {
3555
3789
  );
3556
3790
  const block2 = styleImportLines(f).join("\n") + "\n";
3557
3791
  const lines = stripped.split("\n");
3558
- const routesIdx = lines.findIndex((l2) => /from\s+['"]toiljs\/routes['"]/.test(l2));
3792
+ const routesIdx = lines.findIndex((l) => /from\s+['"]toiljs\/routes['"]/.test(l));
3559
3793
  let insertAt;
3560
3794
  if (routesIdx !== -1) {
3561
3795
  insertAt = routesIdx + 1;
3562
3796
  } else {
3563
- const lastImport = lines.reduce((acc, l2, i2) => /^\s*import\s/.test(l2) ? i2 : acc, -1);
3797
+ const lastImport = lines.reduce((acc, l, i2) => /^\s*import\s/.test(l) ? i2 : acc, -1);
3564
3798
  insertAt = lastImport + 1;
3565
3799
  }
3566
3800
  const head = lines.slice(0, insertAt).join("\n");
@@ -3719,9 +3953,9 @@ function visibleWidth(s) {
3719
3953
  return s.replace(ANSI_RE2, "").length;
3720
3954
  }
3721
3955
  function box(lines, paint = (s) => s) {
3722
- const width = lines.reduce((w, l2) => Math.max(w, visibleWidth(l2)), 0);
3956
+ const width = lines.reduce((w, l) => Math.max(w, visibleWidth(l)), 0);
3723
3957
  const side = paint("\u2502");
3724
- const body = lines.map((l2) => ` ${side} ${l2}${" ".repeat(width - visibleWidth(l2))} ${side}`);
3958
+ const body = lines.map((l) => ` ${side} ${l}${" ".repeat(width - visibleWidth(l))} ${side}`);
3725
3959
  return [
3726
3960
  " " + paint(`\u256D${"\u2500".repeat(width + 4)}\u256E`),
3727
3961
  ...body,
@@ -3921,7 +4155,7 @@ function describe(from, to) {
3921
4155
  const { add, remove } = packageDiff(from, to);
3922
4156
  if (add.length) lines.push(`+ ${add.join(", ")}`);
3923
4157
  if (remove.length) lines.push(`- ${remove.join(", ")}`);
3924
- return lines.map((l2) => dim(" ") + l2).join("\n");
4158
+ return lines.map((l) => dim(" ") + l).join("\n");
3925
4159
  }
3926
4160
  async function runConfigure(opts2) {
3927
4161
  intro(accent(" toiljs configure "));
@@ -4026,10 +4260,10 @@ import {
4026
4260
 
4027
4261
  // src/cli/testing.ts
4028
4262
  var TEST_DEPENDENCIES = {
4029
- vitest: "^5.0.5",
4263
+ vitest: "^5.1.0",
4030
4264
  "@vitest/browser-webdriverio": "^5.0.0",
4031
- "@vitest/coverage-v8": "^5.0.5",
4032
- webdriverio: "^10.1.0"
4265
+ "@vitest/coverage-v8": "^5.1.0",
4266
+ webdriverio: "^10.2.0"
4033
4267
  };
4034
4268
  var TEST_SCRIPTS = {
4035
4269
  test: "toiljs test",
@@ -4082,12 +4316,15 @@ function testingFiles() {
4082
4316
  "tests/TestCounter.browser.test.tsx": [
4083
4317
  "import { afterEach, expect, test } from 'vitest';",
4084
4318
  "import { page } from 'vitest/browser';",
4319
+ "import { act } from 'react';",
4085
4320
  "import { createRoot, type Root } from 'react-dom/client';",
4086
4321
  "import { TestCounter } from '../client/components/TestCounter';",
4087
4322
  "",
4088
4323
  "let root: Root | null = null;",
4089
- "afterEach((): void => {",
4090
- " root?.unmount();",
4324
+ "afterEach(async (): Promise<void> => {",
4325
+ " await act(async (): Promise<void> => {",
4326
+ " root?.unmount();",
4327
+ " });",
4091
4328
  " root = null;",
4092
4329
  " document.body.replaceChildren();",
4093
4330
  "});",
@@ -4095,10 +4332,15 @@ function testingFiles() {
4095
4332
  "test('increments when clicked in a real browser', async (): Promise<void> => {",
4096
4333
  " const host: HTMLDivElement = document.createElement('div');",
4097
4334
  " document.body.append(host);",
4098
- " root = createRoot(host);",
4099
- " root.render(<TestCounter />);",
4335
+ " const mounted: Root = createRoot(host);",
4336
+ " root = mounted;",
4337
+ " await act(async (): Promise<void> => {",
4338
+ " mounted.render(<TestCounter />);",
4339
+ " });",
4100
4340
  " await expect.element(page.getByRole('link', { name: 'Home' })).toHaveAttribute('href', '/');",
4101
- " await page.getByRole('button', { name: 'Count: 0' }).click();",
4341
+ " await act(async (): Promise<void> => {",
4342
+ " await page.getByRole('button', { name: 'Count: 0' }).click();",
4343
+ " });",
4102
4344
  " await expect.element(page.getByRole('button', { name: 'Count: 1' })).toBeVisible();",
4103
4345
  "});",
4104
4346
  ""
@@ -4153,10 +4395,10 @@ function scaffold(name, template, features, aiTools, images) {
4153
4395
  ...TEST_DEPENDENCIES,
4154
4396
  "@types/react": "^19.3.0",
4155
4397
  "@types/react-dom": "^19.3.0",
4156
- oxlint: "^1.89.0",
4157
- "oxlint-tsgolint": "^7.0.2004",
4158
- prettier: "^3.9.10",
4159
- toilscript: ">=0.1.67",
4398
+ oxlint: "^1.94.0",
4399
+ "oxlint-tsgolint": "^7.0.2007",
4400
+ prettier: "^3.10.1",
4401
+ toilscript: ">=0.1.68",
4160
4402
  typescript: "^7.0.2"
4161
4403
  };
4162
4404
  for (const dep of requiredPackages(features).sort()) {
@@ -4198,8 +4440,8 @@ function scaffold(name, template, features, aiTools, images) {
4198
4440
  ".prettierrc": '"toiljs/prettier"\n',
4199
4441
  // Generated files don't need formatting. (toilscript server decorators like @main /
4200
4442
  // @remote-on-functions are handled by the toiljs/prettier-plugin, so server/ is not ignored.)
4201
- ".prettierignore": "node_modules\nbuild\n.toil\ncoverage\n.vitest\nshared/server.ts\ntoil-env.d.ts\ntoil-routes.d.ts\nserver/_emails.ts\nserver/_ssr/\nserver/toil-server-env.d.ts\n",
4202
- ".gitignore": "node_modules\nbuild\n.toil\ncoverage\n.vitest\nshared/server.ts\ntoil-env.d.ts\ntoil-routes.d.ts\nserver/_ssr/\nhosts/*/_tmpl/\n# Local dev env vars/secrets (never commit)\n.env\n.env.secrets\n",
4443
+ ".prettierignore": "node_modules\nbuild\n.toil\ncoverage\n.vitest\nshared/server.ts\ntoil-env.d.ts\ntoil-routes.d.ts\nserver/_emails.ts\nserver/_ssr/\nserver/toil-server-env.d.ts\nserver/toilscript.*.generated.d.ts\n",
4444
+ ".gitignore": "node_modules\nbuild\n.toil\ncoverage\n.vitest\nshared/server.ts\ntoil-env.d.ts\ntoil-routes.d.ts\nserver/_ssr/\nserver/toilscript.*.generated.d.ts\nhosts/*/_tmpl/\n# Local dev env vars/secrets (never commit)\n.env\n.env.secrets\n",
4203
4445
  // Use the native TypeScript 7 language server.
4204
4446
  ".vscode/settings.json": JSON.stringify(
4205
4447
  {
@@ -4390,7 +4632,7 @@ function clientShell(name, features) {
4390
4632
  return files;
4391
4633
  }
4392
4634
  function layoutTsx(name, nav) {
4393
- const links = nav.map((l2) => ` <Toil.Link href="${l2.href}">${l2.label}</Toil.Link>`).join("\n");
4635
+ const links = nav.map((l) => ` <Toil.Link href="${l.href}">${l.label}</Toil.Link>`).join("\n");
4394
4636
  return `import { type ReactNode } from 'react';
4395
4637
 
4396
4638
  export default function Layout({ children }: { children?: ReactNode }) {
@@ -4678,7 +4920,7 @@ async function runCreate(opts2) {
4678
4920
  steps.push(`${accent("npm run test:browser")} ${dim("run the starter browser test")}`);
4679
4921
  steps.push("Install the Oxc plugin for VS Code or WebStorm (README.md \u2192 Editor setup)");
4680
4922
  steps.push("WebStorm: Settings \u2192 Tools \u2192 Oxlint \u2192 Enable type aware rules");
4681
- note(steps.map((l2) => dim(" ") + l2).join("\n"), "Next steps");
4923
+ note(steps.map((l) => dim(" ") + l).join("\n"), "Next steps");
4682
4924
  outro(`Created ${accent(path4.basename(name))}, happy building! ${dim("(v" + version() + ")")}`);
4683
4925
  }
4684
4926
 
@@ -4840,11 +5082,11 @@ function parseVersion(v) {
4840
5082
  return [Number(m2[1]), Number(m2[2] ?? 0), Number(m2[3] ?? 0)];
4841
5083
  }
4842
5084
  function satisfiesMin(version2, range) {
4843
- const [a2, b, c2] = parseVersion(version2);
4844
- const [x, y2, z] = parseVersion(range);
5085
+ const [a2, b, c3] = parseVersion(version2);
5086
+ const [x, y, z] = parseVersion(range);
4845
5087
  if (a2 !== x) return a2 > x;
4846
- if (b !== y2) return b > y2;
4847
- return c2 >= z;
5088
+ if (b !== y) return b > y;
5089
+ return c3 >= z;
4848
5090
  }
4849
5091
  function checkNode(current, requiredRange) {
4850
5092
  const ok = satisfiesMin(current, requiredRange);
@@ -5136,7 +5378,7 @@ function checkWasmBuilt(exists) {
5136
5378
  fix: "Run your server build (toilscript) before toiljs start."
5137
5379
  };
5138
5380
  }
5139
- var RPC_TOILSCRIPT_MIN = "0.1.67";
5381
+ var RPC_TOILSCRIPT_MIN = "0.1.68";
5140
5382
  function checkRpcWiring(f) {
5141
5383
  const missing = [];
5142
5384
  if (!f.toilscriptOk) missing.push(`toilscript >=${RPC_TOILSCRIPT_MIN}`);
@@ -6267,15 +6509,15 @@ function split(lst, le = false) {
6267
6509
  let Ah = new Uint32Array(len);
6268
6510
  let Al = new Uint32Array(len);
6269
6511
  for (let i2 = 0; i2 < len; i2++) {
6270
- const { h: h2, l: l2 } = fromBig(lst[i2], le);
6271
- [Ah[i2], Al[i2]] = [h2, l2];
6512
+ const { h: h2, l } = fromBig(lst[i2], le);
6513
+ [Ah[i2], Al[i2]] = [h2, l];
6272
6514
  }
6273
6515
  return [Ah, Al];
6274
6516
  }
6275
- var rotlSH = (h2, l2, s) => h2 << s | l2 >>> 32 - s;
6276
- var rotlSL = (h2, l2, s) => l2 << s | h2 >>> 32 - s;
6277
- var rotlBH = (h2, l2, s) => l2 << s - 32 | h2 >>> 64 - s;
6278
- var rotlBL = (h2, l2, s) => h2 << s - 32 | l2 >>> 64 - s;
6517
+ var rotlSH = (h2, l, s) => h2 << s | l >>> 32 - s;
6518
+ var rotlSL = (h2, l, s) => l << s | h2 >>> 32 - s;
6519
+ var rotlBH = (h2, l, s) => l << s - 32 | h2 >>> 64 - s;
6520
+ var rotlBL = (h2, l, s) => h2 << s - 32 | l >>> 64 - s;
6279
6521
 
6280
6522
  // node_modules/@noble/hashes/utils.js
6281
6523
  function isBytes(a2) {
@@ -6373,9 +6615,9 @@ var _0x71n = BigInt(113);
6373
6615
  var SHA3_PI = [];
6374
6616
  var SHA3_ROTL = [];
6375
6617
  var _SHA3_IOTA = [];
6376
- for (let round = 0, R2 = _1n, x = 1, y2 = 0; round < 24; round++) {
6377
- [x, y2] = [y2, (2 * x + 3 * y2) % 5];
6378
- SHA3_PI.push(2 * (5 * y2 + x));
6618
+ for (let round = 0, R2 = _1n, x = 1, y = 0; round < 24; round++) {
6619
+ [x, y] = [y, (2 * x + 3 * y) % 5];
6620
+ SHA3_PI.push(2 * (5 * y + x));
6379
6621
  SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);
6380
6622
  let t2 = _0n;
6381
6623
  for (let j = 0; j < 7; j++) {
@@ -6388,8 +6630,8 @@ for (let round = 0, R2 = _1n, x = 1, y2 = 0; round < 24; round++) {
6388
6630
  var IOTAS = split(_SHA3_IOTA, true);
6389
6631
  var SHA3_IOTA_H = IOTAS[0];
6390
6632
  var SHA3_IOTA_L = IOTAS[1];
6391
- var rotlH = (h2, l2, s) => s > 32 ? rotlBH(h2, l2, s) : rotlSH(h2, l2, s);
6392
- var rotlL = (h2, l2, s) => s > 32 ? rotlBL(h2, l2, s) : rotlSL(h2, l2, s);
6633
+ var rotlH = (h2, l, s) => s > 32 ? rotlBH(h2, l, s) : rotlSH(h2, l, s);
6634
+ var rotlL = (h2, l, s) => s > 32 ? rotlBL(h2, l, s) : rotlSL(h2, l, s);
6393
6635
  function keccakP(s, rounds = 24) {
6394
6636
  anumber(rounds, "rounds");
6395
6637
  if (rounds < 1 || rounds > 24)
@@ -6405,9 +6647,9 @@ function keccakP(s, rounds = 24) {
6405
6647
  const B1 = B[idx0 + 1];
6406
6648
  const Th = rotlH(B0, B1, 1) ^ B[idx1];
6407
6649
  const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];
6408
- for (let y2 = 0; y2 < 50; y2 += 10) {
6409
- s[x + y2] ^= Th;
6410
- s[x + y2 + 1] ^= Tl;
6650
+ for (let y = 0; y < 50; y += 10) {
6651
+ s[x + y] ^= Th;
6652
+ s[x + y + 1] ^= Tl;
6411
6653
  }
6412
6654
  }
6413
6655
  let curH = s[2];
@@ -6422,18 +6664,18 @@ function keccakP(s, rounds = 24) {
6422
6664
  s[PI] = Th;
6423
6665
  s[PI + 1] = Tl;
6424
6666
  }
6425
- for (let y2 = 0; y2 < 50; y2 += 10) {
6426
- const b0 = s[y2], b1 = s[y2 + 1], b2 = s[y2 + 2], b3 = s[y2 + 3];
6427
- s[y2] ^= ~s[y2 + 2] & s[y2 + 4];
6428
- s[y2 + 1] ^= ~s[y2 + 3] & s[y2 + 5];
6429
- s[y2 + 2] ^= ~s[y2 + 4] & s[y2 + 6];
6430
- s[y2 + 3] ^= ~s[y2 + 5] & s[y2 + 7];
6431
- s[y2 + 4] ^= ~s[y2 + 6] & s[y2 + 8];
6432
- s[y2 + 5] ^= ~s[y2 + 7] & s[y2 + 9];
6433
- s[y2 + 6] ^= ~s[y2 + 8] & b0;
6434
- s[y2 + 7] ^= ~s[y2 + 9] & b1;
6435
- s[y2 + 8] ^= ~b0 & b2;
6436
- s[y2 + 9] ^= ~b1 & b3;
6667
+ for (let y = 0; y < 50; y += 10) {
6668
+ const b0 = s[y], b1 = s[y + 1], b2 = s[y + 2], b3 = s[y + 3];
6669
+ s[y] ^= ~s[y + 2] & s[y + 4];
6670
+ s[y + 1] ^= ~s[y + 3] & s[y + 5];
6671
+ s[y + 2] ^= ~s[y + 4] & s[y + 6];
6672
+ s[y + 3] ^= ~s[y + 5] & s[y + 7];
6673
+ s[y + 4] ^= ~s[y + 6] & s[y + 8];
6674
+ s[y + 5] ^= ~s[y + 7] & s[y + 9];
6675
+ s[y + 6] ^= ~s[y + 8] & b0;
6676
+ s[y + 7] ^= ~s[y + 9] & b1;
6677
+ s[y + 8] ^= ~b0 & b2;
6678
+ s[y + 9] ^= ~b1 & b3;
6437
6679
  }
6438
6680
  s[0] ^= SHA3_IOTA_H[round];
6439
6681
  s[1] ^= SHA3_IOTA_L[round];
@@ -6685,39 +6927,39 @@ function copyBytes(bytes) {
6685
6927
  return Uint8Array.from(abytes(bytes));
6686
6928
  }
6687
6929
  function splitCoder(label, ...lengths) {
6688
- const getLength = (c2) => typeof c2 === "number" ? c2 : c2.bytesLen;
6930
+ const getLength = (c3) => typeof c3 === "number" ? c3 : c3.bytesLen;
6689
6931
  const bytesLen = lengths.reduce((sum, a2) => sum + getLength(a2), 0);
6690
6932
  return {
6691
6933
  bytesLen,
6692
6934
  encode: (bufs) => {
6693
6935
  const res = new Uint8Array(bytesLen);
6694
6936
  for (let i2 = 0, pos = 0; i2 < lengths.length; i2++) {
6695
- const c2 = lengths[i2];
6696
- const l2 = getLength(c2);
6697
- const b = typeof c2 === "number" ? bufs[i2] : c2.encode(bufs[i2]);
6698
- abytes(b, l2, label);
6937
+ const c3 = lengths[i2];
6938
+ const l = getLength(c3);
6939
+ const b = typeof c3 === "number" ? bufs[i2] : c3.encode(bufs[i2]);
6940
+ abytes(b, l, label);
6699
6941
  res.set(b, pos);
6700
- if (typeof c2 !== "number")
6942
+ if (typeof c3 !== "number")
6701
6943
  b.fill(0);
6702
- pos += l2;
6944
+ pos += l;
6703
6945
  }
6704
6946
  return res;
6705
6947
  },
6706
6948
  decode: (buf) => {
6707
6949
  abytes(buf, bytesLen, label);
6708
6950
  const res = [];
6709
- for (const c2 of lengths) {
6710
- const l2 = getLength(c2);
6711
- const b = buf.subarray(0, l2);
6712
- res.push(typeof c2 === "number" ? b : c2.decode(b));
6713
- buf = buf.subarray(l2);
6951
+ for (const c3 of lengths) {
6952
+ const l = getLength(c3);
6953
+ const b = buf.subarray(0, l);
6954
+ res.push(typeof c3 === "number" ? b : c3.decode(b));
6955
+ buf = buf.subarray(l);
6714
6956
  }
6715
6957
  return res;
6716
6958
  }
6717
6959
  };
6718
6960
  }
6719
- function vecCoder(c2, vecLen) {
6720
- const coder = c2;
6961
+ function vecCoder(c3, vecLen) {
6962
+ const coder = c3;
6721
6963
  const bytesLen = vecLen * coder.bytesLen;
6722
6964
  return {
6723
6965
  bytesLen,
@@ -6808,7 +7050,7 @@ var genCrystals = (opts2) => {
6808
7050
  return r2;
6809
7051
  }
6810
7052
  };
6811
- const bitsCoder = (d, c2) => {
7053
+ const bitsCoder = (d, c3) => {
6812
7054
  const mask = getMask(d);
6813
7055
  const bytesLen = d * (N2 / 8);
6814
7056
  return {
@@ -6817,7 +7059,7 @@ var genCrystals = (opts2) => {
6817
7059
  const poly = poly_;
6818
7060
  const r2 = new Uint8Array(bytesLen);
6819
7061
  for (let i2 = 0, buf = 0, bufLen = 0, pos = 0; i2 < poly.length; i2++) {
6820
- buf |= (c2.encode(poly[i2]) & mask) << bufLen;
7062
+ buf |= (c3.encode(poly[i2]) & mask) << bufLen;
6821
7063
  bufLen += d;
6822
7064
  for (; bufLen >= 8; bufLen -= 8, buf >>= 8)
6823
7065
  r2[pos++] = buf & getMask(bufLen);
@@ -6830,7 +7072,7 @@ var genCrystals = (opts2) => {
6830
7072
  buf |= bytes[i2] << bufLen;
6831
7073
  bufLen += 8;
6832
7074
  for (; bufLen >= d; bufLen -= d, buf >>= d)
6833
- r2[pos++] = c2.decode(buf & mask);
7075
+ r2[pos++] = c3.decode(buf & mask);
6834
7076
  }
6835
7077
  return r2;
6836
7078
  }
@@ -6859,9 +7101,9 @@ var createXofShake = (shake) => (seed, blockLen) => {
6859
7101
  let xofs = 0;
6860
7102
  return {
6861
7103
  stats: () => ({ calls, xofs }),
6862
- get: (x, y2) => {
7104
+ get: (x, y) => {
6863
7105
  _seed[seedLen + 0] = x;
6864
- _seed[seedLen + 1] = y2;
7106
+ _seed[seedLen + 1] = y;
6865
7107
  h2.destroy();
6866
7108
  h2 = shake.create({}).update(_seed);
6867
7109
  calls++;