npm-pkg-lint 5.1.2 → 5.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3452,11 +3452,14 @@ var require_tmp = __commonJS({
3452
3452
  ].join("");
3453
3453
  return path8.join(tmpDir, opts.dir, name);
3454
3454
  }
3455
- function _assertPath(path9) {
3456
- if (path9.includes("..")) {
3455
+ function _assertPath(option, value) {
3456
+ if (typeof value !== "string") {
3457
+ throw new Error(`${option} option must be a string, got "${typeof value}".`);
3458
+ }
3459
+ if (value.includes("..")) {
3457
3460
  throw new Error("Relative value not allowed");
3458
3461
  }
3459
- return path9;
3462
+ return value;
3460
3463
  }
3461
3464
  function _assertOptionsBase(options) {
3462
3465
  if (!_isUndefined(options.name)) {
@@ -3467,8 +3470,13 @@ var require_tmp = __commonJS({
3467
3470
  throw new Error(`name option must not contain a path, found "${name}".`);
3468
3471
  }
3469
3472
  }
3470
- if (!_isUndefined(options.template) && !options.template.match(TEMPLATE_PATTERN)) {
3471
- throw new Error(`Invalid template, found "${options.template}".`);
3473
+ if (!_isUndefined(options.template)) {
3474
+ if (typeof options.template !== "string") {
3475
+ throw new Error(`template option must be a string, got "${typeof options.template}".`);
3476
+ }
3477
+ if (!options.template.match(TEMPLATE_PATTERN)) {
3478
+ throw new Error(`Invalid template, found "${options.template}".`);
3479
+ }
3472
3480
  }
3473
3481
  if (!_isUndefined(options.tries) && isNaN(options.tries) || options.tries < 0) {
3474
3482
  throw new Error(`Invalid tries, found "${options.tries}".`);
@@ -3478,9 +3486,9 @@ var require_tmp = __commonJS({
3478
3486
  options.detachDescriptor = !!options.detachDescriptor;
3479
3487
  options.discardDescriptor = !!options.discardDescriptor;
3480
3488
  options.unsafeCleanup = !!options.unsafeCleanup;
3481
- options.prefix = _isUndefined(options.prefix) ? "" : _assertPath(options.prefix);
3482
- options.postfix = _isUndefined(options.postfix) ? "" : _assertPath(options.postfix);
3483
- options.template = _isUndefined(options.template) ? void 0 : _assertPath(options.template);
3489
+ options.prefix = _isUndefined(options.prefix) ? "" : _assertPath("prefix", options.prefix);
3490
+ options.postfix = _isUndefined(options.postfix) ? "" : _assertPath("postfix", options.postfix);
3491
+ options.template = _isUndefined(options.template) ? void 0 : _assertPath("template", options.template);
3484
3492
  }
3485
3493
  function _getRelativePath(option, name, tmpDir, cb) {
3486
3494
  if (_isUndefined(name)) return cb(null);
@@ -7710,85 +7718,85 @@ function isBlacklisted(filename2) {
7710
7718
  import fs3 from "node:fs";
7711
7719
 
7712
7720
  // node_modules/tar/dist/esm/index.min.js
7713
- import Vr from "events";
7721
+ import $r from "events";
7714
7722
  import I from "fs";
7715
7723
  import { EventEmitter as Li } from "node:events";
7716
- import Ds from "node:stream";
7717
- import { StringDecoder as Br } from "node:string_decoder";
7718
- import or from "node:path";
7719
- import Vt from "node:fs";
7720
- import { dirname as Ln, parse as Nn } from "path";
7721
- import { EventEmitter as _n } from "events";
7724
+ import As from "node:stream";
7725
+ import { StringDecoder as Pr } from "node:string_decoder";
7726
+ import hr from "node:path";
7727
+ import Kt from "node:fs";
7728
+ import { dirname as Nn, parse as Dn } from "path";
7729
+ import { EventEmitter as On } from "events";
7722
7730
  import Pi from "assert";
7723
7731
  import { Buffer as Ot } from "buffer";
7724
- import * as vs from "zlib";
7725
- import Qr from "zlib";
7732
+ import * as Ms from "zlib";
7733
+ import Jr from "zlib";
7726
7734
  import { posix as Zt } from "node:path";
7727
- import { basename as Sn } from "node:path";
7735
+ import { basename as yn } from "node:path";
7728
7736
  import ui from "fs";
7729
7737
  import $ from "fs";
7730
- import Xs from "path";
7738
+ import qs from "path";
7731
7739
  import { win32 as Cn } from "node:path";
7732
- import rr from "path";
7740
+ import nr from "path";
7733
7741
  import kr from "node:fs";
7734
- import ro from "node:assert";
7742
+ import no from "node:assert";
7735
7743
  import { randomBytes as Cr } from "node:crypto";
7736
7744
  import u from "node:fs";
7737
7745
  import R from "node:path";
7738
- import fr from "fs";
7746
+ import dr from "fs";
7739
7747
  import Ei from "node:fs";
7740
- import we from "node:path";
7741
- import F from "node:fs";
7742
- import Jn from "node:fs/promises";
7748
+ import Ee from "node:path";
7749
+ import k from "node:fs";
7750
+ import jn from "node:fs/promises";
7743
7751
  import wi from "node:path";
7744
- import { join as br } from "node:path";
7752
+ import { join as _r } from "node:path";
7745
7753
  import v from "node:fs";
7746
- import Fr from "node:path";
7747
- var vr = Object.defineProperty;
7748
- var Mr = (s3, t) => {
7749
- for (var e in t) vr(s3, e, { get: t[e], enumerable: true });
7754
+ import vr from "node:path";
7755
+ var Mr = Object.defineProperty;
7756
+ var Br = (s3, t) => {
7757
+ for (var e in t) Mr(s3, e, { get: t[e], enumerable: true });
7750
7758
  };
7751
- var Ts = typeof process == "object" && process ? process : { stdout: null, stderr: null };
7752
- var Pr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof Ds || zr(s3) || Ur(s3));
7753
- var zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Li && typeof s3.pipe == "function" && s3.pipe !== Ds.Writable.prototype.pipe;
7754
- var Ur = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Li && typeof s3.write == "function" && typeof s3.end == "function";
7759
+ var xs = typeof process == "object" && process ? process : { stdout: null, stderr: null };
7760
+ var zr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof As || Ur(s3) || Hr(s3));
7761
+ var Ur = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Li && typeof s3.pipe == "function" && s3.pipe !== As.Writable.prototype.pipe;
7762
+ var Hr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Li && typeof s3.write == "function" && typeof s3.end == "function";
7755
7763
  var q = /* @__PURE__ */ Symbol("EOF");
7756
7764
  var Q = /* @__PURE__ */ Symbol("maybeEmitEnd");
7757
7765
  var rt = /* @__PURE__ */ Symbol("emittedEnd");
7758
- var Ne = /* @__PURE__ */ Symbol("emittingEnd");
7759
- var Qt = /* @__PURE__ */ Symbol("emittedError");
7760
- var De = /* @__PURE__ */ Symbol("closed");
7761
- var xs = /* @__PURE__ */ Symbol("read");
7762
- var Ae = /* @__PURE__ */ Symbol("flush");
7763
- var Ls = /* @__PURE__ */ Symbol("flushChunk");
7766
+ var Le = /* @__PURE__ */ Symbol("emittingEnd");
7767
+ var qt = /* @__PURE__ */ Symbol("emittedError");
7768
+ var Ne = /* @__PURE__ */ Symbol("closed");
7769
+ var Ls = /* @__PURE__ */ Symbol("read");
7770
+ var De = /* @__PURE__ */ Symbol("flush");
7771
+ var Ns = /* @__PURE__ */ Symbol("flushChunk");
7764
7772
  var z = /* @__PURE__ */ Symbol("encoding");
7765
7773
  var Mt = /* @__PURE__ */ Symbol("decoder");
7766
7774
  var g = /* @__PURE__ */ Symbol("flowing");
7767
- var Jt = /* @__PURE__ */ Symbol("paused");
7775
+ var Qt = /* @__PURE__ */ Symbol("paused");
7768
7776
  var Bt = /* @__PURE__ */ Symbol("resume");
7769
7777
  var b = /* @__PURE__ */ Symbol("buffer");
7770
7778
  var D = /* @__PURE__ */ Symbol("pipes");
7771
7779
  var _ = /* @__PURE__ */ Symbol("bufferLength");
7772
7780
  var gi = /* @__PURE__ */ Symbol("bufferPush");
7773
- var Ie = /* @__PURE__ */ Symbol("bufferShift");
7781
+ var Ae = /* @__PURE__ */ Symbol("bufferShift");
7774
7782
  var L = /* @__PURE__ */ Symbol("objectMode");
7775
7783
  var w = /* @__PURE__ */ Symbol("destroyed");
7776
7784
  var bi = /* @__PURE__ */ Symbol("error");
7777
7785
  var _i = /* @__PURE__ */ Symbol("emitData");
7778
- var Ns = /* @__PURE__ */ Symbol("emitEnd");
7786
+ var Ds = /* @__PURE__ */ Symbol("emitEnd");
7779
7787
  var Oi = /* @__PURE__ */ Symbol("emitEnd2");
7780
7788
  var Z = /* @__PURE__ */ Symbol("async");
7781
7789
  var Ti = /* @__PURE__ */ Symbol("abort");
7782
- var Ce = /* @__PURE__ */ Symbol("aborted");
7783
- var jt = /* @__PURE__ */ Symbol("signal");
7790
+ var Ie = /* @__PURE__ */ Symbol("aborted");
7791
+ var Jt = /* @__PURE__ */ Symbol("signal");
7784
7792
  var Rt = /* @__PURE__ */ Symbol("dataListeners");
7785
- var C = /* @__PURE__ */ Symbol("discarded");
7786
- var te = (s3) => Promise.resolve().then(s3);
7787
- var Hr = (s3) => s3();
7788
- var Wr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
7789
- var Gr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
7790
- var Zr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
7791
- var ke = class {
7793
+ var F = /* @__PURE__ */ Symbol("discarded");
7794
+ var jt = (s3) => Promise.resolve().then(s3);
7795
+ var Wr = (s3) => s3();
7796
+ var Gr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
7797
+ var Zr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
7798
+ var Yr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
7799
+ var Fe = class {
7792
7800
  src;
7793
7801
  dest;
7794
7802
  opts;
@@ -7805,7 +7813,7 @@ var ke = class {
7805
7813
  this.unpipe(), this.opts.end && this.dest.end();
7806
7814
  }
7807
7815
  };
7808
- var xi = class extends ke {
7816
+ var xi = class extends Fe {
7809
7817
  unpipe() {
7810
7818
  this.src.removeListener("error", this.proxyErrors), super.unpipe();
7811
7819
  }
@@ -7813,11 +7821,11 @@ var xi = class extends ke {
7813
7821
  super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
7814
7822
  }
7815
7823
  };
7816
- var Yr = (s3) => !!s3.objectMode;
7817
- var Kr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
7824
+ var Kr = (s3) => !!s3.objectMode;
7825
+ var Vr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
7818
7826
  var A = class extends Li {
7819
7827
  [g] = false;
7820
- [Jt] = false;
7828
+ [Qt] = false;
7821
7829
  [D] = [];
7822
7830
  [b] = [];
7823
7831
  [L];
@@ -7826,23 +7834,23 @@ var A = class extends Li {
7826
7834
  [Mt];
7827
7835
  [q] = false;
7828
7836
  [rt] = false;
7837
+ [Le] = false;
7829
7838
  [Ne] = false;
7830
- [De] = false;
7831
- [Qt] = null;
7839
+ [qt] = null;
7832
7840
  [_] = 0;
7833
7841
  [w] = false;
7834
- [jt];
7835
- [Ce] = false;
7842
+ [Jt];
7843
+ [Ie] = false;
7836
7844
  [Rt] = 0;
7837
- [C] = false;
7845
+ [F] = false;
7838
7846
  writable = true;
7839
7847
  readable = true;
7840
7848
  constructor(...t) {
7841
7849
  let e = t[0] || {};
7842
7850
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
7843
- Yr(e) ? (this[L] = true, this[z] = null) : Kr(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[Mt] = this[z] ? new Br(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] });
7851
+ 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 Pr(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] });
7844
7852
  let { signal: i } = e;
7845
- i && (this[jt] = i, i.aborted ? this[Ti]() : i.addEventListener("abort", () => this[Ti]()));
7853
+ i && (this[Jt] = i, i.aborted ? this[Ti]() : i.addEventListener("abort", () => this[Ti]()));
7846
7854
  }
7847
7855
  get bufferLength() {
7848
7856
  return this[_];
@@ -7869,52 +7877,52 @@ var A = class extends Li {
7869
7877
  this[Z] = this[Z] || !!t;
7870
7878
  }
7871
7879
  [Ti]() {
7872
- this[Ce] = true, this.emit("abort", this[jt]?.reason), this.destroy(this[jt]?.reason);
7880
+ this[Ie] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
7873
7881
  }
7874
7882
  get aborted() {
7875
- return this[Ce];
7883
+ return this[Ie];
7876
7884
  }
7877
7885
  set aborted(t) {
7878
7886
  }
7879
7887
  write(t, e, i) {
7880
- if (this[Ce]) return false;
7888
+ if (this[Ie]) return false;
7881
7889
  if (this[q]) throw new Error("write after end");
7882
7890
  if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
7883
7891
  typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
7884
- let r = this[Z] ? te : Hr;
7892
+ let r = this[Z] ? jt : Wr;
7885
7893
  if (!this[L] && !Buffer.isBuffer(t)) {
7886
- if (Zr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
7887
- else if (Gr(t)) t = Buffer.from(t);
7894
+ if (Yr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
7895
+ else if (Zr(t)) t = Buffer.from(t);
7888
7896
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
7889
7897
  }
7890
- return this[L] ? (this[g] && this[_] !== 0 && this[Ae](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[Ae](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]);
7898
+ 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]);
7891
7899
  }
7892
7900
  read(t) {
7893
7901
  if (this[w]) return null;
7894
- if (this[C] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[Q](), null;
7902
+ if (this[F] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[Q](), null;
7895
7903
  this[L] && (t = null), this[b].length > 1 && !this[L] && (this[b] = [this[z] ? this[b].join("") : Buffer.concat(this[b], this[_])]);
7896
- let e = this[xs](t || null, this[b][0]);
7904
+ let e = this[Ls](t || null, this[b][0]);
7897
7905
  return this[Q](), e;
7898
7906
  }
7899
- [xs](t, e) {
7900
- if (this[L]) this[Ie]();
7907
+ [Ls](t, e) {
7908
+ if (this[L]) this[Ae]();
7901
7909
  else {
7902
7910
  let i = e;
7903
- t === i.length || t === null ? this[Ie]() : typeof i == "string" ? (this[b][0] = i.slice(t), e = i.slice(0, t), this[_] -= t) : (this[b][0] = i.subarray(t), e = i.subarray(0, t), this[_] -= t);
7911
+ 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);
7904
7912
  }
7905
7913
  return this.emit("data", e), !this[b].length && !this[q] && this.emit("drain"), e;
7906
7914
  }
7907
7915
  end(t, e, i) {
7908
- 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[Jt]) && this[Q](), this;
7916
+ 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;
7909
7917
  }
7910
7918
  [Bt]() {
7911
- this[w] || (!this[Rt] && !this[D].length && (this[C] = true), this[Jt] = false, this[g] = true, this.emit("resume"), this[b].length ? this[Ae]() : this[q] ? this[Q]() : this.emit("drain"));
7919
+ 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"));
7912
7920
  }
7913
7921
  resume() {
7914
7922
  return this[Bt]();
7915
7923
  }
7916
7924
  pause() {
7917
- this[g] = false, this[Jt] = true, this[C] = false;
7925
+ this[g] = false, this[Qt] = true, this[F] = false;
7918
7926
  }
7919
7927
  get destroyed() {
7920
7928
  return this[w];
@@ -7923,28 +7931,28 @@ var A = class extends Li {
7923
7931
  return this[g];
7924
7932
  }
7925
7933
  get paused() {
7926
- return this[Jt];
7934
+ return this[Qt];
7927
7935
  }
7928
7936
  [gi](t) {
7929
7937
  this[L] ? this[_] += 1 : this[_] += t.length, this[b].push(t);
7930
7938
  }
7931
- [Ie]() {
7939
+ [Ae]() {
7932
7940
  return this[L] ? this[_] -= 1 : this[_] -= this[b][0].length, this[b].shift();
7933
7941
  }
7934
- [Ae](t = false) {
7942
+ [De](t = false) {
7935
7943
  do
7936
7944
  ;
7937
- while (this[Ls](this[Ie]()) && this[b].length);
7945
+ while (this[Ns](this[Ae]()) && this[b].length);
7938
7946
  !t && !this[b].length && !this[q] && this.emit("drain");
7939
7947
  }
7940
- [Ls](t) {
7948
+ [Ns](t) {
7941
7949
  return this.emit("data", t), this[g];
7942
7950
  }
7943
7951
  pipe(t, e) {
7944
7952
  if (this[w]) return t;
7945
- this[C] = false;
7953
+ this[F] = false;
7946
7954
  let i = this[rt];
7947
- 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 xi(this, t, e) : new ke(this, t, e)), this[Z] ? te(() => this[Bt]()) : this[Bt]()), t;
7955
+ 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;
7948
7956
  }
7949
7957
  unpipe(t) {
7950
7958
  let e = this[D].find((i) => i.dest === t);
@@ -7955,12 +7963,12 @@ var A = class extends Li {
7955
7963
  }
7956
7964
  on(t, e) {
7957
7965
  let i = super.on(t, e);
7958
- if (t === "data") this[C] = false, this[Rt]++, !this[D].length && !this[g] && this[Bt]();
7966
+ if (t === "data") this[F] = false, this[Rt]++, !this[D].length && !this[g] && this[Bt]();
7959
7967
  else if (t === "readable" && this[_] !== 0) super.emit("readable");
7960
- else if (Wr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
7961
- else if (t === "error" && this[Qt]) {
7968
+ else if (Gr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
7969
+ else if (t === "error" && this[qt]) {
7962
7970
  let r = e;
7963
- this[Z] ? te(() => r.call(this, this[Qt])) : r.call(this, this[Qt]);
7971
+ this[Z] ? jt(() => r.call(this, this[qt])) : r.call(this, this[qt]);
7964
7972
  }
7965
7973
  return i;
7966
7974
  }
@@ -7969,30 +7977,30 @@ var A = class extends Li {
7969
7977
  }
7970
7978
  off(t, e) {
7971
7979
  let i = super.off(t, e);
7972
- return t === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[C] && !this[D].length && (this[g] = false)), i;
7980
+ return t === "data" && (this[Rt] = this.listeners("data").length, this[Rt] === 0 && !this[F] && !this[D].length && (this[g] = false)), i;
7973
7981
  }
7974
7982
  removeAllListeners(t) {
7975
7983
  let e = super.removeAllListeners(t);
7976
- return (t === "data" || t === void 0) && (this[Rt] = 0, !this[C] && !this[D].length && (this[g] = false)), e;
7984
+ return (t === "data" || t === void 0) && (this[Rt] = 0, !this[F] && !this[D].length && (this[g] = false)), e;
7977
7985
  }
7978
7986
  get emittedEnd() {
7979
7987
  return this[rt];
7980
7988
  }
7981
7989
  [Q]() {
7982
- !this[Ne] && !this[rt] && !this[w] && this[b].length === 0 && this[q] && (this[Ne] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[De] && this.emit("close"), this[Ne] = false);
7990
+ !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);
7983
7991
  }
7984
7992
  emit(t, ...e) {
7985
7993
  let i = e[0];
7986
7994
  if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
7987
- if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[_i](i)), true) : this[_i](i);
7988
- if (t === "end") return this[Ns]();
7995
+ if (t === "data") return !this[L] && !i ? false : this[Z] ? (jt(() => this[_i](i)), true) : this[_i](i);
7996
+ if (t === "end") return this[Ds]();
7989
7997
  if (t === "close") {
7990
- if (this[De] = true, !this[rt] && !this[w]) return false;
7998
+ if (this[Ne] = true, !this[rt] && !this[w]) return false;
7991
7999
  let n = super.emit("close");
7992
8000
  return this.removeAllListeners("close"), n;
7993
8001
  } else if (t === "error") {
7994
- this[Qt] = i, super.emit(bi, i);
7995
- let n = !this[jt] || this.listeners("error").length ? super.emit("error", i) : false;
8002
+ this[qt] = i, super.emit(bi, i);
8003
+ let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
7996
8004
  return this[Q](), n;
7997
8005
  } else if (t === "resume") {
7998
8006
  let n = super.emit("resume");
@@ -8006,18 +8014,18 @@ var A = class extends Li {
8006
8014
  }
8007
8015
  [_i](t) {
8008
8016
  for (let i of this[D]) i.dest.write(t) === false && this.pause();
8009
- let e = this[C] ? false : super.emit("data", t);
8017
+ let e = this[F] ? false : super.emit("data", t);
8010
8018
  return this[Q](), e;
8011
8019
  }
8012
- [Ns]() {
8013
- return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[Oi]()), true) : this[Oi]());
8020
+ [Ds]() {
8021
+ return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (jt(() => this[Oi]()), true) : this[Oi]());
8014
8022
  }
8015
8023
  [Oi]() {
8016
8024
  if (this[Mt]) {
8017
8025
  let e = this[Mt].end();
8018
8026
  if (e) {
8019
8027
  for (let i of this[D]) i.dest.write(e);
8020
- this[C] || super.emit("data", e);
8028
+ this[F] || super.emit("data", e);
8021
8029
  }
8022
8030
  }
8023
8031
  for (let e of this[D]) e.end();
@@ -8043,22 +8051,22 @@ var A = class extends Li {
8043
8051
  });
8044
8052
  }
8045
8053
  [Symbol.asyncIterator]() {
8046
- this[C] = false;
8054
+ this[F] = false;
8047
8055
  let t = false, e = async () => (this.pause(), t = true, { value: void 0, done: true });
8048
8056
  return { next: () => {
8049
8057
  if (t) return e();
8050
8058
  let r = this.read();
8051
8059
  if (r !== null) return Promise.resolve({ done: false, value: r });
8052
8060
  if (this[q]) return e();
8053
- let n, o, h = (d) => {
8054
- this.off("data", a), this.off("end", l), this.off(w, c), e(), o(d);
8055
- }, a = (d) => {
8056
- this.off("error", h), this.off("end", l), this.off(w, c), this.pause(), n({ value: d, done: !!this[q] });
8061
+ let n, o, a = (d) => {
8062
+ this.off("data", h), this.off("end", l), this.off(w, c), e(), o(d);
8063
+ }, h = (d) => {
8064
+ this.off("error", a), this.off("end", l), this.off(w, c), this.pause(), n({ value: d, done: !!this[q] });
8057
8065
  }, l = () => {
8058
- this.off("error", h), this.off("data", a), this.off(w, c), e(), n({ done: true, value: void 0 });
8059
- }, c = () => h(new Error("stream destroyed"));
8066
+ this.off("error", a), this.off("data", h), this.off(w, c), e(), n({ done: true, value: void 0 });
8067
+ }, c = () => a(new Error("stream destroyed"));
8060
8068
  return new Promise((d, S) => {
8061
- o = S, n = d, this.once(w, c), this.once("error", h), this.once("end", l), this.once("data", a);
8069
+ o = S, n = d, this.once(w, c), this.once("error", a), this.once("end", l), this.once("data", h);
8062
8070
  });
8063
8071
  }, throw: e, return: e, [Symbol.asyncIterator]() {
8064
8072
  return this;
@@ -8066,7 +8074,7 @@ var A = class extends Li {
8066
8074
  } };
8067
8075
  }
8068
8076
  [Symbol.iterator]() {
8069
- this[C] = false;
8077
+ this[F] = false;
8070
8078
  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 = () => {
8071
8079
  if (t) return e();
8072
8080
  let r = this.read();
@@ -8079,26 +8087,26 @@ var A = class extends Li {
8079
8087
  }
8080
8088
  destroy(t) {
8081
8089
  if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
8082
- this[w] = true, this[C] = true, this[b].length = 0, this[_] = 0;
8090
+ this[w] = true, this[F] = true, this[b].length = 0, this[_] = 0;
8083
8091
  let e = this;
8084
- return typeof e.close == "function" && !this[De] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
8092
+ return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
8085
8093
  }
8086
8094
  static get isStream() {
8087
- return Pr;
8095
+ return zr;
8088
8096
  }
8089
8097
  };
8090
- var $r = I.writev;
8098
+ var Xr = I.writev;
8091
8099
  var ot = /* @__PURE__ */ Symbol("_autoClose");
8092
8100
  var H = /* @__PURE__ */ Symbol("_close");
8093
- var ee = /* @__PURE__ */ Symbol("_ended");
8101
+ var te = /* @__PURE__ */ Symbol("_ended");
8094
8102
  var m = /* @__PURE__ */ Symbol("_fd");
8095
8103
  var Ni = /* @__PURE__ */ Symbol("_finished");
8096
8104
  var j = /* @__PURE__ */ Symbol("_flags");
8097
8105
  var Di = /* @__PURE__ */ Symbol("_flush");
8098
- var ki = /* @__PURE__ */ Symbol("_handleChunk");
8099
- var Fi = /* @__PURE__ */ Symbol("_makeBuf");
8100
- var se = /* @__PURE__ */ Symbol("_mode");
8101
- var Fe = /* @__PURE__ */ Symbol("_needDrain");
8106
+ var Ci = /* @__PURE__ */ Symbol("_handleChunk");
8107
+ var ki = /* @__PURE__ */ Symbol("_makeBuf");
8108
+ var ie = /* @__PURE__ */ Symbol("_mode");
8109
+ var Ce = /* @__PURE__ */ Symbol("_needDrain");
8102
8110
  var Ut = /* @__PURE__ */ Symbol("_onerror");
8103
8111
  var Ht = /* @__PURE__ */ Symbol("_onopen");
8104
8112
  var Ai = /* @__PURE__ */ Symbol("_onread");
@@ -8110,11 +8118,11 @@ var Y = /* @__PURE__ */ Symbol("_queue");
8110
8118
  var zt = /* @__PURE__ */ Symbol("_read");
8111
8119
  var Ii = /* @__PURE__ */ Symbol("_readSize");
8112
8120
  var J = /* @__PURE__ */ Symbol("_reading");
8113
- var ie = /* @__PURE__ */ Symbol("_remain");
8114
- var Ci = /* @__PURE__ */ Symbol("_size");
8115
- var ve = /* @__PURE__ */ Symbol("_write");
8121
+ var ee = /* @__PURE__ */ Symbol("_remain");
8122
+ var Fi = /* @__PURE__ */ Symbol("_size");
8123
+ var ke = /* @__PURE__ */ Symbol("_write");
8116
8124
  var gt = /* @__PURE__ */ Symbol("_writing");
8117
- var Me = /* @__PURE__ */ Symbol("_defaultFlag");
8125
+ var ve = /* @__PURE__ */ Symbol("_defaultFlag");
8118
8126
  var bt = /* @__PURE__ */ Symbol("_errored");
8119
8127
  var _t = class extends A {
8120
8128
  [bt] = false;
@@ -8122,12 +8130,12 @@ var _t = class extends A {
8122
8130
  [U];
8123
8131
  [Ii];
8124
8132
  [J] = false;
8125
- [Ci];
8126
- [ie];
8133
+ [Fi];
8134
+ [ee];
8127
8135
  [ot];
8128
8136
  constructor(t, e) {
8129
8137
  if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
8130
- 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[Ci] = typeof e.size == "number" ? e.size : 1 / 0, this[ie] = this[Ci], this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[m] == "number" ? this[zt]() : this[ht]();
8138
+ 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]();
8131
8139
  }
8132
8140
  get fd() {
8133
8141
  return this[m];
@@ -8147,19 +8155,19 @@ var _t = class extends A {
8147
8155
  [Ht](t, e) {
8148
8156
  t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
8149
8157
  }
8150
- [Fi]() {
8151
- return Buffer.allocUnsafe(Math.min(this[Ii], this[ie]));
8158
+ [ki]() {
8159
+ return Buffer.allocUnsafe(Math.min(this[Ii], this[ee]));
8152
8160
  }
8153
8161
  [zt]() {
8154
8162
  if (!this[J]) {
8155
8163
  this[J] = true;
8156
- let t = this[Fi]();
8164
+ let t = this[ki]();
8157
8165
  if (t.length === 0) return process.nextTick(() => this[Ai](null, 0, t));
8158
8166
  I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ai](e, i, r));
8159
8167
  }
8160
8168
  }
8161
8169
  [Ai](t, e, i) {
8162
- this[J] = false, t ? this[Ut](t) : this[ki](e, i) && this[zt]();
8170
+ this[J] = false, t ? this[Ut](t) : this[Ci](e, i) && this[zt]();
8163
8171
  }
8164
8172
  [H]() {
8165
8173
  if (this[ot] && typeof this[m] == "number") {
@@ -8170,9 +8178,9 @@ var _t = class extends A {
8170
8178
  [Ut](t) {
8171
8179
  this[J] = true, this[H](), this.emit("error", t);
8172
8180
  }
8173
- [ki](t, e) {
8181
+ [Ci](t, e) {
8174
8182
  let i = false;
8175
- 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;
8183
+ 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;
8176
8184
  }
8177
8185
  emit(t, ...e) {
8178
8186
  switch (t) {
@@ -8188,7 +8196,7 @@ var _t = class extends A {
8188
8196
  }
8189
8197
  }
8190
8198
  };
8191
- var Be = class extends _t {
8199
+ var Me = class extends _t {
8192
8200
  [ht]() {
8193
8201
  let t = true;
8194
8202
  try {
@@ -8203,8 +8211,8 @@ var Be = class extends _t {
8203
8211
  if (!this[J]) {
8204
8212
  this[J] = true;
8205
8213
  do {
8206
- let e = this[Fi](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
8207
- if (!this[ki](i, e)) break;
8214
+ let e = this[ki](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
8215
+ if (!this[Ci](i, e)) break;
8208
8216
  } while (true);
8209
8217
  this[J] = false;
8210
8218
  }
@@ -8220,26 +8228,26 @@ var Be = class extends _t {
8220
8228
  }
8221
8229
  }
8222
8230
  };
8223
- var tt2 = class extends Vr {
8231
+ var tt2 = class extends $r {
8224
8232
  readable = false;
8225
8233
  writable = true;
8226
8234
  [bt] = false;
8227
8235
  [gt] = false;
8228
- [ee] = false;
8236
+ [te] = false;
8229
8237
  [Y] = [];
8230
- [Fe] = false;
8238
+ [Ce] = false;
8231
8239
  [U];
8232
- [se];
8240
+ [ie];
8233
8241
  [ot];
8234
8242
  [m];
8235
- [Me];
8243
+ [ve];
8236
8244
  [j];
8237
8245
  [Ni] = false;
8238
8246
  [nt];
8239
8247
  constructor(t, e) {
8240
- 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;
8248
+ 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;
8241
8249
  let i = this[nt] !== void 0 ? "r+" : "w";
8242
- this[Me] = e.flags === void 0, this[j] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
8250
+ this[ve] = e.flags === void 0, this[j] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
8243
8251
  }
8244
8252
  emit(t, ...e) {
8245
8253
  if (t === "error") {
@@ -8258,29 +8266,29 @@ var tt2 = class extends Vr {
8258
8266
  this[H](), this[gt] = true, this.emit("error", t);
8259
8267
  }
8260
8268
  [ht]() {
8261
- I.open(this[U], this[j], this[se], (t, e) => this[Ht](t, e));
8269
+ I.open(this[U], this[j], this[ie], (t, e) => this[Ht](t, e));
8262
8270
  }
8263
8271
  [Ht](t, e) {
8264
- this[Me] && 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]());
8272
+ 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]());
8265
8273
  }
8266
8274
  end(t, e) {
8267
- return t && this.write(t, e), this[ee] = true, !this[gt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
8275
+ return t && this.write(t, e), this[te] = true, !this[gt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
8268
8276
  }
8269
8277
  write(t, e) {
8270
- 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[gt] || this[Y].length ? (this[Y].push(t), this[Fe] = true, false) : (this[gt] = true, this[ve](t), true);
8278
+ 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);
8271
8279
  }
8272
- [ve](t) {
8280
+ [ke](t) {
8273
8281
  I.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
8274
8282
  }
8275
8283
  [Pt](t, e) {
8276
- t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[Di]() : (this[gt] = false, this[ee] && !this[Ni] ? (this[Ni] = true, this[H](), this.emit("finish")) : this[Fe] && (this[Fe] = false, this.emit("drain"))));
8284
+ 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"))));
8277
8285
  }
8278
8286
  [Di]() {
8279
- if (this[Y].length === 0) this[ee] && this[Pt](null, 0);
8280
- else if (this[Y].length === 1) this[ve](this[Y].pop());
8287
+ if (this[Y].length === 0) this[te] && this[Pt](null, 0);
8288
+ else if (this[Y].length === 1) this[ke](this[Y].pop());
8281
8289
  else {
8282
8290
  let t = this[Y];
8283
- this[Y] = [], $r(this[m], t, this[nt], (e, i) => this[Pt](e, i));
8291
+ this[Y] = [], Xr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
8284
8292
  }
8285
8293
  }
8286
8294
  [H]() {
@@ -8293,13 +8301,13 @@ var tt2 = class extends Vr {
8293
8301
  var Wt = class extends tt2 {
8294
8302
  [ht]() {
8295
8303
  let t;
8296
- if (this[Me] && this[j] === "r+") try {
8297
- t = I.openSync(this[U], this[j], this[se]);
8304
+ if (this[ve] && this[j] === "r+") try {
8305
+ t = I.openSync(this[U], this[j], this[ie]);
8298
8306
  } catch (e) {
8299
8307
  if (e?.code === "ENOENT") return this[j] = "w", this[ht]();
8300
8308
  throw e;
8301
8309
  }
8302
- else t = I.openSync(this[U], this[j], this[se]);
8310
+ else t = I.openSync(this[U], this[j], this[ie]);
8303
8311
  this[Ht](null, t);
8304
8312
  }
8305
8313
  [H]() {
@@ -8308,7 +8316,7 @@ var Wt = class extends tt2 {
8308
8316
  this[m] = void 0, I.closeSync(t), this.emit("close");
8309
8317
  }
8310
8318
  }
8311
- [ve](t) {
8319
+ [ke](t) {
8312
8320
  let e = true;
8313
8321
  try {
8314
8322
  this[Pt](null, I.writeSync(this[m], t, 0, t.length, this[nt])), e = false;
@@ -8320,50 +8328,50 @@ var Wt = class extends tt2 {
8320
8328
  }
8321
8329
  }
8322
8330
  };
8323
- var Xr = /* @__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"]]);
8324
- var As = (s3) => !!s3.sync && !!s3.file;
8325
- var Is = (s3) => !s3.sync && !!s3.file;
8331
+ 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"]]);
8332
+ var Is = (s3) => !!s3.sync && !!s3.file;
8333
+ var Fs = (s3) => !s3.sync && !!s3.file;
8326
8334
  var Cs = (s3) => !!s3.sync && !s3.file;
8327
8335
  var ks = (s3) => !s3.sync && !s3.file;
8328
- var Fs = (s3) => !!s3.file;
8329
- var qr = (s3) => {
8330
- let t = Xr.get(s3);
8336
+ var vs = (s3) => !!s3.file;
8337
+ var Qr = (s3) => {
8338
+ let t = qr.get(s3);
8331
8339
  return t || s3;
8332
8340
  };
8333
- var re = (s3 = {}) => {
8341
+ var se = (s3 = {}) => {
8334
8342
  if (!s3) return {};
8335
8343
  let t = {};
8336
8344
  for (let [e, i] of Object.entries(s3)) {
8337
- let r = qr(e);
8345
+ let r = Qr(e);
8338
8346
  t[r] = i;
8339
8347
  }
8340
8348
  return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
8341
8349
  };
8342
- var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
8343
- Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (h = o, o = void 0), o = o ? Array.from(o) : [];
8344
- let a = re(n);
8345
- if (r?.(a, o), As(a)) {
8346
- if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
8347
- return s3(a, o);
8348
- } else if (Is(a)) {
8349
- let l = t(a, o);
8350
- return h ? l.then(() => h(), h) : l;
8351
- } else if (Cs(a)) {
8352
- if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
8353
- return e(a, o);
8354
- } else if (ks(a)) {
8355
- if (typeof h == "function") throw new TypeError("callback only supported with file option");
8356
- return i(a, o);
8350
+ var K = (s3, t, e, i, r) => Object.assign((n = [], o, a) => {
8351
+ Array.isArray(n) && (o = n, n = {}), typeof o == "function" && (a = o, o = void 0), o = o ? Array.from(o) : [];
8352
+ let h = se(n);
8353
+ if (r?.(h, o), Is(h)) {
8354
+ if (typeof a == "function") throw new TypeError("callback not supported for sync tar functions");
8355
+ return s3(h, o);
8356
+ } else if (Fs(h)) {
8357
+ let l = t(h, o);
8358
+ return a ? l.then(() => a(), a) : l;
8359
+ } else if (Cs(h)) {
8360
+ if (typeof a == "function") throw new TypeError("callback not supported for sync tar functions");
8361
+ return e(h, o);
8362
+ } else if (ks(h)) {
8363
+ if (typeof a == "function") throw new TypeError("callback only supported with file option");
8364
+ return i(h, o);
8357
8365
  }
8358
8366
  throw new Error("impossible options??");
8359
8367
  }, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
8360
- var Jr = Qr.constants || { ZLIB_VERNUM: 4736 };
8361
- 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));
8362
- var jr = Ot.concat;
8363
- var Ms = Object.getOwnPropertyDescriptor(Ot, "concat");
8364
- var tn = (s3) => s3;
8365
- var Mi = Ms?.writable === true || Ms?.set !== void 0 ? (s3) => {
8366
- Ot.concat = s3 ? tn : jr;
8368
+ var jr = Jr.constants || { ZLIB_VERNUM: 4736 };
8369
+ 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));
8370
+ var tn = Ot.concat;
8371
+ var Bs = Object.getOwnPropertyDescriptor(Ot, "concat");
8372
+ var en = (s3) => s3;
8373
+ var Mi = Bs?.writable === true || Bs?.set !== void 0 ? (s3) => {
8374
+ Ot.concat = s3 ? en : tn;
8367
8375
  } : (s3) => {
8368
8376
  };
8369
8377
  var Tt = /* @__PURE__ */ Symbol("_superWrite");
@@ -8378,7 +8386,7 @@ var Gt = class extends Error {
8378
8386
  }
8379
8387
  };
8380
8388
  var Bi = /* @__PURE__ */ Symbol("flushFlag");
8381
- var ne = class extends A {
8389
+ var re = class extends A {
8382
8390
  #t = false;
8383
8391
  #i = false;
8384
8392
  #s;
@@ -8397,9 +8405,9 @@ var ne = class extends A {
8397
8405
  }
8398
8406
  constructor(t, e) {
8399
8407
  if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
8400
- 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);
8408
+ 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);
8401
8409
  try {
8402
- this.#e = new vs[e](t);
8410
+ this.#e = new Ms[e](t);
8403
8411
  } catch (i) {
8404
8412
  throw new Gt(i, this.constructor);
8405
8413
  }
@@ -8434,26 +8442,26 @@ var ne = class extends A {
8434
8442
  let o = this.#e.close;
8435
8443
  this.#e.close = () => {
8436
8444
  }, Mi(true);
8437
- let h;
8445
+ let a;
8438
8446
  try {
8439
8447
  let l = typeof t[Bi] == "number" ? t[Bi] : this.#s;
8440
- h = this.#e._processChunk(t, l), Mi(false);
8448
+ a = this.#e._processChunk(t, l), Mi(false);
8441
8449
  } catch (l) {
8442
8450
  Mi(false), this.#o(new Gt(l, this.write));
8443
8451
  } finally {
8444
8452
  this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
8445
8453
  }
8446
8454
  this.#e && this.#e.on("error", (l) => this.#o(new Gt(l, this.write)));
8447
- let a;
8448
- if (h) if (Array.isArray(h) && h.length > 0) {
8449
- let l = h[0];
8450
- a = this[Tt](Ot.from(l));
8451
- for (let c = 1; c < h.length; c++) a = this[Tt](h[c]);
8452
- } else a = this[Tt](Ot.from(h));
8453
- return i && i(), a;
8455
+ let h;
8456
+ if (a) if (Array.isArray(a) && a.length > 0) {
8457
+ let l = a[0];
8458
+ h = this[Tt](Ot.from(l));
8459
+ for (let c = 1; c < a.length; c++) h = this[Tt](a[c]);
8460
+ } else h = this[Tt](Ot.from(a));
8461
+ return i && i(), h;
8454
8462
  }
8455
8463
  };
8456
- var Pe = class extends ne {
8464
+ var Be = class extends re {
8457
8465
  #t;
8458
8466
  #i;
8459
8467
  constructor(t, e) {
@@ -8479,7 +8487,7 @@ var Pe = class extends ne {
8479
8487
  }
8480
8488
  }
8481
8489
  };
8482
- var ze = class extends Pe {
8490
+ var Pe = class extends Be {
8483
8491
  #t;
8484
8492
  constructor(t) {
8485
8493
  super(t, "Gzip"), this.#t = t && !!t.portable;
@@ -8488,88 +8496,89 @@ var ze = class extends Pe {
8488
8496
  return this.#t ? (this.#t = false, t[9] = 255, super[Tt](t)) : super[Tt](t);
8489
8497
  }
8490
8498
  };
8491
- var Ue = class extends Pe {
8499
+ var ze = class extends Be {
8492
8500
  constructor(t) {
8493
8501
  super(t, "Unzip");
8494
8502
  }
8495
8503
  };
8496
- var He = class extends ne {
8504
+ var Ue = class extends re {
8497
8505
  constructor(t, e) {
8498
8506
  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);
8499
8507
  }
8500
8508
  };
8501
- var We = class extends He {
8509
+ var He = class extends Ue {
8502
8510
  constructor(t) {
8503
8511
  super(t, "BrotliCompress");
8504
8512
  }
8505
8513
  };
8506
- var Ge = class extends He {
8514
+ var We = class extends Ue {
8507
8515
  constructor(t) {
8508
8516
  super(t, "BrotliDecompress");
8509
8517
  }
8510
8518
  };
8511
- var Ze = class extends ne {
8519
+ var Ge = class extends re {
8512
8520
  constructor(t, e) {
8513
8521
  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);
8514
8522
  }
8515
8523
  };
8516
- var Ye = class extends Ze {
8524
+ var Ze = class extends Ge {
8517
8525
  constructor(t) {
8518
8526
  super(t, "ZstdCompress");
8519
8527
  }
8520
8528
  };
8521
- var Ke = class extends Ze {
8529
+ var Ye = class extends Ge {
8522
8530
  constructor(t) {
8523
8531
  super(t, "ZstdDecompress");
8524
8532
  }
8525
8533
  };
8526
- var Bs = (s3, t) => {
8527
- if (Number.isSafeInteger(s3)) s3 < 0 ? rn(s3, t) : sn(s3, t);
8534
+ var Ps = (s3, t) => {
8535
+ if (Number.isSafeInteger(s3)) s3 < 0 ? nn(s3, t) : rn(s3, t);
8528
8536
  else throw Error("cannot encode number outside of javascript safe integer range");
8529
8537
  return t;
8530
8538
  };
8531
- var sn = (s3, t) => {
8539
+ var rn = (s3, t) => {
8532
8540
  t[0] = 128;
8533
8541
  for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
8534
8542
  };
8535
- var rn = (s3, t) => {
8543
+ var nn = (s3, t) => {
8536
8544
  t[0] = 255;
8537
8545
  var e = false;
8538
8546
  s3 = s3 * -1;
8539
8547
  for (var i = t.length; i > 1; i--) {
8540
8548
  var r = s3 & 255;
8541
- s3 = Math.floor(s3 / 256), e ? t[i - 1] = zs(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = Us(r));
8549
+ s3 = Math.floor(s3 / 256), e ? t[i - 1] = Us(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = Hs(r));
8542
8550
  }
8543
8551
  };
8544
- var Ps = (s3) => {
8545
- let t = s3[0], e = t === 128 ? on(s3.subarray(1, s3.length)) : t === 255 ? nn(s3) : null;
8552
+ var zs = (s3) => {
8553
+ let t = s3[0], e = t === 128 ? hn(s3.subarray(1, s3.length)) : t === 255 ? on(s3) : null;
8546
8554
  if (e === null) throw Error("invalid base256 encoding");
8547
8555
  if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
8548
8556
  return e;
8549
8557
  };
8550
- var nn = (s3) => {
8558
+ var on = (s3) => {
8551
8559
  for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
8552
8560
  var n = Number(s3[r]), o;
8553
- i ? o = zs(n) : n === 0 ? o = n : (i = true, o = Us(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
8561
+ i ? o = Us(n) : n === 0 ? o = n : (i = true, o = Hs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
8554
8562
  }
8555
8563
  return e;
8556
8564
  };
8557
- var on = (s3) => {
8565
+ var hn = (s3) => {
8558
8566
  for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
8559
8567
  var r = Number(s3[i]);
8560
8568
  r !== 0 && (e += r * Math.pow(256, t - i - 1));
8561
8569
  }
8562
8570
  return e;
8563
8571
  };
8564
- var zs = (s3) => (255 ^ s3) & 255;
8565
- var Us = (s3) => (255 ^ s3) + 1 & 255;
8566
- var zi = {};
8567
- Mr(zi, { code: () => Ve, isCode: () => oe, isName: () => an, name: () => he });
8568
- var oe = (s3) => he.has(s3);
8569
- var an = (s3) => Ve.has(s3);
8570
- 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"]]);
8571
- var Ve = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
8572
- var k = class {
8572
+ var Us = (s3) => (255 ^ s3) & 255;
8573
+ var Hs = (s3) => (255 ^ s3) + 1 & 255;
8574
+ var Ui = {};
8575
+ Br(Ui, { code: () => Ke, isCode: () => ne, isName: () => ln, name: () => oe, normalFsTypes: () => zi });
8576
+ var ne = (s3) => oe.has(s3);
8577
+ var ln = (s3) => Ke.has(s3);
8578
+ var zi = /* @__PURE__ */ new Set(["0", "", "1", "2", "3", "4", "5", "6", "7", "D"]);
8579
+ 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"]]);
8580
+ var Ke = new Map(Array.from(oe).map((s3) => [s3[1], s3[0]]));
8581
+ var C = class {
8573
8582
  cksumValid = false;
8574
8583
  needPax = false;
8575
8584
  nullBlock = false;
@@ -8596,46 +8605,45 @@ var k = class {
8596
8605
  }
8597
8606
  decode(t, e, i, r) {
8598
8607
  if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
8599
- this.path = i?.path ?? xt(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 ?? Ui(t, e + 136, 12), this.cksum = at(t, e + 148, 12), r && this.#i(r, true), i && this.#i(i);
8600
- let n = xt(t, e + 156, 1);
8601
- 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 = xt(t, e + 157, 100), t.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = i?.uname ?? r?.uname ?? xt(t, e + 265, 32), this.gname = i?.gname ?? r?.gname ?? xt(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) {
8602
- let h = xt(t, e + 345, 155);
8603
- this.path = h + "/" + this.path;
8608
+ let n = xt(t, e + 156, 1), o = zi.has(n), a = o ? i : void 0, h = o ? r : void 0;
8609
+ 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) {
8610
+ let c = xt(t, e + 345, 155);
8611
+ this.path = c + "/" + this.path;
8604
8612
  } else {
8605
- let h = xt(t, e + 345, 130);
8606
- h && (this.path = h + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Ui(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Ui(t, e + 488, 12);
8613
+ let c = xt(t, e + 345, 130);
8614
+ 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);
8607
8615
  }
8608
- let o = 256;
8609
- for (let h = e; h < e + 148; h++) o += t[h];
8610
- for (let h = e + 156; h < e + 512; h++) o += t[h];
8611
- this.cksumValid = o === this.cksum, this.cksum === void 0 && o === 256 && (this.nullBlock = true);
8616
+ let l = 256;
8617
+ for (let c = e; c < e + 148; c++) l += t[c];
8618
+ for (let c = e + 156; c < e + 512; c++) l += t[c];
8619
+ this.cksumValid = l === this.cksum, this.cksum === void 0 && l === 256 && (this.nullBlock = true);
8612
8620
  }
8613
8621
  #i(t, e = false) {
8614
8622
  Object.assign(this, Object.fromEntries(Object.entries(t).filter(([i, r]) => !(r == null || i === "path" && e || i === "linkpath" && e || i === "global"))));
8615
8623
  }
8616
8624
  encode(t, e = 0) {
8617
8625
  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");
8618
- let i = this.ctime || this.atime ? 130 : 155, r = ln(this.path || "", i), n = r[0], o = r[1];
8619
- 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 = Hi(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 = Hi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = Hi(t, e + 488, 12, this.ctime) || this.needPax);
8620
- let h = 256;
8621
- for (let a = e; a < e + 148; a++) h += t[a];
8622
- for (let a = e + 156; a < e + 512; a++) h += t[a];
8623
- return this.cksum = h, lt(t, e + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
8626
+ let i = this.ctime || this.atime ? 130 : 155, r = cn(this.path || "", i), n = r[0], o = r[1];
8627
+ 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);
8628
+ let a = 256;
8629
+ for (let h = e; h < e + 148; h++) a += t[h];
8630
+ for (let h = e + 156; h < e + 512; h++) a += t[h];
8631
+ return this.cksum = a, lt(t, e + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
8624
8632
  }
8625
8633
  get type() {
8626
- return this.#t === "Unsupported" ? this.#t : he.get(this.#t);
8634
+ return this.#t === "Unsupported" ? this.#t : oe.get(this.#t);
8627
8635
  }
8628
8636
  get typeKey() {
8629
8637
  return this.#t;
8630
8638
  }
8631
8639
  set type(t) {
8632
- let e = String(Ve.get(t));
8633
- if (oe(e) || e === "Unsupported") this.#t = e;
8634
- else if (oe(t)) this.#t = t;
8640
+ let e = String(Ke.get(t));
8641
+ if (ne(e) || e === "Unsupported") this.#t = e;
8642
+ else if (ne(t)) this.#t = t;
8635
8643
  else throw new TypeError("invalid entry type: " + t);
8636
8644
  }
8637
8645
  };
8638
- var ln = (s3, t) => {
8646
+ var cn = (s3, t) => {
8639
8647
  let i = s3, r = "", n, o = Zt.parse(s3).root || ".";
8640
8648
  if (Buffer.byteLength(i) < 100) n = [i, r, false];
8641
8649
  else {
@@ -8648,19 +8656,19 @@ var ln = (s3, t) => {
8648
8656
  return n;
8649
8657
  };
8650
8658
  var xt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
8651
- var Ui = (s3, t, e) => cn(at(s3, t, e));
8652
- var cn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
8653
- var at = (s3, t, e) => Number(s3[t]) & 128 ? Ps(s3.subarray(t, t + e)) : dn(s3, t, e);
8654
- var fn = (s3) => isNaN(s3) ? void 0 : s3;
8655
- var dn = (s3, t, e) => fn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
8656
- var un = { 12: 8589934591, 8: 2097151 };
8657
- var lt = (s3, t, e, i) => i === void 0 ? false : i > un[e] || i < 0 ? (Bs(i, s3.subarray(t, t + e)), true) : (mn(s3, t, e, i), false);
8658
- var mn = (s3, t, e, i) => s3.write(pn(i, e), t, e, "ascii");
8659
- var pn = (s3, t) => En(Math.floor(s3).toString(8), t);
8660
- var En = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
8661
- var Hi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
8662
- var wn = new Array(156).join("\0");
8663
- var Lt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + wn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
8659
+ var Hi = (s3, t, e) => fn(at(s3, t, e));
8660
+ var fn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
8661
+ var at = (s3, t, e) => Number(s3[t]) & 128 ? zs(s3.subarray(t, t + e)) : un(s3, t, e);
8662
+ var dn = (s3) => isNaN(s3) ? void 0 : s3;
8663
+ var un = (s3, t, e) => dn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
8664
+ var mn = { 12: 8589934591, 8: 2097151 };
8665
+ 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);
8666
+ var pn = (s3, t, e, i) => s3.write(En(i, e), t, e, "ascii");
8667
+ var En = (s3, t) => wn(Math.floor(s3).toString(8), t);
8668
+ var wn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
8669
+ var Wi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
8670
+ var Sn = new Array(156).join("\0");
8671
+ 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);
8664
8672
  var ct = class s {
8665
8673
  atime;
8666
8674
  mtime;
@@ -8687,7 +8695,7 @@ var ct = class s {
8687
8695
  if (t === "") return Buffer.allocUnsafe(0);
8688
8696
  let e = Buffer.byteLength(t), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
8689
8697
  for (let n = 0; n < 512; n++) r[n] = 0;
8690
- new k({ path: ("PaxHeader/" + Sn(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");
8698
+ new C({ path: ("PaxHeader/" + yn(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");
8691
8699
  for (let n = e + 512; n < r.length; n++) r[n] = 0;
8692
8700
  return r;
8693
8701
  }
@@ -8701,13 +8709,13 @@ var ct = class s {
8701
8709
  return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
8702
8710
  }
8703
8711
  static parse(t, e, i = false) {
8704
- return new s(yn(Rn(t), e), i);
8712
+ return new s(Rn(gn(t), e), i);
8705
8713
  }
8706
8714
  };
8707
- var yn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
8708
- var Rn = (s3) => s3.replace(/\n$/, "").split(`
8709
- `).reduce(gn, /* @__PURE__ */ Object.create(null));
8710
- var gn = (s3, t) => {
8715
+ var Rn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
8716
+ var gn = (s3) => s3.replace(/\n$/, "").split(`
8717
+ `).reduce(bn, /* @__PURE__ */ Object.create(null));
8718
+ var bn = (s3, t) => {
8711
8719
  let e = parseInt(t, 10);
8712
8720
  if (e !== Buffer.byteLength(t) + 1) return s3;
8713
8721
  t = t.slice((e + " ").length);
@@ -8716,9 +8724,9 @@ var gn = (s3, t) => {
8716
8724
  let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
8717
8725
  return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
8718
8726
  };
8719
- var bn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
8720
- var f = bn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
8721
- var Yt = class extends A {
8727
+ var _n = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
8728
+ var f = _n !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
8729
+ var Ve = class extends A {
8722
8730
  extended;
8723
8731
  globalExtended;
8724
8732
  header;
@@ -8785,42 +8793,42 @@ var Yt = class extends A {
8785
8793
  var Nt = (s3, t, e, i = {}) => {
8786
8794
  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));
8787
8795
  };
8788
- var On = 1024 * 1024;
8789
- var Ki = Buffer.from([31, 139]);
8790
- var Vi = Buffer.from([40, 181, 47, 253]);
8791
- var Tn = Math.max(Ki.length, Vi.length);
8796
+ var Tn = 1024 * 1024;
8797
+ var Vi = Buffer.from([31, 139]);
8798
+ var $i = Buffer.from([40, 181, 47, 253]);
8799
+ var xn = Math.max(Vi.length, $i.length);
8792
8800
  var B = /* @__PURE__ */ Symbol("state");
8793
8801
  var Dt = /* @__PURE__ */ Symbol("writeEntry");
8794
8802
  var et = /* @__PURE__ */ Symbol("readEntry");
8795
- var Wi = /* @__PURE__ */ Symbol("nextEntry");
8796
- var Hs = /* @__PURE__ */ Symbol("processEntry");
8803
+ var Gi = /* @__PURE__ */ Symbol("nextEntry");
8804
+ var Ws = /* @__PURE__ */ Symbol("processEntry");
8797
8805
  var V = /* @__PURE__ */ Symbol("extendedHeader");
8798
- var ae = /* @__PURE__ */ Symbol("globalExtendedHeader");
8806
+ var he = /* @__PURE__ */ Symbol("globalExtendedHeader");
8799
8807
  var ft = /* @__PURE__ */ Symbol("meta");
8800
- var Ws = /* @__PURE__ */ Symbol("emitMeta");
8808
+ var Gs = /* @__PURE__ */ Symbol("emitMeta");
8801
8809
  var p = /* @__PURE__ */ Symbol("buffer");
8802
8810
  var it = /* @__PURE__ */ Symbol("queue");
8803
8811
  var dt = /* @__PURE__ */ Symbol("ended");
8804
- var Gi = /* @__PURE__ */ Symbol("emittedEnd");
8812
+ var Zi = /* @__PURE__ */ Symbol("emittedEnd");
8805
8813
  var At = /* @__PURE__ */ Symbol("emit");
8806
8814
  var y = /* @__PURE__ */ Symbol("unzip");
8807
8815
  var $e = /* @__PURE__ */ Symbol("consumeChunk");
8808
8816
  var Xe = /* @__PURE__ */ Symbol("consumeChunkSub");
8809
- var Zi = /* @__PURE__ */ Symbol("consumeBody");
8810
- var Gs = /* @__PURE__ */ Symbol("consumeMeta");
8811
- var Zs = /* @__PURE__ */ Symbol("consumeHeader");
8812
- var le = /* @__PURE__ */ Symbol("consuming");
8813
- var Yi = /* @__PURE__ */ Symbol("bufferConcat");
8817
+ var Yi = /* @__PURE__ */ Symbol("consumeBody");
8818
+ var Zs = /* @__PURE__ */ Symbol("consumeMeta");
8819
+ var Ys = /* @__PURE__ */ Symbol("consumeHeader");
8820
+ var ae = /* @__PURE__ */ Symbol("consuming");
8821
+ var Ki = /* @__PURE__ */ Symbol("bufferConcat");
8814
8822
  var qe = /* @__PURE__ */ Symbol("maybeEnd");
8815
- var Kt = /* @__PURE__ */ Symbol("writing");
8823
+ var Yt = /* @__PURE__ */ Symbol("writing");
8816
8824
  var ut = /* @__PURE__ */ Symbol("aborted");
8817
8825
  var Qe = /* @__PURE__ */ Symbol("onDone");
8818
8826
  var It = /* @__PURE__ */ Symbol("sawValidEntry");
8819
8827
  var Je = /* @__PURE__ */ Symbol("sawNullBlock");
8820
8828
  var je = /* @__PURE__ */ Symbol("sawEOF");
8821
- var Ys = /* @__PURE__ */ Symbol("closeStream");
8822
- var xn = () => true;
8823
- var st = class extends _n {
8829
+ var Ks = /* @__PURE__ */ Symbol("closeStream");
8830
+ var Ln = () => true;
8831
+ var st = class extends On {
8824
8832
  file;
8825
8833
  strict;
8826
8834
  maxMetaEntrySize;
@@ -8836,35 +8844,35 @@ var st = class extends _n {
8836
8844
  [B] = "begin";
8837
8845
  [ft] = "";
8838
8846
  [V];
8839
- [ae];
8847
+ [he];
8840
8848
  [dt] = false;
8841
8849
  [y];
8842
8850
  [ut] = false;
8843
8851
  [It];
8844
8852
  [Je] = false;
8845
8853
  [je] = false;
8846
- [Kt] = false;
8847
- [le] = false;
8848
- [Gi] = false;
8854
+ [Yt] = false;
8855
+ [ae] = false;
8856
+ [Zi] = false;
8849
8857
  constructor(t = {}) {
8850
8858
  super(), this.file = t.file || "", this.on(Qe, () => {
8851
8859
  (this[B] === "begin" || this[It] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
8852
8860
  }), t.ondone ? this.on(Qe, t.ondone) : this.on(Qe, () => {
8853
8861
  this.emit("prefinish"), this.emit("finish"), this.emit("end");
8854
- }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || On, this.filter = typeof t.filter == "function" ? t.filter : xn;
8862
+ }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || Tn, this.filter = typeof t.filter == "function" ? t.filter : Ln;
8855
8863
  let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
8856
8864
  this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
8857
8865
  let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
8858
- 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);
8866
+ 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);
8859
8867
  }
8860
8868
  warn(t, e, i = {}) {
8861
8869
  Nt(this, t, e, i);
8862
8870
  }
8863
- [Zs](t, e) {
8871
+ [Ys](t, e) {
8864
8872
  this[It] === void 0 && (this[It] = false);
8865
8873
  let i;
8866
8874
  try {
8867
- i = new k(t, e, this[V], this[ae]);
8875
+ i = new C(t, e, this[V], this[he]);
8868
8876
  } catch (r) {
8869
8877
  return this.warn("TAR_ENTRY_INVALID", r);
8870
8878
  }
@@ -8876,59 +8884,59 @@ var st = class extends _n {
8876
8884
  if (/^(Symbolic)?Link$/.test(r) && !i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: i });
8877
8885
  else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
8878
8886
  else {
8879
- let n = this[Dt] = new Yt(i, this[V], this[ae]);
8887
+ let n = this[Dt] = new Ve(i, this[V], this[he]);
8880
8888
  if (!this[It]) if (n.remain) {
8881
8889
  let o = () => {
8882
8890
  n.invalid || (this[It] = true);
8883
8891
  };
8884
8892
  n.on("end", o);
8885
8893
  } else this[It] = true;
8886
- 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[Wi]())));
8894
+ 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]())));
8887
8895
  }
8888
8896
  }
8889
8897
  }
8890
- [Ys]() {
8898
+ [Ks]() {
8891
8899
  queueMicrotask(() => this.emit("close"));
8892
8900
  }
8893
- [Hs](t) {
8901
+ [Ws](t) {
8894
8902
  let e = true;
8895
8903
  if (!t) this[et] = void 0, e = false;
8896
8904
  else if (Array.isArray(t)) {
8897
8905
  let [i, ...r] = t;
8898
8906
  this.emit(i, ...r);
8899
- } else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Wi]()), e = false);
8907
+ } else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Gi]()), e = false);
8900
8908
  return e;
8901
8909
  }
8902
- [Wi]() {
8910
+ [Gi]() {
8903
8911
  do
8904
8912
  ;
8905
- while (this[Hs](this[it].shift()));
8913
+ while (this[Ws](this[it].shift()));
8906
8914
  if (this[it].length === 0) {
8907
8915
  let t = this[et];
8908
- !t || t.flowing || t.size === t.remain ? this[Kt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
8916
+ !t || t.flowing || t.size === t.remain ? this[Yt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
8909
8917
  }
8910
8918
  }
8911
- [Zi](t, e) {
8919
+ [Yi](t, e) {
8912
8920
  let i = this[Dt];
8913
8921
  if (!i) throw new Error("attempt to consume body without entry??");
8914
8922
  let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
8915
8923
  return i.write(n), i.blockRemain || (this[B] = "header", this[Dt] = void 0, i.end()), n.length;
8916
8924
  }
8917
- [Gs](t, e) {
8918
- let i = this[Dt], r = this[Zi](t, e);
8919
- return !this[Dt] && i && this[Ws](i), r;
8925
+ [Zs](t, e) {
8926
+ let i = this[Dt], r = this[Yi](t, e);
8927
+ return !this[Dt] && i && this[Gs](i), r;
8920
8928
  }
8921
8929
  [At](t, e, i) {
8922
8930
  this[it].length === 0 && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
8923
8931
  }
8924
- [Ws](t) {
8932
+ [Gs](t) {
8925
8933
  switch (this[At]("meta", this[ft]), t.type) {
8926
8934
  case "ExtendedHeader":
8927
8935
  case "OldExtendedHeader":
8928
8936
  this[V] = ct.parse(this[ft], this[V], false);
8929
8937
  break;
8930
8938
  case "GlobalExtendedHeader":
8931
- this[ae] = ct.parse(this[ft], this[ae], true);
8939
+ this[he] = ct.parse(this[ft], this[he], true);
8932
8940
  break;
8933
8941
  case "NextFileHasLongPath":
8934
8942
  case "OldGnuLongPath": {
@@ -8951,43 +8959,43 @@ var st = class extends _n {
8951
8959
  write(t, e, i) {
8952
8960
  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;
8953
8961
  if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
8954
- if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < Tn) return this[p] = t, i?.(), true;
8955
- for (let a = 0; this[y] === void 0 && a < Ki.length; a++) t[a] !== Ki[a] && (this[y] = false);
8962
+ if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < xn) return this[p] = t, i?.(), true;
8963
+ for (let h = 0; this[y] === void 0 && h < Vi.length; h++) t[h] !== Vi[h] && (this[y] = false);
8956
8964
  let o = false;
8957
8965
  if (this[y] === false && this.zstd !== false) {
8958
8966
  o = true;
8959
- for (let a = 0; a < Vi.length; a++) if (t[a] !== Vi[a]) {
8967
+ for (let h = 0; h < $i.length; h++) if (t[h] !== $i[h]) {
8960
8968
  o = false;
8961
8969
  break;
8962
8970
  }
8963
8971
  }
8964
- let h = this.brotli === void 0 && !o;
8965
- if (this[y] === false && h) if (t.length < 512) if (this[dt]) this.brotli = true;
8972
+ let a = this.brotli === void 0 && !o;
8973
+ if (this[y] === false && a) if (t.length < 512) if (this[dt]) this.brotli = true;
8966
8974
  else return this[p] = t, i?.(), true;
8967
8975
  else try {
8968
- new k(t.subarray(0, 512)), this.brotli = false;
8976
+ new C(t.subarray(0, 512)), this.brotli = false;
8969
8977
  } catch {
8970
8978
  this.brotli = true;
8971
8979
  }
8972
8980
  if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
8973
- let a = this[dt];
8974
- this[dt] = false, this[y] = this[y] === void 0 ? new Ue({}) : o ? new Ke({}) : new Ge({}), this[y].on("data", (c) => this[$e](c)), this[y].on("error", (c) => this.abort(c)), this[y].on("end", () => {
8981
+ let h = this[dt];
8982
+ 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", () => {
8975
8983
  this[dt] = true, this[$e]();
8976
- }), this[Kt] = true;
8977
- let l = !!this[y][a ? "end" : "write"](t);
8978
- return this[Kt] = false, i?.(), l;
8984
+ }), this[Yt] = true;
8985
+ let l = !!this[y][h ? "end" : "write"](t);
8986
+ return this[Yt] = false, i?.(), l;
8979
8987
  }
8980
8988
  }
8981
- this[Kt] = true, this[y] ? this[y].write(t) : this[$e](t), this[Kt] = false;
8989
+ this[Yt] = true, this[y] ? this[y].write(t) : this[$e](t), this[Yt] = false;
8982
8990
  let n = this[it].length > 0 ? false : this[et] ? this[et].flowing : true;
8983
8991
  return !n && this[it].length === 0 && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
8984
8992
  }
8985
- [Yi](t) {
8993
+ [Ki](t) {
8986
8994
  t && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
8987
8995
  }
8988
8996
  [qe]() {
8989
- if (this[dt] && !this[Gi] && !this[ut] && !this[le]) {
8990
- this[Gi] = true;
8997
+ if (this[dt] && !this[Zi] && !this[ut] && !this[ae]) {
8998
+ this[Zi] = true;
8991
8999
  let t = this[Dt];
8992
9000
  if (t && t.blockRemain) {
8993
9001
  let e = this[p] ? this[p].length : 0;
@@ -8997,11 +9005,11 @@ var st = class extends _n {
8997
9005
  }
8998
9006
  }
8999
9007
  [$e](t) {
9000
- if (this[le] && t) this[Yi](t);
9008
+ if (this[ae] && t) this[Ki](t);
9001
9009
  else if (!t && !this[p]) this[qe]();
9002
9010
  else if (t) {
9003
- if (this[le] = true, this[p]) {
9004
- this[Yi](t);
9011
+ if (this[ae] = true, this[p]) {
9012
+ this[Ki](t);
9005
9013
  let e = this[p];
9006
9014
  this[p] = void 0, this[Xe](e);
9007
9015
  } else this[Xe](t);
@@ -9009,7 +9017,7 @@ var st = class extends _n {
9009
9017
  let e = this[p];
9010
9018
  this[p] = void 0, this[Xe](e);
9011
9019
  }
9012
- this[le] = false;
9020
+ this[ae] = false;
9013
9021
  }
9014
9022
  (!this[p] || this[dt]) && this[qe]();
9015
9023
  }
@@ -9018,14 +9026,14 @@ var st = class extends _n {
9018
9026
  for (; e + 512 <= i && !this[ut] && !this[je]; ) switch (this[B]) {
9019
9027
  case "begin":
9020
9028
  case "header":
9021
- this[Zs](t, e), e += 512;
9029
+ this[Ys](t, e), e += 512;
9022
9030
  break;
9023
9031
  case "ignore":
9024
9032
  case "body":
9025
- e += this[Zi](t, e);
9033
+ e += this[Yi](t, e);
9026
9034
  break;
9027
9035
  case "meta":
9028
- e += this[Gs](t, e);
9036
+ e += this[Zs](t, e);
9029
9037
  break;
9030
9038
  default:
9031
9039
  throw new Error("invalid state: " + this[B]);
@@ -9041,100 +9049,100 @@ var mt = (s3) => {
9041
9049
  for (; t > -1 && s3.charAt(t) === "/"; ) e = t, t--;
9042
9050
  return e === -1 ? s3 : s3.slice(0, e);
9043
9051
  };
9044
- var Dn = (s3) => {
9052
+ var An = (s3) => {
9045
9053
  let t = s3.onReadEntry;
9046
9054
  s3.onReadEntry = t ? (e) => {
9047
9055
  t(e), e.resume();
9048
9056
  } : (e) => e.resume();
9049
9057
  };
9050
- var $i = (s3, t) => {
9058
+ var Xi = (s3, t) => {
9051
9059
  let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
9052
- let h = o || Nn(n).root || ".", a;
9053
- if (n === h) a = false;
9060
+ let a = o || Dn(n).root || ".", h;
9061
+ if (n === a) h = false;
9054
9062
  else {
9055
9063
  let l = e.get(n);
9056
- a = l !== void 0 ? l : r(Ln(n), h);
9064
+ h = l !== void 0 ? l : r(Nn(n), a);
9057
9065
  }
9058
- return e.set(n, a), a;
9066
+ return e.set(n, h), h;
9059
9067
  };
9060
9068
  s3.filter = i ? (n, o) => i(n, o) && r(mt(n)) : (n) => r(mt(n));
9061
9069
  };
9062
- var An = (s3) => {
9070
+ var In = (s3) => {
9063
9071
  let t = new st(s3), e = s3.file, i;
9064
9072
  try {
9065
- i = Vt.openSync(e, "r");
9066
- let r = Vt.fstatSync(i), n = s3.maxReadSize || 16 * 1024 * 1024;
9073
+ i = Kt.openSync(e, "r");
9074
+ let r = Kt.fstatSync(i), n = s3.maxReadSize || 16 * 1024 * 1024;
9067
9075
  if (r.size < n) {
9068
- let o = Buffer.allocUnsafe(r.size), h = Vt.readSync(i, o, 0, r.size, 0);
9069
- t.end(h === o.byteLength ? o : o.subarray(0, h));
9076
+ let o = Buffer.allocUnsafe(r.size), a = Kt.readSync(i, o, 0, r.size, 0);
9077
+ t.end(a === o.byteLength ? o : o.subarray(0, a));
9070
9078
  } else {
9071
- let o = 0, h = Buffer.allocUnsafe(n);
9079
+ let o = 0, a = Buffer.allocUnsafe(n);
9072
9080
  for (; o < r.size; ) {
9073
- let a = Vt.readSync(i, h, 0, n, o);
9074
- if (a === 0) break;
9075
- o += a, t.write(h.subarray(0, a));
9081
+ let h = Kt.readSync(i, a, 0, n, o);
9082
+ if (h === 0) break;
9083
+ o += h, t.write(a.subarray(0, h));
9076
9084
  }
9077
9085
  t.end();
9078
9086
  }
9079
9087
  } finally {
9080
9088
  if (typeof i == "number") try {
9081
- Vt.closeSync(i);
9089
+ Kt.closeSync(i);
9082
9090
  } catch {
9083
9091
  }
9084
9092
  }
9085
9093
  };
9086
- var In = (s3, t) => {
9094
+ var Fn = (s3, t) => {
9087
9095
  let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
9088
- return new Promise((o, h) => {
9089
- e.on("error", h), e.on("end", o), Vt.stat(r, (a, l) => {
9090
- if (a) h(a);
9096
+ return new Promise((o, a) => {
9097
+ e.on("error", a), e.on("end", o), Kt.stat(r, (h, l) => {
9098
+ if (h) a(h);
9091
9099
  else {
9092
9100
  let c = new _t(r, { readSize: i, size: l.size });
9093
- c.on("error", h), c.pipe(e);
9101
+ c.on("error", a), c.pipe(e);
9094
9102
  }
9095
9103
  });
9096
9104
  });
9097
9105
  };
9098
- var Ct = K(An, In, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
9099
- t?.length && $i(s3, t), s3.noResume || Dn(s3);
9106
+ var Ft = K(In, Fn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
9107
+ t?.length && Xi(s3, t), s3.noResume || An(s3);
9100
9108
  });
9101
- var Xi = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
9102
- var { isAbsolute: kn, parse: Ks } = Cn;
9103
- var ce = (s3) => {
9104
- let t = "", e = Ks(s3);
9109
+ 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);
9110
+ var { isAbsolute: kn, parse: Vs } = Cn;
9111
+ var le = (s3) => {
9112
+ let t = "", e = Vs(s3);
9105
9113
  for (; kn(s3) || e.root; ) {
9106
9114
  let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
9107
- s3 = s3.slice(i.length), t += i, e = Ks(s3);
9115
+ s3 = s3.slice(i.length), t += i, e = Vs(s3);
9108
9116
  }
9109
9117
  return [t, s3];
9110
9118
  };
9111
9119
  var ti = ["|", "<", ">", "?", ":"];
9112
- var qi = ti.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
9113
- var Fn = new Map(ti.map((s3, t) => [s3, qi[t]]));
9114
- var vn = new Map(qi.map((s3, t) => [s3, ti[t]]));
9115
- var Qi = (s3) => ti.reduce((t, e) => t.split(e).join(Fn.get(e)), s3);
9116
- var Vs = (s3) => qi.reduce((t, e) => t.split(e).join(vn.get(e)), s3);
9117
- var tr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
9118
- var Mn = 16 * 1024 * 1024;
9119
- var qs = /* @__PURE__ */ Symbol("process");
9120
- var Qs = /* @__PURE__ */ Symbol("file");
9121
- var Js = /* @__PURE__ */ Symbol("directory");
9122
- var ji = /* @__PURE__ */ Symbol("symlink");
9123
- var js = /* @__PURE__ */ Symbol("hardlink");
9124
- var fe = /* @__PURE__ */ Symbol("header");
9120
+ var Qi = ti.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
9121
+ var vn = new Map(ti.map((s3, t) => [s3, Qi[t]]));
9122
+ var Mn = new Map(Qi.map((s3, t) => [s3, ti[t]]));
9123
+ var Ji = (s3) => ti.reduce((t, e) => t.split(e).join(vn.get(e)), s3);
9124
+ var $s = (s3) => Qi.reduce((t, e) => t.split(e).join(Mn.get(e)), s3);
9125
+ var er = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
9126
+ var Bn = 16 * 1024 * 1024;
9127
+ var Qs = /* @__PURE__ */ Symbol("process");
9128
+ var Js = /* @__PURE__ */ Symbol("file");
9129
+ var js = /* @__PURE__ */ Symbol("directory");
9130
+ var ts = /* @__PURE__ */ Symbol("symlink");
9131
+ var tr = /* @__PURE__ */ Symbol("hardlink");
9132
+ var ce = /* @__PURE__ */ Symbol("header");
9125
9133
  var ei = /* @__PURE__ */ Symbol("read");
9126
- var ts = /* @__PURE__ */ Symbol("lstat");
9134
+ var es = /* @__PURE__ */ Symbol("lstat");
9127
9135
  var ii = /* @__PURE__ */ Symbol("onlstat");
9128
- var es = /* @__PURE__ */ Symbol("onread");
9129
- var is = /* @__PURE__ */ Symbol("onreadlink");
9130
- var ss = /* @__PURE__ */ Symbol("openfile");
9131
- var rs = /* @__PURE__ */ Symbol("onopenfile");
9136
+ var is = /* @__PURE__ */ Symbol("onread");
9137
+ var ss = /* @__PURE__ */ Symbol("onreadlink");
9138
+ var rs = /* @__PURE__ */ Symbol("openfile");
9139
+ var ns = /* @__PURE__ */ Symbol("onopenfile");
9132
9140
  var pt = /* @__PURE__ */ Symbol("close");
9133
9141
  var si = /* @__PURE__ */ Symbol("mode");
9134
- var ns = /* @__PURE__ */ Symbol("awaitDrain");
9135
- var Ji = /* @__PURE__ */ Symbol("ondrain");
9142
+ var os = /* @__PURE__ */ Symbol("awaitDrain");
9143
+ var ji = /* @__PURE__ */ Symbol("ondrain");
9136
9144
  var X = /* @__PURE__ */ Symbol("prefix");
9137
- var de = class extends A {
9145
+ var fe = class extends A {
9138
9146
  path;
9139
9147
  portable;
9140
9148
  myuid = process.getuid && process.getuid() || 0;
@@ -9166,16 +9174,16 @@ var de = class extends A {
9166
9174
  onWriteEntry;
9167
9175
  #t = false;
9168
9176
  constructor(t, e = {}) {
9169
- let i = re(e);
9170
- super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || Mn, 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);
9177
+ let i = se(e);
9178
+ 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);
9171
9179
  let r = false;
9172
9180
  if (!this.preservePaths) {
9173
- let [o, h] = ce(this.path);
9174
- o && typeof h == "string" && (this.path = h, r = o);
9181
+ let [o, a] = le(this.path);
9182
+ o && typeof a == "string" && (this.path = a, r = o);
9175
9183
  }
9176
- this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Vs(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || Xs.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 });
9184
+ 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 || qs.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 });
9177
9185
  let n = this.statCache.get(this.absolute);
9178
- n ? this[ii](n) : this[ts]();
9186
+ n ? this[ii](n) : this[es]();
9179
9187
  }
9180
9188
  warn(t, e, i = {}) {
9181
9189
  return Nt(this, t, e, i);
@@ -9183,74 +9191,74 @@ var de = class extends A {
9183
9191
  emit(t, ...e) {
9184
9192
  return t === "error" && (this.#t = true), super.emit(t, ...e);
9185
9193
  }
9186
- [ts]() {
9194
+ [es]() {
9187
9195
  $.lstat(this.absolute, (t, e) => {
9188
9196
  if (t) return this.emit("error", t);
9189
9197
  this[ii](e);
9190
9198
  });
9191
9199
  }
9192
9200
  [ii](t) {
9193
- this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Bn(t), this.emit("stat", t), this[qs]();
9201
+ this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Pn(t), this.emit("stat", t), this[Qs]();
9194
9202
  }
9195
- [qs]() {
9203
+ [Qs]() {
9196
9204
  switch (this.type) {
9197
9205
  case "File":
9198
- return this[Qs]();
9199
- case "Directory":
9200
9206
  return this[Js]();
9207
+ case "Directory":
9208
+ return this[js]();
9201
9209
  case "SymbolicLink":
9202
- return this[ji]();
9210
+ return this[ts]();
9203
9211
  default:
9204
9212
  return this.end();
9205
9213
  }
9206
9214
  }
9207
9215
  [si](t) {
9208
- return Xi(t, this.type === "Directory", this.portable);
9216
+ return qi(t, this.type === "Directory", this.portable);
9209
9217
  }
9210
9218
  [X](t) {
9211
- return tr(t, this.prefix);
9219
+ return er(t, this.prefix);
9212
9220
  }
9213
- [fe]() {
9221
+ [ce]() {
9214
9222
  if (!this.stat) throw new Error("cannot write header before stat");
9215
- this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new k({ 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());
9223
+ 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());
9216
9224
  let t = this.header?.block;
9217
9225
  if (!t) throw new Error("failed to encode header");
9218
9226
  super.write(t);
9219
9227
  }
9220
- [Js]() {
9228
+ [js]() {
9221
9229
  if (!this.stat) throw new Error("cannot create directory entry without stat");
9222
- this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
9230
+ this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[ce](), this.end();
9223
9231
  }
9224
- [ji]() {
9232
+ [ts]() {
9225
9233
  $.readlink(this.absolute, (t, e) => {
9226
9234
  if (t) return this.emit("error", t);
9227
- this[is](e);
9235
+ this[ss](e);
9228
9236
  });
9229
9237
  }
9230
- [is](t) {
9231
- this.linkpath = f(t), this[fe](), this.end();
9238
+ [ss](t) {
9239
+ this.linkpath = f(t), this[ce](), this.end();
9232
9240
  }
9233
- [js](t) {
9241
+ [tr](t) {
9234
9242
  if (!this.stat) throw new Error("cannot create link entry without stat");
9235
- this.type = "Link", this.linkpath = f(Xs.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
9243
+ this.type = "Link", this.linkpath = f(qs.relative(this.cwd, t)), this.stat.size = 0, this[ce](), this.end();
9236
9244
  }
9237
- [Qs]() {
9245
+ [Js]() {
9238
9246
  if (!this.stat) throw new Error("cannot create file entry without stat");
9239
9247
  if (this.stat.nlink > 1) {
9240
9248
  let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
9241
- if (e?.indexOf(this.cwd) === 0) return this[js](e);
9249
+ if (e?.indexOf(this.cwd) === 0) return this[tr](e);
9242
9250
  this.linkCache.set(t, this.absolute);
9243
9251
  }
9244
- if (this[fe](), this.stat.size === 0) return this.end();
9245
- this[ss]();
9252
+ if (this[ce](), this.stat.size === 0) return this.end();
9253
+ this[rs]();
9246
9254
  }
9247
- [ss]() {
9255
+ [rs]() {
9248
9256
  $.open(this.absolute, "r", (t, e) => {
9249
9257
  if (t) return this.emit("error", t);
9250
- this[rs](e);
9258
+ this[ns](e);
9251
9259
  });
9252
9260
  }
9253
- [rs](t) {
9261
+ [ns](t) {
9254
9262
  if (this.fd = t, this.#t) return this[pt]();
9255
9263
  if (!this.stat) throw new Error("should stat before calling onopenfile");
9256
9264
  this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
@@ -9260,16 +9268,16 @@ var de = class extends A {
9260
9268
  [ei]() {
9261
9269
  let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
9262
9270
  if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
9263
- $.read(t, e, i, r, n, (o, h) => {
9271
+ $.read(t, e, i, r, n, (o, a) => {
9264
9272
  if (o) return this[pt](() => this.emit("error", o));
9265
- this[es](h);
9273
+ this[is](a);
9266
9274
  });
9267
9275
  }
9268
9276
  [pt](t = () => {
9269
9277
  }) {
9270
9278
  this.fd !== void 0 && $.close(this.fd, t);
9271
9279
  }
9272
- [es](t) {
9280
+ [is](t) {
9273
9281
  if (t <= 0 && this.remain > 0) {
9274
9282
  let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
9275
9283
  return this[pt](() => this.emit("error", r));
@@ -9281,9 +9289,9 @@ var de = class extends A {
9281
9289
  if (!this.buf) throw new Error("should have created buffer prior to reading");
9282
9290
  if (t === this.remain) for (let r = t; r < this.length && t < this.blockRemain; r++) this.buf[r + this.offset] = 0, t++, this.remain++;
9283
9291
  let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
9284
- this.write(e) ? this[Ji]() : this[ns](() => this[Ji]());
9292
+ this.write(e) ? this[ji]() : this[os](() => this[ji]());
9285
9293
  }
9286
- [ns](t) {
9294
+ [os](t) {
9287
9295
  this.once("drain", t);
9288
9296
  }
9289
9297
  write(t, e, i) {
@@ -9293,30 +9301,30 @@ var de = class extends A {
9293
9301
  }
9294
9302
  return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
9295
9303
  }
9296
- [Ji]() {
9304
+ [ji]() {
9297
9305
  if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
9298
9306
  if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
9299
9307
  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]();
9300
9308
  }
9301
9309
  };
9302
- var ri = class extends de {
9310
+ var ri = class extends fe {
9303
9311
  sync = true;
9304
- [ts]() {
9312
+ [es]() {
9305
9313
  this[ii]($.lstatSync(this.absolute));
9306
9314
  }
9307
- [ji]() {
9308
- this[is]($.readlinkSync(this.absolute));
9315
+ [ts]() {
9316
+ this[ss]($.readlinkSync(this.absolute));
9309
9317
  }
9310
- [ss]() {
9311
- this[rs]($.openSync(this.absolute, "r"));
9318
+ [rs]() {
9319
+ this[ns]($.openSync(this.absolute, "r"));
9312
9320
  }
9313
9321
  [ei]() {
9314
9322
  let t = true;
9315
9323
  try {
9316
9324
  let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
9317
9325
  if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
9318
- let h = $.readSync(e, i, r, n, o);
9319
- this[es](h), t = false;
9326
+ let a = $.readSync(e, i, r, n, o);
9327
+ this[is](a), t = false;
9320
9328
  } finally {
9321
9329
  if (t) try {
9322
9330
  this[pt](() => {
@@ -9325,7 +9333,7 @@ var ri = class extends de {
9325
9333
  }
9326
9334
  }
9327
9335
  }
9328
- [ns](t) {
9336
+ [os](t) {
9329
9337
  t();
9330
9338
  }
9331
9339
  [pt](t = () => {
@@ -9365,26 +9373,26 @@ var ni = class extends A {
9365
9373
  return Nt(this, t, e, i);
9366
9374
  }
9367
9375
  constructor(t, e = {}) {
9368
- let i = re(e);
9376
+ let i = se(e);
9369
9377
  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;
9370
9378
  let { type: r } = t;
9371
9379
  if (r === "Unsupported") throw new Error("writing entry that should be ignored");
9372
9380
  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);
9373
9381
  let n = false;
9374
9382
  if (!this.preservePaths) {
9375
- let [h, a] = ce(this.path);
9376
- h && typeof a == "string" && (this.path = a, n = h);
9383
+ let [a, h] = le(this.path);
9384
+ a && typeof h == "string" && (this.path = h, n = a);
9377
9385
  }
9378
- this.remain = t.size, this.blockRemain = t.startBlockSize, this.onWriteEntry?.(this), this.header = new k({ 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());
9386
+ 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());
9379
9387
  let o = this.header?.block;
9380
9388
  if (!o) throw new Error("failed to encode header");
9381
9389
  super.write(o), t.pipe(this);
9382
9390
  }
9383
9391
  [X](t) {
9384
- return tr(t, this.prefix);
9392
+ return er(t, this.prefix);
9385
9393
  }
9386
9394
  [si](t) {
9387
- return Xi(t, this.type === "Directory", this.portable);
9395
+ return qi(t, this.type === "Directory", this.portable);
9388
9396
  }
9389
9397
  write(t, e, i) {
9390
9398
  typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
@@ -9396,7 +9404,7 @@ var ni = class extends A {
9396
9404
  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;
9397
9405
  }
9398
9406
  };
9399
- var Bn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
9407
+ var Pn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
9400
9408
  var oi = class s2 {
9401
9409
  tail;
9402
9410
  head;
@@ -9428,11 +9436,11 @@ var oi = class s2 {
9428
9436
  t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
9429
9437
  }
9430
9438
  push(...t) {
9431
- for (let e = 0, i = t.length; e < i; e++) zn(this, t[e]);
9439
+ for (let e = 0, i = t.length; e < i; e++) Un(this, t[e]);
9432
9440
  return this.length;
9433
9441
  }
9434
9442
  unshift(...t) {
9435
- for (var e = 0, i = t.length; e < i; e++) Un(this, t[e]);
9443
+ for (var e = 0, i = t.length; e < i; e++) Hn(this, t[e]);
9436
9444
  return this.length;
9437
9445
  }
9438
9446
  pop() {
@@ -9528,7 +9536,7 @@ var oi = class s2 {
9528
9536
  let n = [];
9529
9537
  for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
9530
9538
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
9531
- for (let o of i) r = Pn(this, r, o);
9539
+ for (let o of i) r = zn(this, r, o);
9532
9540
  return n;
9533
9541
  }
9534
9542
  reverse() {
@@ -9540,17 +9548,17 @@ var oi = class s2 {
9540
9548
  return this.head = e, this.tail = t, this;
9541
9549
  }
9542
9550
  };
9543
- function Pn(s3, t, e) {
9544
- let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
9551
+ function zn(s3, t, e) {
9552
+ let i = t, r = t ? t.next : s3.head, n = new de(e, i, r, s3);
9545
9553
  return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
9546
9554
  }
9547
- function zn(s3, t) {
9548
- s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
9549
- }
9550
9555
  function Un(s3, t) {
9551
- s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
9556
+ s3.tail = new de(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
9557
+ }
9558
+ function Hn(s3, t) {
9559
+ s3.head = new de(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
9552
9560
  }
9553
- var ue = class {
9561
+ var de = class {
9554
9562
  list;
9555
9563
  next;
9556
9564
  prev;
@@ -9573,28 +9581,28 @@ var mi = class {
9573
9581
  this.path = t || "./", this.absolute = e;
9574
9582
  }
9575
9583
  };
9576
- var er = Buffer.alloc(1024);
9584
+ var ir = Buffer.alloc(1024);
9577
9585
  var ai = /* @__PURE__ */ Symbol("onStat");
9578
- var me = /* @__PURE__ */ Symbol("ended");
9586
+ var ue = /* @__PURE__ */ Symbol("ended");
9579
9587
  var W = /* @__PURE__ */ Symbol("queue");
9580
- var pe = /* @__PURE__ */ Symbol("queue");
9588
+ var me = /* @__PURE__ */ Symbol("pendingLinks");
9581
9589
  var Et = /* @__PURE__ */ Symbol("current");
9582
- var kt = /* @__PURE__ */ Symbol("process");
9583
- var Ee = /* @__PURE__ */ Symbol("processing");
9590
+ var Ct = /* @__PURE__ */ Symbol("process");
9591
+ var pe = /* @__PURE__ */ Symbol("processing");
9584
9592
  var hi = /* @__PURE__ */ Symbol("processJob");
9585
9593
  var G = /* @__PURE__ */ Symbol("jobs");
9586
- var os = /* @__PURE__ */ Symbol("jobDone");
9594
+ var hs = /* @__PURE__ */ Symbol("jobDone");
9587
9595
  var li = /* @__PURE__ */ Symbol("addFSEntry");
9588
- var ir = /* @__PURE__ */ Symbol("addTarEntry");
9589
- var ls = /* @__PURE__ */ Symbol("stat");
9590
- var cs = /* @__PURE__ */ Symbol("readdir");
9596
+ var sr = /* @__PURE__ */ Symbol("addTarEntry");
9597
+ var cs = /* @__PURE__ */ Symbol("stat");
9598
+ var fs2 = /* @__PURE__ */ Symbol("readdir");
9591
9599
  var ci = /* @__PURE__ */ Symbol("onreaddir");
9592
9600
  var fi = /* @__PURE__ */ Symbol("pipe");
9593
- var sr = /* @__PURE__ */ Symbol("entry");
9594
- var hs = /* @__PURE__ */ Symbol("entryOpt");
9601
+ var rr = /* @__PURE__ */ Symbol("entry");
9602
+ var as = /* @__PURE__ */ Symbol("entryOpt");
9595
9603
  var di = /* @__PURE__ */ Symbol("writeEntryClass");
9596
- var nr = /* @__PURE__ */ Symbol("write");
9597
- var as = /* @__PURE__ */ Symbol("ondrain");
9604
+ var or = /* @__PURE__ */ Symbol("write");
9605
+ var ls = /* @__PURE__ */ Symbol("ondrain");
9598
9606
  var wt = class extends A {
9599
9607
  sync = false;
9600
9608
  opt;
@@ -9619,46 +9627,46 @@ var wt = class extends A {
9619
9627
  [di];
9620
9628
  onWriteEntry;
9621
9629
  [W];
9622
- [pe] = /* @__PURE__ */ new Map();
9630
+ [me] = /* @__PURE__ */ new Map();
9623
9631
  [G] = 0;
9624
- [Ee] = false;
9625
- [me] = false;
9632
+ [pe] = false;
9633
+ [ue] = false;
9626
9634
  constructor(t = {}) {
9627
- 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] = de, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
9635
+ 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) {
9628
9636
  if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
9629
- if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new ze(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new We(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ye(t.zstd)), !this.zip) throw new Error("impossible");
9637
+ 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");
9630
9638
  let e = this.zip;
9631
- e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[as]()), this.on("resume", () => e.resume());
9632
- } else this.on("drain", this[as]);
9633
- 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[Ee] = false, this[me] = false;
9639
+ e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[ls]()), this.on("resume", () => e.resume());
9640
+ } else this.on("drain", this[ls]);
9641
+ 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;
9634
9642
  }
9635
- [nr](t) {
9643
+ [or](t) {
9636
9644
  return super.write(t);
9637
9645
  }
9638
9646
  add(t) {
9639
9647
  return this.write(t), this;
9640
9648
  }
9641
9649
  end(t, e, i) {
9642
- 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[kt](), i && i(), this;
9650
+ 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;
9643
9651
  }
9644
9652
  write(t) {
9645
- if (this[me]) throw new Error("write after end");
9646
- return t instanceof Yt ? this[ir](t) : this[li](t), this.flowing;
9653
+ if (this[ue]) throw new Error("write after end");
9654
+ return typeof t == "string" ? this[li](t) : this[sr](t), this.flowing;
9647
9655
  }
9648
- [ir](t) {
9649
- let e = f(rr.resolve(this.cwd, t.path));
9656
+ [sr](t) {
9657
+ let e = f(nr.resolve(this.cwd, t.path));
9650
9658
  if (!this.filter(t.path, t)) t.resume();
9651
9659
  else {
9652
9660
  let i = new mi(t.path, e);
9653
- i.entry = new ni(t, this[hs](i)), i.entry.on("end", () => this[os](i)), this[G] += 1, this[W].push(i);
9661
+ i.entry = new ni(t, this[as](i)), i.entry.on("end", () => this[hs](i)), this[G] += 1, this[W].push(i);
9654
9662
  }
9655
- this[kt]();
9663
+ this[Ct]();
9656
9664
  }
9657
9665
  [li](t) {
9658
- let e = f(rr.resolve(this.cwd, t));
9659
- this[W].push(new mi(t, e)), this[kt]();
9666
+ let e = f(nr.resolve(this.cwd, t));
9667
+ this[W].push(new mi(t, e)), this[Ct]();
9660
9668
  }
9661
- [ls](t) {
9669
+ [cs](t) {
9662
9670
  t.pending = true, this[G] += 1;
9663
9671
  let e = this.follow ? "stat" : "lstat";
9664
9672
  ui[e](t.absolute, (i, r) => {
@@ -9669,44 +9677,44 @@ var wt = class extends A {
9669
9677
  if (this.statCache.set(t.absolute, e), t.stat = e, !this.filter(t.path, e)) t.ignore = true;
9670
9678
  else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t === this[Et]) this[hi](t);
9671
9679
  else {
9672
- let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
9673
- r ? r.push(t) : this[pe].set(i, [t]), t.pendingLink = true, t.pending = true;
9680
+ let i = `${e.dev}:${e.ino}`, r = this[me].get(i);
9681
+ r ? r.push(t) : this[me].set(i, [t]), t.pendingLink = true, t.pending = true;
9674
9682
  }
9675
- this[kt]();
9683
+ this[Ct]();
9676
9684
  }
9677
- [cs](t) {
9685
+ [fs2](t) {
9678
9686
  t.pending = true, this[G] += 1, ui.readdir(t.absolute, (e, i) => {
9679
9687
  if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
9680
9688
  this[ci](t, i);
9681
9689
  });
9682
9690
  }
9683
9691
  [ci](t, e) {
9684
- this.readdirCache.set(t.absolute, e), t.readdir = e, this[kt]();
9692
+ this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ct]();
9685
9693
  }
9686
- [kt]() {
9687
- if (!this[Ee]) {
9688
- this[Ee] = true;
9694
+ [Ct]() {
9695
+ if (!this[pe]) {
9696
+ this[pe] = true;
9689
9697
  for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[hi](t.value), t.value.ignore) {
9690
9698
  let e = t.next;
9691
9699
  this[W].removeNode(t), t.next = e;
9692
9700
  }
9693
- this[Ee] = false, this[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(er) : (super.write(er), super.end()));
9701
+ this[pe] = false, this[ue] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(ir) : (super.write(ir), super.end()));
9694
9702
  }
9695
9703
  }
9696
9704
  get [Et]() {
9697
9705
  return this[W] && this[W].head && this[W].head.value;
9698
9706
  }
9699
- [os](t) {
9707
+ [hs](t) {
9700
9708
  this[W].shift(), this[G] -= 1;
9701
9709
  let { stat: e } = t;
9702
9710
  if (e && e.isFile() && e.nlink > 1) {
9703
- let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
9711
+ let i = `${e.dev}:${e.ino}`, r = this[me].get(i);
9704
9712
  if (r) {
9705
- this[pe].delete(i);
9713
+ this[me].delete(i);
9706
9714
  for (let n of r) n.pending = false, this[hi](n);
9707
9715
  }
9708
9716
  }
9709
- this[kt]();
9717
+ this[Ct]();
9710
9718
  }
9711
9719
  [hi](t) {
9712
9720
  if (t.pending && t.pendingLink && t === this[Et] && (t.pending = false, t.pendingLink = false), !t.pending) {
@@ -9716,14 +9724,14 @@ var wt = class extends A {
9716
9724
  }
9717
9725
  if (!t.stat) {
9718
9726
  let e = this.statCache.get(t.absolute);
9719
- e ? this[ai](t, e) : this[ls](t);
9727
+ e ? this[ai](t, e) : this[cs](t);
9720
9728
  }
9721
9729
  if (t.stat && !t.ignore) {
9722
9730
  if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
9723
9731
  let e = this.readdirCache.get(t.absolute);
9724
- if (e ? this[ci](t, e) : this[cs](t), !t.readdir) return;
9732
+ if (e ? this[ci](t, e) : this[fs2](t), !t.readdir) return;
9725
9733
  }
9726
- if (t.entry = this[sr](t), !t.entry) {
9734
+ if (t.entry = this[rr](t), !t.entry) {
9727
9735
  t.ignore = true;
9728
9736
  return;
9729
9737
  }
@@ -9731,18 +9739,18 @@ var wt = class extends A {
9731
9739
  }
9732
9740
  }
9733
9741
  }
9734
- [hs](t) {
9742
+ [as](t) {
9735
9743
  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 };
9736
9744
  }
9737
- [sr](t) {
9745
+ [rr](t) {
9738
9746
  this[G] += 1;
9739
9747
  try {
9740
- return new this[di](t.path, this[hs](t)).on("end", () => this[os](t)).on("error", (i) => this.emit("error", i));
9748
+ return new this[di](t.path, this[as](t)).on("end", () => this[hs](t)).on("error", (i) => this.emit("error", i));
9741
9749
  } catch (e) {
9742
9750
  this.emit("error", e);
9743
9751
  }
9744
9752
  }
9745
- [as]() {
9753
+ [ls]() {
9746
9754
  this[Et] && this[Et].entry && this[Et].entry.resume();
9747
9755
  }
9748
9756
  [fi](t) {
@@ -9765,7 +9773,7 @@ var wt = class extends A {
9765
9773
  Nt(this, t, e, i);
9766
9774
  }
9767
9775
  };
9768
- var Ft = class extends wt {
9776
+ var kt = class extends wt {
9769
9777
  sync = true;
9770
9778
  constructor(t) {
9771
9779
  super(t), this[di] = ri;
@@ -9774,11 +9782,11 @@ var Ft = class extends wt {
9774
9782
  }
9775
9783
  resume() {
9776
9784
  }
9777
- [ls](t) {
9785
+ [cs](t) {
9778
9786
  let e = this.follow ? "statSync" : "lstatSync";
9779
9787
  this[ai](t, ui[e](t.absolute));
9780
9788
  }
9781
- [cs](t) {
9789
+ [fs2](t) {
9782
9790
  this[ci](t, ui.readdirSync(t.absolute));
9783
9791
  }
9784
9792
  [fi](t) {
@@ -9790,54 +9798,54 @@ var Ft = class extends wt {
9790
9798
  i ? e.on("data", (r) => {
9791
9799
  i.write(r);
9792
9800
  }) : e.on("data", (r) => {
9793
- super[nr](r);
9801
+ super[or](r);
9794
9802
  });
9795
9803
  }
9796
9804
  };
9797
- var Hn = (s3, t) => {
9798
- let e = new Ft(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
9799
- e.pipe(i), hr(e, t);
9800
- };
9801
9805
  var Wn = (s3, t) => {
9806
+ let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
9807
+ e.pipe(i), ar(e, t);
9808
+ };
9809
+ var Gn = (s3, t) => {
9802
9810
  let e = new wt(s3), i = new tt2(s3.file, { mode: s3.mode || 438 });
9803
9811
  e.pipe(i);
9804
9812
  let r = new Promise((n, o) => {
9805
9813
  i.on("error", o), i.on("close", n), e.on("error", o);
9806
9814
  });
9807
- return ar(e, t).catch((n) => e.emit("error", n)), r;
9815
+ return lr(e, t).catch((n) => e.emit("error", n)), r;
9808
9816
  };
9809
- var hr = (s3, t) => {
9817
+ var ar = (s3, t) => {
9810
9818
  t.forEach((e) => {
9811
- e.charAt(0) === "@" ? Ct({ file: or.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
9819
+ e.charAt(0) === "@" ? Ft({ file: hr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
9812
9820
  }), s3.end();
9813
9821
  };
9814
- var ar = async (s3, t) => {
9815
- for (let e of t) e.charAt(0) === "@" ? await Ct({ file: or.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
9822
+ var lr = async (s3, t) => {
9823
+ for (let e of t) e.charAt(0) === "@" ? await Ft({ file: hr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
9816
9824
  s3.add(i);
9817
9825
  } }) : s3.add(e);
9818
9826
  s3.end();
9819
9827
  };
9820
- var Gn = (s3, t) => {
9821
- let e = new Ft(s3);
9822
- return hr(e, t), e;
9823
- };
9824
9828
  var Zn = (s3, t) => {
9829
+ let e = new kt(s3);
9830
+ return ar(e, t), e;
9831
+ };
9832
+ var Yn = (s3, t) => {
9825
9833
  let e = new wt(s3);
9826
- return ar(e, t).catch((i) => e.emit("error", i)), e;
9834
+ return lr(e, t).catch((i) => e.emit("error", i)), e;
9827
9835
  };
9828
- var Yn = K(Hn, Wn, Gn, Zn, (s3, t) => {
9836
+ var Kn = K(Wn, Gn, Zn, Yn, (s3, t) => {
9829
9837
  if (!t?.length) throw new TypeError("no paths specified to add to archive");
9830
9838
  });
9831
- var Kn = process.env.__FAKE_PLATFORM__ || process.platform;
9832
- var dr = Kn === "win32";
9833
- var { O_CREAT: ur, O_NOFOLLOW: lr, O_TRUNC: mr, O_WRONLY: pr } = fr.constants;
9834
- var Er = Number(process.env.__FAKE_FS_O_FILENAME__) || fr.constants.UV_FS_O_FILEMAP || 0;
9835
- var Vn = dr && !!Er;
9836
- var $n = 512 * 1024;
9837
- var Xn = Er | mr | ur | pr;
9838
- var cr = !dr && typeof lr == "number" ? lr | mr | ur | pr : null;
9839
- var fs2 = cr !== null ? () => cr : Vn ? (s3) => s3 < $n ? Xn : "w" : () => "w";
9840
- var ds = (s3, t, e) => {
9839
+ var Vn = process.env.__FAKE_PLATFORM__ || process.platform;
9840
+ var ur = Vn === "win32";
9841
+ var { O_CREAT: mr, O_NOFOLLOW: cr, O_TRUNC: pr, O_WRONLY: Er } = dr.constants;
9842
+ var wr = Number(process.env.__FAKE_FS_O_FILENAME__) || dr.constants.UV_FS_O_FILEMAP || 0;
9843
+ var $n = ur && !!wr;
9844
+ var Xn = 512 * 1024;
9845
+ var qn = wr | pr | mr | Er;
9846
+ var fr = !ur && typeof cr == "number" ? cr | pr | mr | Er : null;
9847
+ var ds = fr !== null ? () => fr : $n ? (s3) => s3 < Xn ? qn : "w" : () => "w";
9848
+ var us = (s3, t, e) => {
9841
9849
  try {
9842
9850
  return Ei.lchownSync(s3, t, e);
9843
9851
  } catch (i) {
@@ -9849,50 +9857,50 @@ var pi = (s3, t, e, i) => {
9849
9857
  i(r && r?.code !== "ENOENT" ? r : null);
9850
9858
  });
9851
9859
  };
9852
- var qn = (s3, t, e, i, r) => {
9853
- if (t.isDirectory()) us(we.resolve(s3, t.name), e, i, (n) => {
9860
+ var Qn = (s3, t, e, i, r) => {
9861
+ if (t.isDirectory()) ms(Ee.resolve(s3, t.name), e, i, (n) => {
9854
9862
  if (n) return r(n);
9855
- let o = we.resolve(s3, t.name);
9863
+ let o = Ee.resolve(s3, t.name);
9856
9864
  pi(o, e, i, r);
9857
9865
  });
9858
9866
  else {
9859
- let n = we.resolve(s3, t.name);
9867
+ let n = Ee.resolve(s3, t.name);
9860
9868
  pi(n, e, i, r);
9861
9869
  }
9862
9870
  };
9863
- var us = (s3, t, e, i) => {
9871
+ var ms = (s3, t, e, i) => {
9864
9872
  Ei.readdir(s3, { withFileTypes: true }, (r, n) => {
9865
9873
  if (r) {
9866
9874
  if (r.code === "ENOENT") return i();
9867
9875
  if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
9868
9876
  }
9869
9877
  if (r || !n.length) return pi(s3, t, e, i);
9870
- let o = n.length, h = null, a = (l) => {
9871
- if (!h) {
9872
- if (l) return i(h = l);
9878
+ let o = n.length, a = null, h = (l) => {
9879
+ if (!a) {
9880
+ if (l) return i(a = l);
9873
9881
  if (--o === 0) return pi(s3, t, e, i);
9874
9882
  }
9875
9883
  };
9876
- for (let l of n) qn(s3, l, t, e, a);
9884
+ for (let l of n) Qn(s3, l, t, e, h);
9877
9885
  });
9878
9886
  };
9879
- var Qn = (s3, t, e, i) => {
9880
- t.isDirectory() && ms(we.resolve(s3, t.name), e, i), ds(we.resolve(s3, t.name), e, i);
9887
+ var Jn = (s3, t, e, i) => {
9888
+ t.isDirectory() && ps(Ee.resolve(s3, t.name), e, i), us(Ee.resolve(s3, t.name), e, i);
9881
9889
  };
9882
- var ms = (s3, t, e) => {
9890
+ var ps = (s3, t, e) => {
9883
9891
  let i;
9884
9892
  try {
9885
9893
  i = Ei.readdirSync(s3, { withFileTypes: true });
9886
9894
  } catch (r) {
9887
9895
  let n = r;
9888
9896
  if (n?.code === "ENOENT") return;
9889
- if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return ds(s3, t, e);
9897
+ if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return us(s3, t, e);
9890
9898
  throw n;
9891
9899
  }
9892
- for (let r of i) Qn(s3, r, t, e);
9893
- return ds(s3, t, e);
9900
+ for (let r of i) Jn(s3, r, t, e);
9901
+ return us(s3, t, e);
9894
9902
  };
9895
- var Se = class extends Error {
9903
+ var we = class extends Error {
9896
9904
  path;
9897
9905
  code;
9898
9906
  syscall = "chdir";
@@ -9915,97 +9923,97 @@ var St = class extends Error {
9915
9923
  return "SymlinkError";
9916
9924
  }
9917
9925
  };
9918
- var jn = (s3, t) => {
9919
- F.stat(s3, (e, i) => {
9920
- (e || !i.isDirectory()) && (e = new Se(s3, e?.code || "ENOTDIR")), t(e);
9926
+ var to = (s3, t) => {
9927
+ k.stat(s3, (e, i) => {
9928
+ (e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
9921
9929
  });
9922
9930
  };
9923
- var wr = (s3, t, e) => {
9931
+ var Sr = (s3, t, e) => {
9924
9932
  s3 = f(s3);
9925
- 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) => {
9926
- E ? e(E) : x && a ? us(x, o, h, (Le) => S(Le)) : n ? F.chmod(s3, r, e) : e();
9933
+ 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) => {
9934
+ E ? e(E) : x && h ? ms(x, o, a, (xe) => S(xe)) : n ? k.chmod(s3, r, e) : e();
9927
9935
  };
9928
- if (s3 === d) return jn(s3, S);
9929
- if (l) return Jn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
9936
+ if (s3 === d) return to(s3, S);
9937
+ if (l) return jn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
9930
9938
  let N = f(wi.relative(d, s3)).split("/");
9931
- ps(d, N, r, c, d, void 0, S);
9939
+ Es(d, N, r, c, d, void 0, S);
9932
9940
  };
9933
- var ps = (s3, t, e, i, r, n, o) => {
9941
+ var Es = (s3, t, e, i, r, n, o) => {
9934
9942
  if (t.length === 0) return o(null, n);
9935
- let h = t.shift(), a = f(wi.resolve(s3 + "/" + h));
9936
- F.mkdir(a, e, Sr(a, t, e, i, r, n, o));
9943
+ let a = t.shift(), h = f(wi.resolve(s3 + "/" + a));
9944
+ k.mkdir(h, e, yr(h, t, e, i, r, n, o));
9937
9945
  };
9938
- var Sr = (s3, t, e, i, r, n, o) => (h) => {
9939
- h ? F.lstat(s3, (a, l) => {
9940
- if (a) a.path = a.path && f(a.path), o(a);
9941
- else if (l.isDirectory()) ps(s3, t, e, i, r, n, o);
9942
- else if (i) F.unlink(s3, (c) => {
9946
+ var yr = (s3, t, e, i, r, n, o) => (a) => {
9947
+ a ? k.lstat(s3, (h, l) => {
9948
+ if (h) h.path = h.path && f(h.path), o(h);
9949
+ else if (l.isDirectory()) Es(s3, t, e, i, r, n, o);
9950
+ else if (i) k.unlink(s3, (c) => {
9943
9951
  if (c) return o(c);
9944
- F.mkdir(s3, e, Sr(s3, t, e, i, r, n, o));
9952
+ k.mkdir(s3, e, yr(s3, t, e, i, r, n, o));
9945
9953
  });
9946
9954
  else {
9947
9955
  if (l.isSymbolicLink()) return o(new St(s3, s3 + "/" + t.join("/")));
9948
- o(h);
9956
+ o(a);
9949
9957
  }
9950
- }) : (n = n || s3, ps(s3, t, e, i, r, n, o));
9958
+ }) : (n = n || s3, Es(s3, t, e, i, r, n, o));
9951
9959
  };
9952
- var to = (s3) => {
9960
+ var eo = (s3) => {
9953
9961
  let t = false, e;
9954
9962
  try {
9955
- t = F.statSync(s3).isDirectory();
9963
+ t = k.statSync(s3).isDirectory();
9956
9964
  } catch (i) {
9957
9965
  e = i?.code;
9958
9966
  } finally {
9959
- if (!t) throw new Se(s3, e ?? "ENOTDIR");
9967
+ if (!t) throw new we(s3, e ?? "ENOTDIR");
9960
9968
  }
9961
9969
  };
9962
- var yr = (s3, t) => {
9970
+ var Rr = (s3, t) => {
9963
9971
  s3 = f(s3);
9964
- 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) => {
9965
- E && h && ms(E, n, o), r && F.chmodSync(s3, i);
9972
+ 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) => {
9973
+ E && a && ps(E, n, o), r && k.chmodSync(s3, i);
9966
9974
  };
9967
- if (s3 === c) return to(c), d();
9968
- if (a) return d(F.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
9975
+ if (s3 === c) return eo(c), d();
9976
+ if (h) return d(k.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
9969
9977
  let T = f(wi.relative(c, s3)).split("/"), N;
9970
9978
  for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
9971
9979
  x = f(wi.resolve(x));
9972
9980
  try {
9973
- F.mkdirSync(x, i), N = N || x;
9981
+ k.mkdirSync(x, i), N = N || x;
9974
9982
  } catch {
9975
- let Le = F.lstatSync(x);
9976
- if (Le.isDirectory()) continue;
9983
+ let xe = k.lstatSync(x);
9984
+ if (xe.isDirectory()) continue;
9977
9985
  if (l) {
9978
- F.unlinkSync(x), F.mkdirSync(x, i), N = N || x;
9986
+ k.unlinkSync(x), k.mkdirSync(x, i), N = N || x;
9979
9987
  continue;
9980
- } else if (Le.isSymbolicLink()) return new St(x, x + "/" + T.join("/"));
9988
+ } else if (xe.isSymbolicLink()) return new St(x, x + "/" + T.join("/"));
9981
9989
  }
9982
9990
  }
9983
9991
  return d(N);
9984
9992
  };
9985
- var Es = /* @__PURE__ */ Object.create(null);
9986
- var Rr = 1e4;
9987
- var $t = /* @__PURE__ */ new Set();
9988
- var gr = (s3) => {
9989
- $t.has(s3) ? $t.delete(s3) : Es[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
9990
- let t = Es[s3], e = $t.size - Rr;
9991
- if (e > Rr / 10) {
9992
- for (let i of $t) if ($t.delete(i), delete Es[i], --e <= 0) break;
9993
+ var ws = /* @__PURE__ */ Object.create(null);
9994
+ var gr = 1e4;
9995
+ var Vt = /* @__PURE__ */ new Set();
9996
+ var br = (s3) => {
9997
+ Vt.has(s3) ? Vt.delete(s3) : ws[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), Vt.add(s3);
9998
+ let t = ws[s3], e = Vt.size - gr;
9999
+ if (e > gr / 10) {
10000
+ for (let i of Vt) if (Vt.delete(i), delete ws[i], --e <= 0) break;
9993
10001
  }
9994
10002
  return t;
9995
10003
  };
9996
- var eo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
9997
- var io = eo === "win32";
9998
- var so = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
10004
+ var io = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
10005
+ var so = io === "win32";
10006
+ var ro = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
9999
10007
  let r = e.at(-1);
10000
- return r !== void 0 && (i = br(r, i)), e.push(i || "/"), e;
10008
+ return r !== void 0 && (i = _r(r, i)), e.push(i || "/"), e;
10001
10009
  }, []);
10002
10010
  var Si = class {
10003
10011
  #t = /* @__PURE__ */ new Map();
10004
10012
  #i = /* @__PURE__ */ new Map();
10005
10013
  #s = /* @__PURE__ */ new Set();
10006
10014
  reserve(t, e) {
10007
- t = io ? ["win32 parallelization disabled"] : t.map((r) => mt(br(gr(r))));
10008
- let i = new Set(t.map((r) => so(r)).reduce((r, n) => r.concat(n)));
10015
+ t = so ? ["win32 parallelization disabled"] : t.map((r) => mt(_r(br(r))));
10016
+ let i = new Set(t.map((r) => ro(r)).reduce((r, n) => r.concat(n)));
10009
10017
  this.#i.set(e, { dirs: i, paths: t });
10010
10018
  for (let r of t) {
10011
10019
  let n = this.#t.get(r);
@@ -10039,77 +10047,77 @@ var Si = class {
10039
10047
  if (!e) throw new Error("invalid reservation");
10040
10048
  let { paths: i, dirs: r } = e, n = /* @__PURE__ */ new Set();
10041
10049
  for (let o of i) {
10042
- let h = this.#t.get(o);
10043
- if (!h || h?.[0] !== t) continue;
10044
- let a = h[1];
10045
- if (!a) {
10050
+ let a = this.#t.get(o);
10051
+ if (!a || a?.[0] !== t) continue;
10052
+ let h = a[1];
10053
+ if (!h) {
10046
10054
  this.#t.delete(o);
10047
10055
  continue;
10048
10056
  }
10049
- if (h.shift(), typeof a == "function") n.add(a);
10050
- else for (let l of a) n.add(l);
10057
+ if (a.shift(), typeof h == "function") n.add(h);
10058
+ else for (let l of h) n.add(l);
10051
10059
  }
10052
10060
  for (let o of r) {
10053
- let h = this.#t.get(o), a = h?.[0];
10054
- if (!(!h || !(a instanceof Set))) if (a.size === 1 && h.length === 1) {
10061
+ let a = this.#t.get(o), h = a?.[0];
10062
+ if (!(!a || !(h instanceof Set))) if (h.size === 1 && a.length === 1) {
10055
10063
  this.#t.delete(o);
10056
10064
  continue;
10057
- } else if (a.size === 1) {
10058
- h.shift();
10059
- let l = h[0];
10065
+ } else if (h.size === 1) {
10066
+ a.shift();
10067
+ let l = a[0];
10060
10068
  typeof l == "function" && n.add(l);
10061
- } else a.delete(t);
10069
+ } else h.delete(t);
10062
10070
  }
10063
10071
  return this.#s.delete(t), n.forEach((o) => this.#r(o)), true;
10064
10072
  }
10065
10073
  };
10066
- var _r = () => process.umask();
10067
- var Or = /* @__PURE__ */ Symbol("onEntry");
10068
- var Rs = /* @__PURE__ */ Symbol("checkFs");
10069
- var Tr = /* @__PURE__ */ Symbol("checkFs2");
10070
- var gs = /* @__PURE__ */ Symbol("isReusable");
10074
+ var Or = () => process.umask();
10075
+ var Tr = /* @__PURE__ */ Symbol("onEntry");
10076
+ var gs = /* @__PURE__ */ Symbol("checkFs");
10077
+ var xr = /* @__PURE__ */ Symbol("checkFs2");
10078
+ var bs = /* @__PURE__ */ Symbol("isReusable");
10071
10079
  var P = /* @__PURE__ */ Symbol("makeFs");
10072
- var bs = /* @__PURE__ */ Symbol("file");
10073
- var _s = /* @__PURE__ */ Symbol("directory");
10080
+ var _s = /* @__PURE__ */ Symbol("file");
10081
+ var Os = /* @__PURE__ */ Symbol("directory");
10074
10082
  var Ri = /* @__PURE__ */ Symbol("link");
10075
- var xr = /* @__PURE__ */ Symbol("symlink");
10076
- var Lr = /* @__PURE__ */ Symbol("hardlink");
10077
- var Re = /* @__PURE__ */ Symbol("ensureNoSymlink");
10078
- var Nr = /* @__PURE__ */ Symbol("unsupported");
10079
- var Dr = /* @__PURE__ */ Symbol("checkPath");
10080
- var ws = /* @__PURE__ */ Symbol("stripAbsolutePath");
10083
+ var Lr = /* @__PURE__ */ Symbol("symlink");
10084
+ var Nr = /* @__PURE__ */ Symbol("hardlink");
10085
+ var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
10086
+ var Dr = /* @__PURE__ */ Symbol("unsupported");
10087
+ var Ar = /* @__PURE__ */ Symbol("checkPath");
10088
+ var Ss = /* @__PURE__ */ Symbol("stripAbsolutePath");
10081
10089
  var yt = /* @__PURE__ */ Symbol("mkdir");
10082
10090
  var O = /* @__PURE__ */ Symbol("onError");
10083
10091
  var yi = /* @__PURE__ */ Symbol("pending");
10084
- var Ar = /* @__PURE__ */ Symbol("pend");
10085
- var Xt = /* @__PURE__ */ Symbol("unpend");
10086
- var Ss = /* @__PURE__ */ Symbol("ended");
10087
- var ys = /* @__PURE__ */ Symbol("maybeClose");
10088
- var Os = /* @__PURE__ */ Symbol("skip");
10089
- var ge = /* @__PURE__ */ Symbol("doChown");
10090
- var be = /* @__PURE__ */ Symbol("uid");
10091
- var _e = /* @__PURE__ */ Symbol("gid");
10092
- var Oe = /* @__PURE__ */ Symbol("checkedCwd");
10093
- var no = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
10094
- var Te = no === "win32";
10095
- var oo = 1024;
10096
- var ho = (s3, t) => {
10097
- if (!Te) return u.unlink(s3, t);
10092
+ var Ir = /* @__PURE__ */ Symbol("pend");
10093
+ var $t = /* @__PURE__ */ Symbol("unpend");
10094
+ var ys = /* @__PURE__ */ Symbol("ended");
10095
+ var Rs = /* @__PURE__ */ Symbol("maybeClose");
10096
+ var Ts = /* @__PURE__ */ Symbol("skip");
10097
+ var Re = /* @__PURE__ */ Symbol("doChown");
10098
+ var ge = /* @__PURE__ */ Symbol("uid");
10099
+ var be = /* @__PURE__ */ Symbol("gid");
10100
+ var _e = /* @__PURE__ */ Symbol("checkedCwd");
10101
+ var oo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
10102
+ var Oe = oo === "win32";
10103
+ var ho = 1024;
10104
+ var ao = (s3, t) => {
10105
+ if (!Oe) return u.unlink(s3, t);
10098
10106
  let e = s3 + ".DELETE." + Cr(16).toString("hex");
10099
10107
  u.rename(s3, e, (i) => {
10100
10108
  if (i) return t(i);
10101
10109
  u.unlink(e, t);
10102
10110
  });
10103
10111
  };
10104
- var ao = (s3) => {
10105
- if (!Te) return u.unlinkSync(s3);
10112
+ var lo = (s3) => {
10113
+ if (!Oe) return u.unlinkSync(s3);
10106
10114
  let t = s3 + ".DELETE." + Cr(16).toString("hex");
10107
10115
  u.renameSync(s3, t), u.unlinkSync(t);
10108
10116
  };
10109
- var Ir = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
10110
- var qt = class extends st {
10111
- [Ss] = false;
10112
- [Oe] = false;
10117
+ var Fr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
10118
+ var Xt = class extends st {
10119
+ [ys] = false;
10120
+ [_e] = false;
10113
10121
  [yi] = 0;
10114
10122
  reservations = new Si();
10115
10123
  transform;
@@ -10138,32 +10146,32 @@ var qt = class extends st {
10138
10146
  chmod;
10139
10147
  constructor(t = {}) {
10140
10148
  if (t.ondone = () => {
10141
- this[Ss] = true, this[ys]();
10149
+ this[ys] = true, this[Rs]();
10142
10150
  }, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
10143
10151
  if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
10144
10152
  if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
10145
10153
  this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
10146
10154
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
10147
- 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 : oo, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Te, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(R.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : _r() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[Or](e));
10155
+ 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(R.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));
10148
10156
  }
10149
10157
  warn(t, e, i = {}) {
10150
10158
  return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
10151
10159
  }
10152
- [ys]() {
10153
- this[Ss] && this[yi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
10160
+ [Rs]() {
10161
+ this[ys] && this[yi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
10154
10162
  }
10155
- [ws](t, e) {
10163
+ [Ss](t, e) {
10156
10164
  let i = t[e], { type: r } = t;
10157
10165
  if (!i || this.preservePaths) return true;
10158
- let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
10159
- if (h.includes("..") || Te && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
10166
+ let [n, o] = le(i), a = o.replaceAll(/\\/g, "/").split("/");
10167
+ if (a.includes("..") || Oe && /^[a-z]:\.\.$/i.test(a[0] ?? "")) {
10160
10168
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
10161
- let a = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(a, h.join("/")));
10169
+ let h = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(h, a.join("/")));
10162
10170
  if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
10163
10171
  }
10164
10172
  return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
10165
10173
  }
10166
- [Dr](t) {
10174
+ [Ar](t) {
10167
10175
  let e = f(t.path), i = e.split("/");
10168
10176
  if (this.strip) {
10169
10177
  if (i.length < this.strip) return false;
@@ -10175,20 +10183,20 @@ var qt = class extends st {
10175
10183
  i.splice(0, this.strip), t.path = i.join("/");
10176
10184
  }
10177
10185
  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;
10178
- if (!this[ws](t, "path") || !this[ws](t, "linkpath")) return false;
10186
+ if (!this[Ss](t, "path") || !this[Ss](t, "linkpath")) return false;
10179
10187
  if (t.absolute = R.isAbsolute(t.path) ? f(R.resolve(t.path)) : f(R.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
10180
10188
  if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
10181
10189
  if (this.win32) {
10182
10190
  let { root: r } = R.win32.parse(String(t.absolute));
10183
- t.absolute = r + Qi(String(t.absolute).slice(r.length));
10191
+ t.absolute = r + Ji(String(t.absolute).slice(r.length));
10184
10192
  let { root: n } = R.win32.parse(t.path);
10185
- t.path = n + Qi(t.path.slice(n.length));
10193
+ t.path = n + Ji(t.path.slice(n.length));
10186
10194
  }
10187
10195
  return true;
10188
10196
  }
10189
- [Or](t) {
10190
- if (!this[Dr](t)) return t.resume();
10191
- switch (ro.equal(typeof t.absolute, "string"), t.type) {
10197
+ [Tr](t) {
10198
+ if (!this[Ar](t)) return t.resume();
10199
+ switch (no.equal(typeof t.absolute, "string"), t.type) {
10192
10200
  case "Directory":
10193
10201
  case "GNUDumpDir":
10194
10202
  t.mode && (t.mode = t.mode | 448);
@@ -10197,62 +10205,62 @@ var qt = class extends st {
10197
10205
  case "ContiguousFile":
10198
10206
  case "Link":
10199
10207
  case "SymbolicLink":
10200
- return this[Rs](t);
10208
+ return this[gs](t);
10201
10209
  default:
10202
- return this[Nr](t);
10210
+ return this[Dr](t);
10203
10211
  }
10204
10212
  }
10205
10213
  [O](t, e) {
10206
- t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
10214
+ t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[$t](), e.resume());
10207
10215
  }
10208
10216
  [yt](t, e, i) {
10209
- wr(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);
10217
+ 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);
10210
10218
  }
10211
- [ge](t) {
10219
+ [Re](t) {
10212
10220
  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;
10213
10221
  }
10214
- [be](t) {
10215
- return Ir(this.uid, t.uid, this.processUid);
10222
+ [ge](t) {
10223
+ return Fr(this.uid, t.uid, this.processUid);
10216
10224
  }
10217
- [_e](t) {
10218
- return Ir(this.gid, t.gid, this.processGid);
10225
+ [be](t) {
10226
+ return Fr(this.gid, t.gid, this.processGid);
10219
10227
  }
10220
- [bs](t, e) {
10221
- let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt2(String(t.absolute), { flags: fs2(t.size), mode: i, autoClose: false });
10222
- r.on("error", (a) => {
10228
+ [_s](t, e) {
10229
+ let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt2(String(t.absolute), { flags: ds(t.size), mode: i, autoClose: false });
10230
+ r.on("error", (h) => {
10223
10231
  r.fd && u.close(r.fd, () => {
10224
- }), r.write = () => true, this[O](a, t), e();
10232
+ }), r.write = () => true, this[O](h, t), e();
10225
10233
  });
10226
- let n = 1, o = (a) => {
10227
- if (a) {
10234
+ let n = 1, o = (h) => {
10235
+ if (h) {
10228
10236
  r.fd && u.close(r.fd, () => {
10229
- }), this[O](a, t), e();
10237
+ }), this[O](h, t), e();
10230
10238
  return;
10231
10239
  }
10232
10240
  --n === 0 && r.fd !== void 0 && u.close(r.fd, (l) => {
10233
- l ? this[O](l, t) : this[Xt](), e();
10241
+ l ? this[O](l, t) : this[$t](), e();
10234
10242
  });
10235
10243
  };
10236
10244
  r.on("finish", () => {
10237
- let a = String(t.absolute), l = r.fd;
10245
+ let h = String(t.absolute), l = r.fd;
10238
10246
  if (typeof l == "number" && t.mtime && !this.noMtime) {
10239
10247
  n++;
10240
10248
  let c = t.atime || /* @__PURE__ */ new Date(), d = t.mtime;
10241
- u.futimes(l, c, d, (S) => S ? u.utimes(a, c, d, (T) => o(T && S)) : o());
10249
+ u.futimes(l, c, d, (S) => S ? u.utimes(h, c, d, (T) => o(T && S)) : o());
10242
10250
  }
10243
- if (typeof l == "number" && this[ge](t)) {
10251
+ if (typeof l == "number" && this[Re](t)) {
10244
10252
  n++;
10245
- let c = this[be](t), d = this[_e](t);
10246
- typeof c == "number" && typeof d == "number" && u.fchown(l, c, d, (S) => S ? u.chown(a, c, d, (T) => o(T && S)) : o());
10253
+ let c = this[ge](t), d = this[be](t);
10254
+ typeof c == "number" && typeof d == "number" && u.fchown(l, c, d, (S) => S ? u.chown(h, c, d, (T) => o(T && S)) : o());
10247
10255
  }
10248
10256
  o();
10249
10257
  });
10250
- let h = this.transform && this.transform(t) || t;
10251
- h !== t && (h.on("error", (a) => {
10252
- this[O](a, t), e();
10253
- }), t.pipe(h)), h.pipe(r);
10258
+ let a = this.transform && this.transform(t) || t;
10259
+ a !== t && (a.on("error", (h) => {
10260
+ this[O](h, t), e();
10261
+ }), t.pipe(a)), a.pipe(r);
10254
10262
  }
10255
- [_s](t, e) {
10263
+ [Os](t, e) {
10256
10264
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode;
10257
10265
  this[yt](String(t.absolute), i, (r) => {
10258
10266
  if (r) {
@@ -10260,70 +10268,70 @@ var qt = class extends st {
10260
10268
  return;
10261
10269
  }
10262
10270
  let n = 1, o = () => {
10263
- --n === 0 && (e(), this[Xt](), t.resume());
10271
+ --n === 0 && (e(), this[$t](), t.resume());
10264
10272
  };
10265
- t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[ge](t) && (n++, u.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
10273
+ t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, u.chown(String(t.absolute), Number(this[ge](t)), Number(this[be](t)), o)), o();
10266
10274
  });
10267
10275
  }
10268
- [Nr](t) {
10276
+ [Dr](t) {
10269
10277
  t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
10270
10278
  }
10271
- [xr](t, e) {
10279
+ [Lr](t, e) {
10272
10280
  let i = f(R.relative(this.cwd, R.resolve(R.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
10273
- this[Re](t, this.cwd, i, () => this[Ri](t, String(t.linkpath), "symlink", e), (r) => {
10281
+ this[ye](t, this.cwd, i, () => this[Ri](t, String(t.linkpath), "symlink", e), (r) => {
10274
10282
  this[O](r, t), e();
10275
10283
  });
10276
10284
  }
10277
- [Lr](t, e) {
10285
+ [Nr](t, e) {
10278
10286
  let i = f(R.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
10279
- this[Re](t, this.cwd, r, () => this[Ri](t, i, "link", e), (n) => {
10287
+ this[ye](t, this.cwd, r, () => this[Ri](t, i, "link", e), (n) => {
10280
10288
  this[O](n, t), e();
10281
10289
  });
10282
10290
  }
10283
- [Re](t, e, i, r, n) {
10291
+ [ye](t, e, i, r, n) {
10284
10292
  let o = i.shift();
10285
10293
  if (this.preservePaths || o === void 0) return r();
10286
- let h = R.resolve(e, o);
10287
- u.lstat(h, (a, l) => {
10288
- if (a) return r();
10289
- if (l?.isSymbolicLink()) return n(new St(h, R.resolve(h, i.join("/"))));
10290
- this[Re](t, h, i, r, n);
10294
+ let a = R.resolve(e, o);
10295
+ u.lstat(a, (h, l) => {
10296
+ if (h) return r();
10297
+ if (l?.isSymbolicLink()) return n(new St(a, R.resolve(a, i.join("/"))));
10298
+ this[ye](t, a, i, r, n);
10291
10299
  });
10292
10300
  }
10293
- [Ar]() {
10301
+ [Ir]() {
10294
10302
  this[yi]++;
10295
10303
  }
10296
- [Xt]() {
10297
- this[yi]--, this[ys]();
10304
+ [$t]() {
10305
+ this[yi]--, this[Rs]();
10298
10306
  }
10299
- [Os](t) {
10300
- this[Xt](), t.resume();
10307
+ [Ts](t) {
10308
+ this[$t](), t.resume();
10301
10309
  }
10302
- [gs](t, e) {
10303
- return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Te;
10310
+ [bs](t, e) {
10311
+ return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
10304
10312
  }
10305
- [Rs](t) {
10306
- this[Ar]();
10313
+ [gs](t) {
10314
+ this[Ir]();
10307
10315
  let e = [t.path];
10308
- t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Tr](t, i));
10316
+ t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[xr](t, i));
10309
10317
  }
10310
- [Tr](t, e) {
10311
- let i = (h) => {
10312
- e(h);
10318
+ [xr](t, e) {
10319
+ let i = (a) => {
10320
+ e(a);
10313
10321
  }, r = () => {
10314
- this[yt](this.cwd, this.dmode, (h) => {
10315
- if (h) {
10316
- this[O](h, t), i();
10322
+ this[yt](this.cwd, this.dmode, (a) => {
10323
+ if (a) {
10324
+ this[O](a, t), i();
10317
10325
  return;
10318
10326
  }
10319
- this[Oe] = true, n();
10327
+ this[_e] = true, n();
10320
10328
  });
10321
10329
  }, n = () => {
10322
10330
  if (t.absolute !== this.cwd) {
10323
- let h = f(R.dirname(String(t.absolute)));
10324
- if (h !== this.cwd) return this[yt](h, this.dmode, (a) => {
10325
- if (a) {
10326
- this[O](a, t), i();
10331
+ let a = f(R.dirname(String(t.absolute)));
10332
+ if (a !== this.cwd) return this[yt](a, this.dmode, (h) => {
10333
+ if (h) {
10334
+ this[O](h, t), i();
10327
10335
  return;
10328
10336
  }
10329
10337
  o();
@@ -10331,24 +10339,24 @@ var qt = class extends st {
10331
10339
  }
10332
10340
  o();
10333
10341
  }, o = () => {
10334
- u.lstat(String(t.absolute), (h, a) => {
10335
- if (a && (this.keep || this.newer && a.mtime > (t.mtime ?? a.mtime))) {
10336
- this[Os](t), i();
10342
+ u.lstat(String(t.absolute), (a, h) => {
10343
+ if (h && (this.keep || this.newer && h.mtime > (t.mtime ?? h.mtime))) {
10344
+ this[Ts](t), i();
10337
10345
  return;
10338
10346
  }
10339
- if (h || this[gs](t, a)) return this[P](null, t, i);
10340
- if (a.isDirectory()) {
10347
+ if (a || this[bs](t, h)) return this[P](null, t, i);
10348
+ if (h.isDirectory()) {
10341
10349
  if (t.type === "Directory") {
10342
- let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
10350
+ let l = this.chmod && t.mode && (h.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
10343
10351
  return l ? u.chmod(String(t.absolute), Number(t.mode), c) : c();
10344
10352
  }
10345
10353
  if (t.absolute !== this.cwd) return u.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
10346
10354
  }
10347
10355
  if (t.absolute === this.cwd) return this[P](null, t, i);
10348
- ho(String(t.absolute), (l) => this[P](l ?? null, t, i));
10356
+ ao(String(t.absolute), (l) => this[P](l ?? null, t, i));
10349
10357
  });
10350
10358
  };
10351
- this[Oe] ? n() : r();
10359
+ this[_e] ? n() : r();
10352
10360
  }
10353
10361
  [P](t, e, i) {
10354
10362
  if (t) {
@@ -10359,40 +10367,40 @@ var qt = class extends st {
10359
10367
  case "File":
10360
10368
  case "OldFile":
10361
10369
  case "ContiguousFile":
10362
- return this[bs](e, i);
10370
+ return this[_s](e, i);
10363
10371
  case "Link":
10364
- return this[Lr](e, i);
10372
+ return this[Nr](e, i);
10365
10373
  case "SymbolicLink":
10366
- return this[xr](e, i);
10374
+ return this[Lr](e, i);
10367
10375
  case "Directory":
10368
10376
  case "GNUDumpDir":
10369
- return this[_s](e, i);
10377
+ return this[Os](e, i);
10370
10378
  }
10371
10379
  }
10372
10380
  [Ri](t, e, i, r) {
10373
10381
  u[i](e, String(t.absolute), (n) => {
10374
- n ? this[O](n, t) : (this[Xt](), t.resume()), r();
10382
+ n ? this[O](n, t) : (this[$t](), t.resume()), r();
10375
10383
  });
10376
10384
  }
10377
10385
  };
10378
- var ye = (s3) => {
10386
+ var Se = (s3) => {
10379
10387
  try {
10380
10388
  return [null, s3()];
10381
10389
  } catch (t) {
10382
10390
  return [t, null];
10383
10391
  }
10384
10392
  };
10385
- var xe = class extends qt {
10393
+ var Te = class extends Xt {
10386
10394
  sync = true;
10387
10395
  [P](t, e) {
10388
10396
  return super[P](t, e, () => {
10389
10397
  });
10390
10398
  }
10391
- [Rs](t) {
10392
- if (!this[Oe]) {
10399
+ [gs](t) {
10400
+ if (!this[_e]) {
10393
10401
  let n = this[yt](this.cwd, this.dmode);
10394
10402
  if (n) return this[O](n, t);
10395
- this[Oe] = true;
10403
+ this[_e] = true;
10396
10404
  }
10397
10405
  if (t.absolute !== this.cwd) {
10398
10406
  let n = f(R.dirname(String(t.absolute)));
@@ -10401,74 +10409,74 @@ var xe = class extends qt {
10401
10409
  if (o) return this[O](o, t);
10402
10410
  }
10403
10411
  }
10404
- let [e, i] = ye(() => u.lstatSync(String(t.absolute)));
10405
- if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Os](t);
10406
- if (e || this[gs](t, i)) return this[P](null, t);
10412
+ let [e, i] = Se(() => u.lstatSync(String(t.absolute)));
10413
+ if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Ts](t);
10414
+ if (e || this[bs](t, i)) return this[P](null, t);
10407
10415
  if (i.isDirectory()) {
10408
10416
  if (t.type === "Directory") {
10409
- let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? ye(() => {
10417
+ let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [a] = o ? Se(() => {
10410
10418
  u.chmodSync(String(t.absolute), Number(t.mode));
10411
10419
  }) : [];
10412
- return this[P](h, t);
10420
+ return this[P](a, t);
10413
10421
  }
10414
- let [n] = ye(() => u.rmdirSync(String(t.absolute)));
10422
+ let [n] = Se(() => u.rmdirSync(String(t.absolute)));
10415
10423
  this[P](n, t);
10416
10424
  }
10417
- let [r] = t.absolute === this.cwd ? [] : ye(() => ao(String(t.absolute)));
10425
+ let [r] = t.absolute === this.cwd ? [] : Se(() => lo(String(t.absolute)));
10418
10426
  this[P](r, t);
10419
10427
  }
10420
- [bs](t, e) {
10421
- let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
10422
- let a;
10428
+ [_s](t, e) {
10429
+ let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (a) => {
10430
+ let h;
10423
10431
  try {
10424
10432
  u.closeSync(n);
10425
10433
  } catch (l) {
10426
- a = l;
10434
+ h = l;
10427
10435
  }
10428
- (h || a) && this[O](h || a, t), e();
10436
+ (a || h) && this[O](a || h, t), e();
10429
10437
  }, n;
10430
10438
  try {
10431
- n = u.openSync(String(t.absolute), fs2(t.size), i);
10432
- } catch (h) {
10433
- return r(h);
10439
+ n = u.openSync(String(t.absolute), ds(t.size), i);
10440
+ } catch (a) {
10441
+ return r(a);
10434
10442
  }
10435
10443
  let o = this.transform && this.transform(t) || t;
10436
- o !== t && (o.on("error", (h) => this[O](h, t)), t.pipe(o)), o.on("data", (h) => {
10444
+ o !== t && (o.on("error", (a) => this[O](a, t)), t.pipe(o)), o.on("data", (a) => {
10437
10445
  try {
10438
- u.writeSync(n, h, 0, h.length);
10439
- } catch (a) {
10440
- r(a);
10446
+ u.writeSync(n, a, 0, a.length);
10447
+ } catch (h) {
10448
+ r(h);
10441
10449
  }
10442
10450
  }), o.on("end", () => {
10443
- let h = null;
10451
+ let a = null;
10444
10452
  if (t.mtime && !this.noMtime) {
10445
- let a = t.atime || /* @__PURE__ */ new Date(), l = t.mtime;
10453
+ let h = t.atime || /* @__PURE__ */ new Date(), l = t.mtime;
10446
10454
  try {
10447
- u.futimesSync(n, a, l);
10455
+ u.futimesSync(n, h, l);
10448
10456
  } catch (c) {
10449
10457
  try {
10450
- u.utimesSync(String(t.absolute), a, l);
10458
+ u.utimesSync(String(t.absolute), h, l);
10451
10459
  } catch {
10452
- h = c;
10460
+ a = c;
10453
10461
  }
10454
10462
  }
10455
10463
  }
10456
- if (this[ge](t)) {
10457
- let a = this[be](t), l = this[_e](t);
10464
+ if (this[Re](t)) {
10465
+ let h = this[ge](t), l = this[be](t);
10458
10466
  try {
10459
- u.fchownSync(n, Number(a), Number(l));
10467
+ u.fchownSync(n, Number(h), Number(l));
10460
10468
  } catch (c) {
10461
10469
  try {
10462
- u.chownSync(String(t.absolute), Number(a), Number(l));
10470
+ u.chownSync(String(t.absolute), Number(h), Number(l));
10463
10471
  } catch {
10464
- h = h || c;
10472
+ a = a || c;
10465
10473
  }
10466
10474
  }
10467
10475
  }
10468
- r(h);
10476
+ r(a);
10469
10477
  });
10470
10478
  }
10471
- [_s](t, e) {
10479
+ [Os](t, e) {
10472
10480
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.dmode, r = this[yt](String(t.absolute), i);
10473
10481
  if (r) {
10474
10482
  this[O](r, t), e();
@@ -10478,26 +10486,26 @@ var xe = class extends qt {
10478
10486
  u.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
10479
10487
  } catch {
10480
10488
  }
10481
- if (this[ge](t)) try {
10482
- u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
10489
+ if (this[Re](t)) try {
10490
+ u.chownSync(String(t.absolute), Number(this[ge](t)), Number(this[be](t)));
10483
10491
  } catch {
10484
10492
  }
10485
10493
  e(), t.resume();
10486
10494
  }
10487
10495
  [yt](t, e) {
10488
10496
  try {
10489
- return yr(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 });
10497
+ 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 });
10490
10498
  } catch (i) {
10491
10499
  return i;
10492
10500
  }
10493
10501
  }
10494
- [Re](t, e, i, r, n) {
10502
+ [ye](t, e, i, r, n) {
10495
10503
  if (this.preservePaths || i.length === 0) return r();
10496
10504
  let o = e;
10497
- for (let h of i) {
10498
- o = R.resolve(o, h);
10499
- let [a, l] = ye(() => u.lstatSync(o));
10500
- if (a) return r();
10505
+ for (let a of i) {
10506
+ o = R.resolve(o, a);
10507
+ let [h, l] = Se(() => u.lstatSync(o));
10508
+ if (h) return r();
10501
10509
  if (l.isSymbolicLink()) return n(new St(o, R.resolve(e, i.join("/"))));
10502
10510
  }
10503
10511
  r();
@@ -10511,47 +10519,47 @@ var xe = class extends qt {
10511
10519
  }
10512
10520
  }
10513
10521
  };
10514
- var lo = (s3) => {
10515
- let t = new xe(s3), e = s3.file, i = kr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
10516
- new Be(e, { readSize: r, size: i.size }).pipe(t);
10522
+ var co = (s3) => {
10523
+ let t = new Te(s3), e = s3.file, i = kr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
10524
+ new Me(e, { readSize: r, size: i.size }).pipe(t);
10517
10525
  };
10518
- var co = (s3, t) => {
10519
- let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
10520
- return new Promise((o, h) => {
10521
- e.on("error", h), e.on("close", o), kr.stat(r, (a, l) => {
10522
- if (a) h(a);
10526
+ var fo = (s3, t) => {
10527
+ let e = new Xt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
10528
+ return new Promise((o, a) => {
10529
+ e.on("error", a), e.on("close", o), kr.stat(r, (h, l) => {
10530
+ if (h) a(h);
10523
10531
  else {
10524
10532
  let c = new _t(r, { readSize: i, size: l.size });
10525
- c.on("error", h), c.pipe(e);
10533
+ c.on("error", a), c.pipe(e);
10526
10534
  }
10527
10535
  });
10528
10536
  });
10529
10537
  };
10530
- var fo = K(lo, co, (s3) => new xe(s3), (s3) => new qt(s3), (s3, t) => {
10531
- t?.length && $i(s3, t);
10538
+ var uo = K(co, fo, (s3) => new Te(s3), (s3) => new Xt(s3), (s3, t) => {
10539
+ t?.length && Xi(s3, t);
10532
10540
  });
10533
- var uo = (s3, t) => {
10534
- let e = new Ft(s3), i = true, r, n;
10541
+ var mo = (s3, t) => {
10542
+ let e = new kt(s3), i = true, r, n;
10535
10543
  try {
10536
10544
  try {
10537
10545
  r = v.openSync(s3.file, "r+");
10538
- } catch (a) {
10539
- if (a?.code === "ENOENT") r = v.openSync(s3.file, "w+");
10540
- else throw a;
10546
+ } catch (h) {
10547
+ if (h?.code === "ENOENT") r = v.openSync(s3.file, "w+");
10548
+ else throw h;
10541
10549
  }
10542
- let o = v.fstatSync(r), h = Buffer.alloc(512);
10550
+ let o = v.fstatSync(r), a = Buffer.alloc(512);
10543
10551
  t: for (n = 0; n < o.size; n += 512) {
10544
10552
  for (let c = 0, d = 0; c < 512; c += d) {
10545
- if (d = v.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");
10553
+ if (d = v.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");
10546
10554
  if (!d) break t;
10547
10555
  }
10548
- let a = new k(h);
10549
- if (!a.cksumValid) break;
10550
- let l = 512 * Math.ceil((a.size || 0) / 512);
10556
+ let h = new C(a);
10557
+ if (!h.cksumValid) break;
10558
+ let l = 512 * Math.ceil((h.size || 0) / 512);
10551
10559
  if (n + l + 512 > o.size) break;
10552
- n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
10560
+ n += l, s3.mtimeCache && h.mtime && s3.mtimeCache.set(String(h.path), h.mtime);
10553
10561
  }
10554
- i = false, mo(s3, e, n, r, t);
10562
+ i = false, po(s3, e, n, r, t);
10555
10563
  } finally {
10556
10564
  if (i) try {
10557
10565
  v.closeSync(r);
@@ -10559,69 +10567,69 @@ var uo = (s3, t) => {
10559
10567
  }
10560
10568
  }
10561
10569
  };
10562
- var mo = (s3, t, e, i, r) => {
10570
+ var po = (s3, t, e, i, r) => {
10563
10571
  let n = new Wt(s3.file, { fd: i, start: e });
10564
- t.pipe(n), Eo(t, r);
10572
+ t.pipe(n), wo(t, r);
10565
10573
  };
10566
- var po = (s3, t) => {
10574
+ var Eo = (s3, t) => {
10567
10575
  t = Array.from(t);
10568
- let e = new wt(s3), i = (n, o, h) => {
10569
- let a = (T, N) => {
10570
- T ? v.close(n, (E) => h(T)) : h(null, N);
10576
+ let e = new wt(s3), i = (n, o, a) => {
10577
+ let h = (T, N) => {
10578
+ T ? v.close(n, (E) => a(T)) : a(null, N);
10571
10579
  }, l = 0;
10572
- if (o === 0) return a(null, 0);
10580
+ if (o === 0) return h(null, 0);
10573
10581
  let c = 0, d = Buffer.alloc(512), S = (T, N) => {
10574
- if (T || N === void 0) return a(T);
10582
+ if (T || N === void 0) return h(T);
10575
10583
  if (c += N, c < 512 && N) return v.read(n, d, c, d.length - c, l + c, S);
10576
- if (l === 0 && d[0] === 31 && d[1] === 139) return a(new Error("cannot append to compressed archives"));
10577
- if (c < 512) return a(null, l);
10578
- let E = new k(d);
10579
- if (!E.cksumValid) return a(null, l);
10584
+ if (l === 0 && d[0] === 31 && d[1] === 139) return h(new Error("cannot append to compressed archives"));
10585
+ if (c < 512) return h(null, l);
10586
+ let E = new C(d);
10587
+ if (!E.cksumValid) return h(null, l);
10580
10588
  let x = 512 * Math.ceil((E.size ?? 0) / 512);
10581
- if (l + x + 512 > o || (l += x + 512, l >= o)) return a(null, l);
10589
+ if (l + x + 512 > o || (l += x + 512, l >= o)) return h(null, l);
10582
10590
  s3.mtimeCache && E.mtime && s3.mtimeCache.set(String(E.path), E.mtime), c = 0, v.read(n, d, 0, 512, l, S);
10583
10591
  };
10584
10592
  v.read(n, d, 0, 512, l, S);
10585
10593
  };
10586
10594
  return new Promise((n, o) => {
10587
10595
  e.on("error", o);
10588
- let h = "r+", a = (l, c) => {
10589
- if (l && l.code === "ENOENT" && h === "r+") return h = "w+", v.open(s3.file, h, a);
10596
+ let a = "r+", h = (l, c) => {
10597
+ if (l && l.code === "ENOENT" && a === "r+") return a = "w+", v.open(s3.file, a, h);
10590
10598
  if (l || !c) return o(l);
10591
10599
  v.fstat(c, (d, S) => {
10592
10600
  if (d) return v.close(c, () => o(d));
10593
10601
  i(c, S.size, (T, N) => {
10594
10602
  if (T) return o(T);
10595
10603
  let E = new tt2(s3.file, { fd: c, start: N });
10596
- e.pipe(E), E.on("error", o), E.on("close", n), wo(e, t);
10604
+ e.pipe(E), E.on("error", o), E.on("close", n), So(e, t);
10597
10605
  });
10598
10606
  });
10599
10607
  };
10600
- v.open(s3.file, h, a);
10608
+ v.open(s3.file, a, h);
10601
10609
  });
10602
10610
  };
10603
- var Eo = (s3, t) => {
10611
+ var wo = (s3, t) => {
10604
10612
  t.forEach((e) => {
10605
- e.charAt(0) === "@" ? Ct({ file: Fr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10613
+ e.charAt(0) === "@" ? Ft({ file: vr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10606
10614
  }), s3.end();
10607
10615
  };
10608
- var wo = async (s3, t) => {
10609
- for (let e of t) e.charAt(0) === "@" ? await Ct({ file: Fr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10616
+ var So = async (s3, t) => {
10617
+ for (let e of t) e.charAt(0) === "@" ? await Ft({ file: vr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10610
10618
  s3.end();
10611
10619
  };
10612
- var vt = K(uo, po, () => {
10620
+ var vt = K(mo, Eo, () => {
10613
10621
  throw new TypeError("file is required");
10614
10622
  }, () => {
10615
10623
  throw new TypeError("file is required");
10616
10624
  }, (s3, t) => {
10617
- if (!Fs(s3)) throw new TypeError("file is required");
10625
+ if (!vs(s3)) throw new TypeError("file is required");
10618
10626
  if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
10619
10627
  if (!t?.length) throw new TypeError("no paths specified to add/replace");
10620
10628
  });
10621
- var So = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
10622
- vt.validate?.(s3, t), yo(s3);
10629
+ var yo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
10630
+ vt.validate?.(s3, t), Ro(s3);
10623
10631
  });
10624
- var yo = (s3) => {
10632
+ var Ro = (s3) => {
10625
10633
  let t = s3.filter;
10626
10634
  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));
10627
10635
  };
@@ -10633,7 +10641,7 @@ function normalize(filename2) {
10633
10641
  }
10634
10642
  async function getFileList(filename2) {
10635
10643
  const entries = [];
10636
- await Ct({
10644
+ await Ft({
10637
10645
  file: filename2,
10638
10646
  strict: true,
10639
10647
  onentry: (entry) => entries.push(entry)