@vltpkg/cli-js 1.0.0-rc.31 → 1.0.0-rc.33

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.
Files changed (85) hide show
  1. package/{access-I7Q5S4HE.js → access-VP3KSJ2M.js} +23 -12
  2. package/{bugs-45YPQ2T5.js → bugs-4ZQXJA4F.js} +19 -17
  3. package/{build-ICCKNOZT.js → build-P74RVUUP.js} +13 -9
  4. package/{cache-U44GAPOY.js → cache-J4J3ZWXP.js} +19 -14
  5. package/cache-unzip-src-unzip.js +434 -428
  6. package/{chunk-Q3DNNTPG.js → chunk-2PLIV3N3.js} +113 -34
  7. package/{chunk-BCS77CZK.js → chunk-4RZDJQ5U.js} +42 -61
  8. package/{chunk-X5R27Q65.js → chunk-4SSFBFB5.js} +123 -92
  9. package/{chunk-QZ6G5VRS.js → chunk-5COWONUB.js} +5 -5
  10. package/{chunk-TLCNALWV.js → chunk-7KI6XHXZ.js} +68 -7
  11. package/{chunk-R44FR7BY.js → chunk-7NHXV6AH.js} +439 -433
  12. package/{chunk-FBTBHRPG.js → chunk-7TNSW6W3.js} +1 -1
  13. package/{chunk-UUE6D7ZK.js → chunk-BAUMCTQK.js} +694 -440
  14. package/{chunk-FXDRM4ZO.js → chunk-CLVRCGOZ.js} +247 -235
  15. package/{chunk-YCQTLBWF.js → chunk-CNSTFT7U.js} +1 -1
  16. package/{chunk-BCG46IIG.js → chunk-DJYKQWV2.js} +7 -7
  17. package/chunk-E74WGW5C.js +49 -0
  18. package/chunk-EAWRHC27.js +75 -0
  19. package/{chunk-IYO5QKUW.js → chunk-EFWPI6IY.js} +1 -1
  20. package/{chunk-JVCMIUEP.js → chunk-EQ633HIM.js} +14 -13
  21. package/{chunk-U6ONVNUF.js → chunk-F2FKLPZD.js} +7 -7
  22. package/chunk-FAG776ZD.js +137 -0
  23. package/{chunk-HQ4US6G3.js → chunk-FWKQ7YDF.js} +1049 -980
  24. package/{chunk-OMHPDQOQ.js → chunk-GTICKXWZ.js} +11 -8
  25. package/{chunk-SZPDTJMF.js → chunk-ICJRCXSG.js} +31 -27
  26. package/{chunk-YHLRGHF7.js → chunk-JEE4B4FL.js} +3 -3
  27. package/{chunk-5XHNL6N6.js → chunk-JLGPPV6Z.js} +62 -12
  28. package/{chunk-U5KA63OT.js → chunk-JZQAUAHT.js} +1 -1
  29. package/{chunk-C2X7PVDF.js → chunk-MT76WHSM.js} +1 -1
  30. package/{chunk-EXHIB5H4.js → chunk-OTNMX4EK.js} +3 -3
  31. package/{chunk-2V4AQPBR.js → chunk-PMCAQG5J.js} +85 -46
  32. package/{chunk-PHJXJ53A.js → chunk-PW6S6AIO.js} +15 -11
  33. package/{chunk-NLFBANVO.js → chunk-SSN4CYZF.js} +18 -2
  34. package/chunk-UBLFPJHV.js +40 -0
  35. package/{chunk-Y7QHAJJQ.js → chunk-VGWEB64T.js} +3164 -2822
  36. package/{chunk-LRPTCGTW.js → chunk-XA47WS4N.js} +11 -15
  37. package/{chunk-QHBKZE6U.js → chunk-XIJFEV6U.js} +3 -3
  38. package/{ci-5CK3JONP.js → ci-GIDCFAZF.js} +14 -10
  39. package/cli-package.json +6 -2
  40. package/{config-MUVNKIGE.js → config-LIQMIMTF.js} +15 -13
  41. package/{config-4TAZ2WKY.js → config-NBO3COMM.js} +13 -11
  42. package/{create-GLJ454QZ.js → create-K2S3J62I.js} +24 -19
  43. package/{deprecate-WBRB2ACU.js → deprecate-4PJKNFXN.js} +22 -14
  44. package/{devtools-6NFQDW4L.js → devtools-HGLF4KAO.js} +82 -28
  45. package/{dist-tag-CQJW5BXA.js → dist-tag-TA6LWT2V.js} +16 -9
  46. package/{docs-DEGETERR.js → docs-ZCMIKQAN.js} +19 -17
  47. package/{exec-MP4CE2QF.js → exec-XVF4KCRJ.js} +24 -19
  48. package/{exec-cache-O5OTIYVM.js → exec-cache-2IWJNBFB.js} +22 -17
  49. package/{exec-local-S3253EEU.js → exec-local-FNFTQYFP.js} +17 -14
  50. package/{help-3ELBHB5T.js → help-ZDRILKVQ.js} +5 -4
  51. package/{init-VAPZRSOP.js → init-VMYJE5Q3.js} +12 -10
  52. package/{install-WI2XDPTF.js → install-ZHMWN27D.js} +27 -12
  53. package/{list-EDGJ5OZS.js → list-BPFKWXCR.js} +20 -15
  54. package/{login-2QU5SPGP.js → login-DQL5A4NT.js} +23 -9
  55. package/{logout-DVW3KZKJ.js → logout-Q74VRDSN.js} +19 -8
  56. package/{pack-FVQFCACM.js → pack-GLURO5KY.js} +17 -13
  57. package/package.json +8 -1
  58. package/{ping-5NKJAV3C.js → ping-PPEYPKZD.js} +17 -10
  59. package/{pkg-A6UAZWJJ.js → pkg-UTEKJ5CB.js} +13 -11
  60. package/{profile-OZYH6GL2.js → profile-5QFRWC2L.js} +16 -8
  61. package/{publish-7BC7UGRG.js → publish-5VDI3JXX.js} +23 -16
  62. package/{query-4ADVFHJD.js → query-I6DZ7TF2.js} +20 -15
  63. package/registry-ZVO3VAHY.js +117 -0
  64. package/registry-client-package.json +6 -2
  65. package/registry-client-src-revalidate.js +1233 -975
  66. package/{repo-NQCC2SV5.js → repo-SB3C7MZZ.js} +19 -17
  67. package/{reporter-MSQWYN76.js → reporter-2XBYWAVU.js} +3 -2
  68. package/{run-L647KHX5.js → run-U6CW5Q56.js} +17 -14
  69. package/{run-exec-6ACC3NDU.js → run-exec-RFB572AL.js} +19 -14
  70. package/security-archive-src-update-expired.js +16 -11
  71. package/setup-BFKUYGJB.js +181 -0
  72. package/{src-7GDXNZM6.js → src-ZWBXAZOV.js} +25 -17
  73. package/{token-MW32RFPW.js → token-M5HPJJJQ.js} +23 -10
  74. package/{uninstall-D3ZT544Q.js → uninstall-UUBTM4ZQ.js} +15 -11
  75. package/{unpublish-JB274OID.js → unpublish-WDSRB6DV.js} +17 -9
  76. package/{update-FILF2X56.js → update-J4BEFJRC.js} +14 -10
  77. package/{version-TMUOHL5P.js → version-ZVG66SKC.js} +12 -10
  78. package/{view-XHDLAT6W.js → view-WFK75G74.js} +19 -15
  79. package/vlr.js +1 -1
  80. package/vlrx.js +1 -1
  81. package/vlt.js +1 -1
  82. package/vlx.js +1 -1
  83. package/vlxl.js +1 -1
  84. package/{whoami-XH64UEWS.js → whoami-TCSDOBU2.js} +19 -8
  85. package/chunk-6SHB5AGY.js +0 -73
@@ -13,38 +13,38 @@ import {
13
13
  error
14
14
  } from "./chunk-WZWDS3W4.js";
15
15
 
16
- // ../../node_modules/.vlt/~npm~lru-cache@11.3.5/node_modules/lru-cache/dist/esm/node/index.min.js
17
- import { tracingChannel as j, channel as I } from "node:diagnostics_channel";
18
- var S = I("lru-cache:metrics");
19
- var W = j("lru-cache");
20
- var D = () => S.hasSubscribers || W.hasSubscribers;
21
- var G = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
22
- var M = /* @__PURE__ */ new Set();
23
- var C = typeof process == "object" && process ? process : {};
24
- var P = (u4, e, t, i2) => {
25
- typeof C.emitWarning == "function" ? C.emitWarning(u4, e, t, i2) : console.error(`[${t}] ${e}: ${u4}`);
16
+ // ../../node_modules/.vlt/~npm~lru-cache@11.5.2/node_modules/lru-cache/dist/esm/node/index.min.js
17
+ import { tracingChannel as G, channel as P } from "node:diagnostics_channel";
18
+ var S = P("lru-cache:metrics");
19
+ var W = G("lru-cache");
20
+ var L = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
21
+ var R = () => S.hasSubscribers || W.hasSubscribers;
22
+ var U = /* @__PURE__ */ new Set();
23
+ var M = typeof process == "object" && process ? process : {};
24
+ var k = (d4, e, t, i2) => {
25
+ typeof M.emitWarning == "function" ? M.emitWarning(d4, e, t, i2) : console.error(`[${t}] ${e}: ${d4}`);
26
26
  };
27
- var H = (u4) => !M.has(u4);
28
- var F = (u4) => !!u4 && u4 === Math.floor(u4) && u4 > 0 && isFinite(u4);
29
- var U = (u4) => F(u4) ? u4 <= Math.pow(2, 8) ? Uint8Array : u4 <= Math.pow(2, 16) ? Uint16Array : u4 <= Math.pow(2, 32) ? Uint32Array : u4 <= Number.MAX_SAFE_INTEGER ? O : null : null;
27
+ var H = (d4) => !U.has(d4);
28
+ var T = (d4) => !!d4 && d4 === Math.floor(d4) && d4 > 0 && isFinite(d4);
29
+ var j = (d4) => T(d4) ? d4 <= Math.pow(2, 8) ? Uint8Array : d4 <= Math.pow(2, 16) ? Uint16Array : d4 <= Math.pow(2, 32) ? Uint32Array : d4 <= Number.MAX_SAFE_INTEGER ? O : null : null;
30
30
  var O = class extends Array {
31
31
  constructor(e) {
32
32
  super(e), this.fill(0);
33
33
  }
34
34
  };
35
- var R = class u {
35
+ var x = class d {
36
36
  heap;
37
37
  length;
38
38
  static #o = false;
39
39
  static create(e) {
40
- let t = U(e);
40
+ let t = j(e);
41
41
  if (!t) return [];
42
- u.#o = true;
43
- let i2 = new u(e, t);
44
- return u.#o = false, i2;
42
+ d.#o = true;
43
+ let i2 = new d(e, t);
44
+ return d.#o = false, i2;
45
45
  }
46
46
  constructor(e, t) {
47
- if (!u.#o) throw new TypeError("instantiate Stack using Stack.create(n)");
47
+ if (!d.#o) throw new TypeError("instantiate Stack using Stack.create(n)");
48
48
  this.heap = new t(e), this.length = 0;
49
49
  }
50
50
  push(e) {
@@ -54,14 +54,14 @@ var R = class u {
54
54
  return this.heap[--this.length];
55
55
  }
56
56
  };
57
- var L = class u2 {
57
+ var I = class d2 {
58
58
  #o;
59
- #u;
60
- #w;
61
- #D;
59
+ #c;
62
60
  #S;
61
+ #O;
62
+ #w;
63
63
  #M;
64
- #U;
64
+ #I;
65
65
  #m;
66
66
  get perf() {
67
67
  return this.#m;
@@ -81,14 +81,15 @@ var L = class u2 {
81
81
  allowStaleOnFetchAbort;
82
82
  allowStaleOnFetchRejection;
83
83
  ignoreFetchAbort;
84
+ backgroundFetchSize;
84
85
  #n;
85
86
  #b;
86
87
  #s;
87
88
  #i;
88
89
  #t;
89
- #a;
90
- #c;
91
90
  #l;
91
+ #u;
92
+ #a;
92
93
  #h;
93
94
  #y;
94
95
  #r;
@@ -97,12 +98,12 @@ var L = class u2 {
97
98
  #d;
98
99
  #g;
99
100
  #T;
100
- #W;
101
+ #U;
101
102
  #f;
102
- #j;
103
+ #D;
103
104
  static unsafeExposeInternals(e) {
104
- return { starts: e.#F, ttls: e.#d, autopurgeTimers: e.#g, sizes: e.#_, keyMap: e.#s, keyList: e.#i, valList: e.#t, next: e.#a, prev: e.#c, get head() {
105
- return e.#l;
105
+ return { starts: e.#F, ttls: e.#d, autopurgeTimers: e.#g, sizes: e.#_, keyMap: e.#s, keyList: e.#i, valList: e.#t, next: e.#l, prev: e.#u, get head() {
106
+ return e.#a;
106
107
  }, get tail() {
107
108
  return e.#h;
108
109
  }, free: e.#y, isBackgroundFetch: (t) => e.#e(t), backgroundFetch: (t, i2, s, n7) => e.#P(t, i2, s, n7), moveToTail: (t) => e.#L(t), indexes: (t) => e.#A(t), rindexes: (t) => e.#z(t), isStale: (t) => e.#p(t) };
@@ -111,7 +112,7 @@ var L = class u2 {
111
112
  return this.#o;
112
113
  }
113
114
  get maxSize() {
114
- return this.#u;
115
+ return this.#c;
115
116
  }
116
117
  get calculatedSize() {
117
118
  return this.#b;
@@ -123,134 +124,139 @@ var L = class u2 {
123
124
  return this.#M;
124
125
  }
125
126
  get memoMethod() {
126
- return this.#U;
127
+ return this.#I;
127
128
  }
128
129
  get dispose() {
129
- return this.#w;
130
+ return this.#S;
130
131
  }
131
132
  get onInsert() {
132
- return this.#D;
133
+ return this.#O;
133
134
  }
134
135
  get disposeAfter() {
135
- return this.#S;
136
+ return this.#w;
136
137
  }
137
138
  constructor(e) {
138
- let { max: t = 0, ttl: i2, ttlResolution: s = 1, ttlAutopurge: n7, updateAgeOnGet: o, updateAgeOnHas: r, allowStale: h, dispose: l, onInsert: c, disposeAfter: f, noDisposeOnSet: g2, noUpdateTTL: p, maxSize: T3 = 0, maxEntrySize: w2 = 0, sizeCalculation: y2, fetchMethod: a2, memoMethod: m2, noDeleteOnFetchRejection: _3, noDeleteOnStaleGet: b, allowStaleOnFetchRejection: d2, allowStaleOnFetchAbort: A3, ignoreFetchAbort: z, perf: x2 } = e;
139
- if (x2 !== void 0 && typeof x2?.now != "function") throw new TypeError("perf option must have a now() method if specified");
140
- if (this.#m = x2 ?? G, t !== 0 && !F(t)) throw new TypeError("max option must be a nonnegative integer");
141
- let v3 = t ? U(t) : Array;
139
+ let { max: t = 0, ttl: i2, ttlResolution: s = 1, ttlAutopurge: n7, updateAgeOnGet: o, updateAgeOnHas: l, allowStale: h, dispose: r, onInsert: c, disposeAfter: m2, noDisposeOnSet: _3, noUpdateTTL: u2, maxSize: g2 = 0, maxEntrySize: f = 0, sizeCalculation: y2, fetchMethod: a2, memoMethod: w2, noDeleteOnFetchRejection: F3, noDeleteOnStaleGet: b, allowStaleOnFetchRejection: p, allowStaleOnFetchAbort: A3, ignoreFetchAbort: z, backgroundFetchSize: C3 = 1, perf: E } = e;
140
+ if (this.backgroundFetchSize = C3, E !== void 0 && typeof E?.now != "function") throw new TypeError("perf option must have a now() method if specified");
141
+ if (this.#m = E ?? L, t !== 0 && !T(t)) throw new TypeError("max option must be a nonnegative integer");
142
+ let v3 = t ? j(t) : Array;
142
143
  if (!v3) throw new Error("invalid max value: " + t);
143
- if (this.#o = t, this.#u = T3, this.maxEntrySize = w2 || this.#u, this.sizeCalculation = y2, this.sizeCalculation) {
144
- if (!this.#u && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
144
+ if (this.#o = t, this.#c = g2, this.maxEntrySize = f || this.#c, this.sizeCalculation = y2, this.sizeCalculation) {
145
+ if (!this.#c && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
145
146
  if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function");
146
147
  }
147
- if (m2 !== void 0 && typeof m2 != "function") throw new TypeError("memoMethod must be a function if defined");
148
- if (this.#U = m2, a2 !== void 0 && typeof a2 != "function") throw new TypeError("fetchMethod must be a function if specified");
149
- if (this.#M = a2, this.#W = !!a2, this.#s = /* @__PURE__ */ new Map(), this.#i = Array.from({ length: t }).fill(void 0), this.#t = Array.from({ length: t }).fill(void 0), this.#a = new v3(t), this.#c = new v3(t), this.#l = 0, this.#h = 0, this.#y = R.create(t), this.#n = 0, this.#b = 0, typeof l == "function" && (this.#w = l), typeof c == "function" && (this.#D = c), typeof f == "function" ? (this.#S = f, this.#r = []) : (this.#S = void 0, this.#r = void 0), this.#T = !!this.#w, this.#j = !!this.#D, this.#f = !!this.#S, this.noDisposeOnSet = !!g2, this.noUpdateTTL = !!p, this.noDeleteOnFetchRejection = !!_3, this.allowStaleOnFetchRejection = !!d2, this.allowStaleOnFetchAbort = !!A3, this.ignoreFetchAbort = !!z, this.maxEntrySize !== 0) {
150
- if (this.#u !== 0 && !F(this.#u)) throw new TypeError("maxSize must be a positive integer if specified");
151
- if (!F(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
148
+ if (w2 !== void 0 && typeof w2 != "function") throw new TypeError("memoMethod must be a function if defined");
149
+ if (this.#I = w2, a2 !== void 0 && typeof a2 != "function") throw new TypeError("fetchMethod must be a function if specified");
150
+ if (this.#M = a2, this.#U = !!a2, this.#s = /* @__PURE__ */ new Map(), this.#i = Array.from({ length: t }).fill(void 0), this.#t = Array.from({ length: t }).fill(void 0), this.#l = new v3(t), this.#u = new v3(t), this.#a = 0, this.#h = 0, this.#y = x.create(t), this.#n = 0, this.#b = 0, typeof r == "function" && (this.#S = r), typeof c == "function" && (this.#O = c), typeof m2 == "function" ? (this.#w = m2, this.#r = []) : (this.#w = void 0, this.#r = void 0), this.#T = !!this.#S, this.#D = !!this.#O, this.#f = !!this.#w, this.noDisposeOnSet = !!_3, this.noUpdateTTL = !!u2, this.noDeleteOnFetchRejection = !!F3, this.allowStaleOnFetchRejection = !!p, this.allowStaleOnFetchAbort = !!A3, this.ignoreFetchAbort = !!z, this.maxEntrySize !== 0) {
151
+ if (this.#c !== 0 && !T(this.#c)) throw new TypeError("maxSize must be a positive integer if specified");
152
+ if (!T(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
152
153
  this.#X();
153
154
  }
154
- if (this.allowStale = !!h, this.noDeleteOnStaleGet = !!b, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!r, this.ttlResolution = F(s) || s === 0 ? s : 1, this.ttlAutopurge = !!n7, this.ttl = i2 || 0, this.ttl) {
155
- if (!F(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
156
- this.#H();
155
+ if (this.allowStale = !!h, this.noDeleteOnStaleGet = !!b, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!l, this.ttlResolution = T(s) || s === 0 ? s : 1, this.ttlAutopurge = !!n7, this.ttl = i2 || 0, this.ttl) {
156
+ if (!T(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
157
+ this.#k();
157
158
  }
158
- if (this.#o === 0 && this.ttl === 0 && this.#u === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
159
- if (!this.ttlAutopurge && !this.#o && !this.#u) {
160
- let E = "LRU_CACHE_UNBOUNDED";
161
- H(E) && (M.add(E), P("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", E, u2));
159
+ if (this.#o === 0 && this.ttl === 0 && this.#c === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
160
+ if (!this.ttlAutopurge && !this.#o && !this.#c) {
161
+ let D2 = "LRU_CACHE_UNBOUNDED";
162
+ H(D2) && (U.add(D2), k("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", D2, d2));
162
163
  }
163
164
  }
164
165
  getRemainingTTL(e) {
165
166
  return this.#s.has(e) ? 1 / 0 : 0;
166
167
  }
167
- #H() {
168
+ #k() {
168
169
  let e = new O(this.#o), t = new O(this.#o);
169
170
  this.#d = e, this.#F = t;
170
171
  let i2 = this.ttlAutopurge ? Array.from({ length: this.#o }) : void 0;
171
- this.#g = i2, this.#N = (r, h, l = this.#m.now()) => {
172
- t[r] = h !== 0 ? l : 0, e[r] = h, s(r, h);
173
- }, this.#x = (r) => {
174
- t[r] = e[r] !== 0 ? this.#m.now() : 0, s(r, e[r]);
172
+ this.#g = i2, this.#H = (h, r, c = this.#m.now()) => {
173
+ t[h] = r !== 0 ? c : 0, e[h] = r, s(h, r);
174
+ }, this.#R = (h) => {
175
+ t[h] = e[h] !== 0 ? this.#m.now() : 0, s(h, e[h]);
175
176
  };
176
- let s = this.ttlAutopurge ? (r, h) => {
177
- if (i2?.[r] && (clearTimeout(i2[r]), i2[r] = void 0), h && h !== 0 && i2) {
178
- let l = setTimeout(() => {
179
- this.#p(r) && this.#v(this.#i[r], "expire");
180
- }, h + 1);
181
- l.unref && l.unref(), i2[r] = l;
177
+ let s = this.ttlAutopurge ? (h, r) => {
178
+ if (i2?.[h] && (clearTimeout(i2[h]), i2[h] = void 0), r && r !== 0 && i2) {
179
+ let c = setTimeout(() => {
180
+ this.#p(h) ? (this.#E(this.#i[h], "expire"), i2[h] = void 0) : s(h, l(h));
181
+ }, r + 1);
182
+ c.unref && c.unref(), i2[h] = c;
182
183
  }
183
184
  } : () => {
184
185
  };
185
- this.#E = (r, h) => {
186
- if (e[h]) {
187
- let l = e[h], c = t[h];
188
- if (!l || !c) return;
189
- r.ttl = l, r.start = c, r.now = n7 || o();
190
- let f = r.now - c;
191
- r.remainingTTL = l - f;
186
+ this.#v = (h, r) => {
187
+ if (e[r]) {
188
+ let c = e[r], m2 = t[r];
189
+ if (!c || !m2) return;
190
+ h.ttl = c, h.start = m2, h.now = n7 || o();
191
+ let _3 = h.now - m2;
192
+ h.remainingTTL = c - _3;
192
193
  }
193
194
  };
194
195
  let n7 = 0, o = () => {
195
- let r = this.#m.now();
196
+ let h = this.#m.now();
196
197
  if (this.ttlResolution > 0) {
197
- n7 = r;
198
- let h = setTimeout(() => n7 = 0, this.ttlResolution);
199
- h.unref && h.unref();
198
+ n7 = h;
199
+ let r = setTimeout(() => n7 = 0, this.ttlResolution);
200
+ r.unref && r.unref();
200
201
  }
201
- return r;
202
+ return h;
202
203
  };
203
- this.getRemainingTTL = (r) => {
204
- let h = this.#s.get(r);
205
- if (h === void 0) return 0;
206
- let l = e[h], c = t[h];
207
- if (!l || !c) return 1 / 0;
208
- let f = (n7 || o()) - c;
209
- return l - f;
210
- }, this.#p = (r) => {
211
- let h = t[r], l = e[r];
212
- return !!l && !!h && (n7 || o()) - h > l;
204
+ this.getRemainingTTL = (h) => {
205
+ let r = this.#s.get(h);
206
+ return r === void 0 ? 0 : l(r);
207
+ };
208
+ let l = (h) => {
209
+ let r = e[h], c = t[h];
210
+ if (!r || !c) return 1 / 0;
211
+ let m2 = (n7 || o()) - c;
212
+ return r - m2;
213
+ };
214
+ this.#p = (h) => {
215
+ let r = t[h], c = e[h];
216
+ return !!c && !!r && (n7 || o()) - r > c;
213
217
  };
214
218
  }
215
- #x = () => {
219
+ #R = () => {
216
220
  };
217
- #E = () => {
221
+ #v = () => {
218
222
  };
219
- #N = () => {
223
+ #H = () => {
220
224
  };
221
225
  #p = () => false;
222
226
  #X() {
223
227
  let e = new O(this.#o);
224
- this.#b = 0, this.#_ = e, this.#R = (t) => {
228
+ this.#b = 0, this.#_ = e, this.#x = (t) => {
225
229
  this.#b -= e[t], e[t] = 0;
226
- }, this.#k = (t, i2, s, n7) => {
227
- if (this.#e(i2)) return 0;
228
- if (!F(s)) if (n7) {
229
- if (typeof n7 != "function") throw new TypeError("sizeCalculation must be a function");
230
- if (s = n7(i2, t), !F(s)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
231
- } else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
230
+ }, this.#N = (t, i2, s, n7) => {
231
+ if (!T(s)) {
232
+ if (this.#e(i2)) return this.backgroundFetchSize;
233
+ if (n7) {
234
+ if (typeof n7 != "function") throw new TypeError("sizeCalculation must be a function");
235
+ if (s = n7(i2, t), !T(s)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
236
+ } else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
237
+ }
232
238
  return s;
233
- }, this.#I = (t, i2, s) => {
234
- if (e[t] = i2, this.#u) {
235
- let n7 = this.#u - e[t];
239
+ }, this.#j = (t, i2, s) => {
240
+ if (e[t] = i2, this.#c) {
241
+ let n7 = this.#c - e[t];
236
242
  for (; this.#b > n7; ) this.#G(true);
237
243
  }
238
244
  this.#b += e[t], s && (s.entrySize = i2, s.totalCalculatedSize = this.#b);
239
245
  };
240
246
  }
241
- #R = (e) => {
247
+ #x = (e) => {
242
248
  };
243
- #I = (e, t, i2) => {
249
+ #j = (e, t, i2) => {
244
250
  };
245
- #k = (e, t, i2, s) => {
251
+ #N = (e, t, i2, s) => {
246
252
  if (i2 || s) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
247
253
  return 0;
248
254
  };
249
255
  *#A({ allowStale: e = this.allowStale } = {}) {
250
- if (this.#n) for (let t = this.#h; this.#V(t) && ((e || !this.#p(t)) && (yield t), t !== this.#l); ) t = this.#c[t];
256
+ if (this.#n) for (let t = this.#h; this.#V(t) && ((e || !this.#p(t)) && (yield t), t !== this.#a); ) t = this.#u[t];
251
257
  }
252
258
  *#z({ allowStale: e = this.allowStale } = {}) {
253
- if (this.#n) for (let t = this.#l; this.#V(t) && ((e || !this.#p(t)) && (yield t), t !== this.#h); ) t = this.#a[t];
259
+ if (this.#n) for (let t = this.#a; this.#V(t) && ((e || !this.#p(t)) && (yield t), t !== this.#h); ) t = this.#l[t];
254
260
  }
255
261
  #V(e) {
256
262
  return e !== void 0 && this.#s.get(this.#i[e]) === e;
@@ -303,7 +309,7 @@ var L = class u2 {
303
309
  }
304
310
  purgeStale() {
305
311
  let e = false;
306
- for (let t of this.#z({ allowStale: true })) this.#p(t) && (this.#v(this.#i[t], "expire"), e = true);
312
+ for (let t of this.#z({ allowStale: true })) this.#p(t) && (this.#E(this.#i[t], "expire"), e = true);
307
313
  return e;
308
314
  }
309
315
  info(e) {
@@ -313,9 +319,9 @@ var L = class u2 {
313
319
  if (s === void 0) return;
314
320
  let n7 = { value: s };
315
321
  if (this.#d && this.#F) {
316
- let o = this.#d[t], r = this.#F[t];
317
- if (o && r) {
318
- let h = o - (this.#m.now() - r);
322
+ let o = this.#d[t], l = this.#F[t];
323
+ if (o && l) {
324
+ let h = o - (this.#m.now() - l);
319
325
  n7.ttl = h, n7.start = Date.now();
320
326
  }
321
327
  }
@@ -329,8 +335,8 @@ var L = class u2 {
329
335
  let o = { value: n7 };
330
336
  if (this.#d && this.#F) {
331
337
  o.ttl = this.#d[t];
332
- let r = this.#m.now() - this.#F[t];
333
- o.start = Math.floor(Date.now() - r);
338
+ let l = this.#m.now() - this.#F[t];
339
+ o.start = Math.floor(Date.now() - l);
334
340
  }
335
341
  this.#_ && (o.size = this.#_[t]), e.unshift([i2, o]);
336
342
  }
@@ -343,51 +349,49 @@ var L = class u2 {
343
349
  let s = Date.now() - i2.start;
344
350
  i2.start = this.#m.now() - s;
345
351
  }
346
- this.#O(t, i2.value, i2);
352
+ this.#W(t, i2.value, i2);
347
353
  }
348
354
  }
349
355
  set(e, t, i2 = {}) {
350
356
  let { status: s = S.hasSubscribers ? {} : void 0 } = i2;
351
- i2.status = s, s && (s.op = "set", s.key = e, t !== void 0 && (s.value = t));
352
- let n7 = this.#O(e, t, i2);
357
+ i2.status = s, s && (s.op = "set", s.key = e, t !== void 0 && (s.value = t), s.cache = this);
358
+ let n7 = this.#W(e, t, i2);
353
359
  return s && S.hasSubscribers && S.publish(s), n7;
354
360
  }
355
- #O(e, t, i2 = {}) {
356
- let { ttl: s = this.ttl, start: n7, noDisposeOnSet: o = this.noDisposeOnSet, sizeCalculation: r = this.sizeCalculation, status: h } = i2;
357
- if (t === void 0) return h && (h.set = "deleted"), this.delete(e), this;
358
- let { noUpdateTTL: l = this.noUpdateTTL } = i2;
359
- h && !this.#e(t) && (h.value = t);
360
- let c = this.#k(e, t, i2.size || 0, r, h);
361
- if (this.maxEntrySize && c > this.maxEntrySize) return this.#v(e, "set"), h && (h.set = "miss", h.maxEntrySizeExceeded = true), this;
362
- let f = this.#n === 0 ? void 0 : this.#s.get(e);
363
- if (f === void 0) f = this.#n === 0 ? this.#h : this.#y.length !== 0 ? this.#y.pop() : this.#n === this.#o ? this.#G(false) : this.#n, this.#i[f] = e, this.#t[f] = t, this.#s.set(e, f), this.#a[this.#h] = f, this.#c[f] = this.#h, this.#h = f, this.#n++, this.#I(f, c, h), h && (h.set = "add"), l = false, this.#j && this.#D?.(t, e, "add");
361
+ #W(e, t, i2, s) {
362
+ let { ttl: n7 = this.ttl, start: o, noDisposeOnSet: l = this.noDisposeOnSet, sizeCalculation: h = this.sizeCalculation, status: r } = i2, c = this.#e(t);
363
+ if (t === void 0) return r && (r.set = "deleted"), this.delete(e), this;
364
+ let { noUpdateTTL: m2 = this.noUpdateTTL } = i2;
365
+ r && !c && (r.value = t);
366
+ let _3 = this.#N(e, t, i2.size || 0, h, r);
367
+ if (this.maxEntrySize && _3 > this.maxEntrySize) return this.#E(e, "set"), r && (r.set = "miss", r.maxEntrySizeExceeded = true), this;
368
+ let u2 = this.#n === 0 ? void 0 : this.#s.get(e);
369
+ if (u2 === void 0) u2 = this.#n === 0 ? this.#h : this.#y.length !== 0 ? this.#y.pop() : this.#n === this.#o ? this.#G(false) : this.#n, this.#i[u2] = e, this.#t[u2] = t, this.#s.set(e, u2), this.#l[this.#h] = u2, this.#u[u2] = this.#h, this.#h = u2, this.#n++, this.#j(u2, _3, r), r && (r.set = "add"), m2 = false, this.#D && !c && this.#O?.(t, e, "add");
364
370
  else {
365
- this.#L(f);
366
- let g2 = this.#t[f];
371
+ this.#L(u2);
372
+ let g2 = this.#t[u2];
367
373
  if (t !== g2) {
368
- if (this.#W && this.#e(g2)) {
369
- g2.__abortController.abort(new Error("replaced"));
370
- let { __staleWhileFetching: p } = g2;
371
- p !== void 0 && !o && (this.#T && this.#w?.(p, e, "set"), this.#f && this.#r?.push([p, e, "set"]));
372
- } else o || (this.#T && this.#w?.(g2, e, "set"), this.#f && this.#r?.push([g2, e, "set"]));
373
- if (this.#R(f), this.#I(f, c, h), this.#t[f] = t, h) {
374
- h.set = "replace";
375
- let p = g2 && this.#e(g2) ? g2.__staleWhileFetching : g2;
376
- p !== void 0 && (h.oldValue = p);
374
+ if (!l) if (this.#e(g2)) {
375
+ g2 !== s && g2.__abortController.abort(new Error("replaced"));
376
+ let { __staleWhileFetching: f } = g2;
377
+ f !== void 0 && f !== t && (this.#T && this.#S?.(f, e, "set"), this.#f && this.#r?.push([f, e, "set"]));
378
+ } else this.#T && this.#S?.(g2, e, "set"), this.#f && this.#r?.push([g2, e, "set"]);
379
+ if (this.#x(u2), this.#j(u2, _3, r), this.#t[u2] = t, !c) {
380
+ let f = g2 && this.#e(g2) ? g2.__staleWhileFetching : g2, y2 = f === void 0 ? "add" : t !== f ? "replace" : "update";
381
+ r && (r.set = y2, f !== void 0 && (r.oldValue = f)), this.#D && this.onInsert?.(t, e, y2);
377
382
  }
378
- } else h && (h.set = "update");
379
- this.#j && this.onInsert?.(t, e, t === g2 ? "update" : "replace");
383
+ } else c || (r && (r.set = "update"), this.#D && this.onInsert?.(t, e, "update"));
380
384
  }
381
- if (s !== 0 && !this.#d && this.#H(), this.#d && (l || this.#N(f, s, n7), h && this.#E(h, f)), !o && this.#f && this.#r) {
382
- let g2 = this.#r, p;
383
- for (; p = g2?.shift(); ) this.#S?.(...p);
385
+ if (n7 !== 0 && !this.#d && this.#k(), this.#d && (m2 || this.#H(u2, n7, o), r && this.#v(r, u2)), !l && this.#f && this.#r) {
386
+ let g2 = this.#r, f;
387
+ for (; f = g2?.shift(); ) this.#w?.(...f);
384
388
  }
385
389
  return this;
386
390
  }
387
391
  pop() {
388
392
  try {
389
393
  for (; this.#n; ) {
390
- let e = this.#t[this.#l];
394
+ let e = this.#t[this.#a];
391
395
  if (this.#G(true), this.#e(e)) {
392
396
  if (e.__staleWhileFetching) return e.__staleWhileFetching;
393
397
  } else if (e !== void 0) return e;
@@ -395,17 +399,19 @@ var L = class u2 {
395
399
  } finally {
396
400
  if (this.#f && this.#r) {
397
401
  let e = this.#r, t;
398
- for (; t = e?.shift(); ) this.#S?.(...t);
402
+ for (; t = e?.shift(); ) this.#w?.(...t);
399
403
  }
400
404
  }
401
405
  }
402
406
  #G(e) {
403
- let t = this.#l, i2 = this.#i[t], s = this.#t[t];
404
- return this.#W && this.#e(s) ? s.__abortController.abort(new Error("evicted")) : (this.#T || this.#f) && (this.#T && this.#w?.(s, i2, "evict"), this.#f && this.#r?.push([s, i2, "evict"])), this.#R(t), this.#g?.[t] && (clearTimeout(this.#g[t]), this.#g[t] = void 0), e && (this.#i[t] = void 0, this.#t[t] = void 0, this.#y.push(t)), this.#n === 1 ? (this.#l = this.#h = 0, this.#y.length = 0) : this.#l = this.#a[t], this.#s.delete(i2), this.#n--, t;
407
+ let t = this.#a, i2 = this.#i[t], s = this.#t[t], n7 = this.#e(s);
408
+ n7 && s.__abortController.abort(new Error("evicted"));
409
+ let o = n7 ? s.__staleWhileFetching : s;
410
+ return (this.#T || this.#f) && o !== void 0 && (this.#T && this.#S?.(o, i2, "evict"), this.#f && this.#r?.push([o, i2, "evict"])), this.#x(t), this.#g?.[t] && (clearTimeout(this.#g[t]), this.#g[t] = void 0), e && (this.#i[t] = void 0, this.#t[t] = void 0, this.#y.push(t)), this.#n === 1 ? (this.#a = this.#h = 0, this.#y.length = 0) : this.#a = this.#l[t], this.#s.delete(i2), this.#n--, t;
405
411
  }
406
412
  has(e, t = {}) {
407
413
  let { status: i2 = S.hasSubscribers ? {} : void 0 } = t;
408
- t.status = i2, i2 && (i2.op = "has", i2.key = e);
414
+ t.status = i2, i2 && (i2.op = "has", i2.key = e, i2.cache = this);
409
415
  let s = this.#Y(e, t);
410
416
  return S.hasSubscribers && S.publish(i2), s;
411
417
  }
@@ -414,14 +420,14 @@ var L = class u2 {
414
420
  if (n7 !== void 0) {
415
421
  let o = this.#t[n7];
416
422
  if (this.#e(o) && o.__staleWhileFetching === void 0) return false;
417
- if (this.#p(n7)) s && (s.has = "stale", this.#E(s, n7));
418
- else return i2 && this.#x(n7), s && (s.has = "hit", this.#E(s, n7)), true;
423
+ if (this.#p(n7)) s && (s.has = "stale", this.#v(s, n7));
424
+ else return i2 && this.#R(n7), s && (s.has = "hit", this.#v(s, n7)), true;
419
425
  } else s && (s.has = "miss");
420
426
  return false;
421
427
  }
422
428
  peek(e, t = {}) {
423
- let { status: i2 = D() ? {} : void 0 } = t;
424
- i2 && (i2.op = "peek", i2.key = e), t.status = i2;
429
+ let { status: i2 = R() ? {} : void 0 } = t;
430
+ i2 && (i2.op = "peek", i2.key = e, i2.cache = this), t.status = i2;
425
431
  let s = this.#J(e, t);
426
432
  return S.hasSubscribers && S.publish(i2), s;
427
433
  }
@@ -431,70 +437,70 @@ var L = class u2 {
431
437
  i2 && (i2.peek = n7 === void 0 ? "miss" : "stale");
432
438
  return;
433
439
  }
434
- let o = this.#t[n7], r = this.#e(o) ? o.__staleWhileFetching : o;
435
- return i2 && (r !== void 0 ? (i2.peek = "hit", i2.value = r) : i2.peek = "miss"), r;
440
+ let o = this.#t[n7], l = this.#e(o) ? o.__staleWhileFetching : o;
441
+ return i2 && (l !== void 0 ? (i2.peek = "hit", i2.value = l) : i2.peek = "miss"), l;
436
442
  }
437
443
  #P(e, t, i2, s) {
438
444
  let n7 = t === void 0 ? void 0 : this.#t[t];
439
445
  if (this.#e(n7)) return n7;
440
- let o = new AbortController(), { signal: r } = i2;
441
- r?.addEventListener("abort", () => o.abort(r.reason), { signal: o.signal });
442
- let h = { signal: o.signal, options: i2, context: s }, l = (w2, y2 = false) => {
443
- let { aborted: a2 } = o.signal, m2 = i2.ignoreFetchAbort && w2 !== void 0, _3 = i2.ignoreFetchAbort || !!(i2.allowStaleOnFetchAbort && w2 !== void 0);
444
- if (i2.status && (a2 && !y2 ? (i2.status.fetchAborted = true, i2.status.fetchError = o.signal.reason, m2 && (i2.status.fetchAbortIgnored = true)) : i2.status.fetchResolved = true), a2 && !m2 && !y2) return f(o.signal.reason, _3);
445
- let b = p, d2 = this.#t[t];
446
- return (d2 === p || d2 === void 0 && m2 && y2) && (w2 === void 0 ? b.__staleWhileFetching !== void 0 ? this.#t[t] = b.__staleWhileFetching : this.#v(e, "fetch") : (i2.status && (i2.status.fetchUpdated = true), this.#O(e, w2, h.options))), w2;
447
- }, c = (w2) => (i2.status && (i2.status.fetchRejected = true, i2.status.fetchError = w2), f(w2, false)), f = (w2, y2) => {
448
- let { aborted: a2 } = o.signal, m2 = a2 && i2.allowStaleOnFetchAbort, _3 = m2 || i2.allowStaleOnFetchRejection, b = _3 || i2.noDeleteOnFetchRejection, d2 = p;
449
- if (this.#t[t] === p && (!b || !y2 && d2.__staleWhileFetching === void 0 ? this.#v(e, "fetch") : m2 || (this.#t[t] = d2.__staleWhileFetching)), _3) return i2.status && d2.__staleWhileFetching !== void 0 && (i2.status.returnedStale = true), d2.__staleWhileFetching;
450
- if (d2.__returned === d2) throw w2;
451
- }, g2 = (w2, y2) => {
446
+ let o = new AbortController(), { signal: l } = i2;
447
+ l?.addEventListener("abort", () => o.abort(l.reason), { signal: o.signal });
448
+ let h = { signal: o.signal, options: i2, context: s }, r = (f, y2 = false) => {
449
+ let { aborted: a2 } = o.signal, w2 = i2.ignoreFetchAbort && f !== void 0, F3 = i2.ignoreFetchAbort || !!(i2.allowStaleOnFetchAbort && f !== void 0);
450
+ if (i2.status && (a2 && !y2 ? (i2.status.fetchAborted = true, i2.status.fetchError = o.signal.reason, w2 && (i2.status.fetchAbortIgnored = true)) : i2.status.fetchResolved = true), a2 && !w2 && !y2) return m2(o.signal.reason, F3);
451
+ let b = u2, p = this.#t[t];
452
+ return (p === u2 || p === void 0 && w2 && y2) && (f === void 0 ? b.__staleWhileFetching !== void 0 ? this.#t[t] = b.__staleWhileFetching : this.#E(e, "fetch") : (i2.status && (i2.status.fetchUpdated = true), this.#W(e, f, h.options, b))), f;
453
+ }, c = (f) => (i2.status && (i2.status.fetchRejected = true, i2.status.fetchError = f), m2(f, false)), m2 = (f, y2) => {
454
+ let { aborted: a2 } = o.signal, w2 = a2 && i2.allowStaleOnFetchAbort, F3 = w2 || i2.allowStaleOnFetchRejection, b = F3 || i2.noDeleteOnFetchRejection, p = u2;
455
+ if (this.#t[t] === u2 && (!b || !y2 && p.__staleWhileFetching === void 0 ? this.#E(e, "fetch") : w2 || (this.#t[t] = p.__staleWhileFetching)), F3) return i2.status && p.__staleWhileFetching !== void 0 && (i2.status.returnedStale = true), p.__staleWhileFetching;
456
+ if (p.__returned === p) throw f;
457
+ }, _3 = (f, y2) => {
452
458
  let a2 = this.#M?.(e, n7, h);
453
- a2 && a2 instanceof Promise && a2.then((m2) => w2(m2 === void 0 ? void 0 : m2), y2), o.signal.addEventListener("abort", () => {
454
- (!i2.ignoreFetchAbort || i2.allowStaleOnFetchAbort) && (w2(void 0), i2.allowStaleOnFetchAbort && (w2 = (m2) => l(m2, true)));
455
- });
459
+ o.signal.addEventListener("abort", () => {
460
+ (!i2.ignoreFetchAbort || i2.allowStaleOnFetchAbort) && (f(void 0), i2.allowStaleOnFetchAbort && (f = (w2) => r(w2, true)));
461
+ }), a2 && a2 instanceof Promise ? a2.then((w2) => f(w2 === void 0 ? void 0 : w2), y2) : a2 !== void 0 && f(a2);
456
462
  };
457
463
  i2.status && (i2.status.fetchDispatched = true);
458
- let p = new Promise(g2).then(l, c), T3 = Object.assign(p, { __abortController: o, __staleWhileFetching: n7, __returned: void 0 });
459
- return t === void 0 ? (this.#O(e, T3, { ...h.options, status: void 0 }), t = this.#s.get(e)) : this.#t[t] = T3, T3;
464
+ let u2 = new Promise(_3).then(r, c), g2 = Object.assign(u2, { __abortController: o, __staleWhileFetching: n7, __returned: void 0 });
465
+ return t === void 0 ? (this.#W(e, g2, { ...h.options, status: void 0 }), t = this.#s.get(e)) : this.#t[t] = g2, g2;
460
466
  }
461
467
  #e(e) {
462
- if (!this.#W) return false;
468
+ if (!this.#U) return false;
463
469
  let t = e;
464
470
  return !!t && t instanceof Promise && t.hasOwnProperty("__staleWhileFetching") && t.__abortController instanceof AbortController;
465
471
  }
466
472
  fetch(e, t = {}) {
467
- let i2 = W.hasSubscribers, { status: s = D() ? {} : void 0 } = t;
473
+ let i2 = W.hasSubscribers, { status: s = R() ? {} : void 0 } = t;
468
474
  t.status = s, s && t.context && (s.context = t.context);
469
475
  let n7 = this.#B(e, t);
470
- return s && D() && i2 && (s.trace = true, W.tracePromise(() => n7, s).catch(() => {
476
+ return s && i2 && (s.trace = true, W.tracePromise(() => n7, s).catch(() => {
471
477
  })), n7;
472
478
  }
473
479
  async #B(e, t = {}) {
474
- let { allowStale: i2 = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n7 = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: r = this.noDisposeOnSet, size: h = 0, sizeCalculation: l = this.sizeCalculation, noUpdateTTL: c = this.noUpdateTTL, noDeleteOnFetchRejection: f = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: g2 = this.allowStaleOnFetchRejection, ignoreFetchAbort: p = this.ignoreFetchAbort, allowStaleOnFetchAbort: T3 = this.allowStaleOnFetchAbort, context: w2, forceRefresh: y2 = false, status: a2, signal: m2 } = t;
475
- if (a2 && (a2.op = "fetch", a2.key = e, y2 && (a2.forceRefresh = true)), !this.#W) return a2 && (a2.fetch = "get"), this.#C(e, { allowStale: i2, updateAgeOnGet: s, noDeleteOnStaleGet: n7, status: a2 });
476
- let _3 = { allowStale: i2, updateAgeOnGet: s, noDeleteOnStaleGet: n7, ttl: o, noDisposeOnSet: r, size: h, sizeCalculation: l, noUpdateTTL: c, noDeleteOnFetchRejection: f, allowStaleOnFetchRejection: g2, allowStaleOnFetchAbort: T3, ignoreFetchAbort: p, status: a2, signal: m2 }, b = this.#s.get(e);
480
+ let { allowStale: i2 = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n7 = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: l = this.noDisposeOnSet, size: h = 0, sizeCalculation: r = this.sizeCalculation, noUpdateTTL: c = this.noUpdateTTL, noDeleteOnFetchRejection: m2 = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: _3 = this.allowStaleOnFetchRejection, ignoreFetchAbort: u2 = this.ignoreFetchAbort, allowStaleOnFetchAbort: g2 = this.allowStaleOnFetchAbort, context: f, forceRefresh: y2 = false, status: a2, signal: w2 } = t;
481
+ if (a2 && (a2.op = "fetch", a2.key = e, y2 && (a2.forceRefresh = true), a2.cache = this), !this.#U) return a2 && (a2.fetch = "get"), this.#C(e, { allowStale: i2, updateAgeOnGet: s, noDeleteOnStaleGet: n7, status: a2 });
482
+ let F3 = { allowStale: i2, updateAgeOnGet: s, noDeleteOnStaleGet: n7, ttl: o, noDisposeOnSet: l, size: h, sizeCalculation: r, noUpdateTTL: c, noDeleteOnFetchRejection: m2, allowStaleOnFetchRejection: _3, allowStaleOnFetchAbort: g2, ignoreFetchAbort: u2, status: a2, signal: w2 }, b = this.#s.get(e);
477
483
  if (b === void 0) {
478
484
  a2 && (a2.fetch = "miss");
479
- let d2 = this.#P(e, b, _3, w2);
480
- return d2.__returned = d2;
485
+ let p = this.#P(e, b, F3, f);
486
+ return p.__returned = p;
481
487
  } else {
482
- let d2 = this.#t[b];
483
- if (this.#e(d2)) {
484
- let E = i2 && d2.__staleWhileFetching !== void 0;
485
- return a2 && (a2.fetch = "inflight", E && (a2.returnedStale = true)), E ? d2.__staleWhileFetching : d2.__returned = d2;
488
+ let p = this.#t[b];
489
+ if (this.#e(p)) {
490
+ let v3 = i2 && p.__staleWhileFetching !== void 0;
491
+ return a2 && (a2.fetch = "inflight", v3 && (a2.returnedStale = true)), v3 ? p.__staleWhileFetching : p.__returned = p;
486
492
  }
487
493
  let A3 = this.#p(b);
488
- if (!y2 && !A3) return a2 && (a2.fetch = "hit"), this.#L(b), s && this.#x(b), a2 && this.#E(a2, b), d2;
489
- let z = this.#P(e, b, _3, w2), v3 = z.__staleWhileFetching !== void 0 && i2;
490
- return a2 && (a2.fetch = A3 ? "stale" : "refresh", v3 && A3 && (a2.returnedStale = true)), v3 ? z.__staleWhileFetching : z.__returned = z;
494
+ if (!y2 && !A3) return a2 && (a2.fetch = "hit"), this.#L(b), s && this.#R(b), a2 && this.#v(a2, b), p;
495
+ let z = this.#P(e, b, F3, f), E = z.__staleWhileFetching !== void 0 && i2;
496
+ return a2 && (a2.fetch = A3 ? "stale" : "refresh", E && A3 && (a2.returnedStale = true)), E ? z.__staleWhileFetching : z.__returned = z;
491
497
  }
492
498
  }
493
499
  forceFetch(e, t = {}) {
494
- let i2 = W.hasSubscribers, { status: s = D() ? {} : void 0 } = t;
500
+ let i2 = W.hasSubscribers, { status: s = R() ? {} : void 0 } = t;
495
501
  t.status = s, s && t.context && (s.context = t.context);
496
502
  let n7 = this.#K(e, t);
497
- return s && D() && i2 && (s.trace = true, W.tracePromise(() => n7, s).catch(() => {
503
+ return s && i2 && (s.trace = true, W.tracePromise(() => n7, s).catch(() => {
498
504
  })), n7;
499
505
  }
500
506
  async #K(e, t = {}) {
@@ -504,67 +510,67 @@ var L = class u2 {
504
510
  }
505
511
  memo(e, t = {}) {
506
512
  let { status: i2 = S.hasSubscribers ? {} : void 0 } = t;
507
- t.status = i2, i2 && (i2.op = "memo", i2.key = e, t.context && (i2.context = t.context));
513
+ t.status = i2, i2 && (i2.op = "memo", i2.key = e, t.context && (i2.context = t.context), i2.cache = this);
508
514
  let s = this.#Q(e, t);
509
515
  return i2 && (i2.value = s), S.hasSubscribers && S.publish(i2), s;
510
516
  }
511
517
  #Q(e, t = {}) {
512
- let i2 = this.#U;
518
+ let i2 = this.#I;
513
519
  if (!i2) throw new Error("no memoMethod provided to constructor");
514
- let { context: s, status: n7, forceRefresh: o, ...r } = t;
520
+ let { context: s, status: n7, forceRefresh: o, ...l } = t;
515
521
  n7 && o && (n7.forceRefresh = true);
516
- let h = this.#C(e, r), l = o || h === void 0;
517
- if (n7 && (n7.memo = l ? "miss" : "hit", l || (n7.value = h)), !l) return h;
518
- let c = i2(e, h, { options: r, context: s });
519
- return n7 && (n7.value = c), this.#O(e, c, r), c;
522
+ let h = this.#C(e, l), r = o || h === void 0;
523
+ if (n7 && (n7.memo = r ? "miss" : "hit", r || (n7.value = h)), !r) return h;
524
+ let c = i2(e, h, { options: l, context: s });
525
+ return n7 && (n7.value = c), this.#W(e, c, l), c;
520
526
  }
521
527
  get(e, t = {}) {
522
528
  let { status: i2 = S.hasSubscribers ? {} : void 0 } = t;
523
- t.status = i2, i2 && (i2.op = "get", i2.key = e);
529
+ t.status = i2, i2 && (i2.op = "get", i2.key = e, i2.cache = this);
524
530
  let s = this.#C(e, t);
525
531
  return i2 && (s !== void 0 && (i2.value = s), S.hasSubscribers && S.publish(i2)), s;
526
532
  }
527
533
  #C(e, t = {}) {
528
- let { allowStale: i2 = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n7 = this.noDeleteOnStaleGet, status: o } = t, r = this.#s.get(e);
529
- if (r === void 0) {
534
+ let { allowStale: i2 = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n7 = this.noDeleteOnStaleGet, status: o } = t, l = this.#s.get(e);
535
+ if (l === void 0) {
530
536
  o && (o.get = "miss");
531
537
  return;
532
538
  }
533
- let h = this.#t[r], l = this.#e(h);
534
- return o && this.#E(o, r), this.#p(r) ? l ? (o && (o.get = "stale-fetching"), i2 && h.__staleWhileFetching !== void 0 ? (o && (o.returnedStale = true), h.__staleWhileFetching) : void 0) : (n7 || this.#v(e, "expire"), o && (o.get = "stale"), i2 ? (o && (o.returnedStale = true), h) : void 0) : (o && (o.get = l ? "fetching" : "hit"), this.#L(r), s && this.#x(r), l ? h.__staleWhileFetching : h);
539
+ let h = this.#t[l], r = this.#e(h);
540
+ return o && this.#v(o, l), this.#p(l) ? r ? (o && (o.get = "stale-fetching"), i2 && h.__staleWhileFetching !== void 0 ? (o && (o.returnedStale = true), h.__staleWhileFetching) : void 0) : (n7 || this.#E(e, "expire"), o && (o.get = "stale"), i2 ? (o && (o.returnedStale = true), h) : void 0) : (o && (o.get = r ? "fetching" : "hit"), this.#L(l), s && this.#R(l), r ? h.__staleWhileFetching : h);
535
541
  }
536
542
  #$(e, t) {
537
- this.#c[t] = e, this.#a[e] = t;
543
+ this.#u[t] = e, this.#l[e] = t;
538
544
  }
539
545
  #L(e) {
540
- e !== this.#h && (e === this.#l ? this.#l = this.#a[e] : this.#$(this.#c[e], this.#a[e]), this.#$(this.#h, e), this.#h = e);
546
+ e !== this.#h && (e === this.#a ? this.#a = this.#l[e] : this.#$(this.#u[e], this.#l[e]), this.#$(this.#h, e), this.#h = e);
541
547
  }
542
548
  delete(e) {
543
- return this.#v(e, "delete");
549
+ return this.#E(e, "delete");
544
550
  }
545
- #v(e, t) {
546
- S.hasSubscribers && S.publish({ op: "delete", delete: t, key: e });
551
+ #E(e, t) {
552
+ S.hasSubscribers && S.publish({ op: "delete", delete: t, key: e, cache: this });
547
553
  let i2 = false;
548
554
  if (this.#n !== 0) {
549
555
  let s = this.#s.get(e);
550
- if (s !== void 0) if (this.#g?.[s] && (clearTimeout(this.#g?.[s]), this.#g[s] = void 0), i2 = true, this.#n === 1) this.#q(t);
556
+ if (s !== void 0) if (this.#g?.[s] && (clearTimeout(this.#g[s]), this.#g[s] = void 0), i2 = true, this.#n === 1) this.#q(t);
551
557
  else {
552
- this.#R(s);
558
+ this.#x(s);
553
559
  let n7 = this.#t[s];
554
- if (this.#e(n7) ? n7.__abortController.abort(new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#w?.(n7, e, t), this.#f && this.#r?.push([n7, e, t])), this.#s.delete(e), this.#i[s] = void 0, this.#t[s] = void 0, s === this.#h) this.#h = this.#c[s];
555
- else if (s === this.#l) this.#l = this.#a[s];
560
+ if (this.#e(n7) ? n7.__abortController.abort(new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#S?.(n7, e, t), this.#f && this.#r?.push([n7, e, t])), this.#s.delete(e), this.#i[s] = void 0, this.#t[s] = void 0, s === this.#h) this.#h = this.#u[s];
561
+ else if (s === this.#a) this.#a = this.#l[s];
556
562
  else {
557
- let o = this.#c[s];
558
- this.#a[o] = this.#a[s];
559
- let r = this.#a[s];
560
- this.#c[r] = this.#c[s];
563
+ let o = this.#u[s];
564
+ this.#l[o] = this.#l[s];
565
+ let l = this.#l[s];
566
+ this.#u[l] = this.#u[s];
561
567
  }
562
568
  this.#n--, this.#y.push(s);
563
569
  }
564
570
  }
565
571
  if (this.#f && this.#r?.length) {
566
572
  let s = this.#r, n7;
567
- for (; n7 = s?.shift(); ) this.#S?.(...n7);
573
+ for (; n7 = s?.shift(); ) this.#w?.(...n7);
568
574
  }
569
575
  return i2;
570
576
  }
@@ -577,7 +583,7 @@ var L = class u2 {
577
583
  if (this.#e(i2)) i2.__abortController.abort(new Error("deleted"));
578
584
  else {
579
585
  let s = this.#i[t];
580
- this.#T && this.#w?.(i2, s, e), this.#f && this.#r?.push([i2, s, e]);
586
+ this.#T && this.#S?.(i2, s, e), this.#f && this.#r?.push([i2, s, e]);
581
587
  }
582
588
  }
583
589
  if (this.#s.clear(), this.#t.fill(void 0), this.#i.fill(void 0), this.#d && this.#F) {
@@ -585,9 +591,9 @@ var L = class u2 {
585
591
  for (let t of this.#g ?? []) t !== void 0 && clearTimeout(t);
586
592
  this.#g?.fill(void 0);
587
593
  }
588
- if (this.#_ && this.#_.fill(0), this.#l = 0, this.#h = 0, this.#y.length = 0, this.#b = 0, this.#n = 0, this.#f && this.#r) {
594
+ if (this.#_ && this.#_.fill(0), this.#a = 0, this.#h = 0, this.#y.length = 0, this.#b = 0, this.#n = 0, this.#f && this.#r) {
589
595
  let t = this.#r, i2;
590
- for (; i2 = t?.shift(); ) this.#S?.(...i2);
596
+ for (; i2 = t?.shift(); ) this.#w?.(...i2);
591
597
  }
592
598
  }
593
599
  };
@@ -677,19 +683,19 @@ function promiseSpawn(command, args, opts = {}, extra = {}) {
677
683
  // ../../node_modules/.vlt/~npm~isexe@3.1.5/node_modules/isexe/dist/esm/index.min.js
678
684
  import { statSync as w } from "node:fs";
679
685
  import { stat as S2 } from "node:fs/promises";
680
- import { statSync as k } from "node:fs";
686
+ import { statSync as k2 } from "node:fs";
681
687
  import { stat as I2 } from "node:fs/promises";
682
688
  import { delimiter as _ } from "node:path";
683
689
  var y = Object.defineProperty;
684
- var u3 = (t, r) => {
690
+ var u = (t, r) => {
685
691
  for (var e in r) y(t, e, { get: r[e], enumerable: true });
686
692
  };
687
693
  var i = {};
688
- u3(i, { isexe: () => C2, sync: () => A });
689
- var C2 = async (t, r = {}) => {
694
+ u(i, { isexe: () => C, sync: () => A });
695
+ var C = async (t, r = {}) => {
690
696
  let { ignoreErrors: e = false } = r;
691
697
  try {
692
- return d(await S2(t), r);
698
+ return d3(await S2(t), r);
693
699
  } catch (s) {
694
700
  let o = s;
695
701
  if (e || o.code === "EACCES") return false;
@@ -699,23 +705,23 @@ var C2 = async (t, r = {}) => {
699
705
  var A = (t, r = {}) => {
700
706
  let { ignoreErrors: e = false } = r;
701
707
  try {
702
- return d(w(t), r);
708
+ return d3(w(t), r);
703
709
  } catch (s) {
704
710
  let o = s;
705
711
  if (e || o.code === "EACCES") return false;
706
712
  throw o;
707
713
  }
708
714
  };
709
- var d = (t, r) => t.isFile() && T(t, r);
710
- var T = (t, r) => {
715
+ var d3 = (t, r) => t.isFile() && T2(t, r);
716
+ var T2 = (t, r) => {
711
717
  let e = r.uid ?? process.getuid?.(), s = r.groups ?? process.getgroups?.() ?? [], o = r.gid ?? process.getgid?.() ?? s[0];
712
718
  if (e === void 0 || o === void 0) throw new Error("cannot get uid or gid");
713
- let c = /* @__PURE__ */ new Set([o, ...s]), n7 = t.mode, l = t.uid, E = t.gid, f = parseInt("100", 8), p = parseInt("010", 8), x2 = parseInt("001", 8), h = f | p;
714
- return !!(n7 & x2 || n7 & p && c.has(E) || n7 & f && l === e || n7 & h && e === 0);
719
+ let c = /* @__PURE__ */ new Set([o, ...s]), n7 = t.mode, l = t.uid, E = t.gid, f = parseInt("100", 8), p = parseInt("010", 8), x3 = parseInt("001", 8), h = f | p;
720
+ return !!(n7 & x3 || n7 & p && c.has(E) || n7 & f && l === e || n7 & h && e === 0);
715
721
  };
716
722
  var a = {};
717
- u3(a, { isexe: () => F2, sync: () => L2 });
718
- var F2 = async (t, r = {}) => {
723
+ u(a, { isexe: () => F, sync: () => L2 });
724
+ var F = async (t, r = {}) => {
719
725
  let { ignoreErrors: e = false } = r;
720
726
  try {
721
727
  return m(await I2(t), t, r);
@@ -728,7 +734,7 @@ var F2 = async (t, r = {}) => {
728
734
  var L2 = (t, r = {}) => {
729
735
  let { ignoreErrors: e = false } = r;
730
736
  try {
731
- return m(k(t), t, r);
737
+ return m(k2(t), t, r);
732
738
  } catch (s) {
733
739
  let o = s;
734
740
  if (e || o.code === "EACCES") return false;
@@ -859,16 +865,16 @@ var ce = (n7, t) => {
859
865
  return e ? e[0] : null;
860
866
  };
861
867
  var ss = (n7, t, e) => {
862
- let s, i2, r, o, h, a2 = e.indexOf(n7), l = e.indexOf(t, a2 + 1), u4 = a2;
868
+ let s, i2, r, o, h, a2 = e.indexOf(n7), l = e.indexOf(t, a2 + 1), u2 = a2;
863
869
  if (a2 >= 0 && l > 0) {
864
870
  if (n7 === t) return [a2, l];
865
- for (s = [], r = e.length; u4 >= 0 && !h; ) {
866
- if (u4 === a2) s.push(u4), a2 = e.indexOf(n7, u4 + 1);
871
+ for (s = [], r = e.length; u2 >= 0 && !h; ) {
872
+ if (u2 === a2) s.push(u2), a2 = e.indexOf(n7, u2 + 1);
867
873
  else if (s.length === 1) {
868
874
  let c = s.pop();
869
875
  c !== void 0 && (h = [c, l]);
870
- } else i2 = s.pop(), i2 !== void 0 && i2 < r && (r = i2, o = l), l = e.indexOf(t, u4 + 1);
871
- u4 = a2 < l && a2 >= 0 ? a2 : l;
876
+ } else i2 = s.pop(), i2 !== void 0 && i2 < r && (r = i2, o = l), l = e.indexOf(t, u2 + 1);
877
+ u2 = a2 < l && a2 >= 0 ? a2 : l;
872
878
  }
873
879
  s.length && o !== void 0 && (h = [r, o]);
874
880
  }
@@ -934,17 +940,17 @@ function ht(n7, t, e) {
934
940
  s.push(a2);
935
941
  }
936
942
  else {
937
- let h = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i2.body), a2 = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i2.body), l = h || a2, u4 = i2.body.indexOf(",") >= 0;
938
- if (!l && !u4) return i2.post.match(/,(?!,).*\}/) ? (n7 = i2.pre + "{" + i2.body + qt + i2.post, ht(n7, t, true)) : [n7];
943
+ let h = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i2.body), a2 = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i2.body), l = h || a2, u2 = i2.body.indexOf(",") >= 0;
944
+ if (!l && !u2) return i2.post.match(/,(?!,).*\}/) ? (n7 = i2.pre + "{" + i2.body + qt + i2.post, ht(n7, t, true)) : [n7];
939
945
  let c;
940
946
  if (l) c = i2.body.split(/\.\./);
941
947
  else if (c = me(i2.body), c.length === 1 && c[0] !== void 0 && (c = ht(c[0], t, false).map(gs), c.length === 1)) return o.map((f) => i2.pre + c[0] + f);
942
- let d2;
948
+ let d4;
943
949
  if (l && c[0] !== void 0 && c[1] !== void 0) {
944
950
  let f = Ht(c[0]), m2 = Ht(c[1]), p = Math.max(c[0].length, c[1].length), w2 = c.length === 3 && c[2] !== void 0 ? Math.abs(Ht(c[2])) : 1, g2 = ys;
945
951
  m2 < f && (w2 *= -1, g2 = bs);
946
952
  let E = c.some(ws);
947
- d2 = [];
953
+ d4 = [];
948
954
  for (let y2 = f; g2(y2, m2); y2 += w2) {
949
955
  let b;
950
956
  if (a2) b = String.fromCharCode(y2), b === "\\" && (b = "");
@@ -955,14 +961,14 @@ function ht(n7, t, e) {
955
961
  y2 < 0 ? b = "-" + $ + b.slice(1) : b = $ + b;
956
962
  }
957
963
  }
958
- d2.push(b);
964
+ d4.push(b);
959
965
  }
960
966
  } else {
961
- d2 = [];
962
- for (let f = 0; f < c.length; f++) d2.push.apply(d2, ht(c[f], t, false));
967
+ d4 = [];
968
+ for (let f = 0; f < c.length; f++) d4.push.apply(d4, ht(c[f], t, false));
963
969
  }
964
- for (let f = 0; f < d2.length; f++) for (let m2 = 0; m2 < o.length && s.length < t; m2++) {
965
- let p = r + d2[f] + o[m2];
970
+ for (let f = 0; f < d4.length; f++) for (let m2 = 0; m2 < o.length && s.length < t; m2++) {
971
+ let p = r + d4[f] + o[m2];
966
972
  (!e || l || p) && s.push(p);
967
973
  }
968
974
  }
@@ -979,7 +985,7 @@ var we = (n7) => n7.join("");
979
985
  var ye = (n7, t) => {
980
986
  let e = t;
981
987
  if (n7.charAt(e) !== "[") throw new Error("not in a brace expression");
982
- let s = [], i2 = [], r = e + 1, o = false, h = false, a2 = false, l = false, u4 = e, c = "";
988
+ let s = [], i2 = [], r = e + 1, o = false, h = false, a2 = false, l = false, u2 = e, c = "";
983
989
  t: for (; r < n7.length; ) {
984
990
  let p = n7.charAt(r);
985
991
  if ((p === "!" || p === "^") && r === e + 1) {
@@ -987,7 +993,7 @@ var ye = (n7, t) => {
987
993
  continue;
988
994
  }
989
995
  if (p === "]" && o && !a2) {
990
- u4 = r + 1;
996
+ u2 = r + 1;
991
997
  break;
992
998
  }
993
999
  if (o = true, p === "\\" && !a2) {
@@ -1015,14 +1021,14 @@ var ye = (n7, t) => {
1015
1021
  }
1016
1022
  s.push(lt(p)), r++;
1017
1023
  }
1018
- if (u4 < r) return ["", false, 0, false];
1024
+ if (u2 < r) return ["", false, 0, false];
1019
1025
  if (!s.length && !i2.length) return ["$.", false, n7.length - e, true];
1020
1026
  if (i2.length === 0 && s.length === 1 && /^\\?.$/.test(s[0]) && !l) {
1021
1027
  let p = s[0].length === 2 ? s[0].slice(-1) : s[0];
1022
- return [Es(p), false, u4 - e, false];
1028
+ return [Es(p), false, u2 - e, false];
1023
1029
  }
1024
- let d2 = "[" + (l ? "^" : "") + we(s) + "]", f = "[" + (l ? "" : "^") + we(i2) + "]";
1025
- return [s.length && i2.length ? "(" + d2 + "|" + f + ")" : s.length ? d2 : f, h, u4 - e, true];
1030
+ let d4 = "[" + (l ? "^" : "") + we(s) + "]", f = "[" + (l ? "" : "^") + we(i2) + "]";
1031
+ return [s.length && i2.length ? "(" + d4 + "|" + f + ")" : s.length ? d4 : f, h, u2 - e, true];
1026
1032
  };
1027
1033
  var W2 = (n7, { windowsPathsNoEscape: t = false, magicalBraces: e = true } = {}) => e ? t ? n7.replace(/\[([^\/\\])\]/g, "$1") : n7.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1") : t ? n7.replace(/\[([^\/\\{}])\]/g, "$1") : n7.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1");
1028
1034
  var xs = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
@@ -1141,32 +1147,32 @@ var Q = class n {
1141
1147
  }
1142
1148
  return e.push(m2), f;
1143
1149
  }
1144
- let l = s + 1, u4 = new n(null, e), c = [], d2 = "";
1150
+ let l = s + 1, u2 = new n(null, e), c = [], d4 = "";
1145
1151
  for (; l < t.length; ) {
1146
1152
  let f = t.charAt(l++);
1147
1153
  if (r || f === "\\") {
1148
- r = !r, d2 += f;
1154
+ r = !r, d4 += f;
1149
1155
  continue;
1150
1156
  }
1151
1157
  if (o) {
1152
- l === h + 1 ? (f === "^" || f === "!") && (a2 = true) : f === "]" && !(l === h + 2 && a2) && (o = false), d2 += f;
1158
+ l === h + 1 ? (f === "^" || f === "!") && (a2 = true) : f === "]" && !(l === h + 2 && a2) && (o = false), d4 += f;
1153
1159
  continue;
1154
1160
  } else if (f === "[") {
1155
- o = true, h = l, a2 = false, d2 += f;
1161
+ o = true, h = l, a2 = false, d4 += f;
1156
1162
  continue;
1157
1163
  }
1158
1164
  if (be(f) && t.charAt(l) === "(") {
1159
- u4.push(d2), d2 = "";
1160
- let m2 = new n(f, u4);
1161
- u4.push(m2), l = n.#i(t, m2, l, i2);
1165
+ u2.push(d4), d4 = "";
1166
+ let m2 = new n(f, u2);
1167
+ u2.push(m2), l = n.#i(t, m2, l, i2);
1162
1168
  continue;
1163
1169
  }
1164
1170
  if (f === "|") {
1165
- u4.push(d2), d2 = "", c.push(u4), u4 = new n(null, e);
1171
+ u2.push(d4), d4 = "", c.push(u2), u2 = new n(null, e);
1166
1172
  continue;
1167
1173
  }
1168
- if (f === ")") return d2 === "" && e.#r.length === 0 && (e.#f = true), u4.push(d2), d2 = "", e.push(...c, u4), l;
1169
- d2 += f;
1174
+ if (f === ")") return d4 === "" && e.#r.length === 0 && (e.#f = true), u2.push(d4), d4 = "", e.push(...c, u2), l;
1175
+ d4 += f;
1170
1176
  }
1171
1177
  return e.type = null, e.#s = void 0, e.#r = [t.substring(s - 1)], l;
1172
1178
  }
@@ -1190,13 +1196,13 @@ var Q = class n {
1190
1196
  let a2 = this.isStart() && this.isEnd() && !this.#r.some((f) => typeof f != "string"), l = this.#r.map((f) => {
1191
1197
  let [m2, p, w2, g2] = typeof f == "string" ? n.#E(f, this.#s, a2) : f.toRegExpSource(t);
1192
1198
  return this.#s = this.#s || w2, this.#n = this.#n || g2, m2;
1193
- }).join(""), u4 = "";
1199
+ }).join(""), u2 = "";
1194
1200
  if (this.isStart() && typeof this.#r[0] == "string" && !(this.#r.length === 1 && Ts.has(this.#r[0]))) {
1195
1201
  let m2 = Cs, p = e && m2.has(l.charAt(0)) || l.startsWith("\\.") && m2.has(l.charAt(2)) || l.startsWith("\\.\\.") && m2.has(l.charAt(4)), w2 = !e && !t && m2.has(l.charAt(0));
1196
- u4 = p ? vs : w2 ? Ct : "";
1202
+ u2 = p ? vs : w2 ? Ct : "";
1197
1203
  }
1198
1204
  let c = "";
1199
- return this.isEnd() && this.#t.#c && this.#o?.type === "!" && (c = "(?:$|\\/)"), [u4 + l + c, W2(l), this.#s = !!this.#s, this.#n];
1205
+ return this.isEnd() && this.#t.#c && this.#o?.type === "!" && (c = "(?:$|\\/)"), [u2 + l + c, W2(l), this.#s = !!this.#s, this.#n];
1200
1206
  }
1201
1207
  let s = this.type === "*" || this.type === "+", i2 = this.type === "!" ? "(?:(?!(?:" : "(?:", r = this.#d(e);
1202
1208
  if (this.isStart() && this.isEnd() && !r && this.type !== "!") {
@@ -1238,9 +1244,9 @@ var Q = class n {
1238
1244
  continue;
1239
1245
  }
1240
1246
  if (l === "[") {
1241
- let [u4, c, d2, f] = ye(t, a2);
1242
- if (d2) {
1243
- r += u4, o = o || c, a2 += d2 - 1, e = e || f;
1247
+ let [u2, c, d4, f] = ye(t, a2);
1248
+ if (d4) {
1249
+ r += u2, o = o || c, a2 += d4 - 1, e = e || f;
1244
1250
  continue;
1245
1251
  }
1246
1252
  }
@@ -1254,7 +1260,7 @@ var Q = class n {
1254
1260
  }
1255
1261
  };
1256
1262
  var tt = (n7, { windowsPathsNoEscape: t = false, magicalBraces: e = false } = {}) => e ? t ? n7.replace(/[?*()[\]{}]/g, "[$&]") : n7.replace(/[?*()[\]\\{}]/g, "\\$&") : t ? n7.replace(/[?*()[\]]/g, "[$&]") : n7.replace(/[?*()[\]\\]/g, "\\$&");
1257
- var O2 = (n7, t, e = {}) => (at(t), !e.nocomment && t.charAt(0) === "#" ? false : new D2(t, e).match(n7));
1263
+ var O2 = (n7, t, e = {}) => (at(t), !e.nocomment && t.charAt(0) === "#" ? false : new D(t, e).match(n7));
1258
1264
  var Rs = /^\*+([^+@!?\*\[\(]*)$/;
1259
1265
  var Os = (n7) => (t) => !t.startsWith(".") && t.endsWith(n7);
1260
1266
  var Fs = (n7) => (t) => t.endsWith(n7);
@@ -1328,16 +1334,16 @@ var Zs = (n7) => {
1328
1334
  O2.defaults = Zs;
1329
1335
  var ke = (n7, t = {}) => (at(n7), t.nobrace || !/\{(?:(?!\{).)*\}/.test(n7) ? [n7] : ge(n7, { max: t.braceExpandMax }));
1330
1336
  O2.braceExpand = ke;
1331
- var Qs = (n7, t = {}) => new D2(n7, t).makeRe();
1337
+ var Qs = (n7, t = {}) => new D(n7, t).makeRe();
1332
1338
  O2.makeRe = Qs;
1333
1339
  var ti = (n7, t, e = {}) => {
1334
- let s = new D2(t, e);
1340
+ let s = new D(t, e);
1335
1341
  return n7 = n7.filter((i2) => s.match(i2)), s.options.nonull && !n7.length && n7.push(t), n7;
1336
1342
  };
1337
1343
  O2.match = ti;
1338
1344
  var ve = /[?*]|[+@!]\(.*?\)|\[|\]/;
1339
1345
  var ei = (n7) => n7.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1340
- var D2 = class {
1346
+ var D = class {
1341
1347
  options;
1342
1348
  set;
1343
1349
  pattern;
@@ -1383,8 +1389,8 @@ var D2 = class {
1383
1389
  let i2 = this.globParts.map((r, o, h) => {
1384
1390
  if (this.isWindows && this.windowsNoMagicRoot) {
1385
1391
  let a2 = r[0] === "" && r[1] === "" && (r[2] === "?" || !ve.test(r[2])) && !ve.test(r[3]), l = /^[a-z]:/i.test(r[0]);
1386
- if (a2) return [...r.slice(0, 4), ...r.slice(4).map((u4) => this.parse(u4))];
1387
- if (l) return [r[0], ...r.slice(1).map((u4) => this.parse(u4))];
1392
+ if (a2) return [...r.slice(0, 4), ...r.slice(4).map((u2) => this.parse(u2))];
1393
+ if (l) return [r[0], ...r.slice(1).map((u2) => this.parse(u2))];
1388
1394
  }
1389
1395
  return r.map((a2) => this.parse(a2));
1390
1396
  });
@@ -1448,8 +1454,8 @@ var D2 = class {
1448
1454
  let h = s[i2 + 1], a2 = s[i2 + 2], l = s[i2 + 3];
1449
1455
  if (h !== ".." || !a2 || a2 === "." || a2 === ".." || !l || l === "." || l === "..") continue;
1450
1456
  e = true, s.splice(i2, 1);
1451
- let u4 = s.slice(0);
1452
- u4[i2] = "**", t.push(u4), i2--;
1457
+ let u2 = s.slice(0);
1458
+ u2[i2] = "**", t.push(u2), i2--;
1453
1459
  }
1454
1460
  if (!this.preserveMultipleSlashes) {
1455
1461
  for (let o = 1; o < s.length - 1; o++) {
@@ -1514,30 +1520,30 @@ var D2 = class {
1514
1520
  r >= 2 && (t = this.levelTwoFileOptimize(t)), this.debug("matchOne", this, { file: t, pattern: e }), this.debug("matchOne", t.length, e.length);
1515
1521
  for (var o = 0, h = 0, a2 = t.length, l = e.length; o < a2 && h < l; o++, h++) {
1516
1522
  this.debug("matchOne loop");
1517
- var u4 = e[h], c = t[o];
1518
- if (this.debug(e, u4, c), u4 === false) return false;
1519
- if (u4 === A2) {
1520
- this.debug("GLOBSTAR", [e, u4, c]);
1521
- var d2 = o, f = h + 1;
1523
+ var u2 = e[h], c = t[o];
1524
+ if (this.debug(e, u2, c), u2 === false) return false;
1525
+ if (u2 === A2) {
1526
+ this.debug("GLOBSTAR", [e, u2, c]);
1527
+ var d4 = o, f = h + 1;
1522
1528
  if (f === l) {
1523
1529
  for (this.debug("** at the end"); o < a2; o++) if (t[o] === "." || t[o] === ".." || !i2.dot && t[o].charAt(0) === ".") return false;
1524
1530
  return true;
1525
1531
  }
1526
- for (; d2 < a2; ) {
1527
- var m2 = t[d2];
1532
+ for (; d4 < a2; ) {
1533
+ var m2 = t[d4];
1528
1534
  if (this.debug(`
1529
- globstar while`, t, d2, e, f, m2), this.matchOne(t.slice(d2), e.slice(f), s)) return this.debug("globstar found match!", d2, a2, m2), true;
1535
+ globstar while`, t, d4, e, f, m2), this.matchOne(t.slice(d4), e.slice(f), s)) return this.debug("globstar found match!", d4, a2, m2), true;
1530
1536
  if (m2 === "." || m2 === ".." || !i2.dot && m2.charAt(0) === ".") {
1531
- this.debug("dot detected!", t, d2, e, f);
1537
+ this.debug("dot detected!", t, d4, e, f);
1532
1538
  break;
1533
1539
  }
1534
- this.debug("globstar swallow a segment, and continue"), d2++;
1540
+ this.debug("globstar swallow a segment, and continue"), d4++;
1535
1541
  }
1536
1542
  return !!(s && (this.debug(`
1537
- >>> no match, partial?`, t, d2, e, f), d2 === a2));
1543
+ >>> no match, partial?`, t, d4, e, f), d4 === a2));
1538
1544
  }
1539
1545
  let p;
1540
- if (typeof u4 == "string" ? (p = c === u4, this.debug("string match", u4, c, p)) : (p = u4.test(c), this.debug("pattern match", u4, c, p)), !p) return false;
1546
+ if (typeof u2 == "string" ? (p = c === u2, this.debug("string match", u2, c, p)) : (p = u2.test(c), this.debug("pattern match", u2, c, p)), !p) return false;
1541
1547
  }
1542
1548
  if (o === a2 && h === l) return true;
1543
1549
  if (o === a2) return s;
@@ -1563,20 +1569,20 @@ globstar while`, t, d2, e, f, m2), this.matchOne(t.slice(d2), e.slice(f), s)) re
1563
1569
  if (!t.length) return this.regexp = false, this.regexp;
1564
1570
  let e = this.options, s = e.noglobstar ? Vs : e.dot ? Ys : Xs, i2 = new Set(e.nocase ? ["i"] : []), r = t.map((a2) => {
1565
1571
  let l = a2.map((c) => {
1566
- if (c instanceof RegExp) for (let d2 of c.flags.split("")) i2.add(d2);
1572
+ if (c instanceof RegExp) for (let d4 of c.flags.split("")) i2.add(d4);
1567
1573
  return typeof c == "string" ? ei(c) : c === A2 ? A2 : c._src;
1568
1574
  });
1569
- l.forEach((c, d2) => {
1570
- let f = l[d2 + 1], m2 = l[d2 - 1];
1571
- c !== A2 || m2 === A2 || (m2 === void 0 ? f !== void 0 && f !== A2 ? l[d2 + 1] = "(?:\\/|" + s + "\\/)?" + f : l[d2] = s : f === void 0 ? l[d2 - 1] = m2 + "(?:\\/|\\/" + s + ")?" : f !== A2 && (l[d2 - 1] = m2 + "(?:\\/|\\/" + s + "\\/)" + f, l[d2 + 1] = A2));
1575
+ l.forEach((c, d4) => {
1576
+ let f = l[d4 + 1], m2 = l[d4 - 1];
1577
+ c !== A2 || m2 === A2 || (m2 === void 0 ? f !== void 0 && f !== A2 ? l[d4 + 1] = "(?:\\/|" + s + "\\/)?" + f : l[d4] = s : f === void 0 ? l[d4 - 1] = m2 + "(?:\\/|\\/" + s + ")?" : f !== A2 && (l[d4 - 1] = m2 + "(?:\\/|\\/" + s + "\\/)" + f, l[d4 + 1] = A2));
1572
1578
  });
1573
- let u4 = l.filter((c) => c !== A2);
1574
- if (this.partial && u4.length >= 1) {
1579
+ let u2 = l.filter((c) => c !== A2);
1580
+ if (this.partial && u2.length >= 1) {
1575
1581
  let c = [];
1576
- for (let d2 = 1; d2 <= u4.length; d2++) c.push(u4.slice(0, d2).join("/"));
1582
+ for (let d4 = 1; d4 <= u2.length; d4++) c.push(u2.slice(0, d4).join("/"));
1577
1583
  return "(?:" + c.join("|") + ")";
1578
1584
  }
1579
- return u4.join("/");
1585
+ return u2.join("/");
1580
1586
  }).join("|"), [o, h] = t.length > 1 ? ["(?:", ")"] : ["", ""];
1581
1587
  r = "^" + o + r + h + "$", this.partial && (r = "^(?:\\/|" + o + r.slice(1, -1) + h + ")$"), this.negate && (r = "^(?!" + r + ").+$");
1582
1588
  try {
@@ -1612,7 +1618,7 @@ globstar while`, t, d2, e, f, m2), this.matchOne(t.slice(d2), e.slice(f), s)) re
1612
1618
  }
1613
1619
  };
1614
1620
  O2.AST = Q;
1615
- O2.Minimatch = D2;
1621
+ O2.Minimatch = D;
1616
1622
  O2.escape = tt;
1617
1623
  O2.unescape = W2;
1618
1624
  var si = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
@@ -1760,7 +1766,7 @@ var ft = class Me {
1760
1766
  return this.#o;
1761
1767
  }
1762
1768
  constructor(t) {
1763
- let { max: e = 0, ttl: s, ttlResolution: i2 = 1, ttlAutopurge: r, updateAgeOnGet: o, updateAgeOnHas: h, allowStale: a2, dispose: l, onInsert: u4, disposeAfter: c, noDisposeOnSet: d2, noUpdateTTL: f, maxSize: m2 = 0, maxEntrySize: p = 0, sizeCalculation: w2, fetchMethod: g2, memoMethod: S3, noDeleteOnFetchRejection: E, noDeleteOnStaleGet: y2, allowStaleOnFetchRejection: b, allowStaleOnFetchAbort: z, ignoreFetchAbort: $, perf: J } = t;
1769
+ let { max: e = 0, ttl: s, ttlResolution: i2 = 1, ttlAutopurge: r, updateAgeOnGet: o, updateAgeOnHas: h, allowStale: a2, dispose: l, onInsert: u2, disposeAfter: c, noDisposeOnSet: d4, noUpdateTTL: f, maxSize: m2 = 0, maxEntrySize: p = 0, sizeCalculation: w2, fetchMethod: g2, memoMethod: S3, noDeleteOnFetchRejection: E, noDeleteOnStaleGet: y2, allowStaleOnFetchRejection: b, allowStaleOnFetchAbort: z, ignoreFetchAbort: $, perf: J } = t;
1764
1770
  if (J !== void 0 && typeof J?.now != "function") throw new TypeError("perf option must have a now() method if specified");
1765
1771
  if (this.#c = J ?? si, e !== 0 && !q(e)) throw new TypeError("max option must be a nonnegative integer");
1766
1772
  let Z = e ? De(e) : Array;
@@ -1771,7 +1777,7 @@ var ft = class Me {
1771
1777
  }
1772
1778
  if (S3 !== void 0 && typeof S3 != "function") throw new TypeError("memoMethod must be a function if defined");
1773
1779
  if (this.#w = S3, g2 !== void 0 && typeof g2 != "function") throw new TypeError("fetchMethod must be a function if specified");
1774
- if (this.#S = g2, this.#A = !!g2, this.#f = /* @__PURE__ */ new Map(), this.#a = new Array(e).fill(void 0), this.#i = new Array(e).fill(void 0), this.#d = new Z(e), this.#E = new Z(e), this.#b = 0, this.#p = 0, this.#R = ri.create(e), this.#h = 0, this.#u = 0, typeof l == "function" && (this.#n = l), typeof u4 == "function" && (this.#r = u4), typeof c == "function" ? (this.#o = c, this.#m = []) : (this.#o = void 0, this.#m = void 0), this.#x = !!this.#n, this.#_ = !!this.#r, this.#e = !!this.#o, this.noDisposeOnSet = !!d2, this.noUpdateTTL = !!f, this.noDeleteOnFetchRejection = !!E, this.allowStaleOnFetchRejection = !!b, this.allowStaleOnFetchAbort = !!z, this.ignoreFetchAbort = !!$, this.maxEntrySize !== 0) {
1780
+ if (this.#S = g2, this.#A = !!g2, this.#f = /* @__PURE__ */ new Map(), this.#a = new Array(e).fill(void 0), this.#i = new Array(e).fill(void 0), this.#d = new Z(e), this.#E = new Z(e), this.#b = 0, this.#p = 0, this.#R = ri.create(e), this.#h = 0, this.#u = 0, typeof l == "function" && (this.#n = l), typeof u2 == "function" && (this.#r = u2), typeof c == "function" ? (this.#o = c, this.#m = []) : (this.#o = void 0, this.#m = void 0), this.#x = !!this.#n, this.#_ = !!this.#r, this.#e = !!this.#o, this.noDisposeOnSet = !!d4, this.noUpdateTTL = !!f, this.noDeleteOnFetchRejection = !!E, this.allowStaleOnFetchRejection = !!b, this.allowStaleOnFetchAbort = !!z, this.ignoreFetchAbort = !!$, this.maxEntrySize !== 0) {
1775
1781
  if (this.#s !== 0 && !q(this.#s)) throw new TypeError("maxSize must be a positive integer if specified");
1776
1782
  if (!q(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
1777
1783
  this.#G();
@@ -1807,8 +1813,8 @@ var ft = class Me {
1807
1813
  let a2 = t[h], l = e[h];
1808
1814
  if (!a2 || !l) return;
1809
1815
  o.ttl = a2, o.start = l, o.now = i2 || r();
1810
- let u4 = o.now - l;
1811
- o.remainingTTL = a2 - u4;
1816
+ let u2 = o.now - l;
1817
+ o.remainingTTL = a2 - u2;
1812
1818
  }
1813
1819
  };
1814
1820
  let i2 = 0, r = () => {
@@ -1825,8 +1831,8 @@ var ft = class Me {
1825
1831
  if (h === void 0) return 0;
1826
1832
  let a2 = t[h], l = e[h];
1827
1833
  if (!a2 || !l) return 1 / 0;
1828
- let u4 = (i2 || r()) - l;
1829
- return a2 - u4;
1834
+ let u2 = (i2 || r()) - l;
1835
+ return a2 - u2;
1830
1836
  }, this.#v = (o) => {
1831
1837
  let h = e[o], a2 = t[o];
1832
1838
  return !!a2 && !!h && (i2 || r()) - h > a2;
@@ -1968,30 +1974,30 @@ var ft = class Me {
1968
1974
  }
1969
1975
  set(t, e, s = {}) {
1970
1976
  if (e === void 0) return this.delete(t), this;
1971
- let { ttl: i2 = this.ttl, start: r, noDisposeOnSet: o = this.noDisposeOnSet, sizeCalculation: h = this.sizeCalculation, status: a2 } = s, { noUpdateTTL: l = this.noUpdateTTL } = s, u4 = this.#I(t, e, s.size || 0, h);
1972
- if (this.maxEntrySize && u4 > this.maxEntrySize) return a2 && (a2.set = "miss", a2.maxEntrySizeExceeded = true), this.#O(t, "set"), this;
1977
+ let { ttl: i2 = this.ttl, start: r, noDisposeOnSet: o = this.noDisposeOnSet, sizeCalculation: h = this.sizeCalculation, status: a2 } = s, { noUpdateTTL: l = this.noUpdateTTL } = s, u2 = this.#I(t, e, s.size || 0, h);
1978
+ if (this.maxEntrySize && u2 > this.maxEntrySize) return a2 && (a2.set = "miss", a2.maxEntrySizeExceeded = true), this.#O(t, "set"), this;
1973
1979
  let c = this.#h === 0 ? void 0 : this.#f.get(t);
1974
- if (c === void 0) c = this.#h === 0 ? this.#p : this.#R.length !== 0 ? this.#R.pop() : this.#h === this.#t ? this.#B(false) : this.#h, this.#a[c] = t, this.#i[c] = e, this.#f.set(t, c), this.#d[this.#p] = c, this.#E[c] = this.#p, this.#p = c, this.#h++, this.#L(c, u4, a2), a2 && (a2.set = "add"), l = false, this.#_ && this.#r?.(e, t, "add");
1980
+ if (c === void 0) c = this.#h === 0 ? this.#p : this.#R.length !== 0 ? this.#R.pop() : this.#h === this.#t ? this.#B(false) : this.#h, this.#a[c] = t, this.#i[c] = e, this.#f.set(t, c), this.#d[this.#p] = c, this.#E[c] = this.#p, this.#p = c, this.#h++, this.#L(c, u2, a2), a2 && (a2.set = "add"), l = false, this.#_ && this.#r?.(e, t, "add");
1975
1981
  else {
1976
1982
  this.#W(c);
1977
- let d2 = this.#i[c];
1978
- if (e !== d2) {
1979
- if (this.#A && this.#l(d2)) {
1980
- d2.__abortController.abort(new Error("replaced"));
1981
- let { __staleWhileFetching: f } = d2;
1983
+ let d4 = this.#i[c];
1984
+ if (e !== d4) {
1985
+ if (this.#A && this.#l(d4)) {
1986
+ d4.__abortController.abort(new Error("replaced"));
1987
+ let { __staleWhileFetching: f } = d4;
1982
1988
  f !== void 0 && !o && (this.#x && this.#n?.(f, t, "set"), this.#e && this.#m?.push([f, t, "set"]));
1983
- } else o || (this.#x && this.#n?.(d2, t, "set"), this.#e && this.#m?.push([d2, t, "set"]));
1984
- if (this.#P(c), this.#L(c, u4, a2), this.#i[c] = e, a2) {
1989
+ } else o || (this.#x && this.#n?.(d4, t, "set"), this.#e && this.#m?.push([d4, t, "set"]));
1990
+ if (this.#P(c), this.#L(c, u2, a2), this.#i[c] = e, a2) {
1985
1991
  a2.set = "replace";
1986
- let f = d2 && this.#l(d2) ? d2.__staleWhileFetching : d2;
1992
+ let f = d4 && this.#l(d4) ? d4.__staleWhileFetching : d4;
1987
1993
  f !== void 0 && (a2.oldValue = f);
1988
1994
  }
1989
1995
  } else a2 && (a2.set = "update");
1990
- this.#_ && this.onInsert?.(e, t, e === d2 ? "update" : "replace");
1996
+ this.#_ && this.onInsert?.(e, t, e === d4 ? "update" : "replace");
1991
1997
  }
1992
1998
  if (i2 !== 0 && !this.#g && this.#M(), this.#g && (l || this.#j(c, i2, r), a2 && this.#N(a2, c)), !o && this.#e && this.#m) {
1993
- let d2 = this.#m, f;
1994
- for (; f = d2?.shift(); ) this.#o?.(...f);
1999
+ let d4 = this.#m, f;
2000
+ for (; f = d4?.shift(); ) this.#o?.(...f);
1995
2001
  }
1996
2002
  return this;
1997
2003
  }
@@ -2040,18 +2046,18 @@ var ft = class Me {
2040
2046
  if (s.status && (g2 && !w2 ? (s.status.fetchAborted = true, s.status.fetchError = o.signal.reason, S3 && (s.status.fetchAbortIgnored = true)) : s.status.fetchResolved = true), g2 && !S3 && !w2) return c(o.signal.reason, E);
2041
2047
  let y2 = f, b = this.#i[e];
2042
2048
  return (b === f || S3 && w2 && b === void 0) && (p === void 0 ? y2.__staleWhileFetching !== void 0 ? this.#i[e] = y2.__staleWhileFetching : this.#O(t, "fetch") : (s.status && (s.status.fetchUpdated = true), this.set(t, p, a2.options))), p;
2043
- }, u4 = (p) => (s.status && (s.status.fetchRejected = true, s.status.fetchError = p), c(p, false)), c = (p, w2) => {
2049
+ }, u2 = (p) => (s.status && (s.status.fetchRejected = true, s.status.fetchError = p), c(p, false)), c = (p, w2) => {
2044
2050
  let { aborted: g2 } = o.signal, S3 = g2 && s.allowStaleOnFetchAbort, E = S3 || s.allowStaleOnFetchRejection, y2 = E || s.noDeleteOnFetchRejection, b = f;
2045
2051
  if (this.#i[e] === f && (!y2 || !w2 && b.__staleWhileFetching === void 0 ? this.#O(t, "fetch") : S3 || (this.#i[e] = b.__staleWhileFetching)), E) return s.status && b.__staleWhileFetching !== void 0 && (s.status.returnedStale = true), b.__staleWhileFetching;
2046
2052
  if (b.__returned === b) throw p;
2047
- }, d2 = (p, w2) => {
2053
+ }, d4 = (p, w2) => {
2048
2054
  let g2 = this.#S?.(t, r, a2);
2049
2055
  g2 && g2 instanceof Promise && g2.then((S3) => p(S3 === void 0 ? void 0 : S3), w2), o.signal.addEventListener("abort", () => {
2050
2056
  (!s.ignoreFetchAbort || s.allowStaleOnFetchAbort) && (p(void 0), s.allowStaleOnFetchAbort && (p = (S3) => l(S3, true)));
2051
2057
  });
2052
2058
  };
2053
2059
  s.status && (s.status.fetchDispatched = true);
2054
- let f = new Promise(d2).then(l, u4), m2 = Object.assign(f, { __abortController: o, __staleWhileFetching: r, __returned: void 0 });
2060
+ let f = new Promise(d4).then(l, u2), m2 = Object.assign(f, { __abortController: o, __staleWhileFetching: r, __returned: void 0 });
2055
2061
  return e === void 0 ? (this.set(t, m2, { ...a2.options, status: void 0 }), e = this.#f.get(t)) : this.#i[e] = m2, m2;
2056
2062
  }
2057
2063
  #l(t) {
@@ -2060,9 +2066,9 @@ var ft = class Me {
2060
2066
  return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof At;
2061
2067
  }
2062
2068
  async fetch(t, e = {}) {
2063
- let { allowStale: s = this.allowStale, updateAgeOnGet: i2 = this.updateAgeOnGet, noDeleteOnStaleGet: r = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: h = this.noDisposeOnSet, size: a2 = 0, sizeCalculation: l = this.sizeCalculation, noUpdateTTL: u4 = this.noUpdateTTL, noDeleteOnFetchRejection: c = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d2 = this.allowStaleOnFetchRejection, ignoreFetchAbort: f = this.ignoreFetchAbort, allowStaleOnFetchAbort: m2 = this.allowStaleOnFetchAbort, context: p, forceRefresh: w2 = false, status: g2, signal: S3 } = e;
2069
+ let { allowStale: s = this.allowStale, updateAgeOnGet: i2 = this.updateAgeOnGet, noDeleteOnStaleGet: r = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: h = this.noDisposeOnSet, size: a2 = 0, sizeCalculation: l = this.sizeCalculation, noUpdateTTL: u2 = this.noUpdateTTL, noDeleteOnFetchRejection: c = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d4 = this.allowStaleOnFetchRejection, ignoreFetchAbort: f = this.ignoreFetchAbort, allowStaleOnFetchAbort: m2 = this.allowStaleOnFetchAbort, context: p, forceRefresh: w2 = false, status: g2, signal: S3 } = e;
2064
2070
  if (!this.#A) return g2 && (g2.fetch = "get"), this.get(t, { allowStale: s, updateAgeOnGet: i2, noDeleteOnStaleGet: r, status: g2 });
2065
- let E = { allowStale: s, updateAgeOnGet: i2, noDeleteOnStaleGet: r, ttl: o, noDisposeOnSet: h, size: a2, sizeCalculation: l, noUpdateTTL: u4, noDeleteOnFetchRejection: c, allowStaleOnFetchRejection: d2, allowStaleOnFetchAbort: m2, ignoreFetchAbort: f, status: g2, signal: S3 }, y2 = this.#f.get(t);
2071
+ let E = { allowStale: s, updateAgeOnGet: i2, noDeleteOnStaleGet: r, ttl: o, noDisposeOnSet: h, size: a2, sizeCalculation: l, noUpdateTTL: u2, noDeleteOnFetchRejection: c, allowStaleOnFetchRejection: d4, allowStaleOnFetchAbort: m2, ignoreFetchAbort: f, status: g2, signal: S3 }, y2 = this.#f.get(t);
2066
2072
  if (y2 === void 0) {
2067
2073
  g2 && (g2.fetch = "miss");
2068
2074
  let b = this.#U(t, y2, E, p);
@@ -2174,13 +2180,13 @@ var et = /* @__PURE__ */ Symbol("decoder");
2174
2180
  var v2 = /* @__PURE__ */ Symbol("flowing");
2175
2181
  var dt = /* @__PURE__ */ Symbol("paused");
2176
2182
  var st = /* @__PURE__ */ Symbol("resume");
2177
- var C3 = /* @__PURE__ */ Symbol("buffer");
2178
- var F3 = /* @__PURE__ */ Symbol("pipes");
2179
- var T2 = /* @__PURE__ */ Symbol("bufferLength");
2183
+ var C2 = /* @__PURE__ */ Symbol("buffer");
2184
+ var F2 = /* @__PURE__ */ Symbol("pipes");
2185
+ var T3 = /* @__PURE__ */ Symbol("bufferLength");
2180
2186
  var Yt = /* @__PURE__ */ Symbol("bufferPush");
2181
2187
  var Ft = /* @__PURE__ */ Symbol("bufferShift");
2182
- var k2 = /* @__PURE__ */ Symbol("objectMode");
2183
- var x = /* @__PURE__ */ Symbol("destroyed");
2188
+ var k3 = /* @__PURE__ */ Symbol("objectMode");
2189
+ var x2 = /* @__PURE__ */ Symbol("destroyed");
2184
2190
  var Xt = /* @__PURE__ */ Symbol("error");
2185
2191
  var Jt = /* @__PURE__ */ Symbol("emitData");
2186
2192
  var We = /* @__PURE__ */ Symbol("emitEnd");
@@ -2226,9 +2232,9 @@ var pi = (n7) => !n7.objectMode && !!n7.encoding && n7.encoding !== "buffer";
2226
2232
  var V = class extends ee {
2227
2233
  [v2] = false;
2228
2234
  [dt] = false;
2229
- [F3] = [];
2230
- [C3] = [];
2231
- [k2];
2235
+ [F2] = [];
2236
+ [C2] = [];
2237
+ [k3];
2232
2238
  [P3];
2233
2239
  [B];
2234
2240
  [et];
@@ -2237,8 +2243,8 @@ var V = class extends ee {
2237
2243
  [kt] = false;
2238
2244
  [Rt] = false;
2239
2245
  [ut] = null;
2240
- [T2] = 0;
2241
- [x] = false;
2246
+ [T3] = 0;
2247
+ [x2] = false;
2242
2248
  [pt];
2243
2249
  [Dt] = false;
2244
2250
  [Y] = 0;
@@ -2248,12 +2254,12 @@ var V = class extends ee {
2248
2254
  constructor(...t) {
2249
2255
  let e = t[0] || {};
2250
2256
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
2251
- di(e) ? (this[k2] = true, this[P3] = null) : pi(e) ? (this[P3] = e.encoding, this[k2] = false) : (this[k2] = false, this[P3] = null), this[B] = !!e.async, this[et] = this[P3] ? new ni(this[P3]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[C3] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[F3] });
2257
+ di(e) ? (this[k3] = true, this[P3] = null) : pi(e) ? (this[P3] = e.encoding, this[k3] = false) : (this[k3] = false, this[P3] = null), this[B] = !!e.async, this[et] = this[P3] ? new ni(this[P3]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[C2] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[F2] });
2252
2258
  let { signal: s } = e;
2253
2259
  s && (this[pt] = s, s.aborted ? this[Qt]() : s.addEventListener("abort", () => this[Qt]()));
2254
2260
  }
2255
2261
  get bufferLength() {
2256
- return this[T2];
2262
+ return this[T3];
2257
2263
  }
2258
2264
  get encoding() {
2259
2265
  return this[P3];
@@ -2265,7 +2271,7 @@ var V = class extends ee {
2265
2271
  throw new Error("Encoding must be set at instantiation time");
2266
2272
  }
2267
2273
  get objectMode() {
2268
- return this[k2];
2274
+ return this[k3];
2269
2275
  }
2270
2276
  set objectMode(t) {
2271
2277
  throw new Error("objectMode must be set at instantiation time");
@@ -2287,36 +2293,36 @@ var V = class extends ee {
2287
2293
  write(t, e, s) {
2288
2294
  if (this[Dt]) return false;
2289
2295
  if (this[G2]) throw new Error("write after end");
2290
- if (this[x]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
2296
+ if (this[x2]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
2291
2297
  typeof e == "function" && (s = e, e = "utf8"), e || (e = "utf8");
2292
2298
  let i2 = this[B] ? mt : li;
2293
- if (!this[k2] && !Buffer.isBuffer(t)) {
2299
+ if (!this[k3] && !Buffer.isBuffer(t)) {
2294
2300
  if (ui(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
2295
2301
  else if (fi(t)) t = Buffer.from(t);
2296
2302
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
2297
2303
  }
2298
- return this[k2] ? (this[v2] && this[T2] !== 0 && this[Ot](true), this[v2] ? this.emit("data", t) : this[Yt](t), this[T2] !== 0 && this.emit("readable"), s && i2(s), this[v2]) : t.length ? (typeof t == "string" && !(e === this[P3] && !this[et]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[P3] && (t = this[et].write(t)), this[v2] && this[T2] !== 0 && this[Ot](true), this[v2] ? this.emit("data", t) : this[Yt](t), this[T2] !== 0 && this.emit("readable"), s && i2(s), this[v2]) : (this[T2] !== 0 && this.emit("readable"), s && i2(s), this[v2]);
2304
+ return this[k3] ? (this[v2] && this[T3] !== 0 && this[Ot](true), this[v2] ? this.emit("data", t) : this[Yt](t), this[T3] !== 0 && this.emit("readable"), s && i2(s), this[v2]) : t.length ? (typeof t == "string" && !(e === this[P3] && !this[et]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[P3] && (t = this[et].write(t)), this[v2] && this[T3] !== 0 && this[Ot](true), this[v2] ? this.emit("data", t) : this[Yt](t), this[T3] !== 0 && this.emit("readable"), s && i2(s), this[v2]) : (this[T3] !== 0 && this.emit("readable"), s && i2(s), this[v2]);
2299
2305
  }
2300
2306
  read(t) {
2301
- if (this[x]) return null;
2302
- if (this[M2] = false, this[T2] === 0 || t === 0 || t && t > this[T2]) return this[H2](), null;
2303
- this[k2] && (t = null), this[C3].length > 1 && !this[k2] && (this[C3] = [this[P3] ? this[C3].join("") : Buffer.concat(this[C3], this[T2])]);
2304
- let e = this[_e](t || null, this[C3][0]);
2307
+ if (this[x2]) return null;
2308
+ if (this[M2] = false, this[T3] === 0 || t === 0 || t && t > this[T3]) return this[H2](), null;
2309
+ this[k3] && (t = null), this[C2].length > 1 && !this[k3] && (this[C2] = [this[P3] ? this[C2].join("") : Buffer.concat(this[C2], this[T3])]);
2310
+ let e = this[_e](t || null, this[C2][0]);
2305
2311
  return this[H2](), e;
2306
2312
  }
2307
2313
  [_e](t, e) {
2308
- if (this[k2]) this[Ft]();
2314
+ if (this[k3]) this[Ft]();
2309
2315
  else {
2310
2316
  let s = e;
2311
- t === s.length || t === null ? this[Ft]() : typeof s == "string" ? (this[C3][0] = s.slice(t), e = s.slice(0, t), this[T2] -= t) : (this[C3][0] = s.subarray(t), e = s.subarray(0, t), this[T2] -= t);
2317
+ t === s.length || t === null ? this[Ft]() : typeof s == "string" ? (this[C2][0] = s.slice(t), e = s.slice(0, t), this[T3] -= t) : (this[C2][0] = s.subarray(t), e = s.subarray(0, t), this[T3] -= t);
2312
2318
  }
2313
- return this.emit("data", e), !this[C3].length && !this[G2] && this.emit("drain"), e;
2319
+ return this.emit("data", e), !this[C2].length && !this[G2] && this.emit("drain"), e;
2314
2320
  }
2315
2321
  end(t, e, s) {
2316
2322
  return typeof t == "function" && (s = t, t = void 0), typeof e == "function" && (s = e, e = "utf8"), t !== void 0 && this.write(t, e), s && this.once("end", s), this[G2] = true, this.writable = false, (this[v2] || !this[dt]) && this[H2](), this;
2317
2323
  }
2318
2324
  [st]() {
2319
- this[x] || (!this[Y] && !this[F3].length && (this[M2] = true), this[dt] = false, this[v2] = true, this.emit("resume"), this[C3].length ? this[Ot]() : this[G2] ? this[H2]() : this.emit("drain"));
2325
+ this[x2] || (!this[Y] && !this[F2].length && (this[M2] = true), this[dt] = false, this[v2] = true, this.emit("resume"), this[C2].length ? this[Ot]() : this[G2] ? this[H2]() : this.emit("drain"));
2320
2326
  }
2321
2327
  resume() {
2322
2328
  return this[st]();
@@ -2325,7 +2331,7 @@ var V = class extends ee {
2325
2331
  this[v2] = false, this[dt] = true, this[M2] = false;
2326
2332
  }
2327
2333
  get destroyed() {
2328
- return this[x];
2334
+ return this[x2];
2329
2335
  }
2330
2336
  get flowing() {
2331
2337
  return this[v2];
@@ -2334,37 +2340,37 @@ var V = class extends ee {
2334
2340
  return this[dt];
2335
2341
  }
2336
2342
  [Yt](t) {
2337
- this[k2] ? this[T2] += 1 : this[T2] += t.length, this[C3].push(t);
2343
+ this[k3] ? this[T3] += 1 : this[T3] += t.length, this[C2].push(t);
2338
2344
  }
2339
2345
  [Ft]() {
2340
- return this[k2] ? this[T2] -= 1 : this[T2] -= this[C3][0].length, this[C3].shift();
2346
+ return this[k3] ? this[T3] -= 1 : this[T3] -= this[C2][0].length, this[C2].shift();
2341
2347
  }
2342
2348
  [Ot](t = false) {
2343
2349
  do
2344
2350
  ;
2345
- while (this[Le](this[Ft]()) && this[C3].length);
2346
- !t && !this[C3].length && !this[G2] && this.emit("drain");
2351
+ while (this[Le](this[Ft]()) && this[C2].length);
2352
+ !t && !this[C2].length && !this[G2] && this.emit("drain");
2347
2353
  }
2348
2354
  [Le](t) {
2349
2355
  return this.emit("data", t), this[v2];
2350
2356
  }
2351
2357
  pipe(t, e) {
2352
- if (this[x]) return t;
2358
+ if (this[x2]) return t;
2353
2359
  this[M2] = false;
2354
2360
  let s = this[K];
2355
- return e = e || {}, t === Ne.stdout || t === Ne.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, s ? e.end && t.end() : (this[F3].push(e.proxyErrors ? new te(this, t, e) : new Mt(this, t, e)), this[B] ? mt(() => this[st]()) : this[st]()), t;
2361
+ return e = e || {}, t === Ne.stdout || t === Ne.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, s ? e.end && t.end() : (this[F2].push(e.proxyErrors ? new te(this, t, e) : new Mt(this, t, e)), this[B] ? mt(() => this[st]()) : this[st]()), t;
2356
2362
  }
2357
2363
  unpipe(t) {
2358
- let e = this[F3].find((s) => s.dest === t);
2359
- e && (this[F3].length === 1 ? (this[v2] && this[Y] === 0 && (this[v2] = false), this[F3] = []) : this[F3].splice(this[F3].indexOf(e), 1), e.unpipe());
2364
+ let e = this[F2].find((s) => s.dest === t);
2365
+ e && (this[F2].length === 1 ? (this[v2] && this[Y] === 0 && (this[v2] = false), this[F2] = []) : this[F2].splice(this[F2].indexOf(e), 1), e.unpipe());
2360
2366
  }
2361
2367
  addListener(t, e) {
2362
2368
  return this.on(t, e);
2363
2369
  }
2364
2370
  on(t, e) {
2365
2371
  let s = super.on(t, e);
2366
- if (t === "data") this[M2] = false, this[Y]++, !this[F3].length && !this[v2] && this[st]();
2367
- else if (t === "readable" && this[T2] !== 0) super.emit("readable");
2372
+ if (t === "data") this[M2] = false, this[Y]++, !this[F2].length && !this[v2] && this[st]();
2373
+ else if (t === "readable" && this[T3] !== 0) super.emit("readable");
2368
2374
  else if (ci(t) && this[K]) super.emit(t), this.removeAllListeners(t);
2369
2375
  else if (t === "error" && this[ut]) {
2370
2376
  let i2 = e;
@@ -2377,25 +2383,25 @@ var V = class extends ee {
2377
2383
  }
2378
2384
  off(t, e) {
2379
2385
  let s = super.off(t, e);
2380
- return t === "data" && (this[Y] = this.listeners("data").length, this[Y] === 0 && !this[M2] && !this[F3].length && (this[v2] = false)), s;
2386
+ return t === "data" && (this[Y] = this.listeners("data").length, this[Y] === 0 && !this[M2] && !this[F2].length && (this[v2] = false)), s;
2381
2387
  }
2382
2388
  removeAllListeners(t) {
2383
2389
  let e = super.removeAllListeners(t);
2384
- return (t === "data" || t === void 0) && (this[Y] = 0, !this[M2] && !this[F3].length && (this[v2] = false)), e;
2390
+ return (t === "data" || t === void 0) && (this[Y] = 0, !this[M2] && !this[F2].length && (this[v2] = false)), e;
2385
2391
  }
2386
2392
  get emittedEnd() {
2387
2393
  return this[K];
2388
2394
  }
2389
2395
  [H2]() {
2390
- !this[kt] && !this[K] && !this[x] && this[C3].length === 0 && this[G2] && (this[kt] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Rt] && this.emit("close"), this[kt] = false);
2396
+ !this[kt] && !this[K] && !this[x2] && this[C2].length === 0 && this[G2] && (this[kt] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Rt] && this.emit("close"), this[kt] = false);
2391
2397
  }
2392
2398
  emit(t, ...e) {
2393
2399
  let s = e[0];
2394
- if (t !== "error" && t !== "close" && t !== x && this[x]) return false;
2395
- if (t === "data") return !this[k2] && !s ? false : this[B] ? (mt(() => this[Jt](s)), true) : this[Jt](s);
2400
+ if (t !== "error" && t !== "close" && t !== x2 && this[x2]) return false;
2401
+ if (t === "data") return !this[k3] && !s ? false : this[B] ? (mt(() => this[Jt](s)), true) : this[Jt](s);
2396
2402
  if (t === "end") return this[We]();
2397
2403
  if (t === "close") {
2398
- if (this[Rt] = true, !this[K] && !this[x]) return false;
2404
+ if (this[Rt] = true, !this[K] && !this[x2]) return false;
2399
2405
  let r = super.emit("close");
2400
2406
  return this.removeAllListeners("close"), r;
2401
2407
  } else if (t === "error") {
@@ -2413,7 +2419,7 @@ var V = class extends ee {
2413
2419
  return this[H2](), i2;
2414
2420
  }
2415
2421
  [Jt](t) {
2416
- for (let s of this[F3]) s.dest.write(t) === false && this.pause();
2422
+ for (let s of this[F2]) s.dest.write(t) === false && this.pause();
2417
2423
  let e = this[M2] ? false : super.emit("data", t);
2418
2424
  return this[H2](), e;
2419
2425
  }
@@ -2424,30 +2430,30 @@ var V = class extends ee {
2424
2430
  if (this[et]) {
2425
2431
  let e = this[et].end();
2426
2432
  if (e) {
2427
- for (let s of this[F3]) s.dest.write(e);
2433
+ for (let s of this[F2]) s.dest.write(e);
2428
2434
  this[M2] || super.emit("data", e);
2429
2435
  }
2430
2436
  }
2431
- for (let e of this[F3]) e.end();
2437
+ for (let e of this[F2]) e.end();
2432
2438
  let t = super.emit("end");
2433
2439
  return this.removeAllListeners("end"), t;
2434
2440
  }
2435
2441
  async collect() {
2436
2442
  let t = Object.assign([], { dataLength: 0 });
2437
- this[k2] || (t.dataLength = 0);
2443
+ this[k3] || (t.dataLength = 0);
2438
2444
  let e = this.promise();
2439
2445
  return this.on("data", (s) => {
2440
- t.push(s), this[k2] || (t.dataLength += s.length);
2446
+ t.push(s), this[k3] || (t.dataLength += s.length);
2441
2447
  }), await e, t;
2442
2448
  }
2443
2449
  async concat() {
2444
- if (this[k2]) throw new Error("cannot concat in objectMode");
2450
+ if (this[k3]) throw new Error("cannot concat in objectMode");
2445
2451
  let t = await this.collect();
2446
2452
  return this[P3] ? t.join("") : Buffer.concat(t, t.dataLength);
2447
2453
  }
2448
2454
  async promise() {
2449
2455
  return new Promise((t, e) => {
2450
- this.on(x, () => e(new Error("stream destroyed"))), this.on("error", (s) => e(s)), this.on("end", () => t());
2456
+ this.on(x2, () => e(new Error("stream destroyed"))), this.on("error", (s) => e(s)), this.on("end", () => t());
2451
2457
  });
2452
2458
  }
2453
2459
  [Symbol.asyncIterator]() {
@@ -2459,14 +2465,14 @@ var V = class extends ee {
2459
2465
  if (i2 !== null) return Promise.resolve({ done: false, value: i2 });
2460
2466
  if (this[G2]) return e();
2461
2467
  let r, o, h = (c) => {
2462
- this.off("data", a2), this.off("end", l), this.off(x, u4), e(), o(c);
2468
+ this.off("data", a2), this.off("end", l), this.off(x2, u2), e(), o(c);
2463
2469
  }, a2 = (c) => {
2464
- this.off("error", h), this.off("end", l), this.off(x, u4), this.pause(), r({ value: c, done: !!this[G2] });
2470
+ this.off("error", h), this.off("end", l), this.off(x2, u2), this.pause(), r({ value: c, done: !!this[G2] });
2465
2471
  }, l = () => {
2466
- this.off("error", h), this.off("data", a2), this.off(x, u4), e(), r({ done: true, value: void 0 });
2467
- }, u4 = () => h(new Error("stream destroyed"));
2468
- return new Promise((c, d2) => {
2469
- o = d2, r = c, this.once(x, u4), this.once("error", h), this.once("end", l), this.once("data", a2);
2472
+ this.off("error", h), this.off("data", a2), this.off(x2, u2), e(), r({ done: true, value: void 0 });
2473
+ }, u2 = () => h(new Error("stream destroyed"));
2474
+ return new Promise((c, d4) => {
2475
+ o = d4, r = c, this.once(x2, u2), this.once("error", h), this.once("end", l), this.once("data", a2);
2470
2476
  });
2471
2477
  }, throw: e, return: e, [Symbol.asyncIterator]() {
2472
2478
  return this;
@@ -2475,21 +2481,21 @@ var V = class extends ee {
2475
2481
  }
2476
2482
  [Symbol.iterator]() {
2477
2483
  this[M2] = false;
2478
- let t = false, e = () => (this.pause(), this.off(Xt, e), this.off(x, e), this.off("end", e), t = true, { done: true, value: void 0 }), s = () => {
2484
+ let t = false, e = () => (this.pause(), this.off(Xt, e), this.off(x2, e), this.off("end", e), t = true, { done: true, value: void 0 }), s = () => {
2479
2485
  if (t) return e();
2480
2486
  let i2 = this.read();
2481
2487
  return i2 === null ? e() : { done: false, value: i2 };
2482
2488
  };
2483
- return this.once("end", e), this.once(Xt, e), this.once(x, e), { next: s, throw: e, return: e, [Symbol.iterator]() {
2489
+ return this.once("end", e), this.once(Xt, e), this.once(x2, e), { next: s, throw: e, return: e, [Symbol.iterator]() {
2484
2490
  return this;
2485
2491
  }, [Symbol.dispose]: () => {
2486
2492
  } };
2487
2493
  }
2488
2494
  destroy(t) {
2489
- if (this[x]) return t ? this.emit("error", t) : this.emit(x), this;
2490
- this[x] = true, this[M2] = true, this[C3].length = 0, this[T2] = 0;
2495
+ if (this[x2]) return t ? this.emit("error", t) : this.emit(x2), this;
2496
+ this[x2] = true, this[M2] = true, this[C2].length = 0, this[T3] = 0;
2491
2497
  let e = this;
2492
- return typeof e.close == "function" && !this[Rt] && e.close(), t ? this.emit("error", t) : this.emit(x), this;
2498
+ return typeof e.close == "function" && !this[Rt] && e.close(), t ? this.emit("error", t) : this.emit(x2), this;
2493
2499
  }
2494
2500
  static get isStream() {
2495
2501
  return oi;
@@ -2853,8 +2859,8 @@ var R3 = class {
2853
2859
  }
2854
2860
  }
2855
2861
  #$(t) {
2856
- let { atime: e, atimeMs: s, birthtime: i2, birthtimeMs: r, blksize: o, blocks: h, ctime: a2, ctimeMs: l, dev: u4, gid: c, ino: d2, mode: f, mtime: m2, mtimeMs: p, nlink: w2, rdev: g2, size: S3, uid: E } = t;
2857
- this.#b = e, this.#a = s, this.#m = i2, this.#E = r, this.#c = o, this.#f = h, this.#R = a2, this.#d = l, this.#s = u4, this.#S = c, this.#h = d2, this.#n = f, this.#p = m2, this.#i = p, this.#r = w2, this.#w = g2, this.#u = S3, this.#o = E;
2862
+ let { atime: e, atimeMs: s, birthtime: i2, birthtimeMs: r, blksize: o, blocks: h, ctime: a2, ctimeMs: l, dev: u2, gid: c, ino: d4, mode: f, mtime: m2, mtimeMs: p, nlink: w2, rdev: g2, size: S3, uid: E } = t;
2863
+ this.#b = e, this.#a = s, this.#m = i2, this.#E = r, this.#c = o, this.#f = h, this.#R = a2, this.#d = l, this.#s = u2, this.#S = c, this.#h = d4, this.#n = f, this.#p = m2, this.#i = p, this.#r = w2, this.#w = g2, this.#u = S3, this.#o = E;
2858
2864
  let y2 = ie(t);
2859
2865
  this.#e = this.#e & gt | y2 | je, y2 !== L3 && y2 !== U3 && y2 !== X && (this.#e |= yt);
2860
2866
  }
@@ -3010,10 +3016,10 @@ var It = class {
3010
3016
  let a2 = h.substring(this.rootPath.length).split(s);
3011
3017
  if (a2.length === 1 && !a2[0] && a2.pop(), i2 === void 0) throw new TypeError("must provide nocase setting to PathScurryBase ctor");
3012
3018
  this.nocase = i2, this.root = this.newRoot(this.#r), this.roots[this.rootPath] = this.root;
3013
- let l = this.root, u4 = a2.length - 1, c = e.sep, d2 = this.rootPath, f = false;
3019
+ let l = this.root, u2 = a2.length - 1, c = e.sep, d4 = this.rootPath, f = false;
3014
3020
  for (let m2 of a2) {
3015
- let p = u4--;
3016
- l = l.child(m2, { relative: new Array(p).fill("..").join(c), relativePosix: new Array(p).fill("..").join("/"), fullpath: d2 += (f ? "" : c) + m2 }), f = true;
3021
+ let p = u2--;
3022
+ l = l.child(m2, { relative: new Array(p).fill("..").join(c), relativePosix: new Array(p).fill("..").join("/"), fullpath: d4 += (f ? "" : c) + m2 }), f = true;
3017
3023
  }
3018
3024
  this.cwd = l;
3019
3025
  }
@@ -3100,20 +3106,20 @@ var It = class {
3100
3106
  typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R3 || (e = t, t = this.cwd);
3101
3107
  let { withFileTypes: s = true, follow: i2 = false, filter: r, walkFilter: o } = e, h = [];
3102
3108
  (!r || r(t)) && h.push(s ? t : t.fullpath());
3103
- let a2 = /* @__PURE__ */ new Set(), l = (c, d2) => {
3109
+ let a2 = /* @__PURE__ */ new Set(), l = (c, d4) => {
3104
3110
  a2.add(c), c.readdirCB((f, m2) => {
3105
- if (f) return d2(f);
3111
+ if (f) return d4(f);
3106
3112
  let p = m2.length;
3107
- if (!p) return d2();
3113
+ if (!p) return d4();
3108
3114
  let w2 = () => {
3109
- --p === 0 && d2();
3115
+ --p === 0 && d4();
3110
3116
  };
3111
3117
  for (let g2 of m2) (!r || r(g2)) && h.push(s ? g2 : g2.fullpath()), i2 && g2.isSymbolicLink() ? g2.realpath().then((S3) => S3?.isUnknown() ? S3.lstat() : S3).then((S3) => S3?.shouldWalk(a2, o) ? l(S3, w2) : w2()) : g2.shouldWalk(a2, o) ? l(g2, w2) : w2();
3112
3118
  }, true);
3113
- }, u4 = t;
3114
- return new Promise((c, d2) => {
3115
- l(u4, (f) => {
3116
- if (f) return d2(f);
3119
+ }, u2 = t;
3120
+ return new Promise((c, d4) => {
3121
+ l(u2, (f) => {
3122
+ if (f) return d4(f);
3117
3123
  c(h);
3118
3124
  });
3119
3125
  });
@@ -3124,15 +3130,15 @@ var It = class {
3124
3130
  (!r || r(t)) && h.push(s ? t : t.fullpath());
3125
3131
  let a2 = /* @__PURE__ */ new Set([t]);
3126
3132
  for (let l of a2) {
3127
- let u4 = l.readdirSync();
3128
- for (let c of u4) {
3133
+ let u2 = l.readdirSync();
3134
+ for (let c of u2) {
3129
3135
  (!r || r(c)) && h.push(s ? c : c.fullpath());
3130
- let d2 = c;
3136
+ let d4 = c;
3131
3137
  if (c.isSymbolicLink()) {
3132
- if (!(i2 && (d2 = c.realpathSync()))) continue;
3133
- d2.isUnknown() && d2.lstatSync();
3138
+ if (!(i2 && (d4 = c.realpathSync()))) continue;
3139
+ d4.isUnknown() && d4.lstatSync();
3134
3140
  }
3135
- d2.shouldWalk(a2, o) && a2.add(d2);
3141
+ d4.shouldWalk(a2, o) && a2.add(d4);
3136
3142
  }
3137
3143
  }
3138
3144
  return h;
@@ -3153,11 +3159,11 @@ var It = class {
3153
3159
  let h = /* @__PURE__ */ new Set([t]);
3154
3160
  for (let a2 of h) {
3155
3161
  let l = a2.readdirSync();
3156
- for (let u4 of l) {
3157
- (!r || r(u4)) && (yield s ? u4 : u4.fullpath());
3158
- let c = u4;
3159
- if (u4.isSymbolicLink()) {
3160
- if (!(i2 && (c = u4.realpathSync()))) continue;
3162
+ for (let u2 of l) {
3163
+ (!r || r(u2)) && (yield s ? u2 : u2.fullpath());
3164
+ let c = u2;
3165
+ if (u2.isSymbolicLink()) {
3166
+ if (!(i2 && (c = u2.realpathSync()))) continue;
3161
3167
  c.isUnknown() && c.lstatSync();
3162
3168
  }
3163
3169
  c.shouldWalk(h, o) && h.add(c);
@@ -3168,15 +3174,15 @@ var It = class {
3168
3174
  typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R3 || (e = t, t = this.cwd);
3169
3175
  let { withFileTypes: s = true, follow: i2 = false, filter: r, walkFilter: o } = e, h = new V({ objectMode: true });
3170
3176
  (!r || r(t)) && h.write(s ? t : t.fullpath());
3171
- let a2 = /* @__PURE__ */ new Set(), l = [t], u4 = 0, c = () => {
3172
- let d2 = false;
3173
- for (; !d2; ) {
3177
+ let a2 = /* @__PURE__ */ new Set(), l = [t], u2 = 0, c = () => {
3178
+ let d4 = false;
3179
+ for (; !d4; ) {
3174
3180
  let f = l.shift();
3175
3181
  if (!f) {
3176
- u4 === 0 && h.end();
3182
+ u2 === 0 && h.end();
3177
3183
  return;
3178
3184
  }
3179
- u4++, a2.add(f);
3185
+ u2++, a2.add(f);
3180
3186
  let m2 = (w2, g2, S3 = false) => {
3181
3187
  if (w2) return h.emit("error", w2);
3182
3188
  if (i2 && !S3) {
@@ -3187,13 +3193,13 @@ var It = class {
3187
3193
  return;
3188
3194
  }
3189
3195
  }
3190
- for (let E of g2) E && (!r || r(E)) && (h.write(s ? E : E.fullpath()) || (d2 = true));
3191
- u4--;
3196
+ for (let E of g2) E && (!r || r(E)) && (h.write(s ? E : E.fullpath()) || (d4 = true));
3197
+ u2--;
3192
3198
  for (let E of g2) {
3193
3199
  let y2 = E.realpathCached() || E;
3194
3200
  y2.shouldWalk(a2, o) && l.push(y2);
3195
3201
  }
3196
- d2 && !h.flowing ? h.once("drain", c) : p || c();
3202
+ d4 && !h.flowing ? h.once("drain", c) : p || c();
3197
3203
  }, p = true;
3198
3204
  f.readdirCB(m2, true), p = false;
3199
3205
  }
@@ -3204,18 +3210,18 @@ var It = class {
3204
3210
  typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R3 || (e = t, t = this.cwd);
3205
3211
  let { withFileTypes: s = true, follow: i2 = false, filter: r, walkFilter: o } = e, h = new V({ objectMode: true }), a2 = /* @__PURE__ */ new Set();
3206
3212
  (!r || r(t)) && h.write(s ? t : t.fullpath());
3207
- let l = [t], u4 = 0, c = () => {
3208
- let d2 = false;
3209
- for (; !d2; ) {
3213
+ let l = [t], u2 = 0, c = () => {
3214
+ let d4 = false;
3215
+ for (; !d4; ) {
3210
3216
  let f = l.shift();
3211
3217
  if (!f) {
3212
- u4 === 0 && h.end();
3218
+ u2 === 0 && h.end();
3213
3219
  return;
3214
3220
  }
3215
- u4++, a2.add(f);
3221
+ u2++, a2.add(f);
3216
3222
  let m2 = f.readdirSync();
3217
- for (let p of m2) (!r || r(p)) && (h.write(s ? p : p.fullpath()) || (d2 = true));
3218
- u4--;
3223
+ for (let p of m2) (!r || r(p)) && (h.write(s ? p : p.fullpath()) || (d4 = true));
3224
+ u2--;
3219
3225
  for (let p of m2) {
3220
3226
  let w2 = p;
3221
3227
  if (p.isSymbolicLink()) {
@@ -3225,7 +3231,7 @@ var It = class {
3225
3231
  w2.shouldWalk(a2, o) && l.push(w2);
3226
3232
  }
3227
3233
  }
3228
- d2 && !h.flowing && h.once("drain", c);
3234
+ d4 && !h.flowing && h.once("drain", c);
3229
3235
  };
3230
3236
  return c(), h;
3231
3237
  }
@@ -3297,15 +3303,15 @@ var nt = class n4 {
3297
3303
  if (this.length = t.length, s < 0 || s >= this.length) throw new TypeError("index out of range");
3298
3304
  if (this.#t = t, this.#s = e, this.#n = s, this.#r = i2, this.#n === 0) {
3299
3305
  if (this.isUNC()) {
3300
- let [r, o, h, a2, ...l] = this.#t, [u4, c, d2, f, ...m2] = this.#s;
3306
+ let [r, o, h, a2, ...l] = this.#t, [u2, c, d4, f, ...m2] = this.#s;
3301
3307
  l[0] === "" && (l.shift(), m2.shift());
3302
- let p = [r, o, h, a2, ""].join("/"), w2 = [u4, c, d2, f, ""].join("/");
3308
+ let p = [r, o, h, a2, ""].join("/"), w2 = [u2, c, d4, f, ""].join("/");
3303
3309
  this.#t = [p, ...l], this.#s = [w2, ...m2], this.length = this.#t.length;
3304
3310
  } else if (this.isDrive() || this.isAbsolute()) {
3305
3311
  let [r, ...o] = this.#t, [h, ...a2] = this.#s;
3306
3312
  o[0] === "" && (o.shift(), a2.shift());
3307
- let l = r + "/", u4 = h + "/";
3308
- this.#t = [l, ...o], this.#s = [u4, ...a2], this.length = this.#t.length;
3313
+ let l = r + "/", u2 = h + "/";
3314
+ this.#t = [l, ...o], this.#s = [u2, ...a2], this.length = this.#t.length;
3309
3315
  }
3310
3316
  }
3311
3317
  }
@@ -3369,12 +3375,12 @@ var ot = class {
3369
3375
  for (let h of t) this.add(h);
3370
3376
  }
3371
3377
  add(t) {
3372
- let e = new D2(t, this.mmopts);
3378
+ let e = new D(t, this.mmopts);
3373
3379
  for (let s = 0; s < e.set.length; s++) {
3374
3380
  let i2 = e.set[s], r = e.globParts[s];
3375
3381
  if (!i2 || !r) throw new Error("invalid pattern object");
3376
3382
  for (; i2[0] === "." && r[0] === "."; ) i2.shift(), r.shift();
3377
- let o = new nt(i2, r, 0, this.platform), h = new D2(o.globString(), this.mmopts), a2 = r[r.length - 1] === "**", l = o.isAbsolute();
3383
+ let o = new nt(i2, r, 0, this.platform), h = new D(o.globString(), this.mmopts), a2 = r[r.length - 1] === "**", l = o.isAbsolute();
3378
3384
  l ? this.absolute.push(h) : this.relative.push(h), a2 && (l ? this.absoluteChildren.push(h) : this.relativeChildren.push(h));
3379
3385
  }
3380
3386
  }
@@ -3463,9 +3469,9 @@ var Et = class n6 {
3463
3469
  }
3464
3470
  }
3465
3471
  if (i2.isENOENT()) continue;
3466
- let a2, l, u4 = false;
3467
- for (; typeof (a2 = r.pattern()) == "string" && (l = r.rest()); ) i2 = i2.resolve(a2), r = l, u4 = true;
3468
- if (a2 = r.pattern(), l = r.rest(), u4) {
3472
+ let a2, l, u2 = false;
3473
+ for (; typeof (a2 = r.pattern()) == "string" && (l = r.rest()); ) i2 = i2.resolve(a2), r = l, u2 = true;
3474
+ if (a2 = r.pattern(), l = r.rest(), u2) {
3469
3475
  if (this.hasWalkedCache.hasWalked(i2, r)) continue;
3470
3476
  this.hasWalkedCache.storeWalked(i2, r);
3471
3477
  }
@@ -3475,11 +3481,11 @@ var Et = class n6 {
3475
3481
  continue;
3476
3482
  } else if (a2 === A2) {
3477
3483
  (!i2.isSymbolicLink() || this.follow || r.checkFollowGlobstar()) && this.subwalks.add(i2, r);
3478
- let c = l?.pattern(), d2 = l?.rest();
3479
- if (!l || (c === "" || c === ".") && !d2) this.matches.add(i2, h, c === "" || c === ".");
3484
+ let c = l?.pattern(), d4 = l?.rest();
3485
+ if (!l || (c === "" || c === ".") && !d4) this.matches.add(i2, h, c === "" || c === ".");
3480
3486
  else if (c === "..") {
3481
3487
  let f = i2.parent || i2;
3482
- d2 ? this.hasWalkedCache.hasWalked(f, d2) || this.subwalks.add(f, d2) : this.matches.add(f, h, true);
3488
+ d4 ? this.hasWalkedCache.hasWalked(f, d4) || this.subwalks.add(f, d4) : this.matches.add(f, h, true);
3483
3489
  }
3484
3490
  } else a2 instanceof RegExp && this.subwalks.add(i2, r);
3485
3491
  }
@@ -3632,7 +3638,7 @@ var zt = class {
3632
3638
  if (this.maxDepth !== 1 / 0 && h.depth() >= this.maxDepth) continue;
3633
3639
  r++;
3634
3640
  let a2 = h.readdirCached();
3635
- h.calledReaddir() ? this.walkCB3(h, a2, s, o) : h.readdirCB((l, u4) => this.walkCB3(h, u4, s, o), true);
3641
+ h.calledReaddir() ? this.walkCB3(h, a2, s, o) : h.readdirCB((l, u2) => this.walkCB3(h, u2, s, o), true);
3636
3642
  }
3637
3643
  o();
3638
3644
  }
@@ -3761,11 +3767,11 @@ var I3 = class {
3761
3767
  this.scurry = new a2(this.cwd, { nocase: e.nocase, fs: e.fs });
3762
3768
  }
3763
3769
  this.nocase = this.scurry.nocase;
3764
- let s = this.platform === "darwin" || this.platform === "win32", i2 = { braceExpandMax: 1e4, ...e, dot: this.dot, matchBase: this.matchBase, nobrace: this.nobrace, nocase: this.nocase, nocaseMagicOnly: s, nocomment: true, noext: this.noext, nonegate: true, optimizationLevel: 2, platform: this.platform, windowsPathsNoEscape: this.windowsPathsNoEscape, debug: !!this.opts.debug }, r = this.pattern.map((a2) => new D2(a2, i2)), [o, h] = r.reduce((a2, l) => (a2[0].push(...l.set), a2[1].push(...l.globParts), a2), [[], []]);
3770
+ let s = this.platform === "darwin" || this.platform === "win32", i2 = { braceExpandMax: 1e4, ...e, dot: this.dot, matchBase: this.matchBase, nobrace: this.nobrace, nocase: this.nocase, nocaseMagicOnly: s, nocomment: true, noext: this.noext, nonegate: true, optimizationLevel: 2, platform: this.platform, windowsPathsNoEscape: this.windowsPathsNoEscape, debug: !!this.opts.debug }, r = this.pattern.map((a2) => new D(a2, i2)), [o, h] = r.reduce((a2, l) => (a2[0].push(...l.set), a2[1].push(...l.globParts), a2), [[], []]);
3765
3771
  this.patterns = o.map((a2, l) => {
3766
- let u4 = h[l];
3767
- if (!u4) throw new Error("invalid pattern object");
3768
- return new nt(a2, u4, 0, this.platform);
3772
+ let u2 = h[l];
3773
+ if (!u2) throw new Error("invalid pattern object");
3774
+ return new nt(a2, u2, 0, this.platform);
3769
3775
  });
3770
3776
  }
3771
3777
  async walk() {
@@ -3795,7 +3801,7 @@ var I3 = class {
3795
3801
  };
3796
3802
  var le = (n7, t = {}) => {
3797
3803
  Array.isArray(n7) || (n7 = [n7]);
3798
- for (let e of n7) if (new D2(e, t).hasMagic()) return true;
3804
+ for (let e of n7) if (new D(e, t).hasMagic()) return true;
3799
3805
  return false;
3800
3806
  };
3801
3807
  function Bt(n7, t = {}) {
@@ -4473,7 +4479,7 @@ var rimraf = Object.assign(rimraf_, {
4473
4479
  rimraf.rimraf = rimraf;
4474
4480
 
4475
4481
  export {
4476
- L,
4482
+ I,
4477
4483
  promiseSpawn,
4478
4484
  which,
4479
4485
  whichSync,