poof 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <h2 align="center">
2
- <img width="240" src=".github/logo.png">
2
+ <img width="240" src=".github/logo.webp">
3
3
  <br><br>
4
4
  <a href="https://npm.im/poof"><img src="https://badgen.net/npm/v/poof"></a> <a href="https://npm.im/poof"><img src="https://badgen.net/npm/dm/poof"></a> <a href="https://packagephobia.now.sh/result?p=poof"><img src="https://packagephobia.now.sh/badge?p=poof"></a>
5
5
  </h2>
@@ -34,16 +34,16 @@ npm install -g poof
34
34
 
35
35
  ```sh
36
36
  # Delete files or directories
37
- poof node_modules dist
37
+ $ poof node_modules dist
38
38
 
39
39
  # Use glob patterns
40
- poof "*.log" "temp-*"
40
+ $ poof "*.log" "temp-*"
41
41
 
42
42
  # Recursive match with ** (searches all subdirectories)
43
- poof "**/node_modules" "**/dist"
43
+ $ poof "**/node_modules" "**/dist"
44
44
 
45
45
  # Verbose output
46
- poof --verbose ./large-directory
46
+ $ poof --verbose ./large-directory
47
47
  ```
48
48
 
49
49
  ### Options
@@ -246,3 +246,8 @@ Node.js >= 20.19.6
246
246
  ## License
247
247
 
248
248
  MIT
249
+
250
+ <br>
251
+ <p align="center">
252
+ <img width="830" src=".github/banner.webp">
253
+ </p>
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import path from 'node:path';
3
- import N$1 from 'tty';
3
+ import S$1 from 'tty';
4
4
  import poof from './index.mjs';
5
5
  import 'node:fs/promises';
6
6
  import 'node:os';
@@ -8,471 +8,490 @@ import 'node:child_process';
8
8
  import 'node:url';
9
9
  import 'node:timers/promises';
10
10
 
11
- const V$2 = "known-flag", k$2 = "unknown-flag", C$1 = "argument", { stringify: h } = JSON, O$1 = /\B([A-Z])/g, v$1 = (t) => t.replace(O$1, "-$1").toLowerCase(), { hasOwnProperty: D$1 } = Object.prototype, w$2 = (t, n) => D$1.call(t, n), L$2 = (t) => Array.isArray(t), b$2 = (t) => typeof t == "function" ? [t, false] : L$2(t) ? [t[0], true] : b$2(t.type), d$2 = (t, n) => t === Boolean ? n !== "false" : n, m$1 = (t, n) => typeof n == "boolean" ? n : t === Number && n === "" ? Number.NaN : t(n), R$2 = /[\s.:=]/, B = (t) => {
12
- const n = `Flag name ${h(t)}`;
13
- if (t.length === 0) throw new Error(`${n} cannot be empty`);
14
- if (t.length === 1) throw new Error(`${n} must be longer than a character`);
15
- const r = t.match(R$2);
16
- if (r) throw new Error(`${n} cannot contain ${h(r?.[0])}`);
17
- }, K$1 = (t) => {
18
- const n = {}, r = (e, o) => {
19
- if (w$2(n, e)) throw new Error(`Duplicate flags named ${h(e)}`);
20
- n[e] = o;
21
- };
22
- for (const e in t) {
23
- if (!w$2(t, e)) continue;
24
- B(e);
25
- const o = t[e], s = [[], ...b$2(o), o];
26
- r(e, s);
27
- const i = v$1(e);
28
- if (e !== i && r(i, s), "alias" in o && typeof o.alias == "string") {
29
- const { alias: a } = o, l = `Flag alias ${h(a)} for flag ${h(e)}`;
30
- if (a.length === 0) throw new Error(`${l} cannot be empty`);
31
- if (a.length > 1) throw new Error(`${l} must be a single character`);
32
- r(a, s);
11
+ var O$2 = Object.defineProperty;
12
+ var a = (t, e) => O$2(t, "name", { value: e, configurable: true });
13
+ const P$1 = "known-flag", _$2 = "unknown-flag", D$1 = "argument", B$1 = /\B([A-Z])/g, G$2 = a((t) => t.replaceAll(B$1, "-$1").toLowerCase(), "camelToKebab"), { hasOwnProperty: K$2 } = Object.prototype, h$1 = a((t, e) => K$2.call(t, e), "hasOwn"), F$1 = a((t) => typeof t == "function" ? [t, false] : Array.isArray(t) ? [t[0], true] : F$1(t.type), "parseFlagType"), $$2 = a((t, e) => t === Boolean ? e !== "false" : e, "normalizeBoolean"), m$1 = a((t, e) => typeof e == "boolean" ? e : t === Number && e === "" ? Number.NaN : t(e), "applyParser"), R$2 = /[\s.:=]/, T$2 = a((t) => {
14
+ const e = `Flag name "${t}"`;
15
+ if (t.length === 0) throw new Error(`${e} cannot be empty`);
16
+ if (t.length === 1) throw new Error(`${e} must be longer than a character`);
17
+ const n = t.match(R$2);
18
+ if (n) throw new Error(`${e} cannot contain "${n?.[0]}"`);
19
+ }, "validateFlagName"), d$1 = a((t, e, n) => {
20
+ if (h$1(t, e)) throw new Error(`Duplicate flags named "${e}"`);
21
+ t[e] = n;
22
+ }, "setFlag"), U$2 = a((t) => {
23
+ const e = {};
24
+ for (const n in t) {
25
+ if (!h$1(t, n)) continue;
26
+ T$2(n);
27
+ const s = t[n], r = [[], ...F$1(s), s];
28
+ d$1(e, n, r);
29
+ const l = G$2(n);
30
+ if (n !== l && d$1(e, l, r), "alias" in s && typeof s.alias == "string") {
31
+ const { alias: o } = s, i = `Flag alias "${o}" for flag "${n}"`;
32
+ if (o.length === 0) throw new Error(`${i} cannot be empty`);
33
+ if (o.length > 1) throw new Error(`${i} must be a single character`);
34
+ d$1(e, o, r);
33
35
  }
34
36
  }
37
+ return e;
38
+ }, "createRegistry"), W$2 = a((t, e) => {
39
+ const n = {};
40
+ for (const s in t) {
41
+ if (!h$1(t, s)) continue;
42
+ const [r, , l, o] = e[s];
43
+ if (r.length === 0 && "default" in o) {
44
+ let { default: i } = o;
45
+ typeof i == "function" && (i = i()), n[s] = i;
46
+ } else n[s] = l ? r : r.pop();
47
+ }
35
48
  return n;
36
- }, _$2 = (t, n) => {
37
- const r = {};
38
- for (const e in t) {
39
- if (!w$2(t, e)) continue;
40
- const [o, , s, i] = n[e];
41
- if (o.length === 0 && "default" in i) {
42
- let { default: a } = i;
43
- typeof a == "function" && (a = a()), r[e] = a;
44
- } else r[e] = s ? o : o.pop();
45
- }
46
- return r;
47
- }, F$1 = "--", G$1 = /[.:=]/, T$2 = /^-{1,2}\w/, N = (t) => {
48
- if (!T$2.test(t)) return;
49
- const n = !t.startsWith(F$1);
50
- let r = t.slice(n ? 1 : 2), e;
51
- const o = r.match(G$1);
52
- if (o) {
53
- const { index: s } = o;
54
- e = r.slice(s + 1), r = r.slice(0, s);
55
- }
56
- return [r, e, n];
57
- }, $$1 = (t, { onFlag: n, onArgument: r }) => {
58
- let e;
59
- const o = (s, i) => {
60
- if (typeof e != "function") return true;
61
- e(s, i), e = void 0;
62
- };
63
- for (let s = 0; s < t.length; s += 1) {
64
- const i = t[s];
65
- if (i === F$1) {
66
- o();
67
- const l = t.slice(s + 1);
68
- r?.(l, [s], true);
49
+ }, "finalizeFlags"), A = "--", j$2 = 3, v$1 = /^-{1,2}\w/, V$2 = a((t) => {
50
+ if (!v$1.test(t)) return;
51
+ const e = !t.startsWith(A);
52
+ let n = t.slice(e ? 1 : 2), s, r = -1;
53
+ for (const l of ["=", ":", "."]) {
54
+ const o = n.indexOf(l);
55
+ o !== -1 && (r === -1 || o < r) && (r = o);
56
+ }
57
+ return r !== -1 && (s = n.slice(r + 1), n = n.slice(0, r)), [n, s, e];
58
+ }, "parseFlagArgv"), L$2 = a((t, { onFlag: e, onArgument: n }) => {
59
+ let s;
60
+ const r = a((l, o) => {
61
+ if (typeof s != "function") return true;
62
+ s(l, o), s = void 0;
63
+ }, "triggerValueCallback");
64
+ for (let l = 0; l < t.length; l += 1) {
65
+ const o = t[l];
66
+ if (o === A) {
67
+ r();
68
+ const c = t.slice(l + 1);
69
+ n?.(c, [l], true);
69
70
  break;
70
71
  }
71
- const a = N(i);
72
- if (a) {
73
- if (o(), !n) continue;
74
- const [l, f, g] = a;
75
- if (g) for (let c = 0; c < l.length; c += 1) {
76
- o();
77
- const u = c === l.length - 1;
78
- e = n(l[c], u ? f : void 0, [s, c + 1, u]);
72
+ const i = V$2(o);
73
+ if (i) {
74
+ if (r(), !e) continue;
75
+ const [c, f, w] = i;
76
+ if (w) for (let u = 0; u < c.length; u += 1) {
77
+ r();
78
+ const g = u === c.length - 1;
79
+ s = e(c[u], g ? f : void 0, [l, u + 1, g]);
79
80
  }
80
- else e = n(l, f, [s]);
81
- } else o(i, [s]) && r?.([i], [s]);
82
- }
83
- o();
84
- }, E = (t, n) => {
85
- for (const [r, e, o] of n.reverse()) {
86
- if (e) {
87
- const s = t[r];
88
- let i = s.slice(0, e);
89
- if (o || (i += s.slice(e + 1)), i !== "-") {
90
- t[r] = i;
81
+ else s = e(c, f, [l]);
82
+ } else r(o, [l]) && n?.([o], [l]);
83
+ }
84
+ r();
85
+ }, "argvIterator"), k$2 = a((t, e) => {
86
+ for (let n = e.length - 1; n >= 0; n -= 1) {
87
+ const [s, r, l] = e[n];
88
+ if (r) {
89
+ const o = t[s];
90
+ let i = o.slice(0, r);
91
+ if (l || (i += o.slice(r + 1)), i !== "-") {
92
+ t[s] = i;
91
93
  continue;
92
94
  }
93
95
  }
94
- t.splice(r, 1);
96
+ t.splice(s, 1);
95
97
  }
96
- }, U$2 = (t, n = process.argv.slice(2), { ignore: r } = {}) => {
97
- const e = [], o = K$1(t), s = {}, i = [];
98
- return i[F$1] = [], $$1(n, { onFlag(a, l, f) {
99
- const g = w$2(o, a);
100
- if (!r?.(g ? V$2 : k$2, a, l)) {
98
+ }, "spliceFromArgv"), z$2 = a((t, e = process.argv.slice(2), { ignore: n } = {}) => {
99
+ const s = [], r = U$2(t), l = {}, o = [];
100
+ return o[A] = [], L$2(e, { onFlag(i, c, f) {
101
+ const g = (f.length === j$2 || i.length > 1) && h$1(r, i);
102
+ if (!n?.(g ? P$1 : _$2, i, c)) {
101
103
  if (g) {
102
- const [c, u] = o[a], y = d$2(u, l), p = (P, A) => {
103
- e.push(f), A && e.push(A), c.push(m$1(u, P || ""));
104
- };
105
- return y === void 0 ? p : p(y);
104
+ const [y, p] = r[i], b = $$2(p, c), N = a((C, E) => {
105
+ s.push(f), E && s.push(E), y.push(m$1(p, C || ""));
106
+ }, "getFollowingValue");
107
+ return b === void 0 ? N : N(b);
106
108
  }
107
- w$2(s, a) || (s[a] = []), s[a].push(l === void 0 ? true : l), e.push(f);
108
- }
109
- }, onArgument(a, l, f) {
110
- r?.(C$1, n[l[0]]) || (i.push(...a), f ? (i[F$1] = a, n.splice(l[0])) : e.push(l));
111
- } }), E(n, e), { flags: _$2(t, o), unknownFlags: s, _: i };
112
- };
109
+ h$1(l, i) || (l[i] = []), l[i].push(c === void 0 ? true : c), s.push(f);
110
+ }
111
+ }, onArgument: a((i, c, f) => {
112
+ n?.(D$1, e[c[0]]) || (o.push(...i), f ? (o[A] = i, e.splice(c[0])) : s.push(c));
113
+ }, "onArgument") }), k$2(e, s), { flags: W$2(t, r), unknownFlags: l, _: o };
114
+ }, "typeFlag"); a((t, e, n = process.argv.slice(2)) => {
115
+ const s = new Set(t.split(",").map((c) => V$2(c)?.[0])), [r, l] = F$1(e), o = [], i = [];
116
+ return L$2(n, { onFlag: a((c, f, w) => {
117
+ if (!s.has(c) || !l && o.length > 0) return;
118
+ const u = $$2(r, f), g = a((y, p) => {
119
+ i.push(w), p && i.push(p), o.push(m$1(r, y || ""));
120
+ }, "getFollowingValue");
121
+ return u === void 0 ? g : g(u);
122
+ }, "onFlag") }), k$2(n, i), l ? o : o[0];
123
+ }, "getFlag");
113
124
 
114
- var DD = Object.create;
115
- var m = Object.defineProperty, uD = Object.defineProperties, FD = Object.getOwnPropertyDescriptor, CD = Object.getOwnPropertyDescriptors, tD = Object.getOwnPropertyNames, I$1 = Object.getOwnPropertySymbols, ED = Object.getPrototypeOf, L$1 = Object.prototype.hasOwnProperty, eD = Object.prototype.propertyIsEnumerable;
116
- var W$1 = (D, F, u) => F in D ? m(D, F, { enumerable: true, configurable: true, writable: true, value: u }) : D[F] = u, p = (D, F) => {
117
- for (var u in F || (F = {})) L$1.call(F, u) && W$1(D, u, F[u]);
118
- if (I$1) for (var u of I$1(F)) eD.call(F, u) && W$1(D, u, F[u]);
119
- return D;
120
- }, c = (D, F) => uD(D, CD(F)), nD = (D) => m(D, "__esModule", { value: true });
121
- var rD = (D, F) => () => (D && (F = D(D = 0)), F);
122
- var iD = (D, F) => () => (F || D((F = { exports: {} }).exports, F), F.exports);
123
- var oD = (D, F, u, C) => {
124
- if (F && typeof F == "object" || typeof F == "function") for (let t of tD(F)) !L$1.call(D, t) && (t !== "default") && m(D, t, { get: () => F[t], enumerable: !(C = FD(F, t)) || C.enumerable });
125
- return D;
126
- }, BD = (D, F) => oD(nD(m(D != null ? DD(ED(D)) : {}, "default", { value: D, enumerable: true })), D);
127
- var i = rD(() => {
128
- });
129
- var $ = iD((LD, N) => {
130
- i();
131
- N.exports = function() {
132
- return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-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uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\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DC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
133
- };
134
- });
135
- i();
136
- i();
137
- i();
138
- var v = (D) => {
139
- var u, C, t;
140
- let F = (u = process.stdout.columns) != null ? u : Number.POSITIVE_INFINITY;
141
- return typeof D == "function" && (D = D(F)), D || (D = {}), Array.isArray(D) ? { columns: D, stdoutColumns: F } : { columns: (C = D.columns) != null ? C : [], stdoutColumns: (t = D.stdoutColumns) != null ? t : F };
142
- };
143
- i();
144
- i();
145
- i();
146
- i();
147
- i();
148
- function w$1({ onlyFirst: D = false } = {}) {
149
- let F = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
150
- return new RegExp(F, D ? void 0 : "g");
125
+ var O$1 = Object.defineProperty;
126
+ var n = (D, F) => O$1(D, "name", { value: F, configurable: true });
127
+ const M$1 = n((D) => {
128
+ const F = process.stdout.columns ?? Number.POSITIVE_INFINITY;
129
+ return typeof D == "function" && (D = D(F)), D || (D = {}), Array.isArray(D) ? { columns: D, stdoutColumns: F } : { columns: D.columns ?? [], stdoutColumns: D.stdoutColumns ?? F };
130
+ }, "getOptions");
131
+ function j$1({ onlyFirst: D = false } = {}) {
132
+ const u = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
133
+ return new RegExp(u, D ? void 0 : "g");
151
134
  }
152
- function d$1(D) {
135
+ n(j$1, "ansiRegex");
136
+ const k$1 = j$1();
137
+ function w(D) {
153
138
  if (typeof D != "string") throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);
154
- return D.replace(w$1(), "");
139
+ return D.replace(k$1, "");
140
+ }
141
+ n(w, "stripAnsi");
142
+ function P(D) {
143
+ return D === 161 || D === 164 || D === 167 || D === 168 || D === 170 || D === 173 || D === 174 || D >= 176 && D <= 180 || D >= 182 && D <= 186 || D >= 188 && D <= 191 || D === 198 || D === 208 || D === 215 || D === 216 || D >= 222 && D <= 225 || D === 230 || D >= 232 && D <= 234 || D === 236 || D === 237 || D === 240 || D === 242 || D === 243 || D >= 247 && D <= 250 || D === 252 || D === 254 || D === 257 || D === 273 || D === 275 || D === 283 || D === 294 || D === 295 || D === 299 || D >= 305 && D <= 307 || D === 312 || D >= 319 && D <= 322 || D === 324 || D >= 328 && D <= 331 || D === 333 || D === 338 || D === 339 || D === 358 || D === 359 || D === 363 || D === 462 || D === 464 || D === 466 || D === 468 || D === 470 || D === 472 || D === 474 || D === 476 || D === 593 || D === 609 || D === 708 || D === 711 || D >= 713 && D <= 715 || D === 717 || D === 720 || D >= 728 && D <= 731 || D === 733 || D === 735 || D >= 768 && D <= 879 || D >= 913 && D <= 929 || D >= 931 && D <= 937 || D >= 945 && D <= 961 || D >= 963 && D <= 969 || D === 1025 || D >= 1040 && D <= 1103 || D === 1105 || D === 8208 || D >= 8211 && D <= 8214 || D === 8216 || D === 8217 || D === 8220 || D === 8221 || D >= 8224 && D <= 8226 || D >= 8228 && D <= 8231 || D === 8240 || D === 8242 || D === 8243 || D === 8245 || D === 8251 || D === 8254 || D === 8308 || D === 8319 || D >= 8321 && D <= 8324 || D === 8364 || D === 8451 || D === 8453 || D === 8457 || D === 8467 || D === 8470 || D === 8481 || D === 8482 || D === 8486 || D === 8491 || D === 8531 || D === 8532 || D >= 8539 && D <= 8542 || D >= 8544 && D <= 8555 || D >= 8560 && D <= 8569 || D === 8585 || D >= 8592 && D <= 8601 || D === 8632 || D === 8633 || D === 8658 || D === 8660 || D === 8679 || D === 8704 || D === 8706 || D === 8707 || D === 8711 || D === 8712 || D === 8715 || D === 8719 || D === 8721 || D === 8725 || D === 8730 || D >= 8733 && D <= 8736 || D === 8739 || D === 8741 || D >= 8743 && D <= 8748 || D === 8750 || D >= 8756 && D <= 8759 || D === 8764 || D === 8765 || D === 8776 || D === 8780 || D === 8786 || D === 8800 || D === 8801 || D >= 8804 && D <= 8807 || D === 8810 || D === 8811 || D === 8814 || D === 8815 || D === 8834 || D === 8835 || D === 8838 || D === 8839 || D === 8853 || D === 8857 || D === 8869 || D === 8895 || D === 8978 || D >= 9312 && D <= 9449 || D >= 9451 && D <= 9547 || D >= 9552 && D <= 9587 || D >= 9600 && D <= 9615 || D >= 9618 && D <= 9621 || D === 9632 || D === 9633 || D >= 9635 && D <= 9641 || D === 9650 || D === 9651 || D === 9654 || D === 9655 || D === 9660 || D === 9661 || D === 9664 || D === 9665 || D >= 9670 && D <= 9672 || D === 9675 || D >= 9678 && D <= 9681 || D >= 9698 && D <= 9701 || D === 9711 || D === 9733 || D === 9734 || D === 9737 || D === 9742 || D === 9743 || D === 9756 || D === 9758 || D === 9792 || D === 9794 || D === 9824 || D === 9825 || D >= 9827 && D <= 9829 || D >= 9831 && D <= 9834 || D === 9836 || D === 9837 || D === 9839 || D === 9886 || D === 9887 || D === 9919 || D >= 9926 && D <= 9933 || D >= 9935 && D <= 9939 || D >= 9941 && D <= 9953 || D === 9955 || D === 9960 || D === 9961 || D >= 9963 && D <= 9969 || D === 9972 || D >= 9974 && D <= 9977 || D === 9979 || D === 9980 || D === 9982 || D === 9983 || D === 10045 || D >= 10102 && D <= 10111 || D >= 11094 && D <= 11097 || D >= 12872 && D <= 12879 || D >= 57344 && D <= 63743 || D >= 65024 && D <= 65039 || D === 65533 || D >= 127232 && D <= 127242 || D >= 127248 && D <= 127277 || D >= 127280 && D <= 127337 || D >= 127344 && D <= 127373 || D === 127375 || D === 127376 || D >= 127387 && D <= 127404 || D >= 917760 && D <= 917999 || D >= 983040 && D <= 1048573 || D >= 1048576 && D <= 1114109;
144
+ }
145
+ n(P, "isAmbiguous");
146
+ function z$1(D) {
147
+ return D === 12288 || D >= 65281 && D <= 65376 || D >= 65504 && D <= 65510;
148
+ }
149
+ n(z$1, "isFullWidth");
150
+ function G$1(D) {
151
+ return D >= 4352 && D <= 4447 || D === 8986 || D === 8987 || D === 9001 || D === 9002 || D >= 9193 && D <= 9196 || D === 9200 || D === 9203 || D === 9725 || D === 9726 || D === 9748 || D === 9749 || D >= 9776 && D <= 9783 || D >= 9800 && D <= 9811 || D === 9855 || D >= 9866 && D <= 9871 || D === 9875 || D === 9889 || D === 9898 || D === 9899 || D === 9917 || D === 9918 || D === 9924 || D === 9925 || D === 9934 || D === 9940 || D === 9962 || D === 9970 || D === 9971 || D === 9973 || D === 9978 || D === 9981 || D === 9989 || D === 9994 || D === 9995 || D === 10024 || D === 10060 || D === 10062 || D >= 10067 && D <= 10069 || D === 10071 || D >= 10133 && D <= 10135 || D === 10160 || D === 10175 || D === 11035 || D === 11036 || D === 11088 || D === 11093 || D >= 11904 && D <= 11929 || D >= 11931 && D <= 12019 || D >= 12032 && D <= 12245 || D >= 12272 && D <= 12287 || D >= 12289 && D <= 12350 || D >= 12353 && D <= 12438 || D >= 12441 && D <= 12543 || D >= 12549 && D <= 12591 || D >= 12593 && D <= 12686 || D >= 12688 && D <= 12773 || D >= 12783 && D <= 12830 || D >= 12832 && D <= 12871 || D >= 12880 && D <= 42124 || D >= 42128 && D <= 42182 || D >= 43360 && D <= 43388 || D >= 44032 && D <= 55203 || D >= 63744 && D <= 64255 || D >= 65040 && D <= 65049 || D >= 65072 && D <= 65106 || D >= 65108 && D <= 65126 || D >= 65128 && D <= 65131 || D >= 94176 && D <= 94180 || D === 94192 || D === 94193 || D >= 94208 && D <= 100343 || D >= 100352 && D <= 101589 || D >= 101631 && D <= 101640 || D >= 110576 && D <= 110579 || D >= 110581 && D <= 110587 || D === 110589 || D === 110590 || D >= 110592 && D <= 110882 || D === 110898 || D >= 110928 && D <= 110930 || D === 110933 || D >= 110948 && D <= 110951 || D >= 110960 && D <= 111355 || D >= 119552 && D <= 119638 || D >= 119648 && D <= 119670 || D === 126980 || D === 127183 || D === 127374 || D >= 127377 && D <= 127386 || D >= 127488 && D <= 127490 || D >= 127504 && D <= 127547 || D >= 127552 && D <= 127560 || D === 127568 || D === 127569 || D >= 127584 && D <= 127589 || D >= 127744 && D <= 127776 || D >= 127789 && D <= 127797 || D >= 127799 && D <= 127868 || D >= 127870 && D <= 127891 || D >= 127904 && D <= 127946 || D >= 127951 && D <= 127955 || D >= 127968 && D <= 127984 || D === 127988 || D >= 127992 && D <= 128062 || D === 128064 || D >= 128066 && D <= 128252 || D >= 128255 && D <= 128317 || D >= 128331 && D <= 128334 || D >= 128336 && D <= 128359 || D === 128378 || D === 128405 || D === 128406 || D === 128420 || D >= 128507 && D <= 128591 || D >= 128640 && D <= 128709 || D === 128716 || D >= 128720 && D <= 128722 || D >= 128725 && D <= 128727 || D >= 128732 && D <= 128735 || D === 128747 || D === 128748 || D >= 128756 && D <= 128764 || D >= 128992 && D <= 129003 || D === 129008 || D >= 129292 && D <= 129338 || D >= 129340 && D <= 129349 || D >= 129351 && D <= 129535 || D >= 129648 && D <= 129660 || D >= 129664 && D <= 129673 || D >= 129679 && D <= 129734 || D >= 129742 && D <= 129756 || D >= 129759 && D <= 129769 || D >= 129776 && D <= 129784 || D >= 131072 && D <= 196605 || D >= 196608 && D <= 262141;
152
+ }
153
+ n(G$1, "isWide");
154
+ function Z$1(D) {
155
+ if (!Number.isSafeInteger(D)) throw new TypeError(`Expected a code point, got \`${typeof D}\`.`);
155
156
  }
156
- i();
157
- function y$1(D) {
158
- return Number.isInteger(D) ? D >= 4352 && (D <= 4447 || D === 9001 || D === 9002 || 11904 <= D && D <= 12871 && D !== 12351 || 12880 <= D && D <= 19903 || 19968 <= D && D <= 42182 || 43360 <= D && D <= 43388 || 44032 <= D && D <= 55203 || 63744 <= D && D <= 64255 || 65040 <= D && D <= 65049 || 65072 <= D && D <= 65131 || 65281 <= D && D <= 65376 || 65504 <= D && D <= 65510 || 110592 <= D && D <= 110593 || 127488 <= D && D <= 127569 || 131072 <= D && D <= 262141) : false;
157
+ n(Z$1, "validate");
158
+ function V$1(D, { ambiguousAsWide: F = false } = {}) {
159
+ return Z$1(D), z$1(D) || G$1(D) || F && P(D) ? 2 : 1;
159
160
  }
160
- var j = BD($());
161
- function g(D) {
162
- if (typeof D != "string" || D.length === 0 || (D = d$1(D), D.length === 0)) return 0;
163
- D = D.replace((0, j.default)(), " ");
164
- let F = 0;
165
- for (let u = 0; u < D.length; u++) {
166
- let C = D.codePointAt(u);
167
- C <= 31 || C >= 127 && C <= 159 || C >= 768 && C <= 879 || (C > 65535 && u++, F += y$1(C) ? 2 : 1);
161
+ n(V$1, "eastAsianWidth");
162
+ var Y = n(() => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\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640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g, "emojiRegex");
163
+ const K$1 = new Intl.Segmenter(), U$1 = new RegExp("^\\p{Default_Ignorable_Code_Point}$", "u");
164
+ function d(D, F = {}) {
165
+ if (typeof D != "string" || D.length === 0) return 0;
166
+ const { ambiguousIsNarrow: u = true, countAnsiEscapeCodes: C = false } = F;
167
+ if (C || (D = w(D)), D.length === 0) return 0;
168
+ let E = 0;
169
+ const t = { ambiguousAsWide: !u };
170
+ for (const { segment: i } of K$1.segment(D)) {
171
+ const e = i.codePointAt(0);
172
+ if (!(e <= 31 || e >= 127 && e <= 159) && !(e >= 8203 && e <= 8207 || e === 65279) && !(e >= 768 && e <= 879 || e >= 6832 && e <= 6911 || e >= 7616 && e <= 7679 || e >= 8400 && e <= 8447 || e >= 65056 && e <= 65071) && !(e >= 55296 && e <= 57343) && !(e >= 65024 && e <= 65039) && !U$1.test(i)) {
173
+ if (Y().test(i)) {
174
+ E += 2;
175
+ continue;
176
+ }
177
+ E += V$1(e, t);
178
+ }
168
179
  }
169
- return F;
180
+ return E;
170
181
  }
171
- var b$1 = (D) => Math.max(...D.split(`
172
- `).map(g));
173
- var k$1 = (D) => {
174
- let F = [];
175
- for (let u of D) {
176
- let { length: C } = u, t = C - F.length;
177
- for (let E = 0; E < t; E += 1) F.push(0);
178
- for (let E = 0; E < C; E += 1) {
179
- let e = b$1(u[E]);
180
- e > F[E] && (F[E] = e);
182
+ n(d, "stringWidth");
183
+ const x$1 = n((D) => Math.max(...D.split(`
184
+ `).map((F) => d(F))), "getLongestLineWidth"), q = n((D) => {
185
+ const F = [];
186
+ for (const u of D) {
187
+ const { length: C } = u, E = C - F.length;
188
+ for (let t = 0; t < E; t += 1) F.push(0);
189
+ for (let t = 0; t < C; t += 1) {
190
+ const i = x$1(u[t]);
191
+ i > F[t] && (F[t] = i);
181
192
  }
182
193
  }
183
194
  return F;
184
- };
185
- i();
186
- var _$1 = /^\d+%$/, z$1 = { width: "auto", align: "left", contentWidth: 0, paddingLeft: 0, paddingRight: 0, paddingTop: 0, paddingBottom: 0, horizontalPadding: 0, paddingLeftString: "", paddingRightString: "" }, sD = (D, F) => {
187
- var C;
188
- let u = [];
189
- for (let t = 0; t < D.length; t += 1) {
190
- let E = (C = F[t]) != null ? C : "auto";
191
- if (typeof E == "number" || E === "auto" || E === "content-width" || typeof E == "string" && _$1.test(E)) {
192
- u.push(c(p({}, z$1), { width: E, contentWidth: D[t] }));
195
+ }, "getColumnContentWidths"), y = /^\d+%$/, S = { width: "auto", align: "left", contentWidth: 0, paddingLeft: 0, paddingRight: 0, paddingTop: 0, paddingBottom: 0, horizontalPadding: 0, paddingLeftString: "", paddingRightString: "" }, H$1 = n((D, F) => {
196
+ const u = [];
197
+ for (let C = 0; C < D.length; C += 1) {
198
+ const E = F[C] ?? "auto";
199
+ if (typeof E == "number" || E === "auto" || E === "content-width" || typeof E == "string" && y.test(E)) {
200
+ u.push({ ...S, width: E, contentWidth: D[C] });
193
201
  continue;
194
202
  }
195
203
  if (E && typeof E == "object") {
196
- let e = c(p(p({}, z$1), E), { contentWidth: D[t] });
197
- e.horizontalPadding = e.paddingLeft + e.paddingRight, u.push(e);
204
+ const t = { ...S, ...E, contentWidth: D[C] };
205
+ t.horizontalPadding = t.paddingLeft + t.paddingRight, u.push(t);
198
206
  continue;
199
207
  }
200
208
  throw new Error(`Invalid column width: ${JSON.stringify(E)}`);
201
209
  }
202
210
  return u;
203
- };
204
- function aD(D, F) {
205
- for (let u of D) {
206
- let { width: C } = u;
211
+ }, "initColumns"), J$1 = n((D, F) => {
212
+ for (const u of D) {
213
+ const { width: C } = u;
207
214
  if (C === "content-width" && (u.width = u.contentWidth), C === "auto") {
208
- let n = Math.min(20, u.contentWidth);
209
- u.width = n, u.autoOverflow = u.contentWidth - n;
215
+ const B = Math.min(20, u.contentWidth);
216
+ u.width = B, u.autoOverflow = u.contentWidth - B;
210
217
  }
211
- if (typeof C == "string" && _$1.test(C)) {
212
- let n = Number.parseFloat(C.slice(0, -1)) / 100;
213
- u.width = Math.floor(F * n) - (u.paddingLeft + u.paddingRight);
218
+ if (typeof C == "string" && y.test(C)) {
219
+ const B = Number.parseFloat(C.slice(0, -1)) / 100;
220
+ u.width = Math.floor(F * B) - (u.paddingLeft + u.paddingRight);
214
221
  }
215
- let { horizontalPadding: t } = u, E = 1, e = E + t;
216
- if (e >= F) {
217
- let n = e - F, o = Math.ceil(u.paddingLeft / t * n), B = n - o;
218
- u.paddingLeft -= o, u.paddingRight -= B, u.horizontalPadding = u.paddingLeft + u.paddingRight;
222
+ const { horizontalPadding: E } = u, t = 1, i = t + E;
223
+ if (i >= F) {
224
+ const B = i - F, A = Math.ceil(u.paddingLeft / E * B), a = B - A;
225
+ u.paddingLeft -= A, u.paddingRight -= a, u.horizontalPadding = u.paddingLeft + u.paddingRight;
219
226
  }
220
227
  u.paddingLeftString = u.paddingLeft ? " ".repeat(u.paddingLeft) : "", u.paddingRightString = u.paddingRight ? " ".repeat(u.paddingRight) : "";
221
- let r = F - u.horizontalPadding;
222
- u.width = Math.max(Math.min(u.width, r), E);
223
- }
224
- }
225
- var G = () => Object.assign([], { columns: 0 });
226
- function lD(D, F) {
227
- let u = [G()], [C] = u;
228
- for (let t of D) {
229
- let E = t.width + t.horizontalPadding;
230
- C.columns + E > F && (C = G(), u.push(C)), C.push(t), C.columns += E;
231
- }
232
- for (let t of u) {
233
- let E = t.reduce((s, l) => s + l.width + l.horizontalPadding, 0), e = F - E;
234
- if (e === 0) continue;
235
- let r = t.filter((s) => "autoOverflow" in s), n = r.filter((s) => s.autoOverflow > 0), o = n.reduce((s, l) => s + l.autoOverflow, 0), B = Math.min(o, e);
236
- for (let s of n) {
237
- let l = Math.floor(s.autoOverflow / o * B);
238
- s.width += l, e -= l;
239
- }
240
- let a = Math.floor(e / r.length);
241
- for (let s = 0; s < r.length; s += 1) {
242
- let l = r[s];
243
- s === r.length - 1 ? l.width += e : l.width += a, e -= a;
228
+ const e = F - u.horizontalPadding;
229
+ u.width = Math.max(Math.min(u.width, e), t);
230
+ }
231
+ }, "resolveColumnWidths"), R$1 = n(() => Object.assign([], { columns: 0 }), "makeRow"), Q$1 = n((D, F) => {
232
+ const u = [R$1()];
233
+ let [C] = u;
234
+ for (const E of D) {
235
+ const t = E.width + E.horizontalPadding;
236
+ C.columns + t > F && (C = R$1(), u.push(C)), C.push(E), C.columns += t;
237
+ }
238
+ for (const E of u) {
239
+ const t = E.reduce((r, o) => r + o.width + o.horizontalPadding, 0);
240
+ let i = F - t;
241
+ if (i === 0) continue;
242
+ const e = E.filter((r) => "autoOverflow" in r), B = e.filter((r) => r.autoOverflow > 0), A = B.reduce((r, o) => r + o.autoOverflow, 0), a = Math.min(A, i);
243
+ for (const r of B) {
244
+ const o = Math.floor(r.autoOverflow / A * a);
245
+ r.width += o, i -= o;
246
+ }
247
+ const l = Math.floor(i / e.length);
248
+ for (let r = 0; r < e.length; r += 1) {
249
+ const o = e[r];
250
+ r === e.length - 1 ? o.width += i : o.width += l, i -= l;
244
251
  }
245
252
  }
246
253
  return u;
247
- }
248
- function Z$1(D, F, u) {
249
- let C = sD(u, F);
250
- return aD(C, D), lD(C, D);
251
- }
252
- i();
253
- i();
254
- i();
255
- var O = 10, U$1 = (D = 0) => (F) => `\x1B[${F + D}m`, V$1 = (D = 0) => (F) => `\x1B[${38 + D};5;${F}m`, Y = (D = 0) => (F, u, C) => `\x1B[${38 + D};2;${F};${u};${C}m`;
256
- function AD() {
257
- let D = /* @__PURE__ */ new Map(), F = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
258
- F.color.gray = F.color.blackBright, F.bgColor.bgGray = F.bgColor.bgBlackBright, F.color.grey = F.color.blackBright, F.bgColor.bgGrey = F.bgColor.bgBlackBright;
259
- for (let [u, C] of Object.entries(F)) {
260
- for (let [t, E] of Object.entries(C)) F[t] = { open: `\x1B[${E[0]}m`, close: `\x1B[${E[1]}m` }, C[t] = F[t], D.set(E[0], E[1]);
261
- Object.defineProperty(F, u, { value: C, enumerable: false });
262
- }
263
- return Object.defineProperty(F, "codes", { value: D, enumerable: false }), F.color.close = "\x1B[39m", F.bgColor.close = "\x1B[49m", F.color.ansi = U$1(), F.color.ansi256 = V$1(), F.color.ansi16m = Y(), F.bgColor.ansi = U$1(O), F.bgColor.ansi256 = V$1(O), F.bgColor.ansi16m = Y(O), Object.defineProperties(F, { rgbToAnsi256: { value: (u, C, t) => u === C && C === t ? u < 8 ? 16 : u > 248 ? 231 : Math.round((u - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u / 255 * 5) + 6 * Math.round(C / 255 * 5) + Math.round(t / 255 * 5), enumerable: false }, hexToRgb: { value: (u) => {
264
- let C = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(u.toString(16));
265
- if (!C) return [0, 0, 0];
266
- let { colorString: t } = C.groups;
267
- t.length === 3 && (t = t.split("").map((e) => e + e).join(""));
268
- let E = Number.parseInt(t, 16);
254
+ }, "balanceAuto"), X$1 = n((D, F, u) => {
255
+ const C = H$1(u, F);
256
+ return J$1(C, D), Q$1(C, D);
257
+ }, "computeColumnWidths"), p = 10, v = n((D = 0) => (F) => `\x1B[${F + D}m`, "wrapAnsi16"), _$1 = n((D = 0) => (F) => `\x1B[${38 + D};5;${F}m`, "wrapAnsi256"), L$1 = n((D = 0) => (F, u, C) => `\x1B[${38 + D};2;${F};${u};${C}m`, "wrapAnsi16m"), s$1 = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
258
+ Object.keys(s$1.modifier);
259
+ const DD = Object.keys(s$1.color), uD = Object.keys(s$1.bgColor);
260
+ [...DD, ...uD];
261
+ function FD() {
262
+ const D = /* @__PURE__ */ new Map();
263
+ for (const [F, u] of Object.entries(s$1)) {
264
+ for (const [C, E] of Object.entries(u)) s$1[C] = { open: `\x1B[${E[0]}m`, close: `\x1B[${E[1]}m` }, u[C] = s$1[C], D.set(E[0], E[1]);
265
+ Object.defineProperty(s$1, F, { value: u, enumerable: false });
266
+ }
267
+ return Object.defineProperty(s$1, "codes", { value: D, enumerable: false }), s$1.color.close = "\x1B[39m", s$1.bgColor.close = "\x1B[49m", s$1.color.ansi = v(), s$1.color.ansi256 = _$1(), s$1.color.ansi16m = L$1(), s$1.bgColor.ansi = v(p), s$1.bgColor.ansi256 = _$1(p), s$1.bgColor.ansi16m = L$1(p), Object.defineProperties(s$1, { rgbToAnsi256: { value: n((F, u, C) => F === u && u === C ? F < 8 ? 16 : F > 248 ? 231 : Math.round((F - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(F / 255 * 5) + 6 * Math.round(u / 255 * 5) + Math.round(C / 255 * 5), "value"), enumerable: false }, hexToRgb: { value: n((F) => {
268
+ const u = /[a-f\d]{6}|[a-f\d]{3}/i.exec(F.toString(16));
269
+ if (!u) return [0, 0, 0];
270
+ let [C] = u;
271
+ C.length === 3 && (C = [...C].map((t) => t + t).join(""));
272
+ const E = Number.parseInt(C, 16);
269
273
  return [E >> 16 & 255, E >> 8 & 255, E & 255];
270
- }, enumerable: false }, hexToAnsi256: { value: (u) => F.rgbToAnsi256(...F.hexToRgb(u)), enumerable: false }, ansi256ToAnsi: { value: (u) => {
271
- if (u < 8) return 30 + u;
272
- if (u < 16) return 90 + (u - 8);
273
- let C, t, E;
274
- if (u >= 232) C = ((u - 232) * 10 + 8) / 255, t = C, E = C;
274
+ }, "value"), enumerable: false }, hexToAnsi256: { value: n((F) => s$1.rgbToAnsi256(...s$1.hexToRgb(F)), "value"), enumerable: false }, ansi256ToAnsi: { value: n((F) => {
275
+ if (F < 8) return 30 + F;
276
+ if (F < 16) return 90 + (F - 8);
277
+ let u, C, E;
278
+ if (F >= 232) u = ((F - 232) * 10 + 8) / 255, C = u, E = u;
275
279
  else {
276
- u -= 16;
277
- let n = u % 36;
278
- C = Math.floor(u / 36) / 5, t = Math.floor(n / 6) / 5, E = n % 6 / 5;
279
- }
280
- let e = Math.max(C, t, E) * 2;
281
- if (e === 0) return 30;
282
- let r = 30 + (Math.round(E) << 2 | Math.round(t) << 1 | Math.round(C));
283
- return e === 2 && (r += 60), r;
284
- }, enumerable: false }, rgbToAnsi: { value: (u, C, t) => F.ansi256ToAnsi(F.rgbToAnsi256(u, C, t)), enumerable: false }, hexToAnsi: { value: (u) => F.ansi256ToAnsi(F.hexToAnsi256(u)), enumerable: false } }), F;
280
+ F -= 16;
281
+ const e = F % 36;
282
+ u = Math.floor(F / 36) / 5, C = Math.floor(e / 6) / 5, E = e % 6 / 5;
283
+ }
284
+ const t = Math.max(u, C, E) * 2;
285
+ if (t === 0) return 30;
286
+ let i = 30 + (Math.round(E) << 2 | Math.round(C) << 1 | Math.round(u));
287
+ return t === 2 && (i += 60), i;
288
+ }, "value"), enumerable: false }, rgbToAnsi: { value: n((F, u, C) => s$1.ansi256ToAnsi(s$1.rgbToAnsi256(F, u, C)), "value"), enumerable: false }, hexToAnsi: { value: n((F) => s$1.ansi256ToAnsi(s$1.hexToAnsi256(F)), "value"), enumerable: false } }), s$1;
285
289
  }
286
- var fD = AD(), K = fD;
287
- var x$1 = /* @__PURE__ */ new Set(["\x1B", "\x9B"]), gD = 39, R$1 = "\x07", q$1 = "[", pD = "]", H$1 = "m", M$1 = `${pD}8;;`, J$1 = (D) => `${x$1.values().next().value}${q$1}${D}${H$1}`, Q = (D) => `${x$1.values().next().value}${M$1}${D}${R$1}`, hD = (D) => D.split(" ").map((F) => g(F)), S = (D, F, u) => {
288
- let C = [...F], t = false, E = false, e = g(d$1(D[D.length - 1]));
289
- for (let [r, n] of C.entries()) {
290
- let o = g(n);
291
- if (e + o <= u ? D[D.length - 1] += n : (D.push(n), e = 0), x$1.has(n) && (t = true, E = C.slice(r + 1).join("").startsWith(M$1)), t) {
292
- E ? n === R$1 && (t = false, E = false) : n === H$1 && (t = false);
290
+ n(FD, "assembleStyles");
291
+ const CD = FD(), g = /* @__PURE__ */ new Set(["\x1B", "\x9B"]), ED = 39, m = "\x07", N = "[", eD = "]", T$1 = "m", h = `${eD}8;;`, $$1 = n((D) => `${g.values().next().value}${N}${D}${T$1}`, "wrapAnsiCode"), W$1 = n((D) => `${g.values().next().value}${h}${D}${m}`, "wrapAnsiHyperlink"), tD = n((D) => D.split(" ").map((F) => d(F)), "wordLengths"), b = n((D, F, u) => {
292
+ const C = [...F];
293
+ let E = false, t = false, i = d(w(D.at(-1)));
294
+ for (const [e, B] of C.entries()) {
295
+ const A = d(B);
296
+ if (i + A <= u ? D[D.length - 1] += B : (D.push(B), i = 0), g.has(B) && (E = true, t = C.slice(e + 1, e + 1 + h.length).join("") === h), E) {
297
+ t ? B === m && (E = false, t = false) : B === T$1 && (E = false);
293
298
  continue;
294
299
  }
295
- e += o, e === u && r < C.length - 1 && (D.push(""), e = 0);
300
+ i += A, i === u && e < C.length - 1 && (D.push(""), i = 0);
296
301
  }
297
- !e && D[D.length - 1].length > 0 && D.length > 1 && (D[D.length - 2] += D.pop());
298
- }, cD = (D) => {
299
- let F = D.split(" "), u = F.length;
300
- for (; u > 0 && !(g(F[u - 1]) > 0); ) u--;
302
+ !i && D.at(-1).length > 0 && D.length > 1 && (D[D.length - 2] += D.pop());
303
+ }, "wrapWord"), nD = n((D) => {
304
+ const F = D.split(" ");
305
+ let u = F.length;
306
+ for (; u > 0 && !(d(F[u - 1]) > 0); ) u--;
301
307
  return u === F.length ? D : F.slice(0, u).join(" ") + F.slice(u).join("");
302
- }, dD = (D, F, u = {}) => {
308
+ }, "stringVisibleTrimSpacesRight"), iD = n((D, F, u = {}) => {
303
309
  if (u.trim !== false && D.trim() === "") return "";
304
- let C = "", t, E, e = hD(D), r = [""];
305
- for (let [o, B] of D.split(" ").entries()) {
306
- u.trim !== false && (r[r.length - 1] = r[r.length - 1].trimStart());
307
- let a = g(r[r.length - 1]);
308
- if (o !== 0 && (a >= F && (u.wordWrap === false || u.trim === false) && (r.push(""), a = 0), (a > 0 || u.trim === false) && (r[r.length - 1] += " ", a++)), u.hard && e[o] > F) {
309
- let s = F - a, l = 1 + Math.floor((e[o] - s - 1) / F);
310
- Math.floor((e[o] - 1) / F) < l && r.push(""), S(r, B, F);
310
+ let C = "", E, t;
311
+ const i = tD(D);
312
+ let e = [""];
313
+ for (const [l, r] of D.split(" ").entries()) {
314
+ u.trim !== false && (e[e.length - 1] = e.at(-1).trimStart());
315
+ let o = d(e.at(-1));
316
+ if (l !== 0 && (o >= F && (u.wordWrap === false || u.trim === false) && (e.push(""), o = 0), (o > 0 || u.trim === false) && (e[e.length - 1] += " ", o++)), u.hard && i[l] > F) {
317
+ const c = F - o, f = 1 + Math.floor((i[l] - c - 1) / F);
318
+ Math.floor((i[l] - 1) / F) < f && e.push(""), b(e, r, F);
311
319
  continue;
312
320
  }
313
- if (a + e[o] > F && a > 0 && e[o] > 0) {
314
- if (u.wordWrap === false && a < F) {
315
- S(r, B, F);
321
+ if (o + i[l] > F && o > 0 && i[l] > 0) {
322
+ if (u.wordWrap === false && o < F) {
323
+ b(e, r, F);
316
324
  continue;
317
325
  }
318
- r.push("");
326
+ e.push("");
319
327
  }
320
- if (a + e[o] > F && u.wordWrap === false) {
321
- S(r, B, F);
328
+ if (o + i[l] > F && u.wordWrap === false) {
329
+ b(e, r, F);
322
330
  continue;
323
331
  }
324
- r[r.length - 1] += B;
325
- }
326
- u.trim !== false && (r = r.map((o) => cD(o)));
327
- let n = [...r.join(`
328
- `)];
329
- for (let [o, B] of n.entries()) {
330
- if (C += B, x$1.has(B)) {
331
- let { groups: s } = new RegExp(`(?:\\${q$1}(?<code>\\d+)m|\\${M$1}(?<uri>.*)${R$1})`).exec(n.slice(o).join("")) || { groups: {} };
332
- if (s.code !== void 0) {
333
- let l = Number.parseFloat(s.code);
334
- t = l === gD ? void 0 : l;
335
- } else s.uri !== void 0 && (E = s.uri.length === 0 ? void 0 : s.uri);
336
- }
337
- let a = K.codes.get(Number(t));
338
- n[o + 1] === `
339
- ` ? (E && (C += Q("")), t && a && (C += J$1(a))) : B === `
340
- ` && (t && a && (C += J$1(t)), E && (C += Q(E)));
332
+ e[e.length - 1] += r;
333
+ }
334
+ u.trim !== false && (e = e.map((l) => nD(l)));
335
+ const B = e.join(`
336
+ `), A = [...B];
337
+ let a = 0;
338
+ for (const [l, r] of A.entries()) {
339
+ if (C += r, g.has(r)) {
340
+ const { groups: c } = new RegExp(`(?:\\${N}(?<code>\\d+)m|\\${h}(?<uri>.*)${m})`).exec(B.slice(a)) || { groups: {} };
341
+ if (c.code !== void 0) {
342
+ const f = Number.parseFloat(c.code);
343
+ E = f === ED ? void 0 : f;
344
+ } else c.uri !== void 0 && (t = c.uri.length === 0 ? void 0 : c.uri);
345
+ }
346
+ const o = CD.codes.get(Number(E));
347
+ A[l + 1] === `
348
+ ` ? (t && (C += W$1("")), E && o && (C += $$1(o))) : r === `
349
+ ` && (E && o && (C += $$1(E)), t && (C += W$1(t))), a += r.length;
341
350
  }
342
351
  return C;
343
- };
344
- function T$1(D, F, u) {
345
- return String(D).normalize().replace(/\r\n/g, `
352
+ }, "exec");
353
+ function BD(D, F, u) {
354
+ return String(D).normalize().replaceAll(`\r
355
+ `, `
346
356
  `).split(`
347
- `).map((C) => dD(C, F, u)).join(`
357
+ `).map((C) => iD(C, F, u)).join(`
348
358
  `);
349
359
  }
350
- var X = (D) => Array.from({ length: D }).fill("");
351
- function P$1(D, F) {
352
- let u = [], C = 0;
353
- for (let t of D) {
354
- let E = 0, e = t.map((n) => {
355
- var a;
356
- let o = (a = F[C]) != null ? a : "";
357
- C += 1, n.preprocess && (o = n.preprocess(o)), b$1(o) > n.width && (o = T$1(o, n.width, { hard: true }));
358
- let B = o.split(`
360
+ n(BD, "wrapAnsi");
361
+ const I = n((D) => Array.from({ length: D }).fill(""), "emptyLines"), oD = n((D, F) => {
362
+ const u = [];
363
+ let C = 0;
364
+ for (const E of D) {
365
+ let t = 0;
366
+ const i = E.map((B) => {
367
+ let A = F[C] ?? "";
368
+ C += 1, B.preprocess && (A = B.preprocess(A)), x$1(A) > B.width && (A = BD(A, B.width, { hard: true }));
369
+ let a = A.split(`
359
370
  `);
360
- if (n.postprocess) {
361
- let { postprocess: s } = n;
362
- B = B.map((l, h) => s.call(n, l, h));
371
+ if (B.postprocess) {
372
+ const { postprocess: l } = B;
373
+ a = a.map((r, o) => l.call(B, r, o));
363
374
  }
364
- return n.paddingTop && B.unshift(...X(n.paddingTop)), n.paddingBottom && B.push(...X(n.paddingBottom)), B.length > E && (E = B.length), c(p({}, n), { lines: B });
365
- }), r = [];
366
- for (let n = 0; n < E; n += 1) {
367
- let o = e.map((B) => {
368
- var h;
369
- let a = (h = B.lines[n]) != null ? h : "", s = Number.isFinite(B.width) ? " ".repeat(B.width - g(a)) : "", l = B.paddingLeftString;
370
- return B.align === "right" && (l += s), l += a, B.align === "left" && (l += s), l + B.paddingRightString;
375
+ return B.paddingTop && a.unshift(...I(B.paddingTop)), B.paddingBottom && a.push(...I(B.paddingBottom)), a.length > t && (t = a.length), { ...B, lines: a };
376
+ }), e = [];
377
+ for (let B = 0; B < t; B += 1) {
378
+ const A = i.map((a) => {
379
+ const l = a.lines[B] ?? "", r = Number.isFinite(a.width) ? " ".repeat(a.width - d(l)) : "";
380
+ let o = a.paddingLeftString;
381
+ return a.align === "right" && (o += r), o += l, a.align === "left" && (o += r), o + a.paddingRightString;
371
382
  }).join("");
372
- r.push(o);
383
+ e.push(A);
373
384
  }
374
- u.push(r.join(`
385
+ u.push(e.join(`
375
386
  `));
376
387
  }
377
388
  return u.join(`
378
389
  `);
379
- }
380
- function mD(D, F) {
390
+ }, "renderRow"), rD = n((D, F) => {
381
391
  if (!D || D.length === 0) return "";
382
- let u = k$1(D), C = u.length;
392
+ const u = q(D), C = u.length;
383
393
  if (C === 0) return "";
384
- let { stdoutColumns: t, columns: E } = v(F);
385
- if (E.length > C) throw new Error(`${E.length} columns defined, but only ${C} columns found`);
386
- let e = Z$1(t, E, u);
387
- return D.map((r) => P$1(e, r)).join(`
394
+ const { stdoutColumns: E, columns: t } = M$1(F);
395
+ if (t.length > C) throw new Error(`${t.length} columns defined, but only ${C} columns found`);
396
+ const i = X$1(E, t, u);
397
+ return D.map((e) => oD(i, e)).join(`
388
398
  `);
389
- }
390
- i();
391
- var bD = ["<", ">", "=", ">=", "<="];
392
- function xD(D) {
393
- if (!bD.includes(D)) throw new TypeError(`Invalid breakpoint operator: ${D}`);
394
- }
395
- function wD(D) {
396
- let F = Object.keys(D).map((u) => {
397
- let [C, t] = u.split(" ");
398
- xD(C);
399
- let E = Number.parseInt(t, 10);
400
- if (Number.isNaN(E)) throw new TypeError(`Invalid breakpoint value: ${t}`);
401
- let e = D[u];
402
- return { operator: C, breakpoint: E, value: e };
399
+ }, "terminalColumns"), sD = ["<", ">", "=", ">=", "<="], aD = n((D) => {
400
+ if (!sD.includes(D)) throw new TypeError(`Invalid breakpoint operator: ${D}`);
401
+ }, "assertOperator"), AD = n((D) => {
402
+ const F = Object.keys(D).map((u) => {
403
+ const [C, E] = u.split(" ");
404
+ aD(C);
405
+ const t = Number.parseInt(E, 10);
406
+ if (Number.isNaN(t)) throw new TypeError(`Invalid breakpoint value: ${E}`);
407
+ const i = D[u];
408
+ return { operator: C, breakpoint: t, value: i };
403
409
  }).sort((u, C) => C.breakpoint - u.breakpoint);
404
- return (u) => {
405
- var C;
406
- return (C = F.find(({ operator: t, breakpoint: E }) => t === "=" && u === E || t === ">" && u > E || t === "<" && u < E || t === ">=" && u >= E || t === "<=" && u <= E)) == null ? void 0 : C.value;
407
- };
408
- }
410
+ return (u) => F.find(({ operator: C, breakpoint: E }) => C === "=" && u === E || C === ">" && u > E || C === "<" && u < E || C === ">=" && u >= E || C === "<=" && u <= E)?.value;
411
+ }, "breakpoints");
409
412
 
410
- const P = (t) => t.replace(/[\W_]([a-z\d])?/gi, (e, r) => r ? r.toUpperCase() : ""), q = (t) => t.replace(/\B([A-Z])/g, "-$1").toLowerCase(), I = { "> 80": [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }, { width: "auto" }], "> 40": [{ width: "auto", paddingLeft: 2, paddingRight: 8, preprocess: (t) => t.trim() }, { width: "100%", paddingLeft: 2, paddingBottom: 1 }], "> 0": { stdoutColumns: 1e3, columns: [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }, { width: "content-width" }] } };
411
- function D(t) {
413
+ var B = Object.defineProperty;
414
+ var s = (t, e) => B(t, "name", { value: e, configurable: true });
415
+ const R = s((t) => t.replaceAll(/[\W_]([a-z\d])?/gi, (e, r) => r ? r.toUpperCase() : ""), "camelCase"), D = s((t) => t.replaceAll(/\B([A-Z])/g, "-$1").toLowerCase(), "kebabCase"), L = { "> 80": [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }, { width: "auto" }], "> 40": [{ width: "auto", paddingLeft: 2, paddingRight: 8, preprocess: s((t) => t.trim(), "preprocess") }, { width: "100%", paddingLeft: 2, paddingBottom: 1 }], "> 0": { stdoutColumns: 1e3, columns: [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }, { width: "content-width" }] } };
416
+ function T(t) {
412
417
  let e = false;
413
418
  return { type: "table", data: { tableData: Object.keys(t).sort((a, i) => a.localeCompare(i)).map((a) => {
414
- const i = t[a], s = "alias" in i;
415
- return s && (e = true), { name: a, flag: i, flagFormatted: `--${q(a)}`, aliasesEnabled: e, aliasFormatted: s ? `-${i.alias}` : void 0 };
416
- }).map((a) => (a.aliasesEnabled = e, [{ type: "flagName", data: a }, { type: "flagDescription", data: a }])), tableBreakpoints: I } };
419
+ const i = t[a], o = "alias" in i;
420
+ return o && (e = true), { name: a, flag: i, flagFormatted: `--${D(a)}`, aliasesEnabled: e, aliasFormatted: o ? `-${i.alias}` : void 0 };
421
+ }).map((a) => (a.aliasesEnabled = e, [{ type: "flagName", data: a }, { type: "flagDescription", data: a }])), tableBreakpoints: L } };
417
422
  }
418
- const A = (t) => !t || (t.version ?? (t.help ? t.help.version : void 0)), C = (t) => {
423
+ s(T, "renderFlags");
424
+ const E = s((t) => !t || (t.version ?? (t.help ? t.help.version : void 0)), "getVersion"), C = s((t) => {
419
425
  const e = "parent" in t && t.parent?.name;
420
426
  return (e ? `${e} ` : "") + t.name;
421
- };
422
- function R(t) {
427
+ }, "getName");
428
+ function k(t) {
423
429
  const e = [];
424
430
  t.name && e.push(C(t));
425
- const r = A(t) ?? ("parent" in t && A(t.parent));
431
+ const r = E(t) ?? ("parent" in t && E(t.parent));
426
432
  if (r && e.push(`v${r}`), e.length !== 0) return { id: "name", type: "text", data: `${e.join(" ")}
427
433
  ` };
428
434
  }
429
- function L(t) {
435
+ s(k, "getNameAndVersion");
436
+ function _(t) {
430
437
  const { help: e } = t;
431
438
  if (!(!e || !e.description)) return { id: "description", type: "text", data: `${e.description}
432
439
  ` };
433
440
  }
434
- function T(t) {
441
+ s(_, "getDescription");
442
+ function F(t) {
435
443
  const e = t.help || {};
436
444
  if ("usage" in e) return e.usage ? { id: "usage", type: "section", data: { title: "Usage:", body: Array.isArray(e.usage) ? e.usage.join(`
437
445
  `) : e.usage } } : void 0;
438
446
  if (t.name) {
439
447
  const r = [], n = [C(t)];
440
448
  if (t.flags && Object.keys(t.flags).length > 0 && n.push("[flags...]"), t.parameters && t.parameters.length > 0) {
441
- const { parameters: a } = t, i = a.indexOf("--"), s = i > -1 && a.slice(i + 1).some((o) => o.startsWith("<"));
442
- n.push(a.map((o) => o !== "--" ? o : s ? "--" : "[--]").join(" "));
449
+ const { parameters: a } = t, i = a.indexOf("--"), o = i !== -1 && a.slice(i + 1).some((l) => l.startsWith("<"));
450
+ n.push(a.map((l) => l !== "--" ? l : o ? "--" : "[--]").join(" "));
443
451
  }
444
452
  if (n.length > 1 && r.push(n.join(" ")), "commands" in t && t.commands?.length && r.push(`${t.name} <command>`), r.length > 0) return { id: "usage", type: "section", data: { title: "Usage:", body: r.join(`
445
453
  `) } };
446
454
  }
447
455
  }
448
- function _(t) {
449
- return !("commands" in t) || !t.commands?.length ? void 0 : { id: "commands", type: "section", data: { title: "Commands:", body: { type: "table", data: { tableData: t.commands.map((n) => [n.options.name, n.options.help ? n.options.help.description : ""]), tableOptions: [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }] } }, indentBody: 0 } };
456
+ s(F, "getUsage");
457
+ function H(t) {
458
+ return !("commands" in t) || !t.commands?.length ? void 0 : { id: "commands", type: "section", data: { title: "Commands:", body: { type: "table", data: { tableData: t.commands.map((n) => {
459
+ const { help: a } = n.options;
460
+ return [n.options.name, typeof a == "object" && a.description || ""];
461
+ }), tableOptions: [{ width: "content-width", paddingLeft: 2, paddingRight: 8 }] } }, indentBody: 0 } };
450
462
  }
451
- function k(t) {
452
- if (!(!t.flags || Object.keys(t.flags).length === 0)) return { id: "flags", type: "section", data: { title: "Flags:", body: D(t.flags), indentBody: 0 } };
463
+ s(H, "getCommands");
464
+ function U(t) {
465
+ if (!(!t.flags || Object.keys(t.flags).length === 0)) return { id: "flags", type: "section", data: { title: "Flags:", body: T(t.flags), indentBody: 0 } };
453
466
  }
454
- function F(t) {
467
+ s(U, "getFlags");
468
+ function V(t) {
455
469
  const { help: e } = t;
456
470
  if (!e || !e.examples || e.examples.length === 0) return;
457
471
  let { examples: r } = e;
458
472
  if (Array.isArray(r) && (r = r.join(`
459
473
  `)), r) return { id: "examples", type: "section", data: { title: "Examples:", body: r } };
460
474
  }
461
- function H(t) {
475
+ s(V, "getExamples");
476
+ function J(t) {
462
477
  if (!("alias" in t) || !t.alias) return;
463
478
  const { alias: e } = t;
464
479
  return { id: "aliases", type: "section", data: { title: "Aliases:", body: Array.isArray(e) ? e.join(", ") : e } };
465
480
  }
466
- const U = (t) => [R, L, T, _, k, F, H].map((e) => e(t)).filter(Boolean), V = N$1.WriteStream.prototype.hasColors();
467
- class J {
481
+ s(J, "getAliases");
482
+ const M = s((t) => [k, _, F, H, U, V, J].map((e) => e(t)).filter(Boolean), "generateHelp"), W = S$1.WriteStream.prototype.hasColors();
483
+ class z {
484
+ static {
485
+ s(this, "Renderers");
486
+ }
468
487
  text(e) {
469
488
  return e;
470
489
  }
471
490
  bold(e) {
472
- return V ? `\x1B[1m${e}\x1B[22m` : e.toLocaleUpperCase();
491
+ return W ? `\x1B[1m${e}\x1B[22m` : e.toLocaleUpperCase();
473
492
  }
474
493
  indentText({ text: e, spaces: r }) {
475
- return e.replace(/^/gm, " ".repeat(r));
494
+ return e.replaceAll(/^/gm, " ".repeat(r));
476
495
  }
477
496
  heading(e) {
478
497
  return this.bold(e);
@@ -483,7 +502,7 @@ class J {
483
502
  `;
484
503
  }
485
504
  table({ tableData: e, tableOptions: r, tableBreakpoints: n }) {
486
- return mD(e.map((a) => a.map((i) => this.render(i))), n ? wD(n) : r);
505
+ return rD(e.map((a) => a.map((i) => this.render(i))), n ? AD(n) : r);
487
506
  }
488
507
  flagParameter(e) {
489
508
  return e === Boolean ? "" : e === String ? "<string>" : e === Number ? "<number>" : Array.isArray(e) ? this.flagParameter(e[0]) : "<value>";
@@ -493,13 +512,13 @@ class J {
493
512
  }
494
513
  flagName(e) {
495
514
  const { flag: r, flagFormatted: n, aliasesEnabled: a, aliasFormatted: i } = e;
496
- let s = "";
497
- if (i ? s += `${i}, ` : a && (s += " "), s += n, "placeholder" in r && typeof r.placeholder == "string") s += `${this.flagOperator(e)}${r.placeholder}`;
515
+ let o = "";
516
+ if (i ? o += `${i}, ` : a && (o += " "), o += n, "placeholder" in r && typeof r.placeholder == "string") o += `${this.flagOperator(e)}${r.placeholder}`;
498
517
  else {
499
- const o = this.flagParameter("type" in r ? r.type : r);
500
- o && (s += `${this.flagOperator(e)}${o}`);
518
+ const l = this.flagParameter("type" in r ? r.type : r);
519
+ l && (o += `${this.flagOperator(e)}${l}`);
501
520
  }
502
- return s;
521
+ return o;
503
522
  }
504
523
  flagDefault(e) {
505
524
  return JSON.stringify(e);
@@ -523,87 +542,101 @@ class J {
523
542
  throw new Error(`Invalid node type: ${JSON.stringify(e)}`);
524
543
  }
525
544
  }
526
- const y = (t) => t.length > 0 && !t.includes(" "), { stringify: d } = JSON, M = /[|\\{}()[\]^$+*?.]/;
527
- function w(t) {
545
+ const $ = s((t) => t.length > 0 && !t.includes(" "), "isValidScriptName"), { stringify: f } = JSON, Z = /[|\\{}()[\]^$+*?.]/;
546
+ function x(t) {
528
547
  const e = [];
529
548
  let r, n;
530
549
  for (const a of t) {
531
- if (n) throw new Error(`Invalid parameter: Spread parameter ${d(n)} must be last`);
532
- const i = a[0], s = a[a.length - 1];
533
- let o;
534
- if (i === "<" && s === ">" && (o = true, r)) throw new Error(`Invalid parameter: Required parameter ${d(a)} cannot come after optional parameter ${d(r)}`);
535
- if (i === "[" && s === "]" && (o = false, r = a), o === void 0) throw new Error(`Invalid parameter: ${d(a)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);
536
- let l = a.slice(1, -1);
537
- const f = l.slice(-3) === "...";
538
- f && (n = a, l = l.slice(0, -3));
539
- const p = l.match(M);
540
- if (p) throw new Error(`Invalid parameter: ${d(a)}. Invalid character found ${d(p[0])}`);
541
- e.push({ name: l, required: o, spread: f });
550
+ if (n) throw new Error(`Invalid parameter: Spread parameter ${f(n)} must be last`);
551
+ const i = a[0], o = a.at(-1);
552
+ let l;
553
+ if (i === "<" && o === ">" && (l = true, r)) throw new Error(`Invalid parameter: Required parameter ${f(a)} cannot come after optional parameter ${f(r)}`);
554
+ if (i === "[" && o === "]" && (l = false, r = a), l === void 0) throw new Error(`Invalid parameter: ${f(a)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);
555
+ let c = a.slice(1, -1);
556
+ const m = c.slice(-3) === "...";
557
+ m && (n = a, c = c.slice(0, -3));
558
+ const u = c.match(Z);
559
+ if (u) throw new Error(`Invalid parameter: ${f(a)}. Invalid character found ${f(u[0])}`);
560
+ e.push({ name: c, required: l, spread: m });
542
561
  }
543
562
  return e;
544
563
  }
545
- function b(t, e, r, n) {
564
+ s(x, "parseParameters");
565
+ function O(t, e, r, n) {
546
566
  for (let a = 0; a < e.length; a += 1) {
547
- const { name: i, required: s, spread: o } = e[a], l = P(i);
548
- if (l in t) throw new Error(`Invalid parameter: ${d(i)} is used more than once.`);
549
- const f = o ? r.slice(a) : r[a];
550
- if (o && (a = e.length), s && (!f || o && f.length === 0)) return console.error(`Error: Missing required parameter ${d(i)}
567
+ const { name: i, required: o, spread: l } = e[a], c = R(i);
568
+ if (c in t) throw new Error(`Invalid parameter: ${f(i)} is used more than once.`);
569
+ const m = l ? r.slice(a) : r[a];
570
+ if (l && (a = e.length), o && (!m || l && m.length === 0)) return console.error(`Error: Missing required parameter ${f(i)}
551
571
  `), n(), process.exit(1);
552
- t[l] = f;
572
+ t[c] = m;
553
573
  }
554
574
  }
555
- function W(t) {
556
- return t === void 0 || t !== false;
575
+ s(O, "mapParametersToArguments");
576
+ function G(t) {
577
+ return t !== false;
557
578
  }
558
- function x(t, e, r, n) {
559
- const a = { ...e.flags }, i = e.version;
579
+ s(G, "helpEnabled");
580
+ function j(t, e, r, n) {
581
+ const a = { ...e.flags }, i = e.version && !("version" in a);
560
582
  i && (a.version = { type: Boolean, description: "Show version" });
561
- const { help: s } = e, o = W(s);
562
- o && !("help" in a) && (a.help = { type: Boolean, alias: "h", description: "Show help" });
563
- const l = U$2(a, n, { ignore: e.ignoreArgv }), f = () => {
583
+ const { help: o } = e, l = G(o);
584
+ l && !("help" in a) && (a.help = { type: Boolean, alias: "h", description: "Show help" });
585
+ const c = z$2(a, n, { ignore: e.ignoreArgv }), m = s(() => {
564
586
  console.log(e.version);
565
- };
566
- if (i && l.flags.version === true) return f(), process.exit(0);
567
- const p = new J(), O = o && s?.render ? s.render : (c) => p.render(c), u = (c) => {
568
- const m = U({ ...e, ...c ? { help: c } : {}, flags: a });
569
- console.log(O(m, p));
570
- };
571
- if (o && l.flags.help === true) return u(), process.exit(0);
587
+ }, "showVersion");
588
+ if (i && c.flags.version === true) return m(), process.exit(0);
589
+ const u = new z(), N = l && o?.render ? o.render : (d) => u.render(d), h = s((d) => {
590
+ const p = M({ ...e, ...d ? { help: d } : {}, flags: a });
591
+ console.log(N(p, u));
592
+ }, "showHelp");
593
+ if (l && c.flags.help === true) return h(), process.exit(0);
572
594
  if (e.parameters) {
573
- let { parameters: c } = e, m = l._;
574
- const g = c.indexOf("--"), v = c.slice(g + 1), h = /* @__PURE__ */ Object.create(null);
575
- if (g > -1 && v.length > 0) {
576
- c = c.slice(0, g);
577
- const E = l._["--"];
578
- m = m.slice(0, -E.length || void 0), b(h, w(c), m, u), b(h, w(v), E, u);
579
- } else b(h, w(c), m, u);
580
- Object.assign(l._, h);
581
- }
582
- const $ = { ...l, showVersion: f, showHelp: u };
583
- return typeof r == "function" && r($), { command: t, ...$ };
595
+ let { parameters: d } = e, p = c._;
596
+ const g = d.indexOf("--"), y = d.slice(g + 1), w = /* @__PURE__ */ Object.create(null);
597
+ let b = [];
598
+ g > -1 && y.length > 0 && (d = d.slice(0, g), b = c._["--"], p = p.slice(0, -b.length || void 0)), O(w, x(d), p, h), g > -1 && y.length > 0 && O(w, x(y), b, h), Object.assign(c._, w);
599
+ }
600
+ const v = { ...c, showVersion: m, showHelp: h }, A = { command: t, ...v };
601
+ if (typeof r == "function") {
602
+ const d = r(v);
603
+ if (d && "then" in d) return Object.assign(Promise.resolve(d), A);
604
+ }
605
+ return A;
584
606
  }
585
- function z(t, e) {
607
+ s(j, "cliBase");
608
+ function K(t, e) {
586
609
  const r = /* @__PURE__ */ new Map();
587
610
  for (const n of e) {
588
611
  const a = [n.options.name], { alias: i } = n.options;
589
612
  i && (Array.isArray(i) ? a.push(...i) : a.push(i));
590
- for (const s of a) {
591
- if (r.has(s)) throw new Error(`Duplicate command name found: ${d(s)}`);
592
- r.set(s, n);
613
+ for (const o of a) {
614
+ if (r.has(o)) throw new Error(`Duplicate command name found: ${f(o)}`);
615
+ r.set(o, n);
593
616
  }
594
617
  }
595
618
  return r.get(t);
596
619
  }
597
- function Z(t, e, r = process.argv.slice(2)) {
620
+ s(K, "getCommand");
621
+ function Q(t, e, r = process.argv.slice(2)) {
598
622
  if (!t) throw new Error("Options is required");
599
- if ("name" in t && (!t.name || !y(t.name))) throw new Error(`Invalid script name: ${d(t.name)}`);
623
+ if ("name" in t && (!t.name || !$(t.name))) throw new Error(`Invalid script name: ${f(t.name)}`);
600
624
  const n = r[0];
601
- if (t.commands && n && y(n)) {
602
- const a = z(n, t.commands);
603
- if (a) return x(a.options.name, { ...a.options, parent: t }, a.callback, r.slice(1));
625
+ if (t.commands && n && $(n)) {
626
+ const a = K(n, t.commands);
627
+ if (a) return j(a.options.name, { ...a.options, parent: t }, a.callback, r.slice(1));
604
628
  }
605
- return x(void 0, t, e, r);
629
+ return j(void 0, t, e, r);
630
+ }
631
+ s(Q, "cli");
632
+ function X(t, e) {
633
+ if (!t) throw new Error("Command options are required");
634
+ const { name: r } = t;
635
+ if (r === void 0) throw new Error("Command name is required");
636
+ if (!$(r)) throw new Error(`Invalid command name ${JSON.stringify(r)}. Command names must be one word.`);
637
+ return { options: t, callback: e };
606
638
  }
639
+ s(X, "command");
607
640
 
608
641
  const peq = new Uint32Array(65536);
609
642
  const myers_32 = (a, b) => {
@@ -744,7 +777,7 @@ const closest = (str, arr) => {
744
777
  };
745
778
 
746
779
  var name = "poof";
747
- var version = "3.0.0";
780
+ var version = "3.0.1";
748
781
  var description = "Fast, non-blocking rm -rf alternative. Deletes files instantly while cleanup runs in the background.";
749
782
  var packageJson = {
750
783
  name: name,
@@ -768,11 +801,13 @@ const formatError = ({ error }) => {
768
801
  }
769
802
  return message;
770
803
  };
771
- const argv = Z({
804
+ const argv = Q({
772
805
  name: packageJson.name,
773
806
  version: packageJson.version,
774
- description: packageJson.description,
775
807
  parameters: ["[globs...]"],
808
+ help: {
809
+ description: packageJson.description
810
+ },
776
811
  flags: {
777
812
  dry: {
778
813
  type: Boolean,
package/dist/index.mjs CHANGED
@@ -1680,7 +1680,9 @@ const startRmWorker = () => {
1680
1680
  const child = spawn(process.execPath, [rmWorkerPath], {
1681
1681
  detached: true,
1682
1682
  stdio: ["pipe", "ignore", "ignore"],
1683
- windowsHide: true
1683
+ windowsHide: true,
1684
+ cwd: "/"
1685
+ // Don't hold reference to parent's cwd (allows directory deletion on Windows)
1684
1686
  });
1685
1687
  const stdin = child.stdin;
1686
1688
  child.unref();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poof",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Fast, non-blocking rm -rf alternative. Deletes files instantly while cleanup runs in the background.",
5
5
  "keywords": [
6
6
  "rm",
@@ -11,6 +11,11 @@
11
11
  "cli"
12
12
  ],
13
13
  "license": "MIT",
14
+ "repository": "privatenumber/poof",
15
+ "author": {
16
+ "name": "Hiroki Osame",
17
+ "email": "hiroki.osame@gmail.com"
18
+ },
14
19
  "files": [
15
20
  "dist"
16
21
  ],