@stablyai/playwright-test 2.1.6-rc.0 → 2.1.7-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-TM-RzPBX.cjs → index-DmGj704j.cjs} +824 -794
- package/dist/index-DmGj704j.cjs.map +1 -0
- package/dist/{index-DvmLEDsu.mjs → index-PsgSMFzY.mjs} +818 -788
- package/dist/index-PsgSMFzY.mjs.map +1 -0
- package/dist/index.cjs +6 -6
- package/dist/index.d-BYzcguUj.d.cts.map +1 -1
- package/dist/index.d-BYzcguUj.d.mts.map +1 -1
- package/dist/index.d-BYzcguUj.d.ts.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/reporter.cjs +3 -3
- package/dist/reporter.mjs +3 -3
- package/package.json +4 -4
- package/dist/index-DvmLEDsu.mjs.map +0 -1
- package/dist/index-TM-RzPBX.cjs.map +0 -1
|
@@ -3,8 +3,8 @@ import path from 'node:path';
|
|
|
3
3
|
import childProcess from 'node:child_process';
|
|
4
4
|
import y, { stdout, stdin } from 'node:process';
|
|
5
5
|
import require$$0$2, { spawnSync, execSync } from 'child_process';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import Ke from 'path';
|
|
7
|
+
import qe, { mkdirSync, writeFileSync, openSync, closeSync, readFileSync as readFileSync$1 } from 'fs';
|
|
8
8
|
import { fileURLToPath } from 'node:url';
|
|
9
9
|
import { constants as constants$1 } from 'node:os';
|
|
10
10
|
import { readFileSync, createReadStream } from 'node:fs';
|
|
@@ -13,8 +13,9 @@ import require$$0 from 'stream';
|
|
|
13
13
|
import { debuglog, TextDecoder as TextDecoder$1, TextEncoder as TextEncoder$1 } from 'node:util';
|
|
14
14
|
import * as g from 'node:readline';
|
|
15
15
|
import 'node:stream';
|
|
16
|
+
import Et from 'os';
|
|
16
17
|
import require$$7, { fileURLToPath as fileURLToPath$1 } from 'url';
|
|
17
|
-
import
|
|
18
|
+
import Fn from 'util';
|
|
18
19
|
import require$$0$4 from 'events';
|
|
19
20
|
import require$$1$1 from 'https';
|
|
20
21
|
import require$$2 from 'http';
|
|
@@ -23,7 +24,6 @@ import require$$4 from 'tls';
|
|
|
23
24
|
import require$$1 from 'crypto';
|
|
24
25
|
import require$$0$1 from 'zlib';
|
|
25
26
|
import require$$0$3 from 'buffer';
|
|
26
|
-
import fr from 'os';
|
|
27
27
|
|
|
28
28
|
var appveyor = {
|
|
29
29
|
detect({ env }) {
|
|
@@ -170,7 +170,7 @@ function requireWindows() {
|
|
|
170
170
|
hasRequiredWindows = 1;
|
|
171
171
|
windows = isexe;
|
|
172
172
|
isexe.sync = sync;
|
|
173
|
-
var fs =
|
|
173
|
+
var fs = qe;
|
|
174
174
|
function checkPathExt(path2, options) {
|
|
175
175
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
176
176
|
if (!pathext) {
|
|
@@ -211,7 +211,7 @@ function requireMode() {
|
|
|
211
211
|
hasRequiredMode = 1;
|
|
212
212
|
mode = isexe;
|
|
213
213
|
isexe.sync = sync;
|
|
214
|
-
var fs =
|
|
214
|
+
var fs = qe;
|
|
215
215
|
function isexe(path2, options, cb) {
|
|
216
216
|
fs.stat(path2, function(er, stat) {
|
|
217
217
|
cb(er, er ? false : checkStat(stat, options));
|
|
@@ -299,7 +299,7 @@ function requireWhich() {
|
|
|
299
299
|
if (hasRequiredWhich) return which_1;
|
|
300
300
|
hasRequiredWhich = 1;
|
|
301
301
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
302
|
-
const path2 =
|
|
302
|
+
const path2 = Ke;
|
|
303
303
|
const COLON = isWindows ? ";" : ":";
|
|
304
304
|
const isexe = requireIsexe();
|
|
305
305
|
const getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -412,7 +412,7 @@ var hasRequiredResolveCommand;
|
|
|
412
412
|
function requireResolveCommand() {
|
|
413
413
|
if (hasRequiredResolveCommand) return resolveCommand_1;
|
|
414
414
|
hasRequiredResolveCommand = 1;
|
|
415
|
-
const path2 =
|
|
415
|
+
const path2 = Ke;
|
|
416
416
|
const which = requireWhich();
|
|
417
417
|
const getPathKey = requirePathKey();
|
|
418
418
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -507,7 +507,7 @@ var hasRequiredReadShebang;
|
|
|
507
507
|
function requireReadShebang() {
|
|
508
508
|
if (hasRequiredReadShebang) return readShebang_1;
|
|
509
509
|
hasRequiredReadShebang = 1;
|
|
510
|
-
const fs =
|
|
510
|
+
const fs = qe;
|
|
511
511
|
const shebangCommand2 = requireShebangCommand();
|
|
512
512
|
function readShebang(command) {
|
|
513
513
|
const size = 150;
|
|
@@ -529,7 +529,7 @@ var hasRequiredParse;
|
|
|
529
529
|
function requireParse() {
|
|
530
530
|
if (hasRequiredParse) return parse_1;
|
|
531
531
|
hasRequiredParse = 1;
|
|
532
|
-
const path2 =
|
|
532
|
+
const path2 = Ke;
|
|
533
533
|
const resolveCommand = requireResolveCommand();
|
|
534
534
|
const escape = require_escape();
|
|
535
535
|
const readShebang = requireReadShebang();
|
|
@@ -2035,7 +2035,7 @@ function requireDistNode() {
|
|
|
2035
2035
|
value: true
|
|
2036
2036
|
});
|
|
2037
2037
|
distNode.of = distNode.PropertiesFile = void 0;
|
|
2038
|
-
var _fs = _interopRequireDefault(
|
|
2038
|
+
var _fs = _interopRequireDefault(qe);
|
|
2039
2039
|
function _interopRequireDefault(obj) {
|
|
2040
2040
|
return obj && obj.__esModule ? obj : {
|
|
2041
2041
|
default: obj
|
|
@@ -6709,31 +6709,31 @@ function requirePRetry () {
|
|
|
6709
6709
|
}
|
|
6710
6710
|
|
|
6711
6711
|
var pRetryExports = requirePRetry();
|
|
6712
|
-
var
|
|
6712
|
+
var Vn = /*@__PURE__*/getDefaultExportFromCjs(pRetryExports);
|
|
6713
6713
|
|
|
6714
|
-
var
|
|
6715
|
-
var a = (e, t) =>
|
|
6714
|
+
var Bn = Object.defineProperty;
|
|
6715
|
+
var a = (e, t) => Bn(e, "name", { value: t, configurable: true });
|
|
6716
6716
|
const rt = BigInt(2 ** 32 - 1), hr = BigInt(32);
|
|
6717
|
-
function
|
|
6717
|
+
function Jn(e, t = false) {
|
|
6718
6718
|
return t ? { h: Number(e & rt), l: Number(e >> hr & rt) } : { h: Number(e >> hr & rt) | 0, l: Number(e & rt) | 0 };
|
|
6719
6719
|
}
|
|
6720
|
-
a(
|
|
6721
|
-
function
|
|
6720
|
+
a(Jn, "fromBig");
|
|
6721
|
+
function zn(e, t = false) {
|
|
6722
6722
|
const r = e.length;
|
|
6723
6723
|
let n = new Uint32Array(r), i = new Uint32Array(r);
|
|
6724
6724
|
for (let o = 0; o < r; o++) {
|
|
6725
|
-
const { h: c, l } =
|
|
6725
|
+
const { h: c, l } = Jn(e[o], t);
|
|
6726
6726
|
[n[o], i[o]] = [c, l];
|
|
6727
6727
|
}
|
|
6728
6728
|
return [n, i];
|
|
6729
6729
|
}
|
|
6730
|
-
a(
|
|
6731
|
-
const
|
|
6730
|
+
a(zn, "split");
|
|
6731
|
+
const Qn = a((e, t, r) => e << r | t >>> 32 - r, "rotlSH"), Xn = a((e, t, r) => t << r | e >>> 32 - r, "rotlSL"), Zn = a((e, t, r) => t << r - 32 | e >>> 64 - r, "rotlBH"), ei = a((e, t, r) => e << r - 32 | t >>> 64 - r, "rotlBL");
|
|
6732
6732
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
6733
|
-
function
|
|
6733
|
+
function ti(e) {
|
|
6734
6734
|
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
|
|
6735
6735
|
}
|
|
6736
|
-
a(
|
|
6736
|
+
a(ti, "isBytes");
|
|
6737
6737
|
function dr(e, t = "") {
|
|
6738
6738
|
if (!Number.isSafeInteger(e) || e < 0) {
|
|
6739
6739
|
const r = t && `"${t}" `;
|
|
@@ -6742,7 +6742,7 @@ function dr(e, t = "") {
|
|
|
6742
6742
|
}
|
|
6743
6743
|
a(dr, "anumber");
|
|
6744
6744
|
function _t(e, t, r = "") {
|
|
6745
|
-
const n =
|
|
6745
|
+
const n = ti(e), i = e?.length;
|
|
6746
6746
|
if (!n || t !== void 0) {
|
|
6747
6747
|
const c = r && `"${r}" `, l = "", p = n ? `length=${i}` : `type=${typeof e}`;
|
|
6748
6748
|
throw new Error(c + "expected Uint8Array" + l + ", got " + p);
|
|
@@ -6755,67 +6755,67 @@ function pr(e, t = true) {
|
|
|
6755
6755
|
if (t && e.finished) throw new Error("Hash#digest() has already been called");
|
|
6756
6756
|
}
|
|
6757
6757
|
a(pr, "aexists");
|
|
6758
|
-
function
|
|
6758
|
+
function ri(e, t) {
|
|
6759
6759
|
_t(e, void 0, "digestInto() output");
|
|
6760
6760
|
const r = t.outputLen;
|
|
6761
6761
|
if (e.length < r) throw new Error('"digestInto() output" expected to be of length >=' + r);
|
|
6762
6762
|
}
|
|
6763
|
-
a(
|
|
6764
|
-
function
|
|
6763
|
+
a(ri, "aoutput");
|
|
6764
|
+
function ni(e) {
|
|
6765
6765
|
return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
|
|
6766
6766
|
}
|
|
6767
|
-
a(
|
|
6767
|
+
a(ni, "u32");
|
|
6768
6768
|
function mr(...e) {
|
|
6769
6769
|
for (let t = 0; t < e.length; t++) e[t].fill(0);
|
|
6770
6770
|
}
|
|
6771
6771
|
a(mr, "clean");
|
|
6772
|
-
const
|
|
6773
|
-
function
|
|
6772
|
+
const ii = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
6773
|
+
function oi(e) {
|
|
6774
6774
|
return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
|
|
6775
6775
|
}
|
|
6776
|
-
a(
|
|
6777
|
-
function
|
|
6778
|
-
for (let t = 0; t < e.length; t++) e[t] =
|
|
6776
|
+
a(oi, "byteSwap");
|
|
6777
|
+
function si(e) {
|
|
6778
|
+
for (let t = 0; t < e.length; t++) e[t] = oi(e[t]);
|
|
6779
6779
|
return e;
|
|
6780
6780
|
}
|
|
6781
|
-
a(
|
|
6782
|
-
const Er =
|
|
6783
|
-
function
|
|
6781
|
+
a(si, "byteSwap32");
|
|
6782
|
+
const Er = ii ? (e) => e : si;
|
|
6783
|
+
function ai(e, t = {}) {
|
|
6784
6784
|
const r = a((i, o) => e(o).update(i).digest(), "hashC"), n = e(void 0);
|
|
6785
6785
|
return r.outputLen = n.outputLen, r.blockLen = n.blockLen, r.create = (i) => e(i), Object.assign(r, t), Object.freeze(r);
|
|
6786
6786
|
}
|
|
6787
|
-
a(
|
|
6788
|
-
const
|
|
6787
|
+
a(ai, "createHasher");
|
|
6788
|
+
const ci = a((e) => ({ oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, e]) }), "oidNist"), ui = BigInt(0), We = BigInt(1), li = BigInt(2), fi = BigInt(7), hi = BigInt(256), di = BigInt(113), gr = [], _r = [], Ir = [];
|
|
6789
6789
|
for (let e = 0, t = We, r = 1, n = 0; e < 24; e++) {
|
|
6790
|
-
[r, n] = [n, (2 * r + 3 * n) % 5],
|
|
6791
|
-
let i =
|
|
6792
|
-
for (let o = 0; o < 7; o++) t = (t << We ^ (t >>
|
|
6790
|
+
[r, n] = [n, (2 * r + 3 * n) % 5], gr.push(2 * (5 * n + r)), _r.push((e + 1) * (e + 2) / 2 % 64);
|
|
6791
|
+
let i = ui;
|
|
6792
|
+
for (let o = 0; o < 7; o++) t = (t << We ^ (t >> fi) * di) % hi, t & li && (i ^= We << (We << BigInt(o)) - We);
|
|
6793
6793
|
Ir.push(i);
|
|
6794
6794
|
}
|
|
6795
|
-
const Sr =
|
|
6796
|
-
function
|
|
6795
|
+
const Sr = zn(Ir, true), pi = Sr[0], mi = Sr[1], Rr = a((e, t, r) => r > 32 ? Zn(e, t, r) : Qn(e, t, r), "rotlH"), Tr = a((e, t, r) => r > 32 ? ei(e, t, r) : Xn(e, t, r), "rotlL");
|
|
6796
|
+
function Ei(e, t = 24) {
|
|
6797
6797
|
const r = new Uint32Array(10);
|
|
6798
6798
|
for (let n = 24 - t; n < 24; n++) {
|
|
6799
6799
|
for (let c = 0; c < 10; c++) r[c] = e[c] ^ e[c + 10] ^ e[c + 20] ^ e[c + 30] ^ e[c + 40];
|
|
6800
6800
|
for (let c = 0; c < 10; c += 2) {
|
|
6801
|
-
const l = (c + 8) % 10, p = (c + 2) % 10, E = r[p], h = r[p + 1], T = Rr(E, h, 1) ^ r[l],
|
|
6802
|
-
for (let
|
|
6801
|
+
const l = (c + 8) % 10, p = (c + 2) % 10, E = r[p], h = r[p + 1], T = Rr(E, h, 1) ^ r[l], v = Tr(E, h, 1) ^ r[l + 1];
|
|
6802
|
+
for (let C = 0; C < 50; C += 10) e[c + C] ^= T, e[c + C + 1] ^= v;
|
|
6803
6803
|
}
|
|
6804
6804
|
let i = e[2], o = e[3];
|
|
6805
6805
|
for (let c = 0; c < 24; c++) {
|
|
6806
|
-
const l =
|
|
6806
|
+
const l = _r[c], p = Rr(i, o, l), E = Tr(i, o, l), h = gr[c];
|
|
6807
6807
|
i = e[h], o = e[h + 1], e[h] = p, e[h + 1] = E;
|
|
6808
6808
|
}
|
|
6809
6809
|
for (let c = 0; c < 50; c += 10) {
|
|
6810
6810
|
for (let l = 0; l < 10; l++) r[l] = e[c + l];
|
|
6811
6811
|
for (let l = 0; l < 10; l++) e[c + l] ^= ~r[(l + 2) % 10] & r[(l + 4) % 10];
|
|
6812
6812
|
}
|
|
6813
|
-
e[0] ^=
|
|
6813
|
+
e[0] ^= pi[n], e[1] ^= mi[n];
|
|
6814
6814
|
}
|
|
6815
6815
|
mr(r);
|
|
6816
6816
|
}
|
|
6817
|
-
a(
|
|
6818
|
-
class
|
|
6817
|
+
a(Ei, "keccakP");
|
|
6818
|
+
class ir {
|
|
6819
6819
|
static {
|
|
6820
6820
|
a(this, "Keccak");
|
|
6821
6821
|
}
|
|
@@ -6832,13 +6832,13 @@ class nr {
|
|
|
6832
6832
|
rounds;
|
|
6833
6833
|
constructor(t, r, n, i = false, o = 24) {
|
|
6834
6834
|
if (this.blockLen = t, this.suffix = r, this.outputLen = n, this.enableXOF = i, this.rounds = o, dr(n, "outputLen"), !(0 < t && t < 200)) throw new Error("only keccak-f1600 function is supported");
|
|
6835
|
-
this.state = new Uint8Array(200), this.state32 =
|
|
6835
|
+
this.state = new Uint8Array(200), this.state32 = ni(this.state);
|
|
6836
6836
|
}
|
|
6837
6837
|
clone() {
|
|
6838
6838
|
return this._cloneInto();
|
|
6839
6839
|
}
|
|
6840
6840
|
keccak() {
|
|
6841
|
-
Er(this.state32),
|
|
6841
|
+
Er(this.state32), Ei(this.state32, this.rounds), Er(this.state32), this.posOut = 0, this.pos = 0;
|
|
6842
6842
|
}
|
|
6843
6843
|
update(t) {
|
|
6844
6844
|
pr(this), _t(t);
|
|
@@ -6874,7 +6874,7 @@ class nr {
|
|
|
6874
6874
|
return dr(t), this.xofInto(new Uint8Array(t));
|
|
6875
6875
|
}
|
|
6876
6876
|
digestInto(t) {
|
|
6877
|
-
if (
|
|
6877
|
+
if (ri(t, this), this.finished) throw new Error("digest() was already called");
|
|
6878
6878
|
return this.writeInto(t), this.destroy(), t;
|
|
6879
6879
|
}
|
|
6880
6880
|
digest() {
|
|
@@ -6885,15 +6885,15 @@ class nr {
|
|
|
6885
6885
|
}
|
|
6886
6886
|
_cloneInto(t) {
|
|
6887
6887
|
const { blockLen: r, suffix: n, outputLen: i, rounds: o, enableXOF: c } = this;
|
|
6888
|
-
return t ||= new
|
|
6888
|
+
return t ||= new ir(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;
|
|
6889
6889
|
}
|
|
6890
6890
|
}
|
|
6891
|
-
const gi = a((e, t, r, n = {}) =>
|
|
6892
|
-
var
|
|
6891
|
+
const gi = a((e, t, r, n = {}) => ai(() => new ir(t, e, r), n), "genKeccak"), _i = gi(6, 72, 64, ci(10));
|
|
6892
|
+
var Ii = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, It = Math.ceil, ue = Math.floor, oe = "[BigNumber Error] ", yr = oe + "Number primitive has more than 15 significant digits: ", pe = 1e14, G = 14, St = 9007199254740991, Rt = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], Ce = 1e7, ee = 1e9;
|
|
6893
6893
|
function wr(e) {
|
|
6894
|
-
var t, r, n, i = w.prototype = { constructor: w, toString: null, valueOf: null }, o = new w(1), c = 20, l = 4, p = -7, E = 21, h = -1e7, T = 1e7,
|
|
6894
|
+
var t, r, n, i = w.prototype = { constructor: w, toString: null, valueOf: null }, o = new w(1), c = 20, l = 4, p = -7, E = 21, h = -1e7, T = 1e7, v = false, C = 1, D = 0, M = { prefix: "", groupSize: 3, secondaryGroupSize: 0, groupSeparator: ",", decimalSeparator: ".", fractionGroupSize: 0, fractionGroupSeparator: "\xA0", suffix: "" }, b = "0123456789abcdefghijklmnopqrstuvwxyz", P = true;
|
|
6895
6895
|
function w(s, u) {
|
|
6896
|
-
var f,
|
|
6896
|
+
var f, _, m, I, y, d, g, S, R = this;
|
|
6897
6897
|
if (!(R instanceof w)) return new w(s, u);
|
|
6898
6898
|
if (u == null) {
|
|
6899
6899
|
if (s && s._isBigNumber === true) {
|
|
@@ -6908,20 +6908,20 @@ function wr(e) {
|
|
|
6908
6908
|
}
|
|
6909
6909
|
S = String(s);
|
|
6910
6910
|
} else {
|
|
6911
|
-
if (!
|
|
6911
|
+
if (!Ii.test(S = String(s))) return n(R, S, d);
|
|
6912
6912
|
R.s = S.charCodeAt(0) == 45 ? (S = S.slice(1), -1) : 1;
|
|
6913
6913
|
}
|
|
6914
6914
|
(I = S.indexOf(".")) > -1 && (S = S.replace(".", "")), (y = S.search(/e/i)) > 0 ? (I < 0 && (I = y), I += +S.slice(y + 1), S = S.substring(0, y)) : I < 0 && (I = S.length);
|
|
6915
6915
|
} else {
|
|
6916
|
-
if (J(u, 2, b.length, "Base"), u == 10 &&
|
|
6916
|
+
if (J(u, 2, b.length, "Base"), u == 10 && P) return R = new w(s), k(R, c + R.e + 1, l);
|
|
6917
6917
|
if (S = String(s), d = typeof s == "number") {
|
|
6918
6918
|
if (s * 0 != 0) return n(R, S, d, u);
|
|
6919
6919
|
if (R.s = 1 / s < 0 ? (S = S.slice(1), -1) : 1, w.DEBUG && S.replace(/^0\.0*|\./, "").length > 15) throw Error(yr + s);
|
|
6920
6920
|
} else R.s = S.charCodeAt(0) === 45 ? (S = S.slice(1), -1) : 1;
|
|
6921
|
-
for (f = b.slice(0, u), I = y = 0,
|
|
6922
|
-
if (
|
|
6921
|
+
for (f = b.slice(0, u), I = y = 0, g = S.length; y < g; y++) if (f.indexOf(_ = S.charAt(y)) < 0) {
|
|
6922
|
+
if (_ == ".") {
|
|
6923
6923
|
if (y > I) {
|
|
6924
|
-
I =
|
|
6924
|
+
I = g;
|
|
6925
6925
|
continue;
|
|
6926
6926
|
}
|
|
6927
6927
|
} else if (!m && (S == S.toUpperCase() && (S = S.toLowerCase()) || S == S.toLowerCase() && (S = S.toUpperCase()))) {
|
|
@@ -6933,16 +6933,16 @@ function wr(e) {
|
|
|
6933
6933
|
d = false, S = r(S, u, 10, R.s), (I = S.indexOf(".")) > -1 ? S = S.replace(".", "") : I = S.length;
|
|
6934
6934
|
}
|
|
6935
6935
|
for (y = 0; S.charCodeAt(y) === 48; y++) ;
|
|
6936
|
-
for (
|
|
6937
|
-
if (S = S.slice(y, ++
|
|
6938
|
-
if (
|
|
6936
|
+
for (g = S.length; S.charCodeAt(--g) === 48; ) ;
|
|
6937
|
+
if (S = S.slice(y, ++g)) {
|
|
6938
|
+
if (g -= y, d && w.DEBUG && g > 15 && (s > St || s !== ue(s))) throw Error(yr + R.s * s);
|
|
6939
6939
|
if ((I = I - y - 1) > T) R.c = R.e = null;
|
|
6940
6940
|
else if (I < h) R.c = [R.e = 0];
|
|
6941
6941
|
else {
|
|
6942
|
-
if (R.e = I, R.c = [], y = (I + 1) % G, I < 0 && (y += G), y <
|
|
6943
|
-
for (y && R.c.push(+S.slice(0, y)),
|
|
6942
|
+
if (R.e = I, R.c = [], y = (I + 1) % G, I < 0 && (y += G), y < g) {
|
|
6943
|
+
for (y && R.c.push(+S.slice(0, y)), g -= G; y < g; ) R.c.push(+S.slice(y, y += G));
|
|
6944
6944
|
y = G - (S = S.slice(y)).length;
|
|
6945
|
-
} else y -=
|
|
6945
|
+
} else y -= g;
|
|
6946
6946
|
for (; y--; S += "0") ;
|
|
6947
6947
|
R.c.push(+S);
|
|
6948
6948
|
}
|
|
@@ -6954,32 +6954,32 @@ function wr(e) {
|
|
|
6954
6954
|
if (s.hasOwnProperty(u = "DECIMAL_PLACES") && (f = s[u], J(f, 0, ee, u), c = f), s.hasOwnProperty(u = "ROUNDING_MODE") && (f = s[u], J(f, 0, 8, u), l = f), s.hasOwnProperty(u = "EXPONENTIAL_AT") && (f = s[u], f && f.pop ? (J(f[0], -ee, 0, u), J(f[1], 0, ee, u), p = f[0], E = f[1]) : (J(f, -ee, ee, u), p = -(E = f < 0 ? -f : f))), s.hasOwnProperty(u = "RANGE")) if (f = s[u], f && f.pop) J(f[0], -ee, -1, u), J(f[1], 1, ee, u), h = f[0], T = f[1];
|
|
6955
6955
|
else if (J(f, -ee, ee, u), f) h = -(T = f < 0 ? -f : f);
|
|
6956
6956
|
else throw Error(oe + u + " cannot be zero: " + f);
|
|
6957
|
-
if (s.hasOwnProperty(u = "CRYPTO")) if (f = s[u], f === !!f) if (f) if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
|
|
6958
|
-
else throw
|
|
6959
|
-
else
|
|
6957
|
+
if (s.hasOwnProperty(u = "CRYPTO")) if (f = s[u], f === !!f) if (f) if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes)) v = f;
|
|
6958
|
+
else throw v = !f, Error(oe + "crypto unavailable");
|
|
6959
|
+
else v = f;
|
|
6960
6960
|
else throw Error(oe + u + " not true or false: " + f);
|
|
6961
|
-
if (s.hasOwnProperty(u = "MODULO_MODE") && (f = s[u], J(f, 0, 9, u),
|
|
6961
|
+
if (s.hasOwnProperty(u = "MODULO_MODE") && (f = s[u], J(f, 0, 9, u), C = f), s.hasOwnProperty(u = "POW_PRECISION") && (f = s[u], J(f, 0, ee, u), D = f), s.hasOwnProperty(u = "FORMAT")) if (f = s[u], typeof f == "object") M = f;
|
|
6962
6962
|
else throw Error(oe + u + " not an object: " + f);
|
|
6963
|
-
if (s.hasOwnProperty(u = "ALPHABET")) if (f = s[u], typeof f == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(f))
|
|
6963
|
+
if (s.hasOwnProperty(u = "ALPHABET")) if (f = s[u], typeof f == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(f)) P = f.slice(0, 10) == "0123456789", b = f;
|
|
6964
6964
|
else throw Error(oe + u + " invalid: " + f);
|
|
6965
6965
|
} else throw Error(oe + "Object expected: " + s);
|
|
6966
|
-
return { DECIMAL_PLACES: c, ROUNDING_MODE: l, EXPONENTIAL_AT: [p, E], RANGE: [h, T], CRYPTO:
|
|
6966
|
+
return { DECIMAL_PLACES: c, ROUNDING_MODE: l, EXPONENTIAL_AT: [p, E], RANGE: [h, T], CRYPTO: v, MODULO_MODE: C, POW_PRECISION: D, FORMAT: M, ALPHABET: b };
|
|
6967
6967
|
}, w.isBigNumber = function(s) {
|
|
6968
6968
|
if (!s || s._isBigNumber !== true) return false;
|
|
6969
6969
|
if (!w.DEBUG) return true;
|
|
6970
|
-
var u, f,
|
|
6971
|
-
e: if ({}.toString.call(
|
|
6970
|
+
var u, f, _ = s.c, m = s.e, I = s.s;
|
|
6971
|
+
e: if ({}.toString.call(_) == "[object Array]") {
|
|
6972
6972
|
if ((I === 1 || I === -1) && m >= -ee && m <= ee && m === ue(m)) {
|
|
6973
|
-
if (
|
|
6974
|
-
if (m === 0 &&
|
|
6973
|
+
if (_[0] === 0) {
|
|
6974
|
+
if (m === 0 && _.length === 1) return true;
|
|
6975
6975
|
break e;
|
|
6976
6976
|
}
|
|
6977
|
-
if (u = (m + 1) % G, u < 1 && (u += G), String(
|
|
6978
|
-
for (u = 0; u <
|
|
6977
|
+
if (u = (m + 1) % G, u < 1 && (u += G), String(_[0]).length == u) {
|
|
6978
|
+
for (u = 0; u < _.length; u++) if (f = _[u], f < 0 || f >= pe || f !== ue(f)) break e;
|
|
6979
6979
|
if (f !== 0) return true;
|
|
6980
6980
|
}
|
|
6981
6981
|
}
|
|
6982
|
-
} else if (
|
|
6982
|
+
} else if (_ === null && m === null && (I === null || I === 1 || I === -1)) return true;
|
|
6983
6983
|
throw Error(oe + "Invalid BigNumber: " + s);
|
|
6984
6984
|
}, w.maximum = w.max = function() {
|
|
6985
6985
|
return x(arguments, -1);
|
|
@@ -6992,21 +6992,21 @@ function wr(e) {
|
|
|
6992
6992
|
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
6993
6993
|
};
|
|
6994
6994
|
return function(f) {
|
|
6995
|
-
var
|
|
6996
|
-
if (f == null ? f = c : J(f, 0, ee), y =
|
|
6997
|
-
for (
|
|
6998
|
-
|
|
6995
|
+
var _, m, I, y, d, g = 0, S = [], R = new w(o);
|
|
6996
|
+
if (f == null ? f = c : J(f, 0, ee), y = It(f / G), v) if (crypto.getRandomValues) {
|
|
6997
|
+
for (_ = crypto.getRandomValues(new Uint32Array(y *= 2)); g < y; ) d = _[g] * 131072 + (_[g + 1] >>> 11), d >= 9e15 ? (m = crypto.getRandomValues(new Uint32Array(2)), _[g] = m[0], _[g + 1] = m[1]) : (S.push(d % 1e14), g += 2);
|
|
6998
|
+
g = y / 2;
|
|
6999
6999
|
} else if (crypto.randomBytes) {
|
|
7000
|
-
for (
|
|
7001
|
-
|
|
7002
|
-
} else throw
|
|
7003
|
-
if (!
|
|
7004
|
-
for (y = S[--
|
|
7005
|
-
if (
|
|
7000
|
+
for (_ = crypto.randomBytes(y *= 7); g < y; ) d = (_[g] & 31) * 281474976710656 + _[g + 1] * 1099511627776 + _[g + 2] * 4294967296 + _[g + 3] * 16777216 + (_[g + 4] << 16) + (_[g + 5] << 8) + _[g + 6], d >= 9e15 ? crypto.randomBytes(7).copy(_, g) : (S.push(d % 1e14), g += 7);
|
|
7001
|
+
g = y / 7;
|
|
7002
|
+
} else throw v = false, Error(oe + "crypto unavailable");
|
|
7003
|
+
if (!v) for (; g < y; ) d = u(), d < 9e15 && (S[g++] = d % 1e14);
|
|
7004
|
+
for (y = S[--g], f %= G, y && f && (d = Rt[G - f], S[g] = ue(y / d) * d); S[g] === 0; S.pop(), g--) ;
|
|
7005
|
+
if (g < 0) S = [I = 0];
|
|
7006
7006
|
else {
|
|
7007
7007
|
for (I = -1; S[0] === 0; S.splice(0, 1), I -= G) ;
|
|
7008
|
-
for (
|
|
7009
|
-
|
|
7008
|
+
for (g = 1, d = S[0]; d >= 10; d /= 10, g++) ;
|
|
7009
|
+
g < G && (I -= G - g);
|
|
7010
7010
|
}
|
|
7011
7011
|
return R.e = I, R.c = S, R;
|
|
7012
7012
|
};
|
|
@@ -7015,20 +7015,20 @@ function wr(e) {
|
|
|
7015
7015
|
return f;
|
|
7016
7016
|
}, r = (function() {
|
|
7017
7017
|
var s = "0123456789";
|
|
7018
|
-
function u(f,
|
|
7019
|
-
for (var y, d = [0],
|
|
7020
|
-
for (
|
|
7018
|
+
function u(f, _, m, I) {
|
|
7019
|
+
for (var y, d = [0], g, S = 0, R = f.length; S < R; ) {
|
|
7020
|
+
for (g = d.length; g--; d[g] *= _) ;
|
|
7021
7021
|
for (d[0] += I.indexOf(f.charAt(S++)), y = 0; y < d.length; y++) d[y] > m - 1 && (d[y + 1] == null && (d[y + 1] = 0), d[y + 1] += d[y] / m | 0, d[y] %= m);
|
|
7022
7022
|
}
|
|
7023
7023
|
return d.reverse();
|
|
7024
7024
|
}
|
|
7025
|
-
return a(u, "toBaseOut"), function(f,
|
|
7026
|
-
var d,
|
|
7027
|
-
for (j >= 0 && (R = D, D = 0, f = f.replace(".", ""), $ = new w(
|
|
7025
|
+
return a(u, "toBaseOut"), function(f, _, m, I, y) {
|
|
7026
|
+
var d, g, S, R, A, O, B, $, j = f.indexOf("."), q = c, N = l;
|
|
7027
|
+
for (j >= 0 && (R = D, D = 0, f = f.replace(".", ""), $ = new w(_), O = $.pow(f.length - j), D = R, $.c = u(ye(fe(O.c), O.e, "0"), 10, m, s), $.e = $.c.length), B = u(f, _, m, y ? (d = b, s) : (d = s, b)), S = R = B.length; B[--R] == 0; B.pop()) ;
|
|
7028
7028
|
if (!B[0]) return d.charAt(0);
|
|
7029
|
-
if (j < 0 ? --S : (
|
|
7029
|
+
if (j < 0 ? --S : (O.c = B, O.e = S, O.s = I, O = t(O, $, q, N, m), B = O.c, A = O.r, S = O.e), g = S + q + 1, j = B[g], R = m / 2, A = A || g < 0 || B[g + 1] != null, A = N < 4 ? (j != null || A) && (N == 0 || N == (O.s < 0 ? 3 : 2)) : j > R || j == R && (N == 4 || A || N == 6 && B[g - 1] & 1 || N == (O.s < 0 ? 8 : 7)), g < 1 || !B[0]) f = A ? ye(d.charAt(1), -q, d.charAt(0)) : d.charAt(0);
|
|
7030
7030
|
else {
|
|
7031
|
-
if (B.length =
|
|
7031
|
+
if (B.length = g, A) for (--m; ++B[--g] > m; ) B[g] = 0, g || (++S, B = [1].concat(B));
|
|
7032
7032
|
for (R = B.length; !B[--R]; ) ;
|
|
7033
7033
|
for (j = 0, f = ""; j <= R; f += d.charAt(B[j++])) ;
|
|
7034
7034
|
f = ye(f, S, d.charAt(0));
|
|
@@ -7036,41 +7036,41 @@ function wr(e) {
|
|
|
7036
7036
|
return f;
|
|
7037
7037
|
};
|
|
7038
7038
|
})(), t = (function() {
|
|
7039
|
-
function s(
|
|
7040
|
-
var y, d,
|
|
7041
|
-
for (
|
|
7042
|
-
return R && (
|
|
7039
|
+
function s(_, m, I) {
|
|
7040
|
+
var y, d, g, S, R = 0, A = _.length, O = m % Ce, B = m / Ce | 0;
|
|
7041
|
+
for (_ = _.slice(); A--; ) g = _[A] % Ce, S = _[A] / Ce | 0, y = B * g + S * O, d = O * g + y % Ce * Ce + R, R = (d / I | 0) + (y / Ce | 0) + B * S, _[A] = d % I;
|
|
7042
|
+
return R && (_ = [R].concat(_)), _;
|
|
7043
7043
|
}
|
|
7044
7044
|
a(s, "multiply");
|
|
7045
|
-
function u(
|
|
7046
|
-
var d,
|
|
7047
|
-
if (I != y)
|
|
7048
|
-
else for (d =
|
|
7049
|
-
|
|
7045
|
+
function u(_, m, I, y) {
|
|
7046
|
+
var d, g;
|
|
7047
|
+
if (I != y) g = I > y ? 1 : -1;
|
|
7048
|
+
else for (d = g = 0; d < I; d++) if (_[d] != m[d]) {
|
|
7049
|
+
g = _[d] > m[d] ? 1 : -1;
|
|
7050
7050
|
break;
|
|
7051
7051
|
}
|
|
7052
|
-
return
|
|
7052
|
+
return g;
|
|
7053
7053
|
}
|
|
7054
7054
|
a(u, "compare2");
|
|
7055
|
-
function f(
|
|
7056
|
-
for (var d = 0; I--; )
|
|
7057
|
-
for (; !
|
|
7058
|
-
}
|
|
7059
|
-
return a(f, "subtract"), function(
|
|
7060
|
-
var
|
|
7061
|
-
if (!Z || !Z[0] || !z || !z[0]) return new w(!
|
|
7062
|
-
for (j = new w(X), q = j.c = [], S =
|
|
7055
|
+
function f(_, m, I, y) {
|
|
7056
|
+
for (var d = 0; I--; ) _[I] -= d, d = _[I] < m[I] ? 1 : 0, _[I] = d * y + _[I] - m[I];
|
|
7057
|
+
for (; !_[0] && _.length > 1; _.splice(0, 1)) ;
|
|
7058
|
+
}
|
|
7059
|
+
return a(f, "subtract"), function(_, m, I, y, d) {
|
|
7060
|
+
var g, S, R, A, O, B, $, j, q, N, H, Y, he, be, ve, re, de, X = _.s == m.s ? 1 : -1, Z = _.c, z = m.c;
|
|
7061
|
+
if (!Z || !Z[0] || !z || !z[0]) return new w(!_.s || !m.s || (Z ? z && Z[0] == z[0] : !z) ? NaN : Z && Z[0] == 0 || !z ? X * 0 : X / 0);
|
|
7062
|
+
for (j = new w(X), q = j.c = [], S = _.e - m.e, X = I + S + 1, d || (d = pe, S = le(_.e / G) - le(m.e / G), X = X / G | 0), R = 0; z[R] == (Z[R] || 0); R++) ;
|
|
7063
7063
|
if (z[R] > (Z[R] || 0) && S--, X < 0) q.push(1), A = true;
|
|
7064
7064
|
else {
|
|
7065
|
-
for (be = Z.length, re = z.length, R = 0, X += 2,
|
|
7066
|
-
de = z.slice(), de = [0].concat(de),
|
|
7065
|
+
for (be = Z.length, re = z.length, R = 0, X += 2, O = ue(d / (z[0] + 1)), O > 1 && (z = s(z, O, d), Z = s(Z, O, d), re = z.length, be = Z.length), he = re, N = Z.slice(0, re), H = N.length; H < re; N[H++] = 0) ;
|
|
7066
|
+
de = z.slice(), de = [0].concat(de), ve = z[0], z[1] >= d / 2 && ve++;
|
|
7067
7067
|
do {
|
|
7068
|
-
if (
|
|
7069
|
-
if (Y = N[0], re != H && (Y = Y * d + (N[1] || 0)),
|
|
7070
|
-
else
|
|
7071
|
-
if ($ < H && (B = [0].concat(B)), f(N, B, H, d), H = N.length,
|
|
7072
|
-
} else
|
|
7073
|
-
q[R++] =
|
|
7068
|
+
if (O = 0, g = u(z, N, re, H), g < 0) {
|
|
7069
|
+
if (Y = N[0], re != H && (Y = Y * d + (N[1] || 0)), O = ue(Y / ve), O > 1) for (O >= d && (O = d - 1), B = s(z, O, d), $ = B.length, H = N.length; u(B, N, $, H) == 1; ) O--, f(B, re < $ ? de : z, $, d), $ = B.length, g = 1;
|
|
7070
|
+
else O == 0 && (g = O = 1), B = z.slice(), $ = B.length;
|
|
7071
|
+
if ($ < H && (B = [0].concat(B)), f(N, B, H, d), H = N.length, g == -1) for (; u(z, N, re, H) < 1; ) O++, f(N, re < H ? de : z, H, d), H = N.length;
|
|
7072
|
+
} else g === 0 && (O++, N = [0]);
|
|
7073
|
+
q[R++] = O, N[0] ? N[H++] = Z[he] || 0 : (N = [Z[he]], H = 1);
|
|
7074
7074
|
} while ((he++ < be || N[0] != null) && X--);
|
|
7075
7075
|
A = N[0] != null, q[0] || q.splice(0, 1);
|
|
7076
7076
|
}
|
|
@@ -7081,60 +7081,60 @@ function wr(e) {
|
|
|
7081
7081
|
return j;
|
|
7082
7082
|
};
|
|
7083
7083
|
})();
|
|
7084
|
-
function
|
|
7085
|
-
var m, I, y, d,
|
|
7084
|
+
function L(s, u, f, _) {
|
|
7085
|
+
var m, I, y, d, g;
|
|
7086
7086
|
if (f == null ? f = l : J(f, 0, 8), !s.c) return s.toString();
|
|
7087
|
-
if (m = s.c[0], y = s.e, u == null)
|
|
7088
|
-
else if (s = k(new w(s), u, f), I = s.e,
|
|
7089
|
-
for (; d < u;
|
|
7090
|
-
|
|
7091
|
-
} else if (u -= y + (
|
|
7092
|
-
if (--u > 0) for (
|
|
7093
|
-
} else if (u += I - d, u > 0) for (I + 1 == d && (
|
|
7094
|
-
return s.s < 0 && m ? "-" +
|
|
7095
|
-
}
|
|
7096
|
-
a(
|
|
7087
|
+
if (m = s.c[0], y = s.e, u == null) g = fe(s.c), g = _ == 1 || _ == 2 && (y <= p || y >= E) ? it(g, y) : ye(g, y, "0");
|
|
7088
|
+
else if (s = k(new w(s), u, f), I = s.e, g = fe(s.c), d = g.length, _ == 1 || _ == 2 && (u <= I || I <= p)) {
|
|
7089
|
+
for (; d < u; g += "0", d++) ;
|
|
7090
|
+
g = it(g, I);
|
|
7091
|
+
} else if (u -= y + (_ === 2 && I > y), g = ye(g, I, "0"), I + 1 > d) {
|
|
7092
|
+
if (--u > 0) for (g += "."; u--; g += "0") ;
|
|
7093
|
+
} else if (u += I - d, u > 0) for (I + 1 == d && (g += "."); u--; g += "0") ;
|
|
7094
|
+
return s.s < 0 && m ? "-" + g : g;
|
|
7095
|
+
}
|
|
7096
|
+
a(L, "format");
|
|
7097
7097
|
function x(s, u) {
|
|
7098
|
-
for (var f,
|
|
7098
|
+
for (var f, _, m = 1, I = new w(s[0]); m < s.length; m++) _ = new w(s[m]), (!_.s || (f = Me(I, _)) === u || f === 0 && I.s === u) && (I = _);
|
|
7099
7099
|
return I;
|
|
7100
7100
|
}
|
|
7101
7101
|
a(x, "maxOrMin");
|
|
7102
7102
|
function U(s, u, f) {
|
|
7103
|
-
for (var
|
|
7104
|
-
for (m = u[0]; m >= 10; m /= 10,
|
|
7105
|
-
return (f =
|
|
7103
|
+
for (var _ = 1, m = u.length; !u[--m]; u.pop()) ;
|
|
7104
|
+
for (m = u[0]; m >= 10; m /= 10, _++) ;
|
|
7105
|
+
return (f = _ + f * G - 1) > T ? s.c = s.e = null : f < h ? s.c = [s.e = 0] : (s.e = f, s.c = u), s;
|
|
7106
7106
|
}
|
|
7107
7107
|
a(U, "normalise"), n = /* @__PURE__ */ (function() {
|
|
7108
|
-
var s = /^(-?)0([xbo])(?=\w[\w.]*$)/i, u = /^([^.]+)\.$/, f = /^\.([^.]+)$/,
|
|
7109
|
-
return function(I, y, d,
|
|
7108
|
+
var s = /^(-?)0([xbo])(?=\w[\w.]*$)/i, u = /^([^.]+)\.$/, f = /^\.([^.]+)$/, _ = /^-?(Infinity|NaN)$/, m = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
7109
|
+
return function(I, y, d, g) {
|
|
7110
7110
|
var S, R = d ? y : y.replace(m, "");
|
|
7111
|
-
if (
|
|
7111
|
+
if (_.test(R)) I.s = isNaN(R) ? null : R < 0 ? -1 : 1;
|
|
7112
7112
|
else {
|
|
7113
|
-
if (!d && (R = R.replace(s, function(A,
|
|
7114
|
-
return S = (B = B.toLowerCase()) == "x" ? 16 : B == "b" ? 2 : 8, !
|
|
7115
|
-
}),
|
|
7116
|
-
if (w.DEBUG) throw Error(oe + "Not a" + (
|
|
7113
|
+
if (!d && (R = R.replace(s, function(A, O, B) {
|
|
7114
|
+
return S = (B = B.toLowerCase()) == "x" ? 16 : B == "b" ? 2 : 8, !g || g == S ? O : A;
|
|
7115
|
+
}), g && (S = g, R = R.replace(u, "$1").replace(f, "0.$1")), y != R)) return new w(R, S);
|
|
7116
|
+
if (w.DEBUG) throw Error(oe + "Not a" + (g ? " base " + g : "") + " number: " + y);
|
|
7117
7117
|
I.s = null;
|
|
7118
7118
|
}
|
|
7119
7119
|
I.c = I.e = null;
|
|
7120
7120
|
};
|
|
7121
7121
|
})();
|
|
7122
|
-
function k(s, u, f,
|
|
7123
|
-
var m, I, y, d,
|
|
7122
|
+
function k(s, u, f, _) {
|
|
7123
|
+
var m, I, y, d, g, S, R, A = s.c, O = Rt;
|
|
7124
7124
|
if (A) {
|
|
7125
7125
|
e: {
|
|
7126
7126
|
for (m = 1, d = A[0]; d >= 10; d /= 10, m++) ;
|
|
7127
|
-
if (I = u - m, I < 0) I += G, y = u,
|
|
7128
|
-
else if (S =
|
|
7127
|
+
if (I = u - m, I < 0) I += G, y = u, g = A[S = 0], R = ue(g / O[m - y - 1] % 10);
|
|
7128
|
+
else if (S = It((I + 1) / G), S >= A.length) if (_) {
|
|
7129
7129
|
for (; A.length <= S; A.push(0)) ;
|
|
7130
|
-
|
|
7130
|
+
g = R = 0, m = 1, I %= G, y = I - G + 1;
|
|
7131
7131
|
} else break e;
|
|
7132
7132
|
else {
|
|
7133
|
-
for (
|
|
7134
|
-
I %= G, y = I - G + m, R = y < 0 ? 0 : ue(
|
|
7133
|
+
for (g = d = A[S], m = 1; d >= 10; d /= 10, m++) ;
|
|
7134
|
+
I %= G, y = I - G + m, R = y < 0 ? 0 : ue(g / O[m - y - 1] % 10);
|
|
7135
7135
|
}
|
|
7136
|
-
if (
|
|
7137
|
-
if (I == 0 ? (A.length = S, d = 1, S--) : (A.length = S + 1, d =
|
|
7136
|
+
if (_ = _ || u < 0 || A[S + 1] != null || (y < 0 ? g : g % O[m - y - 1]), _ = f < 4 ? (R || _) && (f == 0 || f == (s.s < 0 ? 3 : 2)) : R > 5 || R == 5 && (f == 4 || _ || f == 6 && (I > 0 ? y > 0 ? g / O[m - y] : 0 : A[S - 1]) % 10 & 1 || f == (s.s < 0 ? 8 : 7)), u < 1 || !A[0]) return A.length = 0, _ ? (u -= s.e + 1, A[0] = O[(G - u % G) % G], s.e = -u || 0) : A[0] = s.e = 0, s;
|
|
7137
|
+
if (I == 0 ? (A.length = S, d = 1, S--) : (A.length = S + 1, d = O[G - I], A[S] = y > 0 ? ue(g / O[m - y] % O[y]) * d : 0), _) for (; ; ) if (S == 0) {
|
|
7138
7138
|
for (I = 1, y = A[0]; y >= 10; y /= 10, I++) ;
|
|
7139
7139
|
for (y = A[0] += d, d = 1; y >= 10; y /= 10, d++) ;
|
|
7140
7140
|
I != d && (s.e++, A[0] == pe && (A[0] = 1));
|
|
@@ -7160,30 +7160,30 @@ function wr(e) {
|
|
|
7160
7160
|
}, i.comparedTo = function(s, u) {
|
|
7161
7161
|
return Me(this, new w(s, u));
|
|
7162
7162
|
}, i.decimalPlaces = i.dp = function(s, u) {
|
|
7163
|
-
var f,
|
|
7163
|
+
var f, _, m, I = this;
|
|
7164
7164
|
if (s != null) return J(s, 0, ee), u == null ? u = l : J(u, 0, 8), k(new w(I), s + I.e + 1, u);
|
|
7165
7165
|
if (!(f = I.c)) return null;
|
|
7166
|
-
if (
|
|
7167
|
-
return
|
|
7166
|
+
if (_ = ((m = f.length - 1) - le(this.e / G)) * G, m = f[m]) for (; m % 10 == 0; m /= 10, _--) ;
|
|
7167
|
+
return _ < 0 && (_ = 0), _;
|
|
7168
7168
|
}, i.dividedBy = i.div = function(s, u) {
|
|
7169
7169
|
return t(this, new w(s, u), c, l);
|
|
7170
7170
|
}, i.dividedToIntegerBy = i.idiv = function(s, u) {
|
|
7171
7171
|
return t(this, new w(s, u), 0, 1);
|
|
7172
7172
|
}, i.exponentiatedBy = i.pow = function(s, u) {
|
|
7173
|
-
var f,
|
|
7173
|
+
var f, _, m, I, y, d, g, S, R, A = this;
|
|
7174
7174
|
if (s = new w(s), s.c && !s.isInteger()) throw Error(oe + "Exponent not an integer: " + F(s));
|
|
7175
7175
|
if (u != null && (u = new w(u)), d = s.e > 14, !A.c || !A.c[0] || A.c[0] == 1 && !A.e && A.c.length == 1 || !s.c || !s.c[0]) return R = new w(Math.pow(+F(A), d ? s.s * (2 - nt(s)) : +F(s))), u ? R.mod(u) : R;
|
|
7176
|
-
if (
|
|
7176
|
+
if (g = s.s < 0, u) {
|
|
7177
7177
|
if (u.c ? !u.c[0] : !u.s) return new w(NaN);
|
|
7178
|
-
|
|
7178
|
+
_ = !g && A.isInteger() && u.isInteger(), _ && (A = A.mod(u));
|
|
7179
7179
|
} else {
|
|
7180
|
-
if (s.e > 9 && (A.e > 0 || A.e < -1 || (A.e == 0 ? A.c[0] > 1 || d && A.c[1] >= 24e7 : A.c[0] < 8e13 || d && A.c[0] <= 9999975e7))) return I = A.s < 0 && nt(s) ? -0 : 0, A.e > -1 && (I = 1 / I), new w(
|
|
7181
|
-
D && (I =
|
|
7180
|
+
if (s.e > 9 && (A.e > 0 || A.e < -1 || (A.e == 0 ? A.c[0] > 1 || d && A.c[1] >= 24e7 : A.c[0] < 8e13 || d && A.c[0] <= 9999975e7))) return I = A.s < 0 && nt(s) ? -0 : 0, A.e > -1 && (I = 1 / I), new w(g ? 1 / I : I);
|
|
7181
|
+
D && (I = It(D / G + 2));
|
|
7182
7182
|
}
|
|
7183
|
-
for (d ? (f = new w(0.5),
|
|
7183
|
+
for (d ? (f = new w(0.5), g && (s.s = 1), S = nt(s)) : (m = Math.abs(+F(s)), S = m % 2), R = new w(o); ; ) {
|
|
7184
7184
|
if (S) {
|
|
7185
7185
|
if (R = R.times(A), !R.c) break;
|
|
7186
|
-
I ? R.c.length > I && (R.c.length = I) :
|
|
7186
|
+
I ? R.c.length > I && (R.c.length = I) : _ && (R = R.mod(u));
|
|
7187
7187
|
}
|
|
7188
7188
|
if (m) {
|
|
7189
7189
|
if (m = ue(m / 2), m === 0) break;
|
|
@@ -7193,9 +7193,9 @@ function wr(e) {
|
|
|
7193
7193
|
if (m = +F(s), m === 0) break;
|
|
7194
7194
|
S = m % 2;
|
|
7195
7195
|
}
|
|
7196
|
-
A = A.times(A), I ? A.c && A.c.length > I && (A.c.length = I) :
|
|
7196
|
+
A = A.times(A), I ? A.c && A.c.length > I && (A.c.length = I) : _ && (A = A.mod(u));
|
|
7197
7197
|
}
|
|
7198
|
-
return
|
|
7198
|
+
return _ ? R : (g && (R = o.div(R)), u ? R.mod(u) : I ? k(R, D, l, y) : R);
|
|
7199
7199
|
}, i.integerValue = function(s) {
|
|
7200
7200
|
var u = new w(this);
|
|
7201
7201
|
return s == null ? s = l : J(s, 0, 8), k(u, u.e + 1, s);
|
|
@@ -7222,82 +7222,82 @@ function wr(e) {
|
|
|
7222
7222
|
}, i.isZero = function() {
|
|
7223
7223
|
return !!this.c && this.c[0] == 0;
|
|
7224
7224
|
}, i.minus = function(s, u) {
|
|
7225
|
-
var f,
|
|
7225
|
+
var f, _, m, I, y = this, d = y.s;
|
|
7226
7226
|
if (s = new w(s, u), u = s.s, !d || !u) return new w(NaN);
|
|
7227
7227
|
if (d != u) return s.s = -u, y.plus(s);
|
|
7228
|
-
var
|
|
7229
|
-
if (!
|
|
7228
|
+
var g = y.e / G, S = s.e / G, R = y.c, A = s.c;
|
|
7229
|
+
if (!g || !S) {
|
|
7230
7230
|
if (!R || !A) return R ? (s.s = -u, s) : new w(A ? y : NaN);
|
|
7231
7231
|
if (!R[0] || !A[0]) return A[0] ? (s.s = -u, s) : new w(R[0] ? y : l == 3 ? -0 : 0);
|
|
7232
7232
|
}
|
|
7233
|
-
if (
|
|
7234
|
-
for ((I = d < 0) ? (d = -d, m = R) : (S =
|
|
7233
|
+
if (g = le(g), S = le(S), R = R.slice(), d = g - S) {
|
|
7234
|
+
for ((I = d < 0) ? (d = -d, m = R) : (S = g, m = A), m.reverse(), u = d; u--; m.push(0)) ;
|
|
7235
7235
|
m.reverse();
|
|
7236
|
-
} else for (
|
|
7236
|
+
} else for (_ = (I = (d = R.length) < (u = A.length)) ? d : u, d = u = 0; u < _; u++) if (R[u] != A[u]) {
|
|
7237
7237
|
I = R[u] < A[u];
|
|
7238
7238
|
break;
|
|
7239
7239
|
}
|
|
7240
|
-
if (I && (m = R, R = A, A = m, s.s = -s.s), u = (
|
|
7241
|
-
for (u = pe - 1;
|
|
7242
|
-
if (R[--
|
|
7243
|
-
for (f =
|
|
7244
|
-
--R[f], R[
|
|
7240
|
+
if (I && (m = R, R = A, A = m, s.s = -s.s), u = (_ = A.length) - (f = R.length), u > 0) for (; u--; R[f++] = 0) ;
|
|
7241
|
+
for (u = pe - 1; _ > d; ) {
|
|
7242
|
+
if (R[--_] < A[_]) {
|
|
7243
|
+
for (f = _; f && !R[--f]; R[f] = u) ;
|
|
7244
|
+
--R[f], R[_] += pe;
|
|
7245
7245
|
}
|
|
7246
|
-
R[
|
|
7246
|
+
R[_] -= A[_];
|
|
7247
7247
|
}
|
|
7248
7248
|
for (; R[0] == 0; R.splice(0, 1), --S) ;
|
|
7249
7249
|
return R[0] ? U(s, R, S) : (s.s = l == 3 ? -1 : 1, s.c = [s.e = 0], s);
|
|
7250
7250
|
}, i.modulo = i.mod = function(s, u) {
|
|
7251
|
-
var f,
|
|
7252
|
-
return s = new w(s, u), !m.c || !s.s || s.c && !s.c[0] ? new w(NaN) : !s.c || m.c && !m.c[0] ? new w(m) : (
|
|
7251
|
+
var f, _, m = this;
|
|
7252
|
+
return s = new w(s, u), !m.c || !s.s || s.c && !s.c[0] ? new w(NaN) : !s.c || m.c && !m.c[0] ? new w(m) : (C == 9 ? (_ = s.s, s.s = 1, f = t(m, s, 0, 3), s.s = _, f.s *= _) : f = t(m, s, 0, C), s = m.minus(f.times(s)), !s.c[0] && C == 1 && (s.s = m.s), s);
|
|
7253
7253
|
}, i.multipliedBy = i.times = function(s, u) {
|
|
7254
|
-
var f,
|
|
7254
|
+
var f, _, m, I, y, d, g, S, R, A, O, B, $, j, q, N = this, H = N.c, Y = (s = new w(s, u)).c;
|
|
7255
7255
|
if (!H || !Y || !H[0] || !Y[0]) return !N.s || !s.s || H && !H[0] && !Y || Y && !Y[0] && !H ? s.c = s.e = s.s = null : (s.s *= N.s, !H || !Y ? s.c = s.e = null : (s.c = [0], s.e = 0)), s;
|
|
7256
|
-
for (
|
|
7257
|
-
for (j = pe, q =
|
|
7258
|
-
for (f = 0,
|
|
7256
|
+
for (_ = le(N.e / G) + le(s.e / G), s.s *= N.s, g = H.length, A = Y.length, g < A && ($ = H, H = Y, Y = $, m = g, g = A, A = m), m = g + A, $ = []; m--; $.push(0)) ;
|
|
7257
|
+
for (j = pe, q = Ce, m = A; --m >= 0; ) {
|
|
7258
|
+
for (f = 0, O = Y[m] % q, B = Y[m] / q | 0, y = g, I = m + y; I > m; ) S = H[--y] % q, R = H[y] / q | 0, d = B * S + R * O, S = O * S + d % q * q + $[I] + f, f = (S / j | 0) + (d / q | 0) + B * R, $[I--] = S % j;
|
|
7259
7259
|
$[I] = f;
|
|
7260
7260
|
}
|
|
7261
|
-
return f ? ++
|
|
7261
|
+
return f ? ++_ : $.splice(0, 1), U(s, $, _);
|
|
7262
7262
|
}, i.negated = function() {
|
|
7263
7263
|
var s = new w(this);
|
|
7264
7264
|
return s.s = -s.s || null, s;
|
|
7265
7265
|
}, i.plus = function(s, u) {
|
|
7266
|
-
var f,
|
|
7266
|
+
var f, _ = this, m = _.s;
|
|
7267
7267
|
if (s = new w(s, u), u = s.s, !m || !u) return new w(NaN);
|
|
7268
|
-
if (m != u) return s.s = -u,
|
|
7269
|
-
var I =
|
|
7268
|
+
if (m != u) return s.s = -u, _.minus(s);
|
|
7269
|
+
var I = _.e / G, y = s.e / G, d = _.c, g = s.c;
|
|
7270
7270
|
if (!I || !y) {
|
|
7271
|
-
if (!d || !
|
|
7272
|
-
if (!d[0] || !
|
|
7271
|
+
if (!d || !g) return new w(m / 0);
|
|
7272
|
+
if (!d[0] || !g[0]) return g[0] ? s : new w(d[0] ? _ : m * 0);
|
|
7273
7273
|
}
|
|
7274
7274
|
if (I = le(I), y = le(y), d = d.slice(), m = I - y) {
|
|
7275
|
-
for (m > 0 ? (y = I, f =
|
|
7275
|
+
for (m > 0 ? (y = I, f = g) : (m = -m, f = d), f.reverse(); m--; f.push(0)) ;
|
|
7276
7276
|
f.reverse();
|
|
7277
7277
|
}
|
|
7278
|
-
for (m = d.length, u =
|
|
7278
|
+
for (m = d.length, u = g.length, m - u < 0 && (f = g, g = d, d = f, u = m), m = 0; u; ) m = (d[--u] = d[u] + g[u] + m) / pe | 0, d[u] = pe === d[u] ? 0 : d[u] % pe;
|
|
7279
7279
|
return m && (d = [m].concat(d), ++y), U(s, d, y);
|
|
7280
7280
|
}, i.precision = i.sd = function(s, u) {
|
|
7281
|
-
var f,
|
|
7281
|
+
var f, _, m, I = this;
|
|
7282
7282
|
if (s != null && s !== !!s) return J(s, 1, ee), u == null ? u = l : J(u, 0, 8), k(new w(I), s, u);
|
|
7283
7283
|
if (!(f = I.c)) return null;
|
|
7284
|
-
if (m = f.length - 1,
|
|
7285
|
-
for (; m % 10 == 0; m /= 10,
|
|
7286
|
-
for (m = f[0]; m >= 10; m /= 10,
|
|
7284
|
+
if (m = f.length - 1, _ = m * G + 1, m = f[m]) {
|
|
7285
|
+
for (; m % 10 == 0; m /= 10, _--) ;
|
|
7286
|
+
for (m = f[0]; m >= 10; m /= 10, _++) ;
|
|
7287
7287
|
}
|
|
7288
|
-
return s && I.e + 1 >
|
|
7288
|
+
return s && I.e + 1 > _ && (_ = I.e + 1), _;
|
|
7289
7289
|
}, i.shiftedBy = function(s) {
|
|
7290
|
-
return J(s, -
|
|
7290
|
+
return J(s, -St, St), this.times("1e" + s);
|
|
7291
7291
|
}, i.squareRoot = i.sqrt = function() {
|
|
7292
|
-
var s, u, f,
|
|
7292
|
+
var s, u, f, _, m, I = this, y = I.c, d = I.s, g = I.e, S = c + 4, R = new w("0.5");
|
|
7293
7293
|
if (d !== 1 || !y || !y[0]) return new w(!d || d < 0 && (!y || y[0]) ? NaN : y ? I : 1 / 0);
|
|
7294
|
-
if (d = Math.sqrt(+F(I)), d == 0 || d == 1 / 0 ? (u = fe(y), (u.length +
|
|
7295
|
-
for (
|
|
7296
|
-
if (!
|
|
7294
|
+
if (d = Math.sqrt(+F(I)), d == 0 || d == 1 / 0 ? (u = fe(y), (u.length + g) % 2 == 0 && (u += "0"), d = Math.sqrt(+u), g = le((g + 1) / 2) - (g < 0 || g % 2), d == 1 / 0 ? u = "5e" + g : (u = d.toExponential(), u = u.slice(0, u.indexOf("e") + 1) + g), f = new w(u)) : f = new w(d + ""), f.c[0]) {
|
|
7295
|
+
for (g = f.e, d = g + S, d < 3 && (d = 0); ; ) if (m = f, f = R.times(m.plus(t(I, m, S, 1))), fe(m.c).slice(0, d) === (u = fe(f.c)).slice(0, d)) if (f.e < g && --d, u = u.slice(d - 3, d + 1), u == "9999" || !_ && u == "4999") {
|
|
7296
|
+
if (!_ && (k(m, m.e + c + 2, 0), m.times(m).eq(I))) {
|
|
7297
7297
|
f = m;
|
|
7298
7298
|
break;
|
|
7299
7299
|
}
|
|
7300
|
-
S += 4, d += 4,
|
|
7300
|
+
S += 4, d += 4, _ = 1;
|
|
7301
7301
|
} else {
|
|
7302
7302
|
(!+u || !+u.slice(1) && u.charAt(0) == "5") && (k(f, f.e + c + 2, 1), s = !f.times(f).eq(I));
|
|
7303
7303
|
break;
|
|
@@ -7305,35 +7305,35 @@ function wr(e) {
|
|
|
7305
7305
|
}
|
|
7306
7306
|
return k(f, f.e + c + 1, l, s);
|
|
7307
7307
|
}, i.toExponential = function(s, u) {
|
|
7308
|
-
return s != null && (J(s, 0, ee), s++),
|
|
7308
|
+
return s != null && (J(s, 0, ee), s++), L(this, s, u, 1);
|
|
7309
7309
|
}, i.toFixed = function(s, u) {
|
|
7310
|
-
return s != null && (J(s, 0, ee), s = s + this.e + 1),
|
|
7310
|
+
return s != null && (J(s, 0, ee), s = s + this.e + 1), L(this, s, u);
|
|
7311
7311
|
}, i.toFormat = function(s, u, f) {
|
|
7312
|
-
var
|
|
7312
|
+
var _, m = this;
|
|
7313
7313
|
if (f == null) s != null && u && typeof u == "object" ? (f = u, u = null) : s && typeof s == "object" ? (f = s, s = u = null) : f = M;
|
|
7314
7314
|
else if (typeof f != "object") throw Error(oe + "Argument not an object: " + f);
|
|
7315
|
-
if (
|
|
7316
|
-
var I, y =
|
|
7317
|
-
if (
|
|
7315
|
+
if (_ = m.toFixed(s, u), m.c) {
|
|
7316
|
+
var I, y = _.split("."), d = +f.groupSize, g = +f.secondaryGroupSize, S = f.groupSeparator || "", R = y[0], A = y[1], O = m.s < 0, B = O ? R.slice(1) : R, $ = B.length;
|
|
7317
|
+
if (g && (I = d, d = g, g = I, $ -= I), d > 0 && $ > 0) {
|
|
7318
7318
|
for (I = $ % d || d, R = B.substr(0, I); I < $; I += d) R += S + B.substr(I, d);
|
|
7319
|
-
|
|
7319
|
+
g > 0 && (R += S + B.slice(I)), O && (R = "-" + R);
|
|
7320
7320
|
}
|
|
7321
|
-
|
|
7321
|
+
_ = A ? R + (f.decimalSeparator || "") + ((g = +f.fractionGroupSize) ? A.replace(new RegExp("\\d{" + g + "}\\B", "g"), "$&" + (f.fractionGroupSeparator || "")) : A) : R;
|
|
7322
7322
|
}
|
|
7323
|
-
return (f.prefix || "") +
|
|
7323
|
+
return (f.prefix || "") + _ + (f.suffix || "");
|
|
7324
7324
|
}, i.toFraction = function(s) {
|
|
7325
|
-
var u, f,
|
|
7325
|
+
var u, f, _, m, I, y, d, g, S, R, A, O, B = this, $ = B.c;
|
|
7326
7326
|
if (s != null && (d = new w(s), !d.isInteger() && (d.c || d.s !== 1) || d.lt(o))) throw Error(oe + "Argument " + (d.isInteger() ? "out of range: " : "not an integer: ") + F(d));
|
|
7327
7327
|
if (!$) return new w(B);
|
|
7328
|
-
for (u = new w(o), S = f = new w(o),
|
|
7329
|
-
return m = t(s.minus(f),
|
|
7328
|
+
for (u = new w(o), S = f = new w(o), _ = g = new w(o), O = fe($), I = u.e = O.length - B.e - 1, u.c[0] = Rt[(y = I % G) < 0 ? G + y : y], s = !s || d.comparedTo(u) > 0 ? I > 0 ? u : S : d, y = T, T = 1 / 0, d = new w(O), g.c[0] = 0; R = t(d, u, 0, 1), m = f.plus(R.times(_)), m.comparedTo(s) != 1; ) f = _, _ = m, S = g.plus(R.times(m = S)), g = m, u = d.minus(R.times(m = u)), d = m;
|
|
7329
|
+
return m = t(s.minus(f), _, 0, 1), g = g.plus(m.times(S)), f = f.plus(m.times(_)), g.s = S.s = B.s, I = I * 2, A = t(S, _, I, l).minus(B).abs().comparedTo(t(g, f, I, l).minus(B).abs()) < 1 ? [S, _] : [g, f], T = y, A;
|
|
7330
7330
|
}, i.toNumber = function() {
|
|
7331
7331
|
return +F(this);
|
|
7332
7332
|
}, i.toPrecision = function(s, u) {
|
|
7333
|
-
return s != null && J(s, 1, ee),
|
|
7333
|
+
return s != null && J(s, 1, ee), L(this, s, u, 2);
|
|
7334
7334
|
}, i.toString = function(s) {
|
|
7335
|
-
var u, f = this,
|
|
7336
|
-
return m === null ?
|
|
7335
|
+
var u, f = this, _ = f.s, m = f.e;
|
|
7336
|
+
return m === null ? _ ? (u = "Infinity", _ < 0 && (u = "-" + u)) : u = "NaN" : (s == null ? u = m <= p || m >= E ? it(fe(f.c), m) : ye(fe(f.c), m, "0") : s === 10 && P ? (f = k(new w(f), c + m + 1, l), u = ye(fe(f.c), f.e, "0")) : (J(s, 2, b.length, "Base"), u = r(ye(fe(f.c), m, "0"), 10, s, _, true)), _ < 0 && f.c[0] && (u = "-" + u)), u;
|
|
7337
7337
|
}, i.valueOf = i.toJSON = function() {
|
|
7338
7338
|
return F(this);
|
|
7339
7339
|
}, i._isBigNumber = true, i[Symbol.toStringTag] = "BigNumber", i[Symbol.for("nodejs.util.inspect.custom")] = i.valueOf, e != null && w.set(e), w;
|
|
@@ -7389,49 +7389,49 @@ function ye(e, t, r) {
|
|
|
7389
7389
|
return e;
|
|
7390
7390
|
}
|
|
7391
7391
|
a(ye, "toFixedPoint");
|
|
7392
|
-
var
|
|
7393
|
-
const
|
|
7392
|
+
var Si = wr();
|
|
7393
|
+
const Ri = 24, Ve = 32, Ti = a(() => typeof globalThis < "u" && globalThis.crypto && typeof globalThis.crypto.getRandomValues == "function" ? () => {
|
|
7394
7394
|
const e = new Uint32Array(1);
|
|
7395
7395
|
return globalThis.crypto.getRandomValues(e), e[0] / 4294967296;
|
|
7396
|
-
} : Math.random, "createRandom"),
|
|
7396
|
+
} : Math.random, "createRandom"), Tt = Ti(), yt = a((e = 4, t = Tt) => {
|
|
7397
7397
|
let r = "";
|
|
7398
7398
|
for (; r.length < e; ) r = r + Math.floor(t() * 36).toString(36);
|
|
7399
7399
|
return r;
|
|
7400
7400
|
}, "createEntropy");
|
|
7401
|
-
function
|
|
7402
|
-
let t = new
|
|
7401
|
+
function yi(e) {
|
|
7402
|
+
let t = new Si(0);
|
|
7403
7403
|
for (const r of e.values()) t = t.multipliedBy(256).plus(r);
|
|
7404
7404
|
return t;
|
|
7405
7405
|
}
|
|
7406
|
-
a(
|
|
7406
|
+
a(yi, "bufToBigInt");
|
|
7407
7407
|
const Ar = a((e = "") => {
|
|
7408
7408
|
const t = new TextEncoder();
|
|
7409
|
-
return
|
|
7410
|
-
}, "hash"), br = Array.from({ length: 26 }, (e, t) => String.fromCharCode(t + 97)),
|
|
7411
|
-
const r = Object.keys(e).toString(), n = r.length ? r +
|
|
7409
|
+
return yi(_i(t.encode(e))).toString(36).slice(1);
|
|
7410
|
+
}, "hash"), br = Array.from({ length: 26 }, (e, t) => String.fromCharCode(t + 97)), wi = a((e) => br[Math.floor(e() * br.length)], "randomLetter"), Ai = a(({ globalObj: e = typeof global < "u" ? global : typeof window < "u" ? window : {}, random: t = Tt } = {}) => {
|
|
7411
|
+
const r = Object.keys(e).toString(), n = r.length ? r + yt(Ve, t) : yt(Ve, t);
|
|
7412
7412
|
return Ar(n).substring(0, Ve);
|
|
7413
|
-
}, "createFingerprint"),
|
|
7413
|
+
}, "createFingerprint"), bi = a((e) => () => e++, "createCounter"), vi = 476782367, Ci = a(({ random: e = Tt, counter: t = bi(Math.floor(e() * vi)), length: r = Ri, fingerprint: n = Ai({ random: e }) } = {}) => {
|
|
7414
7414
|
if (r > Ve) throw new Error(`Length must be between 2 and ${Ve}. Received: ${r}`);
|
|
7415
7415
|
return a(function() {
|
|
7416
|
-
const o =
|
|
7416
|
+
const o = wi(e), c = Date.now().toString(36), l = t().toString(36), p = yt(r, e), E = `${c + p + l + n}`;
|
|
7417
7417
|
return `${o + Ar(E).substring(1, r)}`;
|
|
7418
7418
|
}, "cuid2");
|
|
7419
|
-
}, "init"), Ye =
|
|
7420
|
-
function
|
|
7419
|
+
}, "init"), Ye = Ui(Ci);
|
|
7420
|
+
function Ui(e) {
|
|
7421
7421
|
let t;
|
|
7422
7422
|
return () => (t || (t = e()), t());
|
|
7423
7423
|
}
|
|
7424
|
-
a(
|
|
7425
|
-
var
|
|
7426
|
-
function
|
|
7424
|
+
a(Ui, "lazy");
|
|
7425
|
+
var Bi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
7426
|
+
function vr(e) {
|
|
7427
7427
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7428
7428
|
}
|
|
7429
|
-
a(
|
|
7430
|
-
var xe = {},
|
|
7431
|
-
function
|
|
7432
|
-
if (
|
|
7433
|
-
|
|
7434
|
-
const e =
|
|
7429
|
+
a(vr, "getDefaultExportFromCjs");
|
|
7430
|
+
var xe = {}, Cr;
|
|
7431
|
+
function Pi() {
|
|
7432
|
+
if (Cr) return xe;
|
|
7433
|
+
Cr = 1, Object.defineProperty(xe, "__esModule", { value: true }), xe.isBinaryFileSync = xe.isBinaryFile = void 0;
|
|
7434
|
+
const e = qe, t = Fn, r = (0, t.promisify)(e.stat), n = (0, t.promisify)(e.open), i = (0, t.promisify)(e.close), o = 512, c = 3;
|
|
7435
7435
|
class l {
|
|
7436
7436
|
static {
|
|
7437
7437
|
a(this, "Reader");
|
|
@@ -7440,8 +7440,8 @@ function Oi() {
|
|
|
7440
7440
|
size;
|
|
7441
7441
|
offset;
|
|
7442
7442
|
error;
|
|
7443
|
-
constructor(
|
|
7444
|
-
this.fileBuffer =
|
|
7443
|
+
constructor(P, w) {
|
|
7444
|
+
this.fileBuffer = P, this.size = w, this.offset = 0, this.error = false;
|
|
7445
7445
|
}
|
|
7446
7446
|
hasError() {
|
|
7447
7447
|
return this.error;
|
|
@@ -7449,25 +7449,25 @@ function Oi() {
|
|
|
7449
7449
|
nextByte() {
|
|
7450
7450
|
return this.offset === this.size || this.hasError() ? (this.error = true, 255) : this.fileBuffer[this.offset++];
|
|
7451
7451
|
}
|
|
7452
|
-
next(
|
|
7452
|
+
next(P) {
|
|
7453
7453
|
const w = new Array();
|
|
7454
|
-
for (let
|
|
7454
|
+
for (let L = 0; L < P; L++) {
|
|
7455
7455
|
if (this.error) return w;
|
|
7456
|
-
w[
|
|
7456
|
+
w[L] = this.nextByte();
|
|
7457
7457
|
}
|
|
7458
7458
|
return w;
|
|
7459
7459
|
}
|
|
7460
7460
|
}
|
|
7461
7461
|
function p(b) {
|
|
7462
|
-
let
|
|
7462
|
+
let P = 0, w = 0;
|
|
7463
7463
|
for (; !b.hasError(); ) {
|
|
7464
|
-
const
|
|
7465
|
-
if (w = w | (
|
|
7466
|
-
if (
|
|
7464
|
+
const L = b.nextByte();
|
|
7465
|
+
if (w = w | (L & 127) << 7 * P, (L & 128) === 0) break;
|
|
7466
|
+
if (P >= 10) {
|
|
7467
7467
|
b.error = true;
|
|
7468
7468
|
break;
|
|
7469
7469
|
}
|
|
7470
|
-
|
|
7470
|
+
P++;
|
|
7471
7471
|
}
|
|
7472
7472
|
return w;
|
|
7473
7473
|
}
|
|
@@ -7479,70 +7479,70 @@ function Oi() {
|
|
|
7479
7479
|
case 1:
|
|
7480
7480
|
return b.next(8), true;
|
|
7481
7481
|
case 2:
|
|
7482
|
-
const
|
|
7483
|
-
return b.next(
|
|
7482
|
+
const L = p(b);
|
|
7483
|
+
return b.next(L), true;
|
|
7484
7484
|
case 5:
|
|
7485
7485
|
return b.next(4), true;
|
|
7486
7486
|
}
|
|
7487
7487
|
return false;
|
|
7488
7488
|
}
|
|
7489
7489
|
a(E, "readProtoMessage");
|
|
7490
|
-
function h(b,
|
|
7491
|
-
const w = new l(b,
|
|
7492
|
-
let
|
|
7490
|
+
function h(b, P) {
|
|
7491
|
+
const w = new l(b, P);
|
|
7492
|
+
let L = 0;
|
|
7493
7493
|
for (; ; ) {
|
|
7494
7494
|
if (!E(w) && !w.hasError()) return false;
|
|
7495
7495
|
if (w.hasError()) break;
|
|
7496
|
-
|
|
7496
|
+
L++;
|
|
7497
7497
|
}
|
|
7498
|
-
return
|
|
7498
|
+
return L > 0;
|
|
7499
7499
|
}
|
|
7500
7500
|
a(h, "isBinaryProto");
|
|
7501
|
-
async function T(b,
|
|
7501
|
+
async function T(b, P) {
|
|
7502
7502
|
if (D(b)) {
|
|
7503
7503
|
const w = await r(b);
|
|
7504
7504
|
M(w);
|
|
7505
|
-
const
|
|
7505
|
+
const L = await n(b, "r"), x = Buffer.alloc(o + c);
|
|
7506
7506
|
return new Promise((U, k) => {
|
|
7507
|
-
e.read(
|
|
7508
|
-
if (i(
|
|
7507
|
+
e.read(L, x, 0, o + c, 0, (F, s, u) => {
|
|
7508
|
+
if (i(L), F) k(F);
|
|
7509
7509
|
else try {
|
|
7510
|
-
U(
|
|
7510
|
+
U(C(x, s));
|
|
7511
7511
|
} catch (f) {
|
|
7512
7512
|
k(f);
|
|
7513
7513
|
}
|
|
7514
7514
|
});
|
|
7515
7515
|
});
|
|
7516
|
-
} else return
|
|
7516
|
+
} else return P === void 0 && (P = b.length), C(b, P);
|
|
7517
7517
|
}
|
|
7518
7518
|
a(T, "isBinaryFile"), xe.isBinaryFile = T;
|
|
7519
|
-
function
|
|
7519
|
+
function v(b, P) {
|
|
7520
7520
|
if (D(b)) {
|
|
7521
7521
|
const w = e.statSync(b);
|
|
7522
7522
|
M(w);
|
|
7523
|
-
const
|
|
7524
|
-
return e.closeSync(
|
|
7525
|
-
} else return
|
|
7523
|
+
const L = e.openSync(b, "r"), x = Buffer.alloc(o + c), U = e.readSync(L, x, 0, o + c, 0);
|
|
7524
|
+
return e.closeSync(L), C(x, U);
|
|
7525
|
+
} else return P === void 0 && (P = b.length), C(b, P);
|
|
7526
7526
|
}
|
|
7527
|
-
a(
|
|
7528
|
-
function
|
|
7529
|
-
if (
|
|
7527
|
+
a(v, "isBinaryFileSync"), xe.isBinaryFileSync = v;
|
|
7528
|
+
function C(b, P) {
|
|
7529
|
+
if (P === 0) return false;
|
|
7530
7530
|
let w = 0;
|
|
7531
|
-
const
|
|
7532
|
-
if (
|
|
7533
|
-
if (
|
|
7534
|
-
if (
|
|
7531
|
+
const L = Math.min(P, o + c), x = Math.min(L, o);
|
|
7532
|
+
if (P >= 3 && b[0] === 239 && b[1] === 187 && b[2] === 191 || P >= 4 && b[0] === 0 && b[1] === 0 && b[2] === 254 && b[3] === 255 || P >= 4 && b[0] === 255 && b[1] === 254 && b[2] === 0 && b[3] === 0 || P >= 4 && b[0] === 132 && b[1] === 49 && b[2] === 149 && b[3] === 51) return false;
|
|
7533
|
+
if (L >= 5 && b.slice(0, 5).toString() === "%PDF-") return true;
|
|
7534
|
+
if (P >= 2 && b[0] === 254 && b[1] === 255 || P >= 2 && b[0] === 255 && b[1] === 254) return false;
|
|
7535
7535
|
for (let U = 0; U < x; U++) {
|
|
7536
7536
|
if (b[U] === 0) return true;
|
|
7537
7537
|
if ((b[U] < 7 || b[U] > 14) && (b[U] < 32 || b[U] > 127)) {
|
|
7538
|
-
if (b[U] >= 192 && b[U] <= 223 && U + 1 <
|
|
7538
|
+
if (b[U] >= 192 && b[U] <= 223 && U + 1 < L) {
|
|
7539
7539
|
if (U++, b[U] >= 128 && b[U] <= 191) continue;
|
|
7540
|
-
} else if (b[U] >= 224 && b[U] <= 239 && U + 2 <
|
|
7540
|
+
} else if (b[U] >= 224 && b[U] <= 239 && U + 2 < L) {
|
|
7541
7541
|
if (U++, b[U] >= 128 && b[U] <= 191 && b[U + 1] >= 128 && b[U + 1] <= 191) {
|
|
7542
7542
|
U++;
|
|
7543
7543
|
continue;
|
|
7544
7544
|
}
|
|
7545
|
-
} else if (b[U] >= 240 && b[U] <= 247 && U + 3 <
|
|
7545
|
+
} else if (b[U] >= 240 && b[U] <= 247 && U + 3 < L && (U++, b[U] >= 128 && b[U] <= 191 && b[U + 1] >= 128 && b[U + 1] <= 191 && b[U + 2] >= 128 && b[U + 2] <= 191)) {
|
|
7546
7546
|
U += 2;
|
|
7547
7547
|
continue;
|
|
7548
7548
|
}
|
|
@@ -7551,7 +7551,7 @@ function Oi() {
|
|
|
7551
7551
|
}
|
|
7552
7552
|
return !!(w * 100 / x > 10 || w > 1 && h(b, x));
|
|
7553
7553
|
}
|
|
7554
|
-
a(
|
|
7554
|
+
a(C, "isBinaryCheck");
|
|
7555
7555
|
function D(b) {
|
|
7556
7556
|
return typeof b == "string";
|
|
7557
7557
|
}
|
|
@@ -7561,18 +7561,18 @@ function Oi() {
|
|
|
7561
7561
|
}
|
|
7562
7562
|
return a(M, "isStatFile"), xe;
|
|
7563
7563
|
}
|
|
7564
|
-
a(
|
|
7565
|
-
var
|
|
7564
|
+
a(Pi, "requireLib");
|
|
7565
|
+
var Li = Pi(), Q = Uint8Array, ae = Uint16Array, wt = Int32Array, ot = new Q([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]), st = new Q([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]), At = new Q([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Ur = a(function(e, t) {
|
|
7566
7566
|
for (var r = new ae(31), n = 0; n < 31; ++n) r[n] = t += 1 << e[n - 1];
|
|
7567
|
-
for (var i = new
|
|
7567
|
+
for (var i = new wt(r[30]), n = 1; n < 30; ++n) for (var o = r[n]; o < r[n + 1]; ++o) i[o] = o - r[n] << 5 | n;
|
|
7568
7568
|
return { b: r, r: i };
|
|
7569
|
-
}, "freb"), Br = Ur(ot, 2),
|
|
7570
|
-
|
|
7571
|
-
for (var
|
|
7569
|
+
}, "freb"), Br = Ur(ot, 2), Pr = Br.b, bt = Br.r;
|
|
7570
|
+
Pr[28] = 258, bt[258] = 28;
|
|
7571
|
+
for (var Lr = Ur(st, 0), Oi = Lr.b, Or = Lr.r, vt = new ae(32768), W = 0; W < 32768; ++W) {
|
|
7572
7572
|
var Ue = (W & 43690) >> 1 | (W & 21845) << 1;
|
|
7573
|
-
Ue = (Ue & 52428) >> 2 | (Ue & 13107) << 2, Ue = (Ue & 61680) >> 4 | (Ue & 3855) << 4,
|
|
7573
|
+
Ue = (Ue & 52428) >> 2 | (Ue & 13107) << 2, Ue = (Ue & 61680) >> 4 | (Ue & 3855) << 4, vt[W] = ((Ue & 65280) >> 8 | (Ue & 255) << 8) >> 1;
|
|
7574
7574
|
}
|
|
7575
|
-
for (var
|
|
7575
|
+
for (var _e = a((function(e, t, r) {
|
|
7576
7576
|
for (var n = e.length, i = 0, o = new ae(t); i < n; ++i) e[i] && ++o[e[i] - 1];
|
|
7577
7577
|
var c = new ae(t);
|
|
7578
7578
|
for (i = 1; i < t; ++i) c[i] = c[i - 1] + o[i - 1] << 1;
|
|
@@ -7580,32 +7580,32 @@ for (var ge = a((function(e, t, r) {
|
|
|
7580
7580
|
if (r) {
|
|
7581
7581
|
l = new ae(1 << t);
|
|
7582
7582
|
var p = 15 - t;
|
|
7583
|
-
for (i = 0; i < n; ++i) if (e[i]) for (var E = i << 4 | e[i], h = t - e[i], T = c[e[i] - 1]++ << h,
|
|
7584
|
-
} else for (l = new ae(n), i = 0; i < n; ++i) e[i] && (l[i] =
|
|
7583
|
+
for (i = 0; i < n; ++i) if (e[i]) for (var E = i << 4 | e[i], h = t - e[i], T = c[e[i] - 1]++ << h, v = T | (1 << h) - 1; T <= v; ++T) l[vt[T] >> p] = E;
|
|
7584
|
+
} else for (l = new ae(n), i = 0; i < n; ++i) e[i] && (l[i] = vt[c[e[i] - 1]++] >> 15 - e[i]);
|
|
7585
7585
|
return l;
|
|
7586
7586
|
}), "hMap"), Be = new Q(288), W = 0; W < 144; ++W) Be[W] = 8;
|
|
7587
7587
|
for (var W = 144; W < 256; ++W) Be[W] = 9;
|
|
7588
7588
|
for (var W = 256; W < 280; ++W) Be[W] = 7;
|
|
7589
7589
|
for (var W = 280; W < 288; ++W) Be[W] = 8;
|
|
7590
7590
|
for (var Je = new Q(32), W = 0; W < 32; ++W) Je[W] = 5;
|
|
7591
|
-
var
|
|
7591
|
+
var Ni = _e(Be, 9, 0), Di = _e(Be, 9, 1), Mi = _e(Je, 5, 0), xi = _e(Je, 5, 1), Ct = a(function(e) {
|
|
7592
7592
|
for (var t = e[0], r = 1; r < e.length; ++r) e[r] > t && (t = e[r]);
|
|
7593
7593
|
return t;
|
|
7594
7594
|
}, "max"), me = a(function(e, t, r) {
|
|
7595
7595
|
var n = t / 8 | 0;
|
|
7596
7596
|
return (e[n] | e[n + 1] << 8) >> (t & 7) & r;
|
|
7597
|
-
}, "bits"),
|
|
7597
|
+
}, "bits"), Ut = a(function(e, t) {
|
|
7598
7598
|
var r = t / 8 | 0;
|
|
7599
7599
|
return (e[r] | e[r + 1] << 8 | e[r + 2] << 16) >> (t & 7);
|
|
7600
|
-
}, "bits16"),
|
|
7600
|
+
}, "bits16"), Bt = a(function(e) {
|
|
7601
7601
|
return (e + 7) / 8 | 0;
|
|
7602
7602
|
}, "shft"), ze = a(function(e, t, r) {
|
|
7603
7603
|
return (t == null || t < 0) && (t = 0), (r == null || r > e.length) && (r = e.length), new Q(e.subarray(t, r));
|
|
7604
|
-
}, "slc"),
|
|
7605
|
-
var n = new Error(t ||
|
|
7604
|
+
}, "slc"), Gi = ["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"], ne = a(function(e, t, r) {
|
|
7605
|
+
var n = new Error(t || Gi[e]);
|
|
7606
7606
|
if (n.code = e, Error.captureStackTrace && Error.captureStackTrace(n, ne), !r) throw n;
|
|
7607
7607
|
return n;
|
|
7608
|
-
}, "err"),
|
|
7608
|
+
}, "err"), $i = a(function(e, t, r, n) {
|
|
7609
7609
|
var i = e.length, o = n ? n.length : 0;
|
|
7610
7610
|
if (!i || t.f && !t.l) return r || new Q(0);
|
|
7611
7611
|
var c = !r, l = c || t.i != 2, p = t.i;
|
|
@@ -7616,84 +7616,84 @@ var Di = ge(Be, 9, 0), Mi = ge(Be, 9, 1), xi = ge(Je, 5, 0), Gi = ge(Je, 5, 1),
|
|
|
7616
7616
|
var X = new Q(Math.max(de * 2, re));
|
|
7617
7617
|
X.set(r), r = X;
|
|
7618
7618
|
}
|
|
7619
|
-
}, "cbuf"), h = t.f || 0, T = t.p || 0,
|
|
7619
|
+
}, "cbuf"), h = t.f || 0, T = t.p || 0, v = t.b || 0, C = t.l, D = t.d, M = t.m, b = t.n, P = i * 8;
|
|
7620
7620
|
do {
|
|
7621
|
-
if (!
|
|
7621
|
+
if (!C) {
|
|
7622
7622
|
h = me(e, T, 1);
|
|
7623
7623
|
var w = me(e, T + 1, 3);
|
|
7624
|
-
if (T += 3, w) if (w == 1)
|
|
7624
|
+
if (T += 3, w) if (w == 1) C = Di, D = xi, M = 9, b = 5;
|
|
7625
7625
|
else if (w == 2) {
|
|
7626
7626
|
var k = me(e, T, 31) + 257, F = me(e, T + 10, 15) + 4, s = k + me(e, T + 5, 31) + 1;
|
|
7627
7627
|
T += 14;
|
|
7628
|
-
for (var u = new Q(s), f = new Q(19),
|
|
7628
|
+
for (var u = new Q(s), f = new Q(19), _ = 0; _ < F; ++_) f[At[_]] = me(e, T + _ * 3, 7);
|
|
7629
7629
|
T += F * 3;
|
|
7630
|
-
for (var m = Ct(f), I = (1 << m) - 1, y =
|
|
7630
|
+
for (var m = Ct(f), I = (1 << m) - 1, y = _e(f, m, 1), _ = 0; _ < s; ) {
|
|
7631
7631
|
var d = y[me(e, T, I)];
|
|
7632
7632
|
T += d & 15;
|
|
7633
|
-
var
|
|
7634
|
-
if (
|
|
7633
|
+
var L = d >> 4;
|
|
7634
|
+
if (L < 16) u[_++] = L;
|
|
7635
7635
|
else {
|
|
7636
|
-
var
|
|
7637
|
-
for (
|
|
7636
|
+
var g = 0, S = 0;
|
|
7637
|
+
for (L == 16 ? (S = 3 + me(e, T, 3), T += 2, g = u[_ - 1]) : L == 17 ? (S = 3 + me(e, T, 7), T += 3) : L == 18 && (S = 11 + me(e, T, 127), T += 7); S--; ) u[_++] = g;
|
|
7638
7638
|
}
|
|
7639
7639
|
}
|
|
7640
7640
|
var R = u.subarray(0, k), A = u.subarray(k);
|
|
7641
|
-
M = Ct(R), b = Ct(A),
|
|
7641
|
+
M = Ct(R), b = Ct(A), C = _e(R, M, 1), D = _e(A, b, 1);
|
|
7642
7642
|
} else ne(1);
|
|
7643
7643
|
else {
|
|
7644
|
-
var
|
|
7644
|
+
var L = Bt(T) + 4, x = e[L - 4] | e[L - 3] << 8, U = L + x;
|
|
7645
7645
|
if (U > i) {
|
|
7646
7646
|
p && ne(0);
|
|
7647
7647
|
break;
|
|
7648
7648
|
}
|
|
7649
|
-
l && E(
|
|
7649
|
+
l && E(v + x), r.set(e.subarray(L, U), v), t.b = v += x, t.p = T = U * 8, t.f = h;
|
|
7650
7650
|
continue;
|
|
7651
7651
|
}
|
|
7652
|
-
if (T >
|
|
7652
|
+
if (T > P) {
|
|
7653
7653
|
p && ne(0);
|
|
7654
7654
|
break;
|
|
7655
7655
|
}
|
|
7656
7656
|
}
|
|
7657
|
-
l && E(
|
|
7658
|
-
for (var
|
|
7659
|
-
var
|
|
7660
|
-
if (T +=
|
|
7657
|
+
l && E(v + 131072);
|
|
7658
|
+
for (var O = (1 << M) - 1, B = (1 << b) - 1, $ = T; ; $ = T) {
|
|
7659
|
+
var g = C[Ut(e, T) & O], j = g >> 4;
|
|
7660
|
+
if (T += g & 15, T > P) {
|
|
7661
7661
|
p && ne(0);
|
|
7662
7662
|
break;
|
|
7663
7663
|
}
|
|
7664
|
-
if (
|
|
7664
|
+
if (g || ne(2), j < 256) r[v++] = j;
|
|
7665
7665
|
else if (j == 256) {
|
|
7666
|
-
$ = T,
|
|
7666
|
+
$ = T, C = null;
|
|
7667
7667
|
break;
|
|
7668
7668
|
} else {
|
|
7669
7669
|
var q = j - 254;
|
|
7670
7670
|
if (j > 264) {
|
|
7671
|
-
var
|
|
7672
|
-
q = me(e, T, (1 << N) - 1) +
|
|
7671
|
+
var _ = j - 257, N = ot[_];
|
|
7672
|
+
q = me(e, T, (1 << N) - 1) + Pr[_], T += N;
|
|
7673
7673
|
}
|
|
7674
|
-
var H = D[
|
|
7674
|
+
var H = D[Ut(e, T) & B], Y = H >> 4;
|
|
7675
7675
|
H || ne(3), T += H & 15;
|
|
7676
|
-
var A =
|
|
7676
|
+
var A = Oi[Y];
|
|
7677
7677
|
if (Y > 3) {
|
|
7678
7678
|
var N = st[Y];
|
|
7679
|
-
A +=
|
|
7679
|
+
A += Ut(e, T) & (1 << N) - 1, T += N;
|
|
7680
7680
|
}
|
|
7681
|
-
if (T >
|
|
7681
|
+
if (T > P) {
|
|
7682
7682
|
p && ne(0);
|
|
7683
7683
|
break;
|
|
7684
7684
|
}
|
|
7685
|
-
l && E(
|
|
7686
|
-
var he =
|
|
7687
|
-
if (
|
|
7688
|
-
var be = o - A,
|
|
7689
|
-
for (be +
|
|
7685
|
+
l && E(v + 131072);
|
|
7686
|
+
var he = v + q;
|
|
7687
|
+
if (v < A) {
|
|
7688
|
+
var be = o - A, ve = Math.min(A, he);
|
|
7689
|
+
for (be + v < 0 && ne(3); v < ve; ++v) r[v] = n[be + v];
|
|
7690
7690
|
}
|
|
7691
|
-
for (;
|
|
7691
|
+
for (; v < he; ++v) r[v] = r[v - A];
|
|
7692
7692
|
}
|
|
7693
7693
|
}
|
|
7694
|
-
t.l =
|
|
7694
|
+
t.l = C, t.p = $, t.b = v, t.f = h, C && (h = 1, t.m = M, t.d = D, t.n = b);
|
|
7695
7695
|
} while (!h);
|
|
7696
|
-
return
|
|
7696
|
+
return v != r.length && c ? ze(r, 0, v) : r.subarray(0, v);
|
|
7697
7697
|
}, "inflt"), we = a(function(e, t, r) {
|
|
7698
7698
|
r <<= t & 7;
|
|
7699
7699
|
var n = t / 8 | 0;
|
|
@@ -7702,7 +7702,7 @@ var Di = ge(Be, 9, 0), Mi = ge(Be, 9, 1), xi = ge(Je, 5, 0), Gi = ge(Je, 5, 1),
|
|
|
7702
7702
|
r <<= t & 7;
|
|
7703
7703
|
var n = t / 8 | 0;
|
|
7704
7704
|
e[n] |= r, e[n + 1] |= r >> 8, e[n + 2] |= r >> 16;
|
|
7705
|
-
}, "wbits16"),
|
|
7705
|
+
}, "wbits16"), Pt = a(function(e, t) {
|
|
7706
7706
|
for (var r = [], n = 0; n < e.length; ++n) e[n] && r.push({ s: n, f: e[n] });
|
|
7707
7707
|
var i = r.length, o = r.slice();
|
|
7708
7708
|
if (!i) return { t: xr, l: 0 };
|
|
@@ -7715,28 +7715,28 @@ var Di = ge(Be, 9, 0), Mi = ge(Be, 9, 1), xi = ge(Je, 5, 0), Gi = ge(Je, 5, 1),
|
|
|
7715
7715
|
}), r.push({ s: -1, f: 25001 });
|
|
7716
7716
|
var l = r[0], p = r[1], E = 0, h = 1, T = 2;
|
|
7717
7717
|
for (r[0] = { s: -1, f: l.f + p.f, l, r: p }; h != i - 1; ) l = r[r[E].f < r[T].f ? E++ : T++], p = r[E != h && r[E].f < r[T].f ? E++ : T++], r[h++] = { s: -1, f: l.f + p.f, l, r: p };
|
|
7718
|
-
for (var
|
|
7719
|
-
var
|
|
7718
|
+
for (var v = o[0].s, n = 1; n < i; ++n) o[n].s > v && (v = o[n].s);
|
|
7719
|
+
var C = new ae(v + 1), D = Lt(r[h - 1], C, 0);
|
|
7720
7720
|
if (D > t) {
|
|
7721
|
-
var n = 0, M = 0, b = D - t,
|
|
7721
|
+
var n = 0, M = 0, b = D - t, P = 1 << b;
|
|
7722
7722
|
for (o.sort(function(k, F) {
|
|
7723
|
-
return
|
|
7723
|
+
return C[F.s] - C[k.s] || k.f - F.f;
|
|
7724
7724
|
}); n < i; ++n) {
|
|
7725
7725
|
var w = o[n].s;
|
|
7726
|
-
if (
|
|
7726
|
+
if (C[w] > t) M += P - (1 << D - C[w]), C[w] = t;
|
|
7727
7727
|
else break;
|
|
7728
7728
|
}
|
|
7729
7729
|
for (M >>= b; M > 0; ) {
|
|
7730
|
-
var
|
|
7731
|
-
|
|
7730
|
+
var L = o[n].s;
|
|
7731
|
+
C[L] < t ? M -= 1 << t - C[L]++ - 1 : ++n;
|
|
7732
7732
|
}
|
|
7733
7733
|
for (; n >= 0 && M; --n) {
|
|
7734
7734
|
var x = o[n].s;
|
|
7735
|
-
|
|
7735
|
+
C[x] == t && (--C[x], ++M);
|
|
7736
7736
|
}
|
|
7737
7737
|
D = t;
|
|
7738
7738
|
}
|
|
7739
|
-
return { t: new Q(
|
|
7739
|
+
return { t: new Q(C), l: D };
|
|
7740
7740
|
}, "hTree"), Lt = a(function(e, t, r) {
|
|
7741
7741
|
return e.s == -1 ? Math.max(Lt(e.l, t, r + 1), Lt(e.r, t, r + 1)) : t[e.s] = r;
|
|
7742
7742
|
}, "ln"), Nr = a(function(e) {
|
|
@@ -7760,77 +7760,77 @@ var Di = ge(Be, 9, 0), Mi = ge(Be, 9, 1), xi = ge(Je, 5, 0), Gi = ge(Je, 5, 1),
|
|
|
7760
7760
|
for (var r = 0, n = 0; n < t.length; ++n) r += e[n] * t[n];
|
|
7761
7761
|
return r;
|
|
7762
7762
|
}, "clen"), Dr = a(function(e, t, r) {
|
|
7763
|
-
var n = r.length, i =
|
|
7763
|
+
var n = r.length, i = Bt(t + 2);
|
|
7764
7764
|
e[i] = n & 255, e[i + 1] = n >> 8, e[i + 2] = e[i] ^ 255, e[i + 3] = e[i + 1] ^ 255;
|
|
7765
7765
|
for (var o = 0; o < n; ++o) e[i + o + 4] = r[o];
|
|
7766
7766
|
return (i + 4 + n) * 8;
|
|
7767
7767
|
}, "wfblk"), Mr = a(function(e, t, r, n, i, o, c, l, p, E, h) {
|
|
7768
7768
|
we(t, h++, r), ++i[256];
|
|
7769
|
-
for (var T =
|
|
7769
|
+
for (var T = Pt(i, 15), v = T.t, C = T.l, D = Pt(o, 15), M = D.t, b = D.l, P = Nr(v), w = P.c, L = P.n, x = Nr(M), U = x.c, k = x.n, F = new ae(19), s = 0; s < w.length; ++s) ++F[w[s] & 31];
|
|
7770
7770
|
for (var s = 0; s < U.length; ++s) ++F[U[s] & 31];
|
|
7771
|
-
for (var u =
|
|
7772
|
-
var I = E + 5 << 3, y = Xe(i, Be) + Xe(o, Je) + c, d = Xe(i,
|
|
7771
|
+
for (var u = Pt(F, 7), f = u.t, _ = u.l, m = 19; m > 4 && !f[At[m - 1]]; --m) ;
|
|
7772
|
+
var I = E + 5 << 3, y = Xe(i, Be) + Xe(o, Je) + c, d = Xe(i, v) + Xe(o, M) + c + 14 + 3 * m + Xe(F, f) + 2 * F[16] + 3 * F[17] + 7 * F[18];
|
|
7773
7773
|
if (p >= 0 && I <= y && I <= d) return Dr(t, h, e.subarray(p, p + E));
|
|
7774
|
-
var
|
|
7774
|
+
var g, S, R, A;
|
|
7775
7775
|
if (we(t, h, 1 + (d < y)), h += 2, d < y) {
|
|
7776
|
-
|
|
7777
|
-
var
|
|
7778
|
-
we(t, h,
|
|
7779
|
-
for (var s = 0; s < m; ++s) we(t, h + 3 * s, f[
|
|
7776
|
+
g = _e(v, C, 0), S = v, R = _e(M, b, 0), A = M;
|
|
7777
|
+
var O = _e(f, _, 0);
|
|
7778
|
+
we(t, h, L - 257), we(t, h + 5, k - 1), we(t, h + 10, m - 4), h += 14;
|
|
7779
|
+
for (var s = 0; s < m; ++s) we(t, h + 3 * s, f[At[s]]);
|
|
7780
7780
|
h += 3 * m;
|
|
7781
7781
|
for (var B = [w, U], $ = 0; $ < 2; ++$) for (var j = B[$], s = 0; s < j.length; ++s) {
|
|
7782
7782
|
var q = j[s] & 31;
|
|
7783
|
-
we(t, h,
|
|
7783
|
+
we(t, h, O[q]), h += f[q], q > 15 && (we(t, h, j[s] >> 5 & 127), h += j[s] >> 12);
|
|
7784
7784
|
}
|
|
7785
|
-
} else
|
|
7785
|
+
} else g = Ni, S = Be, R = Mi, A = Je;
|
|
7786
7786
|
for (var s = 0; s < l; ++s) {
|
|
7787
7787
|
var N = n[s];
|
|
7788
7788
|
if (N > 255) {
|
|
7789
7789
|
var q = N >> 18 & 31;
|
|
7790
|
-
Qe(t, h,
|
|
7790
|
+
Qe(t, h, g[q + 257]), h += S[q + 257], q > 7 && (we(t, h, N >> 23 & 31), h += ot[q]);
|
|
7791
7791
|
var H = N & 31;
|
|
7792
7792
|
Qe(t, h, R[H]), h += A[H], H > 3 && (Qe(t, h, N >> 5 & 8191), h += st[H]);
|
|
7793
|
-
} else Qe(t, h,
|
|
7793
|
+
} else Qe(t, h, g[N]), h += S[N];
|
|
7794
7794
|
}
|
|
7795
|
-
return Qe(t, h,
|
|
7796
|
-
}, "wblk"),
|
|
7795
|
+
return Qe(t, h, g[256]), h + S[256];
|
|
7796
|
+
}, "wblk"), ki = new wt([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), xr = new Q(0), Hi = a(function(e, t, r, n, i, o) {
|
|
7797
7797
|
var c = o.z || e.length, l = new Q(n + c + 5 * (1 + Math.ceil(c / 7e3)) + i), p = l.subarray(n, l.length - i), E = o.l, h = (o.r || 0) & 7;
|
|
7798
7798
|
if (t) {
|
|
7799
7799
|
h && (p[0] = o.r >> 3);
|
|
7800
|
-
for (var T =
|
|
7801
|
-
return (e[Z] ^ e[Z + 1] <<
|
|
7802
|
-
}, "hsh"), x = new
|
|
7803
|
-
var I =
|
|
7804
|
-
if (M[y] = d, b[I] = y,
|
|
7805
|
-
var
|
|
7806
|
-
if ((F > 7e3 || f > 24576) && (
|
|
7800
|
+
for (var T = ki[t - 1], v = T >> 13, C = T & 8191, D = (1 << r) - 1, M = o.p || new ae(32768), b = o.h || new ae(D + 1), P = Math.ceil(r / 3), w = 2 * P, L = a(function(Z) {
|
|
7801
|
+
return (e[Z] ^ e[Z + 1] << P ^ e[Z + 2] << w) & D;
|
|
7802
|
+
}, "hsh"), x = new wt(25e3), U = new ae(288), k = new ae(32), F = 0, s = 0, u = o.i || 0, f = 0, _ = o.w || 0, m = 0; u + 2 < c; ++u) {
|
|
7803
|
+
var I = L(u), y = u & 32767, d = b[I];
|
|
7804
|
+
if (M[y] = d, b[I] = y, _ <= u) {
|
|
7805
|
+
var g = c - u;
|
|
7806
|
+
if ((F > 7e3 || f > 24576) && (g > 423 || !E)) {
|
|
7807
7807
|
h = Mr(e, p, 0, x, U, k, s, f, m, u - m, h), f = F = s = 0, m = u;
|
|
7808
7808
|
for (var S = 0; S < 286; ++S) U[S] = 0;
|
|
7809
7809
|
for (var S = 0; S < 30; ++S) k[S] = 0;
|
|
7810
7810
|
}
|
|
7811
|
-
var R = 2, A = 0,
|
|
7812
|
-
if (
|
|
7811
|
+
var R = 2, A = 0, O = C, B = y - d & 32767;
|
|
7812
|
+
if (g > 2 && I == L(u - B)) for (var $ = Math.min(v, g) - 1, j = Math.min(32767, u), q = Math.min(258, g); B <= j && --O && y != d; ) {
|
|
7813
7813
|
if (e[u + R] == e[u + R - B]) {
|
|
7814
7814
|
for (var N = 0; N < q && e[u + N] == e[u + N - B]; ++N) ;
|
|
7815
7815
|
if (N > R) {
|
|
7816
7816
|
if (R = N, A = B, N > $) break;
|
|
7817
7817
|
for (var H = Math.min(B, N - 2), Y = 0, S = 0; S < H; ++S) {
|
|
7818
|
-
var he = u - B + S & 32767, be = M[he],
|
|
7819
|
-
|
|
7818
|
+
var he = u - B + S & 32767, be = M[he], ve = he - be & 32767;
|
|
7819
|
+
ve > Y && (Y = ve, d = he);
|
|
7820
7820
|
}
|
|
7821
7821
|
}
|
|
7822
7822
|
}
|
|
7823
7823
|
y = d, d = M[y], B += y - d & 32767;
|
|
7824
7824
|
}
|
|
7825
7825
|
if (A) {
|
|
7826
|
-
x[f++] = 268435456 |
|
|
7827
|
-
var re =
|
|
7828
|
-
s += ot[re] + st[de], ++U[257 + re], ++k[de],
|
|
7826
|
+
x[f++] = 268435456 | bt[R] << 18 | Or[A];
|
|
7827
|
+
var re = bt[R] & 31, de = Or[A] & 31;
|
|
7828
|
+
s += ot[re] + st[de], ++U[257 + re], ++k[de], _ = u + R, ++F;
|
|
7829
7829
|
} else x[f++] = e[u], ++U[e[u]];
|
|
7830
7830
|
}
|
|
7831
7831
|
}
|
|
7832
|
-
for (u = Math.max(u,
|
|
7833
|
-
h = Mr(e, p, E, x, U, k, s, f, m, u - m, h), E || (o.r = h & 7 | p[h / 8 | 0] << 3, h -= 7, o.h = b, o.p = M, o.i = u, o.w =
|
|
7832
|
+
for (u = Math.max(u, _); u < c; ++u) x[f++] = e[u], ++U[e[u]];
|
|
7833
|
+
h = Mr(e, p, E, x, U, k, s, f, m, u - m, h), E || (o.r = h & 7 | p[h / 8 | 0] << 3, h -= 7, o.h = b, o.p = M, o.i = u, o.w = _);
|
|
7834
7834
|
} else {
|
|
7835
7835
|
for (var u = o.w || 0; u < c + E; u += 65535) {
|
|
7836
7836
|
var X = u + 65535;
|
|
@@ -7838,27 +7838,27 @@ var Di = ge(Be, 9, 0), Mi = ge(Be, 9, 1), xi = ge(Je, 5, 0), Gi = ge(Je, 5, 1),
|
|
|
7838
7838
|
}
|
|
7839
7839
|
o.i = c;
|
|
7840
7840
|
}
|
|
7841
|
-
return ze(l, 0, n +
|
|
7842
|
-
}, "dflt"),
|
|
7841
|
+
return ze(l, 0, n + Bt(h) + i);
|
|
7842
|
+
}, "dflt"), Fi = (function() {
|
|
7843
7843
|
for (var e = new Int32Array(256), t = 0; t < 256; ++t) {
|
|
7844
7844
|
for (var r = t, n = 9; --n; ) r = (r & 1 && -306674912) ^ r >>> 1;
|
|
7845
7845
|
e[t] = r;
|
|
7846
7846
|
}
|
|
7847
7847
|
return e;
|
|
7848
|
-
})(),
|
|
7848
|
+
})(), ji = a(function() {
|
|
7849
7849
|
var e = -1;
|
|
7850
7850
|
return { p: a(function(t) {
|
|
7851
|
-
for (var r = e, n = 0; n < t.length; ++n) r =
|
|
7851
|
+
for (var r = e, n = 0; n < t.length; ++n) r = Fi[r & 255 ^ t[n]] ^ r >>> 8;
|
|
7852
7852
|
e = r;
|
|
7853
7853
|
}, "p"), d: a(function() {
|
|
7854
7854
|
return ~e;
|
|
7855
7855
|
}, "d") };
|
|
7856
|
-
}, "crc"),
|
|
7856
|
+
}, "crc"), qi = a(function(e, t, r, n, i) {
|
|
7857
7857
|
if (!i && (i = { l: 1 }, t.dictionary)) {
|
|
7858
7858
|
var o = t.dictionary.subarray(-32768), c = new Q(o.length + e.length);
|
|
7859
7859
|
c.set(o), c.set(e, o.length), e = c, i.w = o.length;
|
|
7860
7860
|
}
|
|
7861
|
-
return
|
|
7861
|
+
return Hi(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);
|
|
7862
7862
|
}, "dopt"), Gr = a(function(e, t) {
|
|
7863
7863
|
var r = {};
|
|
7864
7864
|
for (var n in e) r[n] = e[n];
|
|
@@ -7873,25 +7873,25 @@ var Di = ge(Be, 9, 0), Mi = ge(Be, 9, 1), xi = ge(Je, 5, 0), Gi = ge(Je, 5, 1),
|
|
|
7873
7873
|
}, "b8"), te = a(function(e, t, r) {
|
|
7874
7874
|
for (; r; ++t) e[t] = r, r >>>= 8;
|
|
7875
7875
|
}, "wbytes");
|
|
7876
|
-
function
|
|
7877
|
-
return
|
|
7876
|
+
function Ki(e, t) {
|
|
7877
|
+
return qi(e, t || {}, 0, 0);
|
|
7878
7878
|
}
|
|
7879
|
-
a(
|
|
7880
|
-
function
|
|
7881
|
-
return
|
|
7879
|
+
a(Ki, "deflateSync");
|
|
7880
|
+
function Wi(e, t) {
|
|
7881
|
+
return $i(e, { i: 2 }, t && t.out, t && t.dictionary);
|
|
7882
7882
|
}
|
|
7883
|
-
a(
|
|
7883
|
+
a(Wi, "inflateSync");
|
|
7884
7884
|
var $r = a(function(e, t, r, n) {
|
|
7885
7885
|
for (var i in e) {
|
|
7886
7886
|
var o = e[i], c = t + i, l = n;
|
|
7887
7887
|
Array.isArray(o) && (l = Gr(n, o[1]), o = o[0]), o instanceof Q ? r[c] = [o, l] : (r[c += "/"] = [new Q(0), l], $r(o, c, r, n));
|
|
7888
7888
|
}
|
|
7889
|
-
}, "fltn"), kr = typeof TextEncoder < "u" && new TextEncoder(),
|
|
7889
|
+
}, "fltn"), kr = typeof TextEncoder < "u" && new TextEncoder(), Nt = typeof TextDecoder < "u" && new TextDecoder(), Vi = 0;
|
|
7890
7890
|
try {
|
|
7891
|
-
|
|
7891
|
+
Nt.decode(xr, { stream: true }), Vi = 1;
|
|
7892
7892
|
} catch {
|
|
7893
7893
|
}
|
|
7894
|
-
var
|
|
7894
|
+
var Yi = a(function(e) {
|
|
7895
7895
|
for (var t = "", r = 0; ; ) {
|
|
7896
7896
|
var n = e[r++], i = (n > 127) + (n > 223) + (n > 239);
|
|
7897
7897
|
if (r + i > e.length) return { s: t, r: ze(e, r - 1) };
|
|
@@ -7914,26 +7914,26 @@ function Hr(e, t) {
|
|
|
7914
7914
|
return ze(i, 0, o);
|
|
7915
7915
|
}
|
|
7916
7916
|
a(Hr, "strToU8");
|
|
7917
|
-
function
|
|
7917
|
+
function Ji(e, t) {
|
|
7918
7918
|
if (t) {
|
|
7919
7919
|
for (var r = "", n = 0; n < e.length; n += 16384) r += String.fromCharCode.apply(null, e.subarray(n, n + 16384));
|
|
7920
7920
|
return r;
|
|
7921
7921
|
} else {
|
|
7922
|
-
if (
|
|
7923
|
-
var i =
|
|
7922
|
+
if (Nt) return Nt.decode(e);
|
|
7923
|
+
var i = Yi(e), o = i.s, r = i.r;
|
|
7924
7924
|
return r.length && ne(8), o;
|
|
7925
7925
|
}
|
|
7926
7926
|
}
|
|
7927
|
-
a(
|
|
7928
|
-
var
|
|
7927
|
+
a(Ji, "strFromU8");
|
|
7928
|
+
var zi = a(function(e, t) {
|
|
7929
7929
|
return t + 30 + Ie(e, t + 26) + Ie(e, t + 28);
|
|
7930
|
-
}, "slzh"),
|
|
7931
|
-
var n = Ie(e, t + 28), i =
|
|
7930
|
+
}, "slzh"), Qi = a(function(e, t, r) {
|
|
7931
|
+
var n = Ie(e, t + 28), i = Ji(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 ? Xi(e, o) : [c, Ee(e, t + 24), Ee(e, t + 42)], p = l[0], E = l[1], h = l[2];
|
|
7932
7932
|
return [Ie(e, t + 10), p, E, i, o + Ie(e, t + 30) + Ie(e, t + 32), h];
|
|
7933
|
-
}, "zh"),
|
|
7933
|
+
}, "zh"), Xi = a(function(e, t) {
|
|
7934
7934
|
for (; Ie(e, t) != 1; t += 4 + Ie(e, t + 2)) ;
|
|
7935
7935
|
return [Ot(e, t + 12), Ot(e, t + 4), Ot(e, t + 20)];
|
|
7936
|
-
}, "z64e"),
|
|
7936
|
+
}, "z64e"), Dt = a(function(e) {
|
|
7937
7937
|
var t = 0;
|
|
7938
7938
|
if (e) for (var r in e) {
|
|
7939
7939
|
var n = e[r].length;
|
|
@@ -7941,38 +7941,38 @@ var Qi = a(function(e, t) {
|
|
|
7941
7941
|
}
|
|
7942
7942
|
return t;
|
|
7943
7943
|
}, "exfl"), Fr = a(function(e, t, r, n, i, o, c, l) {
|
|
7944
|
-
var p = n.length, E = r.extra, h = l && l.length, T =
|
|
7944
|
+
var p = n.length, E = r.extra, h = l && l.length, T = Dt(E);
|
|
7945
7945
|
te(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;
|
|
7946
|
-
var
|
|
7947
|
-
if ((
|
|
7946
|
+
var v = new Date(r.mtime == null ? Date.now() : r.mtime), C = v.getFullYear() - 1980;
|
|
7947
|
+
if ((C < 0 || C > 119) && ne(10), te(e, t, C << 25 | v.getMonth() + 1 << 21 | v.getDate() << 16 | v.getHours() << 11 | v.getMinutes() << 5 | v.getSeconds() >> 1), t += 4, o != -1 && (te(e, t, r.crc), te(e, t + 4, o < 0 ? -o - 2 : o), te(e, t + 8, r.size)), te(e, t + 12, p), te(e, t + 14, T), t += 16, c != null && (te(e, t, h), te(e, t + 6, r.attrs), te(e, t + 10, c), t += 14), e.set(n, t), t += p, T) for (var D in E) {
|
|
7948
7948
|
var M = E[D], b = M.length;
|
|
7949
7949
|
te(e, t, +D), te(e, t + 2, b), e.set(M, t + 4), t += 4 + b;
|
|
7950
7950
|
}
|
|
7951
7951
|
return h && (e.set(l, t), t += h), t;
|
|
7952
|
-
}, "wzh"),
|
|
7952
|
+
}, "wzh"), Zi = a(function(e, t, r, n, i) {
|
|
7953
7953
|
te(e, t, 101010256), te(e, t + 8, r), te(e, t + 10, r), te(e, t + 12, n), te(e, t + 16, i);
|
|
7954
7954
|
}, "wzf");
|
|
7955
|
-
function
|
|
7955
|
+
function eo(e, t) {
|
|
7956
7956
|
t || (t = {});
|
|
7957
7957
|
var r = {}, n = [];
|
|
7958
7958
|
$r(e, "", r, t);
|
|
7959
7959
|
var i = 0, o = 0;
|
|
7960
7960
|
for (var c in r) {
|
|
7961
|
-
var l = r[c], p = l[0], E = l[1], h = E.level == 0 ? 0 : 8, T = Hr(c),
|
|
7962
|
-
|
|
7963
|
-
var
|
|
7964
|
-
|
|
7961
|
+
var l = r[c], p = l[0], E = l[1], h = E.level == 0 ? 0 : 8, T = Hr(c), v = T.length, C = E.comment, D = C && Hr(C), M = D && D.length, b = Dt(E.extra);
|
|
7962
|
+
v > 65535 && ne(11);
|
|
7963
|
+
var P = h ? Ki(p, E) : p, w = P.length, L = ji();
|
|
7964
|
+
L.p(p), n.push(Gr(E, { size: p.length, crc: L.d(), c: P, f: T, m: D, u: v != c.length || D && C.length != M, o: i, compression: h })), i += 30 + v + b + w, o += 76 + 2 * (v + b) + (M || 0) + w;
|
|
7965
7965
|
}
|
|
7966
7966
|
for (var x = new Q(o + 22), U = i, k = o - i, F = 0; F < n.length; ++F) {
|
|
7967
7967
|
var T = n[F];
|
|
7968
7968
|
Fr(x, T.o, T, T.f, T.u, T.c.length);
|
|
7969
|
-
var s = 30 + T.f.length +
|
|
7969
|
+
var s = 30 + T.f.length + Dt(T.extra);
|
|
7970
7970
|
x.set(T.c, T.o + s), Fr(x, i, T, T.f, T.u, T.c.length, T.o, T.m), i += 16 + s + (T.m ? T.m.length : 0);
|
|
7971
7971
|
}
|
|
7972
|
-
return
|
|
7972
|
+
return Zi(x, i, n.length, k, U), x;
|
|
7973
7973
|
}
|
|
7974
|
-
a(
|
|
7975
|
-
function
|
|
7974
|
+
a(eo, "zipSync");
|
|
7975
|
+
function to(e, t) {
|
|
7976
7976
|
for (var r = {}, n = e.length - 22; Ee(e, n) != 101010256; --n) (!n || e.length - n > 65558) && ne(13);
|
|
7977
7977
|
var i = Ie(e, n + 8);
|
|
7978
7978
|
if (!i) return {};
|
|
@@ -7982,30 +7982,30 @@ function ro(e, t) {
|
|
|
7982
7982
|
c = Ee(e, l) == 101075792, c && (i = Ee(e, l + 32), o = Ee(e, l + 48));
|
|
7983
7983
|
}
|
|
7984
7984
|
for (var p = 0; p < i; ++p) {
|
|
7985
|
-
var E =
|
|
7986
|
-
o = D, h ? h == 8 ? r[
|
|
7985
|
+
var E = Qi(e, o, c), h = E[0], T = E[1], v = E[2], C = E[3], D = E[4], M = E[5], b = zi(e, M);
|
|
7986
|
+
o = D, h ? h == 8 ? r[C] = Wi(e.subarray(b, b + T), { out: new Q(v) }) : ne(14, "unknown compression type " + h) : r[C] = ze(e, b, b + T);
|
|
7987
7987
|
}
|
|
7988
7988
|
return r;
|
|
7989
7989
|
}
|
|
7990
|
-
a(
|
|
7991
|
-
const
|
|
7990
|
+
a(to, "unzipSync");
|
|
7991
|
+
const ro = [/^\/$/, /^\*+$/, /^[0-9]+$/], no = ["/artifact/", "https://", "http://", "*********"], io = 3;
|
|
7992
7992
|
function jr(e) {
|
|
7993
|
-
return e.filter((t) => !(t.length <
|
|
7993
|
+
return e.filter((t) => !(t.length < io || ro.some((r) => r.test(t)) || no.some((r) => t.includes(r))));
|
|
7994
7994
|
}
|
|
7995
7995
|
a(jr, "filterSensitiveValues");
|
|
7996
|
-
const Ae = Symbol.for("@ts-pattern/matcher"),
|
|
7996
|
+
const Ae = Symbol.for("@ts-pattern/matcher"), oo = Symbol.for("@ts-pattern/isVariadic"), at = "@ts-pattern/anonymous-select-key", Mt = a((e) => !!(e && typeof e == "object"), "r"), ct = a((e) => e && !!e[Ae], "i"), Se = a((e, t, r) => {
|
|
7997
7997
|
if (ct(e)) {
|
|
7998
7998
|
const n = e[Ae](), { matched: i, selections: o } = n.match(t);
|
|
7999
7999
|
return i && o && Object.keys(o).forEach((c) => r(c, o[c])), i;
|
|
8000
8000
|
}
|
|
8001
|
-
if (
|
|
8002
|
-
if (!
|
|
8001
|
+
if (Mt(e)) {
|
|
8002
|
+
if (!Mt(t)) return false;
|
|
8003
8003
|
if (Array.isArray(e)) {
|
|
8004
8004
|
if (!Array.isArray(t)) return false;
|
|
8005
8005
|
let n = [], i = [], o = [];
|
|
8006
8006
|
for (const c of e.keys()) {
|
|
8007
8007
|
const l = e[c];
|
|
8008
|
-
ct(l) && l[
|
|
8008
|
+
ct(l) && l[oo] ? o.push(l) : o.length ? i.push(l) : n.push(l);
|
|
8009
8009
|
}
|
|
8010
8010
|
if (o.length) {
|
|
8011
8011
|
if (o.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
|
|
@@ -8022,24 +8022,24 @@ const Ae = Symbol.for("@ts-pattern/matcher"), so = Symbol.for("@ts-pattern/isVar
|
|
|
8022
8022
|
});
|
|
8023
8023
|
}
|
|
8024
8024
|
return Object.is(t, e);
|
|
8025
|
-
}, "o"),
|
|
8025
|
+
}, "o"), Pe = a((e) => {
|
|
8026
8026
|
var t, r, n;
|
|
8027
|
-
return
|
|
8027
|
+
return Mt(e) ? ct(e) ? (t = (r = (n = e[Ae]()).getSelectionKeys) == null ? void 0 : r.call(n)) != null ? t : [] : Array.isArray(e) ? Ze(e, Pe) : Ze(Object.values(e), Pe) : [];
|
|
8028
8028
|
}, "s"), Ze = a((e, t) => e.reduce((r, n) => r.concat(t(n)), []), "c");
|
|
8029
8029
|
function ce(e) {
|
|
8030
|
-
return Object.assign(e, { optional: a(() =>
|
|
8030
|
+
return Object.assign(e, { optional: a(() => so(e), "optional"), and: a((t) => V(e, t), "and"), or: a((t) => ao(e, t), "or"), select: a((t) => t === void 0 ? qr(e) : qr(t, e), "select") });
|
|
8031
8031
|
}
|
|
8032
8032
|
a(ce, "a");
|
|
8033
|
-
function
|
|
8033
|
+
function so(e) {
|
|
8034
8034
|
return ce({ [Ae]: () => ({ match: a((t) => {
|
|
8035
8035
|
let r = {};
|
|
8036
8036
|
const n = a((i, o) => {
|
|
8037
8037
|
r[i] = o;
|
|
8038
8038
|
}, "r2");
|
|
8039
|
-
return t === void 0 ? (
|
|
8040
|
-
}, "match"), getSelectionKeys: a(() =>
|
|
8039
|
+
return t === void 0 ? (Pe(e).forEach((i) => n(i, void 0)), { matched: true, selections: r }) : { matched: Se(e, t, n), selections: r };
|
|
8040
|
+
}, "match"), getSelectionKeys: a(() => Pe(e), "getSelectionKeys"), matcherType: "optional" }) });
|
|
8041
8041
|
}
|
|
8042
|
-
a(
|
|
8042
|
+
a(so, "h");
|
|
8043
8043
|
function V(...e) {
|
|
8044
8044
|
return ce({ [Ae]: () => ({ match: a((t) => {
|
|
8045
8045
|
let r = {};
|
|
@@ -8047,19 +8047,19 @@ function V(...e) {
|
|
|
8047
8047
|
r[i] = o;
|
|
8048
8048
|
}, "r2");
|
|
8049
8049
|
return { matched: e.every((i) => Se(i, t, n)), selections: r };
|
|
8050
|
-
}, "match"), getSelectionKeys: a(() => Ze(e,
|
|
8050
|
+
}, "match"), getSelectionKeys: a(() => Ze(e, Pe), "getSelectionKeys"), matcherType: "and" }) });
|
|
8051
8051
|
}
|
|
8052
8052
|
a(V, "d");
|
|
8053
|
-
function
|
|
8053
|
+
function ao(...e) {
|
|
8054
8054
|
return ce({ [Ae]: () => ({ match: a((t) => {
|
|
8055
8055
|
let r = {};
|
|
8056
8056
|
const n = a((i, o) => {
|
|
8057
8057
|
r[i] = o;
|
|
8058
8058
|
}, "r2");
|
|
8059
|
-
return Ze(e,
|
|
8060
|
-
}, "match"), getSelectionKeys: a(() => Ze(e,
|
|
8059
|
+
return Ze(e, Pe).forEach((i) => n(i, void 0)), { matched: e.some((i) => Se(i, t, n)), selections: r };
|
|
8060
|
+
}, "match"), getSelectionKeys: a(() => Ze(e, Pe), "getSelectionKeys"), matcherType: "or" }) });
|
|
8061
8061
|
}
|
|
8062
|
-
a(
|
|
8062
|
+
a(ao, "y");
|
|
8063
8063
|
function K(e) {
|
|
8064
8064
|
return { [Ae]: () => ({ match: a((t) => ({ matched: !!e(t) }), "match") }) };
|
|
8065
8065
|
}
|
|
@@ -8071,7 +8071,7 @@ function qr(...e) {
|
|
|
8071
8071
|
return { matched: r === void 0 || Se(r, n, (o, c) => {
|
|
8072
8072
|
i[o] = c;
|
|
8073
8073
|
}), selections: i };
|
|
8074
|
-
}, "match"), getSelectionKeys: a(() => [t ?? at].concat(r === void 0 ? [] :
|
|
8074
|
+
}, "match"), getSelectionKeys: a(() => [t ?? at].concat(r === void 0 ? [] : Pe(r)), "getSelectionKeys") }) });
|
|
8075
8075
|
}
|
|
8076
8076
|
a(qr, "v");
|
|
8077
8077
|
function Kr(e) {
|
|
@@ -8082,32 +8082,32 @@ function Re(e) {
|
|
|
8082
8082
|
return typeof e == "number";
|
|
8083
8083
|
}
|
|
8084
8084
|
a(Re, "w");
|
|
8085
|
-
function
|
|
8085
|
+
function Le(e) {
|
|
8086
8086
|
return typeof e == "string";
|
|
8087
8087
|
}
|
|
8088
|
-
a(
|
|
8089
|
-
function
|
|
8088
|
+
a(Le, "S");
|
|
8089
|
+
function Oe(e) {
|
|
8090
8090
|
return typeof e == "bigint";
|
|
8091
8091
|
}
|
|
8092
|
-
a(
|
|
8092
|
+
a(Oe, "j"), ce(K(Kr)), ce(K(Kr));
|
|
8093
8093
|
const Ne = a((e) => Object.assign(ce(e), { startsWith: a((t) => {
|
|
8094
|
-
return Ne(V(e, (r = t, K((n) =>
|
|
8094
|
+
return Ne(V(e, (r = t, K((n) => Le(n) && n.startsWith(r)))));
|
|
8095
8095
|
var r;
|
|
8096
8096
|
}, "startsWith"), endsWith: a((t) => {
|
|
8097
|
-
return Ne(V(e, (r = t, K((n) =>
|
|
8097
|
+
return Ne(V(e, (r = t, K((n) => Le(n) && n.endsWith(r)))));
|
|
8098
8098
|
var r;
|
|
8099
|
-
}, "endsWith"), minLength: a((t) => Ne(V(e, ((r) => K((n) =>
|
|
8100
|
-
return Ne(V(e, (r = t, K((n) =>
|
|
8099
|
+
}, "endsWith"), minLength: a((t) => Ne(V(e, ((r) => K((n) => Le(n) && n.length >= r))(t))), "minLength"), length: a((t) => Ne(V(e, ((r) => K((n) => Le(n) && n.length === r))(t))), "length"), maxLength: a((t) => Ne(V(e, ((r) => K((n) => Le(n) && n.length <= r))(t))), "maxLength"), includes: a((t) => {
|
|
8100
|
+
return Ne(V(e, (r = t, K((n) => Le(n) && n.includes(r)))));
|
|
8101
8101
|
var r;
|
|
8102
8102
|
}, "includes"), regex: a((t) => {
|
|
8103
|
-
return Ne(V(e, (r = t, K((n) =>
|
|
8103
|
+
return Ne(V(e, (r = t, K((n) => Le(n) && !!n.match(r)))));
|
|
8104
8104
|
var r;
|
|
8105
8105
|
}, "regex") }), "x");
|
|
8106
|
-
Ne(K(
|
|
8106
|
+
Ne(K(Le));
|
|
8107
8107
|
const Te = a((e) => Object.assign(ce(e), { between: a((t, r) => Te(V(e, ((n, i) => K((o) => Re(o) && n <= o && i >= o))(t, r))), "between"), lt: a((t) => Te(V(e, ((r) => K((n) => Re(n) && n < r))(t))), "lt"), gt: a((t) => Te(V(e, ((r) => K((n) => Re(n) && n > r))(t))), "gt"), lte: a((t) => Te(V(e, ((r) => K((n) => Re(n) && n <= r))(t))), "lte"), gte: a((t) => Te(V(e, ((r) => K((n) => Re(n) && n >= r))(t))), "gte"), int: a(() => Te(V(e, K((t) => Re(t) && Number.isInteger(t)))), "int"), finite: a(() => Te(V(e, K((t) => Re(t) && Number.isFinite(t)))), "finite"), positive: a(() => Te(V(e, K((t) => Re(t) && t > 0))), "positive"), negative: a(() => Te(V(e, K((t) => Re(t) && t < 0))), "negative") }), "N");
|
|
8108
8108
|
Te(K(Re));
|
|
8109
|
-
const De = a((e) => Object.assign(ce(e), { between: a((t, r) => De(V(e, ((n, i) => K((o) =>
|
|
8110
|
-
De(K(
|
|
8109
|
+
const De = a((e) => Object.assign(ce(e), { between: a((t, r) => De(V(e, ((n, i) => K((o) => Oe(o) && n <= o && i >= o))(t, r))), "between"), lt: a((t) => De(V(e, ((r) => K((n) => Oe(n) && n < r))(t))), "lt"), gt: a((t) => De(V(e, ((r) => K((n) => Oe(n) && n > r))(t))), "gt"), lte: a((t) => De(V(e, ((r) => K((n) => Oe(n) && n <= r))(t))), "lte"), gte: a((t) => De(V(e, ((r) => K((n) => Oe(n) && n >= r))(t))), "gte"), positive: a(() => De(V(e, K((t) => Oe(t) && t > 0))), "positive"), negative: a(() => De(V(e, K((t) => Oe(t) && t < 0))), "negative") }), "k");
|
|
8110
|
+
De(K(Oe)), ce(K(function(e) {
|
|
8111
8111
|
return typeof e == "boolean";
|
|
8112
8112
|
})), ce(K(function(e) {
|
|
8113
8113
|
return typeof e == "symbol";
|
|
@@ -8116,7 +8116,7 @@ De(K(Pe)), ce(K(function(e) {
|
|
|
8116
8116
|
})), ce(K(function(e) {
|
|
8117
8117
|
return e != null;
|
|
8118
8118
|
}));
|
|
8119
|
-
class
|
|
8119
|
+
class co extends Error {
|
|
8120
8120
|
static {
|
|
8121
8121
|
a(this, "I");
|
|
8122
8122
|
}
|
|
@@ -8130,11 +8130,11 @@ class uo extends Error {
|
|
|
8130
8130
|
super(`Pattern matching error: no pattern matches value ${r}`), this.input = void 0, this.input = t;
|
|
8131
8131
|
}
|
|
8132
8132
|
}
|
|
8133
|
-
const
|
|
8134
|
-
function
|
|
8135
|
-
return new mt(e,
|
|
8133
|
+
const xt = { matched: false, value: void 0 };
|
|
8134
|
+
function uo(e) {
|
|
8135
|
+
return new mt(e, xt);
|
|
8136
8136
|
}
|
|
8137
|
-
a(
|
|
8137
|
+
a(uo, "M");
|
|
8138
8138
|
class mt {
|
|
8139
8139
|
static {
|
|
8140
8140
|
a(this, "R");
|
|
@@ -8150,18 +8150,18 @@ class mt {
|
|
|
8150
8150
|
let o = false, c = {};
|
|
8151
8151
|
const l = a((E, h) => {
|
|
8152
8152
|
o = true, c[E] = h;
|
|
8153
|
-
}, "u2"), p = !n.some((E) => Se(E, this.input, l)) || i && !i(this.input) ?
|
|
8153
|
+
}, "u2"), p = !n.some((E) => Se(E, this.input, l)) || i && !i(this.input) ? xt : { matched: true, value: r(o ? at in c ? c[at] : c : this.input, this.input) };
|
|
8154
8154
|
return new mt(this.input, p);
|
|
8155
8155
|
}
|
|
8156
8156
|
when(t, r) {
|
|
8157
8157
|
if (this.state.matched) return this;
|
|
8158
8158
|
const n = !!t(this.input);
|
|
8159
|
-
return new mt(this.input, n ? { matched: true, value: r(this.input, this.input) } :
|
|
8159
|
+
return new mt(this.input, n ? { matched: true, value: r(this.input, this.input) } : xt);
|
|
8160
8160
|
}
|
|
8161
8161
|
otherwise(t) {
|
|
8162
8162
|
return this.state.matched ? this.state.value : t(this.input);
|
|
8163
8163
|
}
|
|
8164
|
-
exhaustive(t =
|
|
8164
|
+
exhaustive(t = lo) {
|
|
8165
8165
|
return this.state.matched ? this.state.value : t(this.input);
|
|
8166
8166
|
}
|
|
8167
8167
|
run() {
|
|
@@ -8174,45 +8174,45 @@ class mt {
|
|
|
8174
8174
|
return this;
|
|
8175
8175
|
}
|
|
8176
8176
|
}
|
|
8177
|
-
function
|
|
8178
|
-
throw new
|
|
8177
|
+
function lo(e) {
|
|
8178
|
+
throw new co(e);
|
|
8179
8179
|
}
|
|
8180
|
-
a(
|
|
8181
|
-
const
|
|
8180
|
+
a(lo, "F");
|
|
8181
|
+
const fo = "[REDACTED]", ho = /* @__PURE__ */ new Set(["sha1", "_sha1", "pageref", "downloadsPath", "tracesDir", "pageId"]);
|
|
8182
8182
|
function se({ sensitiveValues: e, str: t }) {
|
|
8183
|
-
return e.reduce((r, n) => r.replaceAll(n,
|
|
8183
|
+
return e.reduce((r, n) => r.replaceAll(n, fo), t);
|
|
8184
8184
|
}
|
|
8185
8185
|
a(se, "scrubString");
|
|
8186
|
-
function
|
|
8186
|
+
function po(e) {
|
|
8187
8187
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
8188
8188
|
}
|
|
8189
|
-
a(
|
|
8189
|
+
a(po, "isRecord");
|
|
8190
8190
|
function et({ sensitiveValues: e, value: t }) {
|
|
8191
|
-
return typeof t == "string" ? se({ sensitiveValues: e, str: t }) : Array.isArray(t) ? t.map((r) => et({ sensitiveValues: e, value: r })) :
|
|
8191
|
+
return typeof t == "string" ? se({ sensitiveValues: e, str: t }) : Array.isArray(t) ? t.map((r) => et({ sensitiveValues: e, value: r })) : po(t) ? Ge({ obj: t, sensitiveValues: e }) : t;
|
|
8192
8192
|
}
|
|
8193
8193
|
a(et, "scrubValue");
|
|
8194
|
-
function
|
|
8195
|
-
return
|
|
8194
|
+
function mo(e) {
|
|
8195
|
+
return ho.has(e) ? true : e.toLowerCase().endsWith("sha1");
|
|
8196
8196
|
}
|
|
8197
|
-
a(
|
|
8197
|
+
a(mo, "shouldPreserveKey");
|
|
8198
8198
|
function Ge({ obj: e, sensitiveValues: t }) {
|
|
8199
|
-
return Object.fromEntries(Object.entries(e).map(([r, n]) => [r,
|
|
8199
|
+
return Object.fromEntries(Object.entries(e).map(([r, n]) => [r, mo(r) ? n : et({ sensitiveValues: t, value: n })]));
|
|
8200
8200
|
}
|
|
8201
8201
|
a(Ge, "scrubObject");
|
|
8202
8202
|
function Wr({ error: e, sensitiveValues: t }) {
|
|
8203
8203
|
return e ? { ...e, message: se({ sensitiveValues: t, str: e.message }) } : void 0;
|
|
8204
8204
|
}
|
|
8205
8205
|
a(Wr, "scrubError");
|
|
8206
|
-
function
|
|
8207
|
-
return
|
|
8206
|
+
function Eo({ event: e, sensitiveValues: t }) {
|
|
8207
|
+
return uo(e).with({ type: "console" }, (r) => ({ ...r, args: r.args?.map((n) => ({ ...n, preview: se({ sensitiveValues: t, str: n.preview }), value: et({ sensitiveValues: t, value: n.value }) })), text: se({ sensitiveValues: t, str: r.text }) })).with({ type: "before" }, (r) => ({ ...r, params: Ge({ obj: r.params, sensitiveValues: t }), title: r.title ? se({ sensitiveValues: t, str: r.title }) : void 0 })).with({ type: "after" }, (r) => ({ ...r, error: Wr({ error: r.error, sensitiveValues: t }), result: r.result !== void 0 ? et({ sensitiveValues: t, value: r.result }) : void 0 })).with({ type: "action" }, (r) => ({ ...r, error: Wr({ error: r.error, sensitiveValues: t }), params: Ge({ obj: r.params, sensitiveValues: t }), result: r.result !== void 0 ? et({ sensitiveValues: t, value: r.result }) : void 0, title: r.title ? se({ sensitiveValues: t, str: r.title }) : void 0 })).with({ type: "event" }, (r) => ({ ...r, params: Ge({ 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: Ge({ obj: r.options, sensitiveValues: t }), title: r.title ? se({ sensitiveValues: t, str: r.title }) : void 0 })).with({ type: "frame-snapshot" }, (r) => ({ ...r, snapshot: Ge({ obj: r.snapshot, sensitiveValues: t }) })).with({ type: "resource-snapshot" }, (r) => ({ ...r, snapshot: Ge({ obj: r.snapshot, sensitiveValues: t }) })).with({ type: "screencast-frame" }, { type: "input" }, (r) => r).exhaustive();
|
|
8208
8208
|
}
|
|
8209
|
-
a(
|
|
8209
|
+
a(Eo, "scrubTraceEvent");
|
|
8210
8210
|
function go({ content: e, sensitiveValues: t }) {
|
|
8211
8211
|
const r = new TextDecoder$1(), n = new TextEncoder$1(), c = r.decode(e).split(`
|
|
8212
8212
|
`).map((l) => {
|
|
8213
8213
|
if (!l.trim()) return l;
|
|
8214
8214
|
try {
|
|
8215
|
-
const p = JSON.parse(l), E =
|
|
8215
|
+
const p = JSON.parse(l), E = Eo({ event: p, sensitiveValues: t });
|
|
8216
8216
|
return JSON.stringify(E);
|
|
8217
8217
|
} catch {
|
|
8218
8218
|
return se({ sensitiveValues: t, str: l });
|
|
@@ -8227,38 +8227,38 @@ function Vr({ content: e, sensitiveValues: t }) {
|
|
|
8227
8227
|
return n.encode(i);
|
|
8228
8228
|
}
|
|
8229
8229
|
a(Vr, "scrubTextFile");
|
|
8230
|
-
async function
|
|
8230
|
+
async function Gt({ sensitiveValues: e, traceBuffer: t }) {
|
|
8231
8231
|
const r = jr(e);
|
|
8232
8232
|
if (r.length === 0) return new Uint8Array(t);
|
|
8233
|
-
const n = [...r].sort((p, E) => E.length - p.length), i =
|
|
8234
|
-
return
|
|
8233
|
+
const n = [...r].sort((p, E) => E.length - p.length), i = to(new Uint8Array(t)), o = Object.entries(i), c = await Promise.all(o.map(async ([p, E]) => [p, await _o({ content: E, filename: p, sensitiveValues: n })])), l = Object.fromEntries(c);
|
|
8234
|
+
return eo(l);
|
|
8235
8235
|
}
|
|
8236
|
-
a(
|
|
8237
|
-
async function
|
|
8236
|
+
a(Gt, "scrubTrace");
|
|
8237
|
+
async function _o({ content: e, filename: t, sensitiveValues: r }) {
|
|
8238
8238
|
const n = t.toLowerCase();
|
|
8239
|
-
return n.endsWith(".trace") || n.endsWith(".network") ? go({ content: e, sensitiveValues: r }) : n.endsWith(".html") || n.endsWith(".dat") || n.endsWith(".json") ? Vr({ content: e, sensitiveValues: r }) : n.startsWith("resources/") ?
|
|
8239
|
+
return n.endsWith(".trace") || n.endsWith(".network") ? go({ content: e, sensitiveValues: r }) : n.endsWith(".html") || n.endsWith(".dat") || n.endsWith(".json") ? Vr({ content: e, sensitiveValues: r }) : n.startsWith("resources/") ? Io({ content: e, sensitiveValues: r }) : e;
|
|
8240
8240
|
}
|
|
8241
|
-
a(
|
|
8242
|
-
async function
|
|
8243
|
-
return await
|
|
8241
|
+
a(_o, "scrubFile");
|
|
8242
|
+
async function Io({ content: e, sensitiveValues: t }) {
|
|
8243
|
+
return await Li.isBinaryFile(Buffer.from(e)) ? e : Vr({ content: e, sensitiveValues: t });
|
|
8244
8244
|
}
|
|
8245
|
-
a(
|
|
8246
|
-
async function
|
|
8245
|
+
a(Io, "scrubResourceFile");
|
|
8246
|
+
async function So({ sensitiveValues: e, tracePath: t }) {
|
|
8247
8247
|
const r = [], n = createReadStream(t);
|
|
8248
8248
|
for await (const o of n) r.push(Uint8Array.from(o));
|
|
8249
8249
|
const i = new Uint8Array(Buffer.concat(r));
|
|
8250
|
-
return
|
|
8250
|
+
return Gt({ sensitiveValues: e, traceBuffer: i });
|
|
8251
8251
|
}
|
|
8252
|
-
a(
|
|
8253
|
-
async function
|
|
8252
|
+
a(So, "scrubTraceFromPath");
|
|
8253
|
+
async function Ro({ sensitiveValues: e, traceFd: t, tracePath: r }) {
|
|
8254
8254
|
const n = [], i = createReadStream(r, { autoClose: true, fd: t });
|
|
8255
8255
|
for await (const c of i) n.push(Uint8Array.from(c));
|
|
8256
8256
|
const o = new Uint8Array(Buffer.concat(n));
|
|
8257
|
-
return
|
|
8257
|
+
return Gt({ sensitiveValues: e, traceBuffer: o });
|
|
8258
8258
|
}
|
|
8259
|
-
a(
|
|
8259
|
+
a(Ro, "scrubTraceFromFd");
|
|
8260
8260
|
const Yr = { AUTHENTICATION_FAILED: 1008 };
|
|
8261
|
-
class
|
|
8261
|
+
class To {
|
|
8262
8262
|
static {
|
|
8263
8263
|
a(this, "WebSocketClient");
|
|
8264
8264
|
}
|
|
@@ -8277,33 +8277,48 @@ class yo {
|
|
|
8277
8277
|
isManualClose = false;
|
|
8278
8278
|
isAuthenticated = false;
|
|
8279
8279
|
authenticationFailed = false;
|
|
8280
|
+
pingIntervalTimer;
|
|
8281
|
+
lastPongAt = 0;
|
|
8280
8282
|
constructor({ apiKey: t, maxBufferSize: r = 1e3, maxReconnectAttempts: n = 3, onError: i, onMessage: o, projectId: c, reconnectDelay: l = 2e3, url: p }) {
|
|
8281
8283
|
this.url = p, this.apiKey = t, this.projectId = c, this.maxBufferSize = r, this.reconnectDelay = l, this.maxReconnectAttempts = n, this.onMessage = o, this.onError = i, this.connect();
|
|
8282
8284
|
}
|
|
8283
8285
|
connect() {
|
|
8284
8286
|
try {
|
|
8285
8287
|
const t = { Authorization: this.apiKey ?? "", "x-project-id": this.projectId ?? "" };
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
+
this.socket = new WebSocket(this.url, { headers: t }), this.socket.on("open", () => {
|
|
8289
|
+
this.reconnectAttempts = 0;
|
|
8288
8290
|
}), this.socket.on("message", (r) => {
|
|
8289
8291
|
try {
|
|
8290
8292
|
const n = typeof r == "string" ? r : r.toString(), i = JSON.parse(n);
|
|
8291
|
-
i.type === "connected" ? (this.isAuthenticated = true, this.authenticationFailed = false, this.flushBuffer()) : this.onMessage && this.onMessage(i);
|
|
8293
|
+
i.type === "connected" ? (this.isAuthenticated = true, this.authenticationFailed = false, this.flushBuffer(), this.startPingInterval()) : i.type === "pong" ? this.lastPongAt = Date.now() : this.onMessage && this.onMessage(i);
|
|
8292
8294
|
} catch {
|
|
8293
8295
|
}
|
|
8294
8296
|
}), this.socket.on("close", (r, n) => {
|
|
8295
|
-
|
|
8296
|
-
}), this.socket.on("error", (
|
|
8297
|
-
console.log(`[StablyAI reporter] WebSocket error: ${r.message}, url=${this.url}`);
|
|
8297
|
+
this.isAuthenticated = false, this.clearPingInterval(), r === Yr.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
|
+
}), this.socket.on("error", () => {
|
|
8298
8299
|
});
|
|
8299
8300
|
} catch {
|
|
8300
8301
|
this.scheduleReconnect();
|
|
8301
8302
|
}
|
|
8302
8303
|
}
|
|
8303
8304
|
scheduleReconnect() {
|
|
8304
|
-
this.reconnectTimer && clearTimeout(this.reconnectTimer)
|
|
8305
|
+
this.reconnectTimer && clearTimeout(this.reconnectTimer);
|
|
8306
|
+
const t = Math.min(this.reconnectDelay * Math.pow(2, this.reconnectAttempts), 3e4);
|
|
8307
|
+
this.reconnectAttempts++, this.reconnectTimer = setTimeout(() => {
|
|
8305
8308
|
this.connect();
|
|
8306
|
-
}, this.
|
|
8309
|
+
}, t), this.reconnectTimer.unref();
|
|
8310
|
+
}
|
|
8311
|
+
startPingInterval() {
|
|
8312
|
+
this.clearPingInterval(), this.lastPongAt = Date.now(), this.pingIntervalTimer = setInterval(() => {
|
|
8313
|
+
if (Date.now() - this.lastPongAt > 5e4) {
|
|
8314
|
+
this.clearPingInterval(), this.socket?.terminate();
|
|
8315
|
+
return;
|
|
8316
|
+
}
|
|
8317
|
+
this.socket?.readyState === WebSocket.OPEN && this.socket.send(JSON.stringify({ type: "ping" }));
|
|
8318
|
+
}, 2e4), this.pingIntervalTimer.unref();
|
|
8319
|
+
}
|
|
8320
|
+
clearPingInterval() {
|
|
8321
|
+
this.pingIntervalTimer && (clearInterval(this.pingIntervalTimer), this.pingIntervalTimer = void 0);
|
|
8307
8322
|
}
|
|
8308
8323
|
flushBuffer() {
|
|
8309
8324
|
if (this.buffer.length === 0 || !this.socket || this.socket.readyState !== WebSocket.OPEN) return;
|
|
@@ -8322,21 +8337,20 @@ class yo {
|
|
|
8322
8337
|
this.buffer.length >= this.maxBufferSize && this.buffer.shift(), this.buffer.push(t);
|
|
8323
8338
|
}
|
|
8324
8339
|
async sendEvent(t) {
|
|
8325
|
-
|
|
8326
|
-
|
|
8340
|
+
const { socket: r } = this;
|
|
8341
|
+
if (!r || r.readyState !== WebSocket.OPEN || !this.isAuthenticated) {
|
|
8342
|
+
this.bufferEvent(t), r?.readyState === WebSocket.CLOSED && this.reconnectAttempts < this.maxReconnectAttempts && this.scheduleReconnect();
|
|
8327
8343
|
return;
|
|
8328
8344
|
}
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8332
|
-
|
|
8345
|
+
const n = JSON.stringify(t);
|
|
8346
|
+
await new Promise((i, o) => {
|
|
8347
|
+
r.send(n, (c) => {
|
|
8348
|
+
c ? (this.bufferEvent(t), o(c)) : i();
|
|
8333
8349
|
});
|
|
8334
|
-
}
|
|
8335
|
-
throw this.bufferEvent(t), r;
|
|
8336
|
-
}
|
|
8350
|
+
});
|
|
8337
8351
|
}
|
|
8338
8352
|
close() {
|
|
8339
|
-
this.isManualClose = true, this.reconnectTimer && clearTimeout(this.reconnectTimer), this.socket && (this.socket.close(), this.socket = void 0);
|
|
8353
|
+
this.isManualClose = true, this.clearPingInterval(), this.reconnectTimer && clearTimeout(this.reconnectTimer), this.socket && (this.socket.close(), this.socket = void 0);
|
|
8340
8354
|
}
|
|
8341
8355
|
get isConnected() {
|
|
8342
8356
|
return this.socket?.readyState === WebSocket.OPEN && this.isAuthenticated;
|
|
@@ -8348,7 +8362,7 @@ class yo {
|
|
|
8348
8362
|
return [...this.buffer];
|
|
8349
8363
|
}
|
|
8350
8364
|
}
|
|
8351
|
-
var
|
|
8365
|
+
var yo = { detect({ env: e }) {
|
|
8352
8366
|
return !!e.APPVEYOR;
|
|
8353
8367
|
}, configuration({ env: e }) {
|
|
8354
8368
|
const t = e.APPVEYOR_PULL_REQUEST_NUMBER, r = !!t;
|
|
@@ -8362,16 +8376,16 @@ function tt(e) {
|
|
|
8362
8376
|
return e ? /^(?:refs\/heads\/)?(?<branch>.+)$/i.exec(e)[1] : void 0;
|
|
8363
8377
|
}
|
|
8364
8378
|
a(tt, "parseBranch");
|
|
8365
|
-
var
|
|
8379
|
+
var wo = { detect({ env: e }) {
|
|
8366
8380
|
return !!e.BUILD_BUILDURI;
|
|
8367
8381
|
}, configuration({ env: e }) {
|
|
8368
8382
|
const t = e.SYSTEM_PULLREQUEST_PULLREQUESTID, r = !!t;
|
|
8369
8383
|
return { name: "Azure Pipelines", service: "azurePipelines", commit: e.BUILD_SOURCEVERSION, build: e.BUILD_BUILDNUMBER, branch: tt(r ? e.SYSTEM_PULLREQUEST_TARGETBRANCH : e.BUILD_SOURCEBRANCH), pr: t, isPr: r, prBranch: tt(r ? e.SYSTEM_PULLREQUEST_SOURCEBRANCH : void 0), root: e.BUILD_REPOSITORY_LOCALPATH };
|
|
8370
|
-
} },
|
|
8384
|
+
} }, Ao = { detect({ env: e }) {
|
|
8371
8385
|
return !!e.bamboo_agentId;
|
|
8372
8386
|
}, configuration({ env: e }) {
|
|
8373
8387
|
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 };
|
|
8374
|
-
} },
|
|
8388
|
+
} }, bo = { detect({ env: e }) {
|
|
8375
8389
|
return !!e.BITBUCKET_BUILD_NUMBER;
|
|
8376
8390
|
}, configuration({ env: e }) {
|
|
8377
8391
|
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 };
|
|
@@ -8380,16 +8394,16 @@ var Ao = { detect({ env: e }) {
|
|
|
8380
8394
|
}, configuration({ env: e }) {
|
|
8381
8395
|
const t = e.BITRISE_PULL_REQUEST === "false" ? void 0 : e.BITRISE_PULL_REQUEST, r = !!t;
|
|
8382
8396
|
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 };
|
|
8383
|
-
} },
|
|
8397
|
+
} }, Co = { detect({ env: e }) {
|
|
8384
8398
|
return !!e.BUDDY_WORKSPACE_ID;
|
|
8385
8399
|
}, configuration({ env: e }) {
|
|
8386
8400
|
const t = Jr(e.BUDDY_EXECUTION_PULL_REQUEST_ID), r = !!t;
|
|
8387
8401
|
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 };
|
|
8388
|
-
} }, $e = { exports: {} },
|
|
8389
|
-
function
|
|
8390
|
-
if (zr) return
|
|
8391
|
-
zr = 1,
|
|
8392
|
-
var e =
|
|
8402
|
+
} }, $e = { exports: {} }, $t, zr;
|
|
8403
|
+
function Uo() {
|
|
8404
|
+
if (zr) return $t;
|
|
8405
|
+
zr = 1, $t = n, n.sync = i;
|
|
8406
|
+
var e = qe;
|
|
8393
8407
|
function t(o, c) {
|
|
8394
8408
|
var l = c.pathExt !== void 0 ? c.pathExt : process.env.PATHEXT;
|
|
8395
8409
|
if (!l || (l = l.split(";"), l.indexOf("") !== -1)) return true;
|
|
@@ -8413,14 +8427,14 @@ function Bo() {
|
|
|
8413
8427
|
function i(o, c) {
|
|
8414
8428
|
return r(e.statSync(o), o, c);
|
|
8415
8429
|
}
|
|
8416
|
-
return a(i, "sync"),
|
|
8430
|
+
return a(i, "sync"), $t;
|
|
8417
8431
|
}
|
|
8418
|
-
a(
|
|
8419
|
-
var
|
|
8420
|
-
function
|
|
8421
|
-
if (Qr) return
|
|
8422
|
-
Qr = 1,
|
|
8423
|
-
var e =
|
|
8432
|
+
a(Uo, "requireWindows");
|
|
8433
|
+
var kt, Qr;
|
|
8434
|
+
function Bo() {
|
|
8435
|
+
if (Qr) return kt;
|
|
8436
|
+
Qr = 1, kt = t, t.sync = r;
|
|
8437
|
+
var e = qe;
|
|
8424
8438
|
function t(o, c, l) {
|
|
8425
8439
|
e.stat(o, function(p, E) {
|
|
8426
8440
|
l(p, p ? false : n(E, c));
|
|
@@ -8436,18 +8450,18 @@ function Lo() {
|
|
|
8436
8450
|
}
|
|
8437
8451
|
a(n, "checkStat");
|
|
8438
8452
|
function i(o, c) {
|
|
8439
|
-
var l = o.mode, p = o.uid, E = o.gid, h = c.uid !== void 0 ? c.uid : process.getuid && process.getuid(), T = c.gid !== void 0 ? c.gid : process.getgid && process.getgid(),
|
|
8453
|
+
var l = o.mode, p = o.uid, E = o.gid, h = c.uid !== void 0 ? c.uid : process.getuid && process.getuid(), T = c.gid !== void 0 ? c.gid : process.getgid && process.getgid(), v = parseInt("100", 8), C = parseInt("010", 8), D = parseInt("001", 8), M = v | C, b = l & D || l & C && E === T || l & v && p === h || l & M && h === 0;
|
|
8440
8454
|
return b;
|
|
8441
8455
|
}
|
|
8442
|
-
return a(i, "checkMode"),
|
|
8456
|
+
return a(i, "checkMode"), kt;
|
|
8443
8457
|
}
|
|
8444
|
-
a(
|
|
8445
|
-
var
|
|
8446
|
-
function
|
|
8447
|
-
if (Xr) return
|
|
8458
|
+
a(Bo, "requireMode");
|
|
8459
|
+
var Ht, Xr;
|
|
8460
|
+
function Po() {
|
|
8461
|
+
if (Xr) return Ht;
|
|
8448
8462
|
Xr = 1;
|
|
8449
8463
|
var e;
|
|
8450
|
-
process.platform === "win32" ||
|
|
8464
|
+
process.platform === "win32" || Bi.TESTING_WINDOWS ? e = Uo() : e = Bo(), Ht = t, t.sync = r;
|
|
8451
8465
|
function t(n, i, o) {
|
|
8452
8466
|
if (typeof i == "function" && (o = i, i = {}), !o) {
|
|
8453
8467
|
if (typeof Promise != "function") throw new TypeError("callback not provided");
|
|
@@ -8470,55 +8484,55 @@ function Oo() {
|
|
|
8470
8484
|
throw o;
|
|
8471
8485
|
}
|
|
8472
8486
|
}
|
|
8473
|
-
return a(r, "sync"),
|
|
8487
|
+
return a(r, "sync"), Ht;
|
|
8474
8488
|
}
|
|
8475
|
-
a(
|
|
8476
|
-
var
|
|
8477
|
-
function
|
|
8478
|
-
if (Zr) return
|
|
8489
|
+
a(Po, "requireIsexe");
|
|
8490
|
+
var Ft, Zr;
|
|
8491
|
+
function Lo() {
|
|
8492
|
+
if (Zr) return Ft;
|
|
8479
8493
|
Zr = 1;
|
|
8480
|
-
const e = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", t =
|
|
8481
|
-
const h = E.colon || r, T = p.match(/\//) || e && p.match(/\\/) ? [""] : [...e ? [process.cwd()] : [], ...(E.path || process.env.PATH || "").split(h)],
|
|
8482
|
-
return e && p.indexOf(".") !== -1 &&
|
|
8494
|
+
const e = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", t = Ke, r = e ? ";" : ":", n = Po(), i = a((p) => Object.assign(new Error(`not found: ${p}`), { code: "ENOENT" }), "getNotFoundError"), o = a((p, E) => {
|
|
8495
|
+
const h = E.colon || r, T = p.match(/\//) || e && p.match(/\\/) ? [""] : [...e ? [process.cwd()] : [], ...(E.path || process.env.PATH || "").split(h)], v = e ? E.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", C = e ? v.split(h) : [""];
|
|
8496
|
+
return e && p.indexOf(".") !== -1 && C[0] !== "" && C.unshift(""), { pathEnv: T, pathExt: C, pathExtExe: v };
|
|
8483
8497
|
}, "getPathInfo"), c = a((p, E, h) => {
|
|
8484
8498
|
typeof E == "function" && (h = E, E = {}), E || (E = {});
|
|
8485
|
-
const { pathEnv: T, pathExt:
|
|
8486
|
-
if (
|
|
8487
|
-
const x = T[
|
|
8488
|
-
w(b(F,
|
|
8489
|
-
}), "step"), b = a((
|
|
8490
|
-
if (
|
|
8491
|
-
const k =
|
|
8492
|
-
n(
|
|
8493
|
-
if (!F && s) if (E.all) D.push(
|
|
8494
|
-
else return x(
|
|
8495
|
-
return x(b(
|
|
8499
|
+
const { pathEnv: T, pathExt: v, pathExtExe: C } = o(p, E), D = [], M = a((P) => new Promise((w, L) => {
|
|
8500
|
+
if (P === T.length) return E.all && D.length ? w(D) : L(i(p));
|
|
8501
|
+
const x = T[P], U = /^".*"$/.test(x) ? x.slice(1, -1) : x, k = t.join(U, p), F = !U && /^\.[\\\/]/.test(p) ? p.slice(0, 2) + k : k;
|
|
8502
|
+
w(b(F, P, 0));
|
|
8503
|
+
}), "step"), b = a((P, w, L) => new Promise((x, U) => {
|
|
8504
|
+
if (L === v.length) return x(M(w + 1));
|
|
8505
|
+
const k = v[L];
|
|
8506
|
+
n(P + k, { pathExt: C }, (F, s) => {
|
|
8507
|
+
if (!F && s) if (E.all) D.push(P + k);
|
|
8508
|
+
else return x(P + k);
|
|
8509
|
+
return x(b(P, w, L + 1));
|
|
8496
8510
|
});
|
|
8497
8511
|
}), "subStep");
|
|
8498
|
-
return h ? M(0).then((
|
|
8512
|
+
return h ? M(0).then((P) => h(null, P), h) : M(0);
|
|
8499
8513
|
}, "which"), l = a((p, E) => {
|
|
8500
8514
|
E = E || {};
|
|
8501
|
-
const { pathEnv: h, pathExt: T, pathExtExe:
|
|
8515
|
+
const { pathEnv: h, pathExt: T, pathExtExe: v } = o(p, E), C = [];
|
|
8502
8516
|
for (let D = 0; D < h.length; D++) {
|
|
8503
|
-
const M = h[D], b = /^".*"$/.test(M) ? M.slice(1, -1) : M,
|
|
8504
|
-
for (let
|
|
8505
|
-
const x = w + T[
|
|
8517
|
+
const M = h[D], b = /^".*"$/.test(M) ? M.slice(1, -1) : M, P = t.join(b, p), w = !b && /^\.[\\\/]/.test(p) ? p.slice(0, 2) + P : P;
|
|
8518
|
+
for (let L = 0; L < T.length; L++) {
|
|
8519
|
+
const x = w + T[L];
|
|
8506
8520
|
try {
|
|
8507
|
-
if (n.sync(x, { pathExt:
|
|
8521
|
+
if (n.sync(x, { pathExt: v })) if (E.all) C.push(x);
|
|
8508
8522
|
else return x;
|
|
8509
8523
|
} catch {
|
|
8510
8524
|
}
|
|
8511
8525
|
}
|
|
8512
8526
|
}
|
|
8513
|
-
if (E.all &&
|
|
8527
|
+
if (E.all && C.length) return C;
|
|
8514
8528
|
if (E.nothrow) return null;
|
|
8515
8529
|
throw i(p);
|
|
8516
8530
|
}, "whichSync");
|
|
8517
|
-
return
|
|
8531
|
+
return Ft = c, c.sync = l, Ft;
|
|
8518
8532
|
}
|
|
8519
|
-
a(
|
|
8533
|
+
a(Lo, "requireWhich");
|
|
8520
8534
|
var ut = { exports: {} }, en;
|
|
8521
|
-
function
|
|
8535
|
+
function Oo() {
|
|
8522
8536
|
if (en) return ut.exports;
|
|
8523
8537
|
en = 1;
|
|
8524
8538
|
const e = a((t = {}) => {
|
|
@@ -8527,12 +8541,12 @@ function No() {
|
|
|
8527
8541
|
}, "pathKey");
|
|
8528
8542
|
return ut.exports = e, ut.exports.default = e, ut.exports;
|
|
8529
8543
|
}
|
|
8530
|
-
a(
|
|
8531
|
-
var
|
|
8532
|
-
function
|
|
8533
|
-
if (tn) return
|
|
8544
|
+
a(Oo, "requirePathKey");
|
|
8545
|
+
var jt, tn;
|
|
8546
|
+
function No() {
|
|
8547
|
+
if (tn) return jt;
|
|
8534
8548
|
tn = 1;
|
|
8535
|
-
const e =
|
|
8549
|
+
const e = Ke, t = Lo(), r = Oo();
|
|
8536
8550
|
function n(o, c) {
|
|
8537
8551
|
const l = o.options.env || process.env, p = process.cwd(), E = o.options.cwd != null, h = E && process.chdir !== void 0 && !process.chdir.disabled;
|
|
8538
8552
|
if (h) try {
|
|
@@ -8552,11 +8566,11 @@ function Do() {
|
|
|
8552
8566
|
function i(o) {
|
|
8553
8567
|
return n(o) || n(o, true);
|
|
8554
8568
|
}
|
|
8555
|
-
return a(i, "resolveCommand"),
|
|
8569
|
+
return a(i, "resolveCommand"), jt = i, jt;
|
|
8556
8570
|
}
|
|
8557
|
-
a(
|
|
8571
|
+
a(No, "requireResolveCommand");
|
|
8558
8572
|
var lt = {}, rn;
|
|
8559
|
-
function
|
|
8573
|
+
function Do() {
|
|
8560
8574
|
if (rn) return lt;
|
|
8561
8575
|
rn = 1;
|
|
8562
8576
|
const e = /([()\][%!^"`<>&|;, *?])/g;
|
|
@@ -8569,30 +8583,30 @@ function Mo() {
|
|
|
8569
8583
|
}
|
|
8570
8584
|
return a(r, "escapeArgument"), lt.command = t, lt.argument = r, lt;
|
|
8571
8585
|
}
|
|
8572
|
-
a(
|
|
8573
|
-
var
|
|
8574
|
-
function
|
|
8575
|
-
return nn || (nn = 1,
|
|
8586
|
+
a(Do, "require_escape");
|
|
8587
|
+
var qt, nn;
|
|
8588
|
+
function Mo() {
|
|
8589
|
+
return nn || (nn = 1, qt = /^#!(.*)/), qt;
|
|
8576
8590
|
}
|
|
8577
|
-
a(
|
|
8578
|
-
var
|
|
8579
|
-
function
|
|
8580
|
-
if (on) return
|
|
8591
|
+
a(Mo, "requireShebangRegex");
|
|
8592
|
+
var Kt, on;
|
|
8593
|
+
function xo() {
|
|
8594
|
+
if (on) return Kt;
|
|
8581
8595
|
on = 1;
|
|
8582
|
-
const e =
|
|
8583
|
-
return
|
|
8596
|
+
const e = Mo();
|
|
8597
|
+
return Kt = a((t = "") => {
|
|
8584
8598
|
const r = t.match(e);
|
|
8585
8599
|
if (!r) return null;
|
|
8586
8600
|
const [n, i] = r[0].replace(/#! ?/, "").split(" "), o = n.split("/").pop();
|
|
8587
8601
|
return o === "env" ? i : i ? `${o} ${i}` : o;
|
|
8588
|
-
}, "shebangCommand"),
|
|
8602
|
+
}, "shebangCommand"), Kt;
|
|
8589
8603
|
}
|
|
8590
|
-
a(
|
|
8591
|
-
var
|
|
8592
|
-
function
|
|
8593
|
-
if (sn) return
|
|
8604
|
+
a(xo, "requireShebangCommand");
|
|
8605
|
+
var Wt, sn;
|
|
8606
|
+
function Go() {
|
|
8607
|
+
if (sn) return Wt;
|
|
8594
8608
|
sn = 1;
|
|
8595
|
-
const e =
|
|
8609
|
+
const e = qe, t = xo();
|
|
8596
8610
|
function r(n) {
|
|
8597
8611
|
const o = Buffer.alloc(150);
|
|
8598
8612
|
let c;
|
|
@@ -8602,14 +8616,14 @@ function $o() {
|
|
|
8602
8616
|
}
|
|
8603
8617
|
return t(o.toString());
|
|
8604
8618
|
}
|
|
8605
|
-
return a(r, "readShebang"),
|
|
8619
|
+
return a(r, "readShebang"), Wt = r, Wt;
|
|
8606
8620
|
}
|
|
8607
|
-
a(
|
|
8608
|
-
var
|
|
8609
|
-
function
|
|
8610
|
-
if (an) return
|
|
8621
|
+
a(Go, "requireReadShebang");
|
|
8622
|
+
var Vt, an;
|
|
8623
|
+
function $o() {
|
|
8624
|
+
if (an) return Vt;
|
|
8611
8625
|
an = 1;
|
|
8612
|
-
const e =
|
|
8626
|
+
const e = Ke, t = No(), r = Do(), n = Go(), i = process.platform === "win32", o = /\.(?:com|exe)$/i, c = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
8613
8627
|
function l(h) {
|
|
8614
8628
|
h.file = t(h);
|
|
8615
8629
|
const T = h.file && n(h.file);
|
|
@@ -8618,27 +8632,27 @@ function ko() {
|
|
|
8618
8632
|
a(l, "detectShebang");
|
|
8619
8633
|
function p(h) {
|
|
8620
8634
|
if (!i) return h;
|
|
8621
|
-
const T = l(h),
|
|
8622
|
-
if (h.options.forceShell ||
|
|
8623
|
-
const
|
|
8624
|
-
h.command = e.normalize(h.command), h.command = r.command(h.command), h.args = h.args.map((M) => r.argument(M,
|
|
8635
|
+
const T = l(h), v = !o.test(T);
|
|
8636
|
+
if (h.options.forceShell || v) {
|
|
8637
|
+
const C = c.test(T);
|
|
8638
|
+
h.command = e.normalize(h.command), h.command = r.command(h.command), h.args = h.args.map((M) => r.argument(M, C));
|
|
8625
8639
|
const D = [h.command].concat(h.args).join(" ");
|
|
8626
8640
|
h.args = ["/d", "/s", "/c", `"${D}"`], h.command = process.env.comspec || "cmd.exe", h.options.windowsVerbatimArguments = true;
|
|
8627
8641
|
}
|
|
8628
8642
|
return h;
|
|
8629
8643
|
}
|
|
8630
8644
|
a(p, "parseNonShell");
|
|
8631
|
-
function E(h, T,
|
|
8632
|
-
T && !Array.isArray(T) && (
|
|
8633
|
-
const
|
|
8634
|
-
return
|
|
8645
|
+
function E(h, T, v) {
|
|
8646
|
+
T && !Array.isArray(T) && (v = T, T = null), T = T ? T.slice(0) : [], v = Object.assign({}, v);
|
|
8647
|
+
const C = { command: h, args: T, options: v, file: void 0, original: { command: h, args: T } };
|
|
8648
|
+
return v.shell ? C : p(C);
|
|
8635
8649
|
}
|
|
8636
|
-
return a(E, "parse"),
|
|
8650
|
+
return a(E, "parse"), Vt = E, Vt;
|
|
8637
8651
|
}
|
|
8638
|
-
a(
|
|
8639
|
-
var
|
|
8640
|
-
function
|
|
8641
|
-
if (cn) return
|
|
8652
|
+
a($o, "requireParse");
|
|
8653
|
+
var Yt, cn;
|
|
8654
|
+
function ko() {
|
|
8655
|
+
if (cn) return Yt;
|
|
8642
8656
|
cn = 1;
|
|
8643
8657
|
const e = process.platform === "win32";
|
|
8644
8658
|
function t(o, c) {
|
|
@@ -8664,14 +8678,14 @@ function Ho() {
|
|
|
8664
8678
|
function i(o, c) {
|
|
8665
8679
|
return e && o === 1 && !c.file ? t(c.original, "spawnSync") : null;
|
|
8666
8680
|
}
|
|
8667
|
-
return a(i, "verifyENOENTSync"),
|
|
8681
|
+
return a(i, "verifyENOENTSync"), Yt = { hookChildProcess: r, verifyENOENT: n, verifyENOENTSync: i, notFoundError: t }, Yt;
|
|
8668
8682
|
}
|
|
8669
|
-
a(
|
|
8683
|
+
a(ko, "requireEnoent");
|
|
8670
8684
|
var un;
|
|
8671
|
-
function
|
|
8685
|
+
function Ho() {
|
|
8672
8686
|
if (un) return $e.exports;
|
|
8673
8687
|
un = 1;
|
|
8674
|
-
const e = require$$0$2, t =
|
|
8688
|
+
const e = require$$0$2, t = $o(), r = ko();
|
|
8675
8689
|
function n(o, c, l) {
|
|
8676
8690
|
const p = t(o, c, l), E = e.spawn(p.command, p.args, p.options);
|
|
8677
8691
|
return r.hookChildProcess(E, p), E;
|
|
@@ -8683,76 +8697,76 @@ function Fo() {
|
|
|
8683
8697
|
}
|
|
8684
8698
|
return a(i, "spawnSync"), $e.exports = n, $e.exports.spawn = n, $e.exports.sync = i, $e.exports._parse = t, $e.exports._enoent = r, $e.exports;
|
|
8685
8699
|
}
|
|
8686
|
-
a(
|
|
8687
|
-
var
|
|
8688
|
-
function
|
|
8700
|
+
a(Ho, "requireCrossSpawn");
|
|
8701
|
+
var Fo = Ho(), jo = vr(Fo);
|
|
8702
|
+
function qo(e) {
|
|
8689
8703
|
const t = typeof e == "string" ? `
|
|
8690
8704
|
` : 10, r = typeof e == "string" ? "\r" : 13;
|
|
8691
8705
|
return e[e.length - 1] === t && (e = e.slice(0, -1)), e[e.length - 1] === r && (e = e.slice(0, -1)), e;
|
|
8692
8706
|
}
|
|
8693
|
-
a(
|
|
8707
|
+
a(qo, "stripFinalNewline");
|
|
8694
8708
|
function ln(e = {}) {
|
|
8695
8709
|
const { env: t = process.env, platform: r = process.platform } = e;
|
|
8696
8710
|
return r !== "win32" ? "PATH" : Object.keys(t).reverse().find((n) => n.toUpperCase() === "PATH") || "Path";
|
|
8697
8711
|
}
|
|
8698
8712
|
a(ln, "pathKey");
|
|
8699
|
-
const
|
|
8713
|
+
const Ko = a(({ cwd: e = y.cwd(), path: t = y.env[ln()], preferLocal: r = true, execPath: n = y.execPath, addExecPath: i = true } = {}) => {
|
|
8700
8714
|
const o = e instanceof URL ? fileURLToPath(e) : e, c = path.resolve(o), l = [];
|
|
8701
|
-
return r &&
|
|
8702
|
-
}, "npmRunPath"),
|
|
8715
|
+
return r && Wo(l, c), i && Vo(l, n, c), [...l, t].join(path.delimiter);
|
|
8716
|
+
}, "npmRunPath"), Wo = a((e, t) => {
|
|
8703
8717
|
let r;
|
|
8704
8718
|
for (; r !== t; ) e.push(path.join(t, "node_modules/.bin")), r = t, t = path.resolve(t, "..");
|
|
8705
|
-
}, "applyPreferLocal"),
|
|
8719
|
+
}, "applyPreferLocal"), Vo = a((e, t, r) => {
|
|
8706
8720
|
const n = t instanceof URL ? fileURLToPath(t) : t;
|
|
8707
8721
|
e.push(path.resolve(r, n, ".."));
|
|
8708
|
-
}, "applyExecPath"),
|
|
8722
|
+
}, "applyExecPath"), Yo = a(({ env: e = y.env, ...t } = {}) => {
|
|
8709
8723
|
e = { ...e };
|
|
8710
8724
|
const r = ln({ env: e });
|
|
8711
|
-
return t.path = e[r], e[r] =
|
|
8712
|
-
}, "npmRunPathEnv"),
|
|
8725
|
+
return t.path = e[r], e[r] = Ko(t), e;
|
|
8726
|
+
}, "npmRunPathEnv"), Jo = a(() => {
|
|
8713
8727
|
const e = hn - fn + 1;
|
|
8714
|
-
return Array.from({ length: e },
|
|
8715
|
-
}, "getRealtimeSignals"),
|
|
8716
|
-
const e =
|
|
8717
|
-
return [...
|
|
8718
|
-
}, "getSignals"),
|
|
8728
|
+
return Array.from({ length: e }, zo);
|
|
8729
|
+
}, "getRealtimeSignals"), zo = a((e, t) => ({ name: `SIGRT${t + 1}`, number: fn + t, action: "terminate", description: "Application-specific signal (realtime)", standard: "posix" }), "getRealtimeSignal"), fn = 34, hn = 64, Qo = [{ 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" }], dn = a(() => {
|
|
8730
|
+
const e = Jo();
|
|
8731
|
+
return [...Qo, ...e].map(Xo);
|
|
8732
|
+
}, "getSignals"), Xo = a(({ name: e, number: t, description: r, action: n, forced: i = false, standard: o }) => {
|
|
8719
8733
|
const { signals: { [e]: c } } = constants$1, l = c !== void 0;
|
|
8720
8734
|
return { name: e, number: l ? c : t, description: r, supported: l, action: n, forced: i, standard: o };
|
|
8721
|
-
}, "normalizeSignal"),
|
|
8735
|
+
}, "normalizeSignal"), Zo = a(() => {
|
|
8722
8736
|
const e = dn();
|
|
8723
|
-
return Object.fromEntries(e.map(
|
|
8724
|
-
}, "getSignalsByName"),
|
|
8725
|
-
const e = dn(), t = hn + 1, r = Array.from({ length: t }, (n, i) =>
|
|
8737
|
+
return Object.fromEntries(e.map(es));
|
|
8738
|
+
}, "getSignalsByName"), es = a(({ 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"), ts = Zo(), rs = a(() => {
|
|
8739
|
+
const e = dn(), t = hn + 1, r = Array.from({ length: t }, (n, i) => ns(i, e));
|
|
8726
8740
|
return Object.assign({}, ...r);
|
|
8727
|
-
}, "getSignalsByNumber"),
|
|
8728
|
-
const r =
|
|
8741
|
+
}, "getSignalsByNumber"), ns = a((e, t) => {
|
|
8742
|
+
const r = is(e, t);
|
|
8729
8743
|
if (r === void 0) return {};
|
|
8730
8744
|
const { name: n, description: i, supported: o, action: c, forced: l, standard: p } = r;
|
|
8731
8745
|
return { [e]: { name: n, number: e, description: i, supported: o, action: c, forced: l, standard: p } };
|
|
8732
|
-
}, "getSignalByNumber"),
|
|
8746
|
+
}, "getSignalByNumber"), is = a((e, t) => {
|
|
8733
8747
|
const r = t.find(({ name: n }) => constants$1.signals[n] === e);
|
|
8734
8748
|
return r !== void 0 ? r : t.find((n) => n.number === e);
|
|
8735
8749
|
}, "findSignalByNumber");
|
|
8736
|
-
|
|
8737
|
-
const
|
|
8750
|
+
rs();
|
|
8751
|
+
const os = a(({ 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"), pn = a(({ stdout: e, stderr: t, all: r, error: n, signal: i, exitCode: o, command: c, escapedCommand: l, timedOut: p, isCanceled: E, killed: h, parsed: { options: { timeout: T, cwd: v = y.cwd() } } }) => {
|
|
8738
8752
|
o = o === null ? void 0 : o, i = i === null ? void 0 : i;
|
|
8739
|
-
const
|
|
8740
|
-
${n.message}` : b,
|
|
8753
|
+
const C = i === void 0 ? void 0 : ts[i].description, D = n && n.code, b = `Command ${os({ timedOut: p, timeout: T, errorCode: D, signal: i, signalDescription: C, exitCode: o, isCanceled: E })}: ${c}`, P = Object.prototype.toString.call(n) === "[object Error]", w = P ? `${b}
|
|
8754
|
+
${n.message}` : b, L = [w, t, e].filter(Boolean).join(`
|
|
8741
8755
|
`);
|
|
8742
|
-
return
|
|
8743
|
-
}, "makeError"), ft = ["stdin", "stdout", "stderr"],
|
|
8756
|
+
return P ? (n.originalMessage = n.message, n.message = L) : n = new Error(L), n.shortMessage = w, n.command = c, n.escapedCommand = l, n.exitCode = o, n.signal = i, n.signalDescription = C, n.stdout = e, n.stderr = t, n.cwd = v, r !== void 0 && (n.all = r), "bufferedData" in n && delete n.bufferedData, n.failed = true, n.timedOut = !!p, n.isCanceled = E, n.killed = h && !p, n;
|
|
8757
|
+
}, "makeError"), ft = ["stdin", "stdout", "stderr"], ss = a((e) => ft.some((t) => e[t] !== void 0), "hasAlias"), as = a((e) => {
|
|
8744
8758
|
if (!e) return;
|
|
8745
8759
|
const { stdio: t } = e;
|
|
8746
8760
|
if (t === void 0) return ft.map((n) => e[n]);
|
|
8747
|
-
if (
|
|
8761
|
+
if (ss(e)) throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${ft.map((n) => `\`${n}\``).join(", ")}`);
|
|
8748
8762
|
if (typeof t == "string") return t;
|
|
8749
8763
|
if (!Array.isArray(t)) throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);
|
|
8750
8764
|
const r = Math.max(t.length, ft.length);
|
|
8751
8765
|
return Array.from({ length: r }, (n, i) => t[i]);
|
|
8752
|
-
}, "normalizeStdio"),
|
|
8753
|
-
|
|
8754
|
-
const ht = a((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"),
|
|
8755
|
-
class
|
|
8766
|
+
}, "normalizeStdio"), je = [];
|
|
8767
|
+
je.push("SIGHUP", "SIGINT", "SIGTERM"), process.platform !== "win32" && je.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT"), process.platform === "linux" && je.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
8768
|
+
const ht = a((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"), Jt = Symbol.for("signal-exit emitter"), zt = globalThis, cs = Object.defineProperty.bind(Object);
|
|
8769
|
+
class us {
|
|
8756
8770
|
static {
|
|
8757
8771
|
a(this, "Emitter");
|
|
8758
8772
|
}
|
|
@@ -8761,8 +8775,8 @@ class ls {
|
|
|
8761
8775
|
count = 0;
|
|
8762
8776
|
id = Math.random();
|
|
8763
8777
|
constructor() {
|
|
8764
|
-
if (Jt
|
|
8765
|
-
|
|
8778
|
+
if (zt[Jt]) return zt[Jt];
|
|
8779
|
+
cs(zt, Jt, { value: this, writable: false, enumerable: false, configurable: false });
|
|
8766
8780
|
}
|
|
8767
8781
|
on(t, r) {
|
|
8768
8782
|
this.listeners[t].push(r);
|
|
@@ -8784,14 +8798,14 @@ class mn {
|
|
|
8784
8798
|
a(this, "SignalExitBase");
|
|
8785
8799
|
}
|
|
8786
8800
|
}
|
|
8787
|
-
const
|
|
8801
|
+
const ls = a((e) => ({ onExit(t, r) {
|
|
8788
8802
|
return e.onExit(t, r);
|
|
8789
8803
|
}, load() {
|
|
8790
8804
|
return e.load();
|
|
8791
8805
|
}, unload() {
|
|
8792
8806
|
return e.unload();
|
|
8793
8807
|
} }), "signalExitWrap");
|
|
8794
|
-
class
|
|
8808
|
+
class fs extends mn {
|
|
8795
8809
|
static {
|
|
8796
8810
|
a(this, "SignalExitFallback");
|
|
8797
8811
|
}
|
|
@@ -8804,12 +8818,12 @@ class hs extends mn {
|
|
|
8804
8818
|
unload() {
|
|
8805
8819
|
}
|
|
8806
8820
|
}
|
|
8807
|
-
class
|
|
8821
|
+
class hs extends mn {
|
|
8808
8822
|
static {
|
|
8809
8823
|
a(this, "SignalExit");
|
|
8810
8824
|
}
|
|
8811
|
-
#s =
|
|
8812
|
-
#t = new
|
|
8825
|
+
#s = Qt.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
8826
|
+
#t = new us();
|
|
8813
8827
|
#e;
|
|
8814
8828
|
#i;
|
|
8815
8829
|
#o;
|
|
@@ -8817,7 +8831,7 @@ class ds extends mn {
|
|
|
8817
8831
|
#r = false;
|
|
8818
8832
|
constructor(t) {
|
|
8819
8833
|
super(), this.#e = t, this.#n = {};
|
|
8820
|
-
for (const r of
|
|
8834
|
+
for (const r of je) this.#n[r] = () => {
|
|
8821
8835
|
const n = this.#e.listeners(r);
|
|
8822
8836
|
let { count: i } = this.#t;
|
|
8823
8837
|
const o = t;
|
|
@@ -8841,7 +8855,7 @@ class ds extends mn {
|
|
|
8841
8855
|
load() {
|
|
8842
8856
|
if (!this.#r) {
|
|
8843
8857
|
this.#r = true, this.#t.count += 1;
|
|
8844
|
-
for (const t of
|
|
8858
|
+
for (const t of je) try {
|
|
8845
8859
|
const r = this.#n[t];
|
|
8846
8860
|
r && this.#e.on(t, r);
|
|
8847
8861
|
} catch {
|
|
@@ -8850,7 +8864,7 @@ class ds extends mn {
|
|
|
8850
8864
|
}
|
|
8851
8865
|
}
|
|
8852
8866
|
unload() {
|
|
8853
|
-
this.#r && (this.#r = false,
|
|
8867
|
+
this.#r && (this.#r = false, je.forEach((t) => {
|
|
8854
8868
|
const r = this.#n[t];
|
|
8855
8869
|
if (!r) throw new Error("Listener not defined for signal: " + t);
|
|
8856
8870
|
try {
|
|
@@ -8871,18 +8885,18 @@ class ds extends mn {
|
|
|
8871
8885
|
} else return n.call(this.#e, t, ...r);
|
|
8872
8886
|
}
|
|
8873
8887
|
}
|
|
8874
|
-
const
|
|
8875
|
-
|
|
8876
|
-
function
|
|
8888
|
+
const Qt = globalThis.process;
|
|
8889
|
+
ls(ht(Qt) ? new hs(Qt) : new fs());
|
|
8890
|
+
function ds(e) {
|
|
8877
8891
|
return e !== null && typeof e == "object" && typeof e.pipe == "function";
|
|
8878
8892
|
}
|
|
8879
|
-
a(
|
|
8880
|
-
var
|
|
8881
|
-
function
|
|
8882
|
-
if (En) return
|
|
8893
|
+
a(ds, "isStream"), new TextEncoder();
|
|
8894
|
+
var Xt, En;
|
|
8895
|
+
function ps() {
|
|
8896
|
+
if (En) return Xt;
|
|
8883
8897
|
En = 1;
|
|
8884
8898
|
const { PassThrough: e } = require$$0;
|
|
8885
|
-
return
|
|
8899
|
+
return Xt = a(function() {
|
|
8886
8900
|
var t = [], r = new e({ objectMode: true });
|
|
8887
8901
|
return r.setMaxListeners(0), r.add = n, r.isEmpty = i, r.on("unpipe", o), Array.prototype.slice.call(arguments).forEach(n), r;
|
|
8888
8902
|
function n(c) {
|
|
@@ -8896,34 +8910,34 @@ function ms() {
|
|
|
8896
8910
|
return l !== c;
|
|
8897
8911
|
}), !t.length && r.readable && r.end();
|
|
8898
8912
|
}
|
|
8899
|
-
}, "mergeStream"),
|
|
8913
|
+
}, "mergeStream"), Xt;
|
|
8900
8914
|
}
|
|
8901
|
-
a(
|
|
8902
|
-
const
|
|
8915
|
+
a(ps, "requireMergeStream"), ps();
|
|
8916
|
+
const ms = a((e) => {
|
|
8903
8917
|
if (e !== void 0) throw new TypeError("The `input` and `inputFile` options cannot be both set.");
|
|
8904
|
-
}, "validateInputOptions"),
|
|
8905
|
-
const t =
|
|
8906
|
-
if (
|
|
8918
|
+
}, "validateInputOptions"), Es = a(({ input: e, inputFile: t }) => typeof t != "string" ? e : (ms(e), readFileSync(t)), "getInputSync"), gs = a((e) => {
|
|
8919
|
+
const t = Es(e);
|
|
8920
|
+
if (ds(t)) throw new TypeError("The `input` option cannot be a stream in sync mode");
|
|
8907
8921
|
return t;
|
|
8908
|
-
}, "handleInputSync"),
|
|
8922
|
+
}, "handleInputSync"), _s = (async () => {
|
|
8909
8923
|
})().constructor.prototype;
|
|
8910
|
-
["then", "catch", "finally"].map((e) => [e, Reflect.getOwnPropertyDescriptor(
|
|
8911
|
-
const
|
|
8924
|
+
["then", "catch", "finally"].map((e) => [e, Reflect.getOwnPropertyDescriptor(_s, e)]);
|
|
8925
|
+
const gn = a((e, t = []) => Array.isArray(t) ? [e, ...t] : [e], "normalizeArgs"), Is = /^[\w.-]+$/, Ss = a((e) => typeof e != "string" || Is.test(e) ? e : `"${e.replaceAll('"', '\\"')}"`, "escapeArg"), Rs = a((e, t) => gn(e, t).join(" "), "joinCommand"), Ts = a((e, t) => gn(e, t).map((r) => Ss(r)).join(" "), "getEscapedCommand"), ys = debuglog("execa").enabled, dt = a((e, t) => String(e).padStart(t, "0"), "padField"), ws = a(() => {
|
|
8912
8926
|
const e = /* @__PURE__ */ new Date();
|
|
8913
8927
|
return `${dt(e.getHours(), 2)}:${dt(e.getMinutes(), 2)}:${dt(e.getSeconds(), 2)}.${dt(e.getMilliseconds(), 3)}`;
|
|
8914
|
-
}, "getTimestamp"),
|
|
8915
|
-
t && y.stderr.write(`[${
|
|
8928
|
+
}, "getTimestamp"), As = a((e, { verbose: t }) => {
|
|
8929
|
+
t && y.stderr.write(`[${ws()}] ${e}
|
|
8916
8930
|
`);
|
|
8917
|
-
}, "logCommand"),
|
|
8931
|
+
}, "logCommand"), bs = 1e3 * 1e3 * 100, vs = a(({ env: e, extendEnv: t, preferLocal: r, localDir: n, execPath: i }) => {
|
|
8918
8932
|
const o = t ? { ...y.env, ...e } : e;
|
|
8919
|
-
return r ?
|
|
8920
|
-
}, "getEnv"),
|
|
8921
|
-
const n =
|
|
8922
|
-
return e = n.command, t = n.args, r = n.options, r = { maxBuffer:
|
|
8923
|
-
}, "handleArguments"),
|
|
8924
|
-
function
|
|
8925
|
-
const n =
|
|
8926
|
-
|
|
8933
|
+
return r ? Yo({ env: o, cwd: n, execPath: i }) : o;
|
|
8934
|
+
}, "getEnv"), Cs = a((e, t, r = {}) => {
|
|
8935
|
+
const n = jo._parse(e, t, r);
|
|
8936
|
+
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: ys, ...r }, r.env = vs(r), r.stdio = as(r), y.platform === "win32" && path.basename(e, ".exe") === "cmd" && t.unshift("/q"), { file: e, args: t, options: r, parsed: n };
|
|
8937
|
+
}, "handleArguments"), _n = a((e, t, r) => typeof t != "string" && !Buffer$1.isBuffer(t) ? r === void 0 ? void 0 : "" : e.stripFinalNewline ? qo(t) : t, "handleOutput");
|
|
8938
|
+
function Zt(e, t, r) {
|
|
8939
|
+
const n = Cs(e, t, r), i = Rs(e, t), o = Ts(e, t);
|
|
8940
|
+
As(o, n.options);
|
|
8927
8941
|
const c = gs(n.options);
|
|
8928
8942
|
let l;
|
|
8929
8943
|
try {
|
|
@@ -8931,7 +8945,7 @@ function Xt(e, t, r) {
|
|
|
8931
8945
|
} catch (h) {
|
|
8932
8946
|
throw pn({ error: h, stdout: "", stderr: "", all: "", command: i, escapedCommand: o, parsed: n, timedOut: false, isCanceled: false, killed: false });
|
|
8933
8947
|
}
|
|
8934
|
-
const p =
|
|
8948
|
+
const p = _n(n.options, l.stdout, l.error), E = _n(n.options, l.stderr, l.error);
|
|
8935
8949
|
if (l.error || l.status !== 0 || l.signal !== null) {
|
|
8936
8950
|
const h = pn({ stdout: p, stderr: E, 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 });
|
|
8937
8951
|
if (!n.options.reject) return h;
|
|
@@ -8939,20 +8953,20 @@ function Xt(e, t, r) {
|
|
|
8939
8953
|
}
|
|
8940
8954
|
return { command: i, escapedCommand: o, exitCode: 0, stdout: p, stderr: E, failed: false, timedOut: false, isCanceled: false, killed: false };
|
|
8941
8955
|
}
|
|
8942
|
-
a(
|
|
8956
|
+
a(Zt, "execaSync");
|
|
8943
8957
|
function pt(e) {
|
|
8944
8958
|
try {
|
|
8945
|
-
return
|
|
8959
|
+
return Zt("git", ["rev-parse", "HEAD"], e).stdout;
|
|
8946
8960
|
} catch {
|
|
8947
8961
|
return;
|
|
8948
8962
|
}
|
|
8949
8963
|
}
|
|
8950
8964
|
a(pt, "head");
|
|
8951
|
-
function
|
|
8965
|
+
function er(e) {
|
|
8952
8966
|
try {
|
|
8953
|
-
const t =
|
|
8967
|
+
const t = Zt("git", ["rev-parse", "--abbrev-ref", "HEAD"], e).stdout;
|
|
8954
8968
|
if (t === "HEAD") {
|
|
8955
|
-
const r =
|
|
8969
|
+
const r = Zt("git", ["show", "-s", "--pretty=%d", "HEAD"], e).stdout.replace(/^\(|\)$/g, "").split(", ").find((n) => n.startsWith("origin/"));
|
|
8956
8970
|
return r ? r.match(/^origin\/(?<branch>.+)/)[1] : void 0;
|
|
8957
8971
|
}
|
|
8958
8972
|
return t;
|
|
@@ -8960,126 +8974,126 @@ function Zt(e) {
|
|
|
8960
8974
|
return;
|
|
8961
8975
|
}
|
|
8962
8976
|
}
|
|
8963
|
-
a(
|
|
8964
|
-
const In = /^(?:.*)@(?:.*):(?:\d+\/)?(.*)\.git$/,
|
|
8965
|
-
function
|
|
8977
|
+
a(er, "branch");
|
|
8978
|
+
const In = /^(?:.*)@(?:.*):(?:\d+\/)?(.*)\.git$/, Us = /^\/(.*)\.git$/;
|
|
8979
|
+
function Bs(e) {
|
|
8966
8980
|
if (e) {
|
|
8967
8981
|
if (e.match(In)) return e.replace(In, "$1");
|
|
8968
8982
|
try {
|
|
8969
|
-
return new URL(e).pathname.replace(
|
|
8983
|
+
return new URL(e).pathname.replace(Us, "$1");
|
|
8970
8984
|
} catch {
|
|
8971
8985
|
return;
|
|
8972
8986
|
}
|
|
8973
8987
|
}
|
|
8974
8988
|
}
|
|
8975
|
-
a(
|
|
8976
|
-
var
|
|
8989
|
+
a(Bs, "getSlugFromGitURL");
|
|
8990
|
+
var Ps = { detect({ env: e }) {
|
|
8977
8991
|
return !!e.BUILDKITE;
|
|
8978
8992
|
}, configuration({ env: e }) {
|
|
8979
8993
|
const t = e.BUILDKITE_PULL_REQUEST === "false" ? void 0 : e.BUILDKITE_PULL_REQUEST, r = !!t;
|
|
8980
|
-
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:
|
|
8981
|
-
} },
|
|
8994
|
+
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: Bs(e.BUILDKITE_REPO), pr: t, isPr: r, prBranch: r ? e.BUILDKITE_BRANCH : void 0, root: e.BUILDKITE_BUILD_CHECKOUT_PATH };
|
|
8995
|
+
} }, Ls = { detect({ env: e }) {
|
|
8982
8996
|
return !!e.CIRCLECI;
|
|
8983
8997
|
}, configuration({ env: e }) {
|
|
8984
8998
|
const t = e.CIRCLE_PR_NUMBER || Jr(e.CIRCLE_PULL_REQUEST || e.CI_PULL_REQUEST), r = !!t;
|
|
8985
8999
|
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}` };
|
|
8986
9000
|
} };
|
|
8987
9001
|
const Sn = "https://cirrus-ci.com";
|
|
8988
|
-
var
|
|
9002
|
+
var Os = { detect({ env: e }) {
|
|
8989
9003
|
return !!e.CIRRUS_CI;
|
|
8990
9004
|
}, configuration({ env: e }) {
|
|
8991
9005
|
const t = e.CIRRUS_PR, r = !!t;
|
|
8992
9006
|
return { name: "Cirrus CI", service: "cirrus", commit: e.CIRRUS_CHANGE_IN_REPO, tag: e.CIRRUS_TAG, build: e.CIRRUS_BUILD_ID, buildUrl: `${Sn}/build/${e.CIRRUS_BUILD_ID}`, job: e.CIRRUS_TASK_ID, jobUrl: `${Sn}/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 };
|
|
8993
|
-
} },
|
|
9007
|
+
} }, Ns = { detect({ env: e }) {
|
|
8994
9008
|
return e.CF_PAGES === "1";
|
|
8995
9009
|
}, configuration({ env: e }) {
|
|
8996
9010
|
return { name: "Cloudflare Pages", service: "cloudflarePages", commit: e.CF_PAGES_COMMIT_SHA, branch: e.CF_PAGES_BRANCH, root: e.PWD };
|
|
8997
|
-
} },
|
|
9011
|
+
} }, Ds = { detect({ env: e }) {
|
|
8998
9012
|
return !!e.CODEBUILD_BUILD_ID;
|
|
8999
9013
|
}, configuration({ env: e, cwd: t }) {
|
|
9000
|
-
return { name: "AWS CodeBuild", service: "codebuild", commit: pt({ env: e, cwd: t }), build: e.CODEBUILD_BUILD_ID, branch:
|
|
9001
|
-
} },
|
|
9014
|
+
return { name: "AWS CodeBuild", service: "codebuild", commit: pt({ env: e, cwd: t }), build: e.CODEBUILD_BUILD_ID, branch: er({ 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 };
|
|
9015
|
+
} }, Ms = { detect({ env: e }) {
|
|
9002
9016
|
return !!e.CF_BUILD_ID;
|
|
9003
9017
|
}, configuration({ env: e }) {
|
|
9004
9018
|
const t = e.CF_PULL_REQUEST_NUMBER, r = !!t;
|
|
9005
9019
|
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 };
|
|
9006
|
-
} },
|
|
9020
|
+
} }, xs = { detect({ env: e }) {
|
|
9007
9021
|
return e.CI_NAME && e.CI_NAME === "codeship";
|
|
9008
9022
|
}, configuration({ env: e }) {
|
|
9009
9023
|
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 };
|
|
9010
|
-
} },
|
|
9024
|
+
} }, Gs = { detect({ env: e }) {
|
|
9011
9025
|
return !!e.DRONE;
|
|
9012
9026
|
}, configuration({ env: e }) {
|
|
9013
9027
|
const t = e.DRONE_BUILD_EVENT === "pull_request";
|
|
9014
9028
|
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 };
|
|
9015
|
-
} },
|
|
9016
|
-
return { commit: pt(e), branch:
|
|
9029
|
+
} }, $s = { configuration(e) {
|
|
9030
|
+
return { commit: pt(e), branch: er(e) };
|
|
9017
9031
|
} };
|
|
9018
|
-
const
|
|
9032
|
+
const ks = a(({ env: e }) => {
|
|
9019
9033
|
try {
|
|
9020
9034
|
const t = e.GITHUB_EVENT_PATH ? JSON.parse(readFileSync(e.GITHUB_EVENT_PATH, "utf-8")) : void 0;
|
|
9021
9035
|
if (t && t.pull_request) return { branch: t.pull_request.base ? tt(t.pull_request.base.ref) : void 0, pr: t.pull_request.number };
|
|
9022
9036
|
} catch {
|
|
9023
9037
|
}
|
|
9024
9038
|
return { pr: void 0, branch: void 0 };
|
|
9025
|
-
}, "getPrEvent"),
|
|
9039
|
+
}, "getPrEvent"), Hs = a((e) => {
|
|
9026
9040
|
const t = e.GITHUB_EVENT_PATH ? JSON.parse(readFileSync(e.GITHUB_EVENT_PATH, "utf-8")) : void 0;
|
|
9027
9041
|
return t && t.pull_request ? t.pull_request.number : void 0;
|
|
9028
9042
|
}, "getPrNumber");
|
|
9029
|
-
var
|
|
9043
|
+
var Fs = { detect({ env: e }) {
|
|
9030
9044
|
return !!e.GITHUB_ACTIONS;
|
|
9031
9045
|
}, configuration({ env: e, cwd: t }) {
|
|
9032
|
-
const r = e.GITHUB_EVENT_NAME === "pull_request" || e.GITHUB_EVENT_NAME === "pull_request_target", n = tt(e.GITHUB_EVENT_NAME === "pull_request_target" ? `refs/pull/${
|
|
9033
|
-
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 ?
|
|
9034
|
-
} },
|
|
9046
|
+
const r = e.GITHUB_EVENT_NAME === "pull_request" || e.GITHUB_EVENT_NAME === "pull_request_target", n = tt(e.GITHUB_EVENT_NAME === "pull_request_target" ? `refs/pull/${Hs(e)}/merge` : e.GITHUB_REF);
|
|
9047
|
+
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 ? ks({ env: e }) : void 0 };
|
|
9048
|
+
} }, js = { detect({ env: e }) {
|
|
9035
9049
|
return !!e.GITLAB_CI;
|
|
9036
9050
|
}, configuration({ env: e }) {
|
|
9037
9051
|
const t = e.CI_MERGE_REQUEST_ID, r = !!t;
|
|
9038
9052
|
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 };
|
|
9039
|
-
} },
|
|
9053
|
+
} }, qs = { detect({ env: e }) {
|
|
9040
9054
|
return !!e.JENKINS_URL;
|
|
9041
9055
|
}, configuration({ env: e, cwd: t }) {
|
|
9042
9056
|
const r = e.ghprbPullId || e.gitlabMergeRequestId || e.CHANGE_ID, n = !!r, i = e.GIT_LOCAL_BRANCH || e.GIT_BRANCH || e.gitlabBranch || e.BRANCH_NAME;
|
|
9043
9057
|
return { name: "Jenkins", service: "jenkins", commit: e.ghprbActualCommit || e.GIT_COMMIT || pt({ 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 };
|
|
9044
|
-
} },
|
|
9058
|
+
} }, Ks = { detect({ env: e }) {
|
|
9045
9059
|
return e.NETLIFY === "true";
|
|
9046
9060
|
}, configuration({ env: e }) {
|
|
9047
9061
|
const t = e.PULL_REQUEST === "true";
|
|
9048
9062
|
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 };
|
|
9049
|
-
} },
|
|
9063
|
+
} }, Ws = { detect({ env: e }) {
|
|
9050
9064
|
return !!e.DISTELLI_APPNAME;
|
|
9051
9065
|
}, configuration({ env: e }) {
|
|
9052
9066
|
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 };
|
|
9053
|
-
} },
|
|
9067
|
+
} }, Vs = { detect({ env: e }) {
|
|
9054
9068
|
return !!e.SAILCI;
|
|
9055
9069
|
}, configuration({ env: e }) {
|
|
9056
9070
|
const t = e.SAIL_PULL_REQUEST_NUMBER, r = !!t;
|
|
9057
9071
|
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 };
|
|
9058
|
-
} },
|
|
9072
|
+
} }, Ys = { detect({ env: e }) {
|
|
9059
9073
|
return !!e.SCREWDRIVER;
|
|
9060
9074
|
}, configuration({ env: e }) {
|
|
9061
9075
|
const t = e.SD_PULL_REQUEST, r = !!t;
|
|
9062
9076
|
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 };
|
|
9063
|
-
} },
|
|
9077
|
+
} }, Js = { detect({ env: e }) {
|
|
9064
9078
|
return !!e.SCRUTINIZER;
|
|
9065
9079
|
}, configuration({ env: e }) {
|
|
9066
9080
|
const t = e.SCRUTINIZER_PR_NUMBER, r = !!t;
|
|
9067
9081
|
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 };
|
|
9068
|
-
} },
|
|
9082
|
+
} }, zs = { detect({ env: e }) {
|
|
9069
9083
|
return !!e.SEMAPHORE;
|
|
9070
9084
|
}, configuration({ env: e, cwd: t }) {
|
|
9071
9085
|
const r = e.SEMAPHORE_GIT_PR_NUMBER || e.PULL_REQUEST_NUMBER, n = !!r;
|
|
9072
9086
|
return { name: "Semaphore", service: "semaphore", commit: e.SEMAPHORE_GIT_SHA || pt({ 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 };
|
|
9073
|
-
} },
|
|
9087
|
+
} }, Qs = { detect({ env: e }) {
|
|
9074
9088
|
return !!e.SHIPPABLE;
|
|
9075
9089
|
}, configuration({ env: e }) {
|
|
9076
9090
|
const t = e.IS_PULL_REQUEST === "true" ? e.PULL_REQUEST : void 0, r = !!t;
|
|
9077
9091
|
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 };
|
|
9078
9092
|
} }, ke = {}, Rn;
|
|
9079
|
-
function
|
|
9093
|
+
function Xs() {
|
|
9080
9094
|
if (Rn) return ke;
|
|
9081
9095
|
Rn = 1, Object.defineProperty(ke, "__esModule", { value: true }), ke.of = ke.PropertiesFile = void 0;
|
|
9082
|
-
var e = t(
|
|
9096
|
+
var e = t(qe);
|
|
9083
9097
|
function t(i) {
|
|
9084
9098
|
return i && i.__esModule ? i : { default: i };
|
|
9085
9099
|
}
|
|
@@ -9184,64 +9198,64 @@ function Zs() {
|
|
|
9184
9198
|
}, "of2");
|
|
9185
9199
|
return ke.of = n, ke;
|
|
9186
9200
|
}
|
|
9187
|
-
a(
|
|
9188
|
-
var
|
|
9189
|
-
const
|
|
9201
|
+
a(Xs, "requireDistNode");
|
|
9202
|
+
var Zs = Xs(), ea = vr(Zs);
|
|
9203
|
+
const tr = { root: "teamcity.build.workingDir", branch: "teamcity.build.branch" }, Tn = a((e) => {
|
|
9190
9204
|
try {
|
|
9191
|
-
return
|
|
9205
|
+
return ea.of(e);
|
|
9192
9206
|
} catch {
|
|
9193
9207
|
return;
|
|
9194
9208
|
}
|
|
9195
|
-
}, "safeReadProperties"),
|
|
9209
|
+
}, "safeReadProperties"), ta = a(({ env: e, cwd: t }) => {
|
|
9196
9210
|
const r = e.TEAMCITY_BUILD_PROPERTIES_FILE ? Tn(e.TEAMCITY_BUILD_PROPERTIES_FILE) : void 0, n = r ? r.get("teamcity.configuration.properties.file") : void 0, i = n && Tn(n);
|
|
9197
|
-
return Object.fromEntries(Object.keys(
|
|
9211
|
+
return Object.fromEntries(Object.keys(tr).map((o) => [o, (r ? r.get(tr[o]) : void 0) || (i ? i.get(tr[o]) : void 0) || (o === "branch" ? er({ env: e, cwd: t }) : void 0)]));
|
|
9198
9212
|
}, "getProperties");
|
|
9199
|
-
var
|
|
9213
|
+
var ra = { detect({ env: e }) {
|
|
9200
9214
|
return !!e.TEAMCITY_VERSION;
|
|
9201
9215
|
}, configuration({ env: e, cwd: t }) {
|
|
9202
|
-
return { name: "TeamCity", service: "teamcity", commit: e.BUILD_VCS_NUMBER, build: e.BUILD_NUMBER, slug: e.TEAMCITY_BUILDCONF_NAME, ...
|
|
9203
|
-
} },
|
|
9216
|
+
return { name: "TeamCity", service: "teamcity", commit: e.BUILD_VCS_NUMBER, build: e.BUILD_NUMBER, slug: e.TEAMCITY_BUILDCONF_NAME, ...ta({ env: e, cwd: t }) };
|
|
9217
|
+
} }, na = { detect({ env: e }) {
|
|
9204
9218
|
return !!e.TRAVIS;
|
|
9205
9219
|
}, configuration({ env: e }) {
|
|
9206
9220
|
const t = e.TRAVIS_PULL_REQUEST === "false" ? void 0 : e.TRAVIS_PULL_REQUEST, r = !!t;
|
|
9207
9221
|
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 };
|
|
9208
|
-
} },
|
|
9222
|
+
} }, ia = { detect({ env: e }) {
|
|
9209
9223
|
return !!e.VELA;
|
|
9210
9224
|
}, configuration({ env: e }) {
|
|
9211
9225
|
const t = e.VELA_BUILD_EVENT === "pull_request";
|
|
9212
9226
|
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 };
|
|
9213
|
-
} },
|
|
9227
|
+
} }, oa = { detect({ env: e }) {
|
|
9214
9228
|
return !!e.VERCEL || !!e.NOW_GITHUB_DEPLOYMENT;
|
|
9215
9229
|
}, configuration({ env: e }) {
|
|
9216
9230
|
const t = "Vercel", r = "vercel";
|
|
9217
9231
|
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}` };
|
|
9218
|
-
} },
|
|
9232
|
+
} }, sa = { detect({ env: e }) {
|
|
9219
9233
|
return !!e.WERCKER_MAIN_PIPELINE_STARTED;
|
|
9220
9234
|
}, configuration({ env: e }) {
|
|
9221
9235
|
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 };
|
|
9222
|
-
} },
|
|
9236
|
+
} }, aa = { detect({ env: e }) {
|
|
9223
9237
|
return e.CI && e.CI === "woodpecker";
|
|
9224
9238
|
}, configuration({ env: e }) {
|
|
9225
9239
|
const t = e.CI_PIPELINE_EVENT === "pull_request";
|
|
9226
9240
|
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 };
|
|
9227
|
-
} },
|
|
9241
|
+
} }, ca = { detect({ env: e }) {
|
|
9228
9242
|
return !!e.JB_SPACE_EXECUTION_NUMBER;
|
|
9229
9243
|
}, configuration({ env: e }) {
|
|
9230
9244
|
const t = e.JB_SPACE_PROJECT_KEY, r = e.JB_SPACE_GIT_REPOSITORY_NAME;
|
|
9231
9245
|
return { name: "JetBrains Space", service: "jetbrainsSpace", commit: e.JB_SPACE_GIT_REVISION, build: e.JB_SPACE_EXECUTION_NUMBER, branch: tt(e.JB_SPACE_GIT_BRANCH), slug: t && r ? `${t.toLowerCase()}/${r}` : void 0 };
|
|
9232
9246
|
} };
|
|
9233
|
-
const
|
|
9234
|
-
var
|
|
9235
|
-
for (const r of Object.keys(
|
|
9236
|
-
return { isCi: !!e.CI,
|
|
9247
|
+
const rr = { appveyor: yo, azurePipelines: wo, bamboo: Ao, bitbucket: bo, bitrise: vo, buddy: Co, buildkite: Ps, circleci: Ls, cirrus: Os, cloudflarePages: Ns, codebuild: Ds, codefresh: Ms, codeship: xs, drone: Gs, github: Fs, gitlab: js, jenkins: qs, netlify: Ks, puppet: Ws, sail: Vs, screwdriver: Ys, scrutinizer: Js, semaphore: zs, shippable: Qs, teamcity: ra, travis: na, vela: ia, vercel: oa, wercker: sa, woodpecker: aa, jetbrainsSpace: ca };
|
|
9248
|
+
var nr = a(({ env: e = process.env, cwd: t = process.cwd() } = {}) => {
|
|
9249
|
+
for (const r of Object.keys(rr)) if (rr[r].detect({ env: e, cwd: t })) return { isCi: true, ...rr[r].configuration({ env: e, cwd: t }) };
|
|
9250
|
+
return { isCi: !!e.CI, ...$s.configuration({ env: e, cwd: t }) };
|
|
9237
9251
|
}, "envCiModule");
|
|
9238
|
-
const
|
|
9239
|
-
function
|
|
9240
|
-
const e =
|
|
9241
|
-
return { branch: process.env.GITHUB_HEAD_REF || e.branch, commit: { message:
|
|
9252
|
+
const ua = typeof nr == "function" ? nr : nr.default;
|
|
9253
|
+
function la() {
|
|
9254
|
+
const e = ua();
|
|
9255
|
+
return { branch: process.env.GITHUB_HEAD_REF || e.branch, ciBuild: "build" in e ? String(e.build) : void 0, ciServiceName: "name" in e ? String(e.name) : void 0, commit: { message: ha(), sha: e.commit }, isCI: e.isCi, pr: fa() };
|
|
9242
9256
|
}
|
|
9243
|
-
a(
|
|
9244
|
-
function
|
|
9257
|
+
a(la, "getGitInfo");
|
|
9258
|
+
function fa() {
|
|
9245
9259
|
try {
|
|
9246
9260
|
const e = process.env.GITHUB_EVENT_PATH;
|
|
9247
9261
|
if (e) {
|
|
@@ -9253,21 +9267,21 @@ function ha() {
|
|
|
9253
9267
|
return;
|
|
9254
9268
|
}
|
|
9255
9269
|
}
|
|
9256
|
-
a(
|
|
9257
|
-
function
|
|
9270
|
+
a(fa, "getPRInfo");
|
|
9271
|
+
function ha() {
|
|
9258
9272
|
try {
|
|
9259
9273
|
return execSync("git log -1 --pretty=%B", { encoding: "utf-8", stdio: ["pipe", "pipe", "ignore"] }).trim();
|
|
9260
9274
|
} catch {
|
|
9261
9275
|
return;
|
|
9262
9276
|
}
|
|
9263
9277
|
}
|
|
9264
|
-
a(
|
|
9265
|
-
function
|
|
9266
|
-
return { hostname:
|
|
9278
|
+
a(ha, "getLastCommitMessage");
|
|
9279
|
+
function da() {
|
|
9280
|
+
return { hostname: Et.hostname(), platform: Et.platform() };
|
|
9267
9281
|
}
|
|
9268
|
-
a(
|
|
9269
|
-
const
|
|
9270
|
-
var
|
|
9282
|
+
a(da, "getMachineInfo");
|
|
9283
|
+
const pa = new Error("request for lock canceled");
|
|
9284
|
+
var ma = a(function(e, t, r, n) {
|
|
9271
9285
|
function i(o) {
|
|
9272
9286
|
return o instanceof r ? o : new r(function(c) {
|
|
9273
9287
|
c(o);
|
|
@@ -9296,11 +9310,11 @@ var Ea = a(function(e, t, r, n) {
|
|
|
9296
9310
|
a(E, "step"), E((n = n.apply(e, t || [])).next());
|
|
9297
9311
|
});
|
|
9298
9312
|
}, "__awaiter$2");
|
|
9299
|
-
class
|
|
9313
|
+
class Ea {
|
|
9300
9314
|
static {
|
|
9301
9315
|
a(this, "Semaphore");
|
|
9302
9316
|
}
|
|
9303
|
-
constructor(t, r =
|
|
9317
|
+
constructor(t, r = pa) {
|
|
9304
9318
|
this._value = t, this._cancelError = r, this._queue = [], this._weightedWaiters = [];
|
|
9305
9319
|
}
|
|
9306
9320
|
acquire(t = 1, r = 0) {
|
|
@@ -9311,7 +9325,7 @@ class _a {
|
|
|
9311
9325
|
});
|
|
9312
9326
|
}
|
|
9313
9327
|
runExclusive(t) {
|
|
9314
|
-
return
|
|
9328
|
+
return ma(this, arguments, void 0, function* (r, n = 1, i = 0) {
|
|
9315
9329
|
const [o, c] = yield this.acquire(n, i);
|
|
9316
9330
|
try {
|
|
9317
9331
|
return yield r(o);
|
|
@@ -9384,7 +9398,7 @@ function yn(e, t) {
|
|
|
9384
9398
|
return -1;
|
|
9385
9399
|
}
|
|
9386
9400
|
a(yn, "findIndexFromEnd");
|
|
9387
|
-
var
|
|
9401
|
+
var _a = a(function(e, t, r, n) {
|
|
9388
9402
|
function i(o) {
|
|
9389
9403
|
return o instanceof r ? o : new r(function(c) {
|
|
9390
9404
|
c(o);
|
|
@@ -9413,15 +9427,15 @@ var Ia = a(function(e, t, r, n) {
|
|
|
9413
9427
|
a(E, "step"), E((n = n.apply(e, t || [])).next());
|
|
9414
9428
|
});
|
|
9415
9429
|
}, "__awaiter$1");
|
|
9416
|
-
class
|
|
9430
|
+
class Ia {
|
|
9417
9431
|
static {
|
|
9418
9432
|
a(this, "Mutex");
|
|
9419
9433
|
}
|
|
9420
9434
|
constructor(t) {
|
|
9421
|
-
this._semaphore = new
|
|
9435
|
+
this._semaphore = new Ea(1, t);
|
|
9422
9436
|
}
|
|
9423
9437
|
acquire() {
|
|
9424
|
-
return
|
|
9438
|
+
return _a(this, arguments, void 0, function* (t = 0) {
|
|
9425
9439
|
const [, r] = yield this._semaphore.acquire(1, t);
|
|
9426
9440
|
return r;
|
|
9427
9441
|
});
|
|
@@ -9445,7 +9459,7 @@ class Sa {
|
|
|
9445
9459
|
function wn(e, t) {
|
|
9446
9460
|
const r = e.length;
|
|
9447
9461
|
let n = 0, i = 0;
|
|
9448
|
-
const o = new
|
|
9462
|
+
const o = new Ia();
|
|
9449
9463
|
return t({ completed: n, errors: i, total: r }), e.map((c) => c.then(async (l) => (await o.runExclusive(() => {
|
|
9450
9464
|
n++, t({ completed: n, errors: i, total: r });
|
|
9451
9465
|
}), l)).catch(async (l) => {
|
|
@@ -9455,34 +9469,50 @@ function wn(e, t) {
|
|
|
9455
9469
|
}));
|
|
9456
9470
|
}
|
|
9457
9471
|
a(wn, "trackPromiseProgress");
|
|
9458
|
-
function
|
|
9472
|
+
function Sa({ result: e, sensitiveValues: t }) {
|
|
9459
9473
|
return e.steps.map((r) => An({ sensitiveValues: t, step: r }));
|
|
9460
9474
|
}
|
|
9461
|
-
a(
|
|
9475
|
+
a(Sa, "extractSteps");
|
|
9462
9476
|
function An({ sensitiveValues: e, step: t }) {
|
|
9463
9477
|
const r = a((n) => n && e?.length ? se({ sensitiveValues: e, str: n }) : n, "scrub");
|
|
9464
9478
|
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) => An({ sensitiveValues: e, step: n })) : void 0, title: r(t.title) ?? t.title };
|
|
9465
9479
|
}
|
|
9466
9480
|
a(An, "extractStep");
|
|
9467
|
-
async function
|
|
9468
|
-
await
|
|
9481
|
+
async function Ra({ fileData: e, maxRetries: t = 3, uploadUrl: r }) {
|
|
9482
|
+
await Vn(async () => {
|
|
9469
9483
|
const n = await fetch(r, { body: e, method: "PUT" });
|
|
9470
9484
|
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
9485
|
}, { minTimeout: 2e3, randomize: true, retries: t });
|
|
9472
9486
|
}
|
|
9473
|
-
a(
|
|
9474
|
-
const
|
|
9487
|
+
a(Ra, "uploadWithRetry");
|
|
9488
|
+
const Ta = process.env.STABLY_WS_URL || "wss://api.stably.ai/reporter", bn = 120 * 1e3, vn = 3e4, ya = process.env.STABLY_API_URL ?? "https://api.stably.ai", wa = 50, Aa = a(({ gitInfo: e, suite: t }) => {
|
|
9489
|
+
const r = [...new Set(t.allTests().map((n) => n.parent.project()?.name).filter((n) => !!n))];
|
|
9490
|
+
if (r.length > 0) {
|
|
9491
|
+
const n = r.join(", ");
|
|
9492
|
+
return n.length <= wa ? n : `${r[0]} + ${r.length - 1} more`;
|
|
9493
|
+
}
|
|
9494
|
+
if (e.isCI && e.ciServiceName && e.ciBuild) return `${e.ciServiceName} #${e.ciBuild}`;
|
|
9495
|
+
try {
|
|
9496
|
+
const { username: n } = Et.userInfo();
|
|
9497
|
+
if (n) {
|
|
9498
|
+
const o = (/* @__PURE__ */ new Date()).toLocaleString("en-US", { day: "numeric", hour: "numeric", hour12: false, minute: "2-digit", month: "short" });
|
|
9499
|
+
return `${n} - ${o}`;
|
|
9500
|
+
}
|
|
9501
|
+
} catch {
|
|
9502
|
+
}
|
|
9503
|
+
return "Playwright Test Suite";
|
|
9504
|
+
}, "generateRunName"), ba = a(({ notificationConfigs: e, suite: t }) => {
|
|
9475
9505
|
if (!e || e.length === 0) return;
|
|
9476
9506
|
const r = new Set(t.allTests().map((i) => i.parent.project()?.name).filter(Boolean)), n = e.filter((i) => r.has(i.projectName));
|
|
9477
9507
|
return n.length > 0 ? n : void 0;
|
|
9478
|
-
}, "filterNotificationConfigsByRunningProjects"),
|
|
9508
|
+
}, "filterNotificationConfigsByRunningProjects"), va = a((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"), Cn = a(({ absolutePath: e, rootDir: t }) => {
|
|
9479
9509
|
if (t && e.startsWith(t)) {
|
|
9480
9510
|
const r = e.slice(t.length);
|
|
9481
9511
|
return r.startsWith("/") ? r.slice(1) : r;
|
|
9482
9512
|
}
|
|
9483
9513
|
return e;
|
|
9484
9514
|
}, "makePathRelative");
|
|
9485
|
-
class
|
|
9515
|
+
class Un {
|
|
9486
9516
|
static {
|
|
9487
9517
|
a(this, "StablyReporter");
|
|
9488
9518
|
}
|
|
@@ -9515,21 +9545,21 @@ class Bn {
|
|
|
9515
9545
|
const i = jr(t.sensitiveValues);
|
|
9516
9546
|
this.sensitiveValues = [...i].sort((o, c) => c.length - o.length);
|
|
9517
9547
|
}
|
|
9518
|
-
this.wsClient = new
|
|
9548
|
+
this.wsClient = new To({ apiKey: r, maxBufferSize: 1e3, maxReconnectAttempts: 3, onError: a((i) => this.handleWebSocketError(i), "onError"), onMessage: a((i) => this.handleWebSocketMessage(i), "onMessage"), projectId: n, reconnectDelay: 2e3, url: Ta });
|
|
9519
9549
|
}
|
|
9520
9550
|
onBegin(t, r) {
|
|
9521
9551
|
if (this.isListMode = process.argv.includes("--list"), this.isListMode || (r.allTests().length === 0 && process.exit(1), this.config = t, this.testSuiteRunId = this.getSuiteRunId(t), this.rootDir = t.rootDir, this.skipSuiteReporting)) return;
|
|
9522
9552
|
this.suiteData = this.extractSuiteInfo(t, r);
|
|
9523
|
-
const i =
|
|
9553
|
+
const i = ba({ notificationConfigs: this.notificationConfigs, suite: r });
|
|
9524
9554
|
this.filteredNotificationConfigs = i;
|
|
9525
9555
|
const o = { ...this.suiteData, notificationRequest: i ? { notificationConfigs: i, totalShards: this.config?.shard?.total } : void 0, status: "running" };
|
|
9526
9556
|
try {
|
|
9527
9557
|
const E = fileURLToPath$1(new URL("./create-suite.mjs", import.meta.url)), h = JSON.stringify({ apiBaseUrl: ya, apiKey: this.apiKey, body: o, projectId: this.projectId, timeoutMs: vn }), T = spawnSync(process.execPath, [E], { encoding: "utf-8", input: h, stdio: ["pipe", "pipe", "pipe"], timeout: vn + 5e3 });
|
|
9528
9558
|
if (T.status === 2 && (console.error(ie.bold(ie.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)), T.status !== 0) {
|
|
9529
|
-
const
|
|
9530
|
-
throw new Error(
|
|
9559
|
+
const v = T.stderr?.trim() || T.error?.message || "Unknown error";
|
|
9560
|
+
throw new Error(v);
|
|
9531
9561
|
}
|
|
9532
|
-
this.createdSuiteRun = JSON.parse(T.stdout.trim()), console.log(ie.cyan(`\u{1F4CA} View results: ${ie.bold(ie.underline(this.createdSuiteRun.url))}
|
|
9562
|
+
this.createdSuiteRun = JSON.parse(T.stdout.trim()), console.log(ie.cyan(`\u{1F4CA} View live results: ${ie.bold(ie.underline(this.createdSuiteRun.url))}
|
|
9533
9563
|
`));
|
|
9534
9564
|
} catch (E) {
|
|
9535
9565
|
const h = E instanceof Error ? E.message : String(E);
|
|
@@ -9539,8 +9569,8 @@ class Bn {
|
|
|
9539
9569
|
for (const E of c) {
|
|
9540
9570
|
const h = Ye();
|
|
9541
9571
|
this.testIdMap.set(E.id, h);
|
|
9542
|
-
const T = E.parent.project(),
|
|
9543
|
-
D ? D.push(
|
|
9572
|
+
const T = E.parent.project(), v = Cn({ absolutePath: E.location.file, rootDir: this.rootDir }), C = { annotations: E.annotations.length > 0 ? E.annotations.map((M) => ({ description: M.description, type: M.type })) : void 0, attemptNumber: 1, browserName: T?.use?.defaultBrowserType, expectedStatus: E.expectedStatus === "skipped" ? "skipped" : "passed", fullTitle: this.scrubSensitiveString(E.titlePath().join(" \u203A ")) ?? "", location: `${v}:${E.location.line}:${E.location.column}`, maxRetries: E.retries, projectName: T?.name, tags: E.tags.length > 0 ? E.tags : void 0, testIdentifier: E.id, title: this.scrubSensitiveString(E.title) ?? E.title }, D = l.get(v);
|
|
9573
|
+
D ? D.push(C) : l.set(v, [C]);
|
|
9544
9574
|
}
|
|
9545
9575
|
const p = Array.from(l.entries()).map(([E, h]) => ({ filePath: E, tests: h }));
|
|
9546
9576
|
this.createdSuiteRun ? this.pendingOperations.push(this.wsClient.sendEvent({ payload: { specs: p, suiteId: this.testSuiteRunId }, type: "tests_queued" })) : this.pendingQueuedSpecs = p;
|
|
@@ -9557,7 +9587,7 @@ class Bn {
|
|
|
9557
9587
|
if (this.isListMode || this.skipSuiteReporting) return;
|
|
9558
9588
|
const n = this.extractTestCaseInfo(t, r);
|
|
9559
9589
|
this.testCases.push(n), this.testStepsMap.set(n.id, r);
|
|
9560
|
-
const i =
|
|
9590
|
+
const i = Sa({ result: r, sensitiveValues: this.sensitiveValues }), o = [...r.attachments, { contentType: "text/plain", name: "source-code", path: t.location.file }], c = (async () => {
|
|
9561
9591
|
const l = await this.extractAttachmentMetadata({ attachments: o, attemptNumber: n.attemptNumber, testId: n.id });
|
|
9562
9592
|
let p, E;
|
|
9563
9593
|
l.length > 0 && (p = `${n.id}-${n.attemptNumber}`, E = new Promise((h) => {
|
|
@@ -9584,12 +9614,12 @@ class Bn {
|
|
|
9584
9614
|
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...");
|
|
9585
9615
|
const r = Y();
|
|
9586
9616
|
r.start("Waiting for tasks to finish...");
|
|
9587
|
-
const n = Promise.allSettled(wn(this.pendingOperations, ({ completed: h, errors: T, total:
|
|
9588
|
-
r.message(`${h}/${
|
|
9617
|
+
const n = Promise.allSettled(wn(this.pendingOperations, ({ completed: h, errors: T, total: v }) => {
|
|
9618
|
+
r.message(`${h}/${v} tasks finished${T > 0 ? `, ${T} errors` : ""}`);
|
|
9589
9619
|
})), i = new Promise((h, T) => {
|
|
9590
9620
|
setTimeout(() => {
|
|
9591
|
-
T(new Error(`Tasks timeout: Some operations did not complete within ${
|
|
9592
|
-
},
|
|
9621
|
+
T(new Error(`Tasks timeout: Some operations did not complete within ${bn / 1e3}s`));
|
|
9622
|
+
}, bn);
|
|
9593
9623
|
});
|
|
9594
9624
|
try {
|
|
9595
9625
|
await Promise.race([n, i]);
|
|
@@ -9599,12 +9629,12 @@ class Bn {
|
|
|
9599
9629
|
}
|
|
9600
9630
|
this.wsClient.flushBuffer(), r.stop("All tasks finished");
|
|
9601
9631
|
const o = Y();
|
|
9602
|
-
o.start("Waiting for file uploads to finish..."), await Promise.allSettled(wn(this.pendingUploads, ({ completed: h, errors: T, total:
|
|
9603
|
-
o.message(`${h}/${
|
|
9632
|
+
o.start("Waiting for file uploads to finish..."), await Promise.allSettled(wn(this.pendingUploads, ({ completed: h, errors: T, total: v }) => {
|
|
9633
|
+
o.message(`${h}/${v} uploads finished${T > 0 ? `, ${T} errors` : ""}`);
|
|
9604
9634
|
})), o.stop("All file uploads finished"), this.wsClient.close();
|
|
9605
9635
|
try {
|
|
9606
|
-
const h =
|
|
9607
|
-
mkdirSync(h, { recursive: true }), writeFileSync(
|
|
9636
|
+
const h = Ke.join(this.rootDir, ".stably");
|
|
9637
|
+
mkdirSync(h, { recursive: true }), writeFileSync(Ke.join(h, "last-run.json"), JSON.stringify({ runId: this.testSuiteRunId, timestamp: Date.now() }));
|
|
9608
9638
|
} catch {
|
|
9609
9639
|
}
|
|
9610
9640
|
const c = this.createdSuiteRun?.name || this.suiteData?.title || "Test Suite", l = t.status === "failed" || t.status === "timedout", p = this.suiteData?.isCI ?? !!process.env.CI, E = l ? p ? `
|
|
@@ -9622,11 +9652,11 @@ class Bn {
|
|
|
9622
9652
|
return !t || !this.sensitiveValues?.length ? t : se({ sensitiveValues: this.sensitiveValues, str: t });
|
|
9623
9653
|
}
|
|
9624
9654
|
extractSuiteInfo(t, r) {
|
|
9625
|
-
const n =
|
|
9626
|
-
return { id: Ye(), projectSettings:
|
|
9655
|
+
const n = la(), i = da(), o = /* @__PURE__ */ new Date();
|
|
9656
|
+
return { id: Ye(), projectSettings: va(t), startedAt: o, suiteId: this.testSuiteRunId, title: r.title || Aa({ gitInfo: n, suite: r }), 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 };
|
|
9627
9657
|
}
|
|
9628
9658
|
extractTestCaseInfo(t, r) {
|
|
9629
|
-
const n =
|
|
9659
|
+
const n = Cn({ absolutePath: t.location.file, rootDir: this.rootDir }), i = t.parent.project(), o = i?.name, c = i?.use?.defaultBrowserType, l = this.testIdMap.get(t.id), p = l ?? Ye();
|
|
9630
9660
|
return l || this.testIdMap.set(t.id, p), { fullTitle: this.scrubSensitiveString(t.titlePath().join(" \u203A ")) ?? "", id: p, 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 };
|
|
9631
9661
|
}
|
|
9632
9662
|
async extractAttachmentMetadata({ attachments: t, attemptNumber: r, testId: n }) {
|
|
@@ -9654,16 +9684,16 @@ class Bn {
|
|
|
9654
9684
|
async getAttachmentFileData({ attachment: t, traceFd: r }) {
|
|
9655
9685
|
if (!t.path && !t.body) return;
|
|
9656
9686
|
if (t.name === "trace" && this.sensitiveValues && this.sensitiveValues.length > 0) {
|
|
9657
|
-
const i = t.path ? await this.scrubTraceFromFile({ attachmentPath: t.path, sensitiveValues: this.sensitiveValues, traceFd: r }) : t.body ? await
|
|
9687
|
+
const i = t.path ? await this.scrubTraceFromFile({ attachmentPath: t.path, sensitiveValues: this.sensitiveValues, traceFd: r }) : t.body ? await Gt({ sensitiveValues: this.sensitiveValues, traceBuffer: Buffer.from(t.body) }) : void 0;
|
|
9658
9688
|
return i ? Buffer.from(i) : void 0;
|
|
9659
9689
|
}
|
|
9660
9690
|
return t.body ? Buffer.from(t.body) : t.path ? readFileSync$1(t.path) : void 0;
|
|
9661
9691
|
}
|
|
9662
9692
|
async scrubTraceFromFile({ attachmentPath: t, sensitiveValues: r, traceFd: n }) {
|
|
9663
|
-
return n !== void 0 ?
|
|
9693
|
+
return n !== void 0 ? Ro({ sensitiveValues: r, traceFd: n, tracePath: t }) : So({ sensitiveValues: r, tracePath: t });
|
|
9664
9694
|
}
|
|
9665
9695
|
handleWebSocketError(t) {
|
|
9666
|
-
t.code === Yr.AUTHENTICATION_FAILED && (console.error(ie.bold(ie.red(
|
|
9696
|
+
t.code === Yr.AUTHENTICATION_FAILED && (console.error(ie.bold(ie.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);
|
|
9667
9697
|
}
|
|
9668
9698
|
handleWebSocketMessage(t) {
|
|
9669
9699
|
if (t.type === "suite_created") this.createdSuiteRun = { id: t.id, name: t.name, url: t.url }, this.pendingQueuedSpecs && (this.pendingOperations.push(this.wsClient.sendEvent({ payload: { specs: this.pendingQueuedSpecs, suiteId: this.testSuiteRunId }, type: "tests_queued" })), this.pendingQueuedSpecs = void 0);
|
|
@@ -9679,7 +9709,7 @@ class Bn {
|
|
|
9679
9709
|
const i = n.map(async ({ artifactId: o, name: c, uploadUrl: l }) => {
|
|
9680
9710
|
const p = `${r}-${t}-${o}`, E = this.attachmentFiles.get(p);
|
|
9681
9711
|
if (E) try {
|
|
9682
|
-
await
|
|
9712
|
+
await Ra({ fileData: E, maxRetries: 3, uploadUrl: l }), this.attachmentFiles.delete(p);
|
|
9683
9713
|
} catch (h) {
|
|
9684
9714
|
const T = h instanceof Error ? h.message : String(h);
|
|
9685
9715
|
console.error(`[StablyAI reporter] Failed to upload ${c} after retries: ${T}`);
|
|
@@ -9688,10 +9718,10 @@ class Bn {
|
|
|
9688
9718
|
await Promise.allSettled(i);
|
|
9689
9719
|
}
|
|
9690
9720
|
}
|
|
9691
|
-
function
|
|
9721
|
+
function Ca(e) {
|
|
9692
9722
|
return ["@stablyai/playwright-test/reporter", e];
|
|
9693
9723
|
}
|
|
9694
|
-
a(
|
|
9724
|
+
a(Ca, "stablyReporter");
|
|
9695
9725
|
|
|
9696
|
-
export {
|
|
9697
|
-
//# sourceMappingURL=index-
|
|
9726
|
+
export { Ca as C, Un as U };
|
|
9727
|
+
//# sourceMappingURL=index-PsgSMFzY.mjs.map
|