piral-cli 1.11.1-beta.efeabd1 → 1.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/external/index.js +974 -959
  2. package/package.json +2 -2
@@ -5203,25 +5203,25 @@ var require_validation = __commonJS({
5203
5203
  const self2 = {};
5204
5204
  self2.nonOptionCount = function nonOptionCount(argv) {
5205
5205
  const demandedCommands = yargs2.getDemandedCommands();
5206
- const _s = argv._.length - yargs2.getContext().commands.length;
5207
- if (demandedCommands._ && (_s < demandedCommands._.min || _s > demandedCommands._.max)) {
5208
- if (_s < demandedCommands._.min) {
5206
+ const _s2 = argv._.length - yargs2.getContext().commands.length;
5207
+ if (demandedCommands._ && (_s2 < demandedCommands._.min || _s2 > demandedCommands._.max)) {
5208
+ if (_s2 < demandedCommands._.min) {
5209
5209
  if (demandedCommands._.minMsg !== void 0) {
5210
5210
  usage.fail(
5211
5211
  // replace $0 with observed, $1 with expected.
5212
- demandedCommands._.minMsg ? demandedCommands._.minMsg.replace(/\$0/g, _s.toString()).replace(/\$1/, demandedCommands._.min.toString()) : null
5212
+ demandedCommands._.minMsg ? demandedCommands._.minMsg.replace(/\$0/g, _s2.toString()).replace(/\$1/, demandedCommands._.min.toString()) : null
5213
5213
  );
5214
5214
  } else {
5215
- usage.fail(__n("Not enough non-option arguments: got %s, need at least %s", "Not enough non-option arguments: got %s, need at least %s", _s, _s, demandedCommands._.min));
5215
+ usage.fail(__n("Not enough non-option arguments: got %s, need at least %s", "Not enough non-option arguments: got %s, need at least %s", _s2, _s2, demandedCommands._.min));
5216
5216
  }
5217
- } else if (_s > demandedCommands._.max) {
5217
+ } else if (_s2 > demandedCommands._.max) {
5218
5218
  if (demandedCommands._.maxMsg !== void 0) {
5219
5219
  usage.fail(
5220
5220
  // replace $0 with observed, $1 with expected.
5221
- demandedCommands._.maxMsg ? demandedCommands._.maxMsg.replace(/\$0/g, _s.toString()).replace(/\$1/, demandedCommands._.max.toString()) : null
5221
+ demandedCommands._.maxMsg ? demandedCommands._.maxMsg.replace(/\$0/g, _s2.toString()).replace(/\$1/, demandedCommands._.max.toString()) : null
5222
5222
  );
5223
5223
  } else {
5224
- usage.fail(__n("Too many non-option arguments: got %s, maximum of %s", "Too many non-option arguments: got %s, maximum of %s", _s, _s, demandedCommands._.max));
5224
+ usage.fail(__n("Too many non-option arguments: got %s, maximum of %s", "Too many non-option arguments: got %s, maximum of %s", _s2, _s2, demandedCommands._.max));
5225
5225
  }
5226
5226
  }
5227
5227
  }
@@ -19429,6 +19429,9 @@ var require_form_data = __commonJS({
19429
19429
  var setToStringTag = require_es_set_tostringtag();
19430
19430
  var hasOwn = require_hasown();
19431
19431
  var populate = require_populate();
19432
+ function escapeHeaderParam(str) {
19433
+ return String(str).replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/"/g, "%22");
19434
+ }
19432
19435
  function FormData4(options) {
19433
19436
  if (!(this instanceof FormData4)) {
19434
19437
  return new FormData4(options);
@@ -19518,7 +19521,7 @@ var require_form_data = __commonJS({
19518
19521
  var contents = "";
19519
19522
  var headers = {
19520
19523
  // add custom disposition as third element or keep it two elements if not
19521
- "Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []),
19524
+ "Content-Disposition": ["form-data", 'name="' + escapeHeaderParam(field) + '"'].concat(contentDisposition || []),
19522
19525
  // if no content type. allow it to be empty array
19523
19526
  "Content-Type": [].concat(contentType || [])
19524
19527
  };
@@ -19552,7 +19555,7 @@ var require_form_data = __commonJS({
19552
19555
  filename = path3.basename(value.client._httpMessage.path || "");
19553
19556
  }
19554
19557
  if (filename) {
19555
- return 'filename="' + filename + '"';
19558
+ return 'filename="' + escapeHeaderParam(filename) + '"';
19556
19559
  }
19557
19560
  };
19558
19561
  FormData4.prototype._getContentType = function(value, options) {
@@ -49285,30 +49288,30 @@ var jju = __toESM(require_jju());
49285
49288
  // ../../../node_modules/tar/dist/esm/index.min.js
49286
49289
  var index_min_exports = {};
49287
49290
  __export(index_min_exports, {
49288
- Header: () => F,
49289
- Pack: () => Et,
49290
- PackJob: () => fi,
49291
+ Header: () => C,
49292
+ Pack: () => wt,
49293
+ PackJob: () => mi,
49291
49294
  PackSync: () => kt,
49292
49295
  Parser: () => st,
49293
49296
  Pax: () => ct,
49294
- ReadEntry: () => Yt,
49295
- Unpack: () => qt,
49297
+ ReadEntry: () => Ve,
49298
+ Unpack: () => Xt,
49296
49299
  UnpackSync: () => Te,
49297
- WriteEntry: () => de,
49298
- WriteEntrySync: () => ii,
49299
- WriteEntryTar: () => si,
49300
- c: () => zn,
49301
- create: () => zn,
49302
- extract: () => lo,
49303
- filesFilter: () => Yi,
49304
- list: () => It,
49300
+ WriteEntry: () => fe,
49301
+ WriteEntrySync: () => ri,
49302
+ WriteEntryTar: () => ni,
49303
+ c: () => Kn,
49304
+ create: () => Kn,
49305
+ extract: () => uo,
49306
+ filesFilter: () => Xi,
49307
+ list: () => Ft,
49305
49308
  r: () => vt,
49306
49309
  replace: () => vt,
49307
- t: () => It,
49308
- types: () => Mi,
49309
- u: () => Eo,
49310
- update: () => Eo,
49311
- x: () => lo
49310
+ t: () => Ft,
49311
+ types: () => Ui,
49312
+ u: () => yo,
49313
+ update: () => yo,
49314
+ x: () => uo
49312
49315
  });
49313
49316
  var import_events = __toESM(require("events"), 1);
49314
49317
  var import_fs = __toESM(require("fs"), 1);
@@ -49321,7 +49324,7 @@ var import_path = require("path");
49321
49324
  var import_events2 = require("events");
49322
49325
  var import_assert = __toESM(require("assert"), 1);
49323
49326
  var import_buffer = require("buffer");
49324
- var vs = __toESM(require("zlib"), 1);
49327
+ var Ms = __toESM(require("zlib"), 1);
49325
49328
  var import_zlib = __toESM(require("zlib"), 1);
49326
49329
  var import_node_path2 = require("node:path");
49327
49330
  var import_node_path3 = require("node:path");
@@ -49344,51 +49347,51 @@ var import_node_path7 = __toESM(require("node:path"), 1);
49344
49347
  var import_node_path8 = require("node:path");
49345
49348
  var import_node_fs6 = __toESM(require("node:fs"), 1);
49346
49349
  var import_node_path9 = __toESM(require("node:path"), 1);
49347
- var Dr = Object.defineProperty;
49348
- var Ar = (s3, t) => {
49349
- for (var e in t) Dr(s3, e, { get: t[e], enumerable: true });
49350
+ var Mr = Object.defineProperty;
49351
+ var Br = (s3, t) => {
49352
+ for (var e in t) Mr(s3, e, { get: t[e], enumerable: true });
49350
49353
  };
49351
- var Ts = typeof process == "object" && process ? process : { stdout: null, stderr: null };
49352
- var Cr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof import_node_stream.default || Fr(s3) || kr(s3));
49353
- var Fr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.pipe == "function" && s3.pipe !== import_node_stream.default.Writable.prototype.pipe;
49354
- var kr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
49354
+ var xs = typeof process == "object" && process ? process : { stdout: null, stderr: null };
49355
+ var zr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof import_node_stream.default || Ur(s3) || Hr(s3));
49356
+ var Ur = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.pipe == "function" && s3.pipe !== import_node_stream.default.Writable.prototype.pipe;
49357
+ var Hr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof import_node_events.EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
49355
49358
  var q = /* @__PURE__ */ Symbol("EOF");
49356
- var j = /* @__PURE__ */ Symbol("maybeEmitEnd");
49359
+ var Q = /* @__PURE__ */ Symbol("maybeEmitEnd");
49357
49360
  var rt = /* @__PURE__ */ Symbol("emittedEnd");
49358
- var xe = /* @__PURE__ */ Symbol("emittingEnd");
49359
- var jt = /* @__PURE__ */ Symbol("emittedError");
49360
- var Le = /* @__PURE__ */ Symbol("closed");
49361
- var xs = /* @__PURE__ */ Symbol("read");
49362
- var Ne = /* @__PURE__ */ Symbol("flush");
49363
- var Ls = /* @__PURE__ */ Symbol("flushChunk");
49361
+ var Le = /* @__PURE__ */ Symbol("emittingEnd");
49362
+ var qt = /* @__PURE__ */ Symbol("emittedError");
49363
+ var Ne = /* @__PURE__ */ Symbol("closed");
49364
+ var Ls = /* @__PURE__ */ Symbol("read");
49365
+ var De = /* @__PURE__ */ Symbol("flush");
49366
+ var Ns = /* @__PURE__ */ Symbol("flushChunk");
49364
49367
  var z = /* @__PURE__ */ Symbol("encoding");
49365
49368
  var Mt = /* @__PURE__ */ Symbol("decoder");
49366
- var b = /* @__PURE__ */ Symbol("flowing");
49369
+ var g = /* @__PURE__ */ Symbol("flowing");
49367
49370
  var Qt = /* @__PURE__ */ Symbol("paused");
49368
49371
  var Bt = /* @__PURE__ */ Symbol("resume");
49369
- var g = /* @__PURE__ */ Symbol("buffer");
49372
+ var b = /* @__PURE__ */ Symbol("buffer");
49370
49373
  var D = /* @__PURE__ */ Symbol("pipes");
49371
49374
  var _ = /* @__PURE__ */ Symbol("bufferLength");
49372
- var Si = /* @__PURE__ */ Symbol("bufferPush");
49373
- var De = /* @__PURE__ */ Symbol("bufferShift");
49375
+ var gi = /* @__PURE__ */ Symbol("bufferPush");
49376
+ var Ae = /* @__PURE__ */ Symbol("bufferShift");
49374
49377
  var L = /* @__PURE__ */ Symbol("objectMode");
49375
49378
  var w = /* @__PURE__ */ Symbol("destroyed");
49376
- var yi = /* @__PURE__ */ Symbol("error");
49377
- var Ri = /* @__PURE__ */ Symbol("emitData");
49378
- var Ns = /* @__PURE__ */ Symbol("emitEnd");
49379
- var bi = /* @__PURE__ */ Symbol("emitEnd2");
49379
+ var bi = /* @__PURE__ */ Symbol("error");
49380
+ var _i = /* @__PURE__ */ Symbol("emitData");
49381
+ var Ds = /* @__PURE__ */ Symbol("emitEnd");
49382
+ var Oi = /* @__PURE__ */ Symbol("emitEnd2");
49380
49383
  var Z = /* @__PURE__ */ Symbol("async");
49381
- var gi = /* @__PURE__ */ Symbol("abort");
49382
- var Ae = /* @__PURE__ */ Symbol("aborted");
49384
+ var Ti = /* @__PURE__ */ Symbol("abort");
49385
+ var Ie = /* @__PURE__ */ Symbol("aborted");
49383
49386
  var Jt = /* @__PURE__ */ Symbol("signal");
49384
- var yt = /* @__PURE__ */ Symbol("dataListeners");
49385
- var C = /* @__PURE__ */ Symbol("discarded");
49386
- var te = (s3) => Promise.resolve().then(s3);
49387
- var vr = (s3) => s3();
49388
- var Mr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
49389
- var Br = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
49390
- var Pr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
49391
- var Ie = class {
49387
+ var Rt = /* @__PURE__ */ Symbol("dataListeners");
49388
+ var F = /* @__PURE__ */ Symbol("discarded");
49389
+ var jt = (s3) => Promise.resolve().then(s3);
49390
+ var Wr = (s3) => s3();
49391
+ var Gr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
49392
+ var Zr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
49393
+ var Yr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
49394
+ var Fe = class {
49392
49395
  src;
49393
49396
  dest;
49394
49397
  opts;
@@ -49405,7 +49408,7 @@ var Ie = class {
49405
49408
  this.unpipe(), this.opts.end && this.dest.end();
49406
49409
  }
49407
49410
  };
49408
- var _i = class extends Ie {
49411
+ var xi = class extends Fe {
49409
49412
  unpipe() {
49410
49413
  this.src.removeListener("error", this.proxyErrors), super.unpipe();
49411
49414
  }
@@ -49413,36 +49416,36 @@ var _i = class extends Ie {
49413
49416
  super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
49414
49417
  }
49415
49418
  };
49416
- var zr = (s3) => !!s3.objectMode;
49417
- var Ur = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
49419
+ var Kr = (s3) => !!s3.objectMode;
49420
+ var Vr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
49418
49421
  var A = class extends import_node_events.EventEmitter {
49419
- [b] = false;
49422
+ [g] = false;
49420
49423
  [Qt] = false;
49421
49424
  [D] = [];
49422
- [g] = [];
49425
+ [b] = [];
49423
49426
  [L];
49424
49427
  [z];
49425
49428
  [Z];
49426
49429
  [Mt];
49427
49430
  [q] = false;
49428
49431
  [rt] = false;
49429
- [xe] = false;
49430
49432
  [Le] = false;
49431
- [jt] = null;
49433
+ [Ne] = false;
49434
+ [qt] = null;
49432
49435
  [_] = 0;
49433
49436
  [w] = false;
49434
49437
  [Jt];
49435
- [Ae] = false;
49436
- [yt] = 0;
49437
- [C] = false;
49438
+ [Ie] = false;
49439
+ [Rt] = 0;
49440
+ [F] = false;
49438
49441
  writable = true;
49439
49442
  readable = true;
49440
49443
  constructor(...t) {
49441
49444
  let e = t[0] || {};
49442
49445
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
49443
- zr(e) ? (this[L] = true, this[z] = null) : Ur(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[Mt] = this[z] ? new import_node_string_decoder.StringDecoder(this[z]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[g] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[D] });
49446
+ Kr(e) ? (this[L] = true, this[z] = null) : Vr(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[Mt] = this[z] ? new import_node_string_decoder.StringDecoder(this[z]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[b] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[D] });
49444
49447
  let { signal: i } = e;
49445
- i && (this[Jt] = i, i.aborted ? this[gi]() : i.addEventListener("abort", () => this[gi]()));
49448
+ i && (this[Jt] = i, i.aborted ? this[Ti]() : i.addEventListener("abort", () => this[Ti]()));
49446
49449
  }
49447
49450
  get bufferLength() {
49448
49451
  return this[_];
@@ -49468,99 +49471,99 @@ var A = class extends import_node_events.EventEmitter {
49468
49471
  set async(t) {
49469
49472
  this[Z] = this[Z] || !!t;
49470
49473
  }
49471
- [gi]() {
49472
- this[Ae] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
49474
+ [Ti]() {
49475
+ this[Ie] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
49473
49476
  }
49474
49477
  get aborted() {
49475
- return this[Ae];
49478
+ return this[Ie];
49476
49479
  }
49477
49480
  set aborted(t) {
49478
49481
  }
49479
49482
  write(t, e, i) {
49480
- if (this[Ae]) return false;
49483
+ if (this[Ie]) return false;
49481
49484
  if (this[q]) throw new Error("write after end");
49482
49485
  if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
49483
49486
  typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
49484
- let r = this[Z] ? te : vr;
49487
+ let r = this[Z] ? jt : Wr;
49485
49488
  if (!this[L] && !Buffer.isBuffer(t)) {
49486
- if (Pr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
49487
- else if (Br(t)) t = Buffer.from(t);
49489
+ if (Yr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
49490
+ else if (Zr(t)) t = Buffer.from(t);
49488
49491
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
49489
49492
  }
49490
- return this[L] ? (this[b] && this[_] !== 0 && this[Ne](true), this[b] ? this.emit("data", t) : this[Si](t), this[_] !== 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[_] !== 0 && this[Ne](true), this[b] ? this.emit("data", t) : this[Si](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[b]) : (this[_] !== 0 && this.emit("readable"), i && r(i), this[b]);
49493
+ return this[L] ? (this[g] && this[_] !== 0 && this[De](true), this[g] ? this.emit("data", t) : this[gi](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[De](true), this[g] ? this.emit("data", t) : this[gi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[g]) : (this[_] !== 0 && this.emit("readable"), i && r(i), this[g]);
49491
49494
  }
49492
49495
  read(t) {
49493
49496
  if (this[w]) return null;
49494
- if (this[C] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[j](), null;
49495
- this[L] && (t = null), this[g].length > 1 && !this[L] && (this[g] = [this[z] ? this[g].join("") : Buffer.concat(this[g], this[_])]);
49496
- let e = this[xs](t || null, this[g][0]);
49497
- return this[j](), e;
49497
+ if (this[F] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[Q](), null;
49498
+ this[L] && (t = null), this[b].length > 1 && !this[L] && (this[b] = [this[z] ? this[b].join("") : Buffer.concat(this[b], this[_])]);
49499
+ let e = this[Ls](t || null, this[b][0]);
49500
+ return this[Q](), e;
49498
49501
  }
49499
- [xs](t, e) {
49500
- if (this[L]) this[De]();
49502
+ [Ls](t, e) {
49503
+ if (this[L]) this[Ae]();
49501
49504
  else {
49502
49505
  let i = e;
49503
- t === i.length || t === null ? this[De]() : typeof i == "string" ? (this[g][0] = i.slice(t), e = i.slice(0, t), this[_] -= t) : (this[g][0] = i.subarray(t), e = i.subarray(0, t), this[_] -= t);
49506
+ t === i.length || t === null ? this[Ae]() : 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);
49504
49507
  }
49505
- return this.emit("data", e), !this[g].length && !this[q] && this.emit("drain"), e;
49508
+ return this.emit("data", e), !this[b].length && !this[q] && this.emit("drain"), e;
49506
49509
  }
49507
49510
  end(t, e, i) {
49508
- 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;
49511
+ 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[Q](), this;
49509
49512
  }
49510
49513
  [Bt]() {
49511
- this[w] || (!this[yt] && !this[D].length && (this[C] = true), this[Qt] = false, this[b] = true, this.emit("resume"), this[g].length ? this[Ne]() : this[q] ? this[j]() : this.emit("drain"));
49514
+ this[w] || (!this[Rt] && !this[D].length && (this[F] = true), this[Qt] = false, this[g] = true, this.emit("resume"), this[b].length ? this[De]() : this[q] ? this[Q]() : this.emit("drain"));
49512
49515
  }
49513
49516
  resume() {
49514
49517
  return this[Bt]();
49515
49518
  }
49516
49519
  pause() {
49517
- this[b] = false, this[Qt] = true, this[C] = false;
49520
+ this[g] = false, this[Qt] = true, this[F] = false;
49518
49521
  }
49519
49522
  get destroyed() {
49520
49523
  return this[w];
49521
49524
  }
49522
49525
  get flowing() {
49523
- return this[b];
49526
+ return this[g];
49524
49527
  }
49525
49528
  get paused() {
49526
49529
  return this[Qt];
49527
49530
  }
49528
- [Si](t) {
49529
- this[L] ? this[_] += 1 : this[_] += t.length, this[g].push(t);
49531
+ [gi](t) {
49532
+ this[L] ? this[_] += 1 : this[_] += t.length, this[b].push(t);
49530
49533
  }
49531
- [De]() {
49532
- return this[L] ? this[_] -= 1 : this[_] -= this[g][0].length, this[g].shift();
49534
+ [Ae]() {
49535
+ return this[L] ? this[_] -= 1 : this[_] -= this[b][0].length, this[b].shift();
49533
49536
  }
49534
- [Ne](t = false) {
49537
+ [De](t = false) {
49535
49538
  do
49536
49539
  ;
49537
- while (this[Ls](this[De]()) && this[g].length);
49538
- !t && !this[g].length && !this[q] && this.emit("drain");
49540
+ while (this[Ns](this[Ae]()) && this[b].length);
49541
+ !t && !this[b].length && !this[q] && this.emit("drain");
49539
49542
  }
49540
- [Ls](t) {
49541
- return this.emit("data", t), this[b];
49543
+ [Ns](t) {
49544
+ return this.emit("data", t), this[g];
49542
49545
  }
49543
49546
  pipe(t, e) {
49544
49547
  if (this[w]) return t;
49545
- this[C] = false;
49548
+ this[F] = false;
49546
49549
  let i = this[rt];
49547
- return e = e || {}, t === Ts.stdout || t === Ts.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this[D].push(e.proxyErrors ? new _i(this, t, e) : new Ie(this, t, e)), this[Z] ? te(() => this[Bt]()) : this[Bt]()), t;
49550
+ return e = e || {}, t === xs.stdout || t === xs.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this[D].push(e.proxyErrors ? new xi(this, t, e) : new Fe(this, t, e)), this[Z] ? jt(() => this[Bt]()) : this[Bt]()), t;
49548
49551
  }
49549
49552
  unpipe(t) {
49550
49553
  let e = this[D].find((i) => i.dest === t);
49551
- e && (this[D].length === 1 ? (this[b] && this[yt] === 0 && (this[b] = false), this[D] = []) : this[D].splice(this[D].indexOf(e), 1), e.unpipe());
49554
+ e && (this[D].length === 1 ? (this[g] && this[Rt] === 0 && (this[g] = false), this[D] = []) : this[D].splice(this[D].indexOf(e), 1), e.unpipe());
49552
49555
  }
49553
49556
  addListener(t, e) {
49554
49557
  return this.on(t, e);
49555
49558
  }
49556
49559
  on(t, e) {
49557
49560
  let i = super.on(t, e);
49558
- if (t === "data") this[C] = false, this[yt]++, !this[D].length && !this[b] && this[Bt]();
49561
+ if (t === "data") this[F] = false, this[Rt]++, !this[D].length && !this[g] && this[Bt]();
49559
49562
  else if (t === "readable" && this[_] !== 0) super.emit("readable");
49560
- else if (Mr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
49561
- else if (t === "error" && this[jt]) {
49563
+ else if (Gr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
49564
+ else if (t === "error" && this[qt]) {
49562
49565
  let r = e;
49563
- this[Z] ? te(() => r.call(this, this[jt])) : r.call(this, this[jt]);
49566
+ this[Z] ? jt(() => r.call(this, this[qt])) : r.call(this, this[qt]);
49564
49567
  }
49565
49568
  return i;
49566
49569
  }
@@ -49569,55 +49572,55 @@ var A = class extends import_node_events.EventEmitter {
49569
49572
  }
49570
49573
  off(t, e) {
49571
49574
  let i = super.off(t, e);
49572
- return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[D].length && (this[b] = false)), i;
49575
+ return t === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[F] && !this[D].length && (this[g] = false)), i;
49573
49576
  }
49574
49577
  removeAllListeners(t) {
49575
49578
  let e = super.removeAllListeners(t);
49576
- return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[D].length && (this[b] = false)), e;
49579
+ return (t === "data" || t === void 0) && (this[Rt] = 0, !this[F] && !this[D].length && (this[g] = false)), e;
49577
49580
  }
49578
49581
  get emittedEnd() {
49579
49582
  return this[rt];
49580
49583
  }
49581
- [j]() {
49582
- !this[xe] && !this[rt] && !this[w] && this[g].length === 0 && this[q] && (this[xe] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Le] && this.emit("close"), this[xe] = false);
49584
+ [Q]() {
49585
+ !this[Le] && !this[rt] && !this[w] && this[b].length === 0 && this[q] && (this[Le] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[Le] = false);
49583
49586
  }
49584
49587
  emit(t, ...e) {
49585
49588
  let i = e[0];
49586
49589
  if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
49587
- if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[Ri](i)), true) : this[Ri](i);
49588
- if (t === "end") return this[Ns]();
49590
+ if (t === "data") return !this[L] && !i ? false : this[Z] ? (jt(() => this[_i](i)), true) : this[_i](i);
49591
+ if (t === "end") return this[Ds]();
49589
49592
  if (t === "close") {
49590
- if (this[Le] = true, !this[rt] && !this[w]) return false;
49593
+ if (this[Ne] = true, !this[rt] && !this[w]) return false;
49591
49594
  let n = super.emit("close");
49592
49595
  return this.removeAllListeners("close"), n;
49593
49596
  } else if (t === "error") {
49594
- this[jt] = i, super.emit(yi, i);
49597
+ this[qt] = i, super.emit(bi, i);
49595
49598
  let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
49596
- return this[j](), n;
49599
+ return this[Q](), n;
49597
49600
  } else if (t === "resume") {
49598
49601
  let n = super.emit("resume");
49599
- return this[j](), n;
49602
+ return this[Q](), n;
49600
49603
  } else if (t === "finish" || t === "prefinish") {
49601
49604
  let n = super.emit(t);
49602
49605
  return this.removeAllListeners(t), n;
49603
49606
  }
49604
49607
  let r = super.emit(t, ...e);
49605
- return this[j](), r;
49608
+ return this[Q](), r;
49606
49609
  }
49607
- [Ri](t) {
49610
+ [_i](t) {
49608
49611
  for (let i of this[D]) i.dest.write(t) === false && this.pause();
49609
- let e = this[C] ? false : super.emit("data", t);
49610
- return this[j](), e;
49612
+ let e = this[F] ? false : super.emit("data", t);
49613
+ return this[Q](), e;
49611
49614
  }
49612
- [Ns]() {
49613
- return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[bi]()), true) : this[bi]());
49615
+ [Ds]() {
49616
+ return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (jt(() => this[Oi]()), true) : this[Oi]());
49614
49617
  }
49615
- [bi]() {
49618
+ [Oi]() {
49616
49619
  if (this[Mt]) {
49617
49620
  let e = this[Mt].end();
49618
49621
  if (e) {
49619
49622
  for (let i of this[D]) i.dest.write(e);
49620
- this[C] || super.emit("data", e);
49623
+ this[F] || super.emit("data", e);
49621
49624
  }
49622
49625
  }
49623
49626
  for (let e of this[D]) e.end();
@@ -49643,22 +49646,22 @@ var A = class extends import_node_events.EventEmitter {
49643
49646
  });
49644
49647
  }
49645
49648
  [Symbol.asyncIterator]() {
49646
- this[C] = false;
49649
+ this[F] = false;
49647
49650
  let t = false, e = async () => (this.pause(), t = true, { value: void 0, done: true });
49648
49651
  return { next: () => {
49649
49652
  if (t) return e();
49650
49653
  let r = this.read();
49651
49654
  if (r !== null) return Promise.resolve({ done: false, value: r });
49652
49655
  if (this[q]) return e();
49653
- let n, o, h = (d) => {
49654
- this.off("data", a), this.off("end", l), this.off(w, c), e(), o(d);
49655
- }, a = (d) => {
49656
- this.off("error", h), this.off("end", l), this.off(w, c), this.pause(), n({ value: d, done: !!this[q] });
49656
+ let n, o, a = (d) => {
49657
+ this.off("data", h), this.off("end", l), this.off(w, c), e(), o(d);
49658
+ }, h = (d) => {
49659
+ this.off("error", a), this.off("end", l), this.off(w, c), this.pause(), n({ value: d, done: !!this[q] });
49657
49660
  }, l = () => {
49658
- this.off("error", h), this.off("data", a), this.off(w, c), e(), n({ done: true, value: void 0 });
49659
- }, c = () => h(new Error("stream destroyed"));
49661
+ this.off("error", a), this.off("data", h), this.off(w, c), e(), n({ done: true, value: void 0 });
49662
+ }, c = () => a(new Error("stream destroyed"));
49660
49663
  return new Promise((d, S) => {
49661
- o = S, n = d, this.once(w, c), this.once("error", h), this.once("end", l), this.once("data", a);
49664
+ o = S, n = d, this.once(w, c), this.once("error", a), this.once("end", l), this.once("data", h);
49662
49665
  });
49663
49666
  }, throw: e, return: e, [Symbol.asyncIterator]() {
49664
49667
  return this;
@@ -49666,68 +49669,68 @@ var A = class extends import_node_events.EventEmitter {
49666
49669
  } };
49667
49670
  }
49668
49671
  [Symbol.iterator]() {
49669
- this[C] = false;
49670
- let t = false, e = () => (this.pause(), this.off(yi, e), this.off(w, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
49672
+ this[F] = false;
49673
+ let t = false, e = () => (this.pause(), this.off(bi, e), this.off(w, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
49671
49674
  if (t) return e();
49672
49675
  let r = this.read();
49673
49676
  return r === null ? e() : { done: false, value: r };
49674
49677
  };
49675
- return this.once("end", e), this.once(yi, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
49678
+ return this.once("end", e), this.once(bi, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
49676
49679
  return this;
49677
49680
  }, [Symbol.dispose]: () => {
49678
49681
  } };
49679
49682
  }
49680
49683
  destroy(t) {
49681
49684
  if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
49682
- this[w] = true, this[C] = true, this[g].length = 0, this[_] = 0;
49685
+ this[w] = true, this[F] = true, this[b].length = 0, this[_] = 0;
49683
49686
  let e = this;
49684
- return typeof e.close == "function" && !this[Le] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
49687
+ return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
49685
49688
  }
49686
49689
  static get isStream() {
49687
- return Cr;
49690
+ return zr;
49688
49691
  }
49689
49692
  };
49690
- var Wr = import_fs.default.writev;
49693
+ var Xr = import_fs.default.writev;
49691
49694
  var ot = /* @__PURE__ */ Symbol("_autoClose");
49692
49695
  var H = /* @__PURE__ */ Symbol("_close");
49693
- var ee = /* @__PURE__ */ Symbol("_ended");
49696
+ var te = /* @__PURE__ */ Symbol("_ended");
49694
49697
  var m = /* @__PURE__ */ Symbol("_fd");
49695
- var Ti = /* @__PURE__ */ Symbol("_finished");
49696
- var J = /* @__PURE__ */ Symbol("_flags");
49697
- var xi = /* @__PURE__ */ Symbol("_flush");
49698
- var Ai = /* @__PURE__ */ Symbol("_handleChunk");
49699
- var Ii = /* @__PURE__ */ Symbol("_makeBuf");
49700
- var se = /* @__PURE__ */ Symbol("_mode");
49698
+ var Ni = /* @__PURE__ */ Symbol("_finished");
49699
+ var j = /* @__PURE__ */ Symbol("_flags");
49700
+ var Di = /* @__PURE__ */ Symbol("_flush");
49701
+ var Ci = /* @__PURE__ */ Symbol("_handleChunk");
49702
+ var ki = /* @__PURE__ */ Symbol("_makeBuf");
49703
+ var ie = /* @__PURE__ */ Symbol("_mode");
49701
49704
  var Ce = /* @__PURE__ */ Symbol("_needDrain");
49702
49705
  var Ut = /* @__PURE__ */ Symbol("_onerror");
49703
49706
  var Ht = /* @__PURE__ */ Symbol("_onopen");
49704
- var Li = /* @__PURE__ */ Symbol("_onread");
49707
+ var Ai = /* @__PURE__ */ Symbol("_onread");
49705
49708
  var Pt = /* @__PURE__ */ Symbol("_onwrite");
49706
49709
  var ht = /* @__PURE__ */ Symbol("_open");
49707
49710
  var U = /* @__PURE__ */ Symbol("_path");
49708
49711
  var nt = /* @__PURE__ */ Symbol("_pos");
49709
49712
  var Y = /* @__PURE__ */ Symbol("_queue");
49710
49713
  var zt = /* @__PURE__ */ Symbol("_read");
49711
- var Ni = /* @__PURE__ */ Symbol("_readSize");
49712
- var Q = /* @__PURE__ */ Symbol("_reading");
49713
- var ie = /* @__PURE__ */ Symbol("_remain");
49714
- var Di = /* @__PURE__ */ Symbol("_size");
49715
- var Fe = /* @__PURE__ */ Symbol("_write");
49716
- var Rt = /* @__PURE__ */ Symbol("_writing");
49717
- var ke = /* @__PURE__ */ Symbol("_defaultFlag");
49714
+ var Ii = /* @__PURE__ */ Symbol("_readSize");
49715
+ var J = /* @__PURE__ */ Symbol("_reading");
49716
+ var ee = /* @__PURE__ */ Symbol("_remain");
49717
+ var Fi = /* @__PURE__ */ Symbol("_size");
49718
+ var ke = /* @__PURE__ */ Symbol("_write");
49719
+ var gt = /* @__PURE__ */ Symbol("_writing");
49720
+ var ve = /* @__PURE__ */ Symbol("_defaultFlag");
49718
49721
  var bt = /* @__PURE__ */ Symbol("_errored");
49719
- var gt = class extends A {
49722
+ var _t = class extends A {
49720
49723
  [bt] = false;
49721
49724
  [m];
49722
49725
  [U];
49723
- [Ni];
49724
- [Q] = false;
49725
- [Di];
49726
- [ie];
49726
+ [Ii];
49727
+ [J] = false;
49728
+ [Fi];
49729
+ [ee];
49727
49730
  [ot];
49728
49731
  constructor(t, e) {
49729
49732
  if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
49730
- this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ni] = 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]();
49733
+ this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ii] = e.readSize || 16 * 1024 * 1024, this[J] = false, this[Fi] = typeof e.size == "number" ? e.size : 1 / 0, this[ee] = this[Fi], this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[m] == "number" ? this[zt]() : this[ht]();
49731
49734
  }
49732
49735
  get fd() {
49733
49736
  return this[m];
@@ -49747,19 +49750,19 @@ var gt = class extends A {
49747
49750
  [Ht](t, e) {
49748
49751
  t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
49749
49752
  }
49750
- [Ii]() {
49751
- return Buffer.allocUnsafe(Math.min(this[Ni], this[ie]));
49753
+ [ki]() {
49754
+ return Buffer.allocUnsafe(Math.min(this[Ii], this[ee]));
49752
49755
  }
49753
49756
  [zt]() {
49754
- if (!this[Q]) {
49755
- this[Q] = true;
49756
- let t = this[Ii]();
49757
- if (t.length === 0) return process.nextTick(() => this[Li](null, 0, t));
49758
- import_fs.default.read(this[m], t, 0, t.length, null, (e, i, r) => this[Li](e, i, r));
49757
+ if (!this[J]) {
49758
+ this[J] = true;
49759
+ let t = this[ki]();
49760
+ if (t.length === 0) return process.nextTick(() => this[Ai](null, 0, t));
49761
+ import_fs.default.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ai](e, i, r));
49759
49762
  }
49760
49763
  }
49761
- [Li](t, e, i) {
49762
- this[Q] = false, t ? this[Ut](t) : this[Ai](e, i) && this[zt]();
49764
+ [Ai](t, e, i) {
49765
+ this[J] = false, t ? this[Ut](t) : this[Ci](e, i) && this[zt]();
49763
49766
  }
49764
49767
  [H]() {
49765
49768
  if (this[ot] && typeof this[m] == "number") {
@@ -49768,11 +49771,11 @@ var gt = class extends A {
49768
49771
  }
49769
49772
  }
49770
49773
  [Ut](t) {
49771
- this[Q] = true, this[H](), this.emit("error", t);
49774
+ this[J] = true, this[H](), this.emit("error", t);
49772
49775
  }
49773
- [Ai](t, e) {
49776
+ [Ci](t, e) {
49774
49777
  let i = false;
49775
- 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;
49778
+ 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;
49776
49779
  }
49777
49780
  emit(t, ...e) {
49778
49781
  switch (t) {
@@ -49788,7 +49791,7 @@ var gt = class extends A {
49788
49791
  }
49789
49792
  }
49790
49793
  };
49791
- var ve = class extends gt {
49794
+ var Me = class extends _t {
49792
49795
  [ht]() {
49793
49796
  let t = true;
49794
49797
  try {
@@ -49800,13 +49803,13 @@ var ve = class extends gt {
49800
49803
  [zt]() {
49801
49804
  let t = true;
49802
49805
  try {
49803
- if (!this[Q]) {
49804
- this[Q] = true;
49806
+ if (!this[J]) {
49807
+ this[J] = true;
49805
49808
  do {
49806
- let e = this[Ii](), i = e.length === 0 ? 0 : import_fs.default.readSync(this[m], e, 0, e.length, null);
49807
- if (!this[Ai](i, e)) break;
49809
+ let e = this[ki](), i = e.length === 0 ? 0 : import_fs.default.readSync(this[m], e, 0, e.length, null);
49810
+ if (!this[Ci](i, e)) break;
49808
49811
  } while (true);
49809
- this[Q] = false;
49812
+ this[J] = false;
49810
49813
  }
49811
49814
  t = false;
49812
49815
  } finally {
@@ -49824,22 +49827,22 @@ var tt = class extends import_events.default {
49824
49827
  readable = false;
49825
49828
  writable = true;
49826
49829
  [bt] = false;
49827
- [Rt] = false;
49828
- [ee] = false;
49830
+ [gt] = false;
49831
+ [te] = false;
49829
49832
  [Y] = [];
49830
49833
  [Ce] = false;
49831
49834
  [U];
49832
- [se];
49835
+ [ie];
49833
49836
  [ot];
49834
49837
  [m];
49835
- [ke];
49836
- [J];
49837
- [Ti] = false;
49838
+ [ve];
49839
+ [j];
49840
+ [Ni] = false;
49838
49841
  [nt];
49839
49842
  constructor(t, e) {
49840
- 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;
49843
+ e = e || {}, super(e), this[U] = t, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[ie] = 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;
49841
49844
  let i = this[nt] !== void 0 ? "r+" : "w";
49842
- this[ke] = e.flags === void 0, this[J] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
49845
+ this[ve] = e.flags === void 0, this[j] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
49843
49846
  }
49844
49847
  emit(t, ...e) {
49845
49848
  if (t === "error") {
@@ -49855,32 +49858,32 @@ var tt = class extends import_events.default {
49855
49858
  return this[U];
49856
49859
  }
49857
49860
  [Ut](t) {
49858
- this[H](), this[Rt] = true, this.emit("error", t);
49861
+ this[H](), this[gt] = true, this.emit("error", t);
49859
49862
  }
49860
49863
  [ht]() {
49861
- import_fs.default.open(this[U], this[J], this[se], (t, e) => this[Ht](t, e));
49864
+ import_fs.default.open(this[U], this[j], this[ie], (t, e) => this[Ht](t, e));
49862
49865
  }
49863
49866
  [Ht](t, e) {
49864
- this[ke] && 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[xi]());
49867
+ 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[gt] || this[Di]());
49865
49868
  }
49866
49869
  end(t, e) {
49867
- return t && this.write(t, e), this[ee] = true, !this[Rt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
49870
+ return t && this.write(t, e), this[te] = true, !this[gt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
49868
49871
  }
49869
49872
  write(t, e) {
49870
- 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[Ce] = true, false) : (this[Rt] = true, this[Fe](t), true);
49873
+ return typeof t == "string" && (t = Buffer.from(t, e)), this[te] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[gt] || this[Y].length ? (this[Y].push(t), this[Ce] = true, false) : (this[gt] = true, this[ke](t), true);
49871
49874
  }
49872
- [Fe](t) {
49875
+ [ke](t) {
49873
49876
  import_fs.default.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
49874
49877
  }
49875
49878
  [Pt](t, e) {
49876
- t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[xi]() : (this[Rt] = false, this[ee] && !this[Ti] ? (this[Ti] = true, this[H](), this.emit("finish")) : this[Ce] && (this[Ce] = false, this.emit("drain"))));
49879
+ t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[Di]() : (this[gt] = false, this[te] && !this[Ni] ? (this[Ni] = true, this[H](), this.emit("finish")) : this[Ce] && (this[Ce] = false, this.emit("drain"))));
49877
49880
  }
49878
- [xi]() {
49879
- if (this[Y].length === 0) this[ee] && this[Pt](null, 0);
49880
- else if (this[Y].length === 1) this[Fe](this[Y].pop());
49881
+ [Di]() {
49882
+ if (this[Y].length === 0) this[te] && this[Pt](null, 0);
49883
+ else if (this[Y].length === 1) this[ke](this[Y].pop());
49881
49884
  else {
49882
49885
  let t = this[Y];
49883
- this[Y] = [], Wr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
49886
+ this[Y] = [], Xr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
49884
49887
  }
49885
49888
  }
49886
49889
  [H]() {
@@ -49893,13 +49896,13 @@ var tt = class extends import_events.default {
49893
49896
  var Wt = class extends tt {
49894
49897
  [ht]() {
49895
49898
  let t;
49896
- if (this[ke] && this[J] === "r+") try {
49897
- t = import_fs.default.openSync(this[U], this[J], this[se]);
49899
+ if (this[ve] && this[j] === "r+") try {
49900
+ t = import_fs.default.openSync(this[U], this[j], this[ie]);
49898
49901
  } catch (e) {
49899
- if (e?.code === "ENOENT") return this[J] = "w", this[ht]();
49902
+ if (e?.code === "ENOENT") return this[j] = "w", this[ht]();
49900
49903
  throw e;
49901
49904
  }
49902
- else t = import_fs.default.openSync(this[U], this[J], this[se]);
49905
+ else t = import_fs.default.openSync(this[U], this[j], this[ie]);
49903
49906
  this[Ht](null, t);
49904
49907
  }
49905
49908
  [H]() {
@@ -49908,7 +49911,7 @@ var Wt = class extends tt {
49908
49911
  this[m] = void 0, import_fs.default.closeSync(t), this.emit("close");
49909
49912
  }
49910
49913
  }
49911
- [Fe](t) {
49914
+ [ke](t) {
49912
49915
  let e = true;
49913
49916
  try {
49914
49917
  this[Pt](null, import_fs.default.writeSync(this[m], t, 0, t.length, this[nt])), e = false;
@@ -49920,52 +49923,53 @@ var Wt = class extends tt {
49920
49923
  }
49921
49924
  }
49922
49925
  };
49923
- var Gr = /* @__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"]]);
49924
- var As = (s3) => !!s3.sync && !!s3.file;
49925
- var Is = (s3) => !s3.sync && !!s3.file;
49926
+ var qr = /* @__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"]]);
49927
+ var Is = (s3) => !!s3.sync && !!s3.file;
49928
+ var Fs = (s3) => !s3.sync && !!s3.file;
49926
49929
  var Cs = (s3) => !!s3.sync && !s3.file;
49927
- var Fs = (s3) => !s3.sync && !s3.file;
49928
- var ks = (s3) => !!s3.file;
49929
- var Zr = (s3) => {
49930
- let t = Gr.get(s3);
49930
+ var ks = (s3) => !s3.sync && !s3.file;
49931
+ var vs = (s3) => !!s3.file;
49932
+ var Qr = (s3) => {
49933
+ let t = qr.get(s3);
49931
49934
  return t || s3;
49932
49935
  };
49933
- var re = (s3 = {}) => {
49936
+ var se = (s3 = {}) => {
49934
49937
  if (!s3) return {};
49935
49938
  let t = {};
49936
49939
  for (let [e, i] of Object.entries(s3)) {
49937
- let r = Zr(e);
49940
+ let r = Qr(e);
49938
49941
  t[r] = i;
49939
49942
  }
49940
49943
  return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
49941
49944
  };
49942
- var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
49943
- Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o ? o = Array.from(o) : o = [];
49944
- let a = re(n);
49945
- if (r?.(a, o), As(a)) {
49946
- if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
49947
- return s3(a, o);
49948
- } else if (Is(a)) {
49949
- let l = t(a, o), c = h || void 0;
49950
- return c ? l.then(() => c(), c) : l;
49951
- } else if (Cs(a)) {
49952
- if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
49953
- return e(a, o);
49954
- } else if (Fs(a)) {
49955
- if (typeof h == "function") throw new TypeError("callback only supported with file option");
49956
- return i(a, o);
49957
- } else throw new Error("impossible options??");
49945
+ var K = (s3, t, e, i, r) => Object.assign((n = [], o, a) => {
49946
+ Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (a = o, o = void 0), o = o ? Array.from(o) : [];
49947
+ let h = se(n);
49948
+ if (r?.(h, o), Is(h)) {
49949
+ if (typeof a == "function") throw new TypeError("callback not supported for sync tar functions");
49950
+ return s3(h, o);
49951
+ } else if (Fs(h)) {
49952
+ let l = t(h, o);
49953
+ return a ? l.then(() => a(), a) : l;
49954
+ } else if (Cs(h)) {
49955
+ if (typeof a == "function") throw new TypeError("callback not supported for sync tar functions");
49956
+ return e(h, o);
49957
+ } else if (ks(h)) {
49958
+ if (typeof a == "function") throw new TypeError("callback only supported with file option");
49959
+ return i(h, o);
49960
+ }
49961
+ throw new Error("impossible options??");
49958
49962
  }, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
49959
- var Kr = import_zlib.default.constants || { ZLIB_VERNUM: 4736 };
49960
- 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 }, Kr));
49961
- var Vr = import_buffer.Buffer.concat;
49962
- var Ms = Object.getOwnPropertyDescriptor(import_buffer.Buffer, "concat");
49963
- var $r = (s3) => s3;
49964
- var Fi = Ms?.writable === true || Ms?.set !== void 0 ? (s3) => {
49965
- import_buffer.Buffer.concat = s3 ? $r : Vr;
49963
+ var jr = import_zlib.default.constants || { ZLIB_VERNUM: 4736 };
49964
+ 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));
49965
+ var tn = import_buffer.Buffer.concat;
49966
+ var Bs = Object.getOwnPropertyDescriptor(import_buffer.Buffer, "concat");
49967
+ var en = (s3) => s3;
49968
+ var Mi = Bs?.writable === true || Bs?.set !== void 0 ? (s3) => {
49969
+ import_buffer.Buffer.concat = s3 ? en : tn;
49966
49970
  } : (s3) => {
49967
49971
  };
49968
- var Ot = /* @__PURE__ */ Symbol("_superWrite");
49972
+ var Tt = /* @__PURE__ */ Symbol("_superWrite");
49969
49973
  var Gt = class extends Error {
49970
49974
  code;
49971
49975
  errno;
@@ -49976,8 +49980,8 @@ var Gt = class extends Error {
49976
49980
  return "ZlibError";
49977
49981
  }
49978
49982
  };
49979
- var ki = /* @__PURE__ */ Symbol("flushFlag");
49980
- var ne = class extends A {
49983
+ var Bi = /* @__PURE__ */ Symbol("flushFlag");
49984
+ var re = class extends A {
49981
49985
  #t = false;
49982
49986
  #i = false;
49983
49987
  #s;
@@ -49996,9 +50000,9 @@ var ne = class extends A {
49996
50000
  }
49997
50001
  constructor(t, e) {
49998
50002
  if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
49999
- if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof vs[e] != "function") throw new TypeError("Compression method not supported: " + e);
50003
+ if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof Ms[e] != "function") throw new TypeError("Compression method not supported: " + e);
50000
50004
  try {
50001
- this.#e = new vs[e](t);
50005
+ this.#e = new Ms[e](t);
50002
50006
  } catch (i) {
50003
50007
  throw new Gt(i, this.constructor);
50004
50008
  }
@@ -50013,7 +50017,7 @@ var ne = class extends A {
50013
50017
  if (!this.#t) return (0, import_assert.default)(this.#e, "zlib binding closed"), this.#e.reset?.();
50014
50018
  }
50015
50019
  flush(t) {
50016
- this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(import_buffer.Buffer.alloc(0), { [ki]: t })));
50020
+ this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(import_buffer.Buffer.alloc(0), { [Bi]: t })));
50017
50021
  }
50018
50022
  end(t, e, i) {
50019
50023
  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);
@@ -50021,7 +50025,7 @@ var ne = class extends A {
50021
50025
  get ended() {
50022
50026
  return this.#i;
50023
50027
  }
50024
- [Ot](t) {
50028
+ [Tt](t) {
50025
50029
  return super.write(t);
50026
50030
  }
50027
50031
  write(t, e, i) {
@@ -50032,27 +50036,27 @@ var ne = class extends A {
50032
50036
  };
50033
50037
  let o = this.#e.close;
50034
50038
  this.#e.close = () => {
50035
- }, Fi(true);
50036
- let h;
50039
+ }, Mi(true);
50040
+ let a;
50037
50041
  try {
50038
- let l = typeof t[ki] == "number" ? t[ki] : this.#s;
50039
- h = this.#e._processChunk(t, l), Fi(false);
50042
+ let l = typeof t[Bi] == "number" ? t[Bi] : this.#s;
50043
+ a = this.#e._processChunk(t, l), Mi(false);
50040
50044
  } catch (l) {
50041
- Fi(false), this.#o(new Gt(l, this.write));
50045
+ Mi(false), this.#o(new Gt(l, this.write));
50042
50046
  } finally {
50043
50047
  this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
50044
50048
  }
50045
50049
  this.#e && this.#e.on("error", (l) => this.#o(new Gt(l, this.write)));
50046
- let a;
50047
- if (h) if (Array.isArray(h) && h.length > 0) {
50048
- let l = h[0];
50049
- a = this[Ot](import_buffer.Buffer.from(l));
50050
- for (let c = 1; c < h.length; c++) a = this[Ot](h[c]);
50051
- } else a = this[Ot](import_buffer.Buffer.from(h));
50052
- return i && i(), a;
50050
+ let h;
50051
+ if (a) if (Array.isArray(a) && a.length > 0) {
50052
+ let l = a[0];
50053
+ h = this[Tt](import_buffer.Buffer.from(l));
50054
+ for (let c = 1; c < a.length; c++) h = this[Tt](a[c]);
50055
+ } else h = this[Tt](import_buffer.Buffer.from(a));
50056
+ return i && i(), h;
50053
50057
  }
50054
50058
  };
50055
- var Me = class extends ne {
50059
+ var Be = class extends re {
50056
50060
  #t;
50057
50061
  #i;
50058
50062
  constructor(t, e) {
@@ -50078,97 +50082,98 @@ var Me = class extends ne {
50078
50082
  }
50079
50083
  }
50080
50084
  };
50081
- var Be = class extends Me {
50085
+ var Pe = class extends Be {
50082
50086
  #t;
50083
50087
  constructor(t) {
50084
50088
  super(t, "Gzip"), this.#t = t && !!t.portable;
50085
50089
  }
50086
- [Ot](t) {
50087
- return this.#t ? (this.#t = false, t[9] = 255, super[Ot](t)) : super[Ot](t);
50090
+ [Tt](t) {
50091
+ return this.#t ? (this.#t = false, t[9] = 255, super[Tt](t)) : super[Tt](t);
50088
50092
  }
50089
50093
  };
50090
- var Pe = class extends Me {
50094
+ var ze = class extends Be {
50091
50095
  constructor(t) {
50092
50096
  super(t, "Unzip");
50093
50097
  }
50094
50098
  };
50095
- var ze = class extends ne {
50099
+ var Ue = class extends re {
50096
50100
  constructor(t, e) {
50097
50101
  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);
50098
50102
  }
50099
50103
  };
50100
- var Ue = class extends ze {
50104
+ var He = class extends Ue {
50101
50105
  constructor(t) {
50102
50106
  super(t, "BrotliCompress");
50103
50107
  }
50104
50108
  };
50105
- var He = class extends ze {
50109
+ var We = class extends Ue {
50106
50110
  constructor(t) {
50107
50111
  super(t, "BrotliDecompress");
50108
50112
  }
50109
50113
  };
50110
- var We = class extends ne {
50114
+ var Ge = class extends re {
50111
50115
  constructor(t, e) {
50112
50116
  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);
50113
50117
  }
50114
50118
  };
50115
- var Ge = class extends We {
50119
+ var Ze = class extends Ge {
50116
50120
  constructor(t) {
50117
50121
  super(t, "ZstdCompress");
50118
50122
  }
50119
50123
  };
50120
- var Ze = class extends We {
50124
+ var Ye = class extends Ge {
50121
50125
  constructor(t) {
50122
50126
  super(t, "ZstdDecompress");
50123
50127
  }
50124
50128
  };
50125
- var Bs = (s3, t) => {
50126
- if (Number.isSafeInteger(s3)) s3 < 0 ? jr(s3, t) : qr(s3, t);
50129
+ var Ps = (s3, t) => {
50130
+ if (Number.isSafeInteger(s3)) s3 < 0 ? nn(s3, t) : rn(s3, t);
50127
50131
  else throw Error("cannot encode number outside of javascript safe integer range");
50128
50132
  return t;
50129
50133
  };
50130
- var qr = (s3, t) => {
50134
+ var rn = (s3, t) => {
50131
50135
  t[0] = 128;
50132
50136
  for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
50133
50137
  };
50134
- var jr = (s3, t) => {
50138
+ var nn = (s3, t) => {
50135
50139
  t[0] = 255;
50136
50140
  var e = false;
50137
50141
  s3 = s3 * -1;
50138
50142
  for (var i = t.length; i > 1; i--) {
50139
50143
  var r = s3 & 255;
50140
- s3 = Math.floor(s3 / 256), e ? t[i - 1] = zs(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = Us(r));
50144
+ s3 = Math.floor(s3 / 256), e ? t[i - 1] = Us(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = Hs(r));
50141
50145
  }
50142
50146
  };
50143
- var Ps = (s3) => {
50144
- let t = s3[0], e = t === 128 ? Jr(s3.subarray(1, s3.length)) : t === 255 ? Qr(s3) : null;
50147
+ var zs = (s3) => {
50148
+ let t = s3[0], e = t === 128 ? hn(s3.subarray(1, s3.length)) : t === 255 ? on(s3) : null;
50145
50149
  if (e === null) throw Error("invalid base256 encoding");
50146
50150
  if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
50147
50151
  return e;
50148
50152
  };
50149
- var Qr = (s3) => {
50153
+ var on = (s3) => {
50150
50154
  for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
50151
50155
  var n = Number(s3[r]), o;
50152
- i ? o = zs(n) : n === 0 ? o = n : (i = true, o = Us(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
50156
+ i ? o = Us(n) : n === 0 ? o = n : (i = true, o = Hs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
50153
50157
  }
50154
50158
  return e;
50155
50159
  };
50156
- var Jr = (s3) => {
50160
+ var hn = (s3) => {
50157
50161
  for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
50158
50162
  var r = Number(s3[i]);
50159
50163
  r !== 0 && (e += r * Math.pow(256, t - i - 1));
50160
50164
  }
50161
50165
  return e;
50162
50166
  };
50163
- var zs = (s3) => (255 ^ s3) & 255;
50164
- var Us = (s3) => (255 ^ s3) + 1 & 255;
50165
- var Mi = {};
50166
- Ar(Mi, { code: () => Ye, isCode: () => oe, isName: () => en, name: () => he });
50167
- var oe = (s3) => he.has(s3);
50168
- var en = (s3) => Ye.has(s3);
50169
- 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"]]);
50170
- var Ye = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
50171
- var F = class {
50167
+ var Us = (s3) => (255 ^ s3) & 255;
50168
+ var Hs = (s3) => (255 ^ s3) + 1 & 255;
50169
+ var Ui = {};
50170
+ Br(Ui, { code: () => Ke, isCode: () => ne, isName: () => ln, name: () => oe, normalFsTypes: () => zi });
50171
+ var ne = (s3) => oe.has(s3);
50172
+ var ln = (s3) => Ke.has(s3);
50173
+ var zi = /* @__PURE__ */ new Set(["0", "", "1", "2", "3", "4", "5", "6", "7", "D"]);
50174
+ 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"]]);
50175
+ var Ke = new Map(Array.from(oe).map((s3) => [s3[1], s3[0]]));
50176
+ var C = class {
50172
50177
  cksumValid = false;
50173
50178
  needPax = false;
50174
50179
  nullBlock = false;
@@ -50195,46 +50200,45 @@ var F = class {
50195
50200
  }
50196
50201
  decode(t, e, i, r) {
50197
50202
  if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
50198
- 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 ?? Bi(t, e + 136, 12), this.cksum = at(t, e + 148, 12), r && this.#i(r, true), i && this.#i(i);
50199
- let n = Tt(t, e + 156, 1);
50200
- 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) {
50201
- let h = Tt(t, e + 345, 155);
50202
- this.path = h + "/" + this.path;
50203
+ let n = xt(t, e + 156, 1), o = zi.has(n), a = o ? i : void 0, h = o ? r : void 0;
50204
+ if (this.path = a?.path ?? xt(t, e, 100), this.mode = a?.mode ?? h?.mode ?? at(t, e + 100, 8), this.uid = a?.uid ?? h?.uid ?? at(t, e + 108, 8), this.gid = a?.gid ?? h?.gid ?? at(t, e + 116, 8), this.size = a?.size ?? h?.size ?? at(t, e + 124, 12), this.mtime = a?.mtime ?? h?.mtime ?? Hi(t, e + 136, 12), this.cksum = at(t, e + 148, 12), h && this.#i(h, true), a && this.#i(a), 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 = a?.uname ?? h?.uname ?? xt(t, e + 265, 32), this.gname = a?.gname ?? h?.gname ?? xt(t, e + 297, 32), this.devmaj = a?.devmaj ?? h?.devmaj ?? at(t, e + 329, 8) ?? 0, this.devmin = a?.devmin ?? h?.devmin ?? at(t, e + 337, 8) ?? 0, t[e + 475] !== 0) {
50205
+ let c = xt(t, e + 345, 155);
50206
+ this.path = c + "/" + this.path;
50203
50207
  } else {
50204
- let h = Tt(t, e + 345, 130);
50205
- h && (this.path = h + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Bi(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Bi(t, e + 488, 12);
50208
+ let c = xt(t, e + 345, 130);
50209
+ c && (this.path = c + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Hi(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Hi(t, e + 488, 12);
50206
50210
  }
50207
- let o = 256;
50208
- for (let h = e; h < e + 148; h++) o += t[h];
50209
- for (let h = e + 156; h < e + 512; h++) o += t[h];
50210
- this.cksumValid = o === this.cksum, this.cksum === void 0 && o === 256 && (this.nullBlock = true);
50211
+ let l = 256;
50212
+ for (let c = e; c < e + 148; c++) l += t[c];
50213
+ for (let c = e + 156; c < e + 512; c++) l += t[c];
50214
+ this.cksumValid = l === this.cksum, this.cksum === void 0 && l === 256 && (this.nullBlock = true);
50211
50215
  }
50212
50216
  #i(t, e = false) {
50213
50217
  Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "path" && e || i === "linkpath" && e || i === "global"))));
50214
50218
  }
50215
50219
  encode(t, e = 0) {
50216
50220
  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");
50217
- let i = this.ctime || this.atime ? 130 : 155, r = sn(this.path || "", i), n = r[0], o = r[1];
50218
- 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 = Pi(t, e + 136, 12, this.mtime) || this.needPax, t[e + 156] = this.#t.charCodeAt(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 = Pi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = Pi(t, e + 488, 12, this.ctime) || this.needPax);
50219
- let h = 256;
50220
- for (let a = e; a < e + 148; a++) h += t[a];
50221
- for (let a = e + 156; a < e + 512; a++) h += t[a];
50222
- return this.cksum = h, lt(t, e + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
50221
+ let i = this.ctime || this.atime ? 130 : 155, r = cn(this.path || "", i), n = r[0], o = r[1];
50222
+ this.needPax = !!r[2], this.needPax = Lt(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 = Wi(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 = lt(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = lt(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 = Wi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = Wi(t, e + 488, 12, this.ctime) || this.needPax);
50223
+ let a = 256;
50224
+ for (let h = e; h < e + 148; h++) a += t[h];
50225
+ for (let h = e + 156; h < e + 512; h++) a += t[h];
50226
+ return this.cksum = a, lt(t, e + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
50223
50227
  }
50224
50228
  get type() {
50225
- return this.#t === "Unsupported" ? this.#t : he.get(this.#t);
50229
+ return this.#t === "Unsupported" ? this.#t : oe.get(this.#t);
50226
50230
  }
50227
50231
  get typeKey() {
50228
50232
  return this.#t;
50229
50233
  }
50230
50234
  set type(t) {
50231
- let e = String(Ye.get(t));
50232
- if (oe(e) || e === "Unsupported") this.#t = e;
50233
- else if (oe(t)) this.#t = t;
50235
+ let e = String(Ke.get(t));
50236
+ if (ne(e) || e === "Unsupported") this.#t = e;
50237
+ else if (ne(t)) this.#t = t;
50234
50238
  else throw new TypeError("invalid entry type: " + t);
50235
50239
  }
50236
50240
  };
50237
- var sn = (s3, t) => {
50241
+ var cn = (s3, t) => {
50238
50242
  let i = s3, r = "", n, o = import_node_path2.posix.parse(s3).root || ".";
50239
50243
  if (Buffer.byteLength(i) < 100) n = [i, r, false];
50240
50244
  else {
@@ -50246,20 +50250,20 @@ var sn = (s3, t) => {
50246
50250
  }
50247
50251
  return n;
50248
50252
  };
50249
- var Tt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
50250
- var Bi = (s3, t, e) => rn(at(s3, t, e));
50251
- var rn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
50252
- var at = (s3, t, e) => Number(s3[t]) & 128 ? Ps(s3.subarray(t, t + e)) : on(s3, t, e);
50253
- var nn = (s3) => isNaN(s3) ? void 0 : s3;
50254
- var on = (s3, t, e) => nn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
50255
- var hn = { 12: 8589934591, 8: 2097151 };
50256
- var lt = (s3, t, e, i) => i === void 0 ? false : i > hn[e] || i < 0 ? (Bs(i, s3.subarray(t, t + e)), true) : (an(s3, t, e, i), false);
50257
- var an = (s3, t, e, i) => s3.write(ln(i, e), t, e, "ascii");
50258
- var ln = (s3, t) => cn(Math.floor(s3).toString(8), t);
50259
- var cn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
50260
- var Pi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
50261
- var fn = new Array(156).join("\0");
50262
- var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + fn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
50253
+ var xt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
50254
+ var Hi = (s3, t, e) => fn(at(s3, t, e));
50255
+ var fn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
50256
+ var at = (s3, t, e) => Number(s3[t]) & 128 ? zs(s3.subarray(t, t + e)) : un(s3, t, e);
50257
+ var dn = (s3) => isNaN(s3) ? void 0 : s3;
50258
+ var un = (s3, t, e) => dn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
50259
+ var mn = { 12: 8589934591, 8: 2097151 };
50260
+ var lt = (s3, t, e, i) => i === void 0 ? false : i > mn[e] || i < 0 ? (Ps(i, s3.subarray(t, t + e)), true) : (pn(s3, t, e, i), false);
50261
+ var pn = (s3, t, e, i) => s3.write(En(i, e), t, e, "ascii");
50262
+ var En = (s3, t) => wn(Math.floor(s3).toString(8), t);
50263
+ var wn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
50264
+ var Wi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
50265
+ var Sn = new Array(156).join("\0");
50266
+ var Lt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + Sn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
50263
50267
  var ct = class s {
50264
50268
  atime;
50265
50269
  mtime;
@@ -50286,7 +50290,7 @@ var ct = class s {
50286
50290
  if (t === "") return Buffer.allocUnsafe(0);
50287
50291
  let e = Buffer.byteLength(t), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
50288
50292
  for (let n = 0; n < 512; n++) r[n] = 0;
50289
- new F({ path: ("PaxHeader/" + (0, import_node_path3.basename)(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");
50293
+ new C({ path: ("PaxHeader/" + (0, import_node_path3.basename)(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");
50290
50294
  for (let n = e + 512; n < r.length; n++) r[n] = 0;
50291
50295
  return r;
50292
50296
  }
@@ -50300,13 +50304,13 @@ var ct = class s {
50300
50304
  return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
50301
50305
  }
50302
50306
  static parse(t, e, i = false) {
50303
- return new s(un(mn(t), e), i);
50307
+ return new s(Rn(gn(t), e), i);
50304
50308
  }
50305
50309
  };
50306
- var un = (s3, t) => t ? Object.assign({}, t, s3) : s3;
50307
- var mn = (s3) => s3.replace(/\n$/, "").split(`
50308
- `).reduce(pn, /* @__PURE__ */ Object.create(null));
50309
- var pn = (s3, t) => {
50310
+ var Rn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
50311
+ var gn = (s3) => s3.replace(/\n$/, "").split(`
50312
+ `).reduce(bn, /* @__PURE__ */ Object.create(null));
50313
+ var bn = (s3, t) => {
50310
50314
  let e = parseInt(t, 10);
50311
50315
  if (e !== Buffer.byteLength(t) + 1) return s3;
50312
50316
  t = t.slice((e + " ").length);
@@ -50315,9 +50319,9 @@ var pn = (s3, t) => {
50315
50319
  let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
50316
50320
  return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
50317
50321
  };
50318
- var En = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
50319
- var f = En !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replace(/\\/g, "/");
50320
- var Yt = class extends A {
50322
+ var _n = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
50323
+ var f = _n !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
50324
+ var Ve = class extends A {
50321
50325
  extended;
50322
50326
  globalExtended;
50323
50327
  header;
@@ -50381,44 +50385,44 @@ var Yt = class extends A {
50381
50385
  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))));
50382
50386
  }
50383
50387
  };
50384
- var Lt = (s3, t, e, i = {}) => {
50388
+ var Nt = (s3, t, e, i = {}) => {
50385
50389
  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));
50386
50390
  };
50387
- var Sn = 1024 * 1024;
50388
- var Gi = Buffer.from([31, 139]);
50389
- var Zi = Buffer.from([40, 181, 47, 253]);
50390
- var yn = Math.max(Gi.length, Zi.length);
50391
+ var Tn = 1024 * 1024;
50392
+ var Vi = Buffer.from([31, 139]);
50393
+ var $i = Buffer.from([40, 181, 47, 253]);
50394
+ var xn = Math.max(Vi.length, $i.length);
50391
50395
  var B = /* @__PURE__ */ Symbol("state");
50392
- var Nt = /* @__PURE__ */ Symbol("writeEntry");
50396
+ var Dt = /* @__PURE__ */ Symbol("writeEntry");
50393
50397
  var et = /* @__PURE__ */ Symbol("readEntry");
50394
- var zi = /* @__PURE__ */ Symbol("nextEntry");
50395
- var Hs = /* @__PURE__ */ Symbol("processEntry");
50398
+ var Gi = /* @__PURE__ */ Symbol("nextEntry");
50399
+ var Ws = /* @__PURE__ */ Symbol("processEntry");
50396
50400
  var V = /* @__PURE__ */ Symbol("extendedHeader");
50397
- var ae = /* @__PURE__ */ Symbol("globalExtendedHeader");
50401
+ var he = /* @__PURE__ */ Symbol("globalExtendedHeader");
50398
50402
  var ft = /* @__PURE__ */ Symbol("meta");
50399
- var Ws = /* @__PURE__ */ Symbol("emitMeta");
50403
+ var Gs = /* @__PURE__ */ Symbol("emitMeta");
50400
50404
  var p = /* @__PURE__ */ Symbol("buffer");
50401
50405
  var it = /* @__PURE__ */ Symbol("queue");
50402
50406
  var dt = /* @__PURE__ */ Symbol("ended");
50403
- var Ui = /* @__PURE__ */ Symbol("emittedEnd");
50404
- var Dt = /* @__PURE__ */ Symbol("emit");
50407
+ var Zi = /* @__PURE__ */ Symbol("emittedEnd");
50408
+ var At = /* @__PURE__ */ Symbol("emit");
50405
50409
  var y = /* @__PURE__ */ Symbol("unzip");
50406
- var Ke = /* @__PURE__ */ Symbol("consumeChunk");
50407
- var Ve = /* @__PURE__ */ Symbol("consumeChunkSub");
50408
- var Hi = /* @__PURE__ */ Symbol("consumeBody");
50409
- var Gs = /* @__PURE__ */ Symbol("consumeMeta");
50410
- var Zs = /* @__PURE__ */ Symbol("consumeHeader");
50411
- var le = /* @__PURE__ */ Symbol("consuming");
50412
- var Wi = /* @__PURE__ */ Symbol("bufferConcat");
50413
- var $e = /* @__PURE__ */ Symbol("maybeEnd");
50414
- var Kt = /* @__PURE__ */ Symbol("writing");
50410
+ var $e = /* @__PURE__ */ Symbol("consumeChunk");
50411
+ var Xe = /* @__PURE__ */ Symbol("consumeChunkSub");
50412
+ var Yi = /* @__PURE__ */ Symbol("consumeBody");
50413
+ var Zs = /* @__PURE__ */ Symbol("consumeMeta");
50414
+ var Ys = /* @__PURE__ */ Symbol("consumeHeader");
50415
+ var ae = /* @__PURE__ */ Symbol("consuming");
50416
+ var Ki = /* @__PURE__ */ Symbol("bufferConcat");
50417
+ var qe = /* @__PURE__ */ Symbol("maybeEnd");
50418
+ var Yt = /* @__PURE__ */ Symbol("writing");
50415
50419
  var ut = /* @__PURE__ */ Symbol("aborted");
50416
- var Xe = /* @__PURE__ */ Symbol("onDone");
50417
- var At = /* @__PURE__ */ Symbol("sawValidEntry");
50418
- var qe = /* @__PURE__ */ Symbol("sawNullBlock");
50420
+ var Qe = /* @__PURE__ */ Symbol("onDone");
50421
+ var It = /* @__PURE__ */ Symbol("sawValidEntry");
50422
+ var Je = /* @__PURE__ */ Symbol("sawNullBlock");
50419
50423
  var je = /* @__PURE__ */ Symbol("sawEOF");
50420
- var Ys = /* @__PURE__ */ Symbol("closeStream");
50421
- var Rn = () => true;
50424
+ var Ks = /* @__PURE__ */ Symbol("closeStream");
50425
+ var Ln = () => true;
50422
50426
  var st = class extends import_events2.EventEmitter {
50423
50427
  file;
50424
50428
  strict;
@@ -50431,103 +50435,103 @@ var st = class extends import_events2.EventEmitter {
50431
50435
  [it] = [];
50432
50436
  [p];
50433
50437
  [et];
50434
- [Nt];
50438
+ [Dt];
50435
50439
  [B] = "begin";
50436
50440
  [ft] = "";
50437
50441
  [V];
50438
- [ae];
50442
+ [he];
50439
50443
  [dt] = false;
50440
50444
  [y];
50441
50445
  [ut] = false;
50442
- [At];
50443
- [qe] = false;
50446
+ [It];
50447
+ [Je] = false;
50444
50448
  [je] = false;
50445
- [Kt] = false;
50446
- [le] = false;
50447
- [Ui] = false;
50449
+ [Yt] = false;
50450
+ [ae] = false;
50451
+ [Zi] = false;
50448
50452
  constructor(t = {}) {
50449
- super(), this.file = t.file || "", this.on(Xe, () => {
50450
- (this[B] === "begin" || this[At] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
50451
- }), t.ondone ? this.on(Xe, t.ondone) : this.on(Xe, () => {
50453
+ super(), this.file = t.file || "", this.on(Qe, () => {
50454
+ (this[B] === "begin" || this[It] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
50455
+ }), t.ondone ? this.on(Qe, t.ondone) : this.on(Qe, () => {
50452
50456
  this.emit("prefinish"), this.emit("finish"), this.emit("end");
50453
- }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || Sn, this.filter = typeof t.filter == "function" ? t.filter : Rn;
50457
+ }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || Tn, this.filter = typeof t.filter == "function" ? t.filter : Ln;
50454
50458
  let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
50455
50459
  this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
50456
50460
  let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
50457
- this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[Ys]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
50461
+ this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[Ks]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
50458
50462
  }
50459
50463
  warn(t, e, i = {}) {
50460
- Lt(this, t, e, i);
50464
+ Nt(this, t, e, i);
50461
50465
  }
50462
- [Zs](t, e) {
50463
- this[At] === void 0 && (this[At] = false);
50466
+ [Ys](t, e) {
50467
+ this[It] === void 0 && (this[It] = false);
50464
50468
  let i;
50465
50469
  try {
50466
- i = new F(t, e, this[V], this[ae]);
50470
+ i = new C(t, e, this[V], this[he]);
50467
50471
  } catch (r) {
50468
50472
  return this.warn("TAR_ENTRY_INVALID", r);
50469
50473
  }
50470
- if (i.nullBlock) this[qe] ? (this[je] = true, this[B] === "begin" && (this[B] = "header"), this[Dt]("eof")) : (this[qe] = true, this[Dt]("nullBlock"));
50471
- else if (this[qe] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
50474
+ if (i.nullBlock) this[Je] ? (this[je] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[Je] = true, this[At]("nullBlock"));
50475
+ else if (this[Je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
50472
50476
  else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
50473
50477
  else {
50474
50478
  let r = i.type;
50475
50479
  if (/^(Symbolic)?Link$/.test(r) && !i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: i });
50476
50480
  else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
50477
50481
  else {
50478
- let n = this[Nt] = new Yt(i, this[V], this[ae]);
50479
- if (!this[At]) if (n.remain) {
50482
+ let n = this[Dt] = new Ve(i, this[V], this[he]);
50483
+ if (!this[It]) if (n.remain) {
50480
50484
  let o = () => {
50481
- n.invalid || (this[At] = true);
50485
+ n.invalid || (this[It] = true);
50482
50486
  };
50483
50487
  n.on("end", o);
50484
- } else this[At] = true;
50485
- n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[Dt]("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[Dt]("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[zi]())));
50488
+ } else this[It] = true;
50489
+ 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[Gi]())));
50486
50490
  }
50487
50491
  }
50488
50492
  }
50489
- [Ys]() {
50493
+ [Ks]() {
50490
50494
  queueMicrotask(() => this.emit("close"));
50491
50495
  }
50492
- [Hs](t) {
50496
+ [Ws](t) {
50493
50497
  let e = true;
50494
50498
  if (!t) this[et] = void 0, e = false;
50495
50499
  else if (Array.isArray(t)) {
50496
50500
  let [i, ...r] = t;
50497
50501
  this.emit(i, ...r);
50498
- } else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[zi]()), e = false);
50502
+ } else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Gi]()), e = false);
50499
50503
  return e;
50500
50504
  }
50501
- [zi]() {
50505
+ [Gi]() {
50502
50506
  do
50503
50507
  ;
50504
- while (this[Hs](this[it].shift()));
50505
- if (!this[it].length) {
50508
+ while (this[Ws](this[it].shift()));
50509
+ if (this[it].length === 0) {
50506
50510
  let t = this[et];
50507
- !t || t.flowing || t.size === t.remain ? this[Kt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
50511
+ !t || t.flowing || t.size === t.remain ? this[Yt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
50508
50512
  }
50509
50513
  }
50510
- [Hi](t, e) {
50511
- let i = this[Nt];
50514
+ [Yi](t, e) {
50515
+ let i = this[Dt];
50512
50516
  if (!i) throw new Error("attempt to consume body without entry??");
50513
50517
  let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
50514
- return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
50518
+ return i.write(n), i.blockRemain || (this[B] = "header", this[Dt] = void 0, i.end()), n.length;
50515
50519
  }
50516
- [Gs](t, e) {
50517
- let i = this[Nt], r = this[Hi](t, e);
50518
- return !this[Nt] && i && this[Ws](i), r;
50520
+ [Zs](t, e) {
50521
+ let i = this[Dt], r = this[Yi](t, e);
50522
+ return !this[Dt] && i && this[Gs](i), r;
50519
50523
  }
50520
- [Dt](t, e, i) {
50521
- !this[it].length && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
50524
+ [At](t, e, i) {
50525
+ this[it].length === 0 && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
50522
50526
  }
50523
- [Ws](t) {
50524
- switch (this[Dt]("meta", this[ft]), t.type) {
50527
+ [Gs](t) {
50528
+ switch (this[At]("meta", this[ft]), t.type) {
50525
50529
  case "ExtendedHeader":
50526
50530
  case "OldExtendedHeader":
50527
50531
  this[V] = ct.parse(this[ft], this[V], false);
50528
50532
  break;
50529
50533
  case "GlobalExtendedHeader":
50530
- this[ae] = ct.parse(this[ft], this[ae], true);
50534
+ this[he] = ct.parse(this[ft], this[he], true);
50531
50535
  break;
50532
50536
  case "NextFileHasLongPath":
50533
50537
  case "OldGnuLongPath": {
@@ -50550,89 +50554,89 @@ var st = class extends import_events2.EventEmitter {
50550
50554
  write(t, e, i) {
50551
50555
  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;
50552
50556
  if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
50553
- if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < yn) return this[p] = t, i?.(), true;
50554
- for (let a = 0; this[y] === void 0 && a < Gi.length; a++) t[a] !== Gi[a] && (this[y] = false);
50557
+ if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < xn) return this[p] = t, i?.(), true;
50558
+ for (let h = 0; this[y] === void 0 && h < Vi.length; h++) t[h] !== Vi[h] && (this[y] = false);
50555
50559
  let o = false;
50556
50560
  if (this[y] === false && this.zstd !== false) {
50557
50561
  o = true;
50558
- for (let a = 0; a < Zi.length; a++) if (t[a] !== Zi[a]) {
50562
+ for (let h = 0; h < $i.length; h++) if (t[h] !== $i[h]) {
50559
50563
  o = false;
50560
50564
  break;
50561
50565
  }
50562
50566
  }
50563
- let h = this.brotli === void 0 && !o;
50564
- if (this[y] === false && h) if (t.length < 512) if (this[dt]) this.brotli = true;
50567
+ let a = this.brotli === void 0 && !o;
50568
+ if (this[y] === false && a) if (t.length < 512) if (this[dt]) this.brotli = true;
50565
50569
  else return this[p] = t, i?.(), true;
50566
50570
  else try {
50567
- new F(t.subarray(0, 512)), this.brotli = false;
50571
+ new C(t.subarray(0, 512)), this.brotli = false;
50568
50572
  } catch {
50569
50573
  this.brotli = true;
50570
50574
  }
50571
50575
  if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
50572
- let a = this[dt];
50573
- this[dt] = false, this[y] = this[y] === void 0 ? new Pe({}) : o ? new Ze({}) : new He({}), this[y].on("data", (c) => this[Ke](c)), this[y].on("error", (c) => this.abort(c)), this[y].on("end", () => {
50574
- this[dt] = true, this[Ke]();
50575
- }), this[Kt] = true;
50576
- let l = !!this[y][a ? "end" : "write"](t);
50577
- return this[Kt] = false, i?.(), l;
50576
+ let h = this[dt];
50577
+ this[dt] = false, this[y] = this[y] === void 0 ? new ze({}) : o ? new Ye({}) : new We({}), this[y].on("data", (c) => this[$e](c)), this[y].on("error", (c) => this.abort(c)), this[y].on("end", () => {
50578
+ this[dt] = true, this[$e]();
50579
+ }), this[Yt] = true;
50580
+ let l = !!this[y][h ? "end" : "write"](t);
50581
+ return this[Yt] = false, i?.(), l;
50578
50582
  }
50579
50583
  }
50580
- this[Kt] = true, this[y] ? this[y].write(t) : this[Ke](t), this[Kt] = false;
50581
- let n = this[it].length ? false : this[et] ? this[et].flowing : true;
50582
- return !n && !this[it].length && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
50584
+ this[Yt] = true, this[y] ? this[y].write(t) : this[$e](t), this[Yt] = false;
50585
+ let n = this[it].length > 0 ? false : this[et] ? this[et].flowing : true;
50586
+ return !n && this[it].length === 0 && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
50583
50587
  }
50584
- [Wi](t) {
50588
+ [Ki](t) {
50585
50589
  t && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
50586
50590
  }
50587
- [$e]() {
50588
- if (this[dt] && !this[Ui] && !this[ut] && !this[le]) {
50589
- this[Ui] = true;
50590
- let t = this[Nt];
50591
+ [qe]() {
50592
+ if (this[dt] && !this[Zi] && !this[ut] && !this[ae]) {
50593
+ this[Zi] = true;
50594
+ let t = this[Dt];
50591
50595
  if (t && t.blockRemain) {
50592
50596
  let e = this[p] ? this[p].length : 0;
50593
50597
  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();
50594
50598
  }
50595
- this[Dt](Xe);
50599
+ this[At](Qe);
50596
50600
  }
50597
50601
  }
50598
- [Ke](t) {
50599
- if (this[le] && t) this[Wi](t);
50600
- else if (!t && !this[p]) this[$e]();
50602
+ [$e](t) {
50603
+ if (this[ae] && t) this[Ki](t);
50604
+ else if (!t && !this[p]) this[qe]();
50601
50605
  else if (t) {
50602
- if (this[le] = true, this[p]) {
50603
- this[Wi](t);
50606
+ if (this[ae] = true, this[p]) {
50607
+ this[Ki](t);
50604
50608
  let e = this[p];
50605
- this[p] = void 0, this[Ve](e);
50606
- } else this[Ve](t);
50609
+ this[p] = void 0, this[Xe](e);
50610
+ } else this[Xe](t);
50607
50611
  for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[je]; ) {
50608
50612
  let e = this[p];
50609
- this[p] = void 0, this[Ve](e);
50613
+ this[p] = void 0, this[Xe](e);
50610
50614
  }
50611
- this[le] = false;
50615
+ this[ae] = false;
50612
50616
  }
50613
- (!this[p] || this[dt]) && this[$e]();
50617
+ (!this[p] || this[dt]) && this[qe]();
50614
50618
  }
50615
- [Ve](t) {
50619
+ [Xe](t) {
50616
50620
  let e = 0, i = t.length;
50617
50621
  for (; e + 512 <= i && !this[ut] && !this[je]; ) switch (this[B]) {
50618
50622
  case "begin":
50619
50623
  case "header":
50620
- this[Zs](t, e), e += 512;
50624
+ this[Ys](t, e), e += 512;
50621
50625
  break;
50622
50626
  case "ignore":
50623
50627
  case "body":
50624
- e += this[Hi](t, e);
50628
+ e += this[Yi](t, e);
50625
50629
  break;
50626
50630
  case "meta":
50627
- e += this[Gs](t, e);
50631
+ e += this[Zs](t, e);
50628
50632
  break;
50629
50633
  default:
50630
50634
  throw new Error("invalid state: " + this[B]);
50631
50635
  }
50632
- e < i && (this[p] ? this[p] = Buffer.concat([t.subarray(e), this[p]]) : this[p] = t.subarray(e));
50636
+ e < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e), this[p]]) : t.subarray(e));
50633
50637
  }
50634
50638
  end(t, e, i) {
50635
- 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[$e]())), this;
50639
+ 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[qe]())), this;
50636
50640
  }
50637
50641
  };
50638
50642
  var mt = (s3) => {
@@ -50640,38 +50644,38 @@ var mt = (s3) => {
50640
50644
  for (; t > -1 && s3.charAt(t) === "/"; ) e = t, t--;
50641
50645
  return e === -1 ? s3 : s3.slice(0, e);
50642
50646
  };
50643
- var _n = (s3) => {
50647
+ var An = (s3) => {
50644
50648
  let t = s3.onReadEntry;
50645
50649
  s3.onReadEntry = t ? (e) => {
50646
50650
  t(e), e.resume();
50647
50651
  } : (e) => e.resume();
50648
50652
  };
50649
- var Yi = (s3, t) => {
50653
+ var Xi = (s3, t) => {
50650
50654
  let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
50651
- let h = o || (0, import_path.parse)(n).root || ".", a;
50652
- if (n === h) a = false;
50655
+ let a = o || (0, import_path.parse)(n).root || ".", h;
50656
+ if (n === a) h = false;
50653
50657
  else {
50654
50658
  let l = e.get(n);
50655
- l !== void 0 ? a = l : a = r((0, import_path.dirname)(n), h);
50659
+ h = l !== void 0 ? l : r((0, import_path.dirname)(n), a);
50656
50660
  }
50657
- return e.set(n, a), a;
50661
+ return e.set(n, h), h;
50658
50662
  };
50659
50663
  s3.filter = i ? (n, o) => i(n, o) && r(mt(n)) : (n) => r(mt(n));
50660
50664
  };
50661
- var On = (s3) => {
50665
+ var In = (s3) => {
50662
50666
  let t = new st(s3), e = s3.file, i;
50663
50667
  try {
50664
50668
  i = import_node_fs.default.openSync(e, "r");
50665
50669
  let r = import_node_fs.default.fstatSync(i), n = s3.maxReadSize || 16 * 1024 * 1024;
50666
50670
  if (r.size < n) {
50667
- let o = Buffer.allocUnsafe(r.size), h = import_node_fs.default.readSync(i, o, 0, r.size, 0);
50668
- t.end(h === o.byteLength ? o : o.subarray(0, h));
50671
+ let o = Buffer.allocUnsafe(r.size), a = import_node_fs.default.readSync(i, o, 0, r.size, 0);
50672
+ t.end(a === o.byteLength ? o : o.subarray(0, a));
50669
50673
  } else {
50670
- let o = 0, h = Buffer.allocUnsafe(n);
50674
+ let o = 0, a = Buffer.allocUnsafe(n);
50671
50675
  for (; o < r.size; ) {
50672
- let a = import_node_fs.default.readSync(i, h, 0, n, o);
50673
- if (a === 0) break;
50674
- o += a, t.write(h.subarray(0, a));
50676
+ let h = import_node_fs.default.readSync(i, a, 0, n, o);
50677
+ if (h === 0) break;
50678
+ o += h, t.write(a.subarray(0, h));
50675
50679
  }
50676
50680
  t.end();
50677
50681
  }
@@ -50682,58 +50686,58 @@ var On = (s3) => {
50682
50686
  }
50683
50687
  }
50684
50688
  };
50685
- var Tn = (s3, t) => {
50689
+ var Fn = (s3, t) => {
50686
50690
  let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
50687
- return new Promise((o, h) => {
50688
- e.on("error", h), e.on("end", o), import_node_fs.default.stat(r, (a, l) => {
50689
- if (a) h(a);
50691
+ return new Promise((o, a) => {
50692
+ e.on("error", a), e.on("end", o), import_node_fs.default.stat(r, (h, l) => {
50693
+ if (h) a(h);
50690
50694
  else {
50691
- let c = new gt(r, { readSize: i, size: l.size });
50692
- c.on("error", h), c.pipe(e);
50695
+ let c = new _t(r, { readSize: i, size: l.size });
50696
+ c.on("error", a), c.pipe(e);
50693
50697
  }
50694
50698
  });
50695
50699
  });
50696
50700
  };
50697
- var It = K(On, Tn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
50698
- t?.length && Yi(s3, t), s3.noResume || _n(s3);
50701
+ var Ft = K(In, Fn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
50702
+ t?.length && Xi(s3, t), s3.noResume || An(s3);
50699
50703
  });
50700
- var Ki = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
50701
- var { isAbsolute: Ln, parse: Ks } = import_node_path4.win32;
50702
- var ce = (s3) => {
50703
- let t = "", e = Ks(s3);
50704
- for (; Ln(s3) || e.root; ) {
50704
+ var qi = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
50705
+ var { isAbsolute: kn, parse: Vs } = import_node_path4.win32;
50706
+ var le = (s3) => {
50707
+ let t = "", e = Vs(s3);
50708
+ for (; kn(s3) || e.root; ) {
50705
50709
  let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
50706
- s3 = s3.slice(i.length), t += i, e = Ks(s3);
50710
+ s3 = s3.slice(i.length), t += i, e = Vs(s3);
50707
50711
  }
50708
50712
  return [t, s3];
50709
50713
  };
50710
- var Qe = ["|", "<", ">", "?", ":"];
50711
- var Vi = Qe.map((s3) => String.fromCharCode(61440 + s3.charCodeAt(0)));
50712
- var Nn = new Map(Qe.map((s3, t) => [s3, Vi[t]]));
50713
- var Dn = new Map(Vi.map((s3, t) => [s3, Qe[t]]));
50714
- var $i = (s3) => Qe.reduce((t, e) => t.split(e).join(Nn.get(e)), s3);
50715
- var Vs = (s3) => Vi.reduce((t, e) => t.split(e).join(Dn.get(e)), s3);
50716
- var tr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
50717
- var An = 16 * 1024 * 1024;
50718
- var qs = /* @__PURE__ */ Symbol("process");
50719
- var js = /* @__PURE__ */ Symbol("file");
50720
- var Qs = /* @__PURE__ */ Symbol("directory");
50721
- var qi = /* @__PURE__ */ Symbol("symlink");
50722
- var Js = /* @__PURE__ */ Symbol("hardlink");
50723
- var fe = /* @__PURE__ */ Symbol("header");
50724
- var Je = /* @__PURE__ */ Symbol("read");
50725
- var ji = /* @__PURE__ */ Symbol("lstat");
50726
- var ti = /* @__PURE__ */ Symbol("onlstat");
50727
- var Qi = /* @__PURE__ */ Symbol("onread");
50728
- var Ji = /* @__PURE__ */ Symbol("onreadlink");
50729
- var ts = /* @__PURE__ */ Symbol("openfile");
50730
- var es = /* @__PURE__ */ Symbol("onopenfile");
50714
+ var ti = ["|", "<", ">", "?", ":"];
50715
+ var Qi = ti.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
50716
+ var vn = new Map(ti.map((s3, t) => [s3, Qi[t]]));
50717
+ var Mn = new Map(Qi.map((s3, t) => [s3, ti[t]]));
50718
+ var Ji = (s3) => ti.reduce((t, e) => t.split(e).join(vn.get(e)), s3);
50719
+ var $s = (s3) => Qi.reduce((t, e) => t.split(e).join(Mn.get(e)), s3);
50720
+ var er = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
50721
+ var Bn = 16 * 1024 * 1024;
50722
+ var Qs = /* @__PURE__ */ Symbol("process");
50723
+ var Js = /* @__PURE__ */ Symbol("file");
50724
+ var js = /* @__PURE__ */ Symbol("directory");
50725
+ var ts = /* @__PURE__ */ Symbol("symlink");
50726
+ var tr = /* @__PURE__ */ Symbol("hardlink");
50727
+ var ce = /* @__PURE__ */ Symbol("header");
50728
+ var ei = /* @__PURE__ */ Symbol("read");
50729
+ var es = /* @__PURE__ */ Symbol("lstat");
50730
+ var ii = /* @__PURE__ */ Symbol("onlstat");
50731
+ var is = /* @__PURE__ */ Symbol("onread");
50732
+ var ss = /* @__PURE__ */ Symbol("onreadlink");
50733
+ var rs = /* @__PURE__ */ Symbol("openfile");
50734
+ var ns = /* @__PURE__ */ Symbol("onopenfile");
50731
50735
  var pt = /* @__PURE__ */ Symbol("close");
50732
- var ei = /* @__PURE__ */ Symbol("mode");
50733
- var is = /* @__PURE__ */ Symbol("awaitDrain");
50734
- var Xi = /* @__PURE__ */ Symbol("ondrain");
50736
+ var si = /* @__PURE__ */ Symbol("mode");
50737
+ var os = /* @__PURE__ */ Symbol("awaitDrain");
50738
+ var ji = /* @__PURE__ */ Symbol("ondrain");
50735
50739
  var X = /* @__PURE__ */ Symbol("prefix");
50736
- var de = class extends A {
50740
+ var fe = class extends A {
50737
50741
  path;
50738
50742
  portable;
50739
50743
  myuid = process.getuid && process.getuid() || 0;
@@ -50765,110 +50769,110 @@ var de = class extends A {
50765
50769
  onWriteEntry;
50766
50770
  #t = false;
50767
50771
  constructor(t, e = {}) {
50768
- let i = re(e);
50769
- super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || An, 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);
50772
+ let i = se(e);
50773
+ super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || Bn, 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);
50770
50774
  let r = false;
50771
50775
  if (!this.preservePaths) {
50772
- let [o, h] = ce(this.path);
50773
- o && typeof h == "string" && (this.path = h, r = o);
50776
+ let [o, a] = le(this.path);
50777
+ o && typeof a == "string" && (this.path = a, r = o);
50774
50778
  }
50775
- this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Vs(this.path.replace(/\\/g, "/")), t = t.replace(/\\/g, "/")), this.absolute = f(i.absolute || import_path2.default.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 });
50779
+ this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = $s(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || import_path2.default.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 });
50776
50780
  let n = this.statCache.get(this.absolute);
50777
- n ? this[ti](n) : this[ji]();
50781
+ n ? this[ii](n) : this[es]();
50778
50782
  }
50779
50783
  warn(t, e, i = {}) {
50780
- return Lt(this, t, e, i);
50784
+ return Nt(this, t, e, i);
50781
50785
  }
50782
50786
  emit(t, ...e) {
50783
50787
  return t === "error" && (this.#t = true), super.emit(t, ...e);
50784
50788
  }
50785
- [ji]() {
50789
+ [es]() {
50786
50790
  import_fs3.default.lstat(this.absolute, (t, e) => {
50787
50791
  if (t) return this.emit("error", t);
50788
- this[ti](e);
50792
+ this[ii](e);
50789
50793
  });
50790
50794
  }
50791
- [ti](t) {
50792
- this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = In(t), this.emit("stat", t), this[qs]();
50795
+ [ii](t) {
50796
+ this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Pn(t), this.emit("stat", t), this[Qs]();
50793
50797
  }
50794
- [qs]() {
50798
+ [Qs]() {
50795
50799
  switch (this.type) {
50796
50800
  case "File":
50797
- return this[js]();
50801
+ return this[Js]();
50798
50802
  case "Directory":
50799
- return this[Qs]();
50803
+ return this[js]();
50800
50804
  case "SymbolicLink":
50801
- return this[qi]();
50805
+ return this[ts]();
50802
50806
  default:
50803
50807
  return this.end();
50804
50808
  }
50805
50809
  }
50806
- [ei](t) {
50807
- return Ki(t, this.type === "Directory", this.portable);
50810
+ [si](t) {
50811
+ return qi(t, this.type === "Directory", this.portable);
50808
50812
  }
50809
50813
  [X](t) {
50810
- return tr(t, this.prefix);
50814
+ return er(t, this.prefix);
50811
50815
  }
50812
- [fe]() {
50816
+ [ce]() {
50813
50817
  if (!this.stat) throw new Error("cannot write header before stat");
50814
- 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[ei](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());
50818
+ this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new C({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this[si](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());
50815
50819
  let t = this.header?.block;
50816
50820
  if (!t) throw new Error("failed to encode header");
50817
50821
  super.write(t);
50818
50822
  }
50819
- [Qs]() {
50823
+ [js]() {
50820
50824
  if (!this.stat) throw new Error("cannot create directory entry without stat");
50821
- this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
50825
+ this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[ce](), this.end();
50822
50826
  }
50823
- [qi]() {
50827
+ [ts]() {
50824
50828
  import_fs3.default.readlink(this.absolute, (t, e) => {
50825
50829
  if (t) return this.emit("error", t);
50826
- this[Ji](e);
50830
+ this[ss](e);
50827
50831
  });
50828
50832
  }
50829
- [Ji](t) {
50830
- this.linkpath = f(t), this[fe](), this.end();
50833
+ [ss](t) {
50834
+ this.linkpath = f(t), this[ce](), this.end();
50831
50835
  }
50832
- [Js](t) {
50836
+ [tr](t) {
50833
50837
  if (!this.stat) throw new Error("cannot create link entry without stat");
50834
- this.type = "Link", this.linkpath = f(import_path2.default.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
50838
+ this.type = "Link", this.linkpath = f(import_path2.default.relative(this.cwd, t)), this.stat.size = 0, this[ce](), this.end();
50835
50839
  }
50836
- [js]() {
50840
+ [Js]() {
50837
50841
  if (!this.stat) throw new Error("cannot create file entry without stat");
50838
50842
  if (this.stat.nlink > 1) {
50839
50843
  let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
50840
- if (e?.indexOf(this.cwd) === 0) return this[Js](e);
50844
+ if (e?.indexOf(this.cwd) === 0) return this[tr](e);
50841
50845
  this.linkCache.set(t, this.absolute);
50842
50846
  }
50843
- if (this[fe](), this.stat.size === 0) return this.end();
50844
- this[ts]();
50847
+ if (this[ce](), this.stat.size === 0) return this.end();
50848
+ this[rs]();
50845
50849
  }
50846
- [ts]() {
50850
+ [rs]() {
50847
50851
  import_fs3.default.open(this.absolute, "r", (t, e) => {
50848
50852
  if (t) return this.emit("error", t);
50849
- this[es](e);
50853
+ this[ns](e);
50850
50854
  });
50851
50855
  }
50852
- [es](t) {
50856
+ [ns](t) {
50853
50857
  if (this.fd = t, this.#t) return this[pt]();
50854
50858
  if (!this.stat) throw new Error("should stat before calling onopenfile");
50855
50859
  this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
50856
50860
  let e = Math.min(this.blockLen, this.maxReadSize);
50857
- this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[Je]();
50861
+ this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ei]();
50858
50862
  }
50859
- [Je]() {
50863
+ [ei]() {
50860
50864
  let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
50861
50865
  if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
50862
- import_fs3.default.read(t, e, i, r, n, (o, h) => {
50866
+ import_fs3.default.read(t, e, i, r, n, (o, a) => {
50863
50867
  if (o) return this[pt](() => this.emit("error", o));
50864
- this[Qi](h);
50868
+ this[is](a);
50865
50869
  });
50866
50870
  }
50867
50871
  [pt](t = () => {
50868
50872
  }) {
50869
50873
  this.fd !== void 0 && import_fs3.default.close(this.fd, t);
50870
50874
  }
50871
- [Qi](t) {
50875
+ [is](t) {
50872
50876
  if (t <= 0 && this.remain > 0) {
50873
50877
  let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
50874
50878
  return this[pt](() => this.emit("error", r));
@@ -50880,9 +50884,9 @@ var de = class extends A {
50880
50884
  if (!this.buf) throw new Error("should have created buffer prior to reading");
50881
50885
  if (t === this.remain) for (let r = t; r < this.length && t < this.blockRemain; r++) this.buf[r + this.offset] = 0, t++, this.remain++;
50882
50886
  let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
50883
- this.write(e) ? this[Xi]() : this[is](() => this[Xi]());
50887
+ this.write(e) ? this[ji]() : this[os](() => this[ji]());
50884
50888
  }
50885
- [is](t) {
50889
+ [os](t) {
50886
50890
  this.once("drain", t);
50887
50891
  }
50888
50892
  write(t, e, i) {
@@ -50892,30 +50896,30 @@ var de = class extends A {
50892
50896
  }
50893
50897
  return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
50894
50898
  }
50895
- [Xi]() {
50899
+ [ji]() {
50896
50900
  if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
50897
50901
  if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
50898
- 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[Je]();
50902
+ 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[ei]();
50899
50903
  }
50900
50904
  };
50901
- var ii = class extends de {
50905
+ var ri = class extends fe {
50902
50906
  sync = true;
50903
- [ji]() {
50904
- this[ti](import_fs3.default.lstatSync(this.absolute));
50905
- }
50906
- [qi]() {
50907
- this[Ji](import_fs3.default.readlinkSync(this.absolute));
50907
+ [es]() {
50908
+ this[ii](import_fs3.default.lstatSync(this.absolute));
50908
50909
  }
50909
50910
  [ts]() {
50910
- this[es](import_fs3.default.openSync(this.absolute, "r"));
50911
+ this[ss](import_fs3.default.readlinkSync(this.absolute));
50911
50912
  }
50912
- [Je]() {
50913
+ [rs]() {
50914
+ this[ns](import_fs3.default.openSync(this.absolute, "r"));
50915
+ }
50916
+ [ei]() {
50913
50917
  let t = true;
50914
50918
  try {
50915
50919
  let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
50916
50920
  if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
50917
- let h = import_fs3.default.readSync(e, i, r, n, o);
50918
- this[Qi](h), t = false;
50921
+ let a = import_fs3.default.readSync(e, i, r, n, o);
50922
+ this[is](a), t = false;
50919
50923
  } finally {
50920
50924
  if (t) try {
50921
50925
  this[pt](() => {
@@ -50924,7 +50928,7 @@ var ii = class extends de {
50924
50928
  }
50925
50929
  }
50926
50930
  }
50927
- [is](t) {
50931
+ [os](t) {
50928
50932
  t();
50929
50933
  }
50930
50934
  [pt](t = () => {
@@ -50932,7 +50936,7 @@ var ii = class extends de {
50932
50936
  this.fd !== void 0 && import_fs3.default.closeSync(this.fd), t();
50933
50937
  }
50934
50938
  };
50935
- var si = class extends A {
50939
+ var ni = class extends A {
50936
50940
  blockLen = 0;
50937
50941
  blockRemain = 0;
50938
50942
  buf = 0;
@@ -50961,29 +50965,29 @@ var si = class extends A {
50961
50965
  size;
50962
50966
  onWriteEntry;
50963
50967
  warn(t, e, i = {}) {
50964
- return Lt(this, t, e, i);
50968
+ return Nt(this, t, e, i);
50965
50969
  }
50966
50970
  constructor(t, e = {}) {
50967
- let i = re(e);
50971
+ let i = se(e);
50968
50972
  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;
50969
50973
  let { type: r } = t;
50970
50974
  if (r === "Unsupported") throw new Error("writing entry that should be ignored");
50971
- 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[ei](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);
50975
+ 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[si](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);
50972
50976
  let n = false;
50973
50977
  if (!this.preservePaths) {
50974
- let [h, a] = ce(this.path);
50975
- h && typeof a == "string" && (this.path = a, n = h);
50978
+ let [a, h] = le(this.path);
50979
+ a && typeof h == "string" && (this.path = h, n = a);
50976
50980
  }
50977
- 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());
50981
+ this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new C({ 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());
50978
50982
  let o = this.header?.block;
50979
50983
  if (!o) throw new Error("failed to encode header");
50980
50984
  super.write(o), t.pipe(this);
50981
50985
  }
50982
50986
  [X](t) {
50983
- return tr(t, this.prefix);
50987
+ return er(t, this.prefix);
50984
50988
  }
50985
- [ei](t) {
50986
- return Ki(t, this.type === "Directory", this.portable);
50989
+ [si](t) {
50990
+ return qi(t, this.type === "Directory", this.portable);
50987
50991
  }
50988
50992
  write(t, e, i) {
50989
50993
  typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
@@ -50995,8 +50999,8 @@ var si = class extends A {
50995
50999
  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;
50996
51000
  }
50997
51001
  };
50998
- var In = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
50999
- var ri = class s2 {
51002
+ var Pn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
51003
+ var oi = class s2 {
51000
51004
  tail;
51001
51005
  head;
51002
51006
  length = 0;
@@ -51027,11 +51031,11 @@ var ri = class s2 {
51027
51031
  t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
51028
51032
  }
51029
51033
  push(...t) {
51030
- for (let e = 0, i = t.length; e < i; e++) Fn(this, t[e]);
51034
+ for (let e = 0, i = t.length; e < i; e++) Un(this, t[e]);
51031
51035
  return this.length;
51032
51036
  }
51033
51037
  unshift(...t) {
51034
- for (var e = 0, i = t.length; e < i; e++) kn(this, t[e]);
51038
+ for (var e = 0, i = t.length; e < i; e++) Hn(this, t[e]);
51035
51039
  return this.length;
51036
51040
  }
51037
51041
  pop() {
@@ -51127,7 +51131,7 @@ var ri = class s2 {
51127
51131
  let n = [];
51128
51132
  for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
51129
51133
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
51130
- for (let o of i) r = Cn(this, r, o);
51134
+ for (let o of i) r = zn(this, r, o);
51131
51135
  return n;
51132
51136
  }
51133
51137
  reverse() {
@@ -51139,17 +51143,17 @@ var ri = class s2 {
51139
51143
  return this.head = e, this.tail = t, this;
51140
51144
  }
51141
51145
  };
51142
- function Cn(s3, t, e) {
51143
- let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
51146
+ function zn(s3, t, e) {
51147
+ let i = t, r = t ? t.next : s3.head, n = new de(e, i, r, s3);
51144
51148
  return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
51145
51149
  }
51146
- function Fn(s3, t) {
51147
- s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
51150
+ function Un(s3, t) {
51151
+ s3.tail = new de(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
51148
51152
  }
51149
- function kn(s3, t) {
51150
- s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
51153
+ function Hn(s3, t) {
51154
+ s3.head = new de(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
51151
51155
  }
51152
- var ue = class {
51156
+ var de = class {
51153
51157
  list;
51154
51158
  next;
51155
51159
  prev;
@@ -51158,41 +51162,43 @@ var ue = class {
51158
51162
  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;
51159
51163
  }
51160
51164
  };
51161
- var fi = class {
51165
+ var mi = class {
51162
51166
  path;
51163
51167
  absolute;
51164
51168
  entry;
51165
51169
  stat;
51166
51170
  readdir;
51167
51171
  pending = false;
51172
+ pendingLink = false;
51168
51173
  ignore = false;
51169
51174
  piped = false;
51170
51175
  constructor(t, e) {
51171
51176
  this.path = t || "./", this.absolute = e;
51172
51177
  }
51173
51178
  };
51174
- var er = Buffer.alloc(1024);
51175
- var ni = /* @__PURE__ */ Symbol("onStat");
51176
- var me = /* @__PURE__ */ Symbol("ended");
51179
+ var ir = Buffer.alloc(1024);
51180
+ var ai = /* @__PURE__ */ Symbol("onStat");
51181
+ var ue = /* @__PURE__ */ Symbol("ended");
51177
51182
  var W = /* @__PURE__ */ Symbol("queue");
51178
- var Ct = /* @__PURE__ */ Symbol("current");
51179
- var Ft = /* @__PURE__ */ Symbol("process");
51183
+ var me = /* @__PURE__ */ Symbol("pendingLinks");
51184
+ var Et = /* @__PURE__ */ Symbol("current");
51185
+ var Ct = /* @__PURE__ */ Symbol("process");
51180
51186
  var pe = /* @__PURE__ */ Symbol("processing");
51181
- var ss = /* @__PURE__ */ Symbol("processJob");
51187
+ var hi = /* @__PURE__ */ Symbol("processJob");
51182
51188
  var G = /* @__PURE__ */ Symbol("jobs");
51183
- var rs = /* @__PURE__ */ Symbol("jobDone");
51184
- var oi = /* @__PURE__ */ Symbol("addFSEntry");
51185
- var ir = /* @__PURE__ */ Symbol("addTarEntry");
51186
- var hs = /* @__PURE__ */ Symbol("stat");
51187
- var as = /* @__PURE__ */ Symbol("readdir");
51188
- var hi = /* @__PURE__ */ Symbol("onreaddir");
51189
- var ai = /* @__PURE__ */ Symbol("pipe");
51190
- var sr = /* @__PURE__ */ Symbol("entry");
51191
- var ns = /* @__PURE__ */ Symbol("entryOpt");
51192
- var li = /* @__PURE__ */ Symbol("writeEntryClass");
51193
- var nr = /* @__PURE__ */ Symbol("write");
51194
- var os = /* @__PURE__ */ Symbol("ondrain");
51195
- var Et = class extends A {
51189
+ var hs = /* @__PURE__ */ Symbol("jobDone");
51190
+ var li = /* @__PURE__ */ Symbol("addFSEntry");
51191
+ var sr = /* @__PURE__ */ Symbol("addTarEntry");
51192
+ var cs = /* @__PURE__ */ Symbol("stat");
51193
+ var fs = /* @__PURE__ */ Symbol("readdir");
51194
+ var ci = /* @__PURE__ */ Symbol("onreaddir");
51195
+ var fi = /* @__PURE__ */ Symbol("pipe");
51196
+ var rr = /* @__PURE__ */ Symbol("entry");
51197
+ var as = /* @__PURE__ */ Symbol("entryOpt");
51198
+ var di = /* @__PURE__ */ Symbol("writeEntryClass");
51199
+ var or = /* @__PURE__ */ Symbol("write");
51200
+ var ls = /* @__PURE__ */ Symbol("ondrain");
51201
+ var wt = class extends A {
51196
51202
  sync = false;
51197
51203
  opt;
51198
51204
  cwd;
@@ -51213,123 +51219,139 @@ var Et = class extends A {
51213
51219
  mtime;
51214
51220
  filter;
51215
51221
  jobs;
51216
- [li];
51222
+ [di];
51217
51223
  onWriteEntry;
51218
51224
  [W];
51225
+ [me] = /* @__PURE__ */ new Map();
51219
51226
  [G] = 0;
51220
51227
  [pe] = false;
51221
- [me] = false;
51228
+ [ue] = false;
51222
51229
  constructor(t = {}) {
51223
- 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[li] = de, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
51230
+ 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[di] = fe, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
51224
51231
  if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
51225
- if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new Be(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new Ue(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ge(t.zstd)), !this.zip) throw new Error("impossible");
51232
+ 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");
51226
51233
  let e = this.zip;
51227
- e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[os]()), this.on("resume", () => e.resume());
51228
- } else this.on("drain", this[os]);
51229
- 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 ri(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[pe] = false, this[me] = false;
51234
+ e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[ls]()), this.on("resume", () => e.resume());
51235
+ } else this.on("drain", this[ls]);
51236
+ 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 oi(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[pe] = false, this[ue] = false;
51230
51237
  }
51231
- [nr](t) {
51238
+ [or](t) {
51232
51239
  return super.write(t);
51233
51240
  }
51234
51241
  add(t) {
51235
51242
  return this.write(t), this;
51236
51243
  }
51237
51244
  end(t, e, i) {
51238
- 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;
51245
+ 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[Ct](), i && i(), this;
51239
51246
  }
51240
51247
  write(t) {
51241
- if (this[me]) throw new Error("write after end");
51242
- return t instanceof Yt ? this[ir](t) : this[oi](t), this.flowing;
51248
+ if (this[ue]) throw new Error("write after end");
51249
+ return typeof t == "string" ? this[li](t) : this[sr](t), this.flowing;
51243
51250
  }
51244
- [ir](t) {
51251
+ [sr](t) {
51245
51252
  let e = f(import_path3.default.resolve(this.cwd, t.path));
51246
51253
  if (!this.filter(t.path, t)) t.resume();
51247
51254
  else {
51248
- let i = new fi(t.path, e);
51249
- i.entry = new si(t, this[ns](i)), i.entry.on("end", () => this[rs](i)), this[G] += 1, this[W].push(i);
51255
+ let i = new mi(t.path, e);
51256
+ i.entry = new ni(t, this[as](i)), i.entry.on("end", () => this[hs](i)), this[G] += 1, this[W].push(i);
51250
51257
  }
51251
- this[Ft]();
51258
+ this[Ct]();
51252
51259
  }
51253
- [oi](t) {
51260
+ [li](t) {
51254
51261
  let e = f(import_path3.default.resolve(this.cwd, t));
51255
- this[W].push(new fi(t, e)), this[Ft]();
51262
+ this[W].push(new mi(t, e)), this[Ct]();
51256
51263
  }
51257
- [hs](t) {
51264
+ [cs](t) {
51258
51265
  t.pending = true, this[G] += 1;
51259
51266
  let e = this.follow ? "stat" : "lstat";
51260
51267
  import_fs2.default[e](t.absolute, (i, r) => {
51261
- t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[ni](t, r);
51268
+ t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[ai](t, r);
51262
51269
  });
51263
51270
  }
51264
- [ni](t, e) {
51265
- 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[ss](t) : t.ignore = true, this[Ft]();
51271
+ [ai](t, e) {
51272
+ if (this.statCache.set(t.absolute, e), t.stat = e, !this.filter(t.path, e)) t.ignore = true;
51273
+ else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t === this[Et]) this[hi](t);
51274
+ else {
51275
+ let i = `${e.dev}:${e.ino}`, r = this[me].get(i);
51276
+ r ? r.push(t) : this[me].set(i, [t]), t.pendingLink = true, t.pending = true;
51277
+ }
51278
+ this[Ct]();
51266
51279
  }
51267
- [as](t) {
51280
+ [fs](t) {
51268
51281
  t.pending = true, this[G] += 1, import_fs2.default.readdir(t.absolute, (e, i) => {
51269
51282
  if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
51270
- this[hi](t, i);
51283
+ this[ci](t, i);
51271
51284
  });
51272
51285
  }
51273
- [hi](t, e) {
51274
- this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ft]();
51286
+ [ci](t, e) {
51287
+ this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ct]();
51275
51288
  }
51276
- [Ft]() {
51289
+ [Ct]() {
51277
51290
  if (!this[pe]) {
51278
51291
  this[pe] = true;
51279
- for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[ss](t.value), t.value.ignore) {
51292
+ for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[hi](t.value), t.value.ignore) {
51280
51293
  let e = t.next;
51281
51294
  this[W].removeNode(t), t.next = e;
51282
51295
  }
51283
- this[pe] = false, this[me] && !this[W].length && this[G] === 0 && (this.zip ? this.zip.end(er) : (super.write(er), super.end()));
51296
+ this[pe] = false, this[ue] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(ir) : (super.write(ir), super.end()));
51284
51297
  }
51285
51298
  }
51286
- get [Ct]() {
51299
+ get [Et]() {
51287
51300
  return this[W] && this[W].head && this[W].head.value;
51288
51301
  }
51289
- [rs](t) {
51290
- this[W].shift(), this[G] -= 1, this[Ft]();
51302
+ [hs](t) {
51303
+ this[W].shift(), this[G] -= 1;
51304
+ let { stat: e } = t;
51305
+ if (e && e.isFile() && e.nlink > 1) {
51306
+ let i = `${e.dev}:${e.ino}`, r = this[me].get(i);
51307
+ if (r) {
51308
+ this[me].delete(i);
51309
+ for (let n of r) n.pending = false, this[hi](n);
51310
+ }
51311
+ }
51312
+ this[Ct]();
51291
51313
  }
51292
- [ss](t) {
51293
- if (!t.pending) {
51314
+ [hi](t) {
51315
+ if (t.pending && t.pendingLink && t === this[Et] && (t.pending = false, t.pendingLink = false), !t.pending) {
51294
51316
  if (t.entry) {
51295
- t === this[Ct] && !t.piped && this[ai](t);
51317
+ t === this[Et] && !t.piped && this[fi](t);
51296
51318
  return;
51297
51319
  }
51298
51320
  if (!t.stat) {
51299
51321
  let e = this.statCache.get(t.absolute);
51300
- e ? this[ni](t, e) : this[hs](t);
51322
+ e ? this[ai](t, e) : this[cs](t);
51301
51323
  }
51302
51324
  if (t.stat && !t.ignore) {
51303
51325
  if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
51304
51326
  let e = this.readdirCache.get(t.absolute);
51305
- if (e ? this[hi](t, e) : this[as](t), !t.readdir) return;
51327
+ if (e ? this[ci](t, e) : this[fs](t), !t.readdir) return;
51306
51328
  }
51307
- if (t.entry = this[sr](t), !t.entry) {
51329
+ if (t.entry = this[rr](t), !t.entry) {
51308
51330
  t.ignore = true;
51309
51331
  return;
51310
51332
  }
51311
- t === this[Ct] && !t.piped && this[ai](t);
51333
+ t === this[Et] && !t.piped && this[fi](t);
51312
51334
  }
51313
51335
  }
51314
51336
  }
51315
- [ns](t) {
51337
+ [as](t) {
51316
51338
  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 };
51317
51339
  }
51318
- [sr](t) {
51340
+ [rr](t) {
51319
51341
  this[G] += 1;
51320
51342
  try {
51321
- return new this[li](t.path, this[ns](t)).on("end", () => this[rs](t)).on("error", (i) => this.emit("error", i));
51343
+ return new this[di](t.path, this[as](t)).on("end", () => this[hs](t)).on("error", (i) => this.emit("error", i));
51322
51344
  } catch (e) {
51323
51345
  this.emit("error", e);
51324
51346
  }
51325
51347
  }
51326
- [os]() {
51327
- this[Ct] && this[Ct].entry && this[Ct].entry.resume();
51348
+ [ls]() {
51349
+ this[Et] && this[Et].entry && this[Et].entry.resume();
51328
51350
  }
51329
- [ai](t) {
51351
+ [fi](t) {
51330
51352
  t.piped = true, t.readdir && t.readdir.forEach((r) => {
51331
51353
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
51332
- this[oi](o + r);
51354
+ this[li](o + r);
51333
51355
  });
51334
51356
  let e = t.entry, i = this.zip;
51335
51357
  if (!e) throw new Error("cannot pipe without source");
@@ -51343,137 +51365,135 @@ var Et = class extends A {
51343
51365
  return this.zip && this.zip.pause(), super.pause();
51344
51366
  }
51345
51367
  warn(t, e, i = {}) {
51346
- Lt(this, t, e, i);
51368
+ Nt(this, t, e, i);
51347
51369
  }
51348
51370
  };
51349
- var kt = class extends Et {
51371
+ var kt = class extends wt {
51350
51372
  sync = true;
51351
51373
  constructor(t) {
51352
- super(t), this[li] = ii;
51374
+ super(t), this[di] = ri;
51353
51375
  }
51354
51376
  pause() {
51355
51377
  }
51356
51378
  resume() {
51357
51379
  }
51358
- [hs](t) {
51380
+ [cs](t) {
51359
51381
  let e = this.follow ? "statSync" : "lstatSync";
51360
- this[ni](t, import_fs2.default[e](t.absolute));
51382
+ this[ai](t, import_fs2.default[e](t.absolute));
51361
51383
  }
51362
- [as](t) {
51363
- this[hi](t, import_fs2.default.readdirSync(t.absolute));
51384
+ [fs](t) {
51385
+ this[ci](t, import_fs2.default.readdirSync(t.absolute));
51364
51386
  }
51365
- [ai](t) {
51387
+ [fi](t) {
51366
51388
  let e = t.entry, i = this.zip;
51367
51389
  if (t.readdir && t.readdir.forEach((r) => {
51368
51390
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
51369
- this[oi](o + r);
51391
+ this[li](o + r);
51370
51392
  }), !e) throw new Error("Cannot pipe without source");
51371
51393
  i ? e.on("data", (r) => {
51372
51394
  i.write(r);
51373
51395
  }) : e.on("data", (r) => {
51374
- super[nr](r);
51396
+ super[or](r);
51375
51397
  });
51376
51398
  }
51377
51399
  };
51378
- var vn = (s3, t) => {
51400
+ var Wn = (s3, t) => {
51379
51401
  let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
51380
- e.pipe(i), hr(e, t);
51402
+ e.pipe(i), ar(e, t);
51381
51403
  };
51382
- var Mn = (s3, t) => {
51383
- let e = new Et(s3), i = new tt(s3.file, { mode: s3.mode || 438 });
51404
+ var Gn = (s3, t) => {
51405
+ let e = new wt(s3), i = new tt(s3.file, { mode: s3.mode || 438 });
51384
51406
  e.pipe(i);
51385
51407
  let r = new Promise((n, o) => {
51386
51408
  i.on("error", o), i.on("close", n), e.on("error", o);
51387
51409
  });
51388
- return ar(e, t), r;
51410
+ return lr(e, t).catch((n) => e.emit("error", n)), r;
51389
51411
  };
51390
- var hr = (s3, t) => {
51412
+ var ar = (s3, t) => {
51391
51413
  t.forEach((e) => {
51392
- e.charAt(0) === "@" ? It({ file: import_node_path.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
51414
+ e.charAt(0) === "@" ? Ft({ file: import_node_path.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
51393
51415
  }), s3.end();
51394
51416
  };
51395
- var ar = async (s3, t) => {
51396
- for (let e = 0; e < t.length; e++) {
51397
- let i = String(t[e]);
51398
- i.charAt(0) === "@" ? await It({ file: import_node_path.default.resolve(String(s3.cwd), i.slice(1)), noResume: true, onReadEntry: (r) => {
51399
- s3.add(r);
51400
- } }) : s3.add(i);
51401
- }
51417
+ var lr = async (s3, t) => {
51418
+ for (let e of t) e.charAt(0) === "@" ? await Ft({ file: import_node_path.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
51419
+ s3.add(i);
51420
+ } }) : s3.add(e);
51402
51421
  s3.end();
51403
51422
  };
51404
- var Bn = (s3, t) => {
51423
+ var Zn = (s3, t) => {
51405
51424
  let e = new kt(s3);
51406
- return hr(e, t), e;
51407
- };
51408
- var Pn = (s3, t) => {
51409
- let e = new Et(s3);
51410
51425
  return ar(e, t), e;
51411
51426
  };
51412
- var zn = K(vn, Mn, Bn, Pn, (s3, t) => {
51427
+ var Yn = (s3, t) => {
51428
+ let e = new wt(s3);
51429
+ return lr(e, t).catch((i) => e.emit("error", i)), e;
51430
+ };
51431
+ var Kn = K(Wn, Gn, Zn, Yn, (s3, t) => {
51413
51432
  if (!t?.length) throw new TypeError("no paths specified to add to archive");
51414
51433
  });
51415
- var Un = process.env.__FAKE_PLATFORM__ || process.platform;
51416
- var Hn = Un === "win32";
51417
- var { O_CREAT: Wn, O_TRUNC: Gn, O_WRONLY: Zn } = import_fs4.default.constants;
51418
- var cr = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs4.default.constants.UV_FS_O_FILEMAP || 0;
51419
- var Yn = Hn && !!cr;
51420
- var Kn = 512 * 1024;
51421
- var Vn = cr | Gn | Wn | Zn;
51422
- var ls = Yn ? (s3) => s3 < Kn ? Vn : "w" : () => "w";
51423
- var cs = (s3, t, e) => {
51434
+ var Vn = process.env.__FAKE_PLATFORM__ || process.platform;
51435
+ var ur = Vn === "win32";
51436
+ var { O_CREAT: mr, O_NOFOLLOW: cr, O_TRUNC: pr, O_WRONLY: Er } = import_fs4.default.constants;
51437
+ var wr = Number(process.env.__FAKE_FS_O_FILENAME__) || import_fs4.default.constants.UV_FS_O_FILEMAP || 0;
51438
+ var $n = ur && !!wr;
51439
+ var Xn = 512 * 1024;
51440
+ var qn = wr | pr | mr | Er;
51441
+ var fr = !ur && typeof cr == "number" ? cr | pr | mr | Er : null;
51442
+ var ds = fr !== null ? () => fr : $n ? (s3) => s3 < Xn ? qn : "w" : () => "w";
51443
+ var us = (s3, t, e) => {
51424
51444
  try {
51425
51445
  return import_node_fs4.default.lchownSync(s3, t, e);
51426
51446
  } catch (i) {
51427
51447
  if (i?.code !== "ENOENT") throw i;
51428
51448
  }
51429
51449
  };
51430
- var di = (s3, t, e, i) => {
51450
+ var pi = (s3, t, e, i) => {
51431
51451
  import_node_fs4.default.lchown(s3, t, e, (r) => {
51432
51452
  i(r && r?.code !== "ENOENT" ? r : null);
51433
51453
  });
51434
51454
  };
51435
- var $n = (s3, t, e, i, r) => {
51436
- if (t.isDirectory()) fs(import_node_path6.default.resolve(s3, t.name), e, i, (n) => {
51455
+ var Qn = (s3, t, e, i, r) => {
51456
+ if (t.isDirectory()) ms(import_node_path6.default.resolve(s3, t.name), e, i, (n) => {
51437
51457
  if (n) return r(n);
51438
51458
  let o = import_node_path6.default.resolve(s3, t.name);
51439
- di(o, e, i, r);
51459
+ pi(o, e, i, r);
51440
51460
  });
51441
51461
  else {
51442
51462
  let n = import_node_path6.default.resolve(s3, t.name);
51443
- di(n, e, i, r);
51463
+ pi(n, e, i, r);
51444
51464
  }
51445
51465
  };
51446
- var fs = (s3, t, e, i) => {
51466
+ var ms = (s3, t, e, i) => {
51447
51467
  import_node_fs4.default.readdir(s3, { withFileTypes: true }, (r, n) => {
51448
51468
  if (r) {
51449
51469
  if (r.code === "ENOENT") return i();
51450
51470
  if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
51451
51471
  }
51452
- if (r || !n.length) return di(s3, t, e, i);
51453
- let o = n.length, h = null, a = (l) => {
51454
- if (!h) {
51455
- if (l) return i(h = l);
51456
- if (--o === 0) return di(s3, t, e, i);
51472
+ if (r || !n.length) return pi(s3, t, e, i);
51473
+ let o = n.length, a = null, h = (l) => {
51474
+ if (!a) {
51475
+ if (l) return i(a = l);
51476
+ if (--o === 0) return pi(s3, t, e, i);
51457
51477
  }
51458
51478
  };
51459
- for (let l of n) $n(s3, l, t, e, a);
51479
+ for (let l of n) Qn(s3, l, t, e, h);
51460
51480
  });
51461
51481
  };
51462
- var Xn = (s3, t, e, i) => {
51463
- t.isDirectory() && ds(import_node_path6.default.resolve(s3, t.name), e, i), cs(import_node_path6.default.resolve(s3, t.name), e, i);
51482
+ var Jn = (s3, t, e, i) => {
51483
+ t.isDirectory() && ps(import_node_path6.default.resolve(s3, t.name), e, i), us(import_node_path6.default.resolve(s3, t.name), e, i);
51464
51484
  };
51465
- var ds = (s3, t, e) => {
51485
+ var ps = (s3, t, e) => {
51466
51486
  let i;
51467
51487
  try {
51468
51488
  i = import_node_fs4.default.readdirSync(s3, { withFileTypes: true });
51469
51489
  } catch (r) {
51470
51490
  let n = r;
51471
51491
  if (n?.code === "ENOENT") return;
51472
- if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return cs(s3, t, e);
51492
+ if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return us(s3, t, e);
51473
51493
  throw n;
51474
51494
  }
51475
- for (let r of i) Xn(s3, r, t, e);
51476
- return cs(s3, t, e);
51495
+ for (let r of i) Jn(s3, r, t, e);
51496
+ return us(s3, t, e);
51477
51497
  };
51478
51498
  var we = class extends Error {
51479
51499
  path;
@@ -51486,7 +51506,7 @@ var we = class extends Error {
51486
51506
  return "CwdError";
51487
51507
  }
51488
51508
  };
51489
- var wt = class extends Error {
51509
+ var St = class extends Error {
51490
51510
  path;
51491
51511
  symlink;
51492
51512
  syscall = "symlink";
@@ -51498,41 +51518,41 @@ var wt = class extends Error {
51498
51518
  return "SymlinkError";
51499
51519
  }
51500
51520
  };
51501
- var jn = (s3, t) => {
51521
+ var to = (s3, t) => {
51502
51522
  import_node_fs5.default.stat(s3, (e, i) => {
51503
51523
  (e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
51504
51524
  });
51505
51525
  };
51506
- var fr = (s3, t, e) => {
51526
+ var Sr = (s3, t, e) => {
51507
51527
  s3 = f(s3);
51508
- 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) => {
51509
- E ? e(E) : x && a ? fs(x, o, h, (_s) => S(_s)) : n ? import_node_fs5.default.chmod(s3, r, e) : e();
51528
+ let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid, a = t.gid, h = typeof o == "number" && typeof a == "number" && (o !== t.processUid || a !== t.processGid), l = t.preserve, c = t.unlink, d = f(t.cwd), S = (E, x) => {
51529
+ E ? e(E) : x && h ? ms(x, o, a, (xe) => S(xe)) : n ? import_node_fs5.default.chmod(s3, r, e) : e();
51510
51530
  };
51511
- if (s3 === d) return jn(s3, S);
51531
+ if (s3 === d) return to(s3, S);
51512
51532
  if (l) return import_promises.default.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
51513
51533
  let N = f(import_node_path7.default.relative(d, s3)).split("/");
51514
- us(d, N, r, c, d, void 0, S);
51534
+ Es(d, N, r, c, d, void 0, S);
51515
51535
  };
51516
- var us = (s3, t, e, i, r, n, o) => {
51517
- if (!t.length) return o(null, n);
51518
- let h = t.shift(), a = f(import_node_path7.default.resolve(s3 + "/" + h));
51519
- import_node_fs5.default.mkdir(a, e, dr(a, t, e, i, r, n, o));
51536
+ var Es = (s3, t, e, i, r, n, o) => {
51537
+ if (t.length === 0) return o(null, n);
51538
+ let a = t.shift(), h = f(import_node_path7.default.resolve(s3 + "/" + a));
51539
+ import_node_fs5.default.mkdir(h, e, yr(h, t, e, i, r, n, o));
51520
51540
  };
51521
- var dr = (s3, t, e, i, r, n, o) => (h) => {
51522
- h ? import_node_fs5.default.lstat(s3, (a, l) => {
51523
- if (a) a.path = a.path && f(a.path), o(a);
51524
- else if (l.isDirectory()) us(s3, t, e, i, r, n, o);
51541
+ var yr = (s3, t, e, i, r, n, o) => (a) => {
51542
+ a ? import_node_fs5.default.lstat(s3, (h, l) => {
51543
+ if (h) h.path = h.path && f(h.path), o(h);
51544
+ else if (l.isDirectory()) Es(s3, t, e, i, r, n, o);
51525
51545
  else if (i) import_node_fs5.default.unlink(s3, (c) => {
51526
51546
  if (c) return o(c);
51527
- import_node_fs5.default.mkdir(s3, e, dr(s3, t, e, i, r, n, o));
51547
+ import_node_fs5.default.mkdir(s3, e, yr(s3, t, e, i, r, n, o));
51528
51548
  });
51529
51549
  else {
51530
- if (l.isSymbolicLink()) return o(new wt(s3, s3 + "/" + t.join("/")));
51531
- o(h);
51550
+ if (l.isSymbolicLink()) return o(new St(s3, s3 + "/" + t.join("/")));
51551
+ o(a);
51532
51552
  }
51533
- }) : (n = n || s3, us(s3, t, e, i, r, n, o));
51553
+ }) : (n = n || s3, Es(s3, t, e, i, r, n, o));
51534
51554
  };
51535
- var Qn = (s3) => {
51555
+ var eo = (s3) => {
51536
51556
  let t = false, e;
51537
51557
  try {
51538
51558
  t = import_node_fs5.default.statSync(s3).isDirectory();
@@ -51542,53 +51562,53 @@ var Qn = (s3) => {
51542
51562
  if (!t) throw new we(s3, e ?? "ENOTDIR");
51543
51563
  }
51544
51564
  };
51545
- var ur = (s3, t) => {
51565
+ var Rr = (s3, t) => {
51546
51566
  s3 = f(s3);
51547
- 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) => {
51548
- E && h && ds(E, n, o), r && import_node_fs5.default.chmodSync(s3, i);
51567
+ let e = t.umask ?? 18, i = t.mode | 448, r = (i & e) !== 0, n = t.uid, o = t.gid, a = typeof n == "number" && typeof o == "number" && (n !== t.processUid || o !== t.processGid), h = t.preserve, l = t.unlink, c = f(t.cwd), d = (E) => {
51568
+ E && a && ps(E, n, o), r && import_node_fs5.default.chmodSync(s3, i);
51549
51569
  };
51550
- if (s3 === c) return Qn(c), d();
51551
- if (a) return d(import_node_fs5.default.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
51570
+ if (s3 === c) return eo(c), d();
51571
+ if (h) return d(import_node_fs5.default.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
51552
51572
  let T = f(import_node_path7.default.relative(c, s3)).split("/"), N;
51553
51573
  for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
51554
51574
  x = f(import_node_path7.default.resolve(x));
51555
51575
  try {
51556
51576
  import_node_fs5.default.mkdirSync(x, i), N = N || x;
51557
51577
  } catch {
51558
- let Os = import_node_fs5.default.lstatSync(x);
51559
- if (Os.isDirectory()) continue;
51578
+ let xe = import_node_fs5.default.lstatSync(x);
51579
+ if (xe.isDirectory()) continue;
51560
51580
  if (l) {
51561
51581
  import_node_fs5.default.unlinkSync(x), import_node_fs5.default.mkdirSync(x, i), N = N || x;
51562
51582
  continue;
51563
- } else if (Os.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
51583
+ } else if (xe.isSymbolicLink()) return new St(x, x + "/" + T.join("/"));
51564
51584
  }
51565
51585
  }
51566
51586
  return d(N);
51567
51587
  };
51568
- var ms = /* @__PURE__ */ Object.create(null);
51569
- var mr = 1e4;
51570
- var $t = /* @__PURE__ */ new Set();
51571
- var pr = (s3) => {
51572
- $t.has(s3) ? $t.delete(s3) : ms[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
51573
- let t = ms[s3], e = $t.size - mr;
51574
- if (e > mr / 10) {
51575
- for (let i of $t) if ($t.delete(i), delete ms[i], --e <= 0) break;
51588
+ var ws = /* @__PURE__ */ Object.create(null);
51589
+ var gr = 1e4;
51590
+ var Vt = /* @__PURE__ */ new Set();
51591
+ var br = (s3) => {
51592
+ Vt.has(s3) ? Vt.delete(s3) : ws[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), Vt.add(s3);
51593
+ let t = ws[s3], e = Vt.size - gr;
51594
+ if (e > gr / 10) {
51595
+ for (let i of Vt) if (Vt.delete(i), delete ws[i], --e <= 0) break;
51576
51596
  }
51577
51597
  return t;
51578
51598
  };
51579
- var Jn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
51580
- var to = Jn === "win32";
51581
- var eo = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
51582
- let r = e[e.length - 1];
51599
+ var io = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
51600
+ var so = io === "win32";
51601
+ var ro = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
51602
+ let r = e.at(-1);
51583
51603
  return r !== void 0 && (i = (0, import_node_path8.join)(r, i)), e.push(i || "/"), e;
51584
51604
  }, []);
51585
- var pi = class {
51605
+ var Si = class {
51586
51606
  #t = /* @__PURE__ */ new Map();
51587
51607
  #i = /* @__PURE__ */ new Map();
51588
51608
  #s = /* @__PURE__ */ new Set();
51589
51609
  reserve(t, e) {
51590
- t = to ? ["win32 parallelization disabled"] : t.map((r) => mt((0, import_node_path8.join)(pr(r))));
51591
- let i = new Set(t.map((r) => eo(r)).reduce((r, n) => r.concat(n)));
51610
+ t = so ? ["win32 parallelization disabled"] : t.map((r) => mt((0, import_node_path8.join)(br(r))));
51611
+ let i = new Set(t.map((r) => ro(r)).reduce((r, n) => r.concat(n)));
51592
51612
  this.#i.set(e, { dirs: i, paths: t });
51593
51613
  for (let r of t) {
51594
51614
  let n = this.#t.get(r);
@@ -51598,7 +51618,7 @@ var pi = class {
51598
51618
  let n = this.#t.get(r);
51599
51619
  if (!n) this.#t.set(r, [/* @__PURE__ */ new Set([e])]);
51600
51620
  else {
51601
- let o = n[n.length - 1];
51621
+ let o = n.at(-1);
51602
51622
  o instanceof Set ? o.add(e) : n.push(/* @__PURE__ */ new Set([e]));
51603
51623
  }
51604
51624
  }
@@ -51622,61 +51642,61 @@ var pi = class {
51622
51642
  if (!e) throw new Error("invalid reservation");
51623
51643
  let { paths: i, dirs: r } = e, n = /* @__PURE__ */ new Set();
51624
51644
  for (let o of i) {
51625
- let h = this.#t.get(o);
51626
- if (!h || h?.[0] !== t) continue;
51627
- let a = h[1];
51628
- if (!a) {
51645
+ let a = this.#t.get(o);
51646
+ if (!a || a?.[0] !== t) continue;
51647
+ let h = a[1];
51648
+ if (!h) {
51629
51649
  this.#t.delete(o);
51630
51650
  continue;
51631
51651
  }
51632
- if (h.shift(), typeof a == "function") n.add(a);
51633
- else for (let l of a) n.add(l);
51652
+ if (a.shift(), typeof h == "function") n.add(h);
51653
+ else for (let l of h) n.add(l);
51634
51654
  }
51635
51655
  for (let o of r) {
51636
- let h = this.#t.get(o), a = h?.[0];
51637
- if (!(!h || !(a instanceof Set))) if (a.size === 1 && h.length === 1) {
51656
+ let a = this.#t.get(o), h = a?.[0];
51657
+ if (!(!a || !(h instanceof Set))) if (h.size === 1 && a.length === 1) {
51638
51658
  this.#t.delete(o);
51639
51659
  continue;
51640
- } else if (a.size === 1) {
51641
- h.shift();
51642
- let l = h[0];
51660
+ } else if (h.size === 1) {
51661
+ a.shift();
51662
+ let l = a[0];
51643
51663
  typeof l == "function" && n.add(l);
51644
- } else a.delete(t);
51664
+ } else h.delete(t);
51645
51665
  }
51646
51666
  return this.#s.delete(t), n.forEach((o) => this.#r(o)), true;
51647
51667
  }
51648
51668
  };
51649
- var wr = () => process.umask();
51650
- var Sr = /* @__PURE__ */ Symbol("onEntry");
51651
- var Ss = /* @__PURE__ */ Symbol("checkFs");
51652
- var yr = /* @__PURE__ */ Symbol("checkFs2");
51653
- var ys = /* @__PURE__ */ Symbol("isReusable");
51669
+ var Or = () => process.umask();
51670
+ var Tr = /* @__PURE__ */ Symbol("onEntry");
51671
+ var gs = /* @__PURE__ */ Symbol("checkFs");
51672
+ var xr = /* @__PURE__ */ Symbol("checkFs2");
51673
+ var bs = /* @__PURE__ */ Symbol("isReusable");
51654
51674
  var P = /* @__PURE__ */ Symbol("makeFs");
51655
- var Rs = /* @__PURE__ */ Symbol("file");
51656
- var bs = /* @__PURE__ */ Symbol("directory");
51657
- var wi = /* @__PURE__ */ Symbol("link");
51658
- var Rr = /* @__PURE__ */ Symbol("symlink");
51659
- var br = /* @__PURE__ */ Symbol("hardlink");
51675
+ var _s = /* @__PURE__ */ Symbol("file");
51676
+ var Os = /* @__PURE__ */ Symbol("directory");
51677
+ var Ri = /* @__PURE__ */ Symbol("link");
51678
+ var Lr = /* @__PURE__ */ Symbol("symlink");
51679
+ var Nr = /* @__PURE__ */ Symbol("hardlink");
51660
51680
  var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
51661
- var gr = /* @__PURE__ */ Symbol("unsupported");
51662
- var _r = /* @__PURE__ */ Symbol("checkPath");
51663
- var ps = /* @__PURE__ */ Symbol("stripAbsolutePath");
51664
- var St = /* @__PURE__ */ Symbol("mkdir");
51681
+ var Dr = /* @__PURE__ */ Symbol("unsupported");
51682
+ var Ar = /* @__PURE__ */ Symbol("checkPath");
51683
+ var Ss = /* @__PURE__ */ Symbol("stripAbsolutePath");
51684
+ var yt = /* @__PURE__ */ Symbol("mkdir");
51665
51685
  var O = /* @__PURE__ */ Symbol("onError");
51666
- var Ei = /* @__PURE__ */ Symbol("pending");
51667
- var Or = /* @__PURE__ */ Symbol("pend");
51668
- var Xt = /* @__PURE__ */ Symbol("unpend");
51669
- var Es = /* @__PURE__ */ Symbol("ended");
51670
- var ws = /* @__PURE__ */ Symbol("maybeClose");
51671
- var gs = /* @__PURE__ */ Symbol("skip");
51686
+ var yi = /* @__PURE__ */ Symbol("pending");
51687
+ var Ir = /* @__PURE__ */ Symbol("pend");
51688
+ var $t = /* @__PURE__ */ Symbol("unpend");
51689
+ var ys = /* @__PURE__ */ Symbol("ended");
51690
+ var Rs = /* @__PURE__ */ Symbol("maybeClose");
51691
+ var Ts = /* @__PURE__ */ Symbol("skip");
51672
51692
  var Re = /* @__PURE__ */ Symbol("doChown");
51673
- var be = /* @__PURE__ */ Symbol("uid");
51674
- var ge = /* @__PURE__ */ Symbol("gid");
51693
+ var ge = /* @__PURE__ */ Symbol("uid");
51694
+ var be = /* @__PURE__ */ Symbol("gid");
51675
51695
  var _e = /* @__PURE__ */ Symbol("checkedCwd");
51676
- var so = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
51677
- var Oe = so === "win32";
51678
- var ro = 1024;
51679
- var no = (s3, t) => {
51696
+ var oo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
51697
+ var Oe = oo === "win32";
51698
+ var ho = 1024;
51699
+ var ao = (s3, t) => {
51680
51700
  if (!Oe) return import_node_fs3.default.unlink(s3, t);
51681
51701
  let e = s3 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
51682
51702
  import_node_fs3.default.rename(s3, e, (i) => {
@@ -51684,17 +51704,17 @@ var no = (s3, t) => {
51684
51704
  import_node_fs3.default.unlink(e, t);
51685
51705
  });
51686
51706
  };
51687
- var oo = (s3) => {
51707
+ var lo = (s3) => {
51688
51708
  if (!Oe) return import_node_fs3.default.unlinkSync(s3);
51689
51709
  let t = s3 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
51690
51710
  import_node_fs3.default.renameSync(s3, t), import_node_fs3.default.unlinkSync(t);
51691
51711
  };
51692
- var Tr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
51693
- var qt = class extends st {
51694
- [Es] = false;
51712
+ var Fr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
51713
+ var Xt = class extends st {
51714
+ [ys] = false;
51695
51715
  [_e] = false;
51696
- [Ei] = 0;
51697
- reservations = new pi();
51716
+ [yi] = 0;
51717
+ reservations = new Si();
51698
51718
  transform;
51699
51719
  writable = true;
51700
51720
  readable = false;
@@ -51721,34 +51741,32 @@ var qt = class extends st {
51721
51741
  chmod;
51722
51742
  constructor(t = {}) {
51723
51743
  if (t.ondone = () => {
51724
- this[Es] = true, this[ws]();
51744
+ this[ys] = true, this[Rs]();
51725
51745
  }, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
51726
51746
  if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
51727
51747
  if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
51728
51748
  this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
51729
51749
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
51730
- t.preserveOwner === void 0 && typeof t.uid != "number" ? this.preserveOwner = !!(process.getuid && process.getuid() === 0) : this.preserveOwner = !!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 : ro, 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(import_node_path5.default.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : wr() : 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[Sr](e));
51750
+ 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 : ho, 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(import_node_path5.default.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : Or() : 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[Tr](e));
51731
51751
  }
51732
51752
  warn(t, e, i = {}) {
51733
51753
  return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
51734
51754
  }
51735
- [ws]() {
51736
- this[Es] && this[Ei] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
51755
+ [Rs]() {
51756
+ this[ys] && this[yi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
51737
51757
  }
51738
- [ps](t, e) {
51758
+ [Ss](t, e) {
51739
51759
  let i = t[e], { type: r } = t;
51740
51760
  if (!i || this.preservePaths) return true;
51741
- let [n, o] = ce(i), h = o.replace(/\\/g, "/").split("/");
51742
- if (h.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
51761
+ let [n, o] = le(i), a = o.replaceAll(/\\/g, "/").split("/");
51762
+ if (a.includes("..") || Oe && /^[a-z]:\.\.$/i.test(a[0] ?? "")) {
51743
51763
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
51744
- {
51745
- let a = import_node_path5.default.posix.dirname(t.path), l = import_node_path5.default.posix.normalize(import_node_path5.default.posix.join(a, h.join("/")));
51746
- if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
51747
- }
51764
+ let h = import_node_path5.default.posix.dirname(t.path), l = import_node_path5.default.posix.normalize(import_node_path5.default.posix.join(h, a.join("/")));
51765
+ if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
51748
51766
  }
51749
51767
  return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
51750
51768
  }
51751
- [_r](t) {
51769
+ [Ar](t) {
51752
51770
  let e = f(t.path), i = e.split("/");
51753
51771
  if (this.strip) {
51754
51772
  if (i.length < this.strip) return false;
@@ -51760,19 +51778,19 @@ var qt = class extends st {
51760
51778
  i.splice(0, this.strip), t.path = i.join("/");
51761
51779
  }
51762
51780
  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;
51763
- if (!this[ps](t, "path") || !this[ps](t, "linkpath")) return false;
51764
- if (import_node_path5.default.isAbsolute(t.path) ? t.absolute = f(import_node_path5.default.resolve(t.path)) : t.absolute = f(import_node_path5.default.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;
51781
+ if (!this[Ss](t, "path") || !this[Ss](t, "linkpath")) return false;
51782
+ if (t.absolute = import_node_path5.default.isAbsolute(t.path) ? f(import_node_path5.default.resolve(t.path)) : f(import_node_path5.default.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;
51765
51783
  if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
51766
51784
  if (this.win32) {
51767
51785
  let { root: r } = import_node_path5.default.win32.parse(String(t.absolute));
51768
- t.absolute = r + $i(String(t.absolute).slice(r.length));
51786
+ t.absolute = r + Ji(String(t.absolute).slice(r.length));
51769
51787
  let { root: n } = import_node_path5.default.win32.parse(t.path);
51770
- t.path = n + $i(t.path.slice(n.length));
51788
+ t.path = n + Ji(t.path.slice(n.length));
51771
51789
  }
51772
51790
  return true;
51773
51791
  }
51774
- [Sr](t) {
51775
- if (!this[_r](t)) return t.resume();
51792
+ [Tr](t) {
51793
+ if (!this[Ar](t)) return t.resume();
51776
51794
  switch (import_node_assert.default.equal(typeof t.absolute, "string"), t.type) {
51777
51795
  case "Directory":
51778
51796
  case "GNUDumpDir":
@@ -51782,133 +51800,133 @@ var qt = class extends st {
51782
51800
  case "ContiguousFile":
51783
51801
  case "Link":
51784
51802
  case "SymbolicLink":
51785
- return this[Ss](t);
51803
+ return this[gs](t);
51786
51804
  default:
51787
- return this[gr](t);
51805
+ return this[Dr](t);
51788
51806
  }
51789
51807
  }
51790
51808
  [O](t, e) {
51791
- t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
51809
+ t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[$t](), e.resume());
51792
51810
  }
51793
- [St](t, e, i) {
51794
- fr(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);
51811
+ [yt](t, e, i) {
51812
+ 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 }, i);
51795
51813
  }
51796
51814
  [Re](t) {
51797
51815
  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;
51798
51816
  }
51799
- [be](t) {
51800
- return Tr(this.uid, t.uid, this.processUid);
51801
- }
51802
51817
  [ge](t) {
51803
- return Tr(this.gid, t.gid, this.processGid);
51818
+ return Fr(this.uid, t.uid, this.processUid);
51819
+ }
51820
+ [be](t) {
51821
+ return Fr(this.gid, t.gid, this.processGid);
51804
51822
  }
51805
- [Rs](t, e) {
51806
- let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt(String(t.absolute), { flags: ls(t.size), mode: i, autoClose: false });
51807
- r.on("error", (a) => {
51823
+ [_s](t, e) {
51824
+ let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt(String(t.absolute), { flags: ds(t.size), mode: i, autoClose: false });
51825
+ r.on("error", (h) => {
51808
51826
  r.fd && import_node_fs3.default.close(r.fd, () => {
51809
- }), r.write = () => true, this[O](a, t), e();
51827
+ }), r.write = () => true, this[O](h, t), e();
51810
51828
  });
51811
- let n = 1, o = (a) => {
51812
- if (a) {
51829
+ let n = 1, o = (h) => {
51830
+ if (h) {
51813
51831
  r.fd && import_node_fs3.default.close(r.fd, () => {
51814
- }), this[O](a, t), e();
51832
+ }), this[O](h, t), e();
51815
51833
  return;
51816
51834
  }
51817
51835
  --n === 0 && r.fd !== void 0 && import_node_fs3.default.close(r.fd, (l) => {
51818
- l ? this[O](l, t) : this[Xt](), e();
51836
+ l ? this[O](l, t) : this[$t](), e();
51819
51837
  });
51820
51838
  };
51821
51839
  r.on("finish", () => {
51822
- let a = String(t.absolute), l = r.fd;
51840
+ let h = String(t.absolute), l = r.fd;
51823
51841
  if (typeof l == "number" && t.mtime && !this.noMtime) {
51824
51842
  n++;
51825
51843
  let c = t.atime || /* @__PURE__ */ new Date(), d = t.mtime;
51826
- import_node_fs3.default.futimes(l, c, d, (S) => S ? import_node_fs3.default.utimes(a, c, d, (T) => o(T && S)) : o());
51844
+ import_node_fs3.default.futimes(l, c, d, (S) => S ? import_node_fs3.default.utimes(h, c, d, (T) => o(T && S)) : o());
51827
51845
  }
51828
51846
  if (typeof l == "number" && this[Re](t)) {
51829
51847
  n++;
51830
- let c = this[be](t), d = this[ge](t);
51831
- typeof c == "number" && typeof d == "number" && import_node_fs3.default.fchown(l, c, d, (S) => S ? import_node_fs3.default.chown(a, c, d, (T) => o(T && S)) : o());
51848
+ let c = this[ge](t), d = this[be](t);
51849
+ typeof c == "number" && typeof d == "number" && import_node_fs3.default.fchown(l, c, d, (S) => S ? import_node_fs3.default.chown(h, c, d, (T) => o(T && S)) : o());
51832
51850
  }
51833
51851
  o();
51834
51852
  });
51835
- let h = this.transform && this.transform(t) || t;
51836
- h !== t && (h.on("error", (a) => {
51837
- this[O](a, t), e();
51838
- }), t.pipe(h)), h.pipe(r);
51853
+ let a = this.transform && this.transform(t) || t;
51854
+ a !== t && (a.on("error", (h) => {
51855
+ this[O](h, t), e();
51856
+ }), t.pipe(a)), a.pipe(r);
51839
51857
  }
51840
- [bs](t, e) {
51858
+ [Os](t, e) {
51841
51859
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
51842
- this[St](String(t.absolute), i, (r) => {
51860
+ this[yt](String(t.absolute), i, (r) => {
51843
51861
  if (r) {
51844
51862
  this[O](r, t), e();
51845
51863
  return;
51846
51864
  }
51847
51865
  let n = 1, o = () => {
51848
- --n === 0 && (e(), this[Xt](), t.resume());
51866
+ --n === 0 && (e(), this[$t](), t.resume());
51849
51867
  };
51850
- t.mtime && !this.noMtime && (n++, import_node_fs3.default.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, import_node_fs3.default.chown(String(t.absolute), Number(this[be](t)), Number(this[ge](t)), o)), o();
51868
+ t.mtime && !this.noMtime && (n++, import_node_fs3.default.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, import_node_fs3.default.chown(String(t.absolute), Number(this[ge](t)), Number(this[be](t)), o)), o();
51851
51869
  });
51852
51870
  }
51853
- [gr](t) {
51871
+ [Dr](t) {
51854
51872
  t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
51855
51873
  }
51856
- [Rr](t, e) {
51874
+ [Lr](t, e) {
51857
51875
  let i = f(import_node_path5.default.relative(this.cwd, import_node_path5.default.resolve(import_node_path5.default.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
51858
- this[ye](t, this.cwd, i, () => this[wi](t, String(t.linkpath), "symlink", e), (r) => {
51876
+ this[ye](t, this.cwd, i, () => this[Ri](t, String(t.linkpath), "symlink", e), (r) => {
51859
51877
  this[O](r, t), e();
51860
51878
  });
51861
51879
  }
51862
- [br](t, e) {
51880
+ [Nr](t, e) {
51863
51881
  let i = f(import_node_path5.default.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
51864
- this[ye](t, this.cwd, r, () => this[wi](t, i, "link", e), (n) => {
51882
+ this[ye](t, this.cwd, r, () => this[Ri](t, i, "link", e), (n) => {
51865
51883
  this[O](n, t), e();
51866
51884
  });
51867
51885
  }
51868
51886
  [ye](t, e, i, r, n) {
51869
51887
  let o = i.shift();
51870
51888
  if (this.preservePaths || o === void 0) return r();
51871
- let h = import_node_path5.default.resolve(e, o);
51872
- import_node_fs3.default.lstat(h, (a, l) => {
51873
- if (a) return r();
51874
- if (l?.isSymbolicLink()) return n(new wt(h, import_node_path5.default.resolve(h, i.join("/"))));
51875
- this[ye](t, h, i, r, n);
51889
+ let a = import_node_path5.default.resolve(e, o);
51890
+ import_node_fs3.default.lstat(a, (h, l) => {
51891
+ if (h) return r();
51892
+ if (l?.isSymbolicLink()) return n(new St(a, import_node_path5.default.resolve(a, i.join("/"))));
51893
+ this[ye](t, a, i, r, n);
51876
51894
  });
51877
51895
  }
51878
- [Or]() {
51879
- this[Ei]++;
51896
+ [Ir]() {
51897
+ this[yi]++;
51880
51898
  }
51881
- [Xt]() {
51882
- this[Ei]--, this[ws]();
51899
+ [$t]() {
51900
+ this[yi]--, this[Rs]();
51883
51901
  }
51884
- [gs](t) {
51885
- this[Xt](), t.resume();
51902
+ [Ts](t) {
51903
+ this[$t](), t.resume();
51886
51904
  }
51887
- [ys](t, e) {
51905
+ [bs](t, e) {
51888
51906
  return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
51889
51907
  }
51890
- [Ss](t) {
51891
- this[Or]();
51908
+ [gs](t) {
51909
+ this[Ir]();
51892
51910
  let e = [t.path];
51893
- t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[yr](t, i));
51911
+ t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[xr](t, i));
51894
51912
  }
51895
- [yr](t, e) {
51896
- let i = (h) => {
51897
- e(h);
51913
+ [xr](t, e) {
51914
+ let i = (a) => {
51915
+ e(a);
51898
51916
  }, r = () => {
51899
- this[St](this.cwd, this.dmode, (h) => {
51900
- if (h) {
51901
- this[O](h, t), i();
51917
+ this[yt](this.cwd, this.dmode, (a) => {
51918
+ if (a) {
51919
+ this[O](a, t), i();
51902
51920
  return;
51903
51921
  }
51904
51922
  this[_e] = true, n();
51905
51923
  });
51906
51924
  }, n = () => {
51907
51925
  if (t.absolute !== this.cwd) {
51908
- let h = f(import_node_path5.default.dirname(String(t.absolute)));
51909
- if (h !== this.cwd) return this[St](h, this.dmode, (a) => {
51910
- if (a) {
51911
- this[O](a, t), i();
51926
+ let a = f(import_node_path5.default.dirname(String(t.absolute)));
51927
+ if (a !== this.cwd) return this[yt](a, this.dmode, (h) => {
51928
+ if (h) {
51929
+ this[O](h, t), i();
51912
51930
  return;
51913
51931
  }
51914
51932
  o();
@@ -51916,21 +51934,21 @@ var qt = class extends st {
51916
51934
  }
51917
51935
  o();
51918
51936
  }, o = () => {
51919
- import_node_fs3.default.lstat(String(t.absolute), (h, a) => {
51920
- if (a && (this.keep || this.newer && a.mtime > (t.mtime ?? a.mtime))) {
51921
- this[gs](t), i();
51937
+ import_node_fs3.default.lstat(String(t.absolute), (a, h) => {
51938
+ if (h && (this.keep || this.newer && h.mtime > (t.mtime ?? h.mtime))) {
51939
+ this[Ts](t), i();
51922
51940
  return;
51923
51941
  }
51924
- if (h || this[ys](t, a)) return this[P](null, t, i);
51925
- if (a.isDirectory()) {
51942
+ if (a || this[bs](t, h)) return this[P](null, t, i);
51943
+ if (h.isDirectory()) {
51926
51944
  if (t.type === "Directory") {
51927
- let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
51945
+ let l = this.chmod && t.mode && (h.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
51928
51946
  return l ? import_node_fs3.default.chmod(String(t.absolute), Number(t.mode), c) : c();
51929
51947
  }
51930
51948
  if (t.absolute !== this.cwd) return import_node_fs3.default.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
51931
51949
  }
51932
51950
  if (t.absolute === this.cwd) return this[P](null, t, i);
51933
- no(String(t.absolute), (l) => this[P](l ?? null, t, i));
51951
+ ao(String(t.absolute), (l) => this[P](l ?? null, t, i));
51934
51952
  });
51935
51953
  };
51936
51954
  this[_e] ? n() : r();
@@ -51944,19 +51962,19 @@ var qt = class extends st {
51944
51962
  case "File":
51945
51963
  case "OldFile":
51946
51964
  case "ContiguousFile":
51947
- return this[Rs](e, i);
51965
+ return this[_s](e, i);
51948
51966
  case "Link":
51949
- return this[br](e, i);
51967
+ return this[Nr](e, i);
51950
51968
  case "SymbolicLink":
51951
- return this[Rr](e, i);
51969
+ return this[Lr](e, i);
51952
51970
  case "Directory":
51953
51971
  case "GNUDumpDir":
51954
- return this[bs](e, i);
51972
+ return this[Os](e, i);
51955
51973
  }
51956
51974
  }
51957
- [wi](t, e, i, r) {
51975
+ [Ri](t, e, i, r) {
51958
51976
  import_node_fs3.default[i](e, String(t.absolute), (n) => {
51959
- n ? this[O](n, t) : (this[Xt](), t.resume()), r();
51977
+ n ? this[O](n, t) : (this[$t](), t.resume()), r();
51960
51978
  });
51961
51979
  }
51962
51980
  };
@@ -51967,94 +51985,94 @@ var Se = (s3) => {
51967
51985
  return [t, null];
51968
51986
  }
51969
51987
  };
51970
- var Te = class extends qt {
51988
+ var Te = class extends Xt {
51971
51989
  sync = true;
51972
51990
  [P](t, e) {
51973
51991
  return super[P](t, e, () => {
51974
51992
  });
51975
51993
  }
51976
- [Ss](t) {
51994
+ [gs](t) {
51977
51995
  if (!this[_e]) {
51978
- let n = this[St](this.cwd, this.dmode);
51996
+ let n = this[yt](this.cwd, this.dmode);
51979
51997
  if (n) return this[O](n, t);
51980
51998
  this[_e] = true;
51981
51999
  }
51982
52000
  if (t.absolute !== this.cwd) {
51983
52001
  let n = f(import_node_path5.default.dirname(String(t.absolute)));
51984
52002
  if (n !== this.cwd) {
51985
- let o = this[St](n, this.dmode);
52003
+ let o = this[yt](n, this.dmode);
51986
52004
  if (o) return this[O](o, t);
51987
52005
  }
51988
52006
  }
51989
52007
  let [e, i] = Se(() => import_node_fs3.default.lstatSync(String(t.absolute)));
51990
- if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[gs](t);
51991
- if (e || this[ys](t, i)) return this[P](null, t);
52008
+ if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Ts](t);
52009
+ if (e || this[bs](t, i)) return this[P](null, t);
51992
52010
  if (i.isDirectory()) {
51993
52011
  if (t.type === "Directory") {
51994
- let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? Se(() => {
52012
+ let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [a] = o ? Se(() => {
51995
52013
  import_node_fs3.default.chmodSync(String(t.absolute), Number(t.mode));
51996
52014
  }) : [];
51997
- return this[P](h, t);
52015
+ return this[P](a, t);
51998
52016
  }
51999
52017
  let [n] = Se(() => import_node_fs3.default.rmdirSync(String(t.absolute)));
52000
52018
  this[P](n, t);
52001
52019
  }
52002
- let [r] = t.absolute === this.cwd ? [] : Se(() => oo(String(t.absolute)));
52020
+ let [r] = t.absolute === this.cwd ? [] : Se(() => lo(String(t.absolute)));
52003
52021
  this[P](r, t);
52004
52022
  }
52005
- [Rs](t, e) {
52006
- let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
52007
- let a;
52023
+ [_s](t, e) {
52024
+ let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (a) => {
52025
+ let h;
52008
52026
  try {
52009
52027
  import_node_fs3.default.closeSync(n);
52010
52028
  } catch (l) {
52011
- a = l;
52029
+ h = l;
52012
52030
  }
52013
- (h || a) && this[O](h || a, t), e();
52031
+ (a || h) && this[O](a || h, t), e();
52014
52032
  }, n;
52015
52033
  try {
52016
- n = import_node_fs3.default.openSync(String(t.absolute), ls(t.size), i);
52017
- } catch (h) {
52018
- return r(h);
52034
+ n = import_node_fs3.default.openSync(String(t.absolute), ds(t.size), i);
52035
+ } catch (a) {
52036
+ return r(a);
52019
52037
  }
52020
52038
  let o = this.transform && this.transform(t) || t;
52021
- o !== t && (o.on("error", (h) => this[O](h, t)), t.pipe(o)), o.on("data", (h) => {
52039
+ o !== t && (o.on("error", (a) => this[O](a, t)), t.pipe(o)), o.on("data", (a) => {
52022
52040
  try {
52023
- import_node_fs3.default.writeSync(n, h, 0, h.length);
52024
- } catch (a) {
52025
- r(a);
52041
+ import_node_fs3.default.writeSync(n, a, 0, a.length);
52042
+ } catch (h) {
52043
+ r(h);
52026
52044
  }
52027
52045
  }), o.on("end", () => {
52028
- let h = null;
52046
+ let a = null;
52029
52047
  if (t.mtime && !this.noMtime) {
52030
- let a = t.atime || /* @__PURE__ */ new Date(), l = t.mtime;
52048
+ let h = t.atime || /* @__PURE__ */ new Date(), l = t.mtime;
52031
52049
  try {
52032
- import_node_fs3.default.futimesSync(n, a, l);
52050
+ import_node_fs3.default.futimesSync(n, h, l);
52033
52051
  } catch (c) {
52034
52052
  try {
52035
- import_node_fs3.default.utimesSync(String(t.absolute), a, l);
52053
+ import_node_fs3.default.utimesSync(String(t.absolute), h, l);
52036
52054
  } catch {
52037
- h = c;
52055
+ a = c;
52038
52056
  }
52039
52057
  }
52040
52058
  }
52041
52059
  if (this[Re](t)) {
52042
- let a = this[be](t), l = this[ge](t);
52060
+ let h = this[ge](t), l = this[be](t);
52043
52061
  try {
52044
- import_node_fs3.default.fchownSync(n, Number(a), Number(l));
52062
+ import_node_fs3.default.fchownSync(n, Number(h), Number(l));
52045
52063
  } catch (c) {
52046
52064
  try {
52047
- import_node_fs3.default.chownSync(String(t.absolute), Number(a), Number(l));
52065
+ import_node_fs3.default.chownSync(String(t.absolute), Number(h), Number(l));
52048
52066
  } catch {
52049
- h = h || c;
52067
+ a = a || c;
52050
52068
  }
52051
52069
  }
52052
52070
  }
52053
- r(h);
52071
+ r(a);
52054
52072
  });
52055
52073
  }
52056
- [bs](t, e) {
52057
- let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[St](String(t.absolute), i);
52074
+ [Os](t, e) {
52075
+ let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[yt](String(t.absolute), i);
52058
52076
  if (r) {
52059
52077
  this[O](r, t), e();
52060
52078
  return;
@@ -52064,30 +52082,30 @@ var Te = class extends qt {
52064
52082
  } catch {
52065
52083
  }
52066
52084
  if (this[Re](t)) try {
52067
- import_node_fs3.default.chownSync(String(t.absolute), Number(this[be](t)), Number(this[ge](t)));
52085
+ import_node_fs3.default.chownSync(String(t.absolute), Number(this[ge](t)), Number(this[be](t)));
52068
52086
  } catch {
52069
52087
  }
52070
52088
  e(), t.resume();
52071
52089
  }
52072
- [St](t, e) {
52090
+ [yt](t, e) {
52073
52091
  try {
52074
- return ur(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 });
52092
+ return Rr(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 });
52075
52093
  } catch (i) {
52076
52094
  return i;
52077
52095
  }
52078
52096
  }
52079
52097
  [ye](t, e, i, r, n) {
52080
- if (this.preservePaths || !i.length) return r();
52098
+ if (this.preservePaths || i.length === 0) return r();
52081
52099
  let o = e;
52082
- for (let h of i) {
52083
- o = import_node_path5.default.resolve(o, h);
52084
- let [a, l] = Se(() => import_node_fs3.default.lstatSync(o));
52085
- if (a) return r();
52086
- if (l.isSymbolicLink()) return n(new wt(o, import_node_path5.default.resolve(e, i.join("/"))));
52100
+ for (let a of i) {
52101
+ o = import_node_path5.default.resolve(o, a);
52102
+ let [h, l] = Se(() => import_node_fs3.default.lstatSync(o));
52103
+ if (h) return r();
52104
+ if (l.isSymbolicLink()) return n(new St(o, import_node_path5.default.resolve(e, i.join("/"))));
52087
52105
  }
52088
52106
  r();
52089
52107
  }
52090
- [wi](t, e, i, r) {
52108
+ [Ri](t, e, i, r) {
52091
52109
  let n = `${i}Sync`;
52092
52110
  try {
52093
52111
  import_node_fs3.default[n](e, String(t.absolute)), r(), t.resume();
@@ -52096,47 +52114,47 @@ var Te = class extends qt {
52096
52114
  }
52097
52115
  }
52098
52116
  };
52099
- var ho = (s3) => {
52117
+ var co = (s3) => {
52100
52118
  let t = new Te(s3), e = s3.file, i = import_node_fs2.default.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
52101
- new ve(e, { readSize: r, size: i.size }).pipe(t);
52119
+ new Me(e, { readSize: r, size: i.size }).pipe(t);
52102
52120
  };
52103
- var ao = (s3, t) => {
52104
- let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
52105
- return new Promise((o, h) => {
52106
- e.on("error", h), e.on("close", o), import_node_fs2.default.stat(r, (a, l) => {
52107
- if (a) h(a);
52121
+ var fo = (s3, t) => {
52122
+ let e = new Xt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
52123
+ return new Promise((o, a) => {
52124
+ e.on("error", a), e.on("close", o), import_node_fs2.default.stat(r, (h, l) => {
52125
+ if (h) a(h);
52108
52126
  else {
52109
- let c = new gt(r, { readSize: i, size: l.size });
52110
- c.on("error", h), c.pipe(e);
52127
+ let c = new _t(r, { readSize: i, size: l.size });
52128
+ c.on("error", a), c.pipe(e);
52111
52129
  }
52112
52130
  });
52113
52131
  });
52114
52132
  };
52115
- var lo = K(ho, ao, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
52116
- t?.length && Yi(s3, t);
52133
+ var uo = K(co, fo, (s3) => new Te(s3), (s3) => new Xt(s3), (s3, t) => {
52134
+ t?.length && Xi(s3, t);
52117
52135
  });
52118
- var co = (s3, t) => {
52136
+ var mo = (s3, t) => {
52119
52137
  let e = new kt(s3), i = true, r, n;
52120
52138
  try {
52121
52139
  try {
52122
52140
  r = import_node_fs6.default.openSync(s3.file, "r+");
52123
- } catch (a) {
52124
- if (a?.code === "ENOENT") r = import_node_fs6.default.openSync(s3.file, "w+");
52125
- else throw a;
52141
+ } catch (h) {
52142
+ if (h?.code === "ENOENT") r = import_node_fs6.default.openSync(s3.file, "w+");
52143
+ else throw h;
52126
52144
  }
52127
- let o = import_node_fs6.default.fstatSync(r), h = Buffer.alloc(512);
52145
+ let o = import_node_fs6.default.fstatSync(r), a = Buffer.alloc(512);
52128
52146
  t: for (n = 0; n < o.size; n += 512) {
52129
52147
  for (let c = 0, d = 0; c < 512; c += d) {
52130
- if (d = import_node_fs6.default.readSync(r, h, c, h.length - c, n + c), n === 0 && h[0] === 31 && h[1] === 139) throw new Error("cannot append to compressed archives");
52148
+ if (d = import_node_fs6.default.readSync(r, a, c, a.length - c, n + c), n === 0 && a[0] === 31 && a[1] === 139) throw new Error("cannot append to compressed archives");
52131
52149
  if (!d) break t;
52132
52150
  }
52133
- let a = new F(h);
52134
- if (!a.cksumValid) break;
52135
- let l = 512 * Math.ceil((a.size || 0) / 512);
52151
+ let h = new C(a);
52152
+ if (!h.cksumValid) break;
52153
+ let l = 512 * Math.ceil((h.size || 0) / 512);
52136
52154
  if (n + l + 512 > o.size) break;
52137
- n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
52155
+ n += l, s3.mtimeCache && h.mtime && s3.mtimeCache.set(String(h.path), h.mtime);
52138
52156
  }
52139
- i = false, fo(s3, e, n, r, t);
52157
+ i = false, po(s3, e, n, r, t);
52140
52158
  } finally {
52141
52159
  if (i) try {
52142
52160
  import_node_fs6.default.closeSync(r);
@@ -52144,72 +52162,69 @@ var co = (s3, t) => {
52144
52162
  }
52145
52163
  }
52146
52164
  };
52147
- var fo = (s3, t, e, i, r) => {
52165
+ var po = (s3, t, e, i, r) => {
52148
52166
  let n = new Wt(s3.file, { fd: i, start: e });
52149
- t.pipe(n), mo(t, r);
52167
+ t.pipe(n), wo(t, r);
52150
52168
  };
52151
- var uo = (s3, t) => {
52169
+ var Eo = (s3, t) => {
52152
52170
  t = Array.from(t);
52153
- let e = new Et(s3), i = (n, o, h) => {
52154
- let a = (T, N) => {
52155
- T ? import_node_fs6.default.close(n, (E) => h(T)) : h(null, N);
52171
+ let e = new wt(s3), i = (n, o, a) => {
52172
+ let h = (T, N) => {
52173
+ T ? import_node_fs6.default.close(n, (E) => a(T)) : a(null, N);
52156
52174
  }, l = 0;
52157
- if (o === 0) return a(null, 0);
52175
+ if (o === 0) return h(null, 0);
52158
52176
  let c = 0, d = Buffer.alloc(512), S = (T, N) => {
52159
- if (T || typeof N > "u") return a(T);
52177
+ if (T || N === void 0) return h(T);
52160
52178
  if (c += N, c < 512 && N) return import_node_fs6.default.read(n, d, c, d.length - c, l + c, S);
52161
- if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
52162
- if (c < 512) return a(null, l);
52163
- let E = new F(d);
52164
- if (!E.cksumValid) return a(null, l);
52179
+ if (l === 0 && d[0] === 31 && d[1] === 139) return h(new Error("cannot append to compressed archives"));
52180
+ if (c < 512) return h(null, l);
52181
+ let E = new C(d);
52182
+ if (!E.cksumValid) return h(null, l);
52165
52183
  let x = 512 * Math.ceil((E.size ?? 0) / 512);
52166
- if (l + x + 512 > o || (l += x + 512, l >= o)) return a(null, l);
52184
+ if (l + x + 512 > o || (l += x + 512, l >= o)) return h(null, l);
52167
52185
  s3.mtimeCache && E.mtime && s3.mtimeCache.set(String(E.path), E.mtime), c = 0, import_node_fs6.default.read(n, d, 0, 512, l, S);
52168
52186
  };
52169
52187
  import_node_fs6.default.read(n, d, 0, 512, l, S);
52170
52188
  };
52171
52189
  return new Promise((n, o) => {
52172
52190
  e.on("error", o);
52173
- let h = "r+", a = (l, c) => {
52174
- if (l && l.code === "ENOENT" && h === "r+") return h = "w+", import_node_fs6.default.open(s3.file, h, a);
52191
+ let a = "r+", h = (l, c) => {
52192
+ if (l && l.code === "ENOENT" && a === "r+") return a = "w+", import_node_fs6.default.open(s3.file, a, h);
52175
52193
  if (l || !c) return o(l);
52176
52194
  import_node_fs6.default.fstat(c, (d, S) => {
52177
52195
  if (d) return import_node_fs6.default.close(c, () => o(d));
52178
52196
  i(c, S.size, (T, N) => {
52179
52197
  if (T) return o(T);
52180
52198
  let E = new tt(s3.file, { fd: c, start: N });
52181
- e.pipe(E), E.on("error", o), E.on("close", n), po(e, t);
52199
+ e.pipe(E), E.on("error", o), E.on("close", n), So(e, t);
52182
52200
  });
52183
52201
  });
52184
52202
  };
52185
- import_node_fs6.default.open(s3.file, h, a);
52203
+ import_node_fs6.default.open(s3.file, a, h);
52186
52204
  });
52187
52205
  };
52188
- var mo = (s3, t) => {
52206
+ var wo = (s3, t) => {
52189
52207
  t.forEach((e) => {
52190
- e.charAt(0) === "@" ? It({ file: import_node_path9.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
52208
+ e.charAt(0) === "@" ? Ft({ file: import_node_path9.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
52191
52209
  }), s3.end();
52192
52210
  };
52193
- var po = async (s3, t) => {
52194
- for (let e = 0; e < t.length; e++) {
52195
- let i = String(t[e]);
52196
- i.charAt(0) === "@" ? await It({ file: import_node_path9.default.resolve(String(s3.cwd), i.slice(1)), noResume: true, onReadEntry: (r) => s3.add(r) }) : s3.add(i);
52197
- }
52211
+ var So = async (s3, t) => {
52212
+ for (let e of t) e.charAt(0) === "@" ? await Ft({ file: import_node_path9.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
52198
52213
  s3.end();
52199
52214
  };
52200
- var vt = K(co, uo, () => {
52215
+ var vt = K(mo, Eo, () => {
52201
52216
  throw new TypeError("file is required");
52202
52217
  }, () => {
52203
52218
  throw new TypeError("file is required");
52204
52219
  }, (s3, t) => {
52205
- if (!ks(s3)) throw new TypeError("file is required");
52220
+ if (!vs(s3)) throw new TypeError("file is required");
52206
52221
  if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
52207
52222
  if (!t?.length) throw new TypeError("no paths specified to add/replace");
52208
52223
  });
52209
- var Eo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
52210
- vt.validate?.(s3, t), wo(s3);
52224
+ var yo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
52225
+ vt.validate?.(s3, t), Ro(s3);
52211
52226
  });
52212
- var wo = (s3) => {
52227
+ var Ro = (s3) => {
52213
52228
  let t = s3.filter;
52214
52229
  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));
52215
52230
  };
@@ -64993,7 +65008,7 @@ var LRUCache = class _LRUCache {
64993
65008
  }
64994
65009
  #removeItemSize = (_i2) => {
64995
65010
  };
64996
- #addItemSize = (_i2, _s, _st) => {
65011
+ #addItemSize = (_i2, _s2, _st) => {
64997
65012
  };
64998
65013
  #requireSize = (_k, _v, size, sizeCalculation) => {
64999
65014
  if (size || sizeCalculation) {