@vltpkg/cli-js 1.0.0-rc.32 → 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-SQZRJLJA.js → access-VP3KSJ2M.js} +23 -12
  2. package/{bugs-BMZ5UERM.js → bugs-4ZQXJA4F.js} +19 -17
  3. package/{build-LGQI6OGM.js → build-P74RVUUP.js} +13 -9
  4. package/{cache-JWHNATAX.js → cache-J4J3ZWXP.js} +19 -14
  5. package/cache-unzip-src-unzip.js +434 -428
  6. package/{chunk-6YXVQ5HC.js → chunk-2PLIV3N3.js} +1 -27
  7. package/{chunk-ZUP6UTME.js → chunk-4RZDJQ5U.js} +42 -61
  8. package/{chunk-LEX7YPHR.js → chunk-4SSFBFB5.js} +123 -92
  9. package/{chunk-SDBTQF2Y.js → chunk-5COWONUB.js} +5 -5
  10. package/{chunk-5UXEBLLT.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-DI2CYYXF.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-SIXXDCBI.js → chunk-DJYKQWV2.js} +7 -7
  17. package/chunk-E74WGW5C.js +49 -0
  18. package/chunk-EAWRHC27.js +75 -0
  19. package/{chunk-DFNHGGGV.js → chunk-EFWPI6IY.js} +1 -1
  20. package/{chunk-JBVLIV37.js → chunk-EQ633HIM.js} +14 -13
  21. package/{chunk-DM3WGEVB.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-G6PG3AGN.js → chunk-GTICKXWZ.js} +11 -8
  25. package/{chunk-KRGA5VLT.js → chunk-ICJRCXSG.js} +31 -27
  26. package/{chunk-3TVABXAG.js → chunk-JEE4B4FL.js} +3 -3
  27. package/{chunk-7XE7OES7.js → chunk-JLGPPV6Z.js} +3 -3
  28. package/{chunk-M2WD7IBO.js → chunk-JZQAUAHT.js} +1 -1
  29. package/{chunk-IAKUGHGT.js → chunk-MT76WHSM.js} +1 -1
  30. package/{chunk-DIKKTUBV.js → chunk-OTNMX4EK.js} +3 -3
  31. package/{chunk-2V4AQPBR.js → chunk-PMCAQG5J.js} +85 -46
  32. package/{chunk-JKAZKVQU.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-YQXDHMHG.js → chunk-VGWEB64T.js} +2932 -2786
  36. package/{chunk-LRPTCGTW.js → chunk-XA47WS4N.js} +11 -15
  37. package/{chunk-XFQ2EH5D.js → chunk-XIJFEV6U.js} +3 -3
  38. package/{ci-FQJANSQW.js → ci-GIDCFAZF.js} +14 -10
  39. package/cli-package.json +6 -2
  40. package/{config-4KQTTXJH.js → config-LIQMIMTF.js} +15 -13
  41. package/{config-LRL3N7TN.js → config-NBO3COMM.js} +13 -11
  42. package/{create-KN6AXEA6.js → create-K2S3J62I.js} +24 -19
  43. package/{deprecate-P26WHVFB.js → deprecate-4PJKNFXN.js} +22 -14
  44. package/{devtools-6NFQDW4L.js → devtools-HGLF4KAO.js} +82 -28
  45. package/{dist-tag-FA2BT7SA.js → dist-tag-TA6LWT2V.js} +16 -9
  46. package/{docs-OAPIY4SC.js → docs-ZCMIKQAN.js} +19 -17
  47. package/{exec-CVZGHJZS.js → exec-XVF4KCRJ.js} +24 -19
  48. package/{exec-cache-3AHODVRN.js → exec-cache-2IWJNBFB.js} +22 -17
  49. package/{exec-local-I4OJX76E.js → exec-local-FNFTQYFP.js} +17 -14
  50. package/{help-QFIQSPNS.js → help-ZDRILKVQ.js} +5 -4
  51. package/{init-QLADIAP5.js → init-VMYJE5Q3.js} +12 -10
  52. package/{install-B7CU2BLC.js → install-ZHMWN27D.js} +27 -12
  53. package/{list-OTFV3LOM.js → list-BPFKWXCR.js} +20 -15
  54. package/{login-LG2ZOIDQ.js → login-DQL5A4NT.js} +23 -9
  55. package/{logout-KUI773AM.js → logout-Q74VRDSN.js} +19 -8
  56. package/{pack-C55TTBIQ.js → pack-GLURO5KY.js} +17 -13
  57. package/package.json +8 -1
  58. package/{ping-VNUOC26G.js → ping-PPEYPKZD.js} +17 -10
  59. package/{pkg-H4RJEBK5.js → pkg-UTEKJ5CB.js} +13 -11
  60. package/{profile-DIJ5JUSE.js → profile-5QFRWC2L.js} +16 -8
  61. package/{publish-XF2TRBPH.js → publish-5VDI3JXX.js} +23 -16
  62. package/{query-BGP5JMJ7.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-NCEHK7KB.js → repo-SB3C7MZZ.js} +19 -17
  67. package/{reporter-OB6SNHOZ.js → reporter-2XBYWAVU.js} +3 -2
  68. package/{run-ZNJJYEJF.js → run-U6CW5Q56.js} +17 -14
  69. package/{run-exec-F5OV7MVN.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-M3WI7TSB.js → src-ZWBXAZOV.js} +25 -17
  73. package/{token-KXCVRJGF.js → token-M5HPJJJQ.js} +20 -9
  74. package/{uninstall-33SUWR6K.js → uninstall-UUBTM4ZQ.js} +15 -11
  75. package/{unpublish-7AZPBZF2.js → unpublish-WDSRB6DV.js} +17 -9
  76. package/{update-2EQF6IKZ.js → update-J4BEFJRC.js} +14 -10
  77. package/{version-HFYI3SEX.js → version-ZVG66SKC.js} +12 -10
  78. package/{view-C5OT36OB.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-KKFV3XR6.js → whoami-TCSDOBU2.js} +19 -8
  85. package/chunk-FXIBCUIM.js +0 -73
@@ -68,8 +68,8 @@ var require_commonjs = __commonJS({
68
68
  var SIGNAL = /* @__PURE__ */ Symbol("signal");
69
69
  var DATALISTENERS = /* @__PURE__ */ Symbol("dataListeners");
70
70
  var DISCARDED = /* @__PURE__ */ Symbol("discarded");
71
- var defer = (fn2) => Promise.resolve().then(fn2);
72
- var nodefer = (fn2) => fn2();
71
+ var defer = (fn) => Promise.resolve().then(fn);
72
+ var nodefer = (fn) => fn();
73
73
  var isEndish = (ev) => ev === "end" || ev === "finish" || ev === "prefinish";
74
74
  var isArrayBufferLike = (b2) => b2 instanceof ArrayBuffer || !!b2 && typeof b2 === "object" && b2.constructor && b2.constructor.name === "ArrayBuffer" && b2.byteLength >= 0;
75
75
  var isArrayBufferView = (b2) => !Buffer.isBuffer(b2) && ArrayBuffer.isView(b2);
@@ -271,7 +271,7 @@ var require_commonjs = __commonJS({
271
271
  }
272
272
  if (!encoding)
273
273
  encoding = "utf8";
274
- const fn2 = this[ASYNC] ? defer : nodefer;
274
+ const fn = this[ASYNC] ? defer : nodefer;
275
275
  if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {
276
276
  if (isArrayBufferView(chunk)) {
277
277
  chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength);
@@ -291,14 +291,14 @@ var require_commonjs = __commonJS({
291
291
  if (this[BUFFERLENGTH] !== 0)
292
292
  this.emit("readable");
293
293
  if (cb)
294
- fn2(cb);
294
+ fn(cb);
295
295
  return this[FLOWING];
296
296
  }
297
297
  if (!chunk.length) {
298
298
  if (this[BUFFERLENGTH] !== 0)
299
299
  this.emit("readable");
300
300
  if (cb)
301
- fn2(cb);
301
+ fn(cb);
302
302
  return this[FLOWING];
303
303
  }
304
304
  if (typeof chunk === "string" && // unless it is a string already ready for us to use
@@ -317,7 +317,7 @@ var require_commonjs = __commonJS({
317
317
  if (this[BUFFERLENGTH] !== 0)
318
318
  this.emit("readable");
319
319
  if (cb)
320
- fn2(cb);
320
+ fn(cb);
321
321
  return this[FLOWING];
322
322
  }
323
323
  /**
@@ -1386,86 +1386,86 @@ var require_lib = __commonJS({
1386
1386
  }
1387
1387
  });
1388
1388
 
1389
- // ../../node_modules/.vlt/~npm~tar@7.5.13/node_modules/tar/dist/esm/index.min.js
1390
- import Kr from "node:events";
1389
+ // ../../node_modules/.vlt/~npm~tar@7.5.20/node_modules/tar/dist/esm/index.min.js
1390
+ import Qr from "node:events";
1391
1391
  import I from "node:fs";
1392
- import { EventEmitter as Ti } from "node:events";
1393
- import Ns from "node:stream";
1394
- import { StringDecoder as Mr } from "node:string_decoder";
1395
- import nr from "node:path";
1396
- import Vt from "node:fs";
1397
- import { dirname as xn, parse as Ln } from "node:path";
1398
- import { EventEmitter as _n } from "node:events";
1399
- import Mi from "node:assert";
1400
- import { Buffer as gt } from "node:buffer";
1401
- import * as ks from "node:zlib";
1402
- import qr from "node:zlib";
1392
+ import { EventEmitter as Di } from "node:events";
1393
+ import Cs from "node:stream";
1394
+ import { StringDecoder as Hr } from "node:string_decoder";
1395
+ import cr from "node:path";
1396
+ import Kt from "node:fs";
1397
+ import { dirname as Fn, parse as kn } from "node:path";
1398
+ import { EventEmitter as Dn } from "node:events";
1399
+ import zi from "node:assert";
1400
+ import { Buffer as Ot } from "node:buffer";
1401
+ import * as Ps from "node:zlib";
1402
+ import en from "node:zlib";
1403
1403
  import { posix as Zt } from "node:path";
1404
- import { basename as wn } from "node:path";
1405
- import fi from "node:fs";
1406
- import $ from "node:fs";
1407
- import $s from "node:path";
1408
- import { win32 as In } from "node:path";
1409
- import sr from "node:path";
1410
- import Cr from "node:fs";
1411
- import so from "node:assert";
1412
- import { randomBytes as Ir } from "node:crypto";
1413
- import u from "node:fs";
1404
+ import { basename as _n } from "node:path";
1405
+ import ui from "node:fs";
1406
+ import X from "node:fs";
1407
+ import js from "node:path";
1408
+ import { win32 as Pn } from "node:path";
1409
+ import ar from "node:path";
1410
+ import Br from "node:fs";
1411
+ import co from "node:assert";
1412
+ import { randomBytes as Mr } from "node:crypto";
1413
+ import m from "node:fs";
1414
1414
  import R from "node:path";
1415
- import cr from "node:fs";
1416
- import mi from "node:fs";
1417
- import Ee from "node:path";
1415
+ import pr from "node:fs";
1416
+ import wi from "node:fs";
1417
+ import we from "node:path";
1418
1418
  import k from "node:fs";
1419
- import jn from "node:fs/promises";
1420
- import pi from "node:path";
1421
- import { join as br } from "node:path";
1419
+ import ro from "node:fs/promises";
1420
+ import Si from "node:path";
1421
+ import { join as xr } from "node:path";
1422
1422
  import v from "node:fs";
1423
- import Fr from "node:path";
1424
- var kr = Object.defineProperty;
1425
- var vr = (s3, t) => {
1426
- for (var e in t) kr(s3, e, { get: t[e], enumerable: true });
1423
+ import Pr from "node:path";
1424
+ var zr = Object.defineProperty;
1425
+ var Ur = (s3, t) => {
1426
+ for (var e in t) zr(s3, e, { get: t[e], enumerable: true });
1427
1427
  };
1428
- var Os = typeof process == "object" && process ? process : { stdout: null, stderr: null };
1429
- var Br = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D || s3 instanceof Ns || Pr(s3) || zr(s3));
1430
- var Pr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.pipe == "function" && s3.pipe !== Ns.Writable.prototype.pipe;
1431
- var zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.write == "function" && typeof s3.end == "function";
1432
- var q = /* @__PURE__ */ Symbol("EOF");
1433
- var j = /* @__PURE__ */ Symbol("maybeEmitEnd");
1434
- var rt = /* @__PURE__ */ Symbol("emittedEnd");
1435
- var Le = /* @__PURE__ */ Symbol("emittingEnd");
1436
- var jt = /* @__PURE__ */ Symbol("emittedError");
1428
+ var Ds = typeof process == "object" && process ? process : { stdout: null, stderr: null };
1429
+ var Wr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof Cs || Gr(s3) || Zr(s3));
1430
+ var Gr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Di && typeof s3.pipe == "function" && s3.pipe !== Cs.Writable.prototype.pipe;
1431
+ var Zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Di && typeof s3.write == "function" && typeof s3.end == "function";
1432
+ var Q = /* @__PURE__ */ Symbol("EOF");
1433
+ var J = /* @__PURE__ */ Symbol("maybeEmitEnd");
1434
+ var nt = /* @__PURE__ */ Symbol("emittedEnd");
1435
+ var De = /* @__PURE__ */ Symbol("emittingEnd");
1436
+ var qt = /* @__PURE__ */ Symbol("emittedError");
1437
1437
  var Ne = /* @__PURE__ */ Symbol("closed");
1438
- var Ts = /* @__PURE__ */ Symbol("read");
1438
+ var Ns = /* @__PURE__ */ Symbol("read");
1439
1439
  var Ae = /* @__PURE__ */ Symbol("flush");
1440
- var xs = /* @__PURE__ */ Symbol("flushChunk");
1440
+ var As = /* @__PURE__ */ Symbol("flushChunk");
1441
1441
  var z = /* @__PURE__ */ Symbol("encoding");
1442
1442
  var Mt = /* @__PURE__ */ Symbol("decoder");
1443
- var b = /* @__PURE__ */ Symbol("flowing");
1443
+ var g = /* @__PURE__ */ Symbol("flowing");
1444
1444
  var Qt = /* @__PURE__ */ Symbol("paused");
1445
1445
  var Bt = /* @__PURE__ */ Symbol("resume");
1446
- var _ = /* @__PURE__ */ Symbol("buffer");
1447
- var A = /* @__PURE__ */ Symbol("pipes");
1448
- var g = /* @__PURE__ */ Symbol("bufferLength");
1449
- var yi = /* @__PURE__ */ Symbol("bufferPush");
1450
- var De = /* @__PURE__ */ Symbol("bufferShift");
1446
+ var b = /* @__PURE__ */ Symbol("buffer");
1447
+ var N = /* @__PURE__ */ Symbol("pipes");
1448
+ var _ = /* @__PURE__ */ Symbol("bufferLength");
1449
+ var bi = /* @__PURE__ */ Symbol("bufferPush");
1450
+ var Ie = /* @__PURE__ */ Symbol("bufferShift");
1451
1451
  var L = /* @__PURE__ */ Symbol("objectMode");
1452
- var w = /* @__PURE__ */ Symbol("destroyed");
1453
- var Ri = /* @__PURE__ */ Symbol("error");
1454
- var bi = /* @__PURE__ */ Symbol("emitData");
1455
- var Ls = /* @__PURE__ */ Symbol("emitEnd");
1456
- var _i = /* @__PURE__ */ Symbol("emitEnd2");
1452
+ var S = /* @__PURE__ */ Symbol("destroyed");
1453
+ var _i = /* @__PURE__ */ Symbol("error");
1454
+ var Oi = /* @__PURE__ */ Symbol("emitData");
1455
+ var Is = /* @__PURE__ */ Symbol("emitEnd");
1456
+ var Ti = /* @__PURE__ */ Symbol("emitEnd2");
1457
1457
  var Z = /* @__PURE__ */ Symbol("async");
1458
- var gi = /* @__PURE__ */ Symbol("abort");
1459
- var Ie = /* @__PURE__ */ Symbol("aborted");
1458
+ var xi = /* @__PURE__ */ Symbol("abort");
1459
+ var Ce = /* @__PURE__ */ Symbol("aborted");
1460
1460
  var Jt = /* @__PURE__ */ Symbol("signal");
1461
- var yt = /* @__PURE__ */ Symbol("dataListeners");
1461
+ var Rt = /* @__PURE__ */ Symbol("dataListeners");
1462
1462
  var C = /* @__PURE__ */ Symbol("discarded");
1463
- var te = (s3) => Promise.resolve().then(s3);
1464
- var Ur = (s3) => s3();
1465
- var Hr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
1466
- var Wr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
1467
- var Gr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
1468
- var Ce = class {
1463
+ var jt = (s3) => Promise.resolve().then(s3);
1464
+ var Yr = (s3) => s3();
1465
+ var Kr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
1466
+ var Vr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
1467
+ var $r = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
1468
+ var Fe = class {
1469
1469
  src;
1470
1470
  dest;
1471
1471
  opts;
@@ -1482,7 +1482,7 @@ var Ce = class {
1482
1482
  this.unpipe(), this.opts.end && this.dest.end();
1483
1483
  }
1484
1484
  };
1485
- var Oi = class extends Ce {
1485
+ var Li = class extends Fe {
1486
1486
  unpipe() {
1487
1487
  this.src.removeListener("error", this.proxyErrors), super.unpipe();
1488
1488
  }
@@ -1490,39 +1490,39 @@ var Oi = class extends Ce {
1490
1490
  super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
1491
1491
  }
1492
1492
  };
1493
- var Zr = (s3) => !!s3.objectMode;
1494
- var Yr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
1495
- var D = class extends Ti {
1496
- [b] = false;
1493
+ var Xr = (s3) => !!s3.objectMode;
1494
+ var qr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
1495
+ var A = class extends Di {
1496
+ [g] = false;
1497
1497
  [Qt] = false;
1498
- [A] = [];
1499
- [_] = [];
1498
+ [N] = [];
1499
+ [b] = [];
1500
1500
  [L];
1501
1501
  [z];
1502
1502
  [Z];
1503
1503
  [Mt];
1504
- [q] = false;
1505
- [rt] = false;
1506
- [Le] = false;
1504
+ [Q] = false;
1505
+ [nt] = false;
1506
+ [De] = false;
1507
1507
  [Ne] = false;
1508
- [jt] = null;
1509
- [g] = 0;
1510
- [w] = false;
1508
+ [qt] = null;
1509
+ [_] = 0;
1510
+ [S] = false;
1511
1511
  [Jt];
1512
- [Ie] = false;
1513
- [yt] = 0;
1512
+ [Ce] = false;
1513
+ [Rt] = 0;
1514
1514
  [C] = false;
1515
1515
  writable = true;
1516
1516
  readable = true;
1517
1517
  constructor(...t) {
1518
1518
  let e = t[0] || {};
1519
1519
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
1520
- Zr(e) ? (this[L] = true, this[z] = null) : Yr(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[Mt] = this[z] ? new Mr(this[z]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[_] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[A] });
1520
+ Xr(e) ? (this[L] = true, this[z] = null) : qr(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[Mt] = this[z] ? new Hr(this[z]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[b] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[N] });
1521
1521
  let { signal: i } = e;
1522
- i && (this[Jt] = i, i.aborted ? this[gi]() : i.addEventListener("abort", () => this[gi]()));
1522
+ i && (this[Jt] = i, i.aborted ? this[xi]() : i.addEventListener("abort", () => this[xi]()));
1523
1523
  }
1524
1524
  get bufferLength() {
1525
- return this[g];
1525
+ return this[_];
1526
1526
  }
1527
1527
  get encoding() {
1528
1528
  return this[z];
@@ -1545,99 +1545,99 @@ var D = class extends Ti {
1545
1545
  set async(t) {
1546
1546
  this[Z] = this[Z] || !!t;
1547
1547
  }
1548
- [gi]() {
1549
- this[Ie] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
1548
+ [xi]() {
1549
+ this[Ce] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
1550
1550
  }
1551
1551
  get aborted() {
1552
- return this[Ie];
1552
+ return this[Ce];
1553
1553
  }
1554
1554
  set aborted(t) {
1555
1555
  }
1556
1556
  write(t, e, i) {
1557
- if (this[Ie]) return false;
1558
- if (this[q]) throw new Error("write after end");
1559
- if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
1557
+ if (this[Ce]) return false;
1558
+ if (this[Q]) throw new Error("write after end");
1559
+ if (this[S]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
1560
1560
  typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
1561
- let r = this[Z] ? te : Ur;
1561
+ let r = this[Z] ? jt : Yr;
1562
1562
  if (!this[L] && !Buffer.isBuffer(t)) {
1563
- if (Gr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
1564
- else if (Wr(t)) t = Buffer.from(t);
1563
+ if ($r(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
1564
+ else if (Vr(t)) t = Buffer.from(t);
1565
1565
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
1566
1566
  }
1567
- return this[L] ? (this[b] && this[g] !== 0 && this[Ae](true), this[b] ? this.emit("data", t) : this[yi](t), this[g] !== 0 && this.emit("readable"), i && r(i), this[b]) : t.length ? (typeof t == "string" && !(e === this[z] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z] && (t = this[Mt].write(t)), this[b] && this[g] !== 0 && this[Ae](true), this[b] ? this.emit("data", t) : this[yi](t), this[g] !== 0 && this.emit("readable"), i && r(i), this[b]) : (this[g] !== 0 && this.emit("readable"), i && r(i), this[b]);
1567
+ return this[L] ? (this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t) : this[bi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : t.length ? (typeof t == "string" && !(e === this[z] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z] && (t = this[Mt].write(t)), this[g] && this[_] !== 0 && this[Ae](true), this[g] ? this.emit("data", t) : this[bi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : (this[_] !== 0 && this.emit("readable"), i && r(i), this[g]);
1568
1568
  }
1569
1569
  read(t) {
1570
- if (this[w]) return null;
1571
- if (this[C] = false, this[g] === 0 || t === 0 || t && t > this[g]) return this[j](), null;
1572
- this[L] && (t = null), this[_].length > 1 && !this[L] && (this[_] = [this[z] ? this[_].join("") : Buffer.concat(this[_], this[g])]);
1573
- let e = this[Ts](t || null, this[_][0]);
1574
- return this[j](), e;
1575
- }
1576
- [Ts](t, e) {
1577
- if (this[L]) this[De]();
1570
+ if (this[S]) return null;
1571
+ if (this[C] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[J](), null;
1572
+ this[L] && (t = null), this[b].length > 1 && !this[L] && (this[b] = [this[z] ? this[b].join("") : Buffer.concat(this[b], this[_])]);
1573
+ let e = this[Ns](t || null, this[b][0]);
1574
+ return this[J](), e;
1575
+ }
1576
+ [Ns](t, e) {
1577
+ if (this[L]) this[Ie]();
1578
1578
  else {
1579
1579
  let i = e;
1580
- t === i.length || t === null ? this[De]() : typeof i == "string" ? (this[_][0] = i.slice(t), e = i.slice(0, t), this[g] -= t) : (this[_][0] = i.subarray(t), e = i.subarray(0, t), this[g] -= t);
1580
+ t === i.length || t === null ? this[Ie]() : typeof i == "string" ? (this[b][0] = i.slice(t), e = i.slice(0, t), this[_] -= t) : (this[b][0] = i.subarray(t), e = i.subarray(0, t), this[_] -= t);
1581
1581
  }
1582
- return this.emit("data", e), !this[_].length && !this[q] && this.emit("drain"), e;
1582
+ return this.emit("data", e), !this[b].length && !this[Q] && this.emit("drain"), e;
1583
1583
  }
1584
1584
  end(t, e, i) {
1585
- return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = "utf8"), t !== void 0 && this.write(t, e), i && this.once("end", i), this[q] = true, this.writable = false, (this[b] || !this[Qt]) && this[j](), this;
1585
+ return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = "utf8"), t !== void 0 && this.write(t, e), i && this.once("end", i), this[Q] = true, this.writable = false, (this[g] || !this[Qt]) && this[J](), this;
1586
1586
  }
1587
1587
  [Bt]() {
1588
- this[w] || (!this[yt] && !this[A].length && (this[C] = true), this[Qt] = false, this[b] = true, this.emit("resume"), this[_].length ? this[Ae]() : this[q] ? this[j]() : this.emit("drain"));
1588
+ this[S] || (!this[Rt] && !this[N].length && (this[C] = true), this[Qt] = false, this[g] = true, this.emit("resume"), this[b].length ? this[Ae]() : this[Q] ? this[J]() : this.emit("drain"));
1589
1589
  }
1590
1590
  resume() {
1591
1591
  return this[Bt]();
1592
1592
  }
1593
1593
  pause() {
1594
- this[b] = false, this[Qt] = true, this[C] = false;
1594
+ this[g] = false, this[Qt] = true, this[C] = false;
1595
1595
  }
1596
1596
  get destroyed() {
1597
- return this[w];
1597
+ return this[S];
1598
1598
  }
1599
1599
  get flowing() {
1600
- return this[b];
1600
+ return this[g];
1601
1601
  }
1602
1602
  get paused() {
1603
1603
  return this[Qt];
1604
1604
  }
1605
- [yi](t) {
1606
- this[L] ? this[g] += 1 : this[g] += t.length, this[_].push(t);
1605
+ [bi](t) {
1606
+ this[L] ? this[_] += 1 : this[_] += t.length, this[b].push(t);
1607
1607
  }
1608
- [De]() {
1609
- return this[L] ? this[g] -= 1 : this[g] -= this[_][0].length, this[_].shift();
1608
+ [Ie]() {
1609
+ return this[L] ? this[_] -= 1 : this[_] -= this[b][0].length, this[b].shift();
1610
1610
  }
1611
1611
  [Ae](t = false) {
1612
1612
  do
1613
1613
  ;
1614
- while (this[xs](this[De]()) && this[_].length);
1615
- !t && !this[_].length && !this[q] && this.emit("drain");
1614
+ while (this[As](this[Ie]()) && this[b].length);
1615
+ !t && !this[b].length && !this[Q] && this.emit("drain");
1616
1616
  }
1617
- [xs](t) {
1618
- return this.emit("data", t), this[b];
1617
+ [As](t) {
1618
+ return this.emit("data", t), this[g];
1619
1619
  }
1620
1620
  pipe(t, e) {
1621
- if (this[w]) return t;
1621
+ if (this[S]) return t;
1622
1622
  this[C] = false;
1623
- let i = this[rt];
1624
- return e = e || {}, t === Os.stdout || t === Os.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this[A].push(e.proxyErrors ? new Oi(this, t, e) : new Ce(this, t, e)), this[Z] ? te(() => this[Bt]()) : this[Bt]()), t;
1623
+ let i = this[nt];
1624
+ return e = e || {}, t === Ds.stdout || t === Ds.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this[N].push(e.proxyErrors ? new Li(this, t, e) : new Fe(this, t, e)), this[Z] ? jt(() => this[Bt]()) : this[Bt]()), t;
1625
1625
  }
1626
1626
  unpipe(t) {
1627
- let e = this[A].find((i) => i.dest === t);
1628
- e && (this[A].length === 1 ? (this[b] && this[yt] === 0 && (this[b] = false), this[A] = []) : this[A].splice(this[A].indexOf(e), 1), e.unpipe());
1627
+ let e = this[N].find((i) => i.dest === t);
1628
+ e && (this[N].length === 1 ? (this[g] && this[Rt] === 0 && (this[g] = false), this[N] = []) : this[N].splice(this[N].indexOf(e), 1), e.unpipe());
1629
1629
  }
1630
1630
  addListener(t, e) {
1631
1631
  return this.on(t, e);
1632
1632
  }
1633
1633
  on(t, e) {
1634
1634
  let i = super.on(t, e);
1635
- if (t === "data") this[C] = false, this[yt]++, !this[A].length && !this[b] && this[Bt]();
1636
- else if (t === "readable" && this[g] !== 0) super.emit("readable");
1637
- else if (Hr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
1638
- else if (t === "error" && this[jt]) {
1635
+ if (t === "data") this[C] = false, this[Rt]++, !this[N].length && !this[g] && this[Bt]();
1636
+ else if (t === "readable" && this[_] !== 0) super.emit("readable");
1637
+ else if (Kr(t) && this[nt]) super.emit(t), this.removeAllListeners(t);
1638
+ else if (t === "error" && this[qt]) {
1639
1639
  let r = e;
1640
- this[Z] ? te(() => r.call(this, this[jt])) : r.call(this, this[jt]);
1640
+ this[Z] ? jt(() => r.call(this, this[qt])) : r.call(this, this[qt]);
1641
1641
  }
1642
1642
  return i;
1643
1643
  }
@@ -1646,58 +1646,58 @@ var D = class extends Ti {
1646
1646
  }
1647
1647
  off(t, e) {
1648
1648
  let i = super.off(t, e);
1649
- return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[A].length && (this[b] = false)), i;
1649
+ return t === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[C] && !this[N].length && (this[g] = false)), i;
1650
1650
  }
1651
1651
  removeAllListeners(t) {
1652
1652
  let e = super.removeAllListeners(t);
1653
- return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[A].length && (this[b] = false)), e;
1653
+ return (t === "data" || t === void 0) && (this[Rt] = 0, !this[C] && !this[N].length && (this[g] = false)), e;
1654
1654
  }
1655
1655
  get emittedEnd() {
1656
- return this[rt];
1656
+ return this[nt];
1657
1657
  }
1658
- [j]() {
1659
- !this[Le] && !this[rt] && !this[w] && this[_].length === 0 && this[q] && (this[Le] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[Le] = false);
1658
+ [J]() {
1659
+ !this[De] && !this[nt] && !this[S] && this[b].length === 0 && this[Q] && (this[De] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[De] = false);
1660
1660
  }
1661
1661
  emit(t, ...e) {
1662
1662
  let i = e[0];
1663
- if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
1664
- if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[bi](i)), true) : this[bi](i);
1665
- if (t === "end") return this[Ls]();
1663
+ if (t !== "error" && t !== "close" && t !== S && this[S]) return false;
1664
+ if (t === "data") return !this[L] && !i ? false : this[Z] ? (jt(() => this[Oi](i)), true) : this[Oi](i);
1665
+ if (t === "end") return this[Is]();
1666
1666
  if (t === "close") {
1667
- if (this[Ne] = true, !this[rt] && !this[w]) return false;
1667
+ if (this[Ne] = true, !this[nt] && !this[S]) return false;
1668
1668
  let n = super.emit("close");
1669
1669
  return this.removeAllListeners("close"), n;
1670
1670
  } else if (t === "error") {
1671
- this[jt] = i, super.emit(Ri, i);
1671
+ this[qt] = i, super.emit(_i, i);
1672
1672
  let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
1673
- return this[j](), n;
1673
+ return this[J](), n;
1674
1674
  } else if (t === "resume") {
1675
1675
  let n = super.emit("resume");
1676
- return this[j](), n;
1676
+ return this[J](), n;
1677
1677
  } else if (t === "finish" || t === "prefinish") {
1678
1678
  let n = super.emit(t);
1679
1679
  return this.removeAllListeners(t), n;
1680
1680
  }
1681
1681
  let r = super.emit(t, ...e);
1682
- return this[j](), r;
1682
+ return this[J](), r;
1683
1683
  }
1684
- [bi](t) {
1685
- for (let i of this[A]) i.dest.write(t) === false && this.pause();
1684
+ [Oi](t) {
1685
+ for (let i of this[N]) i.dest.write(t) === false && this.pause();
1686
1686
  let e = this[C] ? false : super.emit("data", t);
1687
- return this[j](), e;
1687
+ return this[J](), e;
1688
1688
  }
1689
- [Ls]() {
1690
- return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[_i]()), true) : this[_i]());
1689
+ [Is]() {
1690
+ return this[nt] ? false : (this[nt] = true, this.readable = false, this[Z] ? (jt(() => this[Ti]()), true) : this[Ti]());
1691
1691
  }
1692
- [_i]() {
1692
+ [Ti]() {
1693
1693
  if (this[Mt]) {
1694
1694
  let e = this[Mt].end();
1695
1695
  if (e) {
1696
- for (let i of this[A]) i.dest.write(e);
1696
+ for (let i of this[N]) i.dest.write(e);
1697
1697
  this[C] || super.emit("data", e);
1698
1698
  }
1699
1699
  }
1700
- for (let e of this[A]) e.end();
1700
+ for (let e of this[N]) e.end();
1701
1701
  let t = super.emit("end");
1702
1702
  return this.removeAllListeners("end"), t;
1703
1703
  }
@@ -1716,7 +1716,7 @@ var D = class extends Ti {
1716
1716
  }
1717
1717
  async promise() {
1718
1718
  return new Promise((t, e) => {
1719
- this.on(w, () => e(new Error("stream destroyed"))), this.on("error", (i) => e(i)), this.on("end", () => t());
1719
+ this.on(S, () => e(new Error("stream destroyed"))), this.on("error", (i) => e(i)), this.on("end", () => t());
1720
1720
  });
1721
1721
  }
1722
1722
  [Symbol.asyncIterator]() {
@@ -1726,16 +1726,16 @@ var D = class extends Ti {
1726
1726
  if (t) return e();
1727
1727
  let r = this.read();
1728
1728
  if (r !== null) return Promise.resolve({ done: false, value: r });
1729
- if (this[q]) return e();
1729
+ if (this[Q]) return e();
1730
1730
  let n, o, h = (d) => {
1731
- this.off("data", a), this.off("end", l), this.off(w, c), e(), o(d);
1731
+ this.off("data", a), this.off("end", l), this.off(S, c), e(), o(d);
1732
1732
  }, a = (d) => {
1733
- this.off("error", h), this.off("end", l), this.off(w, c), this.pause(), n({ value: d, done: !!this[q] });
1733
+ this.off("error", h), this.off("end", l), this.off(S, c), this.pause(), n({ value: d, done: !!this[Q] });
1734
1734
  }, l = () => {
1735
- this.off("error", h), this.off("data", a), this.off(w, c), e(), n({ done: true, value: void 0 });
1735
+ this.off("error", h), this.off("data", a), this.off(S, c), e(), n({ done: true, value: void 0 });
1736
1736
  }, c = () => h(new Error("stream destroyed"));
1737
- return new Promise((d, S) => {
1738
- o = S, n = d, this.once(w, c), this.once("error", h), this.once("end", l), this.once("data", a);
1737
+ return new Promise((d, y) => {
1738
+ o = y, n = d, this.once(S, c), this.once("error", h), this.once("end", l), this.once("data", a);
1739
1739
  });
1740
1740
  }, throw: e, return: e, [Symbol.asyncIterator]() {
1741
1741
  return this;
@@ -1744,70 +1744,70 @@ var D = class extends Ti {
1744
1744
  }
1745
1745
  [Symbol.iterator]() {
1746
1746
  this[C] = false;
1747
- let t = false, e = () => (this.pause(), this.off(Ri, e), this.off(w, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
1747
+ let t = false, e = () => (this.pause(), this.off(_i, e), this.off(S, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
1748
1748
  if (t) return e();
1749
1749
  let r = this.read();
1750
1750
  return r === null ? e() : { done: false, value: r };
1751
1751
  };
1752
- return this.once("end", e), this.once(Ri, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
1752
+ return this.once("end", e), this.once(_i, e), this.once(S, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
1753
1753
  return this;
1754
1754
  }, [Symbol.dispose]: () => {
1755
1755
  } };
1756
1756
  }
1757
1757
  destroy(t) {
1758
- if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
1759
- this[w] = true, this[C] = true, this[_].length = 0, this[g] = 0;
1758
+ if (this[S]) return t ? this.emit("error", t) : this.emit(S), this;
1759
+ this[S] = true, this[C] = true, this[b].length = 0, this[_] = 0;
1760
1760
  let e = this;
1761
- return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
1761
+ return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(S), this;
1762
1762
  }
1763
1763
  static get isStream() {
1764
- return Br;
1764
+ return Wr;
1765
1765
  }
1766
1766
  };
1767
- var Vr = I.writev;
1768
- var ot = /* @__PURE__ */ Symbol("_autoClose");
1767
+ var Jr = I.writev;
1768
+ var ht = /* @__PURE__ */ Symbol("_autoClose");
1769
1769
  var H = /* @__PURE__ */ Symbol("_close");
1770
- var ee = /* @__PURE__ */ Symbol("_ended");
1771
- var m = /* @__PURE__ */ Symbol("_fd");
1772
- var xi = /* @__PURE__ */ Symbol("_finished");
1773
- var J = /* @__PURE__ */ Symbol("_flags");
1774
- var Li = /* @__PURE__ */ Symbol("_flush");
1775
- var Ii = /* @__PURE__ */ Symbol("_handleChunk");
1776
- var Ci = /* @__PURE__ */ Symbol("_makeBuf");
1777
- var se = /* @__PURE__ */ Symbol("_mode");
1778
- var Fe = /* @__PURE__ */ Symbol("_needDrain");
1770
+ var te = /* @__PURE__ */ Symbol("_ended");
1771
+ var u = /* @__PURE__ */ Symbol("_fd");
1772
+ var Ni = /* @__PURE__ */ Symbol("_finished");
1773
+ var tt = /* @__PURE__ */ Symbol("_flags");
1774
+ var Ai = /* @__PURE__ */ Symbol("_flush");
1775
+ var ki = /* @__PURE__ */ Symbol("_handleChunk");
1776
+ var vi = /* @__PURE__ */ Symbol("_makeBuf");
1777
+ var ie = /* @__PURE__ */ Symbol("_mode");
1778
+ var ke = /* @__PURE__ */ Symbol("_needDrain");
1779
1779
  var Ut = /* @__PURE__ */ Symbol("_onerror");
1780
1780
  var Ht = /* @__PURE__ */ Symbol("_onopen");
1781
- var Ni = /* @__PURE__ */ Symbol("_onread");
1781
+ var Ii = /* @__PURE__ */ Symbol("_onread");
1782
1782
  var Pt = /* @__PURE__ */ Symbol("_onwrite");
1783
- var ht = /* @__PURE__ */ Symbol("_open");
1783
+ var at = /* @__PURE__ */ Symbol("_open");
1784
1784
  var U = /* @__PURE__ */ Symbol("_path");
1785
- var nt = /* @__PURE__ */ Symbol("_pos");
1785
+ var ot = /* @__PURE__ */ Symbol("_pos");
1786
1786
  var Y = /* @__PURE__ */ Symbol("_queue");
1787
1787
  var zt = /* @__PURE__ */ Symbol("_read");
1788
- var Ai = /* @__PURE__ */ Symbol("_readSize");
1789
- var Q = /* @__PURE__ */ Symbol("_reading");
1790
- var ie = /* @__PURE__ */ Symbol("_remain");
1791
- var Di = /* @__PURE__ */ Symbol("_size");
1792
- var ke = /* @__PURE__ */ Symbol("_write");
1793
- var Rt = /* @__PURE__ */ Symbol("_writing");
1794
- var ve = /* @__PURE__ */ Symbol("_defaultFlag");
1788
+ var Ci = /* @__PURE__ */ Symbol("_readSize");
1789
+ var j = /* @__PURE__ */ Symbol("_reading");
1790
+ var ee = /* @__PURE__ */ Symbol("_remain");
1791
+ var Fi = /* @__PURE__ */ Symbol("_size");
1792
+ var ve = /* @__PURE__ */ Symbol("_write");
1793
+ var gt = /* @__PURE__ */ Symbol("_writing");
1794
+ var Me = /* @__PURE__ */ Symbol("_defaultFlag");
1795
1795
  var bt = /* @__PURE__ */ Symbol("_errored");
1796
- var _t = class extends D {
1796
+ var _t = class extends A {
1797
1797
  [bt] = false;
1798
- [m];
1798
+ [u];
1799
1799
  [U];
1800
- [Ai];
1801
- [Q] = false;
1802
- [Di];
1803
- [ie];
1804
- [ot];
1800
+ [Ci];
1801
+ [j] = false;
1802
+ [Fi];
1803
+ [ee];
1804
+ [ht];
1805
1805
  constructor(t, e) {
1806
1806
  if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
1807
- this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ai] = e.readSize || 16 * 1024 * 1024, this[Q] = false, this[Di] = typeof e.size == "number" ? e.size : 1 / 0, this[ie] = this[Di], this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[m] == "number" ? this[zt]() : this[ht]();
1807
+ this[bt] = false, this[u] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ci] = e.readSize || 16 * 1024 * 1024, this[j] = false, this[Fi] = typeof e.size == "number" ? e.size : 1 / 0, this[ee] = this[Fi], this[ht] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[u] == "number" ? this[zt]() : this[at]();
1808
1808
  }
1809
1809
  get fd() {
1810
- return this[m];
1810
+ return this[u];
1811
1811
  }
1812
1812
  get path() {
1813
1813
  return this[U];
@@ -1818,38 +1818,38 @@ var _t = class extends D {
1818
1818
  end() {
1819
1819
  throw new TypeError("this is a readable stream");
1820
1820
  }
1821
- [ht]() {
1821
+ [at]() {
1822
1822
  I.open(this[U], "r", (t, e) => this[Ht](t, e));
1823
1823
  }
1824
1824
  [Ht](t, e) {
1825
- t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
1825
+ t ? this[Ut](t) : (this[u] = e, this.emit("open", e), this[zt]());
1826
1826
  }
1827
- [Ci]() {
1828
- return Buffer.allocUnsafe(Math.min(this[Ai], this[ie]));
1827
+ [vi]() {
1828
+ return Buffer.allocUnsafe(Math.min(this[Ci], this[ee]));
1829
1829
  }
1830
1830
  [zt]() {
1831
- if (!this[Q]) {
1832
- this[Q] = true;
1833
- let t = this[Ci]();
1834
- if (t.length === 0) return process.nextTick(() => this[Ni](null, 0, t));
1835
- I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ni](e, i, r));
1831
+ if (!this[j]) {
1832
+ this[j] = true;
1833
+ let t = this[vi]();
1834
+ if (t.length === 0) return process.nextTick(() => this[Ii](null, 0, t));
1835
+ I.read(this[u], t, 0, t.length, null, (e, i, r) => this[Ii](e, i, r));
1836
1836
  }
1837
1837
  }
1838
- [Ni](t, e, i) {
1839
- this[Q] = false, t ? this[Ut](t) : this[Ii](e, i) && this[zt]();
1838
+ [Ii](t, e, i) {
1839
+ this[j] = false, t ? this[Ut](t) : this[ki](e, i) && this[zt]();
1840
1840
  }
1841
1841
  [H]() {
1842
- if (this[ot] && typeof this[m] == "number") {
1843
- let t = this[m];
1844
- this[m] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
1842
+ if (this[ht] && typeof this[u] == "number") {
1843
+ let t = this[u];
1844
+ this[u] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
1845
1845
  }
1846
1846
  }
1847
1847
  [Ut](t) {
1848
- this[Q] = true, this[H](), this.emit("error", t);
1848
+ this[j] = true, this[H](), this.emit("error", t);
1849
1849
  }
1850
- [Ii](t, e) {
1850
+ [ki](t, e) {
1851
1851
  let i = false;
1852
- return this[ie] -= t, t > 0 && (i = super.write(t < e.length ? e.subarray(0, t) : e)), (t === 0 || this[ie] <= 0) && (i = false, this[H](), super.end()), i;
1852
+ return this[ee] -= t, t > 0 && (i = super.write(t < e.length ? e.subarray(0, t) : e)), (t === 0 || this[ee] <= 0) && (i = false, this[H](), super.end()), i;
1853
1853
  }
1854
1854
  emit(t, ...e) {
1855
1855
  switch (t) {
@@ -1857,7 +1857,7 @@ var _t = class extends D {
1857
1857
  case "finish":
1858
1858
  return false;
1859
1859
  case "drain":
1860
- return typeof this[m] == "number" && this[zt](), false;
1860
+ return typeof this[u] == "number" && this[zt](), false;
1861
1861
  case "error":
1862
1862
  return this[bt] ? false : (this[bt] = true, super.emit(t, ...e));
1863
1863
  default:
@@ -1865,8 +1865,8 @@ var _t = class extends D {
1865
1865
  }
1866
1866
  }
1867
1867
  };
1868
- var Me = class extends _t {
1869
- [ht]() {
1868
+ var Be = class extends _t {
1869
+ [at]() {
1870
1870
  let t = true;
1871
1871
  try {
1872
1872
  this[Ht](null, I.openSync(this[U], "r")), t = false;
@@ -1877,13 +1877,13 @@ var Me = class extends _t {
1877
1877
  [zt]() {
1878
1878
  let t = true;
1879
1879
  try {
1880
- if (!this[Q]) {
1881
- this[Q] = true;
1880
+ if (!this[j]) {
1881
+ this[j] = true;
1882
1882
  do {
1883
- let e = this[Ci](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
1884
- if (!this[Ii](i, e)) break;
1883
+ let e = this[vi](), i = e.length === 0 ? 0 : I.readSync(this[u], e, 0, e.length, null);
1884
+ if (!this[ki](i, e)) break;
1885
1885
  } while (true);
1886
- this[Q] = false;
1886
+ this[j] = false;
1887
1887
  }
1888
1888
  t = false;
1889
1889
  } finally {
@@ -1891,32 +1891,32 @@ var Me = class extends _t {
1891
1891
  }
1892
1892
  }
1893
1893
  [H]() {
1894
- if (this[ot] && typeof this[m] == "number") {
1895
- let t = this[m];
1896
- this[m] = void 0, I.closeSync(t), this.emit("close");
1894
+ if (this[ht] && typeof this[u] == "number") {
1895
+ let t = this[u];
1896
+ this[u] = void 0, I.closeSync(t), this.emit("close");
1897
1897
  }
1898
1898
  }
1899
1899
  };
1900
- var tt = class extends Kr {
1900
+ var et = class extends Qr {
1901
1901
  readable = false;
1902
1902
  writable = true;
1903
1903
  [bt] = false;
1904
- [Rt] = false;
1905
- [ee] = false;
1904
+ [gt] = false;
1905
+ [te] = false;
1906
1906
  [Y] = [];
1907
- [Fe] = false;
1907
+ [ke] = false;
1908
1908
  [U];
1909
- [se];
1909
+ [ie];
1910
+ [ht];
1911
+ [u];
1912
+ [Me];
1913
+ [tt];
1914
+ [Ni] = false;
1910
1915
  [ot];
1911
- [m];
1912
- [ve];
1913
- [J];
1914
- [xi] = false;
1915
- [nt];
1916
1916
  constructor(t, e) {
1917
- e = e || {}, super(e), this[U] = t, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[se] = e.mode === void 0 ? 438 : e.mode, this[nt] = typeof e.start == "number" ? e.start : void 0, this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true;
1918
- let i = this[nt] !== void 0 ? "r+" : "w";
1919
- this[ve] = e.flags === void 0, this[J] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
1917
+ e = e || {}, super(e), this[U] = t, this[u] = typeof e.fd == "number" ? e.fd : void 0, this[ie] = e.mode === void 0 ? 438 : e.mode, this[ot] = typeof e.start == "number" ? e.start : void 0, this[ht] = typeof e.autoClose == "boolean" ? e.autoClose : true;
1918
+ let i = this[ot] !== void 0 ? "r+" : "w";
1919
+ this[Me] = e.flags === void 0, this[tt] = e.flags === void 0 ? i : e.flags, this[u] === void 0 && this[at]();
1920
1920
  }
1921
1921
  emit(t, ...e) {
1922
1922
  if (t === "error") {
@@ -1926,69 +1926,69 @@ var tt = class extends Kr {
1926
1926
  return super.emit(t, ...e);
1927
1927
  }
1928
1928
  get fd() {
1929
- return this[m];
1929
+ return this[u];
1930
1930
  }
1931
1931
  get path() {
1932
1932
  return this[U];
1933
1933
  }
1934
1934
  [Ut](t) {
1935
- this[H](), this[Rt] = true, this.emit("error", t);
1935
+ this[H](), this[gt] = true, this.emit("error", t);
1936
1936
  }
1937
- [ht]() {
1938
- I.open(this[U], this[J], this[se], (t, e) => this[Ht](t, e));
1937
+ [at]() {
1938
+ I.open(this[U], this[tt], this[ie], (t, e) => this[Ht](t, e));
1939
1939
  }
1940
1940
  [Ht](t, e) {
1941
- this[ve] && this[J] === "r+" && t && t.code === "ENOENT" ? (this[J] = "w", this[ht]()) : t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[Rt] || this[Li]());
1941
+ this[Me] && this[tt] === "r+" && t && t.code === "ENOENT" ? (this[tt] = "w", this[at]()) : t ? this[Ut](t) : (this[u] = e, this.emit("open", e), this[gt] || this[Ai]());
1942
1942
  }
1943
1943
  end(t, e) {
1944
- return t && this.write(t, e), this[ee] = true, !this[Rt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
1944
+ return t && this.write(t, e), this[te] = true, !this[gt] && !this[Y].length && typeof this[u] == "number" && this[Pt](null, 0), this;
1945
1945
  }
1946
1946
  write(t, e) {
1947
- return typeof t == "string" && (t = Buffer.from(t, e)), this[ee] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[Rt] || this[Y].length ? (this[Y].push(t), this[Fe] = true, false) : (this[Rt] = true, this[ke](t), true);
1947
+ return typeof t == "string" && (t = Buffer.from(t, e)), this[te] ? (this.emit("error", new Error("write() after end()")), false) : this[u] === void 0 || this[gt] || this[Y].length ? (this[Y].push(t), this[ke] = true, false) : (this[gt] = true, this[ve](t), true);
1948
1948
  }
1949
- [ke](t) {
1950
- I.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
1949
+ [ve](t) {
1950
+ I.write(this[u], t, 0, t.length, this[ot], (e, i) => this[Pt](e, i));
1951
1951
  }
1952
1952
  [Pt](t, e) {
1953
- t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[Li]() : (this[Rt] = false, this[ee] && !this[xi] ? (this[xi] = true, this[H](), this.emit("finish")) : this[Fe] && (this[Fe] = false, this.emit("drain"))));
1953
+ t ? this[Ut](t) : (this[ot] !== void 0 && typeof e == "number" && (this[ot] += e), this[Y].length ? this[Ai]() : (this[gt] = false, this[te] && !this[Ni] ? (this[Ni] = true, this[H](), this.emit("finish")) : this[ke] && (this[ke] = false, this.emit("drain"))));
1954
1954
  }
1955
- [Li]() {
1956
- if (this[Y].length === 0) this[ee] && this[Pt](null, 0);
1957
- else if (this[Y].length === 1) this[ke](this[Y].pop());
1955
+ [Ai]() {
1956
+ if (this[Y].length === 0) this[te] && this[Pt](null, 0);
1957
+ else if (this[Y].length === 1) this[ve](this[Y].pop());
1958
1958
  else {
1959
1959
  let t = this[Y];
1960
- this[Y] = [], Vr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
1960
+ this[Y] = [], Jr(this[u], t, this[ot], (e, i) => this[Pt](e, i));
1961
1961
  }
1962
1962
  }
1963
1963
  [H]() {
1964
- if (this[ot] && typeof this[m] == "number") {
1965
- let t = this[m];
1966
- this[m] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
1964
+ if (this[ht] && typeof this[u] == "number") {
1965
+ let t = this[u];
1966
+ this[u] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
1967
1967
  }
1968
1968
  }
1969
1969
  };
1970
- var Wt = class extends tt {
1971
- [ht]() {
1970
+ var Wt = class extends et {
1971
+ [at]() {
1972
1972
  let t;
1973
- if (this[ve] && this[J] === "r+") try {
1974
- t = I.openSync(this[U], this[J], this[se]);
1973
+ if (this[Me] && this[tt] === "r+") try {
1974
+ t = I.openSync(this[U], this[tt], this[ie]);
1975
1975
  } catch (e) {
1976
- if (e?.code === "ENOENT") return this[J] = "w", this[ht]();
1976
+ if (e?.code === "ENOENT") return this[tt] = "w", this[at]();
1977
1977
  throw e;
1978
1978
  }
1979
- else t = I.openSync(this[U], this[J], this[se]);
1979
+ else t = I.openSync(this[U], this[tt], this[ie]);
1980
1980
  this[Ht](null, t);
1981
1981
  }
1982
1982
  [H]() {
1983
- if (this[ot] && typeof this[m] == "number") {
1984
- let t = this[m];
1985
- this[m] = void 0, I.closeSync(t), this.emit("close");
1983
+ if (this[ht] && typeof this[u] == "number") {
1984
+ let t = this[u];
1985
+ this[u] = void 0, I.closeSync(t), this.emit("close");
1986
1986
  }
1987
1987
  }
1988
- [ke](t) {
1988
+ [ve](t) {
1989
1989
  let e = true;
1990
1990
  try {
1991
- this[Pt](null, I.writeSync(this[m], t, 0, t.length, this[nt])), e = false;
1991
+ this[Pt](null, I.writeSync(this[u], t, 0, t.length, this[ot])), e = false;
1992
1992
  } finally {
1993
1993
  if (e) try {
1994
1994
  this[H]();
@@ -1997,53 +1997,53 @@ var Wt = class extends tt {
1997
1997
  }
1998
1998
  }
1999
1999
  };
2000
- var $r = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
2001
- var As = (s3) => !!s3.sync && !!s3.file;
2002
- var Ds = (s3) => !s3.sync && !!s3.file;
2003
- var Is = (s3) => !!s3.sync && !s3.file;
2004
- var Cs = (s3) => !s3.sync && !s3.file;
2005
- var Fs = (s3) => !!s3.file;
2006
- var Xr = (s3) => {
2007
- let t = $r.get(s3);
2000
+ var jr = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
2001
+ var Fs = (s3) => !!s3.sync && !!s3.file;
2002
+ var ks = (s3) => !s3.sync && !!s3.file;
2003
+ var vs = (s3) => !!s3.sync && !s3.file;
2004
+ var Ms = (s3) => !s3.sync && !s3.file;
2005
+ var Bs = (s3) => !!s3.file;
2006
+ var tn = (s3) => {
2007
+ let t = jr.get(s3);
2008
2008
  return t || s3;
2009
2009
  };
2010
- var re = (s3 = {}) => {
2010
+ var se = (s3 = {}) => {
2011
2011
  if (!s3) return {};
2012
2012
  let t = {};
2013
2013
  for (let [e, i] of Object.entries(s3)) {
2014
- let r = Xr(e);
2014
+ let r = tn(e);
2015
2015
  t[r] = i;
2016
2016
  }
2017
2017
  return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
2018
2018
  };
2019
2019
  var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
2020
2020
  Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o = o ? Array.from(o) : [];
2021
- let a = re(n);
2022
- if (r?.(a, o), As(a)) {
2021
+ let a = se(n);
2022
+ if (r?.(a, o), Fs(a)) {
2023
2023
  if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
2024
2024
  return s3(a, o);
2025
- } else if (Ds(a)) {
2025
+ } else if (ks(a)) {
2026
2026
  let l = t(a, o);
2027
2027
  return h ? l.then(() => h(), h) : l;
2028
- } else if (Is(a)) {
2028
+ } else if (vs(a)) {
2029
2029
  if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
2030
2030
  return e(a, o);
2031
- } else if (Cs(a)) {
2031
+ } else if (Ms(a)) {
2032
2032
  if (typeof h == "function") throw new TypeError("callback only supported with file option");
2033
2033
  return i(a, o);
2034
2034
  }
2035
2035
  throw new Error("impossible options??");
2036
2036
  }, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
2037
- var jr = qr.constants || { ZLIB_VERNUM: 4736 };
2038
- var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, jr));
2039
- var Qr = gt.concat;
2040
- var vs = Object.getOwnPropertyDescriptor(gt, "concat");
2041
- var Jr = (s3) => s3;
2042
- var ki = vs?.writable === true || vs?.set !== void 0 ? (s3) => {
2043
- gt.concat = s3 ? Jr : Qr;
2037
+ var sn = en.constants || { ZLIB_VERNUM: 4736 };
2038
+ var M = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, sn));
2039
+ var rn = Ot.concat;
2040
+ var zs = Object.getOwnPropertyDescriptor(Ot, "concat");
2041
+ var nn = (s3) => s3;
2042
+ var Bi = zs?.writable === true || zs?.set !== void 0 ? (s3) => {
2043
+ Ot.concat = s3 ? nn : rn;
2044
2044
  } : (s3) => {
2045
2045
  };
2046
- var Ot = /* @__PURE__ */ Symbol("_superWrite");
2046
+ var Tt = /* @__PURE__ */ Symbol("_superWrite");
2047
2047
  var Gt = class extends Error {
2048
2048
  code;
2049
2049
  errno;
@@ -2054,8 +2054,8 @@ var Gt = class extends Error {
2054
2054
  return "ZlibError";
2055
2055
  }
2056
2056
  };
2057
- var vi = /* @__PURE__ */ Symbol("flushFlag");
2058
- var ne = class extends D {
2057
+ var Pi = /* @__PURE__ */ Symbol("flushFlag");
2058
+ var re = class extends A {
2059
2059
  #t = false;
2060
2060
  #i = false;
2061
2061
  #s;
@@ -2074,9 +2074,9 @@ var ne = class extends D {
2074
2074
  }
2075
2075
  constructor(t, e) {
2076
2076
  if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
2077
- if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof ks[e] != "function") throw new TypeError("Compression method not supported: " + e);
2077
+ if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof Ps[e] != "function") throw new TypeError("Compression method not supported: " + e);
2078
2078
  try {
2079
- this.#e = new ks[e](t);
2079
+ this.#e = new Ps[e](t);
2080
2080
  } catch (i) {
2081
2081
  throw new Gt(i, this.constructor);
2082
2082
  }
@@ -2088,10 +2088,10 @@ var ne = class extends D {
2088
2088
  this.#e && (this.#e.close(), this.#e = void 0, this.emit("close"));
2089
2089
  }
2090
2090
  reset() {
2091
- if (!this.#t) return Mi(this.#e, "zlib binding closed"), this.#e.reset?.();
2091
+ if (!this.#t) return zi(this.#e, "zlib binding closed"), this.#e.reset?.();
2092
2092
  }
2093
2093
  flush(t) {
2094
- this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(gt.alloc(0), { [vi]: t })));
2094
+ this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(Ot.alloc(0), { [Pi]: t })));
2095
2095
  }
2096
2096
  end(t, e, i) {
2097
2097
  return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), t && (e ? this.write(t, e) : this.write(t)), this.flush(this.#n), this.#i = true, super.end(i);
@@ -2099,24 +2099,24 @@ var ne = class extends D {
2099
2099
  get ended() {
2100
2100
  return this.#i;
2101
2101
  }
2102
- [Ot](t) {
2102
+ [Tt](t) {
2103
2103
  return super.write(t);
2104
2104
  }
2105
2105
  write(t, e, i) {
2106
- if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = gt.from(t, e)), this.#t) return;
2107
- Mi(this.#e, "zlib binding closed");
2106
+ if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = Ot.from(t, e)), this.#t) return;
2107
+ zi(this.#e, "zlib binding closed");
2108
2108
  let r = this.#e._handle, n = r.close;
2109
2109
  r.close = () => {
2110
2110
  };
2111
2111
  let o = this.#e.close;
2112
2112
  this.#e.close = () => {
2113
- }, ki(true);
2113
+ }, Bi(true);
2114
2114
  let h;
2115
2115
  try {
2116
- let l = typeof t[vi] == "number" ? t[vi] : this.#s;
2117
- h = this.#e._processChunk(t, l), ki(false);
2116
+ let l = typeof t[Pi] == "number" ? t[Pi] : this.#s;
2117
+ h = this.#e._processChunk(t, l), Bi(false);
2118
2118
  } catch (l) {
2119
- ki(false), this.#o(new Gt(l, this.write));
2119
+ Bi(false), this.#o(new Gt(l, this.write));
2120
2120
  } finally {
2121
2121
  this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
2122
2122
  }
@@ -2124,13 +2124,13 @@ var ne = class extends D {
2124
2124
  let a;
2125
2125
  if (h) if (Array.isArray(h) && h.length > 0) {
2126
2126
  let l = h[0];
2127
- a = this[Ot](gt.from(l));
2128
- for (let c = 1; c < h.length; c++) a = this[Ot](h[c]);
2129
- } else a = this[Ot](gt.from(h));
2127
+ a = this[Tt](Ot.from(l));
2128
+ for (let c = 1; c < h.length; c++) a = this[Tt](h[c]);
2129
+ } else a = this[Tt](Ot.from(h));
2130
2130
  return i && i(), a;
2131
2131
  }
2132
2132
  };
2133
- var Be = class extends ne {
2133
+ var Pe = class extends re {
2134
2134
  #t;
2135
2135
  #i;
2136
2136
  constructor(t, e) {
@@ -2141,7 +2141,7 @@ var Be = class extends ne {
2141
2141
  if (!this.handle) throw new Error("cannot switch params when binding is closed");
2142
2142
  if (!this.handle.params) throw new Error("not supported in this implementation");
2143
2143
  if (this.#t !== t || this.#i !== e) {
2144
- this.flush(M.Z_SYNC_FLUSH), Mi(this.handle, "zlib binding closed");
2144
+ this.flush(M.Z_SYNC_FLUSH), zi(this.handle, "zlib binding closed");
2145
2145
  let i = this.handle.flush;
2146
2146
  this.handle.flush = (r, n) => {
2147
2147
  typeof r == "function" && (n = r, r = this.flushFlag), this.flush(r), n?.();
@@ -2156,96 +2156,98 @@ var Be = class extends ne {
2156
2156
  }
2157
2157
  }
2158
2158
  };
2159
- var Pe = class extends Be {
2159
+ var ze = class extends Pe {
2160
2160
  #t;
2161
2161
  constructor(t) {
2162
2162
  super(t, "Gzip"), this.#t = t && !!t.portable;
2163
2163
  }
2164
- [Ot](t) {
2165
- return this.#t ? (this.#t = false, t[9] = 255, super[Ot](t)) : super[Ot](t);
2164
+ [Tt](t) {
2165
+ return this.#t ? (this.#t = false, t[9] = 255, super[Tt](t)) : super[Tt](t);
2166
2166
  }
2167
2167
  };
2168
- var ze = class extends Be {
2168
+ var Ue = class extends Pe {
2169
2169
  constructor(t) {
2170
2170
  super(t, "Unzip");
2171
2171
  }
2172
2172
  };
2173
- var Ue = class extends ne {
2173
+ var He = class extends re {
2174
2174
  constructor(t, e) {
2175
2175
  t = t || {}, t.flush = t.flush || M.BROTLI_OPERATION_PROCESS, t.finishFlush = t.finishFlush || M.BROTLI_OPERATION_FINISH, t.fullFlushFlag = M.BROTLI_OPERATION_FLUSH, super(t, e);
2176
2176
  }
2177
2177
  };
2178
- var He = class extends Ue {
2178
+ var We = class extends He {
2179
2179
  constructor(t) {
2180
2180
  super(t, "BrotliCompress");
2181
2181
  }
2182
2182
  };
2183
- var We = class extends Ue {
2183
+ var Ge = class extends He {
2184
2184
  constructor(t) {
2185
2185
  super(t, "BrotliDecompress");
2186
2186
  }
2187
2187
  };
2188
- var Ge = class extends ne {
2188
+ var Ze = class extends re {
2189
2189
  constructor(t, e) {
2190
2190
  t = t || {}, t.flush = t.flush || M.ZSTD_e_continue, t.finishFlush = t.finishFlush || M.ZSTD_e_end, t.fullFlushFlag = M.ZSTD_e_flush, super(t, e);
2191
2191
  }
2192
2192
  };
2193
- var Ze = class extends Ge {
2193
+ var Ye = class extends Ze {
2194
2194
  constructor(t) {
2195
2195
  super(t, "ZstdCompress");
2196
2196
  }
2197
2197
  };
2198
- var Ye = class extends Ge {
2198
+ var Ke = class extends Ze {
2199
2199
  constructor(t) {
2200
2200
  super(t, "ZstdDecompress");
2201
2201
  }
2202
2202
  };
2203
- var Ms = (s3, t) => {
2204
- if (Number.isSafeInteger(s3)) s3 < 0 ? sn(s3, t) : en(s3, t);
2203
+ var Us = (s3, t) => {
2204
+ if (Number.isSafeInteger(s3)) s3 < 0 ? an(s3, t) : hn(s3, t);
2205
2205
  else throw Error("cannot encode number outside of javascript safe integer range");
2206
2206
  return t;
2207
2207
  };
2208
- var en = (s3, t) => {
2208
+ var hn = (s3, t) => {
2209
2209
  t[0] = 128;
2210
2210
  for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
2211
2211
  };
2212
- var sn = (s3, t) => {
2212
+ var an = (s3, t) => {
2213
2213
  t[0] = 255;
2214
2214
  var e = false;
2215
2215
  s3 = s3 * -1;
2216
2216
  for (var i = t.length; i > 1; i--) {
2217
2217
  var r = s3 & 255;
2218
- s3 = Math.floor(s3 / 256), e ? t[i - 1] = Ps(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = zs(r));
2218
+ s3 = Math.floor(s3 / 256), e ? t[i - 1] = Ws(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = Gs(r));
2219
2219
  }
2220
2220
  };
2221
- var Bs = (s3) => {
2222
- let t = s3[0], e = t === 128 ? nn(s3.subarray(1, s3.length)) : t === 255 ? rn(s3) : null;
2221
+ var Hs = (s3) => {
2222
+ let t = s3[0], e = t === 128 ? cn(s3.subarray(1, s3.length)) : t === 255 ? ln(s3) : null;
2223
2223
  if (e === null) throw Error("invalid base256 encoding");
2224
2224
  if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
2225
2225
  return e;
2226
2226
  };
2227
- var rn = (s3) => {
2227
+ var ln = (s3) => {
2228
2228
  for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
2229
2229
  var n = Number(s3[r]), o;
2230
- i ? o = Ps(n) : n === 0 ? o = n : (i = true, o = zs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
2230
+ i ? o = Ws(n) : n === 0 ? o = n : (i = true, o = Gs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
2231
2231
  }
2232
2232
  return e;
2233
2233
  };
2234
- var nn = (s3) => {
2234
+ var cn = (s3) => {
2235
2235
  for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
2236
2236
  var r = Number(s3[i]);
2237
2237
  r !== 0 && (e += r * Math.pow(256, t - i - 1));
2238
2238
  }
2239
2239
  return e;
2240
2240
  };
2241
- var Ps = (s3) => (255 ^ s3) & 255;
2242
- var zs = (s3) => (255 ^ s3) + 1 & 255;
2243
- var Bi = {};
2244
- vr(Bi, { code: () => Ke, isCode: () => oe, isName: () => hn, name: () => he });
2245
- var oe = (s3) => he.has(s3);
2246
- var hn = (s3) => Ke.has(s3);
2247
- var he = /* @__PURE__ */ new Map([["0", "File"], ["", "OldFile"], ["1", "Link"], ["2", "SymbolicLink"], ["3", "CharacterDevice"], ["4", "BlockDevice"], ["5", "Directory"], ["6", "FIFO"], ["7", "ContiguousFile"], ["g", "GlobalExtendedHeader"], ["x", "ExtendedHeader"], ["A", "SolarisACL"], ["D", "GNUDumpDir"], ["I", "Inode"], ["K", "NextFileHasLongLinkpath"], ["L", "NextFileHasLongPath"], ["M", "ContinuationFile"], ["N", "OldGnuLongPath"], ["S", "SparseFile"], ["V", "TapeVolumeHeader"], ["X", "OldExtendedHeader"]]);
2248
- var Ke = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
2241
+ var Ws = (s3) => (255 ^ s3) & 255;
2242
+ var Gs = (s3) => (255 ^ s3) + 1 & 255;
2243
+ var Hi = {};
2244
+ Ur(Hi, { code: () => Ve, isCode: () => ne, isName: () => dn, name: () => oe, normalFsTypes: () => Ui });
2245
+ var ne = (s3) => oe.has(s3);
2246
+ var dn = (s3) => Ve.has(s3);
2247
+ var Ui = /* @__PURE__ */ new Set(["0", "", "1", "2", "3", "4", "5", "6", "7", "D"]);
2248
+ var oe = /* @__PURE__ */ new Map([["0", "File"], ["", "OldFile"], ["1", "Link"], ["2", "SymbolicLink"], ["3", "CharacterDevice"], ["4", "BlockDevice"], ["5", "Directory"], ["6", "FIFO"], ["7", "ContiguousFile"], ["g", "GlobalExtendedHeader"], ["x", "ExtendedHeader"], ["A", "SolarisACL"], ["D", "GNUDumpDir"], ["I", "Inode"], ["K", "NextFileHasLongLinkpath"], ["L", "NextFileHasLongPath"], ["M", "ContinuationFile"], ["N", "OldGnuLongPath"], ["S", "SparseFile"], ["V", "TapeVolumeHeader"], ["X", "OldExtendedHeader"]]);
2249
+ var Ve = new Map(Array.from(oe).map((s3) => [s3[1], s3[0]]));
2250
+ var mn = (s3) => s3 === void 0 || s3 < 0 ? void 0 : s3;
2249
2251
  var F = class {
2250
2252
  cksumValid = false;
2251
2253
  needPax = false;
@@ -2273,46 +2275,45 @@ var F = class {
2273
2275
  }
2274
2276
  decode(t, e, i, r) {
2275
2277
  if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
2276
- this.path = i?.path ?? Tt(t, e, 100), this.mode = i?.mode ?? r?.mode ?? at(t, e + 100, 8), this.uid = i?.uid ?? r?.uid ?? at(t, e + 108, 8), this.gid = i?.gid ?? r?.gid ?? at(t, e + 116, 8), this.size = i?.size ?? r?.size ?? at(t, e + 124, 12), this.mtime = i?.mtime ?? r?.mtime ?? Pi(t, e + 136, 12), this.cksum = at(t, e + 148, 12), r && this.#i(r, true), i && this.#i(i);
2277
- let n = Tt(t, e + 156, 1);
2278
- if (oe(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = Tt(t, e + 157, 100), t.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = i?.uname ?? r?.uname ?? Tt(t, e + 265, 32), this.gname = i?.gname ?? r?.gname ?? Tt(t, e + 297, 32), this.devmaj = i?.devmaj ?? r?.devmaj ?? at(t, e + 329, 8) ?? 0, this.devmin = i?.devmin ?? r?.devmin ?? at(t, e + 337, 8) ?? 0, t[e + 475] !== 0) {
2279
- let h = Tt(t, e + 345, 155);
2280
- this.path = h + "/" + this.path;
2278
+ let n = xt(t, e + 156, 1), o = Ui.has(n), h = o ? i : void 0, a = o ? r : void 0;
2279
+ if (this.path = h?.path ?? xt(t, e, 100), this.mode = h?.mode ?? a?.mode ?? lt(t, e + 100, 8), this.uid = h?.uid ?? a?.uid ?? lt(t, e + 108, 8), this.gid = h?.gid ?? a?.gid ?? lt(t, e + 116, 8), this.size = mn(h?.size ?? a?.size ?? lt(t, e + 124, 12)), this.mtime = h?.mtime ?? a?.mtime ?? Wi(t, e + 136, 12), this.cksum = lt(t, e + 148, 12), a && this.#i(a, true), h && this.#i(h), ne(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = xt(t, e + 157, 100), t.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = h?.uname ?? a?.uname ?? xt(t, e + 265, 32), this.gname = h?.gname ?? a?.gname ?? xt(t, e + 297, 32), this.devmaj = h?.devmaj ?? a?.devmaj ?? lt(t, e + 329, 8) ?? 0, this.devmin = h?.devmin ?? a?.devmin ?? lt(t, e + 337, 8) ?? 0, t[e + 475] !== 0) {
2280
+ let c = xt(t, e + 345, 155);
2281
+ this.path = c + "/" + this.path;
2281
2282
  } else {
2282
- let h = Tt(t, e + 345, 130);
2283
- h && (this.path = h + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Pi(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Pi(t, e + 488, 12);
2283
+ let c = xt(t, e + 345, 130);
2284
+ c && (this.path = c + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Wi(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Wi(t, e + 488, 12);
2284
2285
  }
2285
- let o = 256;
2286
- for (let h = e; h < e + 148; h++) o += t[h];
2287
- for (let h = e + 156; h < e + 512; h++) o += t[h];
2288
- this.cksumValid = o === this.cksum, this.cksum === void 0 && o === 256 && (this.nullBlock = true);
2286
+ let l = 256;
2287
+ for (let c = e; c < e + 148; c++) l += t[c];
2288
+ for (let c = e + 156; c < e + 512; c++) l += t[c];
2289
+ this.cksumValid = l === this.cksum, this.cksum === void 0 && l === 256 && (this.nullBlock = true);
2289
2290
  }
2290
2291
  #i(t, e = false) {
2291
- Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "path" && e || i === "linkpath" && e || i === "global"))));
2292
+ Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "size" && Number(r) < 0 || i === "path" && e || i === "linkpath" && e || i === "global"))));
2292
2293
  }
2293
2294
  encode(t, e = 0) {
2294
2295
  if (t || (t = this.block = Buffer.alloc(512)), this.#t === "Unsupported" && (this.#t = "0"), !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
2295
- let i = this.ctime || this.atime ? 130 : 155, r = an(this.path || "", i), n = r[0], o = r[1];
2296
- this.needPax = !!r[2], this.needPax = xt(t, e, 100, n) || this.needPax, this.needPax = lt(t, e + 100, 8, this.mode) || this.needPax, this.needPax = lt(t, e + 108, 8, this.uid) || this.needPax, this.needPax = lt(t, e + 116, 8, this.gid) || this.needPax, this.needPax = lt(t, e + 124, 12, this.size) || this.needPax, this.needPax = zi(t, e + 136, 12, this.mtime) || this.needPax, t[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = xt(t, e + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e + 257, 8), this.needPax = xt(t, e + 265, 32, this.uname) || this.needPax, this.needPax = xt(t, e + 297, 32, this.gname) || this.needPax, this.needPax = lt(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = lt(t, e + 337, 8, this.devmin) || this.needPax, this.needPax = xt(t, e + 345, i, o) || this.needPax, t[e + 475] !== 0 ? this.needPax = xt(t, e + 345, 155, o) || this.needPax : (this.needPax = xt(t, e + 345, 130, o) || this.needPax, this.needPax = zi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = zi(t, e + 488, 12, this.ctime) || this.needPax);
2296
+ let i = this.ctime || this.atime ? 130 : 155, r = un(this.path || "", i), n = r[0], o = r[1];
2297
+ this.needPax = !!r[2], this.needPax = Lt(t, e, 100, n) || this.needPax, this.needPax = ct(t, e + 100, 8, this.mode) || this.needPax, this.needPax = ct(t, e + 108, 8, this.uid) || this.needPax, this.needPax = ct(t, e + 116, 8, this.gid) || this.needPax, this.needPax = ct(t, e + 124, 12, this.size) || this.needPax, this.needPax = Gi(t, e + 136, 12, this.mtime) || this.needPax, t[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = Lt(t, e + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e + 257, 8), this.needPax = Lt(t, e + 265, 32, this.uname) || this.needPax, this.needPax = Lt(t, e + 297, 32, this.gname) || this.needPax, this.needPax = ct(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = ct(t, e + 337, 8, this.devmin) || this.needPax, this.needPax = Lt(t, e + 345, i, o) || this.needPax, t[e + 475] !== 0 ? this.needPax = Lt(t, e + 345, 155, o) || this.needPax : (this.needPax = Lt(t, e + 345, 130, o) || this.needPax, this.needPax = Gi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = Gi(t, e + 488, 12, this.ctime) || this.needPax);
2297
2298
  let h = 256;
2298
2299
  for (let a = e; a < e + 148; a++) h += t[a];
2299
2300
  for (let a = e + 156; a < e + 512; a++) h += t[a];
2300
- return this.cksum = h, lt(t, e + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
2301
+ return this.cksum = h, ct(t, e + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
2301
2302
  }
2302
2303
  get type() {
2303
- return this.#t === "Unsupported" ? this.#t : he.get(this.#t);
2304
+ return this.#t === "Unsupported" ? this.#t : oe.get(this.#t);
2304
2305
  }
2305
2306
  get typeKey() {
2306
2307
  return this.#t;
2307
2308
  }
2308
2309
  set type(t) {
2309
- let e = String(Ke.get(t));
2310
- if (oe(e) || e === "Unsupported") this.#t = e;
2311
- else if (oe(t)) this.#t = t;
2310
+ let e = String(Ve.get(t));
2311
+ if (ne(e) || e === "Unsupported") this.#t = e;
2312
+ else if (ne(t)) this.#t = t;
2312
2313
  else throw new TypeError("invalid entry type: " + t);
2313
2314
  }
2314
2315
  };
2315
- var an = (s3, t) => {
2316
+ var un = (s3, t) => {
2316
2317
  let i = s3, r = "", n, o = Zt.parse(s3).root || ".";
2317
2318
  if (Buffer.byteLength(i) < 100) n = [i, r, false];
2318
2319
  else {
@@ -2324,21 +2325,21 @@ var an = (s3, t) => {
2324
2325
  }
2325
2326
  return n;
2326
2327
  };
2327
- var Tt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
2328
- var Pi = (s3, t, e) => ln(at(s3, t, e));
2329
- var ln = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
2330
- var at = (s3, t, e) => Number(s3[t]) & 128 ? Bs(s3.subarray(t, t + e)) : fn(s3, t, e);
2331
- var cn = (s3) => isNaN(s3) ? void 0 : s3;
2332
- var fn = (s3, t, e) => cn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
2333
- var dn = { 12: 8589934591, 8: 2097151 };
2334
- var lt = (s3, t, e, i) => i === void 0 ? false : i > dn[e] || i < 0 ? (Ms(i, s3.subarray(t, t + e)), true) : (un(s3, t, e, i), false);
2335
- var un = (s3, t, e, i) => s3.write(mn(i, e), t, e, "ascii");
2336
- var mn = (s3, t) => pn(Math.floor(s3).toString(8), t);
2337
- var pn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
2338
- var zi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
2339
- var En = new Array(156).join("\0");
2340
- var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + En, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
2341
- var ct = class s {
2328
+ var xt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
2329
+ var Wi = (s3, t, e) => pn(lt(s3, t, e));
2330
+ var pn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
2331
+ var lt = (s3, t, e) => Number(s3[t]) & 128 ? Hs(s3.subarray(t, t + e)) : wn(s3, t, e);
2332
+ var En = (s3) => isNaN(s3) ? void 0 : s3;
2333
+ var wn = (s3, t, e) => En(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
2334
+ var Sn = { 12: 8589934591, 8: 2097151 };
2335
+ var ct = (s3, t, e, i) => i === void 0 ? false : i > Sn[e] || i < 0 ? (Us(i, s3.subarray(t, t + e)), true) : (yn(s3, t, e, i), false);
2336
+ var yn = (s3, t, e, i) => s3.write(Rn(i, e), t, e, "ascii");
2337
+ var Rn = (s3, t) => gn(Math.floor(s3).toString(8), t);
2338
+ var gn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
2339
+ var Gi = (s3, t, e, i) => i === void 0 ? false : ct(s3, t, e, i.getTime() / 1e3);
2340
+ var bn = new Array(156).join("\0");
2341
+ var Lt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + bn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
2342
+ var ft = class s {
2342
2343
  atime;
2343
2344
  mtime;
2344
2345
  ctime;
@@ -2364,7 +2365,7 @@ var ct = class s {
2364
2365
  if (t === "") return Buffer.allocUnsafe(0);
2365
2366
  let e = Buffer.byteLength(t), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
2366
2367
  for (let n = 0; n < 512; n++) r[n] = 0;
2367
- new F({ path: ("PaxHeader/" + wn(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
2368
+ new F({ path: ("PaxHeader/" + _n(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
2368
2369
  for (let n = e + 512; n < r.length; n++) r[n] = 0;
2369
2370
  return r;
2370
2371
  }
@@ -2378,24 +2379,52 @@ var ct = class s {
2378
2379
  return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
2379
2380
  }
2380
2381
  static parse(t, e, i = false) {
2381
- return new s(Sn(yn(t), e), i);
2382
+ return new s(On(Tn(t), e), i);
2382
2383
  }
2383
2384
  };
2384
- var Sn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
2385
- var yn = (s3) => s3.replace(/\n$/, "").split(`
2386
- `).reduce(Rn, /* @__PURE__ */ Object.create(null));
2387
- var Rn = (s3, t) => {
2385
+ var On = (s3, t) => t ? Object.assign({}, t, s3) : s3;
2386
+ var Tn = (s3) => s3.replace(/\n$/, "").split(`
2387
+ `).reduce(xn, /* @__PURE__ */ Object.create(null));
2388
+ var xn = (s3, t) => {
2388
2389
  let e = parseInt(t, 10);
2389
2390
  if (e !== Buffer.byteLength(t) + 1) return s3;
2390
2391
  t = t.slice((e + " ").length);
2391
2392
  let i = t.split("="), r = i.shift();
2392
2393
  if (!r) return s3;
2393
- let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
2394
- return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
2394
+ let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=").replace(/\0.*/, "");
2395
+ switch (n) {
2396
+ case "path":
2397
+ case "linkpath":
2398
+ case "type":
2399
+ case "charset":
2400
+ case "comment":
2401
+ case "gname":
2402
+ case "uname":
2403
+ s3[n] = o;
2404
+ break;
2405
+ case "ctime":
2406
+ case "atime":
2407
+ case "mtime":
2408
+ s3[n] = new Date(Number(o) * 1e3);
2409
+ break;
2410
+ case "size":
2411
+ let h = +o;
2412
+ h >= 0 && (s3[n] = h);
2413
+ break;
2414
+ case "gid":
2415
+ case "uid":
2416
+ case "dev":
2417
+ case "ino":
2418
+ case "nlink":
2419
+ case "mode":
2420
+ s3[n] = +o;
2421
+ break;
2422
+ }
2423
+ return s3;
2395
2424
  };
2396
- var bn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
2397
- var f = bn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
2398
- var Yt = class extends D {
2425
+ var Ln = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
2426
+ var f = Ln !== "win32" ? (s3) => String(s3) : (s3) => String(s3).replaceAll(/\\/g, "/");
2427
+ var $e = class extends A {
2399
2428
  extended;
2400
2429
  globalExtended;
2401
2430
  header;
@@ -2459,93 +2488,100 @@ var Yt = class extends D {
2459
2488
  t.path && (t.path = f(t.path)), t.linkpath && (t.linkpath = f(t.linkpath)), Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "path" && e))));
2460
2489
  }
2461
2490
  };
2462
- var Lt = (s3, t, e, i = {}) => {
2491
+ var Dt = (s3, t, e, i = {}) => {
2463
2492
  s3.file && (i.file = s3.file), s3.cwd && (i.cwd = s3.cwd), i.code = e instanceof Error && e.code || t, i.tarCode = t, !s3.strict && i.recoverable !== false ? (e instanceof Error && (i = Object.assign(e, i), e = e.message), s3.emit("warn", t, e, i)) : e instanceof Error ? s3.emit("error", Object.assign(e, i)) : s3.emit("error", Object.assign(new Error(`${t}: ${e}`), i));
2464
2493
  };
2465
- var gn = 1024 * 1024;
2466
- var Zi = Buffer.from([31, 139]);
2467
- var Yi = Buffer.from([40, 181, 47, 253]);
2468
- var On = Math.max(Zi.length, Yi.length);
2494
+ var Nn = 1024 * 1024;
2495
+ var Xi = Buffer.from([31, 139]);
2496
+ var qi = Buffer.from([40, 181, 47, 253]);
2497
+ var An = Math.max(Xi.length, qi.length);
2469
2498
  var B = /* @__PURE__ */ Symbol("state");
2470
2499
  var Nt = /* @__PURE__ */ Symbol("writeEntry");
2471
- var et = /* @__PURE__ */ Symbol("readEntry");
2472
- var Ui = /* @__PURE__ */ Symbol("nextEntry");
2473
- var Us = /* @__PURE__ */ Symbol("processEntry");
2500
+ var it = /* @__PURE__ */ Symbol("readEntry");
2501
+ var Zi = /* @__PURE__ */ Symbol("nextEntry");
2502
+ var Zs = /* @__PURE__ */ Symbol("processEntry");
2474
2503
  var V = /* @__PURE__ */ Symbol("extendedHeader");
2475
- var ae = /* @__PURE__ */ Symbol("globalExtendedHeader");
2476
- var ft = /* @__PURE__ */ Symbol("meta");
2477
- var Hs = /* @__PURE__ */ Symbol("emitMeta");
2504
+ var he = /* @__PURE__ */ Symbol("globalExtendedHeader");
2505
+ var dt = /* @__PURE__ */ Symbol("meta");
2506
+ var Ys = /* @__PURE__ */ Symbol("emitMeta");
2478
2507
  var p = /* @__PURE__ */ Symbol("buffer");
2479
- var it = /* @__PURE__ */ Symbol("queue");
2480
- var dt = /* @__PURE__ */ Symbol("ended");
2481
- var Hi = /* @__PURE__ */ Symbol("emittedEnd");
2508
+ var st = /* @__PURE__ */ Symbol("queue");
2509
+ var mt = /* @__PURE__ */ Symbol("ended");
2510
+ var Yi = /* @__PURE__ */ Symbol("emittedEnd");
2482
2511
  var At = /* @__PURE__ */ Symbol("emit");
2483
- var y = /* @__PURE__ */ Symbol("unzip");
2484
- var Ve = /* @__PURE__ */ Symbol("consumeChunk");
2485
- var $e = /* @__PURE__ */ Symbol("consumeChunkSub");
2486
- var Wi = /* @__PURE__ */ Symbol("consumeBody");
2487
- var Ws = /* @__PURE__ */ Symbol("consumeMeta");
2488
- var Gs = /* @__PURE__ */ Symbol("consumeHeader");
2489
- var le = /* @__PURE__ */ Symbol("consuming");
2490
- var Gi = /* @__PURE__ */ Symbol("bufferConcat");
2491
- var Xe = /* @__PURE__ */ Symbol("maybeEnd");
2492
- var Kt = /* @__PURE__ */ Symbol("writing");
2493
- var ut = /* @__PURE__ */ Symbol("aborted");
2494
- var qe = /* @__PURE__ */ Symbol("onDone");
2495
- var Dt = /* @__PURE__ */ Symbol("sawValidEntry");
2512
+ var w = /* @__PURE__ */ Symbol("unzip");
2513
+ var Xe = /* @__PURE__ */ Symbol("consumeChunk");
2514
+ var qe = /* @__PURE__ */ Symbol("consumeChunkSub");
2515
+ var Ki = /* @__PURE__ */ Symbol("consumeBody");
2516
+ var Ks = /* @__PURE__ */ Symbol("consumeMeta");
2517
+ var Vs = /* @__PURE__ */ Symbol("consumeHeader");
2518
+ var ae = /* @__PURE__ */ Symbol("consuming");
2519
+ var Vi = /* @__PURE__ */ Symbol("bufferConcat");
2520
+ var Qe = /* @__PURE__ */ Symbol("maybeEnd");
2521
+ var Yt = /* @__PURE__ */ Symbol("writing");
2522
+ var $ = /* @__PURE__ */ Symbol("aborted");
2523
+ var Je = /* @__PURE__ */ Symbol("onDone");
2524
+ var It = /* @__PURE__ */ Symbol("sawValidEntry");
2496
2525
  var je = /* @__PURE__ */ Symbol("sawNullBlock");
2497
- var Qe = /* @__PURE__ */ Symbol("sawEOF");
2498
- var Zs = /* @__PURE__ */ Symbol("closeStream");
2499
- var Tn = () => true;
2500
- var st = class extends _n {
2526
+ var ti = /* @__PURE__ */ Symbol("sawEOF");
2527
+ var $s = /* @__PURE__ */ Symbol("closeStream");
2528
+ var In = 1e3;
2529
+ var le = /* @__PURE__ */ Symbol("compressedBytesRead");
2530
+ var $i = /* @__PURE__ */ Symbol("decompressedBytesRead");
2531
+ var Xs = /* @__PURE__ */ Symbol("checkDecompressionRatio");
2532
+ var Cn = () => true;
2533
+ var rt = class extends Dn {
2501
2534
  file;
2502
2535
  strict;
2503
2536
  maxMetaEntrySize;
2504
2537
  filter;
2505
2538
  brotli;
2506
2539
  zstd;
2540
+ maxDecompressionRatio;
2507
2541
  writable = true;
2508
2542
  readable = false;
2509
- [it] = [];
2543
+ [st] = [];
2510
2544
  [p];
2511
- [et];
2545
+ [it];
2512
2546
  [Nt];
2513
2547
  [B] = "begin";
2514
- [ft] = "";
2548
+ [dt] = "";
2515
2549
  [V];
2516
- [ae];
2517
- [dt] = false;
2518
- [y];
2519
- [ut] = false;
2520
- [Dt];
2550
+ [he];
2551
+ [mt] = false;
2552
+ [w];
2553
+ [$] = false;
2554
+ [It];
2521
2555
  [je] = false;
2522
- [Qe] = false;
2523
- [Kt] = false;
2524
- [le] = false;
2525
- [Hi] = false;
2556
+ [ti] = false;
2557
+ [Yt] = false;
2558
+ [ae] = false;
2559
+ [Yi] = false;
2560
+ [le] = 0;
2561
+ [$i] = 0;
2526
2562
  constructor(t = {}) {
2527
- super(), this.file = t.file || "", this.on(qe, () => {
2528
- (this[B] === "begin" || this[Dt] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
2529
- }), t.ondone ? this.on(qe, t.ondone) : this.on(qe, () => {
2563
+ super(), this.file = t.file || "", this.on(Je, () => {
2564
+ (this[B] === "begin" || this[It] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
2565
+ }), t.ondone ? this.on(Je, t.ondone) : this.on(Je, () => {
2530
2566
  this.emit("prefinish"), this.emit("finish"), this.emit("end");
2531
- }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || gn, this.filter = typeof t.filter == "function" ? t.filter : Tn;
2567
+ }), this.strict = !!t.strict, this.maxDecompressionRatio = typeof t.maxDecompressionRatio == "number" ? t.maxDecompressionRatio : In, this.maxMetaEntrySize = t.maxMetaEntrySize || Nn, this.filter = typeof t.filter == "function" ? t.filter : Cn;
2532
2568
  let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
2533
2569
  this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
2534
2570
  let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
2535
- this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[Zs]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
2571
+ this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[$s]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
2536
2572
  }
2537
2573
  warn(t, e, i = {}) {
2538
- Lt(this, t, e, i);
2574
+ Dt(this, t, e, i);
2539
2575
  }
2540
- [Gs](t, e) {
2541
- this[Dt] === void 0 && (this[Dt] = false);
2576
+ [Vs](t, e) {
2577
+ this[It] === void 0 && (this[It] = false);
2542
2578
  let i;
2543
2579
  try {
2544
- i = new F(t, e, this[V], this[ae]);
2580
+ i = new F(t, e, this[V], this[he]);
2545
2581
  } catch (r) {
2546
2582
  return this.warn("TAR_ENTRY_INVALID", r);
2547
2583
  }
2548
- if (i.nullBlock) this[je] ? (this[Qe] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[je] = true, this[At]("nullBlock"));
2584
+ if (i.nullBlock) this[je] ? (this[ti] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[je] = true, this[At]("nullBlock"));
2549
2585
  else if (this[je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
2550
2586
  else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
2551
2587
  else {
@@ -2553,69 +2589,69 @@ var st = class extends _n {
2553
2589
  if (/^(Symbolic)?Link$/.test(r) && !i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: i });
2554
2590
  else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
2555
2591
  else {
2556
- let n = this[Nt] = new Yt(i, this[V], this[ae]);
2557
- if (!this[Dt]) if (n.remain) {
2592
+ let n = this[Nt] = new $e(i, this[V], this[he]);
2593
+ if (!this[It]) if (n.remain) {
2558
2594
  let o = () => {
2559
- n.invalid || (this[Dt] = true);
2595
+ n.invalid || (this[It] = true);
2560
2596
  };
2561
2597
  n.on("end", o);
2562
- } else this[Dt] = true;
2563
- n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[ft] = "", n.on("data", (o) => this[ft] += o), this[B] = "meta") : (this[V] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[et] ? this[it].push(n) : (this[it].push(n), this[Ui]())));
2598
+ } else this[It] = true;
2599
+ n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[dt] = "", n.on("data", (o) => this[dt] += o), this[B] = "meta") : (this[V] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[it] ? this[st].push(n) : (this[st].push(n), this[Zi]())));
2564
2600
  }
2565
2601
  }
2566
2602
  }
2567
- [Zs]() {
2603
+ [$s]() {
2568
2604
  queueMicrotask(() => this.emit("close"));
2569
2605
  }
2570
- [Us](t) {
2606
+ [Zs](t) {
2571
2607
  let e = true;
2572
- if (!t) this[et] = void 0, e = false;
2608
+ if (!t) this[it] = void 0, e = false;
2573
2609
  else if (Array.isArray(t)) {
2574
2610
  let [i, ...r] = t;
2575
2611
  this.emit(i, ...r);
2576
- } else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Ui]()), e = false);
2612
+ } else this[it] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Zi]()), e = false);
2577
2613
  return e;
2578
2614
  }
2579
- [Ui]() {
2615
+ [Zi]() {
2580
2616
  do
2581
2617
  ;
2582
- while (this[Us](this[it].shift()));
2583
- if (this[it].length === 0) {
2584
- let t = this[et];
2585
- !t || t.flowing || t.size === t.remain ? this[Kt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
2618
+ while (this[Zs](this[st].shift()));
2619
+ if (this[st].length === 0) {
2620
+ let t = this[it];
2621
+ !t || t.flowing || t.size === t.remain ? this[Yt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
2586
2622
  }
2587
2623
  }
2588
- [Wi](t, e) {
2624
+ [Ki](t, e) {
2589
2625
  let i = this[Nt];
2590
2626
  if (!i) throw new Error("attempt to consume body without entry??");
2591
2627
  let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
2592
2628
  return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
2593
2629
  }
2594
- [Ws](t, e) {
2595
- let i = this[Nt], r = this[Wi](t, e);
2596
- return !this[Nt] && i && this[Hs](i), r;
2630
+ [Ks](t, e) {
2631
+ let i = this[Nt], r = this[Ki](t, e);
2632
+ return !this[Nt] && i && this[Ys](i), r;
2597
2633
  }
2598
2634
  [At](t, e, i) {
2599
- this[it].length === 0 && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
2635
+ this[st].length === 0 && !this[it] ? this.emit(t, e, i) : this[st].push([t, e, i]);
2600
2636
  }
2601
- [Hs](t) {
2602
- switch (this[At]("meta", this[ft]), t.type) {
2637
+ [Ys](t) {
2638
+ switch (this[At]("meta", this[dt]), t.type) {
2603
2639
  case "ExtendedHeader":
2604
2640
  case "OldExtendedHeader":
2605
- this[V] = ct.parse(this[ft], this[V], false);
2641
+ this[V] = ft.parse(this[dt], this[V], false);
2606
2642
  break;
2607
2643
  case "GlobalExtendedHeader":
2608
- this[ae] = ct.parse(this[ft], this[ae], true);
2644
+ this[he] = ft.parse(this[dt], this[he], true);
2609
2645
  break;
2610
2646
  case "NextFileHasLongPath":
2611
2647
  case "OldGnuLongPath": {
2612
2648
  let e = this[V] ?? /* @__PURE__ */ Object.create(null);
2613
- this[V] = e, e.path = this[ft].replace(/\0.*/, "");
2649
+ this[V] = e, e.path = this[dt].replace(/\0.*/, "");
2614
2650
  break;
2615
2651
  }
2616
2652
  case "NextFileHasLongLinkpath": {
2617
2653
  let e = this[V] || /* @__PURE__ */ Object.create(null);
2618
- this[V] = e, e.linkpath = this[ft].replace(/\0.*/, "");
2654
+ this[V] = e, e.linkpath = this[dt].replace(/\0.*/, "");
2619
2655
  break;
2620
2656
  }
2621
2657
  default:
@@ -2623,86 +2659,101 @@ var st = class extends _n {
2623
2659
  }
2624
2660
  }
2625
2661
  abort(t) {
2626
- this[ut] = true, this.emit("abort", t), this.warn("TAR_ABORT", t, { recoverable: false });
2662
+ if (!this[$]) {
2663
+ if (this[w]) {
2664
+ let e = this[w];
2665
+ e.write = () => true, e.end = () => e, e.emit = () => false, e.destroy?.();
2666
+ }
2667
+ this[$] = true, this.emit("abort", t), this.warn("TAR_ABORT", t, { recoverable: false });
2668
+ }
2669
+ }
2670
+ [Xs](t) {
2671
+ this[$i] += t.length;
2672
+ let e = this[$i] / this[le];
2673
+ return e > this.maxDecompressionRatio ? (this.abort(new Error(`max decompression ratio exceeded: ${e.toFixed(2)} > ${this.maxDecompressionRatio}`)), false) : true;
2627
2674
  }
2628
2675
  write(t, e, i) {
2629
- if (typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8")), this[ut]) return i?.(), false;
2630
- if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
2631
- if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < On) return this[p] = t, i?.(), true;
2632
- for (let a = 0; this[y] === void 0 && a < Zi.length; a++) t[a] !== Zi[a] && (this[y] = false);
2676
+ if (typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8")), this[$]) return i?.(), false;
2677
+ if ((this[w] === void 0 || this.brotli === void 0 && this[w] === false) && t) {
2678
+ if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < An) return this[p] = t, i?.(), true;
2679
+ for (let a = 0; this[w] === void 0 && a < Xi.length; a++) t[a] !== Xi[a] && (this[w] = false);
2633
2680
  let o = false;
2634
- if (this[y] === false && this.zstd !== false) {
2681
+ if (this[w] === false && this.zstd !== false) {
2635
2682
  o = true;
2636
- for (let a = 0; a < Yi.length; a++) if (t[a] !== Yi[a]) {
2683
+ for (let a = 0; a < qi.length; a++) if (t[a] !== qi[a]) {
2637
2684
  o = false;
2638
2685
  break;
2639
2686
  }
2640
2687
  }
2641
2688
  let h = this.brotli === void 0 && !o;
2642
- if (this[y] === false && h) if (t.length < 512) if (this[dt]) this.brotli = true;
2689
+ if (this[w] === false && h) if (t.length < 512) if (this[mt]) this.brotli = true;
2643
2690
  else return this[p] = t, i?.(), true;
2644
2691
  else try {
2645
2692
  new F(t.subarray(0, 512)), this.brotli = false;
2646
2693
  } catch {
2647
2694
  this.brotli = true;
2648
2695
  }
2649
- if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
2650
- let a = this[dt];
2651
- this[dt] = false, this[y] = this[y] === void 0 ? new ze({}) : o ? new Ye({}) : new We({}), this[y].on("data", (c) => this[Ve](c)), this[y].on("error", (c) => this.abort(c)), this[y].on("end", () => {
2652
- this[dt] = true, this[Ve]();
2653
- }), this[Kt] = true;
2654
- let l = !!this[y][a ? "end" : "write"](t);
2655
- return this[Kt] = false, i?.(), l;
2696
+ if (this[w] === void 0 || this[w] === false && (this.brotli || o)) {
2697
+ let a = this[mt];
2698
+ this[mt] = false, this[w] = this[w] === void 0 ? new Ue({}) : o ? new Ke({}) : new Ge({}), this[w].on("data", (c) => {
2699
+ this[Xs](c) && this[Xe](c);
2700
+ }), this[w].on("error", (c) => {
2701
+ this[$] || this.abort(c);
2702
+ }), this[w].on("end", () => {
2703
+ this[mt] = true, this[Xe]();
2704
+ }), this[Yt] = true, this[le] += t.length;
2705
+ let l = !!this[w][a ? "end" : "write"](t);
2706
+ return this[Yt] = false, i?.(), l;
2656
2707
  }
2657
2708
  }
2658
- this[Kt] = true, this[y] ? this[y].write(t) : this[Ve](t), this[Kt] = false;
2659
- let n = this[it].length > 0 ? false : this[et] ? this[et].flowing : true;
2660
- return !n && this[it].length === 0 && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
2709
+ this[Yt] = true, this[w] ? (this[le] += t.length, this[w].write(t)) : this[Xe](t), this[Yt] = false;
2710
+ let n = this[st].length > 0 ? false : this[it] ? this[it].flowing : true;
2711
+ return !n && this[st].length === 0 && this[it]?.once("drain", () => this.emit("drain")), i?.(), n;
2661
2712
  }
2662
- [Gi](t) {
2663
- t && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
2713
+ [Vi](t) {
2714
+ t && !this[$] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
2664
2715
  }
2665
- [Xe]() {
2666
- if (this[dt] && !this[Hi] && !this[ut] && !this[le]) {
2667
- this[Hi] = true;
2716
+ [Qe]() {
2717
+ if (this[mt] && !this[Yi] && !this[$] && !this[ae]) {
2718
+ this[Yi] = true;
2668
2719
  let t = this[Nt];
2669
- if (t && t.blockRemain) {
2720
+ if (t?.blockRemain) {
2670
2721
  let e = this[p] ? this[p].length : 0;
2671
2722
  this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t.blockRemain} more bytes, only ${e} available)`, { entry: t }), this[p] && t.write(this[p]), t.end();
2672
2723
  }
2673
- this[At](qe);
2724
+ this[At](Je);
2674
2725
  }
2675
2726
  }
2676
- [Ve](t) {
2677
- if (this[le] && t) this[Gi](t);
2678
- else if (!t && !this[p]) this[Xe]();
2727
+ [Xe](t) {
2728
+ if (this[ae] && t) this[Vi](t);
2729
+ else if (!t && !this[p]) this[Qe]();
2679
2730
  else if (t) {
2680
- if (this[le] = true, this[p]) {
2681
- this[Gi](t);
2731
+ if (this[ae] = true, this[p]) {
2732
+ this[Vi](t);
2682
2733
  let e = this[p];
2683
- this[p] = void 0, this[$e](e);
2684
- } else this[$e](t);
2685
- for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[Qe]; ) {
2734
+ this[p] = void 0, this[qe](e);
2735
+ } else this[qe](t);
2736
+ for (; this[p] && this[p]?.length >= 512 && !this[$] && !this[ti]; ) {
2686
2737
  let e = this[p];
2687
- this[p] = void 0, this[$e](e);
2738
+ this[p] = void 0, this[qe](e);
2688
2739
  }
2689
- this[le] = false;
2740
+ this[ae] = false;
2690
2741
  }
2691
- (!this[p] || this[dt]) && this[Xe]();
2742
+ (!this[p] || this[mt]) && this[Qe]();
2692
2743
  }
2693
- [$e](t) {
2744
+ [qe](t) {
2694
2745
  let e = 0, i = t.length;
2695
- for (; e + 512 <= i && !this[ut] && !this[Qe]; ) switch (this[B]) {
2746
+ for (; e + 512 <= i && !this[$] && !this[ti]; ) switch (this[B]) {
2696
2747
  case "begin":
2697
2748
  case "header":
2698
- this[Gs](t, e), e += 512;
2749
+ this[Vs](t, e), e += 512;
2699
2750
  break;
2700
2751
  case "ignore":
2701
2752
  case "body":
2702
- e += this[Wi](t, e);
2753
+ e += this[Ki](t, e);
2703
2754
  break;
2704
2755
  case "meta":
2705
- e += this[Ws](t, e);
2756
+ e += this[Ks](t, e);
2706
2757
  break;
2707
2758
  default:
2708
2759
  throw new Error("invalid state: " + this[B]);
@@ -2710,44 +2761,44 @@ var st = class extends _n {
2710
2761
  e < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e), this[p]]) : t.subarray(e));
2711
2762
  }
2712
2763
  end(t, e, i) {
2713
- return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[ut] || (this[y] ? (t && this[y].write(t), this[y].end()) : (this[dt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[Xe]())), this;
2764
+ return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[$] || (this[w] ? (t && (this[le] += t.length, this[w].write(t)), this[w].end()) : (this[mt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[Qe]())), this;
2714
2765
  }
2715
2766
  };
2716
- var mt = (s3) => {
2767
+ var ut = (s3) => {
2717
2768
  let t = s3.length - 1, e = -1;
2718
2769
  for (; t > -1 && s3.charAt(t) === "/"; ) e = t, t--;
2719
2770
  return e === -1 ? s3 : s3.slice(0, e);
2720
2771
  };
2721
- var Nn = (s3) => {
2772
+ var vn = (s3) => {
2722
2773
  let t = s3.onReadEntry;
2723
2774
  s3.onReadEntry = t ? (e) => {
2724
2775
  t(e), e.resume();
2725
2776
  } : (e) => e.resume();
2726
2777
  };
2727
- var Ki = (s3, t) => {
2728
- let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
2729
- let h = o || Ln(n).root || ".", a;
2778
+ var Qi = (s3, t) => {
2779
+ let e = new Map(t.map((n) => [ut(n), true])), i = s3.filter, r = (n, o = "") => {
2780
+ let h = o || kn(n).root || ".", a;
2730
2781
  if (n === h) a = false;
2731
2782
  else {
2732
2783
  let l = e.get(n);
2733
- a = l !== void 0 ? l : r(xn(n), h);
2784
+ a = l !== void 0 ? l : r(Fn(n), h);
2734
2785
  }
2735
2786
  return e.set(n, a), a;
2736
2787
  };
2737
- s3.filter = i ? (n, o) => i(n, o) && r(mt(n)) : (n) => r(mt(n));
2788
+ s3.filter = i ? (n, o) => i(n, o) && r(ut(n)) : (n) => r(ut(n));
2738
2789
  };
2739
- var An = (s3) => {
2740
- let t = new st(s3), e = s3.file, i;
2790
+ var Mn = (s3) => {
2791
+ let t = new rt(s3), e = s3.file, i;
2741
2792
  try {
2742
- i = Vt.openSync(e, "r");
2743
- let r = Vt.fstatSync(i), n = s3.maxReadSize || 16 * 1024 * 1024;
2793
+ i = Kt.openSync(e, "r");
2794
+ let r = Kt.fstatSync(i), n = s3.maxReadSize || 16 * 1024 * 1024;
2744
2795
  if (r.size < n) {
2745
- let o = Buffer.allocUnsafe(r.size), h = Vt.readSync(i, o, 0, r.size, 0);
2796
+ let o = Buffer.allocUnsafe(r.size), h = Kt.readSync(i, o, 0, r.size, 0);
2746
2797
  t.end(h === o.byteLength ? o : o.subarray(0, h));
2747
2798
  } else {
2748
2799
  let o = 0, h = Buffer.allocUnsafe(n);
2749
2800
  for (; o < r.size; ) {
2750
- let a = Vt.readSync(i, h, 0, n, o);
2801
+ let a = Kt.readSync(i, h, 0, n, o);
2751
2802
  if (a === 0) break;
2752
2803
  o += a, t.write(h.subarray(0, a));
2753
2804
  }
@@ -2755,15 +2806,15 @@ var An = (s3) => {
2755
2806
  }
2756
2807
  } finally {
2757
2808
  if (typeof i == "number") try {
2758
- Vt.closeSync(i);
2809
+ Kt.closeSync(i);
2759
2810
  } catch {
2760
2811
  }
2761
2812
  }
2762
2813
  };
2763
- var Dn = (s3, t) => {
2764
- let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
2814
+ var Bn = (s3, t) => {
2815
+ let e = new rt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
2765
2816
  return new Promise((o, h) => {
2766
- e.on("error", h), e.on("end", o), Vt.stat(r, (a, l) => {
2817
+ e.on("error", h), e.on("end", o), Kt.stat(r, (a, l) => {
2767
2818
  if (a) h(a);
2768
2819
  else {
2769
2820
  let c = new _t(r, { readSize: i, size: l.size });
@@ -2772,46 +2823,46 @@ var Dn = (s3, t) => {
2772
2823
  });
2773
2824
  });
2774
2825
  };
2775
- var It = K(An, Dn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
2776
- t?.length && Ki(s3, t), s3.noResume || Nn(s3);
2826
+ var Ct = K(Mn, Bn, (s3) => new rt(s3), (s3) => new rt(s3), (s3, t) => {
2827
+ t?.length && Qi(s3, t), s3.noResume || vn(s3);
2777
2828
  });
2778
- var Vi = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
2779
- var { isAbsolute: Cn, parse: Ys } = In;
2829
+ var Ji = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
2830
+ var { isAbsolute: zn, parse: qs } = Pn;
2780
2831
  var ce = (s3) => {
2781
- let t = "", e = Ys(s3);
2782
- for (; Cn(s3) || e.root; ) {
2832
+ let t = "", e = qs(s3);
2833
+ for (; zn(s3) || e.root; ) {
2783
2834
  let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
2784
- s3 = s3.slice(i.length), t += i, e = Ys(s3);
2835
+ s3 = s3.slice(i.length), t += i, e = qs(s3);
2785
2836
  }
2786
2837
  return [t, s3];
2787
2838
  };
2788
- var Je = ["|", "<", ">", "?", ":"];
2789
- var $i = Je.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
2790
- var Fn = new Map(Je.map((s3, t) => [s3, $i[t]]));
2791
- var kn = new Map($i.map((s3, t) => [s3, Je[t]]));
2792
- var Xi = (s3) => Je.reduce((t, e) => t.split(e).join(Fn.get(e)), s3);
2793
- var Ks = (s3) => $i.reduce((t, e) => t.split(e).join(kn.get(e)), s3);
2794
- var Js = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
2795
- var vn = 16 * 1024 * 1024;
2796
- var Xs = /* @__PURE__ */ Symbol("process");
2797
- var qs = /* @__PURE__ */ Symbol("file");
2798
- var js = /* @__PURE__ */ Symbol("directory");
2799
- var ji = /* @__PURE__ */ Symbol("symlink");
2800
- var Qs = /* @__PURE__ */ Symbol("hardlink");
2839
+ var ei = ["|", "<", ">", "?", ":"];
2840
+ var ji = ei.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
2841
+ var Un = new Map(ei.map((s3, t) => [s3, ji[t]]));
2842
+ var Hn = new Map(ji.map((s3, t) => [s3, ei[t]]));
2843
+ var ts = (s3) => ei.reduce((t, e) => t.split(e).join(Un.get(e)), s3);
2844
+ var Qs = (s3) => ji.reduce((t, e) => t.split(e).join(Hn.get(e)), s3);
2845
+ var rr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), ut(t) + "/" + s3) : f(s3);
2846
+ var Wn = 16 * 1024 * 1024;
2847
+ var tr = /* @__PURE__ */ Symbol("process");
2848
+ var er = /* @__PURE__ */ Symbol("file");
2849
+ var ir = /* @__PURE__ */ Symbol("directory");
2850
+ var is = /* @__PURE__ */ Symbol("symlink");
2851
+ var sr = /* @__PURE__ */ Symbol("hardlink");
2801
2852
  var fe = /* @__PURE__ */ Symbol("header");
2802
- var ti = /* @__PURE__ */ Symbol("read");
2803
- var Qi = /* @__PURE__ */ Symbol("lstat");
2804
- var ei = /* @__PURE__ */ Symbol("onlstat");
2805
- var Ji = /* @__PURE__ */ Symbol("onread");
2806
- var ts = /* @__PURE__ */ Symbol("onreadlink");
2807
- var es = /* @__PURE__ */ Symbol("openfile");
2808
- var is = /* @__PURE__ */ Symbol("onopenfile");
2853
+ var ii = /* @__PURE__ */ Symbol("read");
2854
+ var ss = /* @__PURE__ */ Symbol("lstat");
2855
+ var si = /* @__PURE__ */ Symbol("onlstat");
2856
+ var rs = /* @__PURE__ */ Symbol("onread");
2857
+ var ns = /* @__PURE__ */ Symbol("onreadlink");
2858
+ var os = /* @__PURE__ */ Symbol("openfile");
2859
+ var hs = /* @__PURE__ */ Symbol("onopenfile");
2809
2860
  var pt = /* @__PURE__ */ Symbol("close");
2810
- var ii = /* @__PURE__ */ Symbol("mode");
2811
- var ss = /* @__PURE__ */ Symbol("awaitDrain");
2812
- var qi = /* @__PURE__ */ Symbol("ondrain");
2813
- var X = /* @__PURE__ */ Symbol("prefix");
2814
- var de = class extends D {
2861
+ var ri = /* @__PURE__ */ Symbol("mode");
2862
+ var as = /* @__PURE__ */ Symbol("awaitDrain");
2863
+ var es = /* @__PURE__ */ Symbol("ondrain");
2864
+ var q = /* @__PURE__ */ Symbol("prefix");
2865
+ var de = class extends A {
2815
2866
  path;
2816
2867
  portable;
2817
2868
  myuid = process.getuid && process.getuid() || 0;
@@ -2843,110 +2894,110 @@ var de = class extends D {
2843
2894
  onWriteEntry;
2844
2895
  #t = false;
2845
2896
  constructor(t, e = {}) {
2846
- let i = re(e);
2847
- super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || vn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
2897
+ let i = se(e);
2898
+ super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || Wn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
2848
2899
  let r = false;
2849
2900
  if (!this.preservePaths) {
2850
2901
  let [o, h] = ce(this.path);
2851
2902
  o && typeof h == "string" && (this.path = h, r = o);
2852
2903
  }
2853
- this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Ks(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || $s.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
2904
+ this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Qs(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || js.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
2854
2905
  let n = this.statCache.get(this.absolute);
2855
- n ? this[ei](n) : this[Qi]();
2906
+ n ? this[si](n) : this[ss]();
2856
2907
  }
2857
2908
  warn(t, e, i = {}) {
2858
- return Lt(this, t, e, i);
2909
+ return Dt(this, t, e, i);
2859
2910
  }
2860
2911
  emit(t, ...e) {
2861
2912
  return t === "error" && (this.#t = true), super.emit(t, ...e);
2862
2913
  }
2863
- [Qi]() {
2864
- $.lstat(this.absolute, (t, e) => {
2914
+ [ss]() {
2915
+ X.lstat(this.absolute, (t, e) => {
2865
2916
  if (t) return this.emit("error", t);
2866
- this[ei](e);
2917
+ this[si](e);
2867
2918
  });
2868
2919
  }
2869
- [ei](t) {
2870
- this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Mn(t), this.emit("stat", t), this[Xs]();
2920
+ [si](t) {
2921
+ this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Gn(t), this.emit("stat", t), this[tr]();
2871
2922
  }
2872
- [Xs]() {
2923
+ [tr]() {
2873
2924
  switch (this.type) {
2874
2925
  case "File":
2875
- return this[qs]();
2926
+ return this[er]();
2876
2927
  case "Directory":
2877
- return this[js]();
2928
+ return this[ir]();
2878
2929
  case "SymbolicLink":
2879
- return this[ji]();
2930
+ return this[is]();
2880
2931
  default:
2881
2932
  return this.end();
2882
2933
  }
2883
2934
  }
2884
- [ii](t) {
2885
- return Vi(t, this.type === "Directory", this.portable);
2935
+ [ri](t) {
2936
+ return Ji(t, this.type === "Directory", this.portable);
2886
2937
  }
2887
- [X](t) {
2888
- return Js(t, this.prefix);
2938
+ [q](t) {
2939
+ return rr(t, this.prefix);
2889
2940
  }
2890
2941
  [fe]() {
2891
2942
  if (!this.stat) throw new Error("cannot write header before stat");
2892
- this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this[ii](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? void 0 : this.header.uid, uname: this.portable ? void 0 : this.header.uname, dev: this.portable ? void 0 : this.stat.dev, ino: this.portable ? void 0 : this.stat.ino, nlink: this.portable ? void 0 : this.stat.nlink }).encode());
2943
+ this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](this.linkpath) : this.linkpath, mode: this[ri](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ft({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? void 0 : this.header.uid, uname: this.portable ? void 0 : this.header.uname, dev: this.portable ? void 0 : this.stat.dev, ino: this.portable ? void 0 : this.stat.ino, nlink: this.portable ? void 0 : this.stat.nlink }).encode());
2893
2944
  let t = this.header?.block;
2894
2945
  if (!t) throw new Error("failed to encode header");
2895
2946
  super.write(t);
2896
2947
  }
2897
- [js]() {
2948
+ [ir]() {
2898
2949
  if (!this.stat) throw new Error("cannot create directory entry without stat");
2899
2950
  this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
2900
2951
  }
2901
- [ji]() {
2902
- $.readlink(this.absolute, (t, e) => {
2952
+ [is]() {
2953
+ X.readlink(this.absolute, (t, e) => {
2903
2954
  if (t) return this.emit("error", t);
2904
- this[ts](e);
2955
+ this[ns](e);
2905
2956
  });
2906
2957
  }
2907
- [ts](t) {
2958
+ [ns](t) {
2908
2959
  this.linkpath = f(t), this[fe](), this.end();
2909
2960
  }
2910
- [Qs](t) {
2961
+ [sr](t) {
2911
2962
  if (!this.stat) throw new Error("cannot create link entry without stat");
2912
- this.type = "Link", this.linkpath = f($s.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
2963
+ this.type = "Link", this.linkpath = f(js.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
2913
2964
  }
2914
- [qs]() {
2965
+ [er]() {
2915
2966
  if (!this.stat) throw new Error("cannot create file entry without stat");
2916
2967
  if (this.stat.nlink > 1) {
2917
2968
  let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
2918
- if (e?.indexOf(this.cwd) === 0) return this[Qs](e);
2969
+ if (e?.indexOf(this.cwd) === 0) return this[sr](e);
2919
2970
  this.linkCache.set(t, this.absolute);
2920
2971
  }
2921
2972
  if (this[fe](), this.stat.size === 0) return this.end();
2922
- this[es]();
2973
+ this[os]();
2923
2974
  }
2924
- [es]() {
2925
- $.open(this.absolute, "r", (t, e) => {
2975
+ [os]() {
2976
+ X.open(this.absolute, "r", (t, e) => {
2926
2977
  if (t) return this.emit("error", t);
2927
- this[is](e);
2978
+ this[hs](e);
2928
2979
  });
2929
2980
  }
2930
- [is](t) {
2981
+ [hs](t) {
2931
2982
  if (this.fd = t, this.#t) return this[pt]();
2932
2983
  if (!this.stat) throw new Error("should stat before calling onopenfile");
2933
2984
  this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
2934
2985
  let e = Math.min(this.blockLen, this.maxReadSize);
2935
- this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ti]();
2986
+ this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ii]();
2936
2987
  }
2937
- [ti]() {
2988
+ [ii]() {
2938
2989
  let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
2939
2990
  if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
2940
- $.read(t, e, i, r, n, (o, h) => {
2991
+ X.read(t, e, i, r, n, (o, h) => {
2941
2992
  if (o) return this[pt](() => this.emit("error", o));
2942
- this[Ji](h);
2993
+ this[rs](h);
2943
2994
  });
2944
2995
  }
2945
2996
  [pt](t = () => {
2946
2997
  }) {
2947
- this.fd !== void 0 && $.close(this.fd, t);
2998
+ this.fd !== void 0 && X.close(this.fd, t);
2948
2999
  }
2949
- [Ji](t) {
3000
+ [rs](t) {
2950
3001
  if (t <= 0 && this.remain > 0) {
2951
3002
  let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
2952
3003
  return this[pt](() => this.emit("error", r));
@@ -2958,9 +3009,9 @@ var de = class extends D {
2958
3009
  if (!this.buf) throw new Error("should have created buffer prior to reading");
2959
3010
  if (t === this.remain) for (let r = t; r < this.length && t < this.blockRemain; r++) this.buf[r + this.offset] = 0, t++, this.remain++;
2960
3011
  let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
2961
- this.write(e) ? this[qi]() : this[ss](() => this[qi]());
3012
+ this.write(e) ? this[es]() : this[as](() => this[es]());
2962
3013
  }
2963
- [ss](t) {
3014
+ [as](t) {
2964
3015
  this.once("drain", t);
2965
3016
  }
2966
3017
  write(t, e, i) {
@@ -2970,30 +3021,30 @@ var de = class extends D {
2970
3021
  }
2971
3022
  return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
2972
3023
  }
2973
- [qi]() {
3024
+ [es]() {
2974
3025
  if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
2975
3026
  if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
2976
- this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[ti]();
3027
+ this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[ii]();
2977
3028
  }
2978
3029
  };
2979
- var si = class extends de {
3030
+ var ni = class extends de {
2980
3031
  sync = true;
2981
- [Qi]() {
2982
- this[ei]($.lstatSync(this.absolute));
3032
+ [ss]() {
3033
+ this[si](X.lstatSync(this.absolute));
2983
3034
  }
2984
- [ji]() {
2985
- this[ts]($.readlinkSync(this.absolute));
3035
+ [is]() {
3036
+ this[ns](X.readlinkSync(this.absolute));
2986
3037
  }
2987
- [es]() {
2988
- this[is]($.openSync(this.absolute, "r"));
3038
+ [os]() {
3039
+ this[hs](X.openSync(this.absolute, "r"));
2989
3040
  }
2990
- [ti]() {
3041
+ [ii]() {
2991
3042
  let t = true;
2992
3043
  try {
2993
3044
  let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
2994
3045
  if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
2995
- let h = $.readSync(e, i, r, n, o);
2996
- this[Ji](h), t = false;
3046
+ let h = X.readSync(e, i, r, n, o);
3047
+ this[rs](h), t = false;
2997
3048
  } finally {
2998
3049
  if (t) try {
2999
3050
  this[pt](() => {
@@ -3002,15 +3053,15 @@ var si = class extends de {
3002
3053
  }
3003
3054
  }
3004
3055
  }
3005
- [ss](t) {
3056
+ [as](t) {
3006
3057
  t();
3007
3058
  }
3008
3059
  [pt](t = () => {
3009
3060
  }) {
3010
- this.fd !== void 0 && $.closeSync(this.fd), t();
3061
+ this.fd !== void 0 && X.closeSync(this.fd), t();
3011
3062
  }
3012
3063
  };
3013
- var ri = class extends D {
3064
+ var oi = class extends A {
3014
3065
  blockLen = 0;
3015
3066
  blockRemain = 0;
3016
3067
  buf = 0;
@@ -3039,29 +3090,29 @@ var ri = class extends D {
3039
3090
  size;
3040
3091
  onWriteEntry;
3041
3092
  warn(t, e, i = {}) {
3042
- return Lt(this, t, e, i);
3093
+ return Dt(this, t, e, i);
3043
3094
  }
3044
3095
  constructor(t, e = {}) {
3045
- let i = re(e);
3096
+ let i = se(e);
3046
3097
  super(), this.preservePaths = !!i.preservePaths, this.portable = !!i.portable, this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.onWriteEntry = i.onWriteEntry, this.readEntry = t;
3047
3098
  let { type: r } = t;
3048
3099
  if (r === "Unsupported") throw new Error("writing entry that should be ignored");
3049
- this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t.path), this.mode = t.mode !== void 0 ? this[ii](t.mode) : void 0, this.uid = this.portable ? void 0 : t.uid, this.gid = this.portable ? void 0 : t.gid, this.uname = this.portable ? void 0 : t.uname, this.gname = this.portable ? void 0 : t.gname, this.size = t.size, this.mtime = this.noMtime ? void 0 : i.mtime || t.mtime, this.atime = this.portable ? void 0 : t.atime, this.ctime = this.portable ? void 0 : t.ctime, this.linkpath = t.linkpath !== void 0 ? f(t.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
3100
+ this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t.path), this.mode = t.mode !== void 0 ? this[ri](t.mode) : void 0, this.uid = this.portable ? void 0 : t.uid, this.gid = this.portable ? void 0 : t.gid, this.uname = this.portable ? void 0 : t.uname, this.gname = this.portable ? void 0 : t.gname, this.size = t.size, this.mtime = this.noMtime ? void 0 : i.mtime || t.mtime, this.atime = this.portable ? void 0 : t.atime, this.ctime = this.portable ? void 0 : t.ctime, this.linkpath = t.linkpath !== void 0 ? f(t.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
3050
3101
  let n = false;
3051
3102
  if (!this.preservePaths) {
3052
3103
  let [h, a] = ce(this.path);
3053
3104
  h && typeof a == "string" && (this.path = a, n = h);
3054
3105
  }
3055
- this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new F({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this.mode, uid: this.portable ? void 0 : this.uid, gid: this.portable ? void 0 : this.gid, size: this.size, mtime: this.noMtime ? void 0 : this.mtime, type: this.type, uname: this.portable ? void 0 : this.uname, atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime }), n && this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute path`, { entry: this, path: n + this.path }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime, gid: this.portable ? void 0 : this.gid, mtime: this.noMtime ? void 0 : this.mtime, path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, size: this.size, uid: this.portable ? void 0 : this.uid, uname: this.portable ? void 0 : this.uname, dev: this.portable ? void 0 : this.readEntry.dev, ino: this.portable ? void 0 : this.readEntry.ino, nlink: this.portable ? void 0 : this.readEntry.nlink }).encode());
3106
+ this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new F({ path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](this.linkpath) : this.linkpath, mode: this.mode, uid: this.portable ? void 0 : this.uid, gid: this.portable ? void 0 : this.gid, size: this.size, mtime: this.noMtime ? void 0 : this.mtime, type: this.type, uname: this.portable ? void 0 : this.uname, atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime }), n && this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute path`, { entry: this, path: n + this.path }), this.header.encode() && !this.noPax && super.write(new ft({ atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime, gid: this.portable ? void 0 : this.gid, mtime: this.noMtime ? void 0 : this.mtime, path: this[q](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q](this.linkpath) : this.linkpath, size: this.size, uid: this.portable ? void 0 : this.uid, uname: this.portable ? void 0 : this.uname, dev: this.portable ? void 0 : this.readEntry.dev, ino: this.portable ? void 0 : this.readEntry.ino, nlink: this.portable ? void 0 : this.readEntry.nlink }).encode());
3056
3107
  let o = this.header?.block;
3057
3108
  if (!o) throw new Error("failed to encode header");
3058
3109
  super.write(o), t.pipe(this);
3059
3110
  }
3060
- [X](t) {
3061
- return Js(t, this.prefix);
3111
+ [q](t) {
3112
+ return rr(t, this.prefix);
3062
3113
  }
3063
- [ii](t) {
3064
- return Vi(t, this.type === "Directory", this.portable);
3114
+ [ri](t) {
3115
+ return Ji(t, this.type === "Directory", this.portable);
3065
3116
  }
3066
3117
  write(t, e, i) {
3067
3118
  typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
@@ -3073,8 +3124,8 @@ var ri = class extends D {
3073
3124
  return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e ?? "utf8")), i && this.once("finish", i), t ? super.end(t, i) : super.end(i), this;
3074
3125
  }
3075
3126
  };
3076
- var Mn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
3077
- var ni = class s2 {
3127
+ var Gn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
3128
+ var hi = class s2 {
3078
3129
  tail;
3079
3130
  head;
3080
3131
  length = 0;
@@ -3105,11 +3156,11 @@ var ni = class s2 {
3105
3156
  t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
3106
3157
  }
3107
3158
  push(...t) {
3108
- for (let e = 0, i = t.length; e < i; e++) Pn(this, t[e]);
3159
+ for (let e = 0, i = t.length; e < i; e++) Yn(this, t[e]);
3109
3160
  return this.length;
3110
3161
  }
3111
3162
  unshift(...t) {
3112
- for (var e = 0, i = t.length; e < i; e++) zn(this, t[e]);
3163
+ for (var e = 0, i = t.length; e < i; e++) Kn(this, t[e]);
3113
3164
  return this.length;
3114
3165
  }
3115
3166
  pop() {
@@ -3205,7 +3256,7 @@ var ni = class s2 {
3205
3256
  let n = [];
3206
3257
  for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
3207
3258
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
3208
- for (let o of i) r = Bn(this, r, o);
3259
+ for (let o of i) r = Zn(this, r, o);
3209
3260
  return n;
3210
3261
  }
3211
3262
  reverse() {
@@ -3217,17 +3268,17 @@ var ni = class s2 {
3217
3268
  return this.head = e, this.tail = t, this;
3218
3269
  }
3219
3270
  };
3220
- function Bn(s3, t, e) {
3221
- let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
3271
+ function Zn(s3, t, e) {
3272
+ let i = t, r = t ? t.next : s3.head, n = new me(e, i, r, s3);
3222
3273
  return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
3223
3274
  }
3224
- function Pn(s3, t) {
3225
- s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
3275
+ function Yn(s3, t) {
3276
+ s3.tail = new me(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
3226
3277
  }
3227
- function zn(s3, t) {
3228
- s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
3278
+ function Kn(s3, t) {
3279
+ s3.head = new me(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
3229
3280
  }
3230
- var ue = class {
3281
+ var me = class {
3231
3282
  list;
3232
3283
  next;
3233
3284
  prev;
@@ -3236,41 +3287,43 @@ var ue = class {
3236
3287
  this.list = r, this.value = t, e ? (e.next = this, this.prev = e) : this.prev = void 0, i ? (i.prev = this, this.next = i) : this.next = void 0;
3237
3288
  }
3238
3289
  };
3239
- var di = class {
3290
+ var pi = class {
3240
3291
  path;
3241
3292
  absolute;
3242
3293
  entry;
3243
3294
  stat;
3244
3295
  readdir;
3245
3296
  pending = false;
3297
+ pendingLink = false;
3246
3298
  ignore = false;
3247
3299
  piped = false;
3248
3300
  constructor(t, e) {
3249
3301
  this.path = t || "./", this.absolute = e;
3250
3302
  }
3251
3303
  };
3252
- var tr = Buffer.alloc(1024);
3253
- var oi = /* @__PURE__ */ Symbol("onStat");
3254
- var me = /* @__PURE__ */ Symbol("ended");
3304
+ var nr = Buffer.alloc(1024);
3305
+ var li = /* @__PURE__ */ Symbol("onStat");
3306
+ var ue = /* @__PURE__ */ Symbol("ended");
3255
3307
  var W = /* @__PURE__ */ Symbol("queue");
3256
- var Ct = /* @__PURE__ */ Symbol("current");
3308
+ var pe = /* @__PURE__ */ Symbol("pendingLinks");
3309
+ var Et = /* @__PURE__ */ Symbol("current");
3257
3310
  var Ft = /* @__PURE__ */ Symbol("process");
3258
- var pe = /* @__PURE__ */ Symbol("processing");
3259
- var rs = /* @__PURE__ */ Symbol("processJob");
3311
+ var Ee = /* @__PURE__ */ Symbol("processing");
3312
+ var ai = /* @__PURE__ */ Symbol("processJob");
3260
3313
  var G = /* @__PURE__ */ Symbol("jobs");
3261
- var ns = /* @__PURE__ */ Symbol("jobDone");
3262
- var hi = /* @__PURE__ */ Symbol("addFSEntry");
3263
- var er = /* @__PURE__ */ Symbol("addTarEntry");
3264
- var as = /* @__PURE__ */ Symbol("stat");
3265
- var ls = /* @__PURE__ */ Symbol("readdir");
3266
- var ai = /* @__PURE__ */ Symbol("onreaddir");
3267
- var li = /* @__PURE__ */ Symbol("pipe");
3268
- var ir = /* @__PURE__ */ Symbol("entry");
3269
- var os = /* @__PURE__ */ Symbol("entryOpt");
3270
- var ci = /* @__PURE__ */ Symbol("writeEntryClass");
3271
- var rr = /* @__PURE__ */ Symbol("write");
3272
- var hs = /* @__PURE__ */ Symbol("ondrain");
3273
- var Et = class extends D {
3314
+ var ls = /* @__PURE__ */ Symbol("jobDone");
3315
+ var ci = /* @__PURE__ */ Symbol("addFSEntry");
3316
+ var or = /* @__PURE__ */ Symbol("addTarEntry");
3317
+ var ds = /* @__PURE__ */ Symbol("stat");
3318
+ var ms = /* @__PURE__ */ Symbol("readdir");
3319
+ var fi = /* @__PURE__ */ Symbol("onreaddir");
3320
+ var di = /* @__PURE__ */ Symbol("pipe");
3321
+ var hr = /* @__PURE__ */ Symbol("entry");
3322
+ var cs = /* @__PURE__ */ Symbol("entryOpt");
3323
+ var mi = /* @__PURE__ */ Symbol("writeEntryClass");
3324
+ var lr = /* @__PURE__ */ Symbol("write");
3325
+ var fs = /* @__PURE__ */ Symbol("ondrain");
3326
+ var wt = class extends A {
3274
3327
  sync = false;
3275
3328
  opt;
3276
3329
  cwd;
@@ -3291,123 +3344,139 @@ var Et = class extends D {
3291
3344
  mtime;
3292
3345
  filter;
3293
3346
  jobs;
3294
- [ci];
3347
+ [mi];
3295
3348
  onWriteEntry;
3296
3349
  [W];
3350
+ [pe] = /* @__PURE__ */ new Map();
3297
3351
  [G] = 0;
3298
- [pe] = false;
3299
- [me] = false;
3352
+ [Ee] = false;
3353
+ [ue] = false;
3300
3354
  constructor(t = {}) {
3301
- if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[ci] = de, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
3355
+ if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[mi] = de, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
3302
3356
  if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
3303
- if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new Pe(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new He(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ze(t.zstd)), !this.zip) throw new Error("impossible");
3357
+ if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new ze(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new We(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ye(t.zstd)), !this.zip) throw new Error("impossible");
3304
3358
  let e = this.zip;
3305
- e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[hs]()), this.on("resume", () => e.resume());
3306
- } else this.on("drain", this[hs]);
3307
- this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new ni(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[pe] = false, this[me] = false;
3359
+ e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[fs]()), this.on("resume", () => e.resume());
3360
+ } else this.on("drain", this[fs]);
3361
+ this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new hi(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[Ee] = false, this[ue] = false;
3308
3362
  }
3309
- [rr](t) {
3363
+ [lr](t) {
3310
3364
  return super.write(t);
3311
3365
  }
3312
3366
  add(t) {
3313
3367
  return this.write(t), this;
3314
3368
  }
3315
3369
  end(t, e, i) {
3316
- return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = void 0), t && this.add(t), this[me] = true, this[Ft](), i && i(), this;
3370
+ return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = void 0), t && this.add(t), this[ue] = true, this[Ft](), i && i(), this;
3317
3371
  }
3318
3372
  write(t) {
3319
- if (this[me]) throw new Error("write after end");
3320
- return t instanceof Yt ? this[er](t) : this[hi](t), this.flowing;
3373
+ if (this[ue]) throw new Error("write after end");
3374
+ return typeof t == "string" ? this[ci](t) : this[or](t), this.flowing;
3321
3375
  }
3322
- [er](t) {
3323
- let e = f(sr.resolve(this.cwd, t.path));
3376
+ [or](t) {
3377
+ let e = f(ar.resolve(this.cwd, t.path));
3324
3378
  if (!this.filter(t.path, t)) t.resume();
3325
3379
  else {
3326
- let i = new di(t.path, e);
3327
- i.entry = new ri(t, this[os](i)), i.entry.on("end", () => this[ns](i)), this[G] += 1, this[W].push(i);
3380
+ let i = new pi(t.path, e);
3381
+ i.entry = new oi(t, this[cs](i)), i.entry.on("end", () => this[ls](i)), this[G] += 1, this[W].push(i);
3328
3382
  }
3329
3383
  this[Ft]();
3330
3384
  }
3331
- [hi](t) {
3332
- let e = f(sr.resolve(this.cwd, t));
3333
- this[W].push(new di(t, e)), this[Ft]();
3385
+ [ci](t) {
3386
+ let e = f(ar.resolve(this.cwd, t));
3387
+ this[W].push(new pi(t, e)), this[Ft]();
3334
3388
  }
3335
- [as](t) {
3389
+ [ds](t) {
3336
3390
  t.pending = true, this[G] += 1;
3337
3391
  let e = this.follow ? "stat" : "lstat";
3338
- fi[e](t.absolute, (i, r) => {
3339
- t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[oi](t, r);
3392
+ ui[e](t.absolute, (i, r) => {
3393
+ t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[li](t, r);
3340
3394
  });
3341
3395
  }
3342
- [oi](t, e) {
3343
- this.statCache.set(t.absolute, e), t.stat = e, this.filter(t.path, e) ? e.isFile() && e.nlink > 1 && t === this[Ct] && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync && this[rs](t) : t.ignore = true, this[Ft]();
3396
+ [li](t, e) {
3397
+ if (this.statCache.set(t.absolute, e), t.stat = e, !this.filter(t.path, e)) t.ignore = true;
3398
+ else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t === this[Et]) this[ai](t);
3399
+ else {
3400
+ let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
3401
+ r ? r.push(t) : this[pe].set(i, [t]), t.pendingLink = true, t.pending = true;
3402
+ }
3403
+ this[Ft]();
3344
3404
  }
3345
- [ls](t) {
3346
- t.pending = true, this[G] += 1, fi.readdir(t.absolute, (e, i) => {
3405
+ [ms](t) {
3406
+ t.pending = true, this[G] += 1, ui.readdir(t.absolute, (e, i) => {
3347
3407
  if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
3348
- this[ai](t, i);
3408
+ this[fi](t, i);
3349
3409
  });
3350
3410
  }
3351
- [ai](t, e) {
3411
+ [fi](t, e) {
3352
3412
  this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ft]();
3353
3413
  }
3354
3414
  [Ft]() {
3355
- if (!this[pe]) {
3356
- this[pe] = true;
3357
- for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[rs](t.value), t.value.ignore) {
3415
+ if (!this[Ee]) {
3416
+ this[Ee] = true;
3417
+ for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[ai](t.value), t.value.ignore) {
3358
3418
  let e = t.next;
3359
3419
  this[W].removeNode(t), t.next = e;
3360
3420
  }
3361
- this[pe] = false, this[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(tr) : (super.write(tr), super.end()));
3421
+ this[Ee] = false, this[ue] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(nr) : (super.write(nr), super.end()));
3362
3422
  }
3363
3423
  }
3364
- get [Ct]() {
3424
+ get [Et]() {
3365
3425
  return this[W] && this[W].head && this[W].head.value;
3366
3426
  }
3367
- [ns](t) {
3368
- this[W].shift(), this[G] -= 1, this[Ft]();
3427
+ [ls](t) {
3428
+ this[W].shift(), this[G] -= 1;
3429
+ let { stat: e } = t;
3430
+ if (e && e.isFile() && e.nlink > 1) {
3431
+ let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
3432
+ if (r) {
3433
+ this[pe].delete(i);
3434
+ for (let n of r) n.pending = false, this[ai](n);
3435
+ }
3436
+ }
3437
+ this[Ft]();
3369
3438
  }
3370
- [rs](t) {
3371
- if (!t.pending) {
3439
+ [ai](t) {
3440
+ if (t.pending && t.pendingLink && t === this[Et] && (t.pending = false, t.pendingLink = false), !t.pending) {
3372
3441
  if (t.entry) {
3373
- t === this[Ct] && !t.piped && this[li](t);
3442
+ t === this[Et] && !t.piped && this[di](t);
3374
3443
  return;
3375
3444
  }
3376
3445
  if (!t.stat) {
3377
3446
  let e = this.statCache.get(t.absolute);
3378
- e ? this[oi](t, e) : this[as](t);
3447
+ e ? this[li](t, e) : this[ds](t);
3379
3448
  }
3380
3449
  if (t.stat && !t.ignore) {
3381
3450
  if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
3382
3451
  let e = this.readdirCache.get(t.absolute);
3383
- if (e ? this[ai](t, e) : this[ls](t), !t.readdir) return;
3452
+ if (e ? this[fi](t, e) : this[ms](t), !t.readdir) return;
3384
3453
  }
3385
- if (t.entry = this[ir](t), !t.entry) {
3454
+ if (t.entry = this[hr](t), !t.entry) {
3386
3455
  t.ignore = true;
3387
3456
  return;
3388
3457
  }
3389
- t === this[Ct] && !t.piped && this[li](t);
3458
+ t === this[Et] && !t.piped && this[di](t);
3390
3459
  }
3391
3460
  }
3392
3461
  }
3393
- [os](t) {
3462
+ [cs](t) {
3394
3463
  return { onwarn: (e, i, r) => this.warn(e, i, r), noPax: this.noPax, cwd: this.cwd, absolute: t.absolute, preservePaths: this.preservePaths, maxReadSize: this.maxReadSize, strict: this.strict, portable: this.portable, linkCache: this.linkCache, statCache: this.statCache, noMtime: this.noMtime, mtime: this.mtime, prefix: this.prefix, onWriteEntry: this.onWriteEntry };
3395
3464
  }
3396
- [ir](t) {
3465
+ [hr](t) {
3397
3466
  this[G] += 1;
3398
3467
  try {
3399
- return new this[ci](t.path, this[os](t)).on("end", () => this[ns](t)).on("error", (i) => this.emit("error", i));
3468
+ return new this[mi](t.path, this[cs](t)).on("end", () => this[ls](t)).on("error", (i) => this.emit("error", i));
3400
3469
  } catch (e) {
3401
3470
  this.emit("error", e);
3402
3471
  }
3403
3472
  }
3404
- [hs]() {
3405
- this[Ct] && this[Ct].entry && this[Ct].entry.resume();
3473
+ [fs]() {
3474
+ this[Et] && this[Et].entry && this[Et].entry.resume();
3406
3475
  }
3407
- [li](t) {
3476
+ [di](t) {
3408
3477
  t.piped = true, t.readdir && t.readdir.forEach((r) => {
3409
3478
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
3410
- this[hi](o + r);
3479
+ this[ci](o + r);
3411
3480
  });
3412
3481
  let e = t.entry, i = this.zip;
3413
3482
  if (!e) throw new Error("cannot pipe without source");
@@ -3421,137 +3490,137 @@ var Et = class extends D {
3421
3490
  return this.zip && this.zip.pause(), super.pause();
3422
3491
  }
3423
3492
  warn(t, e, i = {}) {
3424
- Lt(this, t, e, i);
3493
+ Dt(this, t, e, i);
3425
3494
  }
3426
3495
  };
3427
- var kt = class extends Et {
3496
+ var kt = class extends wt {
3428
3497
  sync = true;
3429
3498
  constructor(t) {
3430
- super(t), this[ci] = si;
3499
+ super(t), this[mi] = ni;
3431
3500
  }
3432
3501
  pause() {
3433
3502
  }
3434
3503
  resume() {
3435
3504
  }
3436
- [as](t) {
3505
+ [ds](t) {
3437
3506
  let e = this.follow ? "statSync" : "lstatSync";
3438
- this[oi](t, fi[e](t.absolute));
3507
+ this[li](t, ui[e](t.absolute));
3439
3508
  }
3440
- [ls](t) {
3441
- this[ai](t, fi.readdirSync(t.absolute));
3509
+ [ms](t) {
3510
+ this[fi](t, ui.readdirSync(t.absolute));
3442
3511
  }
3443
- [li](t) {
3512
+ [di](t) {
3444
3513
  let e = t.entry, i = this.zip;
3445
3514
  if (t.readdir && t.readdir.forEach((r) => {
3446
3515
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
3447
- this[hi](o + r);
3516
+ this[ci](o + r);
3448
3517
  }), !e) throw new Error("Cannot pipe without source");
3449
3518
  i ? e.on("data", (r) => {
3450
3519
  i.write(r);
3451
3520
  }) : e.on("data", (r) => {
3452
- super[rr](r);
3521
+ super[lr](r);
3453
3522
  });
3454
3523
  }
3455
3524
  };
3456
- var Un = (s3, t) => {
3525
+ var Vn = (s3, t) => {
3457
3526
  let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
3458
- e.pipe(i), or(e, t);
3527
+ e.pipe(i), fr(e, t);
3459
3528
  };
3460
- var Hn = (s3, t) => {
3461
- let e = new Et(s3), i = new tt(s3.file, { mode: s3.mode || 438 });
3529
+ var $n = (s3, t) => {
3530
+ let e = new wt(s3), i = new et(s3.file, { mode: s3.mode || 438 });
3462
3531
  e.pipe(i);
3463
3532
  let r = new Promise((n, o) => {
3464
3533
  i.on("error", o), i.on("close", n), e.on("error", o);
3465
3534
  });
3466
- return hr(e, t).catch((n) => e.emit("error", n)), r;
3535
+ return dr(e, t).catch((n) => e.emit("error", n)), r;
3467
3536
  };
3468
- var or = (s3, t) => {
3537
+ var fr = (s3, t) => {
3469
3538
  t.forEach((e) => {
3470
- e.charAt(0) === "@" ? It({ file: nr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
3539
+ e.charAt(0) === "@" ? Ct({ file: cr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
3471
3540
  }), s3.end();
3472
3541
  };
3473
- var hr = async (s3, t) => {
3474
- for (let e of t) e.charAt(0) === "@" ? await It({ file: nr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
3542
+ var dr = async (s3, t) => {
3543
+ for (let e of t) e.charAt(0) === "@" ? await Ct({ file: cr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
3475
3544
  s3.add(i);
3476
3545
  } }) : s3.add(e);
3477
3546
  s3.end();
3478
3547
  };
3479
- var Wn = (s3, t) => {
3548
+ var Xn = (s3, t) => {
3480
3549
  let e = new kt(s3);
3481
- return or(e, t), e;
3550
+ return fr(e, t), e;
3482
3551
  };
3483
- var Gn = (s3, t) => {
3484
- let e = new Et(s3);
3485
- return hr(e, t).catch((i) => e.emit("error", i)), e;
3552
+ var qn = (s3, t) => {
3553
+ let e = new wt(s3);
3554
+ return dr(e, t).catch((i) => e.emit("error", i)), e;
3486
3555
  };
3487
- var Zn = K(Un, Hn, Wn, Gn, (s3, t) => {
3556
+ var Qn = K(Vn, $n, Xn, qn, (s3, t) => {
3488
3557
  if (!t?.length) throw new TypeError("no paths specified to add to archive");
3489
3558
  });
3490
- var Yn = process.env.__FAKE_PLATFORM__ || process.platform;
3491
- var fr = Yn === "win32";
3492
- var { O_CREAT: dr, O_NOFOLLOW: ar, O_TRUNC: ur, O_WRONLY: mr } = cr.constants;
3493
- var pr = Number(process.env.__FAKE_FS_O_FILENAME__) || cr.constants.UV_FS_O_FILEMAP || 0;
3494
- var Kn = fr && !!pr;
3495
- var Vn = 512 * 1024;
3496
- var $n = pr | ur | dr | mr;
3497
- var lr = !fr && typeof ar == "number" ? ar | ur | dr | mr : null;
3498
- var cs = lr !== null ? () => lr : Kn ? (s3) => s3 < Vn ? $n : "w" : () => "w";
3499
- var fs = (s3, t, e) => {
3559
+ var Jn = process.env.__FAKE_PLATFORM__ || process.platform;
3560
+ var Er = Jn === "win32";
3561
+ var { O_CREAT: wr, O_NOFOLLOW: mr, O_TRUNC: Sr, O_WRONLY: yr } = pr.constants;
3562
+ var Rr = Number(process.env.__FAKE_FS_O_FILENAME__) || pr.constants.UV_FS_O_FILEMAP || 0;
3563
+ var jn = Er && !!Rr;
3564
+ var to = 512 * 1024;
3565
+ var eo = Rr | Sr | wr | yr;
3566
+ var ur = !Er && typeof mr == "number" ? mr | Sr | wr | yr : null;
3567
+ var us = ur !== null ? () => ur : jn ? (s3) => s3 < to ? eo : "w" : () => "w";
3568
+ var ps = (s3, t, e) => {
3500
3569
  try {
3501
- return mi.lchownSync(s3, t, e);
3570
+ return wi.lchownSync(s3, t, e);
3502
3571
  } catch (i) {
3503
3572
  if (i?.code !== "ENOENT") throw i;
3504
3573
  }
3505
3574
  };
3506
- var ui = (s3, t, e, i) => {
3507
- mi.lchown(s3, t, e, (r) => {
3575
+ var Ei = (s3, t, e, i) => {
3576
+ wi.lchown(s3, t, e, (r) => {
3508
3577
  i(r && r?.code !== "ENOENT" ? r : null);
3509
3578
  });
3510
3579
  };
3511
- var Xn = (s3, t, e, i, r) => {
3512
- if (t.isDirectory()) ds(Ee.resolve(s3, t.name), e, i, (n) => {
3580
+ var io = (s3, t, e, i, r) => {
3581
+ if (t.isDirectory()) Es(we.resolve(s3, t.name), e, i, (n) => {
3513
3582
  if (n) return r(n);
3514
- let o = Ee.resolve(s3, t.name);
3515
- ui(o, e, i, r);
3583
+ let o = we.resolve(s3, t.name);
3584
+ Ei(o, e, i, r);
3516
3585
  });
3517
3586
  else {
3518
- let n = Ee.resolve(s3, t.name);
3519
- ui(n, e, i, r);
3587
+ let n = we.resolve(s3, t.name);
3588
+ Ei(n, e, i, r);
3520
3589
  }
3521
3590
  };
3522
- var ds = (s3, t, e, i) => {
3523
- mi.readdir(s3, { withFileTypes: true }, (r, n) => {
3591
+ var Es = (s3, t, e, i) => {
3592
+ wi.readdir(s3, { withFileTypes: true }, (r, n) => {
3524
3593
  if (r) {
3525
3594
  if (r.code === "ENOENT") return i();
3526
3595
  if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
3527
3596
  }
3528
- if (r || !n.length) return ui(s3, t, e, i);
3597
+ if (r || !n.length) return Ei(s3, t, e, i);
3529
3598
  let o = n.length, h = null, a = (l) => {
3530
3599
  if (!h) {
3531
3600
  if (l) return i(h = l);
3532
- if (--o === 0) return ui(s3, t, e, i);
3601
+ if (--o === 0) return Ei(s3, t, e, i);
3533
3602
  }
3534
3603
  };
3535
- for (let l of n) Xn(s3, l, t, e, a);
3604
+ for (let l of n) io(s3, l, t, e, a);
3536
3605
  });
3537
3606
  };
3538
- var qn = (s3, t, e, i) => {
3539
- t.isDirectory() && us(Ee.resolve(s3, t.name), e, i), fs(Ee.resolve(s3, t.name), e, i);
3607
+ var so = (s3, t, e, i) => {
3608
+ t.isDirectory() && ws(we.resolve(s3, t.name), e, i), ps(we.resolve(s3, t.name), e, i);
3540
3609
  };
3541
- var us = (s3, t, e) => {
3610
+ var ws = (s3, t, e) => {
3542
3611
  let i;
3543
3612
  try {
3544
- i = mi.readdirSync(s3, { withFileTypes: true });
3613
+ i = wi.readdirSync(s3, { withFileTypes: true });
3545
3614
  } catch (r) {
3546
3615
  let n = r;
3547
3616
  if (n?.code === "ENOENT") return;
3548
- if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return fs(s3, t, e);
3617
+ if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return ps(s3, t, e);
3549
3618
  throw n;
3550
3619
  }
3551
- for (let r of i) qn(s3, r, t, e);
3552
- return fs(s3, t, e);
3620
+ for (let r of i) so(s3, r, t, e);
3621
+ return ps(s3, t, e);
3553
3622
  };
3554
- var we = class extends Error {
3623
+ var Se = class extends Error {
3555
3624
  path;
3556
3625
  code;
3557
3626
  syscall = "chdir";
@@ -3562,7 +3631,7 @@ var we = class extends Error {
3562
3631
  return "CwdError";
3563
3632
  }
3564
3633
  };
3565
- var wt = class extends Error {
3634
+ var St = class extends Error {
3566
3635
  path;
3567
3636
  symlink;
3568
3637
  syscall = "symlink";
@@ -3574,97 +3643,97 @@ var wt = class extends Error {
3574
3643
  return "SymlinkError";
3575
3644
  }
3576
3645
  };
3577
- var Qn = (s3, t) => {
3646
+ var no = (s3, t) => {
3578
3647
  k.stat(s3, (e, i) => {
3579
- (e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
3648
+ (e || !i.isDirectory()) && (e = new Se(s3, e?.code || "ENOTDIR")), t(e);
3580
3649
  });
3581
3650
  };
3582
- var Er = (s3, t, e) => {
3651
+ var gr = (s3, t, e) => {
3583
3652
  s3 = f(s3);
3584
- let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid, h = t.gid, a = typeof o == "number" && typeof h == "number" && (o !== t.processUid || h !== t.processGid), l = t.preserve, c = t.unlink, d = f(t.cwd), S = (E, x) => {
3585
- E ? e(E) : x && a ? ds(x, o, h, (xe) => S(xe)) : n ? k.chmod(s3, r, e) : e();
3653
+ let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid, h = t.gid, a = typeof o == "number" && typeof h == "number" && (o !== t.processUid || h !== t.processGid), l = t.preserve, c = t.unlink, d = f(t.cwd), y = (E, x) => {
3654
+ E ? e(E) : x && a ? Es(x, o, h, (Le) => y(Le)) : n ? k.chmod(s3, r, e) : e();
3586
3655
  };
3587
- if (s3 === d) return Qn(s3, S);
3588
- if (l) return jn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
3589
- let N = f(pi.relative(d, s3)).split("/");
3590
- ms(d, N, r, c, d, void 0, S);
3656
+ if (s3 === d) return no(s3, y);
3657
+ if (l) return ro.mkdir(s3, { mode: r, recursive: true }).then((E) => y(null, E ?? void 0), y);
3658
+ let D = f(Si.relative(d, s3)).split("/");
3659
+ Ss(d, D, r, c, d, void 0, y);
3591
3660
  };
3592
- var ms = (s3, t, e, i, r, n, o) => {
3661
+ var Ss = (s3, t, e, i, r, n, o) => {
3593
3662
  if (t.length === 0) return o(null, n);
3594
- let h = t.shift(), a = f(pi.resolve(s3 + "/" + h));
3595
- k.mkdir(a, e, wr(a, t, e, i, r, n, o));
3663
+ let h = t.shift(), a = f(Si.resolve(s3 + "/" + h));
3664
+ k.mkdir(a, e, br(a, t, e, i, r, n, o));
3596
3665
  };
3597
- var wr = (s3, t, e, i, r, n, o) => (h) => {
3666
+ var br = (s3, t, e, i, r, n, o) => (h) => {
3598
3667
  h ? k.lstat(s3, (a, l) => {
3599
3668
  if (a) a.path = a.path && f(a.path), o(a);
3600
- else if (l.isDirectory()) ms(s3, t, e, i, r, n, o);
3669
+ else if (l.isDirectory()) Ss(s3, t, e, i, r, n, o);
3601
3670
  else if (i) k.unlink(s3, (c) => {
3602
3671
  if (c) return o(c);
3603
- k.mkdir(s3, e, wr(s3, t, e, i, r, n, o));
3672
+ k.mkdir(s3, e, br(s3, t, e, i, r, n, o));
3604
3673
  });
3605
3674
  else {
3606
- if (l.isSymbolicLink()) return o(new wt(s3, s3 + "/" + t.join("/")));
3675
+ if (l.isSymbolicLink()) return o(new St(s3, s3 + "/" + t.join("/")));
3607
3676
  o(h);
3608
3677
  }
3609
- }) : (n = n || s3, ms(s3, t, e, i, r, n, o));
3678
+ }) : (n = n || s3, Ss(s3, t, e, i, r, n, o));
3610
3679
  };
3611
- var Jn = (s3) => {
3680
+ var oo = (s3) => {
3612
3681
  let t = false, e;
3613
3682
  try {
3614
3683
  t = k.statSync(s3).isDirectory();
3615
3684
  } catch (i) {
3616
3685
  e = i?.code;
3617
3686
  } finally {
3618
- if (!t) throw new we(s3, e ?? "ENOTDIR");
3687
+ if (!t) throw new Se(s3, e ?? "ENOTDIR");
3619
3688
  }
3620
3689
  };
3621
- var Sr = (s3, t) => {
3690
+ var _r = (s3, t) => {
3622
3691
  s3 = f(s3);
3623
3692
  let e = t.umask ?? 18, i = t.mode | 448, r = (i & e) !== 0, n = t.uid, o = t.gid, h = typeof n == "number" && typeof o == "number" && (n !== t.processUid || o !== t.processGid), a = t.preserve, l = t.unlink, c = f(t.cwd), d = (E) => {
3624
- E && h && us(E, n, o), r && k.chmodSync(s3, i);
3693
+ E && h && ws(E, n, o), r && k.chmodSync(s3, i);
3625
3694
  };
3626
- if (s3 === c) return Jn(c), d();
3695
+ if (s3 === c) return oo(c), d();
3627
3696
  if (a) return d(k.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
3628
- let T = f(pi.relative(c, s3)).split("/"), N;
3697
+ let T = f(Si.relative(c, s3)).split("/"), D;
3629
3698
  for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
3630
- x = f(pi.resolve(x));
3699
+ x = f(Si.resolve(x));
3631
3700
  try {
3632
- k.mkdirSync(x, i), N = N || x;
3701
+ k.mkdirSync(x, i), D = D || x;
3633
3702
  } catch {
3634
- let xe = k.lstatSync(x);
3635
- if (xe.isDirectory()) continue;
3703
+ let Le = k.lstatSync(x);
3704
+ if (Le.isDirectory()) continue;
3636
3705
  if (l) {
3637
- k.unlinkSync(x), k.mkdirSync(x, i), N = N || x;
3706
+ k.unlinkSync(x), k.mkdirSync(x, i), D = D || x;
3638
3707
  continue;
3639
- } else if (xe.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
3708
+ } else if (Le.isSymbolicLink()) return new St(x, x + "/" + T.join("/"));
3640
3709
  }
3641
3710
  }
3642
- return d(N);
3711
+ return d(D);
3643
3712
  };
3644
- var ps = /* @__PURE__ */ Object.create(null);
3645
- var yr = 1e4;
3646
- var $t = /* @__PURE__ */ new Set();
3647
- var Rr = (s3) => {
3648
- $t.has(s3) ? $t.delete(s3) : ps[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
3649
- let t = ps[s3], e = $t.size - yr;
3650
- if (e > yr / 10) {
3651
- for (let i of $t) if ($t.delete(i), delete ps[i], --e <= 0) break;
3713
+ var ys = /* @__PURE__ */ Object.create(null);
3714
+ var Or = 1e4;
3715
+ var Vt = /* @__PURE__ */ new Set();
3716
+ var Tr = (s3) => {
3717
+ Vt.has(s3) ? Vt.delete(s3) : ys[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), Vt.add(s3);
3718
+ let t = ys[s3], e = Vt.size - Or;
3719
+ if (e > Or / 10) {
3720
+ for (let i of Vt) if (Vt.delete(i), delete ys[i], --e <= 0) break;
3652
3721
  }
3653
3722
  return t;
3654
3723
  };
3655
- var to = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
3656
- var eo = to === "win32";
3657
- var io = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
3724
+ var ho = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
3725
+ var ao = ho === "win32";
3726
+ var lo = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
3658
3727
  let r = e.at(-1);
3659
- return r !== void 0 && (i = br(r, i)), e.push(i || "/"), e;
3728
+ return r !== void 0 && (i = xr(r, i)), e.push(i || "/"), e;
3660
3729
  }, []);
3661
- var Ei = class {
3730
+ var yi = class {
3662
3731
  #t = /* @__PURE__ */ new Map();
3663
3732
  #i = /* @__PURE__ */ new Map();
3664
3733
  #s = /* @__PURE__ */ new Set();
3665
3734
  reserve(t, e) {
3666
- t = eo ? ["win32 parallelization disabled"] : t.map((r) => mt(br(Rr(r))));
3667
- let i = new Set(t.map((r) => io(r)).reduce((r, n) => r.concat(n)));
3735
+ t = ao ? ["win32 parallelization disabled"] : t.map((r) => ut(xr(Tr(r))));
3736
+ let i = new Set(t.map((r) => lo(r)).reduce((r, n) => r.concat(n)));
3668
3737
  this.#i.set(e, { dirs: i, paths: t });
3669
3738
  for (let r of t) {
3670
3739
  let n = this.#t.get(r);
@@ -3722,55 +3791,55 @@ var Ei = class {
3722
3791
  return this.#s.delete(t), n.forEach((o) => this.#r(o)), true;
3723
3792
  }
3724
3793
  };
3725
- var _r = () => process.umask();
3726
- var gr = /* @__PURE__ */ Symbol("onEntry");
3727
- var ys = /* @__PURE__ */ Symbol("checkFs");
3728
- var Or = /* @__PURE__ */ Symbol("checkFs2");
3729
- var Rs = /* @__PURE__ */ Symbol("isReusable");
3794
+ var Lr = () => process.umask();
3795
+ var Dr = /* @__PURE__ */ Symbol("onEntry");
3796
+ var _s = /* @__PURE__ */ Symbol("checkFs");
3797
+ var Nr = /* @__PURE__ */ Symbol("checkFs2");
3798
+ var Os = /* @__PURE__ */ Symbol("isReusable");
3730
3799
  var P = /* @__PURE__ */ Symbol("makeFs");
3731
- var bs = /* @__PURE__ */ Symbol("file");
3732
- var _s = /* @__PURE__ */ Symbol("directory");
3733
- var Si = /* @__PURE__ */ Symbol("link");
3734
- var Tr = /* @__PURE__ */ Symbol("symlink");
3735
- var xr = /* @__PURE__ */ Symbol("hardlink");
3736
- var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
3737
- var Lr = /* @__PURE__ */ Symbol("unsupported");
3738
- var Nr = /* @__PURE__ */ Symbol("checkPath");
3739
- var Es = /* @__PURE__ */ Symbol("stripAbsolutePath");
3740
- var St = /* @__PURE__ */ Symbol("mkdir");
3800
+ var Ts = /* @__PURE__ */ Symbol("file");
3801
+ var xs = /* @__PURE__ */ Symbol("directory");
3802
+ var gi = /* @__PURE__ */ Symbol("link");
3803
+ var Ar = /* @__PURE__ */ Symbol("symlink");
3804
+ var Ir = /* @__PURE__ */ Symbol("hardlink");
3805
+ var Re = /* @__PURE__ */ Symbol("ensureNoSymlink");
3806
+ var Cr = /* @__PURE__ */ Symbol("unsupported");
3807
+ var Fr = /* @__PURE__ */ Symbol("checkPath");
3808
+ var Rs = /* @__PURE__ */ Symbol("stripAbsolutePath");
3809
+ var yt = /* @__PURE__ */ Symbol("mkdir");
3741
3810
  var O = /* @__PURE__ */ Symbol("onError");
3742
- var wi = /* @__PURE__ */ Symbol("pending");
3743
- var Ar = /* @__PURE__ */ Symbol("pend");
3744
- var Xt = /* @__PURE__ */ Symbol("unpend");
3745
- var ws = /* @__PURE__ */ Symbol("ended");
3746
- var Ss = /* @__PURE__ */ Symbol("maybeClose");
3747
- var gs = /* @__PURE__ */ Symbol("skip");
3748
- var Re = /* @__PURE__ */ Symbol("doChown");
3811
+ var Ri = /* @__PURE__ */ Symbol("pending");
3812
+ var kr = /* @__PURE__ */ Symbol("pend");
3813
+ var $t = /* @__PURE__ */ Symbol("unpend");
3814
+ var gs = /* @__PURE__ */ Symbol("ended");
3815
+ var bs = /* @__PURE__ */ Symbol("maybeClose");
3816
+ var Ls = /* @__PURE__ */ Symbol("skip");
3817
+ var ge = /* @__PURE__ */ Symbol("doChown");
3749
3818
  var be = /* @__PURE__ */ Symbol("uid");
3750
3819
  var _e = /* @__PURE__ */ Symbol("gid");
3751
- var ge = /* @__PURE__ */ Symbol("checkedCwd");
3752
- var ro = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
3753
- var Oe = ro === "win32";
3754
- var no = 1024;
3755
- var oo = (s3, t) => {
3756
- if (!Oe) return u.unlink(s3, t);
3757
- let e = s3 + ".DELETE." + Ir(16).toString("hex");
3758
- u.rename(s3, e, (i) => {
3820
+ var Oe = /* @__PURE__ */ Symbol("checkedCwd");
3821
+ var fo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
3822
+ var Te = fo === "win32";
3823
+ var mo = 1024;
3824
+ var uo = (s3, t) => {
3825
+ if (!Te) return m.unlink(s3, t);
3826
+ let e = s3 + ".DELETE." + Mr(16).toString("hex");
3827
+ m.rename(s3, e, (i) => {
3759
3828
  if (i) return t(i);
3760
- u.unlink(e, t);
3829
+ m.unlink(e, t);
3761
3830
  });
3762
3831
  };
3763
- var ho = (s3) => {
3764
- if (!Oe) return u.unlinkSync(s3);
3765
- let t = s3 + ".DELETE." + Ir(16).toString("hex");
3766
- u.renameSync(s3, t), u.unlinkSync(t);
3832
+ var po = (s3) => {
3833
+ if (!Te) return m.unlinkSync(s3);
3834
+ let t = s3 + ".DELETE." + Mr(16).toString("hex");
3835
+ m.renameSync(s3, t), m.unlinkSync(t);
3767
3836
  };
3768
- var Dr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
3769
- var qt = class extends st {
3770
- [ws] = false;
3771
- [ge] = false;
3772
- [wi] = 0;
3773
- reservations = new Ei();
3837
+ var vr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
3838
+ var Xt = class extends rt {
3839
+ [gs] = false;
3840
+ [Oe] = false;
3841
+ [Ri] = 0;
3842
+ reservations = new yi();
3774
3843
  transform;
3775
3844
  writable = true;
3776
3845
  readable = false;
@@ -3797,32 +3866,32 @@ var qt = class extends st {
3797
3866
  chmod;
3798
3867
  constructor(t = {}) {
3799
3868
  if (t.ondone = () => {
3800
- this[ws] = true, this[Ss]();
3869
+ this[gs] = true, this[bs]();
3801
3870
  }, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
3802
3871
  if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
3803
3872
  if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
3804
3873
  this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
3805
3874
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
3806
- this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : no, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(R.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : _r() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[gr](e));
3875
+ this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? process.getuid?.() === 0 : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : mo, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Te, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(R.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : Lr() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[Dr](e));
3807
3876
  }
3808
3877
  warn(t, e, i = {}) {
3809
3878
  return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
3810
3879
  }
3811
- [Ss]() {
3812
- this[ws] && this[wi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
3880
+ [bs]() {
3881
+ this[gs] && this[Ri] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
3813
3882
  }
3814
- [Es](t, e) {
3883
+ [Rs](t, e) {
3815
3884
  let i = t[e], { type: r } = t;
3816
3885
  if (!i || this.preservePaths) return true;
3817
3886
  let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
3818
- if (h.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
3887
+ if (h.includes("..") || Te && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
3819
3888
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
3820
3889
  let a = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(a, h.join("/")));
3821
3890
  if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
3822
3891
  }
3823
3892
  return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
3824
3893
  }
3825
- [Nr](t) {
3894
+ [Fr](t) {
3826
3895
  let e = f(t.path), i = e.split("/");
3827
3896
  if (this.strip) {
3828
3897
  if (i.length < this.strip) return false;
@@ -3834,20 +3903,20 @@ var qt = class extends st {
3834
3903
  i.splice(0, this.strip), t.path = i.join("/");
3835
3904
  }
3836
3905
  if (isFinite(this.maxDepth) && i.length > this.maxDepth) return this.warn("TAR_ENTRY_ERROR", "path excessively deep", { entry: t, path: e, depth: i.length, maxDepth: this.maxDepth }), false;
3837
- if (!this[Es](t, "path") || !this[Es](t, "linkpath")) return false;
3906
+ if (!this[Rs](t, "path") || !this[Rs](t, "linkpath")) return false;
3838
3907
  if (t.absolute = R.isAbsolute(t.path) ? f(R.resolve(t.path)) : f(R.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
3839
3908
  if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
3840
3909
  if (this.win32) {
3841
3910
  let { root: r } = R.win32.parse(String(t.absolute));
3842
- t.absolute = r + Xi(String(t.absolute).slice(r.length));
3911
+ t.absolute = r + ts(String(t.absolute).slice(r.length));
3843
3912
  let { root: n } = R.win32.parse(t.path);
3844
- t.path = n + Xi(t.path.slice(n.length));
3913
+ t.path = n + ts(t.path.slice(n.length));
3845
3914
  }
3846
3915
  return true;
3847
3916
  }
3848
- [gr](t) {
3849
- if (!this[Nr](t)) return t.resume();
3850
- switch (so.equal(typeof t.absolute, "string"), t.type) {
3917
+ [Dr](t) {
3918
+ if (!this[Fr](t)) return t.resume();
3919
+ switch (co.equal(typeof t.absolute, "string"), t.type) {
3851
3920
  case "Directory":
3852
3921
  case "GNUDumpDir":
3853
3922
  t.mode && (t.mode = t.mode | 448);
@@ -3856,40 +3925,40 @@ var qt = class extends st {
3856
3925
  case "ContiguousFile":
3857
3926
  case "Link":
3858
3927
  case "SymbolicLink":
3859
- return this[ys](t);
3928
+ return this[_s](t);
3860
3929
  default:
3861
- return this[Lr](t);
3930
+ return this[Cr](t);
3862
3931
  }
3863
3932
  }
3864
3933
  [O](t, e) {
3865
- t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
3934
+ t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[$t](), e.resume());
3866
3935
  }
3867
- [St](t, e, i) {
3868
- Er(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
3936
+ [yt](t, e, i) {
3937
+ gr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
3869
3938
  }
3870
- [Re](t) {
3939
+ [ge](t) {
3871
3940
  return this.forceChown || this.preserveOwner && (typeof t.uid == "number" && t.uid !== this.processUid || typeof t.gid == "number" && t.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
3872
3941
  }
3873
3942
  [be](t) {
3874
- return Dr(this.uid, t.uid, this.processUid);
3943
+ return vr(this.uid, t.uid, this.processUid);
3875
3944
  }
3876
3945
  [_e](t) {
3877
- return Dr(this.gid, t.gid, this.processGid);
3946
+ return vr(this.gid, t.gid, this.processGid);
3878
3947
  }
3879
- [bs](t, e) {
3880
- let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt(String(t.absolute), { flags: cs(t.size), mode: i, autoClose: false });
3948
+ [Ts](t, e) {
3949
+ let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new et(String(t.absolute), { flags: us(t.size), mode: i, autoClose: false });
3881
3950
  r.on("error", (a) => {
3882
- r.fd && u.close(r.fd, () => {
3951
+ r.fd && m.close(r.fd, () => {
3883
3952
  }), r.write = () => true, this[O](a, t), e();
3884
3953
  });
3885
3954
  let n = 1, o = (a) => {
3886
3955
  if (a) {
3887
- r.fd && u.close(r.fd, () => {
3956
+ r.fd && m.close(r.fd, () => {
3888
3957
  }), this[O](a, t), e();
3889
3958
  return;
3890
3959
  }
3891
- --n === 0 && r.fd !== void 0 && u.close(r.fd, (l) => {
3892
- l ? this[O](l, t) : this[Xt](), e();
3960
+ --n === 0 && r.fd !== void 0 && m.close(r.fd, (l) => {
3961
+ l ? this[O](l, t) : this[$t](), e();
3893
3962
  });
3894
3963
  };
3895
3964
  r.on("finish", () => {
@@ -3897,12 +3966,12 @@ var qt = class extends st {
3897
3966
  if (typeof l == "number" && t.mtime && !this.noMtime) {
3898
3967
  n++;
3899
3968
  let c = t.atime || /* @__PURE__ */ new Date(), d = t.mtime;
3900
- u.futimes(l, c, d, (S) => S ? u.utimes(a, c, d, (T) => o(T && S)) : o());
3969
+ m.futimes(l, c, d, (y) => y ? m.utimes(a, c, d, (T) => o(T && y)) : o());
3901
3970
  }
3902
- if (typeof l == "number" && this[Re](t)) {
3971
+ if (typeof l == "number" && this[ge](t)) {
3903
3972
  n++;
3904
3973
  let c = this[be](t), d = this[_e](t);
3905
- typeof c == "number" && typeof d == "number" && u.fchown(l, c, d, (S) => S ? u.chown(a, c, d, (T) => o(T && S)) : o());
3974
+ typeof c == "number" && typeof d == "number" && m.fchown(l, c, d, (y) => y ? m.chown(a, c, d, (T) => o(T && y)) : o());
3906
3975
  }
3907
3976
  o();
3908
3977
  });
@@ -3911,76 +3980,76 @@ var qt = class extends st {
3911
3980
  this[O](a, t), e();
3912
3981
  }), t.pipe(h)), h.pipe(r);
3913
3982
  }
3914
- [_s](t, e) {
3983
+ [xs](t, e) {
3915
3984
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
3916
- this[St](String(t.absolute), i, (r) => {
3985
+ this[yt](String(t.absolute), i, (r) => {
3917
3986
  if (r) {
3918
3987
  this[O](r, t), e();
3919
3988
  return;
3920
3989
  }
3921
3990
  let n = 1, o = () => {
3922
- --n === 0 && (e(), this[Xt](), t.resume());
3991
+ --n === 0 && (e(), this[$t](), t.resume());
3923
3992
  };
3924
- t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, u.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
3993
+ t.mtime && !this.noMtime && (n++, m.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[ge](t) && (n++, m.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
3925
3994
  });
3926
3995
  }
3927
- [Lr](t) {
3996
+ [Cr](t) {
3928
3997
  t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
3929
3998
  }
3930
- [Tr](t, e) {
3999
+ [Ar](t, e) {
3931
4000
  let i = f(R.relative(this.cwd, R.resolve(R.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
3932
- this[ye](t, this.cwd, i, () => this[Si](t, String(t.linkpath), "symlink", e), (r) => {
4001
+ this[Re](t, this.cwd, i, () => this[gi](t, String(t.linkpath), "symlink", e), (r) => {
3933
4002
  this[O](r, t), e();
3934
4003
  });
3935
4004
  }
3936
- [xr](t, e) {
4005
+ [Ir](t, e) {
3937
4006
  let i = f(R.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
3938
- this[ye](t, this.cwd, r, () => this[Si](t, i, "link", e), (n) => {
4007
+ this[Re](t, this.cwd, r, () => this[gi](t, i, "link", e), (n) => {
3939
4008
  this[O](n, t), e();
3940
4009
  });
3941
4010
  }
3942
- [ye](t, e, i, r, n) {
4011
+ [Re](t, e, i, r, n) {
3943
4012
  let o = i.shift();
3944
4013
  if (this.preservePaths || o === void 0) return r();
3945
4014
  let h = R.resolve(e, o);
3946
- u.lstat(h, (a, l) => {
4015
+ m.lstat(h, (a, l) => {
3947
4016
  if (a) return r();
3948
- if (l?.isSymbolicLink()) return n(new wt(h, R.resolve(h, i.join("/"))));
3949
- this[ye](t, h, i, r, n);
4017
+ if (l?.isSymbolicLink()) return n(new St(h, R.resolve(h, i.join("/"))));
4018
+ this[Re](t, h, i, r, n);
3950
4019
  });
3951
4020
  }
3952
- [Ar]() {
3953
- this[wi]++;
4021
+ [kr]() {
4022
+ this[Ri]++;
3954
4023
  }
3955
- [Xt]() {
3956
- this[wi]--, this[Ss]();
4024
+ [$t]() {
4025
+ this[Ri]--, this[bs]();
3957
4026
  }
3958
- [gs](t) {
3959
- this[Xt](), t.resume();
4027
+ [Ls](t) {
4028
+ this[$t](), t.resume();
3960
4029
  }
3961
- [Rs](t, e) {
3962
- return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
4030
+ [Os](t, e) {
4031
+ return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Te;
3963
4032
  }
3964
- [ys](t) {
3965
- this[Ar]();
4033
+ [_s](t) {
4034
+ this[kr]();
3966
4035
  let e = [t.path];
3967
- t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Or](t, i));
4036
+ t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Nr](t, i));
3968
4037
  }
3969
- [Or](t, e) {
4038
+ [Nr](t, e) {
3970
4039
  let i = (h) => {
3971
4040
  e(h);
3972
4041
  }, r = () => {
3973
- this[St](this.cwd, this.dmode, (h) => {
4042
+ this[yt](this.cwd, this.dmode, (h) => {
3974
4043
  if (h) {
3975
4044
  this[O](h, t), i();
3976
4045
  return;
3977
4046
  }
3978
- this[ge] = true, n();
4047
+ this[Oe] = true, n();
3979
4048
  });
3980
4049
  }, n = () => {
3981
4050
  if (t.absolute !== this.cwd) {
3982
4051
  let h = f(R.dirname(String(t.absolute)));
3983
- if (h !== this.cwd) return this[St](h, this.dmode, (a) => {
4052
+ if (h !== this.cwd) return this[yt](h, this.dmode, (a) => {
3984
4053
  if (a) {
3985
4054
  this[O](a, t), i();
3986
4055
  return;
@@ -3990,24 +4059,24 @@ var qt = class extends st {
3990
4059
  }
3991
4060
  o();
3992
4061
  }, o = () => {
3993
- u.lstat(String(t.absolute), (h, a) => {
4062
+ m.lstat(String(t.absolute), (h, a) => {
3994
4063
  if (a && (this.keep || this.newer && a.mtime > (t.mtime ?? a.mtime))) {
3995
- this[gs](t), i();
4064
+ this[Ls](t), i();
3996
4065
  return;
3997
4066
  }
3998
- if (h || this[Rs](t, a)) return this[P](null, t, i);
4067
+ if (h || this[Os](t, a)) return this[P](null, t, i);
3999
4068
  if (a.isDirectory()) {
4000
4069
  if (t.type === "Directory") {
4001
4070
  let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
4002
- return l ? u.chmod(String(t.absolute), Number(t.mode), c) : c();
4071
+ return l ? m.chmod(String(t.absolute), Number(t.mode), c) : c();
4003
4072
  }
4004
- if (t.absolute !== this.cwd) return u.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
4073
+ if (t.absolute !== this.cwd) return m.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
4005
4074
  }
4006
4075
  if (t.absolute === this.cwd) return this[P](null, t, i);
4007
- oo(String(t.absolute), (l) => this[P](l ?? null, t, i));
4076
+ uo(String(t.absolute), (l) => this[P](l ?? null, t, i));
4008
4077
  });
4009
4078
  };
4010
- this[ge] ? n() : r();
4079
+ this[Oe] ? n() : r();
4011
4080
  }
4012
4081
  [P](t, e, i) {
4013
4082
  if (t) {
@@ -4018,83 +4087,83 @@ var qt = class extends st {
4018
4087
  case "File":
4019
4088
  case "OldFile":
4020
4089
  case "ContiguousFile":
4021
- return this[bs](e, i);
4090
+ return this[Ts](e, i);
4022
4091
  case "Link":
4023
- return this[xr](e, i);
4092
+ return this[Ir](e, i);
4024
4093
  case "SymbolicLink":
4025
- return this[Tr](e, i);
4094
+ return this[Ar](e, i);
4026
4095
  case "Directory":
4027
4096
  case "GNUDumpDir":
4028
- return this[_s](e, i);
4097
+ return this[xs](e, i);
4029
4098
  }
4030
4099
  }
4031
- [Si](t, e, i, r) {
4032
- u[i](e, String(t.absolute), (n) => {
4033
- n ? this[O](n, t) : (this[Xt](), t.resume()), r();
4100
+ [gi](t, e, i, r) {
4101
+ m[i](e, String(t.absolute), (n) => {
4102
+ n ? this[O](n, t) : (this[$t](), t.resume()), r();
4034
4103
  });
4035
4104
  }
4036
4105
  };
4037
- var Se = (s3) => {
4106
+ var ye = (s3) => {
4038
4107
  try {
4039
4108
  return [null, s3()];
4040
4109
  } catch (t) {
4041
4110
  return [t, null];
4042
4111
  }
4043
4112
  };
4044
- var Te = class extends qt {
4113
+ var xe = class extends Xt {
4045
4114
  sync = true;
4046
4115
  [P](t, e) {
4047
4116
  return super[P](t, e, () => {
4048
4117
  });
4049
4118
  }
4050
- [ys](t) {
4051
- if (!this[ge]) {
4052
- let n = this[St](this.cwd, this.dmode);
4119
+ [_s](t) {
4120
+ if (!this[Oe]) {
4121
+ let n = this[yt](this.cwd, this.dmode);
4053
4122
  if (n) return this[O](n, t);
4054
- this[ge] = true;
4123
+ this[Oe] = true;
4055
4124
  }
4056
4125
  if (t.absolute !== this.cwd) {
4057
4126
  let n = f(R.dirname(String(t.absolute)));
4058
4127
  if (n !== this.cwd) {
4059
- let o = this[St](n, this.dmode);
4128
+ let o = this[yt](n, this.dmode);
4060
4129
  if (o) return this[O](o, t);
4061
4130
  }
4062
4131
  }
4063
- let [e, i] = Se(() => u.lstatSync(String(t.absolute)));
4064
- if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[gs](t);
4065
- if (e || this[Rs](t, i)) return this[P](null, t);
4132
+ let [e, i] = ye(() => m.lstatSync(String(t.absolute)));
4133
+ if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Ls](t);
4134
+ if (e || this[Os](t, i)) return this[P](null, t);
4066
4135
  if (i.isDirectory()) {
4067
4136
  if (t.type === "Directory") {
4068
- let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? Se(() => {
4069
- u.chmodSync(String(t.absolute), Number(t.mode));
4137
+ let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? ye(() => {
4138
+ m.chmodSync(String(t.absolute), Number(t.mode));
4070
4139
  }) : [];
4071
4140
  return this[P](h, t);
4072
4141
  }
4073
- let [n] = Se(() => u.rmdirSync(String(t.absolute)));
4142
+ let [n] = ye(() => m.rmdirSync(String(t.absolute)));
4074
4143
  this[P](n, t);
4075
4144
  }
4076
- let [r] = t.absolute === this.cwd ? [] : Se(() => ho(String(t.absolute)));
4145
+ let [r] = t.absolute === this.cwd ? [] : ye(() => po(String(t.absolute)));
4077
4146
  this[P](r, t);
4078
4147
  }
4079
- [bs](t, e) {
4148
+ [Ts](t, e) {
4080
4149
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
4081
4150
  let a;
4082
4151
  try {
4083
- u.closeSync(n);
4152
+ m.closeSync(n);
4084
4153
  } catch (l) {
4085
4154
  a = l;
4086
4155
  }
4087
4156
  (h || a) && this[O](h || a, t), e();
4088
4157
  }, n;
4089
4158
  try {
4090
- n = u.openSync(String(t.absolute), cs(t.size), i);
4159
+ n = m.openSync(String(t.absolute), us(t.size), i);
4091
4160
  } catch (h) {
4092
4161
  return r(h);
4093
4162
  }
4094
4163
  let o = this.transform && this.transform(t) || t;
4095
4164
  o !== t && (o.on("error", (h) => this[O](h, t)), t.pipe(o)), o.on("data", (h) => {
4096
4165
  try {
4097
- u.writeSync(n, h, 0, h.length);
4166
+ m.writeSync(n, h, 0, h.length);
4098
4167
  } catch (a) {
4099
4168
  r(a);
4100
4169
  }
@@ -4103,22 +4172,22 @@ var Te = class extends qt {
4103
4172
  if (t.mtime && !this.noMtime) {
4104
4173
  let a = t.atime || /* @__PURE__ */ new Date(), l = t.mtime;
4105
4174
  try {
4106
- u.futimesSync(n, a, l);
4175
+ m.futimesSync(n, a, l);
4107
4176
  } catch (c) {
4108
4177
  try {
4109
- u.utimesSync(String(t.absolute), a, l);
4178
+ m.utimesSync(String(t.absolute), a, l);
4110
4179
  } catch {
4111
4180
  h = c;
4112
4181
  }
4113
4182
  }
4114
4183
  }
4115
- if (this[Re](t)) {
4184
+ if (this[ge](t)) {
4116
4185
  let a = this[be](t), l = this[_e](t);
4117
4186
  try {
4118
- u.fchownSync(n, Number(a), Number(l));
4187
+ m.fchownSync(n, Number(a), Number(l));
4119
4188
  } catch (c) {
4120
4189
  try {
4121
- u.chownSync(String(t.absolute), Number(a), Number(l));
4190
+ m.chownSync(String(t.absolute), Number(a), Number(l));
4122
4191
  } catch {
4123
4192
  h = h || c;
4124
4193
  }
@@ -4127,57 +4196,57 @@ var Te = class extends qt {
4127
4196
  r(h);
4128
4197
  });
4129
4198
  }
4130
- [_s](t, e) {
4131
- let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[St](String(t.absolute), i);
4199
+ [xs](t, e) {
4200
+ let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[yt](String(t.absolute), i);
4132
4201
  if (r) {
4133
4202
  this[O](r, t), e();
4134
4203
  return;
4135
4204
  }
4136
4205
  if (t.mtime && !this.noMtime) try {
4137
- u.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
4206
+ m.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
4138
4207
  } catch {
4139
4208
  }
4140
- if (this[Re](t)) try {
4141
- u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
4209
+ if (this[ge](t)) try {
4210
+ m.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
4142
4211
  } catch {
4143
4212
  }
4144
4213
  e(), t.resume();
4145
4214
  }
4146
- [St](t, e) {
4215
+ [yt](t, e) {
4147
4216
  try {
4148
- return Sr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
4217
+ return _r(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
4149
4218
  } catch (i) {
4150
4219
  return i;
4151
4220
  }
4152
4221
  }
4153
- [ye](t, e, i, r, n) {
4222
+ [Re](t, e, i, r, n) {
4154
4223
  if (this.preservePaths || i.length === 0) return r();
4155
4224
  let o = e;
4156
4225
  for (let h of i) {
4157
4226
  o = R.resolve(o, h);
4158
- let [a, l] = Se(() => u.lstatSync(o));
4227
+ let [a, l] = ye(() => m.lstatSync(o));
4159
4228
  if (a) return r();
4160
- if (l.isSymbolicLink()) return n(new wt(o, R.resolve(e, i.join("/"))));
4229
+ if (l.isSymbolicLink()) return n(new St(o, R.resolve(e, i.join("/"))));
4161
4230
  }
4162
4231
  r();
4163
4232
  }
4164
- [Si](t, e, i, r) {
4233
+ [gi](t, e, i, r) {
4165
4234
  let n = `${i}Sync`;
4166
4235
  try {
4167
- u[n](e, String(t.absolute)), r(), t.resume();
4236
+ m[n](e, String(t.absolute)), r(), t.resume();
4168
4237
  } catch (o) {
4169
4238
  return this[O](o, t);
4170
4239
  }
4171
4240
  }
4172
4241
  };
4173
- var ao = (s3) => {
4174
- let t = new Te(s3), e = s3.file, i = Cr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
4175
- new Me(e, { readSize: r, size: i.size }).pipe(t);
4242
+ var Eo = (s3) => {
4243
+ let t = new xe(s3), e = s3.file, i = Br.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
4244
+ new Be(e, { readSize: r, size: i.size }).pipe(t);
4176
4245
  };
4177
- var lo = (s3, t) => {
4178
- let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
4246
+ var wo = (s3, t) => {
4247
+ let e = new Xt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
4179
4248
  return new Promise((o, h) => {
4180
- e.on("error", h), e.on("close", o), Cr.stat(r, (a, l) => {
4249
+ e.on("error", h), e.on("close", o), Br.stat(r, (a, l) => {
4181
4250
  if (a) h(a);
4182
4251
  else {
4183
4252
  let c = new _t(r, { readSize: i, size: l.size });
@@ -4186,10 +4255,10 @@ var lo = (s3, t) => {
4186
4255
  });
4187
4256
  });
4188
4257
  };
4189
- var co = K(ao, lo, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
4190
- t?.length && Ki(s3, t);
4258
+ var So = K(Eo, wo, (s3) => new xe(s3), (s3) => new Xt(s3), (s3, t) => {
4259
+ t?.length && Qi(s3, t);
4191
4260
  });
4192
- var fo = (s3, t) => {
4261
+ var yo = (s3, t) => {
4193
4262
  let e = new kt(s3), i = true, r, n;
4194
4263
  try {
4195
4264
  try {
@@ -4210,7 +4279,7 @@ var fo = (s3, t) => {
4210
4279
  if (n + l + 512 > o.size) break;
4211
4280
  n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
4212
4281
  }
4213
- i = false, uo(s3, e, n, r, t);
4282
+ i = false, Ro(s3, e, n, r, t);
4214
4283
  } finally {
4215
4284
  if (i) try {
4216
4285
  v.closeSync(r);
@@ -4218,75 +4287,75 @@ var fo = (s3, t) => {
4218
4287
  }
4219
4288
  }
4220
4289
  };
4221
- var uo = (s3, t, e, i, r) => {
4290
+ var Ro = (s3, t, e, i, r) => {
4222
4291
  let n = new Wt(s3.file, { fd: i, start: e });
4223
- t.pipe(n), po(t, r);
4292
+ t.pipe(n), bo(t, r);
4224
4293
  };
4225
- var mo = (s3, t) => {
4294
+ var go = (s3, t) => {
4226
4295
  t = Array.from(t);
4227
- let e = new Et(s3), i = (n, o, h) => {
4228
- let a = (T, N) => {
4229
- T ? v.close(n, (E) => h(T)) : h(null, N);
4296
+ let e = new wt(s3), i = (n, o, h) => {
4297
+ let a = (T, D) => {
4298
+ T ? v.close(n, (E) => h(T)) : h(null, D);
4230
4299
  }, l = 0;
4231
4300
  if (o === 0) return a(null, 0);
4232
- let c = 0, d = Buffer.alloc(512), S = (T, N) => {
4233
- if (T || N === void 0) return a(T);
4234
- if (c += N, c < 512 && N) return v.read(n, d, c, d.length - c, l + c, S);
4301
+ let c = 0, d = Buffer.alloc(512), y = (T, D) => {
4302
+ if (T || D === void 0) return a(T);
4303
+ if (c += D, c < 512 && D) return v.read(n, d, c, d.length - c, l + c, y);
4235
4304
  if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
4236
4305
  if (c < 512) return a(null, l);
4237
4306
  let E = new F(d);
4238
4307
  if (!E.cksumValid) return a(null, l);
4239
4308
  let x = 512 * Math.ceil((E.size ?? 0) / 512);
4240
4309
  if (l + x + 512 > o || (l += x + 512, l >= o)) return a(null, l);
4241
- s3.mtimeCache && E.mtime && s3.mtimeCache.set(String(E.path), E.mtime), c = 0, v.read(n, d, 0, 512, l, S);
4310
+ s3.mtimeCache && E.mtime && s3.mtimeCache.set(String(E.path), E.mtime), c = 0, v.read(n, d, 0, 512, l, y);
4242
4311
  };
4243
- v.read(n, d, 0, 512, l, S);
4312
+ v.read(n, d, 0, 512, l, y);
4244
4313
  };
4245
4314
  return new Promise((n, o) => {
4246
4315
  e.on("error", o);
4247
4316
  let h = "r+", a = (l, c) => {
4248
4317
  if (l && l.code === "ENOENT" && h === "r+") return h = "w+", v.open(s3.file, h, a);
4249
4318
  if (l || !c) return o(l);
4250
- v.fstat(c, (d, S) => {
4319
+ v.fstat(c, (d, y) => {
4251
4320
  if (d) return v.close(c, () => o(d));
4252
- i(c, S.size, (T, N) => {
4321
+ i(c, y.size, (T, D) => {
4253
4322
  if (T) return o(T);
4254
- let E = new tt(s3.file, { fd: c, start: N });
4255
- e.pipe(E), E.on("error", o), E.on("close", n), Eo(e, t);
4323
+ let E = new et(s3.file, { fd: c, start: D });
4324
+ e.pipe(E), E.on("error", o), E.on("close", n), _o(e, t);
4256
4325
  });
4257
4326
  });
4258
4327
  };
4259
4328
  v.open(s3.file, h, a);
4260
4329
  });
4261
4330
  };
4262
- var po = (s3, t) => {
4331
+ var bo = (s3, t) => {
4263
4332
  t.forEach((e) => {
4264
- e.charAt(0) === "@" ? It({ file: Fr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
4333
+ e.charAt(0) === "@" ? Ct({ file: Pr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
4265
4334
  }), s3.end();
4266
4335
  };
4267
- var Eo = async (s3, t) => {
4268
- for (let e of t) e.charAt(0) === "@" ? await It({ file: Fr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
4336
+ var _o = async (s3, t) => {
4337
+ for (let e of t) e.charAt(0) === "@" ? await Ct({ file: Pr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
4269
4338
  s3.end();
4270
4339
  };
4271
- var vt = K(fo, mo, () => {
4340
+ var vt = K(yo, go, () => {
4272
4341
  throw new TypeError("file is required");
4273
4342
  }, () => {
4274
4343
  throw new TypeError("file is required");
4275
4344
  }, (s3, t) => {
4276
- if (!Fs(s3)) throw new TypeError("file is required");
4345
+ if (!Bs(s3)) throw new TypeError("file is required");
4277
4346
  if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
4278
4347
  if (!t?.length) throw new TypeError("no paths specified to add/replace");
4279
4348
  });
4280
- var wo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
4281
- vt.validate?.(s3, t), So(s3);
4349
+ var Oo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
4350
+ vt.validate?.(s3, t), To(s3);
4282
4351
  });
4283
- var So = (s3) => {
4352
+ var To = (s3) => {
4284
4353
  let t = s3.filter;
4285
4354
  s3.mtimeCache || (s3.mtimeCache = /* @__PURE__ */ new Map()), s3.filter = t ? (e, i) => t(e, i) && !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0)) : (e, i) => !((s3.mtimeCache?.get(e) ?? i.mtime ?? 0) > (i.mtime ?? 0));
4286
4355
  };
4287
4356
 
4288
4357
  export {
4289
4358
  require_lib,
4290
- It,
4291
- Zn
4359
+ Ct,
4360
+ Qn
4292
4361
  };