create-nextly-app 0.0.2-alpha.35 → 0.0.2-alpha.39

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.
@@ -7,21 +7,21 @@ import { AsyncLocalStorage } from 'async_hooks';
7
7
  import crypto, { createHash, randomBytes } from 'crypto';
8
8
  import { promisify, styleText, debuglog, callbackify, aborted, inspect, stripVTControlCharacters, isDeepStrictEqual } from 'util';
9
9
  import process4, { hrtime, execPath, execArgv, platform, stdin, stdout } from 'process';
10
- import Mi from 'assert';
10
+ import zi from 'assert';
11
11
  import os, { constants, arch, platform as platform$1 } from 'os';
12
12
  import tty, { ReadStream } from 'tty';
13
13
  import { fileURLToPath } from 'url';
14
14
  import { execFile, spawn, spawnSync, ChildProcess } from 'child_process';
15
15
  import { StringDecoder } from 'string_decoder';
16
16
  import { scheduler, setTimeout as setTimeout$1, setImmediate } from 'timers/promises';
17
- import Kr, { on, EventEmitter, setMaxListeners, once, addAbortListener } from 'events';
17
+ import Qr, { on, EventEmitter, setMaxListeners, once, addAbortListener } from 'events';
18
18
  import { serialize } from 'v8';
19
19
  import { finished, pipeline } from 'stream/promises';
20
- import Ns, { getDefaultHighWaterMark, Duplex, Writable, Readable, PassThrough, Transform } from 'stream';
20
+ import Cs, { getDefaultHighWaterMark, Duplex, Writable, Readable, PassThrough, Transform } from 'stream';
21
21
  import { Buffer as Buffer$1 } from 'buffer';
22
- import * as ks from 'zlib';
23
- import ks__default from 'zlib';
24
- import jn from 'fs/promises';
22
+ import * as Ps from 'zlib';
23
+ import Ps__default from 'zlib';
24
+ import ro from 'fs/promises';
25
25
 
26
26
  const require$1 = createRequire(import.meta.url);
27
27
  var __create = Object.create;
@@ -63,16 +63,16 @@ var require_src = __commonJS({
63
63
  var CSI = `${ESC}[`;
64
64
  var beep = "\x07";
65
65
  var cursor = {
66
- to(x3, y3) {
67
- if (!y3) return `${CSI}${x3 + 1}G`;
68
- return `${CSI}${y3 + 1};${x3 + 1}H`;
66
+ to(x3, y2) {
67
+ if (!y2) return `${CSI}${x3 + 1}G`;
68
+ return `${CSI}${y2 + 1};${x3 + 1}H`;
69
69
  },
70
- move(x3, y3) {
70
+ move(x3, y2) {
71
71
  let ret = "";
72
72
  if (x3 < 0) ret += `${CSI}${-x3}D`;
73
73
  else if (x3 > 0) ret += `${CSI}${x3}C`;
74
- if (y3 < 0) ret += `${CSI}${-y3}A`;
75
- else if (y3 > 0) ret += `${CSI}${y3}B`;
74
+ if (y2 < 0) ret += `${CSI}${-y2}A`;
75
+ else if (y2 > 0) ret += `${CSI}${y2}B`;
76
76
  return ret;
77
77
  },
78
78
  up: (count2 = 1) => `${CSI}${count2}A`,
@@ -114,26 +114,26 @@ var require_src = __commonJS({
114
114
  // ../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
115
115
  var require_universalify = __commonJS({
116
116
  "../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports$1) {
117
- exports$1.fromCallback = function(fn2) {
117
+ exports$1.fromCallback = function(fn) {
118
118
  return Object.defineProperty(function(...args) {
119
- if (typeof args[args.length - 1] === "function") fn2.apply(this, args);
119
+ if (typeof args[args.length - 1] === "function") fn.apply(this, args);
120
120
  else {
121
121
  return new Promise((resolve, reject) => {
122
122
  args.push((err, res) => err != null ? reject(err) : resolve(res));
123
- fn2.apply(this, args);
123
+ fn.apply(this, args);
124
124
  });
125
125
  }
126
- }, "name", { value: fn2.name });
126
+ }, "name", { value: fn.name });
127
127
  };
128
- exports$1.fromPromise = function(fn2) {
128
+ exports$1.fromPromise = function(fn) {
129
129
  return Object.defineProperty(function(...args) {
130
130
  const cb = args[args.length - 1];
131
- if (typeof cb !== "function") return fn2.apply(this, args);
131
+ if (typeof cb !== "function") return fn.apply(this, args);
132
132
  else {
133
133
  args.pop();
134
- fn2.apply(this, args).then((r) => cb(null, r), cb);
134
+ fn.apply(this, args).then((r) => cb(null, r), cb);
135
135
  }
136
- }, "name", { value: fn2.name });
136
+ }, "name", { value: fn.name });
137
137
  };
138
138
  }
139
139
  });
@@ -883,16 +883,16 @@ var require_graceful_fs = __commonJS({
883
883
  if (fs16[gracefulQueue].length === 0)
884
884
  return;
885
885
  var elem = fs16[gracefulQueue].shift();
886
- var fn2 = elem[0];
886
+ var fn = elem[0];
887
887
  var args = elem[1];
888
888
  var err = elem[2];
889
889
  var startTime = elem[3];
890
890
  var lastTime = elem[4];
891
891
  if (startTime === void 0) {
892
- debug("RETRY", fn2.name, args);
893
- fn2.apply(null, args);
892
+ debug("RETRY", fn.name, args);
893
+ fn.apply(null, args);
894
894
  } else if (Date.now() - startTime >= 6e4) {
895
- debug("TIMEOUT", fn2.name, args);
895
+ debug("TIMEOUT", fn.name, args);
896
896
  var cb = args.pop();
897
897
  if (typeof cb === "function")
898
898
  cb.call(null, err);
@@ -901,8 +901,8 @@ var require_graceful_fs = __commonJS({
901
901
  var sinceStart = Math.max(lastTime - startTime, 1);
902
902
  var desiredDelay = Math.min(sinceStart * 1.2, 100);
903
903
  if (sinceAttempt >= desiredDelay) {
904
- debug("RETRY", fn2.name, args);
905
- fn2.apply(null, args.concat([startTime]));
904
+ debug("RETRY", fn.name, args);
905
+ fn.apply(null, args.concat([startTime]));
906
906
  } else {
907
907
  fs16[gracefulQueue].push(elem);
908
908
  }
@@ -1273,11 +1273,11 @@ var require_stat = __commonJS({
1273
1273
  // ../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/util/async.js
1274
1274
  var require_async = __commonJS({
1275
1275
  "../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/util/async.js"(exports$1, module) {
1276
- async function asyncIteratorConcurrentProcess(iterator, fn2) {
1276
+ async function asyncIteratorConcurrentProcess(iterator, fn) {
1277
1277
  const promises = [];
1278
1278
  for await (const item of iterator) {
1279
1279
  promises.push(
1280
- fn2(item).then(
1280
+ fn(item).then(
1281
1281
  () => null,
1282
1282
  (err) => err ?? new Error("unknown error")
1283
1283
  )
@@ -3895,7 +3895,7 @@ var require_codegen = __commonJS2({
3895
3895
  }
3896
3896
  exports$1.or = or2;
3897
3897
  function mappend(op) {
3898
- return (x3, y3) => x3 === code_1.nil ? y3 : y3 === code_1.nil ? x3 : (0, code_1._)`${par(x3)} ${op} ${par(y3)}`;
3898
+ return (x3, y2) => x3 === code_1.nil ? y2 : y2 === code_1.nil ? x3 : (0, code_1._)`${par(x3)} ${op} ${par(y2)}`;
3899
3899
  }
3900
3900
  function par(x3) {
3901
3901
  return x3 instanceof code_1.Name ? x3 : (0, code_1._)`(${x3})`;
@@ -5897,9 +5897,12 @@ var require_data = __commonJS2({
5897
5897
  }
5898
5898
  });
5899
5899
  var require_utils = __commonJS2({
5900
- "../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js"(exports$1, module) {
5900
+ "../../node_modules/.pnpm/fast-uri@3.1.3/node_modules/fast-uri/lib/utils.js"(exports$1, module) {
5901
5901
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
5902
5902
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
5903
+ var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
5904
+ var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
5905
+ var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
5903
5906
  function stringArrayToHexStripped(input) {
5904
5907
  let acc = "";
5905
5908
  let code = 0;
@@ -6092,27 +6095,77 @@ var require_utils = __commonJS2({
6092
6095
  }
6093
6096
  return output.join("");
6094
6097
  }
6095
- function normalizeComponentEncoding(component, esc) {
6096
- const func = esc !== true ? escape : unescape;
6097
- if (component.scheme !== void 0) {
6098
- component.scheme = func(component.scheme);
6099
- }
6100
- if (component.userinfo !== void 0) {
6101
- component.userinfo = func(component.userinfo);
6102
- }
6103
- if (component.host !== void 0) {
6104
- component.host = func(component.host);
6098
+ var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
6099
+ var HOST_DELIM_RE = /[@/?#:]/g;
6100
+ var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
6101
+ function reescapeHostDelimiters(host, isIP) {
6102
+ const re3 = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
6103
+ re3.lastIndex = 0;
6104
+ return host.replace(re3, (ch) => HOST_DELIMS[ch]);
6105
+ }
6106
+ function normalizePercentEncoding(input, decodeUnreserved = false) {
6107
+ if (input.indexOf("%") === -1) {
6108
+ return input;
6105
6109
  }
6106
- if (component.path !== void 0) {
6107
- component.path = func(component.path);
6110
+ let output = "";
6111
+ for (let i2 = 0; i2 < input.length; i2++) {
6112
+ if (input[i2] === "%" && i2 + 2 < input.length) {
6113
+ const hex = input.slice(i2 + 1, i2 + 3);
6114
+ if (isHexPair(hex)) {
6115
+ const normalizedHex = hex.toUpperCase();
6116
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
6117
+ if (decodeUnreserved && isUnreserved(decoded)) {
6118
+ output += decoded;
6119
+ } else {
6120
+ output += "%" + normalizedHex;
6121
+ }
6122
+ i2 += 2;
6123
+ continue;
6124
+ }
6125
+ }
6126
+ output += input[i2];
6108
6127
  }
6109
- if (component.query !== void 0) {
6110
- component.query = func(component.query);
6128
+ return output;
6129
+ }
6130
+ function normalizePathEncoding(input) {
6131
+ let output = "";
6132
+ for (let i2 = 0; i2 < input.length; i2++) {
6133
+ if (input[i2] === "%" && i2 + 2 < input.length) {
6134
+ const hex = input.slice(i2 + 1, i2 + 3);
6135
+ if (isHexPair(hex)) {
6136
+ const normalizedHex = hex.toUpperCase();
6137
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
6138
+ if (decoded !== "." && isUnreserved(decoded)) {
6139
+ output += decoded;
6140
+ } else {
6141
+ output += "%" + normalizedHex;
6142
+ }
6143
+ i2 += 2;
6144
+ continue;
6145
+ }
6146
+ }
6147
+ if (isPathCharacter(input[i2])) {
6148
+ output += input[i2];
6149
+ } else {
6150
+ output += escape(input[i2]);
6151
+ }
6111
6152
  }
6112
- if (component.fragment !== void 0) {
6113
- component.fragment = func(component.fragment);
6153
+ return output;
6154
+ }
6155
+ function escapePreservingEscapes(input) {
6156
+ let output = "";
6157
+ for (let i2 = 0; i2 < input.length; i2++) {
6158
+ if (input[i2] === "%" && i2 + 2 < input.length) {
6159
+ const hex = input.slice(i2 + 1, i2 + 3);
6160
+ if (isHexPair(hex)) {
6161
+ output += "%" + hex.toUpperCase();
6162
+ i2 += 2;
6163
+ continue;
6164
+ }
6165
+ }
6166
+ output += escape(input[i2]);
6114
6167
  }
6115
- return component;
6168
+ return output;
6116
6169
  }
6117
6170
  function recomposeAuthority(component) {
6118
6171
  const uriTokens = [];
@@ -6127,7 +6180,7 @@ var require_utils = __commonJS2({
6127
6180
  if (ipV6res.isIPV6 === true) {
6128
6181
  host = `[${ipV6res.escapedHost}]`;
6129
6182
  } else {
6130
- host = component.host;
6183
+ host = reescapeHostDelimiters(host, false);
6131
6184
  }
6132
6185
  }
6133
6186
  uriTokens.push(host);
@@ -6141,7 +6194,10 @@ var require_utils = __commonJS2({
6141
6194
  module.exports = {
6142
6195
  nonSimpleDomain,
6143
6196
  recomposeAuthority,
6144
- normalizeComponentEncoding,
6197
+ reescapeHostDelimiters,
6198
+ normalizePercentEncoding,
6199
+ normalizePathEncoding,
6200
+ escapePreservingEscapes,
6145
6201
  removeDotSegments,
6146
6202
  isIPv4,
6147
6203
  isUUID,
@@ -6151,7 +6207,7 @@ var require_utils = __commonJS2({
6151
6207
  }
6152
6208
  });
6153
6209
  var require_schemes = __commonJS2({
6154
- "../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js"(exports$1, module) {
6210
+ "../../node_modules/.pnpm/fast-uri@3.1.3/node_modules/fast-uri/lib/schemes.js"(exports$1, module) {
6155
6211
  var { isUUID } = require_utils();
6156
6212
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
6157
6213
  var supportedSchemeNames = (
@@ -6358,13 +6414,13 @@ var require_schemes = __commonJS2({
6358
6414
  }
6359
6415
  });
6360
6416
  var require_fast_uri = __commonJS2({
6361
- "../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js"(exports$1, module) {
6362
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
6417
+ "../../node_modules/.pnpm/fast-uri@3.1.3/node_modules/fast-uri/index.js"(exports$1, module) {
6418
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
6363
6419
  var { SCHEMES, getSchemeHandler } = require_schemes();
6364
6420
  function normalize(uri, options) {
6365
6421
  if (typeof uri === "string") {
6366
6422
  uri = /** @type {T} */
6367
- serialize2(parse(uri, options), options);
6423
+ normalizeString(uri, options);
6368
6424
  } else if (typeof uri === "object") {
6369
6425
  uri = /** @type {T} */
6370
6426
  parse(serialize2(uri, options), options);
@@ -6431,19 +6487,9 @@ var require_fast_uri = __commonJS2({
6431
6487
  return target;
6432
6488
  }
6433
6489
  function equal(uriA, uriB, options) {
6434
- if (typeof uriA === "string") {
6435
- uriA = unescape(uriA);
6436
- uriA = serialize2(normalizeComponentEncoding(parse(uriA, options), true), { ...options, skipEscape: true });
6437
- } else if (typeof uriA === "object") {
6438
- uriA = serialize2(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
6439
- }
6440
- if (typeof uriB === "string") {
6441
- uriB = unescape(uriB);
6442
- uriB = serialize2(normalizeComponentEncoding(parse(uriB, options), true), { ...options, skipEscape: true });
6443
- } else if (typeof uriB === "object") {
6444
- uriB = serialize2(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
6445
- }
6446
- return uriA.toLowerCase() === uriB.toLowerCase();
6490
+ const normalizedA = normalizeComparableURI(uriA, options);
6491
+ const normalizedB = normalizeComparableURI(uriB, options);
6492
+ return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase();
6447
6493
  }
6448
6494
  function serialize2(cmpts, opts) {
6449
6495
  const component = {
@@ -6468,12 +6514,12 @@ var require_fast_uri = __commonJS2({
6468
6514
  if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
6469
6515
  if (component.path !== void 0) {
6470
6516
  if (!options.skipEscape) {
6471
- component.path = escape(component.path);
6517
+ component.path = escapePreservingEscapes(component.path);
6472
6518
  if (component.scheme !== void 0) {
6473
6519
  component.path = component.path.split("%3A").join(":");
6474
6520
  }
6475
6521
  } else {
6476
- component.path = unescape(component.path);
6522
+ component.path = normalizePercentEncoding(component.path);
6477
6523
  }
6478
6524
  }
6479
6525
  if (options.reference !== "suffix" && component.scheme) {
@@ -6508,7 +6554,16 @@ var require_fast_uri = __commonJS2({
6508
6554
  return uriTokens.join("");
6509
6555
  }
6510
6556
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
6511
- function parse(uri, opts) {
6557
+ function getParseError(parsed, matches) {
6558
+ if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
6559
+ return 'URI path must start with "/" when authority is present.';
6560
+ }
6561
+ if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) {
6562
+ return "URI port is malformed.";
6563
+ }
6564
+ return void 0;
6565
+ }
6566
+ function parseWithStatus(uri, opts) {
6512
6567
  const options = Object.assign({}, opts);
6513
6568
  const parsed = {
6514
6569
  scheme: void 0,
@@ -6519,6 +6574,7 @@ var require_fast_uri = __commonJS2({
6519
6574
  query: void 0,
6520
6575
  fragment: void 0
6521
6576
  };
6577
+ let malformedAuthorityOrPort = false;
6522
6578
  let isIP = false;
6523
6579
  if (options.reference === "suffix") {
6524
6580
  if (options.scheme) {
@@ -6539,6 +6595,11 @@ var require_fast_uri = __commonJS2({
6539
6595
  if (isNaN(parsed.port)) {
6540
6596
  parsed.port = matches[5];
6541
6597
  }
6598
+ const parseError = getParseError(parsed, matches);
6599
+ if (parseError !== void 0) {
6600
+ parsed.error = parsed.error || parseError;
6601
+ malformedAuthorityOrPort = true;
6602
+ }
6542
6603
  if (parsed.host) {
6543
6604
  const ipv4result = isIPv4(parsed.host);
6544
6605
  if (ipv4result === false) {
@@ -6565,7 +6626,7 @@ var require_fast_uri = __commonJS2({
6565
6626
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
6566
6627
  if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
6567
6628
  try {
6568
- parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
6629
+ parsed.host = new URL("http://" + parsed.host).hostname;
6569
6630
  } catch (e) {
6570
6631
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
6571
6632
  }
@@ -6577,14 +6638,18 @@ var require_fast_uri = __commonJS2({
6577
6638
  parsed.scheme = unescape(parsed.scheme);
6578
6639
  }
6579
6640
  if (parsed.host !== void 0) {
6580
- parsed.host = unescape(parsed.host);
6641
+ parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
6581
6642
  }
6582
6643
  }
6583
6644
  if (parsed.path) {
6584
- parsed.path = escape(unescape(parsed.path));
6645
+ parsed.path = normalizePathEncoding(parsed.path);
6585
6646
  }
6586
6647
  if (parsed.fragment) {
6587
- parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
6648
+ try {
6649
+ parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
6650
+ } catch {
6651
+ parsed.error = parsed.error || "URI malformed";
6652
+ }
6588
6653
  }
6589
6654
  }
6590
6655
  if (schemeHandler && schemeHandler.parse) {
@@ -6593,7 +6658,29 @@ var require_fast_uri = __commonJS2({
6593
6658
  } else {
6594
6659
  parsed.error = parsed.error || "URI can not be parsed.";
6595
6660
  }
6596
- return parsed;
6661
+ return { parsed, malformedAuthorityOrPort };
6662
+ }
6663
+ function parse(uri, opts) {
6664
+ return parseWithStatus(uri, opts).parsed;
6665
+ }
6666
+ function normalizeString(uri, opts) {
6667
+ return normalizeStringWithStatus(uri, opts).normalized;
6668
+ }
6669
+ function normalizeStringWithStatus(uri, opts) {
6670
+ const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
6671
+ return {
6672
+ normalized: malformedAuthorityOrPort ? uri : serialize2(parsed, opts),
6673
+ malformedAuthorityOrPort
6674
+ };
6675
+ }
6676
+ function normalizeComparableURI(uri, opts) {
6677
+ if (typeof uri === "string") {
6678
+ const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
6679
+ return malformedAuthorityOrPort ? void 0 : normalized;
6680
+ }
6681
+ if (typeof uri === "object") {
6682
+ return serialize2(uri, opts);
6683
+ }
6597
6684
  }
6598
6685
  var fastUri = {
6599
6686
  SCHEMES,
@@ -6696,7 +6783,7 @@ var require_core = __commonJS2({
6696
6783
  };
6697
6784
  var MAX_EXPRESSION = 200;
6698
6785
  function requiredOptions(o2) {
6699
- var _a, _b, _c, _d, _e3, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r2, _s2, _t3, _u, _v, _w, _x, _y, _z, _0;
6786
+ var _a, _b, _c, _d, _e3, _f, _g, _h, _j, _k, _l, _m, _o2, _p, _q, _r2, _s2, _t3, _u, _v, _w, _x, _y, _z, _0;
6700
6787
  const s3 = o2.strict;
6701
6788
  const _optz = (_a = o2.code) === null || _a === void 0 ? void 0 : _a.optimize;
6702
6789
  const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0;
@@ -6707,7 +6794,7 @@ var require_core = __commonJS2({
6707
6794
  strictNumbers: (_h = (_g = o2.strictNumbers) !== null && _g !== void 0 ? _g : s3) !== null && _h !== void 0 ? _h : true,
6708
6795
  strictTypes: (_k = (_j = o2.strictTypes) !== null && _j !== void 0 ? _j : s3) !== null && _k !== void 0 ? _k : "log",
6709
6796
  strictTuples: (_m = (_l = o2.strictTuples) !== null && _l !== void 0 ? _l : s3) !== null && _m !== void 0 ? _m : "log",
6710
- strictRequired: (_p = (_o = o2.strictRequired) !== null && _o !== void 0 ? _o : s3) !== null && _p !== void 0 ? _p : false,
6797
+ strictRequired: (_p = (_o2 = o2.strictRequired) !== null && _o2 !== void 0 ? _o2 : s3) !== null && _p !== void 0 ? _p : false,
6711
6798
  code: o2.code ? { ...o2.code, optimize, regExp } : { optimize, regExp },
6712
6799
  loopRequired: (_q = o2.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION,
6713
6800
  loopEnum: (_r2 = o2.loopEnum) !== null && _r2 !== void 0 ? _r2 : MAX_EXPRESSION,
@@ -12608,7 +12695,7 @@ var _createLogger = (prefix, maybeCall, consoleLike) => {
12608
12695
  };
12609
12696
  return logger;
12610
12697
  };
12611
- var passThrough = (fn2) => fn2();
12698
+ var passThrough = (fn) => fn();
12612
12699
  function createLogger(prefix, maybeCall = passThrough) {
12613
12700
  return _createLogger(prefix, maybeCall, createConsole());
12614
12701
  }
@@ -12623,12 +12710,12 @@ function isEmpty(truthyValue) {
12623
12710
  function removeTrailingSlash(url) {
12624
12711
  return url?.replace(/\/+$/, "");
12625
12712
  }
12626
- async function retriable(fn2, props) {
12713
+ async function retriable(fn, props) {
12627
12714
  let lastError = null;
12628
12715
  for (let i2 = 0; i2 < props.retryCount + 1; i2++) {
12629
12716
  if (i2 > 0) await new Promise((r) => setTimeout(r, props.retryDelay));
12630
12717
  try {
12631
- const res = await fn2();
12718
+ const res = await fn();
12632
12719
  return res;
12633
12720
  } catch (e) {
12634
12721
  lastError = e;
@@ -12640,8 +12727,8 @@ async function retriable(fn2, props) {
12640
12727
  function currentISOTime() {
12641
12728
  return (/* @__PURE__ */ new Date()).toISOString();
12642
12729
  }
12643
- function safeSetTimeout(fn2, timeout) {
12644
- const t2 = setTimeout(fn2, timeout);
12730
+ function safeSetTimeout(fn, timeout) {
12731
+ const t2 = setTimeout(fn, timeout);
12645
12732
  t2?.unref && t2?.unref();
12646
12733
  return t2;
12647
12734
  }
@@ -12745,13 +12832,13 @@ var PostHogCoreStateless = class {
12745
12832
  if (options?.evaluationEnvironments && !options?.evaluationContexts) this._logger.warn("evaluationEnvironments is deprecated. Use evaluationContexts instead. This property will be removed in a future version.");
12746
12833
  this.disableCompression = !isGzipSupported() || (options?.disableCompression ?? false);
12747
12834
  }
12748
- logMsgIfDebug(fn2) {
12749
- if (this.isDebug) fn2();
12835
+ logMsgIfDebug(fn) {
12836
+ if (this.isDebug) fn();
12750
12837
  }
12751
- wrap(fn2) {
12838
+ wrap(fn) {
12752
12839
  if (this.disabled) return void this._logger.warn("The client is disabled");
12753
- if (this._isInitialized) return fn2();
12754
- this._initPromise.then(() => fn2());
12840
+ if (this._isInitialized) return fn();
12841
+ this._initPromise.then(() => fn());
12755
12842
  }
12756
12843
  getCommonEventProperties() {
12757
12844
  return {
@@ -14289,8 +14376,8 @@ var FeatureFlagsPoller = class {
14289
14376
  debug(enabled = true) {
14290
14377
  this.debugMode = enabled;
14291
14378
  }
14292
- logMsgIfDebug(fn2) {
14293
- if (this.debugMode) fn2();
14379
+ logMsgIfDebug(fn) {
14380
+ if (this.debugMode) fn();
14294
14381
  }
14295
14382
  createEvaluationContext(distinctId, groups = {}, personProperties = {}, groupProperties = {}, evaluationCache = {}) {
14296
14383
  return {
@@ -15493,9 +15580,9 @@ var PostHogBackendClient = class extends PostHogCoreStateless {
15493
15580
  }
15494
15581
  return false;
15495
15582
  }
15496
- withContext(data, fn2, options) {
15497
- if (!this.context) return fn2();
15498
- return this.context.run(data, fn2, options);
15583
+ withContext(data, fn, options) {
15584
+ if (!this.context) return fn();
15585
+ return this.context.run(data, fn, options);
15499
15586
  }
15500
15587
  getContext() {
15501
15588
  return this.context?.get();
@@ -15703,8 +15790,8 @@ var PostHogBackendClient = class extends PostHogCoreStateless {
15703
15790
  beforeSend
15704
15791
  ];
15705
15792
  let result = eventMessage;
15706
- for (const fn2 of fns) {
15707
- result = fn2(result);
15793
+ for (const fn of fns) {
15794
+ result = fn(result);
15708
15795
  if (!result) {
15709
15796
  this._logger.info(`Event '${eventMessage.event}' was rejected in beforeSend function`);
15710
15797
  return null;
@@ -15724,8 +15811,8 @@ var PostHogContext = class {
15724
15811
  get() {
15725
15812
  return this.storage.getStore();
15726
15813
  }
15727
- run(context, fn2, options) {
15728
- return this.storage.run(this.resolve(context, options), fn2);
15814
+ run(context, fn, options) {
15815
+ return this.storage.run(this.resolve(context, options), fn);
15729
15816
  }
15730
15817
  enter(context, options) {
15731
15818
  this.storage.enterWith(this.resolve(context, options));
@@ -16056,18 +16143,18 @@ function envPaths(name, { suffix = "nodejs" } = {}) {
16056
16143
  }
16057
16144
  return linux(name);
16058
16145
  }
16059
- var attemptifyAsync = (fn2, options) => {
16146
+ var attemptifyAsync = (fn, options) => {
16060
16147
  const { onError } = options;
16061
16148
  return function attemptified(...args) {
16062
- return fn2.apply(void 0, args).catch(onError);
16149
+ return fn.apply(void 0, args).catch(onError);
16063
16150
  };
16064
16151
  };
16065
16152
  var attemptify_async_default = attemptifyAsync;
16066
- var attemptifySync = (fn2, options) => {
16153
+ var attemptifySync = (fn, options) => {
16067
16154
  const { onError } = options;
16068
16155
  return function attemptified(...args) {
16069
16156
  try {
16070
- return fn2.apply(void 0, args);
16157
+ return fn.apply(void 0, args);
16071
16158
  } catch (error) {
16072
16159
  return onError(error);
16073
16160
  }
@@ -16075,14 +16162,14 @@ var attemptifySync = (fn2, options) => {
16075
16162
  };
16076
16163
  var attemptify_sync_default = attemptifySync;
16077
16164
  var RETRY_INTERVAL = 250;
16078
- var retryifyAsync = (fn2, options) => {
16165
+ var retryifyAsync = (fn, options) => {
16079
16166
  const { isRetriable } = options;
16080
16167
  return function retryified(options2) {
16081
16168
  const { timeout } = options2;
16082
16169
  const interval = options2.interval ?? RETRY_INTERVAL;
16083
16170
  const timestamp = Date.now() + timeout;
16084
16171
  return function attempt(...args) {
16085
- return fn2.apply(void 0, args).catch((error) => {
16172
+ return fn.apply(void 0, args).catch((error) => {
16086
16173
  if (!isRetriable(error))
16087
16174
  throw error;
16088
16175
  if (Date.now() >= timestamp)
@@ -16099,7 +16186,7 @@ var retryifyAsync = (fn2, options) => {
16099
16186
  };
16100
16187
  };
16101
16188
  var retryify_async_default = retryifyAsync;
16102
- var retryifySync = (fn2, options) => {
16189
+ var retryifySync = (fn, options) => {
16103
16190
  const { isRetriable } = options;
16104
16191
  return function retryified(options2) {
16105
16192
  const { timeout } = options2;
@@ -16107,7 +16194,7 @@ var retryifySync = (fn2, options) => {
16107
16194
  return function attempt(...args) {
16108
16195
  while (true) {
16109
16196
  try {
16110
- return fn2.apply(void 0, args);
16197
+ return fn.apply(void 0, args);
16111
16198
  } catch (error) {
16112
16199
  if (!isRetriable(error))
16113
16200
  throw error;
@@ -16669,7 +16756,7 @@ var Conf = class {
16669
16756
  }
16670
16757
  this._validate(store);
16671
16758
  try {
16672
- Mi.deepEqual(fileStore, store);
16759
+ zi.deepEqual(fileStore, store);
16673
16760
  } catch {
16674
16761
  this.store = store;
16675
16762
  }
@@ -17674,57 +17761,57 @@ var Ft2 = new RegExp("\\p{M}+", "gu");
17674
17761
  var yt2 = { limit: 1 / 0, ellipsis: "" };
17675
17762
  var Le = (e, r = {}, s3 = {}) => {
17676
17763
  const i2 = r.limit ?? 1 / 0, a2 = r.ellipsis ?? "", o2 = r?.ellipsisWidth ?? (a2 ? Le(a2, yt2, s3).width : 0), u3 = s3.ansiWidth ?? 0, l = s3.controlWidth ?? 0, n2 = s3.tabWidth ?? 8, c3 = s3.ambiguousWidth ?? 1, p2 = s3.emojiWidth ?? 2, f2 = s3.fullWidthWidth ?? 2, g2 = s3.regularWidth ?? 1, E = s3.wideWidth ?? 2;
17677
- let $3 = 0, m2 = 0, d = e.length, F2 = 0, y3 = false, v2 = d, C2 = Math.max(0, i2 - o2), A2 = 0, b2 = 0, w2 = 0, S2 = 0;
17764
+ let $3 = 0, m2 = 0, d = e.length, F2 = 0, y2 = false, v2 = d, C2 = Math.max(0, i2 - o2), A2 = 0, b2 = 0, w2 = 0, S3 = 0;
17678
17765
  e: for (; ; ) {
17679
17766
  if (b2 > A2 || m2 >= d && m2 > $3) {
17680
17767
  const T2 = e.slice(A2, b2) || e.slice($3, m2);
17681
17768
  F2 = 0;
17682
17769
  for (const M3 of T2.replaceAll(Ft2, "")) {
17683
17770
  const O3 = M3.codePointAt(0) || 0;
17684
- if (gt2(O3) ? S2 = f2 : ft2(O3) ? S2 = E : c3 !== g2 && mt2(O3) ? S2 = c3 : S2 = g2, w2 + S2 > C2 && (v2 = Math.min(v2, Math.max(A2, $3) + F2)), w2 + S2 > i2) {
17685
- y3 = true;
17771
+ if (gt2(O3) ? S3 = f2 : ft2(O3) ? S3 = E : c3 !== g2 && mt2(O3) ? S3 = c3 : S3 = g2, w2 + S3 > C2 && (v2 = Math.min(v2, Math.max(A2, $3) + F2)), w2 + S3 > i2) {
17772
+ y2 = true;
17686
17773
  break e;
17687
17774
  }
17688
- F2 += M3.length, w2 += S2;
17775
+ F2 += M3.length, w2 += S3;
17689
17776
  }
17690
17777
  A2 = b2 = 0;
17691
17778
  }
17692
17779
  if (m2 >= d) break;
17693
17780
  if (ne.lastIndex = m2, ne.test(e)) {
17694
- if (F2 = ne.lastIndex - m2, S2 = F2 * g2, w2 + S2 > C2 && (v2 = Math.min(v2, m2 + Math.floor((C2 - w2) / g2))), w2 + S2 > i2) {
17695
- y3 = true;
17781
+ if (F2 = ne.lastIndex - m2, S3 = F2 * g2, w2 + S3 > C2 && (v2 = Math.min(v2, m2 + Math.floor((C2 - w2) / g2))), w2 + S3 > i2) {
17782
+ y2 = true;
17696
17783
  break;
17697
17784
  }
17698
- w2 += S2, A2 = $3, b2 = m2, m2 = $3 = ne.lastIndex;
17785
+ w2 += S3, A2 = $3, b2 = m2, m2 = $3 = ne.lastIndex;
17699
17786
  continue;
17700
17787
  }
17701
17788
  if (we.lastIndex = m2, we.test(e)) {
17702
17789
  if (w2 + u3 > C2 && (v2 = Math.min(v2, m2)), w2 + u3 > i2) {
17703
- y3 = true;
17790
+ y2 = true;
17704
17791
  break;
17705
17792
  }
17706
17793
  w2 += u3, A2 = $3, b2 = m2, m2 = $3 = we.lastIndex;
17707
17794
  continue;
17708
17795
  }
17709
17796
  if (re.lastIndex = m2, re.test(e)) {
17710
- if (F2 = re.lastIndex - m2, S2 = F2 * l, w2 + S2 > C2 && (v2 = Math.min(v2, m2 + Math.floor((C2 - w2) / l))), w2 + S2 > i2) {
17711
- y3 = true;
17797
+ if (F2 = re.lastIndex - m2, S3 = F2 * l, w2 + S3 > C2 && (v2 = Math.min(v2, m2 + Math.floor((C2 - w2) / l))), w2 + S3 > i2) {
17798
+ y2 = true;
17712
17799
  break;
17713
17800
  }
17714
- w2 += S2, A2 = $3, b2 = m2, m2 = $3 = re.lastIndex;
17801
+ w2 += S3, A2 = $3, b2 = m2, m2 = $3 = re.lastIndex;
17715
17802
  continue;
17716
17803
  }
17717
17804
  if (ie.lastIndex = m2, ie.test(e)) {
17718
- if (F2 = ie.lastIndex - m2, S2 = F2 * n2, w2 + S2 > C2 && (v2 = Math.min(v2, m2 + Math.floor((C2 - w2) / n2))), w2 + S2 > i2) {
17719
- y3 = true;
17805
+ if (F2 = ie.lastIndex - m2, S3 = F2 * n2, w2 + S3 > C2 && (v2 = Math.min(v2, m2 + Math.floor((C2 - w2) / n2))), w2 + S3 > i2) {
17806
+ y2 = true;
17720
17807
  break;
17721
17808
  }
17722
- w2 += S2, A2 = $3, b2 = m2, m2 = $3 = ie.lastIndex;
17809
+ w2 += S3, A2 = $3, b2 = m2, m2 = $3 = ie.lastIndex;
17723
17810
  continue;
17724
17811
  }
17725
17812
  if (Ae.lastIndex = m2, Ae.test(e)) {
17726
17813
  if (w2 + p2 > C2 && (v2 = Math.min(v2, m2)), w2 + p2 > i2) {
17727
- y3 = true;
17814
+ y2 = true;
17728
17815
  break;
17729
17816
  }
17730
17817
  w2 += p2, A2 = $3, b2 = m2, m2 = $3 = Ae.lastIndex;
@@ -17732,7 +17819,7 @@ var Le = (e, r = {}, s3 = {}) => {
17732
17819
  }
17733
17820
  m2 += 1;
17734
17821
  }
17735
- return { width: y3 ? C2 : w2, index: y3 ? v2 : d, truncated: y3, ellipsed: y3 && i2 >= o2 };
17822
+ return { width: y2 ? C2 : w2, index: y2 ? v2 : d, truncated: y2, ellipsed: y2 && i2 >= o2 };
17736
17823
  };
17737
17824
  var Et2 = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
17738
17825
  var D2 = (e, r = {}) => Le(e, Et2, r).width;
@@ -17783,8 +17870,8 @@ var It2 = (e, r, s3 = {}) => {
17783
17870
  s3.trim !== false && (n2[n2.length - 1] = (n2.at(-1) ?? "").trimStart());
17784
17871
  let d = D2(n2.at(-1) ?? "");
17785
17872
  if ($3 !== 0 && (d >= r && (s3.wordWrap === false || s3.trim === false) && (n2.push(""), d = 0), (d > 0 || s3.trim === false) && (n2[n2.length - 1] += " ", d++)), s3.hard && l[$3] > r) {
17786
- const F2 = r - d, y3 = 1 + Math.floor((l[$3] - F2 - 1) / r);
17787
- Math.floor((l[$3] - 1) / r) < y3 && n2.push(""), Ie(n2, m2, r);
17873
+ const F2 = r - d, y2 = 1 + Math.floor((l[$3] - F2 - 1) / r);
17874
+ Math.floor((l[$3] - 1) / r) < y2 && n2.push(""), Ie(n2, m2, r);
17788
17875
  continue;
17789
17876
  }
17790
17877
  if (d + l[$3] > r && d > 0 && l[$3] > 0) {
@@ -17808,11 +17895,11 @@ var It2 = (e, r, s3 = {}) => {
17808
17895
  const $3 = f2.value, m2 = g2.value;
17809
17896
  if (i2 += $3, $3 === ae || $3 === je) {
17810
17897
  He.lastIndex = E + 1;
17811
- const y3 = He.exec(c3)?.groups;
17812
- if (y3?.code !== void 0) {
17813
- const v2 = Number.parseFloat(y3.code);
17898
+ const y2 = He.exec(c3)?.groups;
17899
+ if (y2?.code !== void 0) {
17900
+ const v2 = Number.parseFloat(y2.code);
17814
17901
  a2 = v2 === vt2 ? void 0 : v2;
17815
- } else y3?.uri !== void 0 && (o2 = y3.uri.length === 0 ? void 0 : y3.uri);
17902
+ } else y2?.uri !== void 0 && (o2 = y2.uri.length === 0 ? void 0 : y2.uri);
17816
17903
  }
17817
17904
  const d = a2 ? At2(a2) : void 0;
17818
17905
  m2 === `
@@ -17844,16 +17931,16 @@ var X2 = ({ cursor: e, options: r, style: s3, output: i2 = process.stdout, maxIt
17844
17931
  const m2 = Math.min(g2 + f2, r.length), d = [];
17845
17932
  let F2 = 0;
17846
17933
  E && F2++, $3 && F2++;
17847
- const y3 = g2 + (E ? 1 : 0), v2 = m2 - ($3 ? 1 : 0);
17848
- for (let A2 = y3; A2 < v2; A2++) {
17934
+ const y2 = g2 + (E ? 1 : 0), v2 = m2 - ($3 ? 1 : 0);
17935
+ for (let A2 = y2; A2 < v2; A2++) {
17849
17936
  const b2 = J2(s3(r[A2], A2 === e), l, { hard: true, trim: false }).split(`
17850
17937
  `);
17851
17938
  d.push(b2), F2 += b2.length;
17852
17939
  }
17853
17940
  if (F2 > p2) {
17854
17941
  let A2 = 0, b2 = 0, w2 = F2;
17855
- const S2 = e - y3, T2 = (M3, O3) => bt2(d, w2, M3, O3, p2);
17856
- E ? ({ lineCount: w2, removals: A2 } = T2(0, S2), w2 > p2 && ({ lineCount: w2, removals: b2 } = T2(S2 + 1, d.length))) : ({ lineCount: w2, removals: b2 } = T2(S2 + 1, d.length), w2 > p2 && ({ lineCount: w2, removals: A2 } = T2(0, S2))), A2 > 0 && (E = true, d.splice(0, A2)), b2 > 0 && ($3 = true, d.splice(d.length - b2, b2));
17942
+ const S3 = e - y2, T2 = (M3, O3) => bt2(d, w2, M3, O3, p2);
17943
+ E ? ({ lineCount: w2, removals: A2 } = T2(0, S3), w2 > p2 && ({ lineCount: w2, removals: b2 } = T2(S3 + 1, d.length))) : ({ lineCount: w2, removals: b2 } = T2(S3 + 1, d.length), w2 > p2 && ({ lineCount: w2, removals: A2 } = T2(0, S3))), A2 > 0 && (E = true, d.splice(0, A2)), b2 > 0 && ($3 = true, d.splice(d.length - b2, b2));
17857
17944
  }
17858
17945
  const C2 = [];
17859
17946
  E && C2.push(c3);
@@ -17954,14 +18041,14 @@ var Kt = (e) => styleText("magenta", e);
17954
18041
  var be = ({ indicator: e = "dots", onCancel: r, output: s3 = process.stdout, cancelMessage: i2, errorMessage: a2, frames: o2 = ee ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: u3 = ee ? 80 : 120, signal: l, ...n2 } = {}) => {
17955
18042
  const c3 = ce();
17956
18043
  let p2, f2, g2 = false, E = false, $3 = "", m2, d = performance.now();
17957
- const F2 = rt(s3), y3 = n2?.styleFrame ?? Kt, v2 = (B3) => {
18044
+ const F2 = rt(s3), y2 = n2?.styleFrame ?? Kt, v2 = (B3) => {
17958
18045
  const P3 = B3 > 1 ? a2 ?? _.messages.error : i2 ?? _.messages.cancel;
17959
18046
  E = B3 === 1, g2 && (k3(P3, B3), E && typeof r == "function" && r());
17960
18047
  }, C2 = () => v2(2), A2 = () => v2(1), b2 = () => {
17961
18048
  process.on("uncaughtExceptionMonitor", C2), process.on("unhandledRejection", C2), process.on("SIGINT", A2), process.on("SIGTERM", A2), process.on("exit", v2), l && l.addEventListener("abort", A2);
17962
18049
  }, w2 = () => {
17963
18050
  process.removeListener("uncaughtExceptionMonitor", C2), process.removeListener("unhandledRejection", C2), process.removeListener("SIGINT", A2), process.removeListener("SIGTERM", A2), process.removeListener("exit", v2), l && l.removeEventListener("abort", A2);
17964
- }, S2 = () => {
18051
+ }, S3 = () => {
17965
18052
  if (m2 === void 0) return;
17966
18053
  c3 && s3.write(`
17967
18054
  `);
@@ -17977,8 +18064,8 @@ var be = ({ indicator: e = "dots", onCancel: r, output: s3 = process.stdout, can
17977
18064
  let P3 = 0, G3 = 0;
17978
18065
  b2(), f2 = setInterval(() => {
17979
18066
  if (c3 && $3 === m2) return;
17980
- S2(), m2 = $3;
17981
- const L3 = y3(o2[P3]);
18067
+ S3(), m2 = $3;
18068
+ const L3 = y2(o2[P3]);
17982
18069
  let Z3;
17983
18070
  if (c3) Z3 = `${L3} ${$3}...`;
17984
18071
  else if (e === "timer") Z3 = `${L3} ${$3} ${M3(d)}`;
@@ -17991,7 +18078,7 @@ var be = ({ indicator: e = "dots", onCancel: r, output: s3 = process.stdout, can
17991
18078
  }, u3);
17992
18079
  }, k3 = (B3 = "", P3 = 0, G3 = false) => {
17993
18080
  if (!g2) return;
17994
- g2 = false, clearInterval(f2), S2();
18081
+ g2 = false, clearInterval(f2), S3();
17995
18082
  const L3 = P3 === 0 ? styleText("green", V) : P3 === 1 ? styleText("red", $e) : styleText("red", de);
17996
18083
  $3 = B3 ?? $3, G3 || (e === "timer" ? s3.write(`${L3} ${$3} ${M3(d)}
17997
18084
  `) : s3.write(`${L3} ${$3}
@@ -23479,12 +23566,12 @@ var Emitter = class {
23479
23566
  configurable: false
23480
23567
  });
23481
23568
  }
23482
- on(ev, fn2) {
23483
- this.listeners[ev].push(fn2);
23569
+ on(ev, fn) {
23570
+ this.listeners[ev].push(fn);
23484
23571
  }
23485
- removeListener(ev, fn2) {
23572
+ removeListener(ev, fn) {
23486
23573
  const list = this.listeners[ev];
23487
- const i2 = list.indexOf(fn2);
23574
+ const i2 = list.indexOf(fn);
23488
23575
  if (i2 === -1) {
23489
23576
  return;
23490
23577
  }
@@ -23500,8 +23587,8 @@ var Emitter = class {
23500
23587
  }
23501
23588
  this.emitted[ev] = true;
23502
23589
  let ret = false;
23503
- for (const fn2 of this.listeners[ev]) {
23504
- ret = fn2(code, signal) === true || ret;
23590
+ for (const fn of this.listeners[ev]) {
23591
+ ret = fn(code, signal) === true || ret;
23505
23592
  }
23506
23593
  if (ev === "exit") {
23507
23594
  ret = this.emit("afterExit", code, signal) || ret;
@@ -23595,9 +23682,9 @@ var SignalExit = class extends SignalExitBase {
23595
23682
  this.#emitter.count += 1;
23596
23683
  for (const sig of signals) {
23597
23684
  try {
23598
- const fn2 = this.#sigListeners[sig];
23599
- if (fn2)
23600
- this.#process.on(sig, fn2);
23685
+ const fn = this.#sigListeners[sig];
23686
+ if (fn)
23687
+ this.#process.on(sig, fn);
23601
23688
  } catch (_3) {
23602
23689
  }
23603
23690
  }
@@ -25115,6 +25202,7 @@ async function generatePackageJson(projectName, database, useYalc = false, proje
25115
25202
  "react-dom": PINNED_VERSIONS["react-dom"]
25116
25203
  };
25117
25204
  dependencies["@tanstack/react-query"] = "^5.62.0";
25205
+ dependencies["lucide-react"] = "^0.544.0";
25118
25206
  if (!useYalc) {
25119
25207
  const versions = await resolveNextlyVersions();
25120
25208
  dependencies["nextly"] = versions["nextly"];
@@ -25126,6 +25214,7 @@ async function generatePackageJson(projectName, database, useYalc = false, proje
25126
25214
  dependencies["@nextlyhq/plugin-form-builder"] = versions["@nextlyhq/plugin-form-builder"] || "latest";
25127
25215
  }
25128
25216
  }
25217
+ dependencies["drizzle-orm"] = "1.0.0-rc.4";
25129
25218
  const devDependencies = {
25130
25219
  typescript: PINNED_VERSIONS.typescript,
25131
25220
  "@types/node": PINNED_VERSIONS["@types/node"],
@@ -25145,11 +25234,11 @@ async function generatePackageJson(projectName, database, useYalc = false, proje
25145
25234
  version: "0.1.0",
25146
25235
  private: true,
25147
25236
  scripts: {
25148
- // F1 PR 4: dev now boots Nextly in single-process mode via `next dev`.
25149
- // The lazy drizzle-kit/api import (PR 1) plus the in-process HMR
25150
- // listener (PR 2) replaced the wrapper that previously owned the
25151
- // terminal, schema prompts, and child supervision. `nextly dev` is
25152
- // gone; the only supported dev command is the standard `next dev`.
25237
+ // Dev boots Nextly in single-process mode via `next dev`. The lazy
25238
+ // per-dialect drizzle-kit import plus the in-process HMR listener
25239
+ // replaced the wrapper that previously owned the terminal, schema
25240
+ // prompts, and child supervision. `nextly dev` is gone; the only
25241
+ // supported dev command is the standard `next dev`.
25153
25242
  dev: "next dev --turbopack",
25154
25243
  // Build: migrate DB + compile Next.js + (if present) generate
25155
25244
  // the Pagefind search index. Templates without the search
@@ -25207,7 +25296,7 @@ async function generatePluginPackageJson(projectName, useYalc) {
25207
25296
  "@types/react-dom": PINNED_VERSIONS["@types/react-dom"],
25208
25297
  typescript: PINNED_VERSIONS.typescript,
25209
25298
  tsup: "^8.5.0",
25210
- vitest: "^4.0.8",
25299
+ vitest: "^4.1.0",
25211
25300
  eslint: PINNED_VERSIONS.eslint,
25212
25301
  "@eslint/js": PINNED_VERSIONS.eslint,
25213
25302
  "typescript-eslint": "^8.0.0"
@@ -25356,6 +25445,12 @@ async function copyTemplate(options) {
25356
25445
  });
25357
25446
  }
25358
25447
  }
25448
+ const templateMigrationsDir = path15.join(typeDir, "migrations");
25449
+ if (await import_fs_extra8.default.pathExists(templateMigrationsDir)) {
25450
+ await import_fs_extra8.default.copy(templateMigrationsDir, path15.join(targetDir, "migrations"), {
25451
+ overwrite: false
25452
+ });
25453
+ }
25359
25454
  const frontendPagePath = path15.join(
25360
25455
  targetDir,
25361
25456
  "src",
@@ -25446,7 +25541,8 @@ var CORE_PACKAGES = [
25446
25541
  "@nextlyhq/admin",
25447
25542
  "@nextlyhq/adapter-drizzle",
25448
25543
  "@nextlyhq/ui",
25449
- "@tanstack/react-query"
25544
+ "@tanstack/react-query",
25545
+ "lucide-react"
25450
25546
  ];
25451
25547
  var ALL_ADAPTER_PACKAGES = [
25452
25548
  "@nextlyhq/adapter-postgres",
@@ -25496,6 +25592,13 @@ async function installDependencies(cwd, projectInfo, database, useYalc = false,
25496
25592
  ...pluginPackages
25497
25593
  ])
25498
25594
  ];
25595
+ const registryPackages = allPackages.filter(
25596
+ (pkg) => !yalcPackages.includes(pkg)
25597
+ );
25598
+ if (registryPackages.length > 0) {
25599
+ const [cmd, ...args] = INSTALL_COMMANDS[pm];
25600
+ await execa(cmd, [...args, ...registryPackages], { cwd });
25601
+ }
25499
25602
  for (const pkg of yalcPackages) {
25500
25603
  await execa("yalc", ["add", pkg], { cwd });
25501
25604
  }
@@ -25509,51 +25612,51 @@ async function installDependencies(cwd, projectInfo, database, useYalc = false,
25509
25612
 
25510
25613
  // src/lib/download-template.ts
25511
25614
  var import_fs_extra9 = __toESM(require_lib(), 1);
25512
- var kr = Object.defineProperty;
25513
- var vr = (s3, t2) => {
25514
- for (var e in t2) kr(s3, e, { get: t2[e], enumerable: true });
25515
- };
25516
- var Os = typeof process == "object" && process ? process : { stdout: null, stderr: null };
25517
- var Br = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof D3 || s3 instanceof Ns || Pr(s3) || zr(s3));
25518
- var Pr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof EventEmitter && typeof s3.pipe == "function" && s3.pipe !== Ns.Writable.prototype.pipe;
25519
- var zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
25520
- var q3 = Symbol("EOF");
25521
- var j2 = Symbol("maybeEmitEnd");
25522
- var rt2 = Symbol("emittedEnd");
25523
- var Le2 = Symbol("emittingEnd");
25524
- var jt2 = Symbol("emittedError");
25615
+ var zr = Object.defineProperty;
25616
+ var Ur = (s3, t2) => {
25617
+ for (var e in t2) zr(s3, e, { get: t2[e], enumerable: true });
25618
+ };
25619
+ var Ds = typeof process == "object" && process ? process : { stdout: null, stderr: null };
25620
+ var Wr = (s3) => !!s3 && typeof s3 == "object" && (s3 instanceof A || s3 instanceof Cs || Gr(s3) || Zr(s3));
25621
+ var Gr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof EventEmitter && typeof s3.pipe == "function" && s3.pipe !== Cs.Writable.prototype.pipe;
25622
+ var Zr = (s3) => !!s3 && typeof s3 == "object" && s3 instanceof EventEmitter && typeof s3.write == "function" && typeof s3.end == "function";
25623
+ var Q2 = Symbol("EOF");
25624
+ var J3 = Symbol("maybeEmitEnd");
25625
+ var nt2 = Symbol("emittedEnd");
25626
+ var De2 = Symbol("emittingEnd");
25627
+ var qt = Symbol("emittedError");
25525
25628
  var Ne2 = Symbol("closed");
25526
- var Ts = Symbol("read");
25629
+ var Ns = Symbol("read");
25527
25630
  var Ae2 = Symbol("flush");
25528
- var xs = Symbol("flushChunk");
25631
+ var As = Symbol("flushChunk");
25529
25632
  var z3 = Symbol("encoding");
25530
25633
  var Mt2 = Symbol("decoder");
25531
- var b = Symbol("flowing");
25634
+ var g = Symbol("flowing");
25532
25635
  var Qt = Symbol("paused");
25533
25636
  var Bt2 = Symbol("resume");
25534
- var _2 = Symbol("buffer");
25535
- var A = Symbol("pipes");
25536
- var g = Symbol("bufferLength");
25537
- var yi = Symbol("bufferPush");
25538
- var De2 = Symbol("bufferShift");
25637
+ var b = Symbol("buffer");
25638
+ var N3 = Symbol("pipes");
25639
+ var _2 = Symbol("bufferLength");
25640
+ var bi = Symbol("bufferPush");
25641
+ var Ie2 = Symbol("bufferShift");
25539
25642
  var L2 = Symbol("objectMode");
25540
- var w = Symbol("destroyed");
25541
- var Ri = Symbol("error");
25542
- var bi = Symbol("emitData");
25543
- var Ls = Symbol("emitEnd");
25544
- var _i = Symbol("emitEnd2");
25643
+ var S2 = Symbol("destroyed");
25644
+ var _i = Symbol("error");
25645
+ var Oi = Symbol("emitData");
25646
+ var Is = Symbol("emitEnd");
25647
+ var Ti = Symbol("emitEnd2");
25545
25648
  var Z2 = Symbol("async");
25546
- var gi = Symbol("abort");
25547
- var Ie2 = Symbol("aborted");
25649
+ var xi = Symbol("abort");
25650
+ var Ce2 = Symbol("aborted");
25548
25651
  var Jt2 = Symbol("signal");
25549
- var yt3 = Symbol("dataListeners");
25652
+ var Rt2 = Symbol("dataListeners");
25550
25653
  var C = Symbol("discarded");
25551
- var te2 = (s3) => Promise.resolve().then(s3);
25552
- var Ur = (s3) => s3();
25553
- var Hr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
25554
- var Wr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
25555
- var Gr = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
25556
- var Ce2 = class {
25654
+ var jt2 = (s3) => Promise.resolve().then(s3);
25655
+ var Yr = (s3) => s3();
25656
+ var Kr = (s3) => s3 === "end" || s3 === "finish" || s3 === "prefinish";
25657
+ var Vr = (s3) => s3 instanceof ArrayBuffer || !!s3 && typeof s3 == "object" && s3.constructor && s3.constructor.name === "ArrayBuffer" && s3.byteLength >= 0;
25658
+ var $r = (s3) => !Buffer.isBuffer(s3) && ArrayBuffer.isView(s3);
25659
+ var Fe2 = class {
25557
25660
  src;
25558
25661
  dest;
25559
25662
  opts;
@@ -25570,7 +25673,7 @@ var Ce2 = class {
25570
25673
  this.unpipe(), this.opts.end && this.dest.end();
25571
25674
  }
25572
25675
  };
25573
- var Oi = class extends Ce2 {
25676
+ var Li = class extends Fe2 {
25574
25677
  unpipe() {
25575
25678
  this.src.removeListener("error", this.proxyErrors), super.unpipe();
25576
25679
  }
@@ -25578,39 +25681,39 @@ var Oi = class extends Ce2 {
25578
25681
  super(t2, e, i2), this.proxyErrors = (r) => this.dest.emit("error", r), t2.on("error", this.proxyErrors);
25579
25682
  }
25580
25683
  };
25581
- var Zr = (s3) => !!s3.objectMode;
25582
- var Yr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
25583
- var D3 = class extends EventEmitter {
25584
- [b] = false;
25684
+ var Xr = (s3) => !!s3.objectMode;
25685
+ var qr = (s3) => !s3.objectMode && !!s3.encoding && s3.encoding !== "buffer";
25686
+ var A = class extends EventEmitter {
25687
+ [g] = false;
25585
25688
  [Qt] = false;
25586
- [A] = [];
25587
- [_2] = [];
25689
+ [N3] = [];
25690
+ [b] = [];
25588
25691
  [L2];
25589
25692
  [z3];
25590
25693
  [Z2];
25591
25694
  [Mt2];
25592
- [q3] = false;
25593
- [rt2] = false;
25594
- [Le2] = false;
25695
+ [Q2] = false;
25696
+ [nt2] = false;
25697
+ [De2] = false;
25595
25698
  [Ne2] = false;
25596
- [jt2] = null;
25597
- [g] = 0;
25598
- [w] = false;
25699
+ [qt] = null;
25700
+ [_2] = 0;
25701
+ [S2] = false;
25599
25702
  [Jt2];
25600
- [Ie2] = false;
25601
- [yt3] = 0;
25703
+ [Ce2] = false;
25704
+ [Rt2] = 0;
25602
25705
  [C] = false;
25603
25706
  writable = true;
25604
25707
  readable = true;
25605
25708
  constructor(...t2) {
25606
25709
  let e = t2[0] || {};
25607
25710
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
25608
- Zr(e) ? (this[L2] = true, this[z3] = null) : Yr(e) ? (this[z3] = e.encoding, this[L2] = false) : (this[L2] = false, this[z3] = null), this[Z2] = !!e.async, this[Mt2] = this[z3] ? new StringDecoder(this[z3]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[_2] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[A] });
25711
+ Xr(e) ? (this[L2] = true, this[z3] = null) : qr(e) ? (this[z3] = e.encoding, this[L2] = false) : (this[L2] = false, this[z3] = null), this[Z2] = !!e.async, this[Mt2] = this[z3] ? new StringDecoder(this[z3]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[b] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[N3] });
25609
25712
  let { signal: i2 } = e;
25610
- i2 && (this[Jt2] = i2, i2.aborted ? this[gi]() : i2.addEventListener("abort", () => this[gi]()));
25713
+ i2 && (this[Jt2] = i2, i2.aborted ? this[xi]() : i2.addEventListener("abort", () => this[xi]()));
25611
25714
  }
25612
25715
  get bufferLength() {
25613
- return this[g];
25716
+ return this[_2];
25614
25717
  }
25615
25718
  get encoding() {
25616
25719
  return this[z3];
@@ -25633,99 +25736,99 @@ var D3 = class extends EventEmitter {
25633
25736
  set async(t2) {
25634
25737
  this[Z2] = this[Z2] || !!t2;
25635
25738
  }
25636
- [gi]() {
25637
- this[Ie2] = true, this.emit("abort", this[Jt2]?.reason), this.destroy(this[Jt2]?.reason);
25739
+ [xi]() {
25740
+ this[Ce2] = true, this.emit("abort", this[Jt2]?.reason), this.destroy(this[Jt2]?.reason);
25638
25741
  }
25639
25742
  get aborted() {
25640
- return this[Ie2];
25743
+ return this[Ce2];
25641
25744
  }
25642
25745
  set aborted(t2) {
25643
25746
  }
25644
25747
  write(t2, e, i2) {
25645
- if (this[Ie2]) return false;
25646
- if (this[q3]) throw new Error("write after end");
25647
- if (this[w]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
25748
+ if (this[Ce2]) return false;
25749
+ if (this[Q2]) throw new Error("write after end");
25750
+ if (this[S2]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
25648
25751
  typeof e == "function" && (i2 = e, e = "utf8"), e || (e = "utf8");
25649
- let r = this[Z2] ? te2 : Ur;
25752
+ let r = this[Z2] ? jt2 : Yr;
25650
25753
  if (!this[L2] && !Buffer.isBuffer(t2)) {
25651
- if (Gr(t2)) t2 = Buffer.from(t2.buffer, t2.byteOffset, t2.byteLength);
25652
- else if (Wr(t2)) t2 = Buffer.from(t2);
25754
+ if ($r(t2)) t2 = Buffer.from(t2.buffer, t2.byteOffset, t2.byteLength);
25755
+ else if (Vr(t2)) t2 = Buffer.from(t2);
25653
25756
  else if (typeof t2 != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
25654
25757
  }
25655
- return this[L2] ? (this[b] && this[g] !== 0 && this[Ae2](true), this[b] ? this.emit("data", t2) : this[yi](t2), this[g] !== 0 && this.emit("readable"), i2 && r(i2), this[b]) : t2.length ? (typeof t2 == "string" && !(e === this[z3] && !this[Mt2]?.lastNeed) && (t2 = Buffer.from(t2, e)), Buffer.isBuffer(t2) && this[z3] && (t2 = this[Mt2].write(t2)), this[b] && this[g] !== 0 && this[Ae2](true), this[b] ? this.emit("data", t2) : this[yi](t2), this[g] !== 0 && this.emit("readable"), i2 && r(i2), this[b]) : (this[g] !== 0 && this.emit("readable"), i2 && r(i2), this[b]);
25758
+ return this[L2] ? (this[g] && this[_2] !== 0 && this[Ae2](true), this[g] ? this.emit("data", t2) : this[bi](t2), this[_2] !== 0 && this.emit("readable"), i2 && r(i2), this[g]) : t2.length ? (typeof t2 == "string" && !(e === this[z3] && !this[Mt2]?.lastNeed) && (t2 = Buffer.from(t2, e)), Buffer.isBuffer(t2) && this[z3] && (t2 = this[Mt2].write(t2)), this[g] && this[_2] !== 0 && this[Ae2](true), this[g] ? this.emit("data", t2) : this[bi](t2), this[_2] !== 0 && this.emit("readable"), i2 && r(i2), this[g]) : (this[_2] !== 0 && this.emit("readable"), i2 && r(i2), this[g]);
25656
25759
  }
25657
25760
  read(t2) {
25658
- if (this[w]) return null;
25659
- if (this[C] = false, this[g] === 0 || t2 === 0 || t2 && t2 > this[g]) return this[j2](), null;
25660
- this[L2] && (t2 = null), this[_2].length > 1 && !this[L2] && (this[_2] = [this[z3] ? this[_2].join("") : Buffer.concat(this[_2], this[g])]);
25661
- let e = this[Ts](t2 || null, this[_2][0]);
25662
- return this[j2](), e;
25663
- }
25664
- [Ts](t2, e) {
25665
- if (this[L2]) this[De2]();
25761
+ if (this[S2]) return null;
25762
+ if (this[C] = false, this[_2] === 0 || t2 === 0 || t2 && t2 > this[_2]) return this[J3](), null;
25763
+ this[L2] && (t2 = null), this[b].length > 1 && !this[L2] && (this[b] = [this[z3] ? this[b].join("") : Buffer.concat(this[b], this[_2])]);
25764
+ let e = this[Ns](t2 || null, this[b][0]);
25765
+ return this[J3](), e;
25766
+ }
25767
+ [Ns](t2, e) {
25768
+ if (this[L2]) this[Ie2]();
25666
25769
  else {
25667
25770
  let i2 = e;
25668
- t2 === i2.length || t2 === null ? this[De2]() : typeof i2 == "string" ? (this[_2][0] = i2.slice(t2), e = i2.slice(0, t2), this[g] -= t2) : (this[_2][0] = i2.subarray(t2), e = i2.subarray(0, t2), this[g] -= t2);
25771
+ t2 === i2.length || t2 === null ? this[Ie2]() : typeof i2 == "string" ? (this[b][0] = i2.slice(t2), e = i2.slice(0, t2), this[_2] -= t2) : (this[b][0] = i2.subarray(t2), e = i2.subarray(0, t2), this[_2] -= t2);
25669
25772
  }
25670
- return this.emit("data", e), !this[_2].length && !this[q3] && this.emit("drain"), e;
25773
+ return this.emit("data", e), !this[b].length && !this[Q2] && this.emit("drain"), e;
25671
25774
  }
25672
25775
  end(t2, e, i2) {
25673
- return typeof t2 == "function" && (i2 = t2, t2 = void 0), typeof e == "function" && (i2 = e, e = "utf8"), t2 !== void 0 && this.write(t2, e), i2 && this.once("end", i2), this[q3] = true, this.writable = false, (this[b] || !this[Qt]) && this[j2](), this;
25776
+ return typeof t2 == "function" && (i2 = t2, t2 = void 0), typeof e == "function" && (i2 = e, e = "utf8"), t2 !== void 0 && this.write(t2, e), i2 && this.once("end", i2), this[Q2] = true, this.writable = false, (this[g] || !this[Qt]) && this[J3](), this;
25674
25777
  }
25675
25778
  [Bt2]() {
25676
- this[w] || (!this[yt3] && !this[A].length && (this[C] = true), this[Qt] = false, this[b] = true, this.emit("resume"), this[_2].length ? this[Ae2]() : this[q3] ? this[j2]() : this.emit("drain"));
25779
+ this[S2] || (!this[Rt2] && !this[N3].length && (this[C] = true), this[Qt] = false, this[g] = true, this.emit("resume"), this[b].length ? this[Ae2]() : this[Q2] ? this[J3]() : this.emit("drain"));
25677
25780
  }
25678
25781
  resume() {
25679
25782
  return this[Bt2]();
25680
25783
  }
25681
25784
  pause() {
25682
- this[b] = false, this[Qt] = true, this[C] = false;
25785
+ this[g] = false, this[Qt] = true, this[C] = false;
25683
25786
  }
25684
25787
  get destroyed() {
25685
- return this[w];
25788
+ return this[S2];
25686
25789
  }
25687
25790
  get flowing() {
25688
- return this[b];
25791
+ return this[g];
25689
25792
  }
25690
25793
  get paused() {
25691
25794
  return this[Qt];
25692
25795
  }
25693
- [yi](t2) {
25694
- this[L2] ? this[g] += 1 : this[g] += t2.length, this[_2].push(t2);
25796
+ [bi](t2) {
25797
+ this[L2] ? this[_2] += 1 : this[_2] += t2.length, this[b].push(t2);
25695
25798
  }
25696
- [De2]() {
25697
- return this[L2] ? this[g] -= 1 : this[g] -= this[_2][0].length, this[_2].shift();
25799
+ [Ie2]() {
25800
+ return this[L2] ? this[_2] -= 1 : this[_2] -= this[b][0].length, this[b].shift();
25698
25801
  }
25699
25802
  [Ae2](t2 = false) {
25700
25803
  do
25701
25804
  ;
25702
- while (this[xs](this[De2]()) && this[_2].length);
25703
- !t2 && !this[_2].length && !this[q3] && this.emit("drain");
25805
+ while (this[As](this[Ie2]()) && this[b].length);
25806
+ !t2 && !this[b].length && !this[Q2] && this.emit("drain");
25704
25807
  }
25705
- [xs](t2) {
25706
- return this.emit("data", t2), this[b];
25808
+ [As](t2) {
25809
+ return this.emit("data", t2), this[g];
25707
25810
  }
25708
25811
  pipe(t2, e) {
25709
- if (this[w]) return t2;
25812
+ if (this[S2]) return t2;
25710
25813
  this[C] = false;
25711
- let i2 = this[rt2];
25712
- return e = e || {}, t2 === Os.stdout || t2 === Os.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i2 ? e.end && t2.end() : (this[A].push(e.proxyErrors ? new Oi(this, t2, e) : new Ce2(this, t2, e)), this[Z2] ? te2(() => this[Bt2]()) : this[Bt2]()), t2;
25814
+ let i2 = this[nt2];
25815
+ return e = e || {}, t2 === Ds.stdout || t2 === Ds.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i2 ? e.end && t2.end() : (this[N3].push(e.proxyErrors ? new Li(this, t2, e) : new Fe2(this, t2, e)), this[Z2] ? jt2(() => this[Bt2]()) : this[Bt2]()), t2;
25713
25816
  }
25714
25817
  unpipe(t2) {
25715
- let e = this[A].find((i2) => i2.dest === t2);
25716
- e && (this[A].length === 1 ? (this[b] && this[yt3] === 0 && (this[b] = false), this[A] = []) : this[A].splice(this[A].indexOf(e), 1), e.unpipe());
25818
+ let e = this[N3].find((i2) => i2.dest === t2);
25819
+ e && (this[N3].length === 1 ? (this[g] && this[Rt2] === 0 && (this[g] = false), this[N3] = []) : this[N3].splice(this[N3].indexOf(e), 1), e.unpipe());
25717
25820
  }
25718
25821
  addListener(t2, e) {
25719
25822
  return this.on(t2, e);
25720
25823
  }
25721
25824
  on(t2, e) {
25722
25825
  let i2 = super.on(t2, e);
25723
- if (t2 === "data") this[C] = false, this[yt3]++, !this[A].length && !this[b] && this[Bt2]();
25724
- else if (t2 === "readable" && this[g] !== 0) super.emit("readable");
25725
- else if (Hr(t2) && this[rt2]) super.emit(t2), this.removeAllListeners(t2);
25726
- else if (t2 === "error" && this[jt2]) {
25826
+ if (t2 === "data") this[C] = false, this[Rt2]++, !this[N3].length && !this[g] && this[Bt2]();
25827
+ else if (t2 === "readable" && this[_2] !== 0) super.emit("readable");
25828
+ else if (Kr(t2) && this[nt2]) super.emit(t2), this.removeAllListeners(t2);
25829
+ else if (t2 === "error" && this[qt]) {
25727
25830
  let r = e;
25728
- this[Z2] ? te2(() => r.call(this, this[jt2])) : r.call(this, this[jt2]);
25831
+ this[Z2] ? jt2(() => r.call(this, this[qt])) : r.call(this, this[qt]);
25729
25832
  }
25730
25833
  return i2;
25731
25834
  }
@@ -25734,58 +25837,58 @@ var D3 = class extends EventEmitter {
25734
25837
  }
25735
25838
  off(t2, e) {
25736
25839
  let i2 = super.off(t2, e);
25737
- return t2 === "data" && (this[yt3] = this.listeners("data").length, this[yt3] === 0 && !this[C] && !this[A].length && (this[b] = false)), i2;
25840
+ return t2 === "data" && (this[Rt2] = this.listeners("data").length, this[Rt2] === 0 && !this[C] && !this[N3].length && (this[g] = false)), i2;
25738
25841
  }
25739
25842
  removeAllListeners(t2) {
25740
25843
  let e = super.removeAllListeners(t2);
25741
- return (t2 === "data" || t2 === void 0) && (this[yt3] = 0, !this[C] && !this[A].length && (this[b] = false)), e;
25844
+ return (t2 === "data" || t2 === void 0) && (this[Rt2] = 0, !this[C] && !this[N3].length && (this[g] = false)), e;
25742
25845
  }
25743
25846
  get emittedEnd() {
25744
- return this[rt2];
25847
+ return this[nt2];
25745
25848
  }
25746
- [j2]() {
25747
- !this[Le2] && !this[rt2] && !this[w] && this[_2].length === 0 && this[q3] && (this[Le2] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne2] && this.emit("close"), this[Le2] = false);
25849
+ [J3]() {
25850
+ !this[De2] && !this[nt2] && !this[S2] && this[b].length === 0 && this[Q2] && (this[De2] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Ne2] && this.emit("close"), this[De2] = false);
25748
25851
  }
25749
25852
  emit(t2, ...e) {
25750
25853
  let i2 = e[0];
25751
- if (t2 !== "error" && t2 !== "close" && t2 !== w && this[w]) return false;
25752
- if (t2 === "data") return !this[L2] && !i2 ? false : this[Z2] ? (te2(() => this[bi](i2)), true) : this[bi](i2);
25753
- if (t2 === "end") return this[Ls]();
25854
+ if (t2 !== "error" && t2 !== "close" && t2 !== S2 && this[S2]) return false;
25855
+ if (t2 === "data") return !this[L2] && !i2 ? false : this[Z2] ? (jt2(() => this[Oi](i2)), true) : this[Oi](i2);
25856
+ if (t2 === "end") return this[Is]();
25754
25857
  if (t2 === "close") {
25755
- if (this[Ne2] = true, !this[rt2] && !this[w]) return false;
25858
+ if (this[Ne2] = true, !this[nt2] && !this[S2]) return false;
25756
25859
  let n2 = super.emit("close");
25757
25860
  return this.removeAllListeners("close"), n2;
25758
25861
  } else if (t2 === "error") {
25759
- this[jt2] = i2, super.emit(Ri, i2);
25862
+ this[qt] = i2, super.emit(_i, i2);
25760
25863
  let n2 = !this[Jt2] || this.listeners("error").length ? super.emit("error", i2) : false;
25761
- return this[j2](), n2;
25864
+ return this[J3](), n2;
25762
25865
  } else if (t2 === "resume") {
25763
25866
  let n2 = super.emit("resume");
25764
- return this[j2](), n2;
25867
+ return this[J3](), n2;
25765
25868
  } else if (t2 === "finish" || t2 === "prefinish") {
25766
25869
  let n2 = super.emit(t2);
25767
25870
  return this.removeAllListeners(t2), n2;
25768
25871
  }
25769
25872
  let r = super.emit(t2, ...e);
25770
- return this[j2](), r;
25873
+ return this[J3](), r;
25771
25874
  }
25772
- [bi](t2) {
25773
- for (let i2 of this[A]) i2.dest.write(t2) === false && this.pause();
25875
+ [Oi](t2) {
25876
+ for (let i2 of this[N3]) i2.dest.write(t2) === false && this.pause();
25774
25877
  let e = this[C] ? false : super.emit("data", t2);
25775
- return this[j2](), e;
25878
+ return this[J3](), e;
25776
25879
  }
25777
- [Ls]() {
25778
- return this[rt2] ? false : (this[rt2] = true, this.readable = false, this[Z2] ? (te2(() => this[_i]()), true) : this[_i]());
25880
+ [Is]() {
25881
+ return this[nt2] ? false : (this[nt2] = true, this.readable = false, this[Z2] ? (jt2(() => this[Ti]()), true) : this[Ti]());
25779
25882
  }
25780
- [_i]() {
25883
+ [Ti]() {
25781
25884
  if (this[Mt2]) {
25782
25885
  let e = this[Mt2].end();
25783
25886
  if (e) {
25784
- for (let i2 of this[A]) i2.dest.write(e);
25887
+ for (let i2 of this[N3]) i2.dest.write(e);
25785
25888
  this[C] || super.emit("data", e);
25786
25889
  }
25787
25890
  }
25788
- for (let e of this[A]) e.end();
25891
+ for (let e of this[N3]) e.end();
25789
25892
  let t2 = super.emit("end");
25790
25893
  return this.removeAllListeners("end"), t2;
25791
25894
  }
@@ -25804,7 +25907,7 @@ var D3 = class extends EventEmitter {
25804
25907
  }
25805
25908
  async promise() {
25806
25909
  return new Promise((t2, e) => {
25807
- this.on(w, () => e(new Error("stream destroyed"))), this.on("error", (i2) => e(i2)), this.on("end", () => t2());
25910
+ this.on(S2, () => e(new Error("stream destroyed"))), this.on("error", (i2) => e(i2)), this.on("end", () => t2());
25808
25911
  });
25809
25912
  }
25810
25913
  [Symbol.asyncIterator]() {
@@ -25814,16 +25917,16 @@ var D3 = class extends EventEmitter {
25814
25917
  if (t2) return e();
25815
25918
  let r = this.read();
25816
25919
  if (r !== null) return Promise.resolve({ done: false, value: r });
25817
- if (this[q3]) return e();
25920
+ if (this[Q2]) return e();
25818
25921
  let n2, o2, h3 = (d) => {
25819
- this.off("data", a2), this.off("end", l), this.off(w, c3), e(), o2(d);
25922
+ this.off("data", a2), this.off("end", l), this.off(S2, c3), e(), o2(d);
25820
25923
  }, a2 = (d) => {
25821
- this.off("error", h3), this.off("end", l), this.off(w, c3), this.pause(), n2({ value: d, done: !!this[q3] });
25924
+ this.off("error", h3), this.off("end", l), this.off(S2, c3), this.pause(), n2({ value: d, done: !!this[Q2] });
25822
25925
  }, l = () => {
25823
- this.off("error", h3), this.off("data", a2), this.off(w, c3), e(), n2({ done: true, value: void 0 });
25926
+ this.off("error", h3), this.off("data", a2), this.off(S2, c3), e(), n2({ done: true, value: void 0 });
25824
25927
  }, c3 = () => h3(new Error("stream destroyed"));
25825
- return new Promise((d, S2) => {
25826
- o2 = S2, n2 = d, this.once(w, c3), this.once("error", h3), this.once("end", l), this.once("data", a2);
25928
+ return new Promise((d, y2) => {
25929
+ o2 = y2, n2 = d, this.once(S2, c3), this.once("error", h3), this.once("end", l), this.once("data", a2);
25827
25930
  });
25828
25931
  }, throw: e, return: e, [Symbol.asyncIterator]() {
25829
25932
  return this;
@@ -25832,70 +25935,70 @@ var D3 = class extends EventEmitter {
25832
25935
  }
25833
25936
  [Symbol.iterator]() {
25834
25937
  this[C] = false;
25835
- let t2 = false, e = () => (this.pause(), this.off(Ri, e), this.off(w, e), this.off("end", e), t2 = true, { done: true, value: void 0 }), i2 = () => {
25938
+ let t2 = false, e = () => (this.pause(), this.off(_i, e), this.off(S2, e), this.off("end", e), t2 = true, { done: true, value: void 0 }), i2 = () => {
25836
25939
  if (t2) return e();
25837
25940
  let r = this.read();
25838
25941
  return r === null ? e() : { done: false, value: r };
25839
25942
  };
25840
- return this.once("end", e), this.once(Ri, e), this.once(w, e), { next: i2, throw: e, return: e, [Symbol.iterator]() {
25943
+ return this.once("end", e), this.once(_i, e), this.once(S2, e), { next: i2, throw: e, return: e, [Symbol.iterator]() {
25841
25944
  return this;
25842
25945
  }, [Symbol.dispose]: () => {
25843
25946
  } };
25844
25947
  }
25845
25948
  destroy(t2) {
25846
- if (this[w]) return t2 ? this.emit("error", t2) : this.emit(w), this;
25847
- this[w] = true, this[C] = true, this[_2].length = 0, this[g] = 0;
25949
+ if (this[S2]) return t2 ? this.emit("error", t2) : this.emit(S2), this;
25950
+ this[S2] = true, this[C] = true, this[b].length = 0, this[_2] = 0;
25848
25951
  let e = this;
25849
- return typeof e.close == "function" && !this[Ne2] && e.close(), t2 ? this.emit("error", t2) : this.emit(w), this;
25952
+ return typeof e.close == "function" && !this[Ne2] && e.close(), t2 ? this.emit("error", t2) : this.emit(S2), this;
25850
25953
  }
25851
25954
  static get isStream() {
25852
- return Br;
25955
+ return Wr;
25853
25956
  }
25854
25957
  };
25855
- var Vr = fs.writev;
25856
- var ot2 = Symbol("_autoClose");
25958
+ var Jr = fs.writev;
25959
+ var ht3 = Symbol("_autoClose");
25857
25960
  var H3 = Symbol("_close");
25858
- var ee2 = Symbol("_ended");
25859
- var m = Symbol("_fd");
25860
- var xi = Symbol("_finished");
25861
- var J3 = Symbol("_flags");
25862
- var Li = Symbol("_flush");
25863
- var Ii = Symbol("_handleChunk");
25864
- var Ci = Symbol("_makeBuf");
25865
- var se2 = Symbol("_mode");
25866
- var Fe2 = Symbol("_needDrain");
25961
+ var te2 = Symbol("_ended");
25962
+ var u2 = Symbol("_fd");
25963
+ var Ni = Symbol("_finished");
25964
+ var tt2 = Symbol("_flags");
25965
+ var Ai = Symbol("_flush");
25966
+ var ki = Symbol("_handleChunk");
25967
+ var vi = Symbol("_makeBuf");
25968
+ var ie2 = Symbol("_mode");
25969
+ var ke2 = Symbol("_needDrain");
25867
25970
  var Ut = Symbol("_onerror");
25868
25971
  var Ht = Symbol("_onopen");
25869
- var Ni = Symbol("_onread");
25972
+ var Ii = Symbol("_onread");
25870
25973
  var Pt = Symbol("_onwrite");
25871
- var ht3 = Symbol("_open");
25974
+ var at2 = Symbol("_open");
25872
25975
  var U3 = Symbol("_path");
25873
- var nt2 = Symbol("_pos");
25976
+ var ot2 = Symbol("_pos");
25874
25977
  var Y = Symbol("_queue");
25875
25978
  var zt = Symbol("_read");
25876
- var Ai = Symbol("_readSize");
25877
- var Q2 = Symbol("_reading");
25878
- var ie2 = Symbol("_remain");
25879
- var Di = Symbol("_size");
25880
- var ke2 = Symbol("_write");
25881
- var Rt2 = Symbol("_writing");
25882
- var ve2 = Symbol("_defaultFlag");
25979
+ var Ci = Symbol("_readSize");
25980
+ var j2 = Symbol("_reading");
25981
+ var ee2 = Symbol("_remain");
25982
+ var Fi = Symbol("_size");
25983
+ var ve2 = Symbol("_write");
25984
+ var gt3 = Symbol("_writing");
25985
+ var Me = Symbol("_defaultFlag");
25883
25986
  var bt3 = Symbol("_errored");
25884
- var _t2 = class extends D3 {
25987
+ var _t2 = class extends A {
25885
25988
  [bt3] = false;
25886
- [m];
25989
+ [u2];
25887
25990
  [U3];
25888
- [Ai];
25889
- [Q2] = false;
25890
- [Di];
25891
- [ie2];
25892
- [ot2];
25991
+ [Ci];
25992
+ [j2] = false;
25993
+ [Fi];
25994
+ [ee2];
25995
+ [ht3];
25893
25996
  constructor(t2, e) {
25894
25997
  if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t2 != "string") throw new TypeError("path must be a string");
25895
- this[bt3] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U3] = t2, this[Ai] = e.readSize || 16 * 1024 * 1024, this[Q2] = false, this[Di] = typeof e.size == "number" ? e.size : 1 / 0, this[ie2] = this[Di], this[ot2] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[m] == "number" ? this[zt]() : this[ht3]();
25998
+ this[bt3] = false, this[u2] = typeof e.fd == "number" ? e.fd : void 0, this[U3] = t2, this[Ci] = e.readSize || 16 * 1024 * 1024, this[j2] = false, this[Fi] = typeof e.size == "number" ? e.size : 1 / 0, this[ee2] = this[Fi], this[ht3] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[u2] == "number" ? this[zt]() : this[at2]();
25896
25999
  }
25897
26000
  get fd() {
25898
- return this[m];
26001
+ return this[u2];
25899
26002
  }
25900
26003
  get path() {
25901
26004
  return this[U3];
@@ -25906,38 +26009,38 @@ var _t2 = class extends D3 {
25906
26009
  end() {
25907
26010
  throw new TypeError("this is a readable stream");
25908
26011
  }
25909
- [ht3]() {
26012
+ [at2]() {
25910
26013
  fs.open(this[U3], "r", (t2, e) => this[Ht](t2, e));
25911
26014
  }
25912
26015
  [Ht](t2, e) {
25913
- t2 ? this[Ut](t2) : (this[m] = e, this.emit("open", e), this[zt]());
26016
+ t2 ? this[Ut](t2) : (this[u2] = e, this.emit("open", e), this[zt]());
25914
26017
  }
25915
- [Ci]() {
25916
- return Buffer.allocUnsafe(Math.min(this[Ai], this[ie2]));
26018
+ [vi]() {
26019
+ return Buffer.allocUnsafe(Math.min(this[Ci], this[ee2]));
25917
26020
  }
25918
26021
  [zt]() {
25919
- if (!this[Q2]) {
25920
- this[Q2] = true;
25921
- let t2 = this[Ci]();
25922
- if (t2.length === 0) return process.nextTick(() => this[Ni](null, 0, t2));
25923
- fs.read(this[m], t2, 0, t2.length, null, (e, i2, r) => this[Ni](e, i2, r));
26022
+ if (!this[j2]) {
26023
+ this[j2] = true;
26024
+ let t2 = this[vi]();
26025
+ if (t2.length === 0) return process.nextTick(() => this[Ii](null, 0, t2));
26026
+ fs.read(this[u2], t2, 0, t2.length, null, (e, i2, r) => this[Ii](e, i2, r));
25924
26027
  }
25925
26028
  }
25926
- [Ni](t2, e, i2) {
25927
- this[Q2] = false, t2 ? this[Ut](t2) : this[Ii](e, i2) && this[zt]();
26029
+ [Ii](t2, e, i2) {
26030
+ this[j2] = false, t2 ? this[Ut](t2) : this[ki](e, i2) && this[zt]();
25928
26031
  }
25929
26032
  [H3]() {
25930
- if (this[ot2] && typeof this[m] == "number") {
25931
- let t2 = this[m];
25932
- this[m] = void 0, fs.close(t2, (e) => e ? this.emit("error", e) : this.emit("close"));
26033
+ if (this[ht3] && typeof this[u2] == "number") {
26034
+ let t2 = this[u2];
26035
+ this[u2] = void 0, fs.close(t2, (e) => e ? this.emit("error", e) : this.emit("close"));
25933
26036
  }
25934
26037
  }
25935
26038
  [Ut](t2) {
25936
- this[Q2] = true, this[H3](), this.emit("error", t2);
26039
+ this[j2] = true, this[H3](), this.emit("error", t2);
25937
26040
  }
25938
- [Ii](t2, e) {
26041
+ [ki](t2, e) {
25939
26042
  let i2 = false;
25940
- return this[ie2] -= t2, t2 > 0 && (i2 = super.write(t2 < e.length ? e.subarray(0, t2) : e)), (t2 === 0 || this[ie2] <= 0) && (i2 = false, this[H3](), super.end()), i2;
26043
+ return this[ee2] -= t2, t2 > 0 && (i2 = super.write(t2 < e.length ? e.subarray(0, t2) : e)), (t2 === 0 || this[ee2] <= 0) && (i2 = false, this[H3](), super.end()), i2;
25941
26044
  }
25942
26045
  emit(t2, ...e) {
25943
26046
  switch (t2) {
@@ -25945,7 +26048,7 @@ var _t2 = class extends D3 {
25945
26048
  case "finish":
25946
26049
  return false;
25947
26050
  case "drain":
25948
- return typeof this[m] == "number" && this[zt](), false;
26051
+ return typeof this[u2] == "number" && this[zt](), false;
25949
26052
  case "error":
25950
26053
  return this[bt3] ? false : (this[bt3] = true, super.emit(t2, ...e));
25951
26054
  default:
@@ -25953,8 +26056,8 @@ var _t2 = class extends D3 {
25953
26056
  }
25954
26057
  }
25955
26058
  };
25956
- var Me = class extends _t2 {
25957
- [ht3]() {
26059
+ var Be = class extends _t2 {
26060
+ [at2]() {
25958
26061
  let t2 = true;
25959
26062
  try {
25960
26063
  this[Ht](null, fs.openSync(this[U3], "r")), t2 = false;
@@ -25965,13 +26068,13 @@ var Me = class extends _t2 {
25965
26068
  [zt]() {
25966
26069
  let t2 = true;
25967
26070
  try {
25968
- if (!this[Q2]) {
25969
- this[Q2] = true;
26071
+ if (!this[j2]) {
26072
+ this[j2] = true;
25970
26073
  do {
25971
- let e = this[Ci](), i2 = e.length === 0 ? 0 : fs.readSync(this[m], e, 0, e.length, null);
25972
- if (!this[Ii](i2, e)) break;
26074
+ let e = this[vi](), i2 = e.length === 0 ? 0 : fs.readSync(this[u2], e, 0, e.length, null);
26075
+ if (!this[ki](i2, e)) break;
25973
26076
  } while (true);
25974
- this[Q2] = false;
26077
+ this[j2] = false;
25975
26078
  }
25976
26079
  t2 = false;
25977
26080
  } finally {
@@ -25979,32 +26082,32 @@ var Me = class extends _t2 {
25979
26082
  }
25980
26083
  }
25981
26084
  [H3]() {
25982
- if (this[ot2] && typeof this[m] == "number") {
25983
- let t2 = this[m];
25984
- this[m] = void 0, fs.closeSync(t2), this.emit("close");
26085
+ if (this[ht3] && typeof this[u2] == "number") {
26086
+ let t2 = this[u2];
26087
+ this[u2] = void 0, fs.closeSync(t2), this.emit("close");
25985
26088
  }
25986
26089
  }
25987
26090
  };
25988
- var tt2 = class extends Kr {
26091
+ var et2 = class extends Qr {
25989
26092
  readable = false;
25990
26093
  writable = true;
25991
26094
  [bt3] = false;
25992
- [Rt2] = false;
25993
- [ee2] = false;
26095
+ [gt3] = false;
26096
+ [te2] = false;
25994
26097
  [Y] = [];
25995
- [Fe2] = false;
26098
+ [ke2] = false;
25996
26099
  [U3];
25997
- [se2];
26100
+ [ie2];
26101
+ [ht3];
26102
+ [u2];
26103
+ [Me];
26104
+ [tt2];
26105
+ [Ni] = false;
25998
26106
  [ot2];
25999
- [m];
26000
- [ve2];
26001
- [J3];
26002
- [xi] = false;
26003
- [nt2];
26004
26107
  constructor(t2, e) {
26005
- e = e || {}, super(e), this[U3] = t2, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[se2] = e.mode === void 0 ? 438 : e.mode, this[nt2] = typeof e.start == "number" ? e.start : void 0, this[ot2] = typeof e.autoClose == "boolean" ? e.autoClose : true;
26006
- let i2 = this[nt2] !== void 0 ? "r+" : "w";
26007
- this[ve2] = e.flags === void 0, this[J3] = e.flags === void 0 ? i2 : e.flags, this[m] === void 0 && this[ht3]();
26108
+ e = e || {}, super(e), this[U3] = t2, this[u2] = typeof e.fd == "number" ? e.fd : void 0, this[ie2] = e.mode === void 0 ? 438 : e.mode, this[ot2] = typeof e.start == "number" ? e.start : void 0, this[ht3] = typeof e.autoClose == "boolean" ? e.autoClose : true;
26109
+ let i2 = this[ot2] !== void 0 ? "r+" : "w";
26110
+ this[Me] = e.flags === void 0, this[tt2] = e.flags === void 0 ? i2 : e.flags, this[u2] === void 0 && this[at2]();
26008
26111
  }
26009
26112
  emit(t2, ...e) {
26010
26113
  if (t2 === "error") {
@@ -26014,69 +26117,69 @@ var tt2 = class extends Kr {
26014
26117
  return super.emit(t2, ...e);
26015
26118
  }
26016
26119
  get fd() {
26017
- return this[m];
26120
+ return this[u2];
26018
26121
  }
26019
26122
  get path() {
26020
26123
  return this[U3];
26021
26124
  }
26022
26125
  [Ut](t2) {
26023
- this[H3](), this[Rt2] = true, this.emit("error", t2);
26126
+ this[H3](), this[gt3] = true, this.emit("error", t2);
26024
26127
  }
26025
- [ht3]() {
26026
- fs.open(this[U3], this[J3], this[se2], (t2, e) => this[Ht](t2, e));
26128
+ [at2]() {
26129
+ fs.open(this[U3], this[tt2], this[ie2], (t2, e) => this[Ht](t2, e));
26027
26130
  }
26028
26131
  [Ht](t2, e) {
26029
- this[ve2] && this[J3] === "r+" && t2 && t2.code === "ENOENT" ? (this[J3] = "w", this[ht3]()) : t2 ? this[Ut](t2) : (this[m] = e, this.emit("open", e), this[Rt2] || this[Li]());
26132
+ this[Me] && this[tt2] === "r+" && t2 && t2.code === "ENOENT" ? (this[tt2] = "w", this[at2]()) : t2 ? this[Ut](t2) : (this[u2] = e, this.emit("open", e), this[gt3] || this[Ai]());
26030
26133
  }
26031
26134
  end(t2, e) {
26032
- return t2 && this.write(t2, e), this[ee2] = true, !this[Rt2] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
26135
+ return t2 && this.write(t2, e), this[te2] = true, !this[gt3] && !this[Y].length && typeof this[u2] == "number" && this[Pt](null, 0), this;
26033
26136
  }
26034
26137
  write(t2, e) {
26035
- return typeof t2 == "string" && (t2 = Buffer.from(t2, e)), this[ee2] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[Rt2] || this[Y].length ? (this[Y].push(t2), this[Fe2] = true, false) : (this[Rt2] = true, this[ke2](t2), true);
26138
+ return typeof t2 == "string" && (t2 = Buffer.from(t2, e)), this[te2] ? (this.emit("error", new Error("write() after end()")), false) : this[u2] === void 0 || this[gt3] || this[Y].length ? (this[Y].push(t2), this[ke2] = true, false) : (this[gt3] = true, this[ve2](t2), true);
26036
26139
  }
26037
- [ke2](t2) {
26038
- fs.write(this[m], t2, 0, t2.length, this[nt2], (e, i2) => this[Pt](e, i2));
26140
+ [ve2](t2) {
26141
+ fs.write(this[u2], t2, 0, t2.length, this[ot2], (e, i2) => this[Pt](e, i2));
26039
26142
  }
26040
26143
  [Pt](t2, e) {
26041
- t2 ? this[Ut](t2) : (this[nt2] !== void 0 && typeof e == "number" && (this[nt2] += e), this[Y].length ? this[Li]() : (this[Rt2] = false, this[ee2] && !this[xi] ? (this[xi] = true, this[H3](), this.emit("finish")) : this[Fe2] && (this[Fe2] = false, this.emit("drain"))));
26144
+ t2 ? this[Ut](t2) : (this[ot2] !== void 0 && typeof e == "number" && (this[ot2] += e), this[Y].length ? this[Ai]() : (this[gt3] = false, this[te2] && !this[Ni] ? (this[Ni] = true, this[H3](), this.emit("finish")) : this[ke2] && (this[ke2] = false, this.emit("drain"))));
26042
26145
  }
26043
- [Li]() {
26044
- if (this[Y].length === 0) this[ee2] && this[Pt](null, 0);
26045
- else if (this[Y].length === 1) this[ke2](this[Y].pop());
26146
+ [Ai]() {
26147
+ if (this[Y].length === 0) this[te2] && this[Pt](null, 0);
26148
+ else if (this[Y].length === 1) this[ve2](this[Y].pop());
26046
26149
  else {
26047
26150
  let t2 = this[Y];
26048
- this[Y] = [], Vr(this[m], t2, this[nt2], (e, i2) => this[Pt](e, i2));
26151
+ this[Y] = [], Jr(this[u2], t2, this[ot2], (e, i2) => this[Pt](e, i2));
26049
26152
  }
26050
26153
  }
26051
26154
  [H3]() {
26052
- if (this[ot2] && typeof this[m] == "number") {
26053
- let t2 = this[m];
26054
- this[m] = void 0, fs.close(t2, (e) => e ? this.emit("error", e) : this.emit("close"));
26155
+ if (this[ht3] && typeof this[u2] == "number") {
26156
+ let t2 = this[u2];
26157
+ this[u2] = void 0, fs.close(t2, (e) => e ? this.emit("error", e) : this.emit("close"));
26055
26158
  }
26056
26159
  }
26057
26160
  };
26058
- var Wt3 = class extends tt2 {
26059
- [ht3]() {
26161
+ var Wt3 = class extends et2 {
26162
+ [at2]() {
26060
26163
  let t2;
26061
- if (this[ve2] && this[J3] === "r+") try {
26062
- t2 = fs.openSync(this[U3], this[J3], this[se2]);
26164
+ if (this[Me] && this[tt2] === "r+") try {
26165
+ t2 = fs.openSync(this[U3], this[tt2], this[ie2]);
26063
26166
  } catch (e) {
26064
- if (e?.code === "ENOENT") return this[J3] = "w", this[ht3]();
26167
+ if (e?.code === "ENOENT") return this[tt2] = "w", this[at2]();
26065
26168
  throw e;
26066
26169
  }
26067
- else t2 = fs.openSync(this[U3], this[J3], this[se2]);
26170
+ else t2 = fs.openSync(this[U3], this[tt2], this[ie2]);
26068
26171
  this[Ht](null, t2);
26069
26172
  }
26070
26173
  [H3]() {
26071
- if (this[ot2] && typeof this[m] == "number") {
26072
- let t2 = this[m];
26073
- this[m] = void 0, fs.closeSync(t2), this.emit("close");
26174
+ if (this[ht3] && typeof this[u2] == "number") {
26175
+ let t2 = this[u2];
26176
+ this[u2] = void 0, fs.closeSync(t2), this.emit("close");
26074
26177
  }
26075
26178
  }
26076
- [ke2](t2) {
26179
+ [ve2](t2) {
26077
26180
  let e = true;
26078
26181
  try {
26079
- this[Pt](null, fs.writeSync(this[m], t2, 0, t2.length, this[nt2])), e = false;
26182
+ this[Pt](null, fs.writeSync(this[u2], t2, 0, t2.length, this[ot2])), e = false;
26080
26183
  } finally {
26081
26184
  if (e) try {
26082
26185
  this[H3]();
@@ -26085,53 +26188,53 @@ var Wt3 = class extends tt2 {
26085
26188
  }
26086
26189
  }
26087
26190
  };
26088
- 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"]]);
26089
- var As = (s3) => !!s3.sync && !!s3.file;
26090
- var Ds = (s3) => !s3.sync && !!s3.file;
26091
- var Is = (s3) => !!s3.sync && !s3.file;
26092
- var Cs = (s3) => !s3.sync && !s3.file;
26093
- var Fs = (s3) => !!s3.file;
26094
- var Xr = (s3) => {
26095
- let t2 = $r.get(s3);
26191
+ var jr = /* @__PURE__ */ new Map([["C", "cwd"], ["f", "file"], ["z", "gzip"], ["P", "preservePaths"], ["U", "unlink"], ["strip-components", "strip"], ["stripComponents", "strip"], ["keep-newer", "newer"], ["keepNewer", "newer"], ["keep-newer-files", "newer"], ["keepNewerFiles", "newer"], ["k", "keep"], ["keep-existing", "keep"], ["keepExisting", "keep"], ["m", "noMtime"], ["no-mtime", "noMtime"], ["p", "preserveOwner"], ["L", "follow"], ["h", "follow"], ["onentry", "onReadEntry"]]);
26192
+ var Fs = (s3) => !!s3.sync && !!s3.file;
26193
+ var ks = (s3) => !s3.sync && !!s3.file;
26194
+ var vs = (s3) => !!s3.sync && !s3.file;
26195
+ var Ms = (s3) => !s3.sync && !s3.file;
26196
+ var Bs = (s3) => !!s3.file;
26197
+ var tn = (s3) => {
26198
+ let t2 = jr.get(s3);
26096
26199
  return t2 || s3;
26097
26200
  };
26098
- var re2 = (s3 = {}) => {
26201
+ var se2 = (s3 = {}) => {
26099
26202
  if (!s3) return {};
26100
26203
  let t2 = {};
26101
26204
  for (let [e, i2] of Object.entries(s3)) {
26102
- let r = Xr(e);
26205
+ let r = tn(e);
26103
26206
  t2[r] = i2;
26104
26207
  }
26105
26208
  return t2.chmod === void 0 && t2.noChmod === false && (t2.chmod = true), delete t2.noChmod, t2;
26106
26209
  };
26107
26210
  var K2 = (s3, t2, e, i2, r) => Object.assign((n2 = [], o2, h3) => {
26108
26211
  Array.isArray(n2) && (o2 = n2, n2 = {}), typeof o2 == "function" && (h3 = o2, o2 = void 0), o2 = o2 ? Array.from(o2) : [];
26109
- let a2 = re2(n2);
26110
- if (r?.(a2, o2), As(a2)) {
26212
+ let a2 = se2(n2);
26213
+ if (r?.(a2, o2), Fs(a2)) {
26111
26214
  if (typeof h3 == "function") throw new TypeError("callback not supported for sync tar functions");
26112
26215
  return s3(a2, o2);
26113
- } else if (Ds(a2)) {
26216
+ } else if (ks(a2)) {
26114
26217
  let l = t2(a2, o2);
26115
26218
  return h3 ? l.then(() => h3(), h3) : l;
26116
- } else if (Is(a2)) {
26219
+ } else if (vs(a2)) {
26117
26220
  if (typeof h3 == "function") throw new TypeError("callback not supported for sync tar functions");
26118
26221
  return e(a2, o2);
26119
- } else if (Cs(a2)) {
26222
+ } else if (Ms(a2)) {
26120
26223
  if (typeof h3 == "function") throw new TypeError("callback only supported with file option");
26121
26224
  return i2(a2, o2);
26122
26225
  }
26123
26226
  throw new Error("impossible options??");
26124
26227
  }, { syncFile: s3, asyncFile: t2, syncNoFile: e, asyncNoFile: i2, validate: r });
26125
- var jr = ks__default.constants || { ZLIB_VERNUM: 4736 };
26126
- var M2 = 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));
26127
- var Qr = Buffer$1.concat;
26128
- var vs = Object.getOwnPropertyDescriptor(Buffer$1, "concat");
26129
- var Jr = (s3) => s3;
26130
- var ki = vs?.writable === true || vs?.set !== void 0 ? (s3) => {
26131
- Buffer$1.concat = s3 ? Jr : Qr;
26228
+ var sn = Ps__default.constants || { ZLIB_VERNUM: 4736 };
26229
+ var M2 = Object.freeze(Object.assign(/* @__PURE__ */ Object.create(null), { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, Z_VERSION_ERROR: -6, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, DEFLATE: 1, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: 7, BROTLI_DECODE: 8, BROTLI_ENCODE: 9, Z_MIN_WINDOWBITS: 8, Z_MAX_WINDOWBITS: 15, Z_DEFAULT_WINDOWBITS: 15, Z_MIN_CHUNK: 64, Z_MAX_CHUNK: 1 / 0, Z_DEFAULT_CHUNK: 16384, Z_MIN_MEMLEVEL: 1, Z_MAX_MEMLEVEL: 9, Z_DEFAULT_MEMLEVEL: 8, Z_MIN_LEVEL: -1, Z_MAX_LEVEL: 9, Z_DEFAULT_LEVEL: -1, BROTLI_OPERATION_PROCESS: 0, BROTLI_OPERATION_FLUSH: 1, BROTLI_OPERATION_FINISH: 2, BROTLI_OPERATION_EMIT_METADATA: 3, BROTLI_MODE_GENERIC: 0, BROTLI_MODE_TEXT: 1, BROTLI_MODE_FONT: 2, BROTLI_DEFAULT_MODE: 0, BROTLI_MIN_QUALITY: 0, BROTLI_MAX_QUALITY: 11, BROTLI_DEFAULT_QUALITY: 11, BROTLI_MIN_WINDOW_BITS: 10, BROTLI_MAX_WINDOW_BITS: 24, BROTLI_LARGE_MAX_WINDOW_BITS: 30, BROTLI_DEFAULT_WINDOW: 22, BROTLI_MIN_INPUT_BLOCK_BITS: 16, BROTLI_MAX_INPUT_BLOCK_BITS: 24, BROTLI_PARAM_MODE: 0, BROTLI_PARAM_QUALITY: 1, BROTLI_PARAM_LGWIN: 2, BROTLI_PARAM_LGBLOCK: 3, BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4, BROTLI_PARAM_SIZE_HINT: 5, BROTLI_PARAM_LARGE_WINDOW: 6, BROTLI_PARAM_NPOSTFIX: 7, BROTLI_PARAM_NDIRECT: 8, BROTLI_DECODER_RESULT_ERROR: 0, BROTLI_DECODER_RESULT_SUCCESS: 1, BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0, BROTLI_DECODER_PARAM_LARGE_WINDOW: 1, BROTLI_DECODER_NO_ERROR: 0, BROTLI_DECODER_SUCCESS: 1, BROTLI_DECODER_NEEDS_MORE_INPUT: 2, BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1, BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2, BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4, BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5, BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6, BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7, BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9, BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10, BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11, BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12, BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13, BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14, BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15, BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16, BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19, BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21, BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22, BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26, BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27, BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30, BROTLI_DECODER_ERROR_UNREACHABLE: -31 }, sn));
26230
+ var rn = Buffer$1.concat;
26231
+ var zs = Object.getOwnPropertyDescriptor(Buffer$1, "concat");
26232
+ var nn = (s3) => s3;
26233
+ var Bi = zs?.writable === true || zs?.set !== void 0 ? (s3) => {
26234
+ Buffer$1.concat = s3 ? nn : rn;
26132
26235
  } : (s3) => {
26133
26236
  };
26134
- var Ot = Symbol("_superWrite");
26237
+ var Tt2 = Symbol("_superWrite");
26135
26238
  var Gt2 = class extends Error {
26136
26239
  code;
26137
26240
  errno;
@@ -26142,8 +26245,8 @@ var Gt2 = class extends Error {
26142
26245
  return "ZlibError";
26143
26246
  }
26144
26247
  };
26145
- var vi = Symbol("flushFlag");
26146
- var ne2 = class extends D3 {
26248
+ var Pi = Symbol("flushFlag");
26249
+ var re2 = class extends A {
26147
26250
  #t = false;
26148
26251
  #i = false;
26149
26252
  #s;
@@ -26162,9 +26265,9 @@ var ne2 = class extends D3 {
26162
26265
  }
26163
26266
  constructor(t2, e) {
26164
26267
  if (!t2 || typeof t2 != "object") throw new TypeError("invalid options for ZlibBase constructor");
26165
- if (super(t2), this.#s = t2.flush ?? 0, this.#n = t2.finishFlush ?? 0, this.#r = t2.fullFlushFlag ?? 0, typeof ks[e] != "function") throw new TypeError("Compression method not supported: " + e);
26268
+ if (super(t2), this.#s = t2.flush ?? 0, this.#n = t2.finishFlush ?? 0, this.#r = t2.fullFlushFlag ?? 0, typeof Ps[e] != "function") throw new TypeError("Compression method not supported: " + e);
26166
26269
  try {
26167
- this.#e = new ks[e](t2);
26270
+ this.#e = new Ps[e](t2);
26168
26271
  } catch (i2) {
26169
26272
  throw new Gt2(i2, this.constructor);
26170
26273
  }
@@ -26176,10 +26279,10 @@ var ne2 = class extends D3 {
26176
26279
  this.#e && (this.#e.close(), this.#e = void 0, this.emit("close"));
26177
26280
  }
26178
26281
  reset() {
26179
- if (!this.#t) return Mi(this.#e, "zlib binding closed"), this.#e.reset?.();
26282
+ if (!this.#t) return zi(this.#e, "zlib binding closed"), this.#e.reset?.();
26180
26283
  }
26181
26284
  flush(t2) {
26182
- this.ended || (typeof t2 != "number" && (t2 = this.#r), this.write(Object.assign(Buffer$1.alloc(0), { [vi]: t2 })));
26285
+ this.ended || (typeof t2 != "number" && (t2 = this.#r), this.write(Object.assign(Buffer$1.alloc(0), { [Pi]: t2 })));
26183
26286
  }
26184
26287
  end(t2, e, i2) {
26185
26288
  return typeof t2 == "function" && (i2 = t2, e = void 0, t2 = void 0), typeof e == "function" && (i2 = e, e = void 0), t2 && (e ? this.write(t2, e) : this.write(t2)), this.flush(this.#n), this.#i = true, super.end(i2);
@@ -26187,24 +26290,24 @@ var ne2 = class extends D3 {
26187
26290
  get ended() {
26188
26291
  return this.#i;
26189
26292
  }
26190
- [Ot](t2) {
26293
+ [Tt2](t2) {
26191
26294
  return super.write(t2);
26192
26295
  }
26193
26296
  write(t2, e, i2) {
26194
26297
  if (typeof e == "function" && (i2 = e, e = "utf8"), typeof t2 == "string" && (t2 = Buffer$1.from(t2, e)), this.#t) return;
26195
- Mi(this.#e, "zlib binding closed");
26298
+ zi(this.#e, "zlib binding closed");
26196
26299
  let r = this.#e._handle, n2 = r.close;
26197
26300
  r.close = () => {
26198
26301
  };
26199
26302
  let o2 = this.#e.close;
26200
26303
  this.#e.close = () => {
26201
- }, ki(true);
26304
+ }, Bi(true);
26202
26305
  let h3;
26203
26306
  try {
26204
- let l = typeof t2[vi] == "number" ? t2[vi] : this.#s;
26205
- h3 = this.#e._processChunk(t2, l), ki(false);
26307
+ let l = typeof t2[Pi] == "number" ? t2[Pi] : this.#s;
26308
+ h3 = this.#e._processChunk(t2, l), Bi(false);
26206
26309
  } catch (l) {
26207
- ki(false), this.#o(new Gt2(l, this.write));
26310
+ Bi(false), this.#o(new Gt2(l, this.write));
26208
26311
  } finally {
26209
26312
  this.#e && (this.#e._handle = r, r.close = n2, this.#e.close = o2, this.#e.removeAllListeners("error"));
26210
26313
  }
@@ -26212,13 +26315,13 @@ var ne2 = class extends D3 {
26212
26315
  let a2;
26213
26316
  if (h3) if (Array.isArray(h3) && h3.length > 0) {
26214
26317
  let l = h3[0];
26215
- a2 = this[Ot](Buffer$1.from(l));
26216
- for (let c3 = 1; c3 < h3.length; c3++) a2 = this[Ot](h3[c3]);
26217
- } else a2 = this[Ot](Buffer$1.from(h3));
26318
+ a2 = this[Tt2](Buffer$1.from(l));
26319
+ for (let c3 = 1; c3 < h3.length; c3++) a2 = this[Tt2](h3[c3]);
26320
+ } else a2 = this[Tt2](Buffer$1.from(h3));
26218
26321
  return i2 && i2(), a2;
26219
26322
  }
26220
26323
  };
26221
- var Be = class extends ne2 {
26324
+ var Pe2 = class extends re2 {
26222
26325
  #t;
26223
26326
  #i;
26224
26327
  constructor(t2, e) {
@@ -26229,7 +26332,7 @@ var Be = class extends ne2 {
26229
26332
  if (!this.handle) throw new Error("cannot switch params when binding is closed");
26230
26333
  if (!this.handle.params) throw new Error("not supported in this implementation");
26231
26334
  if (this.#t !== t2 || this.#i !== e) {
26232
- this.flush(M2.Z_SYNC_FLUSH), Mi(this.handle, "zlib binding closed");
26335
+ this.flush(M2.Z_SYNC_FLUSH), zi(this.handle, "zlib binding closed");
26233
26336
  let i2 = this.handle.flush;
26234
26337
  this.handle.flush = (r, n2) => {
26235
26338
  typeof r == "function" && (n2 = r, r = this.flushFlag), this.flush(r), n2?.();
@@ -26244,96 +26347,98 @@ var Be = class extends ne2 {
26244
26347
  }
26245
26348
  }
26246
26349
  };
26247
- var Pe2 = class extends Be {
26350
+ var ze2 = class extends Pe2 {
26248
26351
  #t;
26249
26352
  constructor(t2) {
26250
26353
  super(t2, "Gzip"), this.#t = t2 && !!t2.portable;
26251
26354
  }
26252
- [Ot](t2) {
26253
- return this.#t ? (this.#t = false, t2[9] = 255, super[Ot](t2)) : super[Ot](t2);
26355
+ [Tt2](t2) {
26356
+ return this.#t ? (this.#t = false, t2[9] = 255, super[Tt2](t2)) : super[Tt2](t2);
26254
26357
  }
26255
26358
  };
26256
- var ze2 = class extends Be {
26359
+ var Ue2 = class extends Pe2 {
26257
26360
  constructor(t2) {
26258
26361
  super(t2, "Unzip");
26259
26362
  }
26260
26363
  };
26261
- var Ue2 = class extends ne2 {
26364
+ var He2 = class extends re2 {
26262
26365
  constructor(t2, e) {
26263
26366
  t2 = t2 || {}, t2.flush = t2.flush || M2.BROTLI_OPERATION_PROCESS, t2.finishFlush = t2.finishFlush || M2.BROTLI_OPERATION_FINISH, t2.fullFlushFlag = M2.BROTLI_OPERATION_FLUSH, super(t2, e);
26264
26367
  }
26265
26368
  };
26266
- var He2 = class extends Ue2 {
26369
+ var We2 = class extends He2 {
26267
26370
  constructor(t2) {
26268
26371
  super(t2, "BrotliCompress");
26269
26372
  }
26270
26373
  };
26271
- var We2 = class extends Ue2 {
26374
+ var Ge2 = class extends He2 {
26272
26375
  constructor(t2) {
26273
26376
  super(t2, "BrotliDecompress");
26274
26377
  }
26275
26378
  };
26276
- var Ge2 = class extends ne2 {
26379
+ var Ze = class extends re2 {
26277
26380
  constructor(t2, e) {
26278
26381
  t2 = t2 || {}, t2.flush = t2.flush || M2.ZSTD_e_continue, t2.finishFlush = t2.finishFlush || M2.ZSTD_e_end, t2.fullFlushFlag = M2.ZSTD_e_flush, super(t2, e);
26279
26382
  }
26280
26383
  };
26281
- var Ze = class extends Ge2 {
26384
+ var Ye = class extends Ze {
26282
26385
  constructor(t2) {
26283
26386
  super(t2, "ZstdCompress");
26284
26387
  }
26285
26388
  };
26286
- var Ye = class extends Ge2 {
26389
+ var Ke2 = class extends Ze {
26287
26390
  constructor(t2) {
26288
26391
  super(t2, "ZstdDecompress");
26289
26392
  }
26290
26393
  };
26291
- var Ms = (s3, t2) => {
26292
- if (Number.isSafeInteger(s3)) s3 < 0 ? sn(s3, t2) : en(s3, t2);
26394
+ var Us = (s3, t2) => {
26395
+ if (Number.isSafeInteger(s3)) s3 < 0 ? an(s3, t2) : hn(s3, t2);
26293
26396
  else throw Error("cannot encode number outside of javascript safe integer range");
26294
26397
  return t2;
26295
26398
  };
26296
- var en = (s3, t2) => {
26399
+ var hn = (s3, t2) => {
26297
26400
  t2[0] = 128;
26298
26401
  for (var e = t2.length; e > 1; e--) t2[e - 1] = s3 & 255, s3 = Math.floor(s3 / 256);
26299
26402
  };
26300
- var sn = (s3, t2) => {
26403
+ var an = (s3, t2) => {
26301
26404
  t2[0] = 255;
26302
26405
  var e = false;
26303
26406
  s3 = s3 * -1;
26304
26407
  for (var i2 = t2.length; i2 > 1; i2--) {
26305
26408
  var r = s3 & 255;
26306
- s3 = Math.floor(s3 / 256), e ? t2[i2 - 1] = Ps(r) : r === 0 ? t2[i2 - 1] = 0 : (e = true, t2[i2 - 1] = zs(r));
26409
+ s3 = Math.floor(s3 / 256), e ? t2[i2 - 1] = Ws(r) : r === 0 ? t2[i2 - 1] = 0 : (e = true, t2[i2 - 1] = Gs(r));
26307
26410
  }
26308
26411
  };
26309
- var Bs = (s3) => {
26310
- let t2 = s3[0], e = t2 === 128 ? nn(s3.subarray(1, s3.length)) : t2 === 255 ? rn(s3) : null;
26412
+ var Hs = (s3) => {
26413
+ let t2 = s3[0], e = t2 === 128 ? cn(s3.subarray(1, s3.length)) : t2 === 255 ? ln(s3) : null;
26311
26414
  if (e === null) throw Error("invalid base256 encoding");
26312
26415
  if (!Number.isSafeInteger(e)) throw Error("parsed number outside of javascript safe integer range");
26313
26416
  return e;
26314
26417
  };
26315
- var rn = (s3) => {
26418
+ var ln = (s3) => {
26316
26419
  for (var t2 = s3.length, e = 0, i2 = false, r = t2 - 1; r > -1; r--) {
26317
26420
  var n2 = Number(s3[r]), o2;
26318
- i2 ? o2 = Ps(n2) : n2 === 0 ? o2 = n2 : (i2 = true, o2 = zs(n2)), o2 !== 0 && (e -= o2 * Math.pow(256, t2 - r - 1));
26421
+ i2 ? o2 = Ws(n2) : n2 === 0 ? o2 = n2 : (i2 = true, o2 = Gs(n2)), o2 !== 0 && (e -= o2 * Math.pow(256, t2 - r - 1));
26319
26422
  }
26320
26423
  return e;
26321
26424
  };
26322
- var nn = (s3) => {
26425
+ var cn = (s3) => {
26323
26426
  for (var t2 = s3.length, e = 0, i2 = t2 - 1; i2 > -1; i2--) {
26324
26427
  var r = Number(s3[i2]);
26325
26428
  r !== 0 && (e += r * Math.pow(256, t2 - i2 - 1));
26326
26429
  }
26327
26430
  return e;
26328
26431
  };
26329
- var Ps = (s3) => (255 ^ s3) & 255;
26330
- var zs = (s3) => (255 ^ s3) + 1 & 255;
26331
- var Bi = {};
26332
- vr(Bi, { code: () => Ke2, isCode: () => oe2, isName: () => hn, name: () => he2 });
26333
- var oe2 = (s3) => he2.has(s3);
26334
- var hn = (s3) => Ke2.has(s3);
26335
- var he2 = /* @__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"]]);
26336
- var Ke2 = new Map(Array.from(he2).map((s3) => [s3[1], s3[0]]));
26432
+ var Ws = (s3) => (255 ^ s3) & 255;
26433
+ var Gs = (s3) => (255 ^ s3) + 1 & 255;
26434
+ var Hi = {};
26435
+ Ur(Hi, { code: () => Ve2, isCode: () => ne2, isName: () => dn, name: () => oe2, normalFsTypes: () => Ui });
26436
+ var ne2 = (s3) => oe2.has(s3);
26437
+ var dn = (s3) => Ve2.has(s3);
26438
+ var Ui = /* @__PURE__ */ new Set(["0", "", "1", "2", "3", "4", "5", "6", "7", "D"]);
26439
+ var oe2 = /* @__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"]]);
26440
+ var Ve2 = new Map(Array.from(oe2).map((s3) => [s3[1], s3[0]]));
26441
+ var mn = (s3) => s3 === void 0 || s3 < 0 ? void 0 : s3;
26337
26442
  var F = class {
26338
26443
  cksumValid = false;
26339
26444
  needPax = false;
@@ -26361,46 +26466,45 @@ var F = class {
26361
26466
  }
26362
26467
  decode(t2, e, i2, r) {
26363
26468
  if (e || (e = 0), !t2 || !(t2.length >= e + 512)) throw new Error("need 512 bytes for header");
26364
- this.path = i2?.path ?? Tt2(t2, e, 100), this.mode = i2?.mode ?? r?.mode ?? at2(t2, e + 100, 8), this.uid = i2?.uid ?? r?.uid ?? at2(t2, e + 108, 8), this.gid = i2?.gid ?? r?.gid ?? at2(t2, e + 116, 8), this.size = i2?.size ?? r?.size ?? at2(t2, e + 124, 12), this.mtime = i2?.mtime ?? r?.mtime ?? Pi(t2, e + 136, 12), this.cksum = at2(t2, e + 148, 12), r && this.#i(r, true), i2 && this.#i(i2);
26365
- let n2 = Tt2(t2, e + 156, 1);
26366
- if (oe2(n2) && (this.#t = n2 || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = Tt2(t2, e + 157, 100), t2.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = i2?.uname ?? r?.uname ?? Tt2(t2, e + 265, 32), this.gname = i2?.gname ?? r?.gname ?? Tt2(t2, e + 297, 32), this.devmaj = i2?.devmaj ?? r?.devmaj ?? at2(t2, e + 329, 8) ?? 0, this.devmin = i2?.devmin ?? r?.devmin ?? at2(t2, e + 337, 8) ?? 0, t2[e + 475] !== 0) {
26367
- let h3 = Tt2(t2, e + 345, 155);
26368
- this.path = h3 + "/" + this.path;
26469
+ let n2 = xt2(t2, e + 156, 1), o2 = Ui.has(n2), h3 = o2 ? i2 : void 0, a2 = o2 ? r : void 0;
26470
+ if (this.path = h3?.path ?? xt2(t2, e, 100), this.mode = h3?.mode ?? a2?.mode ?? lt2(t2, e + 100, 8), this.uid = h3?.uid ?? a2?.uid ?? lt2(t2, e + 108, 8), this.gid = h3?.gid ?? a2?.gid ?? lt2(t2, e + 116, 8), this.size = mn(h3?.size ?? a2?.size ?? lt2(t2, e + 124, 12)), this.mtime = h3?.mtime ?? a2?.mtime ?? Wi(t2, e + 136, 12), this.cksum = lt2(t2, e + 148, 12), a2 && this.#i(a2, true), h3 && this.#i(h3), ne2(n2) && (this.#t = n2 || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = xt2(t2, e + 157, 100), t2.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = h3?.uname ?? a2?.uname ?? xt2(t2, e + 265, 32), this.gname = h3?.gname ?? a2?.gname ?? xt2(t2, e + 297, 32), this.devmaj = h3?.devmaj ?? a2?.devmaj ?? lt2(t2, e + 329, 8) ?? 0, this.devmin = h3?.devmin ?? a2?.devmin ?? lt2(t2, e + 337, 8) ?? 0, t2[e + 475] !== 0) {
26471
+ let c3 = xt2(t2, e + 345, 155);
26472
+ this.path = c3 + "/" + this.path;
26369
26473
  } else {
26370
- let h3 = Tt2(t2, e + 345, 130);
26371
- h3 && (this.path = h3 + "/" + this.path), this.atime = i2?.atime ?? r?.atime ?? Pi(t2, e + 476, 12), this.ctime = i2?.ctime ?? r?.ctime ?? Pi(t2, e + 488, 12);
26474
+ let c3 = xt2(t2, e + 345, 130);
26475
+ c3 && (this.path = c3 + "/" + this.path), this.atime = i2?.atime ?? r?.atime ?? Wi(t2, e + 476, 12), this.ctime = i2?.ctime ?? r?.ctime ?? Wi(t2, e + 488, 12);
26372
26476
  }
26373
- let o2 = 256;
26374
- for (let h3 = e; h3 < e + 148; h3++) o2 += t2[h3];
26375
- for (let h3 = e + 156; h3 < e + 512; h3++) o2 += t2[h3];
26376
- this.cksumValid = o2 === this.cksum, this.cksum === void 0 && o2 === 256 && (this.nullBlock = true);
26477
+ let l = 256;
26478
+ for (let c3 = e; c3 < e + 148; c3++) l += t2[c3];
26479
+ for (let c3 = e + 156; c3 < e + 512; c3++) l += t2[c3];
26480
+ this.cksumValid = l === this.cksum, this.cksum === void 0 && l === 256 && (this.nullBlock = true);
26377
26481
  }
26378
26482
  #i(t2, e = false) {
26379
- Object.assign(this, Object.fromEntries(Object.entries(t2).filter(([i2, r]) => !(r == null || i2 === "path" && e || i2 === "linkpath" && e || i2 === "global"))));
26483
+ Object.assign(this, Object.fromEntries(Object.entries(t2).filter(([i2, r]) => !(r == null || i2 === "size" && Number(r) < 0 || i2 === "path" && e || i2 === "linkpath" && e || i2 === "global"))));
26380
26484
  }
26381
26485
  encode(t2, e = 0) {
26382
26486
  if (t2 || (t2 = this.block = Buffer.alloc(512)), this.#t === "Unsupported" && (this.#t = "0"), !(t2.length >= e + 512)) throw new Error("need 512 bytes for header");
26383
- let i2 = this.ctime || this.atime ? 130 : 155, r = an(this.path || "", i2), n2 = r[0], o2 = r[1];
26384
- this.needPax = !!r[2], this.needPax = xt2(t2, e, 100, n2) || this.needPax, this.needPax = lt2(t2, e + 100, 8, this.mode) || this.needPax, this.needPax = lt2(t2, e + 108, 8, this.uid) || this.needPax, this.needPax = lt2(t2, e + 116, 8, this.gid) || this.needPax, this.needPax = lt2(t2, e + 124, 12, this.size) || this.needPax, this.needPax = zi(t2, e + 136, 12, this.mtime) || this.needPax, t2[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = xt2(t2, e + 157, 100, this.linkpath) || this.needPax, t2.write("ustar\x0000", e + 257, 8), this.needPax = xt2(t2, e + 265, 32, this.uname) || this.needPax, this.needPax = xt2(t2, e + 297, 32, this.gname) || this.needPax, this.needPax = lt2(t2, e + 329, 8, this.devmaj) || this.needPax, this.needPax = lt2(t2, e + 337, 8, this.devmin) || this.needPax, this.needPax = xt2(t2, e + 345, i2, o2) || this.needPax, t2[e + 475] !== 0 ? this.needPax = xt2(t2, e + 345, 155, o2) || this.needPax : (this.needPax = xt2(t2, e + 345, 130, o2) || this.needPax, this.needPax = zi(t2, e + 476, 12, this.atime) || this.needPax, this.needPax = zi(t2, e + 488, 12, this.ctime) || this.needPax);
26487
+ let i2 = this.ctime || this.atime ? 130 : 155, r = un(this.path || "", i2), n2 = r[0], o2 = r[1];
26488
+ this.needPax = !!r[2], this.needPax = Lt2(t2, e, 100, n2) || this.needPax, this.needPax = ct2(t2, e + 100, 8, this.mode) || this.needPax, this.needPax = ct2(t2, e + 108, 8, this.uid) || this.needPax, this.needPax = ct2(t2, e + 116, 8, this.gid) || this.needPax, this.needPax = ct2(t2, e + 124, 12, this.size) || this.needPax, this.needPax = Gi(t2, e + 136, 12, this.mtime) || this.needPax, t2[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = Lt2(t2, e + 157, 100, this.linkpath) || this.needPax, t2.write("ustar\x0000", e + 257, 8), this.needPax = Lt2(t2, e + 265, 32, this.uname) || this.needPax, this.needPax = Lt2(t2, e + 297, 32, this.gname) || this.needPax, this.needPax = ct2(t2, e + 329, 8, this.devmaj) || this.needPax, this.needPax = ct2(t2, e + 337, 8, this.devmin) || this.needPax, this.needPax = Lt2(t2, e + 345, i2, o2) || this.needPax, t2[e + 475] !== 0 ? this.needPax = Lt2(t2, e + 345, 155, o2) || this.needPax : (this.needPax = Lt2(t2, e + 345, 130, o2) || this.needPax, this.needPax = Gi(t2, e + 476, 12, this.atime) || this.needPax, this.needPax = Gi(t2, e + 488, 12, this.ctime) || this.needPax);
26385
26489
  let h3 = 256;
26386
26490
  for (let a2 = e; a2 < e + 148; a2++) h3 += t2[a2];
26387
26491
  for (let a2 = e + 156; a2 < e + 512; a2++) h3 += t2[a2];
26388
- return this.cksum = h3, lt2(t2, e + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
26492
+ return this.cksum = h3, ct2(t2, e + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
26389
26493
  }
26390
26494
  get type() {
26391
- return this.#t === "Unsupported" ? this.#t : he2.get(this.#t);
26495
+ return this.#t === "Unsupported" ? this.#t : oe2.get(this.#t);
26392
26496
  }
26393
26497
  get typeKey() {
26394
26498
  return this.#t;
26395
26499
  }
26396
26500
  set type(t2) {
26397
- let e = String(Ke2.get(t2));
26398
- if (oe2(e) || e === "Unsupported") this.#t = e;
26399
- else if (oe2(t2)) this.#t = t2;
26501
+ let e = String(Ve2.get(t2));
26502
+ if (ne2(e) || e === "Unsupported") this.#t = e;
26503
+ else if (ne2(t2)) this.#t = t2;
26400
26504
  else throw new TypeError("invalid entry type: " + t2);
26401
26505
  }
26402
26506
  };
26403
- var an = (s3, t2) => {
26507
+ var un = (s3, t2) => {
26404
26508
  let i2 = s3, r = "", n2, o2 = posix.parse(s3).root || ".";
26405
26509
  if (Buffer.byteLength(i2) < 100) n2 = [i2, r, false];
26406
26510
  else {
@@ -26412,21 +26516,21 @@ var an = (s3, t2) => {
26412
26516
  }
26413
26517
  return n2;
26414
26518
  };
26415
- var Tt2 = (s3, t2, e) => s3.subarray(t2, t2 + e).toString("utf8").replace(/\0.*/, "");
26416
- var Pi = (s3, t2, e) => ln(at2(s3, t2, e));
26417
- var ln = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
26418
- var at2 = (s3, t2, e) => Number(s3[t2]) & 128 ? Bs(s3.subarray(t2, t2 + e)) : fn(s3, t2, e);
26419
- var cn = (s3) => isNaN(s3) ? void 0 : s3;
26420
- var fn = (s3, t2, e) => cn(parseInt(s3.subarray(t2, t2 + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
26421
- var dn = { 12: 8589934591, 8: 2097151 };
26422
- var lt2 = (s3, t2, e, i2) => i2 === void 0 ? false : i2 > dn[e] || i2 < 0 ? (Ms(i2, s3.subarray(t2, t2 + e)), true) : (un(s3, t2, e, i2), false);
26423
- var un = (s3, t2, e, i2) => s3.write(mn(i2, e), t2, e, "ascii");
26424
- var mn = (s3, t2) => pn(Math.floor(s3).toString(8), t2);
26425
- var pn = (s3, t2) => (s3.length === t2 - 1 ? s3 : new Array(t2 - s3.length - 1).join("0") + s3 + " ") + "\0";
26426
- var zi = (s3, t2, e, i2) => i2 === void 0 ? false : lt2(s3, t2, e, i2.getTime() / 1e3);
26427
- var En = new Array(156).join("\0");
26428
- var xt2 = (s3, t2, e, i2) => i2 === void 0 ? false : (s3.write(i2 + En, t2, e, "utf8"), i2.length !== Buffer.byteLength(i2) || i2.length > e);
26429
- var ct2 = class s {
26519
+ var xt2 = (s3, t2, e) => s3.subarray(t2, t2 + e).toString("utf8").replace(/\0.*/, "");
26520
+ var Wi = (s3, t2, e) => pn(lt2(s3, t2, e));
26521
+ var pn = (s3) => s3 === void 0 ? void 0 : new Date(s3 * 1e3);
26522
+ var lt2 = (s3, t2, e) => Number(s3[t2]) & 128 ? Hs(s3.subarray(t2, t2 + e)) : wn(s3, t2, e);
26523
+ var En = (s3) => isNaN(s3) ? void 0 : s3;
26524
+ var wn = (s3, t2, e) => En(parseInt(s3.subarray(t2, t2 + e).toString("utf8").replace(/\0.*$/, "").trim(), 8));
26525
+ var Sn = { 12: 8589934591, 8: 2097151 };
26526
+ var ct2 = (s3, t2, e, i2) => i2 === void 0 ? false : i2 > Sn[e] || i2 < 0 ? (Us(i2, s3.subarray(t2, t2 + e)), true) : (yn(s3, t2, e, i2), false);
26527
+ var yn = (s3, t2, e, i2) => s3.write(Rn(i2, e), t2, e, "ascii");
26528
+ var Rn = (s3, t2) => gn(Math.floor(s3).toString(8), t2);
26529
+ var gn = (s3, t2) => (s3.length === t2 - 1 ? s3 : new Array(t2 - s3.length - 1).join("0") + s3 + " ") + "\0";
26530
+ var Gi = (s3, t2, e, i2) => i2 === void 0 ? false : ct2(s3, t2, e, i2.getTime() / 1e3);
26531
+ var bn = new Array(156).join("\0");
26532
+ var Lt2 = (s3, t2, e, i2) => i2 === void 0 ? false : (s3.write(i2 + bn, t2, e, "utf8"), i2.length !== Buffer.byteLength(i2) || i2.length > e);
26533
+ var ft3 = class s {
26430
26534
  atime;
26431
26535
  mtime;
26432
26536
  ctime;
@@ -26466,24 +26570,52 @@ var ct2 = class s {
26466
26570
  return n2 + o2 >= Math.pow(10, o2) && (o2 += 1), o2 + n2 + r;
26467
26571
  }
26468
26572
  static parse(t2, e, i2 = false) {
26469
- return new s(Sn(yn(t2), e), i2);
26573
+ return new s(On(Tn(t2), e), i2);
26470
26574
  }
26471
26575
  };
26472
- var Sn = (s3, t2) => t2 ? Object.assign({}, t2, s3) : s3;
26473
- var yn = (s3) => s3.replace(/\n$/, "").split(`
26474
- `).reduce(Rn, /* @__PURE__ */ Object.create(null));
26475
- var Rn = (s3, t2) => {
26576
+ var On = (s3, t2) => t2 ? Object.assign({}, t2, s3) : s3;
26577
+ var Tn = (s3) => s3.replace(/\n$/, "").split(`
26578
+ `).reduce(xn, /* @__PURE__ */ Object.create(null));
26579
+ var xn = (s3, t2) => {
26476
26580
  let e = parseInt(t2, 10);
26477
26581
  if (e !== Buffer.byteLength(t2) + 1) return s3;
26478
26582
  t2 = t2.slice((e + " ").length);
26479
26583
  let i2 = t2.split("="), r = i2.shift();
26480
26584
  if (!r) return s3;
26481
- let n2 = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o2 = i2.join("=");
26482
- return s3[n2] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n2) ? new Date(Number(o2) * 1e3) : /^[0-9]+$/.test(o2) ? +o2 : o2, s3;
26585
+ let n2 = r.replace(/^SCHILY\.(dev|ino|nlink)/, "$1"), o2 = i2.join("=").replace(/\0.*/, "");
26586
+ switch (n2) {
26587
+ case "path":
26588
+ case "linkpath":
26589
+ case "type":
26590
+ case "charset":
26591
+ case "comment":
26592
+ case "gname":
26593
+ case "uname":
26594
+ s3[n2] = o2;
26595
+ break;
26596
+ case "ctime":
26597
+ case "atime":
26598
+ case "mtime":
26599
+ s3[n2] = new Date(Number(o2) * 1e3);
26600
+ break;
26601
+ case "size":
26602
+ let h3 = +o2;
26603
+ h3 >= 0 && (s3[n2] = h3);
26604
+ break;
26605
+ case "gid":
26606
+ case "uid":
26607
+ case "dev":
26608
+ case "ino":
26609
+ case "nlink":
26610
+ case "mode":
26611
+ s3[n2] = +o2;
26612
+ break;
26613
+ }
26614
+ return s3;
26483
26615
  };
26484
- var bn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
26485
- var f = bn !== "win32" ? (s3) => s3 : (s3) => s3 && s3.replaceAll(/\\/g, "/");
26486
- var Yt = class extends D3 {
26616
+ var Ln = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
26617
+ var f = Ln !== "win32" ? (s3) => String(s3) : (s3) => String(s3).replaceAll(/\\/g, "/");
26618
+ var $e2 = class extends A {
26487
26619
  extended;
26488
26620
  globalExtended;
26489
26621
  header;
@@ -26547,93 +26679,100 @@ var Yt = class extends D3 {
26547
26679
  t2.path && (t2.path = f(t2.path)), t2.linkpath && (t2.linkpath = f(t2.linkpath)), Object.assign(this, Object.fromEntries(Object.entries(t2).filter(([i2, r]) => !(r == null || i2 === "path" && e))));
26548
26680
  }
26549
26681
  };
26550
- var Lt2 = (s3, t2, e, i2 = {}) => {
26682
+ var Dt = (s3, t2, e, i2 = {}) => {
26551
26683
  s3.file && (i2.file = s3.file), s3.cwd && (i2.cwd = s3.cwd), i2.code = e instanceof Error && e.code || t2, i2.tarCode = t2, !s3.strict && i2.recoverable !== false ? (e instanceof Error && (i2 = Object.assign(e, i2), e = e.message), s3.emit("warn", t2, e, i2)) : e instanceof Error ? s3.emit("error", Object.assign(e, i2)) : s3.emit("error", Object.assign(new Error(`${t2}: ${e}`), i2));
26552
26684
  };
26553
- var gn = 1024 * 1024;
26554
- var Zi = Buffer.from([31, 139]);
26555
- var Yi = Buffer.from([40, 181, 47, 253]);
26556
- var On = Math.max(Zi.length, Yi.length);
26685
+ var Nn = 1024 * 1024;
26686
+ var Xi = Buffer.from([31, 139]);
26687
+ var qi = Buffer.from([40, 181, 47, 253]);
26688
+ var An = Math.max(Xi.length, qi.length);
26557
26689
  var B2 = Symbol("state");
26558
26690
  var Nt2 = Symbol("writeEntry");
26559
- var et2 = Symbol("readEntry");
26560
- var Ui = Symbol("nextEntry");
26561
- var Us = Symbol("processEntry");
26691
+ var it2 = Symbol("readEntry");
26692
+ var Zi = Symbol("nextEntry");
26693
+ var Zs = Symbol("processEntry");
26562
26694
  var V2 = Symbol("extendedHeader");
26563
- var ae2 = Symbol("globalExtendedHeader");
26564
- var ft3 = Symbol("meta");
26565
- var Hs = Symbol("emitMeta");
26695
+ var he2 = Symbol("globalExtendedHeader");
26696
+ var dt3 = Symbol("meta");
26697
+ var Ys = Symbol("emitMeta");
26566
26698
  var p = Symbol("buffer");
26567
- var it2 = Symbol("queue");
26568
- var dt3 = Symbol("ended");
26569
- var Hi = Symbol("emittedEnd");
26699
+ var st2 = Symbol("queue");
26700
+ var mt3 = Symbol("ended");
26701
+ var Yi = Symbol("emittedEnd");
26570
26702
  var At3 = Symbol("emit");
26571
- var y2 = Symbol("unzip");
26572
- var Ve2 = Symbol("consumeChunk");
26573
- var $e2 = Symbol("consumeChunkSub");
26574
- var Wi = Symbol("consumeBody");
26575
- var Ws = Symbol("consumeMeta");
26576
- var Gs = Symbol("consumeHeader");
26577
- var le = Symbol("consuming");
26578
- var Gi = Symbol("bufferConcat");
26579
- var Xe = Symbol("maybeEnd");
26580
- var Kt2 = Symbol("writing");
26581
- var ut = Symbol("aborted");
26582
- var qe = Symbol("onDone");
26583
- var Dt = Symbol("sawValidEntry");
26703
+ var w = Symbol("unzip");
26704
+ var Xe = Symbol("consumeChunk");
26705
+ var qe = Symbol("consumeChunkSub");
26706
+ var Ki = Symbol("consumeBody");
26707
+ var Ks = Symbol("consumeMeta");
26708
+ var Vs = Symbol("consumeHeader");
26709
+ var ae2 = Symbol("consuming");
26710
+ var Vi = Symbol("bufferConcat");
26711
+ var Qe2 = Symbol("maybeEnd");
26712
+ var Yt = Symbol("writing");
26713
+ var $2 = Symbol("aborted");
26714
+ var Je = Symbol("onDone");
26715
+ var It3 = Symbol("sawValidEntry");
26584
26716
  var je2 = Symbol("sawNullBlock");
26585
- var Qe2 = Symbol("sawEOF");
26586
- var Zs = Symbol("closeStream");
26587
- var Tn = () => true;
26588
- var st2 = class extends EventEmitter {
26717
+ var ti = Symbol("sawEOF");
26718
+ var $s = Symbol("closeStream");
26719
+ var In = 1e3;
26720
+ var le = Symbol("compressedBytesRead");
26721
+ var $i = Symbol("decompressedBytesRead");
26722
+ var Xs = Symbol("checkDecompressionRatio");
26723
+ var Cn = () => true;
26724
+ var rt2 = class extends EventEmitter {
26589
26725
  file;
26590
26726
  strict;
26591
26727
  maxMetaEntrySize;
26592
26728
  filter;
26593
26729
  brotli;
26594
26730
  zstd;
26731
+ maxDecompressionRatio;
26595
26732
  writable = true;
26596
26733
  readable = false;
26597
- [it2] = [];
26734
+ [st2] = [];
26598
26735
  [p];
26599
- [et2];
26736
+ [it2];
26600
26737
  [Nt2];
26601
26738
  [B2] = "begin";
26602
- [ft3] = "";
26739
+ [dt3] = "";
26603
26740
  [V2];
26604
- [ae2];
26605
- [dt3] = false;
26606
- [y2];
26607
- [ut] = false;
26608
- [Dt];
26741
+ [he2];
26742
+ [mt3] = false;
26743
+ [w];
26744
+ [$2] = false;
26745
+ [It3];
26609
26746
  [je2] = false;
26610
- [Qe2] = false;
26611
- [Kt2] = false;
26612
- [le] = false;
26613
- [Hi] = false;
26747
+ [ti] = false;
26748
+ [Yt] = false;
26749
+ [ae2] = false;
26750
+ [Yi] = false;
26751
+ [le] = 0;
26752
+ [$i] = 0;
26614
26753
  constructor(t2 = {}) {
26615
- super(), this.file = t2.file || "", this.on(qe, () => {
26616
- (this[B2] === "begin" || this[Dt] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
26617
- }), t2.ondone ? this.on(qe, t2.ondone) : this.on(qe, () => {
26754
+ super(), this.file = t2.file || "", this.on(Je, () => {
26755
+ (this[B2] === "begin" || this[It3] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
26756
+ }), t2.ondone ? this.on(Je, t2.ondone) : this.on(Je, () => {
26618
26757
  this.emit("prefinish"), this.emit("finish"), this.emit("end");
26619
- }), this.strict = !!t2.strict, this.maxMetaEntrySize = t2.maxMetaEntrySize || gn, this.filter = typeof t2.filter == "function" ? t2.filter : Tn;
26758
+ }), this.strict = !!t2.strict, this.maxDecompressionRatio = typeof t2.maxDecompressionRatio == "number" ? t2.maxDecompressionRatio : In, this.maxMetaEntrySize = t2.maxMetaEntrySize || Nn, this.filter = typeof t2.filter == "function" ? t2.filter : Cn;
26620
26759
  let e = t2.file && (t2.file.endsWith(".tar.br") || t2.file.endsWith(".tbr"));
26621
26760
  this.brotli = !(t2.gzip || t2.zstd) && t2.brotli !== void 0 ? t2.brotli : e ? void 0 : false;
26622
26761
  let i2 = t2.file && (t2.file.endsWith(".tar.zst") || t2.file.endsWith(".tzst"));
26623
- this.zstd = !(t2.gzip || t2.brotli) && t2.zstd !== void 0 ? t2.zstd : i2 ? true : void 0, this.on("end", () => this[Zs]()), typeof t2.onwarn == "function" && this.on("warn", t2.onwarn), typeof t2.onReadEntry == "function" && this.on("entry", t2.onReadEntry);
26762
+ this.zstd = !(t2.gzip || t2.brotli) && t2.zstd !== void 0 ? t2.zstd : i2 ? true : void 0, this.on("end", () => this[$s]()), typeof t2.onwarn == "function" && this.on("warn", t2.onwarn), typeof t2.onReadEntry == "function" && this.on("entry", t2.onReadEntry);
26624
26763
  }
26625
26764
  warn(t2, e, i2 = {}) {
26626
- Lt2(this, t2, e, i2);
26765
+ Dt(this, t2, e, i2);
26627
26766
  }
26628
- [Gs](t2, e) {
26629
- this[Dt] === void 0 && (this[Dt] = false);
26767
+ [Vs](t2, e) {
26768
+ this[It3] === void 0 && (this[It3] = false);
26630
26769
  let i2;
26631
26770
  try {
26632
- i2 = new F(t2, e, this[V2], this[ae2]);
26771
+ i2 = new F(t2, e, this[V2], this[he2]);
26633
26772
  } catch (r) {
26634
26773
  return this.warn("TAR_ENTRY_INVALID", r);
26635
26774
  }
26636
- if (i2.nullBlock) this[je2] ? (this[Qe2] = true, this[B2] === "begin" && (this[B2] = "header"), this[At3]("eof")) : (this[je2] = true, this[At3]("nullBlock"));
26775
+ if (i2.nullBlock) this[je2] ? (this[ti] = true, this[B2] === "begin" && (this[B2] = "header"), this[At3]("eof")) : (this[je2] = true, this[At3]("nullBlock"));
26637
26776
  else if (this[je2] = false, !i2.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: i2 });
26638
26777
  else if (!i2.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: i2 });
26639
26778
  else {
@@ -26641,69 +26780,69 @@ var st2 = class extends EventEmitter {
26641
26780
  if (/^(Symbolic)?Link$/.test(r) && !i2.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: i2 });
26642
26781
  else if (!/^(Symbolic)?Link$/.test(r) && !/^(Global)?ExtendedHeader$/.test(r) && i2.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: i2 });
26643
26782
  else {
26644
- let n2 = this[Nt2] = new Yt(i2, this[V2], this[ae2]);
26645
- if (!this[Dt]) if (n2.remain) {
26783
+ let n2 = this[Nt2] = new $e2(i2, this[V2], this[he2]);
26784
+ if (!this[It3]) if (n2.remain) {
26646
26785
  let o2 = () => {
26647
- n2.invalid || (this[Dt] = true);
26786
+ n2.invalid || (this[It3] = true);
26648
26787
  };
26649
26788
  n2.on("end", o2);
26650
- } else this[Dt] = true;
26651
- n2.meta ? n2.size > this.maxMetaEntrySize ? (n2.ignore = true, this[At3]("ignoredEntry", n2), this[B2] = "ignore", n2.resume()) : n2.size > 0 && (this[ft3] = "", n2.on("data", (o2) => this[ft3] += o2), this[B2] = "meta") : (this[V2] = void 0, n2.ignore = n2.ignore || !this.filter(n2.path, n2), n2.ignore ? (this[At3]("ignoredEntry", n2), this[B2] = n2.remain ? "ignore" : "header", n2.resume()) : (n2.remain ? this[B2] = "body" : (this[B2] = "header", n2.end()), this[et2] ? this[it2].push(n2) : (this[it2].push(n2), this[Ui]())));
26789
+ } else this[It3] = true;
26790
+ n2.meta ? n2.size > this.maxMetaEntrySize ? (n2.ignore = true, this[At3]("ignoredEntry", n2), this[B2] = "ignore", n2.resume()) : n2.size > 0 && (this[dt3] = "", n2.on("data", (o2) => this[dt3] += o2), this[B2] = "meta") : (this[V2] = void 0, n2.ignore = n2.ignore || !this.filter(n2.path, n2), n2.ignore ? (this[At3]("ignoredEntry", n2), this[B2] = n2.remain ? "ignore" : "header", n2.resume()) : (n2.remain ? this[B2] = "body" : (this[B2] = "header", n2.end()), this[it2] ? this[st2].push(n2) : (this[st2].push(n2), this[Zi]())));
26652
26791
  }
26653
26792
  }
26654
26793
  }
26655
- [Zs]() {
26794
+ [$s]() {
26656
26795
  queueMicrotask(() => this.emit("close"));
26657
26796
  }
26658
- [Us](t2) {
26797
+ [Zs](t2) {
26659
26798
  let e = true;
26660
- if (!t2) this[et2] = void 0, e = false;
26799
+ if (!t2) this[it2] = void 0, e = false;
26661
26800
  else if (Array.isArray(t2)) {
26662
26801
  let [i2, ...r] = t2;
26663
26802
  this.emit(i2, ...r);
26664
- } else this[et2] = t2, this.emit("entry", t2), t2.emittedEnd || (t2.on("end", () => this[Ui]()), e = false);
26803
+ } else this[it2] = t2, this.emit("entry", t2), t2.emittedEnd || (t2.on("end", () => this[Zi]()), e = false);
26665
26804
  return e;
26666
26805
  }
26667
- [Ui]() {
26806
+ [Zi]() {
26668
26807
  do
26669
26808
  ;
26670
- while (this[Us](this[it2].shift()));
26671
- if (this[it2].length === 0) {
26672
- let t2 = this[et2];
26673
- !t2 || t2.flowing || t2.size === t2.remain ? this[Kt2] || this.emit("drain") : t2.once("drain", () => this.emit("drain"));
26809
+ while (this[Zs](this[st2].shift()));
26810
+ if (this[st2].length === 0) {
26811
+ let t2 = this[it2];
26812
+ !t2 || t2.flowing || t2.size === t2.remain ? this[Yt] || this.emit("drain") : t2.once("drain", () => this.emit("drain"));
26674
26813
  }
26675
26814
  }
26676
- [Wi](t2, e) {
26815
+ [Ki](t2, e) {
26677
26816
  let i2 = this[Nt2];
26678
26817
  if (!i2) throw new Error("attempt to consume body without entry??");
26679
26818
  let r = i2.blockRemain ?? 0, n2 = r >= t2.length && e === 0 ? t2 : t2.subarray(e, e + r);
26680
26819
  return i2.write(n2), i2.blockRemain || (this[B2] = "header", this[Nt2] = void 0, i2.end()), n2.length;
26681
26820
  }
26682
- [Ws](t2, e) {
26683
- let i2 = this[Nt2], r = this[Wi](t2, e);
26684
- return !this[Nt2] && i2 && this[Hs](i2), r;
26821
+ [Ks](t2, e) {
26822
+ let i2 = this[Nt2], r = this[Ki](t2, e);
26823
+ return !this[Nt2] && i2 && this[Ys](i2), r;
26685
26824
  }
26686
26825
  [At3](t2, e, i2) {
26687
- this[it2].length === 0 && !this[et2] ? this.emit(t2, e, i2) : this[it2].push([t2, e, i2]);
26826
+ this[st2].length === 0 && !this[it2] ? this.emit(t2, e, i2) : this[st2].push([t2, e, i2]);
26688
26827
  }
26689
- [Hs](t2) {
26690
- switch (this[At3]("meta", this[ft3]), t2.type) {
26828
+ [Ys](t2) {
26829
+ switch (this[At3]("meta", this[dt3]), t2.type) {
26691
26830
  case "ExtendedHeader":
26692
26831
  case "OldExtendedHeader":
26693
- this[V2] = ct2.parse(this[ft3], this[V2], false);
26832
+ this[V2] = ft3.parse(this[dt3], this[V2], false);
26694
26833
  break;
26695
26834
  case "GlobalExtendedHeader":
26696
- this[ae2] = ct2.parse(this[ft3], this[ae2], true);
26835
+ this[he2] = ft3.parse(this[dt3], this[he2], true);
26697
26836
  break;
26698
26837
  case "NextFileHasLongPath":
26699
26838
  case "OldGnuLongPath": {
26700
26839
  let e = this[V2] ?? /* @__PURE__ */ Object.create(null);
26701
- this[V2] = e, e.path = this[ft3].replace(/\0.*/, "");
26840
+ this[V2] = e, e.path = this[dt3].replace(/\0.*/, "");
26702
26841
  break;
26703
26842
  }
26704
26843
  case "NextFileHasLongLinkpath": {
26705
26844
  let e = this[V2] || /* @__PURE__ */ Object.create(null);
26706
- this[V2] = e, e.linkpath = this[ft3].replace(/\0.*/, "");
26845
+ this[V2] = e, e.linkpath = this[dt3].replace(/\0.*/, "");
26707
26846
  break;
26708
26847
  }
26709
26848
  default:
@@ -26711,86 +26850,101 @@ var st2 = class extends EventEmitter {
26711
26850
  }
26712
26851
  }
26713
26852
  abort(t2) {
26714
- this[ut] = true, this.emit("abort", t2), this.warn("TAR_ABORT", t2, { recoverable: false });
26853
+ if (!this[$2]) {
26854
+ if (this[w]) {
26855
+ let e = this[w];
26856
+ e.write = () => true, e.end = () => e, e.emit = () => false, e.destroy?.();
26857
+ }
26858
+ this[$2] = true, this.emit("abort", t2), this.warn("TAR_ABORT", t2, { recoverable: false });
26859
+ }
26860
+ }
26861
+ [Xs](t2) {
26862
+ this[$i] += t2.length;
26863
+ let e = this[$i] / this[le];
26864
+ return e > this.maxDecompressionRatio ? (this.abort(new Error(`max decompression ratio exceeded: ${e.toFixed(2)} > ${this.maxDecompressionRatio}`)), false) : true;
26715
26865
  }
26716
26866
  write(t2, e, i2) {
26717
- if (typeof e == "function" && (i2 = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, typeof e == "string" ? e : "utf8")), this[ut]) return i2?.(), false;
26718
- if ((this[y2] === void 0 || this.brotli === void 0 && this[y2] === false) && t2) {
26719
- if (this[p] && (t2 = Buffer.concat([this[p], t2]), this[p] = void 0), t2.length < On) return this[p] = t2, i2?.(), true;
26720
- for (let a2 = 0; this[y2] === void 0 && a2 < Zi.length; a2++) t2[a2] !== Zi[a2] && (this[y2] = false);
26867
+ if (typeof e == "function" && (i2 = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, typeof e == "string" ? e : "utf8")), this[$2]) return i2?.(), false;
26868
+ if ((this[w] === void 0 || this.brotli === void 0 && this[w] === false) && t2) {
26869
+ if (this[p] && (t2 = Buffer.concat([this[p], t2]), this[p] = void 0), t2.length < An) return this[p] = t2, i2?.(), true;
26870
+ for (let a2 = 0; this[w] === void 0 && a2 < Xi.length; a2++) t2[a2] !== Xi[a2] && (this[w] = false);
26721
26871
  let o2 = false;
26722
- if (this[y2] === false && this.zstd !== false) {
26872
+ if (this[w] === false && this.zstd !== false) {
26723
26873
  o2 = true;
26724
- for (let a2 = 0; a2 < Yi.length; a2++) if (t2[a2] !== Yi[a2]) {
26874
+ for (let a2 = 0; a2 < qi.length; a2++) if (t2[a2] !== qi[a2]) {
26725
26875
  o2 = false;
26726
26876
  break;
26727
26877
  }
26728
26878
  }
26729
26879
  let h3 = this.brotli === void 0 && !o2;
26730
- if (this[y2] === false && h3) if (t2.length < 512) if (this[dt3]) this.brotli = true;
26880
+ if (this[w] === false && h3) if (t2.length < 512) if (this[mt3]) this.brotli = true;
26731
26881
  else return this[p] = t2, i2?.(), true;
26732
26882
  else try {
26733
26883
  new F(t2.subarray(0, 512)), this.brotli = false;
26734
26884
  } catch {
26735
26885
  this.brotli = true;
26736
26886
  }
26737
- if (this[y2] === void 0 || this[y2] === false && (this.brotli || o2)) {
26738
- let a2 = this[dt3];
26739
- this[dt3] = false, this[y2] = this[y2] === void 0 ? new ze2({}) : o2 ? new Ye({}) : new We2({}), this[y2].on("data", (c3) => this[Ve2](c3)), this[y2].on("error", (c3) => this.abort(c3)), this[y2].on("end", () => {
26740
- this[dt3] = true, this[Ve2]();
26741
- }), this[Kt2] = true;
26742
- let l = !!this[y2][a2 ? "end" : "write"](t2);
26743
- return this[Kt2] = false, i2?.(), l;
26744
- }
26745
- }
26746
- this[Kt2] = true, this[y2] ? this[y2].write(t2) : this[Ve2](t2), this[Kt2] = false;
26747
- let n2 = this[it2].length > 0 ? false : this[et2] ? this[et2].flowing : true;
26748
- return !n2 && this[it2].length === 0 && this[et2]?.once("drain", () => this.emit("drain")), i2?.(), n2;
26749
- }
26750
- [Gi](t2) {
26751
- t2 && !this[ut] && (this[p] = this[p] ? Buffer.concat([this[p], t2]) : t2);
26752
- }
26753
- [Xe]() {
26754
- if (this[dt3] && !this[Hi] && !this[ut] && !this[le]) {
26755
- this[Hi] = true;
26887
+ if (this[w] === void 0 || this[w] === false && (this.brotli || o2)) {
26888
+ let a2 = this[mt3];
26889
+ this[mt3] = false, this[w] = this[w] === void 0 ? new Ue2({}) : o2 ? new Ke2({}) : new Ge2({}), this[w].on("data", (c3) => {
26890
+ this[Xs](c3) && this[Xe](c3);
26891
+ }), this[w].on("error", (c3) => {
26892
+ this[$2] || this.abort(c3);
26893
+ }), this[w].on("end", () => {
26894
+ this[mt3] = true, this[Xe]();
26895
+ }), this[Yt] = true, this[le] += t2.length;
26896
+ let l = !!this[w][a2 ? "end" : "write"](t2);
26897
+ return this[Yt] = false, i2?.(), l;
26898
+ }
26899
+ }
26900
+ this[Yt] = true, this[w] ? (this[le] += t2.length, this[w].write(t2)) : this[Xe](t2), this[Yt] = false;
26901
+ let n2 = this[st2].length > 0 ? false : this[it2] ? this[it2].flowing : true;
26902
+ return !n2 && this[st2].length === 0 && this[it2]?.once("drain", () => this.emit("drain")), i2?.(), n2;
26903
+ }
26904
+ [Vi](t2) {
26905
+ t2 && !this[$2] && (this[p] = this[p] ? Buffer.concat([this[p], t2]) : t2);
26906
+ }
26907
+ [Qe2]() {
26908
+ if (this[mt3] && !this[Yi] && !this[$2] && !this[ae2]) {
26909
+ this[Yi] = true;
26756
26910
  let t2 = this[Nt2];
26757
- if (t2 && t2.blockRemain) {
26911
+ if (t2?.blockRemain) {
26758
26912
  let e = this[p] ? this[p].length : 0;
26759
26913
  this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t2.blockRemain} more bytes, only ${e} available)`, { entry: t2 }), this[p] && t2.write(this[p]), t2.end();
26760
26914
  }
26761
- this[At3](qe);
26915
+ this[At3](Je);
26762
26916
  }
26763
26917
  }
26764
- [Ve2](t2) {
26765
- if (this[le] && t2) this[Gi](t2);
26766
- else if (!t2 && !this[p]) this[Xe]();
26918
+ [Xe](t2) {
26919
+ if (this[ae2] && t2) this[Vi](t2);
26920
+ else if (!t2 && !this[p]) this[Qe2]();
26767
26921
  else if (t2) {
26768
- if (this[le] = true, this[p]) {
26769
- this[Gi](t2);
26922
+ if (this[ae2] = true, this[p]) {
26923
+ this[Vi](t2);
26770
26924
  let e = this[p];
26771
- this[p] = void 0, this[$e2](e);
26772
- } else this[$e2](t2);
26773
- for (; this[p] && this[p]?.length >= 512 && !this[ut] && !this[Qe2]; ) {
26925
+ this[p] = void 0, this[qe](e);
26926
+ } else this[qe](t2);
26927
+ for (; this[p] && this[p]?.length >= 512 && !this[$2] && !this[ti]; ) {
26774
26928
  let e = this[p];
26775
- this[p] = void 0, this[$e2](e);
26929
+ this[p] = void 0, this[qe](e);
26776
26930
  }
26777
- this[le] = false;
26931
+ this[ae2] = false;
26778
26932
  }
26779
- (!this[p] || this[dt3]) && this[Xe]();
26933
+ (!this[p] || this[mt3]) && this[Qe2]();
26780
26934
  }
26781
- [$e2](t2) {
26935
+ [qe](t2) {
26782
26936
  let e = 0, i2 = t2.length;
26783
- for (; e + 512 <= i2 && !this[ut] && !this[Qe2]; ) switch (this[B2]) {
26937
+ for (; e + 512 <= i2 && !this[$2] && !this[ti]; ) switch (this[B2]) {
26784
26938
  case "begin":
26785
26939
  case "header":
26786
- this[Gs](t2, e), e += 512;
26940
+ this[Vs](t2, e), e += 512;
26787
26941
  break;
26788
26942
  case "ignore":
26789
26943
  case "body":
26790
- e += this[Wi](t2, e);
26944
+ e += this[Ki](t2, e);
26791
26945
  break;
26792
26946
  case "meta":
26793
- e += this[Ws](t2, e);
26947
+ e += this[Ks](t2, e);
26794
26948
  break;
26795
26949
  default:
26796
26950
  throw new Error("invalid state: " + this[B2]);
@@ -26798,22 +26952,22 @@ var st2 = class extends EventEmitter {
26798
26952
  e < i2 && (this[p] = this[p] ? Buffer.concat([t2.subarray(e), this[p]]) : t2.subarray(e));
26799
26953
  }
26800
26954
  end(t2, e, i2) {
26801
- return typeof t2 == "function" && (i2 = t2, e = void 0, t2 = void 0), typeof e == "function" && (i2 = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, e)), i2 && this.once("finish", i2), this[ut] || (this[y2] ? (t2 && this[y2].write(t2), this[y2].end()) : (this[dt3] = true, (this.brotli === void 0 || this.zstd === void 0) && (t2 = t2 || Buffer.alloc(0)), t2 && this.write(t2), this[Xe]())), this;
26955
+ return typeof t2 == "function" && (i2 = t2, e = void 0, t2 = void 0), typeof e == "function" && (i2 = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, e)), i2 && this.once("finish", i2), this[$2] || (this[w] ? (t2 && (this[le] += t2.length, this[w].write(t2)), this[w].end()) : (this[mt3] = true, (this.brotli === void 0 || this.zstd === void 0) && (t2 = t2 || Buffer.alloc(0)), t2 && this.write(t2), this[Qe2]())), this;
26802
26956
  }
26803
26957
  };
26804
- var mt3 = (s3) => {
26958
+ var ut = (s3) => {
26805
26959
  let t2 = s3.length - 1, e = -1;
26806
26960
  for (; t2 > -1 && s3.charAt(t2) === "/"; ) e = t2, t2--;
26807
26961
  return e === -1 ? s3 : s3.slice(0, e);
26808
26962
  };
26809
- var Nn = (s3) => {
26963
+ var vn = (s3) => {
26810
26964
  let t2 = s3.onReadEntry;
26811
26965
  s3.onReadEntry = t2 ? (e) => {
26812
26966
  t2(e), e.resume();
26813
26967
  } : (e) => e.resume();
26814
26968
  };
26815
- var Ki = (s3, t2) => {
26816
- let e = new Map(t2.map((n2) => [mt3(n2), true])), i2 = s3.filter, r = (n2, o2 = "") => {
26969
+ var Qi = (s3, t2) => {
26970
+ let e = new Map(t2.map((n2) => [ut(n2), true])), i2 = s3.filter, r = (n2, o2 = "") => {
26817
26971
  let h3 = o2 || parse(n2).root || ".", a2;
26818
26972
  if (n2 === h3) a2 = false;
26819
26973
  else {
@@ -26822,10 +26976,10 @@ var Ki = (s3, t2) => {
26822
26976
  }
26823
26977
  return e.set(n2, a2), a2;
26824
26978
  };
26825
- s3.filter = i2 ? (n2, o2) => i2(n2, o2) && r(mt3(n2)) : (n2) => r(mt3(n2));
26979
+ s3.filter = i2 ? (n2, o2) => i2(n2, o2) && r(ut(n2)) : (n2) => r(ut(n2));
26826
26980
  };
26827
- var An = (s3) => {
26828
- let t2 = new st2(s3), e = s3.file, i2;
26981
+ var Mn = (s3) => {
26982
+ let t2 = new rt2(s3), e = s3.file, i2;
26829
26983
  try {
26830
26984
  i2 = fs.openSync(e, "r");
26831
26985
  let r = fs.fstatSync(i2), n2 = s3.maxReadSize || 16 * 1024 * 1024;
@@ -26848,8 +27002,8 @@ var An = (s3) => {
26848
27002
  }
26849
27003
  }
26850
27004
  };
26851
- var Dn = (s3, t2) => {
26852
- let e = new st2(s3), i2 = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
27005
+ var Bn = (s3, t2) => {
27006
+ let e = new rt2(s3), i2 = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
26853
27007
  return new Promise((o2, h3) => {
26854
27008
  e.on("error", h3), e.on("end", o2), fs.stat(r, (a2, l) => {
26855
27009
  if (a2) h3(a2);
@@ -26860,46 +27014,46 @@ var Dn = (s3, t2) => {
26860
27014
  });
26861
27015
  });
26862
27016
  };
26863
- var It3 = K2(An, Dn, (s3) => new st2(s3), (s3) => new st2(s3), (s3, t2) => {
26864
- t2?.length && Ki(s3, t2), s3.noResume || Nn(s3);
27017
+ var Ct3 = K2(Mn, Bn, (s3) => new rt2(s3), (s3) => new rt2(s3), (s3, t2) => {
27018
+ t2?.length && Qi(s3, t2), s3.noResume || vn(s3);
26865
27019
  });
26866
- var Vi = (s3, t2, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t2 && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
26867
- var { isAbsolute: Cn, parse: Ys } = win32;
27020
+ var Ji = (s3, t2, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t2 && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
27021
+ var { isAbsolute: zn, parse: qs } = win32;
26868
27022
  var ce2 = (s3) => {
26869
- let t2 = "", e = Ys(s3);
26870
- for (; Cn(s3) || e.root; ) {
27023
+ let t2 = "", e = qs(s3);
27024
+ for (; zn(s3) || e.root; ) {
26871
27025
  let i2 = s3.charAt(0) === "/" && s3.slice(0, 4) !== "//?/" ? "/" : e.root;
26872
- s3 = s3.slice(i2.length), t2 += i2, e = Ys(s3);
27026
+ s3 = s3.slice(i2.length), t2 += i2, e = qs(s3);
26873
27027
  }
26874
27028
  return [t2, s3];
26875
27029
  };
26876
- var Je = ["|", "<", ">", "?", ":"];
26877
- var $i = Je.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
26878
- var Fn = new Map(Je.map((s3, t2) => [s3, $i[t2]]));
26879
- var kn = new Map($i.map((s3, t2) => [s3, Je[t2]]));
26880
- var Xi = (s3) => Je.reduce((t2, e) => t2.split(e).join(Fn.get(e)), s3);
26881
- var Ks = (s3) => $i.reduce((t2, e) => t2.split(e).join(kn.get(e)), s3);
26882
- var Js = (s3, t2) => t2 ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt3(t2) + "/" + s3) : f(s3);
26883
- var vn = 16 * 1024 * 1024;
26884
- var Xs = Symbol("process");
26885
- var qs = Symbol("file");
26886
- var js = Symbol("directory");
26887
- var ji = Symbol("symlink");
26888
- var Qs = Symbol("hardlink");
27030
+ var ei = ["|", "<", ">", "?", ":"];
27031
+ var ji = ei.map((s3) => String.fromCodePoint(61440 + Number(s3.codePointAt(0))));
27032
+ var Un = new Map(ei.map((s3, t2) => [s3, ji[t2]]));
27033
+ var Hn = new Map(ji.map((s3, t2) => [s3, ei[t2]]));
27034
+ var ts = (s3) => ei.reduce((t2, e) => t2.split(e).join(Un.get(e)), s3);
27035
+ var Qs = (s3) => ji.reduce((t2, e) => t2.split(e).join(Hn.get(e)), s3);
27036
+ var rr = (s3, t2) => t2 ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), ut(t2) + "/" + s3) : f(s3);
27037
+ var Wn = 16 * 1024 * 1024;
27038
+ var tr = Symbol("process");
27039
+ var er = Symbol("file");
27040
+ var ir = Symbol("directory");
27041
+ var is = Symbol("symlink");
27042
+ var sr = Symbol("hardlink");
26889
27043
  var fe2 = Symbol("header");
26890
- var ti = Symbol("read");
26891
- var Qi = Symbol("lstat");
26892
- var ei = Symbol("onlstat");
26893
- var Ji = Symbol("onread");
26894
- var ts = Symbol("onreadlink");
26895
- var es = Symbol("openfile");
26896
- var is = Symbol("onopenfile");
27044
+ var ii = Symbol("read");
27045
+ var ss = Symbol("lstat");
27046
+ var si = Symbol("onlstat");
27047
+ var rs = Symbol("onread");
27048
+ var ns = Symbol("onreadlink");
27049
+ var os2 = Symbol("openfile");
27050
+ var hs = Symbol("onopenfile");
26897
27051
  var pt3 = Symbol("close");
26898
- var ii = Symbol("mode");
26899
- var ss = Symbol("awaitDrain");
26900
- var qi = Symbol("ondrain");
26901
- var X3 = Symbol("prefix");
26902
- var de2 = class extends D3 {
27052
+ var ri = Symbol("mode");
27053
+ var as = Symbol("awaitDrain");
27054
+ var es = Symbol("ondrain");
27055
+ var q3 = Symbol("prefix");
27056
+ var de2 = class extends A {
26903
27057
  path;
26904
27058
  portable;
26905
27059
  myuid = process.getuid && process.getuid() || 0;
@@ -26931,110 +27085,110 @@ var de2 = class extends D3 {
26931
27085
  onWriteEntry;
26932
27086
  #t = false;
26933
27087
  constructor(t2, e = {}) {
26934
- let i2 = re2(e);
26935
- super(), this.path = f(t2), this.portable = !!i2.portable, this.maxReadSize = i2.maxReadSize || vn, this.linkCache = i2.linkCache || /* @__PURE__ */ new Map(), this.statCache = i2.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i2.preservePaths, this.cwd = f(i2.cwd || process.cwd()), this.strict = !!i2.strict, this.noPax = !!i2.noPax, this.noMtime = !!i2.noMtime, this.mtime = i2.mtime, this.prefix = i2.prefix ? f(i2.prefix) : void 0, this.onWriteEntry = i2.onWriteEntry, typeof i2.onwarn == "function" && this.on("warn", i2.onwarn);
27088
+ let i2 = se2(e);
27089
+ super(), this.path = f(t2), this.portable = !!i2.portable, this.maxReadSize = i2.maxReadSize || Wn, this.linkCache = i2.linkCache || /* @__PURE__ */ new Map(), this.statCache = i2.statCache || /* @__PURE__ */ new Map(), this.preservePaths = !!i2.preservePaths, this.cwd = f(i2.cwd || process.cwd()), this.strict = !!i2.strict, this.noPax = !!i2.noPax, this.noMtime = !!i2.noMtime, this.mtime = i2.mtime, this.prefix = i2.prefix ? f(i2.prefix) : void 0, this.onWriteEntry = i2.onWriteEntry, typeof i2.onwarn == "function" && this.on("warn", i2.onwarn);
26936
27090
  let r = false;
26937
27091
  if (!this.preservePaths) {
26938
27092
  let [o2, h3] = ce2(this.path);
26939
27093
  o2 && typeof h3 == "string" && (this.path = h3, r = o2);
26940
27094
  }
26941
- this.win32 = !!i2.win32 || process.platform === "win32", this.win32 && (this.path = Ks(this.path.replaceAll(/\\/g, "/")), t2 = t2.replaceAll(/\\/g, "/")), this.absolute = f(i2.absolute || path15.resolve(this.cwd, t2)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
27095
+ this.win32 = !!i2.win32 || process.platform === "win32", this.win32 && (this.path = Qs(this.path.replaceAll(/\\/g, "/")), t2 = t2.replaceAll(/\\/g, "/")), this.absolute = f(i2.absolute || path15.resolve(this.cwd, t2)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, { entry: this, path: r + this.path });
26942
27096
  let n2 = this.statCache.get(this.absolute);
26943
- n2 ? this[ei](n2) : this[Qi]();
27097
+ n2 ? this[si](n2) : this[ss]();
26944
27098
  }
26945
27099
  warn(t2, e, i2 = {}) {
26946
- return Lt2(this, t2, e, i2);
27100
+ return Dt(this, t2, e, i2);
26947
27101
  }
26948
27102
  emit(t2, ...e) {
26949
27103
  return t2 === "error" && (this.#t = true), super.emit(t2, ...e);
26950
27104
  }
26951
- [Qi]() {
27105
+ [ss]() {
26952
27106
  fs.lstat(this.absolute, (t2, e) => {
26953
27107
  if (t2) return this.emit("error", t2);
26954
- this[ei](e);
27108
+ this[si](e);
26955
27109
  });
26956
27110
  }
26957
- [ei](t2) {
26958
- this.statCache.set(this.absolute, t2), this.stat = t2, t2.isFile() || (t2.size = 0), this.type = Mn(t2), this.emit("stat", t2), this[Xs]();
27111
+ [si](t2) {
27112
+ this.statCache.set(this.absolute, t2), this.stat = t2, t2.isFile() || (t2.size = 0), this.type = Gn(t2), this.emit("stat", t2), this[tr]();
26959
27113
  }
26960
- [Xs]() {
27114
+ [tr]() {
26961
27115
  switch (this.type) {
26962
27116
  case "File":
26963
- return this[qs]();
27117
+ return this[er]();
26964
27118
  case "Directory":
26965
- return this[js]();
27119
+ return this[ir]();
26966
27120
  case "SymbolicLink":
26967
- return this[ji]();
27121
+ return this[is]();
26968
27122
  default:
26969
27123
  return this.end();
26970
27124
  }
26971
27125
  }
26972
- [ii](t2) {
26973
- return Vi(t2, this.type === "Directory", this.portable);
27126
+ [ri](t2) {
27127
+ return Ji(t2, this.type === "Directory", this.portable);
26974
27128
  }
26975
- [X3](t2) {
26976
- return Js(t2, this.prefix);
27129
+ [q3](t2) {
27130
+ return rr(t2, this.prefix);
26977
27131
  }
26978
27132
  [fe2]() {
26979
27133
  if (!this.stat) throw new Error("cannot write header before stat");
26980
- this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[X3](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X3](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 ct2({ 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[X3](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X3](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());
27134
+ this.type === "Directory" && this.portable && (this.noMtime = true), this.onWriteEntry?.(this), this.header = new F({ path: this[q3](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q3](this.linkpath) : this.linkpath, mode: this[ri](this.stat.mode), uid: this.portable ? void 0 : this.stat.uid, gid: this.portable ? void 0 : this.stat.gid, size: this.stat.size, mtime: this.noMtime ? void 0 : this.mtime || this.stat.mtime, type: this.type === "Unsupported" ? void 0 : this.type, uname: this.portable ? void 0 : this.stat.uid === this.myuid ? this.myuser : "", atime: this.portable ? void 0 : this.stat.atime, ctime: this.portable ? void 0 : this.stat.ctime }), this.header.encode() && !this.noPax && super.write(new ft3({ 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[q3](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q3](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());
26981
27135
  let t2 = this.header?.block;
26982
27136
  if (!t2) throw new Error("failed to encode header");
26983
27137
  super.write(t2);
26984
27138
  }
26985
- [js]() {
27139
+ [ir]() {
26986
27140
  if (!this.stat) throw new Error("cannot create directory entry without stat");
26987
27141
  this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe2](), this.end();
26988
27142
  }
26989
- [ji]() {
27143
+ [is]() {
26990
27144
  fs.readlink(this.absolute, (t2, e) => {
26991
27145
  if (t2) return this.emit("error", t2);
26992
- this[ts](e);
27146
+ this[ns](e);
26993
27147
  });
26994
27148
  }
26995
- [ts](t2) {
27149
+ [ns](t2) {
26996
27150
  this.linkpath = f(t2), this[fe2](), this.end();
26997
27151
  }
26998
- [Qs](t2) {
27152
+ [sr](t2) {
26999
27153
  if (!this.stat) throw new Error("cannot create link entry without stat");
27000
27154
  this.type = "Link", this.linkpath = f(path15.relative(this.cwd, t2)), this.stat.size = 0, this[fe2](), this.end();
27001
27155
  }
27002
- [qs]() {
27156
+ [er]() {
27003
27157
  if (!this.stat) throw new Error("cannot create file entry without stat");
27004
27158
  if (this.stat.nlink > 1) {
27005
27159
  let t2 = `${this.stat.dev}:${this.stat.ino}`, e = this.linkCache.get(t2);
27006
- if (e?.indexOf(this.cwd) === 0) return this[Qs](e);
27160
+ if (e?.indexOf(this.cwd) === 0) return this[sr](e);
27007
27161
  this.linkCache.set(t2, this.absolute);
27008
27162
  }
27009
27163
  if (this[fe2](), this.stat.size === 0) return this.end();
27010
- this[es]();
27164
+ this[os2]();
27011
27165
  }
27012
- [es]() {
27166
+ [os2]() {
27013
27167
  fs.open(this.absolute, "r", (t2, e) => {
27014
27168
  if (t2) return this.emit("error", t2);
27015
- this[is](e);
27169
+ this[hs](e);
27016
27170
  });
27017
27171
  }
27018
- [is](t2) {
27172
+ [hs](t2) {
27019
27173
  if (this.fd = t2, this.#t) return this[pt3]();
27020
27174
  if (!this.stat) throw new Error("should stat before calling onopenfile");
27021
27175
  this.blockLen = 512 * Math.ceil(this.stat.size / 512), this.blockRemain = this.blockLen;
27022
27176
  let e = Math.min(this.blockLen, this.maxReadSize);
27023
- this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ti]();
27177
+ this.buf = Buffer.allocUnsafe(e), this.offset = 0, this.pos = 0, this.remain = this.stat.size, this.length = this.buf.length, this[ii]();
27024
27178
  }
27025
- [ti]() {
27179
+ [ii]() {
27026
27180
  let { fd: t2, buf: e, offset: i2, length: r, pos: n2 } = this;
27027
27181
  if (t2 === void 0 || e === void 0) throw new Error("cannot read file without first opening");
27028
27182
  fs.read(t2, e, i2, r, n2, (o2, h3) => {
27029
27183
  if (o2) return this[pt3](() => this.emit("error", o2));
27030
- this[Ji](h3);
27184
+ this[rs](h3);
27031
27185
  });
27032
27186
  }
27033
27187
  [pt3](t2 = () => {
27034
27188
  }) {
27035
27189
  this.fd !== void 0 && fs.close(this.fd, t2);
27036
27190
  }
27037
- [Ji](t2) {
27191
+ [rs](t2) {
27038
27192
  if (t2 <= 0 && this.remain > 0) {
27039
27193
  let r = Object.assign(new Error("encountered unexpected EOF"), { path: this.absolute, syscall: "read", code: "EOF" });
27040
27194
  return this[pt3](() => this.emit("error", r));
@@ -27046,9 +27200,9 @@ var de2 = class extends D3 {
27046
27200
  if (!this.buf) throw new Error("should have created buffer prior to reading");
27047
27201
  if (t2 === this.remain) for (let r = t2; r < this.length && t2 < this.blockRemain; r++) this.buf[r + this.offset] = 0, t2++, this.remain++;
27048
27202
  let e = this.offset === 0 && t2 === this.buf.length ? this.buf : this.buf.subarray(this.offset, this.offset + t2);
27049
- this.write(e) ? this[qi]() : this[ss](() => this[qi]());
27203
+ this.write(e) ? this[es]() : this[as](() => this[es]());
27050
27204
  }
27051
- [ss](t2) {
27205
+ [as](t2) {
27052
27206
  this.once("drain", t2);
27053
27207
  }
27054
27208
  write(t2, e, i2) {
@@ -27058,30 +27212,30 @@ var de2 = class extends D3 {
27058
27212
  }
27059
27213
  return this.remain -= t2.length, this.blockRemain -= t2.length, this.pos += t2.length, this.offset += t2.length, super.write(t2, null, i2);
27060
27214
  }
27061
- [qi]() {
27215
+ [es]() {
27062
27216
  if (!this.remain) return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), this[pt3]((t2) => t2 ? this.emit("error", t2) : this.end());
27063
27217
  if (!this.buf) throw new Error("buffer lost somehow in ONDRAIN");
27064
- 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]();
27218
+ this.offset >= this.length && (this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)), this.offset = 0), this.length = this.buf.length - this.offset, this[ii]();
27065
27219
  }
27066
27220
  };
27067
- var si = class extends de2 {
27221
+ var ni = class extends de2 {
27068
27222
  sync = true;
27069
- [Qi]() {
27070
- this[ei](fs.lstatSync(this.absolute));
27223
+ [ss]() {
27224
+ this[si](fs.lstatSync(this.absolute));
27071
27225
  }
27072
- [ji]() {
27073
- this[ts](fs.readlinkSync(this.absolute));
27226
+ [is]() {
27227
+ this[ns](fs.readlinkSync(this.absolute));
27074
27228
  }
27075
- [es]() {
27076
- this[is](fs.openSync(this.absolute, "r"));
27229
+ [os2]() {
27230
+ this[hs](fs.openSync(this.absolute, "r"));
27077
27231
  }
27078
- [ti]() {
27232
+ [ii]() {
27079
27233
  let t2 = true;
27080
27234
  try {
27081
27235
  let { fd: e, buf: i2, offset: r, length: n2, pos: o2 } = this;
27082
27236
  if (e === void 0 || i2 === void 0) throw new Error("fd and buf must be set in READ method");
27083
27237
  let h3 = fs.readSync(e, i2, r, n2, o2);
27084
- this[Ji](h3), t2 = false;
27238
+ this[rs](h3), t2 = false;
27085
27239
  } finally {
27086
27240
  if (t2) try {
27087
27241
  this[pt3](() => {
@@ -27090,7 +27244,7 @@ var si = class extends de2 {
27090
27244
  }
27091
27245
  }
27092
27246
  }
27093
- [ss](t2) {
27247
+ [as](t2) {
27094
27248
  t2();
27095
27249
  }
27096
27250
  [pt3](t2 = () => {
@@ -27098,7 +27252,7 @@ var si = class extends de2 {
27098
27252
  this.fd !== void 0 && fs.closeSync(this.fd), t2();
27099
27253
  }
27100
27254
  };
27101
- var ri = class extends D3 {
27255
+ var oi = class extends A {
27102
27256
  blockLen = 0;
27103
27257
  blockRemain = 0;
27104
27258
  buf = 0;
@@ -27127,29 +27281,29 @@ var ri = class extends D3 {
27127
27281
  size;
27128
27282
  onWriteEntry;
27129
27283
  warn(t2, e, i2 = {}) {
27130
- return Lt2(this, t2, e, i2);
27284
+ return Dt(this, t2, e, i2);
27131
27285
  }
27132
27286
  constructor(t2, e = {}) {
27133
- let i2 = re2(e);
27287
+ let i2 = se2(e);
27134
27288
  super(), this.preservePaths = !!i2.preservePaths, this.portable = !!i2.portable, this.strict = !!i2.strict, this.noPax = !!i2.noPax, this.noMtime = !!i2.noMtime, this.onWriteEntry = i2.onWriteEntry, this.readEntry = t2;
27135
27289
  let { type: r } = t2;
27136
27290
  if (r === "Unsupported") throw new Error("writing entry that should be ignored");
27137
- this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i2.prefix, this.path = f(t2.path), this.mode = t2.mode !== void 0 ? this[ii](t2.mode) : void 0, this.uid = this.portable ? void 0 : t2.uid, this.gid = this.portable ? void 0 : t2.gid, this.uname = this.portable ? void 0 : t2.uname, this.gname = this.portable ? void 0 : t2.gname, this.size = t2.size, this.mtime = this.noMtime ? void 0 : i2.mtime || t2.mtime, this.atime = this.portable ? void 0 : t2.atime, this.ctime = this.portable ? void 0 : t2.ctime, this.linkpath = t2.linkpath !== void 0 ? f(t2.linkpath) : void 0, typeof i2.onwarn == "function" && this.on("warn", i2.onwarn);
27291
+ this.type = r, this.type === "Directory" && this.portable && (this.noMtime = true), this.prefix = i2.prefix, this.path = f(t2.path), this.mode = t2.mode !== void 0 ? this[ri](t2.mode) : void 0, this.uid = this.portable ? void 0 : t2.uid, this.gid = this.portable ? void 0 : t2.gid, this.uname = this.portable ? void 0 : t2.uname, this.gname = this.portable ? void 0 : t2.gname, this.size = t2.size, this.mtime = this.noMtime ? void 0 : i2.mtime || t2.mtime, this.atime = this.portable ? void 0 : t2.atime, this.ctime = this.portable ? void 0 : t2.ctime, this.linkpath = t2.linkpath !== void 0 ? f(t2.linkpath) : void 0, typeof i2.onwarn == "function" && this.on("warn", i2.onwarn);
27138
27292
  let n2 = false;
27139
27293
  if (!this.preservePaths) {
27140
27294
  let [h3, a2] = ce2(this.path);
27141
27295
  h3 && typeof a2 == "string" && (this.path = a2, n2 = h3);
27142
27296
  }
27143
- this.remain = t2.size, this.blockRemain = t2.startBlockSize, this.onWriteEntry?.(this), this.header = new F({ path: this[X3](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X3](this.linkpath) : this.linkpath, mode: this.mode, uid: this.portable ? void 0 : this.uid, gid: this.portable ? void 0 : this.gid, size: this.size, mtime: this.noMtime ? void 0 : this.mtime, type: this.type, uname: this.portable ? void 0 : this.uname, atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime }), n2 && this.warn("TAR_ENTRY_INFO", `stripping ${n2} from absolute path`, { entry: this, path: n2 + this.path }), this.header.encode() && !this.noPax && super.write(new ct2({ atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime, gid: this.portable ? void 0 : this.gid, mtime: this.noMtime ? void 0 : this.mtime, path: this[X3](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[X3](this.linkpath) : this.linkpath, size: this.size, uid: this.portable ? void 0 : this.uid, uname: this.portable ? void 0 : this.uname, dev: this.portable ? void 0 : this.readEntry.dev, ino: this.portable ? void 0 : this.readEntry.ino, nlink: this.portable ? void 0 : this.readEntry.nlink }).encode());
27297
+ this.remain = t2.size, this.blockRemain = t2.startBlockSize, this.onWriteEntry?.(this), this.header = new F({ path: this[q3](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q3](this.linkpath) : this.linkpath, mode: this.mode, uid: this.portable ? void 0 : this.uid, gid: this.portable ? void 0 : this.gid, size: this.size, mtime: this.noMtime ? void 0 : this.mtime, type: this.type, uname: this.portable ? void 0 : this.uname, atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime }), n2 && this.warn("TAR_ENTRY_INFO", `stripping ${n2} from absolute path`, { entry: this, path: n2 + this.path }), this.header.encode() && !this.noPax && super.write(new ft3({ atime: this.portable ? void 0 : this.atime, ctime: this.portable ? void 0 : this.ctime, gid: this.portable ? void 0 : this.gid, mtime: this.noMtime ? void 0 : this.mtime, path: this[q3](this.path), linkpath: this.type === "Link" && this.linkpath !== void 0 ? this[q3](this.linkpath) : this.linkpath, size: this.size, uid: this.portable ? void 0 : this.uid, uname: this.portable ? void 0 : this.uname, dev: this.portable ? void 0 : this.readEntry.dev, ino: this.portable ? void 0 : this.readEntry.ino, nlink: this.portable ? void 0 : this.readEntry.nlink }).encode());
27144
27298
  let o2 = this.header?.block;
27145
27299
  if (!o2) throw new Error("failed to encode header");
27146
27300
  super.write(o2), t2.pipe(this);
27147
27301
  }
27148
- [X3](t2) {
27149
- return Js(t2, this.prefix);
27302
+ [q3](t2) {
27303
+ return rr(t2, this.prefix);
27150
27304
  }
27151
- [ii](t2) {
27152
- return Vi(t2, this.type === "Directory", this.portable);
27305
+ [ri](t2) {
27306
+ return Ji(t2, this.type === "Directory", this.portable);
27153
27307
  }
27154
27308
  write(t2, e, i2) {
27155
27309
  typeof e == "function" && (i2 = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, typeof e == "string" ? e : "utf8"));
@@ -27161,8 +27315,8 @@ var ri = class extends D3 {
27161
27315
  return this.blockRemain && super.write(Buffer.alloc(this.blockRemain)), typeof t2 == "function" && (i2 = t2, e = void 0, t2 = void 0), typeof e == "function" && (i2 = e, e = void 0), typeof t2 == "string" && (t2 = Buffer.from(t2, e ?? "utf8")), i2 && this.once("finish", i2), t2 ? super.end(t2, i2) : super.end(i2), this;
27162
27316
  }
27163
27317
  };
27164
- var Mn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
27165
- var ni = class s2 {
27318
+ var Gn = (s3) => s3.isFile() ? "File" : s3.isDirectory() ? "Directory" : s3.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
27319
+ var hi = class s2 {
27166
27320
  tail;
27167
27321
  head;
27168
27322
  length = 0;
@@ -27193,11 +27347,11 @@ var ni = class s2 {
27193
27347
  t2.list = this, t2.prev = e, e && (e.next = t2), this.tail = t2, this.head || (this.head = t2), this.length++;
27194
27348
  }
27195
27349
  push(...t2) {
27196
- for (let e = 0, i2 = t2.length; e < i2; e++) Pn(this, t2[e]);
27350
+ for (let e = 0, i2 = t2.length; e < i2; e++) Yn(this, t2[e]);
27197
27351
  return this.length;
27198
27352
  }
27199
27353
  unshift(...t2) {
27200
- for (var e = 0, i2 = t2.length; e < i2; e++) zn(this, t2[e]);
27354
+ for (var e = 0, i2 = t2.length; e < i2; e++) Kn(this, t2[e]);
27201
27355
  return this.length;
27202
27356
  }
27203
27357
  pop() {
@@ -27293,7 +27447,7 @@ var ni = class s2 {
27293
27447
  let n2 = [];
27294
27448
  for (let o2 = 0; r && o2 < e; o2++) n2.push(r.value), r = this.removeNode(r);
27295
27449
  r ? r !== this.tail && (r = r.prev) : r = this.tail;
27296
- for (let o2 of i2) r = Bn(this, r, o2);
27450
+ for (let o2 of i2) r = Zn(this, r, o2);
27297
27451
  return n2;
27298
27452
  }
27299
27453
  reverse() {
@@ -27305,17 +27459,17 @@ var ni = class s2 {
27305
27459
  return this.head = e, this.tail = t2, this;
27306
27460
  }
27307
27461
  };
27308
- function Bn(s3, t2, e) {
27309
- let i2 = t2, r = t2 ? t2.next : s3.head, n2 = new ue2(e, i2, r, s3);
27462
+ function Zn(s3, t2, e) {
27463
+ let i2 = t2, r = t2 ? t2.next : s3.head, n2 = new me2(e, i2, r, s3);
27310
27464
  return n2.next === void 0 && (s3.tail = n2), n2.prev === void 0 && (s3.head = n2), s3.length++, n2;
27311
27465
  }
27312
- function Pn(s3, t2) {
27313
- s3.tail = new ue2(t2, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
27466
+ function Yn(s3, t2) {
27467
+ s3.tail = new me2(t2, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
27314
27468
  }
27315
- function zn(s3, t2) {
27316
- s3.head = new ue2(t2, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
27469
+ function Kn(s3, t2) {
27470
+ s3.head = new me2(t2, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
27317
27471
  }
27318
- var ue2 = class {
27472
+ var me2 = class {
27319
27473
  list;
27320
27474
  next;
27321
27475
  prev;
@@ -27324,41 +27478,43 @@ var ue2 = class {
27324
27478
  this.list = r, this.value = t2, e ? (e.next = this, this.prev = e) : this.prev = void 0, i2 ? (i2.prev = this, this.next = i2) : this.next = void 0;
27325
27479
  }
27326
27480
  };
27327
- var di = class {
27481
+ var pi = class {
27328
27482
  path;
27329
27483
  absolute;
27330
27484
  entry;
27331
27485
  stat;
27332
27486
  readdir;
27333
27487
  pending = false;
27488
+ pendingLink = false;
27334
27489
  ignore = false;
27335
27490
  piped = false;
27336
27491
  constructor(t2, e) {
27337
27492
  this.path = t2 || "./", this.absolute = e;
27338
27493
  }
27339
27494
  };
27340
- var tr = Buffer.alloc(1024);
27341
- var oi = Symbol("onStat");
27342
- var me2 = Symbol("ended");
27495
+ var nr = Buffer.alloc(1024);
27496
+ var li = Symbol("onStat");
27497
+ var ue2 = Symbol("ended");
27343
27498
  var W3 = Symbol("queue");
27344
- var Ct3 = Symbol("current");
27499
+ var pe2 = Symbol("pendingLinks");
27500
+ var Et3 = Symbol("current");
27345
27501
  var Ft3 = Symbol("process");
27346
- var pe2 = Symbol("processing");
27347
- var rs = Symbol("processJob");
27502
+ var Ee2 = Symbol("processing");
27503
+ var ai = Symbol("processJob");
27348
27504
  var G2 = Symbol("jobs");
27349
- var ns = Symbol("jobDone");
27350
- var hi = Symbol("addFSEntry");
27351
- var er = Symbol("addTarEntry");
27352
- var as = Symbol("stat");
27353
- var ls = Symbol("readdir");
27354
- var ai = Symbol("onreaddir");
27355
- var li = Symbol("pipe");
27356
- var ir = Symbol("entry");
27357
- var os2 = Symbol("entryOpt");
27358
- var ci = Symbol("writeEntryClass");
27359
- var rr = Symbol("write");
27360
- var hs = Symbol("ondrain");
27361
- var Et3 = class extends D3 {
27505
+ var ls = Symbol("jobDone");
27506
+ var ci = Symbol("addFSEntry");
27507
+ var or = Symbol("addTarEntry");
27508
+ var ds = Symbol("stat");
27509
+ var ms = Symbol("readdir");
27510
+ var fi = Symbol("onreaddir");
27511
+ var di = Symbol("pipe");
27512
+ var hr = Symbol("entry");
27513
+ var cs = Symbol("entryOpt");
27514
+ var mi = Symbol("writeEntryClass");
27515
+ var lr = Symbol("write");
27516
+ var fs10 = Symbol("ondrain");
27517
+ var wt2 = class extends A {
27362
27518
  sync = false;
27363
27519
  opt;
27364
27520
  cwd;
@@ -27379,123 +27535,139 @@ var Et3 = class extends D3 {
27379
27535
  mtime;
27380
27536
  filter;
27381
27537
  jobs;
27382
- [ci];
27538
+ [mi];
27383
27539
  onWriteEntry;
27384
27540
  [W3];
27541
+ [pe2] = /* @__PURE__ */ new Map();
27385
27542
  [G2] = 0;
27386
- [pe2] = false;
27387
- [me2] = false;
27543
+ [Ee2] = false;
27544
+ [ue2] = false;
27388
27545
  constructor(t2 = {}) {
27389
- if (super(), this.opt = t2, this.file = t2.file || "", this.cwd = t2.cwd || process.cwd(), this.maxReadSize = t2.maxReadSize, this.preservePaths = !!t2.preservePaths, this.strict = !!t2.strict, this.noPax = !!t2.noPax, this.prefix = f(t2.prefix || ""), this.linkCache = t2.linkCache || /* @__PURE__ */ new Map(), this.statCache = t2.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t2.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t2.onWriteEntry, this[ci] = de2, typeof t2.onwarn == "function" && this.on("warn", t2.onwarn), this.portable = !!t2.portable, t2.gzip || t2.brotli || t2.zstd) {
27546
+ if (super(), this.opt = t2, this.file = t2.file || "", this.cwd = t2.cwd || process.cwd(), this.maxReadSize = t2.maxReadSize, this.preservePaths = !!t2.preservePaths, this.strict = !!t2.strict, this.noPax = !!t2.noPax, this.prefix = f(t2.prefix || ""), this.linkCache = t2.linkCache || /* @__PURE__ */ new Map(), this.statCache = t2.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t2.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t2.onWriteEntry, this[mi] = de2, typeof t2.onwarn == "function" && this.on("warn", t2.onwarn), this.portable = !!t2.portable, t2.gzip || t2.brotli || t2.zstd) {
27390
27547
  if ((t2.gzip ? 1 : 0) + (t2.brotli ? 1 : 0) + (t2.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
27391
- if (t2.gzip && (typeof t2.gzip != "object" && (t2.gzip = {}), this.portable && (t2.gzip.portable = true), this.zip = new Pe2(t2.gzip)), t2.brotli && (typeof t2.brotli != "object" && (t2.brotli = {}), this.zip = new He2(t2.brotli)), t2.zstd && (typeof t2.zstd != "object" && (t2.zstd = {}), this.zip = new Ze(t2.zstd)), !this.zip) throw new Error("impossible");
27548
+ if (t2.gzip && (typeof t2.gzip != "object" && (t2.gzip = {}), this.portable && (t2.gzip.portable = true), this.zip = new ze2(t2.gzip)), t2.brotli && (typeof t2.brotli != "object" && (t2.brotli = {}), this.zip = new We2(t2.brotli)), t2.zstd && (typeof t2.zstd != "object" && (t2.zstd = {}), this.zip = new Ye(t2.zstd)), !this.zip) throw new Error("impossible");
27392
27549
  let e = this.zip;
27393
- e.on("data", (i2) => super.write(i2)), e.on("end", () => super.end()), e.on("drain", () => this[hs]()), this.on("resume", () => e.resume());
27394
- } else this.on("drain", this[hs]);
27395
- this.noDirRecurse = !!t2.noDirRecurse, this.follow = !!t2.follow, this.noMtime = !!t2.noMtime, t2.mtime && (this.mtime = t2.mtime), this.filter = typeof t2.filter == "function" ? t2.filter : () => true, this[W3] = new ni(), this[G2] = 0, this.jobs = Number(t2.jobs) || 4, this[pe2] = false, this[me2] = false;
27550
+ e.on("data", (i2) => super.write(i2)), e.on("end", () => super.end()), e.on("drain", () => this[fs10]()), this.on("resume", () => e.resume());
27551
+ } else this.on("drain", this[fs10]);
27552
+ this.noDirRecurse = !!t2.noDirRecurse, this.follow = !!t2.follow, this.noMtime = !!t2.noMtime, t2.mtime && (this.mtime = t2.mtime), this.filter = typeof t2.filter == "function" ? t2.filter : () => true, this[W3] = new hi(), this[G2] = 0, this.jobs = Number(t2.jobs) || 4, this[Ee2] = false, this[ue2] = false;
27396
27553
  }
27397
- [rr](t2) {
27554
+ [lr](t2) {
27398
27555
  return super.write(t2);
27399
27556
  }
27400
27557
  add(t2) {
27401
27558
  return this.write(t2), this;
27402
27559
  }
27403
27560
  end(t2, e, i2) {
27404
- return typeof t2 == "function" && (i2 = t2, t2 = void 0), typeof e == "function" && (i2 = e, e = void 0), t2 && this.add(t2), this[me2] = true, this[Ft3](), i2 && i2(), this;
27561
+ return typeof t2 == "function" && (i2 = t2, t2 = void 0), typeof e == "function" && (i2 = e, e = void 0), t2 && this.add(t2), this[ue2] = true, this[Ft3](), i2 && i2(), this;
27405
27562
  }
27406
27563
  write(t2) {
27407
- if (this[me2]) throw new Error("write after end");
27408
- return t2 instanceof Yt ? this[er](t2) : this[hi](t2), this.flowing;
27564
+ if (this[ue2]) throw new Error("write after end");
27565
+ return typeof t2 == "string" ? this[ci](t2) : this[or](t2), this.flowing;
27409
27566
  }
27410
- [er](t2) {
27567
+ [or](t2) {
27411
27568
  let e = f(path15.resolve(this.cwd, t2.path));
27412
27569
  if (!this.filter(t2.path, t2)) t2.resume();
27413
27570
  else {
27414
- let i2 = new di(t2.path, e);
27415
- i2.entry = new ri(t2, this[os2](i2)), i2.entry.on("end", () => this[ns](i2)), this[G2] += 1, this[W3].push(i2);
27571
+ let i2 = new pi(t2.path, e);
27572
+ i2.entry = new oi(t2, this[cs](i2)), i2.entry.on("end", () => this[ls](i2)), this[G2] += 1, this[W3].push(i2);
27416
27573
  }
27417
27574
  this[Ft3]();
27418
27575
  }
27419
- [hi](t2) {
27576
+ [ci](t2) {
27420
27577
  let e = f(path15.resolve(this.cwd, t2));
27421
- this[W3].push(new di(t2, e)), this[Ft3]();
27578
+ this[W3].push(new pi(t2, e)), this[Ft3]();
27422
27579
  }
27423
- [as](t2) {
27580
+ [ds](t2) {
27424
27581
  t2.pending = true, this[G2] += 1;
27425
27582
  let e = this.follow ? "stat" : "lstat";
27426
27583
  fs[e](t2.absolute, (i2, r) => {
27427
- t2.pending = false, this[G2] -= 1, i2 ? this.emit("error", i2) : this[oi](t2, r);
27584
+ t2.pending = false, this[G2] -= 1, i2 ? this.emit("error", i2) : this[li](t2, r);
27428
27585
  });
27429
27586
  }
27430
- [oi](t2, e) {
27431
- this.statCache.set(t2.absolute, e), t2.stat = e, this.filter(t2.path, e) ? e.isFile() && e.nlink > 1 && t2 === this[Ct3] && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync && this[rs](t2) : t2.ignore = true, this[Ft3]();
27587
+ [li](t2, e) {
27588
+ if (this.statCache.set(t2.absolute, e), t2.stat = e, !this.filter(t2.path, e)) t2.ignore = true;
27589
+ else if (e.isFile() && e.nlink > 1 && !this.linkCache.get(`${e.dev}:${e.ino}`) && !this.sync) if (t2 === this[Et3]) this[ai](t2);
27590
+ else {
27591
+ let i2 = `${e.dev}:${e.ino}`, r = this[pe2].get(i2);
27592
+ r ? r.push(t2) : this[pe2].set(i2, [t2]), t2.pendingLink = true, t2.pending = true;
27593
+ }
27594
+ this[Ft3]();
27432
27595
  }
27433
- [ls](t2) {
27596
+ [ms](t2) {
27434
27597
  t2.pending = true, this[G2] += 1, fs.readdir(t2.absolute, (e, i2) => {
27435
27598
  if (t2.pending = false, this[G2] -= 1, e) return this.emit("error", e);
27436
- this[ai](t2, i2);
27599
+ this[fi](t2, i2);
27437
27600
  });
27438
27601
  }
27439
- [ai](t2, e) {
27602
+ [fi](t2, e) {
27440
27603
  this.readdirCache.set(t2.absolute, e), t2.readdir = e, this[Ft3]();
27441
27604
  }
27442
27605
  [Ft3]() {
27443
- if (!this[pe2]) {
27444
- this[pe2] = true;
27445
- for (let t2 = this[W3].head; t2 && this[G2] < this.jobs; t2 = t2.next) if (this[rs](t2.value), t2.value.ignore) {
27606
+ if (!this[Ee2]) {
27607
+ this[Ee2] = true;
27608
+ for (let t2 = this[W3].head; t2 && this[G2] < this.jobs; t2 = t2.next) if (this[ai](t2.value), t2.value.ignore) {
27446
27609
  let e = t2.next;
27447
27610
  this[W3].removeNode(t2), t2.next = e;
27448
27611
  }
27449
- this[pe2] = false, this[me2] && this[W3].length === 0 && this[G2] === 0 && (this.zip ? this.zip.end(tr) : (super.write(tr), super.end()));
27612
+ this[Ee2] = false, this[ue2] && this[W3].length === 0 && this[G2] === 0 && (this.zip ? this.zip.end(nr) : (super.write(nr), super.end()));
27450
27613
  }
27451
27614
  }
27452
- get [Ct3]() {
27615
+ get [Et3]() {
27453
27616
  return this[W3] && this[W3].head && this[W3].head.value;
27454
27617
  }
27455
- [ns](t2) {
27456
- this[W3].shift(), this[G2] -= 1, this[Ft3]();
27618
+ [ls](t2) {
27619
+ this[W3].shift(), this[G2] -= 1;
27620
+ let { stat: e } = t2;
27621
+ if (e && e.isFile() && e.nlink > 1) {
27622
+ let i2 = `${e.dev}:${e.ino}`, r = this[pe2].get(i2);
27623
+ if (r) {
27624
+ this[pe2].delete(i2);
27625
+ for (let n2 of r) n2.pending = false, this[ai](n2);
27626
+ }
27627
+ }
27628
+ this[Ft3]();
27457
27629
  }
27458
- [rs](t2) {
27459
- if (!t2.pending) {
27630
+ [ai](t2) {
27631
+ if (t2.pending && t2.pendingLink && t2 === this[Et3] && (t2.pending = false, t2.pendingLink = false), !t2.pending) {
27460
27632
  if (t2.entry) {
27461
- t2 === this[Ct3] && !t2.piped && this[li](t2);
27633
+ t2 === this[Et3] && !t2.piped && this[di](t2);
27462
27634
  return;
27463
27635
  }
27464
27636
  if (!t2.stat) {
27465
27637
  let e = this.statCache.get(t2.absolute);
27466
- e ? this[oi](t2, e) : this[as](t2);
27638
+ e ? this[li](t2, e) : this[ds](t2);
27467
27639
  }
27468
27640
  if (t2.stat && !t2.ignore) {
27469
27641
  if (!this.noDirRecurse && t2.stat.isDirectory() && !t2.readdir) {
27470
27642
  let e = this.readdirCache.get(t2.absolute);
27471
- if (e ? this[ai](t2, e) : this[ls](t2), !t2.readdir) return;
27643
+ if (e ? this[fi](t2, e) : this[ms](t2), !t2.readdir) return;
27472
27644
  }
27473
- if (t2.entry = this[ir](t2), !t2.entry) {
27645
+ if (t2.entry = this[hr](t2), !t2.entry) {
27474
27646
  t2.ignore = true;
27475
27647
  return;
27476
27648
  }
27477
- t2 === this[Ct3] && !t2.piped && this[li](t2);
27649
+ t2 === this[Et3] && !t2.piped && this[di](t2);
27478
27650
  }
27479
27651
  }
27480
27652
  }
27481
- [os2](t2) {
27653
+ [cs](t2) {
27482
27654
  return { onwarn: (e, i2, r) => this.warn(e, i2, r), noPax: this.noPax, cwd: this.cwd, absolute: t2.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 };
27483
27655
  }
27484
- [ir](t2) {
27656
+ [hr](t2) {
27485
27657
  this[G2] += 1;
27486
27658
  try {
27487
- return new this[ci](t2.path, this[os2](t2)).on("end", () => this[ns](t2)).on("error", (i2) => this.emit("error", i2));
27659
+ return new this[mi](t2.path, this[cs](t2)).on("end", () => this[ls](t2)).on("error", (i2) => this.emit("error", i2));
27488
27660
  } catch (e) {
27489
27661
  this.emit("error", e);
27490
27662
  }
27491
27663
  }
27492
- [hs]() {
27493
- this[Ct3] && this[Ct3].entry && this[Ct3].entry.resume();
27664
+ [fs10]() {
27665
+ this[Et3] && this[Et3].entry && this[Et3].entry.resume();
27494
27666
  }
27495
- [li](t2) {
27667
+ [di](t2) {
27496
27668
  t2.piped = true, t2.readdir && t2.readdir.forEach((r) => {
27497
27669
  let n2 = t2.path, o2 = n2 === "./" ? "" : n2.replace(/\/*$/, "/");
27498
- this[hi](o2 + r);
27670
+ this[ci](o2 + r);
27499
27671
  });
27500
27672
  let e = t2.entry, i2 = this.zip;
27501
27673
  if (!e) throw new Error("cannot pipe without source");
@@ -27509,137 +27681,137 @@ var Et3 = class extends D3 {
27509
27681
  return this.zip && this.zip.pause(), super.pause();
27510
27682
  }
27511
27683
  warn(t2, e, i2 = {}) {
27512
- Lt2(this, t2, e, i2);
27684
+ Dt(this, t2, e, i2);
27513
27685
  }
27514
27686
  };
27515
- var kt3 = class extends Et3 {
27687
+ var kt3 = class extends wt2 {
27516
27688
  sync = true;
27517
27689
  constructor(t2) {
27518
- super(t2), this[ci] = si;
27690
+ super(t2), this[mi] = ni;
27519
27691
  }
27520
27692
  pause() {
27521
27693
  }
27522
27694
  resume() {
27523
27695
  }
27524
- [as](t2) {
27696
+ [ds](t2) {
27525
27697
  let e = this.follow ? "statSync" : "lstatSync";
27526
- this[oi](t2, fs[e](t2.absolute));
27698
+ this[li](t2, fs[e](t2.absolute));
27527
27699
  }
27528
- [ls](t2) {
27529
- this[ai](t2, fs.readdirSync(t2.absolute));
27700
+ [ms](t2) {
27701
+ this[fi](t2, fs.readdirSync(t2.absolute));
27530
27702
  }
27531
- [li](t2) {
27703
+ [di](t2) {
27532
27704
  let e = t2.entry, i2 = this.zip;
27533
27705
  if (t2.readdir && t2.readdir.forEach((r) => {
27534
27706
  let n2 = t2.path, o2 = n2 === "./" ? "" : n2.replace(/\/*$/, "/");
27535
- this[hi](o2 + r);
27707
+ this[ci](o2 + r);
27536
27708
  }), !e) throw new Error("Cannot pipe without source");
27537
27709
  i2 ? e.on("data", (r) => {
27538
27710
  i2.write(r);
27539
27711
  }) : e.on("data", (r) => {
27540
- super[rr](r);
27712
+ super[lr](r);
27541
27713
  });
27542
27714
  }
27543
27715
  };
27544
- var Un = (s3, t2) => {
27716
+ var Vn = (s3, t2) => {
27545
27717
  let e = new kt3(s3), i2 = new Wt3(s3.file, { mode: s3.mode || 438 });
27546
- e.pipe(i2), or(e, t2);
27718
+ e.pipe(i2), fr(e, t2);
27547
27719
  };
27548
- var Hn = (s3, t2) => {
27549
- let e = new Et3(s3), i2 = new tt2(s3.file, { mode: s3.mode || 438 });
27720
+ var $n = (s3, t2) => {
27721
+ let e = new wt2(s3), i2 = new et2(s3.file, { mode: s3.mode || 438 });
27550
27722
  e.pipe(i2);
27551
27723
  let r = new Promise((n2, o2) => {
27552
27724
  i2.on("error", o2), i2.on("close", n2), e.on("error", o2);
27553
27725
  });
27554
- return hr(e, t2).catch((n2) => e.emit("error", n2)), r;
27726
+ return dr(e, t2).catch((n2) => e.emit("error", n2)), r;
27555
27727
  };
27556
- var or = (s3, t2) => {
27728
+ var fr = (s3, t2) => {
27557
27729
  t2.forEach((e) => {
27558
- e.charAt(0) === "@" ? It3({ file: path15.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i2) => s3.add(i2) }) : s3.add(e);
27730
+ e.charAt(0) === "@" ? Ct3({ file: path15.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i2) => s3.add(i2) }) : s3.add(e);
27559
27731
  }), s3.end();
27560
27732
  };
27561
- var hr = async (s3, t2) => {
27562
- for (let e of t2) e.charAt(0) === "@" ? await It3({ file: path15.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i2) => {
27733
+ var dr = async (s3, t2) => {
27734
+ for (let e of t2) e.charAt(0) === "@" ? await Ct3({ file: path15.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i2) => {
27563
27735
  s3.add(i2);
27564
27736
  } }) : s3.add(e);
27565
27737
  s3.end();
27566
27738
  };
27567
- var Wn = (s3, t2) => {
27739
+ var Xn = (s3, t2) => {
27568
27740
  let e = new kt3(s3);
27569
- return or(e, t2), e;
27741
+ return fr(e, t2), e;
27570
27742
  };
27571
- var Gn = (s3, t2) => {
27572
- let e = new Et3(s3);
27573
- return hr(e, t2).catch((i2) => e.emit("error", i2)), e;
27743
+ var qn = (s3, t2) => {
27744
+ let e = new wt2(s3);
27745
+ return dr(e, t2).catch((i2) => e.emit("error", i2)), e;
27574
27746
  };
27575
- K2(Un, Hn, Wn, Gn, (s3, t2) => {
27747
+ K2(Vn, $n, Xn, qn, (s3, t2) => {
27576
27748
  if (!t2?.length) throw new TypeError("no paths specified to add to archive");
27577
27749
  });
27578
- var Yn = process.env.__FAKE_PLATFORM__ || process.platform;
27579
- var fr = Yn === "win32";
27580
- var { O_CREAT: dr, O_NOFOLLOW: ar, O_TRUNC: ur, O_WRONLY: mr } = fs.constants;
27581
- var pr = Number(process.env.__FAKE_FS_O_FILENAME__) || fs.constants.UV_FS_O_FILEMAP || 0;
27582
- var Kn = fr && !!pr;
27583
- var Vn = 512 * 1024;
27584
- var $n = pr | ur | dr | mr;
27585
- var lr = !fr && typeof ar == "number" ? ar | ur | dr | mr : null;
27586
- var cs = lr !== null ? () => lr : Kn ? (s3) => s3 < Vn ? $n : "w" : () => "w";
27587
- var fs10 = (s3, t2, e) => {
27750
+ var Jn = process.env.__FAKE_PLATFORM__ || process.platform;
27751
+ var Er = Jn === "win32";
27752
+ var { O_CREAT: wr, O_NOFOLLOW: mr, O_TRUNC: Sr, O_WRONLY: yr } = fs.constants;
27753
+ var Rr = Number(process.env.__FAKE_FS_O_FILENAME__) || fs.constants.UV_FS_O_FILEMAP || 0;
27754
+ var jn = Er && !!Rr;
27755
+ var to = 512 * 1024;
27756
+ var eo = Rr | Sr | wr | yr;
27757
+ var ur = !Er && typeof mr == "number" ? mr | Sr | wr | yr : null;
27758
+ var us = ur !== null ? () => ur : jn ? (s3) => s3 < to ? eo : "w" : () => "w";
27759
+ var ps = (s3, t2, e) => {
27588
27760
  try {
27589
27761
  return fs.lchownSync(s3, t2, e);
27590
27762
  } catch (i2) {
27591
27763
  if (i2?.code !== "ENOENT") throw i2;
27592
27764
  }
27593
27765
  };
27594
- var ui = (s3, t2, e, i2) => {
27766
+ var Ei = (s3, t2, e, i2) => {
27595
27767
  fs.lchown(s3, t2, e, (r) => {
27596
27768
  i2(r && r?.code !== "ENOENT" ? r : null);
27597
27769
  });
27598
27770
  };
27599
- var Xn = (s3, t2, e, i2, r) => {
27600
- if (t2.isDirectory()) ds(path15.resolve(s3, t2.name), e, i2, (n2) => {
27771
+ var io = (s3, t2, e, i2, r) => {
27772
+ if (t2.isDirectory()) Es(path15.resolve(s3, t2.name), e, i2, (n2) => {
27601
27773
  if (n2) return r(n2);
27602
27774
  let o2 = path15.resolve(s3, t2.name);
27603
- ui(o2, e, i2, r);
27775
+ Ei(o2, e, i2, r);
27604
27776
  });
27605
27777
  else {
27606
27778
  let n2 = path15.resolve(s3, t2.name);
27607
- ui(n2, e, i2, r);
27779
+ Ei(n2, e, i2, r);
27608
27780
  }
27609
27781
  };
27610
- var ds = (s3, t2, e, i2) => {
27782
+ var Es = (s3, t2, e, i2) => {
27611
27783
  fs.readdir(s3, { withFileTypes: true }, (r, n2) => {
27612
27784
  if (r) {
27613
27785
  if (r.code === "ENOENT") return i2();
27614
27786
  if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i2(r);
27615
27787
  }
27616
- if (r || !n2.length) return ui(s3, t2, e, i2);
27788
+ if (r || !n2.length) return Ei(s3, t2, e, i2);
27617
27789
  let o2 = n2.length, h3 = null, a2 = (l) => {
27618
27790
  if (!h3) {
27619
27791
  if (l) return i2(h3 = l);
27620
- if (--o2 === 0) return ui(s3, t2, e, i2);
27792
+ if (--o2 === 0) return Ei(s3, t2, e, i2);
27621
27793
  }
27622
27794
  };
27623
- for (let l of n2) Xn(s3, l, t2, e, a2);
27795
+ for (let l of n2) io(s3, l, t2, e, a2);
27624
27796
  });
27625
27797
  };
27626
- var qn = (s3, t2, e, i2) => {
27627
- t2.isDirectory() && us(path15.resolve(s3, t2.name), e, i2), fs10(path15.resolve(s3, t2.name), e, i2);
27798
+ var so = (s3, t2, e, i2) => {
27799
+ t2.isDirectory() && ws(path15.resolve(s3, t2.name), e, i2), ps(path15.resolve(s3, t2.name), e, i2);
27628
27800
  };
27629
- var us = (s3, t2, e) => {
27801
+ var ws = (s3, t2, e) => {
27630
27802
  let i2;
27631
27803
  try {
27632
27804
  i2 = fs.readdirSync(s3, { withFileTypes: true });
27633
27805
  } catch (r) {
27634
27806
  let n2 = r;
27635
27807
  if (n2?.code === "ENOENT") return;
27636
- if (n2?.code === "ENOTDIR" || n2?.code === "ENOTSUP") return fs10(s3, t2, e);
27808
+ if (n2?.code === "ENOTDIR" || n2?.code === "ENOTSUP") return ps(s3, t2, e);
27637
27809
  throw n2;
27638
27810
  }
27639
- for (let r of i2) qn(s3, r, t2, e);
27640
- return fs10(s3, t2, e);
27811
+ for (let r of i2) so(s3, r, t2, e);
27812
+ return ps(s3, t2, e);
27641
27813
  };
27642
- var we2 = class extends Error {
27814
+ var Se2 = class extends Error {
27643
27815
  path;
27644
27816
  code;
27645
27817
  syscall = "chdir";
@@ -27650,7 +27822,7 @@ var we2 = class extends Error {
27650
27822
  return "CwdError";
27651
27823
  }
27652
27824
  };
27653
- var wt2 = class extends Error {
27825
+ var St2 = class extends Error {
27654
27826
  path;
27655
27827
  symlink;
27656
27828
  syscall = "symlink";
@@ -27662,97 +27834,97 @@ var wt2 = class extends Error {
27662
27834
  return "SymlinkError";
27663
27835
  }
27664
27836
  };
27665
- var Qn = (s3, t2) => {
27837
+ var no = (s3, t2) => {
27666
27838
  fs.stat(s3, (e, i2) => {
27667
- (e || !i2.isDirectory()) && (e = new we2(s3, e?.code || "ENOTDIR")), t2(e);
27839
+ (e || !i2.isDirectory()) && (e = new Se2(s3, e?.code || "ENOTDIR")), t2(e);
27668
27840
  });
27669
27841
  };
27670
- var Er = (s3, t2, e) => {
27842
+ var gr = (s3, t2, e) => {
27671
27843
  s3 = f(s3);
27672
- let i2 = t2.umask ?? 18, r = t2.mode | 448, n2 = (r & i2) !== 0, o2 = t2.uid, h3 = t2.gid, a2 = typeof o2 == "number" && typeof h3 == "number" && (o2 !== t2.processUid || h3 !== t2.processGid), l = t2.preserve, c3 = t2.unlink, d = f(t2.cwd), S2 = (E, x3) => {
27673
- E ? e(E) : x3 && a2 ? ds(x3, o2, h3, (xe2) => S2(xe2)) : n2 ? fs.chmod(s3, r, e) : e();
27844
+ let i2 = t2.umask ?? 18, r = t2.mode | 448, n2 = (r & i2) !== 0, o2 = t2.uid, h3 = t2.gid, a2 = typeof o2 == "number" && typeof h3 == "number" && (o2 !== t2.processUid || h3 !== t2.processGid), l = t2.preserve, c3 = t2.unlink, d = f(t2.cwd), y2 = (E, x3) => {
27845
+ E ? e(E) : x3 && a2 ? Es(x3, o2, h3, (Le2) => y2(Le2)) : n2 ? fs.chmod(s3, r, e) : e();
27674
27846
  };
27675
- if (s3 === d) return Qn(s3, S2);
27676
- if (l) return jn.mkdir(s3, { mode: r, recursive: true }).then((E) => S2(null, E ?? void 0), S2);
27677
- let N3 = f(path15.relative(d, s3)).split("/");
27678
- ms(d, N3, r, c3, d, void 0, S2);
27847
+ if (s3 === d) return no(s3, y2);
27848
+ if (l) return ro.mkdir(s3, { mode: r, recursive: true }).then((E) => y2(null, E ?? void 0), y2);
27849
+ let D3 = f(path15.relative(d, s3)).split("/");
27850
+ Ss(d, D3, r, c3, d, void 0, y2);
27679
27851
  };
27680
- var ms = (s3, t2, e, i2, r, n2, o2) => {
27852
+ var Ss = (s3, t2, e, i2, r, n2, o2) => {
27681
27853
  if (t2.length === 0) return o2(null, n2);
27682
27854
  let h3 = t2.shift(), a2 = f(path15.resolve(s3 + "/" + h3));
27683
- fs.mkdir(a2, e, wr(a2, t2, e, i2, r, n2, o2));
27855
+ fs.mkdir(a2, e, br(a2, t2, e, i2, r, n2, o2));
27684
27856
  };
27685
- var wr = (s3, t2, e, i2, r, n2, o2) => (h3) => {
27857
+ var br = (s3, t2, e, i2, r, n2, o2) => (h3) => {
27686
27858
  h3 ? fs.lstat(s3, (a2, l) => {
27687
27859
  if (a2) a2.path = a2.path && f(a2.path), o2(a2);
27688
- else if (l.isDirectory()) ms(s3, t2, e, i2, r, n2, o2);
27860
+ else if (l.isDirectory()) Ss(s3, t2, e, i2, r, n2, o2);
27689
27861
  else if (i2) fs.unlink(s3, (c3) => {
27690
27862
  if (c3) return o2(c3);
27691
- fs.mkdir(s3, e, wr(s3, t2, e, i2, r, n2, o2));
27863
+ fs.mkdir(s3, e, br(s3, t2, e, i2, r, n2, o2));
27692
27864
  });
27693
27865
  else {
27694
- if (l.isSymbolicLink()) return o2(new wt2(s3, s3 + "/" + t2.join("/")));
27866
+ if (l.isSymbolicLink()) return o2(new St2(s3, s3 + "/" + t2.join("/")));
27695
27867
  o2(h3);
27696
27868
  }
27697
- }) : (n2 = n2 || s3, ms(s3, t2, e, i2, r, n2, o2));
27869
+ }) : (n2 = n2 || s3, Ss(s3, t2, e, i2, r, n2, o2));
27698
27870
  };
27699
- var Jn = (s3) => {
27871
+ var oo = (s3) => {
27700
27872
  let t2 = false, e;
27701
27873
  try {
27702
27874
  t2 = fs.statSync(s3).isDirectory();
27703
27875
  } catch (i2) {
27704
27876
  e = i2?.code;
27705
27877
  } finally {
27706
- if (!t2) throw new we2(s3, e ?? "ENOTDIR");
27878
+ if (!t2) throw new Se2(s3, e ?? "ENOTDIR");
27707
27879
  }
27708
27880
  };
27709
- var Sr = (s3, t2) => {
27881
+ var _r = (s3, t2) => {
27710
27882
  s3 = f(s3);
27711
27883
  let e = t2.umask ?? 18, i2 = t2.mode | 448, r = (i2 & e) !== 0, n2 = t2.uid, o2 = t2.gid, h3 = typeof n2 == "number" && typeof o2 == "number" && (n2 !== t2.processUid || o2 !== t2.processGid), a2 = t2.preserve, l = t2.unlink, c3 = f(t2.cwd), d = (E) => {
27712
- E && h3 && us(E, n2, o2), r && fs.chmodSync(s3, i2);
27884
+ E && h3 && ws(E, n2, o2), r && fs.chmodSync(s3, i2);
27713
27885
  };
27714
- if (s3 === c3) return Jn(c3), d();
27886
+ if (s3 === c3) return oo(c3), d();
27715
27887
  if (a2) return d(fs.mkdirSync(s3, { mode: i2, recursive: true }) ?? void 0);
27716
- let T2 = f(path15.relative(c3, s3)).split("/"), N3;
27888
+ let T2 = f(path15.relative(c3, s3)).split("/"), D3;
27717
27889
  for (let E = T2.shift(), x3 = c3; E && (x3 += "/" + E); E = T2.shift()) {
27718
27890
  x3 = f(path15.resolve(x3));
27719
27891
  try {
27720
- fs.mkdirSync(x3, i2), N3 = N3 || x3;
27892
+ fs.mkdirSync(x3, i2), D3 = D3 || x3;
27721
27893
  } catch {
27722
- let xe2 = fs.lstatSync(x3);
27723
- if (xe2.isDirectory()) continue;
27894
+ let Le2 = fs.lstatSync(x3);
27895
+ if (Le2.isDirectory()) continue;
27724
27896
  if (l) {
27725
- fs.unlinkSync(x3), fs.mkdirSync(x3, i2), N3 = N3 || x3;
27897
+ fs.unlinkSync(x3), fs.mkdirSync(x3, i2), D3 = D3 || x3;
27726
27898
  continue;
27727
- } else if (xe2.isSymbolicLink()) return new wt2(x3, x3 + "/" + T2.join("/"));
27899
+ } else if (Le2.isSymbolicLink()) return new St2(x3, x3 + "/" + T2.join("/"));
27728
27900
  }
27729
27901
  }
27730
- return d(N3);
27902
+ return d(D3);
27731
27903
  };
27732
- var ps = /* @__PURE__ */ Object.create(null);
27733
- var yr = 1e4;
27734
- var $t3 = /* @__PURE__ */ new Set();
27735
- var Rr = (s3) => {
27736
- $t3.has(s3) ? $t3.delete(s3) : ps[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), $t3.add(s3);
27737
- let t2 = ps[s3], e = $t3.size - yr;
27738
- if (e > yr / 10) {
27739
- for (let i2 of $t3) if ($t3.delete(i2), delete ps[i2], --e <= 0) break;
27904
+ var ys = /* @__PURE__ */ Object.create(null);
27905
+ var Or = 1e4;
27906
+ var Vt3 = /* @__PURE__ */ new Set();
27907
+ var Tr = (s3) => {
27908
+ Vt3.has(s3) ? Vt3.delete(s3) : ys[s3] = s3.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en"), Vt3.add(s3);
27909
+ let t2 = ys[s3], e = Vt3.size - Or;
27910
+ if (e > Or / 10) {
27911
+ for (let i2 of Vt3) if (Vt3.delete(i2), delete ys[i2], --e <= 0) break;
27740
27912
  }
27741
27913
  return t2;
27742
27914
  };
27743
- var to = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
27744
- var eo = to === "win32";
27745
- var io = (s3) => s3.split("/").slice(0, -1).reduce((e, i2) => {
27915
+ var ho = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
27916
+ var ao = ho === "win32";
27917
+ var lo = (s3) => s3.split("/").slice(0, -1).reduce((e, i2) => {
27746
27918
  let r = e.at(-1);
27747
27919
  return r !== void 0 && (i2 = join(r, i2)), e.push(i2 || "/"), e;
27748
27920
  }, []);
27749
- var Ei = class {
27921
+ var yi = class {
27750
27922
  #t = /* @__PURE__ */ new Map();
27751
27923
  #i = /* @__PURE__ */ new Map();
27752
27924
  #s = /* @__PURE__ */ new Set();
27753
27925
  reserve(t2, e) {
27754
- t2 = eo ? ["win32 parallelization disabled"] : t2.map((r) => mt3(join(Rr(r))));
27755
- let i2 = new Set(t2.map((r) => io(r)).reduce((r, n2) => r.concat(n2)));
27926
+ t2 = ao ? ["win32 parallelization disabled"] : t2.map((r) => ut(join(Tr(r))));
27927
+ let i2 = new Set(t2.map((r) => lo(r)).reduce((r, n2) => r.concat(n2)));
27756
27928
  this.#i.set(e, { dirs: i2, paths: t2 });
27757
27929
  for (let r of t2) {
27758
27930
  let n2 = this.#t.get(r);
@@ -27810,55 +27982,55 @@ var Ei = class {
27810
27982
  return this.#s.delete(t2), n2.forEach((o2) => this.#r(o2)), true;
27811
27983
  }
27812
27984
  };
27813
- var _r = () => process.umask();
27814
- var gr = Symbol("onEntry");
27815
- var ys = Symbol("checkFs");
27816
- var Or = Symbol("checkFs2");
27817
- var Rs = Symbol("isReusable");
27985
+ var Lr = () => process.umask();
27986
+ var Dr = Symbol("onEntry");
27987
+ var _s = Symbol("checkFs");
27988
+ var Nr = Symbol("checkFs2");
27989
+ var Os = Symbol("isReusable");
27818
27990
  var P2 = Symbol("makeFs");
27819
- var bs = Symbol("file");
27820
- var _s = Symbol("directory");
27821
- var Si = Symbol("link");
27822
- var Tr = Symbol("symlink");
27823
- var xr = Symbol("hardlink");
27824
- var ye2 = Symbol("ensureNoSymlink");
27825
- var Lr = Symbol("unsupported");
27826
- var Nr = Symbol("checkPath");
27827
- var Es = Symbol("stripAbsolutePath");
27828
- var St2 = Symbol("mkdir");
27991
+ var Ts = Symbol("file");
27992
+ var xs = Symbol("directory");
27993
+ var gi = Symbol("link");
27994
+ var Ar = Symbol("symlink");
27995
+ var Ir = Symbol("hardlink");
27996
+ var Re2 = Symbol("ensureNoSymlink");
27997
+ var Cr = Symbol("unsupported");
27998
+ var Fr = Symbol("checkPath");
27999
+ var Rs = Symbol("stripAbsolutePath");
28000
+ var yt3 = Symbol("mkdir");
27829
28001
  var O2 = Symbol("onError");
27830
- var wi = Symbol("pending");
27831
- var Ar = Symbol("pend");
27832
- var Xt = Symbol("unpend");
27833
- var ws = Symbol("ended");
27834
- var Ss = Symbol("maybeClose");
27835
- var gs = Symbol("skip");
27836
- var Re2 = Symbol("doChown");
28002
+ var Ri = Symbol("pending");
28003
+ var kr = Symbol("pend");
28004
+ var $t3 = Symbol("unpend");
28005
+ var gs = Symbol("ended");
28006
+ var bs = Symbol("maybeClose");
28007
+ var Ls = Symbol("skip");
28008
+ var ge2 = Symbol("doChown");
27837
28009
  var be2 = Symbol("uid");
27838
28010
  var _e2 = Symbol("gid");
27839
- var ge2 = Symbol("checkedCwd");
27840
- var ro = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
27841
- var Oe2 = ro === "win32";
27842
- var no = 1024;
27843
- var oo = (s3, t2) => {
27844
- if (!Oe2) return fs.unlink(s3, t2);
28011
+ var Oe2 = Symbol("checkedCwd");
28012
+ var fo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
28013
+ var Te2 = fo === "win32";
28014
+ var mo = 1024;
28015
+ var uo = (s3, t2) => {
28016
+ if (!Te2) return fs.unlink(s3, t2);
27845
28017
  let e = s3 + ".DELETE." + randomBytes(16).toString("hex");
27846
28018
  fs.rename(s3, e, (i2) => {
27847
28019
  if (i2) return t2(i2);
27848
28020
  fs.unlink(e, t2);
27849
28021
  });
27850
28022
  };
27851
- var ho = (s3) => {
27852
- if (!Oe2) return fs.unlinkSync(s3);
28023
+ var po = (s3) => {
28024
+ if (!Te2) return fs.unlinkSync(s3);
27853
28025
  let t2 = s3 + ".DELETE." + randomBytes(16).toString("hex");
27854
28026
  fs.renameSync(s3, t2), fs.unlinkSync(t2);
27855
28027
  };
27856
- var Dr = (s3, t2, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t2 !== void 0 && t2 === t2 >>> 0 ? t2 : e;
27857
- var qt = class extends st2 {
27858
- [ws] = false;
27859
- [ge2] = false;
27860
- [wi] = 0;
27861
- reservations = new Ei();
28028
+ var vr = (s3, t2, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t2 !== void 0 && t2 === t2 >>> 0 ? t2 : e;
28029
+ var Xt = class extends rt2 {
28030
+ [gs] = false;
28031
+ [Oe2] = false;
28032
+ [Ri] = 0;
28033
+ reservations = new yi();
27862
28034
  transform;
27863
28035
  writable = true;
27864
28036
  readable = false;
@@ -27885,32 +28057,32 @@ var qt = class extends st2 {
27885
28057
  chmod;
27886
28058
  constructor(t2 = {}) {
27887
28059
  if (t2.ondone = () => {
27888
- this[ws] = true, this[Ss]();
28060
+ this[gs] = true, this[bs]();
27889
28061
  }, super(t2), this.transform = t2.transform, this.chmod = !!t2.chmod, typeof t2.uid == "number" || typeof t2.gid == "number") {
27890
28062
  if (typeof t2.uid != "number" || typeof t2.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
27891
28063
  if (t2.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
27892
28064
  this.uid = t2.uid, this.gid = t2.gid, this.setOwner = true;
27893
28065
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
27894
- this.preserveOwner = t2.preserveOwner === void 0 && typeof t2.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t2.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 t2.maxDepth == "number" ? t2.maxDepth : no, this.forceChown = t2.forceChown === true, this.win32 = !!t2.win32 || Oe2, this.newer = !!t2.newer, this.keep = !!t2.keep, this.noMtime = !!t2.noMtime, this.preservePaths = !!t2.preservePaths, this.unlink = !!t2.unlink, this.cwd = f(path15.resolve(t2.cwd || process.cwd())), this.strip = Number(t2.strip) || 0, this.processUmask = this.chmod ? typeof t2.processUmask == "number" ? t2.processUmask : _r() : 0, this.umask = typeof t2.umask == "number" ? t2.umask : this.processUmask, this.dmode = t2.dmode || 511 & ~this.umask, this.fmode = t2.fmode || 438 & ~this.umask, this.on("entry", (e) => this[gr](e));
28066
+ this.preserveOwner = t2.preserveOwner === void 0 && typeof t2.uid != "number" ? process.getuid?.() === 0 : !!t2.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 t2.maxDepth == "number" ? t2.maxDepth : mo, this.forceChown = t2.forceChown === true, this.win32 = !!t2.win32 || Te2, this.newer = !!t2.newer, this.keep = !!t2.keep, this.noMtime = !!t2.noMtime, this.preservePaths = !!t2.preservePaths, this.unlink = !!t2.unlink, this.cwd = f(path15.resolve(t2.cwd || process.cwd())), this.strip = Number(t2.strip) || 0, this.processUmask = this.chmod ? typeof t2.processUmask == "number" ? t2.processUmask : Lr() : 0, this.umask = typeof t2.umask == "number" ? t2.umask : this.processUmask, this.dmode = t2.dmode || 511 & ~this.umask, this.fmode = t2.fmode || 438 & ~this.umask, this.on("entry", (e) => this[Dr](e));
27895
28067
  }
27896
28068
  warn(t2, e, i2 = {}) {
27897
28069
  return (t2 === "TAR_BAD_ARCHIVE" || t2 === "TAR_ABORT") && (i2.recoverable = false), super.warn(t2, e, i2);
27898
28070
  }
27899
- [Ss]() {
27900
- this[ws] && this[wi] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
28071
+ [bs]() {
28072
+ this[gs] && this[Ri] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
27901
28073
  }
27902
- [Es](t2, e) {
28074
+ [Rs](t2, e) {
27903
28075
  let i2 = t2[e], { type: r } = t2;
27904
28076
  if (!i2 || this.preservePaths) return true;
27905
28077
  let [n2, o2] = ce2(i2), h3 = o2.replaceAll(/\\/g, "/").split("/");
27906
- if (h3.includes("..") || Oe2 && /^[a-z]:\.\.$/i.test(h3[0] ?? "")) {
28078
+ if (h3.includes("..") || Te2 && /^[a-z]:\.\.$/i.test(h3[0] ?? "")) {
27907
28079
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t2, [e]: i2 }), false;
27908
28080
  let a2 = path15.posix.dirname(t2.path), l = path15.posix.normalize(path15.posix.join(a2, h3.join("/")));
27909
28081
  if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t2, [e]: i2 }), false;
27910
28082
  }
27911
28083
  return n2 && (t2[e] = String(o2), this.warn("TAR_ENTRY_INFO", `stripping ${n2} from absolute ${e}`, { entry: t2, [e]: i2 })), true;
27912
28084
  }
27913
- [Nr](t2) {
28085
+ [Fr](t2) {
27914
28086
  let e = f(t2.path), i2 = e.split("/");
27915
28087
  if (this.strip) {
27916
28088
  if (i2.length < this.strip) return false;
@@ -27922,20 +28094,20 @@ var qt = class extends st2 {
27922
28094
  i2.splice(0, this.strip), t2.path = i2.join("/");
27923
28095
  }
27924
28096
  if (isFinite(this.maxDepth) && i2.length > this.maxDepth) return this.warn("TAR_ENTRY_ERROR", "path excessively deep", { entry: t2, path: e, depth: i2.length, maxDepth: this.maxDepth }), false;
27925
- if (!this[Es](t2, "path") || !this[Es](t2, "linkpath")) return false;
28097
+ if (!this[Rs](t2, "path") || !this[Rs](t2, "linkpath")) return false;
27926
28098
  if (t2.absolute = path15.isAbsolute(t2.path) ? f(path15.resolve(t2.path)) : f(path15.resolve(this.cwd, t2.path)), !this.preservePaths && typeof t2.absolute == "string" && t2.absolute.indexOf(this.cwd + "/") !== 0 && t2.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t2, path: f(t2.path), resolvedPath: t2.absolute, cwd: this.cwd }), false;
27927
28099
  if (t2.absolute === this.cwd && t2.type !== "Directory" && t2.type !== "GNUDumpDir") return false;
27928
28100
  if (this.win32) {
27929
28101
  let { root: r } = path15.win32.parse(String(t2.absolute));
27930
- t2.absolute = r + Xi(String(t2.absolute).slice(r.length));
28102
+ t2.absolute = r + ts(String(t2.absolute).slice(r.length));
27931
28103
  let { root: n2 } = path15.win32.parse(t2.path);
27932
- t2.path = n2 + Xi(t2.path.slice(n2.length));
28104
+ t2.path = n2 + ts(t2.path.slice(n2.length));
27933
28105
  }
27934
28106
  return true;
27935
28107
  }
27936
- [gr](t2) {
27937
- if (!this[Nr](t2)) return t2.resume();
27938
- switch (Mi.equal(typeof t2.absolute, "string"), t2.type) {
28108
+ [Dr](t2) {
28109
+ if (!this[Fr](t2)) return t2.resume();
28110
+ switch (zi.equal(typeof t2.absolute, "string"), t2.type) {
27939
28111
  case "Directory":
27940
28112
  case "GNUDumpDir":
27941
28113
  t2.mode && (t2.mode = t2.mode | 448);
@@ -27944,28 +28116,28 @@ var qt = class extends st2 {
27944
28116
  case "ContiguousFile":
27945
28117
  case "Link":
27946
28118
  case "SymbolicLink":
27947
- return this[ys](t2);
28119
+ return this[_s](t2);
27948
28120
  default:
27949
- return this[Lr](t2);
28121
+ return this[Cr](t2);
27950
28122
  }
27951
28123
  }
27952
28124
  [O2](t2, e) {
27953
- t2.name === "CwdError" ? this.emit("error", t2) : (this.warn("TAR_ENTRY_ERROR", t2, { entry: e }), this[Xt](), e.resume());
28125
+ t2.name === "CwdError" ? this.emit("error", t2) : (this.warn("TAR_ENTRY_ERROR", t2, { entry: e }), this[$t3](), e.resume());
27954
28126
  }
27955
- [St2](t2, e, i2) {
27956
- Er(f(t2), { 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 }, i2);
28127
+ [yt3](t2, e, i2) {
28128
+ gr(f(t2), { 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 }, i2);
27957
28129
  }
27958
- [Re2](t2) {
28130
+ [ge2](t2) {
27959
28131
  return this.forceChown || this.preserveOwner && (typeof t2.uid == "number" && t2.uid !== this.processUid || typeof t2.gid == "number" && t2.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
27960
28132
  }
27961
28133
  [be2](t2) {
27962
- return Dr(this.uid, t2.uid, this.processUid);
28134
+ return vr(this.uid, t2.uid, this.processUid);
27963
28135
  }
27964
28136
  [_e2](t2) {
27965
- return Dr(this.gid, t2.gid, this.processGid);
28137
+ return vr(this.gid, t2.gid, this.processGid);
27966
28138
  }
27967
- [bs](t2, e) {
27968
- let i2 = typeof t2.mode == "number" ? t2.mode & 4095 : this.fmode, r = new tt2(String(t2.absolute), { flags: cs(t2.size), mode: i2, autoClose: false });
28139
+ [Ts](t2, e) {
28140
+ let i2 = typeof t2.mode == "number" ? t2.mode & 4095 : this.fmode, r = new et2(String(t2.absolute), { flags: us(t2.size), mode: i2, autoClose: false });
27969
28141
  r.on("error", (a2) => {
27970
28142
  r.fd && fs.close(r.fd, () => {
27971
28143
  }), r.write = () => true, this[O2](a2, t2), e();
@@ -27977,7 +28149,7 @@ var qt = class extends st2 {
27977
28149
  return;
27978
28150
  }
27979
28151
  --n2 === 0 && r.fd !== void 0 && fs.close(r.fd, (l) => {
27980
- l ? this[O2](l, t2) : this[Xt](), e();
28152
+ l ? this[O2](l, t2) : this[$t3](), e();
27981
28153
  });
27982
28154
  };
27983
28155
  r.on("finish", () => {
@@ -27985,12 +28157,12 @@ var qt = class extends st2 {
27985
28157
  if (typeof l == "number" && t2.mtime && !this.noMtime) {
27986
28158
  n2++;
27987
28159
  let c3 = t2.atime || /* @__PURE__ */ new Date(), d = t2.mtime;
27988
- fs.futimes(l, c3, d, (S2) => S2 ? fs.utimes(a2, c3, d, (T2) => o2(T2 && S2)) : o2());
28160
+ fs.futimes(l, c3, d, (y2) => y2 ? fs.utimes(a2, c3, d, (T2) => o2(T2 && y2)) : o2());
27989
28161
  }
27990
- if (typeof l == "number" && this[Re2](t2)) {
28162
+ if (typeof l == "number" && this[ge2](t2)) {
27991
28163
  n2++;
27992
28164
  let c3 = this[be2](t2), d = this[_e2](t2);
27993
- typeof c3 == "number" && typeof d == "number" && fs.fchown(l, c3, d, (S2) => S2 ? fs.chown(a2, c3, d, (T2) => o2(T2 && S2)) : o2());
28165
+ typeof c3 == "number" && typeof d == "number" && fs.fchown(l, c3, d, (y2) => y2 ? fs.chown(a2, c3, d, (T2) => o2(T2 && y2)) : o2());
27994
28166
  }
27995
28167
  o2();
27996
28168
  });
@@ -27999,76 +28171,76 @@ var qt = class extends st2 {
27999
28171
  this[O2](a2, t2), e();
28000
28172
  }), t2.pipe(h3)), h3.pipe(r);
28001
28173
  }
28002
- [_s](t2, e) {
28174
+ [xs](t2, e) {
28003
28175
  let i2 = typeof t2.mode == "number" ? t2.mode & 4095 : this.dmode;
28004
- this[St2](String(t2.absolute), i2, (r) => {
28176
+ this[yt3](String(t2.absolute), i2, (r) => {
28005
28177
  if (r) {
28006
28178
  this[O2](r, t2), e();
28007
28179
  return;
28008
28180
  }
28009
28181
  let n2 = 1, o2 = () => {
28010
- --n2 === 0 && (e(), this[Xt](), t2.resume());
28182
+ --n2 === 0 && (e(), this[$t3](), t2.resume());
28011
28183
  };
28012
- t2.mtime && !this.noMtime && (n2++, fs.utimes(String(t2.absolute), t2.atime || /* @__PURE__ */ new Date(), t2.mtime, o2)), this[Re2](t2) && (n2++, fs.chown(String(t2.absolute), Number(this[be2](t2)), Number(this[_e2](t2)), o2)), o2();
28184
+ t2.mtime && !this.noMtime && (n2++, fs.utimes(String(t2.absolute), t2.atime || /* @__PURE__ */ new Date(), t2.mtime, o2)), this[ge2](t2) && (n2++, fs.chown(String(t2.absolute), Number(this[be2](t2)), Number(this[_e2](t2)), o2)), o2();
28013
28185
  });
28014
28186
  }
28015
- [Lr](t2) {
28187
+ [Cr](t2) {
28016
28188
  t2.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t2.type}`, { entry: t2 }), t2.resume();
28017
28189
  }
28018
- [Tr](t2, e) {
28190
+ [Ar](t2, e) {
28019
28191
  let i2 = f(path15.relative(this.cwd, path15.resolve(path15.dirname(String(t2.absolute)), String(t2.linkpath)))).split("/");
28020
- this[ye2](t2, this.cwd, i2, () => this[Si](t2, String(t2.linkpath), "symlink", e), (r) => {
28192
+ this[Re2](t2, this.cwd, i2, () => this[gi](t2, String(t2.linkpath), "symlink", e), (r) => {
28021
28193
  this[O2](r, t2), e();
28022
28194
  });
28023
28195
  }
28024
- [xr](t2, e) {
28196
+ [Ir](t2, e) {
28025
28197
  let i2 = f(path15.resolve(this.cwd, String(t2.linkpath))), r = f(String(t2.linkpath)).split("/");
28026
- this[ye2](t2, this.cwd, r, () => this[Si](t2, i2, "link", e), (n2) => {
28198
+ this[Re2](t2, this.cwd, r, () => this[gi](t2, i2, "link", e), (n2) => {
28027
28199
  this[O2](n2, t2), e();
28028
28200
  });
28029
28201
  }
28030
- [ye2](t2, e, i2, r, n2) {
28202
+ [Re2](t2, e, i2, r, n2) {
28031
28203
  let o2 = i2.shift();
28032
28204
  if (this.preservePaths || o2 === void 0) return r();
28033
28205
  let h3 = path15.resolve(e, o2);
28034
28206
  fs.lstat(h3, (a2, l) => {
28035
28207
  if (a2) return r();
28036
- if (l?.isSymbolicLink()) return n2(new wt2(h3, path15.resolve(h3, i2.join("/"))));
28037
- this[ye2](t2, h3, i2, r, n2);
28208
+ if (l?.isSymbolicLink()) return n2(new St2(h3, path15.resolve(h3, i2.join("/"))));
28209
+ this[Re2](t2, h3, i2, r, n2);
28038
28210
  });
28039
28211
  }
28040
- [Ar]() {
28041
- this[wi]++;
28212
+ [kr]() {
28213
+ this[Ri]++;
28042
28214
  }
28043
- [Xt]() {
28044
- this[wi]--, this[Ss]();
28215
+ [$t3]() {
28216
+ this[Ri]--, this[bs]();
28045
28217
  }
28046
- [gs](t2) {
28047
- this[Xt](), t2.resume();
28218
+ [Ls](t2) {
28219
+ this[$t3](), t2.resume();
28048
28220
  }
28049
- [Rs](t2, e) {
28050
- return t2.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Oe2;
28221
+ [Os](t2, e) {
28222
+ return t2.type === "File" && !this.unlink && e.isFile() && e.nlink <= 1 && !Te2;
28051
28223
  }
28052
- [ys](t2) {
28053
- this[Ar]();
28224
+ [_s](t2) {
28225
+ this[kr]();
28054
28226
  let e = [t2.path];
28055
- t2.linkpath && e.push(t2.linkpath), this.reservations.reserve(e, (i2) => this[Or](t2, i2));
28227
+ t2.linkpath && e.push(t2.linkpath), this.reservations.reserve(e, (i2) => this[Nr](t2, i2));
28056
28228
  }
28057
- [Or](t2, e) {
28229
+ [Nr](t2, e) {
28058
28230
  let i2 = (h3) => {
28059
28231
  e(h3);
28060
28232
  }, r = () => {
28061
- this[St2](this.cwd, this.dmode, (h3) => {
28233
+ this[yt3](this.cwd, this.dmode, (h3) => {
28062
28234
  if (h3) {
28063
28235
  this[O2](h3, t2), i2();
28064
28236
  return;
28065
28237
  }
28066
- this[ge2] = true, n2();
28238
+ this[Oe2] = true, n2();
28067
28239
  });
28068
28240
  }, n2 = () => {
28069
28241
  if (t2.absolute !== this.cwd) {
28070
28242
  let h3 = f(path15.dirname(String(t2.absolute)));
28071
- if (h3 !== this.cwd) return this[St2](h3, this.dmode, (a2) => {
28243
+ if (h3 !== this.cwd) return this[yt3](h3, this.dmode, (a2) => {
28072
28244
  if (a2) {
28073
28245
  this[O2](a2, t2), i2();
28074
28246
  return;
@@ -28080,10 +28252,10 @@ var qt = class extends st2 {
28080
28252
  }, o2 = () => {
28081
28253
  fs.lstat(String(t2.absolute), (h3, a2) => {
28082
28254
  if (a2 && (this.keep || this.newer && a2.mtime > (t2.mtime ?? a2.mtime))) {
28083
- this[gs](t2), i2();
28255
+ this[Ls](t2), i2();
28084
28256
  return;
28085
28257
  }
28086
- if (h3 || this[Rs](t2, a2)) return this[P2](null, t2, i2);
28258
+ if (h3 || this[Os](t2, a2)) return this[P2](null, t2, i2);
28087
28259
  if (a2.isDirectory()) {
28088
28260
  if (t2.type === "Directory") {
28089
28261
  let l = this.chmod && t2.mode && (a2.mode & 4095) !== t2.mode, c3 = (d) => this[P2](d ?? null, t2, i2);
@@ -28092,10 +28264,10 @@ var qt = class extends st2 {
28092
28264
  if (t2.absolute !== this.cwd) return fs.rmdir(String(t2.absolute), (l) => this[P2](l ?? null, t2, i2));
28093
28265
  }
28094
28266
  if (t2.absolute === this.cwd) return this[P2](null, t2, i2);
28095
- oo(String(t2.absolute), (l) => this[P2](l ?? null, t2, i2));
28267
+ uo(String(t2.absolute), (l) => this[P2](l ?? null, t2, i2));
28096
28268
  });
28097
28269
  };
28098
- this[ge2] ? n2() : r();
28270
+ this[Oe2] ? n2() : r();
28099
28271
  }
28100
28272
  [P2](t2, e, i2) {
28101
28273
  if (t2) {
@@ -28106,65 +28278,65 @@ var qt = class extends st2 {
28106
28278
  case "File":
28107
28279
  case "OldFile":
28108
28280
  case "ContiguousFile":
28109
- return this[bs](e, i2);
28281
+ return this[Ts](e, i2);
28110
28282
  case "Link":
28111
- return this[xr](e, i2);
28283
+ return this[Ir](e, i2);
28112
28284
  case "SymbolicLink":
28113
- return this[Tr](e, i2);
28285
+ return this[Ar](e, i2);
28114
28286
  case "Directory":
28115
28287
  case "GNUDumpDir":
28116
- return this[_s](e, i2);
28288
+ return this[xs](e, i2);
28117
28289
  }
28118
28290
  }
28119
- [Si](t2, e, i2, r) {
28291
+ [gi](t2, e, i2, r) {
28120
28292
  fs[i2](e, String(t2.absolute), (n2) => {
28121
- n2 ? this[O2](n2, t2) : (this[Xt](), t2.resume()), r();
28293
+ n2 ? this[O2](n2, t2) : (this[$t3](), t2.resume()), r();
28122
28294
  });
28123
28295
  }
28124
28296
  };
28125
- var Se2 = (s3) => {
28297
+ var ye2 = (s3) => {
28126
28298
  try {
28127
28299
  return [null, s3()];
28128
28300
  } catch (t2) {
28129
28301
  return [t2, null];
28130
28302
  }
28131
28303
  };
28132
- var Te2 = class extends qt {
28304
+ var xe2 = class extends Xt {
28133
28305
  sync = true;
28134
28306
  [P2](t2, e) {
28135
28307
  return super[P2](t2, e, () => {
28136
28308
  });
28137
28309
  }
28138
- [ys](t2) {
28139
- if (!this[ge2]) {
28140
- let n2 = this[St2](this.cwd, this.dmode);
28310
+ [_s](t2) {
28311
+ if (!this[Oe2]) {
28312
+ let n2 = this[yt3](this.cwd, this.dmode);
28141
28313
  if (n2) return this[O2](n2, t2);
28142
- this[ge2] = true;
28314
+ this[Oe2] = true;
28143
28315
  }
28144
28316
  if (t2.absolute !== this.cwd) {
28145
28317
  let n2 = f(path15.dirname(String(t2.absolute)));
28146
28318
  if (n2 !== this.cwd) {
28147
- let o2 = this[St2](n2, this.dmode);
28319
+ let o2 = this[yt3](n2, this.dmode);
28148
28320
  if (o2) return this[O2](o2, t2);
28149
28321
  }
28150
28322
  }
28151
- let [e, i2] = Se2(() => fs.lstatSync(String(t2.absolute)));
28152
- if (i2 && (this.keep || this.newer && i2.mtime > (t2.mtime ?? i2.mtime))) return this[gs](t2);
28153
- if (e || this[Rs](t2, i2)) return this[P2](null, t2);
28323
+ let [e, i2] = ye2(() => fs.lstatSync(String(t2.absolute)));
28324
+ if (i2 && (this.keep || this.newer && i2.mtime > (t2.mtime ?? i2.mtime))) return this[Ls](t2);
28325
+ if (e || this[Os](t2, i2)) return this[P2](null, t2);
28154
28326
  if (i2.isDirectory()) {
28155
28327
  if (t2.type === "Directory") {
28156
- let o2 = this.chmod && t2.mode && (i2.mode & 4095) !== t2.mode, [h3] = o2 ? Se2(() => {
28328
+ let o2 = this.chmod && t2.mode && (i2.mode & 4095) !== t2.mode, [h3] = o2 ? ye2(() => {
28157
28329
  fs.chmodSync(String(t2.absolute), Number(t2.mode));
28158
28330
  }) : [];
28159
28331
  return this[P2](h3, t2);
28160
28332
  }
28161
- let [n2] = Se2(() => fs.rmdirSync(String(t2.absolute)));
28333
+ let [n2] = ye2(() => fs.rmdirSync(String(t2.absolute)));
28162
28334
  this[P2](n2, t2);
28163
28335
  }
28164
- let [r] = t2.absolute === this.cwd ? [] : Se2(() => ho(String(t2.absolute)));
28336
+ let [r] = t2.absolute === this.cwd ? [] : ye2(() => po(String(t2.absolute)));
28165
28337
  this[P2](r, t2);
28166
28338
  }
28167
- [bs](t2, e) {
28339
+ [Ts](t2, e) {
28168
28340
  let i2 = typeof t2.mode == "number" ? t2.mode & 4095 : this.fmode, r = (h3) => {
28169
28341
  let a2;
28170
28342
  try {
@@ -28175,7 +28347,7 @@ var Te2 = class extends qt {
28175
28347
  (h3 || a2) && this[O2](h3 || a2, t2), e();
28176
28348
  }, n2;
28177
28349
  try {
28178
- n2 = fs.openSync(String(t2.absolute), cs(t2.size), i2);
28350
+ n2 = fs.openSync(String(t2.absolute), us(t2.size), i2);
28179
28351
  } catch (h3) {
28180
28352
  return r(h3);
28181
28353
  }
@@ -28200,7 +28372,7 @@ var Te2 = class extends qt {
28200
28372
  }
28201
28373
  }
28202
28374
  }
28203
- if (this[Re2](t2)) {
28375
+ if (this[ge2](t2)) {
28204
28376
  let a2 = this[be2](t2), l = this[_e2](t2);
28205
28377
  try {
28206
28378
  fs.fchownSync(n2, Number(a2), Number(l));
@@ -28215,8 +28387,8 @@ var Te2 = class extends qt {
28215
28387
  r(h3);
28216
28388
  });
28217
28389
  }
28218
- [_s](t2, e) {
28219
- let i2 = typeof t2.mode == "number" ? t2.mode & 4095 : this.dmode, r = this[St2](String(t2.absolute), i2);
28390
+ [xs](t2, e) {
28391
+ let i2 = typeof t2.mode == "number" ? t2.mode & 4095 : this.dmode, r = this[yt3](String(t2.absolute), i2);
28220
28392
  if (r) {
28221
28393
  this[O2](r, t2), e();
28222
28394
  return;
@@ -28225,31 +28397,31 @@ var Te2 = class extends qt {
28225
28397
  fs.utimesSync(String(t2.absolute), t2.atime || /* @__PURE__ */ new Date(), t2.mtime);
28226
28398
  } catch {
28227
28399
  }
28228
- if (this[Re2](t2)) try {
28400
+ if (this[ge2](t2)) try {
28229
28401
  fs.chownSync(String(t2.absolute), Number(this[be2](t2)), Number(this[_e2](t2)));
28230
28402
  } catch {
28231
28403
  }
28232
28404
  e(), t2.resume();
28233
28405
  }
28234
- [St2](t2, e) {
28406
+ [yt3](t2, e) {
28235
28407
  try {
28236
- return Sr(f(t2), { 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 });
28408
+ return _r(f(t2), { 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 });
28237
28409
  } catch (i2) {
28238
28410
  return i2;
28239
28411
  }
28240
28412
  }
28241
- [ye2](t2, e, i2, r, n2) {
28413
+ [Re2](t2, e, i2, r, n2) {
28242
28414
  if (this.preservePaths || i2.length === 0) return r();
28243
28415
  let o2 = e;
28244
28416
  for (let h3 of i2) {
28245
28417
  o2 = path15.resolve(o2, h3);
28246
- let [a2, l] = Se2(() => fs.lstatSync(o2));
28418
+ let [a2, l] = ye2(() => fs.lstatSync(o2));
28247
28419
  if (a2) return r();
28248
- if (l.isSymbolicLink()) return n2(new wt2(o2, path15.resolve(e, i2.join("/"))));
28420
+ if (l.isSymbolicLink()) return n2(new St2(o2, path15.resolve(e, i2.join("/"))));
28249
28421
  }
28250
28422
  r();
28251
28423
  }
28252
- [Si](t2, e, i2, r) {
28424
+ [gi](t2, e, i2, r) {
28253
28425
  let n2 = `${i2}Sync`;
28254
28426
  try {
28255
28427
  fs[n2](e, String(t2.absolute)), r(), t2.resume();
@@ -28258,12 +28430,12 @@ var Te2 = class extends qt {
28258
28430
  }
28259
28431
  }
28260
28432
  };
28261
- var ao = (s3) => {
28262
- let t2 = new Te2(s3), e = s3.file, i2 = fs.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
28263
- new Me(e, { readSize: r, size: i2.size }).pipe(t2);
28433
+ var Eo = (s3) => {
28434
+ let t2 = new xe2(s3), e = s3.file, i2 = fs.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
28435
+ new Be(e, { readSize: r, size: i2.size }).pipe(t2);
28264
28436
  };
28265
- var lo = (s3, t2) => {
28266
- let e = new qt(s3), i2 = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
28437
+ var wo = (s3, t2) => {
28438
+ let e = new Xt(s3), i2 = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
28267
28439
  return new Promise((o2, h3) => {
28268
28440
  e.on("error", h3), e.on("close", o2), fs.stat(r, (a2, l) => {
28269
28441
  if (a2) h3(a2);
@@ -28274,10 +28446,10 @@ var lo = (s3, t2) => {
28274
28446
  });
28275
28447
  });
28276
28448
  };
28277
- var co = K2(ao, lo, (s3) => new Te2(s3), (s3) => new qt(s3), (s3, t2) => {
28278
- t2?.length && Ki(s3, t2);
28449
+ var So = K2(Eo, wo, (s3) => new xe2(s3), (s3) => new Xt(s3), (s3, t2) => {
28450
+ t2?.length && Qi(s3, t2);
28279
28451
  });
28280
- var fo = (s3, t2) => {
28452
+ var yo = (s3, t2) => {
28281
28453
  let e = new kt3(s3), i2 = true, r, n2;
28282
28454
  try {
28283
28455
  try {
@@ -28298,7 +28470,7 @@ var fo = (s3, t2) => {
28298
28470
  if (n2 + l + 512 > o2.size) break;
28299
28471
  n2 += l, s3.mtimeCache && a2.mtime && s3.mtimeCache.set(String(a2.path), a2.mtime);
28300
28472
  }
28301
- i2 = false, uo(s3, e, n2, r, t2);
28473
+ i2 = false, Ro(s3, e, n2, r, t2);
28302
28474
  } finally {
28303
28475
  if (i2) try {
28304
28476
  fs.closeSync(r);
@@ -28306,69 +28478,69 @@ var fo = (s3, t2) => {
28306
28478
  }
28307
28479
  }
28308
28480
  };
28309
- var uo = (s3, t2, e, i2, r) => {
28481
+ var Ro = (s3, t2, e, i2, r) => {
28310
28482
  let n2 = new Wt3(s3.file, { fd: i2, start: e });
28311
- t2.pipe(n2), po(t2, r);
28483
+ t2.pipe(n2), bo(t2, r);
28312
28484
  };
28313
- var mo = (s3, t2) => {
28485
+ var go = (s3, t2) => {
28314
28486
  t2 = Array.from(t2);
28315
- let e = new Et3(s3), i2 = (n2, o2, h3) => {
28316
- let a2 = (T2, N3) => {
28317
- T2 ? fs.close(n2, (E) => h3(T2)) : h3(null, N3);
28487
+ let e = new wt2(s3), i2 = (n2, o2, h3) => {
28488
+ let a2 = (T2, D3) => {
28489
+ T2 ? fs.close(n2, (E) => h3(T2)) : h3(null, D3);
28318
28490
  }, l = 0;
28319
28491
  if (o2 === 0) return a2(null, 0);
28320
- let c3 = 0, d = Buffer.alloc(512), S2 = (T2, N3) => {
28321
- if (T2 || N3 === void 0) return a2(T2);
28322
- if (c3 += N3, c3 < 512 && N3) return fs.read(n2, d, c3, d.length - c3, l + c3, S2);
28492
+ let c3 = 0, d = Buffer.alloc(512), y2 = (T2, D3) => {
28493
+ if (T2 || D3 === void 0) return a2(T2);
28494
+ if (c3 += D3, c3 < 512 && D3) return fs.read(n2, d, c3, d.length - c3, l + c3, y2);
28323
28495
  if (l === 0 && d[0] === 31 && d[1] === 139) return a2(new Error("cannot append to compressed archives"));
28324
28496
  if (c3 < 512) return a2(null, l);
28325
28497
  let E = new F(d);
28326
28498
  if (!E.cksumValid) return a2(null, l);
28327
28499
  let x3 = 512 * Math.ceil((E.size ?? 0) / 512);
28328
28500
  if (l + x3 + 512 > o2 || (l += x3 + 512, l >= o2)) return a2(null, l);
28329
- s3.mtimeCache && E.mtime && s3.mtimeCache.set(String(E.path), E.mtime), c3 = 0, fs.read(n2, d, 0, 512, l, S2);
28501
+ s3.mtimeCache && E.mtime && s3.mtimeCache.set(String(E.path), E.mtime), c3 = 0, fs.read(n2, d, 0, 512, l, y2);
28330
28502
  };
28331
- fs.read(n2, d, 0, 512, l, S2);
28503
+ fs.read(n2, d, 0, 512, l, y2);
28332
28504
  };
28333
28505
  return new Promise((n2, o2) => {
28334
28506
  e.on("error", o2);
28335
28507
  let h3 = "r+", a2 = (l, c3) => {
28336
28508
  if (l && l.code === "ENOENT" && h3 === "r+") return h3 = "w+", fs.open(s3.file, h3, a2);
28337
28509
  if (l || !c3) return o2(l);
28338
- fs.fstat(c3, (d, S2) => {
28510
+ fs.fstat(c3, (d, y2) => {
28339
28511
  if (d) return fs.close(c3, () => o2(d));
28340
- i2(c3, S2.size, (T2, N3) => {
28512
+ i2(c3, y2.size, (T2, D3) => {
28341
28513
  if (T2) return o2(T2);
28342
- let E = new tt2(s3.file, { fd: c3, start: N3 });
28343
- e.pipe(E), E.on("error", o2), E.on("close", n2), Eo(e, t2);
28514
+ let E = new et2(s3.file, { fd: c3, start: D3 });
28515
+ e.pipe(E), E.on("error", o2), E.on("close", n2), _o(e, t2);
28344
28516
  });
28345
28517
  });
28346
28518
  };
28347
28519
  fs.open(s3.file, h3, a2);
28348
28520
  });
28349
28521
  };
28350
- var po = (s3, t2) => {
28522
+ var bo = (s3, t2) => {
28351
28523
  t2.forEach((e) => {
28352
- e.charAt(0) === "@" ? It3({ file: path15.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i2) => s3.add(i2) }) : s3.add(e);
28524
+ e.charAt(0) === "@" ? Ct3({ file: path15.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i2) => s3.add(i2) }) : s3.add(e);
28353
28525
  }), s3.end();
28354
28526
  };
28355
- var Eo = async (s3, t2) => {
28356
- for (let e of t2) e.charAt(0) === "@" ? await It3({ file: path15.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i2) => s3.add(i2) }) : s3.add(e);
28527
+ var _o = async (s3, t2) => {
28528
+ for (let e of t2) e.charAt(0) === "@" ? await Ct3({ file: path15.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i2) => s3.add(i2) }) : s3.add(e);
28357
28529
  s3.end();
28358
28530
  };
28359
- var vt3 = K2(fo, mo, () => {
28531
+ var vt3 = K2(yo, go, () => {
28360
28532
  throw new TypeError("file is required");
28361
28533
  }, () => {
28362
28534
  throw new TypeError("file is required");
28363
28535
  }, (s3, t2) => {
28364
- if (!Fs(s3)) throw new TypeError("file is required");
28536
+ if (!Bs(s3)) throw new TypeError("file is required");
28365
28537
  if (s3.gzip || s3.brotli || s3.zstd || s3.file.endsWith(".br") || s3.file.endsWith(".tbr")) throw new TypeError("cannot append to compressed archives");
28366
28538
  if (!t2?.length) throw new TypeError("no paths specified to add/replace");
28367
28539
  });
28368
28540
  K2(vt3.syncFile, vt3.asyncFile, vt3.syncNoFile, vt3.asyncNoFile, (s3, t2 = []) => {
28369
- vt3.validate?.(s3, t2), So(s3);
28541
+ vt3.validate?.(s3, t2), To(s3);
28370
28542
  });
28371
- var So = (s3) => {
28543
+ var To = (s3) => {
28372
28544
  let t2 = s3.filter;
28373
28545
  s3.mtimeCache || (s3.mtimeCache = /* @__PURE__ */ new Map()), s3.filter = t2 ? (e, i2) => t2(e, i2) && !((s3.mtimeCache?.get(e) ?? i2.mtime ?? 0) > (i2.mtime ?? 0)) : (e, i2) => !((s3.mtimeCache?.get(e) ?? i2.mtime ?? 0) > (i2.mtime ?? 0));
28374
28546
  };
@@ -28403,7 +28575,7 @@ async function downloadTemplate(templateName, branch = "main") {
28403
28575
  }
28404
28576
  await pipeline(
28405
28577
  Readable.from(response.body),
28406
- co({
28578
+ So({
28407
28579
  cwd: tmpDir,
28408
28580
  filter: (p2) => p2.startsWith(baseFilter) || p2.startsWith(templateFilter),
28409
28581
  // Strip the "{repo}-{branch}/" prefix so templates/ is at the root
@@ -29124,5 +29296,5 @@ async function createNextly(options = {}) {
29124
29296
  */
29125
29297
 
29126
29298
  export { __commonJS, __require, __toESM, capture, createNextly, init, resolveProjectArg, shutdown, validateProjectName };
29127
- //# sourceMappingURL=chunk-C5CWOU22.mjs.map
29128
- //# sourceMappingURL=chunk-C5CWOU22.mjs.map
29299
+ //# sourceMappingURL=chunk-DDQB5KOQ.mjs.map
29300
+ //# sourceMappingURL=chunk-DDQB5KOQ.mjs.map