npm-pkg-lint 4.6.5 → 4.6.6

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
@@ -7656,85 +7656,85 @@ function isBlacklisted(filename2) {
7656
7656
  import fs3 from "node:fs";
7657
7657
 
7658
7658
  // node_modules/tar/dist/esm/index.min.js
7659
- import Kr from "events";
7659
+ import Vr from "events";
7660
7660
  import I from "fs";
7661
- import { EventEmitter as Ti } from "node:events";
7662
- import Ns from "node:stream";
7663
- import { StringDecoder as Mr } from "node:string_decoder";
7664
- import nr from "node:path";
7661
+ import { EventEmitter as Li } from "node:events";
7662
+ import Ds from "node:stream";
7663
+ import { StringDecoder as Br } from "node:string_decoder";
7664
+ import or from "node:path";
7665
7665
  import Vt from "node:fs";
7666
- import { dirname as xn, parse as Ln } from "path";
7666
+ import { dirname as Ln, parse as Nn } from "path";
7667
7667
  import { EventEmitter as _n } from "events";
7668
- import Mi from "assert";
7669
- import { Buffer as gt } from "buffer";
7670
- import * as ks from "zlib";
7671
- import qr from "zlib";
7668
+ import Pi from "assert";
7669
+ import { Buffer as _t } from "buffer";
7670
+ import * as vs from "zlib";
7671
+ import jr from "zlib";
7672
7672
  import { posix as Zt } from "node:path";
7673
- import { basename as wn } from "node:path";
7674
- import fi from "fs";
7673
+ import { basename as Sn } from "node:path";
7674
+ import ui from "fs";
7675
7675
  import $ from "fs";
7676
- import $s from "path";
7677
- import { win32 as In } from "node:path";
7678
- import sr from "path";
7679
- import Cr from "node:fs";
7680
- import so from "node:assert";
7681
- import { randomBytes as Ir } from "node:crypto";
7676
+ import Xs from "path";
7677
+ import { win32 as Cn } from "node:path";
7678
+ import rr from "path";
7679
+ import Fr from "node:fs";
7680
+ import ro from "node:assert";
7681
+ import { randomBytes as Cr } from "node:crypto";
7682
7682
  import u from "node:fs";
7683
7683
  import R from "node:path";
7684
- import cr from "fs";
7685
- import mi from "node:fs";
7686
- import Ee from "node:path";
7684
+ import fr from "fs";
7685
+ import Ei from "node:fs";
7686
+ import we from "node:path";
7687
7687
  import k from "node:fs";
7688
- import jn from "node:fs/promises";
7689
- import pi from "node:path";
7690
- import { join as br } from "node:path";
7688
+ import Qn from "node:fs/promises";
7689
+ import wi from "node:path";
7690
+ import { join as gr } from "node:path";
7691
7691
  import v from "node:fs";
7692
- import Fr from "node:path";
7693
- var kr = Object.defineProperty;
7694
- var vr = (s3, t) => {
7695
- for (var e in t) kr(s3, e, { get: t[e], enumerable: true });
7692
+ import kr from "node:path";
7693
+ var vr = Object.defineProperty;
7694
+ var Mr = (s3, t) => {
7695
+ for (var e in t) vr(s3, e, { get: t[e], enumerable: true });
7696
7696
  };
7697
- var Os = typeof process == "object" && process ? process : { stdout: null, stderr: null };
7698
- var Br = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D || s3 instanceof Ns || Pr(s3) || zr(s3));
7699
- var Pr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.pipe == "function" && s3.pipe !== Ns.Writable.prototype.pipe;
7700
- var zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Ti && typeof s3.write == "function" && typeof s3.end == "function";
7697
+ var Ts = typeof process == "object" && process ? process : { stdout: null, stderr: null };
7698
+ var Pr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof Ds || zr(s3) || Ur(s3));
7699
+ var zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Li && typeof s3.pipe == "function" && s3.pipe !== Ds.Writable.prototype.pipe;
7700
+ var Ur = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof Li && typeof s3.write == "function" && typeof s3.end == "function";
7701
7701
  var q = /* @__PURE__ */ Symbol("EOF");
7702
7702
  var j = /* @__PURE__ */ Symbol("maybeEmitEnd");
7703
7703
  var rt = /* @__PURE__ */ Symbol("emittedEnd");
7704
- var Le = /* @__PURE__ */ Symbol("emittingEnd");
7704
+ var Ne = /* @__PURE__ */ Symbol("emittingEnd");
7705
7705
  var jt = /* @__PURE__ */ Symbol("emittedError");
7706
- var Ne = /* @__PURE__ */ Symbol("closed");
7707
- var Ts = /* @__PURE__ */ Symbol("read");
7706
+ var De = /* @__PURE__ */ Symbol("closed");
7707
+ var xs = /* @__PURE__ */ Symbol("read");
7708
7708
  var Ae = /* @__PURE__ */ Symbol("flush");
7709
- var xs = /* @__PURE__ */ Symbol("flushChunk");
7709
+ var Ls = /* @__PURE__ */ Symbol("flushChunk");
7710
7710
  var z = /* @__PURE__ */ Symbol("encoding");
7711
7711
  var Mt = /* @__PURE__ */ Symbol("decoder");
7712
7712
  var b = /* @__PURE__ */ Symbol("flowing");
7713
7713
  var Qt = /* @__PURE__ */ Symbol("paused");
7714
7714
  var Bt = /* @__PURE__ */ Symbol("resume");
7715
- var _ = /* @__PURE__ */ Symbol("buffer");
7716
- var A = /* @__PURE__ */ Symbol("pipes");
7717
- var g = /* @__PURE__ */ Symbol("bufferLength");
7718
- var yi = /* @__PURE__ */ Symbol("bufferPush");
7719
- var De = /* @__PURE__ */ Symbol("bufferShift");
7715
+ var g = /* @__PURE__ */ Symbol("buffer");
7716
+ var D = /* @__PURE__ */ Symbol("pipes");
7717
+ var _ = /* @__PURE__ */ Symbol("bufferLength");
7718
+ var bi = /* @__PURE__ */ Symbol("bufferPush");
7719
+ var Ie = /* @__PURE__ */ Symbol("bufferShift");
7720
7720
  var L = /* @__PURE__ */ Symbol("objectMode");
7721
7721
  var w = /* @__PURE__ */ Symbol("destroyed");
7722
- var Ri = /* @__PURE__ */ Symbol("error");
7723
- var bi = /* @__PURE__ */ Symbol("emitData");
7724
- var Ls = /* @__PURE__ */ Symbol("emitEnd");
7725
- var _i = /* @__PURE__ */ Symbol("emitEnd2");
7722
+ var gi = /* @__PURE__ */ Symbol("error");
7723
+ var _i = /* @__PURE__ */ Symbol("emitData");
7724
+ var Ns = /* @__PURE__ */ Symbol("emitEnd");
7725
+ var Oi = /* @__PURE__ */ Symbol("emitEnd2");
7726
7726
  var Z = /* @__PURE__ */ Symbol("async");
7727
- var gi = /* @__PURE__ */ Symbol("abort");
7728
- var Ie = /* @__PURE__ */ Symbol("aborted");
7727
+ var Ti = /* @__PURE__ */ Symbol("abort");
7728
+ var Ce = /* @__PURE__ */ Symbol("aborted");
7729
7729
  var Jt = /* @__PURE__ */ Symbol("signal");
7730
7730
  var yt = /* @__PURE__ */ Symbol("dataListeners");
7731
7731
  var C = /* @__PURE__ */ Symbol("discarded");
7732
7732
  var te = (s3) => Promise.resolve().then(s3);
7733
- var Ur = (s3) => s3();
7734
- var Hr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
7735
- var Wr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
7736
- var Gr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
7737
- var Ce = class {
7733
+ var Hr = (s3) => s3();
7734
+ var Wr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
7735
+ var Gr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
7736
+ var Zr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
7737
+ var Fe = class {
7738
7738
  src;
7739
7739
  dest;
7740
7740
  opts;
@@ -7751,7 +7751,7 @@ var Ce = class {
7751
7751
  this.unpipe(), this.opts.end && this.dest.end();
7752
7752
  }
7753
7753
  };
7754
- var Oi = class extends Ce {
7754
+ var xi = class extends Fe {
7755
7755
  unpipe() {
7756
7756
  this.src.removeListener("error", this.proxyErrors), super.unpipe();
7757
7757
  }
@@ -7759,26 +7759,26 @@ var Oi = class extends Ce {
7759
7759
  super(t, e, i), this.proxyErrors = (r) => this.dest.emit("error", r), t.on("error", this.proxyErrors);
7760
7760
  }
7761
7761
  };
7762
- var Zr = (s3) => !!s3.objectMode;
7763
- var Yr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
7764
- var D = class extends Ti {
7762
+ var Yr = (s3) => !!s3.objectMode;
7763
+ var Kr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
7764
+ var A = class extends Li {
7765
7765
  [b] = false;
7766
7766
  [Qt] = false;
7767
- [A] = [];
7768
- [_] = [];
7767
+ [D] = [];
7768
+ [g] = [];
7769
7769
  [L];
7770
7770
  [z];
7771
7771
  [Z];
7772
7772
  [Mt];
7773
7773
  [q] = false;
7774
7774
  [rt] = false;
7775
- [Le] = false;
7776
7775
  [Ne] = false;
7776
+ [De] = false;
7777
7777
  [jt] = null;
7778
- [g] = 0;
7778
+ [_] = 0;
7779
7779
  [w] = false;
7780
7780
  [Jt];
7781
- [Ie] = false;
7781
+ [Ce] = false;
7782
7782
  [yt] = 0;
7783
7783
  [C] = false;
7784
7784
  writable = true;
@@ -7786,12 +7786,12 @@ var D = class extends Ti {
7786
7786
  constructor(...t) {
7787
7787
  let e = t[0] || {};
7788
7788
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
7789
- Zr(e) ? (this[L] = true, this[z] = null) : Yr(e) ? (this[z] = e.encoding, this[L] = false) : (this[L] = false, this[z] = null), this[Z] = !!e.async, this[Mt] = this[z] ? new Mr(this[z]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[_] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[A] });
7789
+ 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[g] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[D] });
7790
7790
  let { signal: i } = e;
7791
- i && (this[Jt] = i, i.aborted ? this[gi]() : i.addEventListener("abort", () => this[gi]()));
7791
+ i && (this[Jt] = i, i.aborted ? this[Ti]() : i.addEventListener("abort", () => this[Ti]()));
7792
7792
  }
7793
7793
  get bufferLength() {
7794
- return this[g];
7794
+ return this[_];
7795
7795
  }
7796
7796
  get encoding() {
7797
7797
  return this[z];
@@ -7814,47 +7814,47 @@ var D = class extends Ti {
7814
7814
  set async(t) {
7815
7815
  this[Z] = this[Z] || !!t;
7816
7816
  }
7817
- [gi]() {
7818
- this[Ie] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
7817
+ [Ti]() {
7818
+ this[Ce] = true, this.emit("abort", this[Jt]?.reason), this.destroy(this[Jt]?.reason);
7819
7819
  }
7820
7820
  get aborted() {
7821
- return this[Ie];
7821
+ return this[Ce];
7822
7822
  }
7823
7823
  set aborted(t) {
7824
7824
  }
7825
7825
  write(t, e, i) {
7826
- if (this[Ie]) return false;
7826
+ if (this[Ce]) return false;
7827
7827
  if (this[q]) throw new Error("write after end");
7828
7828
  if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
7829
7829
  typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
7830
- let r = this[Z] ? te : Ur;
7830
+ let r = this[Z] ? te : Hr;
7831
7831
  if (!this[L] && !Buffer.isBuffer(t)) {
7832
- if (Gr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
7833
- else if (Wr(t)) t = Buffer.from(t);
7832
+ if (Zr(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
7833
+ else if (Gr(t)) t = Buffer.from(t);
7834
7834
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
7835
7835
  }
7836
- return this[L] ? (this[b] && this[g] !== 0 && this[Ae](true), this[b] ? this.emit("data", t) : this[yi](t), this[g] !== 0 && this.emit("readable"), i && r(i), this[b]) : t.length ? (typeof t == "string" && !(e === this[z] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z] && (t = this[Mt].write(t)), this[b] && this[g] !== 0 && this[Ae](true), this[b] ? this.emit("data", t) : this[yi](t), this[g] !== 0 && this.emit("readable"), i && r(i), this[b]) : (this[g] !== 0 && this.emit("readable"), i && r(i), this[b]);
7836
+ return this[L] ? (this[b] && this[_] !== 0 && this[Ae](true), this[b] ? this.emit("data", t) : this[bi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[b]) : t.length ? (typeof t == "string" && !(e === this[z] && !this[Mt]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[z] && (t = this[Mt].write(t)), this[b] && this[_] !== 0 && this[Ae](true), this[b] ? this.emit("data", t) : this[bi](t), this[_] !== 0 && this.emit("readable"), i && r(i), this[b]) : (this[_] !== 0 && this.emit("readable"), i && r(i), this[b]);
7837
7837
  }
7838
7838
  read(t) {
7839
7839
  if (this[w]) return null;
7840
- if (this[C] = false, this[g] === 0 || t === 0 || t && t > this[g]) return this[j](), null;
7841
- this[L] && (t = null), this[_].length > 1 && !this[L] && (this[_] = [this[z] ? this[_].join("") : Buffer.concat(this[_], this[g])]);
7842
- let e = this[Ts](t || null, this[_][0]);
7840
+ if (this[C] = false, this[_] === 0 || t === 0 || t && t > this[_]) return this[j](), null;
7841
+ this[L] && (t = null), this[g].length > 1 && !this[L] && (this[g] = [this[z] ? this[g].join("") : Buffer.concat(this[g], this[_])]);
7842
+ let e = this[xs](t || null, this[g][0]);
7843
7843
  return this[j](), e;
7844
7844
  }
7845
- [Ts](t, e) {
7846
- if (this[L]) this[De]();
7845
+ [xs](t, e) {
7846
+ if (this[L]) this[Ie]();
7847
7847
  else {
7848
7848
  let i = e;
7849
- t === i.length || t === null ? this[De]() : typeof i == "string" ? (this[_][0] = i.slice(t), e = i.slice(0, t), this[g] -= t) : (this[_][0] = i.subarray(t), e = i.subarray(0, t), this[g] -= t);
7849
+ t === i.length || t === null ? this[Ie]() : typeof i == "string" ? (this[g][0] = i.slice(t), e = i.slice(0, t), this[_] -= t) : (this[g][0] = i.subarray(t), e = i.subarray(0, t), this[_] -= t);
7850
7850
  }
7851
- return this.emit("data", e), !this[_].length && !this[q] && this.emit("drain"), e;
7851
+ return this.emit("data", e), !this[g].length && !this[q] && this.emit("drain"), e;
7852
7852
  }
7853
7853
  end(t, e, i) {
7854
7854
  return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = "utf8"), t !== void 0 && this.write(t, e), i && this.once("end", i), this[q] = true, this.writable = false, (this[b] || !this[Qt]) && this[j](), this;
7855
7855
  }
7856
7856
  [Bt]() {
7857
- this[w] || (!this[yt] && !this[A].length && (this[C] = true), this[Qt] = false, this[b] = true, this.emit("resume"), this[_].length ? this[Ae]() : this[q] ? this[j]() : this.emit("drain"));
7857
+ this[w] || (!this[yt] && !this[D].length && (this[C] = true), this[Qt] = false, this[b] = true, this.emit("resume"), this[g].length ? this[Ae]() : this[q] ? this[j]() : this.emit("drain"));
7858
7858
  }
7859
7859
  resume() {
7860
7860
  return this[Bt]();
@@ -7871,39 +7871,39 @@ var D = class extends Ti {
7871
7871
  get paused() {
7872
7872
  return this[Qt];
7873
7873
  }
7874
- [yi](t) {
7875
- this[L] ? this[g] += 1 : this[g] += t.length, this[_].push(t);
7874
+ [bi](t) {
7875
+ this[L] ? this[_] += 1 : this[_] += t.length, this[g].push(t);
7876
7876
  }
7877
- [De]() {
7878
- return this[L] ? this[g] -= 1 : this[g] -= this[_][0].length, this[_].shift();
7877
+ [Ie]() {
7878
+ return this[L] ? this[_] -= 1 : this[_] -= this[g][0].length, this[g].shift();
7879
7879
  }
7880
7880
  [Ae](t = false) {
7881
7881
  do
7882
7882
  ;
7883
- while (this[xs](this[De]()) && this[_].length);
7884
- !t && !this[_].length && !this[q] && this.emit("drain");
7883
+ while (this[Ls](this[Ie]()) && this[g].length);
7884
+ !t && !this[g].length && !this[q] && this.emit("drain");
7885
7885
  }
7886
- [xs](t) {
7886
+ [Ls](t) {
7887
7887
  return this.emit("data", t), this[b];
7888
7888
  }
7889
7889
  pipe(t, e) {
7890
7890
  if (this[w]) return t;
7891
7891
  this[C] = false;
7892
7892
  let i = this[rt];
7893
- return e = e || {}, t === Os.stdout || t === Os.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this[A].push(e.proxyErrors ? new Oi(this, t, e) : new Ce(this, t, e)), this[Z] ? te(() => this[Bt]()) : this[Bt]()), t;
7893
+ 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 Fe(this, t, e)), this[Z] ? te(() => this[Bt]()) : this[Bt]()), t;
7894
7894
  }
7895
7895
  unpipe(t) {
7896
- let e = this[A].find((i) => i.dest === t);
7897
- e && (this[A].length === 1 ? (this[b] && this[yt] === 0 && (this[b] = false), this[A] = []) : this[A].splice(this[A].indexOf(e), 1), e.unpipe());
7896
+ let e = this[D].find((i) => i.dest === t);
7897
+ e && (this[D].length === 1 ? (this[b] && this[yt] === 0 && (this[b] = false), this[D] = []) : this[D].splice(this[D].indexOf(e), 1), e.unpipe());
7898
7898
  }
7899
7899
  addListener(t, e) {
7900
7900
  return this.on(t, e);
7901
7901
  }
7902
7902
  on(t, e) {
7903
7903
  let i = super.on(t, e);
7904
- if (t === "data") this[C] = false, this[yt]++, !this[A].length && !this[b] && this[Bt]();
7905
- else if (t === "readable" && this[g] !== 0) super.emit("readable");
7906
- else if (Hr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
7904
+ if (t === "data") this[C] = false, this[yt]++, !this[D].length && !this[b] && this[Bt]();
7905
+ else if (t === "readable" && this[_] !== 0) super.emit("readable");
7906
+ else if (Wr(t) && this[rt]) super.emit(t), this.removeAllListeners(t);
7907
7907
  else if (t === "error" && this[jt]) {
7908
7908
  let r = e;
7909
7909
  this[Z] ? te(() => r.call(this, this[jt])) : r.call(this, this[jt]);
@@ -7915,29 +7915,29 @@ var D = class extends Ti {
7915
7915
  }
7916
7916
  off(t, e) {
7917
7917
  let i = super.off(t, e);
7918
- return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[A].length && (this[b] = false)), i;
7918
+ return t === "data" && (this[yt] = this.listeners("data").length, this[yt] === 0 && !this[C] && !this[D].length && (this[b] = false)), i;
7919
7919
  }
7920
7920
  removeAllListeners(t) {
7921
7921
  let e = super.removeAllListeners(t);
7922
- return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[A].length && (this[b] = false)), e;
7922
+ return (t === "data" || t === void 0) && (this[yt] = 0, !this[C] && !this[D].length && (this[b] = false)), e;
7923
7923
  }
7924
7924
  get emittedEnd() {
7925
7925
  return this[rt];
7926
7926
  }
7927
7927
  [j]() {
7928
- !this[Le] && !this[rt] && !this[w] && this[_].length === 0 && this[q] && (this[Le] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne] && this.emit("close"), this[Le] = false);
7928
+ !this[Ne] && !this[rt] && !this[w] && this[g].length === 0 && this[q] && (this[Ne] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[De] && this.emit("close"), this[Ne] = false);
7929
7929
  }
7930
7930
  emit(t, ...e) {
7931
7931
  let i = e[0];
7932
7932
  if (t !== "error" && t !== "close" && t !== w && this[w]) return false;
7933
- if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[bi](i)), true) : this[bi](i);
7934
- if (t === "end") return this[Ls]();
7933
+ if (t === "data") return !this[L] && !i ? false : this[Z] ? (te(() => this[_i](i)), true) : this[_i](i);
7934
+ if (t === "end") return this[Ns]();
7935
7935
  if (t === "close") {
7936
- if (this[Ne] = true, !this[rt] && !this[w]) return false;
7936
+ if (this[De] = true, !this[rt] && !this[w]) return false;
7937
7937
  let n = super.emit("close");
7938
7938
  return this.removeAllListeners("close"), n;
7939
7939
  } else if (t === "error") {
7940
- this[jt] = i, super.emit(Ri, i);
7940
+ this[jt] = i, super.emit(gi, i);
7941
7941
  let n = !this[Jt] || this.listeners("error").length ? super.emit("error", i) : false;
7942
7942
  return this[j](), n;
7943
7943
  } else if (t === "resume") {
@@ -7950,23 +7950,23 @@ var D = class extends Ti {
7950
7950
  let r = super.emit(t, ...e);
7951
7951
  return this[j](), r;
7952
7952
  }
7953
- [bi](t) {
7954
- for (let i of this[A]) i.dest.write(t) === false && this.pause();
7953
+ [_i](t) {
7954
+ for (let i of this[D]) i.dest.write(t) === false && this.pause();
7955
7955
  let e = this[C] ? false : super.emit("data", t);
7956
7956
  return this[j](), e;
7957
7957
  }
7958
- [Ls]() {
7959
- return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[_i]()), true) : this[_i]());
7958
+ [Ns]() {
7959
+ return this[rt] ? false : (this[rt] = true, this.readable = false, this[Z] ? (te(() => this[Oi]()), true) : this[Oi]());
7960
7960
  }
7961
- [_i]() {
7961
+ [Oi]() {
7962
7962
  if (this[Mt]) {
7963
7963
  let e = this[Mt].end();
7964
7964
  if (e) {
7965
- for (let i of this[A]) i.dest.write(e);
7965
+ for (let i of this[D]) i.dest.write(e);
7966
7966
  this[C] || super.emit("data", e);
7967
7967
  }
7968
7968
  }
7969
- for (let e of this[A]) e.end();
7969
+ for (let e of this[D]) e.end();
7970
7970
  let t = super.emit("end");
7971
7971
  return this.removeAllListeners("end"), t;
7972
7972
  }
@@ -8013,67 +8013,67 @@ var D = class extends Ti {
8013
8013
  }
8014
8014
  [Symbol.iterator]() {
8015
8015
  this[C] = false;
8016
- let t = false, e = () => (this.pause(), this.off(Ri, e), this.off(w, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
8016
+ let t = false, e = () => (this.pause(), this.off(gi, e), this.off(w, e), this.off("end", e), t = true, { done: true, value: void 0 }), i = () => {
8017
8017
  if (t) return e();
8018
8018
  let r = this.read();
8019
8019
  return r === null ? e() : { done: false, value: r };
8020
8020
  };
8021
- return this.once("end", e), this.once(Ri, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
8021
+ return this.once("end", e), this.once(gi, e), this.once(w, e), { next: i, throw: e, return: e, [Symbol.iterator]() {
8022
8022
  return this;
8023
8023
  }, [Symbol.dispose]: () => {
8024
8024
  } };
8025
8025
  }
8026
8026
  destroy(t) {
8027
8027
  if (this[w]) return t ? this.emit("error", t) : this.emit(w), this;
8028
- this[w] = true, this[C] = true, this[_].length = 0, this[g] = 0;
8028
+ this[w] = true, this[C] = true, this[g].length = 0, this[_] = 0;
8029
8029
  let e = this;
8030
- return typeof e.close == "function" && !this[Ne] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
8030
+ return typeof e.close == "function" && !this[De] && e.close(), t ? this.emit("error", t) : this.emit(w), this;
8031
8031
  }
8032
8032
  static get isStream() {
8033
- return Br;
8033
+ return Pr;
8034
8034
  }
8035
8035
  };
8036
- var Vr = I.writev;
8036
+ var $r = I.writev;
8037
8037
  var ot = /* @__PURE__ */ Symbol("_autoClose");
8038
8038
  var H = /* @__PURE__ */ Symbol("_close");
8039
8039
  var ee = /* @__PURE__ */ Symbol("_ended");
8040
8040
  var m = /* @__PURE__ */ Symbol("_fd");
8041
- var xi = /* @__PURE__ */ Symbol("_finished");
8041
+ var Ni = /* @__PURE__ */ Symbol("_finished");
8042
8042
  var J = /* @__PURE__ */ Symbol("_flags");
8043
- var Li = /* @__PURE__ */ Symbol("_flush");
8044
- var Ii = /* @__PURE__ */ Symbol("_handleChunk");
8045
- var Ci = /* @__PURE__ */ Symbol("_makeBuf");
8043
+ var Di = /* @__PURE__ */ Symbol("_flush");
8044
+ var Fi = /* @__PURE__ */ Symbol("_handleChunk");
8045
+ var ki = /* @__PURE__ */ Symbol("_makeBuf");
8046
8046
  var se = /* @__PURE__ */ Symbol("_mode");
8047
- var Fe = /* @__PURE__ */ Symbol("_needDrain");
8047
+ var ke = /* @__PURE__ */ Symbol("_needDrain");
8048
8048
  var Ut = /* @__PURE__ */ Symbol("_onerror");
8049
8049
  var Ht = /* @__PURE__ */ Symbol("_onopen");
8050
- var Ni = /* @__PURE__ */ Symbol("_onread");
8050
+ var Ai = /* @__PURE__ */ Symbol("_onread");
8051
8051
  var Pt = /* @__PURE__ */ Symbol("_onwrite");
8052
8052
  var ht = /* @__PURE__ */ Symbol("_open");
8053
8053
  var U = /* @__PURE__ */ Symbol("_path");
8054
8054
  var nt = /* @__PURE__ */ Symbol("_pos");
8055
8055
  var Y = /* @__PURE__ */ Symbol("_queue");
8056
8056
  var zt = /* @__PURE__ */ Symbol("_read");
8057
- var Ai = /* @__PURE__ */ Symbol("_readSize");
8057
+ var Ii = /* @__PURE__ */ Symbol("_readSize");
8058
8058
  var Q = /* @__PURE__ */ Symbol("_reading");
8059
8059
  var ie = /* @__PURE__ */ Symbol("_remain");
8060
- var Di = /* @__PURE__ */ Symbol("_size");
8061
- var ke = /* @__PURE__ */ Symbol("_write");
8060
+ var Ci = /* @__PURE__ */ Symbol("_size");
8061
+ var ve = /* @__PURE__ */ Symbol("_write");
8062
8062
  var Rt = /* @__PURE__ */ Symbol("_writing");
8063
- var ve = /* @__PURE__ */ Symbol("_defaultFlag");
8063
+ var Me = /* @__PURE__ */ Symbol("_defaultFlag");
8064
8064
  var bt = /* @__PURE__ */ Symbol("_errored");
8065
- var _t = class extends D {
8065
+ var gt = class extends A {
8066
8066
  [bt] = false;
8067
8067
  [m];
8068
8068
  [U];
8069
- [Ai];
8069
+ [Ii];
8070
8070
  [Q] = false;
8071
- [Di];
8071
+ [Ci];
8072
8072
  [ie];
8073
8073
  [ot];
8074
8074
  constructor(t, e) {
8075
8075
  if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
8076
- this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ai] = e.readSize || 16 * 1024 * 1024, this[Q] = false, this[Di] = typeof e.size == "number" ? e.size : 1 / 0, this[ie] = this[Di], this[ot] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[m] == "number" ? this[zt]() : this[ht]();
8076
+ this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ii] = e.readSize || 16 * 1024 * 1024, this[Q] = 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]();
8077
8077
  }
8078
8078
  get fd() {
8079
8079
  return this[m];
@@ -8093,19 +8093,19 @@ var _t = class extends D {
8093
8093
  [Ht](t, e) {
8094
8094
  t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
8095
8095
  }
8096
- [Ci]() {
8097
- return Buffer.allocUnsafe(Math.min(this[Ai], this[ie]));
8096
+ [ki]() {
8097
+ return Buffer.allocUnsafe(Math.min(this[Ii], this[ie]));
8098
8098
  }
8099
8099
  [zt]() {
8100
8100
  if (!this[Q]) {
8101
8101
  this[Q] = true;
8102
- let t = this[Ci]();
8103
- if (t.length === 0) return process.nextTick(() => this[Ni](null, 0, t));
8104
- I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ni](e, i, r));
8102
+ let t = this[ki]();
8103
+ if (t.length === 0) return process.nextTick(() => this[Ai](null, 0, t));
8104
+ I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ai](e, i, r));
8105
8105
  }
8106
8106
  }
8107
- [Ni](t, e, i) {
8108
- this[Q] = false, t ? this[Ut](t) : this[Ii](e, i) && this[zt]();
8107
+ [Ai](t, e, i) {
8108
+ this[Q] = false, t ? this[Ut](t) : this[Fi](e, i) && this[zt]();
8109
8109
  }
8110
8110
  [H]() {
8111
8111
  if (this[ot] && typeof this[m] == "number") {
@@ -8116,7 +8116,7 @@ var _t = class extends D {
8116
8116
  [Ut](t) {
8117
8117
  this[Q] = true, this[H](), this.emit("error", t);
8118
8118
  }
8119
- [Ii](t, e) {
8119
+ [Fi](t, e) {
8120
8120
  let i = false;
8121
8121
  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;
8122
8122
  }
@@ -8134,7 +8134,7 @@ var _t = class extends D {
8134
8134
  }
8135
8135
  }
8136
8136
  };
8137
- var Me = class extends _t {
8137
+ var Be = class extends gt {
8138
8138
  [ht]() {
8139
8139
  let t = true;
8140
8140
  try {
@@ -8149,8 +8149,8 @@ var Me = class extends _t {
8149
8149
  if (!this[Q]) {
8150
8150
  this[Q] = true;
8151
8151
  do {
8152
- let e = this[Ci](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
8153
- if (!this[Ii](i, e)) break;
8152
+ let e = this[ki](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
8153
+ if (!this[Fi](i, e)) break;
8154
8154
  } while (true);
8155
8155
  this[Q] = false;
8156
8156
  }
@@ -8166,26 +8166,26 @@ var Me = class extends _t {
8166
8166
  }
8167
8167
  }
8168
8168
  };
8169
- var tt2 = class extends Kr {
8169
+ var tt2 = class extends Vr {
8170
8170
  readable = false;
8171
8171
  writable = true;
8172
8172
  [bt] = false;
8173
8173
  [Rt] = false;
8174
8174
  [ee] = false;
8175
8175
  [Y] = [];
8176
- [Fe] = false;
8176
+ [ke] = false;
8177
8177
  [U];
8178
8178
  [se];
8179
8179
  [ot];
8180
8180
  [m];
8181
- [ve];
8181
+ [Me];
8182
8182
  [J];
8183
- [xi] = false;
8183
+ [Ni] = false;
8184
8184
  [nt];
8185
8185
  constructor(t, e) {
8186
8186
  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;
8187
8187
  let i = this[nt] !== void 0 ? "r+" : "w";
8188
- this[ve] = e.flags === void 0, this[J] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
8188
+ this[Me] = e.flags === void 0, this[J] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[ht]();
8189
8189
  }
8190
8190
  emit(t, ...e) {
8191
8191
  if (t === "error") {
@@ -8207,26 +8207,26 @@ var tt2 = class extends Kr {
8207
8207
  I.open(this[U], this[J], this[se], (t, e) => this[Ht](t, e));
8208
8208
  }
8209
8209
  [Ht](t, e) {
8210
- this[ve] && this[J] === "r+" && t && t.code === "ENOENT" ? (this[J] = "w", this[ht]()) : t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[Rt] || this[Li]());
8210
+ 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[Rt] || this[Di]());
8211
8211
  }
8212
8212
  end(t, e) {
8213
8213
  return t && this.write(t, e), this[ee] = true, !this[Rt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
8214
8214
  }
8215
8215
  write(t, e) {
8216
- return typeof t == "string" && (t = Buffer.from(t, e)), this[ee] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[Rt] || this[Y].length ? (this[Y].push(t), this[Fe] = true, false) : (this[Rt] = true, this[ke](t), true);
8216
+ return typeof t == "string" && (t = Buffer.from(t, e)), this[ee] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[Rt] || this[Y].length ? (this[Y].push(t), this[ke] = true, false) : (this[Rt] = true, this[ve](t), true);
8217
8217
  }
8218
- [ke](t) {
8218
+ [ve](t) {
8219
8219
  I.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
8220
8220
  }
8221
8221
  [Pt](t, e) {
8222
- t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[Li]() : (this[Rt] = false, this[ee] && !this[xi] ? (this[xi] = true, this[H](), this.emit("finish")) : this[Fe] && (this[Fe] = false, this.emit("drain"))));
8222
+ t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[Di]() : (this[Rt] = false, this[ee] && !this[Ni] ? (this[Ni] = true, this[H](), this.emit("finish")) : this[ke] && (this[ke] = false, this.emit("drain"))));
8223
8223
  }
8224
- [Li]() {
8224
+ [Di]() {
8225
8225
  if (this[Y].length === 0) this[ee] && this[Pt](null, 0);
8226
- else if (this[Y].length === 1) this[ke](this[Y].pop());
8226
+ else if (this[Y].length === 1) this[ve](this[Y].pop());
8227
8227
  else {
8228
8228
  let t = this[Y];
8229
- this[Y] = [], Vr(this[m], t, this[nt], (e, i) => this[Pt](e, i));
8229
+ this[Y] = [], $r(this[m], t, this[nt], (e, i) => this[Pt](e, i));
8230
8230
  }
8231
8231
  }
8232
8232
  [H]() {
@@ -8239,7 +8239,7 @@ var tt2 = class extends Kr {
8239
8239
  var Wt = class extends tt2 {
8240
8240
  [ht]() {
8241
8241
  let t;
8242
- if (this[ve] && this[J] === "r+") try {
8242
+ if (this[Me] && this[J] === "r+") try {
8243
8243
  t = I.openSync(this[U], this[J], this[se]);
8244
8244
  } catch (e) {
8245
8245
  if (e?.code === "ENOENT") return this[J] = "w", this[ht]();
@@ -8254,7 +8254,7 @@ var Wt = class extends tt2 {
8254
8254
  this[m] = void 0, I.closeSync(t), this.emit("close");
8255
8255
  }
8256
8256
  }
8257
- [ke](t) {
8257
+ [ve](t) {
8258
8258
  let e = true;
8259
8259
  try {
8260
8260
  this[Pt](null, I.writeSync(this[m], t, 0, t.length, this[nt])), e = false;
@@ -8266,21 +8266,21 @@ var Wt = class extends tt2 {
8266
8266
  }
8267
8267
  }
8268
8268
  };
8269
- var $r = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
8269
+ 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"]]);
8270
8270
  var As = (s3) => !!s3.sync && !!s3.file;
8271
- var Ds = (s3) => !s3.sync && !!s3.file;
8272
- var Is = (s3) => !!s3.sync && !s3.file;
8273
- var Cs = (s3) => !s3.sync && !s3.file;
8274
- var Fs = (s3) => !!s3.file;
8275
- var Xr = (s3) => {
8276
- let t = $r.get(s3);
8271
+ var Is = (s3) => !s3.sync && !!s3.file;
8272
+ var Cs = (s3) => !!s3.sync && !s3.file;
8273
+ var Fs = (s3) => !s3.sync && !s3.file;
8274
+ var ks = (s3) => !!s3.file;
8275
+ var qr = (s3) => {
8276
+ let t = Xr.get(s3);
8277
8277
  return t || s3;
8278
8278
  };
8279
8279
  var re = (s3 = {}) => {
8280
8280
  if (!s3) return {};
8281
8281
  let t = {};
8282
8282
  for (let [e, i] of Object.entries(s3)) {
8283
- let r = Xr(e);
8283
+ let r = qr(e);
8284
8284
  t[r] = i;
8285
8285
  }
8286
8286
  return t.chmod === void 0 && t.noChmod === false && (t.chmod = true), delete t.noChmod, t;
@@ -8291,25 +8291,25 @@ var K = (s3, t, e, i, r) => Object.assign((n = [], o, h) => {
8291
8291
  if (r?.(a, o), As(a)) {
8292
8292
  if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
8293
8293
  return s3(a, o);
8294
- } else if (Ds(a)) {
8294
+ } else if (Is(a)) {
8295
8295
  let l = t(a, o);
8296
8296
  return h ? l.then(() => h(), h) : l;
8297
- } else if (Is(a)) {
8297
+ } else if (Cs(a)) {
8298
8298
  if (typeof h == "function") throw new TypeError("callback not supported for sync tar functions");
8299
8299
  return e(a, o);
8300
- } else if (Cs(a)) {
8300
+ } else if (Fs(a)) {
8301
8301
  if (typeof h == "function") throw new TypeError("callback only supported with file option");
8302
8302
  return i(a, o);
8303
8303
  }
8304
8304
  throw new Error("impossible options??");
8305
8305
  }, { syncFile: s3, asyncFile: t, syncNoFile: e, asyncNoFile: i, validate: r });
8306
- var jr = qr.constants || { ZLIB_VERNUM: 4736 };
8307
- 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));
8308
- var Qr = gt.concat;
8309
- var vs = Object.getOwnPropertyDescriptor(gt, "concat");
8310
- var Jr = (s3) => s3;
8311
- var ki = vs?.writable === true || vs?.set !== void 0 ? (s3) => {
8312
- gt.concat = s3 ? Jr : Qr;
8306
+ var Qr = jr.constants || { ZLIB_VERNUM: 4736 };
8307
+ 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 }, Qr));
8308
+ var Jr = _t.concat;
8309
+ var Ms = Object.getOwnPropertyDescriptor(_t, "concat");
8310
+ var tn = (s3) => s3;
8311
+ var Mi = Ms?.writable === true || Ms?.set !== void 0 ? (s3) => {
8312
+ _t.concat = s3 ? tn : Jr;
8313
8313
  } : (s3) => {
8314
8314
  };
8315
8315
  var Ot = /* @__PURE__ */ Symbol("_superWrite");
@@ -8323,8 +8323,8 @@ var Gt = class extends Error {
8323
8323
  return "ZlibError";
8324
8324
  }
8325
8325
  };
8326
- var vi = /* @__PURE__ */ Symbol("flushFlag");
8327
- var ne = class extends D {
8326
+ var Bi = /* @__PURE__ */ Symbol("flushFlag");
8327
+ var ne = class extends A {
8328
8328
  #t = false;
8329
8329
  #i = false;
8330
8330
  #s;
@@ -8343,9 +8343,9 @@ var ne = class extends D {
8343
8343
  }
8344
8344
  constructor(t, e) {
8345
8345
  if (!t || typeof t != "object") throw new TypeError("invalid options for ZlibBase constructor");
8346
- if (super(t), this.#s = t.flush ?? 0, this.#n = t.finishFlush ?? 0, this.#r = t.fullFlushFlag ?? 0, typeof ks[e] != "function") throw new TypeError("Compression method not supported: " + e);
8346
+ 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);
8347
8347
  try {
8348
- this.#e = new ks[e](t);
8348
+ this.#e = new vs[e](t);
8349
8349
  } catch (i) {
8350
8350
  throw new Gt(i, this.constructor);
8351
8351
  }
@@ -8357,10 +8357,10 @@ var ne = class extends D {
8357
8357
  this.#e && (this.#e.close(), this.#e = void 0, this.emit("close"));
8358
8358
  }
8359
8359
  reset() {
8360
- if (!this.#t) return Mi(this.#e, "zlib binding closed"), this.#e.reset?.();
8360
+ if (!this.#t) return Pi(this.#e, "zlib binding closed"), this.#e.reset?.();
8361
8361
  }
8362
8362
  flush(t) {
8363
- this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(gt.alloc(0), { [vi]: t })));
8363
+ this.ended || (typeof t != "number" && (t = this.#r), this.write(Object.assign(_t.alloc(0), { [Bi]: t })));
8364
8364
  }
8365
8365
  end(t, e, i) {
8366
8366
  return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), t && (e ? this.write(t, e) : this.write(t)), this.flush(this.#n), this.#i = true, super.end(i);
@@ -8372,20 +8372,20 @@ var ne = class extends D {
8372
8372
  return super.write(t);
8373
8373
  }
8374
8374
  write(t, e, i) {
8375
- if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = gt.from(t, e)), this.#t) return;
8376
- Mi(this.#e, "zlib binding closed");
8375
+ if (typeof e == "function" && (i = e, e = "utf8"), typeof t == "string" && (t = _t.from(t, e)), this.#t) return;
8376
+ Pi(this.#e, "zlib binding closed");
8377
8377
  let r = this.#e._handle, n = r.close;
8378
8378
  r.close = () => {
8379
8379
  };
8380
8380
  let o = this.#e.close;
8381
8381
  this.#e.close = () => {
8382
- }, ki(true);
8382
+ }, Mi(true);
8383
8383
  let h;
8384
8384
  try {
8385
- let l = typeof t[vi] == "number" ? t[vi] : this.#s;
8386
- h = this.#e._processChunk(t, l), ki(false);
8385
+ let l = typeof t[Bi] == "number" ? t[Bi] : this.#s;
8386
+ h = this.#e._processChunk(t, l), Mi(false);
8387
8387
  } catch (l) {
8388
- ki(false), this.#o(new Gt(l, this.write));
8388
+ Mi(false), this.#o(new Gt(l, this.write));
8389
8389
  } finally {
8390
8390
  this.#e && (this.#e._handle = r, r.close = n, this.#e.close = o, this.#e.removeAllListeners("error"));
8391
8391
  }
@@ -8393,13 +8393,13 @@ var ne = class extends D {
8393
8393
  let a;
8394
8394
  if (h) if (Array.isArray(h) && h.length > 0) {
8395
8395
  let l = h[0];
8396
- a = this[Ot](gt.from(l));
8396
+ a = this[Ot](_t.from(l));
8397
8397
  for (let c = 1; c < h.length; c++) a = this[Ot](h[c]);
8398
- } else a = this[Ot](gt.from(h));
8398
+ } else a = this[Ot](_t.from(h));
8399
8399
  return i && i(), a;
8400
8400
  }
8401
8401
  };
8402
- var Be = class extends ne {
8402
+ var Pe = class extends ne {
8403
8403
  #t;
8404
8404
  #i;
8405
8405
  constructor(t, e) {
@@ -8410,7 +8410,7 @@ var Be = class extends ne {
8410
8410
  if (!this.handle) throw new Error("cannot switch params when binding is closed");
8411
8411
  if (!this.handle.params) throw new Error("not supported in this implementation");
8412
8412
  if (this.#t !== t || this.#i !== e) {
8413
- this.flush(M.Z_SYNC_FLUSH), Mi(this.handle, "zlib binding closed");
8413
+ this.flush(M.Z_SYNC_FLUSH), Pi(this.handle, "zlib binding closed");
8414
8414
  let i = this.handle.flush;
8415
8415
  this.handle.flush = (r, n) => {
8416
8416
  typeof r == "function" && (n = r, r = this.flushFlag), this.flush(r), n?.();
@@ -8425,7 +8425,7 @@ var Be = class extends ne {
8425
8425
  }
8426
8426
  }
8427
8427
  };
8428
- var Pe = class extends Be {
8428
+ var ze = class extends Pe {
8429
8429
  #t;
8430
8430
  constructor(t) {
8431
8431
  super(t, "Gzip"), this.#t = t && !!t.portable;
@@ -8434,87 +8434,87 @@ var Pe = class extends Be {
8434
8434
  return this.#t ? (this.#t = false, t[9] = 255, super[Ot](t)) : super[Ot](t);
8435
8435
  }
8436
8436
  };
8437
- var ze = class extends Be {
8437
+ var Ue = class extends Pe {
8438
8438
  constructor(t) {
8439
8439
  super(t, "Unzip");
8440
8440
  }
8441
8441
  };
8442
- var Ue = class extends ne {
8442
+ var He = class extends ne {
8443
8443
  constructor(t, e) {
8444
8444
  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);
8445
8445
  }
8446
8446
  };
8447
- var He = class extends Ue {
8447
+ var We = class extends He {
8448
8448
  constructor(t) {
8449
8449
  super(t, "BrotliCompress");
8450
8450
  }
8451
8451
  };
8452
- var We = class extends Ue {
8452
+ var Ge = class extends He {
8453
8453
  constructor(t) {
8454
8454
  super(t, "BrotliDecompress");
8455
8455
  }
8456
8456
  };
8457
- var Ge = class extends ne {
8457
+ var Ze = class extends ne {
8458
8458
  constructor(t, e) {
8459
8459
  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);
8460
8460
  }
8461
8461
  };
8462
- var Ze = class extends Ge {
8462
+ var Ye = class extends Ze {
8463
8463
  constructor(t) {
8464
8464
  super(t, "ZstdCompress");
8465
8465
  }
8466
8466
  };
8467
- var Ye = class extends Ge {
8467
+ var Ke = class extends Ze {
8468
8468
  constructor(t) {
8469
8469
  super(t, "ZstdDecompress");
8470
8470
  }
8471
8471
  };
8472
- var Ms = (s3, t) => {
8473
- if (Number.isSafeInteger(s3)) s3 < 0 ? sn(s3, t) : en(s3, t);
8472
+ var Bs = (s3, t) => {
8473
+ if (Number.isSafeInteger(s3)) s3 < 0 ? rn(s3, t) : sn(s3, t);
8474
8474
  else throw Error("cannot encode number outside of javascript safe integer range");
8475
8475
  return t;
8476
8476
  };
8477
- var en = (s3, t) => {
8477
+ var sn = (s3, t) => {
8478
8478
  t[0] = 128;
8479
8479
  for (var e = t.length; e > 1; e--) t[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
8480
8480
  };
8481
- var sn = (s3, t) => {
8481
+ var rn = (s3, t) => {
8482
8482
  t[0] = 255;
8483
8483
  var e = false;
8484
8484
  s3 = s3 * -1;
8485
8485
  for (var i = t.length; i > 1; i--) {
8486
8486
  var r = s3 & 255;
8487
- s3 = Math.floor(s3 / 256), e ? t[i - 1] = Ps(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = zs(r));
8487
+ s3 = Math.floor(s3 / 256), e ? t[i - 1] = zs(r) : r === 0 ? t[i - 1] = 0 : (e = true, t[i - 1] = Us(r));
8488
8488
  }
8489
8489
  };
8490
- var Bs = (s3) => {
8491
- let t = s3[0], e = t === 128 ? nn(s3.subarray(1, s3.length)) : t === 255 ? rn(s3) : null;
8490
+ var Ps = (s3) => {
8491
+ let t = s3[0], e = t === 128 ? on(s3.subarray(1, s3.length)) : t === 255 ? nn(s3) : null;
8492
8492
  if (e === null) throw Error("invalid base256 encoding");
8493
8493
  if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
8494
8494
  return e;
8495
8495
  };
8496
- var rn = (s3) => {
8496
+ var nn = (s3) => {
8497
8497
  for (var t = s3.length, e = 0, i = false, r = t - 1; r > -1; r--) {
8498
8498
  var n = Number(s3[r]), o;
8499
- i ? o = Ps(n) : n === 0 ? o = n : (i = true, o = zs(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
8499
+ i ? o = zs(n) : n === 0 ? o = n : (i = true, o = Us(n)), o !== 0 && (e -= o * Math.pow(256, t - r - 1));
8500
8500
  }
8501
8501
  return e;
8502
8502
  };
8503
- var nn = (s3) => {
8503
+ var on = (s3) => {
8504
8504
  for (var t = s3.length, e = 0, i = t - 1; i > -1; i--) {
8505
8505
  var r = Number(s3[i]);
8506
8506
  r !== 0 && (e += r * Math.pow(256, t - i - 1));
8507
8507
  }
8508
8508
  return e;
8509
8509
  };
8510
- var Ps = (s3) => (255 ^ s3) & 255;
8511
- var zs = (s3) => (255 ^ s3) + 1 & 255;
8512
- var Bi = {};
8513
- vr(Bi, { code: () => Ke, isCode: () => oe, isName: () => hn, name: () => he });
8510
+ var zs = (s3) => (255 ^ s3) & 255;
8511
+ var Us = (s3) => (255 ^ s3) + 1 & 255;
8512
+ var zi = {};
8513
+ Mr(zi, { code: () => Ve, isCode: () => oe, isName: () => an, name: () => he });
8514
8514
  var oe = (s3) => he.has(s3);
8515
- var hn = (s3) => Ke.has(s3);
8515
+ var an = (s3) => Ve.has(s3);
8516
8516
  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"]]);
8517
- var Ke = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
8517
+ var Ve = new Map(Array.from(he).map((s3) => [s3[1], s3[0]]));
8518
8518
  var F = class {
8519
8519
  cksumValid = false;
8520
8520
  needPax = false;
@@ -8542,14 +8542,14 @@ var F = class {
8542
8542
  }
8543
8543
  decode(t, e, i, r) {
8544
8544
  if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
8545
- this.path = i?.path ?? Tt(t, e, 100), this.mode = i?.mode ?? r?.mode ?? at(t, e + 100, 8), this.uid = i?.uid ?? r?.uid ?? at(t, e + 108, 8), this.gid = i?.gid ?? r?.gid ?? at(t, e + 116, 8), this.size = i?.size ?? r?.size ?? at(t, e + 124, 12), this.mtime = i?.mtime ?? r?.mtime ?? Pi(t, e + 136, 12), this.cksum = at(t, e + 148, 12), r && this.#i(r, true), i && this.#i(i);
8545
+ this.path = i?.path ?? Tt(t, e, 100), this.mode = i?.mode ?? r?.mode ?? at(t, e + 100, 8), this.uid = i?.uid ?? r?.uid ?? at(t, e + 108, 8), this.gid = i?.gid ?? r?.gid ?? at(t, e + 116, 8), this.size = i?.size ?? r?.size ?? at(t, e + 124, 12), this.mtime = i?.mtime ?? r?.mtime ?? Ui(t, e + 136, 12), this.cksum = at(t, e + 148, 12), r && this.#i(r, true), i && this.#i(i);
8546
8546
  let n = Tt(t, e + 156, 1);
8547
8547
  if (oe(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = Tt(t, e + 157, 100), t.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = i?.uname ?? r?.uname ?? Tt(t, e + 265, 32), this.gname = i?.gname ?? r?.gname ?? Tt(t, e + 297, 32), this.devmaj = i?.devmaj ?? r?.devmaj ?? at(t, e + 329, 8) ?? 0, this.devmin = i?.devmin ?? r?.devmin ?? at(t, e + 337, 8) ?? 0, t[e + 475] !== 0) {
8548
8548
  let h = Tt(t, e + 345, 155);
8549
8549
  this.path = h + "/" + this.path;
8550
8550
  } else {
8551
8551
  let h = Tt(t, e + 345, 130);
8552
- h && (this.path = h + "/" + this.path), this.atime = i?.atime ?? r?.atime ?? Pi(t, e + 476, 12), this.ctime = i?.ctime ?? r?.ctime ?? Pi(t, e + 488, 12);
8552
+ 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);
8553
8553
  }
8554
8554
  let o = 256;
8555
8555
  for (let h = e; h < e + 148; h++) o += t[h];
@@ -8561,8 +8561,8 @@ var F = class {
8561
8561
  }
8562
8562
  encode(t, e = 0) {
8563
8563
  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");
8564
- let i = this.ctime || this.atime ? 130 : 155, r = an(this.path || "", i), n = r[0], o = r[1];
8565
- this.needPax = !!r[2], this.needPax = xt(t, e, 100, n) || this.needPax, this.needPax = lt(t, e + 100, 8, this.mode) || this.needPax, this.needPax = lt(t, e + 108, 8, this.uid) || this.needPax, this.needPax = lt(t, e + 116, 8, this.gid) || this.needPax, this.needPax = lt(t, e + 124, 12, this.size) || this.needPax, this.needPax = zi(t, e + 136, 12, this.mtime) || this.needPax, t[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = xt(t, e + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e + 257, 8), this.needPax = xt(t, e + 265, 32, this.uname) || this.needPax, this.needPax = xt(t, e + 297, 32, this.gname) || this.needPax, this.needPax = lt(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = lt(t, e + 337, 8, this.devmin) || this.needPax, this.needPax = xt(t, e + 345, i, o) || this.needPax, t[e + 475] !== 0 ? this.needPax = xt(t, e + 345, 155, o) || this.needPax : (this.needPax = xt(t, e + 345, 130, o) || this.needPax, this.needPax = zi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = zi(t, e + 488, 12, this.ctime) || this.needPax);
8564
+ let i = this.ctime || this.atime ? 130 : 155, r = ln(this.path || "", i), n = r[0], o = r[1];
8565
+ this.needPax = !!r[2], this.needPax = xt(t, e, 100, n) || this.needPax, this.needPax = lt(t, e + 100, 8, this.mode) || this.needPax, this.needPax = lt(t, e + 108, 8, this.uid) || this.needPax, this.needPax = lt(t, e + 116, 8, this.gid) || this.needPax, this.needPax = lt(t, e + 124, 12, this.size) || this.needPax, this.needPax = Hi(t, e + 136, 12, this.mtime) || this.needPax, t[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = xt(t, e + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e + 257, 8), this.needPax = xt(t, e + 265, 32, this.uname) || this.needPax, this.needPax = xt(t, e + 297, 32, this.gname) || this.needPax, this.needPax = lt(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = lt(t, e + 337, 8, this.devmin) || this.needPax, this.needPax = xt(t, e + 345, i, o) || this.needPax, t[e + 475] !== 0 ? this.needPax = xt(t, e + 345, 155, o) || this.needPax : (this.needPax = xt(t, e + 345, 130, o) || this.needPax, this.needPax = Hi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = Hi(t, e + 488, 12, this.ctime) || this.needPax);
8566
8566
  let h = 256;
8567
8567
  for (let a = e; a < e + 148; a++) h += t[a];
8568
8568
  for (let a = e + 156; a < e + 512; a++) h += t[a];
@@ -8575,13 +8575,13 @@ var F = class {
8575
8575
  return this.#t;
8576
8576
  }
8577
8577
  set type(t) {
8578
- let e = String(Ke.get(t));
8578
+ let e = String(Ve.get(t));
8579
8579
  if (oe(e) || e === "Unsupported") this.#t = e;
8580
8580
  else if (oe(t)) this.#t = t;
8581
8581
  else throw new TypeError("invalid entry type: " + t);
8582
8582
  }
8583
8583
  };
8584
- var an = (s3, t) => {
8584
+ var ln = (s3, t) => {
8585
8585
  let i = s3, r = "", n, o = Zt.parse(s3).root || ".";
8586
8586
  if (Buffer.byteLength(i) < 100) n = [i, r, false];
8587
8587
  else {
@@ -8594,19 +8594,19 @@ var an = (s3, t) => {
8594
8594
  return n;
8595
8595
  };
8596
8596
  var Tt = (s3, t, e) => s3.subarray(t, t + e).toString("utf8").replace(/\0.*/, "");
8597
- var Pi = (s3, t, e) => ln(at(s3, t, e));
8598
- var ln = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
8599
- var at = (s3, t, e) => Number(s3[t]) & 128 ? Bs(s3.subarray(t, t + e)) : fn(s3, t, e);
8600
- var cn = (s3) => isNaN(s3) ? void 0 : s3;
8601
- var fn = (s3, t, e) => cn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
8602
- var dn = { 12: 8589934591, 8: 2097151 };
8603
- var lt = (s3, t, e, i) => i === void 0 ? false : i > dn[e] || i < 0 ? (Ms(i, s3.subarray(t, t + e)), true) : (un(s3, t, e, i), false);
8604
- var un = (s3, t, e, i) => s3.write(mn(i, e), t, e, "ascii");
8605
- var mn = (s3, t) => pn(Math.floor(s3).toString(8), t);
8606
- var pn = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
8607
- var zi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
8608
- var En = new Array(156).join("\0");
8609
- var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + En, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
8597
+ var Ui = (s3, t, e) => cn(at(s3, t, e));
8598
+ var cn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
8599
+ var at = (s3, t, e) => Number(s3[t]) & 128 ? Ps(s3.subarray(t, t + e)) : dn(s3, t, e);
8600
+ var fn = (s3) => isNaN(s3) ? void 0 : s3;
8601
+ var dn = (s3, t, e) => fn(parseInt(s3.subarray(t, t + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
8602
+ var un = { 12: 8589934591, 8: 2097151 };
8603
+ 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);
8604
+ var mn = (s3, t, e, i) => s3.write(pn(i, e), t, e, "ascii");
8605
+ var pn = (s3, t) => En(Math.floor(s3).toString(8), t);
8606
+ var En = (s3, t) => (s3.length === t - 1 ? s3 : new Array(t - s3.length - 1).join("0") + s3 + " ") + "\0";
8607
+ var Hi = (s3, t, e, i) => i === void 0 ? false : lt(s3, t, e, i.getTime() / 1e3);
8608
+ var wn = new Array(156).join("\0");
8609
+ var xt = (s3, t, e, i) => i === void 0 ? false : (s3.write(i + wn, t, e, "utf8"), i.length !== Buffer.byteLength(i) || i.length > e);
8610
8610
  var ct = class s {
8611
8611
  atime;
8612
8612
  mtime;
@@ -8633,7 +8633,7 @@ var ct = class s {
8633
8633
  if (t === "") return Buffer.allocUnsafe(0);
8634
8634
  let e = Buffer.byteLength(t), i = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i);
8635
8635
  for (let n = 0; n < 512; n++) r[n] = 0;
8636
- new F({ path: ("PaxHeader/" + wn(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
8636
+ new F({ 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");
8637
8637
  for (let n = e + 512; n < r.length; n++) r[n] = 0;
8638
8638
  return r;
8639
8639
  }
@@ -8647,13 +8647,13 @@ var ct = class s {
8647
8647
  return n + o >= Math.pow(10, o) && (o += 1), o + n + r;
8648
8648
  }
8649
8649
  static parse(t, e, i = false) {
8650
- return new s(Sn(yn(t), e), i);
8650
+ return new s(yn(Rn(t), e), i);
8651
8651
  }
8652
8652
  };
8653
- var Sn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
8654
- var yn = (s3) => s3.replace(/\n$/, "").split(`
8655
- `).reduce(Rn, /* @__PURE__ */ Object.create(null));
8656
- var Rn = (s3, t) => {
8653
+ var yn = (s3, t) => t ? Object.assign({}, t, s3) : s3;
8654
+ var Rn = (s3) => s3.replace(/\n$/, "").split(`
8655
+ `).reduce(bn, /* @__PURE__ */ Object.create(null));
8656
+ var bn = (s3, t) => {
8657
8657
  let e = parseInt(t, 10);
8658
8658
  if (e !== Buffer.byteLength(t) + 1) return s3;
8659
8659
  t = t.slice((e + " ").length);
@@ -8662,9 +8662,9 @@ var Rn = (s3, t) => {
8662
8662
  let n = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o = i.join("=");
8663
8663
  return s3[n] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n) ? new Date(Number(o) * 1e3) : /^[0-9]+$/.test(o) ? +o : o, s3;
8664
8664
  };
8665
- var bn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
8666
- var f = bn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
8667
- var Yt = class extends D {
8665
+ var gn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
8666
+ var f = gn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
8667
+ var Yt = class extends A {
8668
8668
  extended;
8669
8669
  globalExtended;
8670
8670
  header;
@@ -8731,41 +8731,41 @@ var Yt = class extends D {
8731
8731
  var Lt = (s3, t, e, i = {}) => {
8732
8732
  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));
8733
8733
  };
8734
- var gn = 1024 * 1024;
8735
- var Zi = Buffer.from([31, 139]);
8736
- var Yi = Buffer.from([40, 181, 47, 253]);
8737
- var On = Math.max(Zi.length, Yi.length);
8734
+ var On = 1024 * 1024;
8735
+ var Ki = Buffer.from([31, 139]);
8736
+ var Vi = Buffer.from([40, 181, 47, 253]);
8737
+ var Tn = Math.max(Ki.length, Vi.length);
8738
8738
  var B = /* @__PURE__ */ Symbol("state");
8739
8739
  var Nt = /* @__PURE__ */ Symbol("writeEntry");
8740
8740
  var et = /* @__PURE__ */ Symbol("readEntry");
8741
- var Ui = /* @__PURE__ */ Symbol("nextEntry");
8742
- var Us = /* @__PURE__ */ Symbol("processEntry");
8741
+ var Wi = /* @__PURE__ */ Symbol("nextEntry");
8742
+ var Hs = /* @__PURE__ */ Symbol("processEntry");
8743
8743
  var V = /* @__PURE__ */ Symbol("extendedHeader");
8744
8744
  var ae = /* @__PURE__ */ Symbol("globalExtendedHeader");
8745
8745
  var ft = /* @__PURE__ */ Symbol("meta");
8746
- var Hs = /* @__PURE__ */ Symbol("emitMeta");
8746
+ var Ws = /* @__PURE__ */ Symbol("emitMeta");
8747
8747
  var p = /* @__PURE__ */ Symbol("buffer");
8748
8748
  var it = /* @__PURE__ */ Symbol("queue");
8749
8749
  var dt = /* @__PURE__ */ Symbol("ended");
8750
- var Hi = /* @__PURE__ */ Symbol("emittedEnd");
8751
- var At = /* @__PURE__ */ Symbol("emit");
8750
+ var Gi = /* @__PURE__ */ Symbol("emittedEnd");
8751
+ var Dt = /* @__PURE__ */ Symbol("emit");
8752
8752
  var y = /* @__PURE__ */ Symbol("unzip");
8753
- var Ve = /* @__PURE__ */ Symbol("consumeChunk");
8754
- var $e = /* @__PURE__ */ Symbol("consumeChunkSub");
8755
- var Wi = /* @__PURE__ */ Symbol("consumeBody");
8756
- var Ws = /* @__PURE__ */ Symbol("consumeMeta");
8757
- var Gs = /* @__PURE__ */ Symbol("consumeHeader");
8753
+ var $e = /* @__PURE__ */ Symbol("consumeChunk");
8754
+ var Xe = /* @__PURE__ */ Symbol("consumeChunkSub");
8755
+ var Zi = /* @__PURE__ */ Symbol("consumeBody");
8756
+ var Gs = /* @__PURE__ */ Symbol("consumeMeta");
8757
+ var Zs = /* @__PURE__ */ Symbol("consumeHeader");
8758
8758
  var le = /* @__PURE__ */ Symbol("consuming");
8759
- var Gi = /* @__PURE__ */ Symbol("bufferConcat");
8760
- var Xe = /* @__PURE__ */ Symbol("maybeEnd");
8759
+ var Yi = /* @__PURE__ */ Symbol("bufferConcat");
8760
+ var qe = /* @__PURE__ */ Symbol("maybeEnd");
8761
8761
  var Kt = /* @__PURE__ */ Symbol("writing");
8762
8762
  var ut = /* @__PURE__ */ Symbol("aborted");
8763
- var qe = /* @__PURE__ */ Symbol("onDone");
8764
- var Dt = /* @__PURE__ */ Symbol("sawValidEntry");
8765
- var je = /* @__PURE__ */ Symbol("sawNullBlock");
8766
- var Qe = /* @__PURE__ */ Symbol("sawEOF");
8767
- var Zs = /* @__PURE__ */ Symbol("closeStream");
8768
- var Tn = () => true;
8763
+ var je = /* @__PURE__ */ Symbol("onDone");
8764
+ var At = /* @__PURE__ */ Symbol("sawValidEntry");
8765
+ var Qe = /* @__PURE__ */ Symbol("sawNullBlock");
8766
+ var Je = /* @__PURE__ */ Symbol("sawEOF");
8767
+ var Ys = /* @__PURE__ */ Symbol("closeStream");
8768
+ var xn = () => true;
8769
8769
  var st = class extends _n {
8770
8770
  file;
8771
8771
  strict;
@@ -8786,36 +8786,36 @@ var st = class extends _n {
8786
8786
  [dt] = false;
8787
8787
  [y];
8788
8788
  [ut] = false;
8789
- [Dt];
8790
- [je] = false;
8789
+ [At];
8791
8790
  [Qe] = false;
8791
+ [Je] = false;
8792
8792
  [Kt] = false;
8793
8793
  [le] = false;
8794
- [Hi] = false;
8794
+ [Gi] = false;
8795
8795
  constructor(t = {}) {
8796
- super(), this.file = t.file || "", this.on(qe, () => {
8797
- (this[B] === "begin" || this[Dt] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
8798
- }), t.ondone ? this.on(qe, t.ondone) : this.on(qe, () => {
8796
+ super(), this.file = t.file || "", this.on(je, () => {
8797
+ (this[B] === "begin" || this[At] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
8798
+ }), t.ondone ? this.on(je, t.ondone) : this.on(je, () => {
8799
8799
  this.emit("prefinish"), this.emit("finish"), this.emit("end");
8800
- }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || gn, this.filter = typeof t.filter == "function" ? t.filter : Tn;
8800
+ }), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || On, this.filter = typeof t.filter == "function" ? t.filter : xn;
8801
8801
  let e = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
8802
8802
  this.brotli = !(t.gzip || t.zstd) && t.brotli !== void 0 ? t.brotli : e ? void 0 : false;
8803
8803
  let i = t.file && (t.file.endsWith(".tar.zst") || t.file.endsWith(".tzst"));
8804
- this.zstd = !(t.gzip || t.brotli) && t.zstd !== void 0 ? t.zstd : i ? true : void 0, this.on("end", () => this[Zs]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onReadEntry == "function" && this.on("entry", t.onReadEntry);
8804
+ 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);
8805
8805
  }
8806
8806
  warn(t, e, i = {}) {
8807
8807
  Lt(this, t, e, i);
8808
8808
  }
8809
- [Gs](t, e) {
8810
- this[Dt] === void 0 && (this[Dt] = false);
8809
+ [Zs](t, e) {
8810
+ this[At] === void 0 && (this[At] = false);
8811
8811
  let i;
8812
8812
  try {
8813
8813
  i = new F(t, e, this[V], this[ae]);
8814
8814
  } catch (r) {
8815
8815
  return this.warn("TAR_ENTRY_INVALID", r);
8816
8816
  }
8817
- if (i.nullBlock) this[je] ? (this[Qe] = true, this[B] === "begin" && (this[B] = "header"), this[At]("eof")) : (this[je] = true, this[At]("nullBlock"));
8818
- else if (this[je] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
8817
+ if (i.nullBlock) this[Qe] ? (this[Je] = true, this[B] === "begin" && (this[B] = "header"), this[Dt]("eof")) : (this[Qe] = true, this[Dt]("nullBlock"));
8818
+ else if (this[Qe] = false, !i.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i });
8819
8819
  else if (!i.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i });
8820
8820
  else {
8821
8821
  let r = i.type;
@@ -8823,52 +8823,52 @@ var st = class extends _n {
8823
8823
  else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i });
8824
8824
  else {
8825
8825
  let n = this[Nt] = new Yt(i, this[V], this[ae]);
8826
- if (!this[Dt]) if (n.remain) {
8826
+ if (!this[At]) if (n.remain) {
8827
8827
  let o = () => {
8828
- n.invalid || (this[Dt] = true);
8828
+ n.invalid || (this[At] = true);
8829
8829
  };
8830
8830
  n.on("end", o);
8831
- } else this[Dt] = true;
8832
- n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[At]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[ft] = "", n.on("data", (o) => this[ft] += o), this[B] = "meta") : (this[V] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[At]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[et] ? this[it].push(n) : (this[it].push(n), this[Ui]())));
8831
+ } else this[At] = true;
8832
+ n.meta ? n.size > this.maxMetaEntrySize ? (n.ignore = true, this[Dt]("ignoredEntry", n), this[B] = "ignore", n.resume()) : n.size > 0 && (this[ft] = "", n.on("data", (o) => this[ft] += o), this[B] = "meta") : (this[V] = void 0, n.ignore = n.ignore || !this.filter(n.path, n), n.ignore ? (this[Dt]("ignoredEntry", n), this[B] = n.remain ? "ignore" : "header", n.resume()) : (n.remain ? this[B] = "body" : (this[B] = "header", n.end()), this[et] ? this[it].push(n) : (this[it].push(n), this[Wi]())));
8833
8833
  }
8834
8834
  }
8835
8835
  }
8836
- [Zs]() {
8836
+ [Ys]() {
8837
8837
  queueMicrotask(() => this.emit("close"));
8838
8838
  }
8839
- [Us](t) {
8839
+ [Hs](t) {
8840
8840
  let e = true;
8841
8841
  if (!t) this[et] = void 0, e = false;
8842
8842
  else if (Array.isArray(t)) {
8843
8843
  let [i, ...r] = t;
8844
8844
  this.emit(i, ...r);
8845
- } else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Ui]()), e = false);
8845
+ } else this[et] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", () => this[Wi]()), e = false);
8846
8846
  return e;
8847
8847
  }
8848
- [Ui]() {
8848
+ [Wi]() {
8849
8849
  do
8850
8850
  ;
8851
- while (this[Us](this[it].shift()));
8851
+ while (this[Hs](this[it].shift()));
8852
8852
  if (this[it].length === 0) {
8853
8853
  let t = this[et];
8854
8854
  !t || t.flowing || t.size === t.remain ? this[Kt] || this.emit("drain") : t.once("drain", () => this.emit("drain"));
8855
8855
  }
8856
8856
  }
8857
- [Wi](t, e) {
8857
+ [Zi](t, e) {
8858
8858
  let i = this[Nt];
8859
8859
  if (!i) throw new Error("attempt to consume body without entry??");
8860
8860
  let r = i.blockRemain ?? 0, n = r >= t.length && e === 0 ? t : t.subarray(e, e + r);
8861
8861
  return i.write(n), i.blockRemain || (this[B] = "header", this[Nt] = void 0, i.end()), n.length;
8862
8862
  }
8863
- [Ws](t, e) {
8864
- let i = this[Nt], r = this[Wi](t, e);
8865
- return !this[Nt] && i && this[Hs](i), r;
8863
+ [Gs](t, e) {
8864
+ let i = this[Nt], r = this[Zi](t, e);
8865
+ return !this[Nt] && i && this[Ws](i), r;
8866
8866
  }
8867
- [At](t, e, i) {
8867
+ [Dt](t, e, i) {
8868
8868
  this[it].length === 0 && !this[et] ? this.emit(t, e, i) : this[it].push([t, e, i]);
8869
8869
  }
8870
- [Hs](t) {
8871
- switch (this[At]("meta", this[ft]), t.type) {
8870
+ [Ws](t) {
8871
+ switch (this[Dt]("meta", this[ft]), t.type) {
8872
8872
  case "ExtendedHeader":
8873
8873
  case "OldExtendedHeader":
8874
8874
  this[V] = ct.parse(this[ft], this[V], false);
@@ -8897,12 +8897,12 @@ var st = class extends _n {
8897
8897
  write(t, e, i) {
8898
8898
  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;
8899
8899
  if ((this[y] === void 0 || this.brotli === void 0 && this[y] === false) && t) {
8900
- if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < On) return this[p] = t, i?.(), true;
8901
- for (let a = 0; this[y] === void 0 && a < Zi.length; a++) t[a] !== Zi[a] && (this[y] = false);
8900
+ if (this[p] && (t = Buffer.concat([this[p], t]), this[p] = void 0), t.length < Tn) return this[p] = t, i?.(), true;
8901
+ for (let a = 0; this[y] === void 0 && a < Ki.length; a++) t[a] !== Ki[a] && (this[y] = false);
8902
8902
  let o = false;
8903
8903
  if (this[y] === false && this.zstd !== false) {
8904
8904
  o = true;
8905
- for (let a = 0; a < Yi.length; a++) if (t[a] !== Yi[a]) {
8905
+ for (let a = 0; a < Vi.length; a++) if (t[a] !== Vi[a]) {
8906
8906
  o = false;
8907
8907
  break;
8908
8908
  }
@@ -8917,61 +8917,61 @@ var st = class extends _n {
8917
8917
  }
8918
8918
  if (this[y] === void 0 || this[y] === false && (this.brotli || o)) {
8919
8919
  let a = this[dt];
8920
- this[dt] = false, this[y] = this[y] === void 0 ? new ze({}) : o ? new Ye({}) : new We({}), this[y].on("data", (c) => this[Ve](c)), this[y].on("error", (c) => this.abort(c)), this[y].on("end", () => {
8921
- this[dt] = true, this[Ve]();
8920
+ 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", () => {
8921
+ this[dt] = true, this[$e]();
8922
8922
  }), this[Kt] = true;
8923
8923
  let l = !!this[y][a ? "end" : "write"](t);
8924
8924
  return this[Kt] = false, i?.(), l;
8925
8925
  }
8926
8926
  }
8927
- this[Kt] = true, this[y] ? this[y].write(t) : this[Ve](t), this[Kt] = false;
8927
+ this[Kt] = true, this[y] ? this[y].write(t) : this[$e](t), this[Kt] = false;
8928
8928
  let n = this[it].length > 0 ? false : this[et] ? this[et].flowing : true;
8929
8929
  return !n && this[it].length === 0 && this[et]?.once("drain", () => this.emit("drain")), i?.(), n;
8930
8930
  }
8931
- [Gi](t) {
8931
+ [Yi](t) {
8932
8932
  t && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
8933
8933
  }
8934
- [Xe]() {
8935
- if (this[dt] && !this[Hi] && !this[ut] && !this[le]) {
8936
- this[Hi] = true;
8934
+ [qe]() {
8935
+ if (this[dt] && !this[Gi] && !this[ut] && !this[le]) {
8936
+ this[Gi] = true;
8937
8937
  let t = this[Nt];
8938
8938
  if (t && t.blockRemain) {
8939
8939
  let e = this[p] ? this[p].length : 0;
8940
8940
  this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t.blockRemain} more bytes, only ${e} available)`, { entry: t }), this[p] && t.write(this[p]), t.end();
8941
8941
  }
8942
- this[At](qe);
8942
+ this[Dt](je);
8943
8943
  }
8944
8944
  }
8945
- [Ve](t) {
8946
- if (this[le] && t) this[Gi](t);
8947
- else if (!t && !this[p]) this[Xe]();
8945
+ [$e](t) {
8946
+ if (this[le] && t) this[Yi](t);
8947
+ else if (!t && !this[p]) this[qe]();
8948
8948
  else if (t) {
8949
8949
  if (this[le] = true, this[p]) {
8950
- this[Gi](t);
8950
+ this[Yi](t);
8951
8951
  let e = this[p];
8952
- this[p] = void 0, this[$e](e);
8953
- } else this[$e](t);
8954
- for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[Qe]; ) {
8952
+ this[p] = void 0, this[Xe](e);
8953
+ } else this[Xe](t);
8954
+ for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[Je]; ) {
8955
8955
  let e = this[p];
8956
- this[p] = void 0, this[$e](e);
8956
+ this[p] = void 0, this[Xe](e);
8957
8957
  }
8958
8958
  this[le] = false;
8959
8959
  }
8960
- (!this[p] || this[dt]) && this[Xe]();
8960
+ (!this[p] || this[dt]) && this[qe]();
8961
8961
  }
8962
- [$e](t) {
8962
+ [Xe](t) {
8963
8963
  let e = 0, i = t.length;
8964
- for (; e + 512 <= i && !this[ut] && !this[Qe]; ) switch (this[B]) {
8964
+ for (; e + 512 <= i && !this[ut] && !this[Je]; ) switch (this[B]) {
8965
8965
  case "begin":
8966
8966
  case "header":
8967
- this[Gs](t, e), e += 512;
8967
+ this[Zs](t, e), e += 512;
8968
8968
  break;
8969
8969
  case "ignore":
8970
8970
  case "body":
8971
- e += this[Wi](t, e);
8971
+ e += this[Zi](t, e);
8972
8972
  break;
8973
8973
  case "meta":
8974
- e += this[Ws](t, e);
8974
+ e += this[Gs](t, e);
8975
8975
  break;
8976
8976
  default:
8977
8977
  throw new Error("invalid state: " + this[B]);
@@ -8979,7 +8979,7 @@ var st = class extends _n {
8979
8979
  e < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e), this[p]]) : t.subarray(e));
8980
8980
  }
8981
8981
  end(t, e, i) {
8982
- return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[ut] || (this[y] ? (t && this[y].write(t), this[y].end()) : (this[dt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[Xe]())), this;
8982
+ return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[ut] || (this[y] ? (t && this[y].write(t), this[y].end()) : (this[dt] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[qe]())), this;
8983
8983
  }
8984
8984
  };
8985
8985
  var mt = (s3) => {
@@ -8987,19 +8987,19 @@ var mt = (s3) => {
8987
8987
  for (; t > -1 && s3.charAt(t) === "/"; ) e = t, t--;
8988
8988
  return e === -1 ? s3 : s3.slice(0, e);
8989
8989
  };
8990
- var Nn = (s3) => {
8990
+ var Dn = (s3) => {
8991
8991
  let t = s3.onReadEntry;
8992
8992
  s3.onReadEntry = t ? (e) => {
8993
8993
  t(e), e.resume();
8994
8994
  } : (e) => e.resume();
8995
8995
  };
8996
- var Ki = (s3, t) => {
8996
+ var $i = (s3, t) => {
8997
8997
  let e = new Map(t.map((n) => [mt(n), true])), i = s3.filter, r = (n, o = "") => {
8998
- let h = o || Ln(n).root || ".", a;
8998
+ let h = o || Nn(n).root || ".", a;
8999
8999
  if (n === h) a = false;
9000
9000
  else {
9001
9001
  let l = e.get(n);
9002
- a = l !== void 0 ? l : r(xn(n), h);
9002
+ a = l !== void 0 ? l : r(Ln(n), h);
9003
9003
  }
9004
9004
  return e.set(n, a), a;
9005
9005
  };
@@ -9029,58 +9029,58 @@ var An = (s3) => {
9029
9029
  }
9030
9030
  }
9031
9031
  };
9032
- var Dn = (s3, t) => {
9032
+ var In = (s3, t) => {
9033
9033
  let e = new st(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
9034
9034
  return new Promise((o, h) => {
9035
9035
  e.on("error", h), e.on("end", o), Vt.stat(r, (a, l) => {
9036
9036
  if (a) h(a);
9037
9037
  else {
9038
- let c = new _t(r, { readSize: i, size: l.size });
9038
+ let c = new gt(r, { readSize: i, size: l.size });
9039
9039
  c.on("error", h), c.pipe(e);
9040
9040
  }
9041
9041
  });
9042
9042
  });
9043
9043
  };
9044
- var It = K(An, Dn, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
9045
- t?.length && Ki(s3, t), s3.noResume || Nn(s3);
9044
+ var It = K(An, In, (s3) => new st(s3), (s3) => new st(s3), (s3, t) => {
9045
+ t?.length && $i(s3, t), s3.noResume || Dn(s3);
9046
9046
  });
9047
- var Vi = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
9048
- var { isAbsolute: Cn, parse: Ys } = In;
9047
+ 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);
9048
+ var { isAbsolute: Fn, parse: Ks } = Cn;
9049
9049
  var ce = (s3) => {
9050
- let t = "", e = Ys(s3);
9051
- for (; Cn(s3) || e.root; ) {
9050
+ let t = "", e = Ks(s3);
9051
+ for (; Fn(s3) || e.root; ) {
9052
9052
  let i = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
9053
- s3 = s3.slice(i.length), t += i, e = Ys(s3);
9053
+ s3 = s3.slice(i.length), t += i, e = Ks(s3);
9054
9054
  }
9055
9055
  return [t, s3];
9056
9056
  };
9057
- var Je = ["|", "<", ">", "?", ":"];
9058
- var $i = Je.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
9059
- var Fn = new Map(Je.map((s3, t) => [s3, $i[t]]));
9060
- var kn = new Map($i.map((s3, t) => [s3, Je[t]]));
9061
- var Xi = (s3) => Je.reduce((t, e) => t.split(e).join(Fn.get(e)), s3);
9062
- var Ks = (s3) => $i.reduce((t, e) => t.split(e).join(kn.get(e)), s3);
9063
- var Js = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
9064
- var vn = 16 * 1024 * 1024;
9065
- var Xs = /* @__PURE__ */ Symbol("process");
9066
- var qs = /* @__PURE__ */ Symbol("file");
9067
- var js = /* @__PURE__ */ Symbol("directory");
9068
- var ji = /* @__PURE__ */ Symbol("symlink");
9069
- var Qs = /* @__PURE__ */ Symbol("hardlink");
9057
+ var ti = ["|", "<", ">", "?", ":"];
9058
+ var qi = ti.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
9059
+ var kn = new Map(ti.map((s3, t) => [s3, qi[t]]));
9060
+ var vn = new Map(qi.map((s3, t) => [s3, ti[t]]));
9061
+ var ji = (s3) => ti.reduce((t, e) => t.split(e).join(kn.get(e)), s3);
9062
+ var Vs = (s3) => qi.reduce((t, e) => t.split(e).join(vn.get(e)), s3);
9063
+ var tr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
9064
+ var Mn = 16 * 1024 * 1024;
9065
+ var qs = /* @__PURE__ */ Symbol("process");
9066
+ var js = /* @__PURE__ */ Symbol("file");
9067
+ var Qs = /* @__PURE__ */ Symbol("directory");
9068
+ var Ji = /* @__PURE__ */ Symbol("symlink");
9069
+ var Js = /* @__PURE__ */ Symbol("hardlink");
9070
9070
  var fe = /* @__PURE__ */ Symbol("header");
9071
- var ti = /* @__PURE__ */ Symbol("read");
9072
- var Qi = /* @__PURE__ */ Symbol("lstat");
9073
- var ei = /* @__PURE__ */ Symbol("onlstat");
9074
- var Ji = /* @__PURE__ */ Symbol("onread");
9075
- var ts = /* @__PURE__ */ Symbol("onreadlink");
9076
- var es = /* @__PURE__ */ Symbol("openfile");
9077
- var is = /* @__PURE__ */ Symbol("onopenfile");
9071
+ var ei = /* @__PURE__ */ Symbol("read");
9072
+ var ts = /* @__PURE__ */ Symbol("lstat");
9073
+ var ii = /* @__PURE__ */ Symbol("onlstat");
9074
+ var es = /* @__PURE__ */ Symbol("onread");
9075
+ var is = /* @__PURE__ */ Symbol("onreadlink");
9076
+ var ss = /* @__PURE__ */ Symbol("openfile");
9077
+ var rs = /* @__PURE__ */ Symbol("onopenfile");
9078
9078
  var pt = /* @__PURE__ */ Symbol("close");
9079
- var ii = /* @__PURE__ */ Symbol("mode");
9080
- var ss = /* @__PURE__ */ Symbol("awaitDrain");
9081
- var qi = /* @__PURE__ */ Symbol("ondrain");
9079
+ var si = /* @__PURE__ */ Symbol("mode");
9080
+ var ns = /* @__PURE__ */ Symbol("awaitDrain");
9081
+ var Qi = /* @__PURE__ */ Symbol("ondrain");
9082
9082
  var X = /* @__PURE__ */ Symbol("prefix");
9083
- var de = class extends D {
9083
+ var de = class extends A {
9084
9084
  path;
9085
9085
  portable;
9086
9086
  myuid = process.getuid && process.getuid() || 0;
@@ -9113,15 +9113,15 @@ var de = class extends D {
9113
9113
  #t = false;
9114
9114
  constructor(t, e = {}) {
9115
9115
  let i = re(e);
9116
- super(), this.path = f(t), this.portable = !!i.portable, this.maxReadSize = i.maxReadSize || vn, this.linkCache = i.linkCache || /* @__PURE__ */ new Map(), this.statCache = i.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i.preservePaths, this.cwd = f(i.cwd || process.cwd()), this.strict = !!i.strict, this.noPax = !!i.noPax, this.noMtime = !!i.noMtime, this.mtime = i.mtime, this.prefix = i.prefix ? f(i.prefix) : void 0, this.onWriteEntry = i.onWriteEntry, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
9116
+ 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);
9117
9117
  let r = false;
9118
9118
  if (!this.preservePaths) {
9119
9119
  let [o, h] = ce(this.path);
9120
9120
  o && typeof h == "string" && (this.path = h, r = o);
9121
9121
  }
9122
- this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Ks(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || $s.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
9122
+ 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 });
9123
9123
  let n = this.statCache.get(this.absolute);
9124
- n ? this[ei](n) : this[Qi]();
9124
+ n ? this[ii](n) : this[ts]();
9125
9125
  }
9126
9126
  warn(t, e, i = {}) {
9127
9127
  return Lt(this, t, e, i);
@@ -9129,93 +9129,93 @@ var de = class extends D {
9129
9129
  emit(t, ...e) {
9130
9130
  return t === "error" && (this.#t = true), super.emit(t, ...e);
9131
9131
  }
9132
- [Qi]() {
9132
+ [ts]() {
9133
9133
  $.lstat(this.absolute, (t, e) => {
9134
9134
  if (t) return this.emit("error", t);
9135
- this[ei](e);
9135
+ this[ii](e);
9136
9136
  });
9137
9137
  }
9138
- [ei](t) {
9139
- this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Mn(t), this.emit("stat", t), this[Xs]();
9138
+ [ii](t) {
9139
+ this.statCache.set(this.absolute, t), this.stat = t, t.isFile() || (t.size = 0), this.type = Bn(t), this.emit("stat", t), this[qs]();
9140
9140
  }
9141
- [Xs]() {
9141
+ [qs]() {
9142
9142
  switch (this.type) {
9143
9143
  case "File":
9144
- return this[qs]();
9145
- case "Directory":
9146
9144
  return this[js]();
9145
+ case "Directory":
9146
+ return this[Qs]();
9147
9147
  case "SymbolicLink":
9148
- return this[ji]();
9148
+ return this[Ji]();
9149
9149
  default:
9150
9150
  return this.end();
9151
9151
  }
9152
9152
  }
9153
- [ii](t) {
9154
- return Vi(t, this.type === "Directory", this.portable);
9153
+ [si](t) {
9154
+ return Xi(t, this.type === "Directory", this.portable);
9155
9155
  }
9156
9156
  [X](t) {
9157
- return Js(t, this.prefix);
9157
+ return tr(t, this.prefix);
9158
9158
  }
9159
9159
  [fe]() {
9160
9160
  if (!this.stat) throw new Error("cannot write header before stat");
9161
- this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this[ii](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ct({ atime: this.portable ? void 0 : this.header.atime, ctime: this.portable ? void 0 : this.header.ctime, gid: this.portable ? void 0 : this.header.gid, mtime: this.noMtime ? void 0 : this.mtime || this.header.mtime, path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, size: this.header.size, uid: this.portable ? void 0 : this.header.uid, uname: this.portable ? void 0 : this.header.uname, dev: this.portable ? void 0 : this.stat.dev, ino: this.portable ? void 0 : this.stat.ino, nlink: this.portable ? void 0 : this.stat.nlink }).encode());
9161
+ this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[X](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X](this.linkpath) : this.linkpath, mode: this[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());
9162
9162
  let t = this.header?.block;
9163
9163
  if (!t) throw new Error("failed to encode header");
9164
9164
  super.write(t);
9165
9165
  }
9166
- [js]() {
9166
+ [Qs]() {
9167
9167
  if (!this.stat) throw new Error("cannot create directory entry without stat");
9168
9168
  this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
9169
9169
  }
9170
- [ji]() {
9170
+ [Ji]() {
9171
9171
  $.readlink(this.absolute, (t, e) => {
9172
9172
  if (t) return this.emit("error", t);
9173
- this[ts](e);
9173
+ this[is](e);
9174
9174
  });
9175
9175
  }
9176
- [ts](t) {
9176
+ [is](t) {
9177
9177
  this.linkpath = f(t), this[fe](), this.end();
9178
9178
  }
9179
- [Qs](t) {
9179
+ [Js](t) {
9180
9180
  if (!this.stat) throw new Error("cannot create link entry without stat");
9181
- this.type = "Link", this.linkpath = f($s.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
9181
+ this.type = "Link", this.linkpath = f(Xs.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
9182
9182
  }
9183
- [qs]() {
9183
+ [js]() {
9184
9184
  if (!this.stat) throw new Error("cannot create file entry without stat");
9185
9185
  if (this.stat.nlink > 1) {
9186
9186
  let t = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t);
9187
- if (e?.indexOf(this.cwd) === 0) return this[Qs](e);
9187
+ if (e?.indexOf(this.cwd) === 0) return this[Js](e);
9188
9188
  this.linkCache.set(t, this.absolute);
9189
9189
  }
9190
9190
  if (this[fe](), this.stat.size === 0) return this.end();
9191
- this[es]();
9191
+ this[ss]();
9192
9192
  }
9193
- [es]() {
9193
+ [ss]() {
9194
9194
  $.open(this.absolute, "r", (t, e) => {
9195
9195
  if (t) return this.emit("error", t);
9196
- this[is](e);
9196
+ this[rs](e);
9197
9197
  });
9198
9198
  }
9199
- [is](t) {
9199
+ [rs](t) {
9200
9200
  if (this.fd = t, this.#t) return this[pt]();
9201
9201
  if (!this.stat) throw new Error("should stat before calling onopenfile");
9202
9202
  this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
9203
9203
  let e = Math.min(this.blockLen, this.maxReadSize);
9204
- this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ti]();
9204
+ this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ei]();
9205
9205
  }
9206
- [ti]() {
9206
+ [ei]() {
9207
9207
  let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
9208
9208
  if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
9209
9209
  $.read(t, e, i, r, n, (o, h) => {
9210
9210
  if (o) return this[pt](() => this.emit("error", o));
9211
- this[Ji](h);
9211
+ this[es](h);
9212
9212
  });
9213
9213
  }
9214
9214
  [pt](t = () => {
9215
9215
  }) {
9216
9216
  this.fd !== void 0 && $.close(this.fd, t);
9217
9217
  }
9218
- [Ji](t) {
9218
+ [es](t) {
9219
9219
  if (t <= 0 && this.remain > 0) {
9220
9220
  let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
9221
9221
  return this[pt](() => this.emit("error", r));
@@ -9227,9 +9227,9 @@ var de = class extends D {
9227
9227
  if (!this.buf) throw new Error("should have created buffer prior to reading");
9228
9228
  if (t === this.remain) for (let r = t; r < this.length && t < this.blockRemain; r++) this.buf[r + this.offset] = 0, t++, this.remain++;
9229
9229
  let e = this.offset === 0 && t === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t);
9230
- this.write(e) ? this[qi]() : this[ss](() => this[qi]());
9230
+ this.write(e) ? this[Qi]() : this[ns](() => this[Qi]());
9231
9231
  }
9232
- [ss](t) {
9232
+ [ns](t) {
9233
9233
  this.once("drain", t);
9234
9234
  }
9235
9235
  write(t, e, i) {
@@ -9239,30 +9239,30 @@ var de = class extends D {
9239
9239
  }
9240
9240
  return this.remain -= t.length, this.blockRemain -= t.length, this.pos += t.length, this.offset += t.length, super.write(t, null, i);
9241
9241
  }
9242
- [qi]() {
9242
+ [Qi]() {
9243
9243
  if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt]((t) => t ? this.emit("error", t) : this.end());
9244
9244
  if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
9245
- this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[ti]();
9245
+ 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]();
9246
9246
  }
9247
9247
  };
9248
- var si = class extends de {
9248
+ var ri = class extends de {
9249
9249
  sync = true;
9250
- [Qi]() {
9251
- this[ei]($.lstatSync(this.absolute));
9250
+ [ts]() {
9251
+ this[ii]($.lstatSync(this.absolute));
9252
9252
  }
9253
- [ji]() {
9254
- this[ts]($.readlinkSync(this.absolute));
9253
+ [Ji]() {
9254
+ this[is]($.readlinkSync(this.absolute));
9255
9255
  }
9256
- [es]() {
9257
- this[is]($.openSync(this.absolute, "r"));
9256
+ [ss]() {
9257
+ this[rs]($.openSync(this.absolute, "r"));
9258
9258
  }
9259
- [ti]() {
9259
+ [ei]() {
9260
9260
  let t = true;
9261
9261
  try {
9262
9262
  let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
9263
9263
  if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
9264
9264
  let h = $.readSync(e, i, r, n, o);
9265
- this[Ji](h), t = false;
9265
+ this[es](h), t = false;
9266
9266
  } finally {
9267
9267
  if (t) try {
9268
9268
  this[pt](() => {
@@ -9271,7 +9271,7 @@ var si = class extends de {
9271
9271
  }
9272
9272
  }
9273
9273
  }
9274
- [ss](t) {
9274
+ [ns](t) {
9275
9275
  t();
9276
9276
  }
9277
9277
  [pt](t = () => {
@@ -9279,7 +9279,7 @@ var si = class extends de {
9279
9279
  this.fd !== void 0 && $.closeSync(this.fd), t();
9280
9280
  }
9281
9281
  };
9282
- var ri = class extends D {
9282
+ var ni = class extends A {
9283
9283
  blockLen = 0;
9284
9284
  blockRemain = 0;
9285
9285
  buf = 0;
@@ -9315,7 +9315,7 @@ var ri = class extends D {
9315
9315
  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;
9316
9316
  let { type: r } = t;
9317
9317
  if (r === "Unsupported") throw new Error("writing entry that should be ignored");
9318
- this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i.prefix, this.path = f(t.path), this.mode = t.mode !== void 0 ? this[ii](t.mode) : void 0, this.uid = this.portable ? void 0 : t.uid, this.gid = this.portable ? void 0 : t.gid, this.uname = this.portable ? void 0 : t.uname, this.gname = this.portable ? void 0 : t.gname, this.size = t.size, this.mtime = this.noMtime ? void 0 : i.mtime || t.mtime, this.atime = this.portable ? void 0 : t.atime, this.ctime = this.portable ? void 0 : t.ctime, this.linkpath = t.linkpath !== void 0 ? f(t.linkpath) : void 0, typeof i.onwarn == "function" && this.on("warn", i.onwarn);
9318
+ 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);
9319
9319
  let n = false;
9320
9320
  if (!this.preservePaths) {
9321
9321
  let [h, a] = ce(this.path);
@@ -9327,10 +9327,10 @@ var ri = class extends D {
9327
9327
  super.write(o), t.pipe(this);
9328
9328
  }
9329
9329
  [X](t) {
9330
- return Js(t, this.prefix);
9330
+ return tr(t, this.prefix);
9331
9331
  }
9332
- [ii](t) {
9333
- return Vi(t, this.type === "Directory", this.portable);
9332
+ [si](t) {
9333
+ return Xi(t, this.type === "Directory", this.portable);
9334
9334
  }
9335
9335
  write(t, e, i) {
9336
9336
  typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, typeof e == "string" ? e : "utf8"));
@@ -9342,8 +9342,8 @@ var ri = class extends D {
9342
9342
  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;
9343
9343
  }
9344
9344
  };
9345
- var Mn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
9346
- var ni = class s2 {
9345
+ var Bn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
9346
+ var oi = class s2 {
9347
9347
  tail;
9348
9348
  head;
9349
9349
  length = 0;
@@ -9374,11 +9374,11 @@ var ni = class s2 {
9374
9374
  t.list = this, t.prev = e, e && (e.next = t), this.tail = t, this.head || (this.head = t), this.length++;
9375
9375
  }
9376
9376
  push(...t) {
9377
- for (let e = 0, i = t.length; e < i; e++) Pn(this, t[e]);
9377
+ for (let e = 0, i = t.length; e < i; e++) zn(this, t[e]);
9378
9378
  return this.length;
9379
9379
  }
9380
9380
  unshift(...t) {
9381
- for (var e = 0, i = t.length; e < i; e++) zn(this, t[e]);
9381
+ for (var e = 0, i = t.length; e < i; e++) Un(this, t[e]);
9382
9382
  return this.length;
9383
9383
  }
9384
9384
  pop() {
@@ -9474,7 +9474,7 @@ var ni = class s2 {
9474
9474
  let n = [];
9475
9475
  for (let o = 0; r && o < e; o++) n.push(r.value), r = this.removeNode(r);
9476
9476
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
9477
- for (let o of i) r = Bn(this, r, o);
9477
+ for (let o of i) r = Pn(this, r, o);
9478
9478
  return n;
9479
9479
  }
9480
9480
  reverse() {
@@ -9486,14 +9486,14 @@ var ni = class s2 {
9486
9486
  return this.head = e, this.tail = t, this;
9487
9487
  }
9488
9488
  };
9489
- function Bn(s3, t, e) {
9489
+ function Pn(s3, t, e) {
9490
9490
  let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
9491
9491
  return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
9492
9492
  }
9493
- function Pn(s3, t) {
9493
+ function zn(s3, t) {
9494
9494
  s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
9495
9495
  }
9496
- function zn(s3, t) {
9496
+ function Un(s3, t) {
9497
9497
  s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
9498
9498
  }
9499
9499
  var ue = class {
@@ -9505,7 +9505,7 @@ var ue = class {
9505
9505
  this.list = r, this.value = t, e ? (e.next = this, this.prev = e) : this.prev = void 0, i ? (i.prev = this, this.next = i) : this.next = void 0;
9506
9506
  }
9507
9507
  };
9508
- var di = class {
9508
+ var mi = class {
9509
9509
  path;
9510
9510
  absolute;
9511
9511
  entry;
@@ -9518,28 +9518,29 @@ var di = class {
9518
9518
  this.path = t || "./", this.absolute = e;
9519
9519
  }
9520
9520
  };
9521
- var tr = Buffer.alloc(1024);
9522
- var oi = /* @__PURE__ */ Symbol("onStat");
9521
+ var er = Buffer.alloc(1024);
9522
+ var ai = /* @__PURE__ */ Symbol("onStat");
9523
9523
  var me = /* @__PURE__ */ Symbol("ended");
9524
9524
  var W = /* @__PURE__ */ Symbol("queue");
9525
+ var pe = /* @__PURE__ */ Symbol("queue");
9525
9526
  var Ct = /* @__PURE__ */ Symbol("current");
9526
9527
  var Ft = /* @__PURE__ */ Symbol("process");
9527
- var pe = /* @__PURE__ */ Symbol("processing");
9528
- var rs = /* @__PURE__ */ Symbol("processJob");
9528
+ var Ee = /* @__PURE__ */ Symbol("processing");
9529
+ var hi = /* @__PURE__ */ Symbol("processJob");
9529
9530
  var G = /* @__PURE__ */ Symbol("jobs");
9530
- var ns = /* @__PURE__ */ Symbol("jobDone");
9531
- var hi = /* @__PURE__ */ Symbol("addFSEntry");
9532
- var er = /* @__PURE__ */ Symbol("addTarEntry");
9533
- var as = /* @__PURE__ */ Symbol("stat");
9534
- var ls = /* @__PURE__ */ Symbol("readdir");
9535
- var ai = /* @__PURE__ */ Symbol("onreaddir");
9536
- var li = /* @__PURE__ */ Symbol("pipe");
9537
- var ir = /* @__PURE__ */ Symbol("entry");
9538
- var os = /* @__PURE__ */ Symbol("entryOpt");
9539
- var ci = /* @__PURE__ */ Symbol("writeEntryClass");
9540
- var rr = /* @__PURE__ */ Symbol("write");
9541
- var hs = /* @__PURE__ */ Symbol("ondrain");
9542
- var Et = class extends D {
9531
+ var os = /* @__PURE__ */ Symbol("jobDone");
9532
+ var li = /* @__PURE__ */ Symbol("addFSEntry");
9533
+ var ir = /* @__PURE__ */ Symbol("addTarEntry");
9534
+ var ls = /* @__PURE__ */ Symbol("stat");
9535
+ var cs = /* @__PURE__ */ Symbol("readdir");
9536
+ var ci = /* @__PURE__ */ Symbol("onreaddir");
9537
+ var fi = /* @__PURE__ */ Symbol("pipe");
9538
+ var sr = /* @__PURE__ */ Symbol("entry");
9539
+ var hs = /* @__PURE__ */ Symbol("entryOpt");
9540
+ var di = /* @__PURE__ */ Symbol("writeEntryClass");
9541
+ var nr = /* @__PURE__ */ Symbol("write");
9542
+ var as = /* @__PURE__ */ Symbol("ondrain");
9543
+ var Et = class extends A {
9543
9544
  sync = false;
9544
9545
  opt;
9545
9546
  cwd;
@@ -9560,22 +9561,23 @@ var Et = class extends D {
9560
9561
  mtime;
9561
9562
  filter;
9562
9563
  jobs;
9563
- [ci];
9564
+ [di];
9564
9565
  onWriteEntry;
9565
9566
  [W];
9567
+ [pe] = /* @__PURE__ */ new Map();
9566
9568
  [G] = 0;
9567
- [pe] = false;
9569
+ [Ee] = false;
9568
9570
  [me] = false;
9569
9571
  constructor(t = {}) {
9570
- if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[ci] = de, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
9572
+ 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) {
9571
9573
  if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
9572
- 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");
9574
+ 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");
9573
9575
  let e = this.zip;
9574
- e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[hs]()), this.on("resume", () => e.resume());
9575
- } else this.on("drain", this[hs]);
9576
- this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new ni(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[pe] = false, this[me] = false;
9576
+ e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[as]()), this.on("resume", () => e.resume());
9577
+ } else this.on("drain", this[as]);
9578
+ 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;
9577
9579
  }
9578
- [rr](t) {
9580
+ [nr](t) {
9579
9581
  return super.write(t);
9580
9582
  }
9581
9583
  add(t) {
@@ -9586,97 +9588,109 @@ var Et = class extends D {
9586
9588
  }
9587
9589
  write(t) {
9588
9590
  if (this[me]) throw new Error("write after end");
9589
- return t instanceof Yt ? this[er](t) : this[hi](t), this.flowing;
9591
+ return t instanceof Yt ? this[ir](t) : this[li](t), this.flowing;
9590
9592
  }
9591
- [er](t) {
9592
- let e = f(sr.resolve(this.cwd, t.path));
9593
+ [ir](t) {
9594
+ let e = f(rr.resolve(this.cwd, t.path));
9593
9595
  if (!this.filter(t.path, t)) t.resume();
9594
9596
  else {
9595
- let i = new di(t.path, e);
9596
- i.entry = new ri(t, this[os](i)), i.entry.on("end", () => this[ns](i)), this[G] += 1, this[W].push(i);
9597
+ let i = new mi(t.path, e);
9598
+ i.entry = new ni(t, this[hs](i)), i.entry.on("end", () => this[os](i)), this[G] += 1, this[W].push(i);
9597
9599
  }
9598
9600
  this[Ft]();
9599
9601
  }
9600
- [hi](t) {
9601
- let e = f(sr.resolve(this.cwd, t));
9602
- this[W].push(new di(t, e)), this[Ft]();
9602
+ [li](t) {
9603
+ let e = f(rr.resolve(this.cwd, t));
9604
+ this[W].push(new mi(t, e)), this[Ft]();
9603
9605
  }
9604
- [as](t) {
9606
+ [ls](t) {
9605
9607
  t.pending = true, this[G] += 1;
9606
9608
  let e = this.follow ? "stat" : "lstat";
9607
- fi[e](t.absolute, (i, r) => {
9608
- t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[oi](t, r);
9609
+ ui[e](t.absolute, (i, r) => {
9610
+ t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[ai](t, r);
9609
9611
  });
9610
9612
  }
9611
- [oi](t, e) {
9612
- this.statCache.set(t.absolute, e), t.stat = e, this.filter(t.path, e) ? e.isFile() && e.nlink > 1 && t === this[Ct] && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync && this[rs](t) : t.ignore = true, this[Ft]();
9613
+ [ai](t, e) {
9614
+ if (this.statCache.set(t.absolute, e), t.stat = e, !this.filter(t.path, e)) t.ignore = true;
9615
+ else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t === this[Ct]) this[hi](t);
9616
+ else {
9617
+ let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
9618
+ r ? r.push(t) : this[pe].set(i, [t]), t.pending = true;
9619
+ }
9620
+ this[Ft]();
9613
9621
  }
9614
- [ls](t) {
9615
- t.pending = true, this[G] += 1, fi.readdir(t.absolute, (e, i) => {
9622
+ [cs](t) {
9623
+ t.pending = true, this[G] += 1, ui.readdir(t.absolute, (e, i) => {
9616
9624
  if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
9617
- this[ai](t, i);
9625
+ this[ci](t, i);
9618
9626
  });
9619
9627
  }
9620
- [ai](t, e) {
9628
+ [ci](t, e) {
9621
9629
  this.readdirCache.set(t.absolute, e), t.readdir = e, this[Ft]();
9622
9630
  }
9623
9631
  [Ft]() {
9624
- if (!this[pe]) {
9625
- this[pe] = true;
9626
- for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[rs](t.value), t.value.ignore) {
9632
+ if (!this[Ee]) {
9633
+ this[Ee] = true;
9634
+ for (let t = this[W].head; t && this[G] < this.jobs; t = t.next) if (this[hi](t.value), t.value.ignore) {
9627
9635
  let e = t.next;
9628
9636
  this[W].removeNode(t), t.next = e;
9629
9637
  }
9630
- this[pe] = false, this[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(tr) : (super.write(tr), super.end()));
9638
+ this[Ee] = false, this[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(er) : (super.write(er), super.end()));
9631
9639
  }
9632
9640
  }
9633
9641
  get [Ct]() {
9634
9642
  return this[W] && this[W].head && this[W].head.value;
9635
9643
  }
9636
- [ns](t) {
9637
- this[W].shift(), this[G] -= 1, this[Ft]();
9644
+ [os](t) {
9645
+ this[W].shift(), this[G] -= 1;
9646
+ let { stat: e } = t;
9647
+ if (e && e.isFile() && e.nlink > 1) {
9648
+ let i = `${e.dev}:${e.ino}`, r = this[pe].get(i);
9649
+ if (this[pe].delete(i), r) for (let n of r) n.pending = false, this[hi](n);
9650
+ }
9651
+ this[Ft]();
9638
9652
  }
9639
- [rs](t) {
9653
+ [hi](t) {
9640
9654
  if (!t.pending) {
9641
9655
  if (t.entry) {
9642
- t === this[Ct] && !t.piped && this[li](t);
9656
+ t === this[Ct] && !t.piped && this[fi](t);
9643
9657
  return;
9644
9658
  }
9645
9659
  if (!t.stat) {
9646
9660
  let e = this.statCache.get(t.absolute);
9647
- e ? this[oi](t, e) : this[as](t);
9661
+ e ? this[ai](t, e) : this[ls](t);
9648
9662
  }
9649
9663
  if (t.stat && !t.ignore) {
9650
9664
  if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
9651
9665
  let e = this.readdirCache.get(t.absolute);
9652
- if (e ? this[ai](t, e) : this[ls](t), !t.readdir) return;
9666
+ if (e ? this[ci](t, e) : this[cs](t), !t.readdir) return;
9653
9667
  }
9654
- if (t.entry = this[ir](t), !t.entry) {
9668
+ if (t.entry = this[sr](t), !t.entry) {
9655
9669
  t.ignore = true;
9656
9670
  return;
9657
9671
  }
9658
- t === this[Ct] && !t.piped && this[li](t);
9672
+ t === this[Ct] && !t.piped && this[fi](t);
9659
9673
  }
9660
9674
  }
9661
9675
  }
9662
- [os](t) {
9676
+ [hs](t) {
9663
9677
  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 };
9664
9678
  }
9665
- [ir](t) {
9679
+ [sr](t) {
9666
9680
  this[G] += 1;
9667
9681
  try {
9668
- return new this[ci](t.path, this[os](t)).on("end", () => this[ns](t)).on("error", (i) => this.emit("error", i));
9682
+ return new this[di](t.path, this[hs](t)).on("end", () => this[os](t)).on("error", (i) => this.emit("error", i));
9669
9683
  } catch (e) {
9670
9684
  this.emit("error", e);
9671
9685
  }
9672
9686
  }
9673
- [hs]() {
9687
+ [as]() {
9674
9688
  this[Ct] && this[Ct].entry && this[Ct].entry.resume();
9675
9689
  }
9676
- [li](t) {
9690
+ [fi](t) {
9677
9691
  t.piped = true, t.readdir && t.readdir.forEach((r) => {
9678
9692
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
9679
- this[hi](o + r);
9693
+ this[li](o + r);
9680
9694
  });
9681
9695
  let e = t.entry, i = this.zip;
9682
9696
  if (!e) throw new Error("cannot pipe without source");
@@ -9696,131 +9710,131 @@ var Et = class extends D {
9696
9710
  var kt = class extends Et {
9697
9711
  sync = true;
9698
9712
  constructor(t) {
9699
- super(t), this[ci] = si;
9713
+ super(t), this[di] = ri;
9700
9714
  }
9701
9715
  pause() {
9702
9716
  }
9703
9717
  resume() {
9704
9718
  }
9705
- [as](t) {
9719
+ [ls](t) {
9706
9720
  let e = this.follow ? "statSync" : "lstatSync";
9707
- this[oi](t, fi[e](t.absolute));
9721
+ this[ai](t, ui[e](t.absolute));
9708
9722
  }
9709
- [ls](t) {
9710
- this[ai](t, fi.readdirSync(t.absolute));
9723
+ [cs](t) {
9724
+ this[ci](t, ui.readdirSync(t.absolute));
9711
9725
  }
9712
- [li](t) {
9726
+ [fi](t) {
9713
9727
  let e = t.entry, i = this.zip;
9714
9728
  if (t.readdir && t.readdir.forEach((r) => {
9715
9729
  let n = t.path, o = n === "./" ? "" : n.replace(/\/*$/, "/");
9716
- this[hi](o + r);
9730
+ this[li](o + r);
9717
9731
  }), !e) throw new Error("Cannot pipe without source");
9718
9732
  i ? e.on("data", (r) => {
9719
9733
  i.write(r);
9720
9734
  }) : e.on("data", (r) => {
9721
- super[rr](r);
9735
+ super[nr](r);
9722
9736
  });
9723
9737
  }
9724
9738
  };
9725
- var Un = (s3, t) => {
9739
+ var Hn = (s3, t) => {
9726
9740
  let e = new kt(s3), i = new Wt(s3.file, { mode: s3.mode || 438 });
9727
- e.pipe(i), or(e, t);
9741
+ e.pipe(i), hr(e, t);
9728
9742
  };
9729
- var Hn = (s3, t) => {
9743
+ var Wn = (s3, t) => {
9730
9744
  let e = new Et(s3), i = new tt2(s3.file, { mode: s3.mode || 438 });
9731
9745
  e.pipe(i);
9732
9746
  let r = new Promise((n, o) => {
9733
9747
  i.on("error", o), i.on("close", n), e.on("error", o);
9734
9748
  });
9735
- return hr(e, t).catch((n) => e.emit("error", n)), r;
9749
+ return ar(e, t).catch((n) => e.emit("error", n)), r;
9736
9750
  };
9737
- var or = (s3, t) => {
9751
+ var hr = (s3, t) => {
9738
9752
  t.forEach((e) => {
9739
- e.charAt(0) === "@" ? It({ file: nr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
9753
+ e.charAt(0) === "@" ? It({ file: or.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
9740
9754
  }), s3.end();
9741
9755
  };
9742
- var hr = async (s3, t) => {
9743
- for (let e of t) e.charAt(0) === "@" ? await It({ file: nr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
9756
+ var ar = async (s3, t) => {
9757
+ for (let e of t) e.charAt(0) === "@" ? await It({ file: or.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => {
9744
9758
  s3.add(i);
9745
9759
  } }) : s3.add(e);
9746
9760
  s3.end();
9747
9761
  };
9748
- var Wn = (s3, t) => {
9762
+ var Gn = (s3, t) => {
9749
9763
  let e = new kt(s3);
9750
- return or(e, t), e;
9764
+ return hr(e, t), e;
9751
9765
  };
9752
- var Gn = (s3, t) => {
9766
+ var Zn = (s3, t) => {
9753
9767
  let e = new Et(s3);
9754
- return hr(e, t).catch((i) => e.emit("error", i)), e;
9768
+ return ar(e, t).catch((i) => e.emit("error", i)), e;
9755
9769
  };
9756
- var Zn = K(Un, Hn, Wn, Gn, (s3, t) => {
9770
+ var Yn = K(Hn, Wn, Gn, Zn, (s3, t) => {
9757
9771
  if (!t?.length) throw new TypeError("no paths specified to add to archive");
9758
9772
  });
9759
- var Yn = process.env.__FAKE_PLATFORM__ || process.platform;
9760
- var fr = Yn === "win32";
9761
- var { O_CREAT: dr, O_NOFOLLOW: ar, O_TRUNC: ur, O_WRONLY: mr } = cr.constants;
9762
- var pr = Number(process.env.__FAKE_FS_O_FILENAME__) || cr.constants.UV_FS_O_FILEMAP || 0;
9763
- var Kn = fr && !!pr;
9764
- var Vn = 512 * 1024;
9765
- var $n = pr | ur | dr | mr;
9766
- var lr = !fr && typeof ar == "number" ? ar | ur | dr | mr : null;
9767
- var cs = lr !== null ? () => lr : Kn ? (s3) => s3 < Vn ? $n : "w" : () => "w";
9768
- var fs2 = (s3, t, e) => {
9773
+ var Kn = process.env.__FAKE_PLATFORM__ || process.platform;
9774
+ var dr = Kn === "win32";
9775
+ var { O_CREAT: ur, O_NOFOLLOW: lr, O_TRUNC: mr, O_WRONLY: pr } = fr.constants;
9776
+ var Er = Number(process.env.__FAKE_FS_O_FILENAME__) || fr.constants.UV_FS_O_FILEMAP || 0;
9777
+ var Vn = dr && !!Er;
9778
+ var $n = 512 * 1024;
9779
+ var Xn = Er | mr | ur | pr;
9780
+ var cr = !dr && typeof lr == "number" ? lr | mr | ur | pr : null;
9781
+ var fs2 = cr !== null ? () => cr : Vn ? (s3) => s3 < $n ? Xn : "w" : () => "w";
9782
+ var ds = (s3, t, e) => {
9769
9783
  try {
9770
- return mi.lchownSync(s3, t, e);
9784
+ return Ei.lchownSync(s3, t, e);
9771
9785
  } catch (i) {
9772
9786
  if (i?.code !== "ENOENT") throw i;
9773
9787
  }
9774
9788
  };
9775
- var ui = (s3, t, e, i) => {
9776
- mi.lchown(s3, t, e, (r) => {
9789
+ var pi = (s3, t, e, i) => {
9790
+ Ei.lchown(s3, t, e, (r) => {
9777
9791
  i(r && r?.code !== "ENOENT" ? r : null);
9778
9792
  });
9779
9793
  };
9780
- var Xn = (s3, t, e, i, r) => {
9781
- if (t.isDirectory()) ds(Ee.resolve(s3, t.name), e, i, (n) => {
9794
+ var qn = (s3, t, e, i, r) => {
9795
+ if (t.isDirectory()) us(we.resolve(s3, t.name), e, i, (n) => {
9782
9796
  if (n) return r(n);
9783
- let o = Ee.resolve(s3, t.name);
9784
- ui(o, e, i, r);
9797
+ let o = we.resolve(s3, t.name);
9798
+ pi(o, e, i, r);
9785
9799
  });
9786
9800
  else {
9787
- let n = Ee.resolve(s3, t.name);
9788
- ui(n, e, i, r);
9801
+ let n = we.resolve(s3, t.name);
9802
+ pi(n, e, i, r);
9789
9803
  }
9790
9804
  };
9791
- var ds = (s3, t, e, i) => {
9792
- mi.readdir(s3, { withFileTypes: true }, (r, n) => {
9805
+ var us = (s3, t, e, i) => {
9806
+ Ei.readdir(s3, { withFileTypes: true }, (r, n) => {
9793
9807
  if (r) {
9794
9808
  if (r.code === "ENOENT") return i();
9795
9809
  if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
9796
9810
  }
9797
- if (r || !n.length) return ui(s3, t, e, i);
9811
+ if (r || !n.length) return pi(s3, t, e, i);
9798
9812
  let o = n.length, h = null, a = (l) => {
9799
9813
  if (!h) {
9800
9814
  if (l) return i(h = l);
9801
- if (--o === 0) return ui(s3, t, e, i);
9815
+ if (--o === 0) return pi(s3, t, e, i);
9802
9816
  }
9803
9817
  };
9804
- for (let l of n) Xn(s3, l, t, e, a);
9818
+ for (let l of n) qn(s3, l, t, e, a);
9805
9819
  });
9806
9820
  };
9807
- var qn = (s3, t, e, i) => {
9808
- t.isDirectory() && us(Ee.resolve(s3, t.name), e, i), fs2(Ee.resolve(s3, t.name), e, i);
9821
+ var jn = (s3, t, e, i) => {
9822
+ t.isDirectory() && ms(we.resolve(s3, t.name), e, i), ds(we.resolve(s3, t.name), e, i);
9809
9823
  };
9810
- var us = (s3, t, e) => {
9824
+ var ms = (s3, t, e) => {
9811
9825
  let i;
9812
9826
  try {
9813
- i = mi.readdirSync(s3, { withFileTypes: true });
9827
+ i = Ei.readdirSync(s3, { withFileTypes: true });
9814
9828
  } catch (r) {
9815
9829
  let n = r;
9816
9830
  if (n?.code === "ENOENT") return;
9817
- if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return fs2(s3, t, e);
9831
+ if (n?.code === "ENOTDIR" || n?.code === "ENOTSUP") return ds(s3, t, e);
9818
9832
  throw n;
9819
9833
  }
9820
- for (let r of i) qn(s3, r, t, e);
9821
- return fs2(s3, t, e);
9834
+ for (let r of i) jn(s3, r, t, e);
9835
+ return ds(s3, t, e);
9822
9836
  };
9823
- var we = class extends Error {
9837
+ var Se = class extends Error {
9824
9838
  path;
9825
9839
  code;
9826
9840
  syscall = "chdir";
@@ -9843,97 +9857,97 @@ var wt = class extends Error {
9843
9857
  return "SymlinkError";
9844
9858
  }
9845
9859
  };
9846
- var Qn = (s3, t) => {
9860
+ var Jn = (s3, t) => {
9847
9861
  k.stat(s3, (e, i) => {
9848
- (e || !i.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
9862
+ (e || !i.isDirectory()) && (e = new Se(s3, e?.code || "ENOTDIR")), t(e);
9849
9863
  });
9850
9864
  };
9851
- var Er = (s3, t, e) => {
9865
+ var wr = (s3, t, e) => {
9852
9866
  s3 = f(s3);
9853
9867
  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) => {
9854
- E ? e(E) : x && a ? ds(x, o, h, (xe) => S(xe)) : n ? k.chmod(s3, r, e) : e();
9868
+ E ? e(E) : x && a ? us(x, o, h, (Le) => S(Le)) : n ? k.chmod(s3, r, e) : e();
9855
9869
  };
9856
- if (s3 === d) return Qn(s3, S);
9857
- if (l) return jn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
9858
- let N = f(pi.relative(d, s3)).split("/");
9859
- ms(d, N, r, c, d, void 0, S);
9870
+ if (s3 === d) return Jn(s3, S);
9871
+ if (l) return Qn.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
9872
+ let N = f(wi.relative(d, s3)).split("/");
9873
+ ps(d, N, r, c, d, void 0, S);
9860
9874
  };
9861
- var ms = (s3, t, e, i, r, n, o) => {
9875
+ var ps = (s3, t, e, i, r, n, o) => {
9862
9876
  if (t.length === 0) return o(null, n);
9863
- let h = t.shift(), a = f(pi.resolve(s3 + "/" + h));
9864
- k.mkdir(a, e, wr(a, t, e, i, r, n, o));
9877
+ let h = t.shift(), a = f(wi.resolve(s3 + "/" + h));
9878
+ k.mkdir(a, e, Sr(a, t, e, i, r, n, o));
9865
9879
  };
9866
- var wr = (s3, t, e, i, r, n, o) => (h) => {
9880
+ var Sr = (s3, t, e, i, r, n, o) => (h) => {
9867
9881
  h ? k.lstat(s3, (a, l) => {
9868
9882
  if (a) a.path = a.path && f(a.path), o(a);
9869
- else if (l.isDirectory()) ms(s3, t, e, i, r, n, o);
9883
+ else if (l.isDirectory()) ps(s3, t, e, i, r, n, o);
9870
9884
  else if (i) k.unlink(s3, (c) => {
9871
9885
  if (c) return o(c);
9872
- k.mkdir(s3, e, wr(s3, t, e, i, r, n, o));
9886
+ k.mkdir(s3, e, Sr(s3, t, e, i, r, n, o));
9873
9887
  });
9874
9888
  else {
9875
9889
  if (l.isSymbolicLink()) return o(new wt(s3, s3 + "/" + t.join("/")));
9876
9890
  o(h);
9877
9891
  }
9878
- }) : (n = n || s3, ms(s3, t, e, i, r, n, o));
9892
+ }) : (n = n || s3, ps(s3, t, e, i, r, n, o));
9879
9893
  };
9880
- var Jn = (s3) => {
9894
+ var to = (s3) => {
9881
9895
  let t = false, e;
9882
9896
  try {
9883
9897
  t = k.statSync(s3).isDirectory();
9884
9898
  } catch (i) {
9885
9899
  e = i?.code;
9886
9900
  } finally {
9887
- if (!t) throw new we(s3, e ?? "ENOTDIR");
9901
+ if (!t) throw new Se(s3, e ?? "ENOTDIR");
9888
9902
  }
9889
9903
  };
9890
- var Sr = (s3, t) => {
9904
+ var yr = (s3, t) => {
9891
9905
  s3 = f(s3);
9892
9906
  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) => {
9893
- E && h && us(E, n, o), r && k.chmodSync(s3, i);
9907
+ E && h && ms(E, n, o), r && k.chmodSync(s3, i);
9894
9908
  };
9895
- if (s3 === c) return Jn(c), d();
9909
+ if (s3 === c) return to(c), d();
9896
9910
  if (a) return d(k.mkdirSync(s3, { mode: i, recursive: true }) ?? void 0);
9897
- let T = f(pi.relative(c, s3)).split("/"), N;
9911
+ let T = f(wi.relative(c, s3)).split("/"), N;
9898
9912
  for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
9899
- x = f(pi.resolve(x));
9913
+ x = f(wi.resolve(x));
9900
9914
  try {
9901
9915
  k.mkdirSync(x, i), N = N || x;
9902
9916
  } catch {
9903
- let xe = k.lstatSync(x);
9904
- if (xe.isDirectory()) continue;
9917
+ let Le = k.lstatSync(x);
9918
+ if (Le.isDirectory()) continue;
9905
9919
  if (l) {
9906
9920
  k.unlinkSync(x), k.mkdirSync(x, i), N = N || x;
9907
9921
  continue;
9908
- } else if (xe.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
9922
+ } else if (Le.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
9909
9923
  }
9910
9924
  }
9911
9925
  return d(N);
9912
9926
  };
9913
- var ps = /* @__PURE__ */ Object.create(null);
9914
- var yr = 1e4;
9927
+ var Es = /* @__PURE__ */ Object.create(null);
9928
+ var Rr = 1e4;
9915
9929
  var $t = /* @__PURE__ */ new Set();
9916
- var Rr = (s3) => {
9917
- $t.has(s3) ? $t.delete(s3) : ps[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
9918
- let t = ps[s3], e = $t.size - yr;
9919
- if (e > yr / 10) {
9920
- for (let i of $t) if ($t.delete(i), delete ps[i], --e <= 0) break;
9930
+ var br = (s3) => {
9931
+ $t.has(s3) ? $t.delete(s3) : Es[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t.add(s3);
9932
+ let t = Es[s3], e = $t.size - Rr;
9933
+ if (e > Rr / 10) {
9934
+ for (let i of $t) if ($t.delete(i), delete Es[i], --e <= 0) break;
9921
9935
  }
9922
9936
  return t;
9923
9937
  };
9924
- var to = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
9925
- var eo = to === "win32";
9926
- var io = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
9938
+ var eo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
9939
+ var io = eo === "win32";
9940
+ var so = (s3) => s3.split("/").slice(0, -1).reduce((e, i) => {
9927
9941
  let r = e.at(-1);
9928
- return r !== void 0 && (i = br(r, i)), e.push(i || "/"), e;
9942
+ return r !== void 0 && (i = gr(r, i)), e.push(i || "/"), e;
9929
9943
  }, []);
9930
- var Ei = class {
9944
+ var Si = class {
9931
9945
  #t = /* @__PURE__ */ new Map();
9932
9946
  #i = /* @__PURE__ */ new Map();
9933
9947
  #s = /* @__PURE__ */ new Set();
9934
9948
  reserve(t, e) {
9935
- t = eo ? ["win32 parallelization disabled"] : t.map((r) => mt(br(Rr(r))));
9936
- let i = new Set(t.map((r) => io(r)).reduce((r, n) => r.concat(n)));
9949
+ t = io ? ["win32 parallelization disabled"] : t.map((r) => mt(gr(br(r))));
9950
+ let i = new Set(t.map((r) => so(r)).reduce((r, n) => r.concat(n)));
9937
9951
  this.#i.set(e, { dirs: i, paths: t });
9938
9952
  for (let r of t) {
9939
9953
  let n = this.#t.get(r);
@@ -9992,54 +10006,54 @@ var Ei = class {
9992
10006
  }
9993
10007
  };
9994
10008
  var _r = () => process.umask();
9995
- var gr = /* @__PURE__ */ Symbol("onEntry");
9996
- var ys = /* @__PURE__ */ Symbol("checkFs");
9997
- var Or = /* @__PURE__ */ Symbol("checkFs2");
9998
- var Rs = /* @__PURE__ */ Symbol("isReusable");
10009
+ var Or = /* @__PURE__ */ Symbol("onEntry");
10010
+ var Rs = /* @__PURE__ */ Symbol("checkFs");
10011
+ var Tr = /* @__PURE__ */ Symbol("checkFs2");
10012
+ var bs = /* @__PURE__ */ Symbol("isReusable");
9999
10013
  var P = /* @__PURE__ */ Symbol("makeFs");
10000
- var bs = /* @__PURE__ */ Symbol("file");
10014
+ var gs = /* @__PURE__ */ Symbol("file");
10001
10015
  var _s = /* @__PURE__ */ Symbol("directory");
10002
- var Si = /* @__PURE__ */ Symbol("link");
10003
- var Tr = /* @__PURE__ */ Symbol("symlink");
10004
- var xr = /* @__PURE__ */ Symbol("hardlink");
10005
- var ye = /* @__PURE__ */ Symbol("ensureNoSymlink");
10006
- var Lr = /* @__PURE__ */ Symbol("unsupported");
10007
- var Nr = /* @__PURE__ */ Symbol("checkPath");
10008
- var Es = /* @__PURE__ */ Symbol("stripAbsolutePath");
10016
+ var Ri = /* @__PURE__ */ Symbol("link");
10017
+ var xr = /* @__PURE__ */ Symbol("symlink");
10018
+ var Lr = /* @__PURE__ */ Symbol("hardlink");
10019
+ var Re = /* @__PURE__ */ Symbol("ensureNoSymlink");
10020
+ var Nr = /* @__PURE__ */ Symbol("unsupported");
10021
+ var Dr = /* @__PURE__ */ Symbol("checkPath");
10022
+ var ws = /* @__PURE__ */ Symbol("stripAbsolutePath");
10009
10023
  var St = /* @__PURE__ */ Symbol("mkdir");
10010
10024
  var O = /* @__PURE__ */ Symbol("onError");
10011
- var wi = /* @__PURE__ */ Symbol("pending");
10025
+ var yi = /* @__PURE__ */ Symbol("pending");
10012
10026
  var Ar = /* @__PURE__ */ Symbol("pend");
10013
10027
  var Xt = /* @__PURE__ */ Symbol("unpend");
10014
- var ws = /* @__PURE__ */ Symbol("ended");
10015
- var Ss = /* @__PURE__ */ Symbol("maybeClose");
10016
- var gs = /* @__PURE__ */ Symbol("skip");
10017
- var Re = /* @__PURE__ */ Symbol("doChown");
10018
- var be = /* @__PURE__ */ Symbol("uid");
10028
+ var Ss = /* @__PURE__ */ Symbol("ended");
10029
+ var ys = /* @__PURE__ */ Symbol("maybeClose");
10030
+ var Os = /* @__PURE__ */ Symbol("skip");
10031
+ var be = /* @__PURE__ */ Symbol("doChown");
10032
+ var ge = /* @__PURE__ */ Symbol("uid");
10019
10033
  var _e = /* @__PURE__ */ Symbol("gid");
10020
- var ge = /* @__PURE__ */ Symbol("checkedCwd");
10021
- var ro = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
10022
- var Oe = ro === "win32";
10023
- var no = 1024;
10024
- var oo = (s3, t) => {
10025
- if (!Oe) return u.unlink(s3, t);
10026
- let e = s3 + ".DELETE." + Ir(16).toString("hex");
10034
+ var Oe = /* @__PURE__ */ Symbol("checkedCwd");
10035
+ var no = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
10036
+ var Te = no === "win32";
10037
+ var oo = 1024;
10038
+ var ho = (s3, t) => {
10039
+ if (!Te) return u.unlink(s3, t);
10040
+ let e = s3 + ".DELETE." + Cr(16).toString("hex");
10027
10041
  u.rename(s3, e, (i) => {
10028
10042
  if (i) return t(i);
10029
10043
  u.unlink(e, t);
10030
10044
  });
10031
10045
  };
10032
- var ho = (s3) => {
10033
- if (!Oe) return u.unlinkSync(s3);
10034
- let t = s3 + ".DELETE." + Ir(16).toString("hex");
10046
+ var ao = (s3) => {
10047
+ if (!Te) return u.unlinkSync(s3);
10048
+ let t = s3 + ".DELETE." + Cr(16).toString("hex");
10035
10049
  u.renameSync(s3, t), u.unlinkSync(t);
10036
10050
  };
10037
- var Dr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
10051
+ var Ir = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
10038
10052
  var qt = class extends st {
10039
- [ws] = false;
10040
- [ge] = false;
10041
- [wi] = 0;
10042
- reservations = new Ei();
10053
+ [Ss] = false;
10054
+ [Oe] = false;
10055
+ [yi] = 0;
10056
+ reservations = new Si();
10043
10057
  transform;
10044
10058
  writable = true;
10045
10059
  readable = false;
@@ -10066,32 +10080,32 @@ var qt = class extends st {
10066
10080
  chmod;
10067
10081
  constructor(t = {}) {
10068
10082
  if (t.ondone = () => {
10069
- this[ws] = true, this[Ss]();
10083
+ this[Ss] = true, this[ys]();
10070
10084
  }, super(t), this.transform = t.transform, this.chmod = !!t.chmod, typeof t.uid == "number" || typeof t.gid == "number") {
10071
10085
  if (typeof t.uid != "number" || typeof t.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
10072
10086
  if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
10073
10087
  this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
10074
10088
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
10075
- this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : no, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(R.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : _r() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[gr](e));
10089
+ 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));
10076
10090
  }
10077
10091
  warn(t, e, i = {}) {
10078
10092
  return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
10079
10093
  }
10080
- [Ss]() {
10081
- this[ws] && this[wi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
10094
+ [ys]() {
10095
+ this[Ss] && this[yi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
10082
10096
  }
10083
- [Es](t, e) {
10097
+ [ws](t, e) {
10084
10098
  let i = t[e], { type: r } = t;
10085
10099
  if (!i || this.preservePaths) return true;
10086
10100
  let [n, o] = ce(i), h = o.replaceAll(/\\/g, "/").split("/");
10087
- if (h.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
10101
+ if (h.includes("..") || Te && /^[a-z]:\.\.$/i.test(h[0] ?? "")) {
10088
10102
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i }), false;
10089
10103
  let a = R.posix.dirname(t.path), l = R.posix.normalize(R.posix.join(a, h.join("/")));
10090
10104
  if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i }), false;
10091
10105
  }
10092
10106
  return n && (t[e] = String(o), this.warn("TAR_ENTRY_INFO", `stripping ${n} from absolute ${e}`, { entry: t, [e]: i })), true;
10093
10107
  }
10094
- [Nr](t) {
10108
+ [Dr](t) {
10095
10109
  let e = f(t.path), i = e.split("/");
10096
10110
  if (this.strip) {
10097
10111
  if (i.length < this.strip) return false;
@@ -10103,20 +10117,20 @@ var qt = class extends st {
10103
10117
  i.splice(0, this.strip), t.path = i.join("/");
10104
10118
  }
10105
10119
  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;
10106
- if (!this[Es](t, "path") || !this[Es](t, "linkpath")) return false;
10120
+ if (!this[ws](t, "path") || !this[ws](t, "linkpath")) return false;
10107
10121
  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;
10108
10122
  if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
10109
10123
  if (this.win32) {
10110
10124
  let { root: r } = R.win32.parse(String(t.absolute));
10111
- t.absolute = r + Xi(String(t.absolute).slice(r.length));
10125
+ t.absolute = r + ji(String(t.absolute).slice(r.length));
10112
10126
  let { root: n } = R.win32.parse(t.path);
10113
- t.path = n + Xi(t.path.slice(n.length));
10127
+ t.path = n + ji(t.path.slice(n.length));
10114
10128
  }
10115
10129
  return true;
10116
10130
  }
10117
- [gr](t) {
10118
- if (!this[Nr](t)) return t.resume();
10119
- switch (so.equal(typeof t.absolute, "string"), t.type) {
10131
+ [Or](t) {
10132
+ if (!this[Dr](t)) return t.resume();
10133
+ switch (ro.equal(typeof t.absolute, "string"), t.type) {
10120
10134
  case "Directory":
10121
10135
  case "GNUDumpDir":
10122
10136
  t.mode && (t.mode = t.mode | 448);
@@ -10125,28 +10139,28 @@ var qt = class extends st {
10125
10139
  case "ContiguousFile":
10126
10140
  case "Link":
10127
10141
  case "SymbolicLink":
10128
- return this[ys](t);
10142
+ return this[Rs](t);
10129
10143
  default:
10130
- return this[Lr](t);
10144
+ return this[Nr](t);
10131
10145
  }
10132
10146
  }
10133
10147
  [O](t, e) {
10134
10148
  t.name === "CwdError" ? this.emit("error", t) : (this.warn("TAR_ENTRY_ERROR", t, { entry: e }), this[Xt](), e.resume());
10135
10149
  }
10136
10150
  [St](t, e, i) {
10137
- Er(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e }, i);
10151
+ 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);
10138
10152
  }
10139
- [Re](t) {
10153
+ [be](t) {
10140
10154
  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;
10141
10155
  }
10142
- [be](t) {
10143
- return Dr(this.uid, t.uid, this.processUid);
10156
+ [ge](t) {
10157
+ return Ir(this.uid, t.uid, this.processUid);
10144
10158
  }
10145
10159
  [_e](t) {
10146
- return Dr(this.gid, t.gid, this.processGid);
10160
+ return Ir(this.gid, t.gid, this.processGid);
10147
10161
  }
10148
- [bs](t, e) {
10149
- let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt2(String(t.absolute), { flags: cs(t.size), mode: i, autoClose: false });
10162
+ [gs](t, e) {
10163
+ 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 });
10150
10164
  r.on("error", (a) => {
10151
10165
  r.fd && u.close(r.fd, () => {
10152
10166
  }), r.write = () => true, this[O](a, t), e();
@@ -10168,9 +10182,9 @@ var qt = class extends st {
10168
10182
  let c = t.atime || /* @__PURE__ */ new Date(), d = t.mtime;
10169
10183
  u.futimes(l, c, d, (S) => S ? u.utimes(a, c, d, (T) => o(T && S)) : o());
10170
10184
  }
10171
- if (typeof l == "number" && this[Re](t)) {
10185
+ if (typeof l == "number" && this[be](t)) {
10172
10186
  n++;
10173
- let c = this[be](t), d = this[_e](t);
10187
+ let c = this[ge](t), d = this[_e](t);
10174
10188
  typeof c == "number" && typeof d == "number" && u.fchown(l, c, d, (S) => S ? u.chown(a, c, d, (T) => o(T && S)) : o());
10175
10189
  }
10176
10190
  o();
@@ -10190,52 +10204,52 @@ var qt = class extends st {
10190
10204
  let n = 1, o = () => {
10191
10205
  --n === 0 && (e(), this[Xt](), t.resume());
10192
10206
  };
10193
- t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, u.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
10207
+ t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[be](t) && (n++, u.chown(String(t.absolute), Number(this[ge](t)), Number(this[_e](t)), o)), o();
10194
10208
  });
10195
10209
  }
10196
- [Lr](t) {
10210
+ [Nr](t) {
10197
10211
  t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
10198
10212
  }
10199
- [Tr](t, e) {
10213
+ [xr](t, e) {
10200
10214
  let i = f(R.relative(this.cwd, R.resolve(R.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
10201
- this[ye](t, this.cwd, i, () => this[Si](t, String(t.linkpath), "symlink", e), (r) => {
10215
+ this[Re](t, this.cwd, i, () => this[Ri](t, String(t.linkpath), "symlink", e), (r) => {
10202
10216
  this[O](r, t), e();
10203
10217
  });
10204
10218
  }
10205
- [xr](t, e) {
10219
+ [Lr](t, e) {
10206
10220
  let i = f(R.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
10207
- this[ye](t, this.cwd, r, () => this[Si](t, i, "link", e), (n) => {
10221
+ this[Re](t, this.cwd, r, () => this[Ri](t, i, "link", e), (n) => {
10208
10222
  this[O](n, t), e();
10209
10223
  });
10210
10224
  }
10211
- [ye](t, e, i, r, n) {
10225
+ [Re](t, e, i, r, n) {
10212
10226
  let o = i.shift();
10213
10227
  if (this.preservePaths || o === void 0) return r();
10214
10228
  let h = R.resolve(e, o);
10215
10229
  u.lstat(h, (a, l) => {
10216
10230
  if (a) return r();
10217
10231
  if (l?.isSymbolicLink()) return n(new wt(h, R.resolve(h, i.join("/"))));
10218
- this[ye](t, h, i, r, n);
10232
+ this[Re](t, h, i, r, n);
10219
10233
  });
10220
10234
  }
10221
10235
  [Ar]() {
10222
- this[wi]++;
10236
+ this[yi]++;
10223
10237
  }
10224
10238
  [Xt]() {
10225
- this[wi]--, this[Ss]();
10239
+ this[yi]--, this[ys]();
10226
10240
  }
10227
- [gs](t) {
10241
+ [Os](t) {
10228
10242
  this[Xt](), t.resume();
10229
10243
  }
10230
- [Rs](t, e) {
10231
- return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe;
10244
+ [bs](t, e) {
10245
+ return t.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Te;
10232
10246
  }
10233
- [ys](t) {
10247
+ [Rs](t) {
10234
10248
  this[Ar]();
10235
10249
  let e = [t.path];
10236
- t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Or](t, i));
10250
+ t.linkpath && e.push(t.linkpath), this.reservations.reserve(e, (i) => this[Tr](t, i));
10237
10251
  }
10238
- [Or](t, e) {
10252
+ [Tr](t, e) {
10239
10253
  let i = (h) => {
10240
10254
  e(h);
10241
10255
  }, r = () => {
@@ -10244,7 +10258,7 @@ var qt = class extends st {
10244
10258
  this[O](h, t), i();
10245
10259
  return;
10246
10260
  }
10247
- this[ge] = true, n();
10261
+ this[Oe] = true, n();
10248
10262
  });
10249
10263
  }, n = () => {
10250
10264
  if (t.absolute !== this.cwd) {
@@ -10261,10 +10275,10 @@ var qt = class extends st {
10261
10275
  }, o = () => {
10262
10276
  u.lstat(String(t.absolute), (h, a) => {
10263
10277
  if (a && (this.keep || this.newer && a.mtime > (t.mtime ?? a.mtime))) {
10264
- this[gs](t), i();
10278
+ this[Os](t), i();
10265
10279
  return;
10266
10280
  }
10267
- if (h || this[Rs](t, a)) return this[P](null, t, i);
10281
+ if (h || this[bs](t, a)) return this[P](null, t, i);
10268
10282
  if (a.isDirectory()) {
10269
10283
  if (t.type === "Directory") {
10270
10284
  let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
@@ -10273,10 +10287,10 @@ var qt = class extends st {
10273
10287
  if (t.absolute !== this.cwd) return u.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
10274
10288
  }
10275
10289
  if (t.absolute === this.cwd) return this[P](null, t, i);
10276
- oo(String(t.absolute), (l) => this[P](l ?? null, t, i));
10290
+ ho(String(t.absolute), (l) => this[P](l ?? null, t, i));
10277
10291
  });
10278
10292
  };
10279
- this[ge] ? n() : r();
10293
+ this[Oe] ? n() : r();
10280
10294
  }
10281
10295
  [P](t, e, i) {
10282
10296
  if (t) {
@@ -10287,40 +10301,40 @@ var qt = class extends st {
10287
10301
  case "File":
10288
10302
  case "OldFile":
10289
10303
  case "ContiguousFile":
10290
- return this[bs](e, i);
10304
+ return this[gs](e, i);
10291
10305
  case "Link":
10292
- return this[xr](e, i);
10306
+ return this[Lr](e, i);
10293
10307
  case "SymbolicLink":
10294
- return this[Tr](e, i);
10308
+ return this[xr](e, i);
10295
10309
  case "Directory":
10296
10310
  case "GNUDumpDir":
10297
10311
  return this[_s](e, i);
10298
10312
  }
10299
10313
  }
10300
- [Si](t, e, i, r) {
10314
+ [Ri](t, e, i, r) {
10301
10315
  u[i](e, String(t.absolute), (n) => {
10302
10316
  n ? this[O](n, t) : (this[Xt](), t.resume()), r();
10303
10317
  });
10304
10318
  }
10305
10319
  };
10306
- var Se = (s3) => {
10320
+ var ye = (s3) => {
10307
10321
  try {
10308
10322
  return [null, s3()];
10309
10323
  } catch (t) {
10310
10324
  return [t, null];
10311
10325
  }
10312
10326
  };
10313
- var Te = class extends qt {
10327
+ var xe = class extends qt {
10314
10328
  sync = true;
10315
10329
  [P](t, e) {
10316
10330
  return super[P](t, e, () => {
10317
10331
  });
10318
10332
  }
10319
- [ys](t) {
10320
- if (!this[ge]) {
10333
+ [Rs](t) {
10334
+ if (!this[Oe]) {
10321
10335
  let n = this[St](this.cwd, this.dmode);
10322
10336
  if (n) return this[O](n, t);
10323
- this[ge] = true;
10337
+ this[Oe] = true;
10324
10338
  }
10325
10339
  if (t.absolute !== this.cwd) {
10326
10340
  let n = f(R.dirname(String(t.absolute)));
@@ -10329,23 +10343,23 @@ var Te = class extends qt {
10329
10343
  if (o) return this[O](o, t);
10330
10344
  }
10331
10345
  }
10332
- let [e, i] = Se(() => u.lstatSync(String(t.absolute)));
10333
- if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[gs](t);
10334
- if (e || this[Rs](t, i)) return this[P](null, t);
10346
+ let [e, i] = ye(() => u.lstatSync(String(t.absolute)));
10347
+ if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Os](t);
10348
+ if (e || this[bs](t, i)) return this[P](null, t);
10335
10349
  if (i.isDirectory()) {
10336
10350
  if (t.type === "Directory") {
10337
- let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? Se(() => {
10351
+ let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? ye(() => {
10338
10352
  u.chmodSync(String(t.absolute), Number(t.mode));
10339
10353
  }) : [];
10340
10354
  return this[P](h, t);
10341
10355
  }
10342
- let [n] = Se(() => u.rmdirSync(String(t.absolute)));
10356
+ let [n] = ye(() => u.rmdirSync(String(t.absolute)));
10343
10357
  this[P](n, t);
10344
10358
  }
10345
- let [r] = t.absolute === this.cwd ? [] : Se(() => ho(String(t.absolute)));
10359
+ let [r] = t.absolute === this.cwd ? [] : ye(() => ao(String(t.absolute)));
10346
10360
  this[P](r, t);
10347
10361
  }
10348
- [bs](t, e) {
10362
+ [gs](t, e) {
10349
10363
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
10350
10364
  let a;
10351
10365
  try {
@@ -10356,7 +10370,7 @@ var Te = class extends qt {
10356
10370
  (h || a) && this[O](h || a, t), e();
10357
10371
  }, n;
10358
10372
  try {
10359
- n = u.openSync(String(t.absolute), cs(t.size), i);
10373
+ n = u.openSync(String(t.absolute), fs2(t.size), i);
10360
10374
  } catch (h) {
10361
10375
  return r(h);
10362
10376
  }
@@ -10381,8 +10395,8 @@ var Te = class extends qt {
10381
10395
  }
10382
10396
  }
10383
10397
  }
10384
- if (this[Re](t)) {
10385
- let a = this[be](t), l = this[_e](t);
10398
+ if (this[be](t)) {
10399
+ let a = this[ge](t), l = this[_e](t);
10386
10400
  try {
10387
10401
  u.fchownSync(n, Number(a), Number(l));
10388
10402
  } catch (c) {
@@ -10406,31 +10420,31 @@ var Te = class extends qt {
10406
10420
  u.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
10407
10421
  } catch {
10408
10422
  }
10409
- if (this[Re](t)) try {
10410
- u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
10423
+ if (this[be](t)) try {
10424
+ u.chownSync(String(t.absolute), Number(this[ge](t)), Number(this[_e](t)));
10411
10425
  } catch {
10412
10426
  }
10413
10427
  e(), t.resume();
10414
10428
  }
10415
10429
  [St](t, e) {
10416
10430
  try {
10417
- return Sr(f(t), { uid: this.uid, gid: this.gid, processUid: this.processUid, processGid: this.processGid, umask: this.processUmask, preserve: this.preservePaths, unlink: this.unlink, cwd: this.cwd, mode: e });
10431
+ 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 });
10418
10432
  } catch (i) {
10419
10433
  return i;
10420
10434
  }
10421
10435
  }
10422
- [ye](t, e, i, r, n) {
10436
+ [Re](t, e, i, r, n) {
10423
10437
  if (this.preservePaths || i.length === 0) return r();
10424
10438
  let o = e;
10425
10439
  for (let h of i) {
10426
10440
  o = R.resolve(o, h);
10427
- let [a, l] = Se(() => u.lstatSync(o));
10441
+ let [a, l] = ye(() => u.lstatSync(o));
10428
10442
  if (a) return r();
10429
10443
  if (l.isSymbolicLink()) return n(new wt(o, R.resolve(e, i.join("/"))));
10430
10444
  }
10431
10445
  r();
10432
10446
  }
10433
- [Si](t, e, i, r) {
10447
+ [Ri](t, e, i, r) {
10434
10448
  let n = `${i}Sync`;
10435
10449
  try {
10436
10450
  u[n](e, String(t.absolute)), r(), t.resume();
@@ -10439,26 +10453,26 @@ var Te = class extends qt {
10439
10453
  }
10440
10454
  }
10441
10455
  };
10442
- var ao = (s3) => {
10443
- let t = new Te(s3), e = s3.file, i = Cr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
10444
- new Me(e, { readSize: r, size: i.size }).pipe(t);
10456
+ var lo = (s3) => {
10457
+ let t = new xe(s3), e = s3.file, i = Fr.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
10458
+ new Be(e, { readSize: r, size: i.size }).pipe(t);
10445
10459
  };
10446
- var lo = (s3, t) => {
10460
+ var co = (s3, t) => {
10447
10461
  let e = new qt(s3), i = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
10448
10462
  return new Promise((o, h) => {
10449
- e.on("error", h), e.on("close", o), Cr.stat(r, (a, l) => {
10463
+ e.on("error", h), e.on("close", o), Fr.stat(r, (a, l) => {
10450
10464
  if (a) h(a);
10451
10465
  else {
10452
- let c = new _t(r, { readSize: i, size: l.size });
10466
+ let c = new gt(r, { readSize: i, size: l.size });
10453
10467
  c.on("error", h), c.pipe(e);
10454
10468
  }
10455
10469
  });
10456
10470
  });
10457
10471
  };
10458
- var co = K(ao, lo, (s3) => new Te(s3), (s3) => new qt(s3), (s3, t) => {
10459
- t?.length && Ki(s3, t);
10472
+ var fo = K(lo, co, (s3) => new xe(s3), (s3) => new qt(s3), (s3, t) => {
10473
+ t?.length && $i(s3, t);
10460
10474
  });
10461
- var fo = (s3, t) => {
10475
+ var uo = (s3, t) => {
10462
10476
  let e = new kt(s3), i = true, r, n;
10463
10477
  try {
10464
10478
  try {
@@ -10479,7 +10493,7 @@ var fo = (s3, t) => {
10479
10493
  if (n + l + 512 > o.size) break;
10480
10494
  n += l, s3.mtimeCache && a.mtime && s3.mtimeCache.set(String(a.path), a.mtime);
10481
10495
  }
10482
- i = false, uo(s3, e, n, r, t);
10496
+ i = false, mo(s3, e, n, r, t);
10483
10497
  } finally {
10484
10498
  if (i) try {
10485
10499
  v.closeSync(r);
@@ -10487,11 +10501,11 @@ var fo = (s3, t) => {
10487
10501
  }
10488
10502
  }
10489
10503
  };
10490
- var uo = (s3, t, e, i, r) => {
10504
+ var mo = (s3, t, e, i, r) => {
10491
10505
  let n = new Wt(s3.file, { fd: i, start: e });
10492
- t.pipe(n), po(t, r);
10506
+ t.pipe(n), Eo(t, r);
10493
10507
  };
10494
- var mo = (s3, t) => {
10508
+ var po = (s3, t) => {
10495
10509
  t = Array.from(t);
10496
10510
  let e = new Et(s3), i = (n, o, h) => {
10497
10511
  let a = (T, N) => {
@@ -10521,35 +10535,35 @@ var mo = (s3, t) => {
10521
10535
  i(c, S.size, (T, N) => {
10522
10536
  if (T) return o(T);
10523
10537
  let E = new tt2(s3.file, { fd: c, start: N });
10524
- e.pipe(E), E.on("error", o), E.on("close", n), Eo(e, t);
10538
+ e.pipe(E), E.on("error", o), E.on("close", n), wo(e, t);
10525
10539
  });
10526
10540
  });
10527
10541
  };
10528
10542
  v.open(s3.file, h, a);
10529
10543
  });
10530
10544
  };
10531
- var po = (s3, t) => {
10545
+ var Eo = (s3, t) => {
10532
10546
  t.forEach((e) => {
10533
- e.charAt(0) === "@" ? It({ file: Fr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10547
+ e.charAt(0) === "@" ? It({ file: kr.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10534
10548
  }), s3.end();
10535
10549
  };
10536
- var Eo = async (s3, t) => {
10537
- for (let e of t) e.charAt(0) === "@" ? await It({ file: Fr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10550
+ var wo = async (s3, t) => {
10551
+ for (let e of t) e.charAt(0) === "@" ? await It({ file: kr.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i) => s3.add(i) }) : s3.add(e);
10538
10552
  s3.end();
10539
10553
  };
10540
- var vt = K(fo, mo, () => {
10554
+ var vt = K(uo, po, () => {
10541
10555
  throw new TypeError("file is required");
10542
10556
  }, () => {
10543
10557
  throw new TypeError("file is required");
10544
10558
  }, (s3, t) => {
10545
- if (!Fs(s3)) throw new TypeError("file is required");
10559
+ if (!ks(s3)) throw new TypeError("file is required");
10546
10560
  if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
10547
10561
  if (!t?.length) throw new TypeError("no paths specified to add/replace");
10548
10562
  });
10549
- var wo = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
10550
- vt.validate?.(s3, t), So(s3);
10563
+ var So = K(vt.syncFile, vt.asyncFile, vt.syncNoFile, vt.asyncNoFile, (s3, t = []) => {
10564
+ vt.validate?.(s3, t), yo(s3);
10551
10565
  });
10552
- var So = (s3) => {
10566
+ var yo = (s3) => {
10553
10567
  let t = s3.filter;
10554
10568
  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));
10555
10569
  };
@@ -10889,7 +10903,7 @@ var escapeArgument = (argument) => escapeFile(escapeFile(`"${argument.replaceAll
10889
10903
  var escapeFile = (file) => file.replaceAll(/([()\][%!^"`<>&|;, *?])/g, "^$1");
10890
10904
 
10891
10905
  // node_modules/nano-spawn/source/result.js
10892
- import { once, on } from "node:events";
10906
+ import { once, on as on2 } from "node:events";
10893
10907
  import process6 from "node:process";
10894
10908
  var getResult = async (nodeChildProcess, options, context) => {
10895
10909
  const instance = await nodeChildProcess;
@@ -10910,7 +10924,7 @@ var getResult = async (nodeChildProcess, options, context) => {
10910
10924
  }
10911
10925
  };
10912
10926
  var onStreamError = async (stream) => {
10913
- for await (const [error] of on(stream, "error")) {
10927
+ for await (const [error] of on2(stream, "error")) {
10914
10928
  if (!["ERR_STREAM_PREMATURE_CLOSE", "EPIPE"].includes(error?.code)) {
10915
10929
  throw error;
10916
10930
  }