@stablyai/playwright-test 2.0.13 → 2.0.16

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.
@@ -15,7 +15,7 @@ var require$$0 = require('stream');
15
15
  var node_util = require('node:util');
16
16
  var g = require('node:readline');
17
17
  require('node:stream');
18
- var Yn = require('util');
18
+ var ei = require('util');
19
19
  var require$$0$5 = require('events');
20
20
  var require$$1$1 = require('https');
21
21
  var require$$2 = require('http');
@@ -25,7 +25,7 @@ var require$$1 = require('crypto');
25
25
  var require$$7 = require('url');
26
26
  var require$$0$3 = require('zlib');
27
27
  var require$$0$4 = require('buffer');
28
- var Rr = require('os');
28
+ var wr = require('os');
29
29
 
30
30
  function _interopNamespaceDefault(e) {
31
31
  var n = Object.create(null);
@@ -6407,309 +6407,436 @@ function requireWebsocketServer () {
6407
6407
 
6408
6408
  requireWebsocketServer();
6409
6409
 
6410
- const objectToString = Object.prototype.toString;
6411
- const isError = (value) => objectToString.call(value) === "[object Error]";
6412
- const errorMessages = /* @__PURE__ */ new Set([
6413
- "network error",
6414
- // Chrome
6415
- "Failed to fetch",
6416
- // Chrome
6417
- "NetworkError when attempting to fetch resource.",
6418
- // Firefox
6419
- "The Internet connection appears to be offline.",
6420
- // Safari 16
6421
- "Network request failed",
6422
- // `cross-fetch`
6423
- "fetch failed",
6424
- // Undici (Node.js)
6425
- "terminated",
6426
- // Undici (Node.js)
6427
- " A network error occurred.",
6428
- // Bun (WebKit)
6429
- "Network connection lost"
6430
- // Cloudflare Workers (fetch)
6431
- ]);
6432
- function isNetworkError(error) {
6433
- const isValid = error && isError(error) && error.name === "TypeError" && typeof error.message === "string";
6434
- if (!isValid) {
6435
- return false;
6436
- }
6437
- const { message, stack } = error;
6438
- if (message === "Load failed") {
6439
- return stack === void 0 || "__sentry_captured__" in error;
6440
- }
6441
- if (message.startsWith("error sending request for url")) {
6442
- return true;
6443
- }
6444
- return errorMessages.has(message);
6445
- }
6410
+ var pRetry = {exports: {}};
6446
6411
 
6447
- function validateRetries(retries) {
6448
- if (typeof retries === "number") {
6449
- if (retries < 0) {
6450
- throw new TypeError("Expected `retries` to be a non-negative number.");
6451
- }
6452
- if (Number.isNaN(retries)) {
6453
- throw new TypeError("Expected `retries` to be a valid number or Infinity, got NaN.");
6454
- }
6455
- } else if (retries !== void 0) {
6456
- throw new TypeError("Expected `retries` to be a number or Infinity.");
6457
- }
6412
+ var retry$1 = {};
6413
+
6414
+ var retry_operation;
6415
+ var hasRequiredRetry_operation;
6416
+
6417
+ function requireRetry_operation () {
6418
+ if (hasRequiredRetry_operation) return retry_operation;
6419
+ hasRequiredRetry_operation = 1;
6420
+ function RetryOperation(timeouts, options) {
6421
+ if (typeof options === "boolean") {
6422
+ options = { forever: options };
6423
+ }
6424
+ this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));
6425
+ this._timeouts = timeouts;
6426
+ this._options = options || {};
6427
+ this._maxRetryTime = options && options.maxRetryTime || Infinity;
6428
+ this._fn = null;
6429
+ this._errors = [];
6430
+ this._attempts = 1;
6431
+ this._operationTimeout = null;
6432
+ this._operationTimeoutCb = null;
6433
+ this._timeout = null;
6434
+ this._operationStart = null;
6435
+ this._timer = null;
6436
+ if (this._options.forever) {
6437
+ this._cachedTimeouts = this._timeouts.slice(0);
6438
+ }
6439
+ }
6440
+ retry_operation = RetryOperation;
6441
+ RetryOperation.prototype.reset = function() {
6442
+ this._attempts = 1;
6443
+ this._timeouts = this._originalTimeouts.slice(0);
6444
+ };
6445
+ RetryOperation.prototype.stop = function() {
6446
+ if (this._timeout) {
6447
+ clearTimeout(this._timeout);
6448
+ }
6449
+ if (this._timer) {
6450
+ clearTimeout(this._timer);
6451
+ }
6452
+ this._timeouts = [];
6453
+ this._cachedTimeouts = null;
6454
+ };
6455
+ RetryOperation.prototype.retry = function(err) {
6456
+ if (this._timeout) {
6457
+ clearTimeout(this._timeout);
6458
+ }
6459
+ if (!err) {
6460
+ return false;
6461
+ }
6462
+ var currentTime = (/* @__PURE__ */ new Date()).getTime();
6463
+ if (err && currentTime - this._operationStart >= this._maxRetryTime) {
6464
+ this._errors.push(err);
6465
+ this._errors.unshift(new Error("RetryOperation timeout occurred"));
6466
+ return false;
6467
+ }
6468
+ this._errors.push(err);
6469
+ var timeout = this._timeouts.shift();
6470
+ if (timeout === void 0) {
6471
+ if (this._cachedTimeouts) {
6472
+ this._errors.splice(0, this._errors.length - 1);
6473
+ timeout = this._cachedTimeouts.slice(-1);
6474
+ } else {
6475
+ return false;
6476
+ }
6477
+ }
6478
+ var self = this;
6479
+ this._timer = setTimeout(function() {
6480
+ self._attempts++;
6481
+ if (self._operationTimeoutCb) {
6482
+ self._timeout = setTimeout(function() {
6483
+ self._operationTimeoutCb(self._attempts);
6484
+ }, self._operationTimeout);
6485
+ if (self._options.unref) {
6486
+ self._timeout.unref();
6487
+ }
6488
+ }
6489
+ self._fn(self._attempts);
6490
+ }, timeout);
6491
+ if (this._options.unref) {
6492
+ this._timer.unref();
6493
+ }
6494
+ return true;
6495
+ };
6496
+ RetryOperation.prototype.attempt = function(fn, timeoutOps) {
6497
+ this._fn = fn;
6498
+ if (timeoutOps) {
6499
+ if (timeoutOps.timeout) {
6500
+ this._operationTimeout = timeoutOps.timeout;
6501
+ }
6502
+ if (timeoutOps.cb) {
6503
+ this._operationTimeoutCb = timeoutOps.cb;
6504
+ }
6505
+ }
6506
+ var self = this;
6507
+ if (this._operationTimeoutCb) {
6508
+ this._timeout = setTimeout(function() {
6509
+ self._operationTimeoutCb();
6510
+ }, self._operationTimeout);
6511
+ }
6512
+ this._operationStart = (/* @__PURE__ */ new Date()).getTime();
6513
+ this._fn(this._attempts);
6514
+ };
6515
+ RetryOperation.prototype.try = function(fn) {
6516
+ console.log("Using RetryOperation.try() is deprecated");
6517
+ this.attempt(fn);
6518
+ };
6519
+ RetryOperation.prototype.start = function(fn) {
6520
+ console.log("Using RetryOperation.start() is deprecated");
6521
+ this.attempt(fn);
6522
+ };
6523
+ RetryOperation.prototype.start = RetryOperation.prototype.try;
6524
+ RetryOperation.prototype.errors = function() {
6525
+ return this._errors;
6526
+ };
6527
+ RetryOperation.prototype.attempts = function() {
6528
+ return this._attempts;
6529
+ };
6530
+ RetryOperation.prototype.mainError = function() {
6531
+ if (this._errors.length === 0) {
6532
+ return null;
6533
+ }
6534
+ var counts = {};
6535
+ var mainError = null;
6536
+ var mainErrorCount = 0;
6537
+ for (var i = 0; i < this._errors.length; i++) {
6538
+ var error = this._errors[i];
6539
+ var message = error.message;
6540
+ var count = (counts[message] || 0) + 1;
6541
+ counts[message] = count;
6542
+ if (count >= mainErrorCount) {
6543
+ mainError = error;
6544
+ mainErrorCount = count;
6545
+ }
6546
+ }
6547
+ return mainError;
6548
+ };
6549
+ return retry_operation;
6458
6550
  }
6459
- function validateNumberOption(name, value, { min = 0, allowInfinity = false } = {}) {
6460
- if (value === void 0) {
6461
- return;
6462
- }
6463
- if (typeof value !== "number" || Number.isNaN(value)) {
6464
- throw new TypeError(`Expected \`${name}\` to be a number${allowInfinity ? " or Infinity" : ""}.`);
6465
- }
6466
- if (!allowInfinity && !Number.isFinite(value)) {
6467
- throw new TypeError(`Expected \`${name}\` to be a finite number.`);
6468
- }
6469
- if (value < min) {
6470
- throw new TypeError(`Expected \`${name}\` to be \u2265 ${min}.`);
6471
- }
6551
+
6552
+ var hasRequiredRetry$1;
6553
+
6554
+ function requireRetry$1 () {
6555
+ if (hasRequiredRetry$1) return retry$1;
6556
+ hasRequiredRetry$1 = 1;
6557
+ (function (exports$1) {
6558
+ var RetryOperation = requireRetry_operation();
6559
+ exports$1.operation = function(options) {
6560
+ var timeouts = exports$1.timeouts(options);
6561
+ return new RetryOperation(timeouts, {
6562
+ forever: options && (options.forever || options.retries === Infinity),
6563
+ unref: options && options.unref,
6564
+ maxRetryTime: options && options.maxRetryTime
6565
+ });
6566
+ };
6567
+ exports$1.timeouts = function(options) {
6568
+ if (options instanceof Array) {
6569
+ return [].concat(options);
6570
+ }
6571
+ var opts = {
6572
+ retries: 10,
6573
+ factor: 2,
6574
+ minTimeout: 1 * 1e3,
6575
+ maxTimeout: Infinity,
6576
+ randomize: false
6577
+ };
6578
+ for (var key in options) {
6579
+ opts[key] = options[key];
6580
+ }
6581
+ if (opts.minTimeout > opts.maxTimeout) {
6582
+ throw new Error("minTimeout is greater than maxTimeout");
6583
+ }
6584
+ var timeouts = [];
6585
+ for (var i = 0; i < opts.retries; i++) {
6586
+ timeouts.push(this.createTimeout(i, opts));
6587
+ }
6588
+ if (options && options.forever && !timeouts.length) {
6589
+ timeouts.push(this.createTimeout(i, opts));
6590
+ }
6591
+ timeouts.sort(function(a, b) {
6592
+ return a - b;
6593
+ });
6594
+ return timeouts;
6595
+ };
6596
+ exports$1.createTimeout = function(attempt, opts) {
6597
+ var random = opts.randomize ? Math.random() + 1 : 1;
6598
+ var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt));
6599
+ timeout = Math.min(timeout, opts.maxTimeout);
6600
+ return timeout;
6601
+ };
6602
+ exports$1.wrap = function(obj, options, methods) {
6603
+ if (options instanceof Array) {
6604
+ methods = options;
6605
+ options = null;
6606
+ }
6607
+ if (!methods) {
6608
+ methods = [];
6609
+ for (var key in obj) {
6610
+ if (typeof obj[key] === "function") {
6611
+ methods.push(key);
6612
+ }
6613
+ }
6614
+ }
6615
+ for (var i = 0; i < methods.length; i++) {
6616
+ var method = methods[i];
6617
+ var original = obj[method];
6618
+ obj[method] = function retryWrapper(original2) {
6619
+ var op = exports$1.operation(options);
6620
+ var args = Array.prototype.slice.call(arguments, 1);
6621
+ var callback = args.pop();
6622
+ args.push(function(err) {
6623
+ if (op.retry(err)) {
6624
+ return;
6625
+ }
6626
+ if (err) {
6627
+ arguments[0] = op.mainError();
6628
+ }
6629
+ callback.apply(this, arguments);
6630
+ });
6631
+ op.attempt(function() {
6632
+ original2.apply(obj, args);
6633
+ });
6634
+ }.bind(obj, original);
6635
+ obj[method].options = options;
6636
+ }
6637
+ };
6638
+ } (retry$1));
6639
+ return retry$1;
6472
6640
  }
6473
- class AbortError extends Error {
6474
- constructor(message) {
6475
- super();
6476
- if (message instanceof Error) {
6477
- this.originalError = message;
6478
- ({ message } = message);
6479
- } else {
6480
- this.originalError = new Error(message);
6481
- this.originalError.stack = this.stack;
6482
- }
6483
- this.name = "AbortError";
6484
- this.message = message;
6485
- }
6486
- }
6487
- function calculateDelay(retriesConsumed, options) {
6488
- const attempt = Math.max(1, retriesConsumed + 1);
6489
- const random = options.randomize ? Math.random() + 1 : 1;
6490
- let timeout = Math.round(random * options.minTimeout * options.factor ** (attempt - 1));
6491
- timeout = Math.min(timeout, options.maxTimeout);
6492
- return timeout;
6493
- }
6494
- function calculateRemainingTime(start, max) {
6495
- if (!Number.isFinite(max)) {
6496
- return max;
6497
- }
6498
- return max - (performance.now() - start);
6499
- }
6500
- async function onAttemptFailure({ error, attemptNumber, retriesConsumed, startTime, options }) {
6501
- const normalizedError = error instanceof Error ? error : new TypeError(`Non-error was thrown: "${error}". You should only throw errors.`);
6502
- if (normalizedError instanceof AbortError) {
6503
- throw normalizedError.originalError;
6504
- }
6505
- const retriesLeft = Number.isFinite(options.retries) ? Math.max(0, options.retries - retriesConsumed) : options.retries;
6506
- const maxRetryTime = options.maxRetryTime ?? Number.POSITIVE_INFINITY;
6507
- const context = Object.freeze({
6508
- error: normalizedError,
6509
- attemptNumber,
6510
- retriesLeft,
6511
- retriesConsumed
6512
- });
6513
- await options.onFailedAttempt(context);
6514
- if (calculateRemainingTime(startTime, maxRetryTime) <= 0) {
6515
- throw normalizedError;
6516
- }
6517
- const consumeRetry = await options.shouldConsumeRetry(context);
6518
- const remainingTime = calculateRemainingTime(startTime, maxRetryTime);
6519
- if (remainingTime <= 0 || retriesLeft <= 0) {
6520
- throw normalizedError;
6521
- }
6522
- if (normalizedError instanceof TypeError && !isNetworkError(normalizedError)) {
6523
- if (consumeRetry) {
6524
- throw normalizedError;
6525
- }
6526
- options.signal?.throwIfAborted();
6527
- return false;
6528
- }
6529
- if (!await options.shouldRetry(context)) {
6530
- throw normalizedError;
6531
- }
6532
- if (!consumeRetry) {
6533
- options.signal?.throwIfAborted();
6534
- return false;
6535
- }
6536
- const delayTime = calculateDelay(retriesConsumed, options);
6537
- const finalDelay = Math.min(delayTime, remainingTime);
6538
- options.signal?.throwIfAborted();
6539
- if (finalDelay > 0) {
6540
- await new Promise((resolve, reject) => {
6541
- const onAbort = () => {
6542
- clearTimeout(timeoutToken);
6543
- options.signal?.removeEventListener("abort", onAbort);
6544
- reject(options.signal.reason);
6545
- };
6546
- const timeoutToken = setTimeout(() => {
6547
- options.signal?.removeEventListener("abort", onAbort);
6548
- resolve();
6549
- }, finalDelay);
6550
- if (options.unref) {
6551
- timeoutToken.unref?.();
6552
- }
6553
- options.signal?.addEventListener("abort", onAbort, { once: true });
6554
- });
6555
- }
6556
- options.signal?.throwIfAborted();
6557
- return true;
6641
+
6642
+ var retry;
6643
+ var hasRequiredRetry;
6644
+
6645
+ function requireRetry () {
6646
+ if (hasRequiredRetry) return retry;
6647
+ hasRequiredRetry = 1;
6648
+ retry = requireRetry$1();
6649
+ return retry;
6558
6650
  }
6559
- async function pRetry(input, options = {}) {
6560
- options = { ...options };
6561
- validateRetries(options.retries);
6562
- if (Object.hasOwn(options, "forever")) {
6563
- throw new Error("The `forever` option is no longer supported. For many use-cases, you can set `retries: Infinity` instead.");
6564
- }
6565
- options.retries ??= 10;
6566
- options.factor ??= 2;
6567
- options.minTimeout ??= 1e3;
6568
- options.maxTimeout ??= Number.POSITIVE_INFINITY;
6569
- options.maxRetryTime ??= Number.POSITIVE_INFINITY;
6570
- options.randomize ??= false;
6571
- options.onFailedAttempt ??= () => {
6572
- };
6573
- options.shouldRetry ??= () => true;
6574
- options.shouldConsumeRetry ??= () => true;
6575
- validateNumberOption("factor", options.factor, { min: 0, allowInfinity: false });
6576
- validateNumberOption("minTimeout", options.minTimeout, { min: 0, allowInfinity: false });
6577
- validateNumberOption("maxTimeout", options.maxTimeout, { min: 0, allowInfinity: true });
6578
- validateNumberOption("maxRetryTime", options.maxRetryTime, { min: 0, allowInfinity: true });
6579
- if (!(options.factor > 0)) {
6580
- options.factor = 1;
6581
- }
6582
- options.signal?.throwIfAborted();
6583
- let attemptNumber = 0;
6584
- let retriesConsumed = 0;
6585
- const startTime = performance.now();
6586
- while (Number.isFinite(options.retries) ? retriesConsumed <= options.retries : true) {
6587
- attemptNumber++;
6588
- try {
6589
- options.signal?.throwIfAborted();
6590
- const result = await input(attemptNumber);
6591
- options.signal?.throwIfAborted();
6592
- return result;
6593
- } catch (error) {
6594
- if (await onAttemptFailure({
6595
- error,
6596
- attemptNumber,
6597
- retriesConsumed,
6598
- startTime,
6599
- options
6600
- })) {
6601
- retriesConsumed++;
6602
- }
6603
- }
6604
- }
6605
- throw new Error("Retry attempts exhausted without throwing an error.");
6651
+
6652
+ var hasRequiredPRetry;
6653
+
6654
+ function requirePRetry () {
6655
+ if (hasRequiredPRetry) return pRetry.exports;
6656
+ hasRequiredPRetry = 1;
6657
+ const retry = requireRetry();
6658
+ const networkErrorMsgs = [
6659
+ "Failed to fetch",
6660
+ // Chrome
6661
+ "NetworkError when attempting to fetch resource.",
6662
+ // Firefox
6663
+ "The Internet connection appears to be offline.",
6664
+ // Safari
6665
+ "Network request failed"
6666
+ // `cross-fetch`
6667
+ ];
6668
+ class AbortError extends Error {
6669
+ constructor(message) {
6670
+ super();
6671
+ if (message instanceof Error) {
6672
+ this.originalError = message;
6673
+ ({ message } = message);
6674
+ } else {
6675
+ this.originalError = new Error(message);
6676
+ this.originalError.stack = this.stack;
6677
+ }
6678
+ this.name = "AbortError";
6679
+ this.message = message;
6680
+ }
6681
+ }
6682
+ const decorateErrorWithCounts = (error, attemptNumber, options) => {
6683
+ const retriesLeft = options.retries - (attemptNumber - 1);
6684
+ error.attemptNumber = attemptNumber;
6685
+ error.retriesLeft = retriesLeft;
6686
+ return error;
6687
+ };
6688
+ const isNetworkError = (errorMessage) => networkErrorMsgs.includes(errorMessage);
6689
+ const pRetry$1 = (input, options) => new Promise((resolve, reject) => {
6690
+ options = {
6691
+ onFailedAttempt: () => {
6692
+ },
6693
+ retries: 10,
6694
+ ...options
6695
+ };
6696
+ const operation = retry.operation(options);
6697
+ operation.attempt(async (attemptNumber) => {
6698
+ try {
6699
+ resolve(await input(attemptNumber));
6700
+ } catch (error) {
6701
+ if (!(error instanceof Error)) {
6702
+ reject(new TypeError(`Non-error was thrown: "${error}". You should only throw errors.`));
6703
+ return;
6704
+ }
6705
+ if (error instanceof AbortError) {
6706
+ operation.stop();
6707
+ reject(error.originalError);
6708
+ } else if (error instanceof TypeError && !isNetworkError(error.message)) {
6709
+ operation.stop();
6710
+ reject(error);
6711
+ } else {
6712
+ decorateErrorWithCounts(error, attemptNumber, options);
6713
+ try {
6714
+ await options.onFailedAttempt(error);
6715
+ } catch (error2) {
6716
+ reject(error2);
6717
+ return;
6718
+ }
6719
+ if (!operation.retry(error)) {
6720
+ reject(operation.mainError());
6721
+ }
6722
+ }
6723
+ }
6724
+ });
6725
+ });
6726
+ pRetry.exports = pRetry$1;
6727
+ pRetry.exports.default = pRetry$1;
6728
+ pRetry.exports.AbortError = AbortError;
6729
+ return pRetry.exports;
6606
6730
  }
6607
6731
 
6608
- var qn = Object.defineProperty;
6609
- var s = (e, t) => qn(e, "name", { value: t, configurable: true });
6610
- const st = BigInt(2 ** 32 - 1), Tr = BigInt(32);
6611
- function ni(e, t = false) {
6612
- return t ? { h: Number(e & st), l: Number(e >> Tr & st) } : { h: Number(e >> Tr & st) | 0, l: Number(e & st) | 0 };
6613
- }
6614
- s(ni, "fromBig");
6615
- function ii(e, t = false) {
6732
+ var pRetryExports = requirePRetry();
6733
+ var ai = /*@__PURE__*/getDefaultExportFromCjs(pRetryExports);
6734
+
6735
+ var Yn = Object.defineProperty;
6736
+ var s = (e, t) => Yn(e, "name", { value: t, configurable: true });
6737
+ const st = BigInt(2 ** 32 - 1), Ar = BigInt(32);
6738
+ function ui(e, t = false) {
6739
+ return t ? { h: Number(e & st), l: Number(e >> Ar & st) } : { h: Number(e >> Ar & st) | 0, l: Number(e & st) | 0 };
6740
+ }
6741
+ s(ui, "fromBig");
6742
+ function li(e, t = false) {
6616
6743
  const r = e.length;
6617
- let n = new Uint32Array(r), o = new Uint32Array(r);
6618
- for (let i = 0; i < r; i++) {
6619
- const { h: c, l } = ni(e[i], t);
6620
- [n[i], o[i]] = [c, l];
6744
+ let n = new Uint32Array(r), i = new Uint32Array(r);
6745
+ for (let o = 0; o < r; o++) {
6746
+ const { h: c, l } = ui(e[o], t);
6747
+ [n[o], i[o]] = [c, l];
6621
6748
  }
6622
- return [n, o];
6749
+ return [n, i];
6623
6750
  }
6624
- s(ii, "split");
6625
- const oi = s((e, t, r) => e << r | t >>> 32 - r, "rotlSH"), si = s((e, t, r) => t << r | e >>> 32 - r, "rotlSL"), ai = s((e, t, r) => t << r - 32 | e >>> 64 - r, "rotlBH"), ci = s((e, t, r) => e << r - 32 | t >>> 64 - r, "rotlBL");
6751
+ s(li, "split");
6752
+ const fi = s((e, t, r) => e << r | t >>> 32 - r, "rotlSH"), hi = s((e, t, r) => t << r | e >>> 32 - r, "rotlSL"), di = s((e, t, r) => t << r - 32 | e >>> 64 - r, "rotlBH"), pi = s((e, t, r) => e << r - 32 | t >>> 64 - r, "rotlBL");
6626
6753
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
6627
- function ui(e) {
6754
+ function mi(e) {
6628
6755
  return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
6629
6756
  }
6630
- s(ui, "isBytes");
6631
- function wr(e, t = "") {
6757
+ s(mi, "isBytes");
6758
+ function vr(e, t = "") {
6632
6759
  if (!Number.isSafeInteger(e) || e < 0) {
6633
6760
  const r = t && `"${t}" `;
6634
6761
  throw new Error(`${r}expected integer >= 0, got ${e}`);
6635
6762
  }
6636
6763
  }
6637
- s(wr, "anumber");
6764
+ s(vr, "anumber");
6638
6765
  function Ut(e, t, r = "") {
6639
- const n = ui(e), o = e?.length;
6766
+ const n = mi(e), i = e?.length;
6640
6767
  if (!n || t !== void 0) {
6641
- const c = r && `"${r}" `, l = "", h = n ? `length=${o}` : `type=${typeof e}`;
6768
+ const c = r && `"${r}" `, l = "", h = n ? `length=${i}` : `type=${typeof e}`;
6642
6769
  throw new Error(c + "expected Uint8Array" + l + ", got " + h);
6643
6770
  }
6644
6771
  return e;
6645
6772
  }
6646
6773
  s(Ut, "abytes");
6647
- function yr(e, t = true) {
6774
+ function br(e, t = true) {
6648
6775
  if (e.destroyed) throw new Error("Hash instance has been destroyed");
6649
6776
  if (t && e.finished) throw new Error("Hash#digest() has already been called");
6650
6777
  }
6651
- s(yr, "aexists");
6652
- function li(e, t) {
6778
+ s(br, "aexists");
6779
+ function Ei(e, t) {
6653
6780
  Ut(e, void 0, "digestInto() output");
6654
6781
  const r = t.outputLen;
6655
6782
  if (e.length < r) throw new Error('"digestInto() output" expected to be of length >=' + r);
6656
6783
  }
6657
- s(li, "aoutput");
6658
- function fi(e) {
6784
+ s(Ei, "aoutput");
6785
+ function _i(e) {
6659
6786
  return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
6660
6787
  }
6661
- s(fi, "u32");
6662
- function Ar(...e) {
6788
+ s(_i, "u32");
6789
+ function Cr(...e) {
6663
6790
  for (let t = 0; t < e.length; t++) e[t].fill(0);
6664
6791
  }
6665
- s(Ar, "clean");
6666
- const hi = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
6667
- function di(e) {
6792
+ s(Cr, "clean");
6793
+ const gi = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
6794
+ function Ii(e) {
6668
6795
  return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
6669
6796
  }
6670
- s(di, "byteSwap");
6671
- function pi(e) {
6672
- for (let t = 0; t < e.length; t++) e[t] = di(e[t]);
6797
+ s(Ii, "byteSwap");
6798
+ function Si(e) {
6799
+ for (let t = 0; t < e.length; t++) e[t] = Ii(e[t]);
6673
6800
  return e;
6674
6801
  }
6675
- s(pi, "byteSwap32");
6676
- const vr = hi ? (e) => e : pi;
6677
- function mi(e, t = {}) {
6678
- const r = s((o, i) => e(i).update(o).digest(), "hashC"), n = e(void 0);
6679
- return r.outputLen = n.outputLen, r.blockLen = n.blockLen, r.create = (o) => e(o), Object.assign(r, t), Object.freeze(r);
6802
+ s(Si, "byteSwap32");
6803
+ const Ur = gi ? (e) => e : Si;
6804
+ function Ri(e, t = {}) {
6805
+ const r = s((i, o) => e(o).update(i).digest(), "hashC"), n = e(void 0);
6806
+ return r.outputLen = n.outputLen, r.blockLen = n.blockLen, r.create = (i) => e(i), Object.assign(r, t), Object.freeze(r);
6680
6807
  }
6681
- s(mi, "createHasher");
6682
- const Ei = s((e) => ({ oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, e]) }), "oidNist"), _i = BigInt(0), Qe = BigInt(1), gi = BigInt(2), Ii = BigInt(7), Si = BigInt(256), Ri = BigInt(113), br = [], Cr = [], Ur = [];
6808
+ s(Ri, "createHasher");
6809
+ const Ti = s((e) => ({ oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, e]) }), "oidNist"), yi = BigInt(0), Qe = BigInt(1), wi = BigInt(2), Ai = BigInt(7), vi = BigInt(256), bi = BigInt(113), Br = [], Or = [], Lr = [];
6683
6810
  for (let e = 0, t = Qe, r = 1, n = 0; e < 24; e++) {
6684
- [r, n] = [n, (2 * r + 3 * n) % 5], br.push(2 * (5 * n + r)), Cr.push((e + 1) * (e + 2) / 2 % 64);
6685
- let o = _i;
6686
- for (let i = 0; i < 7; i++) t = (t << Qe ^ (t >> Ii) * Ri) % Si, t & gi && (o ^= Qe << (Qe << BigInt(i)) - Qe);
6687
- Ur.push(o);
6811
+ [r, n] = [n, (2 * r + 3 * n) % 5], Br.push(2 * (5 * n + r)), Or.push((e + 1) * (e + 2) / 2 % 64);
6812
+ let i = yi;
6813
+ for (let o = 0; o < 7; o++) t = (t << Qe ^ (t >> Ai) * bi) % vi, t & wi && (i ^= Qe << (Qe << BigInt(o)) - Qe);
6814
+ Lr.push(i);
6688
6815
  }
6689
- const Br = ii(Ur, true), Ti = Br[0], wi = Br[1], Or = s((e, t, r) => r > 32 ? ai(e, t, r) : oi(e, t, r), "rotlH"), Lr = s((e, t, r) => r > 32 ? ci(e, t, r) : si(e, t, r), "rotlL");
6690
- function yi(e, t = 24) {
6816
+ const Pr = li(Lr, true), Ci = Pr[0], Ui = Pr[1], Nr = s((e, t, r) => r > 32 ? di(e, t, r) : fi(e, t, r), "rotlH"), Dr = s((e, t, r) => r > 32 ? pi(e, t, r) : hi(e, t, r), "rotlL");
6817
+ function Bi(e, t = 24) {
6691
6818
  const r = new Uint32Array(10);
6692
6819
  for (let n = 24 - t; n < 24; n++) {
6693
6820
  for (let c = 0; c < 10; c++) r[c] = e[c] ^ e[c + 10] ^ e[c + 20] ^ e[c + 30] ^ e[c + 40];
6694
6821
  for (let c = 0; c < 10; c += 2) {
6695
- const l = (c + 8) % 10, h = (c + 2) % 10, _ = r[h], m = r[h + 1], A = Or(_, m, 1) ^ r[l], b = Lr(_, m, 1) ^ r[l + 1];
6822
+ const l = (c + 8) % 10, h = (c + 2) % 10, g = r[h], m = r[h + 1], A = Nr(g, m, 1) ^ r[l], b = Dr(g, m, 1) ^ r[l + 1];
6696
6823
  for (let O = 0; O < 50; O += 10) e[c + O] ^= A, e[c + O + 1] ^= b;
6697
6824
  }
6698
- let o = e[2], i = e[3];
6825
+ let i = e[2], o = e[3];
6699
6826
  for (let c = 0; c < 24; c++) {
6700
- const l = Cr[c], h = Or(o, i, l), _ = Lr(o, i, l), m = br[c];
6701
- o = e[m], i = e[m + 1], e[m] = h, e[m + 1] = _;
6827
+ const l = Or[c], h = Nr(i, o, l), g = Dr(i, o, l), m = Br[c];
6828
+ i = e[m], o = e[m + 1], e[m] = h, e[m + 1] = g;
6702
6829
  }
6703
6830
  for (let c = 0; c < 50; c += 10) {
6704
6831
  for (let l = 0; l < 10; l++) r[l] = e[c + l];
6705
6832
  for (let l = 0; l < 10; l++) e[c + l] ^= ~r[(l + 2) % 10] & r[(l + 4) % 10];
6706
6833
  }
6707
- e[0] ^= Ti[n], e[1] ^= wi[n];
6834
+ e[0] ^= Ci[n], e[1] ^= Ui[n];
6708
6835
  }
6709
- Ar(r);
6836
+ Cr(r);
6710
6837
  }
6711
- s(yi, "keccakP");
6712
- class dr {
6838
+ s(Bi, "keccakP");
6839
+ class mr {
6713
6840
  static {
6714
6841
  s(this, "Keccak");
6715
6842
  }
@@ -6724,22 +6851,22 @@ class dr {
6724
6851
  outputLen;
6725
6852
  enableXOF = false;
6726
6853
  rounds;
6727
- constructor(t, r, n, o = false, i = 24) {
6728
- if (this.blockLen = t, this.suffix = r, this.outputLen = n, this.enableXOF = o, this.rounds = i, wr(n, "outputLen"), !(0 < t && t < 200)) throw new Error("only keccak-f1600 function is supported");
6729
- this.state = new Uint8Array(200), this.state32 = fi(this.state);
6854
+ constructor(t, r, n, i = false, o = 24) {
6855
+ if (this.blockLen = t, this.suffix = r, this.outputLen = n, this.enableXOF = i, this.rounds = o, vr(n, "outputLen"), !(0 < t && t < 200)) throw new Error("only keccak-f1600 function is supported");
6856
+ this.state = new Uint8Array(200), this.state32 = _i(this.state);
6730
6857
  }
6731
6858
  clone() {
6732
6859
  return this._cloneInto();
6733
6860
  }
6734
6861
  keccak() {
6735
- vr(this.state32), yi(this.state32, this.rounds), vr(this.state32), this.posOut = 0, this.pos = 0;
6862
+ Ur(this.state32), Bi(this.state32, this.rounds), Ur(this.state32), this.posOut = 0, this.pos = 0;
6736
6863
  }
6737
6864
  update(t) {
6738
- yr(this), Ut(t);
6739
- const { blockLen: r, state: n } = this, o = t.length;
6740
- for (let i = 0; i < o; ) {
6741
- const c = Math.min(r - this.pos, o - i);
6742
- for (let l = 0; l < c; l++) n[this.pos++] ^= t[i++];
6865
+ br(this), Ut(t);
6866
+ const { blockLen: r, state: n } = this, i = t.length;
6867
+ for (let o = 0; o < i; ) {
6868
+ const c = Math.min(r - this.pos, i - o);
6869
+ for (let l = 0; l < c; l++) n[this.pos++] ^= t[o++];
6743
6870
  this.pos === r && this.keccak();
6744
6871
  }
6745
6872
  return this;
@@ -6747,16 +6874,16 @@ class dr {
6747
6874
  finish() {
6748
6875
  if (this.finished) return;
6749
6876
  this.finished = true;
6750
- const { state: t, suffix: r, pos: n, blockLen: o } = this;
6751
- t[n] ^= r, (r & 128) !== 0 && n === o - 1 && this.keccak(), t[o - 1] ^= 128, this.keccak();
6877
+ const { state: t, suffix: r, pos: n, blockLen: i } = this;
6878
+ t[n] ^= r, (r & 128) !== 0 && n === i - 1 && this.keccak(), t[i - 1] ^= 128, this.keccak();
6752
6879
  }
6753
6880
  writeInto(t) {
6754
- yr(this, false), Ut(t), this.finish();
6881
+ br(this, false), Ut(t), this.finish();
6755
6882
  const r = this.state, { blockLen: n } = this;
6756
- for (let o = 0, i = t.length; o < i; ) {
6883
+ for (let i = 0, o = t.length; i < o; ) {
6757
6884
  this.posOut >= n && this.keccak();
6758
- const c = Math.min(n - this.posOut, i - o);
6759
- t.set(r.subarray(this.posOut, this.posOut + c), o), this.posOut += c, o += c;
6885
+ const c = Math.min(n - this.posOut, o - i);
6886
+ t.set(r.subarray(this.posOut, this.posOut + c), i), this.posOut += c, i += c;
6760
6887
  }
6761
6888
  return t;
6762
6889
  }
@@ -6765,30 +6892,30 @@ class dr {
6765
6892
  return this.writeInto(t);
6766
6893
  }
6767
6894
  xof(t) {
6768
- return wr(t), this.xofInto(new Uint8Array(t));
6895
+ return vr(t), this.xofInto(new Uint8Array(t));
6769
6896
  }
6770
6897
  digestInto(t) {
6771
- if (li(t, this), this.finished) throw new Error("digest() was already called");
6898
+ if (Ei(t, this), this.finished) throw new Error("digest() was already called");
6772
6899
  return this.writeInto(t), this.destroy(), t;
6773
6900
  }
6774
6901
  digest() {
6775
6902
  return this.digestInto(new Uint8Array(this.outputLen));
6776
6903
  }
6777
6904
  destroy() {
6778
- this.destroyed = true, Ar(this.state);
6905
+ this.destroyed = true, Cr(this.state);
6779
6906
  }
6780
6907
  _cloneInto(t) {
6781
- const { blockLen: r, suffix: n, outputLen: o, rounds: i, enableXOF: c } = this;
6782
- return t ||= new dr(r, n, o, c, i), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = i, t.suffix = n, t.outputLen = o, t.enableXOF = c, t.destroyed = this.destroyed, t;
6908
+ const { blockLen: r, suffix: n, outputLen: i, rounds: o, enableXOF: c } = this;
6909
+ return t ||= new mr(r, n, i, c, o), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = o, t.suffix = n, t.outputLen = i, t.enableXOF = c, t.destroyed = this.destroyed, t;
6783
6910
  }
6784
6911
  }
6785
- const Ai = s((e, t, r, n = {}) => mi(() => new dr(t, e, r), n), "genKeccak"), vi = Ai(6, 72, 64, Ei(10));
6786
- var bi = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, Bt = Math.ceil, ce = Math.floor, se = "[BigNumber Error] ", Pr = se + "Number primitive has more than 15 significant digits: ", me = 1e14, $ = 14, Ot = 9007199254740991, Lt = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], Ue = 1e7, te = 1e9;
6787
- function Nr(e) {
6788
- var t, r, n, o = w.prototype = { constructor: w, toString: null, valueOf: null }, i = new w(1), c = 20, l = 4, h = -7, _ = 21, m = -1e7, A = 1e7, b = false, O = 1, x = 0, M = { prefix: "", groupSize: 3, secondaryGroupSize: 0, groupSeparator: ",", decimalSeparator: ".", fractionGroupSize: 0, fractionGroupSeparator: "\xA0", suffix: "" }, y = "0123456789abcdefghijklmnopqrstuvwxyz", C = true;
6789
- function w(a, u) {
6790
- var f, g, p, I, T, d, E, S, R = this;
6791
- if (!(R instanceof w)) return new w(a, u);
6912
+ const Oi = s((e, t, r, n = {}) => Ri(() => new mr(t, e, r), n), "genKeccak"), Li = Oi(6, 72, 64, Ti(10));
6913
+ var Pi = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, Bt = Math.ceil, ce = Math.floor, oe = "[BigNumber Error] ", Mr = oe + "Number primitive has more than 15 significant digits: ", me = 1e14, $ = 14, Ot = 9007199254740991, Lt = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], Ue = 1e7, te = 1e9;
6914
+ function xr(e) {
6915
+ var t, r, n, i = y.prototype = { constructor: y, toString: null, valueOf: null }, o = new y(1), c = 20, l = 4, h = -7, g = 21, m = -1e7, A = 1e7, b = false, O = 1, x = 0, M = { prefix: "", groupSize: 3, secondaryGroupSize: 0, groupSeparator: ",", decimalSeparator: ".", fractionGroupSize: 0, fractionGroupSeparator: "\xA0", suffix: "" }, w = "0123456789abcdefghijklmnopqrstuvwxyz", C = true;
6916
+ function y(a, u) {
6917
+ var f, _, p, I, T, d, E, S, R = this;
6918
+ if (!(R instanceof y)) return new y(a, u);
6792
6919
  if (u == null) {
6793
6920
  if (a && a._isBigNumber === true) {
6794
6921
  R.s = a.s, !a.c || a.e > A ? R.c = R.e = null : a.e < m ? R.c = [R.e = 0] : (R.e = a.e, R.c = a.c.slice());
@@ -6802,18 +6929,18 @@ function Nr(e) {
6802
6929
  }
6803
6930
  S = String(a);
6804
6931
  } else {
6805
- if (!bi.test(S = String(a))) return n(R, S, d);
6932
+ if (!Pi.test(S = String(a))) return n(R, S, d);
6806
6933
  R.s = S.charCodeAt(0) == 45 ? (S = S.slice(1), -1) : 1;
6807
6934
  }
6808
6935
  (I = S.indexOf(".")) > -1 && (S = S.replace(".", "")), (T = S.search(/e/i)) > 0 ? (I < 0 && (I = T), I += +S.slice(T + 1), S = S.substring(0, T)) : I < 0 && (I = S.length);
6809
6936
  } else {
6810
- if (J(u, 2, y.length, "Base"), u == 10 && C) return R = new w(a), G(R, c + R.e + 1, l);
6937
+ if (J(u, 2, w.length, "Base"), u == 10 && C) return R = new y(a), G(R, c + R.e + 1, l);
6811
6938
  if (S = String(a), d = typeof a == "number") {
6812
6939
  if (a * 0 != 0) return n(R, S, d, u);
6813
- if (R.s = 1 / a < 0 ? (S = S.slice(1), -1) : 1, w.DEBUG && S.replace(/^0\.0*|\./, "").length > 15) throw Error(Pr + a);
6940
+ if (R.s = 1 / a < 0 ? (S = S.slice(1), -1) : 1, y.DEBUG && S.replace(/^0\.0*|\./, "").length > 15) throw Error(Mr + a);
6814
6941
  } else R.s = S.charCodeAt(0) === 45 ? (S = S.slice(1), -1) : 1;
6815
- for (f = y.slice(0, u), I = T = 0, E = S.length; T < E; T++) if (f.indexOf(g = S.charAt(T)) < 0) {
6816
- if (g == ".") {
6942
+ for (f = w.slice(0, u), I = T = 0, E = S.length; T < E; T++) if (f.indexOf(_ = S.charAt(T)) < 0) {
6943
+ if (_ == ".") {
6817
6944
  if (T > I) {
6818
6945
  I = E;
6819
6946
  continue;
@@ -6829,7 +6956,7 @@ function Nr(e) {
6829
6956
  for (T = 0; S.charCodeAt(T) === 48; T++) ;
6830
6957
  for (E = S.length; S.charCodeAt(--E) === 48; ) ;
6831
6958
  if (S = S.slice(T, ++E)) {
6832
- if (E -= T, d && w.DEBUG && E > 15 && (a > Ot || a !== ce(a))) throw Error(Pr + R.s * a);
6959
+ if (E -= T, d && y.DEBUG && E > 15 && (a > Ot || a !== ce(a))) throw Error(Mr + R.s * a);
6833
6960
  if ((I = I - T - 1) > A) R.c = R.e = null;
6834
6961
  else if (I < m) R.c = [R.e = 0];
6835
6962
  else {
@@ -6842,58 +6969,58 @@ function Nr(e) {
6842
6969
  }
6843
6970
  } else R.c = [R.e = 0];
6844
6971
  }
6845
- s(w, "BigNumber2"), w.clone = Nr, w.ROUND_UP = 0, w.ROUND_DOWN = 1, w.ROUND_CEIL = 2, w.ROUND_FLOOR = 3, w.ROUND_HALF_UP = 4, w.ROUND_HALF_DOWN = 5, w.ROUND_HALF_EVEN = 6, w.ROUND_HALF_CEIL = 7, w.ROUND_HALF_FLOOR = 8, w.EUCLID = 9, w.config = w.set = function(a) {
6972
+ s(y, "BigNumber2"), y.clone = xr, y.ROUND_UP = 0, y.ROUND_DOWN = 1, y.ROUND_CEIL = 2, y.ROUND_FLOOR = 3, y.ROUND_HALF_UP = 4, y.ROUND_HALF_DOWN = 5, y.ROUND_HALF_EVEN = 6, y.ROUND_HALF_CEIL = 7, y.ROUND_HALF_FLOOR = 8, y.EUCLID = 9, y.config = y.set = function(a) {
6846
6973
  var u, f;
6847
6974
  if (a != null) if (typeof a == "object") {
6848
- if (a.hasOwnProperty(u = "DECIMAL_PLACES") && (f = a[u], J(f, 0, te, u), c = f), a.hasOwnProperty(u = "ROUNDING_MODE") && (f = a[u], J(f, 0, 8, u), l = f), a.hasOwnProperty(u = "EXPONENTIAL_AT") && (f = a[u], f && f.pop ? (J(f[0], -te, 0, u), J(f[1], 0, te, u), h = f[0], _ = f[1]) : (J(f, -te, te, u), h = -(_ = f < 0 ? -f : f))), a.hasOwnProperty(u = "RANGE")) if (f = a[u], f && f.pop) J(f[0], -te, -1, u), J(f[1], 1, te, u), m = f[0], A = f[1];
6975
+ if (a.hasOwnProperty(u = "DECIMAL_PLACES") && (f = a[u], J(f, 0, te, u), c = f), a.hasOwnProperty(u = "ROUNDING_MODE") && (f = a[u], J(f, 0, 8, u), l = f), a.hasOwnProperty(u = "EXPONENTIAL_AT") && (f = a[u], f && f.pop ? (J(f[0], -te, 0, u), J(f[1], 0, te, u), h = f[0], g = f[1]) : (J(f, -te, te, u), h = -(g = f < 0 ? -f : f))), a.hasOwnProperty(u = "RANGE")) if (f = a[u], f && f.pop) J(f[0], -te, -1, u), J(f[1], 1, te, u), m = f[0], A = f[1];
6849
6976
  else if (J(f, -te, te, u), f) m = -(A = f < 0 ? -f : f);
6850
- else throw Error(se + u + " cannot be zero: " + f);
6977
+ else throw Error(oe + u + " cannot be zero: " + f);
6851
6978
  if (a.hasOwnProperty(u = "CRYPTO")) if (f = a[u], f === !!f) if (f) if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes)) b = f;
6852
- else throw b = !f, Error(se + "crypto unavailable");
6979
+ else throw b = !f, Error(oe + "crypto unavailable");
6853
6980
  else b = f;
6854
- else throw Error(se + u + " not true or false: " + f);
6981
+ else throw Error(oe + u + " not true or false: " + f);
6855
6982
  if (a.hasOwnProperty(u = "MODULO_MODE") && (f = a[u], J(f, 0, 9, u), O = f), a.hasOwnProperty(u = "POW_PRECISION") && (f = a[u], J(f, 0, te, u), x = f), a.hasOwnProperty(u = "FORMAT")) if (f = a[u], typeof f == "object") M = f;
6856
- else throw Error(se + u + " not an object: " + f);
6857
- if (a.hasOwnProperty(u = "ALPHABET")) if (f = a[u], typeof f == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(f)) C = f.slice(0, 10) == "0123456789", y = f;
6858
- else throw Error(se + u + " invalid: " + f);
6859
- } else throw Error(se + "Object expected: " + a);
6860
- return { DECIMAL_PLACES: c, ROUNDING_MODE: l, EXPONENTIAL_AT: [h, _], RANGE: [m, A], CRYPTO: b, MODULO_MODE: O, POW_PRECISION: x, FORMAT: M, ALPHABET: y };
6861
- }, w.isBigNumber = function(a) {
6983
+ else throw Error(oe + u + " not an object: " + f);
6984
+ if (a.hasOwnProperty(u = "ALPHABET")) if (f = a[u], typeof f == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(f)) C = f.slice(0, 10) == "0123456789", w = f;
6985
+ else throw Error(oe + u + " invalid: " + f);
6986
+ } else throw Error(oe + "Object expected: " + a);
6987
+ return { DECIMAL_PLACES: c, ROUNDING_MODE: l, EXPONENTIAL_AT: [h, g], RANGE: [m, A], CRYPTO: b, MODULO_MODE: O, POW_PRECISION: x, FORMAT: M, ALPHABET: w };
6988
+ }, y.isBigNumber = function(a) {
6862
6989
  if (!a || a._isBigNumber !== true) return false;
6863
- if (!w.DEBUG) return true;
6864
- var u, f, g = a.c, p = a.e, I = a.s;
6865
- e: if ({}.toString.call(g) == "[object Array]") {
6990
+ if (!y.DEBUG) return true;
6991
+ var u, f, _ = a.c, p = a.e, I = a.s;
6992
+ e: if ({}.toString.call(_) == "[object Array]") {
6866
6993
  if ((I === 1 || I === -1) && p >= -te && p <= te && p === ce(p)) {
6867
- if (g[0] === 0) {
6868
- if (p === 0 && g.length === 1) return true;
6994
+ if (_[0] === 0) {
6995
+ if (p === 0 && _.length === 1) return true;
6869
6996
  break e;
6870
6997
  }
6871
- if (u = (p + 1) % $, u < 1 && (u += $), String(g[0]).length == u) {
6872
- for (u = 0; u < g.length; u++) if (f = g[u], f < 0 || f >= me || f !== ce(f)) break e;
6998
+ if (u = (p + 1) % $, u < 1 && (u += $), String(_[0]).length == u) {
6999
+ for (u = 0; u < _.length; u++) if (f = _[u], f < 0 || f >= me || f !== ce(f)) break e;
6873
7000
  if (f !== 0) return true;
6874
7001
  }
6875
7002
  }
6876
- } else if (g === null && p === null && (I === null || I === 1 || I === -1)) return true;
6877
- throw Error(se + "Invalid BigNumber: " + a);
6878
- }, w.maximum = w.max = function() {
7003
+ } else if (_ === null && p === null && (I === null || I === 1 || I === -1)) return true;
7004
+ throw Error(oe + "Invalid BigNumber: " + a);
7005
+ }, y.maximum = y.max = function() {
6879
7006
  return L(arguments, -1);
6880
- }, w.minimum = w.min = function() {
7007
+ }, y.minimum = y.min = function() {
6881
7008
  return L(arguments, 1);
6882
- }, w.random = (function() {
7009
+ }, y.random = (function() {
6883
7010
  var a = 9007199254740992, u = Math.random() * a & 2097151 ? function() {
6884
7011
  return ce(Math.random() * a);
6885
7012
  } : function() {
6886
7013
  return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
6887
7014
  };
6888
7015
  return function(f) {
6889
- var g, p, I, T, d, E = 0, S = [], R = new w(i);
7016
+ var _, p, I, T, d, E = 0, S = [], R = new y(o);
6890
7017
  if (f == null ? f = c : J(f, 0, te), T = Bt(f / $), b) if (crypto.getRandomValues) {
6891
- for (g = crypto.getRandomValues(new Uint32Array(T *= 2)); E < T; ) d = g[E] * 131072 + (g[E + 1] >>> 11), d >= 9e15 ? (p = crypto.getRandomValues(new Uint32Array(2)), g[E] = p[0], g[E + 1] = p[1]) : (S.push(d % 1e14), E += 2);
7018
+ for (_ = crypto.getRandomValues(new Uint32Array(T *= 2)); E < T; ) d = _[E] * 131072 + (_[E + 1] >>> 11), d >= 9e15 ? (p = crypto.getRandomValues(new Uint32Array(2)), _[E] = p[0], _[E + 1] = p[1]) : (S.push(d % 1e14), E += 2);
6892
7019
  E = T / 2;
6893
7020
  } else if (crypto.randomBytes) {
6894
- for (g = crypto.randomBytes(T *= 7); E < T; ) d = (g[E] & 31) * 281474976710656 + g[E + 1] * 1099511627776 + g[E + 2] * 4294967296 + g[E + 3] * 16777216 + (g[E + 4] << 16) + (g[E + 5] << 8) + g[E + 6], d >= 9e15 ? crypto.randomBytes(7).copy(g, E) : (S.push(d % 1e14), E += 7);
7021
+ for (_ = crypto.randomBytes(T *= 7); E < T; ) d = (_[E] & 31) * 281474976710656 + _[E + 1] * 1099511627776 + _[E + 2] * 4294967296 + _[E + 3] * 16777216 + (_[E + 4] << 16) + (_[E + 5] << 8) + _[E + 6], d >= 9e15 ? crypto.randomBytes(7).copy(_, E) : (S.push(d % 1e14), E += 7);
6895
7022
  E = T / 7;
6896
- } else throw b = false, Error(se + "crypto unavailable");
7023
+ } else throw b = false, Error(oe + "crypto unavailable");
6897
7024
  if (!b) for (; E < T; ) d = u(), d < 9e15 && (S[E++] = d % 1e14);
6898
7025
  for (T = S[--E], f %= $, T && f && (d = Lt[$ - f], S[E] = ce(T / d) * d); S[E] === 0; S.pop(), E--) ;
6899
7026
  if (E < 0) S = [I = 0];
@@ -6904,56 +7031,56 @@ function Nr(e) {
6904
7031
  }
6905
7032
  return R.e = I, R.c = S, R;
6906
7033
  };
6907
- })(), w.sum = function() {
6908
- for (var a = 1, u = arguments, f = new w(u[0]); a < u.length; ) f = f.plus(u[a++]);
7034
+ })(), y.sum = function() {
7035
+ for (var a = 1, u = arguments, f = new y(u[0]); a < u.length; ) f = f.plus(u[a++]);
6909
7036
  return f;
6910
7037
  }, r = (function() {
6911
7038
  var a = "0123456789";
6912
- function u(f, g, p, I) {
7039
+ function u(f, _, p, I) {
6913
7040
  for (var T, d = [0], E, S = 0, R = f.length; S < R; ) {
6914
- for (E = d.length; E--; d[E] *= g) ;
7041
+ for (E = d.length; E--; d[E] *= _) ;
6915
7042
  for (d[0] += I.indexOf(f.charAt(S++)), T = 0; T < d.length; T++) d[T] > p - 1 && (d[T + 1] == null && (d[T + 1] = 0), d[T + 1] += d[T] / p | 0, d[T] %= p);
6916
7043
  }
6917
7044
  return d.reverse();
6918
7045
  }
6919
- return s(u, "toBaseOut"), function(f, g, p, I, T) {
7046
+ return s(u, "toBaseOut"), function(f, _, p, I, T) {
6920
7047
  var d, E, S, R, v, N, P, H, j = f.indexOf("."), q = c, D = l;
6921
- for (j >= 0 && (R = x, x = 0, f = f.replace(".", ""), H = new w(g), N = H.pow(f.length - j), x = R, H.c = u(we(le(N.c), N.e, "0"), 10, p, a), H.e = H.c.length), P = u(f, g, p, T ? (d = y, a) : (d = a, y)), S = R = P.length; P[--R] == 0; P.pop()) ;
7048
+ for (j >= 0 && (R = x, x = 0, f = f.replace(".", ""), H = new y(_), N = H.pow(f.length - j), x = R, H.c = u(ye(le(N.c), N.e, "0"), 10, p, a), H.e = H.c.length), P = u(f, _, p, T ? (d = w, a) : (d = a, w)), S = R = P.length; P[--R] == 0; P.pop()) ;
6922
7049
  if (!P[0]) return d.charAt(0);
6923
- if (j < 0 ? --S : (N.c = P, N.e = S, N.s = I, N = t(N, H, q, D, p), P = N.c, v = N.r, S = N.e), E = S + q + 1, j = P[E], R = p / 2, v = v || E < 0 || P[E + 1] != null, v = D < 4 ? (j != null || v) && (D == 0 || D == (N.s < 0 ? 3 : 2)) : j > R || j == R && (D == 4 || v || D == 6 && P[E - 1] & 1 || D == (N.s < 0 ? 8 : 7)), E < 1 || !P[0]) f = v ? we(d.charAt(1), -q, d.charAt(0)) : d.charAt(0);
7050
+ if (j < 0 ? --S : (N.c = P, N.e = S, N.s = I, N = t(N, H, q, D, p), P = N.c, v = N.r, S = N.e), E = S + q + 1, j = P[E], R = p / 2, v = v || E < 0 || P[E + 1] != null, v = D < 4 ? (j != null || v) && (D == 0 || D == (N.s < 0 ? 3 : 2)) : j > R || j == R && (D == 4 || v || D == 6 && P[E - 1] & 1 || D == (N.s < 0 ? 8 : 7)), E < 1 || !P[0]) f = v ? ye(d.charAt(1), -q, d.charAt(0)) : d.charAt(0);
6924
7051
  else {
6925
7052
  if (P.length = E, v) for (--p; ++P[--E] > p; ) P[E] = 0, E || (++S, P = [1].concat(P));
6926
7053
  for (R = P.length; !P[--R]; ) ;
6927
7054
  for (j = 0, f = ""; j <= R; f += d.charAt(P[j++])) ;
6928
- f = we(f, S, d.charAt(0));
7055
+ f = ye(f, S, d.charAt(0));
6929
7056
  }
6930
7057
  return f;
6931
7058
  };
6932
7059
  })(), t = (function() {
6933
- function a(g, p, I) {
6934
- var T, d, E, S, R = 0, v = g.length, N = p % Ue, P = p / Ue | 0;
6935
- for (g = g.slice(); v--; ) E = g[v] % Ue, S = g[v] / Ue | 0, T = P * E + S * N, d = N * E + T % Ue * Ue + R, R = (d / I | 0) + (T / Ue | 0) + P * S, g[v] = d % I;
6936
- return R && (g = [R].concat(g)), g;
7060
+ function a(_, p, I) {
7061
+ var T, d, E, S, R = 0, v = _.length, N = p % Ue, P = p / Ue | 0;
7062
+ for (_ = _.slice(); v--; ) E = _[v] % Ue, S = _[v] / Ue | 0, T = P * E + S * N, d = N * E + T % Ue * Ue + R, R = (d / I | 0) + (T / Ue | 0) + P * S, _[v] = d % I;
7063
+ return R && (_ = [R].concat(_)), _;
6937
7064
  }
6938
7065
  s(a, "multiply");
6939
- function u(g, p, I, T) {
7066
+ function u(_, p, I, T) {
6940
7067
  var d, E;
6941
7068
  if (I != T) E = I > T ? 1 : -1;
6942
- else for (d = E = 0; d < I; d++) if (g[d] != p[d]) {
6943
- E = g[d] > p[d] ? 1 : -1;
7069
+ else for (d = E = 0; d < I; d++) if (_[d] != p[d]) {
7070
+ E = _[d] > p[d] ? 1 : -1;
6944
7071
  break;
6945
7072
  }
6946
7073
  return E;
6947
7074
  }
6948
7075
  s(u, "compare2");
6949
- function f(g, p, I, T) {
6950
- for (var d = 0; I--; ) g[I] -= d, d = g[I] < p[I] ? 1 : 0, g[I] = d * T + g[I] - p[I];
6951
- for (; !g[0] && g.length > 1; g.splice(0, 1)) ;
6952
- }
6953
- return s(f, "subtract"), function(g, p, I, T, d) {
6954
- var E, S, R, v, N, P, H, j, q, D, F, z, de, ve, be, ne, pe, Z = g.s == p.s ? 1 : -1, ee = g.c, Q = p.c;
6955
- if (!ee || !ee[0] || !Q || !Q[0]) return new w(!g.s || !p.s || (ee ? Q && ee[0] == Q[0] : !Q) ? NaN : ee && ee[0] == 0 || !Q ? Z * 0 : Z / 0);
6956
- for (j = new w(Z), q = j.c = [], S = g.e - p.e, Z = I + S + 1, d || (d = me, S = ue(g.e / $) - ue(p.e / $), Z = Z / $ | 0), R = 0; Q[R] == (ee[R] || 0); R++) ;
7076
+ function f(_, p, I, T) {
7077
+ for (var d = 0; I--; ) _[I] -= d, d = _[I] < p[I] ? 1 : 0, _[I] = d * T + _[I] - p[I];
7078
+ for (; !_[0] && _.length > 1; _.splice(0, 1)) ;
7079
+ }
7080
+ return s(f, "subtract"), function(_, p, I, T, d) {
7081
+ var E, S, R, v, N, P, H, j, q, D, F, z, de, ve, be, ne, pe, Z = _.s == p.s ? 1 : -1, ee = _.c, Q = p.c;
7082
+ if (!ee || !ee[0] || !Q || !Q[0]) return new y(!_.s || !p.s || (ee ? Q && ee[0] == Q[0] : !Q) ? NaN : ee && ee[0] == 0 || !Q ? Z * 0 : Z / 0);
7083
+ for (j = new y(Z), q = j.c = [], S = _.e - p.e, Z = I + S + 1, d || (d = me, S = ue(_.e / $) - ue(p.e / $), Z = Z / $ | 0), R = 0; Q[R] == (ee[R] || 0); R++) ;
6957
7084
  if (Q[R] > (ee[R] || 0) && S--, Z < 0) q.push(1), v = true;
6958
7085
  else {
6959
7086
  for (ve = ee.length, ne = Q.length, R = 0, Z += 2, N = ce(d / (Q[0] + 1)), N > 1 && (Q = a(Q, N, d), ee = a(ee, N, d), ne = Q.length, ve = ee.length), de = ne, D = ee.slice(0, ne), F = D.length; F < ne; D[F++] = 0) ;
@@ -6975,51 +7102,51 @@ function Nr(e) {
6975
7102
  return j;
6976
7103
  };
6977
7104
  })();
6978
- function B(a, u, f, g) {
7105
+ function B(a, u, f, _) {
6979
7106
  var p, I, T, d, E;
6980
7107
  if (f == null ? f = l : J(f, 0, 8), !a.c) return a.toString();
6981
- if (p = a.c[0], T = a.e, u == null) E = le(a.c), E = g == 1 || g == 2 && (T <= h || T >= _) ? ct(E, T) : we(E, T, "0");
6982
- else if (a = G(new w(a), u, f), I = a.e, E = le(a.c), d = E.length, g == 1 || g == 2 && (u <= I || I <= h)) {
7108
+ if (p = a.c[0], T = a.e, u == null) E = le(a.c), E = _ == 1 || _ == 2 && (T <= h || T >= g) ? ct(E, T) : ye(E, T, "0");
7109
+ else if (a = G(new y(a), u, f), I = a.e, E = le(a.c), d = E.length, _ == 1 || _ == 2 && (u <= I || I <= h)) {
6983
7110
  for (; d < u; E += "0", d++) ;
6984
7111
  E = ct(E, I);
6985
- } else if (u -= T + (g === 2 && I > T), E = we(E, I, "0"), I + 1 > d) {
7112
+ } else if (u -= T + (_ === 2 && I > T), E = ye(E, I, "0"), I + 1 > d) {
6986
7113
  if (--u > 0) for (E += "."; u--; E += "0") ;
6987
7114
  } else if (u += I - d, u > 0) for (I + 1 == d && (E += "."); u--; E += "0") ;
6988
7115
  return a.s < 0 && p ? "-" + E : E;
6989
7116
  }
6990
7117
  s(B, "format");
6991
7118
  function L(a, u) {
6992
- for (var f, g, p = 1, I = new w(a[0]); p < a.length; p++) g = new w(a[p]), (!g.s || (f = Me(I, g)) === u || f === 0 && I.s === u) && (I = g);
7119
+ for (var f, _, p = 1, I = new y(a[0]); p < a.length; p++) _ = new y(a[p]), (!_.s || (f = Me(I, _)) === u || f === 0 && I.s === u) && (I = _);
6993
7120
  return I;
6994
7121
  }
6995
7122
  s(L, "maxOrMin");
6996
7123
  function U(a, u, f) {
6997
- for (var g = 1, p = u.length; !u[--p]; u.pop()) ;
6998
- for (p = u[0]; p >= 10; p /= 10, g++) ;
6999
- return (f = g + f * $ - 1) > A ? a.c = a.e = null : f < m ? a.c = [a.e = 0] : (a.e = f, a.c = u), a;
7124
+ for (var _ = 1, p = u.length; !u[--p]; u.pop()) ;
7125
+ for (p = u[0]; p >= 10; p /= 10, _++) ;
7126
+ return (f = _ + f * $ - 1) > A ? a.c = a.e = null : f < m ? a.c = [a.e = 0] : (a.e = f, a.c = u), a;
7000
7127
  }
7001
7128
  s(U, "normalise"), n = /* @__PURE__ */ (function() {
7002
- var a = /^(-?)0([xbo])(?=\w[\w.]*$)/i, u = /^([^.]+)\.$/, f = /^\.([^.]+)$/, g = /^-?(Infinity|NaN)$/, p = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
7129
+ var a = /^(-?)0([xbo])(?=\w[\w.]*$)/i, u = /^([^.]+)\.$/, f = /^\.([^.]+)$/, _ = /^-?(Infinity|NaN)$/, p = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
7003
7130
  return function(I, T, d, E) {
7004
7131
  var S, R = d ? T : T.replace(p, "");
7005
- if (g.test(R)) I.s = isNaN(R) ? null : R < 0 ? -1 : 1;
7132
+ if (_.test(R)) I.s = isNaN(R) ? null : R < 0 ? -1 : 1;
7006
7133
  else {
7007
7134
  if (!d && (R = R.replace(a, function(v, N, P) {
7008
7135
  return S = (P = P.toLowerCase()) == "x" ? 16 : P == "b" ? 2 : 8, !E || E == S ? N : v;
7009
- }), E && (S = E, R = R.replace(u, "$1").replace(f, "0.$1")), T != R)) return new w(R, S);
7010
- if (w.DEBUG) throw Error(se + "Not a" + (E ? " base " + E : "") + " number: " + T);
7136
+ }), E && (S = E, R = R.replace(u, "$1").replace(f, "0.$1")), T != R)) return new y(R, S);
7137
+ if (y.DEBUG) throw Error(oe + "Not a" + (E ? " base " + E : "") + " number: " + T);
7011
7138
  I.s = null;
7012
7139
  }
7013
7140
  I.c = I.e = null;
7014
7141
  };
7015
7142
  })();
7016
- function G(a, u, f, g) {
7143
+ function G(a, u, f, _) {
7017
7144
  var p, I, T, d, E, S, R, v = a.c, N = Lt;
7018
7145
  if (v) {
7019
7146
  e: {
7020
7147
  for (p = 1, d = v[0]; d >= 10; d /= 10, p++) ;
7021
7148
  if (I = u - p, I < 0) I += $, T = u, E = v[S = 0], R = ce(E / N[p - T - 1] % 10);
7022
- else if (S = Bt((I + 1) / $), S >= v.length) if (g) {
7149
+ else if (S = Bt((I + 1) / $), S >= v.length) if (_) {
7023
7150
  for (; v.length <= S; v.push(0)) ;
7024
7151
  E = R = 0, p = 1, I %= $, T = I - $ + 1;
7025
7152
  } else break e;
@@ -7027,8 +7154,8 @@ function Nr(e) {
7027
7154
  for (E = d = v[S], p = 1; d >= 10; d /= 10, p++) ;
7028
7155
  I %= $, T = I - $ + p, R = T < 0 ? 0 : ce(E / N[p - T - 1] % 10);
7029
7156
  }
7030
- if (g = g || u < 0 || v[S + 1] != null || (T < 0 ? E : E % N[p - T - 1]), g = f < 4 ? (R || g) && (f == 0 || f == (a.s < 0 ? 3 : 2)) : R > 5 || R == 5 && (f == 4 || g || f == 6 && (I > 0 ? T > 0 ? E / N[p - T] : 0 : v[S - 1]) % 10 & 1 || f == (a.s < 0 ? 8 : 7)), u < 1 || !v[0]) return v.length = 0, g ? (u -= a.e + 1, v[0] = N[($ - u % $) % $], a.e = -u || 0) : v[0] = a.e = 0, a;
7031
- if (I == 0 ? (v.length = S, d = 1, S--) : (v.length = S + 1, d = N[$ - I], v[S] = T > 0 ? ce(E / N[p - T] % N[T]) * d : 0), g) for (; ; ) if (S == 0) {
7157
+ if (_ = _ || u < 0 || v[S + 1] != null || (T < 0 ? E : E % N[p - T - 1]), _ = f < 4 ? (R || _) && (f == 0 || f == (a.s < 0 ? 3 : 2)) : R > 5 || R == 5 && (f == 4 || _ || f == 6 && (I > 0 ? T > 0 ? E / N[p - T] : 0 : v[S - 1]) % 10 & 1 || f == (a.s < 0 ? 8 : 7)), u < 1 || !v[0]) return v.length = 0, _ ? (u -= a.e + 1, v[0] = N[($ - u % $) % $], a.e = -u || 0) : v[0] = a.e = 0, a;
7158
+ if (I == 0 ? (v.length = S, d = 1, S--) : (v.length = S + 1, d = N[$ - I], v[S] = T > 0 ? ce(E / N[p - T] % N[T]) * d : 0), _) for (; ; ) if (S == 0) {
7032
7159
  for (I = 1, T = v[0]; T >= 10; T /= 10, I++) ;
7033
7160
  for (T = v[0] += d, d = 1; T >= 10; T /= 10, d++) ;
7034
7161
  I != d && (a.e++, v[0] == me && (v[0] = 1));
@@ -7046,38 +7173,38 @@ function Nr(e) {
7046
7173
  s(G, "round");
7047
7174
  function k(a) {
7048
7175
  var u, f = a.e;
7049
- return f === null ? a.toString() : (u = le(a.c), u = f <= h || f >= _ ? ct(u, f) : we(u, f, "0"), a.s < 0 ? "-" + u : u);
7176
+ return f === null ? a.toString() : (u = le(a.c), u = f <= h || f >= g ? ct(u, f) : ye(u, f, "0"), a.s < 0 ? "-" + u : u);
7050
7177
  }
7051
- return s(k, "valueOf"), o.absoluteValue = o.abs = function() {
7052
- var a = new w(this);
7178
+ return s(k, "valueOf"), i.absoluteValue = i.abs = function() {
7179
+ var a = new y(this);
7053
7180
  return a.s < 0 && (a.s = 1), a;
7054
- }, o.comparedTo = function(a, u) {
7055
- return Me(this, new w(a, u));
7056
- }, o.decimalPlaces = o.dp = function(a, u) {
7057
- var f, g, p, I = this;
7058
- if (a != null) return J(a, 0, te), u == null ? u = l : J(u, 0, 8), G(new w(I), a + I.e + 1, u);
7181
+ }, i.comparedTo = function(a, u) {
7182
+ return Me(this, new y(a, u));
7183
+ }, i.decimalPlaces = i.dp = function(a, u) {
7184
+ var f, _, p, I = this;
7185
+ if (a != null) return J(a, 0, te), u == null ? u = l : J(u, 0, 8), G(new y(I), a + I.e + 1, u);
7059
7186
  if (!(f = I.c)) return null;
7060
- if (g = ((p = f.length - 1) - ue(this.e / $)) * $, p = f[p]) for (; p % 10 == 0; p /= 10, g--) ;
7061
- return g < 0 && (g = 0), g;
7062
- }, o.dividedBy = o.div = function(a, u) {
7063
- return t(this, new w(a, u), c, l);
7064
- }, o.dividedToIntegerBy = o.idiv = function(a, u) {
7065
- return t(this, new w(a, u), 0, 1);
7066
- }, o.exponentiatedBy = o.pow = function(a, u) {
7067
- var f, g, p, I, T, d, E, S, R, v = this;
7068
- if (a = new w(a), a.c && !a.isInteger()) throw Error(se + "Exponent not an integer: " + k(a));
7069
- if (u != null && (u = new w(u)), d = a.e > 14, !v.c || !v.c[0] || v.c[0] == 1 && !v.e && v.c.length == 1 || !a.c || !a.c[0]) return R = new w(Math.pow(+k(v), d ? a.s * (2 - at(a)) : +k(a))), u ? R.mod(u) : R;
7187
+ if (_ = ((p = f.length - 1) - ue(this.e / $)) * $, p = f[p]) for (; p % 10 == 0; p /= 10, _--) ;
7188
+ return _ < 0 && (_ = 0), _;
7189
+ }, i.dividedBy = i.div = function(a, u) {
7190
+ return t(this, new y(a, u), c, l);
7191
+ }, i.dividedToIntegerBy = i.idiv = function(a, u) {
7192
+ return t(this, new y(a, u), 0, 1);
7193
+ }, i.exponentiatedBy = i.pow = function(a, u) {
7194
+ var f, _, p, I, T, d, E, S, R, v = this;
7195
+ if (a = new y(a), a.c && !a.isInteger()) throw Error(oe + "Exponent not an integer: " + k(a));
7196
+ if (u != null && (u = new y(u)), d = a.e > 14, !v.c || !v.c[0] || v.c[0] == 1 && !v.e && v.c.length == 1 || !a.c || !a.c[0]) return R = new y(Math.pow(+k(v), d ? a.s * (2 - at(a)) : +k(a))), u ? R.mod(u) : R;
7070
7197
  if (E = a.s < 0, u) {
7071
- if (u.c ? !u.c[0] : !u.s) return new w(NaN);
7072
- g = !E && v.isInteger() && u.isInteger(), g && (v = v.mod(u));
7198
+ if (u.c ? !u.c[0] : !u.s) return new y(NaN);
7199
+ _ = !E && v.isInteger() && u.isInteger(), _ && (v = v.mod(u));
7073
7200
  } else {
7074
- if (a.e > 9 && (v.e > 0 || v.e < -1 || (v.e == 0 ? v.c[0] > 1 || d && v.c[1] >= 24e7 : v.c[0] < 8e13 || d && v.c[0] <= 9999975e7))) return I = v.s < 0 && at(a) ? -0 : 0, v.e > -1 && (I = 1 / I), new w(E ? 1 / I : I);
7201
+ if (a.e > 9 && (v.e > 0 || v.e < -1 || (v.e == 0 ? v.c[0] > 1 || d && v.c[1] >= 24e7 : v.c[0] < 8e13 || d && v.c[0] <= 9999975e7))) return I = v.s < 0 && at(a) ? -0 : 0, v.e > -1 && (I = 1 / I), new y(E ? 1 / I : I);
7075
7202
  x && (I = Bt(x / $ + 2));
7076
7203
  }
7077
- for (d ? (f = new w(0.5), E && (a.s = 1), S = at(a)) : (p = Math.abs(+k(a)), S = p % 2), R = new w(i); ; ) {
7204
+ for (d ? (f = new y(0.5), E && (a.s = 1), S = at(a)) : (p = Math.abs(+k(a)), S = p % 2), R = new y(o); ; ) {
7078
7205
  if (S) {
7079
7206
  if (R = R.times(v), !R.c) break;
7080
- I ? R.c.length > I && (R.c.length = I) : g && (R = R.mod(u));
7207
+ I ? R.c.length > I && (R.c.length = I) : _ && (R = R.mod(u));
7081
7208
  }
7082
7209
  if (p) {
7083
7210
  if (p = ce(p / 2), p === 0) break;
@@ -7087,83 +7214,83 @@ function Nr(e) {
7087
7214
  if (p = +k(a), p === 0) break;
7088
7215
  S = p % 2;
7089
7216
  }
7090
- v = v.times(v), I ? v.c && v.c.length > I && (v.c.length = I) : g && (v = v.mod(u));
7217
+ v = v.times(v), I ? v.c && v.c.length > I && (v.c.length = I) : _ && (v = v.mod(u));
7091
7218
  }
7092
- return g ? R : (E && (R = i.div(R)), u ? R.mod(u) : I ? G(R, x, l, T) : R);
7093
- }, o.integerValue = function(a) {
7094
- var u = new w(this);
7219
+ return _ ? R : (E && (R = o.div(R)), u ? R.mod(u) : I ? G(R, x, l, T) : R);
7220
+ }, i.integerValue = function(a) {
7221
+ var u = new y(this);
7095
7222
  return a == null ? a = l : J(a, 0, 8), G(u, u.e + 1, a);
7096
- }, o.isEqualTo = o.eq = function(a, u) {
7097
- return Me(this, new w(a, u)) === 0;
7098
- }, o.isFinite = function() {
7223
+ }, i.isEqualTo = i.eq = function(a, u) {
7224
+ return Me(this, new y(a, u)) === 0;
7225
+ }, i.isFinite = function() {
7099
7226
  return !!this.c;
7100
- }, o.isGreaterThan = o.gt = function(a, u) {
7101
- return Me(this, new w(a, u)) > 0;
7102
- }, o.isGreaterThanOrEqualTo = o.gte = function(a, u) {
7103
- return (u = Me(this, new w(a, u))) === 1 || u === 0;
7104
- }, o.isInteger = function() {
7227
+ }, i.isGreaterThan = i.gt = function(a, u) {
7228
+ return Me(this, new y(a, u)) > 0;
7229
+ }, i.isGreaterThanOrEqualTo = i.gte = function(a, u) {
7230
+ return (u = Me(this, new y(a, u))) === 1 || u === 0;
7231
+ }, i.isInteger = function() {
7105
7232
  return !!this.c && ue(this.e / $) > this.c.length - 2;
7106
- }, o.isLessThan = o.lt = function(a, u) {
7107
- return Me(this, new w(a, u)) < 0;
7108
- }, o.isLessThanOrEqualTo = o.lte = function(a, u) {
7109
- return (u = Me(this, new w(a, u))) === -1 || u === 0;
7110
- }, o.isNaN = function() {
7233
+ }, i.isLessThan = i.lt = function(a, u) {
7234
+ return Me(this, new y(a, u)) < 0;
7235
+ }, i.isLessThanOrEqualTo = i.lte = function(a, u) {
7236
+ return (u = Me(this, new y(a, u))) === -1 || u === 0;
7237
+ }, i.isNaN = function() {
7111
7238
  return !this.s;
7112
- }, o.isNegative = function() {
7239
+ }, i.isNegative = function() {
7113
7240
  return this.s < 0;
7114
- }, o.isPositive = function() {
7241
+ }, i.isPositive = function() {
7115
7242
  return this.s > 0;
7116
- }, o.isZero = function() {
7243
+ }, i.isZero = function() {
7117
7244
  return !!this.c && this.c[0] == 0;
7118
- }, o.minus = function(a, u) {
7119
- var f, g, p, I, T = this, d = T.s;
7120
- if (a = new w(a, u), u = a.s, !d || !u) return new w(NaN);
7245
+ }, i.minus = function(a, u) {
7246
+ var f, _, p, I, T = this, d = T.s;
7247
+ if (a = new y(a, u), u = a.s, !d || !u) return new y(NaN);
7121
7248
  if (d != u) return a.s = -u, T.plus(a);
7122
7249
  var E = T.e / $, S = a.e / $, R = T.c, v = a.c;
7123
7250
  if (!E || !S) {
7124
- if (!R || !v) return R ? (a.s = -u, a) : new w(v ? T : NaN);
7125
- if (!R[0] || !v[0]) return v[0] ? (a.s = -u, a) : new w(R[0] ? T : l == 3 ? -0 : 0);
7251
+ if (!R || !v) return R ? (a.s = -u, a) : new y(v ? T : NaN);
7252
+ if (!R[0] || !v[0]) return v[0] ? (a.s = -u, a) : new y(R[0] ? T : l == 3 ? -0 : 0);
7126
7253
  }
7127
7254
  if (E = ue(E), S = ue(S), R = R.slice(), d = E - S) {
7128
7255
  for ((I = d < 0) ? (d = -d, p = R) : (S = E, p = v), p.reverse(), u = d; u--; p.push(0)) ;
7129
7256
  p.reverse();
7130
- } else for (g = (I = (d = R.length) < (u = v.length)) ? d : u, d = u = 0; u < g; u++) if (R[u] != v[u]) {
7257
+ } else for (_ = (I = (d = R.length) < (u = v.length)) ? d : u, d = u = 0; u < _; u++) if (R[u] != v[u]) {
7131
7258
  I = R[u] < v[u];
7132
7259
  break;
7133
7260
  }
7134
- if (I && (p = R, R = v, v = p, a.s = -a.s), u = (g = v.length) - (f = R.length), u > 0) for (; u--; R[f++] = 0) ;
7135
- for (u = me - 1; g > d; ) {
7136
- if (R[--g] < v[g]) {
7137
- for (f = g; f && !R[--f]; R[f] = u) ;
7138
- --R[f], R[g] += me;
7261
+ if (I && (p = R, R = v, v = p, a.s = -a.s), u = (_ = v.length) - (f = R.length), u > 0) for (; u--; R[f++] = 0) ;
7262
+ for (u = me - 1; _ > d; ) {
7263
+ if (R[--_] < v[_]) {
7264
+ for (f = _; f && !R[--f]; R[f] = u) ;
7265
+ --R[f], R[_] += me;
7139
7266
  }
7140
- R[g] -= v[g];
7267
+ R[_] -= v[_];
7141
7268
  }
7142
7269
  for (; R[0] == 0; R.splice(0, 1), --S) ;
7143
7270
  return R[0] ? U(a, R, S) : (a.s = l == 3 ? -1 : 1, a.c = [a.e = 0], a);
7144
- }, o.modulo = o.mod = function(a, u) {
7145
- var f, g, p = this;
7146
- return a = new w(a, u), !p.c || !a.s || a.c && !a.c[0] ? new w(NaN) : !a.c || p.c && !p.c[0] ? new w(p) : (O == 9 ? (g = a.s, a.s = 1, f = t(p, a, 0, 3), a.s = g, f.s *= g) : f = t(p, a, 0, O), a = p.minus(f.times(a)), !a.c[0] && O == 1 && (a.s = p.s), a);
7147
- }, o.multipliedBy = o.times = function(a, u) {
7148
- var f, g, p, I, T, d, E, S, R, v, N, P, H, j, q, D = this, F = D.c, z = (a = new w(a, u)).c;
7271
+ }, i.modulo = i.mod = function(a, u) {
7272
+ var f, _, p = this;
7273
+ return a = new y(a, u), !p.c || !a.s || a.c && !a.c[0] ? new y(NaN) : !a.c || p.c && !p.c[0] ? new y(p) : (O == 9 ? (_ = a.s, a.s = 1, f = t(p, a, 0, 3), a.s = _, f.s *= _) : f = t(p, a, 0, O), a = p.minus(f.times(a)), !a.c[0] && O == 1 && (a.s = p.s), a);
7274
+ }, i.multipliedBy = i.times = function(a, u) {
7275
+ var f, _, p, I, T, d, E, S, R, v, N, P, H, j, q, D = this, F = D.c, z = (a = new y(a, u)).c;
7149
7276
  if (!F || !z || !F[0] || !z[0]) return !D.s || !a.s || F && !F[0] && !z || z && !z[0] && !F ? a.c = a.e = a.s = null : (a.s *= D.s, !F || !z ? a.c = a.e = null : (a.c = [0], a.e = 0)), a;
7150
- for (g = ue(D.e / $) + ue(a.e / $), a.s *= D.s, E = F.length, v = z.length, E < v && (H = F, F = z, z = H, p = E, E = v, v = p), p = E + v, H = []; p--; H.push(0)) ;
7277
+ for (_ = ue(D.e / $) + ue(a.e / $), a.s *= D.s, E = F.length, v = z.length, E < v && (H = F, F = z, z = H, p = E, E = v, v = p), p = E + v, H = []; p--; H.push(0)) ;
7151
7278
  for (j = me, q = Ue, p = v; --p >= 0; ) {
7152
7279
  for (f = 0, N = z[p] % q, P = z[p] / q | 0, T = E, I = p + T; I > p; ) S = F[--T] % q, R = F[T] / q | 0, d = P * S + R * N, S = N * S + d % q * q + H[I] + f, f = (S / j | 0) + (d / q | 0) + P * R, H[I--] = S % j;
7153
7280
  H[I] = f;
7154
7281
  }
7155
- return f ? ++g : H.splice(0, 1), U(a, H, g);
7156
- }, o.negated = function() {
7157
- var a = new w(this);
7282
+ return f ? ++_ : H.splice(0, 1), U(a, H, _);
7283
+ }, i.negated = function() {
7284
+ var a = new y(this);
7158
7285
  return a.s = -a.s || null, a;
7159
- }, o.plus = function(a, u) {
7160
- var f, g = this, p = g.s;
7161
- if (a = new w(a, u), u = a.s, !p || !u) return new w(NaN);
7162
- if (p != u) return a.s = -u, g.minus(a);
7163
- var I = g.e / $, T = a.e / $, d = g.c, E = a.c;
7286
+ }, i.plus = function(a, u) {
7287
+ var f, _ = this, p = _.s;
7288
+ if (a = new y(a, u), u = a.s, !p || !u) return new y(NaN);
7289
+ if (p != u) return a.s = -u, _.minus(a);
7290
+ var I = _.e / $, T = a.e / $, d = _.c, E = a.c;
7164
7291
  if (!I || !T) {
7165
- if (!d || !E) return new w(p / 0);
7166
- if (!d[0] || !E[0]) return E[0] ? a : new w(d[0] ? g : p * 0);
7292
+ if (!d || !E) return new y(p / 0);
7293
+ if (!d[0] || !E[0]) return E[0] ? a : new y(d[0] ? _ : p * 0);
7167
7294
  }
7168
7295
  if (I = ue(I), T = ue(T), d = d.slice(), p = I - T) {
7169
7296
  for (p > 0 ? (T = I, f = E) : (p = -p, f = d), f.reverse(); p--; f.push(0)) ;
@@ -7171,95 +7298,95 @@ function Nr(e) {
7171
7298
  }
7172
7299
  for (p = d.length, u = E.length, p - u < 0 && (f = E, E = d, d = f, u = p), p = 0; u; ) p = (d[--u] = d[u] + E[u] + p) / me | 0, d[u] = me === d[u] ? 0 : d[u] % me;
7173
7300
  return p && (d = [p].concat(d), ++T), U(a, d, T);
7174
- }, o.precision = o.sd = function(a, u) {
7175
- var f, g, p, I = this;
7176
- if (a != null && a !== !!a) return J(a, 1, te), u == null ? u = l : J(u, 0, 8), G(new w(I), a, u);
7301
+ }, i.precision = i.sd = function(a, u) {
7302
+ var f, _, p, I = this;
7303
+ if (a != null && a !== !!a) return J(a, 1, te), u == null ? u = l : J(u, 0, 8), G(new y(I), a, u);
7177
7304
  if (!(f = I.c)) return null;
7178
- if (p = f.length - 1, g = p * $ + 1, p = f[p]) {
7179
- for (; p % 10 == 0; p /= 10, g--) ;
7180
- for (p = f[0]; p >= 10; p /= 10, g++) ;
7305
+ if (p = f.length - 1, _ = p * $ + 1, p = f[p]) {
7306
+ for (; p % 10 == 0; p /= 10, _--) ;
7307
+ for (p = f[0]; p >= 10; p /= 10, _++) ;
7181
7308
  }
7182
- return a && I.e + 1 > g && (g = I.e + 1), g;
7183
- }, o.shiftedBy = function(a) {
7309
+ return a && I.e + 1 > _ && (_ = I.e + 1), _;
7310
+ }, i.shiftedBy = function(a) {
7184
7311
  return J(a, -Ot, Ot), this.times("1e" + a);
7185
- }, o.squareRoot = o.sqrt = function() {
7186
- var a, u, f, g, p, I = this, T = I.c, d = I.s, E = I.e, S = c + 4, R = new w("0.5");
7187
- if (d !== 1 || !T || !T[0]) return new w(!d || d < 0 && (!T || T[0]) ? NaN : T ? I : 1 / 0);
7188
- if (d = Math.sqrt(+k(I)), d == 0 || d == 1 / 0 ? (u = le(T), (u.length + E) % 2 == 0 && (u += "0"), d = Math.sqrt(+u), E = ue((E + 1) / 2) - (E < 0 || E % 2), d == 1 / 0 ? u = "5e" + E : (u = d.toExponential(), u = u.slice(0, u.indexOf("e") + 1) + E), f = new w(u)) : f = new w(d + ""), f.c[0]) {
7189
- for (E = f.e, d = E + S, d < 3 && (d = 0); ; ) if (p = f, f = R.times(p.plus(t(I, p, S, 1))), le(p.c).slice(0, d) === (u = le(f.c)).slice(0, d)) if (f.e < E && --d, u = u.slice(d - 3, d + 1), u == "9999" || !g && u == "4999") {
7190
- if (!g && (G(p, p.e + c + 2, 0), p.times(p).eq(I))) {
7312
+ }, i.squareRoot = i.sqrt = function() {
7313
+ var a, u, f, _, p, I = this, T = I.c, d = I.s, E = I.e, S = c + 4, R = new y("0.5");
7314
+ if (d !== 1 || !T || !T[0]) return new y(!d || d < 0 && (!T || T[0]) ? NaN : T ? I : 1 / 0);
7315
+ if (d = Math.sqrt(+k(I)), d == 0 || d == 1 / 0 ? (u = le(T), (u.length + E) % 2 == 0 && (u += "0"), d = Math.sqrt(+u), E = ue((E + 1) / 2) - (E < 0 || E % 2), d == 1 / 0 ? u = "5e" + E : (u = d.toExponential(), u = u.slice(0, u.indexOf("e") + 1) + E), f = new y(u)) : f = new y(d + ""), f.c[0]) {
7316
+ for (E = f.e, d = E + S, d < 3 && (d = 0); ; ) if (p = f, f = R.times(p.plus(t(I, p, S, 1))), le(p.c).slice(0, d) === (u = le(f.c)).slice(0, d)) if (f.e < E && --d, u = u.slice(d - 3, d + 1), u == "9999" || !_ && u == "4999") {
7317
+ if (!_ && (G(p, p.e + c + 2, 0), p.times(p).eq(I))) {
7191
7318
  f = p;
7192
7319
  break;
7193
7320
  }
7194
- S += 4, d += 4, g = 1;
7321
+ S += 4, d += 4, _ = 1;
7195
7322
  } else {
7196
7323
  (!+u || !+u.slice(1) && u.charAt(0) == "5") && (G(f, f.e + c + 2, 1), a = !f.times(f).eq(I));
7197
7324
  break;
7198
7325
  }
7199
7326
  }
7200
7327
  return G(f, f.e + c + 1, l, a);
7201
- }, o.toExponential = function(a, u) {
7328
+ }, i.toExponential = function(a, u) {
7202
7329
  return a != null && (J(a, 0, te), a++), B(this, a, u, 1);
7203
- }, o.toFixed = function(a, u) {
7330
+ }, i.toFixed = function(a, u) {
7204
7331
  return a != null && (J(a, 0, te), a = a + this.e + 1), B(this, a, u);
7205
- }, o.toFormat = function(a, u, f) {
7206
- var g, p = this;
7332
+ }, i.toFormat = function(a, u, f) {
7333
+ var _, p = this;
7207
7334
  if (f == null) a != null && u && typeof u == "object" ? (f = u, u = null) : a && typeof a == "object" ? (f = a, a = u = null) : f = M;
7208
- else if (typeof f != "object") throw Error(se + "Argument not an object: " + f);
7209
- if (g = p.toFixed(a, u), p.c) {
7210
- var I, T = g.split("."), d = +f.groupSize, E = +f.secondaryGroupSize, S = f.groupSeparator || "", R = T[0], v = T[1], N = p.s < 0, P = N ? R.slice(1) : R, H = P.length;
7335
+ else if (typeof f != "object") throw Error(oe + "Argument not an object: " + f);
7336
+ if (_ = p.toFixed(a, u), p.c) {
7337
+ var I, T = _.split("."), d = +f.groupSize, E = +f.secondaryGroupSize, S = f.groupSeparator || "", R = T[0], v = T[1], N = p.s < 0, P = N ? R.slice(1) : R, H = P.length;
7211
7338
  if (E && (I = d, d = E, E = I, H -= I), d > 0 && H > 0) {
7212
7339
  for (I = H % d || d, R = P.substr(0, I); I < H; I += d) R += S + P.substr(I, d);
7213
7340
  E > 0 && (R += S + P.slice(I)), N && (R = "-" + R);
7214
7341
  }
7215
- g = v ? R + (f.decimalSeparator || "") + ((E = +f.fractionGroupSize) ? v.replace(new RegExp("\\d{" + E + "}\\B", "g"), "$&" + (f.fractionGroupSeparator || "")) : v) : R;
7216
- }
7217
- return (f.prefix || "") + g + (f.suffix || "");
7218
- }, o.toFraction = function(a) {
7219
- var u, f, g, p, I, T, d, E, S, R, v, N, P = this, H = P.c;
7220
- if (a != null && (d = new w(a), !d.isInteger() && (d.c || d.s !== 1) || d.lt(i))) throw Error(se + "Argument " + (d.isInteger() ? "out of range: " : "not an integer: ") + k(d));
7221
- if (!H) return new w(P);
7222
- for (u = new w(i), S = f = new w(i), g = E = new w(i), N = le(H), I = u.e = N.length - P.e - 1, u.c[0] = Lt[(T = I % $) < 0 ? $ + T : T], a = !a || d.comparedTo(u) > 0 ? I > 0 ? u : S : d, T = A, A = 1 / 0, d = new w(N), E.c[0] = 0; R = t(d, u, 0, 1), p = f.plus(R.times(g)), p.comparedTo(a) != 1; ) f = g, g = p, S = E.plus(R.times(p = S)), E = p, u = d.minus(R.times(p = u)), d = p;
7223
- return p = t(a.minus(f), g, 0, 1), E = E.plus(p.times(S)), f = f.plus(p.times(g)), E.s = S.s = P.s, I = I * 2, v = t(S, g, I, l).minus(P).abs().comparedTo(t(E, f, I, l).minus(P).abs()) < 1 ? [S, g] : [E, f], A = T, v;
7224
- }, o.toNumber = function() {
7342
+ _ = v ? R + (f.decimalSeparator || "") + ((E = +f.fractionGroupSize) ? v.replace(new RegExp("\\d{" + E + "}\\B", "g"), "$&" + (f.fractionGroupSeparator || "")) : v) : R;
7343
+ }
7344
+ return (f.prefix || "") + _ + (f.suffix || "");
7345
+ }, i.toFraction = function(a) {
7346
+ var u, f, _, p, I, T, d, E, S, R, v, N, P = this, H = P.c;
7347
+ if (a != null && (d = new y(a), !d.isInteger() && (d.c || d.s !== 1) || d.lt(o))) throw Error(oe + "Argument " + (d.isInteger() ? "out of range: " : "not an integer: ") + k(d));
7348
+ if (!H) return new y(P);
7349
+ for (u = new y(o), S = f = new y(o), _ = E = new y(o), N = le(H), I = u.e = N.length - P.e - 1, u.c[0] = Lt[(T = I % $) < 0 ? $ + T : T], a = !a || d.comparedTo(u) > 0 ? I > 0 ? u : S : d, T = A, A = 1 / 0, d = new y(N), E.c[0] = 0; R = t(d, u, 0, 1), p = f.plus(R.times(_)), p.comparedTo(a) != 1; ) f = _, _ = p, S = E.plus(R.times(p = S)), E = p, u = d.minus(R.times(p = u)), d = p;
7350
+ return p = t(a.minus(f), _, 0, 1), E = E.plus(p.times(S)), f = f.plus(p.times(_)), E.s = S.s = P.s, I = I * 2, v = t(S, _, I, l).minus(P).abs().comparedTo(t(E, f, I, l).minus(P).abs()) < 1 ? [S, _] : [E, f], A = T, v;
7351
+ }, i.toNumber = function() {
7225
7352
  return +k(this);
7226
- }, o.toPrecision = function(a, u) {
7353
+ }, i.toPrecision = function(a, u) {
7227
7354
  return a != null && J(a, 1, te), B(this, a, u, 2);
7228
- }, o.toString = function(a) {
7229
- var u, f = this, g = f.s, p = f.e;
7230
- return p === null ? g ? (u = "Infinity", g < 0 && (u = "-" + u)) : u = "NaN" : (a == null ? u = p <= h || p >= _ ? ct(le(f.c), p) : we(le(f.c), p, "0") : a === 10 && C ? (f = G(new w(f), c + p + 1, l), u = we(le(f.c), f.e, "0")) : (J(a, 2, y.length, "Base"), u = r(we(le(f.c), p, "0"), 10, a, g, true)), g < 0 && f.c[0] && (u = "-" + u)), u;
7231
- }, o.valueOf = o.toJSON = function() {
7355
+ }, i.toString = function(a) {
7356
+ var u, f = this, _ = f.s, p = f.e;
7357
+ return p === null ? _ ? (u = "Infinity", _ < 0 && (u = "-" + u)) : u = "NaN" : (a == null ? u = p <= h || p >= g ? ct(le(f.c), p) : ye(le(f.c), p, "0") : a === 10 && C ? (f = G(new y(f), c + p + 1, l), u = ye(le(f.c), f.e, "0")) : (J(a, 2, w.length, "Base"), u = r(ye(le(f.c), p, "0"), 10, a, _, true)), _ < 0 && f.c[0] && (u = "-" + u)), u;
7358
+ }, i.valueOf = i.toJSON = function() {
7232
7359
  return k(this);
7233
- }, o._isBigNumber = true, o[Symbol.toStringTag] = "BigNumber", o[Symbol.for("nodejs.util.inspect.custom")] = o.valueOf, e != null && w.set(e), w;
7360
+ }, i._isBigNumber = true, i[Symbol.toStringTag] = "BigNumber", i[Symbol.for("nodejs.util.inspect.custom")] = i.valueOf, e != null && y.set(e), y;
7234
7361
  }
7235
- s(Nr, "clone");
7362
+ s(xr, "clone");
7236
7363
  function ue(e) {
7237
7364
  var t = e | 0;
7238
7365
  return e > 0 || e === t ? t : t - 1;
7239
7366
  }
7240
7367
  s(ue, "bitFloor");
7241
7368
  function le(e) {
7242
- for (var t, r, n = 1, o = e.length, i = e[0] + ""; n < o; ) {
7369
+ for (var t, r, n = 1, i = e.length, o = e[0] + ""; n < i; ) {
7243
7370
  for (t = e[n++] + "", r = $ - t.length; r--; t = "0" + t) ;
7244
- i += t;
7371
+ o += t;
7245
7372
  }
7246
- for (o = i.length; i.charCodeAt(--o) === 48; ) ;
7247
- return i.slice(0, o + 1 || 1);
7373
+ for (i = o.length; o.charCodeAt(--i) === 48; ) ;
7374
+ return o.slice(0, i + 1 || 1);
7248
7375
  }
7249
7376
  s(le, "coeffToString");
7250
7377
  function Me(e, t) {
7251
- var r, n, o = e.c, i = t.c, c = e.s, l = t.s, h = e.e, _ = t.e;
7378
+ var r, n, i = e.c, o = t.c, c = e.s, l = t.s, h = e.e, g = t.e;
7252
7379
  if (!c || !l) return null;
7253
- if (r = o && !o[0], n = i && !i[0], r || n) return r ? n ? 0 : -l : c;
7380
+ if (r = i && !i[0], n = o && !o[0], r || n) return r ? n ? 0 : -l : c;
7254
7381
  if (c != l) return c;
7255
- if (r = c < 0, n = h == _, !o || !i) return n ? 0 : !o ^ r ? 1 : -1;
7256
- if (!n) return h > _ ^ r ? 1 : -1;
7257
- for (l = (h = o.length) < (_ = i.length) ? h : _, c = 0; c < l; c++) if (o[c] != i[c]) return o[c] > i[c] ^ r ? 1 : -1;
7258
- return h == _ ? 0 : h > _ ^ r ? 1 : -1;
7382
+ if (r = c < 0, n = h == g, !i || !o) return n ? 0 : !i ^ r ? 1 : -1;
7383
+ if (!n) return h > g ^ r ? 1 : -1;
7384
+ for (l = (h = i.length) < (g = o.length) ? h : g, c = 0; c < l; c++) if (i[c] != o[c]) return i[c] > o[c] ^ r ? 1 : -1;
7385
+ return h == g ? 0 : h > g ^ r ? 1 : -1;
7259
7386
  }
7260
7387
  s(Me, "compare");
7261
7388
  function J(e, t, r, n) {
7262
- if (e < t || e > r || e !== ce(e)) throw Error(se + (n || "Argument") + (typeof e == "number" ? e < t || e > r ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e));
7389
+ if (e < t || e > r || e !== ce(e)) throw Error(oe + (n || "Argument") + (typeof e == "number" ? e < t || e > r ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e));
7263
7390
  }
7264
7391
  s(J, "intCheck");
7265
7392
  function at(e) {
@@ -7271,61 +7398,61 @@ function ct(e, t) {
7271
7398
  return (e.length > 1 ? e.charAt(0) + "." + e.slice(1) : e) + (t < 0 ? "e" : "e+") + t;
7272
7399
  }
7273
7400
  s(ct, "toExponential");
7274
- function we(e, t, r) {
7275
- var n, o;
7401
+ function ye(e, t, r) {
7402
+ var n, i;
7276
7403
  if (t < 0) {
7277
- for (o = r + "."; ++t; o += r) ;
7278
- e = o + e;
7404
+ for (i = r + "."; ++t; i += r) ;
7405
+ e = i + e;
7279
7406
  } else if (n = e.length, ++t > n) {
7280
- for (o = r, t -= n; --t; o += r) ;
7281
- e += o;
7407
+ for (i = r, t -= n; --t; i += r) ;
7408
+ e += i;
7282
7409
  } else t < n && (e = e.slice(0, t) + "." + e.slice(t));
7283
7410
  return e;
7284
7411
  }
7285
- s(we, "toFixedPoint");
7286
- var Ci = Nr();
7287
- const Ui = 24, Xe = 32, Bi = s(() => typeof globalThis < "u" && globalThis.crypto && typeof globalThis.crypto.getRandomValues == "function" ? () => {
7412
+ s(ye, "toFixedPoint");
7413
+ var Ni = xr();
7414
+ const Di = 24, Xe = 32, Mi = s(() => typeof globalThis < "u" && globalThis.crypto && typeof globalThis.crypto.getRandomValues == "function" ? () => {
7288
7415
  const e = new Uint32Array(1);
7289
7416
  return globalThis.crypto.getRandomValues(e), e[0] / 4294967296;
7290
- } : Math.random, "createRandom"), Pt = Bi(), Nt = s((e = 4, t = Pt) => {
7417
+ } : Math.random, "createRandom"), Pt = Mi(), Nt = s((e = 4, t = Pt) => {
7291
7418
  let r = "";
7292
7419
  for (; r.length < e; ) r = r + Math.floor(t() * 36).toString(36);
7293
7420
  return r;
7294
7421
  }, "createEntropy");
7295
- function Oi(e) {
7296
- let t = new Ci(0);
7422
+ function xi(e) {
7423
+ let t = new Ni(0);
7297
7424
  for (const r of e.values()) t = t.multipliedBy(256).plus(r);
7298
7425
  return t;
7299
7426
  }
7300
- s(Oi, "bufToBigInt");
7301
- const Dr = s((e = "") => {
7427
+ s(xi, "bufToBigInt");
7428
+ const Gr = s((e = "") => {
7302
7429
  const t = new TextEncoder();
7303
- return Oi(vi(t.encode(e))).toString(36).slice(1);
7304
- }, "hash"), Mr = Array.from({ length: 26 }, (e, t) => String.fromCharCode(t + 97)), Li = s((e) => Mr[Math.floor(e() * Mr.length)], "randomLetter"), Pi = s(({ globalObj: e = typeof global < "u" ? global : typeof window < "u" ? window : {}, random: t = Pt } = {}) => {
7430
+ return xi(Li(t.encode(e))).toString(36).slice(1);
7431
+ }, "hash"), $r = Array.from({ length: 26 }, (e, t) => String.fromCharCode(t + 97)), Gi = s((e) => $r[Math.floor(e() * $r.length)], "randomLetter"), $i = s(({ globalObj: e = typeof global < "u" ? global : typeof window < "u" ? window : {}, random: t = Pt } = {}) => {
7305
7432
  const r = Object.keys(e).toString(), n = r.length ? r + Nt(Xe, t) : Nt(Xe, t);
7306
- return Dr(n).substring(0, Xe);
7307
- }, "createFingerprint"), Ni = s((e) => () => e++, "createCounter"), Di = 476782367, Mi = s(({ random: e = Pt, counter: t = Ni(Math.floor(e() * Di)), length: r = Ui, fingerprint: n = Pi({ random: e }) } = {}) => {
7433
+ return Gr(n).substring(0, Xe);
7434
+ }, "createFingerprint"), ki = s((e) => () => e++, "createCounter"), Hi = 476782367, Fi = s(({ random: e = Pt, counter: t = ki(Math.floor(e() * Hi)), length: r = Di, fingerprint: n = $i({ random: e }) } = {}) => {
7308
7435
  if (r > Xe) throw new Error(`Length must be between 2 and ${Xe}. Received: ${r}`);
7309
7436
  return s(function() {
7310
- const i = Li(e), c = Date.now().toString(36), l = t().toString(36), h = Nt(r, e), _ = `${c + h + l + n}`;
7311
- return `${i + Dr(_).substring(1, r)}`;
7437
+ const o = Gi(e), c = Date.now().toString(36), l = t().toString(36), h = Nt(r, e), g = `${c + h + l + n}`;
7438
+ return `${o + Gr(g).substring(1, r)}`;
7312
7439
  }, "cuid2");
7313
- }, "init"), ut = xi(Mi);
7314
- function xi(e) {
7440
+ }, "init"), ut = ji(Fi);
7441
+ function ji(e) {
7315
7442
  let t;
7316
7443
  return () => (t || (t = e()), t());
7317
7444
  }
7318
- s(xi, "lazy");
7319
- var Gi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
7320
- function xr(e) {
7445
+ s(ji, "lazy");
7446
+ var qi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
7447
+ function kr(e) {
7321
7448
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
7322
7449
  }
7323
- s(xr, "getDefaultExportFromCjs");
7324
- var xe = {}, Gr;
7325
- function $i() {
7326
- if (Gr) return xe;
7327
- Gr = 1, Object.defineProperty(xe, "__esModule", { value: true }), xe.isBinaryFileSync = xe.isBinaryFile = void 0;
7328
- const e = ze, t = Yn, r = (0, t.promisify)(e.stat), n = (0, t.promisify)(e.open), o = (0, t.promisify)(e.close), i = 512, c = 3;
7450
+ s(kr, "getDefaultExportFromCjs");
7451
+ var xe = {}, Hr;
7452
+ function Wi() {
7453
+ if (Hr) return xe;
7454
+ Hr = 1, Object.defineProperty(xe, "__esModule", { value: true }), xe.isBinaryFileSync = xe.isBinaryFile = void 0;
7455
+ const e = ze, t = ei, r = (0, t.promisify)(e.stat), n = (0, t.promisify)(e.open), i = (0, t.promisify)(e.close), o = 512, c = 3;
7329
7456
  class l {
7330
7457
  static {
7331
7458
  s(this, "Reader");
@@ -7334,8 +7461,8 @@ function $i() {
7334
7461
  size;
7335
7462
  offset;
7336
7463
  error;
7337
- constructor(C, w) {
7338
- this.fileBuffer = C, this.size = w, this.offset = 0, this.error = false;
7464
+ constructor(C, y) {
7465
+ this.fileBuffer = C, this.size = y, this.offset = 0, this.error = false;
7339
7466
  }
7340
7467
  hasError() {
7341
7468
  return this.error;
@@ -7344,62 +7471,62 @@ function $i() {
7344
7471
  return this.offset === this.size || this.hasError() ? (this.error = true, 255) : this.fileBuffer[this.offset++];
7345
7472
  }
7346
7473
  next(C) {
7347
- const w = new Array();
7474
+ const y = new Array();
7348
7475
  for (let B = 0; B < C; B++) {
7349
- if (this.error) return w;
7350
- w[B] = this.nextByte();
7476
+ if (this.error) return y;
7477
+ y[B] = this.nextByte();
7351
7478
  }
7352
- return w;
7479
+ return y;
7353
7480
  }
7354
7481
  }
7355
- function h(y) {
7356
- let C = 0, w = 0;
7357
- for (; !y.hasError(); ) {
7358
- const B = y.nextByte();
7359
- if (w = w | (B & 127) << 7 * C, (B & 128) === 0) break;
7482
+ function h(w) {
7483
+ let C = 0, y = 0;
7484
+ for (; !w.hasError(); ) {
7485
+ const B = w.nextByte();
7486
+ if (y = y | (B & 127) << 7 * C, (B & 128) === 0) break;
7360
7487
  if (C >= 10) {
7361
- y.error = true;
7488
+ w.error = true;
7362
7489
  break;
7363
7490
  }
7364
7491
  C++;
7365
7492
  }
7366
- return w;
7493
+ return y;
7367
7494
  }
7368
7495
  s(h, "readProtoVarInt");
7369
- function _(y) {
7370
- switch (h(y) & 7) {
7496
+ function g(w) {
7497
+ switch (h(w) & 7) {
7371
7498
  case 0:
7372
- return h(y), true;
7499
+ return h(w), true;
7373
7500
  case 1:
7374
- return y.next(8), true;
7501
+ return w.next(8), true;
7375
7502
  case 2:
7376
- const B = h(y);
7377
- return y.next(B), true;
7503
+ const B = h(w);
7504
+ return w.next(B), true;
7378
7505
  case 5:
7379
- return y.next(4), true;
7506
+ return w.next(4), true;
7380
7507
  }
7381
7508
  return false;
7382
7509
  }
7383
- s(_, "readProtoMessage");
7384
- function m(y, C) {
7385
- const w = new l(y, C);
7510
+ s(g, "readProtoMessage");
7511
+ function m(w, C) {
7512
+ const y = new l(w, C);
7386
7513
  let B = 0;
7387
7514
  for (; ; ) {
7388
- if (!_(w) && !w.hasError()) return false;
7389
- if (w.hasError()) break;
7515
+ if (!g(y) && !y.hasError()) return false;
7516
+ if (y.hasError()) break;
7390
7517
  B++;
7391
7518
  }
7392
7519
  return B > 0;
7393
7520
  }
7394
7521
  s(m, "isBinaryProto");
7395
- async function A(y, C) {
7396
- if (x(y)) {
7397
- const w = await r(y);
7398
- M(w);
7399
- const B = await n(y, "r"), L = Buffer.alloc(i + c);
7522
+ async function A(w, C) {
7523
+ if (x(w)) {
7524
+ const y = await r(w);
7525
+ M(y);
7526
+ const B = await n(w, "r"), L = Buffer.alloc(o + c);
7400
7527
  return new Promise((U, G) => {
7401
- e.read(B, L, 0, i + c, 0, (k, a, u) => {
7402
- if (o(B), k) G(k);
7528
+ e.read(B, L, 0, o + c, 0, (k, a, u) => {
7529
+ if (i(B), k) G(k);
7403
7530
  else try {
7404
7531
  U(O(L, a));
7405
7532
  } catch (f) {
@@ -7407,91 +7534,91 @@ function $i() {
7407
7534
  }
7408
7535
  });
7409
7536
  });
7410
- } else return C === void 0 && (C = y.length), O(y, C);
7537
+ } else return C === void 0 && (C = w.length), O(w, C);
7411
7538
  }
7412
7539
  s(A, "isBinaryFile"), xe.isBinaryFile = A;
7413
- function b(y, C) {
7414
- if (x(y)) {
7415
- const w = e.statSync(y);
7416
- M(w);
7417
- const B = e.openSync(y, "r"), L = Buffer.alloc(i + c), U = e.readSync(B, L, 0, i + c, 0);
7540
+ function b(w, C) {
7541
+ if (x(w)) {
7542
+ const y = e.statSync(w);
7543
+ M(y);
7544
+ const B = e.openSync(w, "r"), L = Buffer.alloc(o + c), U = e.readSync(B, L, 0, o + c, 0);
7418
7545
  return e.closeSync(B), O(L, U);
7419
- } else return C === void 0 && (C = y.length), O(y, C);
7546
+ } else return C === void 0 && (C = w.length), O(w, C);
7420
7547
  }
7421
7548
  s(b, "isBinaryFileSync"), xe.isBinaryFileSync = b;
7422
- function O(y, C) {
7549
+ function O(w, C) {
7423
7550
  if (C === 0) return false;
7424
- let w = 0;
7425
- const B = Math.min(C, i + c), L = Math.min(B, i);
7426
- if (C >= 3 && y[0] === 239 && y[1] === 187 && y[2] === 191 || C >= 4 && y[0] === 0 && y[1] === 0 && y[2] === 254 && y[3] === 255 || C >= 4 && y[0] === 255 && y[1] === 254 && y[2] === 0 && y[3] === 0 || C >= 4 && y[0] === 132 && y[1] === 49 && y[2] === 149 && y[3] === 51) return false;
7427
- if (B >= 5 && y.slice(0, 5).toString() === "%PDF-") return true;
7428
- if (C >= 2 && y[0] === 254 && y[1] === 255 || C >= 2 && y[0] === 255 && y[1] === 254) return false;
7551
+ let y = 0;
7552
+ const B = Math.min(C, o + c), L = Math.min(B, o);
7553
+ if (C >= 3 && w[0] === 239 && w[1] === 187 && w[2] === 191 || C >= 4 && w[0] === 0 && w[1] === 0 && w[2] === 254 && w[3] === 255 || C >= 4 && w[0] === 255 && w[1] === 254 && w[2] === 0 && w[3] === 0 || C >= 4 && w[0] === 132 && w[1] === 49 && w[2] === 149 && w[3] === 51) return false;
7554
+ if (B >= 5 && w.slice(0, 5).toString() === "%PDF-") return true;
7555
+ if (C >= 2 && w[0] === 254 && w[1] === 255 || C >= 2 && w[0] === 255 && w[1] === 254) return false;
7429
7556
  for (let U = 0; U < L; U++) {
7430
- if (y[U] === 0) return true;
7431
- if ((y[U] < 7 || y[U] > 14) && (y[U] < 32 || y[U] > 127)) {
7432
- if (y[U] >= 192 && y[U] <= 223 && U + 1 < B) {
7433
- if (U++, y[U] >= 128 && y[U] <= 191) continue;
7434
- } else if (y[U] >= 224 && y[U] <= 239 && U + 2 < B) {
7435
- if (U++, y[U] >= 128 && y[U] <= 191 && y[U + 1] >= 128 && y[U + 1] <= 191) {
7557
+ if (w[U] === 0) return true;
7558
+ if ((w[U] < 7 || w[U] > 14) && (w[U] < 32 || w[U] > 127)) {
7559
+ if (w[U] >= 192 && w[U] <= 223 && U + 1 < B) {
7560
+ if (U++, w[U] >= 128 && w[U] <= 191) continue;
7561
+ } else if (w[U] >= 224 && w[U] <= 239 && U + 2 < B) {
7562
+ if (U++, w[U] >= 128 && w[U] <= 191 && w[U + 1] >= 128 && w[U + 1] <= 191) {
7436
7563
  U++;
7437
7564
  continue;
7438
7565
  }
7439
- } else if (y[U] >= 240 && y[U] <= 247 && U + 3 < B && (U++, y[U] >= 128 && y[U] <= 191 && y[U + 1] >= 128 && y[U + 1] <= 191 && y[U + 2] >= 128 && y[U + 2] <= 191)) {
7566
+ } else if (w[U] >= 240 && w[U] <= 247 && U + 3 < B && (U++, w[U] >= 128 && w[U] <= 191 && w[U + 1] >= 128 && w[U + 1] <= 191 && w[U + 2] >= 128 && w[U + 2] <= 191)) {
7440
7567
  U += 2;
7441
7568
  continue;
7442
7569
  }
7443
- if (w++, U >= 32 && w * 100 / L > 10) return true;
7570
+ if (y++, U >= 32 && y * 100 / L > 10) return true;
7444
7571
  }
7445
7572
  }
7446
- return !!(w * 100 / L > 10 || w > 1 && m(y, L));
7573
+ return !!(y * 100 / L > 10 || y > 1 && m(w, L));
7447
7574
  }
7448
7575
  s(O, "isBinaryCheck");
7449
- function x(y) {
7450
- return typeof y == "string";
7576
+ function x(w) {
7577
+ return typeof w == "string";
7451
7578
  }
7452
7579
  s(x, "isString");
7453
- function M(y) {
7454
- if (!y.isFile()) throw new Error("Path provided was not a file!");
7580
+ function M(w) {
7581
+ if (!w.isFile()) throw new Error("Path provided was not a file!");
7455
7582
  }
7456
7583
  return s(M, "isStatFile"), xe;
7457
7584
  }
7458
- s($i, "requireLib");
7459
- var ki = $i(), $r = {}, Hi = s((function(e, t, r, n, o) {
7460
- var i = new Worker($r[t] || ($r[t] = URL.createObjectURL(new Blob([e + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'], { type: "text/javascript" }))));
7461
- return i.onmessage = function(c) {
7585
+ s(Wi, "requireLib");
7586
+ var Ki = Wi(), Fr = {}, Vi = s((function(e, t, r, n, i) {
7587
+ var o = new Worker(Fr[t] || (Fr[t] = URL.createObjectURL(new Blob([e + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'], { type: "text/javascript" }))));
7588
+ return o.onmessage = function(c) {
7462
7589
  var l = c.data, h = l.$e$;
7463
7590
  if (h) {
7464
- var _ = new Error(h[0]);
7465
- _.code = h[1], _.stack = h[2], o(_, null);
7466
- } else o(null, l);
7467
- }, i.postMessage(r, n), i;
7468
- }), "wk"), K = Uint8Array, ie = Uint16Array, Ze = Int32Array, je = new K([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]), qe = new K([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0]), et = new K([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), kr = s(function(e, t) {
7591
+ var g = new Error(h[0]);
7592
+ g.code = h[1], g.stack = h[2], i(g, null);
7593
+ } else i(null, l);
7594
+ }, o.postMessage(r, n), o;
7595
+ }), "wk"), K = Uint8Array, ie = Uint16Array, Ze = Int32Array, je = new K([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]), qe = new K([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0]), et = new K([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), jr = s(function(e, t) {
7469
7596
  for (var r = new ie(31), n = 0; n < 31; ++n) r[n] = t += 1 << e[n - 1];
7470
- for (var o = new Ze(r[30]), n = 1; n < 30; ++n) for (var i = r[n]; i < r[n + 1]; ++i) o[i] = i - r[n] << 5 | n;
7471
- return { b: r, r: o };
7472
- }, "freb"), Hr = kr(je, 2), Dt = Hr.b, lt = Hr.r;
7597
+ for (var i = new Ze(r[30]), n = 1; n < 30; ++n) for (var o = r[n]; o < r[n + 1]; ++o) i[o] = o - r[n] << 5 | n;
7598
+ return { b: r, r: i };
7599
+ }, "freb"), qr = jr(je, 2), Dt = qr.b, lt = qr.r;
7473
7600
  Dt[28] = 258, lt[258] = 28;
7474
- for (var Fr = kr(qe, 0), jr = Fr.b, Mt = Fr.r, tt = new ie(32768), V = 0; V < 32768; ++V) {
7601
+ for (var Wr = jr(qe, 0), Kr = Wr.b, Mt = Wr.r, tt = new ie(32768), V = 0; V < 32768; ++V) {
7475
7602
  var Be = (V & 43690) >> 1 | (V & 21845) << 1;
7476
7603
  Be = (Be & 52428) >> 2 | (Be & 13107) << 2, Be = (Be & 61680) >> 4 | (Be & 3855) << 4, tt[V] = ((Be & 65280) >> 8 | (Be & 255) << 8) >> 1;
7477
7604
  }
7478
7605
  for (var fe = s((function(e, t, r) {
7479
- for (var n = e.length, o = 0, i = new ie(t); o < n; ++o) e[o] && ++i[e[o] - 1];
7606
+ for (var n = e.length, i = 0, o = new ie(t); i < n; ++i) e[i] && ++o[e[i] - 1];
7480
7607
  var c = new ie(t);
7481
- for (o = 1; o < t; ++o) c[o] = c[o - 1] + i[o - 1] << 1;
7608
+ for (i = 1; i < t; ++i) c[i] = c[i - 1] + o[i - 1] << 1;
7482
7609
  var l;
7483
7610
  if (r) {
7484
7611
  l = new ie(1 << t);
7485
7612
  var h = 15 - t;
7486
- for (o = 0; o < n; ++o) if (e[o]) for (var _ = o << 4 | e[o], m = t - e[o], A = c[e[o] - 1]++ << m, b = A | (1 << m) - 1; A <= b; ++A) l[tt[A] >> h] = _;
7487
- } else for (l = new ie(n), o = 0; o < n; ++o) e[o] && (l[o] = tt[c[e[o] - 1]++] >> 15 - e[o]);
7613
+ for (i = 0; i < n; ++i) if (e[i]) for (var g = i << 4 | e[i], m = t - e[i], A = c[e[i] - 1]++ << m, b = A | (1 << m) - 1; A <= b; ++A) l[tt[A] >> h] = g;
7614
+ } else for (l = new ie(n), i = 0; i < n; ++i) e[i] && (l[i] = tt[c[e[i] - 1]++] >> 15 - e[i]);
7488
7615
  return l;
7489
- }), "hMap"), ye = new K(288), V = 0; V < 144; ++V) ye[V] = 8;
7490
- for (var V = 144; V < 256; ++V) ye[V] = 9;
7491
- for (var V = 256; V < 280; ++V) ye[V] = 7;
7492
- for (var V = 280; V < 288; ++V) ye[V] = 8;
7616
+ }), "hMap"), we = new K(288), V = 0; V < 144; ++V) we[V] = 8;
7617
+ for (var V = 144; V < 256; ++V) we[V] = 9;
7618
+ for (var V = 256; V < 280; ++V) we[V] = 7;
7619
+ for (var V = 280; V < 288; ++V) we[V] = 8;
7493
7620
  for (var We = new K(32), V = 0; V < 32; ++V) We[V] = 5;
7494
- var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1), ft = s(function(e) {
7621
+ var Vr = fe(we, 9, 0), Yr = fe(we, 9, 1), zr = fe(We, 5, 0), Jr = fe(We, 5, 1), ft = s(function(e) {
7495
7622
  for (var t = e[0], r = 1; r < e.length; ++r) e[r] > t && (t = e[r]);
7496
7623
  return t;
7497
7624
  }, "max"), he = s(function(e, t, r) {
@@ -7504,52 +7631,52 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
7504
7631
  return (e + 7) / 8 | 0;
7505
7632
  }, "shft"), Ge = s(function(e, t, r) {
7506
7633
  return (t == null || t < 0) && (t = 0), (r == null || r > e.length) && (r = e.length), new K(e.subarray(t, r));
7507
- }, "slc"), Yr = ["unexpected EOF", "invalid block type", "invalid length/literal", "invalid distance", "stream finished", "no stream handler", , "no callback", "invalid UTF-8 data", "extra field too long", "date not in range 1980-2099", "filename too long", "stream finishing", "invalid zip data"], X = s(function(e, t, r) {
7508
- var n = new Error(t || Yr[e]);
7634
+ }, "slc"), Qr = ["unexpected EOF", "invalid block type", "invalid length/literal", "invalid distance", "stream finished", "no stream handler", , "no callback", "invalid UTF-8 data", "extra field too long", "date not in range 1980-2099", "filename too long", "stream finishing", "invalid zip data"], X = s(function(e, t, r) {
7635
+ var n = new Error(t || Qr[e]);
7509
7636
  if (n.code = e, Error.captureStackTrace && Error.captureStackTrace(n, X), !r) throw n;
7510
7637
  return n;
7511
- }, "err"), zr = s(function(e, t, r, n) {
7512
- var o = e.length, i = n ? n.length : 0;
7513
- if (!o || t.f && !t.l) return r || new K(0);
7638
+ }, "err"), Xr = s(function(e, t, r, n) {
7639
+ var i = e.length, o = n ? n.length : 0;
7640
+ if (!i || t.f && !t.l) return r || new K(0);
7514
7641
  var c = !r, l = c || t.i != 2, h = t.i;
7515
- c && (r = new K(o * 3));
7516
- var _ = s(function(ne) {
7642
+ c && (r = new K(i * 3));
7643
+ var g = s(function(ne) {
7517
7644
  var pe = r.length;
7518
7645
  if (ne > pe) {
7519
7646
  var Z = new K(Math.max(pe * 2, ne));
7520
7647
  Z.set(r), r = Z;
7521
7648
  }
7522
- }, "cbuf"), m = t.f || 0, A = t.p || 0, b = t.b || 0, O = t.l, x = t.d, M = t.m, y = t.n, C = o * 8;
7649
+ }, "cbuf"), m = t.f || 0, A = t.p || 0, b = t.b || 0, O = t.l, x = t.d, M = t.m, w = t.n, C = i * 8;
7523
7650
  do {
7524
7651
  if (!O) {
7525
7652
  m = he(e, A, 1);
7526
- var w = he(e, A + 1, 3);
7527
- if (A += 3, w) if (w == 1) O = Wr, x = Vr, M = 9, y = 5;
7528
- else if (w == 2) {
7653
+ var y = he(e, A + 1, 3);
7654
+ if (A += 3, y) if (y == 1) O = Yr, x = Jr, M = 9, w = 5;
7655
+ else if (y == 2) {
7529
7656
  var G = he(e, A, 31) + 257, k = he(e, A + 10, 15) + 4, a = G + he(e, A + 5, 31) + 1;
7530
7657
  A += 14;
7531
- for (var u = new K(a), f = new K(19), g = 0; g < k; ++g) f[et[g]] = he(e, A + g * 3, 7);
7658
+ for (var u = new K(a), f = new K(19), _ = 0; _ < k; ++_) f[et[_]] = he(e, A + _ * 3, 7);
7532
7659
  A += k * 3;
7533
- for (var p = ft(f), I = (1 << p) - 1, T = fe(f, p, 1), g = 0; g < a; ) {
7660
+ for (var p = ft(f), I = (1 << p) - 1, T = fe(f, p, 1), _ = 0; _ < a; ) {
7534
7661
  var d = T[he(e, A, I)];
7535
7662
  A += d & 15;
7536
7663
  var B = d >> 4;
7537
- if (B < 16) u[g++] = B;
7664
+ if (B < 16) u[_++] = B;
7538
7665
  else {
7539
7666
  var E = 0, S = 0;
7540
- for (B == 16 ? (S = 3 + he(e, A, 3), A += 2, E = u[g - 1]) : B == 17 ? (S = 3 + he(e, A, 7), A += 3) : B == 18 && (S = 11 + he(e, A, 127), A += 7); S--; ) u[g++] = E;
7667
+ for (B == 16 ? (S = 3 + he(e, A, 3), A += 2, E = u[_ - 1]) : B == 17 ? (S = 3 + he(e, A, 7), A += 3) : B == 18 && (S = 11 + he(e, A, 127), A += 7); S--; ) u[_++] = E;
7541
7668
  }
7542
7669
  }
7543
7670
  var R = u.subarray(0, G), v = u.subarray(G);
7544
- M = ft(R), y = ft(v), O = fe(R, M, 1), x = fe(v, y, 1);
7671
+ M = ft(R), w = ft(v), O = fe(R, M, 1), x = fe(v, w, 1);
7545
7672
  } else X(1);
7546
7673
  else {
7547
7674
  var B = rt(A) + 4, L = e[B - 4] | e[B - 3] << 8, U = B + L;
7548
- if (U > o) {
7675
+ if (U > i) {
7549
7676
  h && X(0);
7550
7677
  break;
7551
7678
  }
7552
- l && _(b + L), r.set(e.subarray(B, U), b), t.b = b += L, t.p = A = U * 8, t.f = m;
7679
+ l && g(b + L), r.set(e.subarray(B, U), b), t.b = b += L, t.p = A = U * 8, t.f = m;
7553
7680
  continue;
7554
7681
  }
7555
7682
  if (A > C) {
@@ -7557,8 +7684,8 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
7557
7684
  break;
7558
7685
  }
7559
7686
  }
7560
- l && _(b + 131072);
7561
- for (var N = (1 << M) - 1, P = (1 << y) - 1, H = A; ; H = A) {
7687
+ l && g(b + 131072);
7688
+ for (var N = (1 << M) - 1, P = (1 << w) - 1, H = A; ; H = A) {
7562
7689
  var E = O[ht(e, A) & N], j = E >> 4;
7563
7690
  if (A += E & 15, A > C) {
7564
7691
  h && X(0);
@@ -7571,12 +7698,12 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
7571
7698
  } else {
7572
7699
  var q = j - 254;
7573
7700
  if (j > 264) {
7574
- var g = j - 257, D = je[g];
7575
- q = he(e, A, (1 << D) - 1) + Dt[g], A += D;
7701
+ var _ = j - 257, D = je[_];
7702
+ q = he(e, A, (1 << D) - 1) + Dt[_], A += D;
7576
7703
  }
7577
7704
  var F = x[ht(e, A) & P], z = F >> 4;
7578
7705
  F || X(3), A += F & 15;
7579
- var v = jr[z];
7706
+ var v = Kr[z];
7580
7707
  if (z > 3) {
7581
7708
  var D = qe[z];
7582
7709
  v += ht(e, A) & (1 << D) - 1, A += D;
@@ -7585,16 +7712,16 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
7585
7712
  h && X(0);
7586
7713
  break;
7587
7714
  }
7588
- l && _(b + 131072);
7715
+ l && g(b + 131072);
7589
7716
  var de = b + q;
7590
7717
  if (b < v) {
7591
- var ve = i - v, be = Math.min(v, de);
7718
+ var ve = o - v, be = Math.min(v, de);
7592
7719
  for (ve + b < 0 && X(3); b < be; ++b) r[b] = n[ve + b];
7593
7720
  }
7594
7721
  for (; b < de; ++b) r[b] = r[b - v];
7595
7722
  }
7596
7723
  }
7597
- t.l = O, t.p = H, t.b = b, t.f = m, O && (m = 1, t.m = M, t.d = x, t.n = y);
7724
+ t.l = O, t.p = H, t.b = b, t.f = m, O && (m = 1, t.m = M, t.d = x, t.n = w);
7598
7725
  } while (!m);
7599
7726
  return b != r.length && c ? Ge(r, 0, b) : r.subarray(0, b);
7600
7727
  }, "inflt"), ge = s(function(e, t, r) {
@@ -7607,34 +7734,34 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
7607
7734
  e[n] |= r, e[n + 1] |= r >> 8, e[n + 2] |= r >> 16;
7608
7735
  }, "wbits16"), dt = s(function(e, t) {
7609
7736
  for (var r = [], n = 0; n < e.length; ++n) e[n] && r.push({ s: n, f: e[n] });
7610
- var o = r.length, i = r.slice();
7611
- if (!o) return { t: kt, l: 0 };
7612
- if (o == 1) {
7737
+ var i = r.length, o = r.slice();
7738
+ if (!i) return { t: kt, l: 0 };
7739
+ if (i == 1) {
7613
7740
  var c = new K(r[0].s + 1);
7614
7741
  return c[r[0].s] = 1, { t: c, l: 1 };
7615
7742
  }
7616
7743
  r.sort(function(U, G) {
7617
7744
  return U.f - G.f;
7618
7745
  }), r.push({ s: -1, f: 25001 });
7619
- var l = r[0], h = r[1], _ = 0, m = 1, A = 2;
7620
- for (r[0] = { s: -1, f: l.f + h.f, l, r: h }; m != o - 1; ) l = r[r[_].f < r[A].f ? _++ : A++], h = r[_ != m && r[_].f < r[A].f ? _++ : A++], r[m++] = { s: -1, f: l.f + h.f, l, r: h };
7621
- for (var b = i[0].s, n = 1; n < o; ++n) i[n].s > b && (b = i[n].s);
7746
+ var l = r[0], h = r[1], g = 0, m = 1, A = 2;
7747
+ for (r[0] = { s: -1, f: l.f + h.f, l, r: h }; m != i - 1; ) l = r[r[g].f < r[A].f ? g++ : A++], h = r[g != m && r[g].f < r[A].f ? g++ : A++], r[m++] = { s: -1, f: l.f + h.f, l, r: h };
7748
+ for (var b = o[0].s, n = 1; n < i; ++n) o[n].s > b && (b = o[n].s);
7622
7749
  var O = new ie(b + 1), x = pt(r[m - 1], O, 0);
7623
7750
  if (x > t) {
7624
- var n = 0, M = 0, y = x - t, C = 1 << y;
7625
- for (i.sort(function(G, k) {
7751
+ var n = 0, M = 0, w = x - t, C = 1 << w;
7752
+ for (o.sort(function(G, k) {
7626
7753
  return O[k.s] - O[G.s] || G.f - k.f;
7627
- }); n < o; ++n) {
7628
- var w = i[n].s;
7629
- if (O[w] > t) M += C - (1 << x - O[w]), O[w] = t;
7754
+ }); n < i; ++n) {
7755
+ var y = o[n].s;
7756
+ if (O[y] > t) M += C - (1 << x - O[y]), O[y] = t;
7630
7757
  else break;
7631
7758
  }
7632
- for (M >>= y; M > 0; ) {
7633
- var B = i[n].s;
7759
+ for (M >>= w; M > 0; ) {
7760
+ var B = o[n].s;
7634
7761
  O[B] < t ? M -= 1 << t - O[B]++ - 1 : ++n;
7635
7762
  }
7636
7763
  for (; n >= 0 && M; --n) {
7637
- var L = i[n].s;
7764
+ var L = o[n].s;
7638
7765
  O[L] == t && (--O[L], ++M);
7639
7766
  }
7640
7767
  x = t;
@@ -7644,48 +7771,48 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
7644
7771
  return e.s == -1 ? Math.max(pt(e.l, t, r + 1), pt(e.r, t, r + 1)) : t[e.s] = r;
7645
7772
  }, "ln"), xt = s(function(e) {
7646
7773
  for (var t = e.length; t && !e[--t]; ) ;
7647
- for (var r = new ie(++t), n = 0, o = e[0], i = 1, c = s(function(h) {
7774
+ for (var r = new ie(++t), n = 0, i = e[0], o = 1, c = s(function(h) {
7648
7775
  r[n++] = h;
7649
- }, "w"), l = 1; l <= t; ++l) if (e[l] == o && l != t) ++i;
7776
+ }, "w"), l = 1; l <= t; ++l) if (e[l] == i && l != t) ++o;
7650
7777
  else {
7651
- if (!o && i > 2) {
7652
- for (; i > 138; i -= 138) c(32754);
7653
- i > 2 && (c(i > 10 ? i - 11 << 5 | 28690 : i - 3 << 5 | 12305), i = 0);
7654
- } else if (i > 3) {
7655
- for (c(o), --i; i > 6; i -= 6) c(8304);
7656
- i > 2 && (c(i - 3 << 5 | 8208), i = 0);
7778
+ if (!i && o > 2) {
7779
+ for (; o > 138; o -= 138) c(32754);
7780
+ o > 2 && (c(o > 10 ? o - 11 << 5 | 28690 : o - 3 << 5 | 12305), o = 0);
7781
+ } else if (o > 3) {
7782
+ for (c(i), --o; o > 6; o -= 6) c(8304);
7783
+ o > 2 && (c(o - 3 << 5 | 8208), o = 0);
7657
7784
  }
7658
- for (; i--; ) c(o);
7659
- i = 1, o = e[l];
7785
+ for (; o--; ) c(i);
7786
+ o = 1, i = e[l];
7660
7787
  }
7661
7788
  return { c: r.subarray(0, n), n: t };
7662
7789
  }, "lc"), Ve = s(function(e, t) {
7663
7790
  for (var r = 0, n = 0; n < t.length; ++n) r += e[n] * t[n];
7664
7791
  return r;
7665
7792
  }, "clen"), Gt = s(function(e, t, r) {
7666
- var n = r.length, o = rt(t + 2);
7667
- e[o] = n & 255, e[o + 1] = n >> 8, e[o + 2] = e[o] ^ 255, e[o + 3] = e[o + 1] ^ 255;
7668
- for (var i = 0; i < n; ++i) e[o + i + 4] = r[i];
7669
- return (o + 4 + n) * 8;
7670
- }, "wfblk"), $t = s(function(e, t, r, n, o, i, c, l, h, _, m) {
7671
- ge(t, m++, r), ++o[256];
7672
- for (var A = dt(o, 15), b = A.t, O = A.l, x = dt(i, 15), M = x.t, y = x.l, C = xt(b), w = C.c, B = C.n, L = xt(M), U = L.c, G = L.n, k = new ie(19), a = 0; a < w.length; ++a) ++k[w[a] & 31];
7793
+ var n = r.length, i = rt(t + 2);
7794
+ e[i] = n & 255, e[i + 1] = n >> 8, e[i + 2] = e[i] ^ 255, e[i + 3] = e[i + 1] ^ 255;
7795
+ for (var o = 0; o < n; ++o) e[i + o + 4] = r[o];
7796
+ return (i + 4 + n) * 8;
7797
+ }, "wfblk"), $t = s(function(e, t, r, n, i, o, c, l, h, g, m) {
7798
+ ge(t, m++, r), ++i[256];
7799
+ for (var A = dt(i, 15), b = A.t, O = A.l, x = dt(o, 15), M = x.t, w = x.l, C = xt(b), y = C.c, B = C.n, L = xt(M), U = L.c, G = L.n, k = new ie(19), a = 0; a < y.length; ++a) ++k[y[a] & 31];
7673
7800
  for (var a = 0; a < U.length; ++a) ++k[U[a] & 31];
7674
- for (var u = dt(k, 7), f = u.t, g = u.l, p = 19; p > 4 && !f[et[p - 1]]; --p) ;
7675
- var I = _ + 5 << 3, T = Ve(o, ye) + Ve(i, We) + c, d = Ve(o, b) + Ve(i, M) + c + 14 + 3 * p + Ve(k, f) + 2 * k[16] + 3 * k[17] + 7 * k[18];
7676
- if (h >= 0 && I <= T && I <= d) return Gt(t, m, e.subarray(h, h + _));
7801
+ for (var u = dt(k, 7), f = u.t, _ = u.l, p = 19; p > 4 && !f[et[p - 1]]; --p) ;
7802
+ var I = g + 5 << 3, T = Ve(i, we) + Ve(o, We) + c, d = Ve(i, b) + Ve(o, M) + c + 14 + 3 * p + Ve(k, f) + 2 * k[16] + 3 * k[17] + 7 * k[18];
7803
+ if (h >= 0 && I <= T && I <= d) return Gt(t, m, e.subarray(h, h + g));
7677
7804
  var E, S, R, v;
7678
7805
  if (ge(t, m, 1 + (d < T)), m += 2, d < T) {
7679
- E = fe(b, O, 0), S = b, R = fe(M, y, 0), v = M;
7680
- var N = fe(f, g, 0);
7806
+ E = fe(b, O, 0), S = b, R = fe(M, w, 0), v = M;
7807
+ var N = fe(f, _, 0);
7681
7808
  ge(t, m, B - 257), ge(t, m + 5, G - 1), ge(t, m + 10, p - 4), m += 14;
7682
7809
  for (var a = 0; a < p; ++a) ge(t, m + 3 * a, f[et[a]]);
7683
7810
  m += 3 * p;
7684
- for (var P = [w, U], H = 0; H < 2; ++H) for (var j = P[H], a = 0; a < j.length; ++a) {
7811
+ for (var P = [y, U], H = 0; H < 2; ++H) for (var j = P[H], a = 0; a < j.length; ++a) {
7685
7812
  var q = j[a] & 31;
7686
7813
  ge(t, m, N[q]), m += f[q], q > 15 && (ge(t, m, j[a] >> 5 & 127), m += j[a] >> 12);
7687
7814
  }
7688
- } else E = qr, S = ye, R = Kr, v = We;
7815
+ } else E = Vr, S = we, R = zr, v = We;
7689
7816
  for (var a = 0; a < l; ++a) {
7690
7817
  var D = n[a];
7691
7818
  if (D > 255) {
@@ -7696,17 +7823,17 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
7696
7823
  } else Ke(t, m, E[D]), m += S[D];
7697
7824
  }
7698
7825
  return Ke(t, m, E[256]), m + S[256];
7699
- }, "wblk"), Jr = new Ze([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), kt = new K(0), Qr = s(function(e, t, r, n, o, i) {
7700
- var c = i.z || e.length, l = new K(n + c + 5 * (1 + Math.ceil(c / 7e3)) + o), h = l.subarray(n, l.length - o), _ = i.l, m = (i.r || 0) & 7;
7826
+ }, "wblk"), Zr = new Ze([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), kt = new K(0), en = s(function(e, t, r, n, i, o) {
7827
+ var c = o.z || e.length, l = new K(n + c + 5 * (1 + Math.ceil(c / 7e3)) + i), h = l.subarray(n, l.length - i), g = o.l, m = (o.r || 0) & 7;
7701
7828
  if (t) {
7702
- m && (h[0] = i.r >> 3);
7703
- for (var A = Jr[t - 1], b = A >> 13, O = A & 8191, x = (1 << r) - 1, M = i.p || new ie(32768), y = i.h || new ie(x + 1), C = Math.ceil(r / 3), w = 2 * C, B = s(function(ee) {
7704
- return (e[ee] ^ e[ee + 1] << C ^ e[ee + 2] << w) & x;
7705
- }, "hsh"), L = new Ze(25e3), U = new ie(288), G = new ie(32), k = 0, a = 0, u = i.i || 0, f = 0, g = i.w || 0, p = 0; u + 2 < c; ++u) {
7706
- var I = B(u), T = u & 32767, d = y[I];
7707
- if (M[T] = d, y[I] = T, g <= u) {
7829
+ m && (h[0] = o.r >> 3);
7830
+ for (var A = Zr[t - 1], b = A >> 13, O = A & 8191, x = (1 << r) - 1, M = o.p || new ie(32768), w = o.h || new ie(x + 1), C = Math.ceil(r / 3), y = 2 * C, B = s(function(ee) {
7831
+ return (e[ee] ^ e[ee + 1] << C ^ e[ee + 2] << y) & x;
7832
+ }, "hsh"), L = new Ze(25e3), U = new ie(288), G = new ie(32), k = 0, a = 0, u = o.i || 0, f = 0, _ = o.w || 0, p = 0; u + 2 < c; ++u) {
7833
+ var I = B(u), T = u & 32767, d = w[I];
7834
+ if (M[T] = d, w[I] = T, _ <= u) {
7708
7835
  var E = c - u;
7709
- if ((k > 7e3 || f > 24576) && (E > 423 || !_)) {
7836
+ if ((k > 7e3 || f > 24576) && (E > 423 || !g)) {
7710
7837
  m = $t(e, h, 0, L, U, G, a, f, p, u - p, m), f = k = a = 0, p = u;
7711
7838
  for (var S = 0; S < 286; ++S) U[S] = 0;
7712
7839
  for (var S = 0; S < 30; ++S) G[S] = 0;
@@ -7728,84 +7855,84 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
7728
7855
  if (v) {
7729
7856
  L[f++] = 268435456 | lt[R] << 18 | Mt[v];
7730
7857
  var ne = lt[R] & 31, pe = Mt[v] & 31;
7731
- a += je[ne] + qe[pe], ++U[257 + ne], ++G[pe], g = u + R, ++k;
7858
+ a += je[ne] + qe[pe], ++U[257 + ne], ++G[pe], _ = u + R, ++k;
7732
7859
  } else L[f++] = e[u], ++U[e[u]];
7733
7860
  }
7734
7861
  }
7735
- for (u = Math.max(u, g); u < c; ++u) L[f++] = e[u], ++U[e[u]];
7736
- m = $t(e, h, _, L, U, G, a, f, p, u - p, m), _ || (i.r = m & 7 | h[m / 8 | 0] << 3, m -= 7, i.h = y, i.p = M, i.i = u, i.w = g);
7862
+ for (u = Math.max(u, _); u < c; ++u) L[f++] = e[u], ++U[e[u]];
7863
+ m = $t(e, h, g, L, U, G, a, f, p, u - p, m), g || (o.r = m & 7 | h[m / 8 | 0] << 3, m -= 7, o.h = w, o.p = M, o.i = u, o.w = _);
7737
7864
  } else {
7738
- for (var u = i.w || 0; u < c + _; u += 65535) {
7865
+ for (var u = o.w || 0; u < c + g; u += 65535) {
7739
7866
  var Z = u + 65535;
7740
- Z >= c && (h[m / 8 | 0] = _, Z = c), m = Gt(h, m + 1, e.subarray(u, Z));
7867
+ Z >= c && (h[m / 8 | 0] = g, Z = c), m = Gt(h, m + 1, e.subarray(u, Z));
7741
7868
  }
7742
- i.i = c;
7869
+ o.i = c;
7743
7870
  }
7744
- return Ge(l, 0, n + rt(m) + o);
7745
- }, "dflt"), Fi = (function() {
7871
+ return Ge(l, 0, n + rt(m) + i);
7872
+ }, "dflt"), Yi = (function() {
7746
7873
  for (var e = new Int32Array(256), t = 0; t < 256; ++t) {
7747
7874
  for (var r = t, n = 9; --n; ) r = (r & 1 && -306674912) ^ r >>> 1;
7748
7875
  e[t] = r;
7749
7876
  }
7750
7877
  return e;
7751
- })(), ji = s(function() {
7878
+ })(), zi = s(function() {
7752
7879
  var e = -1;
7753
7880
  return { p: s(function(t) {
7754
- for (var r = e, n = 0; n < t.length; ++n) r = Fi[r & 255 ^ t[n]] ^ r >>> 8;
7881
+ for (var r = e, n = 0; n < t.length; ++n) r = Yi[r & 255 ^ t[n]] ^ r >>> 8;
7755
7882
  e = r;
7756
7883
  }, "p"), d: s(function() {
7757
7884
  return ~e;
7758
7885
  }, "d") };
7759
- }, "crc"), Xr = s(function(e, t, r, n, o) {
7760
- if (!o && (o = { l: 1 }, t.dictionary)) {
7761
- var i = t.dictionary.subarray(-32768), c = new K(i.length + e.length);
7762
- c.set(i), c.set(e, i.length), e = c, o.w = i.length;
7886
+ }, "crc"), tn = s(function(e, t, r, n, i) {
7887
+ if (!i && (i = { l: 1 }, t.dictionary)) {
7888
+ var o = t.dictionary.subarray(-32768), c = new K(o.length + e.length);
7889
+ c.set(o), c.set(e, o.length), e = c, i.w = o.length;
7763
7890
  }
7764
- return Qr(e, t.level == null ? 6 : t.level, t.mem == null ? o.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(e.length))) * 1.5) : 20 : 12 + t.mem, r, n, o);
7891
+ return en(e, t.level == null ? 6 : t.level, t.mem == null ? i.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(e.length))) * 1.5) : 20 : 12 + t.mem, r, n, i);
7765
7892
  }, "dopt"), Ht = s(function(e, t) {
7766
7893
  var r = {};
7767
7894
  for (var n in e) r[n] = e[n];
7768
7895
  for (var n in t) r[n] = t[n];
7769
7896
  return r;
7770
- }, "mrg"), Zr = s(function(e, t, r) {
7771
- for (var n = e(), o = e.toString(), i = o.slice(o.indexOf("[") + 1, o.lastIndexOf("]")).replace(/\s+/g, "").split(","), c = 0; c < n.length; ++c) {
7772
- var l = n[c], h = i[c];
7897
+ }, "mrg"), rn = s(function(e, t, r) {
7898
+ for (var n = e(), i = e.toString(), o = i.slice(i.indexOf("[") + 1, i.lastIndexOf("]")).replace(/\s+/g, "").split(","), c = 0; c < n.length; ++c) {
7899
+ var l = n[c], h = o[c];
7773
7900
  if (typeof l == "function") {
7774
7901
  t += ";" + h + "=";
7775
- var _ = l.toString();
7776
- if (l.prototype) if (_.indexOf("[native code]") != -1) {
7777
- var m = _.indexOf(" ", 8) + 1;
7778
- t += _.slice(m, _.indexOf("(", m));
7902
+ var g = l.toString();
7903
+ if (l.prototype) if (g.indexOf("[native code]") != -1) {
7904
+ var m = g.indexOf(" ", 8) + 1;
7905
+ t += g.slice(m, g.indexOf("(", m));
7779
7906
  } else {
7780
- t += _;
7907
+ t += g;
7781
7908
  for (var A in l.prototype) t += ";" + h + ".prototype." + A + "=" + l.prototype[A].toString();
7782
7909
  }
7783
- else t += _;
7910
+ else t += g;
7784
7911
  } else r[h] = l;
7785
7912
  }
7786
7913
  return t;
7787
- }, "wcln"), mt = [], qi = s(function(e) {
7914
+ }, "wcln"), mt = [], Ji = s(function(e) {
7788
7915
  var t = [];
7789
7916
  for (var r in e) e[r].buffer && t.push((e[r] = new e[r].constructor(e[r])).buffer);
7790
7917
  return t;
7791
- }, "cbfs"), Wi = s(function(e, t, r, n) {
7918
+ }, "cbfs"), Qi = s(function(e, t, r, n) {
7792
7919
  if (!mt[r]) {
7793
- for (var o = "", i = {}, c = e.length - 1, l = 0; l < c; ++l) o = Zr(e[l], o, i);
7794
- mt[r] = { c: Zr(e[c], o, i), e: i };
7920
+ for (var i = "", o = {}, c = e.length - 1, l = 0; l < c; ++l) i = rn(e[l], i, o);
7921
+ mt[r] = { c: rn(e[c], i, o), e: o };
7795
7922
  }
7796
7923
  var h = Ht({}, mt[r].e);
7797
- return Hi(mt[r].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + t.toString() + "}", r, h, qi(h), n);
7798
- }, "wrkr"), Ki = s(function() {
7799
- return [K, ie, Ze, je, qe, et, Dt, jr, Wr, Vr, tt, Yr, fe, ft, he, ht, rt, Ge, X, zr, qt, Et, en];
7800
- }, "bInflt"), Vi = s(function() {
7801
- return [K, ie, Ze, je, qe, et, lt, Mt, qr, ye, Kr, We, tt, Jr, kt, fe, ge, Ke, dt, pt, xt, Ve, Gt, $t, rt, Ge, Qr, Xr, jt, Et];
7924
+ return Vi(mt[r].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + t.toString() + "}", r, h, Ji(h), n);
7925
+ }, "wrkr"), Xi = s(function() {
7926
+ return [K, ie, Ze, je, qe, et, Dt, Kr, Yr, Jr, tt, Qr, fe, ft, he, ht, rt, Ge, X, Xr, qt, Et, nn];
7927
+ }, "bInflt"), Zi = s(function() {
7928
+ return [K, ie, Ze, je, qe, et, lt, Mt, Vr, we, zr, We, tt, Zr, kt, fe, ge, Ke, dt, pt, xt, Ve, Gt, $t, rt, Ge, en, tn, jt, Et];
7802
7929
  }, "bDflt"), Et = s(function(e) {
7803
7930
  return postMessage(e, [e.buffer]);
7804
- }, "pbf"), en = s(function(e) {
7931
+ }, "pbf"), nn = s(function(e) {
7805
7932
  return e && { out: e.size && new K(e.size), dictionary: e.dictionary };
7806
- }, "gopt"), tn = s(function(e, t, r, n, o, i) {
7807
- var c = Wi(r, n, o, function(l, h) {
7808
- c.terminate(), i(l, h);
7933
+ }, "gopt"), on = s(function(e, t, r, n, i, o) {
7934
+ var c = Qi(r, n, i, function(l, h) {
7935
+ c.terminate(), o(l, h);
7809
7936
  });
7810
7937
  return c.postMessage([e, t], t.consume ? [e.buffer] : []), function() {
7811
7938
  c.terminate();
@@ -7819,76 +7946,76 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
7819
7946
  }, "b8"), re = s(function(e, t, r) {
7820
7947
  for (; r; ++t) e[t] = r, r >>>= 8;
7821
7948
  }, "wbytes");
7822
- function Yi(e, t, r) {
7823
- return r || (r = t, t = {}), typeof r != "function" && X(7), tn(e, t, [Vi], function(n) {
7949
+ function eo(e, t, r) {
7950
+ return r || (r = t, t = {}), typeof r != "function" && X(7), on(e, t, [Zi], function(n) {
7824
7951
  return Et(jt(n.data[0], n.data[1]));
7825
7952
  }, 0, r);
7826
7953
  }
7827
- s(Yi, "deflate");
7954
+ s(eo, "deflate");
7828
7955
  function jt(e, t) {
7829
- return Xr(e, t || {}, 0, 0);
7956
+ return tn(e, t || {}, 0, 0);
7830
7957
  }
7831
7958
  s(jt, "deflateSync");
7832
- function zi(e, t, r) {
7833
- return r || (r = t, t = {}), typeof r != "function" && X(7), tn(e, t, [Ki], function(n) {
7834
- return Et(qt(n.data[0], en(n.data[1])));
7959
+ function to(e, t, r) {
7960
+ return r || (r = t, t = {}), typeof r != "function" && X(7), on(e, t, [Xi], function(n) {
7961
+ return Et(qt(n.data[0], nn(n.data[1])));
7835
7962
  }, 1, r);
7836
7963
  }
7837
- s(zi, "inflate");
7964
+ s(to, "inflate");
7838
7965
  function qt(e, t) {
7839
- return zr(e, { i: 2 }, t && t.out, t && t.dictionary);
7966
+ return Xr(e, { i: 2 }, t && t.out, t && t.dictionary);
7840
7967
  }
7841
7968
  s(qt, "inflateSync");
7842
- var rn = s(function(e, t, r, n) {
7843
- for (var o in e) {
7844
- var i = e[o], c = t + o, l = n;
7845
- Array.isArray(i) && (l = Ht(n, i[1]), i = i[0]), i instanceof K ? r[c] = [i, l] : (r[c += "/"] = [new K(0), l], rn(i, c, r, n));
7969
+ var sn = s(function(e, t, r, n) {
7970
+ for (var i in e) {
7971
+ var o = e[i], c = t + i, l = n;
7972
+ Array.isArray(o) && (l = Ht(n, o[1]), o = o[0]), o instanceof K ? r[c] = [o, l] : (r[c += "/"] = [new K(0), l], sn(o, c, r, n));
7846
7973
  }
7847
- }, "fltn"), nn = typeof TextEncoder < "u" && new TextEncoder(), Wt = typeof TextDecoder < "u" && new TextDecoder(), Ji = 0;
7974
+ }, "fltn"), an = typeof TextEncoder < "u" && new TextEncoder(), Wt = typeof TextDecoder < "u" && new TextDecoder(), ro = 0;
7848
7975
  try {
7849
- Wt.decode(kt, { stream: true }), Ji = 1;
7976
+ Wt.decode(kt, { stream: true }), ro = 1;
7850
7977
  } catch {
7851
7978
  }
7852
- var Qi = s(function(e) {
7979
+ var no = s(function(e) {
7853
7980
  for (var t = "", r = 0; ; ) {
7854
- var n = e[r++], o = (n > 127) + (n > 223) + (n > 239);
7855
- if (r + o > e.length) return { s: t, r: Ge(e, r - 1) };
7856
- o ? o == 3 ? (n = ((n & 15) << 18 | (e[r++] & 63) << 12 | (e[r++] & 63) << 6 | e[r++] & 63) - 65536, t += String.fromCharCode(55296 | n >> 10, 56320 | n & 1023)) : o & 1 ? t += String.fromCharCode((n & 31) << 6 | e[r++] & 63) : t += String.fromCharCode((n & 15) << 12 | (e[r++] & 63) << 6 | e[r++] & 63) : t += String.fromCharCode(n);
7981
+ var n = e[r++], i = (n > 127) + (n > 223) + (n > 239);
7982
+ if (r + i > e.length) return { s: t, r: Ge(e, r - 1) };
7983
+ i ? i == 3 ? (n = ((n & 15) << 18 | (e[r++] & 63) << 12 | (e[r++] & 63) << 6 | e[r++] & 63) - 65536, t += String.fromCharCode(55296 | n >> 10, 56320 | n & 1023)) : i & 1 ? t += String.fromCharCode((n & 31) << 6 | e[r++] & 63) : t += String.fromCharCode((n & 15) << 12 | (e[r++] & 63) << 6 | e[r++] & 63) : t += String.fromCharCode(n);
7857
7984
  }
7858
7985
  }, "dutf8");
7859
- function on(e, t) {
7986
+ function cn(e, t) {
7860
7987
  var r;
7861
- if (nn) return nn.encode(e);
7862
- for (var n = e.length, o = new K(e.length + (e.length >> 1)), i = 0, c = s(function(_) {
7863
- o[i++] = _;
7988
+ if (an) return an.encode(e);
7989
+ for (var n = e.length, i = new K(e.length + (e.length >> 1)), o = 0, c = s(function(g) {
7990
+ i[o++] = g;
7864
7991
  }, "w"), r = 0; r < n; ++r) {
7865
- if (i + 5 > o.length) {
7866
- var l = new K(i + 8 + (n - r << 1));
7867
- l.set(o), o = l;
7992
+ if (o + 5 > i.length) {
7993
+ var l = new K(o + 8 + (n - r << 1));
7994
+ l.set(i), i = l;
7868
7995
  }
7869
7996
  var h = e.charCodeAt(r);
7870
7997
  h < 128 || t ? c(h) : h < 2048 ? (c(192 | h >> 6), c(128 | h & 63)) : h > 55295 && h < 57344 ? (h = 65536 + (h & 1047552) | e.charCodeAt(++r) & 1023, c(240 | h >> 18), c(128 | h >> 12 & 63), c(128 | h >> 6 & 63), c(128 | h & 63)) : (c(224 | h >> 12), c(128 | h >> 6 & 63), c(128 | h & 63));
7871
7998
  }
7872
- return Ge(o, 0, i);
7999
+ return Ge(i, 0, o);
7873
8000
  }
7874
- s(on, "strToU8");
7875
- function Xi(e, t) {
8001
+ s(cn, "strToU8");
8002
+ function io(e, t) {
7876
8003
  if (t) {
7877
8004
  for (var r = "", n = 0; n < e.length; n += 16384) r += String.fromCharCode.apply(null, e.subarray(n, n + 16384));
7878
8005
  return r;
7879
8006
  } else {
7880
8007
  if (Wt) return Wt.decode(e);
7881
- var o = Qi(e), i = o.s, r = o.r;
7882
- return r.length && X(8), i;
8008
+ var i = no(e), o = i.s, r = i.r;
8009
+ return r.length && X(8), o;
7883
8010
  }
7884
8011
  }
7885
- s(Xi, "strFromU8");
7886
- var Zi = s(function(e, t) {
8012
+ s(io, "strFromU8");
8013
+ var oo = s(function(e, t) {
7887
8014
  return t + 30 + Ie(e, t + 26) + Ie(e, t + 28);
7888
- }, "slzh"), eo = s(function(e, t, r) {
7889
- var n = Ie(e, t + 28), o = Xi(e.subarray(t + 46, t + 46 + n), !(Ie(e, t + 8) & 2048)), i = t + 46 + n, c = Ee(e, t + 20), l = r && c == 4294967295 ? to(e, i) : [c, Ee(e, t + 24), Ee(e, t + 42)], h = l[0], _ = l[1], m = l[2];
7890
- return [Ie(e, t + 10), h, _, o, i + Ie(e, t + 30) + Ie(e, t + 32), m];
7891
- }, "zh"), to = s(function(e, t) {
8015
+ }, "slzh"), so = s(function(e, t, r) {
8016
+ var n = Ie(e, t + 28), i = io(e.subarray(t + 46, t + 46 + n), !(Ie(e, t + 8) & 2048)), o = t + 46 + n, c = Ee(e, t + 20), l = r && c == 4294967295 ? ao(e, o) : [c, Ee(e, t + 24), Ee(e, t + 42)], h = l[0], g = l[1], m = l[2];
8017
+ return [Ie(e, t + 10), h, g, i, o + Ie(e, t + 30) + Ie(e, t + 32), m];
8018
+ }, "zh"), ao = s(function(e, t) {
7892
8019
  for (; Ie(e, t) != 1; t += 4 + Ie(e, t + 2)) ;
7893
8020
  return [Ft(e, t + 12), Ft(e, t + 4), Ft(e, t + 20)];
7894
8021
  }, "z64e"), Kt = s(function(e) {
@@ -7898,57 +8025,57 @@ var Zi = s(function(e, t) {
7898
8025
  n > 65535 && X(9), t += n + 4;
7899
8026
  }
7900
8027
  return t;
7901
- }, "exfl"), sn = s(function(e, t, r, n, o, i, c, l) {
7902
- var h = n.length, _ = r.extra, m = l && l.length, A = Kt(_);
7903
- re(e, t, c != null ? 33639248 : 67324752), t += 4, c != null && (e[t++] = 20, e[t++] = r.os), e[t] = 20, t += 2, e[t++] = r.flag << 1 | (i < 0 && 8), e[t++] = o && 8, e[t++] = r.compression & 255, e[t++] = r.compression >> 8;
8028
+ }, "exfl"), un = s(function(e, t, r, n, i, o, c, l) {
8029
+ var h = n.length, g = r.extra, m = l && l.length, A = Kt(g);
8030
+ re(e, t, c != null ? 33639248 : 67324752), t += 4, c != null && (e[t++] = 20, e[t++] = r.os), e[t] = 20, t += 2, e[t++] = r.flag << 1 | (o < 0 && 8), e[t++] = i && 8, e[t++] = r.compression & 255, e[t++] = r.compression >> 8;
7904
8031
  var b = new Date(r.mtime == null ? Date.now() : r.mtime), O = b.getFullYear() - 1980;
7905
- if ((O < 0 || O > 119) && X(10), re(e, t, O << 25 | b.getMonth() + 1 << 21 | b.getDate() << 16 | b.getHours() << 11 | b.getMinutes() << 5 | b.getSeconds() >> 1), t += 4, i != -1 && (re(e, t, r.crc), re(e, t + 4, i < 0 ? -i - 2 : i), re(e, t + 8, r.size)), re(e, t + 12, h), re(e, t + 14, A), t += 16, c != null && (re(e, t, m), re(e, t + 6, r.attrs), re(e, t + 10, c), t += 14), e.set(n, t), t += h, A) for (var x in _) {
7906
- var M = _[x], y = M.length;
7907
- re(e, t, +x), re(e, t + 2, y), e.set(M, t + 4), t += 4 + y;
8032
+ if ((O < 0 || O > 119) && X(10), re(e, t, O << 25 | b.getMonth() + 1 << 21 | b.getDate() << 16 | b.getHours() << 11 | b.getMinutes() << 5 | b.getSeconds() >> 1), t += 4, o != -1 && (re(e, t, r.crc), re(e, t + 4, o < 0 ? -o - 2 : o), re(e, t + 8, r.size)), re(e, t + 12, h), re(e, t + 14, A), t += 16, c != null && (re(e, t, m), re(e, t + 6, r.attrs), re(e, t + 10, c), t += 14), e.set(n, t), t += h, A) for (var x in g) {
8033
+ var M = g[x], w = M.length;
8034
+ re(e, t, +x), re(e, t + 2, w), e.set(M, t + 4), t += 4 + w;
7908
8035
  }
7909
8036
  return m && (e.set(l, t), t += m), t;
7910
- }, "wzh"), ro = s(function(e, t, r, n, o) {
7911
- re(e, t, 101010256), re(e, t + 8, r), re(e, t + 10, r), re(e, t + 12, n), re(e, t + 16, o);
8037
+ }, "wzh"), co = s(function(e, t, r, n, i) {
8038
+ re(e, t, 101010256), re(e, t + 8, r), re(e, t + 10, r), re(e, t + 12, n), re(e, t + 16, i);
7912
8039
  }, "wzf");
7913
- function no(e, t, r) {
8040
+ function uo(e, t, r) {
7914
8041
  r || (r = t, t = {}), typeof r != "function" && X(7);
7915
8042
  var n = {};
7916
- rn(e, "", n, t);
7917
- var o = Object.keys(n), i = o.length, c = 0, l = 0, h = i, _ = new Array(i), m = [], A = s(function() {
7918
- for (var y = 0; y < m.length; ++y) m[y]();
7919
- }, "tAll"), b = s(function(y, C) {
8043
+ sn(e, "", n, t);
8044
+ var i = Object.keys(n), o = i.length, c = 0, l = 0, h = o, g = new Array(o), m = [], A = s(function() {
8045
+ for (var w = 0; w < m.length; ++w) m[w]();
8046
+ }, "tAll"), b = s(function(w, C) {
7920
8047
  _t(function() {
7921
- r(y, C);
8048
+ r(w, C);
7922
8049
  });
7923
8050
  }, "cbd");
7924
8051
  _t(function() {
7925
8052
  b = r;
7926
8053
  });
7927
8054
  var O = s(function() {
7928
- var y = new K(l + 22), C = c, w = l - c;
8055
+ var w = new K(l + 22), C = c, y = l - c;
7929
8056
  l = 0;
7930
8057
  for (var B = 0; B < h; ++B) {
7931
- var L = _[B];
8058
+ var L = g[B];
7932
8059
  try {
7933
8060
  var U = L.c.length;
7934
- sn(y, l, L, L.f, L.u, U);
8061
+ un(w, l, L, L.f, L.u, U);
7935
8062
  var G = 30 + L.f.length + Kt(L.extra), k = l + G;
7936
- y.set(L.c, k), sn(y, c, L, L.f, L.u, U, l, L.m), c += 16 + G + (L.m ? L.m.length : 0), l = k + U;
8063
+ w.set(L.c, k), un(w, c, L, L.f, L.u, U, l, L.m), c += 16 + G + (L.m ? L.m.length : 0), l = k + U;
7937
8064
  } catch (a) {
7938
8065
  return b(a, null);
7939
8066
  }
7940
8067
  }
7941
- ro(y, c, _.length, w, C), b(null, y);
8068
+ co(w, c, g.length, y, C), b(null, w);
7942
8069
  }, "cbf");
7943
- i || O();
7944
- for (var x = s(function(y) {
7945
- var C = o[y], w = n[C], B = w[0], L = w[1], U = ji(), G = B.length;
8070
+ o || O();
8071
+ for (var x = s(function(w) {
8072
+ var C = i[w], y = n[C], B = y[0], L = y[1], U = zi(), G = B.length;
7946
8073
  U.p(B);
7947
- var k = on(C), a = k.length, u = L.comment, f = u && on(u), g = f && f.length, p = Kt(L.extra), I = L.level == 0 ? 0 : 8, T = s(function(d, E) {
8074
+ var k = cn(C), a = k.length, u = L.comment, f = u && cn(u), _ = f && f.length, p = Kt(L.extra), I = L.level == 0 ? 0 : 8, T = s(function(d, E) {
7948
8075
  if (d) A(), b(d, null);
7949
8076
  else {
7950
8077
  var S = E.length;
7951
- _[y] = Ht(L, { size: G, crc: U.d(), c: E, f: k, m: f, u: a != C.length || f && u.length != g, compression: I }), c += 30 + a + p + S, l += 76 + 2 * (a + p) + (g || 0) + S, --i || O();
8078
+ g[w] = Ht(L, { size: G, crc: U.d(), c: E, f: k, m: f, u: a != C.length || f && u.length != _, compression: I }), c += 30 + a + p + S, l += 76 + 2 * (a + p) + (_ || 0) + S, --o || O();
7952
8079
  }
7953
8080
  }, "cbl");
7954
8081
  if (a > 65535 && T(X(11, 0, 1), null), !I) T(null, B);
@@ -7957,87 +8084,87 @@ function no(e, t, r) {
7957
8084
  } catch (d) {
7958
8085
  T(d, null);
7959
8086
  }
7960
- else m.push(Yi(B, L, T));
8087
+ else m.push(eo(B, L, T));
7961
8088
  }, "_loop_1"), M = 0; M < h; ++M) x(M);
7962
8089
  return A;
7963
8090
  }
7964
- s(no, "zip");
8091
+ s(uo, "zip");
7965
8092
  var _t = typeof queueMicrotask == "function" ? queueMicrotask : typeof setTimeout == "function" ? setTimeout : function(e) {
7966
8093
  e();
7967
8094
  };
7968
- function io(e, t, r) {
8095
+ function lo(e, t, r) {
7969
8096
  r || (r = t, t = {}), typeof r != "function" && X(7);
7970
- var n = [], o = s(function() {
7971
- for (var y = 0; y < n.length; ++y) n[y]();
7972
- }, "tAll"), i = {}, c = s(function(y, C) {
8097
+ var n = [], i = s(function() {
8098
+ for (var w = 0; w < n.length; ++w) n[w]();
8099
+ }, "tAll"), o = {}, c = s(function(w, C) {
7973
8100
  _t(function() {
7974
- r(y, C);
8101
+ r(w, C);
7975
8102
  });
7976
8103
  }, "cbd");
7977
8104
  _t(function() {
7978
8105
  c = r;
7979
8106
  });
7980
- for (var l = e.length - 22; Ee(e, l) != 101010256; --l) if (!l || e.length - l > 65558) return c(X(13, 0, 1), null), o;
8107
+ for (var l = e.length - 22; Ee(e, l) != 101010256; --l) if (!l || e.length - l > 65558) return c(X(13, 0, 1), null), i;
7981
8108
  var h = Ie(e, l + 8);
7982
8109
  if (h) {
7983
- var _ = h, m = Ee(e, l + 16), A = m == 4294967295 || _ == 65535;
8110
+ var g = h, m = Ee(e, l + 16), A = m == 4294967295 || g == 65535;
7984
8111
  if (A) {
7985
8112
  var b = Ee(e, l - 12);
7986
- A = Ee(e, b) == 101075792, A && (_ = h = Ee(e, b + 32), m = Ee(e, b + 48));
8113
+ A = Ee(e, b) == 101075792, A && (g = h = Ee(e, b + 32), m = Ee(e, b + 48));
7987
8114
  }
7988
- for (var O = t && t.filter, x = s(function(y) {
7989
- var C = eo(e, m, A), w = C[0], B = C[1], L = C[2], U = C[3], G = C[4], k = C[5], a = Zi(e, k);
8115
+ for (var O = t && t.filter, x = s(function(w) {
8116
+ var C = so(e, m, A), y = C[0], B = C[1], L = C[2], U = C[3], G = C[4], k = C[5], a = oo(e, k);
7990
8117
  m = G;
7991
- var u = s(function(g, p) {
7992
- g ? (o(), c(g, null)) : (p && (i[U] = p), --h || c(null, i));
8118
+ var u = s(function(_, p) {
8119
+ _ ? (i(), c(_, null)) : (p && (o[U] = p), --h || c(null, o));
7993
8120
  }, "cbl");
7994
- if (!O || O({ name: U, size: B, originalSize: L, compression: w })) if (!w) u(null, Ge(e, a, a + B));
7995
- else if (w == 8) {
8121
+ if (!O || O({ name: U, size: B, originalSize: L, compression: y })) if (!y) u(null, Ge(e, a, a + B));
8122
+ else if (y == 8) {
7996
8123
  var f = e.subarray(a, a + B);
7997
8124
  if (L < 524288 || B > 0.8 * L) try {
7998
8125
  u(null, qt(f, { out: new K(L) }));
7999
- } catch (g) {
8000
- u(g, null);
8126
+ } catch (_) {
8127
+ u(_, null);
8001
8128
  }
8002
- else n.push(zi(f, { size: L }, u));
8003
- } else u(X(14, "unknown compression type " + w, 1), null);
8129
+ else n.push(to(f, { size: L }, u));
8130
+ } else u(X(14, "unknown compression type " + y, 1), null);
8004
8131
  else u(null, null);
8005
- }, "_loop_3"), M = 0; M < _; ++M) x(M);
8132
+ }, "_loop_3"), M = 0; M < g; ++M) x(M);
8006
8133
  } else c(null, {});
8007
- return o;
8134
+ return i;
8008
8135
  }
8009
- s(io, "unzip");
8010
- const oo = [/^\/$/, /^\*+$/, /^[0-9]+$/], so = ["/artifact/", "https://", "http://", "*********"], ao = 3;
8011
- function an(e) {
8012
- return e.filter((t) => !(t.length < ao || oo.some((r) => r.test(t)) || so.some((r) => t.includes(r))));
8136
+ s(lo, "unzip");
8137
+ const fo = [/^\/$/, /^\*+$/, /^[0-9]+$/], ho = ["/artifact/", "https://", "http://", "*********"], po = 3;
8138
+ function ln(e) {
8139
+ return e.filter((t) => !(t.length < po || fo.some((r) => r.test(t)) || ho.some((r) => t.includes(r))));
8013
8140
  }
8014
- s(an, "filterSensitiveValues");
8015
- const Ae = Symbol.for("@ts-pattern/matcher"), co = Symbol.for("@ts-pattern/isVariadic"), gt = "@ts-pattern/anonymous-select-key", Vt = s((e) => !!(e && typeof e == "object"), "r"), It = s((e) => e && !!e[Ae], "i"), Se = s((e, t, r) => {
8141
+ s(ln, "filterSensitiveValues");
8142
+ const Ae = Symbol.for("@ts-pattern/matcher"), mo = Symbol.for("@ts-pattern/isVariadic"), gt = "@ts-pattern/anonymous-select-key", Vt = s((e) => !!(e && typeof e == "object"), "r"), It = s((e) => e && !!e[Ae], "i"), Se = s((e, t, r) => {
8016
8143
  if (It(e)) {
8017
- const n = e[Ae](), { matched: o, selections: i } = n.match(t);
8018
- return o && i && Object.keys(i).forEach((c) => r(c, i[c])), o;
8144
+ const n = e[Ae](), { matched: i, selections: o } = n.match(t);
8145
+ return i && o && Object.keys(o).forEach((c) => r(c, o[c])), i;
8019
8146
  }
8020
8147
  if (Vt(e)) {
8021
8148
  if (!Vt(t)) return false;
8022
8149
  if (Array.isArray(e)) {
8023
8150
  if (!Array.isArray(t)) return false;
8024
- let n = [], o = [], i = [];
8151
+ let n = [], i = [], o = [];
8025
8152
  for (const c of e.keys()) {
8026
8153
  const l = e[c];
8027
- It(l) && l[co] ? i.push(l) : i.length ? o.push(l) : n.push(l);
8154
+ It(l) && l[mo] ? o.push(l) : o.length ? i.push(l) : n.push(l);
8028
8155
  }
8029
- if (i.length) {
8030
- if (i.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
8031
- if (t.length < n.length + o.length) return false;
8032
- const c = t.slice(0, n.length), l = o.length === 0 ? [] : t.slice(-o.length), h = t.slice(n.length, o.length === 0 ? 1 / 0 : -o.length);
8033
- return n.every((_, m) => Se(_, c[m], r)) && o.every((_, m) => Se(_, l[m], r)) && (i.length === 0 || Se(i[0], h, r));
8156
+ if (o.length) {
8157
+ if (o.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
8158
+ if (t.length < n.length + i.length) return false;
8159
+ const c = t.slice(0, n.length), l = i.length === 0 ? [] : t.slice(-i.length), h = t.slice(n.length, i.length === 0 ? 1 / 0 : -i.length);
8160
+ return n.every((g, m) => Se(g, c[m], r)) && i.every((g, m) => Se(g, l[m], r)) && (o.length === 0 || Se(o[0], h, r));
8034
8161
  }
8035
8162
  return e.length === t.length && e.every((c, l) => Se(c, t[l], r));
8036
8163
  }
8037
8164
  return Reflect.ownKeys(e).every((n) => {
8038
- const o = e[n];
8039
- return (n in t || It(i = o) && i[Ae]().matcherType === "optional") && Se(o, t[n], r);
8040
- var i;
8165
+ const i = e[n];
8166
+ return (n in t || It(o = i) && o[Ae]().matcherType === "optional") && Se(i, t[n], r);
8167
+ var o;
8041
8168
  });
8042
8169
  }
8043
8170
  return Object.is(t, e);
@@ -8046,57 +8173,57 @@ const Ae = Symbol.for("@ts-pattern/matcher"), co = Symbol.for("@ts-pattern/isVar
8046
8173
  return Vt(e) ? It(e) ? (t = (r = (n = e[Ae]()).getSelectionKeys) == null ? void 0 : r.call(n)) != null ? t : [] : Array.isArray(e) ? nt(e, Oe) : nt(Object.values(e), Oe) : [];
8047
8174
  }, "s"), nt = s((e, t) => e.reduce((r, n) => r.concat(t(n)), []), "c");
8048
8175
  function ae(e) {
8049
- return Object.assign(e, { optional: s(() => uo(e), "optional"), and: s((t) => Y(e, t), "and"), or: s((t) => lo(e, t), "or"), select: s((t) => t === void 0 ? cn(e) : cn(t, e), "select") });
8176
+ return Object.assign(e, { optional: s(() => Eo(e), "optional"), and: s((t) => Y(e, t), "and"), or: s((t) => _o(e, t), "or"), select: s((t) => t === void 0 ? fn(e) : fn(t, e), "select") });
8050
8177
  }
8051
8178
  s(ae, "a");
8052
- function uo(e) {
8179
+ function Eo(e) {
8053
8180
  return ae({ [Ae]: () => ({ match: s((t) => {
8054
8181
  let r = {};
8055
- const n = s((o, i) => {
8056
- r[o] = i;
8182
+ const n = s((i, o) => {
8183
+ r[i] = o;
8057
8184
  }, "r2");
8058
- return t === void 0 ? (Oe(e).forEach((o) => n(o, void 0)), { matched: true, selections: r }) : { matched: Se(e, t, n), selections: r };
8185
+ return t === void 0 ? (Oe(e).forEach((i) => n(i, void 0)), { matched: true, selections: r }) : { matched: Se(e, t, n), selections: r };
8059
8186
  }, "match"), getSelectionKeys: s(() => Oe(e), "getSelectionKeys"), matcherType: "optional" }) });
8060
8187
  }
8061
- s(uo, "h");
8188
+ s(Eo, "h");
8062
8189
  function Y(...e) {
8063
8190
  return ae({ [Ae]: () => ({ match: s((t) => {
8064
8191
  let r = {};
8065
- const n = s((o, i) => {
8066
- r[o] = i;
8192
+ const n = s((i, o) => {
8193
+ r[i] = o;
8067
8194
  }, "r2");
8068
- return { matched: e.every((o) => Se(o, t, n)), selections: r };
8195
+ return { matched: e.every((i) => Se(i, t, n)), selections: r };
8069
8196
  }, "match"), getSelectionKeys: s(() => nt(e, Oe), "getSelectionKeys"), matcherType: "and" }) });
8070
8197
  }
8071
8198
  s(Y, "d");
8072
- function lo(...e) {
8199
+ function _o(...e) {
8073
8200
  return ae({ [Ae]: () => ({ match: s((t) => {
8074
8201
  let r = {};
8075
- const n = s((o, i) => {
8076
- r[o] = i;
8202
+ const n = s((i, o) => {
8203
+ r[i] = o;
8077
8204
  }, "r2");
8078
- return nt(e, Oe).forEach((o) => n(o, void 0)), { matched: e.some((o) => Se(o, t, n)), selections: r };
8205
+ return nt(e, Oe).forEach((i) => n(i, void 0)), { matched: e.some((i) => Se(i, t, n)), selections: r };
8079
8206
  }, "match"), getSelectionKeys: s(() => nt(e, Oe), "getSelectionKeys"), matcherType: "or" }) });
8080
8207
  }
8081
- s(lo, "y");
8208
+ s(_o, "y");
8082
8209
  function W(e) {
8083
8210
  return { [Ae]: () => ({ match: s((t) => ({ matched: !!e(t) }), "match") }) };
8084
8211
  }
8085
8212
  s(W, "p");
8086
- function cn(...e) {
8213
+ function fn(...e) {
8087
8214
  const t = typeof e[0] == "string" ? e[0] : void 0, r = e.length === 2 ? e[1] : typeof e[0] == "string" ? void 0 : e[0];
8088
8215
  return ae({ [Ae]: () => ({ match: s((n) => {
8089
- let o = { [t ?? gt]: n };
8090
- return { matched: r === void 0 || Se(r, n, (i, c) => {
8091
- o[i] = c;
8092
- }), selections: o };
8216
+ let i = { [t ?? gt]: n };
8217
+ return { matched: r === void 0 || Se(r, n, (o, c) => {
8218
+ i[o] = c;
8219
+ }), selections: i };
8093
8220
  }, "match"), getSelectionKeys: s(() => [t ?? gt].concat(r === void 0 ? [] : Oe(r)), "getSelectionKeys") }) });
8094
8221
  }
8095
- s(cn, "v");
8096
- function un(e) {
8222
+ s(fn, "v");
8223
+ function hn(e) {
8097
8224
  return true;
8098
8225
  }
8099
- s(un, "b");
8226
+ s(hn, "b");
8100
8227
  function Re(e) {
8101
8228
  return typeof e == "number";
8102
8229
  }
@@ -8108,7 +8235,7 @@ s(Le, "S");
8108
8235
  function Pe(e) {
8109
8236
  return typeof e == "bigint";
8110
8237
  }
8111
- s(Pe, "j"), ae(W(un)), ae(W(un));
8238
+ s(Pe, "j"), ae(W(hn)), ae(W(hn));
8112
8239
  const Ne = s((e) => Object.assign(ae(e), { startsWith: s((t) => {
8113
8240
  return Ne(Y(e, (r = t, W((n) => Le(n) && n.startsWith(r)))));
8114
8241
  var r;
@@ -8123,9 +8250,9 @@ const Ne = s((e) => Object.assign(ae(e), { startsWith: s((t) => {
8123
8250
  var r;
8124
8251
  }, "regex") }), "x");
8125
8252
  Ne(W(Le));
8126
- const Te = s((e) => Object.assign(ae(e), { between: s((t, r) => Te(Y(e, ((n, o) => W((i) => Re(i) && n <= i && o >= i))(t, r))), "between"), lt: s((t) => Te(Y(e, ((r) => W((n) => Re(n) && n < r))(t))), "lt"), gt: s((t) => Te(Y(e, ((r) => W((n) => Re(n) && n > r))(t))), "gt"), lte: s((t) => Te(Y(e, ((r) => W((n) => Re(n) && n <= r))(t))), "lte"), gte: s((t) => Te(Y(e, ((r) => W((n) => Re(n) && n >= r))(t))), "gte"), int: s(() => Te(Y(e, W((t) => Re(t) && Number.isInteger(t)))), "int"), finite: s(() => Te(Y(e, W((t) => Re(t) && Number.isFinite(t)))), "finite"), positive: s(() => Te(Y(e, W((t) => Re(t) && t > 0))), "positive"), negative: s(() => Te(Y(e, W((t) => Re(t) && t < 0))), "negative") }), "N");
8253
+ const Te = s((e) => Object.assign(ae(e), { between: s((t, r) => Te(Y(e, ((n, i) => W((o) => Re(o) && n <= o && i >= o))(t, r))), "between"), lt: s((t) => Te(Y(e, ((r) => W((n) => Re(n) && n < r))(t))), "lt"), gt: s((t) => Te(Y(e, ((r) => W((n) => Re(n) && n > r))(t))), "gt"), lte: s((t) => Te(Y(e, ((r) => W((n) => Re(n) && n <= r))(t))), "lte"), gte: s((t) => Te(Y(e, ((r) => W((n) => Re(n) && n >= r))(t))), "gte"), int: s(() => Te(Y(e, W((t) => Re(t) && Number.isInteger(t)))), "int"), finite: s(() => Te(Y(e, W((t) => Re(t) && Number.isFinite(t)))), "finite"), positive: s(() => Te(Y(e, W((t) => Re(t) && t > 0))), "positive"), negative: s(() => Te(Y(e, W((t) => Re(t) && t < 0))), "negative") }), "N");
8127
8254
  Te(W(Re));
8128
- const De = s((e) => Object.assign(ae(e), { between: s((t, r) => De(Y(e, ((n, o) => W((i) => Pe(i) && n <= i && o >= i))(t, r))), "between"), lt: s((t) => De(Y(e, ((r) => W((n) => Pe(n) && n < r))(t))), "lt"), gt: s((t) => De(Y(e, ((r) => W((n) => Pe(n) && n > r))(t))), "gt"), lte: s((t) => De(Y(e, ((r) => W((n) => Pe(n) && n <= r))(t))), "lte"), gte: s((t) => De(Y(e, ((r) => W((n) => Pe(n) && n >= r))(t))), "gte"), positive: s(() => De(Y(e, W((t) => Pe(t) && t > 0))), "positive"), negative: s(() => De(Y(e, W((t) => Pe(t) && t < 0))), "negative") }), "k");
8255
+ const De = s((e) => Object.assign(ae(e), { between: s((t, r) => De(Y(e, ((n, i) => W((o) => Pe(o) && n <= o && i >= o))(t, r))), "between"), lt: s((t) => De(Y(e, ((r) => W((n) => Pe(n) && n < r))(t))), "lt"), gt: s((t) => De(Y(e, ((r) => W((n) => Pe(n) && n > r))(t))), "gt"), lte: s((t) => De(Y(e, ((r) => W((n) => Pe(n) && n <= r))(t))), "lte"), gte: s((t) => De(Y(e, ((r) => W((n) => Pe(n) && n >= r))(t))), "gte"), positive: s(() => De(Y(e, W((t) => Pe(t) && t > 0))), "positive"), negative: s(() => De(Y(e, W((t) => Pe(t) && t < 0))), "negative") }), "k");
8129
8256
  De(W(Pe)), ae(W(function(e) {
8130
8257
  return typeof e == "boolean";
8131
8258
  })), ae(W(function(e) {
@@ -8135,7 +8262,7 @@ De(W(Pe)), ae(W(function(e) {
8135
8262
  })), ae(W(function(e) {
8136
8263
  return e != null;
8137
8264
  }));
8138
- class fo extends Error {
8265
+ class go extends Error {
8139
8266
  static {
8140
8267
  s(this, "I");
8141
8268
  }
@@ -8150,10 +8277,10 @@ class fo extends Error {
8150
8277
  }
8151
8278
  }
8152
8279
  const Yt = { matched: false, value: void 0 };
8153
- function ho(e) {
8280
+ function Io(e) {
8154
8281
  return new vt(e, Yt);
8155
8282
  }
8156
- s(ho, "M");
8283
+ s(Io, "M");
8157
8284
  class vt {
8158
8285
  static {
8159
8286
  s(this, "R");
@@ -8164,12 +8291,12 @@ class vt {
8164
8291
  with(...t) {
8165
8292
  if (this.state.matched) return this;
8166
8293
  const r = t[t.length - 1], n = [t[0]];
8167
- let o;
8168
- t.length === 3 && typeof t[1] == "function" ? o = t[1] : t.length > 2 && n.push(...t.slice(1, t.length - 1));
8169
- let i = false, c = {};
8170
- const l = s((_, m) => {
8171
- i = true, c[_] = m;
8172
- }, "u2"), h = !n.some((_) => Se(_, this.input, l)) || o && !o(this.input) ? Yt : { matched: true, value: r(i ? gt in c ? c[gt] : c : this.input, this.input) };
8294
+ let i;
8295
+ t.length === 3 && typeof t[1] == "function" ? i = t[1] : t.length > 2 && n.push(...t.slice(1, t.length - 1));
8296
+ let o = false, c = {};
8297
+ const l = s((g, m) => {
8298
+ o = true, c[g] = m;
8299
+ }, "u2"), h = !n.some((g) => Se(g, this.input, l)) || i && !i(this.input) ? Yt : { matched: true, value: r(o ? gt in c ? c[gt] : c : this.input, this.input) };
8173
8300
  return new vt(this.input, h);
8174
8301
  }
8175
8302
  when(t, r) {
@@ -8180,7 +8307,7 @@ class vt {
8180
8307
  otherwise(t) {
8181
8308
  return this.state.matched ? this.state.value : t(this.input);
8182
8309
  }
8183
- exhaustive(t = po) {
8310
+ exhaustive(t = So) {
8184
8311
  return this.state.matched ? this.state.value : t(this.input);
8185
8312
  }
8186
8313
  run() {
@@ -8193,74 +8320,92 @@ class vt {
8193
8320
  return this;
8194
8321
  }
8195
8322
  }
8196
- function po(e) {
8197
- throw new fo(e);
8323
+ function So(e) {
8324
+ throw new go(e);
8198
8325
  }
8199
- s(po, "F");
8200
- const mo = "[REDACTED]", Eo = /* @__PURE__ */ new Set(["sha1", "_sha1", "pageref", "downloadsPath", "tracesDir", "pageId"]);
8201
- function oe({ sensitiveValues: e, str: t }) {
8202
- return e.reduce((r, n) => r.replaceAll(n, mo), t);
8326
+ s(So, "F");
8327
+ const Ro = "[REDACTED]", To = /* @__PURE__ */ new Set(["sha1", "_sha1", "pageref", "downloadsPath", "tracesDir", "pageId"]);
8328
+ function se({ sensitiveValues: e, str: t }) {
8329
+ return e.reduce((r, n) => r.replaceAll(n, Ro), t);
8203
8330
  }
8204
- s(oe, "scrubString");
8205
- function _o(e) {
8331
+ s(se, "scrubString");
8332
+ function yo(e) {
8206
8333
  return typeof e == "object" && e !== null && !Array.isArray(e);
8207
8334
  }
8208
- s(_o, "isRecord");
8335
+ s(yo, "isRecord");
8209
8336
  function it({ sensitiveValues: e, value: t }) {
8210
- return typeof t == "string" ? oe({ sensitiveValues: e, str: t }) : Array.isArray(t) ? t.map((r) => it({ sensitiveValues: e, value: r })) : _o(t) ? $e({ obj: t, sensitiveValues: e }) : t;
8337
+ return typeof t == "string" ? se({ sensitiveValues: e, str: t }) : Array.isArray(t) ? t.map((r) => it({ sensitiveValues: e, value: r })) : yo(t) ? $e({ obj: t, sensitiveValues: e }) : t;
8211
8338
  }
8212
8339
  s(it, "scrubValue");
8213
- function go(e) {
8214
- return Eo.has(e) ? true : e.toLowerCase().endsWith("sha1");
8340
+ function wo(e) {
8341
+ return To.has(e) ? true : e.toLowerCase().endsWith("sha1");
8215
8342
  }
8216
- s(go, "shouldPreserveKey");
8343
+ s(wo, "shouldPreserveKey");
8217
8344
  function $e({ obj: e, sensitiveValues: t }) {
8218
- return Object.fromEntries(Object.entries(e).map(([r, n]) => [r, go(r) ? n : it({ sensitiveValues: t, value: n })]));
8345
+ return Object.fromEntries(Object.entries(e).map(([r, n]) => [r, wo(r) ? n : it({ sensitiveValues: t, value: n })]));
8219
8346
  }
8220
8347
  s($e, "scrubObject");
8221
- function Io({ event: e, sensitiveValues: t }) {
8222
- return ho(e).with({ type: "console" }, (r) => ({ ...r, args: r.args?.map((n) => ({ ...n, preview: oe({ sensitiveValues: t, str: n.preview }), value: it({ sensitiveValues: t, value: n.value }) })), text: oe({ sensitiveValues: t, str: r.text }) })).with({ type: "before" }, (r) => ({ ...r, params: $e({ obj: r.params, sensitiveValues: t }), title: r.title ? oe({ sensitiveValues: t, str: r.title }) : void 0 })).with({ type: "after" }, (r) => ({ ...r, error: r.error ? { ...r.error, message: oe({ sensitiveValues: t, str: r.error.message }) } : void 0, result: r.result !== void 0 ? it({ sensitiveValues: t, value: r.result }) : void 0 })).with({ type: "action" }, (r) => ({ ...r, error: r.error ? { ...r.error, message: oe({ sensitiveValues: t, str: r.error.message }) } : void 0, params: $e({ obj: r.params, sensitiveValues: t }), result: r.result !== void 0 ? it({ sensitiveValues: t, value: r.result }) : void 0, title: r.title ? oe({ sensitiveValues: t, str: r.title }) : void 0 })).with({ type: "event" }, (r) => ({ ...r, params: $e({ obj: r.params, sensitiveValues: t }) })).with({ type: "stdout" }, { type: "stderr" }, (r) => ({ ...r, text: r.text !== void 0 ? oe({ sensitiveValues: t, str: r.text }) : void 0 })).with({ type: "error" }, (r) => ({ ...r, message: oe({ sensitiveValues: t, str: r.message }) })).with({ type: "log" }, (r) => ({ ...r, message: oe({ sensitiveValues: t, str: r.message }) })).with({ type: "context-options" }, (r) => ({ ...r, options: $e({ obj: r.options, sensitiveValues: t }), title: r.title ? oe({ sensitiveValues: t, str: r.title }) : void 0 })).with({ type: "frame-snapshot" }, (r) => ({ ...r, snapshot: $e({ obj: r.snapshot, sensitiveValues: t }) })).with({ type: "resource-snapshot" }, (r) => ({ ...r, snapshot: $e({ obj: r.snapshot, sensitiveValues: t }) })).with({ type: "screencast-frame" }, { type: "input" }, (r) => r).exhaustive();
8348
+ function dn({ error: e, sensitiveValues: t }) {
8349
+ return e ? { ...e, message: se({ sensitiveValues: t, str: e.message }) } : void 0;
8350
+ }
8351
+ s(dn, "scrubError");
8352
+ function Ao({ event: e, sensitiveValues: t }) {
8353
+ return Io(e).with({ type: "console" }, (r) => ({ ...r, args: r.args?.map((n) => ({ ...n, preview: se({ sensitiveValues: t, str: n.preview }), value: it({ sensitiveValues: t, value: n.value }) })), text: se({ sensitiveValues: t, str: r.text }) })).with({ type: "before" }, (r) => ({ ...r, params: $e({ obj: r.params, sensitiveValues: t }), title: r.title ? se({ sensitiveValues: t, str: r.title }) : void 0 })).with({ type: "after" }, (r) => ({ ...r, error: dn({ error: r.error, sensitiveValues: t }), result: r.result !== void 0 ? it({ sensitiveValues: t, value: r.result }) : void 0 })).with({ type: "action" }, (r) => ({ ...r, error: dn({ error: r.error, sensitiveValues: t }), params: $e({ obj: r.params, sensitiveValues: t }), result: r.result !== void 0 ? it({ sensitiveValues: t, value: r.result }) : void 0, title: r.title ? se({ sensitiveValues: t, str: r.title }) : void 0 })).with({ type: "event" }, (r) => ({ ...r, params: $e({ obj: r.params, sensitiveValues: t }) })).with({ type: "stdout" }, { type: "stderr" }, (r) => ({ ...r, text: r.text !== void 0 ? se({ sensitiveValues: t, str: r.text }) : void 0 })).with({ type: "error" }, (r) => ({ ...r, message: se({ sensitiveValues: t, str: r.message }) })).with({ type: "log" }, (r) => ({ ...r, message: se({ sensitiveValues: t, str: r.message }) })).with({ type: "context-options" }, (r) => ({ ...r, options: $e({ obj: r.options, sensitiveValues: t }), title: r.title ? se({ sensitiveValues: t, str: r.title }) : void 0 })).with({ type: "frame-snapshot" }, (r) => ({ ...r, snapshot: $e({ obj: r.snapshot, sensitiveValues: t }) })).with({ type: "resource-snapshot" }, (r) => ({ ...r, snapshot: $e({ obj: r.snapshot, sensitiveValues: t }) })).with({ type: "screencast-frame" }, { type: "input" }, (r) => r).exhaustive();
8223
8354
  }
8224
- s(Io, "scrubTraceEvent");
8225
- function So({ content: e, sensitiveValues: t }) {
8355
+ s(Ao, "scrubTraceEvent");
8356
+ function vo({ content: e, sensitiveValues: t }) {
8226
8357
  const r = new node_util.TextDecoder(), n = new node_util.TextEncoder(), c = r.decode(e).split(`
8227
8358
  `).map((l) => {
8228
8359
  if (!l.trim()) return l;
8229
8360
  try {
8230
- const h = JSON.parse(l), _ = Io({ event: h, sensitiveValues: t });
8231
- return JSON.stringify(_);
8361
+ const h = JSON.parse(l), g = Ao({ event: h, sensitiveValues: t });
8362
+ return JSON.stringify(g);
8232
8363
  } catch {
8233
- return oe({ sensitiveValues: t, str: l });
8364
+ return se({ sensitiveValues: t, str: l });
8234
8365
  }
8235
8366
  });
8236
8367
  return n.encode(c.join(`
8237
8368
  `));
8238
8369
  }
8239
- s(So, "scrubJsonLinesFile");
8240
- function ln({ content: e, sensitiveValues: t }) {
8241
- const r = new node_util.TextDecoder(), n = new node_util.TextEncoder(), o = oe({ sensitiveValues: t, str: r.decode(e) });
8242
- return n.encode(o);
8370
+ s(vo, "scrubJsonLinesFile");
8371
+ function pn({ content: e, sensitiveValues: t }) {
8372
+ const r = new node_util.TextDecoder(), n = new node_util.TextEncoder(), i = se({ sensitiveValues: t, str: r.decode(e) });
8373
+ return n.encode(i);
8243
8374
  }
8244
- s(ln, "scrubTextFile");
8245
- const Ro = node_util.promisify(io), To = node_util.promisify(no);
8246
- async function wo({ sensitiveValues: e, traceBuffer: t }) {
8247
- const r = an(e);
8375
+ s(pn, "scrubTextFile");
8376
+ const bo = node_util.promisify(lo), Co = node_util.promisify(uo);
8377
+ async function zt({ sensitiveValues: e, traceBuffer: t }) {
8378
+ const r = ln(e);
8248
8379
  if (r.length === 0) return new Uint8Array(t);
8249
- const n = r.sort((h, _) => _.length - h.length), o = await Ro(new Uint8Array(t)), i = Object.entries(o), c = await Promise.all(i.map(async ([h, _]) => [h, await yo({ content: _, filename: h, sensitiveValues: n })])), l = Object.fromEntries(c);
8250
- return To(l);
8380
+ const n = [...r].sort((h, g) => g.length - h.length), i = await bo(new Uint8Array(t)), o = Object.entries(i), c = await Promise.all(o.map(async ([h, g]) => [h, await Uo({ content: g, filename: h, sensitiveValues: n })])), l = Object.fromEntries(c);
8381
+ return Co(l);
8251
8382
  }
8252
- s(wo, "scrubTrace");
8253
- async function yo({ content: e, filename: t, sensitiveValues: r }) {
8383
+ s(zt, "scrubTrace");
8384
+ async function Uo({ content: e, filename: t, sensitiveValues: r }) {
8254
8385
  const n = t.toLowerCase();
8255
- return n.endsWith(".trace") || n.endsWith(".network") ? So({ content: e, sensitiveValues: r }) : n.endsWith(".html") || n.endsWith(".dat") || n.endsWith(".json") ? ln({ content: e, sensitiveValues: r }) : n.startsWith("resources/") ? Ao({ content: e, sensitiveValues: r }) : e;
8256
- }
8257
- s(yo, "scrubFile");
8258
- async function Ao({ content: e, sensitiveValues: t }) {
8259
- return await ki.isBinaryFile(Buffer.from(e)) ? e : ln({ content: e, sensitiveValues: t });
8260
- }
8261
- s(Ao, "scrubResourceFile");
8262
- const fn = { AUTHENTICATION_FAILED: 1008 };
8263
- class vo {
8386
+ return n.endsWith(".trace") || n.endsWith(".network") ? vo({ content: e, sensitiveValues: r }) : n.endsWith(".html") || n.endsWith(".dat") || n.endsWith(".json") ? pn({ content: e, sensitiveValues: r }) : n.startsWith("resources/") ? Bo({ content: e, sensitiveValues: r }) : e;
8387
+ }
8388
+ s(Uo, "scrubFile");
8389
+ async function Bo({ content: e, sensitiveValues: t }) {
8390
+ return await Ki.isBinaryFile(Buffer.from(e)) ? e : pn({ content: e, sensitiveValues: t });
8391
+ }
8392
+ s(Bo, "scrubResourceFile");
8393
+ async function Oo({ sensitiveValues: e, tracePath: t }) {
8394
+ const r = [], n = node_fs.createReadStream(t);
8395
+ for await (const o of n) r.push(Uint8Array.from(o));
8396
+ const i = new Uint8Array(Buffer.concat(r));
8397
+ return zt({ sensitiveValues: e, traceBuffer: i });
8398
+ }
8399
+ s(Oo, "scrubTraceFromPath");
8400
+ async function Lo({ sensitiveValues: e, traceFd: t, tracePath: r }) {
8401
+ const n = [], i = node_fs.createReadStream(r, { autoClose: true, fd: t });
8402
+ for await (const c of i) n.push(Uint8Array.from(c));
8403
+ const o = new Uint8Array(Buffer.concat(n));
8404
+ return zt({ sensitiveValues: e, traceBuffer: o });
8405
+ }
8406
+ s(Lo, "scrubTraceFromFd");
8407
+ const mn = { AUTHENTICATION_FAILED: 1008 };
8408
+ class Po {
8264
8409
  static {
8265
8410
  s(this, "WebSocketClient");
8266
8411
  }
@@ -8279,8 +8424,8 @@ class vo {
8279
8424
  isManualClose = false;
8280
8425
  isAuthenticated = false;
8281
8426
  authenticationFailed = false;
8282
- constructor({ apiKey: t, maxBufferSize: r = 1e3, maxReconnectAttempts: n = 3, onError: o, onMessage: i, projectId: c, reconnectDelay: l = 2e3, url: h }) {
8283
- this.url = h, this.apiKey = t, this.projectId = c, this.maxBufferSize = r, this.reconnectDelay = l, this.maxReconnectAttempts = n, this.onMessage = i, this.onError = o, this.connect();
8427
+ constructor({ apiKey: t, maxBufferSize: r = 1e3, maxReconnectAttempts: n = 3, onError: i, onMessage: o, projectId: c, reconnectDelay: l = 2e3, url: h }) {
8428
+ this.url = h, this.apiKey = t, this.projectId = c, this.maxBufferSize = r, this.reconnectDelay = l, this.maxReconnectAttempts = n, this.onMessage = o, this.onError = i, this.connect();
8284
8429
  }
8285
8430
  connect() {
8286
8431
  try {
@@ -8289,12 +8434,12 @@ class vo {
8289
8434
  this.reconnectAttempts = 0;
8290
8435
  }), this.socket.on("message", (r) => {
8291
8436
  try {
8292
- const n = typeof r == "string" ? r : r.toString(), o = JSON.parse(n);
8293
- o.type === "connected" ? (this.isAuthenticated = true, this.authenticationFailed = false, this.flushBuffer()) : this.onMessage && this.onMessage(o);
8437
+ const n = typeof r == "string" ? r : r.toString(), i = JSON.parse(n);
8438
+ i.type === "connected" ? (this.isAuthenticated = true, this.authenticationFailed = false, this.flushBuffer()) : this.onMessage && this.onMessage(i);
8294
8439
  } catch {
8295
8440
  }
8296
8441
  }), this.socket.on("close", (r, n) => {
8297
- this.isAuthenticated = false, r === fn.AUTHENTICATION_FAILED && (this.authenticationFailed = true, this.onError && this.onError({ code: r, message: n.toString() || "Authentication failed", reason: n.toString() })), !this.isManualClose && !this.authenticationFailed && this.reconnectAttempts < this.maxReconnectAttempts && this.scheduleReconnect();
8442
+ this.isAuthenticated = false, r === mn.AUTHENTICATION_FAILED && (this.authenticationFailed = true, this.onError && this.onError({ code: r, message: n.toString() || "Authentication failed", reason: n.toString() })), !this.isManualClose && !this.authenticationFailed && this.reconnectAttempts < this.maxReconnectAttempts && this.scheduleReconnect();
8298
8443
  }), this.socket.on("error", () => {
8299
8444
  });
8300
8445
  } catch {
@@ -8312,8 +8457,8 @@ class vo {
8312
8457
  this.buffer = [];
8313
8458
  for (const r of t) try {
8314
8459
  const n = JSON.stringify(r);
8315
- this.socket.send(n, (o) => {
8316
- o && this.bufferEvent(r);
8460
+ this.socket.send(n, (i) => {
8461
+ i && this.bufferEvent(r);
8317
8462
  });
8318
8463
  } catch {
8319
8464
  this.bufferEvent(r);
@@ -8349,268 +8494,268 @@ class vo {
8349
8494
  return [...this.buffer];
8350
8495
  }
8351
8496
  }
8352
- var bo = { detect({ env: e }) {
8497
+ var No = { detect({ env: e }) {
8353
8498
  return !!e.APPVEYOR;
8354
8499
  }, configuration({ env: e }) {
8355
8500
  const t = e.APPVEYOR_PULL_REQUEST_NUMBER, r = !!t;
8356
8501
  return { name: "Appveyor", service: "appveyor", commit: e.APPVEYOR_REPO_COMMIT, tag: e.APPVEYOR_REPO_TAG_NAME, build: e.APPVEYOR_BUILD_NUMBER, buildUrl: `https://ci.appveyor.com/project/${e.APPVEYOR_PROJECT_SLUG}/build/${e.APPVEYOR_BUILD_VERSION}`, branch: e.APPVEYOR_REPO_BRANCH, job: e.APPVEYOR_JOB_NUMBER, jobUrl: `https://ci.appveyor.com/project/${e.APPVEYOR_PROJECT_SLUG}/build/job/${e.APPVEYOR_JOB_ID}`, pr: t, isPr: r, prBranch: e.APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH, slug: e.APPVEYOR_REPO_NAME, root: e.APPVEYOR_BUILD_FOLDER };
8357
8502
  } };
8358
- function hn(e) {
8503
+ function En(e) {
8359
8504
  return (/\d+(?!.*\d+)/.exec(e) || [])[0];
8360
8505
  }
8361
- s(hn, "prNumber");
8506
+ s(En, "prNumber");
8362
8507
  function ot(e) {
8363
8508
  return e ? /^(?:refs\/heads\/)?(?<branch>.+)$/i.exec(e)[1] : void 0;
8364
8509
  }
8365
8510
  s(ot, "parseBranch");
8366
- var Co = { detect({ env: e }) {
8511
+ var Do = { detect({ env: e }) {
8367
8512
  return !!e.BUILD_BUILDURI;
8368
8513
  }, configuration({ env: e }) {
8369
8514
  const t = e.SYSTEM_PULLREQUEST_PULLREQUESTID, r = !!t;
8370
8515
  return { name: "Azure Pipelines", service: "azurePipelines", commit: e.BUILD_SOURCEVERSION, build: e.BUILD_BUILDNUMBER, branch: ot(r ? e.SYSTEM_PULLREQUEST_TARGETBRANCH : e.BUILD_SOURCEBRANCH), pr: t, isPr: r, prBranch: ot(r ? e.SYSTEM_PULLREQUEST_SOURCEBRANCH : void 0), root: e.BUILD_REPOSITORY_LOCALPATH };
8371
- } }, Uo = { detect({ env: e }) {
8516
+ } }, Mo = { detect({ env: e }) {
8372
8517
  return !!e.bamboo_agentId;
8373
8518
  }, configuration({ env: e }) {
8374
8519
  return { name: "Bamboo", service: "bamboo", commit: e.bamboo_planRepository_1_revision, build: e.bamboo_buildNumber, buildUrl: e.bamboo_buildResultsUrl, branch: e.bamboo_planRepository_1_branchName, job: e.bamboo_buildKey, root: e.bamboo_build_working_directory };
8375
- } }, Bo = { detect({ env: e }) {
8520
+ } }, xo = { detect({ env: e }) {
8376
8521
  return !!e.BITBUCKET_BUILD_NUMBER;
8377
8522
  }, configuration({ env: e }) {
8378
8523
  return { name: "Bitbucket Pipelines", service: "bitbucket", commit: e.BITBUCKET_COMMIT, tag: e.BITBUCKET_TAG, build: e.BITBUCKET_BUILD_NUMBER, buildUrl: `https://bitbucket.org/${e.BITBUCKET_REPO_FULL_NAME}/addon/pipelines/home#!/results/${e.BITBUCKET_BUILD_NUMBER}`, branch: e.BITBUCKET_BRANCH, slug: e.BITBUCKET_REPO_FULL_NAME, root: e.BITBUCKET_CLONE_DIR };
8379
- } }, Oo = { detect({ env: e }) {
8524
+ } }, Go = { detect({ env: e }) {
8380
8525
  return !!e.BITRISE_IO;
8381
8526
  }, configuration({ env: e }) {
8382
8527
  const t = e.BITRISE_PULL_REQUEST === "false" ? void 0 : e.BITRISE_PULL_REQUEST, r = !!t;
8383
8528
  return { name: "Bitrise", service: "bitrise", commit: e.BITRISE_GIT_COMMIT, tag: e.BITRISE_GIT_TAG, build: e.BITRISE_BUILD_NUMBER, buildUrl: e.BITRISE_BUILD_URL, branch: r ? e.BITRISEIO_GIT_BRANCH_DEST : e.BITRISE_GIT_BRANCH, pr: t, isPr: r, prBranch: r ? e.BITRISE_GIT_BRANCH : void 0, slug: e.BITRISE_APP_SLUG };
8384
- } }, Lo = { detect({ env: e }) {
8529
+ } }, $o = { detect({ env: e }) {
8385
8530
  return !!e.BUDDY_WORKSPACE_ID;
8386
8531
  }, configuration({ env: e }) {
8387
- const t = hn(e.BUDDY_EXECUTION_PULL_REQUEST_ID), r = !!t;
8532
+ const t = En(e.BUDDY_EXECUTION_PULL_REQUEST_ID), r = !!t;
8388
8533
  return { name: "Buddy", service: "buddy", commit: e.BUDDY_EXECUTION_REVISION, tag: e.BUDDY_EXECUTION_TAG, build: e.BUDDY_EXECUTION_ID, buildUrl: e.BUDDY_EXECUTION_URL, branch: r ? e.BUDDY_EXECUTION_PULL_REQUEST_HEAD_BRANCH : e.BUDDY_EXECUTION_BRANCH, pr: t, isPr: r, slug: e.BUDDY_REPO_SLUG };
8389
- } }, ke = { exports: {} }, zt, dn;
8390
- function Po() {
8391
- if (dn) return zt;
8392
- dn = 1, zt = n, n.sync = o;
8534
+ } }, ke = { exports: {} }, Jt, _n;
8535
+ function ko() {
8536
+ if (_n) return Jt;
8537
+ _n = 1, Jt = n, n.sync = i;
8393
8538
  var e = ze;
8394
- function t(i, c) {
8539
+ function t(o, c) {
8395
8540
  var l = c.pathExt !== void 0 ? c.pathExt : process.env.PATHEXT;
8396
8541
  if (!l || (l = l.split(";"), l.indexOf("") !== -1)) return true;
8397
8542
  for (var h = 0; h < l.length; h++) {
8398
- var _ = l[h].toLowerCase();
8399
- if (_ && i.substr(-_.length).toLowerCase() === _) return true;
8543
+ var g = l[h].toLowerCase();
8544
+ if (g && o.substr(-g.length).toLowerCase() === g) return true;
8400
8545
  }
8401
8546
  return false;
8402
8547
  }
8403
8548
  s(t, "checkPathExt");
8404
- function r(i, c, l) {
8405
- return !i.isSymbolicLink() && !i.isFile() ? false : t(c, l);
8549
+ function r(o, c, l) {
8550
+ return !o.isSymbolicLink() && !o.isFile() ? false : t(c, l);
8406
8551
  }
8407
8552
  s(r, "checkStat");
8408
- function n(i, c, l) {
8409
- e.stat(i, function(h, _) {
8410
- l(h, h ? false : r(_, i, c));
8553
+ function n(o, c, l) {
8554
+ e.stat(o, function(h, g) {
8555
+ l(h, h ? false : r(g, o, c));
8411
8556
  });
8412
8557
  }
8413
8558
  s(n, "isexe");
8414
- function o(i, c) {
8415
- return r(e.statSync(i), i, c);
8559
+ function i(o, c) {
8560
+ return r(e.statSync(o), o, c);
8416
8561
  }
8417
- return s(o, "sync"), zt;
8562
+ return s(i, "sync"), Jt;
8418
8563
  }
8419
- s(Po, "requireWindows");
8420
- var Jt, pn;
8421
- function No() {
8422
- if (pn) return Jt;
8423
- pn = 1, Jt = t, t.sync = r;
8564
+ s(ko, "requireWindows");
8565
+ var Qt, gn;
8566
+ function Ho() {
8567
+ if (gn) return Qt;
8568
+ gn = 1, Qt = t, t.sync = r;
8424
8569
  var e = ze;
8425
- function t(i, c, l) {
8426
- e.stat(i, function(h, _) {
8427
- l(h, h ? false : n(_, c));
8570
+ function t(o, c, l) {
8571
+ e.stat(o, function(h, g) {
8572
+ l(h, h ? false : n(g, c));
8428
8573
  });
8429
8574
  }
8430
8575
  s(t, "isexe");
8431
- function r(i, c) {
8432
- return n(e.statSync(i), c);
8576
+ function r(o, c) {
8577
+ return n(e.statSync(o), c);
8433
8578
  }
8434
8579
  s(r, "sync");
8435
- function n(i, c) {
8436
- return i.isFile() && o(i, c);
8580
+ function n(o, c) {
8581
+ return o.isFile() && i(o, c);
8437
8582
  }
8438
8583
  s(n, "checkStat");
8439
- function o(i, c) {
8440
- var l = i.mode, h = i.uid, _ = i.gid, m = c.uid !== void 0 ? c.uid : process.getuid && process.getuid(), A = c.gid !== void 0 ? c.gid : process.getgid && process.getgid(), b = parseInt("100", 8), O = parseInt("010", 8), x = parseInt("001", 8), M = b | O, y = l & x || l & O && _ === A || l & b && h === m || l & M && m === 0;
8441
- return y;
8584
+ function i(o, c) {
8585
+ var l = o.mode, h = o.uid, g = o.gid, m = c.uid !== void 0 ? c.uid : process.getuid && process.getuid(), A = c.gid !== void 0 ? c.gid : process.getgid && process.getgid(), b = parseInt("100", 8), O = parseInt("010", 8), x = parseInt("001", 8), M = b | O, w = l & x || l & O && g === A || l & b && h === m || l & M && m === 0;
8586
+ return w;
8442
8587
  }
8443
- return s(o, "checkMode"), Jt;
8588
+ return s(i, "checkMode"), Qt;
8444
8589
  }
8445
- s(No, "requireMode");
8446
- var Qt, mn;
8447
- function Do() {
8448
- if (mn) return Qt;
8449
- mn = 1;
8590
+ s(Ho, "requireMode");
8591
+ var Xt, In;
8592
+ function Fo() {
8593
+ if (In) return Xt;
8594
+ In = 1;
8450
8595
  var e;
8451
- process.platform === "win32" || Gi.TESTING_WINDOWS ? e = Po() : e = No(), Qt = t, t.sync = r;
8452
- function t(n, o, i) {
8453
- if (typeof o == "function" && (i = o, o = {}), !i) {
8596
+ process.platform === "win32" || qi.TESTING_WINDOWS ? e = ko() : e = Ho(), Xt = t, t.sync = r;
8597
+ function t(n, i, o) {
8598
+ if (typeof i == "function" && (o = i, i = {}), !o) {
8454
8599
  if (typeof Promise != "function") throw new TypeError("callback not provided");
8455
8600
  return new Promise(function(c, l) {
8456
- t(n, o || {}, function(h, _) {
8457
- h ? l(h) : c(_);
8601
+ t(n, i || {}, function(h, g) {
8602
+ h ? l(h) : c(g);
8458
8603
  });
8459
8604
  });
8460
8605
  }
8461
- e(n, o || {}, function(c, l) {
8462
- c && (c.code === "EACCES" || o && o.ignoreErrors) && (c = null, l = false), i(c, l);
8606
+ e(n, i || {}, function(c, l) {
8607
+ c && (c.code === "EACCES" || i && i.ignoreErrors) && (c = null, l = false), o(c, l);
8463
8608
  });
8464
8609
  }
8465
8610
  s(t, "isexe");
8466
- function r(n, o) {
8611
+ function r(n, i) {
8467
8612
  try {
8468
- return e.sync(n, o || {});
8469
- } catch (i) {
8470
- if (o && o.ignoreErrors || i.code === "EACCES") return false;
8471
- throw i;
8613
+ return e.sync(n, i || {});
8614
+ } catch (o) {
8615
+ if (i && i.ignoreErrors || o.code === "EACCES") return false;
8616
+ throw o;
8472
8617
  }
8473
8618
  }
8474
- return s(r, "sync"), Qt;
8619
+ return s(r, "sync"), Xt;
8475
8620
  }
8476
- s(Do, "requireIsexe");
8477
- var Xt, En;
8478
- function Mo() {
8479
- if (En) return Xt;
8480
- En = 1;
8481
- const e = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", t = require$$0$1, r = e ? ";" : ":", n = Do(), o = s((h) => Object.assign(new Error(`not found: ${h}`), { code: "ENOENT" }), "getNotFoundError"), i = s((h, _) => {
8482
- const m = _.colon || r, A = h.match(/\//) || e && h.match(/\\/) ? [""] : [...e ? [process.cwd()] : [], ...(_.path || process.env.PATH || "").split(m)], b = e ? _.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", O = e ? b.split(m) : [""];
8621
+ s(Fo, "requireIsexe");
8622
+ var Zt, Sn;
8623
+ function jo() {
8624
+ if (Sn) return Zt;
8625
+ Sn = 1;
8626
+ const e = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", t = require$$0$1, r = e ? ";" : ":", n = Fo(), i = s((h) => Object.assign(new Error(`not found: ${h}`), { code: "ENOENT" }), "getNotFoundError"), o = s((h, g) => {
8627
+ const m = g.colon || r, A = h.match(/\//) || e && h.match(/\\/) ? [""] : [...e ? [process.cwd()] : [], ...(g.path || process.env.PATH || "").split(m)], b = e ? g.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", O = e ? b.split(m) : [""];
8483
8628
  return e && h.indexOf(".") !== -1 && O[0] !== "" && O.unshift(""), { pathEnv: A, pathExt: O, pathExtExe: b };
8484
- }, "getPathInfo"), c = s((h, _, m) => {
8485
- typeof _ == "function" && (m = _, _ = {}), _ || (_ = {});
8486
- const { pathEnv: A, pathExt: b, pathExtExe: O } = i(h, _), x = [], M = s((C) => new Promise((w, B) => {
8487
- if (C === A.length) return _.all && x.length ? w(x) : B(o(h));
8629
+ }, "getPathInfo"), c = s((h, g, m) => {
8630
+ typeof g == "function" && (m = g, g = {}), g || (g = {});
8631
+ const { pathEnv: A, pathExt: b, pathExtExe: O } = o(h, g), x = [], M = s((C) => new Promise((y, B) => {
8632
+ if (C === A.length) return g.all && x.length ? y(x) : B(i(h));
8488
8633
  const L = A[C], U = /^".*"$/.test(L) ? L.slice(1, -1) : L, G = t.join(U, h), k = !U && /^\.[\\\/]/.test(h) ? h.slice(0, 2) + G : G;
8489
- w(y(k, C, 0));
8490
- }), "step"), y = s((C, w, B) => new Promise((L, U) => {
8491
- if (B === b.length) return L(M(w + 1));
8634
+ y(w(k, C, 0));
8635
+ }), "step"), w = s((C, y, B) => new Promise((L, U) => {
8636
+ if (B === b.length) return L(M(y + 1));
8492
8637
  const G = b[B];
8493
8638
  n(C + G, { pathExt: O }, (k, a) => {
8494
- if (!k && a) if (_.all) x.push(C + G);
8639
+ if (!k && a) if (g.all) x.push(C + G);
8495
8640
  else return L(C + G);
8496
- return L(y(C, w, B + 1));
8641
+ return L(w(C, y, B + 1));
8497
8642
  });
8498
8643
  }), "subStep");
8499
8644
  return m ? M(0).then((C) => m(null, C), m) : M(0);
8500
- }, "which"), l = s((h, _) => {
8501
- _ = _ || {};
8502
- const { pathEnv: m, pathExt: A, pathExtExe: b } = i(h, _), O = [];
8645
+ }, "which"), l = s((h, g) => {
8646
+ g = g || {};
8647
+ const { pathEnv: m, pathExt: A, pathExtExe: b } = o(h, g), O = [];
8503
8648
  for (let x = 0; x < m.length; x++) {
8504
- const M = m[x], y = /^".*"$/.test(M) ? M.slice(1, -1) : M, C = t.join(y, h), w = !y && /^\.[\\\/]/.test(h) ? h.slice(0, 2) + C : C;
8649
+ const M = m[x], w = /^".*"$/.test(M) ? M.slice(1, -1) : M, C = t.join(w, h), y = !w && /^\.[\\\/]/.test(h) ? h.slice(0, 2) + C : C;
8505
8650
  for (let B = 0; B < A.length; B++) {
8506
- const L = w + A[B];
8651
+ const L = y + A[B];
8507
8652
  try {
8508
- if (n.sync(L, { pathExt: b })) if (_.all) O.push(L);
8653
+ if (n.sync(L, { pathExt: b })) if (g.all) O.push(L);
8509
8654
  else return L;
8510
8655
  } catch {
8511
8656
  }
8512
8657
  }
8513
8658
  }
8514
- if (_.all && O.length) return O;
8515
- if (_.nothrow) return null;
8516
- throw o(h);
8659
+ if (g.all && O.length) return O;
8660
+ if (g.nothrow) return null;
8661
+ throw i(h);
8517
8662
  }, "whichSync");
8518
- return Xt = c, c.sync = l, Xt;
8663
+ return Zt = c, c.sync = l, Zt;
8519
8664
  }
8520
- s(Mo, "requireWhich");
8521
- var St = { exports: {} }, _n;
8522
- function xo() {
8523
- if (_n) return St.exports;
8524
- _n = 1;
8665
+ s(jo, "requireWhich");
8666
+ var St = { exports: {} }, Rn;
8667
+ function qo() {
8668
+ if (Rn) return St.exports;
8669
+ Rn = 1;
8525
8670
  const e = s((t = {}) => {
8526
8671
  const r = t.env || process.env;
8527
- return (t.platform || process.platform) !== "win32" ? "PATH" : Object.keys(r).reverse().find((o) => o.toUpperCase() === "PATH") || "Path";
8672
+ return (t.platform || process.platform) !== "win32" ? "PATH" : Object.keys(r).reverse().find((i) => i.toUpperCase() === "PATH") || "Path";
8528
8673
  }, "pathKey");
8529
8674
  return St.exports = e, St.exports.default = e, St.exports;
8530
8675
  }
8531
- s(xo, "requirePathKey");
8532
- var Zt, gn;
8533
- function Go() {
8534
- if (gn) return Zt;
8535
- gn = 1;
8536
- const e = require$$0$1, t = Mo(), r = xo();
8537
- function n(i, c) {
8538
- const l = i.options.env || process.env, h = process.cwd(), _ = i.options.cwd != null, m = _ && process.chdir !== void 0 && !process.chdir.disabled;
8676
+ s(qo, "requirePathKey");
8677
+ var er, Tn;
8678
+ function Wo() {
8679
+ if (Tn) return er;
8680
+ Tn = 1;
8681
+ const e = require$$0$1, t = jo(), r = qo();
8682
+ function n(o, c) {
8683
+ const l = o.options.env || process.env, h = process.cwd(), g = o.options.cwd != null, m = g && process.chdir !== void 0 && !process.chdir.disabled;
8539
8684
  if (m) try {
8540
- process.chdir(i.options.cwd);
8685
+ process.chdir(o.options.cwd);
8541
8686
  } catch {
8542
8687
  }
8543
8688
  let A;
8544
8689
  try {
8545
- A = t.sync(i.command, { path: l[r({ env: l })], pathExt: c ? e.delimiter : void 0 });
8690
+ A = t.sync(o.command, { path: l[r({ env: l })], pathExt: c ? e.delimiter : void 0 });
8546
8691
  } catch {
8547
8692
  } finally {
8548
8693
  m && process.chdir(h);
8549
8694
  }
8550
- return A && (A = e.resolve(_ ? i.options.cwd : "", A)), A;
8695
+ return A && (A = e.resolve(g ? o.options.cwd : "", A)), A;
8551
8696
  }
8552
8697
  s(n, "resolveCommandAttempt");
8553
- function o(i) {
8554
- return n(i) || n(i, true);
8698
+ function i(o) {
8699
+ return n(o) || n(o, true);
8555
8700
  }
8556
- return s(o, "resolveCommand"), Zt = o, Zt;
8701
+ return s(i, "resolveCommand"), er = i, er;
8557
8702
  }
8558
- s(Go, "requireResolveCommand");
8559
- var Rt = {}, In;
8560
- function $o() {
8561
- if (In) return Rt;
8562
- In = 1;
8703
+ s(Wo, "requireResolveCommand");
8704
+ var Rt = {}, yn;
8705
+ function Ko() {
8706
+ if (yn) return Rt;
8707
+ yn = 1;
8563
8708
  const e = /([()\][%!^"`<>&|;, *?])/g;
8564
8709
  function t(n) {
8565
8710
  return n = n.replace(e, "^$1"), n;
8566
8711
  }
8567
8712
  s(t, "escapeCommand");
8568
- function r(n, o) {
8569
- return n = `${n}`, n = n.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"'), n = n.replace(/(?=(\\+?)?)\1$/, "$1$1"), n = `"${n}"`, n = n.replace(e, "^$1"), o && (n = n.replace(e, "^$1")), n;
8713
+ function r(n, i) {
8714
+ return n = `${n}`, n = n.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"'), n = n.replace(/(?=(\\+?)?)\1$/, "$1$1"), n = `"${n}"`, n = n.replace(e, "^$1"), i && (n = n.replace(e, "^$1")), n;
8570
8715
  }
8571
8716
  return s(r, "escapeArgument"), Rt.command = t, Rt.argument = r, Rt;
8572
8717
  }
8573
- s($o, "require_escape");
8574
- var er, Sn;
8575
- function ko() {
8576
- return Sn || (Sn = 1, er = /^#!(.*)/), er;
8718
+ s(Ko, "require_escape");
8719
+ var tr, wn;
8720
+ function Vo() {
8721
+ return wn || (wn = 1, tr = /^#!(.*)/), tr;
8577
8722
  }
8578
- s(ko, "requireShebangRegex");
8579
- var tr, Rn;
8580
- function Ho() {
8581
- if (Rn) return tr;
8582
- Rn = 1;
8583
- const e = ko();
8584
- return tr = s((t = "") => {
8723
+ s(Vo, "requireShebangRegex");
8724
+ var rr, An;
8725
+ function Yo() {
8726
+ if (An) return rr;
8727
+ An = 1;
8728
+ const e = Vo();
8729
+ return rr = s((t = "") => {
8585
8730
  const r = t.match(e);
8586
8731
  if (!r) return null;
8587
- const [n, o] = r[0].replace(/#! ?/, "").split(" "), i = n.split("/").pop();
8588
- return i === "env" ? o : o ? `${i} ${o}` : i;
8589
- }, "shebangCommand"), tr;
8590
- }
8591
- s(Ho, "requireShebangCommand");
8592
- var rr, Tn;
8593
- function Fo() {
8594
- if (Tn) return rr;
8595
- Tn = 1;
8596
- const e = ze, t = Ho();
8732
+ const [n, i] = r[0].replace(/#! ?/, "").split(" "), o = n.split("/").pop();
8733
+ return o === "env" ? i : i ? `${o} ${i}` : o;
8734
+ }, "shebangCommand"), rr;
8735
+ }
8736
+ s(Yo, "requireShebangCommand");
8737
+ var nr, vn;
8738
+ function zo() {
8739
+ if (vn) return nr;
8740
+ vn = 1;
8741
+ const e = ze, t = Yo();
8597
8742
  function r(n) {
8598
- const i = Buffer.alloc(150);
8743
+ const o = Buffer.alloc(150);
8599
8744
  let c;
8600
8745
  try {
8601
- c = e.openSync(n, "r"), e.readSync(c, i, 0, 150, 0), e.closeSync(c);
8746
+ c = e.openSync(n, "r"), e.readSync(c, o, 0, 150, 0), e.closeSync(c);
8602
8747
  } catch {
8603
8748
  }
8604
- return t(i.toString());
8749
+ return t(o.toString());
8605
8750
  }
8606
- return s(r, "readShebang"), rr = r, rr;
8751
+ return s(r, "readShebang"), nr = r, nr;
8607
8752
  }
8608
- s(Fo, "requireReadShebang");
8609
- var nr, wn;
8610
- function jo() {
8611
- if (wn) return nr;
8612
- wn = 1;
8613
- const e = require$$0$1, t = Go(), r = $o(), n = Fo(), o = process.platform === "win32", i = /\.(?:com|exe)$/i, c = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
8753
+ s(zo, "requireReadShebang");
8754
+ var ir, bn;
8755
+ function Jo() {
8756
+ if (bn) return ir;
8757
+ bn = 1;
8758
+ const e = require$$0$1, t = Wo(), r = Ko(), n = zo(), i = process.platform === "win32", o = /\.(?:com|exe)$/i, c = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
8614
8759
  function l(m) {
8615
8760
  m.file = t(m);
8616
8761
  const A = m.file && n(m.file);
@@ -8618,8 +8763,8 @@ function jo() {
8618
8763
  }
8619
8764
  s(l, "detectShebang");
8620
8765
  function h(m) {
8621
- if (!o) return m;
8622
- const A = l(m), b = !i.test(A);
8766
+ if (!i) return m;
8767
+ const A = l(m), b = !o.test(A);
8623
8768
  if (m.options.forceShell || b) {
8624
8769
  const O = c.test(A);
8625
8770
  m.command = e.normalize(m.command), m.command = r.command(m.command), m.args = m.args.map((M) => r.argument(M, O));
@@ -8629,131 +8774,131 @@ function jo() {
8629
8774
  return m;
8630
8775
  }
8631
8776
  s(h, "parseNonShell");
8632
- function _(m, A, b) {
8777
+ function g(m, A, b) {
8633
8778
  A && !Array.isArray(A) && (b = A, A = null), A = A ? A.slice(0) : [], b = Object.assign({}, b);
8634
8779
  const O = { command: m, args: A, options: b, file: void 0, original: { command: m, args: A } };
8635
8780
  return b.shell ? O : h(O);
8636
8781
  }
8637
- return s(_, "parse"), nr = _, nr;
8782
+ return s(g, "parse"), ir = g, ir;
8638
8783
  }
8639
- s(jo, "requireParse");
8640
- var ir, yn;
8641
- function qo() {
8642
- if (yn) return ir;
8643
- yn = 1;
8784
+ s(Jo, "requireParse");
8785
+ var or, Cn;
8786
+ function Qo() {
8787
+ if (Cn) return or;
8788
+ Cn = 1;
8644
8789
  const e = process.platform === "win32";
8645
- function t(i, c) {
8646
- return Object.assign(new Error(`${c} ${i.command} ENOENT`), { code: "ENOENT", errno: "ENOENT", syscall: `${c} ${i.command}`, path: i.command, spawnargs: i.args });
8790
+ function t(o, c) {
8791
+ return Object.assign(new Error(`${c} ${o.command} ENOENT`), { code: "ENOENT", errno: "ENOENT", syscall: `${c} ${o.command}`, path: o.command, spawnargs: o.args });
8647
8792
  }
8648
8793
  s(t, "notFoundError");
8649
- function r(i, c) {
8794
+ function r(o, c) {
8650
8795
  if (!e) return;
8651
- const l = i.emit;
8652
- i.emit = function(h, _) {
8796
+ const l = o.emit;
8797
+ o.emit = function(h, g) {
8653
8798
  if (h === "exit") {
8654
- const m = n(_, c);
8655
- if (m) return l.call(i, "error", m);
8799
+ const m = n(g, c);
8800
+ if (m) return l.call(o, "error", m);
8656
8801
  }
8657
- return l.apply(i, arguments);
8802
+ return l.apply(o, arguments);
8658
8803
  };
8659
8804
  }
8660
8805
  s(r, "hookChildProcess");
8661
- function n(i, c) {
8662
- return e && i === 1 && !c.file ? t(c.original, "spawn") : null;
8806
+ function n(o, c) {
8807
+ return e && o === 1 && !c.file ? t(c.original, "spawn") : null;
8663
8808
  }
8664
8809
  s(n, "verifyENOENT");
8665
- function o(i, c) {
8666
- return e && i === 1 && !c.file ? t(c.original, "spawnSync") : null;
8810
+ function i(o, c) {
8811
+ return e && o === 1 && !c.file ? t(c.original, "spawnSync") : null;
8667
8812
  }
8668
- return s(o, "verifyENOENTSync"), ir = { hookChildProcess: r, verifyENOENT: n, verifyENOENTSync: o, notFoundError: t }, ir;
8813
+ return s(i, "verifyENOENTSync"), or = { hookChildProcess: r, verifyENOENT: n, verifyENOENTSync: i, notFoundError: t }, or;
8669
8814
  }
8670
- s(qo, "requireEnoent");
8671
- var An;
8672
- function Wo() {
8673
- if (An) return ke.exports;
8674
- An = 1;
8675
- const e = require$$0$2, t = jo(), r = qo();
8676
- function n(i, c, l) {
8677
- const h = t(i, c, l), _ = e.spawn(h.command, h.args, h.options);
8678
- return r.hookChildProcess(_, h), _;
8815
+ s(Qo, "requireEnoent");
8816
+ var Un;
8817
+ function Xo() {
8818
+ if (Un) return ke.exports;
8819
+ Un = 1;
8820
+ const e = require$$0$2, t = Jo(), r = Qo();
8821
+ function n(o, c, l) {
8822
+ const h = t(o, c, l), g = e.spawn(h.command, h.args, h.options);
8823
+ return r.hookChildProcess(g, h), g;
8679
8824
  }
8680
8825
  s(n, "spawn");
8681
- function o(i, c, l) {
8682
- const h = t(i, c, l), _ = e.spawnSync(h.command, h.args, h.options);
8683
- return _.error = _.error || r.verifyENOENTSync(_.status, h), _;
8826
+ function i(o, c, l) {
8827
+ const h = t(o, c, l), g = e.spawnSync(h.command, h.args, h.options);
8828
+ return g.error = g.error || r.verifyENOENTSync(g.status, h), g;
8684
8829
  }
8685
- return s(o, "spawnSync"), ke.exports = n, ke.exports.spawn = n, ke.exports.sync = o, ke.exports._parse = t, ke.exports._enoent = r, ke.exports;
8830
+ return s(i, "spawnSync"), ke.exports = n, ke.exports.spawn = n, ke.exports.sync = i, ke.exports._parse = t, ke.exports._enoent = r, ke.exports;
8686
8831
  }
8687
- s(Wo, "requireCrossSpawn");
8688
- var Ko = Wo(), Vo = xr(Ko);
8689
- function Yo(e) {
8832
+ s(Xo, "requireCrossSpawn");
8833
+ var Zo = Xo(), es = kr(Zo);
8834
+ function ts(e) {
8690
8835
  const t = typeof e == "string" ? `
8691
8836
  ` : 10, r = typeof e == "string" ? "\r" : 13;
8692
8837
  return e[e.length - 1] === t && (e = e.slice(0, -1)), e[e.length - 1] === r && (e = e.slice(0, -1)), e;
8693
8838
  }
8694
- s(Yo, "stripFinalNewline");
8695
- function vn(e = {}) {
8839
+ s(ts, "stripFinalNewline");
8840
+ function Bn(e = {}) {
8696
8841
  const { env: t = process.env, platform: r = process.platform } = e;
8697
8842
  return r !== "win32" ? "PATH" : Object.keys(t).reverse().find((n) => n.toUpperCase() === "PATH") || "Path";
8698
8843
  }
8699
- s(vn, "pathKey");
8700
- const zo = s(({ cwd: e = y.cwd(), path: t = y.env[vn()], preferLocal: r = true, execPath: n = y.execPath, addExecPath: o = true } = {}) => {
8701
- const i = e instanceof URL ? node_url.fileURLToPath(e) : e, c = path.resolve(i), l = [];
8702
- return r && Jo(l, c), o && Qo(l, n, c), [...l, t].join(path.delimiter);
8703
- }, "npmRunPath"), Jo = s((e, t) => {
8844
+ s(Bn, "pathKey");
8845
+ const rs = s(({ cwd: e = y.cwd(), path: t = y.env[Bn()], preferLocal: r = true, execPath: n = y.execPath, addExecPath: i = true } = {}) => {
8846
+ const o = e instanceof URL ? node_url.fileURLToPath(e) : e, c = path.resolve(o), l = [];
8847
+ return r && ns(l, c), i && is(l, n, c), [...l, t].join(path.delimiter);
8848
+ }, "npmRunPath"), ns = s((e, t) => {
8704
8849
  let r;
8705
8850
  for (; r !== t; ) e.push(path.join(t, "node_modules/.bin")), r = t, t = path.resolve(t, "..");
8706
- }, "applyPreferLocal"), Qo = s((e, t, r) => {
8851
+ }, "applyPreferLocal"), is = s((e, t, r) => {
8707
8852
  const n = t instanceof URL ? node_url.fileURLToPath(t) : t;
8708
8853
  e.push(path.resolve(r, n, ".."));
8709
- }, "applyExecPath"), Xo = s(({ env: e = y.env, ...t } = {}) => {
8854
+ }, "applyExecPath"), os = s(({ env: e = y.env, ...t } = {}) => {
8710
8855
  e = { ...e };
8711
- const r = vn({ env: e });
8712
- return t.path = e[r], e[r] = zo(t), e;
8713
- }, "npmRunPathEnv"), Zo = s(() => {
8714
- const e = Cn - bn + 1;
8715
- return Array.from({ length: e }, es);
8716
- }, "getRealtimeSignals"), es = s((e, t) => ({ name: `SIGRT${t + 1}`, number: bn + t, action: "terminate", description: "Application-specific signal (realtime)", standard: "posix" }), "getRealtimeSignal"), bn = 34, Cn = 64, ts = [{ name: "SIGHUP", number: 1, action: "terminate", description: "Terminal closed", standard: "posix" }, { name: "SIGINT", number: 2, action: "terminate", description: "User interruption with CTRL-C", standard: "ansi" }, { name: "SIGQUIT", number: 3, action: "core", description: "User interruption with CTRL-\\", standard: "posix" }, { name: "SIGILL", number: 4, action: "core", description: "Invalid machine instruction", standard: "ansi" }, { name: "SIGTRAP", number: 5, action: "core", description: "Debugger breakpoint", standard: "posix" }, { name: "SIGABRT", number: 6, action: "core", description: "Aborted", standard: "ansi" }, { name: "SIGIOT", number: 6, action: "core", description: "Aborted", standard: "bsd" }, { name: "SIGBUS", number: 7, action: "core", description: "Bus error due to misaligned, non-existing address or paging error", standard: "bsd" }, { name: "SIGEMT", number: 7, action: "terminate", description: "Command should be emulated but is not implemented", standard: "other" }, { name: "SIGFPE", number: 8, action: "core", description: "Floating point arithmetic error", standard: "ansi" }, { name: "SIGKILL", number: 9, action: "terminate", description: "Forced termination", standard: "posix", forced: true }, { name: "SIGUSR1", number: 10, action: "terminate", description: "Application-specific signal", standard: "posix" }, { name: "SIGSEGV", number: 11, action: "core", description: "Segmentation fault", standard: "ansi" }, { name: "SIGUSR2", number: 12, action: "terminate", description: "Application-specific signal", standard: "posix" }, { name: "SIGPIPE", number: 13, action: "terminate", description: "Broken pipe or socket", standard: "posix" }, { name: "SIGALRM", number: 14, action: "terminate", description: "Timeout or timer", standard: "posix" }, { name: "SIGTERM", number: 15, action: "terminate", description: "Termination", standard: "ansi" }, { name: "SIGSTKFLT", number: 16, action: "terminate", description: "Stack is empty or overflowed", standard: "other" }, { name: "SIGCHLD", number: 17, action: "ignore", description: "Child process terminated, paused or unpaused", standard: "posix" }, { name: "SIGCLD", number: 17, action: "ignore", description: "Child process terminated, paused or unpaused", standard: "other" }, { name: "SIGCONT", number: 18, action: "unpause", description: "Unpaused", standard: "posix", forced: true }, { name: "SIGSTOP", number: 19, action: "pause", description: "Paused", standard: "posix", forced: true }, { name: "SIGTSTP", number: 20, action: "pause", description: 'Paused using CTRL-Z or "suspend"', standard: "posix" }, { name: "SIGTTIN", number: 21, action: "pause", description: "Background process cannot read terminal input", standard: "posix" }, { name: "SIGBREAK", number: 21, action: "terminate", description: "User interruption with CTRL-BREAK", standard: "other" }, { name: "SIGTTOU", number: 22, action: "pause", description: "Background process cannot write to terminal output", standard: "posix" }, { name: "SIGURG", number: 23, action: "ignore", description: "Socket received out-of-band data", standard: "bsd" }, { name: "SIGXCPU", number: 24, action: "core", description: "Process timed out", standard: "bsd" }, { name: "SIGXFSZ", number: 25, action: "core", description: "File too big", standard: "bsd" }, { name: "SIGVTALRM", number: 26, action: "terminate", description: "Timeout or timer", standard: "bsd" }, { name: "SIGPROF", number: 27, action: "terminate", description: "Timeout or timer", standard: "bsd" }, { name: "SIGWINCH", number: 28, action: "ignore", description: "Terminal window size changed", standard: "bsd" }, { name: "SIGIO", number: 29, action: "terminate", description: "I/O is available", standard: "other" }, { name: "SIGPOLL", number: 29, action: "terminate", description: "Watched event", standard: "other" }, { name: "SIGINFO", number: 29, action: "ignore", description: "Request for process information", standard: "other" }, { name: "SIGPWR", number: 30, action: "terminate", description: "Device running out of power", standard: "systemv" }, { name: "SIGSYS", number: 31, action: "core", description: "Invalid system call", standard: "other" }, { name: "SIGUNUSED", number: 31, action: "terminate", description: "Invalid system call", standard: "other" }], Un = s(() => {
8717
- const e = Zo();
8718
- return [...ts, ...e].map(rs);
8719
- }, "getSignals"), rs = s(({ name: e, number: t, description: r, action: n, forced: o = false, standard: i }) => {
8856
+ const r = Bn({ env: e });
8857
+ return t.path = e[r], e[r] = rs(t), e;
8858
+ }, "npmRunPathEnv"), ss = s(() => {
8859
+ const e = Ln - On + 1;
8860
+ return Array.from({ length: e }, as);
8861
+ }, "getRealtimeSignals"), as = s((e, t) => ({ name: `SIGRT${t + 1}`, number: On + t, action: "terminate", description: "Application-specific signal (realtime)", standard: "posix" }), "getRealtimeSignal"), On = 34, Ln = 64, cs = [{ name: "SIGHUP", number: 1, action: "terminate", description: "Terminal closed", standard: "posix" }, { name: "SIGINT", number: 2, action: "terminate", description: "User interruption with CTRL-C", standard: "ansi" }, { name: "SIGQUIT", number: 3, action: "core", description: "User interruption with CTRL-\\", standard: "posix" }, { name: "SIGILL", number: 4, action: "core", description: "Invalid machine instruction", standard: "ansi" }, { name: "SIGTRAP", number: 5, action: "core", description: "Debugger breakpoint", standard: "posix" }, { name: "SIGABRT", number: 6, action: "core", description: "Aborted", standard: "ansi" }, { name: "SIGIOT", number: 6, action: "core", description: "Aborted", standard: "bsd" }, { name: "SIGBUS", number: 7, action: "core", description: "Bus error due to misaligned, non-existing address or paging error", standard: "bsd" }, { name: "SIGEMT", number: 7, action: "terminate", description: "Command should be emulated but is not implemented", standard: "other" }, { name: "SIGFPE", number: 8, action: "core", description: "Floating point arithmetic error", standard: "ansi" }, { name: "SIGKILL", number: 9, action: "terminate", description: "Forced termination", standard: "posix", forced: true }, { name: "SIGUSR1", number: 10, action: "terminate", description: "Application-specific signal", standard: "posix" }, { name: "SIGSEGV", number: 11, action: "core", description: "Segmentation fault", standard: "ansi" }, { name: "SIGUSR2", number: 12, action: "terminate", description: "Application-specific signal", standard: "posix" }, { name: "SIGPIPE", number: 13, action: "terminate", description: "Broken pipe or socket", standard: "posix" }, { name: "SIGALRM", number: 14, action: "terminate", description: "Timeout or timer", standard: "posix" }, { name: "SIGTERM", number: 15, action: "terminate", description: "Termination", standard: "ansi" }, { name: "SIGSTKFLT", number: 16, action: "terminate", description: "Stack is empty or overflowed", standard: "other" }, { name: "SIGCHLD", number: 17, action: "ignore", description: "Child process terminated, paused or unpaused", standard: "posix" }, { name: "SIGCLD", number: 17, action: "ignore", description: "Child process terminated, paused or unpaused", standard: "other" }, { name: "SIGCONT", number: 18, action: "unpause", description: "Unpaused", standard: "posix", forced: true }, { name: "SIGSTOP", number: 19, action: "pause", description: "Paused", standard: "posix", forced: true }, { name: "SIGTSTP", number: 20, action: "pause", description: 'Paused using CTRL-Z or "suspend"', standard: "posix" }, { name: "SIGTTIN", number: 21, action: "pause", description: "Background process cannot read terminal input", standard: "posix" }, { name: "SIGBREAK", number: 21, action: "terminate", description: "User interruption with CTRL-BREAK", standard: "other" }, { name: "SIGTTOU", number: 22, action: "pause", description: "Background process cannot write to terminal output", standard: "posix" }, { name: "SIGURG", number: 23, action: "ignore", description: "Socket received out-of-band data", standard: "bsd" }, { name: "SIGXCPU", number: 24, action: "core", description: "Process timed out", standard: "bsd" }, { name: "SIGXFSZ", number: 25, action: "core", description: "File too big", standard: "bsd" }, { name: "SIGVTALRM", number: 26, action: "terminate", description: "Timeout or timer", standard: "bsd" }, { name: "SIGPROF", number: 27, action: "terminate", description: "Timeout or timer", standard: "bsd" }, { name: "SIGWINCH", number: 28, action: "ignore", description: "Terminal window size changed", standard: "bsd" }, { name: "SIGIO", number: 29, action: "terminate", description: "I/O is available", standard: "other" }, { name: "SIGPOLL", number: 29, action: "terminate", description: "Watched event", standard: "other" }, { name: "SIGINFO", number: 29, action: "ignore", description: "Request for process information", standard: "other" }, { name: "SIGPWR", number: 30, action: "terminate", description: "Device running out of power", standard: "systemv" }, { name: "SIGSYS", number: 31, action: "core", description: "Invalid system call", standard: "other" }, { name: "SIGUNUSED", number: 31, action: "terminate", description: "Invalid system call", standard: "other" }], Pn = s(() => {
8862
+ const e = ss();
8863
+ return [...cs, ...e].map(us);
8864
+ }, "getSignals"), us = s(({ name: e, number: t, description: r, action: n, forced: i = false, standard: o }) => {
8720
8865
  const { signals: { [e]: c } } = node_os.constants, l = c !== void 0;
8721
- return { name: e, number: l ? c : t, description: r, supported: l, action: n, forced: o, standard: i };
8722
- }, "normalizeSignal"), ns = s(() => {
8723
- const e = Un();
8724
- return Object.fromEntries(e.map(is));
8725
- }, "getSignalsByName"), is = s(({ name: e, number: t, description: r, supported: n, action: o, forced: i, standard: c }) => [e, { name: e, number: t, description: r, supported: n, action: o, forced: i, standard: c }], "getSignalByName"), os = ns(), ss = s(() => {
8726
- const e = Un(), t = Cn + 1, r = Array.from({ length: t }, (n, o) => as(o, e));
8866
+ return { name: e, number: l ? c : t, description: r, supported: l, action: n, forced: i, standard: o };
8867
+ }, "normalizeSignal"), ls = s(() => {
8868
+ const e = Pn();
8869
+ return Object.fromEntries(e.map(fs));
8870
+ }, "getSignalsByName"), fs = s(({ name: e, number: t, description: r, supported: n, action: i, forced: o, standard: c }) => [e, { name: e, number: t, description: r, supported: n, action: i, forced: o, standard: c }], "getSignalByName"), hs = ls(), ds = s(() => {
8871
+ const e = Pn(), t = Ln + 1, r = Array.from({ length: t }, (n, i) => ps(i, e));
8727
8872
  return Object.assign({}, ...r);
8728
- }, "getSignalsByNumber"), as = s((e, t) => {
8729
- const r = cs(e, t);
8873
+ }, "getSignalsByNumber"), ps = s((e, t) => {
8874
+ const r = ms(e, t);
8730
8875
  if (r === void 0) return {};
8731
- const { name: n, description: o, supported: i, action: c, forced: l, standard: h } = r;
8732
- return { [e]: { name: n, number: e, description: o, supported: i, action: c, forced: l, standard: h } };
8733
- }, "getSignalByNumber"), cs = s((e, t) => {
8876
+ const { name: n, description: i, supported: o, action: c, forced: l, standard: h } = r;
8877
+ return { [e]: { name: n, number: e, description: i, supported: o, action: c, forced: l, standard: h } };
8878
+ }, "getSignalByNumber"), ms = s((e, t) => {
8734
8879
  const r = t.find(({ name: n }) => node_os.constants.signals[n] === e);
8735
8880
  return r !== void 0 ? r : t.find((n) => n.number === e);
8736
8881
  }, "findSignalByNumber");
8737
- ss();
8738
- const us = s(({ timedOut: e, timeout: t, errorCode: r, signal: n, signalDescription: o, exitCode: i, isCanceled: c }) => e ? `timed out after ${t} milliseconds` : r !== void 0 ? `failed with ${r}` : n !== void 0 ? `was killed with ${n} (${o})` : i !== void 0 ? `failed with exit code ${i}` : "failed", "getErrorPrefix"), Bn = s(({ stdout: e, stderr: t, all: r, error: n, signal: o, exitCode: i, command: c, escapedCommand: l, timedOut: h, isCanceled: _, killed: m, parsed: { options: { timeout: A, cwd: b = y.cwd() } } }) => {
8739
- i = i === null ? void 0 : i, o = o === null ? void 0 : o;
8740
- const O = o === void 0 ? void 0 : os[o].description, x = n && n.code, y = `Command ${us({ timedOut: h, timeout: A, errorCode: x, signal: o, signalDescription: O, exitCode: i, isCanceled: _ })}: ${c}`, C = Object.prototype.toString.call(n) === "[object Error]", w = C ? `${y}
8741
- ${n.message}` : y, B = [w, t, e].filter(Boolean).join(`
8882
+ ds();
8883
+ const Es = s(({ timedOut: e, timeout: t, errorCode: r, signal: n, signalDescription: i, exitCode: o, isCanceled: c }) => e ? `timed out after ${t} milliseconds` : r !== void 0 ? `failed with ${r}` : n !== void 0 ? `was killed with ${n} (${i})` : o !== void 0 ? `failed with exit code ${o}` : "failed", "getErrorPrefix"), Nn = s(({ stdout: e, stderr: t, all: r, error: n, signal: i, exitCode: o, command: c, escapedCommand: l, timedOut: h, isCanceled: g, killed: m, parsed: { options: { timeout: A, cwd: b = y.cwd() } } }) => {
8884
+ o = o === null ? void 0 : o, i = i === null ? void 0 : i;
8885
+ const O = i === void 0 ? void 0 : hs[i].description, x = n && n.code, w = `Command ${Es({ timedOut: h, timeout: A, errorCode: x, signal: i, signalDescription: O, exitCode: o, isCanceled: g })}: ${c}`, C = Object.prototype.toString.call(n) === "[object Error]", y = C ? `${w}
8886
+ ${n.message}` : w, B = [y, t, e].filter(Boolean).join(`
8742
8887
  `);
8743
- return C ? (n.originalMessage = n.message, n.message = B) : n = new Error(B), n.shortMessage = w, n.command = c, n.escapedCommand = l, n.exitCode = i, n.signal = o, n.signalDescription = O, n.stdout = e, n.stderr = t, n.cwd = b, r !== void 0 && (n.all = r), "bufferedData" in n && delete n.bufferedData, n.failed = true, n.timedOut = !!h, n.isCanceled = _, n.killed = m && !h, n;
8744
- }, "makeError"), Tt = ["stdin", "stdout", "stderr"], ls = s((e) => Tt.some((t) => e[t] !== void 0), "hasAlias"), fs = s((e) => {
8888
+ return C ? (n.originalMessage = n.message, n.message = B) : n = new Error(B), n.shortMessage = y, n.command = c, n.escapedCommand = l, n.exitCode = o, n.signal = i, n.signalDescription = O, n.stdout = e, n.stderr = t, n.cwd = b, r !== void 0 && (n.all = r), "bufferedData" in n && delete n.bufferedData, n.failed = true, n.timedOut = !!h, n.isCanceled = g, n.killed = m && !h, n;
8889
+ }, "makeError"), Tt = ["stdin", "stdout", "stderr"], _s = s((e) => Tt.some((t) => e[t] !== void 0), "hasAlias"), gs = s((e) => {
8745
8890
  if (!e) return;
8746
8891
  const { stdio: t } = e;
8747
8892
  if (t === void 0) return Tt.map((n) => e[n]);
8748
- if (ls(e)) throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Tt.map((n) => `\`${n}\``).join(", ")}`);
8893
+ if (_s(e)) throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Tt.map((n) => `\`${n}\``).join(", ")}`);
8749
8894
  if (typeof t == "string") return t;
8750
8895
  if (!Array.isArray(t)) throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);
8751
8896
  const r = Math.max(t.length, Tt.length);
8752
- return Array.from({ length: r }, (n, o) => t[o]);
8897
+ return Array.from({ length: r }, (n, i) => t[i]);
8753
8898
  }, "normalizeStdio"), Ye = [];
8754
8899
  Ye.push("SIGHUP", "SIGINT", "SIGTERM"), process.platform !== "win32" && Ye.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT"), process.platform === "linux" && Ye.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
8755
- const wt = s((e) => !!e && typeof e == "object" && typeof e.removeListener == "function" && typeof e.emit == "function" && typeof e.reallyExit == "function" && typeof e.listeners == "function" && typeof e.kill == "function" && typeof e.pid == "number" && typeof e.on == "function", "processOk"), or = Symbol.for("signal-exit emitter"), sr = globalThis, hs = Object.defineProperty.bind(Object);
8756
- class ds {
8900
+ const yt = s((e) => !!e && typeof e == "object" && typeof e.removeListener == "function" && typeof e.emit == "function" && typeof e.reallyExit == "function" && typeof e.listeners == "function" && typeof e.kill == "function" && typeof e.pid == "number" && typeof e.on == "function", "processOk"), sr = Symbol.for("signal-exit emitter"), ar = globalThis, Is = Object.defineProperty.bind(Object);
8901
+ class Ss {
8757
8902
  static {
8758
8903
  s(this, "Emitter");
8759
8904
  }
@@ -8762,37 +8907,37 @@ class ds {
8762
8907
  count = 0;
8763
8908
  id = Math.random();
8764
8909
  constructor() {
8765
- if (sr[or]) return sr[or];
8766
- hs(sr, or, { value: this, writable: false, enumerable: false, configurable: false });
8910
+ if (ar[sr]) return ar[sr];
8911
+ Is(ar, sr, { value: this, writable: false, enumerable: false, configurable: false });
8767
8912
  }
8768
8913
  on(t, r) {
8769
8914
  this.listeners[t].push(r);
8770
8915
  }
8771
8916
  removeListener(t, r) {
8772
- const n = this.listeners[t], o = n.indexOf(r);
8773
- o !== -1 && (o === 0 && n.length === 1 ? n.length = 0 : n.splice(o, 1));
8917
+ const n = this.listeners[t], i = n.indexOf(r);
8918
+ i !== -1 && (i === 0 && n.length === 1 ? n.length = 0 : n.splice(i, 1));
8774
8919
  }
8775
8920
  emit(t, r, n) {
8776
8921
  if (this.emitted[t]) return false;
8777
8922
  this.emitted[t] = true;
8778
- let o = false;
8779
- for (const i of this.listeners[t]) o = i(r, n) === true || o;
8780
- return t === "exit" && (o = this.emit("afterExit", r, n) || o), o;
8923
+ let i = false;
8924
+ for (const o of this.listeners[t]) i = o(r, n) === true || i;
8925
+ return t === "exit" && (i = this.emit("afterExit", r, n) || i), i;
8781
8926
  }
8782
8927
  }
8783
- class On {
8928
+ class Dn {
8784
8929
  static {
8785
8930
  s(this, "SignalExitBase");
8786
8931
  }
8787
8932
  }
8788
- const ps = s((e) => ({ onExit(t, r) {
8933
+ const Rs = s((e) => ({ onExit(t, r) {
8789
8934
  return e.onExit(t, r);
8790
8935
  }, load() {
8791
8936
  return e.load();
8792
8937
  }, unload() {
8793
8938
  return e.unload();
8794
8939
  } }), "signalExitWrap");
8795
- class ms extends On {
8940
+ class Ts extends Dn {
8796
8941
  static {
8797
8942
  s(this, "SignalExitFallback");
8798
8943
  }
@@ -8805,12 +8950,12 @@ class ms extends On {
8805
8950
  unload() {
8806
8951
  }
8807
8952
  }
8808
- class Es extends On {
8953
+ class ys extends Dn {
8809
8954
  static {
8810
8955
  s(this, "SignalExit");
8811
8956
  }
8812
- #s = ar.platform === "win32" ? "SIGINT" : "SIGHUP";
8813
- #t = new ds();
8957
+ #s = cr.platform === "win32" ? "SIGINT" : "SIGHUP";
8958
+ #t = new Ss();
8814
8959
  #e;
8815
8960
  #i;
8816
8961
  #o;
@@ -8820,9 +8965,9 @@ class Es extends On {
8820
8965
  super(), this.#e = t, this.#n = {};
8821
8966
  for (const r of Ye) this.#n[r] = () => {
8822
8967
  const n = this.#e.listeners(r);
8823
- let { count: o } = this.#t;
8824
- const i = t;
8825
- if (typeof i.__signal_exit_emitter__ == "object" && typeof i.__signal_exit_emitter__.count == "number" && (o += i.__signal_exit_emitter__.count), n.length === o) {
8968
+ let { count: i } = this.#t;
8969
+ const o = t;
8970
+ if (typeof o.__signal_exit_emitter__ == "object" && typeof o.__signal_exit_emitter__.count == "number" && (i += o.__signal_exit_emitter__.count), n.length === i) {
8826
8971
  this.unload();
8827
8972
  const c = this.#t.emit("exit", null, r), l = r === "SIGHUP" ? this.#s : r;
8828
8973
  c || t.kill(t.pid, l);
@@ -8831,7 +8976,7 @@ class Es extends On {
8831
8976
  this.#o = t.reallyExit, this.#i = t.emit;
8832
8977
  }
8833
8978
  onExit(t, r) {
8834
- if (!wt(this.#e)) return () => {
8979
+ if (!yt(this.#e)) return () => {
8835
8980
  };
8836
8981
  this.#r === false && this.load();
8837
8982
  const n = r?.alwaysLast ? "afterExit" : "exit";
@@ -8861,99 +9006,99 @@ class Es extends On {
8861
9006
  }), this.#e.emit = this.#i, this.#e.reallyExit = this.#o, this.#t.count -= 1);
8862
9007
  }
8863
9008
  #a(t) {
8864
- return wt(this.#e) ? (this.#e.exitCode = t || 0, this.#t.emit("exit", this.#e.exitCode, null), this.#o.call(this.#e, this.#e.exitCode)) : 0;
9009
+ return yt(this.#e) ? (this.#e.exitCode = t || 0, this.#t.emit("exit", this.#e.exitCode, null), this.#o.call(this.#e, this.#e.exitCode)) : 0;
8865
9010
  }
8866
9011
  #c(t, ...r) {
8867
9012
  const n = this.#i;
8868
- if (t === "exit" && wt(this.#e)) {
9013
+ if (t === "exit" && yt(this.#e)) {
8869
9014
  typeof r[0] == "number" && (this.#e.exitCode = r[0]);
8870
- const o = n.call(this.#e, t, ...r);
8871
- return this.#t.emit("exit", this.#e.exitCode, null), o;
9015
+ const i = n.call(this.#e, t, ...r);
9016
+ return this.#t.emit("exit", this.#e.exitCode, null), i;
8872
9017
  } else return n.call(this.#e, t, ...r);
8873
9018
  }
8874
9019
  }
8875
- const ar = globalThis.process;
8876
- ps(wt(ar) ? new Es(ar) : new ms());
8877
- function _s(e) {
9020
+ const cr = globalThis.process;
9021
+ Rs(yt(cr) ? new ys(cr) : new Ts());
9022
+ function ws(e) {
8878
9023
  return e !== null && typeof e == "object" && typeof e.pipe == "function";
8879
9024
  }
8880
- s(_s, "isStream"), new TextEncoder();
8881
- var cr, Ln;
8882
- function gs() {
8883
- if (Ln) return cr;
8884
- Ln = 1;
9025
+ s(ws, "isStream"), new TextEncoder();
9026
+ var ur, Mn;
9027
+ function As() {
9028
+ if (Mn) return ur;
9029
+ Mn = 1;
8885
9030
  const { PassThrough: e } = require$$0;
8886
- return cr = s(function() {
9031
+ return ur = s(function() {
8887
9032
  var t = [], r = new e({ objectMode: true });
8888
- return r.setMaxListeners(0), r.add = n, r.isEmpty = o, r.on("unpipe", i), Array.prototype.slice.call(arguments).forEach(n), r;
9033
+ return r.setMaxListeners(0), r.add = n, r.isEmpty = i, r.on("unpipe", o), Array.prototype.slice.call(arguments).forEach(n), r;
8889
9034
  function n(c) {
8890
- return Array.isArray(c) ? (c.forEach(n), this) : (t.push(c), c.once("end", i.bind(null, c)), c.once("error", r.emit.bind(r, "error")), c.pipe(r, { end: false }), this);
9035
+ return Array.isArray(c) ? (c.forEach(n), this) : (t.push(c), c.once("end", o.bind(null, c)), c.once("error", r.emit.bind(r, "error")), c.pipe(r, { end: false }), this);
8891
9036
  }
8892
- function o() {
9037
+ function i() {
8893
9038
  return t.length == 0;
8894
9039
  }
8895
- function i(c) {
9040
+ function o(c) {
8896
9041
  t = t.filter(function(l) {
8897
9042
  return l !== c;
8898
9043
  }), !t.length && r.readable && r.end();
8899
9044
  }
8900
- }, "mergeStream"), cr;
9045
+ }, "mergeStream"), ur;
8901
9046
  }
8902
- s(gs, "requireMergeStream"), gs();
8903
- const Is = s((e) => {
9047
+ s(As, "requireMergeStream"), As();
9048
+ const vs = s((e) => {
8904
9049
  if (e !== void 0) throw new TypeError("The `input` and `inputFile` options cannot be both set.");
8905
- }, "validateInputOptions"), Ss = s(({ input: e, inputFile: t }) => typeof t != "string" ? e : (Is(e), node_fs.readFileSync(t)), "getInputSync"), Rs = s((e) => {
8906
- const t = Ss(e);
8907
- if (_s(t)) throw new TypeError("The `input` option cannot be a stream in sync mode");
9050
+ }, "validateInputOptions"), bs = s(({ input: e, inputFile: t }) => typeof t != "string" ? e : (vs(e), node_fs.readFileSync(t)), "getInputSync"), Cs = s((e) => {
9051
+ const t = bs(e);
9052
+ if (ws(t)) throw new TypeError("The `input` option cannot be a stream in sync mode");
8908
9053
  return t;
8909
- }, "handleInputSync"), Ts = (async () => {
9054
+ }, "handleInputSync"), Us = (async () => {
8910
9055
  })().constructor.prototype;
8911
- ["then", "catch", "finally"].map((e) => [e, Reflect.getOwnPropertyDescriptor(Ts, e)]);
8912
- const Pn = s((e, t = []) => Array.isArray(t) ? [e, ...t] : [e], "normalizeArgs"), ws = /^[\w.-]+$/, ys = s((e) => typeof e != "string" || ws.test(e) ? e : `"${e.replaceAll('"', '\\"')}"`, "escapeArg"), As = s((e, t) => Pn(e, t).join(" "), "joinCommand"), vs = s((e, t) => Pn(e, t).map((r) => ys(r)).join(" "), "getEscapedCommand"), bs = node_util.debuglog("execa").enabled, yt = s((e, t) => String(e).padStart(t, "0"), "padField"), Cs = s(() => {
9056
+ ["then", "catch", "finally"].map((e) => [e, Reflect.getOwnPropertyDescriptor(Us, e)]);
9057
+ const xn = s((e, t = []) => Array.isArray(t) ? [e, ...t] : [e], "normalizeArgs"), Bs = /^[\w.-]+$/, Os = s((e) => typeof e != "string" || Bs.test(e) ? e : `"${e.replaceAll('"', '\\"')}"`, "escapeArg"), Ls = s((e, t) => xn(e, t).join(" "), "joinCommand"), Ps = s((e, t) => xn(e, t).map((r) => Os(r)).join(" "), "getEscapedCommand"), Ns = node_util.debuglog("execa").enabled, wt = s((e, t) => String(e).padStart(t, "0"), "padField"), Ds = s(() => {
8913
9058
  const e = /* @__PURE__ */ new Date();
8914
- return `${yt(e.getHours(), 2)}:${yt(e.getMinutes(), 2)}:${yt(e.getSeconds(), 2)}.${yt(e.getMilliseconds(), 3)}`;
8915
- }, "getTimestamp"), Us = s((e, { verbose: t }) => {
8916
- t && y.stderr.write(`[${Cs()}] ${e}
9059
+ return `${wt(e.getHours(), 2)}:${wt(e.getMinutes(), 2)}:${wt(e.getSeconds(), 2)}.${wt(e.getMilliseconds(), 3)}`;
9060
+ }, "getTimestamp"), Ms = s((e, { verbose: t }) => {
9061
+ t && y.stderr.write(`[${Ds()}] ${e}
8917
9062
  `);
8918
- }, "logCommand"), Bs = 1e3 * 1e3 * 100, Os = s(({ env: e, extendEnv: t, preferLocal: r, localDir: n, execPath: o }) => {
8919
- const i = t ? { ...y.env, ...e } : e;
8920
- return r ? Xo({ env: i, cwd: n, execPath: o }) : i;
8921
- }, "getEnv"), Ls = s((e, t, r = {}) => {
8922
- const n = Vo._parse(e, t, r);
8923
- return e = n.command, t = n.args, r = n.options, r = { maxBuffer: Bs, buffer: true, stripFinalNewline: true, extendEnv: true, preferLocal: false, localDir: r.cwd || y.cwd(), execPath: y.execPath, encoding: "utf8", reject: true, cleanup: true, all: false, windowsHide: true, verbose: bs, ...r }, r.env = Os(r), r.stdio = fs(r), y.platform === "win32" && path.basename(e, ".exe") === "cmd" && t.unshift("/q"), { file: e, args: t, options: r, parsed: n };
8924
- }, "handleArguments"), Nn = s((e, t, r) => typeof t != "string" && !node_buffer.Buffer.isBuffer(t) ? r === void 0 ? void 0 : "" : e.stripFinalNewline ? Yo(t) : t, "handleOutput");
8925
- function ur(e, t, r) {
8926
- const n = Ls(e, t, r), o = As(e, t), i = vs(e, t);
8927
- Us(i, n.options);
8928
- const c = Rs(n.options);
9063
+ }, "logCommand"), xs = 1e3 * 1e3 * 100, Gs = s(({ env: e, extendEnv: t, preferLocal: r, localDir: n, execPath: i }) => {
9064
+ const o = t ? { ...y.env, ...e } : e;
9065
+ return r ? os({ env: o, cwd: n, execPath: i }) : o;
9066
+ }, "getEnv"), $s = s((e, t, r = {}) => {
9067
+ const n = es._parse(e, t, r);
9068
+ return e = n.command, t = n.args, r = n.options, r = { maxBuffer: xs, buffer: true, stripFinalNewline: true, extendEnv: true, preferLocal: false, localDir: r.cwd || y.cwd(), execPath: y.execPath, encoding: "utf8", reject: true, cleanup: true, all: false, windowsHide: true, verbose: Ns, ...r }, r.env = Gs(r), r.stdio = gs(r), y.platform === "win32" && path.basename(e, ".exe") === "cmd" && t.unshift("/q"), { file: e, args: t, options: r, parsed: n };
9069
+ }, "handleArguments"), Gn = s((e, t, r) => typeof t != "string" && !node_buffer.Buffer.isBuffer(t) ? r === void 0 ? void 0 : "" : e.stripFinalNewline ? ts(t) : t, "handleOutput");
9070
+ function lr(e, t, r) {
9071
+ const n = $s(e, t, r), i = Ls(e, t), o = Ps(e, t);
9072
+ Ms(o, n.options);
9073
+ const c = Cs(n.options);
8929
9074
  let l;
8930
9075
  try {
8931
9076
  l = childProcess.spawnSync(n.file, n.args, { ...n.options, input: c });
8932
9077
  } catch (m) {
8933
- throw Bn({ error: m, stdout: "", stderr: "", all: "", command: o, escapedCommand: i, parsed: n, timedOut: false, isCanceled: false, killed: false });
9078
+ throw Nn({ error: m, stdout: "", stderr: "", all: "", command: i, escapedCommand: o, parsed: n, timedOut: false, isCanceled: false, killed: false });
8934
9079
  }
8935
- const h = Nn(n.options, l.stdout, l.error), _ = Nn(n.options, l.stderr, l.error);
9080
+ const h = Gn(n.options, l.stdout, l.error), g = Gn(n.options, l.stderr, l.error);
8936
9081
  if (l.error || l.status !== 0 || l.signal !== null) {
8937
- const m = Bn({ stdout: h, stderr: _, error: l.error, signal: l.signal, exitCode: l.status, command: o, escapedCommand: i, parsed: n, timedOut: l.error && l.error.code === "ETIMEDOUT", isCanceled: false, killed: l.signal !== null });
9082
+ const m = Nn({ stdout: h, stderr: g, error: l.error, signal: l.signal, exitCode: l.status, command: i, escapedCommand: o, parsed: n, timedOut: l.error && l.error.code === "ETIMEDOUT", isCanceled: false, killed: l.signal !== null });
8938
9083
  if (!n.options.reject) return m;
8939
9084
  throw m;
8940
9085
  }
8941
- return { command: o, escapedCommand: i, exitCode: 0, stdout: h, stderr: _, failed: false, timedOut: false, isCanceled: false, killed: false };
9086
+ return { command: i, escapedCommand: o, exitCode: 0, stdout: h, stderr: g, failed: false, timedOut: false, isCanceled: false, killed: false };
8942
9087
  }
8943
- s(ur, "execaSync");
9088
+ s(lr, "execaSync");
8944
9089
  function At(e) {
8945
9090
  try {
8946
- return ur("git", ["rev-parse", "HEAD"], e).stdout;
9091
+ return lr("git", ["rev-parse", "HEAD"], e).stdout;
8947
9092
  } catch {
8948
9093
  return;
8949
9094
  }
8950
9095
  }
8951
9096
  s(At, "head");
8952
- function lr(e) {
9097
+ function fr(e) {
8953
9098
  try {
8954
- const t = ur("git", ["rev-parse", "--abbrev-ref", "HEAD"], e).stdout;
9099
+ const t = lr("git", ["rev-parse", "--abbrev-ref", "HEAD"], e).stdout;
8955
9100
  if (t === "HEAD") {
8956
- const r = ur("git", ["show", "-s", "--pretty=%d", "HEAD"], e).stdout.replace(/^\(|\)$/g, "").split(", ").find((n) => n.startsWith("origin/"));
9101
+ const r = lr("git", ["show", "-s", "--pretty=%d", "HEAD"], e).stdout.replace(/^\(|\)$/g, "").split(", ").find((n) => n.startsWith("origin/"));
8957
9102
  return r ? r.match(/^origin\/(?<branch>.+)/)[1] : void 0;
8958
9103
  }
8959
9104
  return t;
@@ -8961,217 +9106,217 @@ function lr(e) {
8961
9106
  return;
8962
9107
  }
8963
9108
  }
8964
- s(lr, "branch");
8965
- const Dn = /^(?:.*)@(?:.*):(?:\d+\/)?(.*)\.git$/, Ps = /^\/(.*)\.git$/;
8966
- function Ns(e) {
9109
+ s(fr, "branch");
9110
+ const $n = /^(?:.*)@(?:.*):(?:\d+\/)?(.*)\.git$/, ks = /^\/(.*)\.git$/;
9111
+ function Hs(e) {
8967
9112
  if (e) {
8968
- if (e.match(Dn)) return e.replace(Dn, "$1");
9113
+ if (e.match($n)) return e.replace($n, "$1");
8969
9114
  try {
8970
- return new URL(e).pathname.replace(Ps, "$1");
9115
+ return new URL(e).pathname.replace(ks, "$1");
8971
9116
  } catch {
8972
9117
  return;
8973
9118
  }
8974
9119
  }
8975
9120
  }
8976
- s(Ns, "getSlugFromGitURL");
8977
- var Ds = { detect({ env: e }) {
9121
+ s(Hs, "getSlugFromGitURL");
9122
+ var Fs = { detect({ env: e }) {
8978
9123
  return !!e.BUILDKITE;
8979
9124
  }, configuration({ env: e }) {
8980
9125
  const t = e.BUILDKITE_PULL_REQUEST === "false" ? void 0 : e.BUILDKITE_PULL_REQUEST, r = !!t;
8981
- return { name: "Buildkite", service: "buildkite", build: e.BUILDKITE_BUILD_NUMBER, buildUrl: e.BUILDKITE_BUILD_URL, commit: e.BUILDKITE_COMMIT, tag: e.BUILDKITE_TAG, branch: r ? e.BUILDKITE_PULL_REQUEST_BASE_BRANCH : e.BUILDKITE_BRANCH, slug: Ns(e.BUILDKITE_REPO), pr: t, isPr: r, prBranch: r ? e.BUILDKITE_BRANCH : void 0, root: e.BUILDKITE_BUILD_CHECKOUT_PATH };
8982
- } }, Ms = { detect({ env: e }) {
9126
+ return { name: "Buildkite", service: "buildkite", build: e.BUILDKITE_BUILD_NUMBER, buildUrl: e.BUILDKITE_BUILD_URL, commit: e.BUILDKITE_COMMIT, tag: e.BUILDKITE_TAG, branch: r ? e.BUILDKITE_PULL_REQUEST_BASE_BRANCH : e.BUILDKITE_BRANCH, slug: Hs(e.BUILDKITE_REPO), pr: t, isPr: r, prBranch: r ? e.BUILDKITE_BRANCH : void 0, root: e.BUILDKITE_BUILD_CHECKOUT_PATH };
9127
+ } }, js = { detect({ env: e }) {
8983
9128
  return !!e.CIRCLECI;
8984
9129
  }, configuration({ env: e }) {
8985
- const t = e.CIRCLE_PR_NUMBER || hn(e.CIRCLE_PULL_REQUEST || e.CI_PULL_REQUEST), r = !!t;
9130
+ const t = e.CIRCLE_PR_NUMBER || En(e.CIRCLE_PULL_REQUEST || e.CI_PULL_REQUEST), r = !!t;
8986
9131
  return { name: "CircleCI", service: "circleci", build: e.CIRCLE_BUILD_NUM, buildUrl: e.CIRCLE_BUILD_URL, job: `${e.CIRCLE_BUILD_NUM}.${e.CIRCLE_NODE_INDEX}`, commit: e.CIRCLE_SHA1, tag: e.CIRCLE_TAG, branch: r ? void 0 : e.CIRCLE_BRANCH, pr: t, isPr: r, prBranch: r ? e.CIRCLE_BRANCH : void 0, slug: `${e.CIRCLE_PROJECT_USERNAME}/${e.CIRCLE_PROJECT_REPONAME}` };
8987
9132
  } };
8988
- const Mn = "https://cirrus-ci.com";
8989
- var xs = { detect({ env: e }) {
9133
+ const kn = "https://cirrus-ci.com";
9134
+ var qs = { detect({ env: e }) {
8990
9135
  return !!e.CIRRUS_CI;
8991
9136
  }, configuration({ env: e }) {
8992
9137
  const t = e.CIRRUS_PR, r = !!t;
8993
- return { name: "Cirrus CI", service: "cirrus", commit: e.CIRRUS_CHANGE_IN_REPO, tag: e.CIRRUS_TAG, build: e.CIRRUS_BUILD_ID, buildUrl: `${Mn}/build/${e.CIRRUS_BUILD_ID}`, job: e.CIRRUS_TASK_ID, jobUrl: `${Mn}/task/${e.CIRRUS_TASK_ID}`, branch: r ? e.CIRRUS_BASE_BRANCH : e.CIRRUS_BRANCH, pr: t, isPr: r, prBranch: r ? e.CIRRUS_BRANCH : void 0, slug: e.CIRRUS_REPO_FULL_NAME, root: e.CIRRUS_WORKING_DIR };
8994
- } }, Gs = { detect({ env: e }) {
9138
+ return { name: "Cirrus CI", service: "cirrus", commit: e.CIRRUS_CHANGE_IN_REPO, tag: e.CIRRUS_TAG, build: e.CIRRUS_BUILD_ID, buildUrl: `${kn}/build/${e.CIRRUS_BUILD_ID}`, job: e.CIRRUS_TASK_ID, jobUrl: `${kn}/task/${e.CIRRUS_TASK_ID}`, branch: r ? e.CIRRUS_BASE_BRANCH : e.CIRRUS_BRANCH, pr: t, isPr: r, prBranch: r ? e.CIRRUS_BRANCH : void 0, slug: e.CIRRUS_REPO_FULL_NAME, root: e.CIRRUS_WORKING_DIR };
9139
+ } }, Ws = { detect({ env: e }) {
8995
9140
  return e.CF_PAGES === "1";
8996
9141
  }, configuration({ env: e }) {
8997
9142
  return { name: "Cloudflare Pages", service: "cloudflarePages", commit: e.CF_PAGES_COMMIT_SHA, branch: e.CF_PAGES_BRANCH, root: e.PWD };
8998
- } }, $s = { detect({ env: e }) {
9143
+ } }, Ks = { detect({ env: e }) {
8999
9144
  return !!e.CODEBUILD_BUILD_ID;
9000
9145
  }, configuration({ env: e, cwd: t }) {
9001
- return { name: "AWS CodeBuild", service: "codebuild", commit: At({ env: e, cwd: t }), build: e.CODEBUILD_BUILD_ID, branch: lr({ env: e, cwd: t }), buildUrl: `https://console.aws.amazon.com/codebuild/home?region=${e.AWS_REGION}#/builds/${e.CODEBUILD_BUILD_ID}/view/new`, root: e.PWD };
9002
- } }, ks = { detect({ env: e }) {
9146
+ return { name: "AWS CodeBuild", service: "codebuild", commit: At({ env: e, cwd: t }), build: e.CODEBUILD_BUILD_ID, branch: fr({ env: e, cwd: t }), buildUrl: `https://console.aws.amazon.com/codebuild/home?region=${e.AWS_REGION}#/builds/${e.CODEBUILD_BUILD_ID}/view/new`, root: e.PWD };
9147
+ } }, Vs = { detect({ env: e }) {
9003
9148
  return !!e.CF_BUILD_ID;
9004
9149
  }, configuration({ env: e }) {
9005
9150
  const t = e.CF_PULL_REQUEST_NUMBER, r = !!t;
9006
9151
  return { name: "Codefresh", service: "codefresh", commit: e.CF_REVISION, build: e.CF_BUILD_ID, buildUrl: e.CF_BUILD_URL, branch: r ? e.CF_PULL_REQUEST_TARGET : e.CF_BRANCH, pr: t, isPr: r, prBranch: r ? e.CF_BRANCH : void 0, slug: `${e.CF_REPO_OWNER}/${e.CF_REPO_NAME}`, root: e.CF_VOLUME_PATH };
9007
- } }, Hs = { detect({ env: e }) {
9152
+ } }, Ys = { detect({ env: e }) {
9008
9153
  return e.CI_NAME && e.CI_NAME === "codeship";
9009
9154
  }, configuration({ env: e }) {
9010
9155
  return { name: "Codeship", service: "codeship", build: e.CI_BUILD_NUMBER, buildUrl: e.CI_BUILD_URL, commit: e.CI_COMMIT_ID, branch: e.CI_BRANCH, slug: e.CI_REPO_NAME };
9011
- } }, Fs = { detect({ env: e }) {
9156
+ } }, zs = { detect({ env: e }) {
9012
9157
  return !!e.DRONE;
9013
9158
  }, configuration({ env: e }) {
9014
9159
  const t = e.DRONE_BUILD_EVENT === "pull_request";
9015
9160
  return { name: "Drone", service: "drone", commit: e.DRONE_COMMIT_SHA, tag: e.DRONE_TAG, build: e.DRONE_BUILD_NUMBER, buildUrl: e.DRONE_BUILD_LINK, branch: t ? e.DRONE_TARGET_BRANCH : e.DRONE_BRANCH, job: e.DRONE_JOB_NUMBER, jobUrl: e.DRONE_BUILD_LINK, pr: e.DRONE_PULL_REQUEST, isPr: t, prBranch: t ? e.DRONE_SOURCE_BRANCH : void 0, slug: `${e.DRONE_REPO_OWNER}/${e.DRONE_REPO_NAME}`, root: e.DRONE_WORKSPACE };
9016
- } }, js = { configuration(e) {
9017
- return { commit: At(e), branch: lr(e) };
9161
+ } }, Js = { configuration(e) {
9162
+ return { commit: At(e), branch: fr(e) };
9018
9163
  } };
9019
- const qs = s(({ env: e }) => {
9164
+ const Qs = s(({ env: e }) => {
9020
9165
  try {
9021
9166
  const t = e.GITHUB_EVENT_PATH ? JSON.parse(node_fs.readFileSync(e.GITHUB_EVENT_PATH, "utf-8")) : void 0;
9022
9167
  if (t && t.pull_request) return { branch: t.pull_request.base ? ot(t.pull_request.base.ref) : void 0, pr: t.pull_request.number };
9023
9168
  } catch {
9024
9169
  }
9025
9170
  return { pr: void 0, branch: void 0 };
9026
- }, "getPrEvent"), Ws = s((e) => {
9171
+ }, "getPrEvent"), Xs = s((e) => {
9027
9172
  const t = e.GITHUB_EVENT_PATH ? JSON.parse(node_fs.readFileSync(e.GITHUB_EVENT_PATH, "utf-8")) : void 0;
9028
9173
  return t && t.pull_request ? t.pull_request.number : void 0;
9029
9174
  }, "getPrNumber");
9030
- var Ks = { detect({ env: e }) {
9175
+ var Zs = { detect({ env: e }) {
9031
9176
  return !!e.GITHUB_ACTIONS;
9032
9177
  }, configuration({ env: e, cwd: t }) {
9033
- const r = e.GITHUB_EVENT_NAME === "pull_request" || e.GITHUB_EVENT_NAME === "pull_request_target", n = ot(e.GITHUB_EVENT_NAME === "pull_request_target" ? `refs/pull/${Ws(e)}/merge` : e.GITHUB_REF);
9034
- return { name: "GitHub Actions", service: "github", commit: e.GITHUB_SHA, build: e.GITHUB_RUN_ID, buildUrl: `${e.GITHUB_SERVER_URL}/${e.GITHUB_REPOSITORY}/actions/runs/${e.GITHUB_RUN_ID}`, isPr: r, branch: n, prBranch: r ? n : void 0, slug: e.GITHUB_REPOSITORY, root: e.GITHUB_WORKSPACE, ...r ? qs({ env: e }) : void 0 };
9035
- } }, Vs = { detect({ env: e }) {
9178
+ const r = e.GITHUB_EVENT_NAME === "pull_request" || e.GITHUB_EVENT_NAME === "pull_request_target", n = ot(e.GITHUB_EVENT_NAME === "pull_request_target" ? `refs/pull/${Xs(e)}/merge` : e.GITHUB_REF);
9179
+ return { name: "GitHub Actions", service: "github", commit: e.GITHUB_SHA, build: e.GITHUB_RUN_ID, buildUrl: `${e.GITHUB_SERVER_URL}/${e.GITHUB_REPOSITORY}/actions/runs/${e.GITHUB_RUN_ID}`, isPr: r, branch: n, prBranch: r ? n : void 0, slug: e.GITHUB_REPOSITORY, root: e.GITHUB_WORKSPACE, ...r ? Qs({ env: e }) : void 0 };
9180
+ } }, ea = { detect({ env: e }) {
9036
9181
  return !!e.GITLAB_CI;
9037
9182
  }, configuration({ env: e }) {
9038
9183
  const t = e.CI_MERGE_REQUEST_ID, r = !!t;
9039
9184
  return { name: "GitLab CI/CD", service: "gitlab", commit: e.CI_COMMIT_SHA, tag: e.CI_COMMIT_TAG, build: e.CI_PIPELINE_ID, buildUrl: `${e.CI_PROJECT_URL}/pipelines/${e.CI_PIPELINE_ID}`, job: e.CI_JOB_ID, jobUrl: `${e.CI_PROJECT_URL}/-/jobs/${e.CI_JOB_ID}`, branch: r ? e.CI_MERGE_REQUEST_TARGET_BRANCH_NAME : e.CI_COMMIT_REF_NAME, pr: t, isPr: r, prBranch: e.CI_MERGE_REQUEST_SOURCE_BRANCH_NAME, slug: e.CI_PROJECT_PATH, root: e.CI_PROJECT_DIR };
9040
- } }, Ys = { detect({ env: e }) {
9185
+ } }, ta = { detect({ env: e }) {
9041
9186
  return !!e.JENKINS_URL;
9042
9187
  }, configuration({ env: e, cwd: t }) {
9043
- const r = e.ghprbPullId || e.gitlabMergeRequestId || e.CHANGE_ID, n = !!r, o = e.GIT_LOCAL_BRANCH || e.GIT_BRANCH || e.gitlabBranch || e.BRANCH_NAME;
9044
- return { name: "Jenkins", service: "jenkins", commit: e.ghprbActualCommit || e.GIT_COMMIT || At({ env: e, cwd: t }), branch: n ? e.ghprbTargetBranch || e.gitlabTargetBranch : o, build: e.BUILD_NUMBER, buildUrl: e.BUILD_URL, root: e.WORKSPACE, pr: r, isPr: n, prBranch: n ? e.ghprbSourceBranch || e.gitlabSourceBranch || o : void 0 };
9045
- } }, zs = { detect({ env: e }) {
9188
+ const r = e.ghprbPullId || e.gitlabMergeRequestId || e.CHANGE_ID, n = !!r, i = e.GIT_LOCAL_BRANCH || e.GIT_BRANCH || e.gitlabBranch || e.BRANCH_NAME;
9189
+ return { name: "Jenkins", service: "jenkins", commit: e.ghprbActualCommit || e.GIT_COMMIT || At({ env: e, cwd: t }), branch: n ? e.ghprbTargetBranch || e.gitlabTargetBranch : i, build: e.BUILD_NUMBER, buildUrl: e.BUILD_URL, root: e.WORKSPACE, pr: r, isPr: n, prBranch: n ? e.ghprbSourceBranch || e.gitlabSourceBranch || i : void 0 };
9190
+ } }, ra = { detect({ env: e }) {
9046
9191
  return e.NETLIFY === "true";
9047
9192
  }, configuration({ env: e }) {
9048
9193
  const t = e.PULL_REQUEST === "true";
9049
9194
  return { name: "Netlify", service: "netlify", commit: e.COMMIT_REF, build: e.DEPLOY_ID, buildUrl: `https://app.netlify.com/sites/${e.SITE_NAME}/deploys/${e.DEPLOY_ID}`, branch: t ? void 0 : e.HEAD, pr: e.REVIEW_ID, isPr: t, prBranch: t ? e.HEAD : void 0, slug: e.REPOSITORY_URL.match(/[^/:]+\/[^/]+?$/)[0], root: e.PWD };
9050
- } }, Js = { detect({ env: e }) {
9195
+ } }, na = { detect({ env: e }) {
9051
9196
  return !!e.DISTELLI_APPNAME;
9052
9197
  }, configuration({ env: e }) {
9053
9198
  return { name: "Puppet", service: "puppet", build: e.DISTELLI_BUILDNUM, buildUrl: e.DISTELLI_RELEASE, commit: e.DISTELLI_RELREVISION, branch: e.DISTELLI_RELBRANCH, root: e.DISTELLI_INSTALLHOME };
9054
- } }, Qs = { detect({ env: e }) {
9199
+ } }, ia = { detect({ env: e }) {
9055
9200
  return !!e.SAILCI;
9056
9201
  }, configuration({ env: e }) {
9057
9202
  const t = e.SAIL_PULL_REQUEST_NUMBER, r = !!t;
9058
9203
  return { name: "Sail CI", service: "sail", commit: e.SAIL_COMMIT_SHA, branch: r ? void 0 : e.SAIL_COMMIT_BRANCH, pr: t, isPr: r, slug: `${e.SAIL_REPO_OWNER}/${e.SAIL_REPO_NAME}`, root: e.SAIL_CLONE_DIR };
9059
- } }, Xs = { detect({ env: e }) {
9204
+ } }, oa = { detect({ env: e }) {
9060
9205
  return !!e.SCREWDRIVER;
9061
9206
  }, configuration({ env: e }) {
9062
9207
  const t = e.SD_PULL_REQUEST, r = !!t;
9063
9208
  return { name: "Screwdriver.cd", service: "screwdriver", branch: r ? e.PR_BASE_BRANCH_NAME : e.GIT_BRANCH, prBranch: r ? e.PR_BRANCH_NAME : void 0, commit: e.SD_BUILD_SHA, build: e.SD_BUILD_ID, buildUrl: e.SD_UI_BUILD_URL, job: e.SD_JOB_ID, pr: t, isPr: r, slug: e.SD_PIPELINE_NAME, root: e.SD_ROOT_DIR };
9064
- } }, Zs = { detect({ env: e }) {
9209
+ } }, sa = { detect({ env: e }) {
9065
9210
  return !!e.SCRUTINIZER;
9066
9211
  }, configuration({ env: e }) {
9067
9212
  const t = e.SCRUTINIZER_PR_NUMBER, r = !!t;
9068
9213
  return { name: "Scrutinizer", service: "scrutinizer", commit: e.SCRUTINIZER_SHA1, build: e.SCRUTINIZER_INSPECTION_UUID, branch: e.SCRUTINIZER_BRANCH, pr: t, isPr: r, prBranch: e.SCRUTINIZER_PR_SOURCE_BRANCH };
9069
- } }, ea = { detect({ env: e }) {
9214
+ } }, aa = { detect({ env: e }) {
9070
9215
  return !!e.SEMAPHORE;
9071
9216
  }, configuration({ env: e, cwd: t }) {
9072
9217
  const r = e.SEMAPHORE_GIT_PR_NUMBER || e.PULL_REQUEST_NUMBER, n = !!r;
9073
9218
  return { name: "Semaphore", service: "semaphore", commit: e.SEMAPHORE_GIT_SHA || At({ env: e, cwd: t }), tag: e.SEMAPHORE_GIT_TAG_NAME, build: e.SEMAPHORE_JOB_ID || e.SEMAPHORE_BUILD_NUMBER, branch: e.SEMAPHORE_GIT_BRANCH || (n ? void 0 : e.BRANCH_NAME), pr: r, isPr: n, prBranch: e.SEMAPHORE_GIT_PR_BRANCH || (n ? e.BRANCH_NAME : void 0), slug: e.SEMAPHORE_GIT_REPO_SLUG || e.SEMAPHORE_REPO_SLUG, root: e.SEMAPHORE_GIT_DIR || e.SEMAPHORE_PROJECT_DIR };
9074
- } }, ta = { detect({ env: e }) {
9219
+ } }, ca = { detect({ env: e }) {
9075
9220
  return !!e.SHIPPABLE;
9076
9221
  }, configuration({ env: e }) {
9077
9222
  const t = e.IS_PULL_REQUEST === "true" ? e.PULL_REQUEST : void 0, r = !!t;
9078
9223
  return { name: "Shippable", service: "shippable", commit: e.COMMIT, tag: e.GIT_TAG_NAME, build: e.BUILD_NUMBER, buildUrl: e.BUILD_URL, branch: r ? e.BASE_BRANCH : e.BRANCH, job: e.JOB_NUMBER, pr: t, isPr: r, prBranch: r ? e.HEAD_BRANCH : void 0, slug: e.SHIPPABLE_REPO_SLUG, root: e.SHIPPABLE_BUILD_DIR };
9079
- } }, He = {}, xn;
9080
- function ra() {
9081
- if (xn) return He;
9082
- xn = 1, Object.defineProperty(He, "__esModule", { value: true }), He.of = He.PropertiesFile = void 0;
9224
+ } }, He = {}, Hn;
9225
+ function ua() {
9226
+ if (Hn) return He;
9227
+ Hn = 1, Object.defineProperty(He, "__esModule", { value: true }), He.of = He.PropertiesFile = void 0;
9083
9228
  var e = t(ze);
9084
- function t(o) {
9085
- return o && o.__esModule ? o : { default: o };
9229
+ function t(i) {
9230
+ return i && i.__esModule ? i : { default: i };
9086
9231
  }
9087
9232
  s(t, "_interopRequireDefault");
9088
9233
  class r {
9089
9234
  static {
9090
9235
  s(this, "PropertiesFile");
9091
9236
  }
9092
- constructor(...i) {
9093
- this.objs = {}, i.length && this.of.apply(this, i);
9237
+ constructor(...o) {
9238
+ this.objs = {}, o.length && this.of.apply(this, o);
9094
9239
  }
9095
- makeKeys(i) {
9096
- if (i && i.indexOf("#") !== 0) {
9097
- let c = ["=", ":"].map((m) => i.indexOf(m)).filter((m) => m > -1), l = Math.min(...c), h = i.substring(0, l).trim(), _ = i.substring(l + 1).trim();
9098
- if (this.objs.hasOwnProperty(h)) if (Array.isArray(this.objs[h])) this.objs[h].push(_);
9240
+ makeKeys(o) {
9241
+ if (o && o.indexOf("#") !== 0) {
9242
+ let c = ["=", ":"].map((m) => o.indexOf(m)).filter((m) => m > -1), l = Math.min(...c), h = o.substring(0, l).trim(), g = o.substring(l + 1).trim();
9243
+ if (this.objs.hasOwnProperty(h)) if (Array.isArray(this.objs[h])) this.objs[h].push(g);
9099
9244
  else {
9100
9245
  let m = this.objs[h];
9101
- this.objs[h] = [m, _];
9246
+ this.objs[h] = [m, g];
9102
9247
  }
9103
9248
  else {
9104
- const m = _.replace(/"/g, '\\"').replace(/\\:/g, ":").replace(/\\=/g, "=");
9249
+ const m = g.replace(/"/g, '\\"').replace(/\\:/g, ":").replace(/\\=/g, "=");
9105
9250
  this.objs[h] = unescape(JSON.parse('"' + m + '"'));
9106
9251
  }
9107
9252
  }
9108
9253
  }
9109
- addFile(i) {
9110
- let l = e.default.readFileSync(i, "utf-8").split(/\r?\n/), h = this;
9111
- for (let _ = 0; _ < l.length; _++) {
9112
- let m = l[_];
9254
+ addFile(o) {
9255
+ let l = e.default.readFileSync(o, "utf-8").split(/\r?\n/), h = this;
9256
+ for (let g = 0; g < l.length; g++) {
9257
+ let m = l[g];
9113
9258
  for (; m.substring(m.length - 1) === "\\"; ) {
9114
9259
  m = m.slice(0, -1);
9115
- let A = l[_ + 1];
9116
- m = m + A.trim(), _++;
9260
+ let A = l[g + 1];
9261
+ m = m + A.trim(), g++;
9117
9262
  }
9118
9263
  h.makeKeys(m);
9119
9264
  }
9120
9265
  }
9121
- of(...i) {
9122
- for (let c = 0; c < i.length; c++) this.addFile(i[c]);
9266
+ of(...o) {
9267
+ for (let c = 0; c < o.length; c++) this.addFile(o[c]);
9123
9268
  }
9124
- get(i, c) {
9125
- if (this.objs.hasOwnProperty(i)) if (Array.isArray(this.objs[i])) {
9269
+ get(o, c) {
9270
+ if (this.objs.hasOwnProperty(o)) if (Array.isArray(this.objs[o])) {
9126
9271
  let l = [];
9127
- for (let h = 0; h < this.objs[i].length; h++) l[h] = this.interpolate(this.objs[i][h]);
9272
+ for (let h = 0; h < this.objs[o].length; h++) l[h] = this.interpolate(this.objs[o][h]);
9128
9273
  return l;
9129
- } else return typeof this.objs[i] > "u" ? "" : this.interpolate(this.objs[i]);
9274
+ } else return typeof this.objs[o] > "u" ? "" : this.interpolate(this.objs[o]);
9130
9275
  return c;
9131
9276
  }
9132
- getLast(i, c) {
9133
- if (this.objs.hasOwnProperty(i)) if (Array.isArray(this.objs[i])) {
9134
- var l = this.objs[i].length;
9135
- return this.interpolate(this.objs[i][l - 1]);
9136
- } else return typeof this.objs[i] > "u" ? "" : this.interpolate(this.objs[i]);
9277
+ getLast(o, c) {
9278
+ if (this.objs.hasOwnProperty(o)) if (Array.isArray(this.objs[o])) {
9279
+ var l = this.objs[o].length;
9280
+ return this.interpolate(this.objs[o][l - 1]);
9281
+ } else return typeof this.objs[o] > "u" ? "" : this.interpolate(this.objs[o]);
9137
9282
  return c;
9138
9283
  }
9139
- getFirst(i, c) {
9140
- return this.objs.hasOwnProperty(i) ? Array.isArray(this.objs[i]) ? this.interpolate(this.objs[i][0]) : typeof this.objs[i] > "u" ? "" : this.interpolate(this.objs[i]) : c;
9284
+ getFirst(o, c) {
9285
+ return this.objs.hasOwnProperty(o) ? Array.isArray(this.objs[o]) ? this.interpolate(this.objs[o][0]) : typeof this.objs[o] > "u" ? "" : this.interpolate(this.objs[o]) : c;
9141
9286
  }
9142
- getInt(i, c) {
9143
- let l = this.getLast(i);
9287
+ getInt(o, c) {
9288
+ let l = this.getLast(o);
9144
9289
  return l ? parseInt(l, 10) : c;
9145
9290
  }
9146
- getFloat(i, c) {
9147
- let l = this.getLast(i);
9291
+ getFloat(o, c) {
9292
+ let l = this.getLast(o);
9148
9293
  return l ? parseFloat(l) : c;
9149
9294
  }
9150
- getBoolean(i, c) {
9151
- function l(_) {
9152
- return !/^(false|0)$/i.test(_) && !!_;
9295
+ getBoolean(o, c) {
9296
+ function l(g) {
9297
+ return !/^(false|0)$/i.test(g) && !!g;
9153
9298
  }
9154
9299
  s(l, "parseBool");
9155
- let h = this.getLast(i);
9300
+ let h = this.getLast(o);
9156
9301
  return h ? l(h) : c || false;
9157
9302
  }
9158
- set(i, c) {
9159
- this.objs[i] = c;
9303
+ set(o, c) {
9304
+ this.objs[o] = c;
9160
9305
  }
9161
- interpolate(i) {
9306
+ interpolate(o) {
9162
9307
  let c = this;
9163
- return i.replace(/\\\\/g, "\\").replace(/\$\{([A-Za-z0-9\.\-\_]*)\}/g, function(l) {
9308
+ return o.replace(/\\\\/g, "\\").replace(/\$\{([A-Za-z0-9\.\-\_]*)\}/g, function(l) {
9164
9309
  return c.getLast(l.substring(2, l.length - 1));
9165
9310
  });
9166
9311
  }
9167
9312
  getKeys() {
9168
- let i = [];
9169
- for (let c in this.objs) i.push(c);
9170
- return i;
9313
+ let o = [];
9314
+ for (let c in this.objs) o.push(c);
9315
+ return o;
9171
9316
  }
9172
- getMatchingKeys(i) {
9317
+ getMatchingKeys(o) {
9173
9318
  let c = [];
9174
- for (let l in this.objs) l.search(i) !== -1 && c.push(l);
9319
+ for (let l in this.objs) l.search(o) !== -1 && c.push(l);
9175
9320
  return c;
9176
9321
  }
9177
9322
  reset() {
@@ -9179,69 +9324,70 @@ function ra() {
9179
9324
  }
9180
9325
  }
9181
9326
  He.PropertiesFile = r;
9182
- let n = s(function(...i) {
9327
+ let n = s(function(...o) {
9183
9328
  let c = new r();
9184
- return c.of.apply(c, i), c;
9329
+ return c.of.apply(c, o), c;
9185
9330
  }, "of2");
9186
9331
  return He.of = n, He;
9187
9332
  }
9188
- s(ra, "requireDistNode");
9189
- var na = ra(), ia = xr(na);
9190
- const fr = { root: "teamcity.build.workingDir", branch: "teamcity.build.branch" }, Gn = s((e) => {
9333
+ s(ua, "requireDistNode");
9334
+ var la = ua(), fa = kr(la);
9335
+ const hr = { root: "teamcity.build.workingDir", branch: "teamcity.build.branch" }, Fn = s((e) => {
9191
9336
  try {
9192
- return ia.of(e);
9337
+ return fa.of(e);
9193
9338
  } catch {
9194
9339
  return;
9195
9340
  }
9196
- }, "safeReadProperties"), oa = s(({ env: e, cwd: t }) => {
9197
- const r = e.TEAMCITY_BUILD_PROPERTIES_FILE ? Gn(e.TEAMCITY_BUILD_PROPERTIES_FILE) : void 0, n = r ? r.get("teamcity.configuration.properties.file") : void 0, o = n && Gn(n);
9198
- return Object.fromEntries(Object.keys(fr).map((i) => [i, (r ? r.get(fr[i]) : void 0) || (o ? o.get(fr[i]) : void 0) || (i === "branch" ? lr({ env: e, cwd: t }) : void 0)]));
9341
+ }, "safeReadProperties"), ha = s(({ env: e, cwd: t }) => {
9342
+ const r = e.TEAMCITY_BUILD_PROPERTIES_FILE ? Fn(e.TEAMCITY_BUILD_PROPERTIES_FILE) : void 0, n = r ? r.get("teamcity.configuration.properties.file") : void 0, i = n && Fn(n);
9343
+ return Object.fromEntries(Object.keys(hr).map((o) => [o, (r ? r.get(hr[o]) : void 0) || (i ? i.get(hr[o]) : void 0) || (o === "branch" ? fr({ env: e, cwd: t }) : void 0)]));
9199
9344
  }, "getProperties");
9200
- var sa = { detect({ env: e }) {
9345
+ var da = { detect({ env: e }) {
9201
9346
  return !!e.TEAMCITY_VERSION;
9202
9347
  }, configuration({ env: e, cwd: t }) {
9203
- return { name: "TeamCity", service: "teamcity", commit: e.BUILD_VCS_NUMBER, build: e.BUILD_NUMBER, slug: e.TEAMCITY_BUILDCONF_NAME, ...oa({ env: e, cwd: t }) };
9204
- } }, aa = { detect({ env: e }) {
9348
+ return { name: "TeamCity", service: "teamcity", commit: e.BUILD_VCS_NUMBER, build: e.BUILD_NUMBER, slug: e.TEAMCITY_BUILDCONF_NAME, ...ha({ env: e, cwd: t }) };
9349
+ } }, pa = { detect({ env: e }) {
9205
9350
  return !!e.TRAVIS;
9206
9351
  }, configuration({ env: e }) {
9207
9352
  const t = e.TRAVIS_PULL_REQUEST === "false" ? void 0 : e.TRAVIS_PULL_REQUEST, r = !!t;
9208
9353
  return { name: "Travis CI", service: "travis", commit: e.TRAVIS_COMMIT, tag: e.TRAVIS_TAG, build: e.TRAVIS_BUILD_NUMBER, buildUrl: e.TRAVIS_BUILD_WEB_URL, branch: e.TRAVIS_BRANCH, job: e.TRAVIS_JOB_NUMBER, jobUrl: e.TRAVIS_JOB_WEB_URL, pr: t, isPr: r, prBranch: e.TRAVIS_PULL_REQUEST_BRANCH, slug: e.TRAVIS_REPO_SLUG, root: e.TRAVIS_BUILD_DIR };
9209
- } }, ca = { detect({ env: e }) {
9354
+ } }, ma = { detect({ env: e }) {
9210
9355
  return !!e.VELA;
9211
9356
  }, configuration({ env: e }) {
9212
9357
  const t = e.VELA_BUILD_EVENT === "pull_request";
9213
9358
  return { name: "Vela", service: "vela", branch: t ? e.VELA_PULL_REQUEST_TARGET : e.VELA_BUILD_BRANCH, commit: e.VELA_BUILD_COMMIT, tag: e.VELA_BUILD_TAG, build: e.VELA_BUILD_NUMBER, buildUrl: e.VELA_BUILD_LINK, job: void 0, jobUrl: void 0, isPr: t, pr: e.VELA_BUILD_PULL_REQUEST, prBranch: e.VELA_PULL_REQUEST_SOURCE, slug: e.VELA_REPO_FULL_NAME, root: e.VELA_BUILD_WORKSPACE };
9214
- } }, ua = { detect({ env: e }) {
9359
+ } }, Ea = { detect({ env: e }) {
9215
9360
  return !!e.VERCEL || !!e.NOW_GITHUB_DEPLOYMENT;
9216
9361
  }, configuration({ env: e }) {
9217
9362
  const t = "Vercel", r = "vercel";
9218
9363
  return e.VERCEL ? { name: t, service: r, commit: e.VERCEL_GIT_COMMIT_SHA, branch: e.VERCEL_GIT_COMMIT_REF, slug: `${e.VERCEL_GIT_REPO_OWNER}/${e.VERCEL_GIT_REPO_SLUG}` } : { name: t, service: r, commit: e.NOW_GITHUB_COMMIT_SHA, branch: e.NOW_GITHUB_COMMIT_REF, slug: `${e.NOW_GITHUB_ORG}/${e.NOW_GITHUB_REPO}` };
9219
- } }, la = { detect({ env: e }) {
9364
+ } }, _a = { detect({ env: e }) {
9220
9365
  return !!e.WERCKER_MAIN_PIPELINE_STARTED;
9221
9366
  }, configuration({ env: e }) {
9222
9367
  return { name: "Wercker", service: "wercker", commit: e.WERCKER_GIT_COMMIT, build: e.WERCKER_MAIN_PIPELINE_STARTED, buildUrl: e.WERCKER_RUN_URL, branch: e.WERCKER_GIT_BRANCH, slug: `${e.WERCKER_GIT_OWNER}/${e.WERCKER_GIT_REPOSITORY}`, root: e.WERCKER_ROOT };
9223
- } }, fa = { detect({ env: e }) {
9368
+ } }, ga = { detect({ env: e }) {
9224
9369
  return e.CI && e.CI === "woodpecker";
9225
9370
  }, configuration({ env: e }) {
9226
9371
  const t = e.CI_PIPELINE_EVENT === "pull_request";
9227
9372
  return { name: "Woodpecker CI", service: "woodpecker", commit: e.CI_COMMIT_SHA, tag: e.CI_COMMIT_TAG, build: e.CI_PIPELINE_NUMBER, buildUrl: e.CI_PIPELINE_URL, branch: t ? e.CI_COMMIT_TARGET_BRANCH : e.CI_COMMIT_BRANCH, job: e.CI_STEP_NUMBER, jobUrl: e.CI_STEP_URL, pr: e.CI_COMMIT_PULL_REQUEST, isPr: t, prBranch: t ? e.CI_COMMIT_SOURCE_BRANCH : void 0, slug: `${e.CI_REPO_OWNER}/${e.CI_REPO_NAME}`, root: e.CI_WORKSPACE };
9228
- } }, ha = { detect({ env: e }) {
9373
+ } }, Ia = { detect({ env: e }) {
9229
9374
  return !!e.JB_SPACE_EXECUTION_NUMBER;
9230
9375
  }, configuration({ env: e }) {
9231
9376
  const t = e.JB_SPACE_PROJECT_KEY, r = e.JB_SPACE_GIT_REPOSITORY_NAME;
9232
9377
  return { name: "JetBrains Space", service: "jetbrainsSpace", commit: e.JB_SPACE_GIT_REVISION, build: e.JB_SPACE_EXECUTION_NUMBER, branch: ot(e.JB_SPACE_GIT_BRANCH), slug: t && r ? `${t.toLowerCase()}/${r}` : void 0 };
9233
9378
  } };
9234
- const hr = { appveyor: bo, azurePipelines: Co, bamboo: Uo, bitbucket: Bo, bitrise: Oo, buddy: Lo, buildkite: Ds, circleci: Ms, cirrus: xs, cloudflarePages: Gs, codebuild: $s, codefresh: ks, codeship: Hs, drone: Fs, github: Ks, gitlab: Vs, jenkins: Ys, netlify: zs, puppet: Js, sail: Qs, screwdriver: Xs, scrutinizer: Zs, semaphore: ea, shippable: ta, teamcity: sa, travis: aa, vela: ca, vercel: ua, wercker: la, woodpecker: fa, jetbrainsSpace: ha };
9235
- var da = s(({ env: e = process.env, cwd: t = process.cwd() } = {}) => {
9236
- for (const r of Object.keys(hr)) if (hr[r].detect({ env: e, cwd: t })) return { isCi: true, ...hr[r].configuration({ env: e, cwd: t }) };
9237
- return { isCi: !!e.CI, ...js.configuration({ env: e, cwd: t }) };
9238
- }, "envCi");
9239
- function pa() {
9240
- const e = da();
9241
- return { branch: e.branch, commit: { message: Ea(), sha: e.commit }, isCI: e.isCi, pr: ma() };
9242
- }
9243
- s(pa, "getGitInfo");
9244
- function ma() {
9379
+ const dr = { appveyor: No, azurePipelines: Do, bamboo: Mo, bitbucket: xo, bitrise: Go, buddy: $o, buildkite: Fs, circleci: js, cirrus: qs, cloudflarePages: Ws, codebuild: Ks, codefresh: Vs, codeship: Ys, drone: zs, github: Zs, gitlab: ea, jenkins: ta, netlify: ra, puppet: na, sail: ia, screwdriver: oa, scrutinizer: sa, semaphore: aa, shippable: ca, teamcity: da, travis: pa, vela: ma, vercel: Ea, wercker: _a, woodpecker: ga, jetbrainsSpace: Ia };
9380
+ var pr = s(({ env: e = process.env, cwd: t = process.cwd() } = {}) => {
9381
+ for (const r of Object.keys(dr)) if (dr[r].detect({ env: e, cwd: t })) return { isCi: true, ...dr[r].configuration({ env: e, cwd: t }) };
9382
+ return { isCi: !!e.CI, ...Js.configuration({ env: e, cwd: t }) };
9383
+ }, "envCiModule");
9384
+ const Sa = typeof pr == "function" ? pr : pr.default;
9385
+ function Ra() {
9386
+ const e = Sa();
9387
+ return { branch: e.branch, commit: { message: ya(), sha: e.commit }, isCI: e.isCi, pr: Ta() };
9388
+ }
9389
+ s(Ra, "getGitInfo");
9390
+ function Ta() {
9245
9391
  try {
9246
9392
  const e = process.env.GITHUB_EVENT_PATH;
9247
9393
  if (e) {
@@ -9253,30 +9399,30 @@ function ma() {
9253
9399
  return;
9254
9400
  }
9255
9401
  }
9256
- s(ma, "getPRInfo");
9257
- function Ea() {
9402
+ s(Ta, "getPRInfo");
9403
+ function ya() {
9258
9404
  try {
9259
9405
  return require$$0$2.execSync("git log -1 --pretty=%B", { encoding: "utf-8", stdio: ["pipe", "pipe", "ignore"] }).trim();
9260
9406
  } catch {
9261
9407
  return;
9262
9408
  }
9263
9409
  }
9264
- s(Ea, "getLastCommitMessage");
9265
- function _a() {
9266
- return { hostname: Rr.hostname(), platform: Rr.platform() };
9410
+ s(ya, "getLastCommitMessage");
9411
+ function wa() {
9412
+ return { hostname: wr.hostname(), platform: wr.platform() };
9267
9413
  }
9268
- s(_a, "getMachineInfo");
9269
- const ga = new Error("request for lock canceled");
9270
- var Ia = s(function(e, t, r, n) {
9271
- function o(i) {
9272
- return i instanceof r ? i : new r(function(c) {
9273
- c(i);
9414
+ s(wa, "getMachineInfo");
9415
+ const Aa = new Error("request for lock canceled");
9416
+ var va = s(function(e, t, r, n) {
9417
+ function i(o) {
9418
+ return o instanceof r ? o : new r(function(c) {
9419
+ c(o);
9274
9420
  });
9275
9421
  }
9276
- return s(o, "adopt"), new (r || (r = Promise))(function(i, c) {
9422
+ return s(i, "adopt"), new (r || (r = Promise))(function(o, c) {
9277
9423
  function l(m) {
9278
9424
  try {
9279
- _(n.next(m));
9425
+ g(n.next(m));
9280
9426
  } catch (A) {
9281
9427
  c(A);
9282
9428
  }
@@ -9284,37 +9430,37 @@ var Ia = s(function(e, t, r, n) {
9284
9430
  s(l, "fulfilled");
9285
9431
  function h(m) {
9286
9432
  try {
9287
- _(n.throw(m));
9433
+ g(n.throw(m));
9288
9434
  } catch (A) {
9289
9435
  c(A);
9290
9436
  }
9291
9437
  }
9292
9438
  s(h, "rejected");
9293
- function _(m) {
9294
- m.done ? i(m.value) : o(m.value).then(l, h);
9439
+ function g(m) {
9440
+ m.done ? o(m.value) : i(m.value).then(l, h);
9295
9441
  }
9296
- s(_, "step"), _((n = n.apply(e, t || [])).next());
9442
+ s(g, "step"), g((n = n.apply(e, t || [])).next());
9297
9443
  });
9298
9444
  }, "__awaiter$2");
9299
- class Sa {
9445
+ class ba {
9300
9446
  static {
9301
9447
  s(this, "Semaphore");
9302
9448
  }
9303
- constructor(t, r = ga) {
9449
+ constructor(t, r = Aa) {
9304
9450
  this._value = t, this._cancelError = r, this._queue = [], this._weightedWaiters = [];
9305
9451
  }
9306
9452
  acquire(t = 1, r = 0) {
9307
9453
  if (t <= 0) throw new Error(`invalid weight ${t}: must be positive`);
9308
- return new Promise((n, o) => {
9309
- const i = { resolve: n, reject: o, weight: t, priority: r }, c = $n(this._queue, (l) => r <= l.priority);
9310
- c === -1 && t <= this._value ? this._dispatchItem(i) : this._queue.splice(c + 1, 0, i);
9454
+ return new Promise((n, i) => {
9455
+ const o = { resolve: n, reject: i, weight: t, priority: r }, c = jn(this._queue, (l) => r <= l.priority);
9456
+ c === -1 && t <= this._value ? this._dispatchItem(o) : this._queue.splice(c + 1, 0, o);
9311
9457
  });
9312
9458
  }
9313
9459
  runExclusive(t) {
9314
- return Ia(this, arguments, void 0, function* (r, n = 1, o = 0) {
9315
- const [i, c] = yield this.acquire(n, o);
9460
+ return va(this, arguments, void 0, function* (r, n = 1, i = 0) {
9461
+ const [o, c] = yield this.acquire(n, i);
9316
9462
  try {
9317
- return yield r(i);
9463
+ return yield r(o);
9318
9464
  } finally {
9319
9465
  c();
9320
9466
  }
@@ -9323,7 +9469,7 @@ class Sa {
9323
9469
  waitForUnlock(t = 1, r = 0) {
9324
9470
  if (t <= 0) throw new Error(`invalid weight ${t}: must be positive`);
9325
9471
  return this._couldLockImmediately(t, r) ? Promise.resolve() : new Promise((n) => {
9326
- this._weightedWaiters[t - 1] || (this._weightedWaiters[t - 1] = []), Ra(this._weightedWaiters[t - 1], { resolve: n, priority: r });
9472
+ this._weightedWaiters[t - 1] || (this._weightedWaiters[t - 1] = []), Ca(this._weightedWaiters[t - 1], { resolve: n, priority: r });
9327
9473
  });
9328
9474
  }
9329
9475
  isLocked() {
@@ -9365,8 +9511,8 @@ class Sa {
9365
9511
  for (let r = this._value; r > 0; r--) {
9366
9512
  const n = this._weightedWaiters[r - 1];
9367
9513
  if (!n) continue;
9368
- const o = n.findIndex((i) => i.priority <= t);
9369
- (o === -1 ? n : n.splice(0, o)).forEach(((i) => i.resolve()));
9514
+ const i = n.findIndex((o) => o.priority <= t);
9515
+ (i === -1 ? n : n.splice(0, i)).forEach(((o) => o.resolve()));
9370
9516
  }
9371
9517
  }
9372
9518
  }
@@ -9374,26 +9520,26 @@ class Sa {
9374
9520
  return (this._queue.length === 0 || this._queue[0].priority < r) && t <= this._value;
9375
9521
  }
9376
9522
  }
9377
- function Ra(e, t) {
9378
- const r = $n(e, (n) => t.priority <= n.priority);
9523
+ function Ca(e, t) {
9524
+ const r = jn(e, (n) => t.priority <= n.priority);
9379
9525
  e.splice(r + 1, 0, t);
9380
9526
  }
9381
- s(Ra, "insertSorted");
9382
- function $n(e, t) {
9527
+ s(Ca, "insertSorted");
9528
+ function jn(e, t) {
9383
9529
  for (let r = e.length - 1; r >= 0; r--) if (t(e[r])) return r;
9384
9530
  return -1;
9385
9531
  }
9386
- s($n, "findIndexFromEnd");
9387
- var Ta = s(function(e, t, r, n) {
9388
- function o(i) {
9389
- return i instanceof r ? i : new r(function(c) {
9390
- c(i);
9532
+ s(jn, "findIndexFromEnd");
9533
+ var Ua = s(function(e, t, r, n) {
9534
+ function i(o) {
9535
+ return o instanceof r ? o : new r(function(c) {
9536
+ c(o);
9391
9537
  });
9392
9538
  }
9393
- return s(o, "adopt"), new (r || (r = Promise))(function(i, c) {
9539
+ return s(i, "adopt"), new (r || (r = Promise))(function(o, c) {
9394
9540
  function l(m) {
9395
9541
  try {
9396
- _(n.next(m));
9542
+ g(n.next(m));
9397
9543
  } catch (A) {
9398
9544
  c(A);
9399
9545
  }
@@ -9401,27 +9547,27 @@ var Ta = s(function(e, t, r, n) {
9401
9547
  s(l, "fulfilled");
9402
9548
  function h(m) {
9403
9549
  try {
9404
- _(n.throw(m));
9550
+ g(n.throw(m));
9405
9551
  } catch (A) {
9406
9552
  c(A);
9407
9553
  }
9408
9554
  }
9409
9555
  s(h, "rejected");
9410
- function _(m) {
9411
- m.done ? i(m.value) : o(m.value).then(l, h);
9556
+ function g(m) {
9557
+ m.done ? o(m.value) : i(m.value).then(l, h);
9412
9558
  }
9413
- s(_, "step"), _((n = n.apply(e, t || [])).next());
9559
+ s(g, "step"), g((n = n.apply(e, t || [])).next());
9414
9560
  });
9415
9561
  }, "__awaiter$1");
9416
- class wa {
9562
+ class Ba {
9417
9563
  static {
9418
9564
  s(this, "Mutex");
9419
9565
  }
9420
9566
  constructor(t) {
9421
- this._semaphore = new Sa(1, t);
9567
+ this._semaphore = new ba(1, t);
9422
9568
  }
9423
9569
  acquire() {
9424
- return Ta(this, arguments, void 0, function* (t = 0) {
9570
+ return Ua(this, arguments, void 0, function* (t = 0) {
9425
9571
  const [, r] = yield this._semaphore.acquire(1, t);
9426
9572
  return r;
9427
9573
  });
@@ -9442,47 +9588,47 @@ class wa {
9442
9588
  return this._semaphore.cancel();
9443
9589
  }
9444
9590
  }
9445
- function kn(e, t) {
9591
+ function qn(e, t) {
9446
9592
  const r = e.length;
9447
- let n = 0, o = 0;
9448
- const i = new wa();
9449
- return t({ completed: n, errors: o, total: r }), e.map((c) => c.then(async (l) => (await i.runExclusive(() => {
9450
- n++, t({ completed: n, errors: o, total: r });
9593
+ let n = 0, i = 0;
9594
+ const o = new Ba();
9595
+ return t({ completed: n, errors: i, total: r }), e.map((c) => c.then(async (l) => (await o.runExclusive(() => {
9596
+ n++, t({ completed: n, errors: i, total: r });
9451
9597
  }), l)).catch(async (l) => {
9452
- throw await i.runExclusive(() => {
9453
- n++, o++, t({ completed: n, errors: o, total: r });
9598
+ throw await o.runExclusive(() => {
9599
+ n++, i++, t({ completed: n, errors: i, total: r });
9454
9600
  }), l;
9455
9601
  }));
9456
9602
  }
9457
- s(kn, "trackPromiseProgress");
9458
- function ya({ result: e, sensitiveValues: t }) {
9459
- return e.steps.map((r) => Hn({ sensitiveValues: t, step: r }));
9603
+ s(qn, "trackPromiseProgress");
9604
+ function Oa({ result: e, sensitiveValues: t }) {
9605
+ return e.steps.map((r) => Wn({ sensitiveValues: t, step: r }));
9460
9606
  }
9461
- s(ya, "extractSteps");
9462
- function Hn({ sensitiveValues: e, step: t }) {
9463
- const r = s((n) => n && e?.length ? oe({ sensitiveValues: e, str: n }) : n, "scrub");
9464
- return { category: t.category, duration: t.duration, error: t.error ? { message: r(t.error.message) || "Unknown error", stack: r(t.error.stack) } : void 0, location: t.location ? { column: t.location.column, file: t.location.file, line: t.location.line } : void 0, startedAt: new Date(t.startTime), steps: t.steps && t.steps.length > 0 ? t.steps.map((n) => Hn({ sensitiveValues: e, step: n })) : void 0, title: r(t.title) ?? t.title };
9607
+ s(Oa, "extractSteps");
9608
+ function Wn({ sensitiveValues: e, step: t }) {
9609
+ const r = s((n) => n && e?.length ? se({ sensitiveValues: e, str: n }) : n, "scrub");
9610
+ return { category: t.category, duration: t.duration, error: t.error ? { message: r(t.error.message) || "Unknown error", stack: r(t.error.stack) } : void 0, location: t.location ? { column: t.location.column, file: t.location.file, line: t.location.line } : void 0, startedAt: new Date(t.startTime), steps: t.steps && t.steps.length > 0 ? t.steps.map((n) => Wn({ sensitiveValues: e, step: n })) : void 0, title: r(t.title) ?? t.title };
9465
9611
  }
9466
- s(Hn, "extractStep");
9467
- async function Aa({ fileData: e, maxRetries: t = 3, uploadUrl: r }) {
9468
- await pRetry(async () => {
9612
+ s(Wn, "extractStep");
9613
+ async function La({ fileData: e, maxRetries: t = 3, uploadUrl: r }) {
9614
+ await ai(async () => {
9469
9615
  const n = await fetch(r, { body: e, method: "PUT" });
9470
- if (!n.ok) throw n.status >= 400 && n.status < 500 ? new AbortError(`Upload failed with status ${n.status}: ${n.statusText}`) : new Error(`Upload failed with status ${n.status}: ${n.statusText}`);
9616
+ if (!n.ok) throw n.status >= 400 && n.status < 500 ? new pRetryExports.AbortError(`Upload failed with status ${n.status}: ${n.statusText}`) : new Error(`Upload failed with status ${n.status}: ${n.statusText}`);
9471
9617
  }, { minTimeout: 2e3, randomize: true, retries: t });
9472
9618
  }
9473
- s(Aa, "uploadWithRetry");
9474
- const va = process.env.STABLY_WS_URL || "wss://api.stably.ai/reporter", Fn = 120 * 1e3, ba = s(({ notificationConfigs: e, suite: t }) => {
9619
+ s(La, "uploadWithRetry");
9620
+ const Pa = process.env.STABLY_WS_URL || "wss://api.stably.ai/reporter", Kn = 120 * 1e3, Na = s(({ notificationConfigs: e, suite: t }) => {
9475
9621
  if (!e || e.length === 0) return;
9476
- const r = new Set(t.allTests().map((o) => o.parent.project()?.name).filter(Boolean)), n = e.filter((o) => r.has(o.projectName));
9622
+ const r = new Set(t.allTests().map((i) => i.parent.project()?.name).filter(Boolean)), n = e.filter((i) => r.has(i.projectName));
9477
9623
  return n.length > 0 ? n : void 0;
9478
- }, "filterNotificationConfigsByRunningProjects"), Ca = s((e) => e ? { configFile: e.configFile, forbidOnly: e.forbidOnly, fullyParallel: e.fullyParallel, globalSetup: e.globalSetup, globalTeardown: e.globalTeardown, globalTimeout: e.globalTimeout, grep: e.grep?.toString(), grepInvert: e.grepInvert?.toString(), maxFailures: e.maxFailures, metadata: e.metadata, preserveOutput: e.preserveOutput, quiet: e.quiet, reporter: e.reporter, reportSlowTests: e.reportSlowTests, rootDir: e.rootDir, shard: e.shard, updateSnapshots: e.updateSnapshots, version: e.version, webServer: e.webServer, workers: e.workers } : void 0, "extractConfigInfo"), Ua = s(({ absolutePath: e, rootDir: t }) => {
9624
+ }, "filterNotificationConfigsByRunningProjects"), Da = s((e) => e ? { configFile: e.configFile, forbidOnly: e.forbidOnly, fullyParallel: e.fullyParallel, globalSetup: e.globalSetup, globalTeardown: e.globalTeardown, globalTimeout: e.globalTimeout, grep: e.grep?.toString(), grepInvert: e.grepInvert?.toString(), maxFailures: e.maxFailures, metadata: e.metadata, preserveOutput: e.preserveOutput, quiet: e.quiet, reporter: e.reporter, reportSlowTests: e.reportSlowTests, rootDir: e.rootDir, shard: e.shard, updateSnapshots: e.updateSnapshots, version: e.version, webServer: e.webServer, workers: e.workers } : void 0, "extractConfigInfo"), Ma = s(({ absolutePath: e, rootDir: t }) => {
9479
9625
  if (t && e.startsWith(t)) {
9480
9626
  const r = e.slice(t.length);
9481
9627
  return r.startsWith("/") ? r.slice(1) : r;
9482
9628
  }
9483
9629
  return e;
9484
9630
  }, "makePathRelative");
9485
- class jn {
9631
+ class Vn {
9486
9632
  static {
9487
9633
  s(this, "StablyReporter");
9488
9634
  }
@@ -9507,16 +9653,16 @@ class jn {
9507
9653
  if (!r) throw new Error("STABLY_API_KEY is required. Provide it via options or environment variable.");
9508
9654
  if (!n) throw new Error("STABLY_PROJECT_ID is required. Provide it via options or environment variable.");
9509
9655
  if (this.notificationConfigs = t?.notificationConfigs, t?.sensitiveValues?.length) {
9510
- const o = an(t.sensitiveValues);
9511
- this.sensitiveValues = [...o].sort((i, c) => c.length - i.length);
9656
+ const i = ln(t.sensitiveValues);
9657
+ this.sensitiveValues = [...i].sort((o, c) => c.length - o.length);
9512
9658
  }
9513
- this.wsClient = new vo({ apiKey: r, maxBufferSize: 1e3, maxReconnectAttempts: 3, onError: s((o) => this.handleWebSocketError(o), "onError"), onMessage: s((o) => this.handleWebSocketMessage(o), "onMessage"), projectId: n, reconnectDelay: 2e3, url: va });
9659
+ this.wsClient = new Po({ apiKey: r, maxBufferSize: 1e3, maxReconnectAttempts: 3, onError: s((i) => this.handleWebSocketError(i), "onError"), onMessage: s((i) => this.handleWebSocketMessage(i), "onMessage"), projectId: n, reconnectDelay: 2e3, url: Pa });
9514
9660
  }
9515
9661
  onBegin(t, r) {
9516
9662
  if (this.isListMode = process.argv.includes("--list"), this.isListMode) return;
9517
9663
  r.allTests().length === 0 && process.exit(1), this.config = t, this.testSuiteRunId = this.getSuiteRunId(t), this.rootDir = t.rootDir, this.suiteData = this.extractSuiteInfo(t, r);
9518
- const o = ba({ notificationConfigs: this.notificationConfigs, suite: r });
9519
- this.filteredNotificationConfigs = o, this.pendingOperations.push(this.wsClient.sendEvent({ payload: { ...this.suiteData, notificationRequest: o ? { notificationConfigs: o, totalShards: this.config?.shard?.total } : void 0, status: "running" }, type: "suite_start" }));
9664
+ const i = Na({ notificationConfigs: this.notificationConfigs, suite: r });
9665
+ this.filteredNotificationConfigs = i, this.pendingOperations.push(this.wsClient.sendEvent({ payload: { ...this.suiteData, notificationRequest: i ? { notificationConfigs: i, totalShards: this.config?.shard?.total } : void 0, status: "running" }, type: "suite_start" }));
9520
9666
  }
9521
9667
  getSuiteRunId(t) {
9522
9668
  return getCiRunKey() ?? t.metadata?.testSuiteRunId ?? ut();
@@ -9530,16 +9676,16 @@ class jn {
9530
9676
  if (this.isListMode) return;
9531
9677
  const n = this.extractTestCaseInfo(t, r);
9532
9678
  this.testCases.push(n), this.testStepsMap.set(n.id, r);
9533
- const o = ya({ result: r, sensitiveValues: this.sensitiveValues }), i = [...r.attachments, { contentType: "text/plain", name: "source-code", path: t.location.file }], c = (async () => {
9534
- const l = await this.extractAttachmentMetadata({ attachments: i, attemptNumber: n.attemptNumber, testId: n.id });
9535
- let h, _;
9536
- l.length > 0 && (h = `${n.id}-${n.attemptNumber}`, _ = new Promise((m) => {
9679
+ const i = Oa({ result: r, sensitiveValues: this.sensitiveValues }), o = [...r.attachments, { contentType: "text/plain", name: "source-code", path: t.location.file }], c = (async () => {
9680
+ const l = await this.extractAttachmentMetadata({ attachments: o, attemptNumber: n.attemptNumber, testId: n.id });
9681
+ let h, g;
9682
+ l.length > 0 && (h = `${n.id}-${n.attemptNumber}`, g = new Promise((m) => {
9537
9683
  this.pendingUploadUrlRequests.set(h, m);
9538
- }), this.pendingOperations.push(_));
9684
+ }), this.pendingOperations.push(g));
9539
9685
  try {
9540
- await this.wsClient.sendEvent({ payload: { ...n, attachments: l, steps: o }, type: "test_end" });
9686
+ await this.wsClient.sendEvent({ payload: { ...n, attachments: l, steps: i }, type: "test_end" });
9541
9687
  } catch (m) {
9542
- if (h && _) {
9688
+ if (h && g) {
9543
9689
  const A = this.pendingUploadUrlRequests.get(h);
9544
9690
  A && (A(), this.pendingUploadUrlRequests.delete(h));
9545
9691
  }
@@ -9553,24 +9699,24 @@ class jn {
9553
9699
  this.pendingOperations.push(this.wsClient.sendEvent({ payload: { duration: t.duration, notificationRequest: this.filteredNotificationConfigs ? { notificationConfigs: this.filteredNotificationConfigs, totalShards: this.config?.shard?.total } : void 0, status: t.status === "timedout" ? "timedOut" : t.status, suiteId: this.testSuiteRunId }, type: "suite_end" })), Ie$1("[Stably reporter] Waiting for pending tasks to finish...");
9554
9700
  const r = Y$1();
9555
9701
  r.start("Waiting for tasks to finish...");
9556
- const n = Promise.allSettled(kn(this.pendingOperations, ({ completed: h, errors: _, total: m }) => {
9557
- r.message(`${h}/${m} tasks finished${_ > 0 ? `, ${_} errors` : ""}`);
9558
- })), o = new Promise((h, _) => {
9702
+ const n = Promise.allSettled(qn(this.pendingOperations, ({ completed: h, errors: g, total: m }) => {
9703
+ r.message(`${h}/${m} tasks finished${g > 0 ? `, ${g} errors` : ""}`);
9704
+ })), i = new Promise((h, g) => {
9559
9705
  setTimeout(() => {
9560
- _(new Error(`Tasks timeout: Some operations did not complete within ${Fn / 1e3}s`));
9561
- }, Fn);
9706
+ g(new Error(`Tasks timeout: Some operations did not complete within ${Kn / 1e3}s`));
9707
+ }, Kn);
9562
9708
  });
9563
9709
  try {
9564
- await Promise.race([n, o]);
9710
+ await Promise.race([n, i]);
9565
9711
  } catch (h) {
9566
- const _ = h instanceof Error ? h.message : String(h);
9567
- console.warn(`[StablyAI reporter] Tasks timeout reached. Some operations may still be pending: ${_}`);
9712
+ const g = h instanceof Error ? h.message : String(h);
9713
+ console.warn(`[StablyAI reporter] Tasks timeout reached. Some operations may still be pending: ${g}`);
9568
9714
  }
9569
9715
  this.wsClient.flushBuffer(), r.stop("All tasks finished");
9570
- const i = Y$1();
9571
- i.start("Waiting for file uploads to finish..."), await Promise.allSettled(kn(this.pendingUploads, ({ completed: h, errors: _, total: m }) => {
9572
- i.message(`${h}/${m} uploads finished${_ > 0 ? `, ${_} errors` : ""}`);
9573
- })), i.stop("All file uploads finished"), this.wsClient.close();
9716
+ const o = Y$1();
9717
+ o.start("Waiting for file uploads to finish..."), await Promise.allSettled(qn(this.pendingUploads, ({ completed: h, errors: g, total: m }) => {
9718
+ o.message(`${h}/${m} uploads finished${g > 0 ? `, ${g} errors` : ""}`);
9719
+ })), o.stop("All file uploads finished"), this.wsClient.close();
9574
9720
  const c = this.createdSuiteRun?.name || this.suiteData?.title || "Test Suite", l = t.status === "failed" || t.status === "timedout";
9575
9721
  Se$1(Ce.cyan(`\u2728 Suite "${Ce.bold(c)}" run complete!${this.createdSuiteRun ? `
9576
9722
  \u{1F4CA} View results: ${Ce.bold(Ce.underline(this.createdSuiteRun.url))}` : ""}${l ? `
@@ -9579,34 +9725,51 @@ class jn {
9579
9725
  ${Ce.bold(Ce.underline(`stably fix ${this.testSuiteRunId}`))}` : ""}`));
9580
9726
  }
9581
9727
  scrubSensitiveString(t) {
9582
- return !t || !this.sensitiveValues?.length ? t : oe({ sensitiveValues: this.sensitiveValues, str: t });
9728
+ return !t || !this.sensitiveValues?.length ? t : se({ sensitiveValues: this.sensitiveValues, str: t });
9583
9729
  }
9584
9730
  extractSuiteInfo(t, r) {
9585
- const n = pa(), o = _a(), i = /* @__PURE__ */ new Date();
9586
- return { id: ut(), projectSettings: Ca(t), startedAt: i, suiteId: this.testSuiteRunId, title: r.title || "Playwright Test Suite", createdAt: i, git: { branch: n.branch, commit: { message: n.commit.message, sha: n.commit.sha }, pr: n.pr }, isCI: n.isCI, shards: t.shard?.total ?? 1, workers: t.workers, machineInfo: o, updatedAt: i };
9731
+ const n = Ra(), i = wa(), o = /* @__PURE__ */ new Date();
9732
+ return { id: ut(), projectSettings: Da(t), startedAt: o, suiteId: this.testSuiteRunId, title: r.title || "Playwright Test Suite", createdAt: o, git: { branch: n.branch, commit: { message: n.commit.message, sha: n.commit.sha }, pr: n.pr }, isCI: n.isCI, shards: t.shard?.total ?? 1, workers: t.workers, machineInfo: i, updatedAt: o };
9587
9733
  }
9588
9734
  extractTestCaseInfo(t, r) {
9589
- const n = Ua({ absolutePath: t.location.file, rootDir: this.rootDir }), o = t.parent.project(), i = o?.name, c = o?.use?.defaultBrowserType;
9590
- return { fullTitle: this.scrubSensitiveString(t.titlePath().join(" \u203A ")) ?? "", id: ut(), location: `${n}:${t.location.line}:${t.location.column}`, suiteId: this.testSuiteRunId, testIdentifier: t.id, title: this.scrubSensitiveString(t.title) ?? t.title, browserName: c, duration: r.duration, expectedStatus: t.expectedStatus, finishedAt: r.startTime && r.duration ? new Date(r.startTime.getTime() + r.duration) : void 0, outcome: t.outcome(), projectName: i, startedAt: new Date(r.startTime), status: r.status, attemptNumber: r.retry + 1, maxRetries: t.retries, retryCount: r.retry, errorMessage: this.scrubSensitiveString(r.error?.message), errorStack: this.scrubSensitiveString(r.error?.stack), errorType: r.error?.value, annotations: t.annotations.length > 0 ? t.annotations : void 0, tags: t.tags.length > 0 ? t.tags : void 0 };
9735
+ const n = Ma({ absolutePath: t.location.file, rootDir: this.rootDir }), i = t.parent.project(), o = i?.name, c = i?.use?.defaultBrowserType;
9736
+ return { fullTitle: this.scrubSensitiveString(t.titlePath().join(" \u203A ")) ?? "", id: ut(), location: `${n}:${t.location.line}:${t.location.column}`, suiteId: this.testSuiteRunId, testIdentifier: t.id, title: this.scrubSensitiveString(t.title) ?? t.title, browserName: c, duration: r.duration, expectedStatus: t.expectedStatus, finishedAt: r.startTime && r.duration ? new Date(r.startTime.getTime() + r.duration) : void 0, outcome: t.outcome(), projectName: o, startedAt: new Date(r.startTime), status: r.status, attemptNumber: r.retry + 1, maxRetries: t.retries, retryCount: r.retry, errorMessage: this.scrubSensitiveString(r.error?.message), errorStack: this.scrubSensitiveString(r.error?.stack), errorType: r.error?.value, annotations: t.annotations.length > 0 ? t.annotations : void 0, tags: t.tags.length > 0 ? t.tags : void 0 };
9591
9737
  }
9592
9738
  async extractAttachmentMetadata({ attachments: t, attemptNumber: r, testId: n }) {
9593
- const o = [];
9594
- for (const i of t) try {
9595
- let c;
9596
- if (i.body) c = Buffer.from(i.body);
9597
- else if (i.path) c = ze.readFileSync(i.path);
9598
- else continue;
9599
- i.name === "trace" && this.sensitiveValues && this.sensitiveValues.length > 0 && (c = Buffer.from(await wo({ sensitiveValues: this.sensitiveValues, traceBuffer: c })));
9600
- const h = ut(), _ = `${n}-${r}-${h}`;
9601
- this.attachmentFiles.set(_, c), o.push({ artifactId: h, attemptNumber: r, contentType: i.contentType, name: i.name, sizeBytes: c.length, testId: n });
9602
- } catch (c) {
9603
- const l = c instanceof Error ? c.message : String(c);
9604
- console.error(`[StablyAI reporter] Failed to read attachment ${i.name}: ${l}`);
9605
- }
9606
- return o;
9739
+ return (await Promise.all(t.map((o) => this.processAttachment({ attachment: o, attemptNumber: r, testId: n })))).filter((o) => o !== void 0);
9740
+ }
9741
+ async processAttachment({ attachment: t, attemptNumber: r, testId: n }) {
9742
+ let i;
9743
+ try {
9744
+ i = t.name === "trace" && t.path && this.sensitiveValues && this.sensitiveValues.length > 0 ? ze.openSync(t.path, "r") : void 0;
9745
+ const o = await this.getAttachmentFileData({ attachment: t, traceFd: i });
9746
+ if (!o) return;
9747
+ const c = ut(), l = `${n}-${r}-${c}`;
9748
+ return this.attachmentFiles.set(l, o), { artifactId: c, attemptNumber: r, contentType: t.contentType, name: t.name, sizeBytes: o.length, testId: n };
9749
+ } catch (o) {
9750
+ const c = o instanceof Error ? o.message : String(o);
9751
+ console.error(`[StablyAI reporter] Failed to read attachment ${t.name}: ${c}`);
9752
+ return;
9753
+ } finally {
9754
+ if (i !== void 0) try {
9755
+ ze.closeSync(i);
9756
+ } catch {
9757
+ }
9758
+ }
9759
+ }
9760
+ async getAttachmentFileData({ attachment: t, traceFd: r }) {
9761
+ if (!t.path && !t.body) return;
9762
+ if (t.name === "trace" && this.sensitiveValues && this.sensitiveValues.length > 0) {
9763
+ const i = t.path ? await this.scrubTraceFromFile({ attachmentPath: t.path, sensitiveValues: this.sensitiveValues, traceFd: r }) : t.body ? await zt({ sensitiveValues: this.sensitiveValues, traceBuffer: Buffer.from(t.body) }) : void 0;
9764
+ return i ? Buffer.from(i) : void 0;
9765
+ }
9766
+ return t.body ? Buffer.from(t.body) : t.path ? ze.readFileSync(t.path) : void 0;
9767
+ }
9768
+ async scrubTraceFromFile({ attachmentPath: t, sensitiveValues: r, traceFd: n }) {
9769
+ return n !== void 0 ? Lo({ sensitiveValues: r, traceFd: n, tracePath: t }) : Oo({ sensitiveValues: r, tracePath: t });
9607
9770
  }
9608
9771
  handleWebSocketError(t) {
9609
- t.code === fn.AUTHENTICATION_FAILED && (console.error(Ce.bold(Ce.red("[StablyAI reporter] Could not authenticate with the server. Either the API Key or Project ID is invalid. These can be provided via stablyReporter({ apiKey, projectId }) in playwright.config.ts or environment variables (STABLY_API_KEY, STABLY_PROJECT_ID). You can find your API key and Project ID at https://app.stably.ai/settings?tab=api-key"))), process.exit(1)), console.error("[StablyAI reporter] Could not connect to the server. Please check your internet connection and try again."), process.exit(1);
9772
+ t.code === mn.AUTHENTICATION_FAILED && (console.error(Ce.bold(Ce.red("[StablyAI reporter] Could not authenticate with the server. Either the API Key or Project ID is invalid. These can be provided via stablyReporter({ apiKey, projectId }) in playwright.config.ts or environment variables (STABLY_API_KEY, STABLY_PROJECT_ID). You can find your API key and Project ID at https://app.stably.ai/settings?tab=api-key"))), process.exit(1)), console.error("[StablyAI reporter] Could not connect to the server. Please check your internet connection and try again."), process.exit(1);
9610
9773
  }
9611
9774
  handleWebSocketMessage(t) {
9612
9775
  if (t.type === "suite_created") this.createdSuiteRun = { id: t.id, name: t.name, url: t.url };
@@ -9614,28 +9777,28 @@ class jn {
9614
9777
  const r = `${t.testId}-${t.attemptNumber}`, n = this.pendingUploadUrlRequests.get(r);
9615
9778
  if (!n) return;
9616
9779
  n(), this.pendingUploadUrlRequests.delete(r);
9617
- const o = this.uploadAttachments(t.testId, t.attemptNumber, t.uploadUrls);
9618
- this.pendingUploads.push(o);
9780
+ const i = this.uploadAttachments(t.testId, t.attemptNumber, t.uploadUrls);
9781
+ this.pendingUploads.push(i);
9619
9782
  }
9620
9783
  }
9621
9784
  async uploadAttachments(t, r, n) {
9622
- const o = n.map(async ({ artifactId: i, name: c, uploadUrl: l }) => {
9623
- const h = `${t}-${r}-${i}`, _ = this.attachmentFiles.get(h);
9624
- if (_) try {
9625
- await Aa({ fileData: _, maxRetries: 3, uploadUrl: l }), this.attachmentFiles.delete(h);
9785
+ const i = n.map(async ({ artifactId: o, name: c, uploadUrl: l }) => {
9786
+ const h = `${t}-${r}-${o}`, g = this.attachmentFiles.get(h);
9787
+ if (g) try {
9788
+ await La({ fileData: g, maxRetries: 3, uploadUrl: l }), this.attachmentFiles.delete(h);
9626
9789
  } catch (m) {
9627
9790
  const A = m instanceof Error ? m.message : String(m);
9628
9791
  console.error(`[StablyAI reporter] Failed to upload ${c} after retries: ${A}`);
9629
9792
  }
9630
9793
  });
9631
- await Promise.allSettled(o);
9794
+ await Promise.allSettled(i);
9632
9795
  }
9633
9796
  }
9634
- function Ba(e) {
9797
+ function xa(e) {
9635
9798
  return ["@stablyai/playwright-test/reporter", e];
9636
9799
  }
9637
- s(Ba, "stablyReporter");
9800
+ s(xa, "stablyReporter");
9638
9801
 
9639
- exports.Ba = Ba;
9640
- exports.jn = jn;
9641
- //# sourceMappingURL=index-DVywK-2d.cjs.map
9802
+ exports.Vn = Vn;
9803
+ exports.xa = xa;
9804
+ //# sourceMappingURL=index-Covr1y-4.cjs.map