sv 0.9.6 → 0.9.7

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.
@@ -1,10 +1,10 @@
1
- import { __commonJS$1 as __commonJS, __require, __toESM$1 as __toESM, addPnpmBuildDependencies, be, create } from "./package-manager-DO5R9a6p.js";
2
- import fs from "node:fs";
1
+ import { __commonJS, __require, __toESM, addPnpmBuildDependencies, be, create, ve } from "../create-CyyvJXoi.js";
3
2
  import path from "node:path";
3
+ import fs from "node:fs";
4
4
  import process$1 from "node:process";
5
5
 
6
- //#region node_modules/.pnpm/degit@2.8.4/node_modules/degit/dist/index-688c5d50.js
7
- var require_index_688c5d50 = __commonJS({ "node_modules/.pnpm/degit@2.8.4/node_modules/degit/dist/index-688c5d50.js"(exports) {
6
+ //#region ../../node_modules/.pnpm/degit@2.8.4/node_modules/degit/dist/index-688c5d50.js
7
+ var require_index_688c5d50 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/degit@2.8.4/node_modules/degit/dist/index-688c5d50.js": ((exports) => {
8
8
  var fs$1 = __require("fs");
9
9
  var path$1 = __require("path");
10
10
  var Events = __require("events");
@@ -26,24 +26,24 @@ var require_index_688c5d50 = __commonJS({ "node_modules/.pnpm/degit@2.8.4/node_m
26
26
  function _interopDefaultLegacy(e) {
27
27
  return e && typeof e === "object" && "default" in e ? e : { "default": e };
28
28
  }
29
- var fs__default = /*#__PURE__*/ _interopDefaultLegacy(fs$1);
30
- var path__default = /*#__PURE__*/ _interopDefaultLegacy(path$1);
31
- var Events__default = /*#__PURE__*/ _interopDefaultLegacy(Events);
32
- var Stream__default = /*#__PURE__*/ _interopDefaultLegacy(Stream$1$1);
33
- var require$$0__default = /*#__PURE__*/ _interopDefaultLegacy(require$$0);
34
- var assert__default = /*#__PURE__*/ _interopDefaultLegacy(assert);
35
- var require$$0__default$1 = /*#__PURE__*/ _interopDefaultLegacy(require$$0$1);
36
- var realZlib__default = /*#__PURE__*/ _interopDefaultLegacy(realZlib);
37
- var util__default = /*#__PURE__*/ _interopDefaultLegacy(util$1);
38
- var crypto__default = /*#__PURE__*/ _interopDefaultLegacy(crypto);
39
- var os__default = /*#__PURE__*/ _interopDefaultLegacy(os);
40
- var tty__default = /*#__PURE__*/ _interopDefaultLegacy(tty);
41
- var constants__default = /*#__PURE__*/ _interopDefaultLegacy(constants$1);
42
- var https__default = /*#__PURE__*/ _interopDefaultLegacy(https);
43
- var child_process__default = /*#__PURE__*/ _interopDefaultLegacy(child_process);
44
- var require$$2__default = /*#__PURE__*/ _interopDefaultLegacy(require$$2);
45
- var require$$0__default$2 = /*#__PURE__*/ _interopDefaultLegacy(require$$0$2);
46
- var require$$1__default = /*#__PURE__*/ _interopDefaultLegacy(require$$1);
29
+ var fs__default = /* @__PURE__ */ _interopDefaultLegacy(fs$1);
30
+ var path__default = /* @__PURE__ */ _interopDefaultLegacy(path$1);
31
+ var Events__default = /* @__PURE__ */ _interopDefaultLegacy(Events);
32
+ var Stream__default = /* @__PURE__ */ _interopDefaultLegacy(Stream$1$1);
33
+ var require$$0__default = /* @__PURE__ */ _interopDefaultLegacy(require$$0);
34
+ var assert__default = /* @__PURE__ */ _interopDefaultLegacy(assert);
35
+ var require$$0__default$1 = /* @__PURE__ */ _interopDefaultLegacy(require$$0$1);
36
+ var realZlib__default = /* @__PURE__ */ _interopDefaultLegacy(realZlib);
37
+ var util__default = /* @__PURE__ */ _interopDefaultLegacy(util$1);
38
+ var crypto__default = /* @__PURE__ */ _interopDefaultLegacy(crypto);
39
+ var os__default = /* @__PURE__ */ _interopDefaultLegacy(os);
40
+ var tty__default = /* @__PURE__ */ _interopDefaultLegacy(tty);
41
+ var constants__default = /* @__PURE__ */ _interopDefaultLegacy(constants$1);
42
+ var https__default = /* @__PURE__ */ _interopDefaultLegacy(https);
43
+ var child_process__default = /* @__PURE__ */ _interopDefaultLegacy(child_process);
44
+ var require$$2__default = /* @__PURE__ */ _interopDefaultLegacy(require$$2);
45
+ var require$$0__default$2 = /* @__PURE__ */ _interopDefaultLegacy(require$$0$2);
46
+ var require$$1__default = /* @__PURE__ */ _interopDefaultLegacy(require$$1);
47
47
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
48
48
  function createCommonjsModule(fn) {
49
49
  var module$1 = { exports: {} };
@@ -88,7 +88,7 @@ var require_index_688c5d50 = __commonJS({ "node_modules/.pnpm/degit@2.8.4/node_m
88
88
  if (list$1 && typeof list$1.forEach === "function") list$1.forEach(function(item) {
89
89
  self$1.push(item);
90
90
  });
91
- else if (arguments.length > 0) for (var i = 0, l = arguments.length; i < l; i++) self$1.push(arguments[i]);
91
+ else if (arguments.length > 0) for (var i = 0, l = arguments.length; i < l; i++) self$1.push(arguments[i]);
92
92
  return self$1;
93
93
  }
94
94
  Yallist.prototype.removeNode = function(node$1) {
@@ -136,20 +136,20 @@ else if (arguments.length > 0) for (var i = 0, l = arguments.length; i < l; i++)
136
136
  return this.length;
137
137
  };
138
138
  Yallist.prototype.pop = function() {
139
- if (!this.tail) return undefined;
139
+ if (!this.tail) return;
140
140
  var res = this.tail.value;
141
141
  this.tail = this.tail.prev;
142
142
  if (this.tail) this.tail.next = null;
143
- else this.head = null;
143
+ else this.head = null;
144
144
  this.length--;
145
145
  return res;
146
146
  };
147
147
  Yallist.prototype.shift = function() {
148
- if (!this.head) return undefined;
148
+ if (!this.head) return;
149
149
  var res = this.head.value;
150
150
  this.head = this.head.next;
151
151
  if (this.head) this.head.prev = null;
152
- else this.tail = null;
152
+ else this.tail = null;
153
153
  this.length--;
154
154
  return res;
155
155
  };
@@ -197,7 +197,7 @@ else this.tail = null;
197
197
  var acc;
198
198
  var walker = this.head;
199
199
  if (arguments.length > 1) acc = initial;
200
- else if (this.head) {
200
+ else if (this.head) {
201
201
  walker = this.head.next;
202
202
  acc = this.head.value;
203
203
  } else throw new TypeError("Reduce of empty list with no initial value");
@@ -211,7 +211,7 @@ else if (this.head) {
211
211
  var acc;
212
212
  var walker = this.tail;
213
213
  if (arguments.length > 1) acc = initial;
214
- else if (this.tail) {
214
+ else if (this.tail) {
215
215
  walker = this.tail.prev;
216
216
  acc = this.tail.value;
217
217
  } else throw new TypeError("Reduce of empty list with no initial value");
@@ -356,7 +356,7 @@ else if (this.tail) {
356
356
  this.buffer = new yallist();
357
357
  this[OBJECTMODE] = options && options.objectMode || false;
358
358
  if (this[OBJECTMODE]) this[ENCODING] = null;
359
- else this[ENCODING] = options && options.encoding || null;
359
+ else this[ENCODING] = options && options.encoding || null;
360
360
  if (this[ENCODING] === "buffer") this[ENCODING] = null;
361
361
  this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null;
362
362
  this[EOF$1] = false;
@@ -395,15 +395,15 @@ else this[ENCODING] = options && options.encoding || null;
395
395
  write(chunk, encoding, cb) {
396
396
  if (this[EOF$1]) throw new Error("write after end");
397
397
  if (this[DESTROYED]) {
398
- this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" }));
398
+ this.emit("error", Object.assign(/* @__PURE__ */ new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" }));
399
399
  return true;
400
400
  }
401
401
  if (typeof encoding === "function") cb = encoding, encoding = "utf8";
402
402
  if (!encoding) encoding = "utf8";
403
403
  if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {
404
404
  if (isArrayBufferView(chunk)) chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength);
405
- else if (isArrayBuffer(chunk)) chunk = Buffer.from(chunk);
406
- else if (typeof chunk !== "string") this.objectMode = true;
405
+ else if (isArrayBuffer(chunk)) chunk = Buffer.from(chunk);
406
+ else if (typeof chunk !== "string") this.objectMode = true;
407
407
  }
408
408
  if (!this.objectMode && !chunk.length) {
409
409
  if (this[BUFFERLENGTH] !== 0) this.emit("readable");
@@ -426,7 +426,7 @@ else if (typeof chunk !== "string") this.objectMode = true;
426
426
  if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) return null;
427
427
  if (this[OBJECTMODE]) n = null;
428
428
  if (this.buffer.length > 1 && !this[OBJECTMODE]) if (this.encoding) this.buffer = new yallist([Array.from(this.buffer).join("")]);
429
- else this.buffer = new yallist([Buffer.concat(Array.from(this.buffer), this[BUFFERLENGTH])]);
429
+ else this.buffer = new yallist([Buffer.concat(Array.from(this.buffer), this[BUFFERLENGTH])]);
430
430
  return this[READ$1](n || null, this.buffer.head.value);
431
431
  } finally {
432
432
  this[MAYBE_EMIT_END]();
@@ -434,7 +434,7 @@ else this.buffer = new yallist([Buffer.concat(Array.from(this.buffer), this[BUFF
434
434
  }
435
435
  [READ$1](n, chunk) {
436
436
  if (n === chunk.length || n === null) this[BUFFERSHIFT]();
437
- else {
437
+ else {
438
438
  this.buffer.head.value = chunk.slice(n);
439
439
  chunk = chunk.slice(0, n);
440
440
  this[BUFFERLENGTH] -= n;
@@ -459,8 +459,8 @@ else {
459
459
  this[FLOWING] = true;
460
460
  this.emit("resume");
461
461
  if (this.buffer.length) this[FLUSH]();
462
- else if (this[EOF$1]) this[MAYBE_EMIT_END]();
463
- else this.emit("drain");
462
+ else if (this[EOF$1]) this[MAYBE_EMIT_END]();
463
+ else this.emit("drain");
464
464
  }
465
465
  resume() {
466
466
  return this[RESUME]();
@@ -480,16 +480,17 @@ else this.emit("drain");
480
480
  }
481
481
  [BUFFERPUSH](chunk) {
482
482
  if (this[OBJECTMODE]) this[BUFFERLENGTH] += 1;
483
- else this[BUFFERLENGTH] += chunk.length;
483
+ else this[BUFFERLENGTH] += chunk.length;
484
484
  return this.buffer.push(chunk);
485
485
  }
486
486
  [BUFFERSHIFT]() {
487
487
  if (this.buffer.length) if (this[OBJECTMODE]) this[BUFFERLENGTH] -= 1;
488
- else this[BUFFERLENGTH] -= this.buffer.head.value.length;
488
+ else this[BUFFERLENGTH] -= this.buffer.head.value.length;
489
489
  return this.buffer.shift();
490
490
  }
491
491
  [FLUSH](noDrain) {
492
- do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]()));
492
+ do ;
493
+ while (this[FLUSHCHUNK](this[BUFFERSHIFT]()));
493
494
  if (!noDrain && !this.buffer.length && !this[EOF$1]) this.emit("drain");
494
495
  }
495
496
  [FLUSHCHUNK](chunk) {
@@ -500,7 +501,7 @@ else this[BUFFERLENGTH] -= this.buffer.head.value.length;
500
501
  const ended = this[EMITTED_END];
501
502
  opts = opts || {};
502
503
  if (dest === process.stdout || dest === process.stderr) opts.end = false;
503
- else opts.end = opts.end !== false;
504
+ else opts.end = opts.end !== false;
504
505
  const p = {
505
506
  dest,
506
507
  opts,
@@ -520,7 +521,7 @@ else opts.end = opts.end !== false;
520
521
  return super.on(ev, fn);
521
522
  } finally {
522
523
  if (ev === "data" && !this.pipes.length && !this.flowing) this[RESUME]();
523
- else if (isEndish(ev) && this[EMITTED_END]) {
524
+ else if (isEndish(ev) && this[EMITTED_END]) {
524
525
  super.emit(ev);
525
526
  this.removeAllListeners(ev);
526
527
  }
@@ -541,7 +542,7 @@ else if (isEndish(ev) && this[EMITTED_END]) {
541
542
  }
542
543
  emit(ev, data) {
543
544
  if (ev !== "error" && ev !== "close" && ev !== DESTROYED && this[DESTROYED]) return;
544
- else if (ev === "data") {
545
+ else if (ev === "data") {
545
546
  if (!data) return;
546
547
  if (this.pipes.length) this.pipes.forEach((p) => p.dest.write(data) === false && this.pause());
547
548
  } else if (ev === "end") {
@@ -571,7 +572,7 @@ else if (ev === "data") {
571
572
  return super.emit.apply(this, args);
572
573
  } finally {
573
574
  if (!isEndish(ev)) this[MAYBE_EMIT_END]();
574
- else this.removeAllListeners(ev);
575
+ else this.removeAllListeners(ev);
575
576
  }
576
577
  }
577
578
  collect() {
@@ -585,11 +586,11 @@ else this.removeAllListeners(ev);
585
586
  return p.then(() => buf);
586
587
  }
587
588
  concat() {
588
- return this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this.collect().then((buf) => this[OBJECTMODE] ? Promise.reject(new Error("cannot concat in objectMode")) : this[ENCODING] ? buf.join("") : Buffer.concat(buf, buf.dataLength));
589
+ return this[OBJECTMODE] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this.collect().then((buf) => this[OBJECTMODE] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this[ENCODING] ? buf.join("") : Buffer.concat(buf, buf.dataLength));
589
590
  }
590
591
  promise() {
591
592
  return new Promise((resolve$2, reject) => {
592
- this.on(DESTROYED, () => reject(new Error("stream destroyed")));
593
+ this.on(DESTROYED, () => reject(/* @__PURE__ */ new Error("stream destroyed")));
593
594
  this.on("end", () => resolve$2());
594
595
  this.on("error", (er) => reject(er));
595
596
  });
@@ -623,7 +624,7 @@ else this.removeAllListeners(ev);
623
624
  this.removeListener("data", ondata);
624
625
  resolve$2({ done: true });
625
626
  };
626
- const ondestroy = () => onerr(new Error("stream destroyed"));
627
+ const ondestroy = () => onerr(/* @__PURE__ */ new Error("stream destroyed"));
627
628
  return new Promise((res$1, rej) => {
628
629
  reject = rej;
629
630
  resolve$2 = res$1;
@@ -638,10 +639,9 @@ else this.removeAllListeners(ev);
638
639
  [ITERATOR]() {
639
640
  const next = () => {
640
641
  const value = this.read();
641
- const done = value === null;
642
642
  return {
643
643
  value,
644
- done
644
+ done: value === null
645
645
  };
646
646
  };
647
647
  return { next };
@@ -649,7 +649,7 @@ else this.removeAllListeners(ev);
649
649
  destroy(er) {
650
650
  if (this[DESTROYED]) {
651
651
  if (er) this.emit("error", er);
652
- else this.emit(DESTROYED);
652
+ else this.emit(DESTROYED);
653
653
  return this;
654
654
  }
655
655
  this[DESTROYED] = true;
@@ -657,15 +657,16 @@ else this.emit(DESTROYED);
657
657
  this[BUFFERLENGTH] = 0;
658
658
  if (typeof this.close === "function" && !this[CLOSED]) this.close();
659
659
  if (er) this.emit("error", er);
660
- else this.emit(DESTROYED);
660
+ else this.emit(DESTROYED);
661
661
  return this;
662
662
  }
663
663
  static isStream(s$1) {
664
664
  return !!s$1 && (s$1 instanceof Minipass || s$1 instanceof Stream__default["default"] || s$1 instanceof Events__default["default"] && (typeof s$1.pipe === "function" || typeof s$1.write === "function" && typeof s$1.end === "function"));
665
665
  }
666
666
  };
667
- const realZlibConstants = realZlib__default["default"].constants || { ZLIB_VERNUM: 4736 };
668
- var constants$2 = Object.freeze(Object.assign(Object.create(null), {
667
+ const realZlibConstants = realZlib__default["default"].constants || (
668
+ /* istanbul ignore next */ { ZLIB_VERNUM: 4736 });
669
+ var constants = Object.freeze(Object.assign(Object.create(null), {
669
670
  Z_NO_FLUSH: 0,
670
671
  Z_PARTIAL_FLUSH: 1,
671
672
  Z_SYNC_FLUSH: 2,
@@ -775,7 +776,7 @@ else this.emit(DESTROYED);
775
776
  }, realZlibConstants));
776
777
  var minizlib = createCommonjsModule(function(module$1, exports$1) {
777
778
  const Buffer$1 = require$$0__default$1["default"].Buffer;
778
- const constants$1$1 = exports$1.constants = constants$2;
779
+ const constants$1$1 = exports$1.constants = constants;
779
780
  const OriginalBufferConcat = Buffer$1.concat;
780
781
  const _superWrite = Symbol("_superWrite");
781
782
  class ZlibError extends Error {
@@ -783,6 +784,7 @@ else this.emit(DESTROYED);
783
784
  super("zlib: " + err.message);
784
785
  this.code = err.code;
785
786
  this.errno = err.errno;
787
+ /* istanbul ignore if */
786
788
  if (!this.code) this.code = "ZLIB_ERROR";
787
789
  this.message = "zlib: " + err.message;
788
790
  Error.captureStackTrace(this, this.constructor);
@@ -904,6 +906,7 @@ else this.emit(DESTROYED);
904
906
  params(level, strategy) {
905
907
  if (this[_sawError]) return;
906
908
  if (!this[_handle]) throw new Error("cannot switch params when binding is closed");
909
+ /* istanbul ignore if */
907
910
  if (!this[_handle].params) throw new Error("not supported in this implementation");
908
911
  if (this[_level] !== level || this[_strategy] !== strategy) {
909
912
  this.flush(constants$1$1.Z_SYNC_FLUSH);
@@ -918,6 +921,7 @@ else this.emit(DESTROYED);
918
921
  } finally {
919
922
  this[_handle].flush = origFlush;
920
923
  }
924
+ /* istanbul ignore else */
921
925
  if (this[_handle]) {
922
926
  this[_level] = level;
923
927
  this[_strategy] = strategy;
@@ -994,6 +998,7 @@ else this.emit(DESTROYED);
994
998
  exports$1.DeflateRaw = DeflateRaw;
995
999
  exports$1.InflateRaw = InflateRaw;
996
1000
  exports$1.Unzip = Unzip;
1001
+ /* istanbul ignore else */
997
1002
  if (typeof realZlib__default["default"].BrotliCompress === "function") {
998
1003
  exports$1.BrotliCompress = BrotliCompress;
999
1004
  exports$1.BrotliDecompress = BrotliDecompress;
@@ -1067,7 +1072,7 @@ else this.emit(DESTROYED);
1067
1072
  return super.write(data.slice(0, r));
1068
1073
  }
1069
1074
  [SLURP$1](ex, global$1) {
1070
- for (const k in ex) if (ex[k] !== null && ex[k] !== undefined && !(global$1 && k === "path")) this[k] = ex[k];
1075
+ for (const k in ex) if (ex[k] !== null && ex[k] !== void 0 && !(global$1 && k === "path")) this[k] = ex[k];
1071
1076
  }
1072
1077
  };
1073
1078
  var types = createCommonjsModule(function(module$1, exports$1) {
@@ -1098,8 +1103,8 @@ else this.emit(DESTROYED);
1098
1103
  });
1099
1104
  const encode = (num, buf) => {
1100
1105
  if (!Number.isSafeInteger(num)) throw Error("cannot encode number outside of javascript safe integer range");
1101
- else if (num < 0) encodeNegative(num, buf);
1102
- else encodePositive(num, buf);
1106
+ else if (num < 0) encodeNegative(num, buf);
1107
+ else encodePositive(num, buf);
1103
1108
  return buf;
1104
1109
  };
1105
1110
  const encodePositive = (num, buf) => {
@@ -1117,8 +1122,8 @@ else encodePositive(num, buf);
1117
1122
  var byte = num & 255;
1118
1123
  num = Math.floor(num / 256);
1119
1124
  if (flipped) buf[i - 1] = onesComp(byte);
1120
- else if (byte === 0) buf[i - 1] = 0;
1121
- else {
1125
+ else if (byte === 0) buf[i - 1] = 0;
1126
+ else {
1122
1127
  flipped = true;
1123
1128
  buf[i - 1] = twosComp(byte);
1124
1129
  }
@@ -1139,8 +1144,8 @@ else {
1139
1144
  var byte = buf[i];
1140
1145
  var f;
1141
1146
  if (flipped) f = onesComp(byte);
1142
- else if (byte === 0) f = byte;
1143
- else {
1147
+ else if (byte === 0) f = byte;
1148
+ else {
1144
1149
  flipped = true;
1145
1150
  f = twosComp(byte);
1146
1151
  }
@@ -1188,7 +1193,7 @@ else {
1188
1193
  this.atime = null;
1189
1194
  this.ctime = null;
1190
1195
  if (Buffer.isBuffer(data)) this.decode(data, off || 0, ex, gex);
1191
- else if (data) this.set(data);
1196
+ else if (data) this.set(data);
1192
1197
  }
1193
1198
  decode(buf, off, ex, gex) {
1194
1199
  if (!off) off = 0;
@@ -1212,10 +1217,8 @@ else if (data) this.set(data);
1212
1217
  this.gname = decString(buf, off + 297, 32);
1213
1218
  this.devmaj = decNumber(buf, off + 329, 8);
1214
1219
  this.devmin = decNumber(buf, off + 337, 8);
1215
- if (buf[off + 475] !== 0) {
1216
- const prefix = decString(buf, off + 345, 155);
1217
- this.path = prefix + "/" + this.path;
1218
- } else {
1220
+ if (buf[off + 475] !== 0) this.path = decString(buf, off + 345, 155) + "/" + this.path;
1221
+ else {
1219
1222
  const prefix = decString(buf, off + 345, 130);
1220
1223
  if (prefix) this.path = prefix + "/" + this.path;
1221
1224
  this.atime = decDate(buf, off + 476, 12);
@@ -1229,7 +1232,7 @@ else if (data) this.set(data);
1229
1232
  if (this.cksum === null && sum === 256) this.nullBlock = true;
1230
1233
  }
1231
1234
  [SLURP](ex, global$1) {
1232
- for (const k in ex) if (ex[k] !== null && ex[k] !== undefined && !(global$1 && k === "path")) this[k] = ex[k];
1235
+ for (const k in ex) if (ex[k] !== null && ex[k] !== void 0 && !(global$1 && k === "path")) this[k] = ex[k];
1233
1236
  }
1234
1237
  encode(buf, off) {
1235
1238
  if (!buf) {
@@ -1258,7 +1261,7 @@ else if (data) this.set(data);
1258
1261
  this.needPax = encNumber(buf, off + 337, 8, this.devmin) || this.needPax;
1259
1262
  this.needPax = encString(buf, off + 345, prefixSize, prefix) || this.needPax;
1260
1263
  if (buf[off + 475] !== 0) this.needPax = encString(buf, off + 345, 155, prefix) || this.needPax;
1261
- else {
1264
+ else {
1262
1265
  this.needPax = encString(buf, off + 345, 130, prefix) || this.needPax;
1263
1266
  this.needPax = encDate(buf, off + 476, 12, this.atime) || this.needPax;
1264
1267
  this.needPax = encDate(buf, off + 488, 12, this.ctime) || this.needPax;
@@ -1272,7 +1275,7 @@ else {
1272
1275
  return this.needPax;
1273
1276
  }
1274
1277
  set(data) {
1275
- for (const i in data) if (data[i] !== null && data[i] !== undefined) this[i] = data[i];
1278
+ for (const i in data) if (data[i] !== null && data[i] !== void 0) this[i] = data[i];
1276
1279
  }
1277
1280
  get type() {
1278
1281
  return types.name.get(this[TYPE]) || this[TYPE];
@@ -1282,7 +1285,7 @@ else {
1282
1285
  }
1283
1286
  set type(type) {
1284
1287
  if (types.code.has(type)) this[TYPE] = types.code.get(type);
1285
- else this[TYPE] = type;
1288
+ else this[TYPE] = type;
1286
1289
  }
1287
1290
  };
1288
1291
  const splitPrefix = (p, prefixSize) => {
@@ -1296,21 +1299,21 @@ else this[TYPE] = type;
1296
1299
  prefix,
1297
1300
  false
1298
1301
  ];
1299
- else {
1302
+ else {
1300
1303
  prefix = pathModule.dirname(pp);
1301
1304
  pp = pathModule.basename(pp);
1302
- do
1305
+ do
1303
1306
  if (Buffer.byteLength(pp) <= pathSize && Buffer.byteLength(prefix) <= prefixSize) ret = [
1304
1307
  pp,
1305
1308
  prefix,
1306
1309
  false
1307
1310
  ];
1308
- else if (Buffer.byteLength(pp) > pathSize && Buffer.byteLength(prefix) <= prefixSize) ret = [
1311
+ else if (Buffer.byteLength(pp) > pathSize && Buffer.byteLength(prefix) <= prefixSize) ret = [
1309
1312
  pp.substr(0, pathSize - 1),
1310
1313
  prefix,
1311
1314
  true
1312
1315
  ];
1313
- else {
1316
+ else {
1314
1317
  pp = pathModule.join(pathModule.basename(prefix), pp);
1315
1318
  prefix = pathModule.dirname(prefix);
1316
1319
  }
@@ -1325,7 +1328,7 @@ else {
1325
1328
  };
1326
1329
  const decString = (buf, off, size) => buf.slice(off, off + size).toString("utf8").replace(/\0.*/, "");
1327
1330
  const decDate = (buf, off, size) => numToDate(decNumber(buf, off, size));
1328
- const numToDate = (num) => num === null ? null : new Date(num * 1e3);
1331
+ const numToDate = (num) => num === null ? null : /* @__PURE__ */ new Date(num * 1e3);
1329
1332
  const decNumber = (buf, off, size) => buf[off] & 128 ? largeNumbers.parse(buf.slice(off, off + size)) : decSmallNumber(buf, off, size);
1330
1333
  const nanNull = (value) => isNaN(value) ? null : value;
1331
1334
  const decSmallNumber = (buf, off, size) => nanNull(parseInt(buf.slice(off, off + size).toString("utf8").replace(/\0.*$/, "").trim(), 8));
@@ -1391,14 +1394,13 @@ else {
1391
1394
  return this.encodeField("path") + this.encodeField("ctime") + this.encodeField("atime") + this.encodeField("dev") + this.encodeField("ino") + this.encodeField("nlink") + this.encodeField("charset") + this.encodeField("comment") + this.encodeField("gid") + this.encodeField("gname") + this.encodeField("linkpath") + this.encodeField("mtime") + this.encodeField("size") + this.encodeField("uid") + this.encodeField("uname");
1392
1395
  }
1393
1396
  encodeField(field) {
1394
- if (this[field] === null || this[field] === undefined) return "";
1397
+ if (this[field] === null || this[field] === void 0) return "";
1395
1398
  const v = this[field] instanceof Date ? this[field].getTime() / 1e3 : this[field];
1396
1399
  const s$1 = " " + (field === "dev" || field === "ino" || field === "nlink" ? "SCHILY." : "") + field + "=" + v + "\n";
1397
1400
  const byteLen = Buffer.byteLength(s$1);
1398
1401
  let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1;
1399
1402
  if (byteLen + digits >= Math.pow(10, digits)) digits += 1;
1400
- const len = digits + byteLen;
1401
- return len + s$1;
1403
+ return digits + byteLen + s$1;
1402
1404
  }
1403
1405
  };
1404
1406
  Pax.parse = (string, ex, g) => new Pax(merge(parseKV(string), ex), g);
@@ -1412,7 +1414,7 @@ else {
1412
1414
  const k = kv.shift().replace(/^SCHILY\.(dev|ino|nlink)/, "$1");
1413
1415
  if (!k) return set;
1414
1416
  const v = kv.join("=");
1415
- set[k] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k) ? new Date(v * 1e3) : /^[0-9]+$/.test(v) ? +v : v;
1417
+ set[k] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k) ? /* @__PURE__ */ new Date(v * 1e3) : /^[0-9]+$/.test(v) ? +v : v;
1416
1418
  return set;
1417
1419
  };
1418
1420
  var pax = Pax;
@@ -1429,7 +1431,7 @@ else {
1429
1431
  }
1430
1432
  this.emit("warn", data.tarCode, message, data);
1431
1433
  } else if (message instanceof Error) this.emit("error", Object.assign(message, data));
1432
- else this.emit("error", Object.assign(new Error(`${code}: ${message}`), data));
1434
+ else this.emit("error", Object.assign(/* @__PURE__ */ new Error(`${code}: ${message}`), data));
1433
1435
  }
1434
1436
  };
1435
1437
  const raw = [
@@ -1456,7 +1458,7 @@ else this.emit("error", Object.assign(new Error(`${code}: ${message}`), data));
1456
1458
  }
1457
1459
  return mode;
1458
1460
  };
1459
- const maxReadSize = 16777216;
1461
+ const maxReadSize = 16 * 1024 * 1024;
1460
1462
  const PROCESS$1 = Symbol("process");
1461
1463
  const FILE$1 = Symbol("file");
1462
1464
  const DIRECTORY$1 = Symbol("directory");
@@ -1482,8 +1484,8 @@ else this.emit("error", Object.assign(new Error(`${code}: ${message}`), data));
1482
1484
  this.myuid = process.getuid && process.getuid();
1483
1485
  this.myuser = process.env.USER || "";
1484
1486
  this.maxReadSize = opt.maxReadSize || maxReadSize;
1485
- this.linkCache = opt.linkCache || new Map();
1486
- this.statCache = opt.statCache || new Map();
1487
+ this.linkCache = opt.linkCache || /* @__PURE__ */ new Map();
1488
+ this.statCache = opt.statCache || /* @__PURE__ */ new Map();
1487
1489
  this.preservePaths = !!opt.preservePaths;
1488
1490
  this.cwd = opt.cwd || process.cwd();
1489
1491
  this.strict = !!opt.strict;
@@ -1509,7 +1511,7 @@ else this.emit("error", Object.assign(new Error(`${code}: ${message}`), data));
1509
1511
  path: pathWarn + this.path
1510
1512
  });
1511
1513
  if (this.statCache.has(this.absolute)) this[ONLSTAT](this.statCache.get(this.absolute));
1512
- else this[LSTAT]();
1514
+ else this[LSTAT]();
1513
1515
  }
1514
1516
  [LSTAT]() {
1515
1517
  fs__default["default"].lstat(this.absolute, (er, stat) => {
@@ -1627,14 +1629,14 @@ else this[LSTAT]();
1627
1629
  }
1628
1630
  [ONREAD](fd, buf, offset, length, pos$1, remain, blockRemain, bytesRead) {
1629
1631
  if (bytesRead <= 0 && remain > 0) {
1630
- const er = new Error("encountered unexpected EOF");
1632
+ const er = /* @__PURE__ */ new Error("encountered unexpected EOF");
1631
1633
  er.path = this.absolute;
1632
1634
  er.syscall = "read";
1633
1635
  er.code = "EOF";
1634
1636
  return this[CLOSE](fd, () => this.emit("error", er));
1635
1637
  }
1636
1638
  if (bytesRead > remain) {
1637
- const er = new Error("did not encounter expected EOF");
1639
+ const er = /* @__PURE__ */ new Error("did not encounter expected EOF");
1638
1640
  er.path = this.absolute;
1639
1641
  er.syscall = "read";
1640
1642
  er.code = "EOF";
@@ -1821,9 +1823,9 @@ else this[LSTAT]();
1821
1823
  this.strict = !!opt.strict;
1822
1824
  this.noPax = !!opt.noPax;
1823
1825
  this.prefix = (opt.prefix || "").replace(/(\\|\/)+$/, "");
1824
- this.linkCache = opt.linkCache || new Map();
1825
- this.statCache = opt.statCache || new Map();
1826
- this.readdirCache = opt.readdirCache || new Map();
1826
+ this.linkCache = opt.linkCache || /* @__PURE__ */ new Map();
1827
+ this.statCache = opt.statCache || /* @__PURE__ */ new Map();
1828
+ this.readdirCache = opt.readdirCache || /* @__PURE__ */ new Map();
1827
1829
  this[WRITEENTRYCLASS] = writeEntry;
1828
1830
  if (typeof opt.onwarn === "function") this.on("warn", opt.onwarn);
1829
1831
  this.portable = !!opt.portable;
@@ -1864,14 +1866,14 @@ else this[LSTAT]();
1864
1866
  write(path$3) {
1865
1867
  if (this[ENDED$2]) throw new Error("write after end");
1866
1868
  if (path$3 instanceof readEntry) this[ADDTARENTRY](path$3);
1867
- else this[ADDFSENTRY](path$3);
1869
+ else this[ADDFSENTRY](path$3);
1868
1870
  return this.flowing;
1869
1871
  }
1870
1872
  [ADDTARENTRY](p) {
1871
1873
  const absolute = path__default["default"].resolve(this.cwd, p.path);
1872
1874
  if (this.prefix) p.path = this.prefix + "/" + p.path.replace(/^\.(\/+|$)/, "");
1873
1875
  if (!this.filter(p.path, p)) p.resume();
1874
- else {
1876
+ else {
1875
1877
  const job = new PackJob(p.path, absolute, false);
1876
1878
  job.entry = new WriteEntryTar(p, this[ENTRYOPT](job));
1877
1879
  job.entry.on("end", (_) => this[JOBDONE](job));
@@ -1894,7 +1896,7 @@ else {
1894
1896
  job.pending = false;
1895
1897
  this[JOBS] -= 1;
1896
1898
  if (er) this.emit("error", er);
1897
- else this[ONSTAT](job, stat$1);
1899
+ else this[ONSTAT](job, stat$1);
1898
1900
  });
1899
1901
  }
1900
1902
  [ONSTAT](job, stat) {
@@ -1931,7 +1933,7 @@ else this[ONSTAT](job, stat$1);
1931
1933
  }
1932
1934
  this[PROCESSING] = false;
1933
1935
  if (this[ENDED$2] && !this[QUEUE$1].length && this[JOBS] === 0) if (this.zip) this.zip.end(EOF);
1934
- else {
1936
+ else {
1935
1937
  super.write(EOF);
1936
1938
  super.end();
1937
1939
  }
@@ -1951,12 +1953,12 @@ else {
1951
1953
  return;
1952
1954
  }
1953
1955
  if (!job.stat) if (this.statCache.has(job.absolute)) this[ONSTAT](job, this.statCache.get(job.absolute));
1954
- else this[STAT](job);
1956
+ else this[STAT](job);
1955
1957
  if (!job.stat) return;
1956
1958
  if (job.ignore) return;
1957
1959
  if (!this.noDirRecurse && job.stat.isDirectory() && !job.readdir) {
1958
1960
  if (this.readdirCache.has(job.absolute)) this[ONREADDIR](job, this.readdirCache.get(job.absolute));
1959
- else this[READDIR](job);
1961
+ else this[READDIR](job);
1960
1962
  if (!job.readdir) return;
1961
1963
  }
1962
1964
  job.entry = this[ENTRY](job);
@@ -2005,7 +2007,7 @@ else this[READDIR](job);
2005
2007
  if (zip) source$1.on("data", (chunk) => {
2006
2008
  if (!zip.write(chunk)) source$1.pause();
2007
2009
  });
2008
- else source$1.on("data", (chunk) => {
2010
+ else source$1.on("data", (chunk) => {
2009
2011
  if (!super.write(chunk)) source$1.pause();
2010
2012
  });
2011
2013
  }
@@ -2039,7 +2041,7 @@ else source$1.on("data", (chunk) => {
2039
2041
  if (zip) source$1.on("data", (chunk) => {
2040
2042
  zip.write(chunk);
2041
2043
  });
2042
- else source$1.on("data", (chunk) => {
2044
+ else source$1.on("data", (chunk) => {
2043
2045
  super[WRITE](chunk);
2044
2046
  });
2045
2047
  }
@@ -2048,6 +2050,7 @@ else source$1.on("data", (chunk) => {
2048
2050
  var pack = Pack;
2049
2051
  const EE$1 = Events__default["default"].EventEmitter;
2050
2052
  let writev = fs__default["default"].writev;
2053
+ /* istanbul ignore next */
2051
2054
  if (!writev) {
2052
2055
  const binding = process.binding("fs");
2053
2056
  const FSReqWrap = binding.FSReqWrap || binding.FSReqCallback;
@@ -2096,13 +2099,13 @@ else source$1.on("data", (chunk) => {
2096
2099
  this[_errored] = false;
2097
2100
  this[_fd] = typeof opt.fd === "number" ? opt.fd : null;
2098
2101
  this[_path] = path$3;
2099
- this[_readSize] = opt.readSize || 16777216;
2102
+ this[_readSize] = opt.readSize || 16 * 1024 * 1024;
2100
2103
  this[_reading] = false;
2101
2104
  this[_size] = typeof opt.size === "number" ? opt.size : Infinity;
2102
2105
  this[_remain] = this[_size];
2103
2106
  this[_autoClose] = typeof opt.autoClose === "boolean" ? opt.autoClose : true;
2104
2107
  if (typeof this[_fd] === "number") this[_read]();
2105
- else this[_open]();
2108
+ else this[_open]();
2106
2109
  }
2107
2110
  get fd() {
2108
2111
  return this[_fd];
@@ -2121,7 +2124,7 @@ else this[_open]();
2121
2124
  }
2122
2125
  [_onopen](er, fd) {
2123
2126
  if (er) this[_onerror](er);
2124
- else {
2127
+ else {
2125
2128
  this[_fd] = fd;
2126
2129
  this.emit("open", fd);
2127
2130
  this[_read]();
@@ -2134,6 +2137,7 @@ else {
2134
2137
  if (!this[_reading]) {
2135
2138
  this[_reading] = true;
2136
2139
  const buf = this[_makeBuf]();
2140
+ /* istanbul ignore if */
2137
2141
  if (buf.length === 0) return process.nextTick(() => this[_onread](null, 0, buf));
2138
2142
  fs__default["default"].read(this[_fd], buf, 0, buf.length, null, (er, br, buf$1) => this[_onread](er, br, buf$1));
2139
2143
  }
@@ -2141,7 +2145,7 @@ else {
2141
2145
  [_onread](er, br, buf) {
2142
2146
  this[_reading] = false;
2143
2147
  if (er) this[_onerror](er);
2144
- else if (this[_handleChunk](br, buf)) this[_read]();
2148
+ else if (this[_handleChunk](br, buf)) this[_read]();
2145
2149
  }
2146
2150
  [_close]() {
2147
2151
  if (this[_autoClose] && typeof this[_fd] === "number") {
@@ -2198,6 +2202,7 @@ else if (this[_handleChunk](br, buf)) this[_read]();
2198
2202
  this[_reading] = true;
2199
2203
  do {
2200
2204
  const buf = this[_makeBuf]();
2205
+ /* istanbul ignore next */
2201
2206
  const br = buf.length === 0 ? 0 : fs__default["default"].readSync(this[_fd], buf, 0, buf.length, null);
2202
2207
  if (!this[_handleChunk](br, buf)) break;
2203
2208
  } while (true);
@@ -2230,11 +2235,11 @@ else if (this[_handleChunk](br, buf)) this[_read]();
2230
2235
  this[_queue] = [];
2231
2236
  this[_path] = path$3;
2232
2237
  this[_fd] = typeof opt.fd === "number" ? opt.fd : null;
2233
- this[_mode] = opt.mode === undefined ? 438 : opt.mode;
2238
+ this[_mode] = opt.mode === void 0 ? 438 : opt.mode;
2234
2239
  this[_pos] = typeof opt.start === "number" ? opt.start : null;
2235
2240
  this[_autoClose] = typeof opt.autoClose === "boolean" ? opt.autoClose : true;
2236
2241
  const defaultFlag = this[_pos] !== null ? "r+" : "w";
2237
- this[_defaultFlag] = opt.flags === undefined;
2242
+ this[_defaultFlag] = opt.flags === void 0;
2238
2243
  this[_flags] = this[_defaultFlag] ? defaultFlag : opt.flags;
2239
2244
  if (this[_fd] === null) this[_open]();
2240
2245
  }
@@ -2264,7 +2269,7 @@ else if (this[_handleChunk](br, buf)) this[_read]();
2264
2269
  this[_flags] = "w";
2265
2270
  this[_open]();
2266
2271
  } else if (er) this[_onerror](er);
2267
- else {
2272
+ else {
2268
2273
  this[_fd] = fd;
2269
2274
  this.emit("open", fd);
2270
2275
  this[_flush]();
@@ -2279,7 +2284,7 @@ else {
2279
2284
  write(buf, enc) {
2280
2285
  if (typeof buf === "string") buf = Buffer.from(buf, enc);
2281
2286
  if (this[_ended]) {
2282
- this.emit("error", new Error("write() after end()"));
2287
+ this.emit("error", /* @__PURE__ */ new Error("write() after end()"));
2283
2288
  return false;
2284
2289
  }
2285
2290
  if (this[_fd] === null || this[_writing] || this[_queue].length) {
@@ -2296,10 +2301,10 @@ else {
2296
2301
  }
2297
2302
  [_onwrite](er, bw) {
2298
2303
  if (er) this[_onerror](er);
2299
- else {
2304
+ else {
2300
2305
  if (this[_pos] !== null) this[_pos] += bw;
2301
2306
  if (this[_queue].length) this[_flush]();
2302
- else {
2307
+ else {
2303
2308
  this[_writing] = false;
2304
2309
  if (this[_ended] && !this[_finished]) {
2305
2310
  this[_finished] = true;
@@ -2316,7 +2321,7 @@ else {
2316
2321
  if (this[_queue].length === 0) {
2317
2322
  if (this[_ended]) this[_onwrite](null, 0);
2318
2323
  } else if (this[_queue].length === 1) this[_write](this[_queue].pop());
2319
- else {
2324
+ else {
2320
2325
  const iovec = this[_queue];
2321
2326
  this[_queue] = [];
2322
2327
  writev(this[_fd], iovec, this[_pos], (er, bw) => this[_onwrite](er, bw));
@@ -2341,7 +2346,7 @@ else {
2341
2346
  return this[_open]();
2342
2347
  } else throw er;
2343
2348
  }
2344
- else fd = fs__default["default"].openSync(this[_path], this[_flags], this[_mode]);
2349
+ else fd = fs__default["default"].openSync(this[_path], this[_flags], this[_mode]);
2345
2350
  this[_onopen](null, fd);
2346
2351
  }
2347
2352
  [_close]() {
@@ -2364,17 +2369,13 @@ else fd = fs__default["default"].openSync(this[_path], this[_flags], this[_mode]
2364
2369
  }
2365
2370
  }
2366
2371
  };
2367
- var ReadStream_1 = ReadStream;
2368
- var ReadStreamSync_1 = ReadStreamSync;
2369
- var WriteStream_1 = WriteStream;
2370
- var WriteStreamSync_1 = WriteStreamSync;
2371
2372
  var fsMinipass = {
2372
- ReadStream: ReadStream_1,
2373
- ReadStreamSync: ReadStreamSync_1,
2374
- WriteStream: WriteStream_1,
2375
- WriteStreamSync: WriteStreamSync_1
2373
+ ReadStream,
2374
+ ReadStreamSync,
2375
+ WriteStream,
2376
+ WriteStreamSync
2376
2377
  };
2377
- const maxMetaEntrySize = 1048576;
2378
+ const maxMetaEntrySize = 1024 * 1024;
2378
2379
  const gzipHeader = Buffer.from([31, 139]);
2379
2380
  const STATE = Symbol("state");
2380
2381
  const WRITEENTRY = Symbol("writeEntry");
@@ -2416,7 +2417,7 @@ else fd = fs__default["default"].openSync(this[_path], this[_flags], this[_mode]
2416
2417
  if (this[STATE] === "begin" || this[SAW_VALID_ENTRY] === false) this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
2417
2418
  });
2418
2419
  if (opt.ondone) this.on(DONE, opt.ondone);
2419
- else this.on(DONE, (_) => {
2420
+ else this.on(DONE, (_) => {
2420
2421
  this.emit("prefinish");
2421
2422
  this.emit("finish");
2422
2423
  this.emit("end");
@@ -2459,15 +2460,15 @@ else this.on(DONE, (_) => {
2459
2460
  this[SAW_NULL_BLOCK] = true;
2460
2461
  this[EMIT]("nullBlock");
2461
2462
  }
2462
- else {
2463
+ else {
2463
2464
  this[SAW_NULL_BLOCK] = false;
2464
2465
  if (!header$1.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: header$1 });
2465
- else if (!header$1.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: header$1 });
2466
- else {
2466
+ else if (!header$1.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: header$1 });
2467
+ else {
2467
2468
  const type = header$1.type;
2468
2469
  if (/^(Symbolic)?Link$/.test(type) && !header$1.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: header$1 });
2469
- else if (!/^(Symbolic)?Link$/.test(type) && header$1.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: header$1 });
2470
- else {
2470
+ else if (!/^(Symbolic)?Link$/.test(type) && header$1.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: header$1 });
2471
+ else {
2471
2472
  const entry = this[WRITEENTRY] = new readEntry(header$1, this[EX], this[GEX]);
2472
2473
  if (!this[SAW_VALID_ENTRY]) if (entry.remain) {
2473
2474
  const onend = () => {
@@ -2495,7 +2496,7 @@ else {
2495
2496
  entry.resume();
2496
2497
  } else {
2497
2498
  if (entry.remain) this[STATE] = "body";
2498
- else {
2499
+ else {
2499
2500
  this[STATE] = "header";
2500
2501
  entry.end();
2501
2502
  }
@@ -2515,7 +2516,7 @@ else {
2515
2516
  this[READENTRY] = null;
2516
2517
  go = false;
2517
2518
  } else if (Array.isArray(entry)) this.emit.apply(this, entry);
2518
- else {
2519
+ else {
2519
2520
  this[READENTRY] = entry;
2520
2521
  this.emit("entry", entry);
2521
2522
  if (!entry.emittedEnd) {
@@ -2526,11 +2527,11 @@ else {
2526
2527
  return go;
2527
2528
  }
2528
2529
  [NEXTENTRY]() {
2529
- do {} while (this[PROCESSENTRY](this[QUEUE].shift()));
2530
+ do ;
2531
+ while (this[PROCESSENTRY](this[QUEUE].shift()));
2530
2532
  if (!this[QUEUE].length) {
2531
2533
  const re = this[READENTRY];
2532
- const drainNow = !re || re.flowing || re.size === re.remain;
2533
- if (drainNow) {
2534
+ if (!re || re.flowing || re.size === re.remain) {
2534
2535
  if (!this[WRITING]) this.emit("drain");
2535
2536
  } else re.once("drain", (_) => this.emit("drain"));
2536
2537
  }
@@ -2555,7 +2556,7 @@ else {
2555
2556
  }
2556
2557
  [EMIT](ev, data, extra) {
2557
2558
  if (!this[QUEUE].length && !this[READENTRY]) this.emit(ev, data, extra);
2558
- else this[QUEUE].push([
2559
+ else this[QUEUE].push([
2559
2560
  ev,
2560
2561
  data,
2561
2562
  extra
@@ -2618,7 +2619,7 @@ else this[QUEUE].push([
2618
2619
  }
2619
2620
  this[WRITING] = true;
2620
2621
  if (this[UNZIP]) this[UNZIP].write(chunk);
2621
- else this[CONSUMECHUNK](chunk);
2622
+ else this[CONSUMECHUNK](chunk);
2622
2623
  this[WRITING] = false;
2623
2624
  const ret = this[QUEUE].length ? false : this[READENTRY] ? this[READENTRY].flowing : true;
2624
2625
  if (!ret && !this[QUEUE].length) this[READENTRY].once("drain", (_) => this.emit("drain"));
@@ -2642,8 +2643,8 @@ else this[CONSUMECHUNK](chunk);
2642
2643
  }
2643
2644
  [CONSUMECHUNK](chunk) {
2644
2645
  if (this[CONSUMING]) this[BUFFERCONCAT](chunk);
2645
- else if (!chunk && !this[BUFFER]) this[MAYBEEND]();
2646
- else {
2646
+ else if (!chunk && !this[BUFFER]) this[MAYBEEND]();
2647
+ else {
2647
2648
  this[CONSUMING] = true;
2648
2649
  if (this[BUFFER]) {
2649
2650
  this[BUFFERCONCAT](chunk);
@@ -2679,11 +2680,11 @@ else {
2679
2680
  default: throw new Error("invalid state: " + this[STATE]);
2680
2681
  }
2681
2682
  if (position < length) if (this[BUFFER]) this[BUFFER] = Buffer.concat([chunk.slice(position), this[BUFFER]]);
2682
- else this[BUFFER] = chunk.slice(position);
2683
+ else this[BUFFER] = chunk.slice(position);
2683
2684
  }
2684
2685
  end(chunk) {
2685
2686
  if (!this[ABORTED]) if (this[UNZIP]) this[UNZIP].end(chunk);
2686
- else {
2687
+ else {
2687
2688
  this[ENDED$1] = true;
2688
2689
  this.write(chunk);
2689
2690
  }
@@ -2691,10 +2692,10 @@ else {
2691
2692
  });
2692
2693
  var list_1 = (opt_, files, cb) => {
2693
2694
  if (typeof opt_ === "function") cb = opt_, files = null, opt_ = {};
2694
- else if (Array.isArray(opt_)) files = opt_, opt_ = {};
2695
+ else if (Array.isArray(opt_)) files = opt_, opt_ = {};
2695
2696
  if (typeof files === "function") cb = files, files = null;
2696
2697
  if (!files) files = [];
2697
- else files = Array.from(files);
2698
+ else files = Array.from(files);
2698
2699
  const opt = highLevelOpt(opt_);
2699
2700
  if (opt.sync && typeof cb === "function") throw new TypeError("callback not supported for sync tar functions");
2700
2701
  if (!opt.file && typeof cb === "function") throw new TypeError("callback only supported with file option");
@@ -2727,9 +2728,9 @@ else files = Array.from(files);
2727
2728
  let fd;
2728
2729
  try {
2729
2730
  const stat = fs__default["default"].statSync(file);
2730
- const readSize = opt.maxReadSize || 16777216;
2731
+ const readSize = opt.maxReadSize || 16 * 1024 * 1024;
2731
2732
  if (stat.size < readSize) p.end(fs__default["default"].readFileSync(file));
2732
- else {
2733
+ else {
2733
2734
  let pos$1 = 0;
2734
2735
  const buf = Buffer.allocUnsafe(readSize);
2735
2736
  fd = fs__default["default"].openSync(file, "r");
@@ -2749,14 +2750,14 @@ else {
2749
2750
  };
2750
2751
  const listFile = (opt, cb) => {
2751
2752
  const parse$6 = new parse$4(opt);
2752
- const readSize = opt.maxReadSize || 16777216;
2753
+ const readSize = opt.maxReadSize || 16 * 1024 * 1024;
2753
2754
  const file = opt.file;
2754
2755
  const p = new Promise((resolve$2, reject) => {
2755
2756
  parse$6.on("error", reject);
2756
2757
  parse$6.on("end", resolve$2);
2757
2758
  fs__default["default"].stat(file, (er, stat) => {
2758
2759
  if (er) reject(er);
2759
- else {
2760
+ else {
2760
2761
  const stream = new fsMinipass.ReadStream(file, {
2761
2762
  readSize,
2762
2763
  size: stat.size
@@ -2805,7 +2806,7 @@ else {
2805
2806
  noResume: true,
2806
2807
  onentry: (entry) => p.add(entry)
2807
2808
  });
2808
- else p.add(file);
2809
+ else p.add(file);
2809
2810
  });
2810
2811
  p.end();
2811
2812
  };
@@ -2817,7 +2818,7 @@ else p.add(file);
2817
2818
  noResume: true,
2818
2819
  onentry: (entry) => p.add(entry)
2819
2820
  }).then((_) => addFilesAsync$1(p, files));
2820
- else p.add(file);
2821
+ else p.add(file);
2821
2822
  }
2822
2823
  p.end();
2823
2824
  };
@@ -2849,7 +2850,7 @@ else p.add(file);
2849
2850
  fd = fs__default["default"].openSync(opt.file, "r+");
2850
2851
  } catch (er) {
2851
2852
  if (er.code === "ENOENT") fd = fs__default["default"].openSync(opt.file, "w+");
2852
- else throw er;
2853
+ else throw er;
2853
2854
  }
2854
2855
  const st = fs__default["default"].fstatSync(fd);
2855
2856
  const headBuf = Buffer.alloc(512);
@@ -2888,7 +2889,7 @@ else throw er;
2888
2889
  const getPos = (fd, size, cb_) => {
2889
2890
  const cb$1 = (er, pos$1) => {
2890
2891
  if (er) fs__default["default"].close(fd, (_) => cb_(er));
2891
- else cb_(null, pos$1);
2892
+ else cb_(null, pos$1);
2892
2893
  };
2893
2894
  let position = 0;
2894
2895
  if (size === 0) return cb$1(null, 0);
@@ -2898,7 +2899,7 @@ else cb_(null, pos$1);
2898
2899
  if (er) return cb$1(er);
2899
2900
  bufPos += bytes;
2900
2901
  if (bufPos < 512 && bytes) return fs__default["default"].read(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos, onread);
2901
- if (position === 0 && headBuf[0] === 31 && headBuf[1] === 139) return cb$1(new Error("cannot append to compressed archives"));
2902
+ if (position === 0 && headBuf[0] === 31 && headBuf[1] === 139) return cb$1(/* @__PURE__ */ new Error("cannot append to compressed archives"));
2902
2903
  if (bufPos < 512) return cb$1(null, position);
2903
2904
  const h$1 = new header(headBuf);
2904
2905
  if (!h$1.cksumValid) return cb$1(null, position);
@@ -2948,7 +2949,7 @@ else cb_(null, pos$1);
2948
2949
  noResume: true,
2949
2950
  onentry: (entry) => p.add(entry)
2950
2951
  });
2951
- else p.add(file);
2952
+ else p.add(file);
2952
2953
  });
2953
2954
  p.end();
2954
2955
  };
@@ -2960,7 +2961,7 @@ else p.add(file);
2960
2961
  noResume: true,
2961
2962
  onentry: (entry) => p.add(entry)
2962
2963
  }).then((_) => addFilesAsync(p, files));
2963
- else p.add(file);
2964
+ else p.add(file);
2964
2965
  }
2965
2966
  p.end();
2966
2967
  };
@@ -2975,7 +2976,7 @@ else p.add(file);
2975
2976
  };
2976
2977
  const mtimeFilter = (opt) => {
2977
2978
  const filter$1 = opt.filter;
2978
- if (!opt.mtimeCache) opt.mtimeCache = new Map();
2979
+ if (!opt.mtimeCache) opt.mtimeCache = /* @__PURE__ */ new Map();
2979
2980
  opt.filter = filter$1 ? (path$3, stat) => filter$1(path$3, stat) && !(opt.mtimeCache.get(path$3) > stat.mtime) : (path$3, stat) => !(opt.mtimeCache.get(path$3) > stat.mtime);
2980
2981
  };
2981
2982
  const { promisify: promisify$1 } = util__default["default"];
@@ -2984,20 +2985,20 @@ else p.add(file);
2984
2985
  mode: 511,
2985
2986
  fs: fs__default["default"]
2986
2987
  };
2987
- else if (typeof opts === "object") opts = {
2988
+ else if (typeof opts === "object") opts = {
2988
2989
  mode: 511,
2989
2990
  fs: fs__default["default"],
2990
2991
  ...opts
2991
2992
  };
2992
- else if (typeof opts === "number") opts = {
2993
+ else if (typeof opts === "number") opts = {
2993
2994
  mode: opts,
2994
2995
  fs: fs__default["default"]
2995
2996
  };
2996
- else if (typeof opts === "string") opts = {
2997
+ else if (typeof opts === "string") opts = {
2997
2998
  mode: parseInt(opts, 8),
2998
2999
  fs: fs__default["default"]
2999
3000
  };
3000
- else throw new TypeError("invalid options argument");
3001
+ else throw new TypeError("invalid options argument");
3001
3002
  opts.mkdir = opts.mkdir || opts.fs.mkdir || fs__default["default"].mkdir;
3002
3003
  opts.mkdirAsync = promisify$1(opts.mkdir);
3003
3004
  opts.stat = opts.stat || opts.fs.stat || fs__default["default"].stat;
@@ -3010,7 +3011,7 @@ else throw new TypeError("invalid options argument");
3010
3011
  const platform$2 = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;
3011
3012
  const { resolve: resolve$1, parse: parse$3 } = path__default["default"];
3012
3013
  const pathArg = (path$3) => {
3013
- if (/\0/.test(path$3)) throw Object.assign(new TypeError("path must be a string without null bytes"), {
3014
+ if (/\0/.test(path$3)) throw Object.assign(/* @__PURE__ */ new TypeError("path must be a string without null bytes"), {
3014
3015
  path: path$3,
3015
3016
  code: "ERR_INVALID_ARG_VALUE"
3016
3017
  });
@@ -3018,7 +3019,7 @@ else throw new TypeError("invalid options argument");
3018
3019
  if (platform$2 === "win32") {
3019
3020
  const badWinChars = /[*|"<>?:]/;
3020
3021
  const { root } = parse$3(path$3);
3021
- if (badWinChars.test(path$3.substr(root.length))) throw Object.assign(new Error("Illegal characters in path."), {
3022
+ if (badWinChars.test(path$3.substr(root.length))) throw Object.assign(/* @__PURE__ */ new Error("Illegal characters in path."), {
3022
3023
  path: path$3,
3023
3024
  code: "EINVAL"
3024
3025
  });
@@ -3027,16 +3028,16 @@ else throw new TypeError("invalid options argument");
3027
3028
  };
3028
3029
  var pathArg_1 = pathArg;
3029
3030
  const { dirname: dirname$2 } = path__default["default"];
3030
- const findMade$1 = (opts, parent, path$3 = undefined) => {
3031
+ const findMade$1 = (opts, parent, path$3 = void 0) => {
3031
3032
  if (path$3 === parent) return Promise.resolve();
3032
- return opts.statAsync(parent).then((st) => st.isDirectory() ? path$3 : undefined, (er) => er.code === "ENOENT" ? findMade$1(opts, dirname$2(parent), parent) : undefined);
3033
+ return opts.statAsync(parent).then((st) => st.isDirectory() ? path$3 : void 0, (er) => er.code === "ENOENT" ? findMade$1(opts, dirname$2(parent), parent) : void 0);
3033
3034
  };
3034
- const findMadeSync$1 = (opts, parent, path$3 = undefined) => {
3035
- if (path$3 === parent) return undefined;
3035
+ const findMadeSync$1 = (opts, parent, path$3 = void 0) => {
3036
+ if (path$3 === parent) return void 0;
3036
3037
  try {
3037
- return opts.statSync(parent).isDirectory() ? path$3 : undefined;
3038
+ return opts.statSync(parent).isDirectory() ? path$3 : void 0;
3038
3039
  } catch (er) {
3039
- return er.code === "ENOENT" ? findMadeSync$1(opts, dirname$2(parent), parent) : undefined;
3040
+ return er.code === "ENOENT" ? findMadeSync$1(opts, dirname$2(parent), parent) : void 0;
3040
3041
  }
3041
3042
  };
3042
3043
  var findMade_1 = {
@@ -3055,7 +3056,7 @@ else throw new TypeError("invalid options argument");
3055
3056
  if (er.code !== "EEXIST" && er.code !== "EROFS") throw er;
3056
3057
  return opts.statAsync(path$3).then((st) => {
3057
3058
  if (st.isDirectory()) return made;
3058
- else throw er;
3059
+ else throw er;
3059
3060
  }, () => {
3060
3061
  throw er;
3061
3062
  });
@@ -3068,7 +3069,7 @@ else throw er;
3068
3069
  return opts.mkdirSync(path$3, opts);
3069
3070
  } catch (er) {
3070
3071
  if (er.code !== "EISDIR") throw er;
3071
- else return;
3072
+ else return;
3072
3073
  }
3073
3074
  try {
3074
3075
  opts.mkdirSync(path$3, opts);
@@ -3092,38 +3093,33 @@ else return;
3092
3093
  const { mkdirpManual: mkdirpManual$1, mkdirpManualSync: mkdirpManualSync$1 } = mkdirpManual_1;
3093
3094
  const mkdirpNative$1 = (path$3, opts) => {
3094
3095
  opts.recursive = true;
3095
- const parent = dirname$3(path$3);
3096
- if (parent === path$3) return opts.mkdirAsync(path$3, opts);
3096
+ if (dirname$3(path$3) === path$3) return opts.mkdirAsync(path$3, opts);
3097
3097
  return findMade(opts, path$3).then((made) => opts.mkdirAsync(path$3, opts).then(() => made).catch((er) => {
3098
3098
  if (er.code === "ENOENT") return mkdirpManual$1(path$3, opts);
3099
- else throw er;
3099
+ else throw er;
3100
3100
  }));
3101
3101
  };
3102
3102
  const mkdirpNativeSync$1 = (path$3, opts) => {
3103
3103
  opts.recursive = true;
3104
- const parent = dirname$3(path$3);
3105
- if (parent === path$3) return opts.mkdirSync(path$3, opts);
3104
+ if (dirname$3(path$3) === path$3) return opts.mkdirSync(path$3, opts);
3106
3105
  const made = findMadeSync(opts, path$3);
3107
3106
  try {
3108
3107
  opts.mkdirSync(path$3, opts);
3109
3108
  return made;
3110
3109
  } catch (er) {
3111
3110
  if (er.code === "ENOENT") return mkdirpManualSync$1(path$3, opts);
3112
- else throw er;
3111
+ else throw er;
3113
3112
  }
3114
3113
  };
3115
3114
  var mkdirpNative_1 = {
3116
3115
  mkdirpNative: mkdirpNative$1,
3117
3116
  mkdirpNativeSync: mkdirpNativeSync$1
3118
3117
  };
3119
- const version$1 = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version;
3120
- const versArr = version$1.replace(/^v/, "").split(".");
3118
+ const versArr = (process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version).replace(/^v/, "").split(".");
3121
3119
  const hasNative = +versArr[0] > 10 || +versArr[0] === 10 && +versArr[1] >= 12;
3122
- const useNative$1 = !hasNative ? () => false : (opts) => opts.mkdir === fs__default["default"].mkdir;
3123
- const useNativeSync$1 = !hasNative ? () => false : (opts) => opts.mkdirSync === fs__default["default"].mkdirSync;
3124
3120
  var useNative_1 = {
3125
- useNative: useNative$1,
3126
- useNativeSync: useNativeSync$1
3121
+ useNative: !hasNative ? () => false : (opts) => opts.mkdir === fs__default["default"].mkdir,
3122
+ useNativeSync: !hasNative ? () => false : (opts) => opts.mkdirSync === fs__default["default"].mkdirSync
3127
3123
  };
3128
3124
  const { mkdirpNative, mkdirpNativeSync } = mkdirpNative_1;
3129
3125
  const { mkdirpManual, mkdirpManualSync } = mkdirpManual_1;
@@ -3144,8 +3140,11 @@ else throw er;
3144
3140
  mkdirp$3.nativeSync = (path$3, opts) => mkdirpNativeSync(pathArg_1(path$3), optsArg_1(opts));
3145
3141
  mkdirp$3.manualSync = (path$3, opts) => mkdirpManualSync(pathArg_1(path$3), optsArg_1(opts));
3146
3142
  var mkdirp_1 = mkdirp$3;
3143
+ /* istanbul ignore next */
3147
3144
  const LCHOWN = fs__default["default"].lchown ? "lchown" : "chown";
3145
+ /* istanbul ignore next */
3148
3146
  const LCHOWNSYNC = fs__default["default"].lchownSync ? "lchownSync" : "chownSync";
3147
+ /* istanbul ignore next */
3149
3148
  const needEISDIRHandled = fs__default["default"].lchown && !process.version.match(/v1[1-9]+\./) && !process.version.match(/v10\.[6-9]/);
3150
3149
  const lchownSync = (path$3, uid, gid) => {
3151
3150
  try {
@@ -3154,6 +3153,7 @@ else throw er;
3154
3153
  if (er.code !== "ENOENT") throw er;
3155
3154
  }
3156
3155
  };
3156
+ /* istanbul ignore next */
3157
3157
  const chownSync = (path$3, uid, gid) => {
3158
3158
  try {
3159
3159
  return fs__default["default"].chownSync(path$3, uid, gid);
@@ -3161,10 +3161,12 @@ else throw er;
3161
3161
  if (er.code !== "ENOENT") throw er;
3162
3162
  }
3163
3163
  };
3164
+ /* istanbul ignore next */
3164
3165
  const handleEISDIR = needEISDIRHandled ? (path$3, uid, gid, cb) => (er) => {
3165
3166
  if (!er || er.code !== "EISDIR") cb(er);
3166
- else fs__default["default"].chown(path$3, uid, gid, cb);
3167
+ else fs__default["default"].chown(path$3, uid, gid, cb);
3167
3168
  } : (_, __, ___, cb) => cb;
3169
+ /* istanbul ignore next */
3168
3170
  const handleEISDirSync = needEISDIRHandled ? (path$3, uid, gid) => {
3169
3171
  try {
3170
3172
  return lchownSync(path$3, uid, gid);
@@ -3176,6 +3178,7 @@ else fs__default["default"].chown(path$3, uid, gid, cb);
3176
3178
  const nodeVersion = process.version;
3177
3179
  let readdir = (path$3, options, cb) => fs__default["default"].readdir(path$3, options, cb);
3178
3180
  let readdirSync$1 = (path$3, options) => fs__default["default"].readdirSync(path$3, options);
3181
+ /* istanbul ignore next */
3179
3182
  if (/^v4\./.test(nodeVersion)) readdir = (path$3, options, cb) => fs__default["default"].readdir(path$3, cb);
3180
3183
  const chown = (cpath, uid, gid, cb) => {
3181
3184
  fs__default["default"][LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, (er) => {
@@ -3193,7 +3196,7 @@ else fs__default["default"].chown(path$3, uid, gid, cb);
3193
3196
  const cpath = path__default["default"].resolve(p, child.name);
3194
3197
  chown(cpath, uid, gid, cb);
3195
3198
  });
3196
- else {
3199
+ else {
3197
3200
  const cpath = path__default["default"].resolve(p, child.name);
3198
3201
  chown(cpath, uid, gid, cb);
3199
3202
  }
@@ -3202,7 +3205,7 @@ else {
3202
3205
  readdir(p, { withFileTypes: true }, (er, children) => {
3203
3206
  if (er) {
3204
3207
  if (er.code === "ENOENT") return cb();
3205
- else if (er.code !== "ENOTDIR" && er.code !== "ENOTSUP") return cb(er);
3208
+ else if (er.code !== "ENOTDIR" && er.code !== "ENOTSUP") return cb(er);
3206
3209
  }
3207
3210
  if (er || !children.length) return chown(p, uid, gid, cb);
3208
3211
  let len = children.length;
@@ -3222,7 +3225,7 @@ else if (er.code !== "ENOTDIR" && er.code !== "ENOTSUP") return cb(er);
3222
3225
  child = stats;
3223
3226
  } catch (er) {
3224
3227
  if (er.code === "ENOENT") return;
3225
- else throw er;
3228
+ else throw er;
3226
3229
  }
3227
3230
  if (child.isDirectory()) chownrSync(path__default["default"].resolve(p, child.name), uid, gid);
3228
3231
  handleEISDirSync(path__default["default"].resolve(p, child.name), uid, gid);
@@ -3233,8 +3236,8 @@ else throw er;
3233
3236
  children = readdirSync$1(p, { withFileTypes: true });
3234
3237
  } catch (er) {
3235
3238
  if (er.code === "ENOENT") return;
3236
- else if (er.code === "ENOTDIR" || er.code === "ENOTSUP") return handleEISDirSync(p, uid, gid);
3237
- else throw er;
3239
+ else if (er.code === "ENOTDIR" || er.code === "ENOTSUP") return handleEISDirSync(p, uid, gid);
3240
+ else throw er;
3238
3241
  }
3239
3242
  if (children && children.length) children.forEach((child) => chownrKidSync(p, child, uid, gid));
3240
3243
  return handleEISDirSync(p, uid, gid);
@@ -3274,11 +3277,11 @@ else throw er;
3274
3277
  const cwd$1 = opt.cwd;
3275
3278
  const done = (er, created) => {
3276
3279
  if (er) cb(er);
3277
- else {
3280
+ else {
3278
3281
  cache.set(dir, true);
3279
3282
  if (created && doChown) chownr_1(created, uid, gid, (er$1) => done(er$1));
3280
- else if (needChmod) fs__default["default"].chmod(dir, mode, cb);
3281
- else cb();
3283
+ else if (needChmod) fs__default["default"].chmod(dir, mode, cb);
3284
+ else cb();
3282
3285
  }
3283
3286
  };
3284
3287
  if (cache && cache.get(dir) === true) return done();
@@ -3287,8 +3290,7 @@ else cb();
3287
3290
  done(er);
3288
3291
  });
3289
3292
  if (preserve) return mkdirp_1(dir, { mode }).then((made) => done(null, made), done);
3290
- const sub = path__default["default"].relative(cwd$1, dir);
3291
- const parts = sub.split(/\/|\\/);
3293
+ const parts = path__default["default"].relative(cwd$1, dir).split(/\/|\\/);
3292
3294
  mkdir_(cwd$1, parts, mode, cache, unlink, cwd$1, null, done);
3293
3295
  };
3294
3296
  const mkdir_ = (base$1, parts, mode, cache, unlink, cwd$1, created, cb) => {
@@ -3303,13 +3305,13 @@ else cb();
3303
3305
  if (er.path && path__default["default"].dirname(er.path) === cwd$1 && (er.code === "ENOTDIR" || er.code === "ENOENT")) return cb(new CwdError(cwd$1, er.code));
3304
3306
  fs__default["default"].lstat(part, (statEr, st) => {
3305
3307
  if (statEr) cb(statEr);
3306
- else if (st.isDirectory()) mkdir_(part, parts, mode, cache, unlink, cwd$1, created, cb);
3307
- else if (unlink) fs__default["default"].unlink(part, (er$1) => {
3308
+ else if (st.isDirectory()) mkdir_(part, parts, mode, cache, unlink, cwd$1, created, cb);
3309
+ else if (unlink) fs__default["default"].unlink(part, (er$1) => {
3308
3310
  if (er$1) return cb(er$1);
3309
3311
  fs__default["default"].mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd$1, created, cb));
3310
3312
  });
3311
- else if (st.isSymbolicLink()) return cb(new SymlinkError(part, part + "/" + parts.join("/")));
3312
- else cb(er);
3313
+ else if (st.isSymbolicLink()) return cb(new SymlinkError(part, part + "/" + parts.join("/")));
3314
+ else cb(er);
3313
3315
  });
3314
3316
  } else {
3315
3317
  created = created || part;
@@ -3347,8 +3349,7 @@ else cb(er);
3347
3349
  return;
3348
3350
  }
3349
3351
  if (preserve) return done(mkdirp_1.sync(dir, mode));
3350
- const sub = path__default["default"].relative(cwd$1, dir);
3351
- const parts = sub.split(/\/|\\/);
3352
+ const parts = path__default["default"].relative(cwd$1, dir).split(/\/|\\/);
3352
3353
  let created = null;
3353
3354
  for (let p = parts.shift(), part = cwd$1; p && (part += "/" + p); p = parts.shift()) {
3354
3355
  if (cache.get(part)) continue;
@@ -3375,13 +3376,14 @@ else cb(er);
3375
3376
  };
3376
3377
  mkdir.sync = sync$1;
3377
3378
  var pathReservations = () => {
3378
- const queues = new Map();
3379
- const reservations = new Map();
3379
+ const queues = /* @__PURE__ */ new Map();
3380
+ const reservations = /* @__PURE__ */ new Map();
3380
3381
  const { join: join$1 } = path__default["default"];
3381
3382
  const getDirs = (path$3) => join$1(path$3).split(/[\\/]/).slice(0, -1).reduce((set, path$4) => set.length ? set.concat(join$1(set[set.length - 1], path$4)) : [path$4], []);
3382
- const running = new Set();
3383
+ const running = /* @__PURE__ */ new Set();
3383
3384
  const getQueues = (fn) => {
3384
3385
  const res = reservations.get(fn);
3386
+ /* istanbul ignore if - unpossible */
3385
3387
  if (!res) throw new Error("function does not have any path reservations");
3386
3388
  return {
3387
3389
  paths: res.paths.map((path$3) => queues.get(path$3)),
@@ -3401,22 +3403,22 @@ else cb(er);
3401
3403
  const clear = (fn) => {
3402
3404
  if (!running.has(fn)) return false;
3403
3405
  const { paths, dirs } = reservations.get(fn);
3404
- const next = new Set();
3406
+ const next = /* @__PURE__ */ new Set();
3405
3407
  paths.forEach((path$3) => {
3406
3408
  const q = queues.get(path$3);
3407
3409
  assert__default["default"].equal(q[0], fn);
3408
3410
  if (q.length === 1) queues.delete(path$3);
3409
- else {
3411
+ else {
3410
3412
  q.shift();
3411
3413
  if (typeof q[0] === "function") next.add(q[0]);
3412
- else q[0].forEach((fn$1) => next.add(fn$1));
3414
+ else q[0].forEach((fn$1) => next.add(fn$1));
3413
3415
  }
3414
3416
  });
3415
3417
  dirs.forEach((dir) => {
3416
3418
  const q = queues.get(dir);
3417
3419
  assert__default["default"](q[0] instanceof Set);
3418
3420
  if (q[0].size === 1 && q.length === 1) queues.delete(dir);
3419
- else if (q[0].size === 1) {
3421
+ else if (q[0].size === 1) {
3420
3422
  q.shift();
3421
3423
  next.add(q[0]);
3422
3424
  } else q[0].delete(fn);
@@ -3434,13 +3436,13 @@ else if (q[0].size === 1) {
3434
3436
  paths.forEach((path$3) => {
3435
3437
  const q = queues.get(path$3);
3436
3438
  if (!q) queues.set(path$3, [fn]);
3437
- else q.push(fn);
3439
+ else q.push(fn);
3438
3440
  });
3439
3441
  dirs.forEach((dir) => {
3440
3442
  const q = queues.get(dir);
3441
3443
  if (!q) queues.set(dir, [new Set([fn])]);
3442
- else if (q[q.length - 1] instanceof Set) q[q.length - 1].add(fn);
3443
- else q.push(new Set([fn]));
3444
+ else if (q[q.length - 1] instanceof Set) q[q.length - 1].add(fn);
3445
+ else q.push(new Set([fn]));
3444
3446
  });
3445
3447
  return run(fn);
3446
3448
  };
@@ -3449,12 +3451,11 @@ else q.push(new Set([fn]));
3449
3451
  reserve
3450
3452
  };
3451
3453
  };
3452
- const platform$1 = process.env.__FAKE_PLATFORM__ || process.platform;
3453
- const isWindows$2 = platform$1 === "win32";
3454
- const fs$2 = commonjsGlobal.__FAKE_TESTING_FS__ || fs__default["default"];
3455
- const { O_CREAT, O_TRUNC, O_WRONLY, UV_FS_O_FILEMAP = 0 } = fs$2.constants;
3454
+ const isWindows$2 = (process.env.__FAKE_PLATFORM__ || process.platform) === "win32";
3455
+ /* istanbul ignore next */
3456
+ const { O_CREAT, O_TRUNC, O_WRONLY, UV_FS_O_FILEMAP = 0 } = (commonjsGlobal.__FAKE_TESTING_FS__ || fs__default["default"]).constants;
3456
3457
  const fMapEnabled = isWindows$2 && !!UV_FS_O_FILEMAP;
3457
- const fMapLimit = 524288;
3458
+ const fMapLimit = 512 * 1024;
3458
3459
  const fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY;
3459
3460
  var getWriteFlag = !fMapEnabled ? () => "w" : (size) => size < fMapLimit ? fMapFlag : "w";
3460
3461
  const ONENTRY = Symbol("onEntry");
@@ -3480,9 +3481,11 @@ else q.push(new Set([fn]));
3480
3481
  const DOCHOWN = Symbol("doChown");
3481
3482
  const UID = Symbol("uid");
3482
3483
  const GID = Symbol("gid");
3484
+ /* istanbul ignore next */
3483
3485
  const neverCalled = () => {
3484
3486
  throw new Error("sync function called cb somehow?!?");
3485
3487
  };
3488
+ /* istanbul ignore next */
3486
3489
  const unlinkFile = (path$3, cb) => {
3487
3490
  if (process.platform !== "win32") return fs__default["default"].unlink(path$3, cb);
3488
3491
  const name = path$3 + ".DELETE." + crypto__default["default"].randomBytes(16).toString("hex");
@@ -3491,6 +3494,7 @@ else q.push(new Set([fn]));
3491
3494
  fs__default["default"].unlink(name, cb);
3492
3495
  });
3493
3496
  };
3497
+ /* istanbul ignore next */
3494
3498
  const unlinkFileSync = (path$3) => {
3495
3499
  if (process.platform !== "win32") return fs__default["default"].unlinkSync(path$3);
3496
3500
  const name = path$3 + ".DELETE." + crypto__default["default"].randomBytes(16).toString("hex");
@@ -3512,7 +3516,7 @@ else q.push(new Set([fn]));
3512
3516
  this.readable = false;
3513
3517
  this[PENDING] = 0;
3514
3518
  this[ENDED] = false;
3515
- this.dirCache = opt.dirCache || new Map();
3519
+ this.dirCache = opt.dirCache || /* @__PURE__ */ new Map();
3516
3520
  if (typeof opt.uid === "number" || typeof opt.gid === "number") {
3517
3521
  if (typeof opt.uid !== "number" || typeof opt.gid !== "number") throw new TypeError("cannot set owner without number uid and gid");
3518
3522
  if (opt.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
@@ -3524,8 +3528,8 @@ else q.push(new Set([fn]));
3524
3528
  this.gid = null;
3525
3529
  this.setOwner = false;
3526
3530
  }
3527
- if (opt.preserveOwner === undefined && typeof opt.uid !== "number") this.preserveOwner = process.getuid && process.getuid() === 0;
3528
- else this.preserveOwner = !!opt.preserveOwner;
3531
+ if (opt.preserveOwner === void 0 && typeof opt.uid !== "number") this.preserveOwner = process.getuid && process.getuid() === 0;
3532
+ else this.preserveOwner = !!opt.preserveOwner;
3529
3533
  this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : null;
3530
3534
  this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : null;
3531
3535
  this.forceChown = opt.forceChown === true;
@@ -3589,7 +3593,7 @@ else this.preserveOwner = !!opt.preserveOwner;
3589
3593
  entry.path = parsed.root === "" ? winchars.encode(entry.path) : parsed.root + winchars.encode(entry.path.substr(parsed.root.length));
3590
3594
  }
3591
3595
  if (path__default["default"].isAbsolute(entry.path)) entry.absolute = entry.path;
3592
- else entry.absolute = path__default["default"].resolve(this.cwd, entry.path);
3596
+ else entry.absolute = path__default["default"].resolve(this.cwd, entry.path);
3593
3597
  return true;
3594
3598
  }
3595
3599
  [ONENTRY](entry) {
@@ -3611,7 +3615,7 @@ else entry.absolute = path__default["default"].resolve(this.cwd, entry.path);
3611
3615
  }
3612
3616
  [ONERROR](er, entry) {
3613
3617
  if (er.name === "CwdError") this.emit("error", er);
3614
- else {
3618
+ else {
3615
3619
  this.warn("TAR_ENTRY_ERROR", er, { entry });
3616
3620
  this[UNPEND]();
3617
3621
  entry.resume();
@@ -3662,7 +3666,7 @@ else {
3662
3666
  const fd = stream.fd;
3663
3667
  if (entry.mtime && !this.noMtime) {
3664
3668
  actions++;
3665
- const atime = entry.atime || new Date();
3669
+ const atime = entry.atime || /* @__PURE__ */ new Date();
3666
3670
  const mtime = entry.mtime;
3667
3671
  fs__default["default"].futimes(fd, atime, mtime, (er) => er ? fs__default["default"].utimes(abs, atime, mtime, (er2) => done(er2 && er)) : done());
3668
3672
  }
@@ -3698,7 +3702,7 @@ else {
3698
3702
  };
3699
3703
  if (entry.mtime && !this.noMtime) {
3700
3704
  actions++;
3701
- fs__default["default"].utimes(entry.absolute, entry.atime || new Date(), entry.mtime, done);
3705
+ fs__default["default"].utimes(entry.absolute, entry.atime || /* @__PURE__ */ new Date(), entry.mtime, done);
3702
3706
  }
3703
3707
  if (this[DOCHOWN](entry)) {
3704
3708
  actions++;
@@ -3749,10 +3753,10 @@ else {
3749
3753
  this[SKIP](entry);
3750
3754
  done();
3751
3755
  } else if (er$1 || this[ISREUSABLE](entry, st)) this[MAKEFS](null, entry, done);
3752
- else if (st.isDirectory()) if (entry.type === "Directory") if (!this.noChmod && (!entry.mode || (st.mode & 4095) === entry.mode)) this[MAKEFS](null, entry, done);
3753
- else fs__default["default"].chmod(entry.absolute, entry.mode, (er$2) => this[MAKEFS](er$2, entry, done));
3754
- else fs__default["default"].rmdir(entry.absolute, (er$2) => this[MAKEFS](er$2, entry, done));
3755
- else unlinkFile(entry.absolute, (er$2) => this[MAKEFS](er$2, entry, done));
3756
+ else if (st.isDirectory()) if (entry.type === "Directory") if (!this.noChmod && (!entry.mode || (st.mode & 4095) === entry.mode)) this[MAKEFS](null, entry, done);
3757
+ else fs__default["default"].chmod(entry.absolute, entry.mode, (er$2) => this[MAKEFS](er$2, entry, done));
3758
+ else fs__default["default"].rmdir(entry.absolute, (er$2) => this[MAKEFS](er$2, entry, done));
3759
+ else unlinkFile(entry.absolute, (er$2) => this[MAKEFS](er$2, entry, done));
3756
3760
  });
3757
3761
  });
3758
3762
  }
@@ -3784,12 +3788,12 @@ else unlinkFile(entry.absolute, (er$2) => this[MAKEFS](er$2, entry, done));
3784
3788
  try {
3785
3789
  const st = fs__default["default"].lstatSync(entry.absolute);
3786
3790
  if (this.keep || this.newer && st.mtime > entry.mtime) return this[SKIP](entry);
3787
- else if (this[ISREUSABLE](entry, st)) return this[MAKEFS](null, entry, neverCalled);
3788
- else try {
3791
+ else if (this[ISREUSABLE](entry, st)) return this[MAKEFS](null, entry, neverCalled);
3792
+ else try {
3789
3793
  if (st.isDirectory()) if (entry.type === "Directory") {
3790
3794
  if (!this.noChmod && entry.mode && (st.mode & 4095) !== entry.mode) fs__default["default"].chmodSync(entry.absolute, entry.mode);
3791
3795
  } else fs__default["default"].rmdirSync(entry.absolute);
3792
- else unlinkFileSync(entry.absolute);
3796
+ else unlinkFileSync(entry.absolute);
3793
3797
  return this[MAKEFS](null, entry, neverCalled);
3794
3798
  } catch (er$1) {
3795
3799
  return this[ONERROR](er$1, entry);
@@ -3830,7 +3834,7 @@ else unlinkFileSync(entry.absolute);
3830
3834
  tx.on("end", (_$1) => {
3831
3835
  let er = null;
3832
3836
  if (entry.mtime && !this.noMtime) {
3833
- const atime = entry.atime || new Date();
3837
+ const atime = entry.atime || /* @__PURE__ */ new Date();
3834
3838
  const mtime = entry.mtime;
3835
3839
  try {
3836
3840
  fs__default["default"].futimesSync(fd, atime, mtime);
@@ -3863,7 +3867,7 @@ else unlinkFileSync(entry.absolute);
3863
3867
  const er = this[MKDIR](entry.absolute, mode);
3864
3868
  if (er) return this[ONERROR](er, entry);
3865
3869
  if (entry.mtime && !this.noMtime) try {
3866
- fs__default["default"].utimesSync(entry.absolute, entry.atime || new Date(), entry.mtime);
3870
+ fs__default["default"].utimesSync(entry.absolute, entry.atime || /* @__PURE__ */ new Date(), entry.mtime);
3867
3871
  } catch (er$1) {}
3868
3872
  if (this[DOCHOWN](entry)) try {
3869
3873
  fs__default["default"].chownSync(entry.absolute, this[UID](entry), this[GID](entry));
@@ -3901,10 +3905,10 @@ else unlinkFileSync(entry.absolute);
3901
3905
  var unpack = Unpack;
3902
3906
  var extract_1 = (opt_, files, cb) => {
3903
3907
  if (typeof opt_ === "function") cb = opt_, files = null, opt_ = {};
3904
- else if (Array.isArray(opt_)) files = opt_, opt_ = {};
3908
+ else if (Array.isArray(opt_)) files = opt_, opt_ = {};
3905
3909
  if (typeof files === "function") cb = files, files = null;
3906
3910
  if (!files) files = [];
3907
- else files = Array.from(files);
3911
+ else files = Array.from(files);
3908
3912
  const opt = highLevelOpt(opt_);
3909
3913
  if (opt.sync && typeof cb === "function") throw new TypeError("callback not supported for sync tar functions");
3910
3914
  if (!opt.file && typeof cb === "function") throw new TypeError("callback only supported with file option");
@@ -3926,23 +3930,22 @@ else files = Array.from(files);
3926
3930
  const u = new unpack.Sync(opt);
3927
3931
  const file = opt.file;
3928
3932
  const stat = fs__default["default"].statSync(file);
3929
- const readSize = opt.maxReadSize || 16777216;
3930
- const stream = new fsMinipass.ReadStreamSync(file, {
3933
+ const readSize = opt.maxReadSize || 16 * 1024 * 1024;
3934
+ new fsMinipass.ReadStreamSync(file, {
3931
3935
  readSize,
3932
3936
  size: stat.size
3933
- });
3934
- stream.pipe(u);
3937
+ }).pipe(u);
3935
3938
  };
3936
3939
  const extractFile = (opt, cb) => {
3937
3940
  const u = new unpack(opt);
3938
- const readSize = opt.maxReadSize || 16777216;
3941
+ const readSize = opt.maxReadSize || 16 * 1024 * 1024;
3939
3942
  const file = opt.file;
3940
3943
  const p = new Promise((resolve$2, reject) => {
3941
3944
  u.on("error", reject);
3942
3945
  u.on("close", resolve$2);
3943
3946
  fs__default["default"].stat(file, (er, stat) => {
3944
3947
  if (er) reject(er);
3945
- else {
3948
+ else {
3946
3949
  const stream = new fsMinipass.ReadStream(file, {
3947
3950
  readSize,
3948
3951
  size: stat.size
@@ -4806,15 +4809,15 @@ else {
4806
4809
  let h$1;
4807
4810
  let s$1;
4808
4811
  if (max === min) h$1 = 0;
4809
- else if (r === max) h$1 = (g - b) / delta;
4810
- else if (g === max) h$1 = 2 + (b - r) / delta;
4811
- else if (b === max) h$1 = 4 + (r - g) / delta;
4812
+ else if (r === max) h$1 = (g - b) / delta;
4813
+ else if (g === max) h$1 = 2 + (b - r) / delta;
4814
+ else if (b === max) h$1 = 4 + (r - g) / delta;
4812
4815
  h$1 = Math.min(h$1 * 60, 360);
4813
4816
  if (h$1 < 0) h$1 += 360;
4814
4817
  const l = (min + max) / 2;
4815
4818
  if (max === min) s$1 = 0;
4816
- else if (l <= .5) s$1 = delta / (max + min);
4817
- else s$1 = delta / (2 - max - min);
4819
+ else if (l <= .5) s$1 = delta / (max + min);
4820
+ else s$1 = delta / (2 - max - min);
4818
4821
  return [
4819
4822
  h$1,
4820
4823
  s$1 * 100,
@@ -4833,7 +4836,7 @@ else s$1 = delta / (2 - max - min);
4833
4836
  const v = Math.max(r, g, b);
4834
4837
  const diff = v - Math.min(r, g, b);
4835
4838
  const diffc = function(c) {
4836
- return (v - c) / 6 / diff + .5;
4839
+ return (v - c) / 6 / diff + 1 / 2;
4837
4840
  };
4838
4841
  if (diff === 0) {
4839
4842
  h$1 = 0;
@@ -4844,10 +4847,10 @@ else s$1 = delta / (2 - max - min);
4844
4847
  gdif = diffc(g);
4845
4848
  bdif = diffc(b);
4846
4849
  if (r === v) h$1 = bdif - gdif;
4847
- else if (g === v) h$1 = .3333333333333333 + rdif - bdif;
4848
- else if (b === v) h$1 = .6666666666666666 + gdif - rdif;
4850
+ else if (g === v) h$1 = 1 / 3 + rdif - bdif;
4851
+ else if (b === v) h$1 = 2 / 3 + gdif - rdif;
4849
4852
  if (h$1 < 0) h$1 += 1;
4850
- else if (h$1 > 1) h$1 -= 1;
4853
+ else if (h$1 > 1) h$1 -= 1;
4851
4854
  }
4852
4855
  return [
4853
4856
  h$1 * 360,
@@ -4860,8 +4863,8 @@ else if (h$1 > 1) h$1 -= 1;
4860
4863
  const g = rgb[1];
4861
4864
  let b = rgb[2];
4862
4865
  const h$1 = convert$1.rgb.hsl(rgb)[0];
4863
- const w$1 = .00392156862745098 * Math.min(r, Math.min(g, b));
4864
- b = 1 - .00392156862745098 * Math.max(r, Math.max(g, b));
4866
+ const w$1 = 1 / 255 * Math.min(r, Math.min(g, b));
4867
+ b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
4865
4868
  return [
4866
4869
  h$1,
4867
4870
  w$1 * 100,
@@ -4928,9 +4931,9 @@ else if (h$1 > 1) h$1 -= 1;
4928
4931
  x /= 95.047;
4929
4932
  y$1 /= 100;
4930
4933
  z /= 108.883;
4931
- x = x > .008856 ? x ** .3333333333333333 : 7.787 * x + .13793103448275862;
4932
- y$1 = y$1 > .008856 ? y$1 ** .3333333333333333 : 7.787 * y$1 + .13793103448275862;
4933
- z = z > .008856 ? z ** .3333333333333333 : 7.787 * z + .13793103448275862;
4934
+ x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
4935
+ y$1 = y$1 > .008856 ? y$1 ** (1 / 3) : 7.787 * y$1 + 16 / 116;
4936
+ z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
4934
4937
  const l = 116 * y$1 - 16;
4935
4938
  const a = 500 * (x - y$1);
4936
4939
  const b = 200 * (y$1 - z);
@@ -4956,7 +4959,7 @@ else if (h$1 > 1) h$1 -= 1;
4956
4959
  ];
4957
4960
  }
4958
4961
  if (l < .5) t2 = l * (1 + s$1);
4959
- else t2 = l + s$1 - l * s$1;
4962
+ else t2 = l + s$1 - l * s$1;
4960
4963
  const t1 = 2 * l - t2;
4961
4964
  const rgb = [
4962
4965
  0,
@@ -4964,13 +4967,13 @@ else t2 = l + s$1 - l * s$1;
4964
4967
  0
4965
4968
  ];
4966
4969
  for (let i = 0; i < 3; i++) {
4967
- t3 = h$1 + .3333333333333333 * -(i - 1);
4970
+ t3 = h$1 + 1 / 3 * -(i - 1);
4968
4971
  if (t3 < 0) t3++;
4969
4972
  if (t3 > 1) t3--;
4970
4973
  if (6 * t3 < 1) val = t1 + (t2 - t1) * 6 * t3;
4971
- else if (2 * t3 < 1) val = t2;
4972
- else if (3 * t3 < 2) val = t1 + (t2 - t1) * (.6666666666666666 - t3) * 6;
4973
- else val = t1;
4974
+ else if (2 * t3 < 1) val = t2;
4975
+ else if (3 * t3 < 2) val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
4976
+ else val = t1;
4974
4977
  rgb[i] = val * 255;
4975
4978
  }
4976
4979
  return rgb;
@@ -5136,9 +5139,9 @@ else val = t1;
5136
5139
  r = x * 3.2406 + y$1 * -1.5372 + z * -.4986;
5137
5140
  g = x * -.9689 + y$1 * 1.8758 + z * .0415;
5138
5141
  b = x * .0557 + y$1 * -.204 + z * 1.057;
5139
- r = r > .0031308 ? 1.055 * r ** .4166666666666667 - .055 : r * 12.92;
5140
- g = g > .0031308 ? 1.055 * g ** .4166666666666667 - .055 : g * 12.92;
5141
- b = b > .0031308 ? 1.055 * b ** .4166666666666667 - .055 : b * 12.92;
5142
+ r = r > .0031308 ? 1.055 * r ** (1 / 2.4) - .055 : r * 12.92;
5143
+ g = g > .0031308 ? 1.055 * g ** (1 / 2.4) - .055 : g * 12.92;
5144
+ b = b > .0031308 ? 1.055 * b ** (1 / 2.4) - .055 : b * 12.92;
5142
5145
  r = Math.min(Math.max(0, r), 1);
5143
5146
  g = Math.min(Math.max(0, g), 1);
5144
5147
  b = Math.min(Math.max(0, b), 1);
@@ -5155,9 +5158,9 @@ else val = t1;
5155
5158
  x /= 95.047;
5156
5159
  y$1 /= 100;
5157
5160
  z /= 108.883;
5158
- x = x > .008856 ? x ** .3333333333333333 : 7.787 * x + .13793103448275862;
5159
- y$1 = y$1 > .008856 ? y$1 ** .3333333333333333 : 7.787 * y$1 + .13793103448275862;
5160
- z = z > .008856 ? z ** .3333333333333333 : 7.787 * z + .13793103448275862;
5161
+ x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
5162
+ y$1 = y$1 > .008856 ? y$1 ** (1 / 3) : 7.787 * y$1 + 16 / 116;
5163
+ z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
5161
5164
  const l = 116 * y$1 - 16;
5162
5165
  const a = 500 * (x - y$1);
5163
5166
  const b = 200 * (y$1 - z);
@@ -5180,9 +5183,9 @@ else val = t1;
5180
5183
  const y2 = y$1 ** 3;
5181
5184
  const x2 = x ** 3;
5182
5185
  const z2 = z ** 3;
5183
- y$1 = y2 > .008856 ? y2 : (y$1 - .13793103448275862) / 7.787;
5184
- x = x2 > .008856 ? x2 : (x - .13793103448275862) / 7.787;
5185
- z = z2 > .008856 ? z2 : (z - .13793103448275862) / 7.787;
5186
+ y$1 = y2 > .008856 ? y2 : (y$1 - 16 / 116) / 7.787;
5187
+ x = x2 > .008856 ? x2 : (x - 16 / 116) / 7.787;
5188
+ z = z2 > .008856 ? z2 : (z - 16 / 116) / 7.787;
5186
5189
  x *= 95.047;
5187
5190
  y$1 *= 100;
5188
5191
  z *= 108.883;
@@ -5197,8 +5200,7 @@ else val = t1;
5197
5200
  const a = lab[1];
5198
5201
  const b = lab[2];
5199
5202
  let h$1;
5200
- const hr = Math.atan2(b, a);
5201
- h$1 = hr * 360 / 2 / Math.PI;
5203
+ h$1 = Math.atan2(b, a) * 360 / 2 / Math.PI;
5202
5204
  if (h$1 < 0) h$1 += 360;
5203
5205
  const c = Math.sqrt(a * a + b * b);
5204
5206
  return [
@@ -5210,8 +5212,7 @@ else val = t1;
5210
5212
  convert$1.lch.lab = function(lch) {
5211
5213
  const l = lch[0];
5212
5214
  const c = lch[1];
5213
- const h$1 = lch[2];
5214
- const hr = h$1 / 360 * 2 * Math.PI;
5215
+ const hr = lch[2] / 360 * 2 * Math.PI;
5215
5216
  const a = c * Math.cos(hr);
5216
5217
  const b = c * Math.sin(hr);
5217
5218
  return [
@@ -5241,8 +5242,7 @@ else val = t1;
5241
5242
  if (r > 248) return 231;
5242
5243
  return Math.round((r - 8) / 247 * 24) + 232;
5243
5244
  }
5244
- const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
5245
- return ansi;
5245
+ return 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
5246
5246
  };
5247
5247
  convert$1.ansi16.rgb = function(args) {
5248
5248
  let color = args % 10;
@@ -5286,8 +5286,7 @@ else val = t1;
5286
5286
  ];
5287
5287
  };
5288
5288
  convert$1.rgb.hex = function(args) {
5289
- const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
5290
- const string = integer.toString(16).toUpperCase();
5289
+ const string = (((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255)).toString(16).toUpperCase();
5291
5290
  return "000000".substring(string.length) + string;
5292
5291
  };
5293
5292
  convert$1.hex.rgb = function(args) {
@@ -5321,11 +5320,11 @@ else val = t1;
5321
5320
  let grayscale;
5322
5321
  let hue;
5323
5322
  if (chroma < 1) grayscale = min / (1 - chroma);
5324
- else grayscale = 0;
5323
+ else grayscale = 0;
5325
5324
  if (chroma <= 0) hue = 0;
5326
- else if (max === r) hue = (g - b) / chroma % 6;
5327
- else if (max === g) hue = 2 + (b - r) / chroma;
5328
- else hue = 4 + (r - g) / chroma;
5325
+ else if (max === r) hue = (g - b) / chroma % 6;
5326
+ else if (max === g) hue = 2 + (b - r) / chroma;
5327
+ else hue = 4 + (r - g) / chroma;
5329
5328
  hue /= 6;
5330
5329
  hue %= 1;
5331
5330
  return [
@@ -5428,11 +5427,10 @@ else hue = 4 + (r - g) / chroma;
5428
5427
  };
5429
5428
  convert$1.hcg.hsl = function(hcg) {
5430
5429
  const c = hcg[1] / 100;
5431
- const g = hcg[2] / 100;
5432
- const l = g * (1 - c) + .5 * c;
5430
+ const l = hcg[2] / 100 * (1 - c) + .5 * c;
5433
5431
  let s$1 = 0;
5434
5432
  if (l > 0 && l < .5) s$1 = c / (2 * l);
5435
- else if (l >= .5 && l < 1) s$1 = c / (2 * (1 - l));
5433
+ else if (l >= .5 && l < 1) s$1 = c / (2 * (1 - l));
5436
5434
  return [
5437
5435
  hcg[0],
5438
5436
  s$1 * 100,
@@ -5451,8 +5449,7 @@ else if (l >= .5 && l < 1) s$1 = c / (2 * (1 - l));
5451
5449
  };
5452
5450
  convert$1.hwb.hcg = function(hwb) {
5453
5451
  const w$1 = hwb[1] / 100;
5454
- const b = hwb[2] / 100;
5455
- const v = 1 - b;
5452
+ const v = 1 - hwb[2] / 100;
5456
5453
  const c = v - w$1;
5457
5454
  let g = 0;
5458
5455
  if (c < 1) g = (v - c) / (1 - c);
@@ -5515,13 +5512,11 @@ else if (l >= .5 && l < 1) s$1 = c / (2 * (1 - l));
5515
5512
  };
5516
5513
  convert$1.gray.hex = function(gray) {
5517
5514
  const val = Math.round(gray[0] / 100 * 255) & 255;
5518
- const integer = (val << 16) + (val << 8) + val;
5519
- const string = integer.toString(16).toUpperCase();
5515
+ const string = ((val << 16) + (val << 8) + val).toString(16).toUpperCase();
5520
5516
  return "000000".substring(string.length) + string;
5521
5517
  };
5522
5518
  convert$1.rgb.gray = function(rgb) {
5523
- const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
5524
- return [val / 255 * 100];
5519
+ return [(rgb[0] + rgb[1] + rgb[2]) / 3 / 255 * 100];
5525
5520
  };
5526
5521
  function buildGraph() {
5527
5522
  const graph = {};
@@ -5574,8 +5569,7 @@ else if (l >= .5 && l < 1) s$1 = c / (2 * (1 - l));
5574
5569
  const models$1 = Object.keys(graph);
5575
5570
  for (let len = models$1.length, i = 0; i < len; i++) {
5576
5571
  const toModel = models$1[i];
5577
- const node$1 = graph[toModel];
5578
- if (node$1.parent === null) continue;
5572
+ if (graph[toModel].parent === null) continue;
5579
5573
  conversion[toModel] = wrapConversion(toModel, graph);
5580
5574
  }
5581
5575
  return conversion;
@@ -5585,7 +5579,7 @@ else if (l >= .5 && l < 1) s$1 = c / (2 * (1 - l));
5585
5579
  function wrapRaw(fn) {
5586
5580
  const wrappedFn = function(...args) {
5587
5581
  const arg0 = args[0];
5588
- if (arg0 === undefined || arg0 === null) return arg0;
5582
+ if (arg0 === void 0 || arg0 === null) return arg0;
5589
5583
  if (arg0.length > 1) args = arg0;
5590
5584
  return fn(args);
5591
5585
  };
@@ -5595,7 +5589,7 @@ else if (l >= .5 && l < 1) s$1 = c / (2 * (1 - l));
5595
5589
  function wrapRounded(fn) {
5596
5590
  const wrappedFn = function(...args) {
5597
5591
  const arg0 = args[0];
5598
- if (arg0 === undefined || arg0 === null) return arg0;
5592
+ if (arg0 === void 0 || arg0 === null) return arg0;
5599
5593
  if (arg0.length > 1) args = arg0;
5600
5594
  const result = fn(args);
5601
5595
  if (typeof result === "object") for (let len = result.length, i = 0; i < len; i++) result[i] = Math.round(result[i]);
@@ -5609,8 +5603,7 @@ else if (l >= .5 && l < 1) s$1 = c / (2 * (1 - l));
5609
5603
  Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
5610
5604
  Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
5611
5605
  const routes = route(fromModel);
5612
- const routeModels = Object.keys(routes);
5613
- routeModels.forEach((toModel) => {
5606
+ Object.keys(routes).forEach((toModel) => {
5614
5607
  const fn = routes[toModel];
5615
5608
  convert[fromModel][toModel] = wrapRounded(fn);
5616
5609
  convert[fromModel][toModel].raw = wrapRaw(fn);
@@ -5619,8 +5612,7 @@ else if (l >= .5 && l < 1) s$1 = c / (2 * (1 - l));
5619
5612
  var colorConvert = convert;
5620
5613
  var ansiStyles = createCommonjsModule(function(module$1) {
5621
5614
  const wrapAnsi16 = (fn, offset) => (...args) => {
5622
- const code = fn(...args);
5623
- return `\u001B[${code + offset}m`;
5615
+ return `\u001B[${fn(...args) + offset}m`;
5624
5616
  };
5625
5617
  const wrapAnsi256 = (fn, offset) => (...args) => {
5626
5618
  const code = fn(...args);
@@ -5654,18 +5646,18 @@ else if (l >= .5 && l < 1) s$1 = c / (2 * (1 - l));
5654
5646
  /** @type {typeof import('color-convert')} */
5655
5647
  let colorConvert$1;
5656
5648
  const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
5657
- if (colorConvert$1 === undefined) colorConvert$1 = colorConvert;
5649
+ if (colorConvert$1 === void 0) colorConvert$1 = colorConvert;
5658
5650
  const offset = isBackground ? 10 : 0;
5659
5651
  const styles$1 = {};
5660
5652
  for (const [sourceSpace, suite] of Object.entries(colorConvert$1)) {
5661
5653
  const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
5662
5654
  if (sourceSpace === targetSpace) styles$1[name] = wrap(identity, offset);
5663
- else if (typeof suite === "object") styles$1[name] = wrap(suite[targetSpace], offset);
5655
+ else if (typeof suite === "object") styles$1[name] = wrap(suite[targetSpace], offset);
5664
5656
  }
5665
5657
  return styles$1;
5666
5658
  };
5667
5659
  function assembleStyles() {
5668
- const codes = new Map();
5660
+ const codes = /* @__PURE__ */ new Map();
5669
5661
  const styles$1 = {
5670
5662
  modifier: {
5671
5663
  reset: [0, 0],
@@ -5757,13 +5749,13 @@ else if (typeof suite === "object") styles$1[name] = wrap(suite[targetSpace], of
5757
5749
  const terminatorPosition = argv.indexOf("--");
5758
5750
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
5759
5751
  };
5760
- const { env: env$1 } = process;
5752
+ const { env } = process;
5761
5753
  let forceColor;
5762
5754
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) forceColor = 0;
5763
- else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) forceColor = 1;
5764
- if ("FORCE_COLOR" in env$1) if (env$1.FORCE_COLOR === "true") forceColor = 1;
5765
- else if (env$1.FORCE_COLOR === "false") forceColor = 0;
5766
- else forceColor = env$1.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env$1.FORCE_COLOR, 10), 3);
5755
+ else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) forceColor = 1;
5756
+ if ("FORCE_COLOR" in env) if (env.FORCE_COLOR === "true") forceColor = 1;
5757
+ else if (env.FORCE_COLOR === "false") forceColor = 0;
5758
+ else forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
5767
5759
  function translateLevel(level) {
5768
5760
  if (level === 0) return false;
5769
5761
  return {
@@ -5777,15 +5769,15 @@ else forceColor = env$1.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env$1.F
5777
5769
  if (forceColor === 0) return 0;
5778
5770
  if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
5779
5771
  if (hasFlag("color=256")) return 2;
5780
- if (haveStream && !streamIsTTY && forceColor === undefined) return 0;
5772
+ if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
5781
5773
  const min = forceColor || 0;
5782
- if (env$1.TERM === "dumb") return min;
5774
+ if (env.TERM === "dumb") return min;
5783
5775
  if (process.platform === "win32") {
5784
5776
  const osRelease = os__default["default"].release().split(".");
5785
5777
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
5786
5778
  return 1;
5787
5779
  }
5788
- if ("CI" in env$1) {
5780
+ if ("CI" in env) {
5789
5781
  if ([
5790
5782
  "TRAVIS",
5791
5783
  "CIRCLECI",
@@ -5793,21 +5785,21 @@ else forceColor = env$1.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env$1.F
5793
5785
  "GITLAB_CI",
5794
5786
  "GITHUB_ACTIONS",
5795
5787
  "BUILDKITE"
5796
- ].some((sign) => sign in env$1) || env$1.CI_NAME === "codeship") return 1;
5788
+ ].some((sign) => sign in env) || env.CI_NAME === "codeship") return 1;
5797
5789
  return min;
5798
5790
  }
5799
- if ("TEAMCITY_VERSION" in env$1) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$1.TEAMCITY_VERSION) ? 1 : 0;
5800
- if (env$1.COLORTERM === "truecolor") return 3;
5801
- if ("TERM_PROGRAM" in env$1) {
5802
- const version$2 = parseInt((env$1.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
5803
- switch (env$1.TERM_PROGRAM) {
5804
- case "iTerm.app": return version$2 >= 3 ? 3 : 2;
5791
+ if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
5792
+ if (env.COLORTERM === "truecolor") return 3;
5793
+ if ("TERM_PROGRAM" in env) {
5794
+ const version$1 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
5795
+ switch (env.TERM_PROGRAM) {
5796
+ case "iTerm.app": return version$1 >= 3 ? 3 : 2;
5805
5797
  case "Apple_Terminal": return 2;
5806
5798
  }
5807
5799
  }
5808
- if (/-256(color)?$/i.test(env$1.TERM)) return 2;
5809
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env$1.TERM)) return 1;
5810
- if ("COLORTERM" in env$1) return 1;
5800
+ if (/-256(color)?$/i.test(env.TERM)) return 2;
5801
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
5802
+ if ("COLORTERM" in env) return 1;
5811
5803
  return min;
5812
5804
  }
5813
5805
  function getSupportLevel(stream) {
@@ -5879,8 +5871,8 @@ else forceColor = env$1.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env$1.F
5879
5871
  for (const chunk of chunks) {
5880
5872
  const number = Number(chunk);
5881
5873
  if (!Number.isNaN(number)) results.push(number);
5882
- else if (matches = chunk.match(STRING_REGEX)) results.push(matches[2].replace(ESCAPE_REGEX, (m$1, escape, character) => escape ? unescape(escape) : character));
5883
- else throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
5874
+ else if (matches = chunk.match(STRING_REGEX)) results.push(matches[2].replace(ESCAPE_REGEX, (m$1, escape, character) => escape ? unescape(escape) : character));
5875
+ else throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
5884
5876
  }
5885
5877
  return results;
5886
5878
  }
@@ -5914,7 +5906,7 @@ else throw new Error(`Invalid Chalk template style argument: ${chunk} (in style
5914
5906
  let chunk = [];
5915
5907
  temporary.replace(TEMPLATE_REGEX, (m$1, escapeCharacter, inverse, style, close, character) => {
5916
5908
  if (escapeCharacter) chunk.push(unescape(escapeCharacter));
5917
- else if (style) {
5909
+ else if (style) {
5918
5910
  const string = chunk.join("");
5919
5911
  chunk = [];
5920
5912
  chunks.push(styles$1.length === 0 ? string : buildStyle(chalk$1, styles$1)(string));
@@ -5949,7 +5941,7 @@ else if (style) {
5949
5941
  const applyOptions = (object, options = {}) => {
5950
5942
  if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
5951
5943
  const colorLevel = stdoutColor ? stdoutColor.level : 0;
5952
- object.level = options.level === undefined ? colorLevel : options.level;
5944
+ object.level = options.level === void 0 ? colorLevel : options.level;
5953
5945
  };
5954
5946
  var ChalkClass = class {
5955
5947
  constructor(options) {
@@ -6023,7 +6015,7 @@ else if (style) {
6023
6015
  const createStyler = (open, close, parent) => {
6024
6016
  let openAll;
6025
6017
  let closeAll;
6026
- if (parent === undefined) {
6018
+ if (parent === void 0) {
6027
6019
  openAll = open;
6028
6020
  closeAll = close;
6029
6021
  } else {
@@ -6052,9 +6044,9 @@ else if (style) {
6052
6044
  const applyStyle = (self$1, string) => {
6053
6045
  if (self$1.level <= 0 || !string) return self$1._isEmpty ? "" : string;
6054
6046
  let styler = self$1._styler;
6055
- if (styler === undefined) return string;
6047
+ if (styler === void 0) return string;
6056
6048
  const { openAll, closeAll } = styler;
6057
- if (string.indexOf("\x1B") !== -1) while (styler !== undefined) {
6049
+ if (string.indexOf("\x1B") !== -1) while (styler !== void 0) {
6058
6050
  string = stringReplaceAll(string, styler.close, styler.open);
6059
6051
  styler = styler.parent;
6060
6052
  }
@@ -6069,7 +6061,7 @@ else if (style) {
6069
6061
  const arguments_ = strings.slice(1);
6070
6062
  const parts = [firstString.raw[0]];
6071
6063
  for (let i = 1; i < firstString.length; i++) parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i]));
6072
- if (template === undefined) template = templates;
6064
+ if (template === void 0) template = templates;
6073
6065
  return template(chalk$1, parts.join(""));
6074
6066
  };
6075
6067
  Object.defineProperties(Chalk.prototype, styles);
@@ -6082,7 +6074,7 @@ else if (style) {
6082
6074
  function clone(obj) {
6083
6075
  if (obj === null || typeof obj !== "object") return obj;
6084
6076
  if (obj instanceof Object) var copy = { __proto__: obj.__proto__ };
6085
- else var copy = Object.create(null);
6077
+ else var copy = Object.create(null);
6086
6078
  Object.getOwnPropertyNames(obj).forEach(function(key) {
6087
6079
  Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
6088
6080
  });
@@ -6104,49 +6096,49 @@ else var copy = Object.create(null);
6104
6096
  chdir.call(process, d$1);
6105
6097
  };
6106
6098
  var polyfills = patch;
6107
- function patch(fs$3) {
6108
- if (constants__default["default"].hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(fs$3);
6109
- if (!fs$3.lutimes) patchLutimes(fs$3);
6110
- fs$3.chown = chownFix(fs$3.chown);
6111
- fs$3.fchown = chownFix(fs$3.fchown);
6112
- fs$3.lchown = chownFix(fs$3.lchown);
6113
- fs$3.chmod = chmodFix(fs$3.chmod);
6114
- fs$3.fchmod = chmodFix(fs$3.fchmod);
6115
- fs$3.lchmod = chmodFix(fs$3.lchmod);
6116
- fs$3.chownSync = chownFixSync(fs$3.chownSync);
6117
- fs$3.fchownSync = chownFixSync(fs$3.fchownSync);
6118
- fs$3.lchownSync = chownFixSync(fs$3.lchownSync);
6119
- fs$3.chmodSync = chmodFixSync(fs$3.chmodSync);
6120
- fs$3.fchmodSync = chmodFixSync(fs$3.fchmodSync);
6121
- fs$3.lchmodSync = chmodFixSync(fs$3.lchmodSync);
6122
- fs$3.stat = statFix(fs$3.stat);
6123
- fs$3.fstat = statFix(fs$3.fstat);
6124
- fs$3.lstat = statFix(fs$3.lstat);
6125
- fs$3.statSync = statFixSync(fs$3.statSync);
6126
- fs$3.fstatSync = statFixSync(fs$3.fstatSync);
6127
- fs$3.lstatSync = statFixSync(fs$3.lstatSync);
6128
- if (!fs$3.lchmod) {
6129
- fs$3.lchmod = function(path$3, mode, cb) {
6099
+ function patch(fs$2) {
6100
+ if (constants__default["default"].hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(fs$2);
6101
+ if (!fs$2.lutimes) patchLutimes(fs$2);
6102
+ fs$2.chown = chownFix(fs$2.chown);
6103
+ fs$2.fchown = chownFix(fs$2.fchown);
6104
+ fs$2.lchown = chownFix(fs$2.lchown);
6105
+ fs$2.chmod = chmodFix(fs$2.chmod);
6106
+ fs$2.fchmod = chmodFix(fs$2.fchmod);
6107
+ fs$2.lchmod = chmodFix(fs$2.lchmod);
6108
+ fs$2.chownSync = chownFixSync(fs$2.chownSync);
6109
+ fs$2.fchownSync = chownFixSync(fs$2.fchownSync);
6110
+ fs$2.lchownSync = chownFixSync(fs$2.lchownSync);
6111
+ fs$2.chmodSync = chmodFixSync(fs$2.chmodSync);
6112
+ fs$2.fchmodSync = chmodFixSync(fs$2.fchmodSync);
6113
+ fs$2.lchmodSync = chmodFixSync(fs$2.lchmodSync);
6114
+ fs$2.stat = statFix(fs$2.stat);
6115
+ fs$2.fstat = statFix(fs$2.fstat);
6116
+ fs$2.lstat = statFix(fs$2.lstat);
6117
+ fs$2.statSync = statFixSync(fs$2.statSync);
6118
+ fs$2.fstatSync = statFixSync(fs$2.fstatSync);
6119
+ fs$2.lstatSync = statFixSync(fs$2.lstatSync);
6120
+ if (!fs$2.lchmod) {
6121
+ fs$2.lchmod = function(path$3, mode, cb) {
6130
6122
  if (cb) process.nextTick(cb);
6131
6123
  };
6132
- fs$3.lchmodSync = function() {};
6124
+ fs$2.lchmodSync = function() {};
6133
6125
  }
6134
- if (!fs$3.lchown) {
6135
- fs$3.lchown = function(path$3, uid, gid, cb) {
6126
+ if (!fs$2.lchown) {
6127
+ fs$2.lchown = function(path$3, uid, gid, cb) {
6136
6128
  if (cb) process.nextTick(cb);
6137
6129
  };
6138
- fs$3.lchownSync = function() {};
6130
+ fs$2.lchownSync = function() {};
6139
6131
  }
6140
- if (platform === "win32") fs$3.rename = function(fs$rename) {
6132
+ if (platform === "win32") fs$2.rename = (function(fs$rename) {
6141
6133
  return function(from$1, to, cb) {
6142
6134
  var start = Date.now();
6143
6135
  var backoff = 0;
6144
6136
  fs$rename(from$1, to, function CB(er) {
6145
6137
  if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) {
6146
6138
  setTimeout(function() {
6147
- fs$3.stat(to, function(stater, st) {
6139
+ fs$2.stat(to, function(stater, st) {
6148
6140
  if (stater && stater.code === "ENOENT") fs$rename(from$1, to, CB);
6149
- else cb(er);
6141
+ else cb(er);
6150
6142
  });
6151
6143
  }, backoff);
6152
6144
  if (backoff < 100) backoff += 10;
@@ -6155,8 +6147,8 @@ else cb(er);
6155
6147
  if (cb) cb(er);
6156
6148
  });
6157
6149
  };
6158
- }(fs$3.rename);
6159
- fs$3.read = function(fs$read) {
6150
+ })(fs$2.rename);
6151
+ fs$2.read = (function(fs$read) {
6160
6152
  return function(fd, buffer, offset, length, position, callback_) {
6161
6153
  var callback;
6162
6154
  if (callback_ && typeof callback_ === "function") {
@@ -6164,19 +6156,19 @@ else cb(er);
6164
6156
  callback = function(er, _, __) {
6165
6157
  if (er && er.code === "EAGAIN" && eagCounter < 10) {
6166
6158
  eagCounter++;
6167
- return fs$read.call(fs$3, fd, buffer, offset, length, position, callback);
6159
+ return fs$read.call(fs$2, fd, buffer, offset, length, position, callback);
6168
6160
  }
6169
6161
  callback_.apply(this, arguments);
6170
6162
  };
6171
6163
  }
6172
- return fs$read.call(fs$3, fd, buffer, offset, length, position, callback);
6164
+ return fs$read.call(fs$2, fd, buffer, offset, length, position, callback);
6173
6165
  };
6174
- }(fs$3.read);
6175
- fs$3.readSync = function(fs$readSync) {
6166
+ })(fs$2.read);
6167
+ fs$2.readSync = (function(fs$readSync) {
6176
6168
  return function(fd, buffer, offset, length, position) {
6177
6169
  var eagCounter = 0;
6178
6170
  while (true) try {
6179
- return fs$readSync.call(fs$3, fd, buffer, offset, length, position);
6171
+ return fs$readSync.call(fs$2, fd, buffer, offset, length, position);
6180
6172
  } catch (er) {
6181
6173
  if (er.code === "EAGAIN" && eagCounter < 10) {
6182
6174
  eagCounter++;
@@ -6185,73 +6177,73 @@ else cb(er);
6185
6177
  throw er;
6186
6178
  }
6187
6179
  };
6188
- }(fs$3.readSync);
6180
+ })(fs$2.readSync);
6189
6181
  }
6190
- function patchLchmod(fs$3) {
6191
- fs$3.lchmod = function(path$3, mode, callback) {
6192
- fs$3.open(path$3, constants__default["default"].O_WRONLY | constants__default["default"].O_SYMLINK, mode, function(err, fd) {
6182
+ function patchLchmod(fs$2) {
6183
+ fs$2.lchmod = function(path$3, mode, callback) {
6184
+ fs$2.open(path$3, constants__default["default"].O_WRONLY | constants__default["default"].O_SYMLINK, mode, function(err, fd) {
6193
6185
  if (err) {
6194
6186
  if (callback) callback(err);
6195
6187
  return;
6196
6188
  }
6197
- fs$3.fchmod(fd, mode, function(err$1) {
6198
- fs$3.close(fd, function(err2) {
6189
+ fs$2.fchmod(fd, mode, function(err$1) {
6190
+ fs$2.close(fd, function(err2) {
6199
6191
  if (callback) callback(err$1 || err2);
6200
6192
  });
6201
6193
  });
6202
6194
  });
6203
6195
  };
6204
- fs$3.lchmodSync = function(path$3, mode) {
6205
- var fd = fs$3.openSync(path$3, constants__default["default"].O_WRONLY | constants__default["default"].O_SYMLINK, mode);
6196
+ fs$2.lchmodSync = function(path$3, mode) {
6197
+ var fd = fs$2.openSync(path$3, constants__default["default"].O_WRONLY | constants__default["default"].O_SYMLINK, mode);
6206
6198
  var threw = true;
6207
6199
  var ret;
6208
6200
  try {
6209
- ret = fs$3.fchmodSync(fd, mode);
6201
+ ret = fs$2.fchmodSync(fd, mode);
6210
6202
  threw = false;
6211
6203
  } finally {
6212
6204
  if (threw) try {
6213
- fs$3.closeSync(fd);
6205
+ fs$2.closeSync(fd);
6214
6206
  } catch (er) {}
6215
- else fs$3.closeSync(fd);
6207
+ else fs$2.closeSync(fd);
6216
6208
  }
6217
6209
  return ret;
6218
6210
  };
6219
6211
  }
6220
- function patchLutimes(fs$3) {
6212
+ function patchLutimes(fs$2) {
6221
6213
  if (constants__default["default"].hasOwnProperty("O_SYMLINK")) {
6222
- fs$3.lutimes = function(path$3, at, mt, cb) {
6223
- fs$3.open(path$3, constants__default["default"].O_SYMLINK, function(er, fd) {
6214
+ fs$2.lutimes = function(path$3, at, mt, cb) {
6215
+ fs$2.open(path$3, constants__default["default"].O_SYMLINK, function(er, fd) {
6224
6216
  if (er) {
6225
6217
  if (cb) cb(er);
6226
6218
  return;
6227
6219
  }
6228
- fs$3.futimes(fd, at, mt, function(er$1) {
6229
- fs$3.close(fd, function(er2) {
6220
+ fs$2.futimes(fd, at, mt, function(er$1) {
6221
+ fs$2.close(fd, function(er2) {
6230
6222
  if (cb) cb(er$1 || er2);
6231
6223
  });
6232
6224
  });
6233
6225
  });
6234
6226
  };
6235
- fs$3.lutimesSync = function(path$3, at, mt) {
6236
- var fd = fs$3.openSync(path$3, constants__default["default"].O_SYMLINK);
6227
+ fs$2.lutimesSync = function(path$3, at, mt) {
6228
+ var fd = fs$2.openSync(path$3, constants__default["default"].O_SYMLINK);
6237
6229
  var ret;
6238
6230
  var threw = true;
6239
6231
  try {
6240
- ret = fs$3.futimesSync(fd, at, mt);
6232
+ ret = fs$2.futimesSync(fd, at, mt);
6241
6233
  threw = false;
6242
6234
  } finally {
6243
6235
  if (threw) try {
6244
- fs$3.closeSync(fd);
6236
+ fs$2.closeSync(fd);
6245
6237
  } catch (er) {}
6246
- else fs$3.closeSync(fd);
6238
+ else fs$2.closeSync(fd);
6247
6239
  }
6248
6240
  return ret;
6249
6241
  };
6250
6242
  } else {
6251
- fs$3.lutimes = function(_a, _b, _c, cb) {
6243
+ fs$2.lutimes = function(_a, _b, _c, cb) {
6252
6244
  if (cb) process.nextTick(cb);
6253
6245
  };
6254
- fs$3.lutimesSync = function() {};
6246
+ fs$2.lutimesSync = function() {};
6255
6247
  }
6256
6248
  }
6257
6249
  function chmodFix(orig) {
@@ -6315,15 +6307,14 @@ else fs$3.closeSync(fd);
6315
6307
  function chownErOk(er) {
6316
6308
  if (!er) return true;
6317
6309
  if (er.code === "ENOSYS") return true;
6318
- var nonroot = !process.getuid || process.getuid() !== 0;
6319
- if (nonroot) {
6310
+ if (!process.getuid || process.getuid() !== 0) {
6320
6311
  if (er.code === "EINVAL" || er.code === "EPERM") return true;
6321
6312
  }
6322
6313
  return false;
6323
6314
  }
6324
6315
  var Stream$5 = Stream__default["default"].Stream;
6325
6316
  var legacyStreams = legacy;
6326
- function legacy(fs$3) {
6317
+ function legacy(fs$2) {
6327
6318
  return {
6328
6319
  ReadStream: ReadStream$1,
6329
6320
  WriteStream: WriteStream$1
@@ -6338,7 +6329,7 @@ else fs$3.closeSync(fd);
6338
6329
  this.paused = false;
6339
6330
  this.flags = "r";
6340
6331
  this.mode = 438;
6341
- this.bufferSize = 65536;
6332
+ this.bufferSize = 64 * 1024;
6342
6333
  options = options || {};
6343
6334
  var keys = Object.keys(options);
6344
6335
  for (var index$1 = 0, length = keys.length; index$1 < length; index$1++) {
@@ -6346,10 +6337,10 @@ else fs$3.closeSync(fd);
6346
6337
  this[key] = options[key];
6347
6338
  }
6348
6339
  if (this.encoding) this.setEncoding(this.encoding);
6349
- if (this.start !== undefined) {
6340
+ if (this.start !== void 0) {
6350
6341
  if ("number" !== typeof this.start) throw TypeError("start must be a Number");
6351
- if (this.end === undefined) this.end = Infinity;
6352
- else if ("number" !== typeof this.end) throw TypeError("end must be a Number");
6342
+ if (this.end === void 0) this.end = Infinity;
6343
+ else if ("number" !== typeof this.end) throw TypeError("end must be a Number");
6353
6344
  if (this.start > this.end) throw new Error("start must be <= end");
6354
6345
  this.pos = this.start;
6355
6346
  }
@@ -6359,7 +6350,7 @@ else if ("number" !== typeof this.end) throw TypeError("end must be a Number");
6359
6350
  });
6360
6351
  return;
6361
6352
  }
6362
- fs$3.open(this.path, this.flags, this.mode, function(err, fd) {
6353
+ fs$2.open(this.path, this.flags, this.mode, function(err, fd) {
6363
6354
  if (err) {
6364
6355
  self$1.emit("error", err);
6365
6356
  self$1.readable = false;
@@ -6386,7 +6377,7 @@ else if ("number" !== typeof this.end) throw TypeError("end must be a Number");
6386
6377
  var key = keys[index$1];
6387
6378
  this[key] = options[key];
6388
6379
  }
6389
- if (this.start !== undefined) {
6380
+ if (this.start !== void 0) {
6390
6381
  if ("number" !== typeof this.start) throw TypeError("start must be a Number");
6391
6382
  if (this.start < 0) throw new Error("start must be >= zero");
6392
6383
  this.pos = this.start;
@@ -6394,13 +6385,13 @@ else if ("number" !== typeof this.end) throw TypeError("end must be a Number");
6394
6385
  this.busy = false;
6395
6386
  this._queue = [];
6396
6387
  if (this.fd === null) {
6397
- this._open = fs$3.open;
6388
+ this._open = fs$2.open;
6398
6389
  this._queue.push([
6399
6390
  this._open,
6400
6391
  this.path,
6401
6392
  this.flags,
6402
6393
  this.mode,
6403
- undefined
6394
+ void 0
6404
6395
  ]);
6405
6396
  this.flush();
6406
6397
  }
@@ -6411,7 +6402,7 @@ else if ("number" !== typeof this.end) throw TypeError("end must be a Number");
6411
6402
  function noop$1() {}
6412
6403
  var debug$3 = noop$1;
6413
6404
  if (util__default["default"].debuglog) debug$3 = util__default["default"].debuglog("gfs4");
6414
- else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) debug$3 = function() {
6405
+ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) debug$3 = function() {
6415
6406
  var m$1 = util__default["default"].format.apply(util__default["default"], arguments);
6416
6407
  m$1 = "GFS4: " + m$1.split(/\n/).join("\nGFS4: ");
6417
6408
  console.error(m$1);
@@ -6422,30 +6413,30 @@ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) debug$3 = function() {
6422
6413
  });
6423
6414
  module$1.exports = patch$1(fs_1);
6424
6415
  if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) module$1.exports = patch$1(fs__default["default"]);
6425
- module$1.exports.close = fs__default["default"].close = function(fs$close) {
6416
+ module$1.exports.close = fs__default["default"].close = (function(fs$close) {
6426
6417
  return function(fd, cb) {
6427
6418
  return fs$close.call(fs__default["default"], fd, function(err) {
6428
6419
  if (!err) retry();
6429
6420
  if (typeof cb === "function") cb.apply(this, arguments);
6430
6421
  });
6431
6422
  };
6432
- }(fs__default["default"].close);
6433
- module$1.exports.closeSync = fs__default["default"].closeSync = function(fs$closeSync) {
6423
+ })(fs__default["default"].close);
6424
+ module$1.exports.closeSync = fs__default["default"].closeSync = (function(fs$closeSync) {
6434
6425
  return function(fd) {
6435
6426
  var rval = fs$closeSync.apply(fs__default["default"], arguments);
6436
6427
  retry();
6437
6428
  return rval;
6438
6429
  };
6439
- }(fs__default["default"].closeSync);
6440
- function patch$1(fs$3) {
6441
- polyfills(fs$3);
6442
- fs$3.gracefulify = patch$1;
6443
- fs$3.FileReadStream = ReadStream$1;
6444
- fs$3.FileWriteStream = WriteStream$1;
6445
- fs$3.createReadStream = createReadStream;
6446
- fs$3.createWriteStream = createWriteStream;
6447
- var fs$readFile = fs$3.readFile;
6448
- fs$3.readFile = readFile;
6430
+ })(fs__default["default"].closeSync);
6431
+ function patch$1(fs$2) {
6432
+ polyfills(fs$2);
6433
+ fs$2.gracefulify = patch$1;
6434
+ fs$2.FileReadStream = ReadStream$1;
6435
+ fs$2.FileWriteStream = WriteStream$1;
6436
+ fs$2.createReadStream = createReadStream;
6437
+ fs$2.createWriteStream = createWriteStream;
6438
+ var fs$readFile = fs$2.readFile;
6439
+ fs$2.readFile = readFile;
6449
6440
  function readFile(path$3, options, cb) {
6450
6441
  if (typeof options === "function") cb = options, options = null;
6451
6442
  return go$readFile(path$3, options, cb);
@@ -6456,15 +6447,15 @@ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) debug$3 = function() {
6456
6447
  options$1,
6457
6448
  cb$1
6458
6449
  ]]);
6459
- else {
6450
+ else {
6460
6451
  if (typeof cb$1 === "function") cb$1.apply(this, arguments);
6461
6452
  retry();
6462
6453
  }
6463
6454
  });
6464
6455
  }
6465
6456
  }
6466
- var fs$writeFile = fs$3.writeFile;
6467
- fs$3.writeFile = writeFile;
6457
+ var fs$writeFile = fs$2.writeFile;
6458
+ fs$2.writeFile = writeFile;
6468
6459
  function writeFile(path$3, data, options, cb) {
6469
6460
  if (typeof options === "function") cb = options, options = null;
6470
6461
  return go$writeFile(path$3, data, options, cb);
@@ -6476,15 +6467,15 @@ else {
6476
6467
  options$1,
6477
6468
  cb$1
6478
6469
  ]]);
6479
- else {
6470
+ else {
6480
6471
  if (typeof cb$1 === "function") cb$1.apply(this, arguments);
6481
6472
  retry();
6482
6473
  }
6483
6474
  });
6484
6475
  }
6485
6476
  }
6486
- var fs$appendFile = fs$3.appendFile;
6487
- if (fs$appendFile) fs$3.appendFile = appendFile;
6477
+ var fs$appendFile = fs$2.appendFile;
6478
+ if (fs$appendFile) fs$2.appendFile = appendFile;
6488
6479
  function appendFile(path$3, data, options, cb) {
6489
6480
  if (typeof options === "function") cb = options, options = null;
6490
6481
  return go$appendFile(path$3, data, options, cb);
@@ -6496,49 +6487,49 @@ else {
6496
6487
  options$1,
6497
6488
  cb$1
6498
6489
  ]]);
6499
- else {
6490
+ else {
6500
6491
  if (typeof cb$1 === "function") cb$1.apply(this, arguments);
6501
6492
  retry();
6502
6493
  }
6503
6494
  });
6504
6495
  }
6505
6496
  }
6506
- var fs$readdir = fs$3.readdir;
6507
- fs$3.readdir = readdir$1;
6497
+ var fs$readdir = fs$2.readdir;
6498
+ fs$2.readdir = readdir$1;
6508
6499
  function readdir$1(path$3, options, cb) {
6509
6500
  var args = [path$3];
6510
6501
  if (typeof options !== "function") args.push(options);
6511
- else cb = options;
6502
+ else cb = options;
6512
6503
  args.push(go$readdir$cb);
6513
6504
  return go$readdir(args);
6514
6505
  function go$readdir$cb(err, files) {
6515
6506
  if (files && files.sort) files.sort();
6516
6507
  if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([go$readdir, [args]]);
6517
- else {
6508
+ else {
6518
6509
  if (typeof cb === "function") cb.apply(this, arguments);
6519
6510
  retry();
6520
6511
  }
6521
6512
  }
6522
6513
  }
6523
6514
  function go$readdir(args) {
6524
- return fs$readdir.apply(fs$3, args);
6515
+ return fs$readdir.apply(fs$2, args);
6525
6516
  }
6526
6517
  if (process.version.substr(0, 4) === "v0.8") {
6527
- var legStreams = legacyStreams(fs$3);
6518
+ var legStreams = legacyStreams(fs$2);
6528
6519
  ReadStream$1 = legStreams.ReadStream;
6529
6520
  WriteStream$1 = legStreams.WriteStream;
6530
6521
  }
6531
- var fs$ReadStream = fs$3.ReadStream;
6522
+ var fs$ReadStream = fs$2.ReadStream;
6532
6523
  ReadStream$1.prototype = Object.create(fs$ReadStream.prototype);
6533
6524
  ReadStream$1.prototype.open = ReadStream$open;
6534
- var fs$WriteStream = fs$3.WriteStream;
6525
+ var fs$WriteStream = fs$2.WriteStream;
6535
6526
  WriteStream$1.prototype = Object.create(fs$WriteStream.prototype);
6536
6527
  WriteStream$1.prototype.open = WriteStream$open;
6537
- fs$3.ReadStream = ReadStream$1;
6538
- fs$3.WriteStream = WriteStream$1;
6528
+ fs$2.ReadStream = ReadStream$1;
6529
+ fs$2.WriteStream = WriteStream$1;
6539
6530
  function ReadStream$1(path$3, options) {
6540
6531
  if (this instanceof ReadStream$1) return fs$ReadStream.apply(this, arguments), this;
6541
- else return ReadStream$1.apply(Object.create(ReadStream$1.prototype), arguments);
6532
+ else return ReadStream$1.apply(Object.create(ReadStream$1.prototype), arguments);
6542
6533
  }
6543
6534
  function ReadStream$open() {
6544
6535
  var that = this;
@@ -6555,7 +6546,7 @@ else return ReadStream$1.apply(Object.create(ReadStream$1.prototype), arguments)
6555
6546
  }
6556
6547
  function WriteStream$1(path$3, options) {
6557
6548
  if (this instanceof WriteStream$1) return fs$WriteStream.apply(this, arguments), this;
6558
- else return WriteStream$1.apply(Object.create(WriteStream$1.prototype), arguments);
6549
+ else return WriteStream$1.apply(Object.create(WriteStream$1.prototype), arguments);
6559
6550
  }
6560
6551
  function WriteStream$open() {
6561
6552
  var that = this;
@@ -6575,8 +6566,8 @@ else return WriteStream$1.apply(Object.create(WriteStream$1.prototype), argument
6575
6566
  function createWriteStream(path$3, options) {
6576
6567
  return new WriteStream$1(path$3, options);
6577
6568
  }
6578
- var fs$open = fs$3.open;
6579
- fs$3.open = open;
6569
+ var fs$open = fs$2.open;
6570
+ fs$2.open = open;
6580
6571
  function open(path$3, flags, mode, cb) {
6581
6572
  if (typeof mode === "function") cb = mode, mode = null;
6582
6573
  return go$open(path$3, flags, mode, cb);
@@ -6588,14 +6579,14 @@ else return WriteStream$1.apply(Object.create(WriteStream$1.prototype), argument
6588
6579
  mode$1,
6589
6580
  cb$1
6590
6581
  ]]);
6591
- else {
6582
+ else {
6592
6583
  if (typeof cb$1 === "function") cb$1.apply(this, arguments);
6593
6584
  retry();
6594
6585
  }
6595
6586
  });
6596
6587
  }
6597
6588
  }
6598
- return fs$3;
6589
+ return fs$2;
6599
6590
  }
6600
6591
  function enqueue(elem) {
6601
6592
  debug$3("ENQUEUE", elem[0].name, elem[1]);
@@ -6618,7 +6609,7 @@ else {
6618
6609
  } else if (!opts || typeof opts !== "object") opts = { mode: opts };
6619
6610
  var mode = opts.mode;
6620
6611
  var xfs = opts.fs || fs__default["default"];
6621
- if (mode === undefined) mode = _0777 & ~process.umask();
6612
+ if (mode === void 0) mode = _0777 & ~process.umask();
6622
6613
  if (!made) made = null;
6623
6614
  var cb = f || function() {};
6624
6615
  p = path__default["default"].resolve(p);
@@ -6631,13 +6622,13 @@ else {
6631
6622
  case "ENOENT":
6632
6623
  mkdirP(path__default["default"].dirname(p), opts, function(er$1, made$1) {
6633
6624
  if (er$1) cb(er$1, made$1);
6634
- else mkdirP(p, opts, cb, made$1);
6625
+ else mkdirP(p, opts, cb, made$1);
6635
6626
  });
6636
6627
  break;
6637
6628
  default:
6638
6629
  xfs.stat(p, function(er2, stat) {
6639
6630
  if (er2 || !stat.isDirectory()) cb(er, made);
6640
- else cb(null, made);
6631
+ else cb(null, made);
6641
6632
  });
6642
6633
  break;
6643
6634
  }
@@ -6647,7 +6638,7 @@ else cb(null, made);
6647
6638
  if (!opts || typeof opts !== "object") opts = { mode: opts };
6648
6639
  var mode = opts.mode;
6649
6640
  var xfs = opts.fs || fs__default["default"];
6650
- if (mode === undefined) mode = _0777 & ~process.umask();
6641
+ if (mode === void 0) mode = _0777 & ~process.umask();
6651
6642
  if (!made) made = null;
6652
6643
  p = path__default["default"].resolve(p);
6653
6644
  try {
@@ -6677,7 +6668,7 @@ else cb(null, made);
6677
6668
  function rethrow() {
6678
6669
  var callback;
6679
6670
  if (DEBUG) {
6680
- var backtrace = new Error();
6671
+ var backtrace = /* @__PURE__ */ new Error();
6681
6672
  callback = debugCallback;
6682
6673
  } else callback = missingCallback;
6683
6674
  return callback;
@@ -6691,10 +6682,10 @@ else cb(null, made);
6691
6682
  function missingCallback(err) {
6692
6683
  if (err) {
6693
6684
  if (process.throwDeprecation) throw err;
6694
- else if (!process.noDeprecation) {
6685
+ else if (!process.noDeprecation) {
6695
6686
  var msg = "fs: missing callback " + (err.stack || err.message);
6696
6687
  if (process.traceDeprecation) console.trace(msg);
6697
- else console.error(msg);
6688
+ else console.error(msg);
6698
6689
  }
6699
6690
  }
6700
6691
  }
@@ -6703,147 +6694,139 @@ else console.error(msg);
6703
6694
  return typeof cb === "function" ? cb : rethrow();
6704
6695
  }
6705
6696
  path__default["default"].normalize;
6706
- if (isWindows$1) {
6707
- var nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
6708
- } else {
6709
- var nextPartRe = /(.*?)(?:[\/]+|$)/g;
6710
- }
6711
- if (isWindows$1) {
6712
- var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
6713
- } else {
6714
- var splitRootRe = /^[\/]*/;
6715
- }
6716
- var realpathSync$1 = function realpathSync$2(p, cache) {
6717
- p = path__default["default"].resolve(p);
6718
- if (cache && Object.prototype.hasOwnProperty.call(cache, p)) return cache[p];
6719
- var original = p, seenLinks = {}, knownHard = {};
6720
- var pos$1;
6721
- var current;
6722
- var base$1;
6723
- var previous;
6724
- start();
6725
- function start() {
6726
- var m$1 = splitRootRe.exec(p);
6727
- pos$1 = m$1[0].length;
6728
- current = m$1[0];
6729
- base$1 = m$1[0];
6730
- previous = "";
6731
- if (isWindows$1 && !knownHard[base$1]) {
6732
- fs__default["default"].lstatSync(base$1);
6733
- knownHard[base$1] = true;
6734
- }
6735
- }
6736
- while (pos$1 < p.length) {
6737
- nextPartRe.lastIndex = pos$1;
6738
- var result = nextPartRe.exec(p);
6739
- previous = current;
6740
- current += result[0];
6741
- base$1 = previous + result[1];
6742
- pos$1 = nextPartRe.lastIndex;
6743
- if (knownHard[base$1] || cache && cache[base$1] === base$1) continue;
6744
- var resolvedLink;
6745
- if (cache && Object.prototype.hasOwnProperty.call(cache, base$1)) resolvedLink = cache[base$1];
6746
- else {
6747
- var stat = fs__default["default"].lstatSync(base$1);
6697
+ if (isWindows$1) var nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
6698
+ else var nextPartRe = /(.*?)(?:[\/]+|$)/g;
6699
+ if (isWindows$1) var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
6700
+ else var splitRootRe = /^[\/]*/;
6701
+ var old = {
6702
+ realpathSync: function realpathSync$1(p, cache) {
6703
+ p = path__default["default"].resolve(p);
6704
+ if (cache && Object.prototype.hasOwnProperty.call(cache, p)) return cache[p];
6705
+ var original = p, seenLinks = {}, knownHard = {};
6706
+ var pos$1;
6707
+ var current;
6708
+ var base$1;
6709
+ var previous;
6710
+ start();
6711
+ function start() {
6712
+ var m$1 = splitRootRe.exec(p);
6713
+ pos$1 = m$1[0].length;
6714
+ current = m$1[0];
6715
+ base$1 = m$1[0];
6716
+ previous = "";
6717
+ if (isWindows$1 && !knownHard[base$1]) {
6718
+ fs__default["default"].lstatSync(base$1);
6719
+ knownHard[base$1] = true;
6720
+ }
6721
+ }
6722
+ while (pos$1 < p.length) {
6723
+ nextPartRe.lastIndex = pos$1;
6724
+ var result = nextPartRe.exec(p);
6725
+ previous = current;
6726
+ current += result[0];
6727
+ base$1 = previous + result[1];
6728
+ pos$1 = nextPartRe.lastIndex;
6729
+ if (knownHard[base$1] || cache && cache[base$1] === base$1) continue;
6730
+ var resolvedLink;
6731
+ if (cache && Object.prototype.hasOwnProperty.call(cache, base$1)) resolvedLink = cache[base$1];
6732
+ else {
6733
+ var stat = fs__default["default"].lstatSync(base$1);
6734
+ if (!stat.isSymbolicLink()) {
6735
+ knownHard[base$1] = true;
6736
+ if (cache) cache[base$1] = base$1;
6737
+ continue;
6738
+ }
6739
+ var linkTarget = null;
6740
+ if (!isWindows$1) {
6741
+ var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
6742
+ if (seenLinks.hasOwnProperty(id)) linkTarget = seenLinks[id];
6743
+ }
6744
+ if (linkTarget === null) {
6745
+ fs__default["default"].statSync(base$1);
6746
+ linkTarget = fs__default["default"].readlinkSync(base$1);
6747
+ }
6748
+ resolvedLink = path__default["default"].resolve(previous, linkTarget);
6749
+ if (cache) cache[base$1] = resolvedLink;
6750
+ if (!isWindows$1) seenLinks[id] = linkTarget;
6751
+ }
6752
+ p = path__default["default"].resolve(resolvedLink, p.slice(pos$1));
6753
+ start();
6754
+ }
6755
+ if (cache) cache[original] = p;
6756
+ return p;
6757
+ },
6758
+ realpath: function realpath$1(p, cache, cb) {
6759
+ if (typeof cb !== "function") {
6760
+ cb = maybeCallback(cache);
6761
+ cache = null;
6762
+ }
6763
+ p = path__default["default"].resolve(p);
6764
+ if (cache && Object.prototype.hasOwnProperty.call(cache, p)) return process.nextTick(cb.bind(null, null, cache[p]));
6765
+ var original = p, seenLinks = {}, knownHard = {};
6766
+ var pos$1;
6767
+ var current;
6768
+ var base$1;
6769
+ var previous;
6770
+ start();
6771
+ function start() {
6772
+ var m$1 = splitRootRe.exec(p);
6773
+ pos$1 = m$1[0].length;
6774
+ current = m$1[0];
6775
+ base$1 = m$1[0];
6776
+ previous = "";
6777
+ if (isWindows$1 && !knownHard[base$1]) fs__default["default"].lstat(base$1, function(err) {
6778
+ if (err) return cb(err);
6779
+ knownHard[base$1] = true;
6780
+ LOOP();
6781
+ });
6782
+ else process.nextTick(LOOP);
6783
+ }
6784
+ function LOOP() {
6785
+ if (pos$1 >= p.length) {
6786
+ if (cache) cache[original] = p;
6787
+ return cb(null, p);
6788
+ }
6789
+ nextPartRe.lastIndex = pos$1;
6790
+ var result = nextPartRe.exec(p);
6791
+ previous = current;
6792
+ current += result[0];
6793
+ base$1 = previous + result[1];
6794
+ pos$1 = nextPartRe.lastIndex;
6795
+ if (knownHard[base$1] || cache && cache[base$1] === base$1) return process.nextTick(LOOP);
6796
+ if (cache && Object.prototype.hasOwnProperty.call(cache, base$1)) return gotResolvedLink(cache[base$1]);
6797
+ return fs__default["default"].lstat(base$1, gotStat);
6798
+ }
6799
+ function gotStat(err, stat) {
6800
+ if (err) return cb(err);
6748
6801
  if (!stat.isSymbolicLink()) {
6749
6802
  knownHard[base$1] = true;
6750
6803
  if (cache) cache[base$1] = base$1;
6751
- continue;
6804
+ return process.nextTick(LOOP);
6752
6805
  }
6753
- var linkTarget = null;
6754
6806
  if (!isWindows$1) {
6755
6807
  var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
6756
- if (seenLinks.hasOwnProperty(id)) linkTarget = seenLinks[id];
6757
- }
6758
- if (linkTarget === null) {
6759
- fs__default["default"].statSync(base$1);
6760
- linkTarget = fs__default["default"].readlinkSync(base$1);
6808
+ if (seenLinks.hasOwnProperty(id)) return gotTarget(null, seenLinks[id], base$1);
6761
6809
  }
6762
- resolvedLink = path__default["default"].resolve(previous, linkTarget);
6763
- if (cache) cache[base$1] = resolvedLink;
6764
- if (!isWindows$1) seenLinks[id] = linkTarget;
6810
+ fs__default["default"].stat(base$1, function(err$1) {
6811
+ if (err$1) return cb(err$1);
6812
+ fs__default["default"].readlink(base$1, function(err$2, target) {
6813
+ if (!isWindows$1) seenLinks[id] = target;
6814
+ gotTarget(err$2, target);
6815
+ });
6816
+ });
6765
6817
  }
6766
- p = path__default["default"].resolve(resolvedLink, p.slice(pos$1));
6767
- start();
6768
- }
6769
- if (cache) cache[original] = p;
6770
- return p;
6771
- };
6772
- var realpath$1 = function realpath$2(p, cache, cb) {
6773
- if (typeof cb !== "function") {
6774
- cb = maybeCallback(cache);
6775
- cache = null;
6776
- }
6777
- p = path__default["default"].resolve(p);
6778
- if (cache && Object.prototype.hasOwnProperty.call(cache, p)) return process.nextTick(cb.bind(null, null, cache[p]));
6779
- var original = p, seenLinks = {}, knownHard = {};
6780
- var pos$1;
6781
- var current;
6782
- var base$1;
6783
- var previous;
6784
- start();
6785
- function start() {
6786
- var m$1 = splitRootRe.exec(p);
6787
- pos$1 = m$1[0].length;
6788
- current = m$1[0];
6789
- base$1 = m$1[0];
6790
- previous = "";
6791
- if (isWindows$1 && !knownHard[base$1]) fs__default["default"].lstat(base$1, function(err) {
6818
+ function gotTarget(err, target, base$2) {
6792
6819
  if (err) return cb(err);
6793
- knownHard[base$1] = true;
6794
- LOOP();
6795
- });
6796
- else process.nextTick(LOOP);
6797
- }
6798
- function LOOP() {
6799
- if (pos$1 >= p.length) {
6800
- if (cache) cache[original] = p;
6801
- return cb(null, p);
6802
- }
6803
- nextPartRe.lastIndex = pos$1;
6804
- var result = nextPartRe.exec(p);
6805
- previous = current;
6806
- current += result[0];
6807
- base$1 = previous + result[1];
6808
- pos$1 = nextPartRe.lastIndex;
6809
- if (knownHard[base$1] || cache && cache[base$1] === base$1) return process.nextTick(LOOP);
6810
- if (cache && Object.prototype.hasOwnProperty.call(cache, base$1)) return gotResolvedLink(cache[base$1]);
6811
- return fs__default["default"].lstat(base$1, gotStat);
6812
- }
6813
- function gotStat(err, stat) {
6814
- if (err) return cb(err);
6815
- if (!stat.isSymbolicLink()) {
6816
- knownHard[base$1] = true;
6817
- if (cache) cache[base$1] = base$1;
6818
- return process.nextTick(LOOP);
6819
- }
6820
- if (!isWindows$1) {
6821
- var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
6822
- if (seenLinks.hasOwnProperty(id)) return gotTarget(null, seenLinks[id], base$1);
6823
- }
6824
- fs__default["default"].stat(base$1, function(err$1) {
6825
- if (err$1) return cb(err$1);
6826
- fs__default["default"].readlink(base$1, function(err$2, target) {
6827
- if (!isWindows$1) seenLinks[id] = target;
6828
- gotTarget(err$2, target);
6829
- });
6830
- });
6831
- }
6832
- function gotTarget(err, target, base$2) {
6833
- if (err) return cb(err);
6834
- var resolvedLink = path__default["default"].resolve(previous, target);
6835
- if (cache) cache[base$2] = resolvedLink;
6836
- gotResolvedLink(resolvedLink);
6837
- }
6838
- function gotResolvedLink(resolvedLink) {
6839
- p = path__default["default"].resolve(resolvedLink, p.slice(pos$1));
6840
- start();
6820
+ var resolvedLink = path__default["default"].resolve(previous, target);
6821
+ if (cache) cache[base$2] = resolvedLink;
6822
+ gotResolvedLink(resolvedLink);
6823
+ }
6824
+ function gotResolvedLink(resolvedLink) {
6825
+ p = path__default["default"].resolve(resolvedLink, p.slice(pos$1));
6826
+ start();
6827
+ }
6841
6828
  }
6842
6829
  };
6843
- var old = {
6844
- realpathSync: realpathSync$1,
6845
- realpath: realpath$1
6846
- };
6847
6830
  var fs_realpath = realpath;
6848
6831
  realpath.realpath = realpath;
6849
6832
  realpath.sync = realpathSync;
@@ -6865,7 +6848,7 @@ else process.nextTick(LOOP);
6865
6848
  }
6866
6849
  origRealpath(p, cache, function(er, result) {
6867
6850
  if (newError(er)) old.realpath(p, cache, cb);
6868
- else cb(er, result);
6851
+ else cb(er, result);
6869
6852
  });
6870
6853
  }
6871
6854
  function realpathSync(p, cache) {
@@ -6874,7 +6857,7 @@ else cb(er, result);
6874
6857
  return origRealpathSync(p, cache);
6875
6858
  } catch (er) {
6876
6859
  if (newError(er)) return old.realpathSync(p, cache);
6877
- else throw er;
6860
+ else throw er;
6878
6861
  }
6879
6862
  }
6880
6863
  function monkeypatch() {
@@ -6890,7 +6873,7 @@ else throw er;
6890
6873
  for (var i = 0; i < xs.length; i++) {
6891
6874
  var x = fn(xs[i], i);
6892
6875
  if (isArray(x)) res.push.apply(res, x);
6893
- else res.push(x);
6876
+ else res.push(x);
6894
6877
  }
6895
6878
  return res;
6896
6879
  };
@@ -6928,7 +6911,7 @@ else res.push(x);
6928
6911
  begs.push(i);
6929
6912
  ai = str.indexOf(a, i + 1);
6930
6913
  } else if (begs.length == 1) result = [begs.pop(), bi];
6931
- else {
6914
+ else {
6932
6915
  beg = begs.pop();
6933
6916
  if (beg < left) {
6934
6917
  left = beg;
@@ -7009,7 +6992,7 @@ else {
7009
6992
  }
7010
6993
  var n;
7011
6994
  if (isSequence) n = m$1.body.split(/\.\./);
7012
- else {
6995
+ else {
7013
6996
  n = parseCommaParts(m$1.body);
7014
6997
  if (n.length === 1) {
7015
6998
  n = expand(n[0], false).map(embrace);
@@ -7030,8 +7013,7 @@ else {
7030
7013
  var width = Math.max(n[0].length, n[1].length);
7031
7014
  var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
7032
7015
  var test = lte;
7033
- var reverse = y$1 < x;
7034
- if (reverse) {
7016
+ if (y$1 < x) {
7035
7017
  incr *= -1;
7036
7018
  test = gte;
7037
7019
  }
@@ -7049,7 +7031,7 @@ else {
7049
7031
  if (need > 0) {
7050
7032
  var z = new Array(need + 1).join("0");
7051
7033
  if (i < 0) c = "-" + z + c.slice(1);
7052
- else c = z + c;
7034
+ else c = z + c;
7053
7035
  }
7054
7036
  }
7055
7037
  }
@@ -7213,7 +7195,7 @@ else c = z + c;
7213
7195
  Minimatch$1.prototype.braceExpand = braceExpand;
7214
7196
  function braceExpand(pattern, options) {
7215
7197
  if (!options) if (this instanceof Minimatch$1) options = this.options;
7216
- else options = {};
7198
+ else options = {};
7217
7199
  pattern = typeof pattern === "undefined" ? this.pattern : pattern;
7218
7200
  if (typeof pattern === "undefined") throw new TypeError("undefined pattern");
7219
7201
  if (options.nobrace || !pattern.match(/\{.*\}/)) return [pattern];
@@ -7222,7 +7204,7 @@ else options = {};
7222
7204
  Minimatch$1.prototype.parse = parse$2;
7223
7205
  var SUBPARSE = {};
7224
7206
  function parse$2(pattern, isSub) {
7225
- if (pattern.length > 65536) throw new TypeError("pattern is too long");
7207
+ if (pattern.length > 1024 * 64) throw new TypeError("pattern is too long");
7226
7208
  var options = this.options;
7227
7209
  if (!options.noglobstar && pattern === "**") return GLOBSTAR;
7228
7210
  if (pattern === "") return "";
@@ -7363,7 +7345,7 @@ else options = {};
7363
7345
  default:
7364
7346
  clearStateChar();
7365
7347
  if (escaping) escaping = false;
7366
- else if (reSpecials[c] && !(c === "^" && inClass)) re += "\\";
7348
+ else if (reSpecials[c] && !(c === "^" && inClass)) re += "\\";
7367
7349
  re += c;
7368
7350
  }
7369
7351
  }
@@ -7406,8 +7388,7 @@ else if (reSpecials[c] && !(c === "^" && inClass)) re += "\\";
7406
7388
  nlAfter = cleanAfter;
7407
7389
  var dollar = "";
7408
7390
  if (nlAfter === "" && isSub !== SUBPARSE) dollar = "$";
7409
- var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast;
7410
- re = newRe;
7391
+ re = nlBefore + nlFirst + nlAfter + dollar + nlLast;
7411
7392
  }
7412
7393
  if (re !== "" && hasMagic) re = "(?=.)" + re;
7413
7394
  if (addPatternStart) re = patternStart + re;
@@ -7417,7 +7398,7 @@ else if (reSpecials[c] && !(c === "^" && inClass)) re += "\\";
7417
7398
  try {
7418
7399
  var regExp = new RegExp("^" + re + "$", flags);
7419
7400
  } catch (er) {
7420
- return new RegExp("$.");
7401
+ return /* @__PURE__ */ new RegExp("$.");
7421
7402
  }
7422
7403
  regExp._glob = pattern;
7423
7404
  regExp._src = re;
@@ -7482,8 +7463,7 @@ else if (reSpecials[c] && !(c === "^" && inClass)) re += "\\";
7482
7463
  var pattern = set[i];
7483
7464
  var file = f;
7484
7465
  if (options.matchBase && pattern.length === 1) file = [filename];
7485
- var hit = this.matchOne(file, pattern, partial);
7486
- if (hit) {
7466
+ if (this.matchOne(file, pattern, partial)) {
7487
7467
  if (options.flipNegate) return true;
7488
7468
  return !this.negate;
7489
7469
  }
@@ -7542,7 +7522,7 @@ else if (reSpecials[c] && !(c === "^" && inClass)) re += "\\";
7542
7522
  var hit;
7543
7523
  if (typeof p === "string") {
7544
7524
  if (options.nocase) hit = f.toLowerCase() === p.toLowerCase();
7545
- else hit = f === p;
7525
+ else hit = f === p;
7546
7526
  this.debug("string match", p, f, hit);
7547
7527
  } else {
7548
7528
  hit = f.match(p);
@@ -7551,11 +7531,8 @@ else hit = f === p;
7551
7531
  if (!hit) return false;
7552
7532
  }
7553
7533
  if (fi === fl && pi === pl) return true;
7554
- else if (fi === fl) return partial;
7555
- else if (pi === pl) {
7556
- var emptyFileEnd = fi === fl - 1 && file[fi] === "";
7557
- return emptyFileEnd;
7558
- }
7534
+ else if (fi === fl) return partial;
7535
+ else if (pi === pl) return fi === fl - 1 && file[fi] === "";
7559
7536
  throw new Error("wtf?");
7560
7537
  };
7561
7538
  function globUnescape(s$1) {
@@ -7574,7 +7551,7 @@ else if (pi === pl) {
7574
7551
  configurable: true
7575
7552
  } });
7576
7553
  };
7577
- else module$1.exports = function inherits$1(ctor, superCtor) {
7554
+ else module$1.exports = function inherits$1(ctor, superCtor) {
7578
7555
  ctor.super_ = superCtor;
7579
7556
  var TempCtor = function() {};
7580
7557
  TempCtor.prototype = superCtor.prototype;
@@ -7595,8 +7572,7 @@ else module$1.exports = function inherits$1(ctor, superCtor) {
7595
7572
  return path$3.charAt(0) === "/";
7596
7573
  }
7597
7574
  function win32(path$3) {
7598
- var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
7599
- var result = splitDeviceRe.exec(path$3);
7575
+ var result = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(path$3);
7600
7576
  var device = result[1] || "";
7601
7577
  var isUnc = Boolean(device && device.charAt(1) !== ":");
7602
7578
  return Boolean(result[2] || isUnc);
@@ -7673,7 +7649,7 @@ else module$1.exports = function inherits$1(ctor, superCtor) {
7673
7649
  self$1.changedCwd = false;
7674
7650
  var cwd$1 = process.cwd();
7675
7651
  if (!ownProp$2(options, "cwd")) self$1.cwd = cwd$1;
7676
- else {
7652
+ else {
7677
7653
  self$1.cwd = path__default["default"].resolve(options.cwd);
7678
7654
  self$1.changedCwd = self$1.cwd !== cwd$1;
7679
7655
  }
@@ -7697,12 +7673,12 @@ else {
7697
7673
  if (self$1.nonull) {
7698
7674
  var literal = self$1.minimatch.globSet[i];
7699
7675
  if (nou) all.push(literal);
7700
- else all[literal] = true;
7676
+ else all[literal] = true;
7701
7677
  }
7702
7678
  } else {
7703
7679
  var m$1 = Object.keys(matches);
7704
7680
  if (nou) all.push.apply(all, m$1);
7705
- else m$1.forEach(function(m$2) {
7681
+ else m$1.forEach(function(m$2) {
7706
7682
  all[m$2] = true;
7707
7683
  });
7708
7684
  }
@@ -7731,7 +7707,7 @@ else m$1.forEach(function(m$2) {
7731
7707
  var isDir = c === "DIR" || Array.isArray(c);
7732
7708
  var slash = p.slice(-1) === "/";
7733
7709
  if (isDir && !slash) m$1 += "/";
7734
- else if (!isDir && slash) m$1 = m$1.slice(0, -1);
7710
+ else if (!isDir && slash) m$1 = m$1.slice(0, -1);
7735
7711
  if (m$1 !== p) {
7736
7712
  var mabs = makeAbs(self$1, m$1);
7737
7713
  self$1.statCache[mabs] = self$1.statCache[abs];
@@ -7743,9 +7719,9 @@ else if (!isDir && slash) m$1 = m$1.slice(0, -1);
7743
7719
  function makeAbs(self$1, f) {
7744
7720
  var abs = f;
7745
7721
  if (f.charAt(0) === "/") abs = path__default["default"].join(self$1.root, f);
7746
- else if (pathIsAbsolute(f) || f === "") abs = f;
7747
- else if (self$1.changedCwd) abs = path__default["default"].resolve(self$1.cwd, f);
7748
- else abs = path__default["default"].resolve(f);
7722
+ else if (pathIsAbsolute(f) || f === "") abs = f;
7723
+ else if (self$1.changedCwd) abs = path__default["default"].resolve(self$1.cwd, f);
7724
+ else abs = path__default["default"].resolve(f);
7749
7725
  if (process.platform === "win32") abs = abs.replace(/\\/g, "/");
7750
7726
  return abs;
7751
7727
  }
@@ -7805,7 +7781,7 @@ else abs = path__default["default"].resolve(f);
7805
7781
  set[real] = true;
7806
7782
  } catch (er) {
7807
7783
  if (er.syscall === "stat") set[self$1._makeAbs(p)] = true;
7808
- else throw er;
7784
+ else throw er;
7809
7785
  }
7810
7786
  });
7811
7787
  }
@@ -7830,15 +7806,14 @@ else throw er;
7830
7806
  var remain = pattern.slice(n);
7831
7807
  var read;
7832
7808
  if (prefix === null) read = ".";
7833
- else if (pathIsAbsolute(prefix) || pathIsAbsolute(pattern.join("/"))) {
7809
+ else if (pathIsAbsolute(prefix) || pathIsAbsolute(pattern.join("/"))) {
7834
7810
  if (!prefix || !pathIsAbsolute(prefix)) prefix = "/" + prefix;
7835
7811
  read = prefix;
7836
7812
  } else read = prefix;
7837
7813
  var abs = this._makeAbs(read);
7838
7814
  if (childrenIgnored$1(this, read)) return;
7839
- var isGlobStar = remain[0] === minimatch_1.GLOBSTAR;
7840
- if (isGlobStar) this._processGlobStar(prefix, read, abs, remain, index$1, inGlobStar);
7841
- else this._processReaddir(prefix, read, abs, remain, index$1, inGlobStar);
7815
+ if (remain[0] === minimatch_1.GLOBSTAR) this._processGlobStar(prefix, read, abs, remain, index$1, inGlobStar);
7816
+ else this._processReaddir(prefix, read, abs, remain, index$1, inGlobStar);
7842
7817
  };
7843
7818
  GlobSync$1.prototype._processReaddir = function(prefix, read, abs, remain, index$1, inGlobStar) {
7844
7819
  var entries = this._readdir(abs, inGlobStar);
@@ -7853,7 +7828,7 @@ else this._processReaddir(prefix, read, abs, remain, index$1, inGlobStar);
7853
7828
  if (e.charAt(0) !== "." || dotOk) {
7854
7829
  var m$1;
7855
7830
  if (negate && !prefix) m$1 = !e.match(pn);
7856
- else m$1 = e.match(pn);
7831
+ else m$1 = e.match(pn);
7857
7832
  if (m$1) matchedEntries.push(e);
7858
7833
  }
7859
7834
  }
@@ -7864,7 +7839,7 @@ else m$1 = e.match(pn);
7864
7839
  for (var i = 0; i < len; i++) {
7865
7840
  var e = matchedEntries[i];
7866
7841
  if (prefix) if (prefix.slice(-1) !== "/") e = prefix + "/" + e;
7867
- else e = prefix + e;
7842
+ else e = prefix + e;
7868
7843
  if (e.charAt(0) === "/" && !this.nomount) e = path__default["default"].join(this.root, e);
7869
7844
  this._emitMatch(index$1, e);
7870
7845
  }
@@ -7875,7 +7850,7 @@ else e = prefix + e;
7875
7850
  var e = matchedEntries[i];
7876
7851
  var newPattern;
7877
7852
  if (prefix) newPattern = [prefix, e];
7878
- else newPattern = [e];
7853
+ else newPattern = [e];
7879
7854
  this._process(newPattern.concat(remain), index$1, inGlobStar);
7880
7855
  }
7881
7856
  };
@@ -7904,7 +7879,7 @@ else newPattern = [e];
7904
7879
  var isSym = lstat && lstat.isSymbolicLink();
7905
7880
  this.symlinks[abs] = isSym;
7906
7881
  if (!isSym && lstat && !lstat.isDirectory()) this.cache[abs] = "FILE";
7907
- else entries = this._readdir(abs, false);
7882
+ else entries = this._readdir(abs, false);
7908
7883
  return entries;
7909
7884
  };
7910
7885
  GlobSync$1.prototype._readdir = function(abs, inGlobStar) {
@@ -7925,7 +7900,7 @@ else entries = this._readdir(abs, false);
7925
7900
  if (!this.mark && !this.stat) for (var i = 0; i < entries.length; i++) {
7926
7901
  var e = entries[i];
7927
7902
  if (abs === "/") e = abs + e;
7928
- else e = abs + "/" + e;
7903
+ else e = abs + "/" + e;
7929
7904
  this.cache[e] = true;
7930
7905
  }
7931
7906
  this.cache[abs] = entries;
@@ -7938,7 +7913,7 @@ else e = abs + "/" + e;
7938
7913
  var abs = this._makeAbs(f);
7939
7914
  this.cache[abs] = "FILE";
7940
7915
  if (abs === this.cwdAbs) {
7941
- var error = new Error(er.code + " invalid cwd " + this.cwd);
7916
+ var error = /* @__PURE__ */ new Error(er.code + " invalid cwd " + this.cwd);
7942
7917
  error.path = this.cwd;
7943
7918
  error.code = er.code;
7944
7919
  throw error;
@@ -7965,11 +7940,9 @@ else e = abs + "/" + e;
7965
7940
  var noGlobStar = gspref.concat(remainWithoutGlobStar);
7966
7941
  this._process(noGlobStar, index$1, false);
7967
7942
  var len = entries.length;
7968
- var isSym = this.symlinks[abs];
7969
- if (isSym && inGlobStar) return;
7943
+ if (this.symlinks[abs] && inGlobStar) return;
7970
7944
  for (var i = 0; i < len; i++) {
7971
- var e = entries[i];
7972
- if (e.charAt(0) === "." && !this.dot) continue;
7945
+ if (entries[i].charAt(0) === "." && !this.dot) continue;
7973
7946
  var instead = gspref.concat(entries[i], remainWithoutGlobStar);
7974
7947
  this._process(instead, index$1, true);
7975
7948
  var below = gspref.concat(entries[i], remain);
@@ -7983,7 +7956,7 @@ else e = abs + "/" + e;
7983
7956
  if (prefix && pathIsAbsolute(prefix) && !this.nomount) {
7984
7957
  var trail = /[\/\\]$/.test(prefix);
7985
7958
  if (prefix.charAt(0) === "/") prefix = path__default["default"].join(this.root, prefix);
7986
- else {
7959
+ else {
7987
7960
  prefix = path__default["default"].resolve(this.root, prefix);
7988
7961
  if (trail) prefix += "/";
7989
7962
  }
@@ -8017,7 +7990,7 @@ else {
8017
7990
  } catch (er) {
8018
7991
  stat = lstat;
8019
7992
  }
8020
- else stat = lstat;
7993
+ else stat = lstat;
8021
7994
  }
8022
7995
  this.statCache[abs] = stat;
8023
7996
  var c = true;
@@ -8082,8 +8055,7 @@ else stat = lstat;
8082
8055
  f.called = true;
8083
8056
  return f.value = fn.apply(this, arguments);
8084
8057
  };
8085
- var name = fn.name || "Function wrapped with `once`";
8086
- f.onceError = name + " shouldn't be called more than once";
8058
+ f.onceError = (fn.name || "Function wrapped with `once`") + " shouldn't be called more than once";
8087
8059
  f.called = false;
8088
8060
  return f;
8089
8061
  }
@@ -8150,8 +8122,7 @@ else stat = lstat;
8150
8122
  glob$1.hasMagic = function(pattern, options_) {
8151
8123
  var options = extend({}, options_);
8152
8124
  options.noprocess = true;
8153
- var g = new Glob(pattern, options);
8154
- var set = g.minimatch.set;
8125
+ var set = new Glob(pattern, options).minimatch.set;
8155
8126
  if (!pattern) return false;
8156
8127
  if (set.length > 1) return true;
8157
8128
  for (var j = 0; j < set[0].length; j++) if (typeof set[0][j] !== "string") return true;
@@ -8195,7 +8166,7 @@ else stat = lstat;
8195
8166
  if (self$1._processing <= 0) if (sync$2) process.nextTick(function() {
8196
8167
  self$1._finish();
8197
8168
  });
8198
- else self$1._finish();
8169
+ else self$1._finish();
8199
8170
  }
8200
8171
  }
8201
8172
  Glob.prototype._finish = function() {
@@ -8228,8 +8199,8 @@ else self$1._finish();
8228
8199
  p = self$1._makeAbs(p);
8229
8200
  fs_realpath.realpath(p, self$1.realpathCache, function(er, real) {
8230
8201
  if (!er) set[real] = true;
8231
- else if (er.syscall === "stat") set[p] = true;
8232
- else self$1.emit("error", er);
8202
+ else if (er.syscall === "stat") set[p] = true;
8203
+ else self$1.emit("error", er);
8233
8204
  if (--n === 0) {
8234
8205
  self$1.matches[index$1] = set;
8235
8206
  cb();
@@ -8307,15 +8278,14 @@ else self$1.emit("error", er);
8307
8278
  var remain = pattern.slice(n);
8308
8279
  var read;
8309
8280
  if (prefix === null) read = ".";
8310
- else if (pathIsAbsolute(prefix) || pathIsAbsolute(pattern.join("/"))) {
8281
+ else if (pathIsAbsolute(prefix) || pathIsAbsolute(pattern.join("/"))) {
8311
8282
  if (!prefix || !pathIsAbsolute(prefix)) prefix = "/" + prefix;
8312
8283
  read = prefix;
8313
8284
  } else read = prefix;
8314
8285
  var abs = this._makeAbs(read);
8315
8286
  if (childrenIgnored(this, read)) return cb();
8316
- var isGlobStar = remain[0] === minimatch_1.GLOBSTAR;
8317
- if (isGlobStar) this._processGlobStar(prefix, read, abs, remain, index$1, inGlobStar, cb);
8318
- else this._processReaddir(prefix, read, abs, remain, index$1, inGlobStar, cb);
8287
+ if (remain[0] === minimatch_1.GLOBSTAR) this._processGlobStar(prefix, read, abs, remain, index$1, inGlobStar, cb);
8288
+ else this._processReaddir(prefix, read, abs, remain, index$1, inGlobStar, cb);
8319
8289
  };
8320
8290
  Glob.prototype._processReaddir = function(prefix, read, abs, remain, index$1, inGlobStar, cb) {
8321
8291
  var self$1 = this;
@@ -8335,7 +8305,7 @@ else this._processReaddir(prefix, read, abs, remain, index$1, inGlobStar, cb);
8335
8305
  if (e.charAt(0) !== "." || dotOk) {
8336
8306
  var m$1;
8337
8307
  if (negate && !prefix) m$1 = !e.match(pn);
8338
- else m$1 = e.match(pn);
8308
+ else m$1 = e.match(pn);
8339
8309
  if (m$1) matchedEntries.push(e);
8340
8310
  }
8341
8311
  }
@@ -8346,7 +8316,7 @@ else m$1 = e.match(pn);
8346
8316
  for (var i = 0; i < len; i++) {
8347
8317
  var e = matchedEntries[i];
8348
8318
  if (prefix) if (prefix !== "/") e = prefix + "/" + e;
8349
- else e = prefix + e;
8319
+ else e = prefix + e;
8350
8320
  if (e.charAt(0) === "/" && !this.nomount) e = path__default["default"].join(this.root, e);
8351
8321
  this._emitMatch(index$1, e);
8352
8322
  }
@@ -8356,7 +8326,7 @@ else e = prefix + e;
8356
8326
  for (var i = 0; i < len; i++) {
8357
8327
  var e = matchedEntries[i];
8358
8328
  if (prefix) if (prefix !== "/") e = prefix + "/" + e;
8359
- else e = prefix + e;
8329
+ else e = prefix + e;
8360
8330
  this._process([e].concat(remain), index$1, inGlobStar, cb);
8361
8331
  }
8362
8332
  cb();
@@ -8413,7 +8383,7 @@ else e = prefix + e;
8413
8383
  function readdirCb(self$1, abs, cb) {
8414
8384
  return function(er, entries) {
8415
8385
  if (er) self$1._readdirError(abs, er, cb);
8416
- else self$1._readdirEntries(abs, entries, cb);
8386
+ else self$1._readdirEntries(abs, entries, cb);
8417
8387
  };
8418
8388
  }
8419
8389
  Glob.prototype._readdirEntries = function(abs, entries, cb) {
@@ -8421,7 +8391,7 @@ else self$1._readdirEntries(abs, entries, cb);
8421
8391
  if (!this.mark && !this.stat) for (var i = 0; i < entries.length; i++) {
8422
8392
  var e = entries[i];
8423
8393
  if (abs === "/") e = abs + e;
8424
- else e = abs + "/" + e;
8394
+ else e = abs + "/" + e;
8425
8395
  this.cache[e] = true;
8426
8396
  }
8427
8397
  this.cache[abs] = entries;
@@ -8435,7 +8405,7 @@ else e = abs + "/" + e;
8435
8405
  var abs = this._makeAbs(f);
8436
8406
  this.cache[abs] = "FILE";
8437
8407
  if (abs === this.cwdAbs) {
8438
- var error = new Error(er.code + " invalid cwd " + this.cwd);
8408
+ var error = /* @__PURE__ */ new Error(er.code + " invalid cwd " + this.cwd);
8439
8409
  error.path = this.cwd;
8440
8410
  error.code = er.code;
8441
8411
  this.emit("error", error);
@@ -8475,8 +8445,7 @@ else e = abs + "/" + e;
8475
8445
  var len = entries.length;
8476
8446
  if (isSym && inGlobStar) return cb();
8477
8447
  for (var i = 0; i < len; i++) {
8478
- var e = entries[i];
8479
- if (e.charAt(0) === "." && !this.dot) continue;
8448
+ if (entries[i].charAt(0) === "." && !this.dot) continue;
8480
8449
  var instead = gspref.concat(entries[i], remainWithoutGlobStar);
8481
8450
  this._process(instead, index$1, true, cb);
8482
8451
  var below = gspref.concat(entries[i], remain);
@@ -8496,7 +8465,7 @@ else e = abs + "/" + e;
8496
8465
  if (prefix && pathIsAbsolute(prefix) && !this.nomount) {
8497
8466
  var trail = /[\/\\]$/.test(prefix);
8498
8467
  if (prefix.charAt(0) === "/") prefix = path__default["default"].join(this.root, prefix);
8499
- else {
8468
+ else {
8500
8469
  prefix = path__default["default"].resolve(this.root, prefix);
8501
8470
  if (trail) prefix += "/";
8502
8471
  }
@@ -8516,11 +8485,11 @@ else {
8516
8485
  if (needDir && c === "FILE") return cb();
8517
8486
  }
8518
8487
  var stat = this.statCache[abs];
8519
- if (stat !== undefined) if (stat === false) return cb(null, stat);
8520
- else {
8488
+ if (stat !== void 0) if (stat === false) return cb(null, stat);
8489
+ else {
8521
8490
  var type = stat.isDirectory() ? "DIR" : "FILE";
8522
8491
  if (needDir && type === "FILE") return cb();
8523
- else return cb(null, type, stat);
8492
+ else return cb(null, type, stat);
8524
8493
  }
8525
8494
  var self$1 = this;
8526
8495
  var statcb = inflight_1("stat\0" + abs, lstatcb_);
@@ -8528,9 +8497,9 @@ else return cb(null, type, stat);
8528
8497
  function lstatcb_(er, lstat) {
8529
8498
  if (lstat && lstat.isSymbolicLink()) return fs__default["default"].stat(abs, function(er$1, stat$1) {
8530
8499
  if (er$1) self$1._stat2(f, abs, null, lstat, cb);
8531
- else self$1._stat2(f, abs, er$1, stat$1, cb);
8500
+ else self$1._stat2(f, abs, er$1, stat$1, cb);
8532
8501
  });
8533
- else self$1._stat2(f, abs, er, lstat, cb);
8502
+ else self$1._stat2(f, abs, er, lstat, cb);
8534
8503
  }
8535
8504
  };
8536
8505
  Glob.prototype._stat2 = function(f, abs, er, stat, cb) {
@@ -8549,7 +8518,7 @@ else self$1._stat2(f, abs, er, lstat, cb);
8549
8518
  };
8550
8519
  var rimraf_1 = rimraf;
8551
8520
  rimraf.sync = rimrafSync$1;
8552
- var glob = undefined;
8521
+ var glob = void 0;
8553
8522
  try {
8554
8523
  glob = glob_1;
8555
8524
  } catch (_err) {}
@@ -8561,15 +8530,14 @@ else self$1._stat2(f, abs, er, lstat, cb);
8561
8530
  var timeout = 0;
8562
8531
  var isWindows = process.platform === "win32";
8563
8532
  function defaults(options) {
8564
- var methods = [
8533
+ [
8565
8534
  "unlink",
8566
8535
  "chmod",
8567
8536
  "stat",
8568
8537
  "lstat",
8569
8538
  "rmdir",
8570
8539
  "readdir"
8571
- ];
8572
- methods.forEach(function(m$1) {
8540
+ ].forEach(function(m$1) {
8573
8541
  options[m$1] = options[m$1] || fs__default["default"][m$1];
8574
8542
  m$1 = m$1 + "Sync";
8575
8543
  options[m$1] = options[m$1] || fs__default["default"][m$1];
@@ -8577,7 +8545,7 @@ else self$1._stat2(f, abs, er, lstat, cb);
8577
8545
  options.maxBusyTries = options.maxBusyTries || 3;
8578
8546
  options.emfileWait = options.emfileWait || 1e3;
8579
8547
  if (options.glob === false) options.disableGlob = true;
8580
- if (options.disableGlob !== true && glob === undefined) throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");
8548
+ if (options.disableGlob !== true && glob === void 0) throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");
8581
8549
  options.disableGlob = options.disableGlob || false;
8582
8550
  options.glob = options.glob || defaultGlobOpts;
8583
8551
  }
@@ -8654,10 +8622,10 @@ else self$1._stat2(f, abs, er, lstat, cb);
8654
8622
  if (er) assert__default["default"](er instanceof Error);
8655
8623
  options.chmod(p, _0666, function(er2) {
8656
8624
  if (er2) cb(er2.code === "ENOENT" ? null : er);
8657
- else options.stat(p, function(er3, stats) {
8625
+ else options.stat(p, function(er3, stats) {
8658
8626
  if (er3) cb(er3.code === "ENOENT" ? null : er);
8659
- else if (stats.isDirectory()) rmdir(p, options, er, cb);
8660
- else options.unlink(p, cb);
8627
+ else if (stats.isDirectory()) rmdir(p, options, er, cb);
8628
+ else options.unlink(p, cb);
8661
8629
  });
8662
8630
  });
8663
8631
  }
@@ -8669,16 +8637,16 @@ else options.unlink(p, cb);
8669
8637
  options.chmodSync(p, _0666);
8670
8638
  } catch (er2) {
8671
8639
  if (er2.code === "ENOENT") return;
8672
- else throw er;
8640
+ else throw er;
8673
8641
  }
8674
8642
  try {
8675
8643
  var stats = options.statSync(p);
8676
8644
  } catch (er3) {
8677
8645
  if (er3.code === "ENOENT") return;
8678
- else throw er;
8646
+ else throw er;
8679
8647
  }
8680
8648
  if (stats.isDirectory()) rmdirSync(p, options, er);
8681
- else options.unlinkSync(p);
8649
+ else options.unlinkSync(p);
8682
8650
  }
8683
8651
  function rmdir(p, options, originalEr, cb) {
8684
8652
  assert__default["default"](p);
@@ -8687,8 +8655,8 @@ else options.unlinkSync(p);
8687
8655
  assert__default["default"](typeof cb === "function");
8688
8656
  options.rmdir(p, function(er) {
8689
8657
  if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) rmkids(p, options, cb);
8690
- else if (er && er.code === "ENOTDIR") cb(originalEr);
8691
- else cb(er);
8658
+ else if (er && er.code === "ENOTDIR") cb(originalEr);
8659
+ else cb(er);
8692
8660
  });
8693
8661
  }
8694
8662
  function rmkids(p, options, cb) {
@@ -8718,7 +8686,7 @@ else cb(er);
8718
8686
  assert__default["default"].equal(typeof options, "object", "rimraf: options should be object");
8719
8687
  var results;
8720
8688
  if (options.disableGlob || !glob.hasMagic(p)) results = [p];
8721
- else try {
8689
+ else try {
8722
8690
  options.lstatSync(p);
8723
8691
  results = [p];
8724
8692
  } catch (er) {
@@ -8735,7 +8703,7 @@ else try {
8735
8703
  }
8736
8704
  try {
8737
8705
  if (st && st.isDirectory()) rmdirSync(p, options, null);
8738
- else options.unlinkSync(p);
8706
+ else options.unlinkSync(p);
8739
8707
  } catch (er) {
8740
8708
  if (er.code === "ENOENT") return;
8741
8709
  if (er.code === "EPERM") return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er);
@@ -8825,7 +8793,7 @@ else options.unlinkSync(p);
8825
8793
  function rimrafSync() {
8826
8794
  _rimraf.sync(resolvePath(arguments));
8827
8795
  }
8828
- process.platform === "win32";
8796
+ process.platform;
8829
8797
  gracefulFs.closeSync;
8830
8798
  gracefulFs.fchmodSync;
8831
8799
  gracefulFs.fchownSync;
@@ -8863,7 +8831,7 @@ else options.unlinkSync(p);
8863
8831
  options = options || {};
8864
8832
  var type = typeof val;
8865
8833
  if (type === "string" && val.length > 0) return parse$1(val);
8866
- else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val) : fmtShort(val);
8834
+ else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val) : fmtShort(val);
8867
8835
  throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
8868
8836
  };
8869
8837
  /**
@@ -8879,8 +8847,7 @@ else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val)
8879
8847
  var match$1 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
8880
8848
  if (!match$1) return;
8881
8849
  var n = parseFloat(match$1[1]);
8882
- var type = (match$1[2] || "ms").toLowerCase();
8883
- switch (type) {
8850
+ switch ((match$1[2] || "ms").toLowerCase()) {
8884
8851
  case "years":
8885
8852
  case "year":
8886
8853
  case "yrs":
@@ -8912,7 +8879,7 @@ else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val)
8912
8879
  case "msecs":
8913
8880
  case "msec":
8914
8881
  case "ms": return n;
8915
- default: return undefined;
8882
+ default: return;
8916
8883
  }
8917
8884
  }
8918
8885
  /**
@@ -8956,7 +8923,7 @@ else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val)
8956
8923
  * This is the common logic for both the Node.js and web browser
8957
8924
  * implementations of `debug()`.
8958
8925
  */
8959
- function setup$1(env$2) {
8926
+ function setup$1(env$1) {
8960
8927
  createDebug.debug = createDebug;
8961
8928
  createDebug.default = createDebug;
8962
8929
  createDebug.coerce = coerce;
@@ -8965,8 +8932,8 @@ else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val)
8965
8932
  createDebug.enabled = enabled;
8966
8933
  createDebug.humanize = ms;
8967
8934
  createDebug.destroy = destroy;
8968
- Object.keys(env$2).forEach((key) => {
8969
- createDebug[key] = env$2[key];
8935
+ Object.keys(env$1).forEach((key) => {
8936
+ createDebug[key] = env$1[key];
8970
8937
  });
8971
8938
  /**
8972
8939
  * The currently active debug mode names, and names to skip.
@@ -9007,9 +8974,8 @@ else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val)
9007
8974
  function debug$3(...args) {
9008
8975
  if (!debug$3.enabled) return;
9009
8976
  const self$1 = debug$3;
9010
- const curr = Number(new Date());
9011
- const ms$1 = curr - (prevTime || curr);
9012
- self$1.diff = ms$1;
8977
+ const curr = Number(/* @__PURE__ */ new Date());
8978
+ self$1.diff = curr - (prevTime || curr);
9013
8979
  self$1.prev = prevTime;
9014
8980
  self$1.curr = curr;
9015
8981
  prevTime = curr;
@@ -9029,8 +8995,7 @@ else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val)
9029
8995
  return match$1;
9030
8996
  });
9031
8997
  createDebug.formatArgs.call(self$1, args);
9032
- const logFn = self$1.log || createDebug.log;
9033
- logFn.apply(self$1, args);
8998
+ (self$1.log || createDebug.log).apply(self$1, args);
9034
8999
  }
9035
9000
  debug$3.namespace = namespace;
9036
9001
  debug$3.useColors = createDebug.useColors();
@@ -9070,8 +9035,8 @@ else if (type === "number" && isFinite(val)) return options.long ? fmtLong(val)
9070
9035
  for (i = 0; i < len; i++) {
9071
9036
  if (!split$2[i]) continue;
9072
9037
  namespaces = split$2[i].replace(/\*/g, ".*?");
9073
- if (namespaces[0] === "-") createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
9074
- else createDebug.names.push(new RegExp("^" + namespaces + "$"));
9038
+ if (namespaces[0] === "-") createDebug.skips.push(/* @__PURE__ */ new RegExp("^" + namespaces.substr(1) + "$"));
9039
+ else createDebug.names.push(/* @__PURE__ */ new RegExp("^" + namespaces + "$"));
9075
9040
  }
9076
9041
  }
9077
9042
  /**
@@ -9280,7 +9245,7 @@ else createDebug.names.push(new RegExp("^" + namespaces + "$"));
9280
9245
  function save(namespaces) {
9281
9246
  try {
9282
9247
  if (namespaces) exports$1.storage.setItem("debug", namespaces);
9283
- else exports$1.storage.removeItem("debug");
9248
+ else exports$1.storage.removeItem("debug");
9284
9249
  } catch (error) {}
9285
9250
  }
9286
9251
  /**
@@ -9444,9 +9409,9 @@ else exports$1.storage.removeItem("debug");
9444
9409
  });
9445
9410
  let val = process.env[key];
9446
9411
  if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
9447
- else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
9448
- else if (val === "null") val = null;
9449
- else val = Number(val);
9412
+ else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
9413
+ else if (val === "null") val = null;
9414
+ else val = Number(val);
9450
9415
  obj[prop] = val;
9451
9416
  return obj;
9452
9417
  }, {});
@@ -9473,7 +9438,7 @@ else val = Number(val);
9473
9438
  }
9474
9439
  function getDate() {
9475
9440
  if (exports$1.inspectOpts.hideDate) return "";
9476
- return new Date().toISOString() + " ";
9441
+ return (/* @__PURE__ */ new Date()).toISOString() + " ";
9477
9442
  }
9478
9443
  /**
9479
9444
  * Invokes `util.format()` with the specified arguments and writes to stderr.
@@ -9489,7 +9454,7 @@ else val = Number(val);
9489
9454
  */
9490
9455
  function save(namespaces) {
9491
9456
  if (namespaces) process.env.DEBUG = namespaces;
9492
- else delete process.env.DEBUG;
9457
+ else delete process.env.DEBUG;
9493
9458
  }
9494
9459
  /**
9495
9460
  * Load `namespaces`.
@@ -9534,20 +9499,20 @@ else delete process.env.DEBUG;
9534
9499
  */
9535
9500
  var src$1 = createCommonjsModule(function(module$1) {
9536
9501
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) module$1.exports = browser;
9537
- else module$1.exports = node;
9502
+ else module$1.exports = node;
9538
9503
  });
9539
9504
  function promisify(fn) {
9540
9505
  return function(req, opts) {
9541
9506
  return new Promise((resolve$2, reject) => {
9542
9507
  fn.call(this, req, opts, (err, rtn) => {
9543
9508
  if (err) reject(err);
9544
- else resolve$2(rtn);
9509
+ else resolve$2(rtn);
9545
9510
  });
9546
9511
  });
9547
9512
  };
9548
9513
  }
9549
9514
  var _default$2 = promisify;
9550
- var promisify_1$1 = /*#__PURE__*/ Object.defineProperty({ default: _default$2 }, "__esModule", { value: true });
9515
+ var promisify_1$1 = /* @__PURE__ */ Object.defineProperty({ default: _default$2 }, "__esModule", { value: true });
9551
9516
  var __importDefault$3 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
9552
9517
  return mod && mod.__esModule ? mod : { "default": mod };
9553
9518
  };
@@ -9558,7 +9523,7 @@ else resolve$2(rtn);
9558
9523
  return Boolean(v) && typeof v.addRequest === "function";
9559
9524
  }
9560
9525
  function isSecureEndpoint() {
9561
- const { stack } = new Error();
9526
+ const { stack } = /* @__PURE__ */ new Error();
9562
9527
  if (typeof stack !== "string") return false;
9563
9528
  return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1);
9564
9529
  }
@@ -9578,7 +9543,7 @@ else resolve$2(rtn);
9578
9543
  super();
9579
9544
  let opts = _opts;
9580
9545
  if (typeof callback === "function") this.callback = callback;
9581
- else if (callback) opts = callback;
9546
+ else if (callback) opts = callback;
9582
9547
  this.timeout = null;
9583
9548
  if (opts && typeof opts.timeout === "number") this.timeout = opts.timeout;
9584
9549
  this.maxFreeSockets = 1;
@@ -9637,7 +9602,7 @@ else if (callback) opts = callback;
9637
9602
  const ontimeout = () => {
9638
9603
  timeoutId = null;
9639
9604
  timedOut = true;
9640
- const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`);
9605
+ const err = /* @__PURE__ */ new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`);
9641
9606
  err.code = "ETIMEOUT";
9642
9607
  onerror(err);
9643
9608
  };
@@ -9667,11 +9632,11 @@ else if (callback) opts = callback;
9667
9632
  req.onSocket(socket);
9668
9633
  return;
9669
9634
  }
9670
- const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``);
9635
+ const err = /* @__PURE__ */ new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``);
9671
9636
  onerror(err);
9672
9637
  };
9673
9638
  if (typeof this.callback !== "function") {
9674
- onerror(new Error("`callback` is not defined"));
9639
+ onerror(/* @__PURE__ */ new Error("`callback` is not defined"));
9675
9640
  return;
9676
9641
  }
9677
9642
  if (!this.promisifiedCallback) if (this.callback.length >= 3) {
@@ -9699,11 +9664,9 @@ else if (callback) opts = callback;
9699
9664
  createAgent$1.prototype = createAgent$1.Agent.prototype;
9700
9665
  })(createAgent || (createAgent = {}));
9701
9666
  var src = createAgent;
9702
- var __importDefault$2 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
9667
+ const debug$1 = (commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
9703
9668
  return mod && mod.__esModule ? mod : { "default": mod };
9704
- };
9705
- const debug_1$1 = __importDefault$2(src$1);
9706
- const debug$1 = debug_1$1.default("https-proxy-agent:parse-proxy-response");
9669
+ })(src$1).default("https-proxy-agent:parse-proxy-response");
9707
9670
  function parseProxyResponse(socket) {
9708
9671
  return new Promise((resolve$2, reject) => {
9709
9672
  let buffersLength = 0;
@@ -9711,7 +9674,7 @@ else if (callback) opts = callback;
9711
9674
  function read() {
9712
9675
  const b = socket.read();
9713
9676
  if (b) ondata(b);
9714
- else socket.once("readable", read);
9677
+ else socket.once("readable", read);
9715
9678
  }
9716
9679
  function cleanup() {
9717
9680
  socket.removeListener("end", onend);
@@ -9734,8 +9697,7 @@ else socket.once("readable", read);
9734
9697
  buffers.push(b);
9735
9698
  buffersLength += b.length;
9736
9699
  const buffered = Buffer.concat(buffers, buffersLength);
9737
- const endOfHeaders = buffered.indexOf("\r\n\r\n");
9738
- if (endOfHeaders === -1) {
9700
+ if (buffered.indexOf("\r\n\r\n") === -1) {
9739
9701
  debug$1("have not received end of HTTP headers yet...");
9740
9702
  read();
9741
9703
  return;
@@ -9755,7 +9717,7 @@ else socket.once("readable", read);
9755
9717
  });
9756
9718
  }
9757
9719
  var _default$1 = parseProxyResponse;
9758
- var parseProxyResponse_1 = /*#__PURE__*/ Object.defineProperty({ default: _default$1 }, "__esModule", { value: true });
9720
+ var parseProxyResponse_1 = /* @__PURE__ */ Object.defineProperty({ default: _default$1 }, "__esModule", { value: true });
9759
9721
  var __awaiter = commonjsGlobal && commonjsGlobal.__awaiter || function(thisArg, _arguments, P, generator) {
9760
9722
  function adopt(value) {
9761
9723
  return value instanceof P ? value : new P(function(resolve$2) {
@@ -9793,11 +9755,25 @@ else socket.once("readable", read);
9793
9755
  const debug_1 = __importDefault$1(src$1);
9794
9756
  const parse_proxy_response_1 = __importDefault$1(parseProxyResponse_1);
9795
9757
  const debug = debug_1.default("https-proxy-agent:agent");
9758
+ /**
9759
+ * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to
9760
+ * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
9761
+ *
9762
+ * Outgoing HTTP requests are first tunneled through the proxy server using the
9763
+ * `CONNECT` HTTP request method to establish a connection to the proxy server,
9764
+ * and then the proxy server connects to the destination target and issues the
9765
+ * HTTP request from the proxy server.
9766
+ *
9767
+ * `https:` requests have their socket connection upgraded to TLS once
9768
+ * the connection to the proxy server has been established.
9769
+ *
9770
+ * @api public
9771
+ */
9796
9772
  var HttpsProxyAgent = class extends src.Agent {
9797
9773
  constructor(_opts) {
9798
9774
  let opts;
9799
9775
  if (typeof _opts === "string") opts = url_1.default.parse(_opts);
9800
- else opts = _opts;
9776
+ else opts = _opts;
9801
9777
  if (!opts) throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");
9802
9778
  debug("creating new HttpsProxyAgent instance: %o", opts);
9803
9779
  super(opts);
@@ -9831,8 +9807,7 @@ else opts = _opts;
9831
9807
  socket = net_1.default.connect(proxy);
9832
9808
  }
9833
9809
  const headers = Object.assign({}, proxy.headers);
9834
- const hostname = `${opts.host}:${opts.port}`;
9835
- let payload = `CONNECT ${hostname} HTTP/1.1\r\n`;
9810
+ let payload = `CONNECT ${`${opts.host}:${opts.port}`} HTTP/1.1\r\n`;
9836
9811
  if (proxy.auth) headers["Proxy-Authorization"] = `Basic ${Buffer.from(proxy.auth).toString("base64")}`;
9837
9812
  let { host, port, secureEndpoint } = opts;
9838
9813
  if (!isDefaultPort(port, secureEndpoint)) host += `:${port}`;
@@ -9884,11 +9859,10 @@ else opts = _opts;
9884
9859
  for (key in obj) if (!keys.includes(key)) ret[key] = obj[key];
9885
9860
  return ret;
9886
9861
  }
9887
- var agent = /*#__PURE__*/ Object.defineProperty({ default: _default }, "__esModule", { value: true });
9888
- var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
9862
+ var agent = /* @__PURE__ */ Object.defineProperty({ default: _default }, "__esModule", { value: true });
9863
+ const agent_1 = (commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
9889
9864
  return mod && mod.__esModule ? mod : { "default": mod };
9890
- };
9891
- const agent_1 = __importDefault(agent);
9865
+ })(agent);
9892
9866
  function createHttpsProxyAgent(opts) {
9893
9867
  return new agent_1.default(opts);
9894
9868
  }
@@ -9907,8 +9881,8 @@ else opts = _opts;
9907
9881
  };
9908
9882
  function tryRequire(file, opts) {
9909
9883
  try {
9910
- if (opts && opts.clearCache === true) delete require.cache[require.resolve(file)];
9911
- return require(file);
9884
+ if (opts && opts.clearCache === true) delete __require.cache[__require.resolve(file)];
9885
+ return __require(file);
9912
9886
  } catch (err) {
9913
9887
  return null;
9914
9888
  }
@@ -9954,8 +9928,8 @@ else opts = _opts;
9954
9928
  code,
9955
9929
  message: response.statusMessage
9956
9930
  });
9957
- else if (code >= 300) fetch(response.headers.location, dest, proxy).then(fulfil, reject);
9958
- else response.pipe(fs__default["default"].createWriteStream(dest)).on("finish", () => fulfil()).on("error", reject);
9931
+ else if (code >= 300) fetch(response.headers.location, dest, proxy).then(fulfil, reject);
9932
+ else response.pipe(fs__default["default"].createWriteStream(dest)).on("finish", () => fulfil()).on("error", reject);
9959
9933
  }).on("error", reject);
9960
9934
  });
9961
9935
  }
@@ -9966,8 +9940,7 @@ else response.pipe(fs__default["default"].createWriteStream(dest)).on("finish",
9966
9940
  fs__default["default"].readdirSync(dest).forEach((file) => {
9967
9941
  const filePath = path__default["default"].join(dest, file);
9968
9942
  const targetPath = path__default["default"].join(tmpDir, file);
9969
- const isDir = fs__default["default"].lstatSync(filePath).isDirectory();
9970
- if (isDir) {
9943
+ if (fs__default["default"].lstatSync(filePath).isDirectory()) {
9971
9944
  copydirSync_1(filePath).to(targetPath);
9972
9945
  rimrafSync_1(filePath);
9973
9946
  } else {
@@ -9981,8 +9954,7 @@ else response.pipe(fs__default["default"].createWriteStream(dest)).on("finish",
9981
9954
  fs__default["default"].readdirSync(tmpDir).forEach((filename) => {
9982
9955
  const tmpFile = path__default["default"].join(tmpDir, filename);
9983
9956
  const targetPath = path__default["default"].join(dest, filename);
9984
- const isDir = fs__default["default"].lstatSync(tmpFile).isDirectory();
9985
- if (isDir) {
9957
+ if (fs__default["default"].lstatSync(tmpFile).isDirectory()) {
9986
9958
  copydirSync_1(tmpFile).to(targetPath);
9987
9959
  rimrafSync_1(tmpFile);
9988
9960
  } else {
@@ -10045,7 +10017,7 @@ else response.pipe(fs__default["default"].createWriteStream(dest)).on("finish",
10045
10017
  const { repo } = this;
10046
10018
  const dir = path__default["default"].join(base, repo.site, repo.user, repo.name);
10047
10019
  if (this.mode === "tar") await this._cloneWithTar(dir, dest);
10048
- else await this._cloneWithGit(dir, dest);
10020
+ else await this._cloneWithGit(dir, dest);
10049
10021
  this._info({
10050
10022
  code: "SUCCESS",
10051
10023
  message: `cloned ${source.bold(repo.user + "/" + repo.name)}#${source.bold(repo.ref)}${dest !== "." ? ` to ${dest}` : ""}`,
@@ -10063,16 +10035,14 @@ else await this._cloneWithGit(dir, dest);
10063
10035
  if (!Array.isArray(files)) files = [files];
10064
10036
  const removedFiles = files.map((file) => {
10065
10037
  const filePath = path__default["default"].resolve(dest, file);
10066
- if (fs__default["default"].existsSync(filePath)) {
10067
- const isDir = fs__default["default"].lstatSync(filePath).isDirectory();
10068
- if (isDir) {
10069
- rimrafSync_1(filePath);
10070
- return file + "/";
10071
- } else {
10072
- fs__default["default"].unlinkSync(filePath);
10073
- return file;
10074
- }
10038
+ if (fs__default["default"].existsSync(filePath)) if (fs__default["default"].lstatSync(filePath).isDirectory()) {
10039
+ rimrafSync_1(filePath);
10040
+ return file + "/";
10075
10041
  } else {
10042
+ fs__default["default"].unlinkSync(filePath);
10043
+ return file;
10044
+ }
10045
+ else {
10076
10046
  this._warn({
10077
10047
  code: "FILE_DOES_NOT_EXIST",
10078
10048
  message: `action wants to remove ${source.bold(file)} but it does not exist`
@@ -10087,13 +10057,12 @@ else await this._cloneWithGit(dir, dest);
10087
10057
  }
10088
10058
  _checkDirIsEmpty(dir) {
10089
10059
  try {
10090
- const files = fs__default["default"].readdirSync(dir);
10091
- if (files.length > 0) if (this.force) this._info({
10060
+ if (fs__default["default"].readdirSync(dir).length > 0) if (this.force) this._info({
10092
10061
  code: "DEST_NOT_EMPTY",
10093
10062
  message: `destination directory is not empty. Using options.force, continuing`
10094
10063
  });
10095
- else throw new DegitError(`destination directory is not empty, aborting. Use options.force to override`, { code: "DEST_NOT_EMPTY" });
10096
- else this._verbose({
10064
+ else throw new DegitError(`destination directory is not empty, aborting. Use options.force to override`, { code: "DEST_NOT_EMPTY" });
10065
+ else this._verbose({
10097
10066
  code: "DEST_IS_EMPTY",
10098
10067
  message: `destination directory is empty`
10099
10068
  });
@@ -10256,7 +10225,7 @@ else this._verbose({
10256
10225
  }
10257
10226
  function updateCache(dir, repo, hash, cached) {
10258
10227
  const logs = tryRequire(path__default["default"].join(dir, "access.json")) || {};
10259
- logs[repo.ref] = new Date().toISOString();
10228
+ logs[repo.ref] = (/* @__PURE__ */ new Date()).toISOString();
10260
10229
  fs__default["default"].writeFileSync(path__default["default"].join(dir, "access.json"), JSON.stringify(logs, null, " "));
10261
10230
  if (cached[repo.ref] === hash) return;
10262
10231
  const oldHash = cached[repo.ref];
@@ -10278,11 +10247,11 @@ else this._verbose({
10278
10247
  exports.degit = degit$1;
10279
10248
  exports.source = source;
10280
10249
  exports.tryRequire = tryRequire;
10281
- } });
10250
+ }) });
10282
10251
 
10283
10252
  //#endregion
10284
- //#region node_modules/.pnpm/degit@2.8.4/node_modules/degit/dist/index.js
10285
- var require_dist = __commonJS({ "node_modules/.pnpm/degit@2.8.4/node_modules/degit/dist/index.js"(exports, module) {
10253
+ //#region ../../node_modules/.pnpm/degit@2.8.4/node_modules/degit/dist/index.js
10254
+ var require_dist = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/degit@2.8.4/node_modules/degit/dist/index.js": ((exports, module) => {
10286
10255
  __require("fs");
10287
10256
  __require("path");
10288
10257
  var index = require_index_688c5d50();
@@ -10303,11 +10272,11 @@ var require_dist = __commonJS({ "node_modules/.pnpm/degit@2.8.4/node_modules/deg
10303
10272
  __require("net");
10304
10273
  __require("tls");
10305
10274
  module.exports = index.degit;
10306
- } });
10275
+ }) });
10307
10276
 
10308
10277
  //#endregion
10309
- //#region node_modules/.pnpm/through@2.3.8/node_modules/through/index.js
10310
- var require_through = __commonJS({ "node_modules/.pnpm/through@2.3.8/node_modules/through/index.js"(exports, module) {
10278
+ //#region ../../node_modules/.pnpm/through@2.3.8/node_modules/through/index.js
10279
+ var require_through = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/through@2.3.8/node_modules/through/index.js": ((exports, module) => {
10311
10280
  var Stream$4 = __require("stream");
10312
10281
  exports = module.exports = through$2;
10313
10282
  through$2.through = through$2;
@@ -10331,7 +10300,7 @@ var require_through = __commonJS({ "node_modules/.pnpm/through@2.3.8/node_module
10331
10300
  while (buffer.length && !stream.paused) {
10332
10301
  var data = buffer.shift();
10333
10302
  if (null === data) return stream.emit("end");
10334
- else stream.emit("data", data);
10303
+ else stream.emit("data", data);
10335
10304
  }
10336
10305
  }
10337
10306
  stream.queue = stream.push = function(data) {
@@ -10384,18 +10353,18 @@ else stream.emit("data", data);
10384
10353
  };
10385
10354
  return stream;
10386
10355
  }
10387
- } });
10356
+ }) });
10388
10357
 
10389
10358
  //#endregion
10390
- //#region node_modules/.pnpm/from@0.1.7/node_modules/from/index.js
10391
- var require_from = __commonJS({ "node_modules/.pnpm/from@0.1.7/node_modules/from/index.js"(exports, module) {
10359
+ //#region ../../node_modules/.pnpm/from@0.1.7/node_modules/from/index.js
10360
+ var require_from = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/from@0.1.7/node_modules/from/index.js": ((exports, module) => {
10392
10361
  var Stream$3 = __require("stream");
10393
10362
  module.exports = function from$1(source$1) {
10394
10363
  if (Array.isArray(source$1)) {
10395
10364
  var source_index = 0, source_len = source$1.length;
10396
10365
  return from$1(function(i$1) {
10397
10366
  if (source_index < source_len) this.emit("data", source$1[source_index++]);
10398
- else this.emit("end");
10367
+ else this.emit("end");
10399
10368
  return true;
10400
10369
  });
10401
10370
  }
@@ -10436,11 +10405,11 @@ else this.emit("end");
10436
10405
  });
10437
10406
  return s$1;
10438
10407
  };
10439
- } });
10408
+ }) });
10440
10409
 
10441
10410
  //#endregion
10442
- //#region node_modules/.pnpm/duplexer@0.1.2/node_modules/duplexer/index.js
10443
- var require_duplexer = __commonJS({ "node_modules/.pnpm/duplexer@0.1.2/node_modules/duplexer/index.js"(exports, module) {
10411
+ //#region ../../node_modules/.pnpm/duplexer@0.1.2/node_modules/duplexer/index.js
10412
+ var require_duplexer = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/duplexer@0.1.2/node_modules/duplexer/index.js": ((exports, module) => {
10444
10413
  var Stream$2 = __require("stream");
10445
10414
  var writeMethods = [
10446
10415
  "write",
@@ -10504,11 +10473,11 @@ var require_duplexer = __commonJS({ "node_modules/.pnpm/duplexer@0.1.2/node_modu
10504
10473
  stream.emit("error", err);
10505
10474
  }
10506
10475
  }
10507
- } });
10476
+ }) });
10508
10477
 
10509
10478
  //#endregion
10510
- //#region node_modules/.pnpm/map-stream@0.1.0/node_modules/map-stream/index.js
10511
- var require_map_stream = __commonJS({ "node_modules/.pnpm/map-stream@0.1.0/node_modules/map-stream/index.js"(exports, module) {
10479
+ //#region ../../node_modules/.pnpm/map-stream@0.1.0/node_modules/map-stream/index.js
10480
+ var require_map_stream = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/map-stream@0.1.0/node_modules/map-stream/index.js": ((exports, module) => {
10512
10481
  var Stream$1 = __require("stream").Stream;
10513
10482
  module.exports = function(mapper, opts) {
10514
10483
  var stream = new Stream$1(), self$1 = this, inputs = 0, outputs = 0, ended = false, paused = false, destroyed = false, lastWritten = 0, inNext = false;
@@ -10520,7 +10489,7 @@ var require_map_stream = __commonJS({ "node_modules/.pnpm/map-stream@0.1.0/node_
10520
10489
  function queueData(data, number) {
10521
10490
  var nextToWrite = lastWritten + 1;
10522
10491
  if (number === nextToWrite) {
10523
- if (data !== undefined) stream.emit.apply(stream, ["data", data]);
10492
+ if (data !== void 0) stream.emit.apply(stream, ["data", data]);
10524
10493
  lastWritten++;
10525
10494
  nextToWrite++;
10526
10495
  } else writeQueue[number] = data;
@@ -10552,8 +10521,7 @@ var require_map_stream = __commonJS({ "node_modules/.pnpm/map-stream@0.1.0/node_
10552
10521
  inNext = false;
10553
10522
  inputs++;
10554
10523
  try {
10555
- var written = wrappedMapper(data, inputs, next);
10556
- paused = written === false;
10524
+ paused = wrappedMapper(data, inputs, next) === false;
10557
10525
  return !paused;
10558
10526
  } catch (err) {
10559
10527
  if (inNext) throw err;
@@ -10564,8 +10532,8 @@ var require_map_stream = __commonJS({ "node_modules/.pnpm/map-stream@0.1.0/node_
10564
10532
  function end(data) {
10565
10533
  ended = true;
10566
10534
  stream.writable = false;
10567
- if (data !== undefined) return queueData(data, inputs);
10568
- else if (inputs == outputs) stream.readable = false, stream.emit("end"), stream.destroy();
10535
+ if (data !== void 0) return queueData(data, inputs);
10536
+ else if (inputs == outputs) stream.readable = false, stream.emit("end"), stream.destroy();
10569
10537
  }
10570
10538
  stream.end = function(data) {
10571
10539
  if (ended) return;
@@ -10586,17 +10554,17 @@ else if (inputs == outputs) stream.readable = false, stream.emit("end"), stream.
10586
10554
  };
10587
10555
  return stream;
10588
10556
  };
10589
- } });
10557
+ }) });
10590
10558
 
10591
10559
  //#endregion
10592
- //#region node_modules/.pnpm/pause-stream@0.0.11/node_modules/pause-stream/index.js
10593
- var require_pause_stream = __commonJS({ "node_modules/.pnpm/pause-stream@0.0.11/node_modules/pause-stream/index.js"(exports, module) {
10560
+ //#region ../../node_modules/.pnpm/pause-stream@0.0.11/node_modules/pause-stream/index.js
10561
+ var require_pause_stream = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pause-stream@0.0.11/node_modules/pause-stream/index.js": ((exports, module) => {
10594
10562
  module.exports = require_through();
10595
- } });
10563
+ }) });
10596
10564
 
10597
10565
  //#endregion
10598
- //#region node_modules/.pnpm/split@0.3.3/node_modules/split/index.js
10599
- var require_split = __commonJS({ "node_modules/.pnpm/split@0.3.3/node_modules/split/index.js"(exports, module) {
10566
+ //#region ../../node_modules/.pnpm/split@0.3.3/node_modules/split/index.js
10567
+ var require_split = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/split@0.3.3/node_modules/split/index.js": ((exports, module) => {
10600
10568
  var through$1 = require_through();
10601
10569
  var Decoder = __require("string_decoder").StringDecoder;
10602
10570
  module.exports = split$1;
@@ -10619,7 +10587,7 @@ var require_split = __commonJS({ "node_modules/.pnpm/split@0.3.3/node_modules/sp
10619
10587
  function next(stream, buffer) {
10620
10588
  var pieces = ((soFar != null ? soFar : "") + buffer).split(matcher);
10621
10589
  soFar = pieces.pop();
10622
- if (maxLength && soFar.length > maxLength) stream.emit("error", new Error("maximum buffer reached"));
10590
+ if (maxLength && soFar.length > maxLength) stream.emit("error", /* @__PURE__ */ new Error("maximum buffer reached"));
10623
10591
  for (var i = 0; i < pieces.length; i++) {
10624
10592
  var piece = pieces[i];
10625
10593
  emit(stream, piece);
@@ -10633,16 +10601,16 @@ var require_split = __commonJS({ "node_modules/.pnpm/split@0.3.3/node_modules/sp
10633
10601
  this.queue(null);
10634
10602
  });
10635
10603
  }
10636
- } });
10604
+ }) });
10637
10605
 
10638
10606
  //#endregion
10639
- //#region node_modules/.pnpm/stream-combiner@0.0.4/node_modules/stream-combiner/index.js
10640
- var require_stream_combiner = __commonJS({ "node_modules/.pnpm/stream-combiner@0.0.4/node_modules/stream-combiner/index.js"(exports, module) {
10607
+ //#region ../../node_modules/.pnpm/stream-combiner@0.0.4/node_modules/stream-combiner/index.js
10608
+ var require_stream_combiner = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/stream-combiner@0.0.4/node_modules/stream-combiner/index.js": ((exports, module) => {
10641
10609
  var duplexer = require_duplexer();
10642
10610
  module.exports = function() {
10643
10611
  var streams = [].slice.call(arguments), first = streams[0], last = streams[streams.length - 1], thepipe = duplexer(first, last);
10644
10612
  if (streams.length == 1) return streams[0];
10645
- else if (!streams.length) throw new Error("connect called with empty args");
10613
+ else if (!streams.length) throw new Error("connect called with empty args");
10646
10614
  function recurse(streams$1) {
10647
10615
  if (streams$1.length < 2) return;
10648
10616
  streams$1[0].pipe(streams$1[1]);
@@ -10657,11 +10625,11 @@ else if (!streams.length) throw new Error("connect called with empty args");
10657
10625
  for (var i = 1; i < streams.length - 1; i++) streams[i].on("error", onerror);
10658
10626
  return thepipe;
10659
10627
  };
10660
- } });
10628
+ }) });
10661
10629
 
10662
10630
  //#endregion
10663
- //#region node_modules/.pnpm/event-stream@3.3.4/node_modules/event-stream/index.js
10664
- var require_event_stream = __commonJS({ "node_modules/.pnpm/event-stream@3.3.4/node_modules/event-stream/index.js"(exports) {
10631
+ //#region ../../node_modules/.pnpm/event-stream@3.3.4/node_modules/event-stream/index.js
10632
+ var require_event_stream = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/event-stream@3.3.4/node_modules/event-stream/index.js": ((exports) => {
10665
10633
  var Stream = __require("stream").Stream, es$1 = exports, through = require_through(), from = require_from(), duplex = require_duplexer(), map = require_map_stream(), pause = require_pause_stream(), split = require_split(), pipeline = require_stream_combiner(), immediately = global.setImmediate || process.nextTick;
10666
10634
  es$1.Stream = Stream;
10667
10635
  es$1.through = through;
@@ -10688,7 +10656,7 @@ var require_event_stream = __commonJS({ "node_modules/.pnpm/event-stream@3.3.4/n
10688
10656
  if (endCount == toMerge.length) stream.emit("end");
10689
10657
  });
10690
10658
  });
10691
- else process.nextTick(function() {
10659
+ else process.nextTick(function() {
10692
10660
  stream.emit("end");
10693
10661
  });
10694
10662
  stream.write = function(data) {
@@ -10716,7 +10684,7 @@ else process.nextTick(function() {
10716
10684
  a.destroy = function() {
10717
10685
  a.writable = a.readable = false;
10718
10686
  if (isDone) return;
10719
- done(new Error("destroyed before end"), array);
10687
+ done(/* @__PURE__ */ new Error("destroyed before end"), array);
10720
10688
  };
10721
10689
  return a;
10722
10690
  };
@@ -10791,14 +10759,14 @@ else process.nextTick(function() {
10791
10759
  } catch (err) {
10792
10760
  return this.emit("error", err);
10793
10761
  }
10794
- if (mappedData !== undefined) this.emit("data", mappedData);
10762
+ if (mappedData !== void 0) this.emit("data", mappedData);
10795
10763
  });
10796
10764
  };
10797
10765
  es$1.log = function(name) {
10798
10766
  return es$1.through(function(data) {
10799
- var args = [].slice.call(arguments);
10767
+ [].slice.call(arguments);
10800
10768
  if (name) console.error(name, data);
10801
- else console.error(data);
10769
+ else console.error(data);
10802
10770
  this.emit("data", data);
10803
10771
  });
10804
10772
  };
@@ -10815,7 +10783,7 @@ else console.error(data);
10815
10783
  if (emitError) return this.emit("error", err);
10816
10784
  return console.error(err, "attempting to parse:", data);
10817
10785
  }
10818
- if (obj !== undefined) this.emit("data", obj);
10786
+ if (obj !== void 0) this.emit("data", obj);
10819
10787
  });
10820
10788
  };
10821
10789
  es$1.stringify = function() {
@@ -10851,11 +10819,11 @@ else console.error(data);
10851
10819
  es$1.pipeable = function() {
10852
10820
  throw new Error("[EVENT-STREAM] es.pipeable is deprecated");
10853
10821
  };
10854
- } });
10822
+ }) });
10855
10823
 
10856
10824
  //#endregion
10857
- //#region node_modules/.pnpm/ps-tree@1.2.0/node_modules/ps-tree/index.js
10858
- var require_ps_tree = __commonJS({ "node_modules/.pnpm/ps-tree@1.2.0/node_modules/ps-tree/index.js"(exports, module) {
10825
+ //#region ../../node_modules/.pnpm/ps-tree@1.2.0/node_modules/ps-tree/index.js
10826
+ var require_ps_tree = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ps-tree@1.2.0/node_modules/ps-tree/index.js": ((exports, module) => {
10859
10827
  var spawn = __require("child_process").spawn, es = require_event_stream();
10860
10828
  module.exports = function childrenOfPid(pid, callback) {
10861
10829
  var headers = null;
@@ -10867,39 +10835,33 @@ var require_ps_tree = __commonJS({ "node_modules/.pnpm/ps-tree@1.2.0/node_module
10867
10835
  "GET",
10868
10836
  "Name,ProcessId,ParentProcessId,Status"
10869
10837
  ]);
10870
- else processLister = spawn("ps", [
10838
+ else processLister = spawn("ps", [
10871
10839
  "-A",
10872
10840
  "-o",
10873
10841
  "ppid,pid,stat,comm"
10874
10842
  ]);
10875
- es.connect(
10876
- // spawn('ps', ['-A', '-o', 'ppid,pid,stat,comm']).stdout,
10877
- processLister.stdout,
10878
- es.split(),
10879
- es.map(function(line, cb) {
10880
- var columns = line.trim().split(/\s+/);
10881
- if (!headers) {
10882
- headers = columns;
10883
- headers = headers.map(normalizeHeader);
10884
- return cb();
10843
+ es.connect(processLister.stdout, es.split(), es.map(function(line, cb) {
10844
+ var columns = line.trim().split(/\s+/);
10845
+ if (!headers) {
10846
+ headers = columns;
10847
+ headers = headers.map(normalizeHeader);
10848
+ return cb();
10849
+ }
10850
+ var row = {};
10851
+ var h$1 = headers.slice();
10852
+ while (h$1.length) row[h$1.shift()] = h$1.length ? columns.shift() : columns.join(" ");
10853
+ return cb(null, row);
10854
+ }), es.writeArray(function(err, ps) {
10855
+ var parents = {}, children = [];
10856
+ parents[pid] = true;
10857
+ ps.forEach(function(proc) {
10858
+ if (parents[proc.PPID]) {
10859
+ parents[proc.PID] = true;
10860
+ children.push(proc);
10885
10861
  }
10886
- var row = {};
10887
- var h$1 = headers.slice();
10888
- while (h$1.length) row[h$1.shift()] = h$1.length ? columns.shift() : columns.join(" ");
10889
- return cb(null, row);
10890
- }),
10891
- es.writeArray(function(err, ps) {
10892
- var parents = {}, children = [];
10893
- parents[pid] = true;
10894
- ps.forEach(function(proc) {
10895
- if (parents[proc.PPID]) {
10896
- parents[proc.PID] = true;
10897
- children.push(proc);
10898
- }
10899
- });
10900
- callback(null, children);
10901
- })
10902
- ).on("error", callback);
10862
+ });
10863
+ callback(null, children);
10864
+ })).on("error", callback);
10903
10865
  };
10904
10866
  /**
10905
10867
  * Normalizes the given header `str` from the Windows
@@ -10917,12 +10879,12 @@ else processLister = spawn("ps", [
10917
10879
  default: throw new Error("Unknown process listing header: " + str);
10918
10880
  }
10919
10881
  }
10920
- } });
10882
+ }) });
10921
10883
 
10922
10884
  //#endregion
10923
- //#region packages/cli/lib/testing.ts
10924
- var import_dist = __toESM(require_dist(), 1);
10925
- var import_ps_tree = __toESM(require_ps_tree(), 1);
10885
+ //#region lib/testing.ts
10886
+ var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
10887
+ var import_ps_tree = /* @__PURE__ */ __toESM(require_ps_tree(), 1);
10926
10888
  const TEMPLATES_DIR = ".templates";
10927
10889
  async function setup({ cwd: cwd$1, clean = false, variants }) {
10928
10890
  const workingDir = path.resolve(cwd$1);
@@ -10940,15 +10902,13 @@ async function setup({ cwd: cwd$1, clean = false, variants }) {
10940
10902
  template: "minimal",
10941
10903
  types: "checkjs"
10942
10904
  });
10943
- else if (variant === "kit-ts") create(templatePath, {
10905
+ else if (variant === "kit-ts") create(templatePath, {
10944
10906
  name: variant,
10945
10907
  template: "minimal",
10946
10908
  types: "typescript"
10947
10909
  });
10948
- else if (variant === "vite-js" || variant === "vite-ts") {
10949
- const name = `template-svelte${variant === "vite-ts" ? "-ts" : ""}`;
10950
- const template$1 = (0, import_dist.default)(`vitejs/vite/packages/create-vite/${name}`, { force: true });
10951
- await template$1.clone(templatePath);
10910
+ else if (variant === "vite-js" || variant === "vite-ts") {
10911
+ await (0, import_dist.default)(`vitejs/vite/packages/create-vite/${`template-svelte${variant === "vite-ts" ? "-ts" : ""}`}`, { force: true }).clone(templatePath);
10952
10912
  const gitignorePath = path.resolve(templatePath, "_gitignore");
10953
10913
  if (fs.existsSync(gitignorePath)) {
10954
10914
  const fixedPath = path.resolve(templatePath, ".gitignore");
@@ -10992,13 +10952,7 @@ async function startPreview({ cwd: cwd$1, command = "npm run preview" }) {
10992
10952
  return await new Promise((resolve$2, reject) => {
10993
10953
  if (!proc.process?.stdout) return reject("impossible state");
10994
10954
  proc.process.stdout.on("data", (data) => {
10995
- const value = data.toString();
10996
- const regexUnicode = /[^\x20-\xaf]+/g;
10997
- const withoutUnicode = value.replace(regexUnicode, "");
10998
- const regexUnicodeDigits = /\[[0-9]{1,2}m/g;
10999
- const withoutColors = withoutUnicode.replace(regexUnicodeDigits, "");
11000
- const regexUrl = /http:\/\/[^:\s]+:[0-9]+\//g;
11001
- const urls = withoutColors.match(regexUrl);
10955
+ const urls = data.toString().replace(/[^\x20-\xaf]+/g, "").replace(/\[[0-9]{1,2}m/g, "").match(/http:\/\/[^:\s]+:[0-9]+\//g);
11002
10956
  if (urls && urls.length > 0) {
11003
10957
  const url = urls[0];
11004
10958
  resolve$2({
@@ -11018,6 +10972,15 @@ async function getProcessTree(pid) {
11018
10972
  });
11019
10973
  }
11020
10974
  async function terminate(pid) {
10975
+ if (process$1.platform === "win32") {
10976
+ await ve("taskkill", [
10977
+ "/PID",
10978
+ `${pid}`,
10979
+ "/T",
10980
+ "/F"
10981
+ ]);
10982
+ return;
10983
+ }
11021
10984
  const children = await getProcessTree(pid);
11022
10985
  for (let i = children.length - 1; i >= 0; i--) {
11023
10986
  const child = children[i];