@stablyai/playwright-test 2.0.12 → 2.0.15
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-YCMYxOS2.mjs → index-BklBJUIC.mjs} +1342 -1305
- package/dist/index-BklBJUIC.mjs.map +1 -0
- package/dist/{index-Cf1SUa76.cjs → index-Da3bGLIB.cjs} +1341 -1304
- package/dist/index-Da3bGLIB.cjs.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/{index.d-DaMmBaG3.d.cts → index.d-BjGuH5NO.d.cts} +9 -1
- package/dist/{index.d-DaMmBaG3.d.cts.map → index.d-BjGuH5NO.d.cts.map} +1 -1
- package/dist/{index.d-DaMmBaG3.d.ts → index.d-BjGuH5NO.d.mts} +9 -1
- package/dist/{index.d-DaMmBaG3.d.mts.map → index.d-BjGuH5NO.d.mts.map} +1 -1
- package/dist/{index.d-DaMmBaG3.d.mts → index.d-BjGuH5NO.d.ts} +9 -1
- package/dist/{index.d-DaMmBaG3.d.ts.map → index.d-BjGuH5NO.d.ts.map} +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/reporter.cjs +2 -2
- package/dist/reporter.d.cts +1 -1
- package/dist/reporter.d.mts +1 -1
- package/dist/reporter.mjs +2 -2
- package/package.json +4 -4
- package/dist/index-Cf1SUa76.cjs.map +0 -1
- package/dist/index-YCMYxOS2.mjs.map +0 -1
|
@@ -4,16 +4,16 @@ import childProcess from 'node:child_process';
|
|
|
4
4
|
import y, { stdout, stdin } from 'node:process';
|
|
5
5
|
import require$$0$2, { execSync } from 'child_process';
|
|
6
6
|
import require$$0$1 from 'path';
|
|
7
|
-
import ze, { readFileSync as readFileSync$1 } from 'fs';
|
|
7
|
+
import ze, { 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
|
-
import { readFileSync } from 'node:fs';
|
|
10
|
+
import { readFileSync, createReadStream } from 'node:fs';
|
|
11
11
|
import 'node:timers/promises';
|
|
12
12
|
import require$$0 from 'stream';
|
|
13
13
|
import { debuglog, promisify, 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
|
|
16
|
+
import ei from 'util';
|
|
17
17
|
import require$$0$5 from 'events';
|
|
18
18
|
import require$$1$1 from 'https';
|
|
19
19
|
import require$$2 from 'http';
|
|
@@ -23,7 +23,7 @@ import require$$1 from 'crypto';
|
|
|
23
23
|
import require$$7 from 'url';
|
|
24
24
|
import require$$0$3 from 'zlib';
|
|
25
25
|
import require$$0$4 from 'buffer';
|
|
26
|
-
import
|
|
26
|
+
import wr from 'os';
|
|
27
27
|
|
|
28
28
|
var appveyor = {
|
|
29
29
|
detect({ env }) {
|
|
@@ -2411,6 +2411,7 @@ function getAttemptFromEnv(ciService) {
|
|
|
2411
2411
|
return process.env.SYSTEM_JOBATTEMPT;
|
|
2412
2412
|
case "bitbucket":
|
|
2413
2413
|
return process.env.BITBUCKET_STEP_RUN_NUMBER;
|
|
2414
|
+
case void 0:
|
|
2414
2415
|
default:
|
|
2415
2416
|
return void 0;
|
|
2416
2417
|
}
|
|
@@ -2426,7 +2427,7 @@ function getCiRunKey() {
|
|
|
2426
2427
|
const attempt = getAttemptFromEnv(ci.service);
|
|
2427
2428
|
const parts = [
|
|
2428
2429
|
ci.service,
|
|
2429
|
-
"slug" in ci ? ci.slug : void 0,
|
|
2430
|
+
"slug" in ci ? ci.slug?.replace(/\//g, "_") : void 0,
|
|
2430
2431
|
"build" in ci ? String(ci.build) : void 0,
|
|
2431
2432
|
"job" in ci ? String(ci.job) : void 0,
|
|
2432
2433
|
attempt && String(attempt)
|
|
@@ -2573,7 +2574,7 @@ function requirePicocolors () {
|
|
|
2573
2574
|
}
|
|
2574
2575
|
|
|
2575
2576
|
var picocolorsExports = /*@__PURE__*/ requirePicocolors();
|
|
2576
|
-
var
|
|
2577
|
+
var Ce = /*@__PURE__*/getDefaultExportFromCjs(picocolorsExports);
|
|
2577
2578
|
|
|
2578
2579
|
function DD({ onlyFirst: e = false } = {}) {
|
|
2579
2580
|
const t = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
@@ -2683,14 +2684,14 @@ function ce$1() {
|
|
|
2683
2684
|
return y.platform !== "win32" ? y.env.TERM !== "linux" : !!y.env.CI || !!y.env.WT_SESSION || !!y.env.TERMINUS_SUBLIME || y.env.ConEmuTask === "{cmd::Cmder}" || y.env.TERM_PROGRAM === "Terminus-Sublime" || y.env.TERM_PROGRAM === "vscode" || y.env.TERM === "xterm-256color" || y.env.TERM === "alacritty" || y.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
2684
2685
|
}
|
|
2685
2686
|
const V$1 = ce$1(), u = (t, n) => V$1 ? t : n, L = u("\u25A0", "x"), W$1 = u("\u25B2", "x"), C = u("\u25C7", "o"), ue$1 = u("\u250C", "T"), o = u("\u2502", "|"), d = u("\u2514", "\u2014"), Ie$1 = (t = "") => {
|
|
2686
|
-
process.stdout.write(`${
|
|
2687
|
+
process.stdout.write(`${Ce.gray(ue$1)} ${t}
|
|
2687
2688
|
`);
|
|
2688
2689
|
}, Se$1 = (t = "") => {
|
|
2689
|
-
process.stdout.write(`${
|
|
2690
|
-
${
|
|
2690
|
+
process.stdout.write(`${Ce.gray(o)}
|
|
2691
|
+
${Ce.gray(d)} ${t}
|
|
2691
2692
|
|
|
2692
2693
|
`);
|
|
2693
|
-
}; `${
|
|
2694
|
+
}; `${Ce.gray(o)} `; const Y$1 = ({ indicator: t = "dots" } = {}) => {
|
|
2694
2695
|
const n = V$1 ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], r = V$1 ? 80 : 120, i = process.env.CI === "true";
|
|
2695
2696
|
let s, c, a = false, l = "", $, g = performance.now();
|
|
2696
2697
|
const p = (m) => {
|
|
@@ -2711,13 +2712,13 @@ ${be.gray(d)} ${t}
|
|
|
2711
2712
|
const h = (performance.now() - m) / 1e3, w = Math.floor(h / 60), I = Math.floor(h % 60);
|
|
2712
2713
|
return w > 0 ? `[${w}m ${I}s]` : `[${I}s]`;
|
|
2713
2714
|
}, H = (m = "") => {
|
|
2714
|
-
a = true, s = fD(), l = R(m), g = performance.now(), process.stdout.write(`${
|
|
2715
|
+
a = true, s = fD(), l = R(m), g = performance.now(), process.stdout.write(`${Ce.gray(o)}
|
|
2715
2716
|
`);
|
|
2716
2717
|
let h = 0, w = 0;
|
|
2717
2718
|
j(), c = setInterval(() => {
|
|
2718
2719
|
if (i && l === $) return;
|
|
2719
2720
|
B(), $ = l;
|
|
2720
|
-
const I =
|
|
2721
|
+
const I = Ce.magenta(n[h]);
|
|
2721
2722
|
if (i) process.stdout.write(`${I} ${l}...`);
|
|
2722
2723
|
else if (t === "timer") process.stdout.write(`${I} ${l} ${O(g)}`);
|
|
2723
2724
|
else {
|
|
@@ -2728,7 +2729,7 @@ ${be.gray(d)} ${t}
|
|
|
2728
2729
|
}, r);
|
|
2729
2730
|
}, N = (m = "", h = 0) => {
|
|
2730
2731
|
a = false, clearInterval(c), B();
|
|
2731
|
-
const w = h === 0 ?
|
|
2732
|
+
const w = h === 0 ? Ce.green(C) : h === 1 ? Ce.red(L) : Ce.red(W$1);
|
|
2732
2733
|
l = R(m ?? l), t === "timer" ? process.stdout.write(`${w} ${l} ${O(g)}
|
|
2733
2734
|
`) : process.stdout.write(`${w} ${l}
|
|
2734
2735
|
`), E(), s();
|
|
@@ -6583,111 +6584,111 @@ async function pRetry(input, options = {}) {
|
|
|
6583
6584
|
throw new Error("Retry attempts exhausted without throwing an error.");
|
|
6584
6585
|
}
|
|
6585
6586
|
|
|
6586
|
-
var
|
|
6587
|
-
var s = (e, t) =>
|
|
6588
|
-
const st = BigInt(2 ** 32 - 1),
|
|
6589
|
-
function
|
|
6590
|
-
return t ? { h: Number(e & st), l: Number(e >>
|
|
6591
|
-
}
|
|
6592
|
-
s(
|
|
6593
|
-
function
|
|
6587
|
+
var Yn = Object.defineProperty;
|
|
6588
|
+
var s = (e, t) => Yn(e, "name", { value: t, configurable: true });
|
|
6589
|
+
const st = BigInt(2 ** 32 - 1), Ar = BigInt(32);
|
|
6590
|
+
function ui(e, t = false) {
|
|
6591
|
+
return t ? { h: Number(e & st), l: Number(e >> Ar & st) } : { h: Number(e >> Ar & st) | 0, l: Number(e & st) | 0 };
|
|
6592
|
+
}
|
|
6593
|
+
s(ui, "fromBig");
|
|
6594
|
+
function li(e, t = false) {
|
|
6594
6595
|
const r = e.length;
|
|
6595
|
-
let n = new Uint32Array(r),
|
|
6596
|
-
for (let
|
|
6597
|
-
const { h: c, l } =
|
|
6598
|
-
[n[
|
|
6596
|
+
let n = new Uint32Array(r), i = new Uint32Array(r);
|
|
6597
|
+
for (let o = 0; o < r; o++) {
|
|
6598
|
+
const { h: c, l } = ui(e[o], t);
|
|
6599
|
+
[n[o], i[o]] = [c, l];
|
|
6599
6600
|
}
|
|
6600
|
-
return [n,
|
|
6601
|
+
return [n, i];
|
|
6601
6602
|
}
|
|
6602
|
-
s(
|
|
6603
|
-
const
|
|
6603
|
+
s(li, "split");
|
|
6604
|
+
const fi = s((e, t, r) => e << r | t >>> 32 - r, "rotlSH"), hi = s((e, t, r) => t << r | e >>> 32 - r, "rotlSL"), di = s((e, t, r) => t << r - 32 | e >>> 64 - r, "rotlBH"), pi = s((e, t, r) => e << r - 32 | t >>> 64 - r, "rotlBL");
|
|
6604
6605
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
6605
|
-
function
|
|
6606
|
+
function mi(e) {
|
|
6606
6607
|
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
|
|
6607
6608
|
}
|
|
6608
|
-
s(
|
|
6609
|
-
function
|
|
6609
|
+
s(mi, "isBytes");
|
|
6610
|
+
function vr(e, t = "") {
|
|
6610
6611
|
if (!Number.isSafeInteger(e) || e < 0) {
|
|
6611
6612
|
const r = t && `"${t}" `;
|
|
6612
6613
|
throw new Error(`${r}expected integer >= 0, got ${e}`);
|
|
6613
6614
|
}
|
|
6614
6615
|
}
|
|
6615
|
-
s(
|
|
6616
|
+
s(vr, "anumber");
|
|
6616
6617
|
function Ut(e, t, r = "") {
|
|
6617
|
-
const n =
|
|
6618
|
+
const n = mi(e), i = e?.length;
|
|
6618
6619
|
if (!n || t !== void 0) {
|
|
6619
|
-
const c = r && `"${r}" `, l = "", h = n ? `length=${
|
|
6620
|
+
const c = r && `"${r}" `, l = "", h = n ? `length=${i}` : `type=${typeof e}`;
|
|
6620
6621
|
throw new Error(c + "expected Uint8Array" + l + ", got " + h);
|
|
6621
6622
|
}
|
|
6622
6623
|
return e;
|
|
6623
6624
|
}
|
|
6624
6625
|
s(Ut, "abytes");
|
|
6625
|
-
function
|
|
6626
|
+
function br(e, t = true) {
|
|
6626
6627
|
if (e.destroyed) throw new Error("Hash instance has been destroyed");
|
|
6627
6628
|
if (t && e.finished) throw new Error("Hash#digest() has already been called");
|
|
6628
6629
|
}
|
|
6629
|
-
s(
|
|
6630
|
-
function
|
|
6630
|
+
s(br, "aexists");
|
|
6631
|
+
function Ei(e, t) {
|
|
6631
6632
|
Ut(e, void 0, "digestInto() output");
|
|
6632
6633
|
const r = t.outputLen;
|
|
6633
6634
|
if (e.length < r) throw new Error('"digestInto() output" expected to be of length >=' + r);
|
|
6634
6635
|
}
|
|
6635
|
-
s(
|
|
6636
|
-
function
|
|
6636
|
+
s(Ei, "aoutput");
|
|
6637
|
+
function _i(e) {
|
|
6637
6638
|
return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
|
|
6638
6639
|
}
|
|
6639
|
-
s(
|
|
6640
|
-
function
|
|
6640
|
+
s(_i, "u32");
|
|
6641
|
+
function Cr(...e) {
|
|
6641
6642
|
for (let t = 0; t < e.length; t++) e[t].fill(0);
|
|
6642
6643
|
}
|
|
6643
|
-
s(
|
|
6644
|
-
const
|
|
6645
|
-
function
|
|
6644
|
+
s(Cr, "clean");
|
|
6645
|
+
const gi = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
6646
|
+
function Ii(e) {
|
|
6646
6647
|
return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
|
|
6647
6648
|
}
|
|
6648
|
-
s(
|
|
6649
|
-
function
|
|
6650
|
-
for (let t = 0; t < e.length; t++) e[t] =
|
|
6649
|
+
s(Ii, "byteSwap");
|
|
6650
|
+
function Si(e) {
|
|
6651
|
+
for (let t = 0; t < e.length; t++) e[t] = Ii(e[t]);
|
|
6651
6652
|
return e;
|
|
6652
6653
|
}
|
|
6653
|
-
s(
|
|
6654
|
-
const
|
|
6655
|
-
function
|
|
6656
|
-
const r = s((
|
|
6657
|
-
return r.outputLen = n.outputLen, r.blockLen = n.blockLen, r.create = (
|
|
6654
|
+
s(Si, "byteSwap32");
|
|
6655
|
+
const Ur = gi ? (e) => e : Si;
|
|
6656
|
+
function Ri(e, t = {}) {
|
|
6657
|
+
const r = s((i, o) => e(o).update(i).digest(), "hashC"), n = e(void 0);
|
|
6658
|
+
return r.outputLen = n.outputLen, r.blockLen = n.blockLen, r.create = (i) => e(i), Object.assign(r, t), Object.freeze(r);
|
|
6658
6659
|
}
|
|
6659
|
-
s(
|
|
6660
|
-
const
|
|
6660
|
+
s(Ri, "createHasher");
|
|
6661
|
+
const Ti = s((e) => ({ oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, e]) }), "oidNist"), yi = BigInt(0), Qe = BigInt(1), wi = BigInt(2), Ai = BigInt(7), vi = BigInt(256), bi = BigInt(113), Br = [], Or = [], Lr = [];
|
|
6661
6662
|
for (let e = 0, t = Qe, r = 1, n = 0; e < 24; e++) {
|
|
6662
|
-
[r, n] = [n, (2 * r + 3 * n) % 5],
|
|
6663
|
-
let
|
|
6664
|
-
for (let
|
|
6665
|
-
|
|
6663
|
+
[r, n] = [n, (2 * r + 3 * n) % 5], Br.push(2 * (5 * n + r)), Or.push((e + 1) * (e + 2) / 2 % 64);
|
|
6664
|
+
let i = yi;
|
|
6665
|
+
for (let o = 0; o < 7; o++) t = (t << Qe ^ (t >> Ai) * bi) % vi, t & wi && (i ^= Qe << (Qe << BigInt(o)) - Qe);
|
|
6666
|
+
Lr.push(i);
|
|
6666
6667
|
}
|
|
6667
|
-
const
|
|
6668
|
-
function
|
|
6668
|
+
const Pr = li(Lr, true), Ci = Pr[0], Ui = Pr[1], Nr = s((e, t, r) => r > 32 ? di(e, t, r) : fi(e, t, r), "rotlH"), Dr = s((e, t, r) => r > 32 ? pi(e, t, r) : hi(e, t, r), "rotlL");
|
|
6669
|
+
function Bi(e, t = 24) {
|
|
6669
6670
|
const r = new Uint32Array(10);
|
|
6670
6671
|
for (let n = 24 - t; n < 24; n++) {
|
|
6671
6672
|
for (let c = 0; c < 10; c++) r[c] = e[c] ^ e[c + 10] ^ e[c + 20] ^ e[c + 30] ^ e[c + 40];
|
|
6672
6673
|
for (let c = 0; c < 10; c += 2) {
|
|
6673
|
-
const l = (c + 8) % 10, h = (c + 2) % 10,
|
|
6674
|
-
for (let O = 0; O < 50; O += 10) e[c + O] ^= A, e[c + O + 1] ^=
|
|
6674
|
+
const l = (c + 8) % 10, h = (c + 2) % 10, g = r[h], m = r[h + 1], A = Nr(g, m, 1) ^ r[l], b = Dr(g, m, 1) ^ r[l + 1];
|
|
6675
|
+
for (let O = 0; O < 50; O += 10) e[c + O] ^= A, e[c + O + 1] ^= b;
|
|
6675
6676
|
}
|
|
6676
|
-
let
|
|
6677
|
+
let i = e[2], o = e[3];
|
|
6677
6678
|
for (let c = 0; c < 24; c++) {
|
|
6678
|
-
const l =
|
|
6679
|
-
|
|
6679
|
+
const l = Or[c], h = Nr(i, o, l), g = Dr(i, o, l), m = Br[c];
|
|
6680
|
+
i = e[m], o = e[m + 1], e[m] = h, e[m + 1] = g;
|
|
6680
6681
|
}
|
|
6681
6682
|
for (let c = 0; c < 50; c += 10) {
|
|
6682
6683
|
for (let l = 0; l < 10; l++) r[l] = e[c + l];
|
|
6683
6684
|
for (let l = 0; l < 10; l++) e[c + l] ^= ~r[(l + 2) % 10] & r[(l + 4) % 10];
|
|
6684
6685
|
}
|
|
6685
|
-
e[0] ^=
|
|
6686
|
+
e[0] ^= Ci[n], e[1] ^= Ui[n];
|
|
6686
6687
|
}
|
|
6687
|
-
|
|
6688
|
+
Cr(r);
|
|
6688
6689
|
}
|
|
6689
|
-
s(
|
|
6690
|
-
class
|
|
6690
|
+
s(Bi, "keccakP");
|
|
6691
|
+
class mr {
|
|
6691
6692
|
static {
|
|
6692
6693
|
s(this, "Keccak");
|
|
6693
6694
|
}
|
|
@@ -6702,22 +6703,22 @@ class dr {
|
|
|
6702
6703
|
outputLen;
|
|
6703
6704
|
enableXOF = false;
|
|
6704
6705
|
rounds;
|
|
6705
|
-
constructor(t, r, n,
|
|
6706
|
-
if (this.blockLen = t, this.suffix = r, this.outputLen = n, this.enableXOF =
|
|
6707
|
-
this.state = new Uint8Array(200), this.state32 =
|
|
6706
|
+
constructor(t, r, n, i = false, o = 24) {
|
|
6707
|
+
if (this.blockLen = t, this.suffix = r, this.outputLen = n, this.enableXOF = i, this.rounds = o, vr(n, "outputLen"), !(0 < t && t < 200)) throw new Error("only keccak-f1600 function is supported");
|
|
6708
|
+
this.state = new Uint8Array(200), this.state32 = _i(this.state);
|
|
6708
6709
|
}
|
|
6709
6710
|
clone() {
|
|
6710
6711
|
return this._cloneInto();
|
|
6711
6712
|
}
|
|
6712
6713
|
keccak() {
|
|
6713
|
-
|
|
6714
|
+
Ur(this.state32), Bi(this.state32, this.rounds), Ur(this.state32), this.posOut = 0, this.pos = 0;
|
|
6714
6715
|
}
|
|
6715
6716
|
update(t) {
|
|
6716
|
-
|
|
6717
|
-
const { blockLen: r, state: n } = this,
|
|
6718
|
-
for (let
|
|
6719
|
-
const c = Math.min(r - this.pos,
|
|
6720
|
-
for (let l = 0; l < c; l++) n[this.pos++] ^= t[
|
|
6717
|
+
br(this), Ut(t);
|
|
6718
|
+
const { blockLen: r, state: n } = this, i = t.length;
|
|
6719
|
+
for (let o = 0; o < i; ) {
|
|
6720
|
+
const c = Math.min(r - this.pos, i - o);
|
|
6721
|
+
for (let l = 0; l < c; l++) n[this.pos++] ^= t[o++];
|
|
6721
6722
|
this.pos === r && this.keccak();
|
|
6722
6723
|
}
|
|
6723
6724
|
return this;
|
|
@@ -6725,16 +6726,16 @@ class dr {
|
|
|
6725
6726
|
finish() {
|
|
6726
6727
|
if (this.finished) return;
|
|
6727
6728
|
this.finished = true;
|
|
6728
|
-
const { state: t, suffix: r, pos: n, blockLen:
|
|
6729
|
-
t[n] ^= r, (r & 128) !== 0 && n ===
|
|
6729
|
+
const { state: t, suffix: r, pos: n, blockLen: i } = this;
|
|
6730
|
+
t[n] ^= r, (r & 128) !== 0 && n === i - 1 && this.keccak(), t[i - 1] ^= 128, this.keccak();
|
|
6730
6731
|
}
|
|
6731
6732
|
writeInto(t) {
|
|
6732
|
-
|
|
6733
|
+
br(this, false), Ut(t), this.finish();
|
|
6733
6734
|
const r = this.state, { blockLen: n } = this;
|
|
6734
|
-
for (let
|
|
6735
|
+
for (let i = 0, o = t.length; i < o; ) {
|
|
6735
6736
|
this.posOut >= n && this.keccak();
|
|
6736
|
-
const c = Math.min(n - this.posOut,
|
|
6737
|
-
t.set(r.subarray(this.posOut, this.posOut + c),
|
|
6737
|
+
const c = Math.min(n - this.posOut, o - i);
|
|
6738
|
+
t.set(r.subarray(this.posOut, this.posOut + c), i), this.posOut += c, i += c;
|
|
6738
6739
|
}
|
|
6739
6740
|
return t;
|
|
6740
6741
|
}
|
|
@@ -6743,30 +6744,30 @@ class dr {
|
|
|
6743
6744
|
return this.writeInto(t);
|
|
6744
6745
|
}
|
|
6745
6746
|
xof(t) {
|
|
6746
|
-
return
|
|
6747
|
+
return vr(t), this.xofInto(new Uint8Array(t));
|
|
6747
6748
|
}
|
|
6748
6749
|
digestInto(t) {
|
|
6749
|
-
if (
|
|
6750
|
+
if (Ei(t, this), this.finished) throw new Error("digest() was already called");
|
|
6750
6751
|
return this.writeInto(t), this.destroy(), t;
|
|
6751
6752
|
}
|
|
6752
6753
|
digest() {
|
|
6753
6754
|
return this.digestInto(new Uint8Array(this.outputLen));
|
|
6754
6755
|
}
|
|
6755
6756
|
destroy() {
|
|
6756
|
-
this.destroyed = true,
|
|
6757
|
+
this.destroyed = true, Cr(this.state);
|
|
6757
6758
|
}
|
|
6758
6759
|
_cloneInto(t) {
|
|
6759
|
-
const { blockLen: r, suffix: n, outputLen:
|
|
6760
|
-
return t ||= new
|
|
6760
|
+
const { blockLen: r, suffix: n, outputLen: i, rounds: o, enableXOF: c } = this;
|
|
6761
|
+
return t ||= new mr(r, n, i, c, o), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = o, t.suffix = n, t.outputLen = i, t.enableXOF = c, t.destroyed = this.destroyed, t;
|
|
6761
6762
|
}
|
|
6762
6763
|
}
|
|
6763
|
-
const
|
|
6764
|
-
var
|
|
6765
|
-
function
|
|
6766
|
-
var t, r, n,
|
|
6767
|
-
function
|
|
6768
|
-
var f,
|
|
6769
|
-
if (!(R instanceof
|
|
6764
|
+
const Oi = s((e, t, r, n = {}) => Ri(() => new mr(t, e, r), n), "genKeccak"), Li = Oi(6, 72, 64, Ti(10));
|
|
6765
|
+
var Pi = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, Bt = Math.ceil, ce = Math.floor, oe = "[BigNumber Error] ", Mr = oe + "Number primitive has more than 15 significant digits: ", me = 1e14, $ = 14, Ot = 9007199254740991, Lt = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], Ue = 1e7, te = 1e9;
|
|
6766
|
+
function xr(e) {
|
|
6767
|
+
var t, r, n, i = y.prototype = { constructor: y, toString: null, valueOf: null }, o = new y(1), c = 20, l = 4, h = -7, g = 21, m = -1e7, A = 1e7, b = false, O = 1, x = 0, M = { prefix: "", groupSize: 3, secondaryGroupSize: 0, groupSeparator: ",", decimalSeparator: ".", fractionGroupSize: 0, fractionGroupSeparator: "\xA0", suffix: "" }, w = "0123456789abcdefghijklmnopqrstuvwxyz", C = true;
|
|
6768
|
+
function y(a, u) {
|
|
6769
|
+
var f, _, p, I, T, d, E, S, R = this;
|
|
6770
|
+
if (!(R instanceof y)) return new y(a, u);
|
|
6770
6771
|
if (u == null) {
|
|
6771
6772
|
if (a && a._isBigNumber === true) {
|
|
6772
6773
|
R.s = a.s, !a.c || a.e > A ? R.c = R.e = null : a.e < m ? R.c = [R.e = 0] : (R.e = a.e, R.c = a.c.slice());
|
|
@@ -6780,18 +6781,18 @@ function Pr(e) {
|
|
|
6780
6781
|
}
|
|
6781
6782
|
S = String(a);
|
|
6782
6783
|
} else {
|
|
6783
|
-
if (!
|
|
6784
|
+
if (!Pi.test(S = String(a))) return n(R, S, d);
|
|
6784
6785
|
R.s = S.charCodeAt(0) == 45 ? (S = S.slice(1), -1) : 1;
|
|
6785
6786
|
}
|
|
6786
6787
|
(I = S.indexOf(".")) > -1 && (S = S.replace(".", "")), (T = S.search(/e/i)) > 0 ? (I < 0 && (I = T), I += +S.slice(T + 1), S = S.substring(0, T)) : I < 0 && (I = S.length);
|
|
6787
6788
|
} else {
|
|
6788
|
-
if (J(u, 2,
|
|
6789
|
+
if (J(u, 2, w.length, "Base"), u == 10 && C) return R = new y(a), G(R, c + R.e + 1, l);
|
|
6789
6790
|
if (S = String(a), d = typeof a == "number") {
|
|
6790
6791
|
if (a * 0 != 0) return n(R, S, d, u);
|
|
6791
|
-
if (R.s = 1 / a < 0 ? (S = S.slice(1), -1) : 1,
|
|
6792
|
+
if (R.s = 1 / a < 0 ? (S = S.slice(1), -1) : 1, y.DEBUG && S.replace(/^0\.0*|\./, "").length > 15) throw Error(Mr + a);
|
|
6792
6793
|
} else R.s = S.charCodeAt(0) === 45 ? (S = S.slice(1), -1) : 1;
|
|
6793
|
-
for (f =
|
|
6794
|
-
if (
|
|
6794
|
+
for (f = w.slice(0, u), I = T = 0, E = S.length; T < E; T++) if (f.indexOf(_ = S.charAt(T)) < 0) {
|
|
6795
|
+
if (_ == ".") {
|
|
6795
6796
|
if (T > I) {
|
|
6796
6797
|
I = E;
|
|
6797
6798
|
continue;
|
|
@@ -6807,7 +6808,7 @@ function Pr(e) {
|
|
|
6807
6808
|
for (T = 0; S.charCodeAt(T) === 48; T++) ;
|
|
6808
6809
|
for (E = S.length; S.charCodeAt(--E) === 48; ) ;
|
|
6809
6810
|
if (S = S.slice(T, ++E)) {
|
|
6810
|
-
if (E -= T, d &&
|
|
6811
|
+
if (E -= T, d && y.DEBUG && E > 15 && (a > Ot || a !== ce(a))) throw Error(Mr + R.s * a);
|
|
6811
6812
|
if ((I = I - T - 1) > A) R.c = R.e = null;
|
|
6812
6813
|
else if (I < m) R.c = [R.e = 0];
|
|
6813
6814
|
else {
|
|
@@ -6820,59 +6821,59 @@ function Pr(e) {
|
|
|
6820
6821
|
}
|
|
6821
6822
|
} else R.c = [R.e = 0];
|
|
6822
6823
|
}
|
|
6823
|
-
s(
|
|
6824
|
+
s(y, "BigNumber2"), y.clone = xr, y.ROUND_UP = 0, y.ROUND_DOWN = 1, y.ROUND_CEIL = 2, y.ROUND_FLOOR = 3, y.ROUND_HALF_UP = 4, y.ROUND_HALF_DOWN = 5, y.ROUND_HALF_EVEN = 6, y.ROUND_HALF_CEIL = 7, y.ROUND_HALF_FLOOR = 8, y.EUCLID = 9, y.config = y.set = function(a) {
|
|
6824
6825
|
var u, f;
|
|
6825
6826
|
if (a != null) if (typeof a == "object") {
|
|
6826
|
-
if (a.hasOwnProperty(u = "DECIMAL_PLACES") && (f = a[u], J(f, 0, te, u), c = f), a.hasOwnProperty(u = "ROUNDING_MODE") && (f = a[u], J(f, 0, 8, u), l = f), a.hasOwnProperty(u = "EXPONENTIAL_AT") && (f = a[u], f && f.pop ? (J(f[0], -te, 0, u), J(f[1], 0, te, u), h = f[0],
|
|
6827
|
+
if (a.hasOwnProperty(u = "DECIMAL_PLACES") && (f = a[u], J(f, 0, te, u), c = f), a.hasOwnProperty(u = "ROUNDING_MODE") && (f = a[u], J(f, 0, 8, u), l = f), a.hasOwnProperty(u = "EXPONENTIAL_AT") && (f = a[u], f && f.pop ? (J(f[0], -te, 0, u), J(f[1], 0, te, u), h = f[0], g = f[1]) : (J(f, -te, te, u), h = -(g = f < 0 ? -f : f))), a.hasOwnProperty(u = "RANGE")) if (f = a[u], f && f.pop) J(f[0], -te, -1, u), J(f[1], 1, te, u), m = f[0], A = f[1];
|
|
6827
6828
|
else if (J(f, -te, te, u), f) m = -(A = f < 0 ? -f : f);
|
|
6828
|
-
else throw Error(
|
|
6829
|
-
if (a.hasOwnProperty(u = "CRYPTO")) if (f = a[u], f === !!f) if (f) if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
|
|
6830
|
-
else throw
|
|
6831
|
-
else
|
|
6832
|
-
else throw Error(
|
|
6829
|
+
else throw Error(oe + u + " cannot be zero: " + f);
|
|
6830
|
+
if (a.hasOwnProperty(u = "CRYPTO")) if (f = a[u], f === !!f) if (f) if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes)) b = f;
|
|
6831
|
+
else throw b = !f, Error(oe + "crypto unavailable");
|
|
6832
|
+
else b = f;
|
|
6833
|
+
else throw Error(oe + u + " not true or false: " + f);
|
|
6833
6834
|
if (a.hasOwnProperty(u = "MODULO_MODE") && (f = a[u], J(f, 0, 9, u), O = f), a.hasOwnProperty(u = "POW_PRECISION") && (f = a[u], J(f, 0, te, u), x = f), a.hasOwnProperty(u = "FORMAT")) if (f = a[u], typeof f == "object") M = f;
|
|
6834
|
-
else throw Error(
|
|
6835
|
-
if (a.hasOwnProperty(u = "ALPHABET")) if (f = a[u], typeof f == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(f))
|
|
6836
|
-
else throw Error(
|
|
6837
|
-
} else throw Error(
|
|
6838
|
-
return { DECIMAL_PLACES: c, ROUNDING_MODE: l, EXPONENTIAL_AT: [h,
|
|
6839
|
-
},
|
|
6835
|
+
else throw Error(oe + u + " not an object: " + f);
|
|
6836
|
+
if (a.hasOwnProperty(u = "ALPHABET")) if (f = a[u], typeof f == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(f)) C = f.slice(0, 10) == "0123456789", w = f;
|
|
6837
|
+
else throw Error(oe + u + " invalid: " + f);
|
|
6838
|
+
} else throw Error(oe + "Object expected: " + a);
|
|
6839
|
+
return { DECIMAL_PLACES: c, ROUNDING_MODE: l, EXPONENTIAL_AT: [h, g], RANGE: [m, A], CRYPTO: b, MODULO_MODE: O, POW_PRECISION: x, FORMAT: M, ALPHABET: w };
|
|
6840
|
+
}, y.isBigNumber = function(a) {
|
|
6840
6841
|
if (!a || a._isBigNumber !== true) return false;
|
|
6841
|
-
if (!
|
|
6842
|
-
var u, f,
|
|
6843
|
-
e: if ({}.toString.call(
|
|
6842
|
+
if (!y.DEBUG) return true;
|
|
6843
|
+
var u, f, _ = a.c, p = a.e, I = a.s;
|
|
6844
|
+
e: if ({}.toString.call(_) == "[object Array]") {
|
|
6844
6845
|
if ((I === 1 || I === -1) && p >= -te && p <= te && p === ce(p)) {
|
|
6845
|
-
if (
|
|
6846
|
-
if (p === 0 &&
|
|
6846
|
+
if (_[0] === 0) {
|
|
6847
|
+
if (p === 0 && _.length === 1) return true;
|
|
6847
6848
|
break e;
|
|
6848
6849
|
}
|
|
6849
|
-
if (u = (p + 1) % $, u < 1 && (u += $), String(
|
|
6850
|
-
for (u = 0; u <
|
|
6850
|
+
if (u = (p + 1) % $, u < 1 && (u += $), String(_[0]).length == u) {
|
|
6851
|
+
for (u = 0; u < _.length; u++) if (f = _[u], f < 0 || f >= me || f !== ce(f)) break e;
|
|
6851
6852
|
if (f !== 0) return true;
|
|
6852
6853
|
}
|
|
6853
6854
|
}
|
|
6854
|
-
} else if (
|
|
6855
|
-
throw Error(
|
|
6856
|
-
},
|
|
6855
|
+
} else if (_ === null && p === null && (I === null || I === 1 || I === -1)) return true;
|
|
6856
|
+
throw Error(oe + "Invalid BigNumber: " + a);
|
|
6857
|
+
}, y.maximum = y.max = function() {
|
|
6857
6858
|
return L(arguments, -1);
|
|
6858
|
-
},
|
|
6859
|
+
}, y.minimum = y.min = function() {
|
|
6859
6860
|
return L(arguments, 1);
|
|
6860
|
-
},
|
|
6861
|
+
}, y.random = (function() {
|
|
6861
6862
|
var a = 9007199254740992, u = Math.random() * a & 2097151 ? function() {
|
|
6862
6863
|
return ce(Math.random() * a);
|
|
6863
6864
|
} : function() {
|
|
6864
6865
|
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
6865
6866
|
};
|
|
6866
6867
|
return function(f) {
|
|
6867
|
-
var
|
|
6868
|
-
if (f == null ? f = c : J(f, 0, te), T = Bt(f / $),
|
|
6869
|
-
for (
|
|
6868
|
+
var _, p, I, T, d, E = 0, S = [], R = new y(o);
|
|
6869
|
+
if (f == null ? f = c : J(f, 0, te), T = Bt(f / $), b) if (crypto.getRandomValues) {
|
|
6870
|
+
for (_ = crypto.getRandomValues(new Uint32Array(T *= 2)); E < T; ) d = _[E] * 131072 + (_[E + 1] >>> 11), d >= 9e15 ? (p = crypto.getRandomValues(new Uint32Array(2)), _[E] = p[0], _[E + 1] = p[1]) : (S.push(d % 1e14), E += 2);
|
|
6870
6871
|
E = T / 2;
|
|
6871
6872
|
} else if (crypto.randomBytes) {
|
|
6872
|
-
for (
|
|
6873
|
+
for (_ = crypto.randomBytes(T *= 7); E < T; ) d = (_[E] & 31) * 281474976710656 + _[E + 1] * 1099511627776 + _[E + 2] * 4294967296 + _[E + 3] * 16777216 + (_[E + 4] << 16) + (_[E + 5] << 8) + _[E + 6], d >= 9e15 ? crypto.randomBytes(7).copy(_, E) : (S.push(d % 1e14), E += 7);
|
|
6873
6874
|
E = T / 7;
|
|
6874
|
-
} else throw
|
|
6875
|
-
if (!
|
|
6875
|
+
} else throw b = false, Error(oe + "crypto unavailable");
|
|
6876
|
+
if (!b) for (; E < T; ) d = u(), d < 9e15 && (S[E++] = d % 1e14);
|
|
6876
6877
|
for (T = S[--E], f %= $, T && f && (d = Lt[$ - f], S[E] = ce(T / d) * d); S[E] === 0; S.pop(), E--) ;
|
|
6877
6878
|
if (E < 0) S = [I = 0];
|
|
6878
6879
|
else {
|
|
@@ -6882,67 +6883,67 @@ function Pr(e) {
|
|
|
6882
6883
|
}
|
|
6883
6884
|
return R.e = I, R.c = S, R;
|
|
6884
6885
|
};
|
|
6885
|
-
})(),
|
|
6886
|
-
for (var a = 1, u = arguments, f = new
|
|
6886
|
+
})(), y.sum = function() {
|
|
6887
|
+
for (var a = 1, u = arguments, f = new y(u[0]); a < u.length; ) f = f.plus(u[a++]);
|
|
6887
6888
|
return f;
|
|
6888
6889
|
}, r = (function() {
|
|
6889
6890
|
var a = "0123456789";
|
|
6890
|
-
function u(f,
|
|
6891
|
+
function u(f, _, p, I) {
|
|
6891
6892
|
for (var T, d = [0], E, S = 0, R = f.length; S < R; ) {
|
|
6892
|
-
for (E = d.length; E--; d[E] *=
|
|
6893
|
+
for (E = d.length; E--; d[E] *= _) ;
|
|
6893
6894
|
for (d[0] += I.indexOf(f.charAt(S++)), T = 0; T < d.length; T++) d[T] > p - 1 && (d[T + 1] == null && (d[T + 1] = 0), d[T + 1] += d[T] / p | 0, d[T] %= p);
|
|
6894
6895
|
}
|
|
6895
6896
|
return d.reverse();
|
|
6896
6897
|
}
|
|
6897
|
-
return s(u, "toBaseOut"), function(f,
|
|
6898
|
-
var d, E, S, R, v,
|
|
6899
|
-
for (j >= 0 && (R = x, x = 0, f = f.replace(".", ""), H = new
|
|
6900
|
-
if (!
|
|
6901
|
-
if (j < 0 ? --S : (
|
|
6898
|
+
return s(u, "toBaseOut"), function(f, _, p, I, T) {
|
|
6899
|
+
var d, E, S, R, v, N, P, H, j = f.indexOf("."), q = c, D = l;
|
|
6900
|
+
for (j >= 0 && (R = x, x = 0, f = f.replace(".", ""), H = new y(_), N = H.pow(f.length - j), x = R, H.c = u(ye(le(N.c), N.e, "0"), 10, p, a), H.e = H.c.length), P = u(f, _, p, T ? (d = w, a) : (d = a, w)), S = R = P.length; P[--R] == 0; P.pop()) ;
|
|
6901
|
+
if (!P[0]) return d.charAt(0);
|
|
6902
|
+
if (j < 0 ? --S : (N.c = P, N.e = S, N.s = I, N = t(N, H, q, D, p), P = N.c, v = N.r, S = N.e), E = S + q + 1, j = P[E], R = p / 2, v = v || E < 0 || P[E + 1] != null, v = D < 4 ? (j != null || v) && (D == 0 || D == (N.s < 0 ? 3 : 2)) : j > R || j == R && (D == 4 || v || D == 6 && P[E - 1] & 1 || D == (N.s < 0 ? 8 : 7)), E < 1 || !P[0]) f = v ? ye(d.charAt(1), -q, d.charAt(0)) : d.charAt(0);
|
|
6902
6903
|
else {
|
|
6903
|
-
if (
|
|
6904
|
-
for (R =
|
|
6905
|
-
for (j = 0, f = ""; j <= R; f += d.charAt(
|
|
6906
|
-
f =
|
|
6904
|
+
if (P.length = E, v) for (--p; ++P[--E] > p; ) P[E] = 0, E || (++S, P = [1].concat(P));
|
|
6905
|
+
for (R = P.length; !P[--R]; ) ;
|
|
6906
|
+
for (j = 0, f = ""; j <= R; f += d.charAt(P[j++])) ;
|
|
6907
|
+
f = ye(f, S, d.charAt(0));
|
|
6907
6908
|
}
|
|
6908
6909
|
return f;
|
|
6909
6910
|
};
|
|
6910
6911
|
})(), t = (function() {
|
|
6911
|
-
function a(
|
|
6912
|
-
var T, d, E, S, R = 0, v =
|
|
6913
|
-
for (
|
|
6914
|
-
return R && (
|
|
6912
|
+
function a(_, p, I) {
|
|
6913
|
+
var T, d, E, S, R = 0, v = _.length, N = p % Ue, P = p / Ue | 0;
|
|
6914
|
+
for (_ = _.slice(); v--; ) E = _[v] % Ue, S = _[v] / Ue | 0, T = P * E + S * N, d = N * E + T % Ue * Ue + R, R = (d / I | 0) + (T / Ue | 0) + P * S, _[v] = d % I;
|
|
6915
|
+
return R && (_ = [R].concat(_)), _;
|
|
6915
6916
|
}
|
|
6916
6917
|
s(a, "multiply");
|
|
6917
|
-
function u(
|
|
6918
|
+
function u(_, p, I, T) {
|
|
6918
6919
|
var d, E;
|
|
6919
6920
|
if (I != T) E = I > T ? 1 : -1;
|
|
6920
|
-
else for (d = E = 0; d < I; d++) if (
|
|
6921
|
-
E =
|
|
6921
|
+
else for (d = E = 0; d < I; d++) if (_[d] != p[d]) {
|
|
6922
|
+
E = _[d] > p[d] ? 1 : -1;
|
|
6922
6923
|
break;
|
|
6923
6924
|
}
|
|
6924
6925
|
return E;
|
|
6925
6926
|
}
|
|
6926
6927
|
s(u, "compare2");
|
|
6927
|
-
function f(
|
|
6928
|
-
for (var d = 0; I--; )
|
|
6929
|
-
for (; !
|
|
6930
|
-
}
|
|
6931
|
-
return s(f, "subtract"), function(
|
|
6932
|
-
var E, S, R, v,
|
|
6933
|
-
if (!ee || !ee[0] || !Q || !Q[0]) return new
|
|
6934
|
-
for (j = new
|
|
6928
|
+
function f(_, p, I, T) {
|
|
6929
|
+
for (var d = 0; I--; ) _[I] -= d, d = _[I] < p[I] ? 1 : 0, _[I] = d * T + _[I] - p[I];
|
|
6930
|
+
for (; !_[0] && _.length > 1; _.splice(0, 1)) ;
|
|
6931
|
+
}
|
|
6932
|
+
return s(f, "subtract"), function(_, p, I, T, d) {
|
|
6933
|
+
var E, S, R, v, N, P, H, j, q, D, F, z, de, ve, be, ne, pe, Z = _.s == p.s ? 1 : -1, ee = _.c, Q = p.c;
|
|
6934
|
+
if (!ee || !ee[0] || !Q || !Q[0]) return new y(!_.s || !p.s || (ee ? Q && ee[0] == Q[0] : !Q) ? NaN : ee && ee[0] == 0 || !Q ? Z * 0 : Z / 0);
|
|
6935
|
+
for (j = new y(Z), q = j.c = [], S = _.e - p.e, Z = I + S + 1, d || (d = me, S = ue(_.e / $) - ue(p.e / $), Z = Z / $ | 0), R = 0; Q[R] == (ee[R] || 0); R++) ;
|
|
6935
6936
|
if (Q[R] > (ee[R] || 0) && S--, Z < 0) q.push(1), v = true;
|
|
6936
6937
|
else {
|
|
6937
|
-
for (ve = ee.length, ne = Q.length, R = 0, Z += 2,
|
|
6938
|
-
pe = Q.slice(), pe = [0].concat(pe),
|
|
6938
|
+
for (ve = ee.length, ne = Q.length, R = 0, Z += 2, N = ce(d / (Q[0] + 1)), N > 1 && (Q = a(Q, N, d), ee = a(ee, N, d), ne = Q.length, ve = ee.length), de = ne, D = ee.slice(0, ne), F = D.length; F < ne; D[F++] = 0) ;
|
|
6939
|
+
pe = Q.slice(), pe = [0].concat(pe), be = Q[0], Q[1] >= d / 2 && be++;
|
|
6939
6940
|
do {
|
|
6940
|
-
if (
|
|
6941
|
-
if (z = D[0], ne != F && (z = z * d + (D[1] || 0)),
|
|
6942
|
-
else
|
|
6943
|
-
if (H < F && (
|
|
6944
|
-
} else E === 0 && (
|
|
6945
|
-
q[R++] =
|
|
6941
|
+
if (N = 0, E = u(Q, D, ne, F), E < 0) {
|
|
6942
|
+
if (z = D[0], ne != F && (z = z * d + (D[1] || 0)), N = ce(z / be), N > 1) for (N >= d && (N = d - 1), P = a(Q, N, d), H = P.length, F = D.length; u(P, D, H, F) == 1; ) N--, f(P, ne < H ? pe : Q, H, d), H = P.length, E = 1;
|
|
6943
|
+
else N == 0 && (E = N = 1), P = Q.slice(), H = P.length;
|
|
6944
|
+
if (H < F && (P = [0].concat(P)), f(D, P, F, d), F = D.length, E == -1) for (; u(Q, D, ne, F) < 1; ) N++, f(D, ne < F ? pe : Q, F, d), F = D.length;
|
|
6945
|
+
} else E === 0 && (N++, D = [0]);
|
|
6946
|
+
q[R++] = N, D[0] ? D[F++] = ee[de] || 0 : (D = [ee[de]], F = 1);
|
|
6946
6947
|
} while ((de++ < ve || D[0] != null) && Z--);
|
|
6947
6948
|
v = D[0] != null, q[0] || q.splice(0, 1);
|
|
6948
6949
|
}
|
|
@@ -6953,60 +6954,60 @@ function Pr(e) {
|
|
|
6953
6954
|
return j;
|
|
6954
6955
|
};
|
|
6955
6956
|
})();
|
|
6956
|
-
function B(a, u, f,
|
|
6957
|
+
function B(a, u, f, _) {
|
|
6957
6958
|
var p, I, T, d, E;
|
|
6958
6959
|
if (f == null ? f = l : J(f, 0, 8), !a.c) return a.toString();
|
|
6959
|
-
if (p = a.c[0], T = a.e, u == null) E = le(a.c), E =
|
|
6960
|
-
else if (a = G(new
|
|
6960
|
+
if (p = a.c[0], T = a.e, u == null) E = le(a.c), E = _ == 1 || _ == 2 && (T <= h || T >= g) ? ct(E, T) : ye(E, T, "0");
|
|
6961
|
+
else if (a = G(new y(a), u, f), I = a.e, E = le(a.c), d = E.length, _ == 1 || _ == 2 && (u <= I || I <= h)) {
|
|
6961
6962
|
for (; d < u; E += "0", d++) ;
|
|
6962
6963
|
E = ct(E, I);
|
|
6963
|
-
} else if (u -= T + (
|
|
6964
|
+
} else if (u -= T + (_ === 2 && I > T), E = ye(E, I, "0"), I + 1 > d) {
|
|
6964
6965
|
if (--u > 0) for (E += "."; u--; E += "0") ;
|
|
6965
6966
|
} else if (u += I - d, u > 0) for (I + 1 == d && (E += "."); u--; E += "0") ;
|
|
6966
6967
|
return a.s < 0 && p ? "-" + E : E;
|
|
6967
6968
|
}
|
|
6968
6969
|
s(B, "format");
|
|
6969
6970
|
function L(a, u) {
|
|
6970
|
-
for (var f,
|
|
6971
|
+
for (var f, _, p = 1, I = new y(a[0]); p < a.length; p++) _ = new y(a[p]), (!_.s || (f = Me(I, _)) === u || f === 0 && I.s === u) && (I = _);
|
|
6971
6972
|
return I;
|
|
6972
6973
|
}
|
|
6973
6974
|
s(L, "maxOrMin");
|
|
6974
6975
|
function U(a, u, f) {
|
|
6975
|
-
for (var
|
|
6976
|
-
for (p = u[0]; p >= 10; p /= 10,
|
|
6977
|
-
return (f =
|
|
6976
|
+
for (var _ = 1, p = u.length; !u[--p]; u.pop()) ;
|
|
6977
|
+
for (p = u[0]; p >= 10; p /= 10, _++) ;
|
|
6978
|
+
return (f = _ + f * $ - 1) > A ? a.c = a.e = null : f < m ? a.c = [a.e = 0] : (a.e = f, a.c = u), a;
|
|
6978
6979
|
}
|
|
6979
6980
|
s(U, "normalise"), n = /* @__PURE__ */ (function() {
|
|
6980
|
-
var a = /^(-?)0([xbo])(?=\w[\w.]*$)/i, u = /^([^.]+)\.$/, f = /^\.([^.]+)$/,
|
|
6981
|
+
var a = /^(-?)0([xbo])(?=\w[\w.]*$)/i, u = /^([^.]+)\.$/, f = /^\.([^.]+)$/, _ = /^-?(Infinity|NaN)$/, p = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
6981
6982
|
return function(I, T, d, E) {
|
|
6982
6983
|
var S, R = d ? T : T.replace(p, "");
|
|
6983
|
-
if (
|
|
6984
|
+
if (_.test(R)) I.s = isNaN(R) ? null : R < 0 ? -1 : 1;
|
|
6984
6985
|
else {
|
|
6985
|
-
if (!d && (R = R.replace(a, function(v,
|
|
6986
|
-
return S = (
|
|
6987
|
-
}), E && (S = E, R = R.replace(u, "$1").replace(f, "0.$1")), T != R)) return new
|
|
6988
|
-
if (
|
|
6986
|
+
if (!d && (R = R.replace(a, function(v, N, P) {
|
|
6987
|
+
return S = (P = P.toLowerCase()) == "x" ? 16 : P == "b" ? 2 : 8, !E || E == S ? N : v;
|
|
6988
|
+
}), E && (S = E, R = R.replace(u, "$1").replace(f, "0.$1")), T != R)) return new y(R, S);
|
|
6989
|
+
if (y.DEBUG) throw Error(oe + "Not a" + (E ? " base " + E : "") + " number: " + T);
|
|
6989
6990
|
I.s = null;
|
|
6990
6991
|
}
|
|
6991
6992
|
I.c = I.e = null;
|
|
6992
6993
|
};
|
|
6993
6994
|
})();
|
|
6994
|
-
function G(a, u, f,
|
|
6995
|
-
var p, I, T, d, E, S, R, v = a.c,
|
|
6995
|
+
function G(a, u, f, _) {
|
|
6996
|
+
var p, I, T, d, E, S, R, v = a.c, N = Lt;
|
|
6996
6997
|
if (v) {
|
|
6997
6998
|
e: {
|
|
6998
6999
|
for (p = 1, d = v[0]; d >= 10; d /= 10, p++) ;
|
|
6999
|
-
if (I = u - p, I < 0) I += $, T = u, E = v[S = 0], R = ce(E /
|
|
7000
|
-
else if (S = Bt((I + 1) / $), S >= v.length) if (
|
|
7000
|
+
if (I = u - p, I < 0) I += $, T = u, E = v[S = 0], R = ce(E / N[p - T - 1] % 10);
|
|
7001
|
+
else if (S = Bt((I + 1) / $), S >= v.length) if (_) {
|
|
7001
7002
|
for (; v.length <= S; v.push(0)) ;
|
|
7002
7003
|
E = R = 0, p = 1, I %= $, T = I - $ + 1;
|
|
7003
7004
|
} else break e;
|
|
7004
7005
|
else {
|
|
7005
7006
|
for (E = d = v[S], p = 1; d >= 10; d /= 10, p++) ;
|
|
7006
|
-
I %= $, T = I - $ + p, R = T < 0 ? 0 : ce(E /
|
|
7007
|
+
I %= $, T = I - $ + p, R = T < 0 ? 0 : ce(E / N[p - T - 1] % 10);
|
|
7007
7008
|
}
|
|
7008
|
-
if (
|
|
7009
|
-
if (I == 0 ? (v.length = S, d = 1, S--) : (v.length = S + 1, d =
|
|
7009
|
+
if (_ = _ || u < 0 || v[S + 1] != null || (T < 0 ? E : E % N[p - T - 1]), _ = f < 4 ? (R || _) && (f == 0 || f == (a.s < 0 ? 3 : 2)) : R > 5 || R == 5 && (f == 4 || _ || f == 6 && (I > 0 ? T > 0 ? E / N[p - T] : 0 : v[S - 1]) % 10 & 1 || f == (a.s < 0 ? 8 : 7)), u < 1 || !v[0]) return v.length = 0, _ ? (u -= a.e + 1, v[0] = N[($ - u % $) % $], a.e = -u || 0) : v[0] = a.e = 0, a;
|
|
7010
|
+
if (I == 0 ? (v.length = S, d = 1, S--) : (v.length = S + 1, d = N[$ - I], v[S] = T > 0 ? ce(E / N[p - T] % N[T]) * d : 0), _) for (; ; ) if (S == 0) {
|
|
7010
7011
|
for (I = 1, T = v[0]; T >= 10; T /= 10, I++) ;
|
|
7011
7012
|
for (T = v[0] += d, d = 1; T >= 10; T /= 10, d++) ;
|
|
7012
7013
|
I != d && (a.e++, v[0] == me && (v[0] = 1));
|
|
@@ -7024,38 +7025,38 @@ function Pr(e) {
|
|
|
7024
7025
|
s(G, "round");
|
|
7025
7026
|
function k(a) {
|
|
7026
7027
|
var u, f = a.e;
|
|
7027
|
-
return f === null ? a.toString() : (u = le(a.c), u = f <= h || f >=
|
|
7028
|
+
return f === null ? a.toString() : (u = le(a.c), u = f <= h || f >= g ? ct(u, f) : ye(u, f, "0"), a.s < 0 ? "-" + u : u);
|
|
7028
7029
|
}
|
|
7029
|
-
return s(k, "valueOf"),
|
|
7030
|
-
var a = new
|
|
7030
|
+
return s(k, "valueOf"), i.absoluteValue = i.abs = function() {
|
|
7031
|
+
var a = new y(this);
|
|
7031
7032
|
return a.s < 0 && (a.s = 1), a;
|
|
7032
|
-
},
|
|
7033
|
-
return Me(this, new
|
|
7034
|
-
},
|
|
7035
|
-
var f,
|
|
7036
|
-
if (a != null) return J(a, 0, te), u == null ? u = l : J(u, 0, 8), G(new
|
|
7033
|
+
}, i.comparedTo = function(a, u) {
|
|
7034
|
+
return Me(this, new y(a, u));
|
|
7035
|
+
}, i.decimalPlaces = i.dp = function(a, u) {
|
|
7036
|
+
var f, _, p, I = this;
|
|
7037
|
+
if (a != null) return J(a, 0, te), u == null ? u = l : J(u, 0, 8), G(new y(I), a + I.e + 1, u);
|
|
7037
7038
|
if (!(f = I.c)) return null;
|
|
7038
|
-
if (
|
|
7039
|
-
return
|
|
7040
|
-
},
|
|
7041
|
-
return t(this, new
|
|
7042
|
-
},
|
|
7043
|
-
return t(this, new
|
|
7044
|
-
},
|
|
7045
|
-
var f,
|
|
7046
|
-
if (a = new
|
|
7047
|
-
if (u != null && (u = new
|
|
7039
|
+
if (_ = ((p = f.length - 1) - ue(this.e / $)) * $, p = f[p]) for (; p % 10 == 0; p /= 10, _--) ;
|
|
7040
|
+
return _ < 0 && (_ = 0), _;
|
|
7041
|
+
}, i.dividedBy = i.div = function(a, u) {
|
|
7042
|
+
return t(this, new y(a, u), c, l);
|
|
7043
|
+
}, i.dividedToIntegerBy = i.idiv = function(a, u) {
|
|
7044
|
+
return t(this, new y(a, u), 0, 1);
|
|
7045
|
+
}, i.exponentiatedBy = i.pow = function(a, u) {
|
|
7046
|
+
var f, _, p, I, T, d, E, S, R, v = this;
|
|
7047
|
+
if (a = new y(a), a.c && !a.isInteger()) throw Error(oe + "Exponent not an integer: " + k(a));
|
|
7048
|
+
if (u != null && (u = new y(u)), d = a.e > 14, !v.c || !v.c[0] || v.c[0] == 1 && !v.e && v.c.length == 1 || !a.c || !a.c[0]) return R = new y(Math.pow(+k(v), d ? a.s * (2 - at(a)) : +k(a))), u ? R.mod(u) : R;
|
|
7048
7049
|
if (E = a.s < 0, u) {
|
|
7049
|
-
if (u.c ? !u.c[0] : !u.s) return new
|
|
7050
|
-
|
|
7050
|
+
if (u.c ? !u.c[0] : !u.s) return new y(NaN);
|
|
7051
|
+
_ = !E && v.isInteger() && u.isInteger(), _ && (v = v.mod(u));
|
|
7051
7052
|
} else {
|
|
7052
|
-
if (a.e > 9 && (v.e > 0 || v.e < -1 || (v.e == 0 ? v.c[0] > 1 || d && v.c[1] >= 24e7 : v.c[0] < 8e13 || d && v.c[0] <= 9999975e7))) return I = v.s < 0 && at(a) ? -0 : 0, v.e > -1 && (I = 1 / I), new
|
|
7053
|
+
if (a.e > 9 && (v.e > 0 || v.e < -1 || (v.e == 0 ? v.c[0] > 1 || d && v.c[1] >= 24e7 : v.c[0] < 8e13 || d && v.c[0] <= 9999975e7))) return I = v.s < 0 && at(a) ? -0 : 0, v.e > -1 && (I = 1 / I), new y(E ? 1 / I : I);
|
|
7053
7054
|
x && (I = Bt(x / $ + 2));
|
|
7054
7055
|
}
|
|
7055
|
-
for (d ? (f = new
|
|
7056
|
+
for (d ? (f = new y(0.5), E && (a.s = 1), S = at(a)) : (p = Math.abs(+k(a)), S = p % 2), R = new y(o); ; ) {
|
|
7056
7057
|
if (S) {
|
|
7057
7058
|
if (R = R.times(v), !R.c) break;
|
|
7058
|
-
I ? R.c.length > I && (R.c.length = I) :
|
|
7059
|
+
I ? R.c.length > I && (R.c.length = I) : _ && (R = R.mod(u));
|
|
7059
7060
|
}
|
|
7060
7061
|
if (p) {
|
|
7061
7062
|
if (p = ce(p / 2), p === 0) break;
|
|
@@ -7065,83 +7066,83 @@ function Pr(e) {
|
|
|
7065
7066
|
if (p = +k(a), p === 0) break;
|
|
7066
7067
|
S = p % 2;
|
|
7067
7068
|
}
|
|
7068
|
-
v = v.times(v), I ? v.c && v.c.length > I && (v.c.length = I) :
|
|
7069
|
+
v = v.times(v), I ? v.c && v.c.length > I && (v.c.length = I) : _ && (v = v.mod(u));
|
|
7069
7070
|
}
|
|
7070
|
-
return
|
|
7071
|
-
},
|
|
7072
|
-
var u = new
|
|
7071
|
+
return _ ? R : (E && (R = o.div(R)), u ? R.mod(u) : I ? G(R, x, l, T) : R);
|
|
7072
|
+
}, i.integerValue = function(a) {
|
|
7073
|
+
var u = new y(this);
|
|
7073
7074
|
return a == null ? a = l : J(a, 0, 8), G(u, u.e + 1, a);
|
|
7074
|
-
},
|
|
7075
|
-
return Me(this, new
|
|
7076
|
-
},
|
|
7075
|
+
}, i.isEqualTo = i.eq = function(a, u) {
|
|
7076
|
+
return Me(this, new y(a, u)) === 0;
|
|
7077
|
+
}, i.isFinite = function() {
|
|
7077
7078
|
return !!this.c;
|
|
7078
|
-
},
|
|
7079
|
-
return Me(this, new
|
|
7080
|
-
},
|
|
7081
|
-
return (u = Me(this, new
|
|
7082
|
-
},
|
|
7079
|
+
}, i.isGreaterThan = i.gt = function(a, u) {
|
|
7080
|
+
return Me(this, new y(a, u)) > 0;
|
|
7081
|
+
}, i.isGreaterThanOrEqualTo = i.gte = function(a, u) {
|
|
7082
|
+
return (u = Me(this, new y(a, u))) === 1 || u === 0;
|
|
7083
|
+
}, i.isInteger = function() {
|
|
7083
7084
|
return !!this.c && ue(this.e / $) > this.c.length - 2;
|
|
7084
|
-
},
|
|
7085
|
-
return Me(this, new
|
|
7086
|
-
},
|
|
7087
|
-
return (u = Me(this, new
|
|
7088
|
-
},
|
|
7085
|
+
}, i.isLessThan = i.lt = function(a, u) {
|
|
7086
|
+
return Me(this, new y(a, u)) < 0;
|
|
7087
|
+
}, i.isLessThanOrEqualTo = i.lte = function(a, u) {
|
|
7088
|
+
return (u = Me(this, new y(a, u))) === -1 || u === 0;
|
|
7089
|
+
}, i.isNaN = function() {
|
|
7089
7090
|
return !this.s;
|
|
7090
|
-
},
|
|
7091
|
+
}, i.isNegative = function() {
|
|
7091
7092
|
return this.s < 0;
|
|
7092
|
-
},
|
|
7093
|
+
}, i.isPositive = function() {
|
|
7093
7094
|
return this.s > 0;
|
|
7094
|
-
},
|
|
7095
|
+
}, i.isZero = function() {
|
|
7095
7096
|
return !!this.c && this.c[0] == 0;
|
|
7096
|
-
},
|
|
7097
|
-
var f,
|
|
7098
|
-
if (a = new
|
|
7097
|
+
}, i.minus = function(a, u) {
|
|
7098
|
+
var f, _, p, I, T = this, d = T.s;
|
|
7099
|
+
if (a = new y(a, u), u = a.s, !d || !u) return new y(NaN);
|
|
7099
7100
|
if (d != u) return a.s = -u, T.plus(a);
|
|
7100
7101
|
var E = T.e / $, S = a.e / $, R = T.c, v = a.c;
|
|
7101
7102
|
if (!E || !S) {
|
|
7102
|
-
if (!R || !v) return R ? (a.s = -u, a) : new
|
|
7103
|
-
if (!R[0] || !v[0]) return v[0] ? (a.s = -u, a) : new
|
|
7103
|
+
if (!R || !v) return R ? (a.s = -u, a) : new y(v ? T : NaN);
|
|
7104
|
+
if (!R[0] || !v[0]) return v[0] ? (a.s = -u, a) : new y(R[0] ? T : l == 3 ? -0 : 0);
|
|
7104
7105
|
}
|
|
7105
7106
|
if (E = ue(E), S = ue(S), R = R.slice(), d = E - S) {
|
|
7106
7107
|
for ((I = d < 0) ? (d = -d, p = R) : (S = E, p = v), p.reverse(), u = d; u--; p.push(0)) ;
|
|
7107
7108
|
p.reverse();
|
|
7108
|
-
} else for (
|
|
7109
|
+
} else for (_ = (I = (d = R.length) < (u = v.length)) ? d : u, d = u = 0; u < _; u++) if (R[u] != v[u]) {
|
|
7109
7110
|
I = R[u] < v[u];
|
|
7110
7111
|
break;
|
|
7111
7112
|
}
|
|
7112
|
-
if (I && (p = R, R = v, v = p, a.s = -a.s), u = (
|
|
7113
|
-
for (u = me - 1;
|
|
7114
|
-
if (R[--
|
|
7115
|
-
for (f =
|
|
7116
|
-
--R[f], R[
|
|
7113
|
+
if (I && (p = R, R = v, v = p, a.s = -a.s), u = (_ = v.length) - (f = R.length), u > 0) for (; u--; R[f++] = 0) ;
|
|
7114
|
+
for (u = me - 1; _ > d; ) {
|
|
7115
|
+
if (R[--_] < v[_]) {
|
|
7116
|
+
for (f = _; f && !R[--f]; R[f] = u) ;
|
|
7117
|
+
--R[f], R[_] += me;
|
|
7117
7118
|
}
|
|
7118
|
-
R[
|
|
7119
|
+
R[_] -= v[_];
|
|
7119
7120
|
}
|
|
7120
7121
|
for (; R[0] == 0; R.splice(0, 1), --S) ;
|
|
7121
7122
|
return R[0] ? U(a, R, S) : (a.s = l == 3 ? -1 : 1, a.c = [a.e = 0], a);
|
|
7122
|
-
},
|
|
7123
|
-
var f,
|
|
7124
|
-
return a = new
|
|
7125
|
-
},
|
|
7126
|
-
var f,
|
|
7123
|
+
}, i.modulo = i.mod = function(a, u) {
|
|
7124
|
+
var f, _, p = this;
|
|
7125
|
+
return a = new y(a, u), !p.c || !a.s || a.c && !a.c[0] ? new y(NaN) : !a.c || p.c && !p.c[0] ? new y(p) : (O == 9 ? (_ = a.s, a.s = 1, f = t(p, a, 0, 3), a.s = _, f.s *= _) : f = t(p, a, 0, O), a = p.minus(f.times(a)), !a.c[0] && O == 1 && (a.s = p.s), a);
|
|
7126
|
+
}, i.multipliedBy = i.times = function(a, u) {
|
|
7127
|
+
var f, _, p, I, T, d, E, S, R, v, N, P, H, j, q, D = this, F = D.c, z = (a = new y(a, u)).c;
|
|
7127
7128
|
if (!F || !z || !F[0] || !z[0]) return !D.s || !a.s || F && !F[0] && !z || z && !z[0] && !F ? a.c = a.e = a.s = null : (a.s *= D.s, !F || !z ? a.c = a.e = null : (a.c = [0], a.e = 0)), a;
|
|
7128
|
-
for (
|
|
7129
|
+
for (_ = ue(D.e / $) + ue(a.e / $), a.s *= D.s, E = F.length, v = z.length, E < v && (H = F, F = z, z = H, p = E, E = v, v = p), p = E + v, H = []; p--; H.push(0)) ;
|
|
7129
7130
|
for (j = me, q = Ue, p = v; --p >= 0; ) {
|
|
7130
|
-
for (f = 0,
|
|
7131
|
+
for (f = 0, N = z[p] % q, P = z[p] / q | 0, T = E, I = p + T; I > p; ) S = F[--T] % q, R = F[T] / q | 0, d = P * S + R * N, S = N * S + d % q * q + H[I] + f, f = (S / j | 0) + (d / q | 0) + P * R, H[I--] = S % j;
|
|
7131
7132
|
H[I] = f;
|
|
7132
7133
|
}
|
|
7133
|
-
return f ? ++
|
|
7134
|
-
},
|
|
7135
|
-
var a = new
|
|
7134
|
+
return f ? ++_ : H.splice(0, 1), U(a, H, _);
|
|
7135
|
+
}, i.negated = function() {
|
|
7136
|
+
var a = new y(this);
|
|
7136
7137
|
return a.s = -a.s || null, a;
|
|
7137
|
-
},
|
|
7138
|
-
var f,
|
|
7139
|
-
if (a = new
|
|
7140
|
-
if (p != u) return a.s = -u,
|
|
7141
|
-
var I =
|
|
7138
|
+
}, i.plus = function(a, u) {
|
|
7139
|
+
var f, _ = this, p = _.s;
|
|
7140
|
+
if (a = new y(a, u), u = a.s, !p || !u) return new y(NaN);
|
|
7141
|
+
if (p != u) return a.s = -u, _.minus(a);
|
|
7142
|
+
var I = _.e / $, T = a.e / $, d = _.c, E = a.c;
|
|
7142
7143
|
if (!I || !T) {
|
|
7143
|
-
if (!d || !E) return new
|
|
7144
|
-
if (!d[0] || !E[0]) return E[0] ? a : new
|
|
7144
|
+
if (!d || !E) return new y(p / 0);
|
|
7145
|
+
if (!d[0] || !E[0]) return E[0] ? a : new y(d[0] ? _ : p * 0);
|
|
7145
7146
|
}
|
|
7146
7147
|
if (I = ue(I), T = ue(T), d = d.slice(), p = I - T) {
|
|
7147
7148
|
for (p > 0 ? (T = I, f = E) : (p = -p, f = d), f.reverse(); p--; f.push(0)) ;
|
|
@@ -7149,95 +7150,95 @@ function Pr(e) {
|
|
|
7149
7150
|
}
|
|
7150
7151
|
for (p = d.length, u = E.length, p - u < 0 && (f = E, E = d, d = f, u = p), p = 0; u; ) p = (d[--u] = d[u] + E[u] + p) / me | 0, d[u] = me === d[u] ? 0 : d[u] % me;
|
|
7151
7152
|
return p && (d = [p].concat(d), ++T), U(a, d, T);
|
|
7152
|
-
},
|
|
7153
|
-
var f,
|
|
7154
|
-
if (a != null && a !== !!a) return J(a, 1, te), u == null ? u = l : J(u, 0, 8), G(new
|
|
7153
|
+
}, i.precision = i.sd = function(a, u) {
|
|
7154
|
+
var f, _, p, I = this;
|
|
7155
|
+
if (a != null && a !== !!a) return J(a, 1, te), u == null ? u = l : J(u, 0, 8), G(new y(I), a, u);
|
|
7155
7156
|
if (!(f = I.c)) return null;
|
|
7156
|
-
if (p = f.length - 1,
|
|
7157
|
-
for (; p % 10 == 0; p /= 10,
|
|
7158
|
-
for (p = f[0]; p >= 10; p /= 10,
|
|
7157
|
+
if (p = f.length - 1, _ = p * $ + 1, p = f[p]) {
|
|
7158
|
+
for (; p % 10 == 0; p /= 10, _--) ;
|
|
7159
|
+
for (p = f[0]; p >= 10; p /= 10, _++) ;
|
|
7159
7160
|
}
|
|
7160
|
-
return a && I.e + 1 >
|
|
7161
|
-
},
|
|
7161
|
+
return a && I.e + 1 > _ && (_ = I.e + 1), _;
|
|
7162
|
+
}, i.shiftedBy = function(a) {
|
|
7162
7163
|
return J(a, -Ot, Ot), this.times("1e" + a);
|
|
7163
|
-
},
|
|
7164
|
-
var a, u, f,
|
|
7165
|
-
if (d !== 1 || !T || !T[0]) return new
|
|
7166
|
-
if (d = Math.sqrt(+k(I)), d == 0 || d == 1 / 0 ? (u = le(T), (u.length + E) % 2 == 0 && (u += "0"), d = Math.sqrt(+u), E = ue((E + 1) / 2) - (E < 0 || E % 2), d == 1 / 0 ? u = "5e" + E : (u = d.toExponential(), u = u.slice(0, u.indexOf("e") + 1) + E), f = new
|
|
7167
|
-
for (E = f.e, d = E + S, d < 3 && (d = 0); ; ) if (p = f, f = R.times(p.plus(t(I, p, S, 1))), le(p.c).slice(0, d) === (u = le(f.c)).slice(0, d)) if (f.e < E && --d, u = u.slice(d - 3, d + 1), u == "9999" || !
|
|
7168
|
-
if (!
|
|
7164
|
+
}, i.squareRoot = i.sqrt = function() {
|
|
7165
|
+
var a, u, f, _, p, I = this, T = I.c, d = I.s, E = I.e, S = c + 4, R = new y("0.5");
|
|
7166
|
+
if (d !== 1 || !T || !T[0]) return new y(!d || d < 0 && (!T || T[0]) ? NaN : T ? I : 1 / 0);
|
|
7167
|
+
if (d = Math.sqrt(+k(I)), d == 0 || d == 1 / 0 ? (u = le(T), (u.length + E) % 2 == 0 && (u += "0"), d = Math.sqrt(+u), E = ue((E + 1) / 2) - (E < 0 || E % 2), d == 1 / 0 ? u = "5e" + E : (u = d.toExponential(), u = u.slice(0, u.indexOf("e") + 1) + E), f = new y(u)) : f = new y(d + ""), f.c[0]) {
|
|
7168
|
+
for (E = f.e, d = E + S, d < 3 && (d = 0); ; ) if (p = f, f = R.times(p.plus(t(I, p, S, 1))), le(p.c).slice(0, d) === (u = le(f.c)).slice(0, d)) if (f.e < E && --d, u = u.slice(d - 3, d + 1), u == "9999" || !_ && u == "4999") {
|
|
7169
|
+
if (!_ && (G(p, p.e + c + 2, 0), p.times(p).eq(I))) {
|
|
7169
7170
|
f = p;
|
|
7170
7171
|
break;
|
|
7171
7172
|
}
|
|
7172
|
-
S += 4, d += 4,
|
|
7173
|
+
S += 4, d += 4, _ = 1;
|
|
7173
7174
|
} else {
|
|
7174
7175
|
(!+u || !+u.slice(1) && u.charAt(0) == "5") && (G(f, f.e + c + 2, 1), a = !f.times(f).eq(I));
|
|
7175
7176
|
break;
|
|
7176
7177
|
}
|
|
7177
7178
|
}
|
|
7178
7179
|
return G(f, f.e + c + 1, l, a);
|
|
7179
|
-
},
|
|
7180
|
+
}, i.toExponential = function(a, u) {
|
|
7180
7181
|
return a != null && (J(a, 0, te), a++), B(this, a, u, 1);
|
|
7181
|
-
},
|
|
7182
|
+
}, i.toFixed = function(a, u) {
|
|
7182
7183
|
return a != null && (J(a, 0, te), a = a + this.e + 1), B(this, a, u);
|
|
7183
|
-
},
|
|
7184
|
-
var
|
|
7184
|
+
}, i.toFormat = function(a, u, f) {
|
|
7185
|
+
var _, p = this;
|
|
7185
7186
|
if (f == null) a != null && u && typeof u == "object" ? (f = u, u = null) : a && typeof a == "object" ? (f = a, a = u = null) : f = M;
|
|
7186
|
-
else if (typeof f != "object") throw Error(
|
|
7187
|
-
if (
|
|
7188
|
-
var I, T =
|
|
7187
|
+
else if (typeof f != "object") throw Error(oe + "Argument not an object: " + f);
|
|
7188
|
+
if (_ = p.toFixed(a, u), p.c) {
|
|
7189
|
+
var I, T = _.split("."), d = +f.groupSize, E = +f.secondaryGroupSize, S = f.groupSeparator || "", R = T[0], v = T[1], N = p.s < 0, P = N ? R.slice(1) : R, H = P.length;
|
|
7189
7190
|
if (E && (I = d, d = E, E = I, H -= I), d > 0 && H > 0) {
|
|
7190
|
-
for (I = H % d || d, R =
|
|
7191
|
-
E > 0 && (R += S +
|
|
7191
|
+
for (I = H % d || d, R = P.substr(0, I); I < H; I += d) R += S + P.substr(I, d);
|
|
7192
|
+
E > 0 && (R += S + P.slice(I)), N && (R = "-" + R);
|
|
7192
7193
|
}
|
|
7193
|
-
|
|
7194
|
-
}
|
|
7195
|
-
return (f.prefix || "") +
|
|
7196
|
-
},
|
|
7197
|
-
var u, f,
|
|
7198
|
-
if (a != null && (d = new
|
|
7199
|
-
if (!H) return new
|
|
7200
|
-
for (u = new
|
|
7201
|
-
return p = t(a.minus(f),
|
|
7202
|
-
},
|
|
7194
|
+
_ = v ? R + (f.decimalSeparator || "") + ((E = +f.fractionGroupSize) ? v.replace(new RegExp("\\d{" + E + "}\\B", "g"), "$&" + (f.fractionGroupSeparator || "")) : v) : R;
|
|
7195
|
+
}
|
|
7196
|
+
return (f.prefix || "") + _ + (f.suffix || "");
|
|
7197
|
+
}, i.toFraction = function(a) {
|
|
7198
|
+
var u, f, _, p, I, T, d, E, S, R, v, N, P = this, H = P.c;
|
|
7199
|
+
if (a != null && (d = new y(a), !d.isInteger() && (d.c || d.s !== 1) || d.lt(o))) throw Error(oe + "Argument " + (d.isInteger() ? "out of range: " : "not an integer: ") + k(d));
|
|
7200
|
+
if (!H) return new y(P);
|
|
7201
|
+
for (u = new y(o), S = f = new y(o), _ = E = new y(o), N = le(H), I = u.e = N.length - P.e - 1, u.c[0] = Lt[(T = I % $) < 0 ? $ + T : T], a = !a || d.comparedTo(u) > 0 ? I > 0 ? u : S : d, T = A, A = 1 / 0, d = new y(N), E.c[0] = 0; R = t(d, u, 0, 1), p = f.plus(R.times(_)), p.comparedTo(a) != 1; ) f = _, _ = p, S = E.plus(R.times(p = S)), E = p, u = d.minus(R.times(p = u)), d = p;
|
|
7202
|
+
return p = t(a.minus(f), _, 0, 1), E = E.plus(p.times(S)), f = f.plus(p.times(_)), E.s = S.s = P.s, I = I * 2, v = t(S, _, I, l).minus(P).abs().comparedTo(t(E, f, I, l).minus(P).abs()) < 1 ? [S, _] : [E, f], A = T, v;
|
|
7203
|
+
}, i.toNumber = function() {
|
|
7203
7204
|
return +k(this);
|
|
7204
|
-
},
|
|
7205
|
+
}, i.toPrecision = function(a, u) {
|
|
7205
7206
|
return a != null && J(a, 1, te), B(this, a, u, 2);
|
|
7206
|
-
},
|
|
7207
|
-
var u, f = this,
|
|
7208
|
-
return p === null ?
|
|
7209
|
-
},
|
|
7207
|
+
}, i.toString = function(a) {
|
|
7208
|
+
var u, f = this, _ = f.s, p = f.e;
|
|
7209
|
+
return p === null ? _ ? (u = "Infinity", _ < 0 && (u = "-" + u)) : u = "NaN" : (a == null ? u = p <= h || p >= g ? ct(le(f.c), p) : ye(le(f.c), p, "0") : a === 10 && C ? (f = G(new y(f), c + p + 1, l), u = ye(le(f.c), f.e, "0")) : (J(a, 2, w.length, "Base"), u = r(ye(le(f.c), p, "0"), 10, a, _, true)), _ < 0 && f.c[0] && (u = "-" + u)), u;
|
|
7210
|
+
}, i.valueOf = i.toJSON = function() {
|
|
7210
7211
|
return k(this);
|
|
7211
|
-
},
|
|
7212
|
+
}, i._isBigNumber = true, i[Symbol.toStringTag] = "BigNumber", i[Symbol.for("nodejs.util.inspect.custom")] = i.valueOf, e != null && y.set(e), y;
|
|
7212
7213
|
}
|
|
7213
|
-
s(
|
|
7214
|
+
s(xr, "clone");
|
|
7214
7215
|
function ue(e) {
|
|
7215
7216
|
var t = e | 0;
|
|
7216
7217
|
return e > 0 || e === t ? t : t - 1;
|
|
7217
7218
|
}
|
|
7218
7219
|
s(ue, "bitFloor");
|
|
7219
7220
|
function le(e) {
|
|
7220
|
-
for (var t, r, n = 1,
|
|
7221
|
+
for (var t, r, n = 1, i = e.length, o = e[0] + ""; n < i; ) {
|
|
7221
7222
|
for (t = e[n++] + "", r = $ - t.length; r--; t = "0" + t) ;
|
|
7222
|
-
|
|
7223
|
+
o += t;
|
|
7223
7224
|
}
|
|
7224
|
-
for (
|
|
7225
|
-
return
|
|
7225
|
+
for (i = o.length; o.charCodeAt(--i) === 48; ) ;
|
|
7226
|
+
return o.slice(0, i + 1 || 1);
|
|
7226
7227
|
}
|
|
7227
7228
|
s(le, "coeffToString");
|
|
7228
7229
|
function Me(e, t) {
|
|
7229
|
-
var r, n,
|
|
7230
|
+
var r, n, i = e.c, o = t.c, c = e.s, l = t.s, h = e.e, g = t.e;
|
|
7230
7231
|
if (!c || !l) return null;
|
|
7231
|
-
if (r =
|
|
7232
|
+
if (r = i && !i[0], n = o && !o[0], r || n) return r ? n ? 0 : -l : c;
|
|
7232
7233
|
if (c != l) return c;
|
|
7233
|
-
if (r = c < 0, n = h ==
|
|
7234
|
-
if (!n) return h >
|
|
7235
|
-
for (l = (h =
|
|
7236
|
-
return h ==
|
|
7234
|
+
if (r = c < 0, n = h == g, !i || !o) return n ? 0 : !i ^ r ? 1 : -1;
|
|
7235
|
+
if (!n) return h > g ^ r ? 1 : -1;
|
|
7236
|
+
for (l = (h = i.length) < (g = o.length) ? h : g, c = 0; c < l; c++) if (i[c] != o[c]) return i[c] > o[c] ^ r ? 1 : -1;
|
|
7237
|
+
return h == g ? 0 : h > g ^ r ? 1 : -1;
|
|
7237
7238
|
}
|
|
7238
7239
|
s(Me, "compare");
|
|
7239
7240
|
function J(e, t, r, n) {
|
|
7240
|
-
if (e < t || e > r || e !== ce(e)) throw Error(
|
|
7241
|
+
if (e < t || e > r || e !== ce(e)) throw Error(oe + (n || "Argument") + (typeof e == "number" ? e < t || e > r ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e));
|
|
7241
7242
|
}
|
|
7242
7243
|
s(J, "intCheck");
|
|
7243
7244
|
function at(e) {
|
|
@@ -7249,61 +7250,61 @@ function ct(e, t) {
|
|
|
7249
7250
|
return (e.length > 1 ? e.charAt(0) + "." + e.slice(1) : e) + (t < 0 ? "e" : "e+") + t;
|
|
7250
7251
|
}
|
|
7251
7252
|
s(ct, "toExponential");
|
|
7252
|
-
function
|
|
7253
|
-
var n,
|
|
7253
|
+
function ye(e, t, r) {
|
|
7254
|
+
var n, i;
|
|
7254
7255
|
if (t < 0) {
|
|
7255
|
-
for (
|
|
7256
|
-
e =
|
|
7256
|
+
for (i = r + "."; ++t; i += r) ;
|
|
7257
|
+
e = i + e;
|
|
7257
7258
|
} else if (n = e.length, ++t > n) {
|
|
7258
|
-
for (
|
|
7259
|
-
e +=
|
|
7259
|
+
for (i = r, t -= n; --t; i += r) ;
|
|
7260
|
+
e += i;
|
|
7260
7261
|
} else t < n && (e = e.slice(0, t) + "." + e.slice(t));
|
|
7261
7262
|
return e;
|
|
7262
7263
|
}
|
|
7263
|
-
s(
|
|
7264
|
-
var
|
|
7265
|
-
const
|
|
7264
|
+
s(ye, "toFixedPoint");
|
|
7265
|
+
var Ni = xr();
|
|
7266
|
+
const Di = 24, Xe = 32, Mi = s(() => typeof globalThis < "u" && globalThis.crypto && typeof globalThis.crypto.getRandomValues == "function" ? () => {
|
|
7266
7267
|
const e = new Uint32Array(1);
|
|
7267
7268
|
return globalThis.crypto.getRandomValues(e), e[0] / 4294967296;
|
|
7268
|
-
} : Math.random, "createRandom"),
|
|
7269
|
+
} : Math.random, "createRandom"), Pt = Mi(), Nt = s((e = 4, t = Pt) => {
|
|
7269
7270
|
let r = "";
|
|
7270
7271
|
for (; r.length < e; ) r = r + Math.floor(t() * 36).toString(36);
|
|
7271
7272
|
return r;
|
|
7272
7273
|
}, "createEntropy");
|
|
7273
|
-
function
|
|
7274
|
-
let t = new
|
|
7274
|
+
function xi(e) {
|
|
7275
|
+
let t = new Ni(0);
|
|
7275
7276
|
for (const r of e.values()) t = t.multipliedBy(256).plus(r);
|
|
7276
7277
|
return t;
|
|
7277
7278
|
}
|
|
7278
|
-
s(
|
|
7279
|
-
const
|
|
7279
|
+
s(xi, "bufToBigInt");
|
|
7280
|
+
const Gr = s((e = "") => {
|
|
7280
7281
|
const t = new TextEncoder();
|
|
7281
|
-
return
|
|
7282
|
-
}, "hash"),
|
|
7283
|
-
const r = Object.keys(e).toString(), n = r.length ? r +
|
|
7284
|
-
return
|
|
7285
|
-
}, "createFingerprint"),
|
|
7282
|
+
return xi(Li(t.encode(e))).toString(36).slice(1);
|
|
7283
|
+
}, "hash"), $r = Array.from({ length: 26 }, (e, t) => String.fromCharCode(t + 97)), Gi = s((e) => $r[Math.floor(e() * $r.length)], "randomLetter"), $i = s(({ globalObj: e = typeof global < "u" ? global : typeof window < "u" ? window : {}, random: t = Pt } = {}) => {
|
|
7284
|
+
const r = Object.keys(e).toString(), n = r.length ? r + Nt(Xe, t) : Nt(Xe, t);
|
|
7285
|
+
return Gr(n).substring(0, Xe);
|
|
7286
|
+
}, "createFingerprint"), ki = s((e) => () => e++, "createCounter"), Hi = 476782367, Fi = s(({ random: e = Pt, counter: t = ki(Math.floor(e() * Hi)), length: r = Di, fingerprint: n = $i({ random: e }) } = {}) => {
|
|
7286
7287
|
if (r > Xe) throw new Error(`Length must be between 2 and ${Xe}. Received: ${r}`);
|
|
7287
7288
|
return s(function() {
|
|
7288
|
-
const
|
|
7289
|
-
return `${
|
|
7289
|
+
const o = Gi(e), c = Date.now().toString(36), l = t().toString(36), h = Nt(r, e), g = `${c + h + l + n}`;
|
|
7290
|
+
return `${o + Gr(g).substring(1, r)}`;
|
|
7290
7291
|
}, "cuid2");
|
|
7291
|
-
}, "init"), ut =
|
|
7292
|
-
function
|
|
7292
|
+
}, "init"), ut = ji(Fi);
|
|
7293
|
+
function ji(e) {
|
|
7293
7294
|
let t;
|
|
7294
7295
|
return () => (t || (t = e()), t());
|
|
7295
7296
|
}
|
|
7296
|
-
s(
|
|
7297
|
-
var
|
|
7298
|
-
function
|
|
7297
|
+
s(ji, "lazy");
|
|
7298
|
+
var qi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
7299
|
+
function kr(e) {
|
|
7299
7300
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7300
7301
|
}
|
|
7301
|
-
s(
|
|
7302
|
-
var xe = {},
|
|
7303
|
-
function
|
|
7304
|
-
if (
|
|
7305
|
-
|
|
7306
|
-
const e = ze, t =
|
|
7302
|
+
s(kr, "getDefaultExportFromCjs");
|
|
7303
|
+
var xe = {}, Hr;
|
|
7304
|
+
function Wi() {
|
|
7305
|
+
if (Hr) return xe;
|
|
7306
|
+
Hr = 1, Object.defineProperty(xe, "__esModule", { value: true }), xe.isBinaryFileSync = xe.isBinaryFile = void 0;
|
|
7307
|
+
const e = ze, t = ei, r = (0, t.promisify)(e.stat), n = (0, t.promisify)(e.open), i = (0, t.promisify)(e.close), o = 512, c = 3;
|
|
7307
7308
|
class l {
|
|
7308
7309
|
static {
|
|
7309
7310
|
s(this, "Reader");
|
|
@@ -7312,8 +7313,8 @@ function $i() {
|
|
|
7312
7313
|
size;
|
|
7313
7314
|
offset;
|
|
7314
7315
|
error;
|
|
7315
|
-
constructor(
|
|
7316
|
-
this.fileBuffer =
|
|
7316
|
+
constructor(C, y) {
|
|
7317
|
+
this.fileBuffer = C, this.size = y, this.offset = 0, this.error = false;
|
|
7317
7318
|
}
|
|
7318
7319
|
hasError() {
|
|
7319
7320
|
return this.error;
|
|
@@ -7321,63 +7322,63 @@ function $i() {
|
|
|
7321
7322
|
nextByte() {
|
|
7322
7323
|
return this.offset === this.size || this.hasError() ? (this.error = true, 255) : this.fileBuffer[this.offset++];
|
|
7323
7324
|
}
|
|
7324
|
-
next(
|
|
7325
|
-
const
|
|
7326
|
-
for (let B = 0; B <
|
|
7327
|
-
if (this.error) return
|
|
7328
|
-
|
|
7325
|
+
next(C) {
|
|
7326
|
+
const y = new Array();
|
|
7327
|
+
for (let B = 0; B < C; B++) {
|
|
7328
|
+
if (this.error) return y;
|
|
7329
|
+
y[B] = this.nextByte();
|
|
7329
7330
|
}
|
|
7330
|
-
return
|
|
7331
|
+
return y;
|
|
7331
7332
|
}
|
|
7332
7333
|
}
|
|
7333
|
-
function h(
|
|
7334
|
-
let
|
|
7335
|
-
for (; !
|
|
7336
|
-
const B =
|
|
7337
|
-
if (
|
|
7338
|
-
if (
|
|
7339
|
-
|
|
7334
|
+
function h(w) {
|
|
7335
|
+
let C = 0, y = 0;
|
|
7336
|
+
for (; !w.hasError(); ) {
|
|
7337
|
+
const B = w.nextByte();
|
|
7338
|
+
if (y = y | (B & 127) << 7 * C, (B & 128) === 0) break;
|
|
7339
|
+
if (C >= 10) {
|
|
7340
|
+
w.error = true;
|
|
7340
7341
|
break;
|
|
7341
7342
|
}
|
|
7342
|
-
|
|
7343
|
+
C++;
|
|
7343
7344
|
}
|
|
7344
|
-
return
|
|
7345
|
+
return y;
|
|
7345
7346
|
}
|
|
7346
7347
|
s(h, "readProtoVarInt");
|
|
7347
|
-
function
|
|
7348
|
-
switch (h(
|
|
7348
|
+
function g(w) {
|
|
7349
|
+
switch (h(w) & 7) {
|
|
7349
7350
|
case 0:
|
|
7350
|
-
return h(
|
|
7351
|
+
return h(w), true;
|
|
7351
7352
|
case 1:
|
|
7352
|
-
return
|
|
7353
|
+
return w.next(8), true;
|
|
7353
7354
|
case 2:
|
|
7354
|
-
const B = h(
|
|
7355
|
-
return
|
|
7355
|
+
const B = h(w);
|
|
7356
|
+
return w.next(B), true;
|
|
7356
7357
|
case 5:
|
|
7357
|
-
return
|
|
7358
|
+
return w.next(4), true;
|
|
7358
7359
|
}
|
|
7359
7360
|
return false;
|
|
7360
7361
|
}
|
|
7361
|
-
s(
|
|
7362
|
-
function m(
|
|
7363
|
-
const
|
|
7362
|
+
s(g, "readProtoMessage");
|
|
7363
|
+
function m(w, C) {
|
|
7364
|
+
const y = new l(w, C);
|
|
7364
7365
|
let B = 0;
|
|
7365
7366
|
for (; ; ) {
|
|
7366
|
-
if (!
|
|
7367
|
-
if (
|
|
7367
|
+
if (!g(y) && !y.hasError()) return false;
|
|
7368
|
+
if (y.hasError()) break;
|
|
7368
7369
|
B++;
|
|
7369
7370
|
}
|
|
7370
7371
|
return B > 0;
|
|
7371
7372
|
}
|
|
7372
7373
|
s(m, "isBinaryProto");
|
|
7373
|
-
async function A(
|
|
7374
|
-
if (x(
|
|
7375
|
-
const
|
|
7376
|
-
M(
|
|
7377
|
-
const B = await n(
|
|
7374
|
+
async function A(w, C) {
|
|
7375
|
+
if (x(w)) {
|
|
7376
|
+
const y = await r(w);
|
|
7377
|
+
M(y);
|
|
7378
|
+
const B = await n(w, "r"), L = Buffer.alloc(o + c);
|
|
7378
7379
|
return new Promise((U, G) => {
|
|
7379
|
-
e.read(B, L, 0,
|
|
7380
|
-
if (
|
|
7380
|
+
e.read(B, L, 0, o + c, 0, (k, a, u) => {
|
|
7381
|
+
if (i(B), k) G(k);
|
|
7381
7382
|
else try {
|
|
7382
7383
|
U(O(L, a));
|
|
7383
7384
|
} catch (f) {
|
|
@@ -7385,91 +7386,91 @@ function $i() {
|
|
|
7385
7386
|
}
|
|
7386
7387
|
});
|
|
7387
7388
|
});
|
|
7388
|
-
} else return
|
|
7389
|
+
} else return C === void 0 && (C = w.length), O(w, C);
|
|
7389
7390
|
}
|
|
7390
7391
|
s(A, "isBinaryFile"), xe.isBinaryFile = A;
|
|
7391
|
-
function
|
|
7392
|
-
if (x(
|
|
7393
|
-
const
|
|
7394
|
-
M(
|
|
7395
|
-
const B = e.openSync(
|
|
7392
|
+
function b(w, C) {
|
|
7393
|
+
if (x(w)) {
|
|
7394
|
+
const y = e.statSync(w);
|
|
7395
|
+
M(y);
|
|
7396
|
+
const B = e.openSync(w, "r"), L = Buffer.alloc(o + c), U = e.readSync(B, L, 0, o + c, 0);
|
|
7396
7397
|
return e.closeSync(B), O(L, U);
|
|
7397
|
-
} else return
|
|
7398
|
-
}
|
|
7399
|
-
s(
|
|
7400
|
-
function O(
|
|
7401
|
-
if (
|
|
7402
|
-
let
|
|
7403
|
-
const B = Math.min(
|
|
7404
|
-
if (
|
|
7405
|
-
if (B >= 5 &&
|
|
7406
|
-
if (
|
|
7398
|
+
} else return C === void 0 && (C = w.length), O(w, C);
|
|
7399
|
+
}
|
|
7400
|
+
s(b, "isBinaryFileSync"), xe.isBinaryFileSync = b;
|
|
7401
|
+
function O(w, C) {
|
|
7402
|
+
if (C === 0) return false;
|
|
7403
|
+
let y = 0;
|
|
7404
|
+
const B = Math.min(C, o + c), L = Math.min(B, o);
|
|
7405
|
+
if (C >= 3 && w[0] === 239 && w[1] === 187 && w[2] === 191 || C >= 4 && w[0] === 0 && w[1] === 0 && w[2] === 254 && w[3] === 255 || C >= 4 && w[0] === 255 && w[1] === 254 && w[2] === 0 && w[3] === 0 || C >= 4 && w[0] === 132 && w[1] === 49 && w[2] === 149 && w[3] === 51) return false;
|
|
7406
|
+
if (B >= 5 && w.slice(0, 5).toString() === "%PDF-") return true;
|
|
7407
|
+
if (C >= 2 && w[0] === 254 && w[1] === 255 || C >= 2 && w[0] === 255 && w[1] === 254) return false;
|
|
7407
7408
|
for (let U = 0; U < L; U++) {
|
|
7408
|
-
if (
|
|
7409
|
-
if ((
|
|
7410
|
-
if (
|
|
7411
|
-
if (U++,
|
|
7412
|
-
} else if (
|
|
7413
|
-
if (U++,
|
|
7409
|
+
if (w[U] === 0) return true;
|
|
7410
|
+
if ((w[U] < 7 || w[U] > 14) && (w[U] < 32 || w[U] > 127)) {
|
|
7411
|
+
if (w[U] >= 192 && w[U] <= 223 && U + 1 < B) {
|
|
7412
|
+
if (U++, w[U] >= 128 && w[U] <= 191) continue;
|
|
7413
|
+
} else if (w[U] >= 224 && w[U] <= 239 && U + 2 < B) {
|
|
7414
|
+
if (U++, w[U] >= 128 && w[U] <= 191 && w[U + 1] >= 128 && w[U + 1] <= 191) {
|
|
7414
7415
|
U++;
|
|
7415
7416
|
continue;
|
|
7416
7417
|
}
|
|
7417
|
-
} else if (
|
|
7418
|
+
} else if (w[U] >= 240 && w[U] <= 247 && U + 3 < B && (U++, w[U] >= 128 && w[U] <= 191 && w[U + 1] >= 128 && w[U + 1] <= 191 && w[U + 2] >= 128 && w[U + 2] <= 191)) {
|
|
7418
7419
|
U += 2;
|
|
7419
7420
|
continue;
|
|
7420
7421
|
}
|
|
7421
|
-
if (
|
|
7422
|
+
if (y++, U >= 32 && y * 100 / L > 10) return true;
|
|
7422
7423
|
}
|
|
7423
7424
|
}
|
|
7424
|
-
return !!(
|
|
7425
|
+
return !!(y * 100 / L > 10 || y > 1 && m(w, L));
|
|
7425
7426
|
}
|
|
7426
7427
|
s(O, "isBinaryCheck");
|
|
7427
|
-
function x(
|
|
7428
|
-
return typeof
|
|
7428
|
+
function x(w) {
|
|
7429
|
+
return typeof w == "string";
|
|
7429
7430
|
}
|
|
7430
7431
|
s(x, "isString");
|
|
7431
|
-
function M(
|
|
7432
|
-
if (!
|
|
7432
|
+
function M(w) {
|
|
7433
|
+
if (!w.isFile()) throw new Error("Path provided was not a file!");
|
|
7433
7434
|
}
|
|
7434
7435
|
return s(M, "isStatFile"), xe;
|
|
7435
7436
|
}
|
|
7436
|
-
s(
|
|
7437
|
-
var
|
|
7438
|
-
var
|
|
7439
|
-
return
|
|
7437
|
+
s(Wi, "requireLib");
|
|
7438
|
+
var Ki = Wi(), Fr = {}, Vi = s((function(e, t, r, n, i) {
|
|
7439
|
+
var o = new Worker(Fr[t] || (Fr[t] = URL.createObjectURL(new Blob([e + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'], { type: "text/javascript" }))));
|
|
7440
|
+
return o.onmessage = function(c) {
|
|
7440
7441
|
var l = c.data, h = l.$e$;
|
|
7441
7442
|
if (h) {
|
|
7442
|
-
var
|
|
7443
|
-
|
|
7444
|
-
} else
|
|
7445
|
-
},
|
|
7446
|
-
}), "wk"), K = Uint8Array, ie = Uint16Array, Ze = Int32Array, je = new K([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]), qe = new K([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0]), et = new K([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]),
|
|
7443
|
+
var g = new Error(h[0]);
|
|
7444
|
+
g.code = h[1], g.stack = h[2], i(g, null);
|
|
7445
|
+
} else i(null, l);
|
|
7446
|
+
}, o.postMessage(r, n), o;
|
|
7447
|
+
}), "wk"), K = Uint8Array, ie = Uint16Array, Ze = Int32Array, je = new K([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]), qe = new K([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0]), et = new K([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), jr = s(function(e, t) {
|
|
7447
7448
|
for (var r = new ie(31), n = 0; n < 31; ++n) r[n] = t += 1 << e[n - 1];
|
|
7448
|
-
for (var
|
|
7449
|
-
return { b: r, r:
|
|
7450
|
-
}, "freb"),
|
|
7449
|
+
for (var i = new Ze(r[30]), n = 1; n < 30; ++n) for (var o = r[n]; o < r[n + 1]; ++o) i[o] = o - r[n] << 5 | n;
|
|
7450
|
+
return { b: r, r: i };
|
|
7451
|
+
}, "freb"), qr = jr(je, 2), Dt = qr.b, lt = qr.r;
|
|
7451
7452
|
Dt[28] = 258, lt[258] = 28;
|
|
7452
|
-
for (var
|
|
7453
|
+
for (var Wr = jr(qe, 0), Kr = Wr.b, Mt = Wr.r, tt = new ie(32768), V = 0; V < 32768; ++V) {
|
|
7453
7454
|
var Be = (V & 43690) >> 1 | (V & 21845) << 1;
|
|
7454
7455
|
Be = (Be & 52428) >> 2 | (Be & 13107) << 2, Be = (Be & 61680) >> 4 | (Be & 3855) << 4, tt[V] = ((Be & 65280) >> 8 | (Be & 255) << 8) >> 1;
|
|
7455
7456
|
}
|
|
7456
7457
|
for (var fe = s((function(e, t, r) {
|
|
7457
|
-
for (var n = e.length,
|
|
7458
|
+
for (var n = e.length, i = 0, o = new ie(t); i < n; ++i) e[i] && ++o[e[i] - 1];
|
|
7458
7459
|
var c = new ie(t);
|
|
7459
|
-
for (
|
|
7460
|
+
for (i = 1; i < t; ++i) c[i] = c[i - 1] + o[i - 1] << 1;
|
|
7460
7461
|
var l;
|
|
7461
7462
|
if (r) {
|
|
7462
7463
|
l = new ie(1 << t);
|
|
7463
7464
|
var h = 15 - t;
|
|
7464
|
-
for (
|
|
7465
|
-
} else for (l = new ie(n),
|
|
7465
|
+
for (i = 0; i < n; ++i) if (e[i]) for (var g = i << 4 | e[i], m = t - e[i], A = c[e[i] - 1]++ << m, b = A | (1 << m) - 1; A <= b; ++A) l[tt[A] >> h] = g;
|
|
7466
|
+
} else for (l = new ie(n), i = 0; i < n; ++i) e[i] && (l[i] = tt[c[e[i] - 1]++] >> 15 - e[i]);
|
|
7466
7467
|
return l;
|
|
7467
|
-
}), "hMap"),
|
|
7468
|
-
for (var V = 144; V < 256; ++V)
|
|
7469
|
-
for (var V = 256; V < 280; ++V)
|
|
7470
|
-
for (var V = 280; V < 288; ++V)
|
|
7468
|
+
}), "hMap"), we = new K(288), V = 0; V < 144; ++V) we[V] = 8;
|
|
7469
|
+
for (var V = 144; V < 256; ++V) we[V] = 9;
|
|
7470
|
+
for (var V = 256; V < 280; ++V) we[V] = 7;
|
|
7471
|
+
for (var V = 280; V < 288; ++V) we[V] = 8;
|
|
7471
7472
|
for (var We = new K(32), V = 0; V < 32; ++V) We[V] = 5;
|
|
7472
|
-
var
|
|
7473
|
+
var Vr = fe(we, 9, 0), Yr = fe(we, 9, 1), zr = fe(We, 5, 0), Jr = fe(We, 5, 1), ft = s(function(e) {
|
|
7473
7474
|
for (var t = e[0], r = 1; r < e.length; ++r) e[r] > t && (t = e[r]);
|
|
7474
7475
|
return t;
|
|
7475
7476
|
}, "max"), he = s(function(e, t, r) {
|
|
@@ -7482,99 +7483,99 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
|
|
|
7482
7483
|
return (e + 7) / 8 | 0;
|
|
7483
7484
|
}, "shft"), Ge = s(function(e, t, r) {
|
|
7484
7485
|
return (t == null || t < 0) && (t = 0), (r == null || r > e.length) && (r = e.length), new K(e.subarray(t, r));
|
|
7485
|
-
}, "slc"),
|
|
7486
|
-
var n = new Error(t ||
|
|
7486
|
+
}, "slc"), Qr = ["unexpected EOF", "invalid block type", "invalid length/literal", "invalid distance", "stream finished", "no stream handler", , "no callback", "invalid UTF-8 data", "extra field too long", "date not in range 1980-2099", "filename too long", "stream finishing", "invalid zip data"], X = s(function(e, t, r) {
|
|
7487
|
+
var n = new Error(t || Qr[e]);
|
|
7487
7488
|
if (n.code = e, Error.captureStackTrace && Error.captureStackTrace(n, X), !r) throw n;
|
|
7488
7489
|
return n;
|
|
7489
|
-
}, "err"),
|
|
7490
|
-
var
|
|
7491
|
-
if (!
|
|
7490
|
+
}, "err"), Xr = s(function(e, t, r, n) {
|
|
7491
|
+
var i = e.length, o = n ? n.length : 0;
|
|
7492
|
+
if (!i || t.f && !t.l) return r || new K(0);
|
|
7492
7493
|
var c = !r, l = c || t.i != 2, h = t.i;
|
|
7493
|
-
c && (r = new K(
|
|
7494
|
-
var
|
|
7494
|
+
c && (r = new K(i * 3));
|
|
7495
|
+
var g = s(function(ne) {
|
|
7495
7496
|
var pe = r.length;
|
|
7496
7497
|
if (ne > pe) {
|
|
7497
7498
|
var Z = new K(Math.max(pe * 2, ne));
|
|
7498
7499
|
Z.set(r), r = Z;
|
|
7499
7500
|
}
|
|
7500
|
-
}, "cbuf"), m = t.f || 0, A = t.p || 0,
|
|
7501
|
+
}, "cbuf"), m = t.f || 0, A = t.p || 0, b = t.b || 0, O = t.l, x = t.d, M = t.m, w = t.n, C = i * 8;
|
|
7501
7502
|
do {
|
|
7502
7503
|
if (!O) {
|
|
7503
7504
|
m = he(e, A, 1);
|
|
7504
|
-
var
|
|
7505
|
-
if (A += 3,
|
|
7506
|
-
else if (
|
|
7505
|
+
var y = he(e, A + 1, 3);
|
|
7506
|
+
if (A += 3, y) if (y == 1) O = Yr, x = Jr, M = 9, w = 5;
|
|
7507
|
+
else if (y == 2) {
|
|
7507
7508
|
var G = he(e, A, 31) + 257, k = he(e, A + 10, 15) + 4, a = G + he(e, A + 5, 31) + 1;
|
|
7508
7509
|
A += 14;
|
|
7509
|
-
for (var u = new K(a), f = new K(19),
|
|
7510
|
+
for (var u = new K(a), f = new K(19), _ = 0; _ < k; ++_) f[et[_]] = he(e, A + _ * 3, 7);
|
|
7510
7511
|
A += k * 3;
|
|
7511
|
-
for (var p = ft(f), I = (1 << p) - 1, T = fe(f, p, 1),
|
|
7512
|
+
for (var p = ft(f), I = (1 << p) - 1, T = fe(f, p, 1), _ = 0; _ < a; ) {
|
|
7512
7513
|
var d = T[he(e, A, I)];
|
|
7513
7514
|
A += d & 15;
|
|
7514
7515
|
var B = d >> 4;
|
|
7515
|
-
if (B < 16) u[
|
|
7516
|
+
if (B < 16) u[_++] = B;
|
|
7516
7517
|
else {
|
|
7517
7518
|
var E = 0, S = 0;
|
|
7518
|
-
for (B == 16 ? (S = 3 + he(e, A, 3), A += 2, E = u[
|
|
7519
|
+
for (B == 16 ? (S = 3 + he(e, A, 3), A += 2, E = u[_ - 1]) : B == 17 ? (S = 3 + he(e, A, 7), A += 3) : B == 18 && (S = 11 + he(e, A, 127), A += 7); S--; ) u[_++] = E;
|
|
7519
7520
|
}
|
|
7520
7521
|
}
|
|
7521
7522
|
var R = u.subarray(0, G), v = u.subarray(G);
|
|
7522
|
-
M = ft(R),
|
|
7523
|
+
M = ft(R), w = ft(v), O = fe(R, M, 1), x = fe(v, w, 1);
|
|
7523
7524
|
} else X(1);
|
|
7524
7525
|
else {
|
|
7525
7526
|
var B = rt(A) + 4, L = e[B - 4] | e[B - 3] << 8, U = B + L;
|
|
7526
|
-
if (U >
|
|
7527
|
+
if (U > i) {
|
|
7527
7528
|
h && X(0);
|
|
7528
7529
|
break;
|
|
7529
7530
|
}
|
|
7530
|
-
l &&
|
|
7531
|
+
l && g(b + L), r.set(e.subarray(B, U), b), t.b = b += L, t.p = A = U * 8, t.f = m;
|
|
7531
7532
|
continue;
|
|
7532
7533
|
}
|
|
7533
|
-
if (A >
|
|
7534
|
+
if (A > C) {
|
|
7534
7535
|
h && X(0);
|
|
7535
7536
|
break;
|
|
7536
7537
|
}
|
|
7537
7538
|
}
|
|
7538
|
-
l &&
|
|
7539
|
-
for (var
|
|
7540
|
-
var E = O[ht(e, A) &
|
|
7541
|
-
if (A += E & 15, A >
|
|
7539
|
+
l && g(b + 131072);
|
|
7540
|
+
for (var N = (1 << M) - 1, P = (1 << w) - 1, H = A; ; H = A) {
|
|
7541
|
+
var E = O[ht(e, A) & N], j = E >> 4;
|
|
7542
|
+
if (A += E & 15, A > C) {
|
|
7542
7543
|
h && X(0);
|
|
7543
7544
|
break;
|
|
7544
7545
|
}
|
|
7545
|
-
if (E || X(2), j < 256) r[
|
|
7546
|
+
if (E || X(2), j < 256) r[b++] = j;
|
|
7546
7547
|
else if (j == 256) {
|
|
7547
7548
|
H = A, O = null;
|
|
7548
7549
|
break;
|
|
7549
7550
|
} else {
|
|
7550
7551
|
var q = j - 254;
|
|
7551
7552
|
if (j > 264) {
|
|
7552
|
-
var
|
|
7553
|
-
q = he(e, A, (1 << D) - 1) + Dt[
|
|
7553
|
+
var _ = j - 257, D = je[_];
|
|
7554
|
+
q = he(e, A, (1 << D) - 1) + Dt[_], A += D;
|
|
7554
7555
|
}
|
|
7555
|
-
var F = x[ht(e, A) &
|
|
7556
|
+
var F = x[ht(e, A) & P], z = F >> 4;
|
|
7556
7557
|
F || X(3), A += F & 15;
|
|
7557
|
-
var v =
|
|
7558
|
+
var v = Kr[z];
|
|
7558
7559
|
if (z > 3) {
|
|
7559
7560
|
var D = qe[z];
|
|
7560
7561
|
v += ht(e, A) & (1 << D) - 1, A += D;
|
|
7561
7562
|
}
|
|
7562
|
-
if (A >
|
|
7563
|
+
if (A > C) {
|
|
7563
7564
|
h && X(0);
|
|
7564
7565
|
break;
|
|
7565
7566
|
}
|
|
7566
|
-
l &&
|
|
7567
|
-
var de =
|
|
7568
|
-
if (
|
|
7569
|
-
var ve =
|
|
7570
|
-
for (ve +
|
|
7567
|
+
l && g(b + 131072);
|
|
7568
|
+
var de = b + q;
|
|
7569
|
+
if (b < v) {
|
|
7570
|
+
var ve = o - v, be = Math.min(v, de);
|
|
7571
|
+
for (ve + b < 0 && X(3); b < be; ++b) r[b] = n[ve + b];
|
|
7571
7572
|
}
|
|
7572
|
-
for (;
|
|
7573
|
+
for (; b < de; ++b) r[b] = r[b - v];
|
|
7573
7574
|
}
|
|
7574
7575
|
}
|
|
7575
|
-
t.l = O, t.p = H, t.b =
|
|
7576
|
+
t.l = O, t.p = H, t.b = b, t.f = m, O && (m = 1, t.m = M, t.d = x, t.n = w);
|
|
7576
7577
|
} while (!m);
|
|
7577
|
-
return
|
|
7578
|
+
return b != r.length && c ? Ge(r, 0, b) : r.subarray(0, b);
|
|
7578
7579
|
}, "inflt"), ge = s(function(e, t, r) {
|
|
7579
7580
|
r <<= t & 7;
|
|
7580
7581
|
var n = t / 8 | 0;
|
|
@@ -7585,34 +7586,34 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
|
|
|
7585
7586
|
e[n] |= r, e[n + 1] |= r >> 8, e[n + 2] |= r >> 16;
|
|
7586
7587
|
}, "wbits16"), dt = s(function(e, t) {
|
|
7587
7588
|
for (var r = [], n = 0; n < e.length; ++n) e[n] && r.push({ s: n, f: e[n] });
|
|
7588
|
-
var
|
|
7589
|
-
if (!
|
|
7590
|
-
if (
|
|
7589
|
+
var i = r.length, o = r.slice();
|
|
7590
|
+
if (!i) return { t: kt, l: 0 };
|
|
7591
|
+
if (i == 1) {
|
|
7591
7592
|
var c = new K(r[0].s + 1);
|
|
7592
7593
|
return c[r[0].s] = 1, { t: c, l: 1 };
|
|
7593
7594
|
}
|
|
7594
7595
|
r.sort(function(U, G) {
|
|
7595
7596
|
return U.f - G.f;
|
|
7596
7597
|
}), r.push({ s: -1, f: 25001 });
|
|
7597
|
-
var l = r[0], h = r[1],
|
|
7598
|
-
for (r[0] = { s: -1, f: l.f + h.f, l, r: h }; m !=
|
|
7599
|
-
for (var
|
|
7600
|
-
var O = new ie(
|
|
7598
|
+
var l = r[0], h = r[1], g = 0, m = 1, A = 2;
|
|
7599
|
+
for (r[0] = { s: -1, f: l.f + h.f, l, r: h }; m != i - 1; ) l = r[r[g].f < r[A].f ? g++ : A++], h = r[g != m && r[g].f < r[A].f ? g++ : A++], r[m++] = { s: -1, f: l.f + h.f, l, r: h };
|
|
7600
|
+
for (var b = o[0].s, n = 1; n < i; ++n) o[n].s > b && (b = o[n].s);
|
|
7601
|
+
var O = new ie(b + 1), x = pt(r[m - 1], O, 0);
|
|
7601
7602
|
if (x > t) {
|
|
7602
|
-
var n = 0, M = 0,
|
|
7603
|
-
for (
|
|
7603
|
+
var n = 0, M = 0, w = x - t, C = 1 << w;
|
|
7604
|
+
for (o.sort(function(G, k) {
|
|
7604
7605
|
return O[k.s] - O[G.s] || G.f - k.f;
|
|
7605
|
-
}); n <
|
|
7606
|
-
var
|
|
7607
|
-
if (O[
|
|
7606
|
+
}); n < i; ++n) {
|
|
7607
|
+
var y = o[n].s;
|
|
7608
|
+
if (O[y] > t) M += C - (1 << x - O[y]), O[y] = t;
|
|
7608
7609
|
else break;
|
|
7609
7610
|
}
|
|
7610
|
-
for (M >>=
|
|
7611
|
-
var B =
|
|
7611
|
+
for (M >>= w; M > 0; ) {
|
|
7612
|
+
var B = o[n].s;
|
|
7612
7613
|
O[B] < t ? M -= 1 << t - O[B]++ - 1 : ++n;
|
|
7613
7614
|
}
|
|
7614
7615
|
for (; n >= 0 && M; --n) {
|
|
7615
|
-
var L =
|
|
7616
|
+
var L = o[n].s;
|
|
7616
7617
|
O[L] == t && (--O[L], ++M);
|
|
7617
7618
|
}
|
|
7618
7619
|
x = t;
|
|
@@ -7622,48 +7623,48 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
|
|
|
7622
7623
|
return e.s == -1 ? Math.max(pt(e.l, t, r + 1), pt(e.r, t, r + 1)) : t[e.s] = r;
|
|
7623
7624
|
}, "ln"), xt = s(function(e) {
|
|
7624
7625
|
for (var t = e.length; t && !e[--t]; ) ;
|
|
7625
|
-
for (var r = new ie(++t), n = 0,
|
|
7626
|
+
for (var r = new ie(++t), n = 0, i = e[0], o = 1, c = s(function(h) {
|
|
7626
7627
|
r[n++] = h;
|
|
7627
|
-
}, "w"), l = 1; l <= t; ++l) if (e[l] ==
|
|
7628
|
+
}, "w"), l = 1; l <= t; ++l) if (e[l] == i && l != t) ++o;
|
|
7628
7629
|
else {
|
|
7629
|
-
if (!
|
|
7630
|
-
for (;
|
|
7631
|
-
|
|
7632
|
-
} else if (
|
|
7633
|
-
for (c(
|
|
7634
|
-
|
|
7630
|
+
if (!i && o > 2) {
|
|
7631
|
+
for (; o > 138; o -= 138) c(32754);
|
|
7632
|
+
o > 2 && (c(o > 10 ? o - 11 << 5 | 28690 : o - 3 << 5 | 12305), o = 0);
|
|
7633
|
+
} else if (o > 3) {
|
|
7634
|
+
for (c(i), --o; o > 6; o -= 6) c(8304);
|
|
7635
|
+
o > 2 && (c(o - 3 << 5 | 8208), o = 0);
|
|
7635
7636
|
}
|
|
7636
|
-
for (;
|
|
7637
|
-
|
|
7637
|
+
for (; o--; ) c(i);
|
|
7638
|
+
o = 1, i = e[l];
|
|
7638
7639
|
}
|
|
7639
7640
|
return { c: r.subarray(0, n), n: t };
|
|
7640
7641
|
}, "lc"), Ve = s(function(e, t) {
|
|
7641
7642
|
for (var r = 0, n = 0; n < t.length; ++n) r += e[n] * t[n];
|
|
7642
7643
|
return r;
|
|
7643
7644
|
}, "clen"), Gt = s(function(e, t, r) {
|
|
7644
|
-
var n = r.length,
|
|
7645
|
-
e[
|
|
7646
|
-
for (var
|
|
7647
|
-
return (
|
|
7648
|
-
}, "wfblk"), $t = s(function(e, t, r, n,
|
|
7649
|
-
ge(t, m++, r), ++
|
|
7650
|
-
for (var A = dt(
|
|
7645
|
+
var n = r.length, i = rt(t + 2);
|
|
7646
|
+
e[i] = n & 255, e[i + 1] = n >> 8, e[i + 2] = e[i] ^ 255, e[i + 3] = e[i + 1] ^ 255;
|
|
7647
|
+
for (var o = 0; o < n; ++o) e[i + o + 4] = r[o];
|
|
7648
|
+
return (i + 4 + n) * 8;
|
|
7649
|
+
}, "wfblk"), $t = s(function(e, t, r, n, i, o, c, l, h, g, m) {
|
|
7650
|
+
ge(t, m++, r), ++i[256];
|
|
7651
|
+
for (var A = dt(i, 15), b = A.t, O = A.l, x = dt(o, 15), M = x.t, w = x.l, C = xt(b), y = C.c, B = C.n, L = xt(M), U = L.c, G = L.n, k = new ie(19), a = 0; a < y.length; ++a) ++k[y[a] & 31];
|
|
7651
7652
|
for (var a = 0; a < U.length; ++a) ++k[U[a] & 31];
|
|
7652
|
-
for (var u = dt(k, 7), f = u.t,
|
|
7653
|
-
var I =
|
|
7654
|
-
if (h >= 0 && I <= T && I <= d) return Gt(t, m, e.subarray(h, h +
|
|
7653
|
+
for (var u = dt(k, 7), f = u.t, _ = u.l, p = 19; p > 4 && !f[et[p - 1]]; --p) ;
|
|
7654
|
+
var I = g + 5 << 3, T = Ve(i, we) + Ve(o, We) + c, d = Ve(i, b) + Ve(o, M) + c + 14 + 3 * p + Ve(k, f) + 2 * k[16] + 3 * k[17] + 7 * k[18];
|
|
7655
|
+
if (h >= 0 && I <= T && I <= d) return Gt(t, m, e.subarray(h, h + g));
|
|
7655
7656
|
var E, S, R, v;
|
|
7656
7657
|
if (ge(t, m, 1 + (d < T)), m += 2, d < T) {
|
|
7657
|
-
E = fe(
|
|
7658
|
-
var
|
|
7658
|
+
E = fe(b, O, 0), S = b, R = fe(M, w, 0), v = M;
|
|
7659
|
+
var N = fe(f, _, 0);
|
|
7659
7660
|
ge(t, m, B - 257), ge(t, m + 5, G - 1), ge(t, m + 10, p - 4), m += 14;
|
|
7660
7661
|
for (var a = 0; a < p; ++a) ge(t, m + 3 * a, f[et[a]]);
|
|
7661
7662
|
m += 3 * p;
|
|
7662
|
-
for (var
|
|
7663
|
+
for (var P = [y, U], H = 0; H < 2; ++H) for (var j = P[H], a = 0; a < j.length; ++a) {
|
|
7663
7664
|
var q = j[a] & 31;
|
|
7664
|
-
ge(t, m,
|
|
7665
|
+
ge(t, m, N[q]), m += f[q], q > 15 && (ge(t, m, j[a] >> 5 & 127), m += j[a] >> 12);
|
|
7665
7666
|
}
|
|
7666
|
-
} else E =
|
|
7667
|
+
} else E = Vr, S = we, R = zr, v = We;
|
|
7667
7668
|
for (var a = 0; a < l; ++a) {
|
|
7668
7669
|
var D = n[a];
|
|
7669
7670
|
if (D > 255) {
|
|
@@ -7674,116 +7675,116 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
|
|
|
7674
7675
|
} else Ke(t, m, E[D]), m += S[D];
|
|
7675
7676
|
}
|
|
7676
7677
|
return Ke(t, m, E[256]), m + S[256];
|
|
7677
|
-
}, "wblk"),
|
|
7678
|
-
var c =
|
|
7678
|
+
}, "wblk"), Zr = new Ze([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), kt = new K(0), en = s(function(e, t, r, n, i, o) {
|
|
7679
|
+
var c = o.z || e.length, l = new K(n + c + 5 * (1 + Math.ceil(c / 7e3)) + i), h = l.subarray(n, l.length - i), g = o.l, m = (o.r || 0) & 7;
|
|
7679
7680
|
if (t) {
|
|
7680
|
-
m && (h[0] =
|
|
7681
|
-
for (var A =
|
|
7682
|
-
return (e[ee] ^ e[ee + 1] <<
|
|
7683
|
-
}, "hsh"), L = new Ze(25e3), U = new ie(288), G = new ie(32), k = 0, a = 0, u =
|
|
7684
|
-
var I = B(u), T = u & 32767, d =
|
|
7685
|
-
if (M[T] = d,
|
|
7681
|
+
m && (h[0] = o.r >> 3);
|
|
7682
|
+
for (var A = Zr[t - 1], b = A >> 13, O = A & 8191, x = (1 << r) - 1, M = o.p || new ie(32768), w = o.h || new ie(x + 1), C = Math.ceil(r / 3), y = 2 * C, B = s(function(ee) {
|
|
7683
|
+
return (e[ee] ^ e[ee + 1] << C ^ e[ee + 2] << y) & x;
|
|
7684
|
+
}, "hsh"), L = new Ze(25e3), U = new ie(288), G = new ie(32), k = 0, a = 0, u = o.i || 0, f = 0, _ = o.w || 0, p = 0; u + 2 < c; ++u) {
|
|
7685
|
+
var I = B(u), T = u & 32767, d = w[I];
|
|
7686
|
+
if (M[T] = d, w[I] = T, _ <= u) {
|
|
7686
7687
|
var E = c - u;
|
|
7687
|
-
if ((k > 7e3 || f > 24576) && (E > 423 || !
|
|
7688
|
+
if ((k > 7e3 || f > 24576) && (E > 423 || !g)) {
|
|
7688
7689
|
m = $t(e, h, 0, L, U, G, a, f, p, u - p, m), f = k = a = 0, p = u;
|
|
7689
7690
|
for (var S = 0; S < 286; ++S) U[S] = 0;
|
|
7690
7691
|
for (var S = 0; S < 30; ++S) G[S] = 0;
|
|
7691
7692
|
}
|
|
7692
|
-
var R = 2, v = 0,
|
|
7693
|
-
if (E > 2 && I == B(u -
|
|
7694
|
-
if (e[u + R] == e[u + R -
|
|
7695
|
-
for (var D = 0; D < q && e[u + D] == e[u + D -
|
|
7693
|
+
var R = 2, v = 0, N = O, P = T - d & 32767;
|
|
7694
|
+
if (E > 2 && I == B(u - P)) for (var H = Math.min(b, E) - 1, j = Math.min(32767, u), q = Math.min(258, E); P <= j && --N && T != d; ) {
|
|
7695
|
+
if (e[u + R] == e[u + R - P]) {
|
|
7696
|
+
for (var D = 0; D < q && e[u + D] == e[u + D - P]; ++D) ;
|
|
7696
7697
|
if (D > R) {
|
|
7697
|
-
if (R = D, v =
|
|
7698
|
-
for (var F = Math.min(
|
|
7699
|
-
var de = u -
|
|
7700
|
-
|
|
7698
|
+
if (R = D, v = P, D > H) break;
|
|
7699
|
+
for (var F = Math.min(P, D - 2), z = 0, S = 0; S < F; ++S) {
|
|
7700
|
+
var de = u - P + S & 32767, ve = M[de], be = de - ve & 32767;
|
|
7701
|
+
be > z && (z = be, d = de);
|
|
7701
7702
|
}
|
|
7702
7703
|
}
|
|
7703
7704
|
}
|
|
7704
|
-
T = d, d = M[T],
|
|
7705
|
+
T = d, d = M[T], P += T - d & 32767;
|
|
7705
7706
|
}
|
|
7706
7707
|
if (v) {
|
|
7707
7708
|
L[f++] = 268435456 | lt[R] << 18 | Mt[v];
|
|
7708
7709
|
var ne = lt[R] & 31, pe = Mt[v] & 31;
|
|
7709
|
-
a += je[ne] + qe[pe], ++U[257 + ne], ++G[pe],
|
|
7710
|
+
a += je[ne] + qe[pe], ++U[257 + ne], ++G[pe], _ = u + R, ++k;
|
|
7710
7711
|
} else L[f++] = e[u], ++U[e[u]];
|
|
7711
7712
|
}
|
|
7712
7713
|
}
|
|
7713
|
-
for (u = Math.max(u,
|
|
7714
|
-
m = $t(e, h,
|
|
7714
|
+
for (u = Math.max(u, _); u < c; ++u) L[f++] = e[u], ++U[e[u]];
|
|
7715
|
+
m = $t(e, h, g, L, U, G, a, f, p, u - p, m), g || (o.r = m & 7 | h[m / 8 | 0] << 3, m -= 7, o.h = w, o.p = M, o.i = u, o.w = _);
|
|
7715
7716
|
} else {
|
|
7716
|
-
for (var u =
|
|
7717
|
+
for (var u = o.w || 0; u < c + g; u += 65535) {
|
|
7717
7718
|
var Z = u + 65535;
|
|
7718
|
-
Z >= c && (h[m / 8 | 0] =
|
|
7719
|
+
Z >= c && (h[m / 8 | 0] = g, Z = c), m = Gt(h, m + 1, e.subarray(u, Z));
|
|
7719
7720
|
}
|
|
7720
|
-
|
|
7721
|
+
o.i = c;
|
|
7721
7722
|
}
|
|
7722
|
-
return Ge(l, 0, n + rt(m) +
|
|
7723
|
-
}, "dflt"),
|
|
7723
|
+
return Ge(l, 0, n + rt(m) + i);
|
|
7724
|
+
}, "dflt"), Yi = (function() {
|
|
7724
7725
|
for (var e = new Int32Array(256), t = 0; t < 256; ++t) {
|
|
7725
7726
|
for (var r = t, n = 9; --n; ) r = (r & 1 && -306674912) ^ r >>> 1;
|
|
7726
7727
|
e[t] = r;
|
|
7727
7728
|
}
|
|
7728
7729
|
return e;
|
|
7729
|
-
})(),
|
|
7730
|
+
})(), zi = s(function() {
|
|
7730
7731
|
var e = -1;
|
|
7731
7732
|
return { p: s(function(t) {
|
|
7732
|
-
for (var r = e, n = 0; n < t.length; ++n) r =
|
|
7733
|
+
for (var r = e, n = 0; n < t.length; ++n) r = Yi[r & 255 ^ t[n]] ^ r >>> 8;
|
|
7733
7734
|
e = r;
|
|
7734
7735
|
}, "p"), d: s(function() {
|
|
7735
7736
|
return ~e;
|
|
7736
7737
|
}, "d") };
|
|
7737
|
-
}, "crc"),
|
|
7738
|
-
if (!
|
|
7739
|
-
var
|
|
7740
|
-
c.set(
|
|
7738
|
+
}, "crc"), tn = s(function(e, t, r, n, i) {
|
|
7739
|
+
if (!i && (i = { l: 1 }, t.dictionary)) {
|
|
7740
|
+
var o = t.dictionary.subarray(-32768), c = new K(o.length + e.length);
|
|
7741
|
+
c.set(o), c.set(e, o.length), e = c, i.w = o.length;
|
|
7741
7742
|
}
|
|
7742
|
-
return
|
|
7743
|
+
return en(e, t.level == null ? 6 : t.level, t.mem == null ? i.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(e.length))) * 1.5) : 20 : 12 + t.mem, r, n, i);
|
|
7743
7744
|
}, "dopt"), Ht = s(function(e, t) {
|
|
7744
7745
|
var r = {};
|
|
7745
7746
|
for (var n in e) r[n] = e[n];
|
|
7746
7747
|
for (var n in t) r[n] = t[n];
|
|
7747
7748
|
return r;
|
|
7748
|
-
}, "mrg"),
|
|
7749
|
-
for (var n = e(),
|
|
7750
|
-
var l = n[c], h =
|
|
7749
|
+
}, "mrg"), rn = s(function(e, t, r) {
|
|
7750
|
+
for (var n = e(), i = e.toString(), o = i.slice(i.indexOf("[") + 1, i.lastIndexOf("]")).replace(/\s+/g, "").split(","), c = 0; c < n.length; ++c) {
|
|
7751
|
+
var l = n[c], h = o[c];
|
|
7751
7752
|
if (typeof l == "function") {
|
|
7752
7753
|
t += ";" + h + "=";
|
|
7753
|
-
var
|
|
7754
|
-
if (l.prototype) if (
|
|
7755
|
-
var m =
|
|
7756
|
-
t +=
|
|
7754
|
+
var g = l.toString();
|
|
7755
|
+
if (l.prototype) if (g.indexOf("[native code]") != -1) {
|
|
7756
|
+
var m = g.indexOf(" ", 8) + 1;
|
|
7757
|
+
t += g.slice(m, g.indexOf("(", m));
|
|
7757
7758
|
} else {
|
|
7758
|
-
t +=
|
|
7759
|
+
t += g;
|
|
7759
7760
|
for (var A in l.prototype) t += ";" + h + ".prototype." + A + "=" + l.prototype[A].toString();
|
|
7760
7761
|
}
|
|
7761
|
-
else t +=
|
|
7762
|
+
else t += g;
|
|
7762
7763
|
} else r[h] = l;
|
|
7763
7764
|
}
|
|
7764
7765
|
return t;
|
|
7765
|
-
}, "wcln"), mt = [],
|
|
7766
|
+
}, "wcln"), mt = [], Ji = s(function(e) {
|
|
7766
7767
|
var t = [];
|
|
7767
7768
|
for (var r in e) e[r].buffer && t.push((e[r] = new e[r].constructor(e[r])).buffer);
|
|
7768
7769
|
return t;
|
|
7769
|
-
}, "cbfs"),
|
|
7770
|
+
}, "cbfs"), Qi = s(function(e, t, r, n) {
|
|
7770
7771
|
if (!mt[r]) {
|
|
7771
|
-
for (var
|
|
7772
|
-
mt[r] = { c:
|
|
7772
|
+
for (var i = "", o = {}, c = e.length - 1, l = 0; l < c; ++l) i = rn(e[l], i, o);
|
|
7773
|
+
mt[r] = { c: rn(e[c], i, o), e: o };
|
|
7773
7774
|
}
|
|
7774
7775
|
var h = Ht({}, mt[r].e);
|
|
7775
|
-
return
|
|
7776
|
-
}, "wrkr"),
|
|
7777
|
-
return [K, ie, Ze, je, qe, et, Dt,
|
|
7778
|
-
}, "bInflt"),
|
|
7779
|
-
return [K, ie, Ze, je, qe, et, lt, Mt,
|
|
7776
|
+
return Vi(mt[r].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + t.toString() + "}", r, h, Ji(h), n);
|
|
7777
|
+
}, "wrkr"), Xi = s(function() {
|
|
7778
|
+
return [K, ie, Ze, je, qe, et, Dt, Kr, Yr, Jr, tt, Qr, fe, ft, he, ht, rt, Ge, X, Xr, qt, Et, nn];
|
|
7779
|
+
}, "bInflt"), Zi = s(function() {
|
|
7780
|
+
return [K, ie, Ze, je, qe, et, lt, Mt, Vr, we, zr, We, tt, Zr, kt, fe, ge, Ke, dt, pt, xt, Ve, Gt, $t, rt, Ge, en, tn, jt, Et];
|
|
7780
7781
|
}, "bDflt"), Et = s(function(e) {
|
|
7781
7782
|
return postMessage(e, [e.buffer]);
|
|
7782
|
-
}, "pbf"),
|
|
7783
|
+
}, "pbf"), nn = s(function(e) {
|
|
7783
7784
|
return e && { out: e.size && new K(e.size), dictionary: e.dictionary };
|
|
7784
|
-
}, "gopt"),
|
|
7785
|
-
var c =
|
|
7786
|
-
c.terminate(),
|
|
7785
|
+
}, "gopt"), on = s(function(e, t, r, n, i, o) {
|
|
7786
|
+
var c = Qi(r, n, i, function(l, h) {
|
|
7787
|
+
c.terminate(), o(l, h);
|
|
7787
7788
|
});
|
|
7788
7789
|
return c.postMessage([e, t], t.consume ? [e.buffer] : []), function() {
|
|
7789
7790
|
c.terminate();
|
|
@@ -7797,76 +7798,76 @@ var qr = fe(ye, 9, 0), Wr = fe(ye, 9, 1), Kr = fe(We, 5, 0), Vr = fe(We, 5, 1),
|
|
|
7797
7798
|
}, "b8"), re = s(function(e, t, r) {
|
|
7798
7799
|
for (; r; ++t) e[t] = r, r >>>= 8;
|
|
7799
7800
|
}, "wbytes");
|
|
7800
|
-
function
|
|
7801
|
-
return r || (r = t, t = {}), typeof r != "function" && X(7),
|
|
7801
|
+
function eo(e, t, r) {
|
|
7802
|
+
return r || (r = t, t = {}), typeof r != "function" && X(7), on(e, t, [Zi], function(n) {
|
|
7802
7803
|
return Et(jt(n.data[0], n.data[1]));
|
|
7803
7804
|
}, 0, r);
|
|
7804
7805
|
}
|
|
7805
|
-
s(
|
|
7806
|
+
s(eo, "deflate");
|
|
7806
7807
|
function jt(e, t) {
|
|
7807
|
-
return
|
|
7808
|
+
return tn(e, t || {}, 0, 0);
|
|
7808
7809
|
}
|
|
7809
7810
|
s(jt, "deflateSync");
|
|
7810
|
-
function
|
|
7811
|
-
return r || (r = t, t = {}), typeof r != "function" && X(7),
|
|
7812
|
-
return Et(qt(n.data[0],
|
|
7811
|
+
function to(e, t, r) {
|
|
7812
|
+
return r || (r = t, t = {}), typeof r != "function" && X(7), on(e, t, [Xi], function(n) {
|
|
7813
|
+
return Et(qt(n.data[0], nn(n.data[1])));
|
|
7813
7814
|
}, 1, r);
|
|
7814
7815
|
}
|
|
7815
|
-
s(
|
|
7816
|
+
s(to, "inflate");
|
|
7816
7817
|
function qt(e, t) {
|
|
7817
|
-
return
|
|
7818
|
+
return Xr(e, { i: 2 }, t && t.out, t && t.dictionary);
|
|
7818
7819
|
}
|
|
7819
7820
|
s(qt, "inflateSync");
|
|
7820
|
-
var
|
|
7821
|
-
for (var
|
|
7822
|
-
var
|
|
7823
|
-
Array.isArray(
|
|
7821
|
+
var sn = s(function(e, t, r, n) {
|
|
7822
|
+
for (var i in e) {
|
|
7823
|
+
var o = e[i], c = t + i, l = n;
|
|
7824
|
+
Array.isArray(o) && (l = Ht(n, o[1]), o = o[0]), o instanceof K ? r[c] = [o, l] : (r[c += "/"] = [new K(0), l], sn(o, c, r, n));
|
|
7824
7825
|
}
|
|
7825
|
-
}, "fltn"),
|
|
7826
|
+
}, "fltn"), an = typeof TextEncoder < "u" && new TextEncoder(), Wt = typeof TextDecoder < "u" && new TextDecoder(), ro = 0;
|
|
7826
7827
|
try {
|
|
7827
|
-
Wt.decode(kt, { stream: true }),
|
|
7828
|
+
Wt.decode(kt, { stream: true }), ro = 1;
|
|
7828
7829
|
} catch {
|
|
7829
7830
|
}
|
|
7830
|
-
var
|
|
7831
|
+
var no = s(function(e) {
|
|
7831
7832
|
for (var t = "", r = 0; ; ) {
|
|
7832
|
-
var n = e[r++],
|
|
7833
|
-
if (r +
|
|
7834
|
-
|
|
7833
|
+
var n = e[r++], i = (n > 127) + (n > 223) + (n > 239);
|
|
7834
|
+
if (r + i > e.length) return { s: t, r: Ge(e, r - 1) };
|
|
7835
|
+
i ? i == 3 ? (n = ((n & 15) << 18 | (e[r++] & 63) << 12 | (e[r++] & 63) << 6 | e[r++] & 63) - 65536, t += String.fromCharCode(55296 | n >> 10, 56320 | n & 1023)) : i & 1 ? t += String.fromCharCode((n & 31) << 6 | e[r++] & 63) : t += String.fromCharCode((n & 15) << 12 | (e[r++] & 63) << 6 | e[r++] & 63) : t += String.fromCharCode(n);
|
|
7835
7836
|
}
|
|
7836
7837
|
}, "dutf8");
|
|
7837
|
-
function
|
|
7838
|
+
function cn(e, t) {
|
|
7838
7839
|
var r;
|
|
7839
|
-
if (
|
|
7840
|
-
for (var n = e.length,
|
|
7841
|
-
o
|
|
7840
|
+
if (an) return an.encode(e);
|
|
7841
|
+
for (var n = e.length, i = new K(e.length + (e.length >> 1)), o = 0, c = s(function(g) {
|
|
7842
|
+
i[o++] = g;
|
|
7842
7843
|
}, "w"), r = 0; r < n; ++r) {
|
|
7843
|
-
if (
|
|
7844
|
-
var l = new K(
|
|
7845
|
-
l.set(
|
|
7844
|
+
if (o + 5 > i.length) {
|
|
7845
|
+
var l = new K(o + 8 + (n - r << 1));
|
|
7846
|
+
l.set(i), i = l;
|
|
7846
7847
|
}
|
|
7847
7848
|
var h = e.charCodeAt(r);
|
|
7848
7849
|
h < 128 || t ? c(h) : h < 2048 ? (c(192 | h >> 6), c(128 | h & 63)) : h > 55295 && h < 57344 ? (h = 65536 + (h & 1047552) | e.charCodeAt(++r) & 1023, c(240 | h >> 18), c(128 | h >> 12 & 63), c(128 | h >> 6 & 63), c(128 | h & 63)) : (c(224 | h >> 12), c(128 | h >> 6 & 63), c(128 | h & 63));
|
|
7849
7850
|
}
|
|
7850
|
-
return Ge(
|
|
7851
|
+
return Ge(i, 0, o);
|
|
7851
7852
|
}
|
|
7852
|
-
s(
|
|
7853
|
-
function
|
|
7853
|
+
s(cn, "strToU8");
|
|
7854
|
+
function io(e, t) {
|
|
7854
7855
|
if (t) {
|
|
7855
7856
|
for (var r = "", n = 0; n < e.length; n += 16384) r += String.fromCharCode.apply(null, e.subarray(n, n + 16384));
|
|
7856
7857
|
return r;
|
|
7857
7858
|
} else {
|
|
7858
7859
|
if (Wt) return Wt.decode(e);
|
|
7859
|
-
var
|
|
7860
|
-
return r.length && X(8),
|
|
7860
|
+
var i = no(e), o = i.s, r = i.r;
|
|
7861
|
+
return r.length && X(8), o;
|
|
7861
7862
|
}
|
|
7862
7863
|
}
|
|
7863
|
-
s(
|
|
7864
|
-
var
|
|
7864
|
+
s(io, "strFromU8");
|
|
7865
|
+
var oo = s(function(e, t) {
|
|
7865
7866
|
return t + 30 + Ie(e, t + 26) + Ie(e, t + 28);
|
|
7866
|
-
}, "slzh"),
|
|
7867
|
-
var n = Ie(e, t + 28),
|
|
7868
|
-
return [Ie(e, t + 10), h,
|
|
7869
|
-
}, "zh"),
|
|
7867
|
+
}, "slzh"), so = s(function(e, t, r) {
|
|
7868
|
+
var n = Ie(e, t + 28), i = io(e.subarray(t + 46, t + 46 + n), !(Ie(e, t + 8) & 2048)), o = t + 46 + n, c = Ee(e, t + 20), l = r && c == 4294967295 ? ao(e, o) : [c, Ee(e, t + 24), Ee(e, t + 42)], h = l[0], g = l[1], m = l[2];
|
|
7869
|
+
return [Ie(e, t + 10), h, g, i, o + Ie(e, t + 30) + Ie(e, t + 32), m];
|
|
7870
|
+
}, "zh"), ao = s(function(e, t) {
|
|
7870
7871
|
for (; Ie(e, t) != 1; t += 4 + Ie(e, t + 2)) ;
|
|
7871
7872
|
return [Ft(e, t + 12), Ft(e, t + 4), Ft(e, t + 20)];
|
|
7872
7873
|
}, "z64e"), Kt = s(function(e) {
|
|
@@ -7876,57 +7877,57 @@ var Zi = s(function(e, t) {
|
|
|
7876
7877
|
n > 65535 && X(9), t += n + 4;
|
|
7877
7878
|
}
|
|
7878
7879
|
return t;
|
|
7879
|
-
}, "exfl"),
|
|
7880
|
-
var h = n.length,
|
|
7881
|
-
re(e, t, c != null ? 33639248 : 67324752), t += 4, c != null && (e[t++] = 20, e[t++] = r.os), e[t] = 20, t += 2, e[t++] = r.flag << 1 | (
|
|
7882
|
-
var
|
|
7883
|
-
if ((O < 0 || O > 119) && X(10), re(e, t, O << 25 |
|
|
7884
|
-
var M =
|
|
7885
|
-
re(e, t, +x), re(e, t + 2,
|
|
7880
|
+
}, "exfl"), un = s(function(e, t, r, n, i, o, c, l) {
|
|
7881
|
+
var h = n.length, g = r.extra, m = l && l.length, A = Kt(g);
|
|
7882
|
+
re(e, t, c != null ? 33639248 : 67324752), t += 4, c != null && (e[t++] = 20, e[t++] = r.os), e[t] = 20, t += 2, e[t++] = r.flag << 1 | (o < 0 && 8), e[t++] = i && 8, e[t++] = r.compression & 255, e[t++] = r.compression >> 8;
|
|
7883
|
+
var b = new Date(r.mtime == null ? Date.now() : r.mtime), O = b.getFullYear() - 1980;
|
|
7884
|
+
if ((O < 0 || O > 119) && X(10), re(e, t, O << 25 | b.getMonth() + 1 << 21 | b.getDate() << 16 | b.getHours() << 11 | b.getMinutes() << 5 | b.getSeconds() >> 1), t += 4, o != -1 && (re(e, t, r.crc), re(e, t + 4, o < 0 ? -o - 2 : o), re(e, t + 8, r.size)), re(e, t + 12, h), re(e, t + 14, A), t += 16, c != null && (re(e, t, m), re(e, t + 6, r.attrs), re(e, t + 10, c), t += 14), e.set(n, t), t += h, A) for (var x in g) {
|
|
7885
|
+
var M = g[x], w = M.length;
|
|
7886
|
+
re(e, t, +x), re(e, t + 2, w), e.set(M, t + 4), t += 4 + w;
|
|
7886
7887
|
}
|
|
7887
7888
|
return m && (e.set(l, t), t += m), t;
|
|
7888
|
-
}, "wzh"),
|
|
7889
|
-
re(e, t, 101010256), re(e, t + 8, r), re(e, t + 10, r), re(e, t + 12, n), re(e, t + 16,
|
|
7889
|
+
}, "wzh"), co = s(function(e, t, r, n, i) {
|
|
7890
|
+
re(e, t, 101010256), re(e, t + 8, r), re(e, t + 10, r), re(e, t + 12, n), re(e, t + 16, i);
|
|
7890
7891
|
}, "wzf");
|
|
7891
|
-
function
|
|
7892
|
+
function uo(e, t, r) {
|
|
7892
7893
|
r || (r = t, t = {}), typeof r != "function" && X(7);
|
|
7893
7894
|
var n = {};
|
|
7894
|
-
|
|
7895
|
-
var
|
|
7896
|
-
for (var
|
|
7897
|
-
}, "tAll"),
|
|
7895
|
+
sn(e, "", n, t);
|
|
7896
|
+
var i = Object.keys(n), o = i.length, c = 0, l = 0, h = o, g = new Array(o), m = [], A = s(function() {
|
|
7897
|
+
for (var w = 0; w < m.length; ++w) m[w]();
|
|
7898
|
+
}, "tAll"), b = s(function(w, C) {
|
|
7898
7899
|
_t(function() {
|
|
7899
|
-
r(
|
|
7900
|
+
r(w, C);
|
|
7900
7901
|
});
|
|
7901
7902
|
}, "cbd");
|
|
7902
7903
|
_t(function() {
|
|
7903
|
-
|
|
7904
|
+
b = r;
|
|
7904
7905
|
});
|
|
7905
7906
|
var O = s(function() {
|
|
7906
|
-
var
|
|
7907
|
+
var w = new K(l + 22), C = c, y = l - c;
|
|
7907
7908
|
l = 0;
|
|
7908
7909
|
for (var B = 0; B < h; ++B) {
|
|
7909
|
-
var L =
|
|
7910
|
+
var L = g[B];
|
|
7910
7911
|
try {
|
|
7911
7912
|
var U = L.c.length;
|
|
7912
|
-
|
|
7913
|
+
un(w, l, L, L.f, L.u, U);
|
|
7913
7914
|
var G = 30 + L.f.length + Kt(L.extra), k = l + G;
|
|
7914
|
-
|
|
7915
|
+
w.set(L.c, k), un(w, c, L, L.f, L.u, U, l, L.m), c += 16 + G + (L.m ? L.m.length : 0), l = k + U;
|
|
7915
7916
|
} catch (a) {
|
|
7916
|
-
return
|
|
7917
|
+
return b(a, null);
|
|
7917
7918
|
}
|
|
7918
7919
|
}
|
|
7919
|
-
|
|
7920
|
+
co(w, c, g.length, y, C), b(null, w);
|
|
7920
7921
|
}, "cbf");
|
|
7921
|
-
|
|
7922
|
-
for (var x = s(function(
|
|
7923
|
-
var
|
|
7922
|
+
o || O();
|
|
7923
|
+
for (var x = s(function(w) {
|
|
7924
|
+
var C = i[w], y = n[C], B = y[0], L = y[1], U = zi(), G = B.length;
|
|
7924
7925
|
U.p(B);
|
|
7925
|
-
var k =
|
|
7926
|
-
if (d) A(),
|
|
7926
|
+
var k = cn(C), a = k.length, u = L.comment, f = u && cn(u), _ = f && f.length, p = Kt(L.extra), I = L.level == 0 ? 0 : 8, T = s(function(d, E) {
|
|
7927
|
+
if (d) A(), b(d, null);
|
|
7927
7928
|
else {
|
|
7928
7929
|
var S = E.length;
|
|
7929
|
-
|
|
7930
|
+
g[w] = Ht(L, { size: G, crc: U.d(), c: E, f: k, m: f, u: a != C.length || f && u.length != _, compression: I }), c += 30 + a + p + S, l += 76 + 2 * (a + p) + (_ || 0) + S, --o || O();
|
|
7930
7931
|
}
|
|
7931
7932
|
}, "cbl");
|
|
7932
7933
|
if (a > 65535 && T(X(11, 0, 1), null), !I) T(null, B);
|
|
@@ -7935,87 +7936,87 @@ function no(e, t, r) {
|
|
|
7935
7936
|
} catch (d) {
|
|
7936
7937
|
T(d, null);
|
|
7937
7938
|
}
|
|
7938
|
-
else m.push(
|
|
7939
|
+
else m.push(eo(B, L, T));
|
|
7939
7940
|
}, "_loop_1"), M = 0; M < h; ++M) x(M);
|
|
7940
7941
|
return A;
|
|
7941
7942
|
}
|
|
7942
|
-
s(
|
|
7943
|
+
s(uo, "zip");
|
|
7943
7944
|
var _t = typeof queueMicrotask == "function" ? queueMicrotask : typeof setTimeout == "function" ? setTimeout : function(e) {
|
|
7944
7945
|
e();
|
|
7945
7946
|
};
|
|
7946
|
-
function
|
|
7947
|
+
function lo(e, t, r) {
|
|
7947
7948
|
r || (r = t, t = {}), typeof r != "function" && X(7);
|
|
7948
|
-
var n = [],
|
|
7949
|
-
for (var
|
|
7950
|
-
}, "tAll"),
|
|
7949
|
+
var n = [], i = s(function() {
|
|
7950
|
+
for (var w = 0; w < n.length; ++w) n[w]();
|
|
7951
|
+
}, "tAll"), o = {}, c = s(function(w, C) {
|
|
7951
7952
|
_t(function() {
|
|
7952
|
-
r(
|
|
7953
|
+
r(w, C);
|
|
7953
7954
|
});
|
|
7954
7955
|
}, "cbd");
|
|
7955
7956
|
_t(function() {
|
|
7956
7957
|
c = r;
|
|
7957
7958
|
});
|
|
7958
|
-
for (var l = e.length - 22; Ee(e, l) != 101010256; --l) if (!l || e.length - l > 65558) return c(X(13, 0, 1), null),
|
|
7959
|
+
for (var l = e.length - 22; Ee(e, l) != 101010256; --l) if (!l || e.length - l > 65558) return c(X(13, 0, 1), null), i;
|
|
7959
7960
|
var h = Ie(e, l + 8);
|
|
7960
7961
|
if (h) {
|
|
7961
|
-
var
|
|
7962
|
+
var g = h, m = Ee(e, l + 16), A = m == 4294967295 || g == 65535;
|
|
7962
7963
|
if (A) {
|
|
7963
|
-
var
|
|
7964
|
-
A = Ee(e,
|
|
7964
|
+
var b = Ee(e, l - 12);
|
|
7965
|
+
A = Ee(e, b) == 101075792, A && (g = h = Ee(e, b + 32), m = Ee(e, b + 48));
|
|
7965
7966
|
}
|
|
7966
|
-
for (var O = t && t.filter, x = s(function(
|
|
7967
|
-
var
|
|
7967
|
+
for (var O = t && t.filter, x = s(function(w) {
|
|
7968
|
+
var C = so(e, m, A), y = C[0], B = C[1], L = C[2], U = C[3], G = C[4], k = C[5], a = oo(e, k);
|
|
7968
7969
|
m = G;
|
|
7969
|
-
var u = s(function(
|
|
7970
|
-
|
|
7970
|
+
var u = s(function(_, p) {
|
|
7971
|
+
_ ? (i(), c(_, null)) : (p && (o[U] = p), --h || c(null, o));
|
|
7971
7972
|
}, "cbl");
|
|
7972
|
-
if (!O || O({ name: U, size: B, originalSize: L, compression:
|
|
7973
|
-
else if (
|
|
7973
|
+
if (!O || O({ name: U, size: B, originalSize: L, compression: y })) if (!y) u(null, Ge(e, a, a + B));
|
|
7974
|
+
else if (y == 8) {
|
|
7974
7975
|
var f = e.subarray(a, a + B);
|
|
7975
7976
|
if (L < 524288 || B > 0.8 * L) try {
|
|
7976
7977
|
u(null, qt(f, { out: new K(L) }));
|
|
7977
|
-
} catch (
|
|
7978
|
-
u(
|
|
7978
|
+
} catch (_) {
|
|
7979
|
+
u(_, null);
|
|
7979
7980
|
}
|
|
7980
|
-
else n.push(
|
|
7981
|
-
} else u(X(14, "unknown compression type " +
|
|
7981
|
+
else n.push(to(f, { size: L }, u));
|
|
7982
|
+
} else u(X(14, "unknown compression type " + y, 1), null);
|
|
7982
7983
|
else u(null, null);
|
|
7983
|
-
}, "_loop_3"), M = 0; M <
|
|
7984
|
+
}, "_loop_3"), M = 0; M < g; ++M) x(M);
|
|
7984
7985
|
} else c(null, {});
|
|
7985
|
-
return
|
|
7986
|
+
return i;
|
|
7986
7987
|
}
|
|
7987
|
-
s(
|
|
7988
|
-
const
|
|
7989
|
-
function
|
|
7990
|
-
return e.filter((t) => !(t.length <
|
|
7988
|
+
s(lo, "unzip");
|
|
7989
|
+
const fo = [/^\/$/, /^\*+$/, /^[0-9]+$/], ho = ["/artifact/", "https://", "http://", "*********"], po = 3;
|
|
7990
|
+
function ln(e) {
|
|
7991
|
+
return e.filter((t) => !(t.length < po || fo.some((r) => r.test(t)) || ho.some((r) => t.includes(r))));
|
|
7991
7992
|
}
|
|
7992
|
-
s(
|
|
7993
|
-
const Ae = Symbol.for("@ts-pattern/matcher"),
|
|
7993
|
+
s(ln, "filterSensitiveValues");
|
|
7994
|
+
const Ae = Symbol.for("@ts-pattern/matcher"), mo = Symbol.for("@ts-pattern/isVariadic"), gt = "@ts-pattern/anonymous-select-key", Vt = s((e) => !!(e && typeof e == "object"), "r"), It = s((e) => e && !!e[Ae], "i"), Se = s((e, t, r) => {
|
|
7994
7995
|
if (It(e)) {
|
|
7995
|
-
const n = e[Ae](), { matched:
|
|
7996
|
-
return
|
|
7996
|
+
const n = e[Ae](), { matched: i, selections: o } = n.match(t);
|
|
7997
|
+
return i && o && Object.keys(o).forEach((c) => r(c, o[c])), i;
|
|
7997
7998
|
}
|
|
7998
7999
|
if (Vt(e)) {
|
|
7999
8000
|
if (!Vt(t)) return false;
|
|
8000
8001
|
if (Array.isArray(e)) {
|
|
8001
8002
|
if (!Array.isArray(t)) return false;
|
|
8002
|
-
let n = [],
|
|
8003
|
+
let n = [], i = [], o = [];
|
|
8003
8004
|
for (const c of e.keys()) {
|
|
8004
8005
|
const l = e[c];
|
|
8005
|
-
It(l) && l[
|
|
8006
|
+
It(l) && l[mo] ? o.push(l) : o.length ? i.push(l) : n.push(l);
|
|
8006
8007
|
}
|
|
8007
|
-
if (
|
|
8008
|
-
if (
|
|
8009
|
-
if (t.length < n.length +
|
|
8010
|
-
const c = t.slice(0, n.length), l =
|
|
8011
|
-
return n.every((
|
|
8008
|
+
if (o.length) {
|
|
8009
|
+
if (o.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
|
|
8010
|
+
if (t.length < n.length + i.length) return false;
|
|
8011
|
+
const c = t.slice(0, n.length), l = i.length === 0 ? [] : t.slice(-i.length), h = t.slice(n.length, i.length === 0 ? 1 / 0 : -i.length);
|
|
8012
|
+
return n.every((g, m) => Se(g, c[m], r)) && i.every((g, m) => Se(g, l[m], r)) && (o.length === 0 || Se(o[0], h, r));
|
|
8012
8013
|
}
|
|
8013
8014
|
return e.length === t.length && e.every((c, l) => Se(c, t[l], r));
|
|
8014
8015
|
}
|
|
8015
8016
|
return Reflect.ownKeys(e).every((n) => {
|
|
8016
|
-
const
|
|
8017
|
-
return (n in t || It(
|
|
8018
|
-
var
|
|
8017
|
+
const i = e[n];
|
|
8018
|
+
return (n in t || It(o = i) && o[Ae]().matcherType === "optional") && Se(i, t[n], r);
|
|
8019
|
+
var o;
|
|
8019
8020
|
});
|
|
8020
8021
|
}
|
|
8021
8022
|
return Object.is(t, e);
|
|
@@ -8024,57 +8025,57 @@ const Ae = Symbol.for("@ts-pattern/matcher"), co = Symbol.for("@ts-pattern/isVar
|
|
|
8024
8025
|
return Vt(e) ? It(e) ? (t = (r = (n = e[Ae]()).getSelectionKeys) == null ? void 0 : r.call(n)) != null ? t : [] : Array.isArray(e) ? nt(e, Oe) : nt(Object.values(e), Oe) : [];
|
|
8025
8026
|
}, "s"), nt = s((e, t) => e.reduce((r, n) => r.concat(t(n)), []), "c");
|
|
8026
8027
|
function ae(e) {
|
|
8027
|
-
return Object.assign(e, { optional: s(() =>
|
|
8028
|
+
return Object.assign(e, { optional: s(() => Eo(e), "optional"), and: s((t) => Y(e, t), "and"), or: s((t) => _o(e, t), "or"), select: s((t) => t === void 0 ? fn(e) : fn(t, e), "select") });
|
|
8028
8029
|
}
|
|
8029
8030
|
s(ae, "a");
|
|
8030
|
-
function
|
|
8031
|
+
function Eo(e) {
|
|
8031
8032
|
return ae({ [Ae]: () => ({ match: s((t) => {
|
|
8032
8033
|
let r = {};
|
|
8033
|
-
const n = s((
|
|
8034
|
-
r[
|
|
8034
|
+
const n = s((i, o) => {
|
|
8035
|
+
r[i] = o;
|
|
8035
8036
|
}, "r2");
|
|
8036
|
-
return t === void 0 ? (Oe(e).forEach((
|
|
8037
|
+
return t === void 0 ? (Oe(e).forEach((i) => n(i, void 0)), { matched: true, selections: r }) : { matched: Se(e, t, n), selections: r };
|
|
8037
8038
|
}, "match"), getSelectionKeys: s(() => Oe(e), "getSelectionKeys"), matcherType: "optional" }) });
|
|
8038
8039
|
}
|
|
8039
|
-
s(
|
|
8040
|
+
s(Eo, "h");
|
|
8040
8041
|
function Y(...e) {
|
|
8041
8042
|
return ae({ [Ae]: () => ({ match: s((t) => {
|
|
8042
8043
|
let r = {};
|
|
8043
|
-
const n = s((
|
|
8044
|
-
r[
|
|
8044
|
+
const n = s((i, o) => {
|
|
8045
|
+
r[i] = o;
|
|
8045
8046
|
}, "r2");
|
|
8046
|
-
return { matched: e.every((
|
|
8047
|
+
return { matched: e.every((i) => Se(i, t, n)), selections: r };
|
|
8047
8048
|
}, "match"), getSelectionKeys: s(() => nt(e, Oe), "getSelectionKeys"), matcherType: "and" }) });
|
|
8048
8049
|
}
|
|
8049
8050
|
s(Y, "d");
|
|
8050
|
-
function
|
|
8051
|
+
function _o(...e) {
|
|
8051
8052
|
return ae({ [Ae]: () => ({ match: s((t) => {
|
|
8052
8053
|
let r = {};
|
|
8053
|
-
const n = s((
|
|
8054
|
-
r[
|
|
8054
|
+
const n = s((i, o) => {
|
|
8055
|
+
r[i] = o;
|
|
8055
8056
|
}, "r2");
|
|
8056
|
-
return nt(e, Oe).forEach((
|
|
8057
|
+
return nt(e, Oe).forEach((i) => n(i, void 0)), { matched: e.some((i) => Se(i, t, n)), selections: r };
|
|
8057
8058
|
}, "match"), getSelectionKeys: s(() => nt(e, Oe), "getSelectionKeys"), matcherType: "or" }) });
|
|
8058
8059
|
}
|
|
8059
|
-
s(
|
|
8060
|
+
s(_o, "y");
|
|
8060
8061
|
function W(e) {
|
|
8061
8062
|
return { [Ae]: () => ({ match: s((t) => ({ matched: !!e(t) }), "match") }) };
|
|
8062
8063
|
}
|
|
8063
8064
|
s(W, "p");
|
|
8064
|
-
function
|
|
8065
|
+
function fn(...e) {
|
|
8065
8066
|
const t = typeof e[0] == "string" ? e[0] : void 0, r = e.length === 2 ? e[1] : typeof e[0] == "string" ? void 0 : e[0];
|
|
8066
8067
|
return ae({ [Ae]: () => ({ match: s((n) => {
|
|
8067
|
-
let
|
|
8068
|
-
return { matched: r === void 0 || Se(r, n, (
|
|
8069
|
-
o
|
|
8070
|
-
}), selections:
|
|
8068
|
+
let i = { [t ?? gt]: n };
|
|
8069
|
+
return { matched: r === void 0 || Se(r, n, (o, c) => {
|
|
8070
|
+
i[o] = c;
|
|
8071
|
+
}), selections: i };
|
|
8071
8072
|
}, "match"), getSelectionKeys: s(() => [t ?? gt].concat(r === void 0 ? [] : Oe(r)), "getSelectionKeys") }) });
|
|
8072
8073
|
}
|
|
8073
|
-
s(
|
|
8074
|
-
function
|
|
8074
|
+
s(fn, "v");
|
|
8075
|
+
function hn(e) {
|
|
8075
8076
|
return true;
|
|
8076
8077
|
}
|
|
8077
|
-
s(
|
|
8078
|
+
s(hn, "b");
|
|
8078
8079
|
function Re(e) {
|
|
8079
8080
|
return typeof e == "number";
|
|
8080
8081
|
}
|
|
@@ -8083,28 +8084,28 @@ function Le(e) {
|
|
|
8083
8084
|
return typeof e == "string";
|
|
8084
8085
|
}
|
|
8085
8086
|
s(Le, "S");
|
|
8086
|
-
function
|
|
8087
|
+
function Pe(e) {
|
|
8087
8088
|
return typeof e == "bigint";
|
|
8088
8089
|
}
|
|
8089
|
-
s(
|
|
8090
|
-
const
|
|
8091
|
-
return
|
|
8090
|
+
s(Pe, "j"), ae(W(hn)), ae(W(hn));
|
|
8091
|
+
const Ne = s((e) => Object.assign(ae(e), { startsWith: s((t) => {
|
|
8092
|
+
return Ne(Y(e, (r = t, W((n) => Le(n) && n.startsWith(r)))));
|
|
8092
8093
|
var r;
|
|
8093
8094
|
}, "startsWith"), endsWith: s((t) => {
|
|
8094
|
-
return
|
|
8095
|
+
return Ne(Y(e, (r = t, W((n) => Le(n) && n.endsWith(r)))));
|
|
8095
8096
|
var r;
|
|
8096
|
-
}, "endsWith"), minLength: s((t) =>
|
|
8097
|
-
return
|
|
8097
|
+
}, "endsWith"), minLength: s((t) => Ne(Y(e, ((r) => W((n) => Le(n) && n.length >= r))(t))), "minLength"), length: s((t) => Ne(Y(e, ((r) => W((n) => Le(n) && n.length === r))(t))), "length"), maxLength: s((t) => Ne(Y(e, ((r) => W((n) => Le(n) && n.length <= r))(t))), "maxLength"), includes: s((t) => {
|
|
8098
|
+
return Ne(Y(e, (r = t, W((n) => Le(n) && n.includes(r)))));
|
|
8098
8099
|
var r;
|
|
8099
8100
|
}, "includes"), regex: s((t) => {
|
|
8100
|
-
return
|
|
8101
|
+
return Ne(Y(e, (r = t, W((n) => Le(n) && !!n.match(r)))));
|
|
8101
8102
|
var r;
|
|
8102
8103
|
}, "regex") }), "x");
|
|
8103
|
-
|
|
8104
|
-
const Te = s((e) => Object.assign(ae(e), { between: s((t, r) => Te(Y(e, ((n,
|
|
8104
|
+
Ne(W(Le));
|
|
8105
|
+
const Te = s((e) => Object.assign(ae(e), { between: s((t, r) => Te(Y(e, ((n, i) => W((o) => Re(o) && n <= o && i >= o))(t, r))), "between"), lt: s((t) => Te(Y(e, ((r) => W((n) => Re(n) && n < r))(t))), "lt"), gt: s((t) => Te(Y(e, ((r) => W((n) => Re(n) && n > r))(t))), "gt"), lte: s((t) => Te(Y(e, ((r) => W((n) => Re(n) && n <= r))(t))), "lte"), gte: s((t) => Te(Y(e, ((r) => W((n) => Re(n) && n >= r))(t))), "gte"), int: s(() => Te(Y(e, W((t) => Re(t) && Number.isInteger(t)))), "int"), finite: s(() => Te(Y(e, W((t) => Re(t) && Number.isFinite(t)))), "finite"), positive: s(() => Te(Y(e, W((t) => Re(t) && t > 0))), "positive"), negative: s(() => Te(Y(e, W((t) => Re(t) && t < 0))), "negative") }), "N");
|
|
8105
8106
|
Te(W(Re));
|
|
8106
|
-
const De = s((e) => Object.assign(ae(e), { between: s((t, r) => De(Y(e, ((n,
|
|
8107
|
-
De(W(
|
|
8107
|
+
const De = s((e) => Object.assign(ae(e), { between: s((t, r) => De(Y(e, ((n, i) => W((o) => Pe(o) && n <= o && i >= o))(t, r))), "between"), lt: s((t) => De(Y(e, ((r) => W((n) => Pe(n) && n < r))(t))), "lt"), gt: s((t) => De(Y(e, ((r) => W((n) => Pe(n) && n > r))(t))), "gt"), lte: s((t) => De(Y(e, ((r) => W((n) => Pe(n) && n <= r))(t))), "lte"), gte: s((t) => De(Y(e, ((r) => W((n) => Pe(n) && n >= r))(t))), "gte"), positive: s(() => De(Y(e, W((t) => Pe(t) && t > 0))), "positive"), negative: s(() => De(Y(e, W((t) => Pe(t) && t < 0))), "negative") }), "k");
|
|
8108
|
+
De(W(Pe)), ae(W(function(e) {
|
|
8108
8109
|
return typeof e == "boolean";
|
|
8109
8110
|
})), ae(W(function(e) {
|
|
8110
8111
|
return typeof e == "symbol";
|
|
@@ -8113,7 +8114,7 @@ De(W(Ne)), ae(W(function(e) {
|
|
|
8113
8114
|
})), ae(W(function(e) {
|
|
8114
8115
|
return e != null;
|
|
8115
8116
|
}));
|
|
8116
|
-
class
|
|
8117
|
+
class go extends Error {
|
|
8117
8118
|
static {
|
|
8118
8119
|
s(this, "I");
|
|
8119
8120
|
}
|
|
@@ -8128,10 +8129,10 @@ class fo extends Error {
|
|
|
8128
8129
|
}
|
|
8129
8130
|
}
|
|
8130
8131
|
const Yt = { matched: false, value: void 0 };
|
|
8131
|
-
function
|
|
8132
|
+
function Io(e) {
|
|
8132
8133
|
return new vt(e, Yt);
|
|
8133
8134
|
}
|
|
8134
|
-
s(
|
|
8135
|
+
s(Io, "M");
|
|
8135
8136
|
class vt {
|
|
8136
8137
|
static {
|
|
8137
8138
|
s(this, "R");
|
|
@@ -8142,12 +8143,12 @@ class vt {
|
|
|
8142
8143
|
with(...t) {
|
|
8143
8144
|
if (this.state.matched) return this;
|
|
8144
8145
|
const r = t[t.length - 1], n = [t[0]];
|
|
8145
|
-
let
|
|
8146
|
-
t.length === 3 && typeof t[1] == "function" ?
|
|
8147
|
-
let
|
|
8148
|
-
const l = s((
|
|
8149
|
-
|
|
8150
|
-
}, "u2"), h = !n.some((
|
|
8146
|
+
let i;
|
|
8147
|
+
t.length === 3 && typeof t[1] == "function" ? i = t[1] : t.length > 2 && n.push(...t.slice(1, t.length - 1));
|
|
8148
|
+
let o = false, c = {};
|
|
8149
|
+
const l = s((g, m) => {
|
|
8150
|
+
o = true, c[g] = m;
|
|
8151
|
+
}, "u2"), h = !n.some((g) => Se(g, this.input, l)) || i && !i(this.input) ? Yt : { matched: true, value: r(o ? gt in c ? c[gt] : c : this.input, this.input) };
|
|
8151
8152
|
return new vt(this.input, h);
|
|
8152
8153
|
}
|
|
8153
8154
|
when(t, r) {
|
|
@@ -8158,7 +8159,7 @@ class vt {
|
|
|
8158
8159
|
otherwise(t) {
|
|
8159
8160
|
return this.state.matched ? this.state.value : t(this.input);
|
|
8160
8161
|
}
|
|
8161
|
-
exhaustive(t =
|
|
8162
|
+
exhaustive(t = So) {
|
|
8162
8163
|
return this.state.matched ? this.state.value : t(this.input);
|
|
8163
8164
|
}
|
|
8164
8165
|
run() {
|
|
@@ -8171,74 +8172,92 @@ class vt {
|
|
|
8171
8172
|
return this;
|
|
8172
8173
|
}
|
|
8173
8174
|
}
|
|
8174
|
-
function
|
|
8175
|
-
throw new
|
|
8175
|
+
function So(e) {
|
|
8176
|
+
throw new go(e);
|
|
8176
8177
|
}
|
|
8177
|
-
s(
|
|
8178
|
-
const
|
|
8179
|
-
function
|
|
8180
|
-
return e.reduce((r, n) => r.replaceAll(n,
|
|
8178
|
+
s(So, "F");
|
|
8179
|
+
const Ro = "[REDACTED]", To = /* @__PURE__ */ new Set(["sha1", "_sha1", "pageref", "downloadsPath", "tracesDir", "pageId"]);
|
|
8180
|
+
function se({ sensitiveValues: e, str: t }) {
|
|
8181
|
+
return e.reduce((r, n) => r.replaceAll(n, Ro), t);
|
|
8181
8182
|
}
|
|
8182
|
-
s(
|
|
8183
|
-
function
|
|
8183
|
+
s(se, "scrubString");
|
|
8184
|
+
function yo(e) {
|
|
8184
8185
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
8185
8186
|
}
|
|
8186
|
-
s(
|
|
8187
|
+
s(yo, "isRecord");
|
|
8187
8188
|
function it({ sensitiveValues: e, value: t }) {
|
|
8188
|
-
return typeof t == "string" ?
|
|
8189
|
+
return typeof t == "string" ? se({ sensitiveValues: e, str: t }) : Array.isArray(t) ? t.map((r) => it({ sensitiveValues: e, value: r })) : yo(t) ? $e({ obj: t, sensitiveValues: e }) : t;
|
|
8189
8190
|
}
|
|
8190
8191
|
s(it, "scrubValue");
|
|
8191
|
-
function
|
|
8192
|
-
return
|
|
8192
|
+
function wo(e) {
|
|
8193
|
+
return To.has(e) ? true : e.toLowerCase().endsWith("sha1");
|
|
8193
8194
|
}
|
|
8194
|
-
s(
|
|
8195
|
+
s(wo, "shouldPreserveKey");
|
|
8195
8196
|
function $e({ obj: e, sensitiveValues: t }) {
|
|
8196
|
-
return Object.fromEntries(Object.entries(e).map(([r, n]) => [r,
|
|
8197
|
+
return Object.fromEntries(Object.entries(e).map(([r, n]) => [r, wo(r) ? n : it({ sensitiveValues: t, value: n })]));
|
|
8197
8198
|
}
|
|
8198
8199
|
s($e, "scrubObject");
|
|
8199
|
-
function
|
|
8200
|
-
return
|
|
8200
|
+
function dn({ error: e, sensitiveValues: t }) {
|
|
8201
|
+
return e ? { ...e, message: se({ sensitiveValues: t, str: e.message }) } : void 0;
|
|
8201
8202
|
}
|
|
8202
|
-
s(
|
|
8203
|
-
function
|
|
8203
|
+
s(dn, "scrubError");
|
|
8204
|
+
function Ao({ event: e, sensitiveValues: t }) {
|
|
8205
|
+
return Io(e).with({ type: "console" }, (r) => ({ ...r, args: r.args?.map((n) => ({ ...n, preview: se({ sensitiveValues: t, str: n.preview }), value: it({ sensitiveValues: t, value: n.value }) })), text: se({ sensitiveValues: t, str: r.text }) })).with({ type: "before" }, (r) => ({ ...r, params: $e({ obj: r.params, sensitiveValues: t }), title: r.title ? se({ sensitiveValues: t, str: r.title }) : void 0 })).with({ type: "after" }, (r) => ({ ...r, error: dn({ error: r.error, sensitiveValues: t }), result: r.result !== void 0 ? it({ sensitiveValues: t, value: r.result }) : void 0 })).with({ type: "action" }, (r) => ({ ...r, error: dn({ error: r.error, sensitiveValues: t }), params: $e({ obj: r.params, sensitiveValues: t }), result: r.result !== void 0 ? it({ sensitiveValues: t, value: r.result }) : void 0, title: r.title ? se({ sensitiveValues: t, str: r.title }) : void 0 })).with({ type: "event" }, (r) => ({ ...r, params: $e({ obj: r.params, sensitiveValues: t }) })).with({ type: "stdout" }, { type: "stderr" }, (r) => ({ ...r, text: r.text !== void 0 ? se({ sensitiveValues: t, str: r.text }) : void 0 })).with({ type: "error" }, (r) => ({ ...r, message: se({ sensitiveValues: t, str: r.message }) })).with({ type: "log" }, (r) => ({ ...r, message: se({ sensitiveValues: t, str: r.message }) })).with({ type: "context-options" }, (r) => ({ ...r, options: $e({ obj: r.options, sensitiveValues: t }), title: r.title ? se({ sensitiveValues: t, str: r.title }) : void 0 })).with({ type: "frame-snapshot" }, (r) => ({ ...r, snapshot: $e({ obj: r.snapshot, sensitiveValues: t }) })).with({ type: "resource-snapshot" }, (r) => ({ ...r, snapshot: $e({ obj: r.snapshot, sensitiveValues: t }) })).with({ type: "screencast-frame" }, { type: "input" }, (r) => r).exhaustive();
|
|
8206
|
+
}
|
|
8207
|
+
s(Ao, "scrubTraceEvent");
|
|
8208
|
+
function vo({ content: e, sensitiveValues: t }) {
|
|
8204
8209
|
const r = new TextDecoder$1(), n = new TextEncoder$1(), c = r.decode(e).split(`
|
|
8205
8210
|
`).map((l) => {
|
|
8206
8211
|
if (!l.trim()) return l;
|
|
8207
8212
|
try {
|
|
8208
|
-
const h = JSON.parse(l),
|
|
8209
|
-
return JSON.stringify(
|
|
8213
|
+
const h = JSON.parse(l), g = Ao({ event: h, sensitiveValues: t });
|
|
8214
|
+
return JSON.stringify(g);
|
|
8210
8215
|
} catch {
|
|
8211
|
-
return
|
|
8216
|
+
return se({ sensitiveValues: t, str: l });
|
|
8212
8217
|
}
|
|
8213
8218
|
});
|
|
8214
8219
|
return n.encode(c.join(`
|
|
8215
8220
|
`));
|
|
8216
8221
|
}
|
|
8217
|
-
s(
|
|
8218
|
-
function
|
|
8219
|
-
const r = new TextDecoder$1(), n = new TextEncoder$1(),
|
|
8220
|
-
return n.encode(
|
|
8222
|
+
s(vo, "scrubJsonLinesFile");
|
|
8223
|
+
function pn({ content: e, sensitiveValues: t }) {
|
|
8224
|
+
const r = new TextDecoder$1(), n = new TextEncoder$1(), i = se({ sensitiveValues: t, str: r.decode(e) });
|
|
8225
|
+
return n.encode(i);
|
|
8221
8226
|
}
|
|
8222
|
-
s(
|
|
8223
|
-
const
|
|
8224
|
-
async function
|
|
8225
|
-
const r =
|
|
8227
|
+
s(pn, "scrubTextFile");
|
|
8228
|
+
const bo = promisify(lo), Co = promisify(uo);
|
|
8229
|
+
async function zt({ sensitiveValues: e, traceBuffer: t }) {
|
|
8230
|
+
const r = ln(e);
|
|
8226
8231
|
if (r.length === 0) return new Uint8Array(t);
|
|
8227
|
-
const n = r.sort((h,
|
|
8228
|
-
return
|
|
8232
|
+
const n = [...r].sort((h, g) => g.length - h.length), i = await bo(new Uint8Array(t)), o = Object.entries(i), c = await Promise.all(o.map(async ([h, g]) => [h, await Uo({ content: g, filename: h, sensitiveValues: n })])), l = Object.fromEntries(c);
|
|
8233
|
+
return Co(l);
|
|
8229
8234
|
}
|
|
8230
|
-
s(
|
|
8231
|
-
async function
|
|
8235
|
+
s(zt, "scrubTrace");
|
|
8236
|
+
async function Uo({ content: e, filename: t, sensitiveValues: r }) {
|
|
8232
8237
|
const n = t.toLowerCase();
|
|
8233
|
-
return n.endsWith(".trace") || n.endsWith(".network") ?
|
|
8234
|
-
}
|
|
8235
|
-
s(
|
|
8236
|
-
async function
|
|
8237
|
-
return await
|
|
8238
|
-
}
|
|
8239
|
-
s(
|
|
8240
|
-
|
|
8241
|
-
|
|
8238
|
+
return n.endsWith(".trace") || n.endsWith(".network") ? vo({ content: e, sensitiveValues: r }) : n.endsWith(".html") || n.endsWith(".dat") || n.endsWith(".json") ? pn({ content: e, sensitiveValues: r }) : n.startsWith("resources/") ? Bo({ content: e, sensitiveValues: r }) : e;
|
|
8239
|
+
}
|
|
8240
|
+
s(Uo, "scrubFile");
|
|
8241
|
+
async function Bo({ content: e, sensitiveValues: t }) {
|
|
8242
|
+
return await Ki.isBinaryFile(Buffer.from(e)) ? e : pn({ content: e, sensitiveValues: t });
|
|
8243
|
+
}
|
|
8244
|
+
s(Bo, "scrubResourceFile");
|
|
8245
|
+
async function Oo({ sensitiveValues: e, tracePath: t }) {
|
|
8246
|
+
const r = [], n = createReadStream(t);
|
|
8247
|
+
for await (const o of n) r.push(Uint8Array.from(o));
|
|
8248
|
+
const i = new Uint8Array(Buffer.concat(r));
|
|
8249
|
+
return zt({ sensitiveValues: e, traceBuffer: i });
|
|
8250
|
+
}
|
|
8251
|
+
s(Oo, "scrubTraceFromPath");
|
|
8252
|
+
async function Lo({ sensitiveValues: e, traceFd: t, tracePath: r }) {
|
|
8253
|
+
const n = [], i = createReadStream(r, { autoClose: true, fd: t });
|
|
8254
|
+
for await (const c of i) n.push(Uint8Array.from(c));
|
|
8255
|
+
const o = new Uint8Array(Buffer.concat(n));
|
|
8256
|
+
return zt({ sensitiveValues: e, traceBuffer: o });
|
|
8257
|
+
}
|
|
8258
|
+
s(Lo, "scrubTraceFromFd");
|
|
8259
|
+
const mn = { AUTHENTICATION_FAILED: 1008 };
|
|
8260
|
+
class Po {
|
|
8242
8261
|
static {
|
|
8243
8262
|
s(this, "WebSocketClient");
|
|
8244
8263
|
}
|
|
@@ -8257,8 +8276,8 @@ class vo {
|
|
|
8257
8276
|
isManualClose = false;
|
|
8258
8277
|
isAuthenticated = false;
|
|
8259
8278
|
authenticationFailed = false;
|
|
8260
|
-
constructor({ apiKey: t, maxBufferSize: r = 1e3, maxReconnectAttempts: n = 3, onError:
|
|
8261
|
-
this.url = h, this.apiKey = t, this.projectId = c, this.maxBufferSize = r, this.reconnectDelay = l, this.maxReconnectAttempts = n, this.onMessage =
|
|
8279
|
+
constructor({ apiKey: t, maxBufferSize: r = 1e3, maxReconnectAttempts: n = 3, onError: i, onMessage: o, projectId: c, reconnectDelay: l = 2e3, url: h }) {
|
|
8280
|
+
this.url = h, this.apiKey = t, this.projectId = c, this.maxBufferSize = r, this.reconnectDelay = l, this.maxReconnectAttempts = n, this.onMessage = o, this.onError = i, this.connect();
|
|
8262
8281
|
}
|
|
8263
8282
|
connect() {
|
|
8264
8283
|
try {
|
|
@@ -8267,12 +8286,12 @@ class vo {
|
|
|
8267
8286
|
this.reconnectAttempts = 0;
|
|
8268
8287
|
}), this.socket.on("message", (r) => {
|
|
8269
8288
|
try {
|
|
8270
|
-
const n = typeof r == "string" ? r : r.toString(),
|
|
8271
|
-
|
|
8289
|
+
const n = typeof r == "string" ? r : r.toString(), i = JSON.parse(n);
|
|
8290
|
+
i.type === "connected" ? (this.isAuthenticated = true, this.authenticationFailed = false, this.flushBuffer()) : this.onMessage && this.onMessage(i);
|
|
8272
8291
|
} catch {
|
|
8273
8292
|
}
|
|
8274
8293
|
}), this.socket.on("close", (r, n) => {
|
|
8275
|
-
this.isAuthenticated = false, r ===
|
|
8294
|
+
this.isAuthenticated = false, r === mn.AUTHENTICATION_FAILED && (this.authenticationFailed = true, this.onError && this.onError({ code: r, message: n.toString() || "Authentication failed", reason: n.toString() })), !this.isManualClose && !this.authenticationFailed && this.reconnectAttempts < this.maxReconnectAttempts && this.scheduleReconnect();
|
|
8276
8295
|
}), this.socket.on("error", () => {
|
|
8277
8296
|
});
|
|
8278
8297
|
} catch {
|
|
@@ -8290,8 +8309,8 @@ class vo {
|
|
|
8290
8309
|
this.buffer = [];
|
|
8291
8310
|
for (const r of t) try {
|
|
8292
8311
|
const n = JSON.stringify(r);
|
|
8293
|
-
this.socket.send(n, (
|
|
8294
|
-
|
|
8312
|
+
this.socket.send(n, (i) => {
|
|
8313
|
+
i && this.bufferEvent(r);
|
|
8295
8314
|
});
|
|
8296
8315
|
} catch {
|
|
8297
8316
|
this.bufferEvent(r);
|
|
@@ -8327,268 +8346,268 @@ class vo {
|
|
|
8327
8346
|
return [...this.buffer];
|
|
8328
8347
|
}
|
|
8329
8348
|
}
|
|
8330
|
-
var
|
|
8349
|
+
var No = { detect({ env: e }) {
|
|
8331
8350
|
return !!e.APPVEYOR;
|
|
8332
8351
|
}, configuration({ env: e }) {
|
|
8333
8352
|
const t = e.APPVEYOR_PULL_REQUEST_NUMBER, r = !!t;
|
|
8334
8353
|
return { name: "Appveyor", service: "appveyor", commit: e.APPVEYOR_REPO_COMMIT, tag: e.APPVEYOR_REPO_TAG_NAME, build: e.APPVEYOR_BUILD_NUMBER, buildUrl: `https://ci.appveyor.com/project/${e.APPVEYOR_PROJECT_SLUG}/build/${e.APPVEYOR_BUILD_VERSION}`, branch: e.APPVEYOR_REPO_BRANCH, job: e.APPVEYOR_JOB_NUMBER, jobUrl: `https://ci.appveyor.com/project/${e.APPVEYOR_PROJECT_SLUG}/build/job/${e.APPVEYOR_JOB_ID}`, pr: t, isPr: r, prBranch: e.APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH, slug: e.APPVEYOR_REPO_NAME, root: e.APPVEYOR_BUILD_FOLDER };
|
|
8335
8354
|
} };
|
|
8336
|
-
function
|
|
8355
|
+
function En(e) {
|
|
8337
8356
|
return (/\d+(?!.*\d+)/.exec(e) || [])[0];
|
|
8338
8357
|
}
|
|
8339
|
-
s(
|
|
8358
|
+
s(En, "prNumber");
|
|
8340
8359
|
function ot(e) {
|
|
8341
8360
|
return e ? /^(?:refs\/heads\/)?(?<branch>.+)$/i.exec(e)[1] : void 0;
|
|
8342
8361
|
}
|
|
8343
8362
|
s(ot, "parseBranch");
|
|
8344
|
-
var
|
|
8363
|
+
var Do = { detect({ env: e }) {
|
|
8345
8364
|
return !!e.BUILD_BUILDURI;
|
|
8346
8365
|
}, configuration({ env: e }) {
|
|
8347
8366
|
const t = e.SYSTEM_PULLREQUEST_PULLREQUESTID, r = !!t;
|
|
8348
8367
|
return { name: "Azure Pipelines", service: "azurePipelines", commit: e.BUILD_SOURCEVERSION, build: e.BUILD_BUILDNUMBER, branch: ot(r ? e.SYSTEM_PULLREQUEST_TARGETBRANCH : e.BUILD_SOURCEBRANCH), pr: t, isPr: r, prBranch: ot(r ? e.SYSTEM_PULLREQUEST_SOURCEBRANCH : void 0), root: e.BUILD_REPOSITORY_LOCALPATH };
|
|
8349
|
-
} },
|
|
8368
|
+
} }, Mo = { detect({ env: e }) {
|
|
8350
8369
|
return !!e.bamboo_agentId;
|
|
8351
8370
|
}, configuration({ env: e }) {
|
|
8352
8371
|
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 };
|
|
8353
|
-
} },
|
|
8372
|
+
} }, xo = { detect({ env: e }) {
|
|
8354
8373
|
return !!e.BITBUCKET_BUILD_NUMBER;
|
|
8355
8374
|
}, configuration({ env: e }) {
|
|
8356
8375
|
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 };
|
|
8357
|
-
} },
|
|
8376
|
+
} }, Go = { detect({ env: e }) {
|
|
8358
8377
|
return !!e.BITRISE_IO;
|
|
8359
8378
|
}, configuration({ env: e }) {
|
|
8360
8379
|
const t = e.BITRISE_PULL_REQUEST === "false" ? void 0 : e.BITRISE_PULL_REQUEST, r = !!t;
|
|
8361
8380
|
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 };
|
|
8362
|
-
} },
|
|
8381
|
+
} }, $o = { detect({ env: e }) {
|
|
8363
8382
|
return !!e.BUDDY_WORKSPACE_ID;
|
|
8364
8383
|
}, configuration({ env: e }) {
|
|
8365
|
-
const t =
|
|
8384
|
+
const t = En(e.BUDDY_EXECUTION_PULL_REQUEST_ID), r = !!t;
|
|
8366
8385
|
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 };
|
|
8367
|
-
} }, ke = { exports: {} },
|
|
8368
|
-
function
|
|
8369
|
-
if (
|
|
8370
|
-
|
|
8386
|
+
} }, ke = { exports: {} }, Jt, _n;
|
|
8387
|
+
function ko() {
|
|
8388
|
+
if (_n) return Jt;
|
|
8389
|
+
_n = 1, Jt = n, n.sync = i;
|
|
8371
8390
|
var e = ze;
|
|
8372
|
-
function t(
|
|
8391
|
+
function t(o, c) {
|
|
8373
8392
|
var l = c.pathExt !== void 0 ? c.pathExt : process.env.PATHEXT;
|
|
8374
8393
|
if (!l || (l = l.split(";"), l.indexOf("") !== -1)) return true;
|
|
8375
8394
|
for (var h = 0; h < l.length; h++) {
|
|
8376
|
-
var
|
|
8377
|
-
if (
|
|
8395
|
+
var g = l[h].toLowerCase();
|
|
8396
|
+
if (g && o.substr(-g.length).toLowerCase() === g) return true;
|
|
8378
8397
|
}
|
|
8379
8398
|
return false;
|
|
8380
8399
|
}
|
|
8381
8400
|
s(t, "checkPathExt");
|
|
8382
|
-
function r(
|
|
8383
|
-
return !
|
|
8401
|
+
function r(o, c, l) {
|
|
8402
|
+
return !o.isSymbolicLink() && !o.isFile() ? false : t(c, l);
|
|
8384
8403
|
}
|
|
8385
8404
|
s(r, "checkStat");
|
|
8386
|
-
function n(
|
|
8387
|
-
e.stat(
|
|
8388
|
-
l(h, h ? false : r(
|
|
8405
|
+
function n(o, c, l) {
|
|
8406
|
+
e.stat(o, function(h, g) {
|
|
8407
|
+
l(h, h ? false : r(g, o, c));
|
|
8389
8408
|
});
|
|
8390
8409
|
}
|
|
8391
8410
|
s(n, "isexe");
|
|
8392
|
-
function o
|
|
8393
|
-
return r(e.statSync(
|
|
8411
|
+
function i(o, c) {
|
|
8412
|
+
return r(e.statSync(o), o, c);
|
|
8394
8413
|
}
|
|
8395
|
-
return s(
|
|
8414
|
+
return s(i, "sync"), Jt;
|
|
8396
8415
|
}
|
|
8397
|
-
s(
|
|
8398
|
-
var
|
|
8399
|
-
function
|
|
8400
|
-
if (
|
|
8401
|
-
|
|
8416
|
+
s(ko, "requireWindows");
|
|
8417
|
+
var Qt, gn;
|
|
8418
|
+
function Ho() {
|
|
8419
|
+
if (gn) return Qt;
|
|
8420
|
+
gn = 1, Qt = t, t.sync = r;
|
|
8402
8421
|
var e = ze;
|
|
8403
|
-
function t(
|
|
8404
|
-
e.stat(
|
|
8405
|
-
l(h, h ? false : n(
|
|
8422
|
+
function t(o, c, l) {
|
|
8423
|
+
e.stat(o, function(h, g) {
|
|
8424
|
+
l(h, h ? false : n(g, c));
|
|
8406
8425
|
});
|
|
8407
8426
|
}
|
|
8408
8427
|
s(t, "isexe");
|
|
8409
|
-
function r(
|
|
8410
|
-
return n(e.statSync(
|
|
8428
|
+
function r(o, c) {
|
|
8429
|
+
return n(e.statSync(o), c);
|
|
8411
8430
|
}
|
|
8412
8431
|
s(r, "sync");
|
|
8413
|
-
function n(
|
|
8414
|
-
return
|
|
8432
|
+
function n(o, c) {
|
|
8433
|
+
return o.isFile() && i(o, c);
|
|
8415
8434
|
}
|
|
8416
8435
|
s(n, "checkStat");
|
|
8417
|
-
function o
|
|
8418
|
-
var l =
|
|
8419
|
-
return
|
|
8436
|
+
function i(o, c) {
|
|
8437
|
+
var l = o.mode, h = o.uid, g = o.gid, m = c.uid !== void 0 ? c.uid : process.getuid && process.getuid(), A = c.gid !== void 0 ? c.gid : process.getgid && process.getgid(), b = parseInt("100", 8), O = parseInt("010", 8), x = parseInt("001", 8), M = b | O, w = l & x || l & O && g === A || l & b && h === m || l & M && m === 0;
|
|
8438
|
+
return w;
|
|
8420
8439
|
}
|
|
8421
|
-
return s(
|
|
8440
|
+
return s(i, "checkMode"), Qt;
|
|
8422
8441
|
}
|
|
8423
|
-
s(
|
|
8424
|
-
var
|
|
8425
|
-
function
|
|
8426
|
-
if (
|
|
8427
|
-
|
|
8442
|
+
s(Ho, "requireMode");
|
|
8443
|
+
var Xt, In;
|
|
8444
|
+
function Fo() {
|
|
8445
|
+
if (In) return Xt;
|
|
8446
|
+
In = 1;
|
|
8428
8447
|
var e;
|
|
8429
|
-
process.platform === "win32" ||
|
|
8430
|
-
function t(n,
|
|
8431
|
-
if (typeof
|
|
8448
|
+
process.platform === "win32" || qi.TESTING_WINDOWS ? e = ko() : e = Ho(), Xt = t, t.sync = r;
|
|
8449
|
+
function t(n, i, o) {
|
|
8450
|
+
if (typeof i == "function" && (o = i, i = {}), !o) {
|
|
8432
8451
|
if (typeof Promise != "function") throw new TypeError("callback not provided");
|
|
8433
8452
|
return new Promise(function(c, l) {
|
|
8434
|
-
t(n,
|
|
8435
|
-
h ? l(h) : c(
|
|
8453
|
+
t(n, i || {}, function(h, g) {
|
|
8454
|
+
h ? l(h) : c(g);
|
|
8436
8455
|
});
|
|
8437
8456
|
});
|
|
8438
8457
|
}
|
|
8439
|
-
e(n,
|
|
8440
|
-
c && (c.code === "EACCES" ||
|
|
8458
|
+
e(n, i || {}, function(c, l) {
|
|
8459
|
+
c && (c.code === "EACCES" || i && i.ignoreErrors) && (c = null, l = false), o(c, l);
|
|
8441
8460
|
});
|
|
8442
8461
|
}
|
|
8443
8462
|
s(t, "isexe");
|
|
8444
|
-
function r(n,
|
|
8463
|
+
function r(n, i) {
|
|
8445
8464
|
try {
|
|
8446
|
-
return e.sync(n,
|
|
8447
|
-
} catch (
|
|
8448
|
-
if (
|
|
8449
|
-
throw
|
|
8450
|
-
}
|
|
8451
|
-
}
|
|
8452
|
-
return s(r, "sync"),
|
|
8453
|
-
}
|
|
8454
|
-
s(
|
|
8455
|
-
var
|
|
8456
|
-
function
|
|
8457
|
-
if (
|
|
8458
|
-
|
|
8459
|
-
const e = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", t = require$$0$1, r = e ? ";" : ":", n =
|
|
8460
|
-
const m =
|
|
8461
|
-
return e && h.indexOf(".") !== -1 && O[0] !== "" && O.unshift(""), { pathEnv: A, pathExt: O, pathExtExe:
|
|
8462
|
-
}, "getPathInfo"), c = s((h,
|
|
8463
|
-
typeof
|
|
8464
|
-
const { pathEnv: A, pathExt:
|
|
8465
|
-
if (
|
|
8466
|
-
const L = A[
|
|
8467
|
-
w(
|
|
8468
|
-
}), "step"),
|
|
8469
|
-
if (B ===
|
|
8470
|
-
const G =
|
|
8471
|
-
n(
|
|
8472
|
-
if (!k && a) if (
|
|
8473
|
-
else return L(
|
|
8474
|
-
return L(
|
|
8465
|
+
return e.sync(n, i || {});
|
|
8466
|
+
} catch (o) {
|
|
8467
|
+
if (i && i.ignoreErrors || o.code === "EACCES") return false;
|
|
8468
|
+
throw o;
|
|
8469
|
+
}
|
|
8470
|
+
}
|
|
8471
|
+
return s(r, "sync"), Xt;
|
|
8472
|
+
}
|
|
8473
|
+
s(Fo, "requireIsexe");
|
|
8474
|
+
var Zt, Sn;
|
|
8475
|
+
function jo() {
|
|
8476
|
+
if (Sn) return Zt;
|
|
8477
|
+
Sn = 1;
|
|
8478
|
+
const e = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", t = require$$0$1, r = e ? ";" : ":", n = Fo(), i = s((h) => Object.assign(new Error(`not found: ${h}`), { code: "ENOENT" }), "getNotFoundError"), o = s((h, g) => {
|
|
8479
|
+
const m = g.colon || r, A = h.match(/\//) || e && h.match(/\\/) ? [""] : [...e ? [process.cwd()] : [], ...(g.path || process.env.PATH || "").split(m)], b = e ? g.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", O = e ? b.split(m) : [""];
|
|
8480
|
+
return e && h.indexOf(".") !== -1 && O[0] !== "" && O.unshift(""), { pathEnv: A, pathExt: O, pathExtExe: b };
|
|
8481
|
+
}, "getPathInfo"), c = s((h, g, m) => {
|
|
8482
|
+
typeof g == "function" && (m = g, g = {}), g || (g = {});
|
|
8483
|
+
const { pathEnv: A, pathExt: b, pathExtExe: O } = o(h, g), x = [], M = s((C) => new Promise((y, B) => {
|
|
8484
|
+
if (C === A.length) return g.all && x.length ? y(x) : B(i(h));
|
|
8485
|
+
const L = A[C], U = /^".*"$/.test(L) ? L.slice(1, -1) : L, G = t.join(U, h), k = !U && /^\.[\\\/]/.test(h) ? h.slice(0, 2) + G : G;
|
|
8486
|
+
y(w(k, C, 0));
|
|
8487
|
+
}), "step"), w = s((C, y, B) => new Promise((L, U) => {
|
|
8488
|
+
if (B === b.length) return L(M(y + 1));
|
|
8489
|
+
const G = b[B];
|
|
8490
|
+
n(C + G, { pathExt: O }, (k, a) => {
|
|
8491
|
+
if (!k && a) if (g.all) x.push(C + G);
|
|
8492
|
+
else return L(C + G);
|
|
8493
|
+
return L(w(C, y, B + 1));
|
|
8475
8494
|
});
|
|
8476
8495
|
}), "subStep");
|
|
8477
|
-
return m ? M(0).then((
|
|
8478
|
-
}, "which"), l = s((h,
|
|
8479
|
-
|
|
8480
|
-
const { pathEnv: m, pathExt: A, pathExtExe:
|
|
8496
|
+
return m ? M(0).then((C) => m(null, C), m) : M(0);
|
|
8497
|
+
}, "which"), l = s((h, g) => {
|
|
8498
|
+
g = g || {};
|
|
8499
|
+
const { pathEnv: m, pathExt: A, pathExtExe: b } = o(h, g), O = [];
|
|
8481
8500
|
for (let x = 0; x < m.length; x++) {
|
|
8482
|
-
const M = m[x],
|
|
8501
|
+
const M = m[x], w = /^".*"$/.test(M) ? M.slice(1, -1) : M, C = t.join(w, h), y = !w && /^\.[\\\/]/.test(h) ? h.slice(0, 2) + C : C;
|
|
8483
8502
|
for (let B = 0; B < A.length; B++) {
|
|
8484
|
-
const L =
|
|
8503
|
+
const L = y + A[B];
|
|
8485
8504
|
try {
|
|
8486
|
-
if (n.sync(L, { pathExt:
|
|
8505
|
+
if (n.sync(L, { pathExt: b })) if (g.all) O.push(L);
|
|
8487
8506
|
else return L;
|
|
8488
8507
|
} catch {
|
|
8489
8508
|
}
|
|
8490
8509
|
}
|
|
8491
8510
|
}
|
|
8492
|
-
if (
|
|
8493
|
-
if (
|
|
8494
|
-
throw
|
|
8511
|
+
if (g.all && O.length) return O;
|
|
8512
|
+
if (g.nothrow) return null;
|
|
8513
|
+
throw i(h);
|
|
8495
8514
|
}, "whichSync");
|
|
8496
|
-
return
|
|
8515
|
+
return Zt = c, c.sync = l, Zt;
|
|
8497
8516
|
}
|
|
8498
|
-
s(
|
|
8499
|
-
var St = { exports: {} },
|
|
8500
|
-
function
|
|
8501
|
-
if (
|
|
8502
|
-
|
|
8517
|
+
s(jo, "requireWhich");
|
|
8518
|
+
var St = { exports: {} }, Rn;
|
|
8519
|
+
function qo() {
|
|
8520
|
+
if (Rn) return St.exports;
|
|
8521
|
+
Rn = 1;
|
|
8503
8522
|
const e = s((t = {}) => {
|
|
8504
8523
|
const r = t.env || process.env;
|
|
8505
|
-
return (t.platform || process.platform) !== "win32" ? "PATH" : Object.keys(r).reverse().find((
|
|
8524
|
+
return (t.platform || process.platform) !== "win32" ? "PATH" : Object.keys(r).reverse().find((i) => i.toUpperCase() === "PATH") || "Path";
|
|
8506
8525
|
}, "pathKey");
|
|
8507
8526
|
return St.exports = e, St.exports.default = e, St.exports;
|
|
8508
8527
|
}
|
|
8509
|
-
s(
|
|
8510
|
-
var
|
|
8511
|
-
function
|
|
8512
|
-
if (
|
|
8513
|
-
|
|
8514
|
-
const e = require$$0$1, t =
|
|
8515
|
-
function n(
|
|
8516
|
-
const l =
|
|
8528
|
+
s(qo, "requirePathKey");
|
|
8529
|
+
var er, Tn;
|
|
8530
|
+
function Wo() {
|
|
8531
|
+
if (Tn) return er;
|
|
8532
|
+
Tn = 1;
|
|
8533
|
+
const e = require$$0$1, t = jo(), r = qo();
|
|
8534
|
+
function n(o, c) {
|
|
8535
|
+
const l = o.options.env || process.env, h = process.cwd(), g = o.options.cwd != null, m = g && process.chdir !== void 0 && !process.chdir.disabled;
|
|
8517
8536
|
if (m) try {
|
|
8518
|
-
process.chdir(
|
|
8537
|
+
process.chdir(o.options.cwd);
|
|
8519
8538
|
} catch {
|
|
8520
8539
|
}
|
|
8521
8540
|
let A;
|
|
8522
8541
|
try {
|
|
8523
|
-
A = t.sync(
|
|
8542
|
+
A = t.sync(o.command, { path: l[r({ env: l })], pathExt: c ? e.delimiter : void 0 });
|
|
8524
8543
|
} catch {
|
|
8525
8544
|
} finally {
|
|
8526
8545
|
m && process.chdir(h);
|
|
8527
8546
|
}
|
|
8528
|
-
return A && (A = e.resolve(
|
|
8547
|
+
return A && (A = e.resolve(g ? o.options.cwd : "", A)), A;
|
|
8529
8548
|
}
|
|
8530
8549
|
s(n, "resolveCommandAttempt");
|
|
8531
|
-
function o
|
|
8532
|
-
return n(
|
|
8550
|
+
function i(o) {
|
|
8551
|
+
return n(o) || n(o, true);
|
|
8533
8552
|
}
|
|
8534
|
-
return s(
|
|
8553
|
+
return s(i, "resolveCommand"), er = i, er;
|
|
8535
8554
|
}
|
|
8536
|
-
s(
|
|
8537
|
-
var Rt = {},
|
|
8538
|
-
function
|
|
8539
|
-
if (
|
|
8540
|
-
|
|
8555
|
+
s(Wo, "requireResolveCommand");
|
|
8556
|
+
var Rt = {}, yn;
|
|
8557
|
+
function Ko() {
|
|
8558
|
+
if (yn) return Rt;
|
|
8559
|
+
yn = 1;
|
|
8541
8560
|
const e = /([()\][%!^"`<>&|;, *?])/g;
|
|
8542
8561
|
function t(n) {
|
|
8543
8562
|
return n = n.replace(e, "^$1"), n;
|
|
8544
8563
|
}
|
|
8545
8564
|
s(t, "escapeCommand");
|
|
8546
|
-
function r(n,
|
|
8547
|
-
return n = `${n}`, n = n.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"'), n = n.replace(/(?=(\\+?)?)\1$/, "$1$1"), n = `"${n}"`, n = n.replace(e, "^$1"),
|
|
8565
|
+
function r(n, i) {
|
|
8566
|
+
return n = `${n}`, n = n.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"'), n = n.replace(/(?=(\\+?)?)\1$/, "$1$1"), n = `"${n}"`, n = n.replace(e, "^$1"), i && (n = n.replace(e, "^$1")), n;
|
|
8548
8567
|
}
|
|
8549
8568
|
return s(r, "escapeArgument"), Rt.command = t, Rt.argument = r, Rt;
|
|
8550
8569
|
}
|
|
8551
|
-
s(
|
|
8552
|
-
var
|
|
8553
|
-
function
|
|
8554
|
-
return
|
|
8570
|
+
s(Ko, "require_escape");
|
|
8571
|
+
var tr, wn;
|
|
8572
|
+
function Vo() {
|
|
8573
|
+
return wn || (wn = 1, tr = /^#!(.*)/), tr;
|
|
8555
8574
|
}
|
|
8556
|
-
s(
|
|
8557
|
-
var
|
|
8558
|
-
function
|
|
8559
|
-
if (
|
|
8560
|
-
|
|
8561
|
-
const e =
|
|
8562
|
-
return
|
|
8575
|
+
s(Vo, "requireShebangRegex");
|
|
8576
|
+
var rr, An;
|
|
8577
|
+
function Yo() {
|
|
8578
|
+
if (An) return rr;
|
|
8579
|
+
An = 1;
|
|
8580
|
+
const e = Vo();
|
|
8581
|
+
return rr = s((t = "") => {
|
|
8563
8582
|
const r = t.match(e);
|
|
8564
8583
|
if (!r) return null;
|
|
8565
|
-
const [n,
|
|
8566
|
-
return
|
|
8567
|
-
}, "shebangCommand"),
|
|
8568
|
-
}
|
|
8569
|
-
s(
|
|
8570
|
-
var
|
|
8571
|
-
function
|
|
8572
|
-
if (
|
|
8573
|
-
|
|
8574
|
-
const e = ze, t =
|
|
8584
|
+
const [n, i] = r[0].replace(/#! ?/, "").split(" "), o = n.split("/").pop();
|
|
8585
|
+
return o === "env" ? i : i ? `${o} ${i}` : o;
|
|
8586
|
+
}, "shebangCommand"), rr;
|
|
8587
|
+
}
|
|
8588
|
+
s(Yo, "requireShebangCommand");
|
|
8589
|
+
var nr, vn;
|
|
8590
|
+
function zo() {
|
|
8591
|
+
if (vn) return nr;
|
|
8592
|
+
vn = 1;
|
|
8593
|
+
const e = ze, t = Yo();
|
|
8575
8594
|
function r(n) {
|
|
8576
|
-
const
|
|
8595
|
+
const o = Buffer.alloc(150);
|
|
8577
8596
|
let c;
|
|
8578
8597
|
try {
|
|
8579
|
-
c = e.openSync(n, "r"), e.readSync(c,
|
|
8598
|
+
c = e.openSync(n, "r"), e.readSync(c, o, 0, 150, 0), e.closeSync(c);
|
|
8580
8599
|
} catch {
|
|
8581
8600
|
}
|
|
8582
|
-
return t(
|
|
8601
|
+
return t(o.toString());
|
|
8583
8602
|
}
|
|
8584
|
-
return s(r, "readShebang"),
|
|
8603
|
+
return s(r, "readShebang"), nr = r, nr;
|
|
8585
8604
|
}
|
|
8586
|
-
s(
|
|
8587
|
-
var
|
|
8588
|
-
function
|
|
8589
|
-
if (
|
|
8590
|
-
|
|
8591
|
-
const e = require$$0$1, t =
|
|
8605
|
+
s(zo, "requireReadShebang");
|
|
8606
|
+
var ir, bn;
|
|
8607
|
+
function Jo() {
|
|
8608
|
+
if (bn) return ir;
|
|
8609
|
+
bn = 1;
|
|
8610
|
+
const e = require$$0$1, t = Wo(), r = Ko(), n = zo(), i = process.platform === "win32", o = /\.(?:com|exe)$/i, c = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
8592
8611
|
function l(m) {
|
|
8593
8612
|
m.file = t(m);
|
|
8594
8613
|
const A = m.file && n(m.file);
|
|
@@ -8596,9 +8615,9 @@ function jo() {
|
|
|
8596
8615
|
}
|
|
8597
8616
|
s(l, "detectShebang");
|
|
8598
8617
|
function h(m) {
|
|
8599
|
-
if (!
|
|
8600
|
-
const A = l(m),
|
|
8601
|
-
if (m.options.forceShell ||
|
|
8618
|
+
if (!i) return m;
|
|
8619
|
+
const A = l(m), b = !o.test(A);
|
|
8620
|
+
if (m.options.forceShell || b) {
|
|
8602
8621
|
const O = c.test(A);
|
|
8603
8622
|
m.command = e.normalize(m.command), m.command = r.command(m.command), m.args = m.args.map((M) => r.argument(M, O));
|
|
8604
8623
|
const x = [m.command].concat(m.args).join(" ");
|
|
@@ -8607,131 +8626,131 @@ function jo() {
|
|
|
8607
8626
|
return m;
|
|
8608
8627
|
}
|
|
8609
8628
|
s(h, "parseNonShell");
|
|
8610
|
-
function
|
|
8611
|
-
A && !Array.isArray(A) && (
|
|
8612
|
-
const O = { command: m, args: A, options:
|
|
8613
|
-
return
|
|
8614
|
-
}
|
|
8615
|
-
return s(
|
|
8616
|
-
}
|
|
8617
|
-
s(
|
|
8618
|
-
var
|
|
8619
|
-
function
|
|
8620
|
-
if (
|
|
8621
|
-
|
|
8629
|
+
function g(m, A, b) {
|
|
8630
|
+
A && !Array.isArray(A) && (b = A, A = null), A = A ? A.slice(0) : [], b = Object.assign({}, b);
|
|
8631
|
+
const O = { command: m, args: A, options: b, file: void 0, original: { command: m, args: A } };
|
|
8632
|
+
return b.shell ? O : h(O);
|
|
8633
|
+
}
|
|
8634
|
+
return s(g, "parse"), ir = g, ir;
|
|
8635
|
+
}
|
|
8636
|
+
s(Jo, "requireParse");
|
|
8637
|
+
var or, Cn;
|
|
8638
|
+
function Qo() {
|
|
8639
|
+
if (Cn) return or;
|
|
8640
|
+
Cn = 1;
|
|
8622
8641
|
const e = process.platform === "win32";
|
|
8623
|
-
function t(
|
|
8624
|
-
return Object.assign(new Error(`${c} ${
|
|
8642
|
+
function t(o, c) {
|
|
8643
|
+
return Object.assign(new Error(`${c} ${o.command} ENOENT`), { code: "ENOENT", errno: "ENOENT", syscall: `${c} ${o.command}`, path: o.command, spawnargs: o.args });
|
|
8625
8644
|
}
|
|
8626
8645
|
s(t, "notFoundError");
|
|
8627
|
-
function r(
|
|
8646
|
+
function r(o, c) {
|
|
8628
8647
|
if (!e) return;
|
|
8629
|
-
const l =
|
|
8630
|
-
|
|
8648
|
+
const l = o.emit;
|
|
8649
|
+
o.emit = function(h, g) {
|
|
8631
8650
|
if (h === "exit") {
|
|
8632
|
-
const m = n(
|
|
8633
|
-
if (m) return l.call(
|
|
8651
|
+
const m = n(g, c);
|
|
8652
|
+
if (m) return l.call(o, "error", m);
|
|
8634
8653
|
}
|
|
8635
|
-
return l.apply(
|
|
8654
|
+
return l.apply(o, arguments);
|
|
8636
8655
|
};
|
|
8637
8656
|
}
|
|
8638
8657
|
s(r, "hookChildProcess");
|
|
8639
|
-
function n(
|
|
8640
|
-
return e &&
|
|
8658
|
+
function n(o, c) {
|
|
8659
|
+
return e && o === 1 && !c.file ? t(c.original, "spawn") : null;
|
|
8641
8660
|
}
|
|
8642
8661
|
s(n, "verifyENOENT");
|
|
8643
|
-
function o
|
|
8644
|
-
return e &&
|
|
8662
|
+
function i(o, c) {
|
|
8663
|
+
return e && o === 1 && !c.file ? t(c.original, "spawnSync") : null;
|
|
8645
8664
|
}
|
|
8646
|
-
return s(
|
|
8665
|
+
return s(i, "verifyENOENTSync"), or = { hookChildProcess: r, verifyENOENT: n, verifyENOENTSync: i, notFoundError: t }, or;
|
|
8647
8666
|
}
|
|
8648
|
-
s(
|
|
8649
|
-
var
|
|
8650
|
-
function
|
|
8651
|
-
if (
|
|
8652
|
-
|
|
8653
|
-
const e = require$$0$2, t =
|
|
8654
|
-
function n(
|
|
8655
|
-
const h = t(
|
|
8656
|
-
return r.hookChildProcess(
|
|
8667
|
+
s(Qo, "requireEnoent");
|
|
8668
|
+
var Un;
|
|
8669
|
+
function Xo() {
|
|
8670
|
+
if (Un) return ke.exports;
|
|
8671
|
+
Un = 1;
|
|
8672
|
+
const e = require$$0$2, t = Jo(), r = Qo();
|
|
8673
|
+
function n(o, c, l) {
|
|
8674
|
+
const h = t(o, c, l), g = e.spawn(h.command, h.args, h.options);
|
|
8675
|
+
return r.hookChildProcess(g, h), g;
|
|
8657
8676
|
}
|
|
8658
8677
|
s(n, "spawn");
|
|
8659
|
-
function o
|
|
8660
|
-
const h = t(
|
|
8661
|
-
return
|
|
8678
|
+
function i(o, c, l) {
|
|
8679
|
+
const h = t(o, c, l), g = e.spawnSync(h.command, h.args, h.options);
|
|
8680
|
+
return g.error = g.error || r.verifyENOENTSync(g.status, h), g;
|
|
8662
8681
|
}
|
|
8663
|
-
return s(
|
|
8682
|
+
return s(i, "spawnSync"), ke.exports = n, ke.exports.spawn = n, ke.exports.sync = i, ke.exports._parse = t, ke.exports._enoent = r, ke.exports;
|
|
8664
8683
|
}
|
|
8665
|
-
s(
|
|
8666
|
-
var
|
|
8667
|
-
function
|
|
8684
|
+
s(Xo, "requireCrossSpawn");
|
|
8685
|
+
var Zo = Xo(), es = kr(Zo);
|
|
8686
|
+
function ts(e) {
|
|
8668
8687
|
const t = typeof e == "string" ? `
|
|
8669
8688
|
` : 10, r = typeof e == "string" ? "\r" : 13;
|
|
8670
8689
|
return e[e.length - 1] === t && (e = e.slice(0, -1)), e[e.length - 1] === r && (e = e.slice(0, -1)), e;
|
|
8671
8690
|
}
|
|
8672
|
-
s(
|
|
8673
|
-
function
|
|
8691
|
+
s(ts, "stripFinalNewline");
|
|
8692
|
+
function Bn(e = {}) {
|
|
8674
8693
|
const { env: t = process.env, platform: r = process.platform } = e;
|
|
8675
8694
|
return r !== "win32" ? "PATH" : Object.keys(t).reverse().find((n) => n.toUpperCase() === "PATH") || "Path";
|
|
8676
8695
|
}
|
|
8677
|
-
s(
|
|
8678
|
-
const
|
|
8679
|
-
const
|
|
8680
|
-
return r &&
|
|
8681
|
-
}, "npmRunPath"),
|
|
8696
|
+
s(Bn, "pathKey");
|
|
8697
|
+
const rs = s(({ cwd: e = y.cwd(), path: t = y.env[Bn()], preferLocal: r = true, execPath: n = y.execPath, addExecPath: i = true } = {}) => {
|
|
8698
|
+
const o = e instanceof URL ? fileURLToPath(e) : e, c = path.resolve(o), l = [];
|
|
8699
|
+
return r && ns(l, c), i && is(l, n, c), [...l, t].join(path.delimiter);
|
|
8700
|
+
}, "npmRunPath"), ns = s((e, t) => {
|
|
8682
8701
|
let r;
|
|
8683
8702
|
for (; r !== t; ) e.push(path.join(t, "node_modules/.bin")), r = t, t = path.resolve(t, "..");
|
|
8684
|
-
}, "applyPreferLocal"),
|
|
8703
|
+
}, "applyPreferLocal"), is = s((e, t, r) => {
|
|
8685
8704
|
const n = t instanceof URL ? fileURLToPath(t) : t;
|
|
8686
8705
|
e.push(path.resolve(r, n, ".."));
|
|
8687
|
-
}, "applyExecPath"),
|
|
8706
|
+
}, "applyExecPath"), os = s(({ env: e = y.env, ...t } = {}) => {
|
|
8688
8707
|
e = { ...e };
|
|
8689
|
-
const r =
|
|
8690
|
-
return t.path = e[r], e[r] =
|
|
8691
|
-
}, "npmRunPathEnv"),
|
|
8692
|
-
const e =
|
|
8693
|
-
return Array.from({ length: e },
|
|
8694
|
-
}, "getRealtimeSignals"),
|
|
8695
|
-
const e =
|
|
8696
|
-
return [...
|
|
8697
|
-
}, "getSignals"),
|
|
8708
|
+
const r = Bn({ env: e });
|
|
8709
|
+
return t.path = e[r], e[r] = rs(t), e;
|
|
8710
|
+
}, "npmRunPathEnv"), ss = s(() => {
|
|
8711
|
+
const e = Ln - On + 1;
|
|
8712
|
+
return Array.from({ length: e }, as);
|
|
8713
|
+
}, "getRealtimeSignals"), as = s((e, t) => ({ name: `SIGRT${t + 1}`, number: On + t, action: "terminate", description: "Application-specific signal (realtime)", standard: "posix" }), "getRealtimeSignal"), On = 34, Ln = 64, cs = [{ name: "SIGHUP", number: 1, action: "terminate", description: "Terminal closed", standard: "posix" }, { name: "SIGINT", number: 2, action: "terminate", description: "User interruption with CTRL-C", standard: "ansi" }, { name: "SIGQUIT", number: 3, action: "core", description: "User interruption with CTRL-\\", standard: "posix" }, { name: "SIGILL", number: 4, action: "core", description: "Invalid machine instruction", standard: "ansi" }, { name: "SIGTRAP", number: 5, action: "core", description: "Debugger breakpoint", standard: "posix" }, { name: "SIGABRT", number: 6, action: "core", description: "Aborted", standard: "ansi" }, { name: "SIGIOT", number: 6, action: "core", description: "Aborted", standard: "bsd" }, { name: "SIGBUS", number: 7, action: "core", description: "Bus error due to misaligned, non-existing address or paging error", standard: "bsd" }, { name: "SIGEMT", number: 7, action: "terminate", description: "Command should be emulated but is not implemented", standard: "other" }, { name: "SIGFPE", number: 8, action: "core", description: "Floating point arithmetic error", standard: "ansi" }, { name: "SIGKILL", number: 9, action: "terminate", description: "Forced termination", standard: "posix", forced: true }, { name: "SIGUSR1", number: 10, action: "terminate", description: "Application-specific signal", standard: "posix" }, { name: "SIGSEGV", number: 11, action: "core", description: "Segmentation fault", standard: "ansi" }, { name: "SIGUSR2", number: 12, action: "terminate", description: "Application-specific signal", standard: "posix" }, { name: "SIGPIPE", number: 13, action: "terminate", description: "Broken pipe or socket", standard: "posix" }, { name: "SIGALRM", number: 14, action: "terminate", description: "Timeout or timer", standard: "posix" }, { name: "SIGTERM", number: 15, action: "terminate", description: "Termination", standard: "ansi" }, { name: "SIGSTKFLT", number: 16, action: "terminate", description: "Stack is empty or overflowed", standard: "other" }, { name: "SIGCHLD", number: 17, action: "ignore", description: "Child process terminated, paused or unpaused", standard: "posix" }, { name: "SIGCLD", number: 17, action: "ignore", description: "Child process terminated, paused or unpaused", standard: "other" }, { name: "SIGCONT", number: 18, action: "unpause", description: "Unpaused", standard: "posix", forced: true }, { name: "SIGSTOP", number: 19, action: "pause", description: "Paused", standard: "posix", forced: true }, { name: "SIGTSTP", number: 20, action: "pause", description: 'Paused using CTRL-Z or "suspend"', standard: "posix" }, { name: "SIGTTIN", number: 21, action: "pause", description: "Background process cannot read terminal input", standard: "posix" }, { name: "SIGBREAK", number: 21, action: "terminate", description: "User interruption with CTRL-BREAK", standard: "other" }, { name: "SIGTTOU", number: 22, action: "pause", description: "Background process cannot write to terminal output", standard: "posix" }, { name: "SIGURG", number: 23, action: "ignore", description: "Socket received out-of-band data", standard: "bsd" }, { name: "SIGXCPU", number: 24, action: "core", description: "Process timed out", standard: "bsd" }, { name: "SIGXFSZ", number: 25, action: "core", description: "File too big", standard: "bsd" }, { name: "SIGVTALRM", number: 26, action: "terminate", description: "Timeout or timer", standard: "bsd" }, { name: "SIGPROF", number: 27, action: "terminate", description: "Timeout or timer", standard: "bsd" }, { name: "SIGWINCH", number: 28, action: "ignore", description: "Terminal window size changed", standard: "bsd" }, { name: "SIGIO", number: 29, action: "terminate", description: "I/O is available", standard: "other" }, { name: "SIGPOLL", number: 29, action: "terminate", description: "Watched event", standard: "other" }, { name: "SIGINFO", number: 29, action: "ignore", description: "Request for process information", standard: "other" }, { name: "SIGPWR", number: 30, action: "terminate", description: "Device running out of power", standard: "systemv" }, { name: "SIGSYS", number: 31, action: "core", description: "Invalid system call", standard: "other" }, { name: "SIGUNUSED", number: 31, action: "terminate", description: "Invalid system call", standard: "other" }], Pn = s(() => {
|
|
8714
|
+
const e = ss();
|
|
8715
|
+
return [...cs, ...e].map(us);
|
|
8716
|
+
}, "getSignals"), us = s(({ name: e, number: t, description: r, action: n, forced: i = false, standard: o }) => {
|
|
8698
8717
|
const { signals: { [e]: c } } = constants$1, l = c !== void 0;
|
|
8699
|
-
return { name: e, number: l ? c : t, description: r, supported: l, action: n, forced:
|
|
8700
|
-
}, "normalizeSignal"),
|
|
8701
|
-
const e =
|
|
8702
|
-
return Object.fromEntries(e.map(
|
|
8703
|
-
}, "getSignalsByName"),
|
|
8704
|
-
const e =
|
|
8718
|
+
return { name: e, number: l ? c : t, description: r, supported: l, action: n, forced: i, standard: o };
|
|
8719
|
+
}, "normalizeSignal"), ls = s(() => {
|
|
8720
|
+
const e = Pn();
|
|
8721
|
+
return Object.fromEntries(e.map(fs));
|
|
8722
|
+
}, "getSignalsByName"), fs = s(({ name: e, number: t, description: r, supported: n, action: i, forced: o, standard: c }) => [e, { name: e, number: t, description: r, supported: n, action: i, forced: o, standard: c }], "getSignalByName"), hs = ls(), ds = s(() => {
|
|
8723
|
+
const e = Pn(), t = Ln + 1, r = Array.from({ length: t }, (n, i) => ps(i, e));
|
|
8705
8724
|
return Object.assign({}, ...r);
|
|
8706
|
-
}, "getSignalsByNumber"),
|
|
8707
|
-
const r =
|
|
8725
|
+
}, "getSignalsByNumber"), ps = s((e, t) => {
|
|
8726
|
+
const r = ms(e, t);
|
|
8708
8727
|
if (r === void 0) return {};
|
|
8709
|
-
const { name: n, description:
|
|
8710
|
-
return { [e]: { name: n, number: e, description:
|
|
8711
|
-
}, "getSignalByNumber"),
|
|
8728
|
+
const { name: n, description: i, supported: o, action: c, forced: l, standard: h } = r;
|
|
8729
|
+
return { [e]: { name: n, number: e, description: i, supported: o, action: c, forced: l, standard: h } };
|
|
8730
|
+
}, "getSignalByNumber"), ms = s((e, t) => {
|
|
8712
8731
|
const r = t.find(({ name: n }) => constants$1.signals[n] === e);
|
|
8713
8732
|
return r !== void 0 ? r : t.find((n) => n.number === e);
|
|
8714
8733
|
}, "findSignalByNumber");
|
|
8715
|
-
|
|
8716
|
-
const
|
|
8717
|
-
|
|
8718
|
-
const O =
|
|
8719
|
-
${n.message}` :
|
|
8734
|
+
ds();
|
|
8735
|
+
const Es = s(({ timedOut: e, timeout: t, errorCode: r, signal: n, signalDescription: i, exitCode: o, isCanceled: c }) => e ? `timed out after ${t} milliseconds` : r !== void 0 ? `failed with ${r}` : n !== void 0 ? `was killed with ${n} (${i})` : o !== void 0 ? `failed with exit code ${o}` : "failed", "getErrorPrefix"), Nn = s(({ stdout: e, stderr: t, all: r, error: n, signal: i, exitCode: o, command: c, escapedCommand: l, timedOut: h, isCanceled: g, killed: m, parsed: { options: { timeout: A, cwd: b = y.cwd() } } }) => {
|
|
8736
|
+
o = o === null ? void 0 : o, i = i === null ? void 0 : i;
|
|
8737
|
+
const O = i === void 0 ? void 0 : hs[i].description, x = n && n.code, w = `Command ${Es({ timedOut: h, timeout: A, errorCode: x, signal: i, signalDescription: O, exitCode: o, isCanceled: g })}: ${c}`, C = Object.prototype.toString.call(n) === "[object Error]", y = C ? `${w}
|
|
8738
|
+
${n.message}` : w, B = [y, t, e].filter(Boolean).join(`
|
|
8720
8739
|
`);
|
|
8721
|
-
return
|
|
8722
|
-
}, "makeError"), Tt = ["stdin", "stdout", "stderr"],
|
|
8740
|
+
return C ? (n.originalMessage = n.message, n.message = B) : n = new Error(B), n.shortMessage = y, n.command = c, n.escapedCommand = l, n.exitCode = o, n.signal = i, n.signalDescription = O, n.stdout = e, n.stderr = t, n.cwd = b, r !== void 0 && (n.all = r), "bufferedData" in n && delete n.bufferedData, n.failed = true, n.timedOut = !!h, n.isCanceled = g, n.killed = m && !h, n;
|
|
8741
|
+
}, "makeError"), Tt = ["stdin", "stdout", "stderr"], _s = s((e) => Tt.some((t) => e[t] !== void 0), "hasAlias"), gs = s((e) => {
|
|
8723
8742
|
if (!e) return;
|
|
8724
8743
|
const { stdio: t } = e;
|
|
8725
8744
|
if (t === void 0) return Tt.map((n) => e[n]);
|
|
8726
|
-
if (
|
|
8745
|
+
if (_s(e)) throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Tt.map((n) => `\`${n}\``).join(", ")}`);
|
|
8727
8746
|
if (typeof t == "string") return t;
|
|
8728
8747
|
if (!Array.isArray(t)) throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);
|
|
8729
8748
|
const r = Math.max(t.length, Tt.length);
|
|
8730
|
-
return Array.from({ length: r }, (n,
|
|
8749
|
+
return Array.from({ length: r }, (n, i) => t[i]);
|
|
8731
8750
|
}, "normalizeStdio"), Ye = [];
|
|
8732
8751
|
Ye.push("SIGHUP", "SIGINT", "SIGTERM"), process.platform !== "win32" && Ye.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT"), process.platform === "linux" && Ye.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
8733
|
-
const
|
|
8734
|
-
class
|
|
8752
|
+
const yt = s((e) => !!e && typeof e == "object" && typeof e.removeListener == "function" && typeof e.emit == "function" && typeof e.reallyExit == "function" && typeof e.listeners == "function" && typeof e.kill == "function" && typeof e.pid == "number" && typeof e.on == "function", "processOk"), sr = Symbol.for("signal-exit emitter"), ar = globalThis, Is = Object.defineProperty.bind(Object);
|
|
8753
|
+
class Ss {
|
|
8735
8754
|
static {
|
|
8736
8755
|
s(this, "Emitter");
|
|
8737
8756
|
}
|
|
@@ -8740,37 +8759,37 @@ class ds {
|
|
|
8740
8759
|
count = 0;
|
|
8741
8760
|
id = Math.random();
|
|
8742
8761
|
constructor() {
|
|
8743
|
-
if (sr
|
|
8744
|
-
|
|
8762
|
+
if (ar[sr]) return ar[sr];
|
|
8763
|
+
Is(ar, sr, { value: this, writable: false, enumerable: false, configurable: false });
|
|
8745
8764
|
}
|
|
8746
8765
|
on(t, r) {
|
|
8747
8766
|
this.listeners[t].push(r);
|
|
8748
8767
|
}
|
|
8749
8768
|
removeListener(t, r) {
|
|
8750
|
-
const n = this.listeners[t],
|
|
8751
|
-
|
|
8769
|
+
const n = this.listeners[t], i = n.indexOf(r);
|
|
8770
|
+
i !== -1 && (i === 0 && n.length === 1 ? n.length = 0 : n.splice(i, 1));
|
|
8752
8771
|
}
|
|
8753
8772
|
emit(t, r, n) {
|
|
8754
8773
|
if (this.emitted[t]) return false;
|
|
8755
8774
|
this.emitted[t] = true;
|
|
8756
|
-
let
|
|
8757
|
-
for (const
|
|
8758
|
-
return t === "exit" && (
|
|
8775
|
+
let i = false;
|
|
8776
|
+
for (const o of this.listeners[t]) i = o(r, n) === true || i;
|
|
8777
|
+
return t === "exit" && (i = this.emit("afterExit", r, n) || i), i;
|
|
8759
8778
|
}
|
|
8760
8779
|
}
|
|
8761
|
-
class
|
|
8780
|
+
class Dn {
|
|
8762
8781
|
static {
|
|
8763
8782
|
s(this, "SignalExitBase");
|
|
8764
8783
|
}
|
|
8765
8784
|
}
|
|
8766
|
-
const
|
|
8785
|
+
const Rs = s((e) => ({ onExit(t, r) {
|
|
8767
8786
|
return e.onExit(t, r);
|
|
8768
8787
|
}, load() {
|
|
8769
8788
|
return e.load();
|
|
8770
8789
|
}, unload() {
|
|
8771
8790
|
return e.unload();
|
|
8772
8791
|
} }), "signalExitWrap");
|
|
8773
|
-
class
|
|
8792
|
+
class Ts extends Dn {
|
|
8774
8793
|
static {
|
|
8775
8794
|
s(this, "SignalExitFallback");
|
|
8776
8795
|
}
|
|
@@ -8783,12 +8802,12 @@ class ms extends On {
|
|
|
8783
8802
|
unload() {
|
|
8784
8803
|
}
|
|
8785
8804
|
}
|
|
8786
|
-
class
|
|
8805
|
+
class ys extends Dn {
|
|
8787
8806
|
static {
|
|
8788
8807
|
s(this, "SignalExit");
|
|
8789
8808
|
}
|
|
8790
|
-
#s =
|
|
8791
|
-
#t = new
|
|
8809
|
+
#s = cr.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
8810
|
+
#t = new Ss();
|
|
8792
8811
|
#e;
|
|
8793
8812
|
#i;
|
|
8794
8813
|
#o;
|
|
@@ -8798,9 +8817,9 @@ class Es extends On {
|
|
|
8798
8817
|
super(), this.#e = t, this.#n = {};
|
|
8799
8818
|
for (const r of Ye) this.#n[r] = () => {
|
|
8800
8819
|
const n = this.#e.listeners(r);
|
|
8801
|
-
let { count:
|
|
8802
|
-
const
|
|
8803
|
-
if (typeof
|
|
8820
|
+
let { count: i } = this.#t;
|
|
8821
|
+
const o = t;
|
|
8822
|
+
if (typeof o.__signal_exit_emitter__ == "object" && typeof o.__signal_exit_emitter__.count == "number" && (i += o.__signal_exit_emitter__.count), n.length === i) {
|
|
8804
8823
|
this.unload();
|
|
8805
8824
|
const c = this.#t.emit("exit", null, r), l = r === "SIGHUP" ? this.#s : r;
|
|
8806
8825
|
c || t.kill(t.pid, l);
|
|
@@ -8809,7 +8828,7 @@ class Es extends On {
|
|
|
8809
8828
|
this.#o = t.reallyExit, this.#i = t.emit;
|
|
8810
8829
|
}
|
|
8811
8830
|
onExit(t, r) {
|
|
8812
|
-
if (!
|
|
8831
|
+
if (!yt(this.#e)) return () => {
|
|
8813
8832
|
};
|
|
8814
8833
|
this.#r === false && this.load();
|
|
8815
8834
|
const n = r?.alwaysLast ? "afterExit" : "exit";
|
|
@@ -8839,99 +8858,99 @@ class Es extends On {
|
|
|
8839
8858
|
}), this.#e.emit = this.#i, this.#e.reallyExit = this.#o, this.#t.count -= 1);
|
|
8840
8859
|
}
|
|
8841
8860
|
#a(t) {
|
|
8842
|
-
return
|
|
8861
|
+
return yt(this.#e) ? (this.#e.exitCode = t || 0, this.#t.emit("exit", this.#e.exitCode, null), this.#o.call(this.#e, this.#e.exitCode)) : 0;
|
|
8843
8862
|
}
|
|
8844
8863
|
#c(t, ...r) {
|
|
8845
8864
|
const n = this.#i;
|
|
8846
|
-
if (t === "exit" &&
|
|
8865
|
+
if (t === "exit" && yt(this.#e)) {
|
|
8847
8866
|
typeof r[0] == "number" && (this.#e.exitCode = r[0]);
|
|
8848
|
-
const
|
|
8849
|
-
return this.#t.emit("exit", this.#e.exitCode, null),
|
|
8867
|
+
const i = n.call(this.#e, t, ...r);
|
|
8868
|
+
return this.#t.emit("exit", this.#e.exitCode, null), i;
|
|
8850
8869
|
} else return n.call(this.#e, t, ...r);
|
|
8851
8870
|
}
|
|
8852
8871
|
}
|
|
8853
|
-
const
|
|
8854
|
-
|
|
8855
|
-
function
|
|
8872
|
+
const cr = globalThis.process;
|
|
8873
|
+
Rs(yt(cr) ? new ys(cr) : new Ts());
|
|
8874
|
+
function ws(e) {
|
|
8856
8875
|
return e !== null && typeof e == "object" && typeof e.pipe == "function";
|
|
8857
8876
|
}
|
|
8858
|
-
s(
|
|
8859
|
-
var
|
|
8860
|
-
function
|
|
8861
|
-
if (
|
|
8862
|
-
|
|
8877
|
+
s(ws, "isStream"), new TextEncoder();
|
|
8878
|
+
var ur, Mn;
|
|
8879
|
+
function As() {
|
|
8880
|
+
if (Mn) return ur;
|
|
8881
|
+
Mn = 1;
|
|
8863
8882
|
const { PassThrough: e } = require$$0;
|
|
8864
|
-
return
|
|
8883
|
+
return ur = s(function() {
|
|
8865
8884
|
var t = [], r = new e({ objectMode: true });
|
|
8866
|
-
return r.setMaxListeners(0), r.add = n, r.isEmpty =
|
|
8885
|
+
return r.setMaxListeners(0), r.add = n, r.isEmpty = i, r.on("unpipe", o), Array.prototype.slice.call(arguments).forEach(n), r;
|
|
8867
8886
|
function n(c) {
|
|
8868
|
-
return Array.isArray(c) ? (c.forEach(n), this) : (t.push(c), c.once("end",
|
|
8887
|
+
return Array.isArray(c) ? (c.forEach(n), this) : (t.push(c), c.once("end", o.bind(null, c)), c.once("error", r.emit.bind(r, "error")), c.pipe(r, { end: false }), this);
|
|
8869
8888
|
}
|
|
8870
|
-
function
|
|
8889
|
+
function i() {
|
|
8871
8890
|
return t.length == 0;
|
|
8872
8891
|
}
|
|
8873
|
-
function
|
|
8892
|
+
function o(c) {
|
|
8874
8893
|
t = t.filter(function(l) {
|
|
8875
8894
|
return l !== c;
|
|
8876
8895
|
}), !t.length && r.readable && r.end();
|
|
8877
8896
|
}
|
|
8878
|
-
}, "mergeStream"),
|
|
8897
|
+
}, "mergeStream"), ur;
|
|
8879
8898
|
}
|
|
8880
|
-
s(
|
|
8881
|
-
const
|
|
8899
|
+
s(As, "requireMergeStream"), As();
|
|
8900
|
+
const vs = s((e) => {
|
|
8882
8901
|
if (e !== void 0) throw new TypeError("The `input` and `inputFile` options cannot be both set.");
|
|
8883
|
-
}, "validateInputOptions"),
|
|
8884
|
-
const t =
|
|
8885
|
-
if (
|
|
8902
|
+
}, "validateInputOptions"), bs = s(({ input: e, inputFile: t }) => typeof t != "string" ? e : (vs(e), readFileSync(t)), "getInputSync"), Cs = s((e) => {
|
|
8903
|
+
const t = bs(e);
|
|
8904
|
+
if (ws(t)) throw new TypeError("The `input` option cannot be a stream in sync mode");
|
|
8886
8905
|
return t;
|
|
8887
|
-
}, "handleInputSync"),
|
|
8906
|
+
}, "handleInputSync"), Us = (async () => {
|
|
8888
8907
|
})().constructor.prototype;
|
|
8889
|
-
["then", "catch", "finally"].map((e) => [e, Reflect.getOwnPropertyDescriptor(
|
|
8890
|
-
const
|
|
8908
|
+
["then", "catch", "finally"].map((e) => [e, Reflect.getOwnPropertyDescriptor(Us, e)]);
|
|
8909
|
+
const xn = s((e, t = []) => Array.isArray(t) ? [e, ...t] : [e], "normalizeArgs"), Bs = /^[\w.-]+$/, Os = s((e) => typeof e != "string" || Bs.test(e) ? e : `"${e.replaceAll('"', '\\"')}"`, "escapeArg"), Ls = s((e, t) => xn(e, t).join(" "), "joinCommand"), Ps = s((e, t) => xn(e, t).map((r) => Os(r)).join(" "), "getEscapedCommand"), Ns = debuglog("execa").enabled, wt = s((e, t) => String(e).padStart(t, "0"), "padField"), Ds = s(() => {
|
|
8891
8910
|
const e = /* @__PURE__ */ new Date();
|
|
8892
|
-
return `${
|
|
8893
|
-
}, "getTimestamp"),
|
|
8894
|
-
t && y.stderr.write(`[${
|
|
8911
|
+
return `${wt(e.getHours(), 2)}:${wt(e.getMinutes(), 2)}:${wt(e.getSeconds(), 2)}.${wt(e.getMilliseconds(), 3)}`;
|
|
8912
|
+
}, "getTimestamp"), Ms = s((e, { verbose: t }) => {
|
|
8913
|
+
t && y.stderr.write(`[${Ds()}] ${e}
|
|
8895
8914
|
`);
|
|
8896
|
-
}, "logCommand"),
|
|
8897
|
-
const
|
|
8898
|
-
return r ?
|
|
8899
|
-
}, "getEnv"),
|
|
8900
|
-
const n =
|
|
8901
|
-
return e = n.command, t = n.args, r = n.options, r = { maxBuffer:
|
|
8902
|
-
}, "handleArguments"),
|
|
8903
|
-
function
|
|
8904
|
-
const n =
|
|
8905
|
-
|
|
8906
|
-
const c =
|
|
8915
|
+
}, "logCommand"), xs = 1e3 * 1e3 * 100, Gs = s(({ env: e, extendEnv: t, preferLocal: r, localDir: n, execPath: i }) => {
|
|
8916
|
+
const o = t ? { ...y.env, ...e } : e;
|
|
8917
|
+
return r ? os({ env: o, cwd: n, execPath: i }) : o;
|
|
8918
|
+
}, "getEnv"), $s = s((e, t, r = {}) => {
|
|
8919
|
+
const n = es._parse(e, t, r);
|
|
8920
|
+
return e = n.command, t = n.args, r = n.options, r = { maxBuffer: xs, buffer: true, stripFinalNewline: true, extendEnv: true, preferLocal: false, localDir: r.cwd || y.cwd(), execPath: y.execPath, encoding: "utf8", reject: true, cleanup: true, all: false, windowsHide: true, verbose: Ns, ...r }, r.env = Gs(r), r.stdio = gs(r), y.platform === "win32" && path.basename(e, ".exe") === "cmd" && t.unshift("/q"), { file: e, args: t, options: r, parsed: n };
|
|
8921
|
+
}, "handleArguments"), Gn = s((e, t, r) => typeof t != "string" && !Buffer$1.isBuffer(t) ? r === void 0 ? void 0 : "" : e.stripFinalNewline ? ts(t) : t, "handleOutput");
|
|
8922
|
+
function lr(e, t, r) {
|
|
8923
|
+
const n = $s(e, t, r), i = Ls(e, t), o = Ps(e, t);
|
|
8924
|
+
Ms(o, n.options);
|
|
8925
|
+
const c = Cs(n.options);
|
|
8907
8926
|
let l;
|
|
8908
8927
|
try {
|
|
8909
8928
|
l = childProcess.spawnSync(n.file, n.args, { ...n.options, input: c });
|
|
8910
8929
|
} catch (m) {
|
|
8911
|
-
throw
|
|
8930
|
+
throw Nn({ error: m, stdout: "", stderr: "", all: "", command: i, escapedCommand: o, parsed: n, timedOut: false, isCanceled: false, killed: false });
|
|
8912
8931
|
}
|
|
8913
|
-
const h =
|
|
8932
|
+
const h = Gn(n.options, l.stdout, l.error), g = Gn(n.options, l.stderr, l.error);
|
|
8914
8933
|
if (l.error || l.status !== 0 || l.signal !== null) {
|
|
8915
|
-
const m =
|
|
8934
|
+
const m = Nn({ stdout: h, stderr: g, error: l.error, signal: l.signal, exitCode: l.status, command: i, escapedCommand: o, parsed: n, timedOut: l.error && l.error.code === "ETIMEDOUT", isCanceled: false, killed: l.signal !== null });
|
|
8916
8935
|
if (!n.options.reject) return m;
|
|
8917
8936
|
throw m;
|
|
8918
8937
|
}
|
|
8919
|
-
return { command:
|
|
8938
|
+
return { command: i, escapedCommand: o, exitCode: 0, stdout: h, stderr: g, failed: false, timedOut: false, isCanceled: false, killed: false };
|
|
8920
8939
|
}
|
|
8921
|
-
s(
|
|
8940
|
+
s(lr, "execaSync");
|
|
8922
8941
|
function At(e) {
|
|
8923
8942
|
try {
|
|
8924
|
-
return
|
|
8943
|
+
return lr("git", ["rev-parse", "HEAD"], e).stdout;
|
|
8925
8944
|
} catch {
|
|
8926
8945
|
return;
|
|
8927
8946
|
}
|
|
8928
8947
|
}
|
|
8929
8948
|
s(At, "head");
|
|
8930
|
-
function
|
|
8949
|
+
function fr(e) {
|
|
8931
8950
|
try {
|
|
8932
|
-
const t =
|
|
8951
|
+
const t = lr("git", ["rev-parse", "--abbrev-ref", "HEAD"], e).stdout;
|
|
8933
8952
|
if (t === "HEAD") {
|
|
8934
|
-
const r =
|
|
8953
|
+
const r = lr("git", ["show", "-s", "--pretty=%d", "HEAD"], e).stdout.replace(/^\(|\)$/g, "").split(", ").find((n) => n.startsWith("origin/"));
|
|
8935
8954
|
return r ? r.match(/^origin\/(?<branch>.+)/)[1] : void 0;
|
|
8936
8955
|
}
|
|
8937
8956
|
return t;
|
|
@@ -8939,217 +8958,217 @@ function lr(e) {
|
|
|
8939
8958
|
return;
|
|
8940
8959
|
}
|
|
8941
8960
|
}
|
|
8942
|
-
s(
|
|
8943
|
-
const
|
|
8944
|
-
function
|
|
8961
|
+
s(fr, "branch");
|
|
8962
|
+
const $n = /^(?:.*)@(?:.*):(?:\d+\/)?(.*)\.git$/, ks = /^\/(.*)\.git$/;
|
|
8963
|
+
function Hs(e) {
|
|
8945
8964
|
if (e) {
|
|
8946
|
-
if (e.match(
|
|
8965
|
+
if (e.match($n)) return e.replace($n, "$1");
|
|
8947
8966
|
try {
|
|
8948
|
-
return new URL(e).pathname.replace(
|
|
8967
|
+
return new URL(e).pathname.replace(ks, "$1");
|
|
8949
8968
|
} catch {
|
|
8950
8969
|
return;
|
|
8951
8970
|
}
|
|
8952
8971
|
}
|
|
8953
8972
|
}
|
|
8954
|
-
s(
|
|
8955
|
-
var
|
|
8973
|
+
s(Hs, "getSlugFromGitURL");
|
|
8974
|
+
var Fs = { detect({ env: e }) {
|
|
8956
8975
|
return !!e.BUILDKITE;
|
|
8957
8976
|
}, configuration({ env: e }) {
|
|
8958
8977
|
const t = e.BUILDKITE_PULL_REQUEST === "false" ? void 0 : e.BUILDKITE_PULL_REQUEST, r = !!t;
|
|
8959
|
-
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:
|
|
8960
|
-
} },
|
|
8978
|
+
return { name: "Buildkite", service: "buildkite", build: e.BUILDKITE_BUILD_NUMBER, buildUrl: e.BUILDKITE_BUILD_URL, commit: e.BUILDKITE_COMMIT, tag: e.BUILDKITE_TAG, branch: r ? e.BUILDKITE_PULL_REQUEST_BASE_BRANCH : e.BUILDKITE_BRANCH, slug: Hs(e.BUILDKITE_REPO), pr: t, isPr: r, prBranch: r ? e.BUILDKITE_BRANCH : void 0, root: e.BUILDKITE_BUILD_CHECKOUT_PATH };
|
|
8979
|
+
} }, js = { detect({ env: e }) {
|
|
8961
8980
|
return !!e.CIRCLECI;
|
|
8962
8981
|
}, configuration({ env: e }) {
|
|
8963
|
-
const t = e.CIRCLE_PR_NUMBER ||
|
|
8982
|
+
const t = e.CIRCLE_PR_NUMBER || En(e.CIRCLE_PULL_REQUEST || e.CI_PULL_REQUEST), r = !!t;
|
|
8964
8983
|
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}` };
|
|
8965
8984
|
} };
|
|
8966
|
-
const
|
|
8967
|
-
var
|
|
8985
|
+
const kn = "https://cirrus-ci.com";
|
|
8986
|
+
var qs = { detect({ env: e }) {
|
|
8968
8987
|
return !!e.CIRRUS_CI;
|
|
8969
8988
|
}, configuration({ env: e }) {
|
|
8970
8989
|
const t = e.CIRRUS_PR, r = !!t;
|
|
8971
|
-
return { name: "Cirrus CI", service: "cirrus", commit: e.CIRRUS_CHANGE_IN_REPO, tag: e.CIRRUS_TAG, build: e.CIRRUS_BUILD_ID, buildUrl: `${
|
|
8972
|
-
} },
|
|
8990
|
+
return { name: "Cirrus CI", service: "cirrus", commit: e.CIRRUS_CHANGE_IN_REPO, tag: e.CIRRUS_TAG, build: e.CIRRUS_BUILD_ID, buildUrl: `${kn}/build/${e.CIRRUS_BUILD_ID}`, job: e.CIRRUS_TASK_ID, jobUrl: `${kn}/task/${e.CIRRUS_TASK_ID}`, branch: r ? e.CIRRUS_BASE_BRANCH : e.CIRRUS_BRANCH, pr: t, isPr: r, prBranch: r ? e.CIRRUS_BRANCH : void 0, slug: e.CIRRUS_REPO_FULL_NAME, root: e.CIRRUS_WORKING_DIR };
|
|
8991
|
+
} }, Ws = { detect({ env: e }) {
|
|
8973
8992
|
return e.CF_PAGES === "1";
|
|
8974
8993
|
}, configuration({ env: e }) {
|
|
8975
8994
|
return { name: "Cloudflare Pages", service: "cloudflarePages", commit: e.CF_PAGES_COMMIT_SHA, branch: e.CF_PAGES_BRANCH, root: e.PWD };
|
|
8976
|
-
} },
|
|
8995
|
+
} }, Ks = { detect({ env: e }) {
|
|
8977
8996
|
return !!e.CODEBUILD_BUILD_ID;
|
|
8978
8997
|
}, configuration({ env: e, cwd: t }) {
|
|
8979
|
-
return { name: "AWS CodeBuild", service: "codebuild", commit: At({ env: e, cwd: t }), build: e.CODEBUILD_BUILD_ID, branch:
|
|
8980
|
-
} },
|
|
8998
|
+
return { name: "AWS CodeBuild", service: "codebuild", commit: At({ env: e, cwd: t }), build: e.CODEBUILD_BUILD_ID, branch: fr({ env: e, cwd: t }), buildUrl: `https://console.aws.amazon.com/codebuild/home?region=${e.AWS_REGION}#/builds/${e.CODEBUILD_BUILD_ID}/view/new`, root: e.PWD };
|
|
8999
|
+
} }, Vs = { detect({ env: e }) {
|
|
8981
9000
|
return !!e.CF_BUILD_ID;
|
|
8982
9001
|
}, configuration({ env: e }) {
|
|
8983
9002
|
const t = e.CF_PULL_REQUEST_NUMBER, r = !!t;
|
|
8984
9003
|
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 };
|
|
8985
|
-
} },
|
|
9004
|
+
} }, Ys = { detect({ env: e }) {
|
|
8986
9005
|
return e.CI_NAME && e.CI_NAME === "codeship";
|
|
8987
9006
|
}, configuration({ env: e }) {
|
|
8988
9007
|
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 };
|
|
8989
|
-
} },
|
|
9008
|
+
} }, zs = { detect({ env: e }) {
|
|
8990
9009
|
return !!e.DRONE;
|
|
8991
9010
|
}, configuration({ env: e }) {
|
|
8992
9011
|
const t = e.DRONE_BUILD_EVENT === "pull_request";
|
|
8993
9012
|
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 };
|
|
8994
|
-
} },
|
|
8995
|
-
return { commit: At(e), branch:
|
|
9013
|
+
} }, Js = { configuration(e) {
|
|
9014
|
+
return { commit: At(e), branch: fr(e) };
|
|
8996
9015
|
} };
|
|
8997
|
-
const
|
|
9016
|
+
const Qs = s(({ env: e }) => {
|
|
8998
9017
|
try {
|
|
8999
9018
|
const t = e.GITHUB_EVENT_PATH ? JSON.parse(readFileSync(e.GITHUB_EVENT_PATH, "utf-8")) : void 0;
|
|
9000
9019
|
if (t && t.pull_request) return { branch: t.pull_request.base ? ot(t.pull_request.base.ref) : void 0, pr: t.pull_request.number };
|
|
9001
9020
|
} catch {
|
|
9002
9021
|
}
|
|
9003
9022
|
return { pr: void 0, branch: void 0 };
|
|
9004
|
-
}, "getPrEvent"),
|
|
9023
|
+
}, "getPrEvent"), Xs = s((e) => {
|
|
9005
9024
|
const t = e.GITHUB_EVENT_PATH ? JSON.parse(readFileSync(e.GITHUB_EVENT_PATH, "utf-8")) : void 0;
|
|
9006
9025
|
return t && t.pull_request ? t.pull_request.number : void 0;
|
|
9007
9026
|
}, "getPrNumber");
|
|
9008
|
-
var
|
|
9027
|
+
var Zs = { detect({ env: e }) {
|
|
9009
9028
|
return !!e.GITHUB_ACTIONS;
|
|
9010
9029
|
}, configuration({ env: e, cwd: t }) {
|
|
9011
|
-
const r = e.GITHUB_EVENT_NAME === "pull_request" || e.GITHUB_EVENT_NAME === "pull_request_target", n = ot(e.GITHUB_EVENT_NAME === "pull_request_target" ? `refs/pull/${
|
|
9012
|
-
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 ?
|
|
9013
|
-
} },
|
|
9030
|
+
const r = e.GITHUB_EVENT_NAME === "pull_request" || e.GITHUB_EVENT_NAME === "pull_request_target", n = ot(e.GITHUB_EVENT_NAME === "pull_request_target" ? `refs/pull/${Xs(e)}/merge` : e.GITHUB_REF);
|
|
9031
|
+
return { name: "GitHub Actions", service: "github", commit: e.GITHUB_SHA, build: e.GITHUB_RUN_ID, buildUrl: `${e.GITHUB_SERVER_URL}/${e.GITHUB_REPOSITORY}/actions/runs/${e.GITHUB_RUN_ID}`, isPr: r, branch: n, prBranch: r ? n : void 0, slug: e.GITHUB_REPOSITORY, root: e.GITHUB_WORKSPACE, ...r ? Qs({ env: e }) : void 0 };
|
|
9032
|
+
} }, ea = { detect({ env: e }) {
|
|
9014
9033
|
return !!e.GITLAB_CI;
|
|
9015
9034
|
}, configuration({ env: e }) {
|
|
9016
9035
|
const t = e.CI_MERGE_REQUEST_ID, r = !!t;
|
|
9017
9036
|
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 };
|
|
9018
|
-
} },
|
|
9037
|
+
} }, ta = { detect({ env: e }) {
|
|
9019
9038
|
return !!e.JENKINS_URL;
|
|
9020
9039
|
}, configuration({ env: e, cwd: t }) {
|
|
9021
|
-
const r = e.ghprbPullId || e.gitlabMergeRequestId || e.CHANGE_ID, n = !!r,
|
|
9022
|
-
return { name: "Jenkins", service: "jenkins", commit: e.ghprbActualCommit || e.GIT_COMMIT || At({ env: e, cwd: t }), branch: n ? e.ghprbTargetBranch || e.gitlabTargetBranch :
|
|
9023
|
-
} },
|
|
9040
|
+
const r = e.ghprbPullId || e.gitlabMergeRequestId || e.CHANGE_ID, n = !!r, i = e.GIT_LOCAL_BRANCH || e.GIT_BRANCH || e.gitlabBranch || e.BRANCH_NAME;
|
|
9041
|
+
return { name: "Jenkins", service: "jenkins", commit: e.ghprbActualCommit || e.GIT_COMMIT || At({ env: e, cwd: t }), branch: n ? e.ghprbTargetBranch || e.gitlabTargetBranch : i, build: e.BUILD_NUMBER, buildUrl: e.BUILD_URL, root: e.WORKSPACE, pr: r, isPr: n, prBranch: n ? e.ghprbSourceBranch || e.gitlabSourceBranch || i : void 0 };
|
|
9042
|
+
} }, ra = { detect({ env: e }) {
|
|
9024
9043
|
return e.NETLIFY === "true";
|
|
9025
9044
|
}, configuration({ env: e }) {
|
|
9026
9045
|
const t = e.PULL_REQUEST === "true";
|
|
9027
9046
|
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 };
|
|
9028
|
-
} },
|
|
9047
|
+
} }, na = { detect({ env: e }) {
|
|
9029
9048
|
return !!e.DISTELLI_APPNAME;
|
|
9030
9049
|
}, configuration({ env: e }) {
|
|
9031
9050
|
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 };
|
|
9032
|
-
} },
|
|
9051
|
+
} }, ia = { detect({ env: e }) {
|
|
9033
9052
|
return !!e.SAILCI;
|
|
9034
9053
|
}, configuration({ env: e }) {
|
|
9035
9054
|
const t = e.SAIL_PULL_REQUEST_NUMBER, r = !!t;
|
|
9036
9055
|
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 };
|
|
9037
|
-
} },
|
|
9056
|
+
} }, oa = { detect({ env: e }) {
|
|
9038
9057
|
return !!e.SCREWDRIVER;
|
|
9039
9058
|
}, configuration({ env: e }) {
|
|
9040
9059
|
const t = e.SD_PULL_REQUEST, r = !!t;
|
|
9041
9060
|
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 };
|
|
9042
|
-
} },
|
|
9061
|
+
} }, sa = { detect({ env: e }) {
|
|
9043
9062
|
return !!e.SCRUTINIZER;
|
|
9044
9063
|
}, configuration({ env: e }) {
|
|
9045
9064
|
const t = e.SCRUTINIZER_PR_NUMBER, r = !!t;
|
|
9046
9065
|
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 };
|
|
9047
|
-
} },
|
|
9066
|
+
} }, aa = { detect({ env: e }) {
|
|
9048
9067
|
return !!e.SEMAPHORE;
|
|
9049
9068
|
}, configuration({ env: e, cwd: t }) {
|
|
9050
9069
|
const r = e.SEMAPHORE_GIT_PR_NUMBER || e.PULL_REQUEST_NUMBER, n = !!r;
|
|
9051
9070
|
return { name: "Semaphore", service: "semaphore", commit: e.SEMAPHORE_GIT_SHA || At({ env: e, cwd: t }), tag: e.SEMAPHORE_GIT_TAG_NAME, build: e.SEMAPHORE_JOB_ID || e.SEMAPHORE_BUILD_NUMBER, branch: e.SEMAPHORE_GIT_BRANCH || (n ? void 0 : e.BRANCH_NAME), pr: r, isPr: n, prBranch: e.SEMAPHORE_GIT_PR_BRANCH || (n ? e.BRANCH_NAME : void 0), slug: e.SEMAPHORE_GIT_REPO_SLUG || e.SEMAPHORE_REPO_SLUG, root: e.SEMAPHORE_GIT_DIR || e.SEMAPHORE_PROJECT_DIR };
|
|
9052
|
-
} },
|
|
9071
|
+
} }, ca = { detect({ env: e }) {
|
|
9053
9072
|
return !!e.SHIPPABLE;
|
|
9054
9073
|
}, configuration({ env: e }) {
|
|
9055
9074
|
const t = e.IS_PULL_REQUEST === "true" ? e.PULL_REQUEST : void 0, r = !!t;
|
|
9056
9075
|
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 };
|
|
9057
|
-
} }, He = {},
|
|
9058
|
-
function
|
|
9059
|
-
if (
|
|
9060
|
-
|
|
9076
|
+
} }, He = {}, Hn;
|
|
9077
|
+
function ua() {
|
|
9078
|
+
if (Hn) return He;
|
|
9079
|
+
Hn = 1, Object.defineProperty(He, "__esModule", { value: true }), He.of = He.PropertiesFile = void 0;
|
|
9061
9080
|
var e = t(ze);
|
|
9062
|
-
function t(
|
|
9063
|
-
return
|
|
9081
|
+
function t(i) {
|
|
9082
|
+
return i && i.__esModule ? i : { default: i };
|
|
9064
9083
|
}
|
|
9065
9084
|
s(t, "_interopRequireDefault");
|
|
9066
9085
|
class r {
|
|
9067
9086
|
static {
|
|
9068
9087
|
s(this, "PropertiesFile");
|
|
9069
9088
|
}
|
|
9070
|
-
constructor(...
|
|
9071
|
-
this.objs = {},
|
|
9089
|
+
constructor(...o) {
|
|
9090
|
+
this.objs = {}, o.length && this.of.apply(this, o);
|
|
9072
9091
|
}
|
|
9073
|
-
makeKeys(
|
|
9074
|
-
if (
|
|
9075
|
-
let c = ["=", ":"].map((m) =>
|
|
9076
|
-
if (this.objs.hasOwnProperty(h)) if (Array.isArray(this.objs[h])) this.objs[h].push(
|
|
9092
|
+
makeKeys(o) {
|
|
9093
|
+
if (o && o.indexOf("#") !== 0) {
|
|
9094
|
+
let c = ["=", ":"].map((m) => o.indexOf(m)).filter((m) => m > -1), l = Math.min(...c), h = o.substring(0, l).trim(), g = o.substring(l + 1).trim();
|
|
9095
|
+
if (this.objs.hasOwnProperty(h)) if (Array.isArray(this.objs[h])) this.objs[h].push(g);
|
|
9077
9096
|
else {
|
|
9078
9097
|
let m = this.objs[h];
|
|
9079
|
-
this.objs[h] = [m,
|
|
9098
|
+
this.objs[h] = [m, g];
|
|
9080
9099
|
}
|
|
9081
9100
|
else {
|
|
9082
|
-
const m =
|
|
9101
|
+
const m = g.replace(/"/g, '\\"').replace(/\\:/g, ":").replace(/\\=/g, "=");
|
|
9083
9102
|
this.objs[h] = unescape(JSON.parse('"' + m + '"'));
|
|
9084
9103
|
}
|
|
9085
9104
|
}
|
|
9086
9105
|
}
|
|
9087
|
-
addFile(
|
|
9088
|
-
let l = e.default.readFileSync(
|
|
9089
|
-
for (let
|
|
9090
|
-
let m = l[
|
|
9106
|
+
addFile(o) {
|
|
9107
|
+
let l = e.default.readFileSync(o, "utf-8").split(/\r?\n/), h = this;
|
|
9108
|
+
for (let g = 0; g < l.length; g++) {
|
|
9109
|
+
let m = l[g];
|
|
9091
9110
|
for (; m.substring(m.length - 1) === "\\"; ) {
|
|
9092
9111
|
m = m.slice(0, -1);
|
|
9093
|
-
let A = l[
|
|
9094
|
-
m = m + A.trim(),
|
|
9112
|
+
let A = l[g + 1];
|
|
9113
|
+
m = m + A.trim(), g++;
|
|
9095
9114
|
}
|
|
9096
9115
|
h.makeKeys(m);
|
|
9097
9116
|
}
|
|
9098
9117
|
}
|
|
9099
|
-
of(...
|
|
9100
|
-
for (let c = 0; c <
|
|
9118
|
+
of(...o) {
|
|
9119
|
+
for (let c = 0; c < o.length; c++) this.addFile(o[c]);
|
|
9101
9120
|
}
|
|
9102
|
-
get(
|
|
9103
|
-
if (this.objs.hasOwnProperty(
|
|
9121
|
+
get(o, c) {
|
|
9122
|
+
if (this.objs.hasOwnProperty(o)) if (Array.isArray(this.objs[o])) {
|
|
9104
9123
|
let l = [];
|
|
9105
|
-
for (let h = 0; h < this.objs[
|
|
9124
|
+
for (let h = 0; h < this.objs[o].length; h++) l[h] = this.interpolate(this.objs[o][h]);
|
|
9106
9125
|
return l;
|
|
9107
|
-
} else return typeof this.objs[
|
|
9126
|
+
} else return typeof this.objs[o] > "u" ? "" : this.interpolate(this.objs[o]);
|
|
9108
9127
|
return c;
|
|
9109
9128
|
}
|
|
9110
|
-
getLast(
|
|
9111
|
-
if (this.objs.hasOwnProperty(
|
|
9112
|
-
var l = this.objs[
|
|
9113
|
-
return this.interpolate(this.objs[
|
|
9114
|
-
} else return typeof this.objs[
|
|
9129
|
+
getLast(o, c) {
|
|
9130
|
+
if (this.objs.hasOwnProperty(o)) if (Array.isArray(this.objs[o])) {
|
|
9131
|
+
var l = this.objs[o].length;
|
|
9132
|
+
return this.interpolate(this.objs[o][l - 1]);
|
|
9133
|
+
} else return typeof this.objs[o] > "u" ? "" : this.interpolate(this.objs[o]);
|
|
9115
9134
|
return c;
|
|
9116
9135
|
}
|
|
9117
|
-
getFirst(
|
|
9118
|
-
return this.objs.hasOwnProperty(
|
|
9136
|
+
getFirst(o, c) {
|
|
9137
|
+
return this.objs.hasOwnProperty(o) ? Array.isArray(this.objs[o]) ? this.interpolate(this.objs[o][0]) : typeof this.objs[o] > "u" ? "" : this.interpolate(this.objs[o]) : c;
|
|
9119
9138
|
}
|
|
9120
|
-
getInt(
|
|
9121
|
-
let l = this.getLast(
|
|
9139
|
+
getInt(o, c) {
|
|
9140
|
+
let l = this.getLast(o);
|
|
9122
9141
|
return l ? parseInt(l, 10) : c;
|
|
9123
9142
|
}
|
|
9124
|
-
getFloat(
|
|
9125
|
-
let l = this.getLast(
|
|
9143
|
+
getFloat(o, c) {
|
|
9144
|
+
let l = this.getLast(o);
|
|
9126
9145
|
return l ? parseFloat(l) : c;
|
|
9127
9146
|
}
|
|
9128
|
-
getBoolean(
|
|
9129
|
-
function l(
|
|
9130
|
-
return !/^(false|0)$/i.test(
|
|
9147
|
+
getBoolean(o, c) {
|
|
9148
|
+
function l(g) {
|
|
9149
|
+
return !/^(false|0)$/i.test(g) && !!g;
|
|
9131
9150
|
}
|
|
9132
9151
|
s(l, "parseBool");
|
|
9133
|
-
let h = this.getLast(
|
|
9152
|
+
let h = this.getLast(o);
|
|
9134
9153
|
return h ? l(h) : c || false;
|
|
9135
9154
|
}
|
|
9136
|
-
set(
|
|
9137
|
-
this.objs[
|
|
9155
|
+
set(o, c) {
|
|
9156
|
+
this.objs[o] = c;
|
|
9138
9157
|
}
|
|
9139
|
-
interpolate(
|
|
9158
|
+
interpolate(o) {
|
|
9140
9159
|
let c = this;
|
|
9141
|
-
return
|
|
9160
|
+
return o.replace(/\\\\/g, "\\").replace(/\$\{([A-Za-z0-9\.\-\_]*)\}/g, function(l) {
|
|
9142
9161
|
return c.getLast(l.substring(2, l.length - 1));
|
|
9143
9162
|
});
|
|
9144
9163
|
}
|
|
9145
9164
|
getKeys() {
|
|
9146
|
-
let
|
|
9147
|
-
for (let c in this.objs)
|
|
9148
|
-
return
|
|
9165
|
+
let o = [];
|
|
9166
|
+
for (let c in this.objs) o.push(c);
|
|
9167
|
+
return o;
|
|
9149
9168
|
}
|
|
9150
|
-
getMatchingKeys(
|
|
9169
|
+
getMatchingKeys(o) {
|
|
9151
9170
|
let c = [];
|
|
9152
|
-
for (let l in this.objs) l.search(
|
|
9171
|
+
for (let l in this.objs) l.search(o) !== -1 && c.push(l);
|
|
9153
9172
|
return c;
|
|
9154
9173
|
}
|
|
9155
9174
|
reset() {
|
|
@@ -9157,69 +9176,70 @@ function ra() {
|
|
|
9157
9176
|
}
|
|
9158
9177
|
}
|
|
9159
9178
|
He.PropertiesFile = r;
|
|
9160
|
-
let n = s(function(...
|
|
9179
|
+
let n = s(function(...o) {
|
|
9161
9180
|
let c = new r();
|
|
9162
|
-
return c.of.apply(c,
|
|
9181
|
+
return c.of.apply(c, o), c;
|
|
9163
9182
|
}, "of2");
|
|
9164
9183
|
return He.of = n, He;
|
|
9165
9184
|
}
|
|
9166
|
-
s(
|
|
9167
|
-
var
|
|
9168
|
-
const
|
|
9185
|
+
s(ua, "requireDistNode");
|
|
9186
|
+
var la = ua(), fa = kr(la);
|
|
9187
|
+
const hr = { root: "teamcity.build.workingDir", branch: "teamcity.build.branch" }, Fn = s((e) => {
|
|
9169
9188
|
try {
|
|
9170
|
-
return
|
|
9189
|
+
return fa.of(e);
|
|
9171
9190
|
} catch {
|
|
9172
9191
|
return;
|
|
9173
9192
|
}
|
|
9174
|
-
}, "safeReadProperties"),
|
|
9175
|
-
const r = e.TEAMCITY_BUILD_PROPERTIES_FILE ?
|
|
9176
|
-
return Object.fromEntries(Object.keys(
|
|
9193
|
+
}, "safeReadProperties"), ha = s(({ env: e, cwd: t }) => {
|
|
9194
|
+
const r = e.TEAMCITY_BUILD_PROPERTIES_FILE ? Fn(e.TEAMCITY_BUILD_PROPERTIES_FILE) : void 0, n = r ? r.get("teamcity.configuration.properties.file") : void 0, i = n && Fn(n);
|
|
9195
|
+
return Object.fromEntries(Object.keys(hr).map((o) => [o, (r ? r.get(hr[o]) : void 0) || (i ? i.get(hr[o]) : void 0) || (o === "branch" ? fr({ env: e, cwd: t }) : void 0)]));
|
|
9177
9196
|
}, "getProperties");
|
|
9178
|
-
var
|
|
9197
|
+
var da = { detect({ env: e }) {
|
|
9179
9198
|
return !!e.TEAMCITY_VERSION;
|
|
9180
9199
|
}, configuration({ env: e, cwd: t }) {
|
|
9181
|
-
return { name: "TeamCity", service: "teamcity", commit: e.BUILD_VCS_NUMBER, build: e.BUILD_NUMBER, slug: e.TEAMCITY_BUILDCONF_NAME, ...
|
|
9182
|
-
} },
|
|
9200
|
+
return { name: "TeamCity", service: "teamcity", commit: e.BUILD_VCS_NUMBER, build: e.BUILD_NUMBER, slug: e.TEAMCITY_BUILDCONF_NAME, ...ha({ env: e, cwd: t }) };
|
|
9201
|
+
} }, pa = { detect({ env: e }) {
|
|
9183
9202
|
return !!e.TRAVIS;
|
|
9184
9203
|
}, configuration({ env: e }) {
|
|
9185
9204
|
const t = e.TRAVIS_PULL_REQUEST === "false" ? void 0 : e.TRAVIS_PULL_REQUEST, r = !!t;
|
|
9186
9205
|
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 };
|
|
9187
|
-
} },
|
|
9206
|
+
} }, ma = { detect({ env: e }) {
|
|
9188
9207
|
return !!e.VELA;
|
|
9189
9208
|
}, configuration({ env: e }) {
|
|
9190
9209
|
const t = e.VELA_BUILD_EVENT === "pull_request";
|
|
9191
9210
|
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 };
|
|
9192
|
-
} },
|
|
9211
|
+
} }, Ea = { detect({ env: e }) {
|
|
9193
9212
|
return !!e.VERCEL || !!e.NOW_GITHUB_DEPLOYMENT;
|
|
9194
9213
|
}, configuration({ env: e }) {
|
|
9195
9214
|
const t = "Vercel", r = "vercel";
|
|
9196
9215
|
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}` };
|
|
9197
|
-
} },
|
|
9216
|
+
} }, _a = { detect({ env: e }) {
|
|
9198
9217
|
return !!e.WERCKER_MAIN_PIPELINE_STARTED;
|
|
9199
9218
|
}, configuration({ env: e }) {
|
|
9200
9219
|
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 };
|
|
9201
|
-
} },
|
|
9220
|
+
} }, ga = { detect({ env: e }) {
|
|
9202
9221
|
return e.CI && e.CI === "woodpecker";
|
|
9203
9222
|
}, configuration({ env: e }) {
|
|
9204
9223
|
const t = e.CI_PIPELINE_EVENT === "pull_request";
|
|
9205
9224
|
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 };
|
|
9206
|
-
} },
|
|
9225
|
+
} }, Ia = { detect({ env: e }) {
|
|
9207
9226
|
return !!e.JB_SPACE_EXECUTION_NUMBER;
|
|
9208
9227
|
}, configuration({ env: e }) {
|
|
9209
9228
|
const t = e.JB_SPACE_PROJECT_KEY, r = e.JB_SPACE_GIT_REPOSITORY_NAME;
|
|
9210
9229
|
return { name: "JetBrains Space", service: "jetbrainsSpace", commit: e.JB_SPACE_GIT_REVISION, build: e.JB_SPACE_EXECUTION_NUMBER, branch: ot(e.JB_SPACE_GIT_BRANCH), slug: t && r ? `${t.toLowerCase()}/${r}` : void 0 };
|
|
9211
9230
|
} };
|
|
9212
|
-
const
|
|
9213
|
-
var
|
|
9214
|
-
for (const r of Object.keys(
|
|
9215
|
-
return { isCi: !!e.CI, ...
|
|
9216
|
-
}, "
|
|
9217
|
-
function
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
}
|
|
9221
|
-
|
|
9222
|
-
|
|
9231
|
+
const dr = { appveyor: No, azurePipelines: Do, bamboo: Mo, bitbucket: xo, bitrise: Go, buddy: $o, buildkite: Fs, circleci: js, cirrus: qs, cloudflarePages: Ws, codebuild: Ks, codefresh: Vs, codeship: Ys, drone: zs, github: Zs, gitlab: ea, jenkins: ta, netlify: ra, puppet: na, sail: ia, screwdriver: oa, scrutinizer: sa, semaphore: aa, shippable: ca, teamcity: da, travis: pa, vela: ma, vercel: Ea, wercker: _a, woodpecker: ga, jetbrainsSpace: Ia };
|
|
9232
|
+
var pr = s(({ env: e = process.env, cwd: t = process.cwd() } = {}) => {
|
|
9233
|
+
for (const r of Object.keys(dr)) if (dr[r].detect({ env: e, cwd: t })) return { isCi: true, ...dr[r].configuration({ env: e, cwd: t }) };
|
|
9234
|
+
return { isCi: !!e.CI, ...Js.configuration({ env: e, cwd: t }) };
|
|
9235
|
+
}, "envCiModule");
|
|
9236
|
+
const Sa = typeof pr == "function" ? pr : pr.default;
|
|
9237
|
+
function Ra() {
|
|
9238
|
+
const e = Sa();
|
|
9239
|
+
return { branch: e.branch, commit: { message: ya(), sha: e.commit }, isCI: e.isCi, pr: Ta() };
|
|
9240
|
+
}
|
|
9241
|
+
s(Ra, "getGitInfo");
|
|
9242
|
+
function Ta() {
|
|
9223
9243
|
try {
|
|
9224
9244
|
const e = process.env.GITHUB_EVENT_PATH;
|
|
9225
9245
|
if (e) {
|
|
@@ -9231,30 +9251,30 @@ function ma() {
|
|
|
9231
9251
|
return;
|
|
9232
9252
|
}
|
|
9233
9253
|
}
|
|
9234
|
-
s(
|
|
9235
|
-
function
|
|
9254
|
+
s(Ta, "getPRInfo");
|
|
9255
|
+
function ya() {
|
|
9236
9256
|
try {
|
|
9237
9257
|
return execSync("git log -1 --pretty=%B", { encoding: "utf-8", stdio: ["pipe", "pipe", "ignore"] }).trim();
|
|
9238
9258
|
} catch {
|
|
9239
9259
|
return;
|
|
9240
9260
|
}
|
|
9241
9261
|
}
|
|
9242
|
-
s(
|
|
9243
|
-
function
|
|
9244
|
-
return { hostname:
|
|
9262
|
+
s(ya, "getLastCommitMessage");
|
|
9263
|
+
function wa() {
|
|
9264
|
+
return { hostname: wr.hostname(), platform: wr.platform() };
|
|
9245
9265
|
}
|
|
9246
|
-
s(
|
|
9247
|
-
const
|
|
9248
|
-
var
|
|
9249
|
-
function o
|
|
9250
|
-
return
|
|
9251
|
-
c(
|
|
9266
|
+
s(wa, "getMachineInfo");
|
|
9267
|
+
const Aa = new Error("request for lock canceled");
|
|
9268
|
+
var va = s(function(e, t, r, n) {
|
|
9269
|
+
function i(o) {
|
|
9270
|
+
return o instanceof r ? o : new r(function(c) {
|
|
9271
|
+
c(o);
|
|
9252
9272
|
});
|
|
9253
9273
|
}
|
|
9254
|
-
return s(
|
|
9274
|
+
return s(i, "adopt"), new (r || (r = Promise))(function(o, c) {
|
|
9255
9275
|
function l(m) {
|
|
9256
9276
|
try {
|
|
9257
|
-
|
|
9277
|
+
g(n.next(m));
|
|
9258
9278
|
} catch (A) {
|
|
9259
9279
|
c(A);
|
|
9260
9280
|
}
|
|
@@ -9262,37 +9282,37 @@ var Ia = s(function(e, t, r, n) {
|
|
|
9262
9282
|
s(l, "fulfilled");
|
|
9263
9283
|
function h(m) {
|
|
9264
9284
|
try {
|
|
9265
|
-
|
|
9285
|
+
g(n.throw(m));
|
|
9266
9286
|
} catch (A) {
|
|
9267
9287
|
c(A);
|
|
9268
9288
|
}
|
|
9269
9289
|
}
|
|
9270
9290
|
s(h, "rejected");
|
|
9271
|
-
function
|
|
9272
|
-
m.done ?
|
|
9291
|
+
function g(m) {
|
|
9292
|
+
m.done ? o(m.value) : i(m.value).then(l, h);
|
|
9273
9293
|
}
|
|
9274
|
-
s(
|
|
9294
|
+
s(g, "step"), g((n = n.apply(e, t || [])).next());
|
|
9275
9295
|
});
|
|
9276
9296
|
}, "__awaiter$2");
|
|
9277
|
-
class
|
|
9297
|
+
class ba {
|
|
9278
9298
|
static {
|
|
9279
9299
|
s(this, "Semaphore");
|
|
9280
9300
|
}
|
|
9281
|
-
constructor(t, r =
|
|
9301
|
+
constructor(t, r = Aa) {
|
|
9282
9302
|
this._value = t, this._cancelError = r, this._queue = [], this._weightedWaiters = [];
|
|
9283
9303
|
}
|
|
9284
9304
|
acquire(t = 1, r = 0) {
|
|
9285
9305
|
if (t <= 0) throw new Error(`invalid weight ${t}: must be positive`);
|
|
9286
|
-
return new Promise((n,
|
|
9287
|
-
const
|
|
9288
|
-
c === -1 && t <= this._value ? this._dispatchItem(
|
|
9306
|
+
return new Promise((n, i) => {
|
|
9307
|
+
const o = { resolve: n, reject: i, weight: t, priority: r }, c = jn(this._queue, (l) => r <= l.priority);
|
|
9308
|
+
c === -1 && t <= this._value ? this._dispatchItem(o) : this._queue.splice(c + 1, 0, o);
|
|
9289
9309
|
});
|
|
9290
9310
|
}
|
|
9291
9311
|
runExclusive(t) {
|
|
9292
|
-
return
|
|
9293
|
-
const [
|
|
9312
|
+
return va(this, arguments, void 0, function* (r, n = 1, i = 0) {
|
|
9313
|
+
const [o, c] = yield this.acquire(n, i);
|
|
9294
9314
|
try {
|
|
9295
|
-
return yield r(
|
|
9315
|
+
return yield r(o);
|
|
9296
9316
|
} finally {
|
|
9297
9317
|
c();
|
|
9298
9318
|
}
|
|
@@ -9301,7 +9321,7 @@ class Sa {
|
|
|
9301
9321
|
waitForUnlock(t = 1, r = 0) {
|
|
9302
9322
|
if (t <= 0) throw new Error(`invalid weight ${t}: must be positive`);
|
|
9303
9323
|
return this._couldLockImmediately(t, r) ? Promise.resolve() : new Promise((n) => {
|
|
9304
|
-
this._weightedWaiters[t - 1] || (this._weightedWaiters[t - 1] = []),
|
|
9324
|
+
this._weightedWaiters[t - 1] || (this._weightedWaiters[t - 1] = []), Ca(this._weightedWaiters[t - 1], { resolve: n, priority: r });
|
|
9305
9325
|
});
|
|
9306
9326
|
}
|
|
9307
9327
|
isLocked() {
|
|
@@ -9343,8 +9363,8 @@ class Sa {
|
|
|
9343
9363
|
for (let r = this._value; r > 0; r--) {
|
|
9344
9364
|
const n = this._weightedWaiters[r - 1];
|
|
9345
9365
|
if (!n) continue;
|
|
9346
|
-
const
|
|
9347
|
-
(
|
|
9366
|
+
const i = n.findIndex((o) => o.priority <= t);
|
|
9367
|
+
(i === -1 ? n : n.splice(0, i)).forEach(((o) => o.resolve()));
|
|
9348
9368
|
}
|
|
9349
9369
|
}
|
|
9350
9370
|
}
|
|
@@ -9352,26 +9372,26 @@ class Sa {
|
|
|
9352
9372
|
return (this._queue.length === 0 || this._queue[0].priority < r) && t <= this._value;
|
|
9353
9373
|
}
|
|
9354
9374
|
}
|
|
9355
|
-
function
|
|
9356
|
-
const r =
|
|
9375
|
+
function Ca(e, t) {
|
|
9376
|
+
const r = jn(e, (n) => t.priority <= n.priority);
|
|
9357
9377
|
e.splice(r + 1, 0, t);
|
|
9358
9378
|
}
|
|
9359
|
-
s(
|
|
9360
|
-
function
|
|
9379
|
+
s(Ca, "insertSorted");
|
|
9380
|
+
function jn(e, t) {
|
|
9361
9381
|
for (let r = e.length - 1; r >= 0; r--) if (t(e[r])) return r;
|
|
9362
9382
|
return -1;
|
|
9363
9383
|
}
|
|
9364
|
-
s(
|
|
9365
|
-
var
|
|
9366
|
-
function o
|
|
9367
|
-
return
|
|
9368
|
-
c(
|
|
9384
|
+
s(jn, "findIndexFromEnd");
|
|
9385
|
+
var Ua = s(function(e, t, r, n) {
|
|
9386
|
+
function i(o) {
|
|
9387
|
+
return o instanceof r ? o : new r(function(c) {
|
|
9388
|
+
c(o);
|
|
9369
9389
|
});
|
|
9370
9390
|
}
|
|
9371
|
-
return s(
|
|
9391
|
+
return s(i, "adopt"), new (r || (r = Promise))(function(o, c) {
|
|
9372
9392
|
function l(m) {
|
|
9373
9393
|
try {
|
|
9374
|
-
|
|
9394
|
+
g(n.next(m));
|
|
9375
9395
|
} catch (A) {
|
|
9376
9396
|
c(A);
|
|
9377
9397
|
}
|
|
@@ -9379,27 +9399,27 @@ var Ta = s(function(e, t, r, n) {
|
|
|
9379
9399
|
s(l, "fulfilled");
|
|
9380
9400
|
function h(m) {
|
|
9381
9401
|
try {
|
|
9382
|
-
|
|
9402
|
+
g(n.throw(m));
|
|
9383
9403
|
} catch (A) {
|
|
9384
9404
|
c(A);
|
|
9385
9405
|
}
|
|
9386
9406
|
}
|
|
9387
9407
|
s(h, "rejected");
|
|
9388
|
-
function
|
|
9389
|
-
m.done ?
|
|
9408
|
+
function g(m) {
|
|
9409
|
+
m.done ? o(m.value) : i(m.value).then(l, h);
|
|
9390
9410
|
}
|
|
9391
|
-
s(
|
|
9411
|
+
s(g, "step"), g((n = n.apply(e, t || [])).next());
|
|
9392
9412
|
});
|
|
9393
9413
|
}, "__awaiter$1");
|
|
9394
|
-
class
|
|
9414
|
+
class Ba {
|
|
9395
9415
|
static {
|
|
9396
9416
|
s(this, "Mutex");
|
|
9397
9417
|
}
|
|
9398
9418
|
constructor(t) {
|
|
9399
|
-
this._semaphore = new
|
|
9419
|
+
this._semaphore = new ba(1, t);
|
|
9400
9420
|
}
|
|
9401
9421
|
acquire() {
|
|
9402
|
-
return
|
|
9422
|
+
return Ua(this, arguments, void 0, function* (t = 0) {
|
|
9403
9423
|
const [, r] = yield this._semaphore.acquire(1, t);
|
|
9404
9424
|
return r;
|
|
9405
9425
|
});
|
|
@@ -9420,47 +9440,47 @@ class wa {
|
|
|
9420
9440
|
return this._semaphore.cancel();
|
|
9421
9441
|
}
|
|
9422
9442
|
}
|
|
9423
|
-
function
|
|
9443
|
+
function qn(e, t) {
|
|
9424
9444
|
const r = e.length;
|
|
9425
|
-
let n = 0,
|
|
9426
|
-
const
|
|
9427
|
-
return t({ completed: n, errors:
|
|
9428
|
-
n++, t({ completed: n, errors:
|
|
9445
|
+
let n = 0, i = 0;
|
|
9446
|
+
const o = new Ba();
|
|
9447
|
+
return t({ completed: n, errors: i, total: r }), e.map((c) => c.then(async (l) => (await o.runExclusive(() => {
|
|
9448
|
+
n++, t({ completed: n, errors: i, total: r });
|
|
9429
9449
|
}), l)).catch(async (l) => {
|
|
9430
|
-
throw await
|
|
9431
|
-
n++,
|
|
9450
|
+
throw await o.runExclusive(() => {
|
|
9451
|
+
n++, i++, t({ completed: n, errors: i, total: r });
|
|
9432
9452
|
}), l;
|
|
9433
9453
|
}));
|
|
9434
9454
|
}
|
|
9435
|
-
s(
|
|
9436
|
-
function
|
|
9437
|
-
return e.steps.map((r) =>
|
|
9455
|
+
s(qn, "trackPromiseProgress");
|
|
9456
|
+
function Oa({ result: e, sensitiveValues: t }) {
|
|
9457
|
+
return e.steps.map((r) => Wn({ sensitiveValues: t, step: r }));
|
|
9438
9458
|
}
|
|
9439
|
-
s(
|
|
9440
|
-
function
|
|
9441
|
-
const r = s((n) => n && e?.length ?
|
|
9442
|
-
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) =>
|
|
9459
|
+
s(Oa, "extractSteps");
|
|
9460
|
+
function Wn({ sensitiveValues: e, step: t }) {
|
|
9461
|
+
const r = s((n) => n && e?.length ? se({ sensitiveValues: e, str: n }) : n, "scrub");
|
|
9462
|
+
return { category: t.category, duration: t.duration, error: t.error ? { message: r(t.error.message) || "Unknown error", stack: r(t.error.stack) } : void 0, location: t.location ? { column: t.location.column, file: t.location.file, line: t.location.line } : void 0, startedAt: new Date(t.startTime), steps: t.steps && t.steps.length > 0 ? t.steps.map((n) => Wn({ sensitiveValues: e, step: n })) : void 0, title: r(t.title) ?? t.title };
|
|
9443
9463
|
}
|
|
9444
|
-
s(
|
|
9445
|
-
async function
|
|
9464
|
+
s(Wn, "extractStep");
|
|
9465
|
+
async function La({ fileData: e, maxRetries: t = 3, uploadUrl: r }) {
|
|
9446
9466
|
await pRetry(async () => {
|
|
9447
9467
|
const n = await fetch(r, { body: e, method: "PUT" });
|
|
9448
9468
|
if (!n.ok) throw n.status >= 400 && n.status < 500 ? new AbortError(`Upload failed with status ${n.status}: ${n.statusText}`) : new Error(`Upload failed with status ${n.status}: ${n.statusText}`);
|
|
9449
9469
|
}, { minTimeout: 2e3, randomize: true, retries: t });
|
|
9450
9470
|
}
|
|
9451
|
-
s(
|
|
9452
|
-
const
|
|
9471
|
+
s(La, "uploadWithRetry");
|
|
9472
|
+
const Pa = process.env.STABLY_WS_URL || "wss://api.stably.ai/reporter", Kn = 120 * 1e3, Na = s(({ notificationConfigs: e, suite: t }) => {
|
|
9453
9473
|
if (!e || e.length === 0) return;
|
|
9454
|
-
const r = new Set(t.allTests().map((
|
|
9474
|
+
const r = new Set(t.allTests().map((i) => i.parent.project()?.name).filter(Boolean)), n = e.filter((i) => r.has(i.projectName));
|
|
9455
9475
|
return n.length > 0 ? n : void 0;
|
|
9456
|
-
}, "filterNotificationConfigsByRunningProjects"),
|
|
9476
|
+
}, "filterNotificationConfigsByRunningProjects"), Da = s((e) => e ? { configFile: e.configFile, forbidOnly: e.forbidOnly, fullyParallel: e.fullyParallel, globalSetup: e.globalSetup, globalTeardown: e.globalTeardown, globalTimeout: e.globalTimeout, grep: e.grep?.toString(), grepInvert: e.grepInvert?.toString(), maxFailures: e.maxFailures, metadata: e.metadata, preserveOutput: e.preserveOutput, quiet: e.quiet, reporter: e.reporter, reportSlowTests: e.reportSlowTests, rootDir: e.rootDir, shard: e.shard, updateSnapshots: e.updateSnapshots, version: e.version, webServer: e.webServer, workers: e.workers } : void 0, "extractConfigInfo"), Ma = s(({ absolutePath: e, rootDir: t }) => {
|
|
9457
9477
|
if (t && e.startsWith(t)) {
|
|
9458
9478
|
const r = e.slice(t.length);
|
|
9459
9479
|
return r.startsWith("/") ? r.slice(1) : r;
|
|
9460
9480
|
}
|
|
9461
9481
|
return e;
|
|
9462
9482
|
}, "makePathRelative");
|
|
9463
|
-
class
|
|
9483
|
+
class Vn {
|
|
9464
9484
|
static {
|
|
9465
9485
|
s(this, "StablyReporter");
|
|
9466
9486
|
}
|
|
@@ -9485,16 +9505,16 @@ class jn {
|
|
|
9485
9505
|
if (!r) throw new Error("STABLY_API_KEY is required. Provide it via options or environment variable.");
|
|
9486
9506
|
if (!n) throw new Error("STABLY_PROJECT_ID is required. Provide it via options or environment variable.");
|
|
9487
9507
|
if (this.notificationConfigs = t?.notificationConfigs, t?.sensitiveValues?.length) {
|
|
9488
|
-
const
|
|
9489
|
-
this.sensitiveValues = [...
|
|
9508
|
+
const i = ln(t.sensitiveValues);
|
|
9509
|
+
this.sensitiveValues = [...i].sort((o, c) => c.length - o.length);
|
|
9490
9510
|
}
|
|
9491
|
-
this.wsClient = new
|
|
9511
|
+
this.wsClient = new Po({ apiKey: r, maxBufferSize: 1e3, maxReconnectAttempts: 3, onError: s((i) => this.handleWebSocketError(i), "onError"), onMessage: s((i) => this.handleWebSocketMessage(i), "onMessage"), projectId: n, reconnectDelay: 2e3, url: Pa });
|
|
9492
9512
|
}
|
|
9493
9513
|
onBegin(t, r) {
|
|
9494
9514
|
if (this.isListMode = process.argv.includes("--list"), this.isListMode) return;
|
|
9495
9515
|
r.allTests().length === 0 && process.exit(1), this.config = t, this.testSuiteRunId = this.getSuiteRunId(t), this.rootDir = t.rootDir, this.suiteData = this.extractSuiteInfo(t, r);
|
|
9496
|
-
const
|
|
9497
|
-
this.filteredNotificationConfigs =
|
|
9516
|
+
const i = Na({ notificationConfigs: this.notificationConfigs, suite: r });
|
|
9517
|
+
this.filteredNotificationConfigs = i, this.pendingOperations.push(this.wsClient.sendEvent({ payload: { ...this.suiteData, notificationRequest: i ? { notificationConfigs: i, totalShards: this.config?.shard?.total } : void 0, status: "running" }, type: "suite_start" }));
|
|
9498
9518
|
}
|
|
9499
9519
|
getSuiteRunId(t) {
|
|
9500
9520
|
return getCiRunKey() ?? t.metadata?.testSuiteRunId ?? ut();
|
|
@@ -9508,16 +9528,16 @@ class jn {
|
|
|
9508
9528
|
if (this.isListMode) return;
|
|
9509
9529
|
const n = this.extractTestCaseInfo(t, r);
|
|
9510
9530
|
this.testCases.push(n), this.testStepsMap.set(n.id, r);
|
|
9511
|
-
const
|
|
9512
|
-
const l = await this.extractAttachmentMetadata({ attachments:
|
|
9513
|
-
let h,
|
|
9514
|
-
l.length > 0 && (h = `${n.id}-${n.attemptNumber}`,
|
|
9531
|
+
const i = Oa({ result: r, sensitiveValues: this.sensitiveValues }), o = [...r.attachments, { contentType: "text/plain", name: "source-code", path: t.location.file }], c = (async () => {
|
|
9532
|
+
const l = await this.extractAttachmentMetadata({ attachments: o, attemptNumber: n.attemptNumber, testId: n.id });
|
|
9533
|
+
let h, g;
|
|
9534
|
+
l.length > 0 && (h = `${n.id}-${n.attemptNumber}`, g = new Promise((m) => {
|
|
9515
9535
|
this.pendingUploadUrlRequests.set(h, m);
|
|
9516
|
-
}), this.pendingOperations.push(
|
|
9536
|
+
}), this.pendingOperations.push(g));
|
|
9517
9537
|
try {
|
|
9518
|
-
await this.wsClient.sendEvent({ payload: { ...n, attachments: l, steps:
|
|
9538
|
+
await this.wsClient.sendEvent({ payload: { ...n, attachments: l, steps: i }, type: "test_end" });
|
|
9519
9539
|
} catch (m) {
|
|
9520
|
-
if (h &&
|
|
9540
|
+
if (h && g) {
|
|
9521
9541
|
const A = this.pendingUploadUrlRequests.get(h);
|
|
9522
9542
|
A && (A(), this.pendingUploadUrlRequests.delete(h));
|
|
9523
9543
|
}
|
|
@@ -9531,60 +9551,77 @@ class jn {
|
|
|
9531
9551
|
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...");
|
|
9532
9552
|
const r = Y$1();
|
|
9533
9553
|
r.start("Waiting for tasks to finish...");
|
|
9534
|
-
const n = Promise.allSettled(
|
|
9535
|
-
r.message(`${h}/${m} tasks finished${
|
|
9536
|
-
})),
|
|
9554
|
+
const n = Promise.allSettled(qn(this.pendingOperations, ({ completed: h, errors: g, total: m }) => {
|
|
9555
|
+
r.message(`${h}/${m} tasks finished${g > 0 ? `, ${g} errors` : ""}`);
|
|
9556
|
+
})), i = new Promise((h, g) => {
|
|
9537
9557
|
setTimeout(() => {
|
|
9538
|
-
|
|
9539
|
-
},
|
|
9558
|
+
g(new Error(`Tasks timeout: Some operations did not complete within ${Kn / 1e3}s`));
|
|
9559
|
+
}, Kn);
|
|
9540
9560
|
});
|
|
9541
9561
|
try {
|
|
9542
|
-
await Promise.race([n,
|
|
9562
|
+
await Promise.race([n, i]);
|
|
9543
9563
|
} catch (h) {
|
|
9544
|
-
const
|
|
9545
|
-
console.warn(`[StablyAI reporter] Tasks timeout reached. Some operations may still be pending: ${
|
|
9564
|
+
const g = h instanceof Error ? h.message : String(h);
|
|
9565
|
+
console.warn(`[StablyAI reporter] Tasks timeout reached. Some operations may still be pending: ${g}`);
|
|
9546
9566
|
}
|
|
9547
9567
|
this.wsClient.flushBuffer(), r.stop("All tasks finished");
|
|
9548
|
-
const
|
|
9549
|
-
|
|
9550
|
-
|
|
9551
|
-
})),
|
|
9568
|
+
const o = Y$1();
|
|
9569
|
+
o.start("Waiting for file uploads to finish..."), await Promise.allSettled(qn(this.pendingUploads, ({ completed: h, errors: g, total: m }) => {
|
|
9570
|
+
o.message(`${h}/${m} uploads finished${g > 0 ? `, ${g} errors` : ""}`);
|
|
9571
|
+
})), o.stop("All file uploads finished"), this.wsClient.close();
|
|
9552
9572
|
const c = this.createdSuiteRun?.name || this.suiteData?.title || "Test Suite", l = t.status === "failed" || t.status === "timedout";
|
|
9553
|
-
Se$1(
|
|
9554
|
-
\u{1F4CA} View results: ${
|
|
9573
|
+
Se$1(Ce.cyan(`\u2728 Suite "${Ce.bold(c)}" run complete!${this.createdSuiteRun ? `
|
|
9574
|
+
\u{1F4CA} View results: ${Ce.bold(Ce.underline(this.createdSuiteRun.url))}` : ""}${l ? `
|
|
9555
9575
|
|
|
9556
9576
|
\u{1F527} To auto-heal failed tests, run:
|
|
9557
|
-
${
|
|
9577
|
+
${Ce.bold(Ce.underline(`stably fix ${this.testSuiteRunId}`))}` : ""}`));
|
|
9558
9578
|
}
|
|
9559
9579
|
scrubSensitiveString(t) {
|
|
9560
|
-
return !t || !this.sensitiveValues?.length ? t :
|
|
9580
|
+
return !t || !this.sensitiveValues?.length ? t : se({ sensitiveValues: this.sensitiveValues, str: t });
|
|
9561
9581
|
}
|
|
9562
9582
|
extractSuiteInfo(t, r) {
|
|
9563
|
-
const n =
|
|
9564
|
-
return { id: ut(), projectSettings:
|
|
9583
|
+
const n = Ra(), i = wa(), o = /* @__PURE__ */ new Date();
|
|
9584
|
+
return { id: ut(), projectSettings: Da(t), startedAt: o, suiteId: this.testSuiteRunId, title: r.title || "Playwright Test Suite", createdAt: o, git: { branch: n.branch, commit: { message: n.commit.message, sha: n.commit.sha }, pr: n.pr }, isCI: n.isCI, shards: t.shard?.total ?? 1, workers: t.workers, machineInfo: i, updatedAt: o };
|
|
9565
9585
|
}
|
|
9566
9586
|
extractTestCaseInfo(t, r) {
|
|
9567
|
-
const n =
|
|
9568
|
-
return { fullTitle: this.scrubSensitiveString(t.titlePath().join(" \u203A ")) ?? "", id: ut(), location: `${n}:${t.location.line}:${t.location.column}`, suiteId: this.testSuiteRunId, testIdentifier: t.id, title: this.scrubSensitiveString(t.title) ?? t.title, browserName: c, duration: r.duration, expectedStatus: t.expectedStatus, finishedAt: r.startTime && r.duration ? new Date(r.startTime.getTime() + r.duration) : void 0, outcome: t.outcome(), projectName:
|
|
9587
|
+
const n = Ma({ absolutePath: t.location.file, rootDir: this.rootDir }), i = t.parent.project(), o = i?.name, c = i?.use?.defaultBrowserType;
|
|
9588
|
+
return { fullTitle: this.scrubSensitiveString(t.titlePath().join(" \u203A ")) ?? "", id: ut(), location: `${n}:${t.location.line}:${t.location.column}`, suiteId: this.testSuiteRunId, testIdentifier: t.id, title: this.scrubSensitiveString(t.title) ?? t.title, browserName: c, duration: r.duration, expectedStatus: t.expectedStatus, finishedAt: r.startTime && r.duration ? new Date(r.startTime.getTime() + r.duration) : void 0, outcome: t.outcome(), projectName: o, startedAt: new Date(r.startTime), status: r.status, attemptNumber: r.retry + 1, maxRetries: t.retries, retryCount: r.retry, errorMessage: this.scrubSensitiveString(r.error?.message), errorStack: this.scrubSensitiveString(r.error?.stack), errorType: r.error?.value, annotations: t.annotations.length > 0 ? t.annotations : void 0, tags: t.tags.length > 0 ? t.tags : void 0 };
|
|
9569
9589
|
}
|
|
9570
9590
|
async extractAttachmentMetadata({ attachments: t, attemptNumber: r, testId: n }) {
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9591
|
+
return (await Promise.all(t.map((o) => this.processAttachment({ attachment: o, attemptNumber: r, testId: n })))).filter((o) => o !== void 0);
|
|
9592
|
+
}
|
|
9593
|
+
async processAttachment({ attachment: t, attemptNumber: r, testId: n }) {
|
|
9594
|
+
let i;
|
|
9595
|
+
try {
|
|
9596
|
+
i = t.name === "trace" && t.path && this.sensitiveValues && this.sensitiveValues.length > 0 ? openSync(t.path, "r") : void 0;
|
|
9597
|
+
const o = await this.getAttachmentFileData({ attachment: t, traceFd: i });
|
|
9598
|
+
if (!o) return;
|
|
9599
|
+
const c = ut(), l = `${n}-${r}-${c}`;
|
|
9600
|
+
return this.attachmentFiles.set(l, o), { artifactId: c, attemptNumber: r, contentType: t.contentType, name: t.name, sizeBytes: o.length, testId: n };
|
|
9601
|
+
} catch (o) {
|
|
9602
|
+
const c = o instanceof Error ? o.message : String(o);
|
|
9603
|
+
console.error(`[StablyAI reporter] Failed to read attachment ${t.name}: ${c}`);
|
|
9604
|
+
return;
|
|
9605
|
+
} finally {
|
|
9606
|
+
if (i !== void 0) try {
|
|
9607
|
+
closeSync(i);
|
|
9608
|
+
} catch {
|
|
9609
|
+
}
|
|
9610
|
+
}
|
|
9611
|
+
}
|
|
9612
|
+
async getAttachmentFileData({ attachment: t, traceFd: r }) {
|
|
9613
|
+
if (!t.path && !t.body) return;
|
|
9614
|
+
if (t.name === "trace" && this.sensitiveValues && this.sensitiveValues.length > 0) {
|
|
9615
|
+
const i = t.path ? await this.scrubTraceFromFile({ attachmentPath: t.path, sensitiveValues: this.sensitiveValues, traceFd: r }) : t.body ? await zt({ sensitiveValues: this.sensitiveValues, traceBuffer: Buffer.from(t.body) }) : void 0;
|
|
9616
|
+
return i ? Buffer.from(i) : void 0;
|
|
9617
|
+
}
|
|
9618
|
+
return t.body ? Buffer.from(t.body) : t.path ? readFileSync$1(t.path) : void 0;
|
|
9619
|
+
}
|
|
9620
|
+
async scrubTraceFromFile({ attachmentPath: t, sensitiveValues: r, traceFd: n }) {
|
|
9621
|
+
return n !== void 0 ? Lo({ sensitiveValues: r, traceFd: n, tracePath: t }) : Oo({ sensitiveValues: r, tracePath: t });
|
|
9585
9622
|
}
|
|
9586
9623
|
handleWebSocketError(t) {
|
|
9587
|
-
t.code ===
|
|
9624
|
+
t.code === mn.AUTHENTICATION_FAILED && (console.error(Ce.bold(Ce.red("[StablyAI reporter] Could not authenticate with the server. Either the API Key or Project ID is invalid. These can be provided via stablyReporter({ apiKey, projectId }) in playwright.config.ts or environment variables (STABLY_API_KEY, STABLY_PROJECT_ID). You can find your API key and Project ID at https://app.stably.ai/settings?tab=api-key"))), process.exit(1)), console.error("[StablyAI reporter] Could not connect to the server. Please check your internet connection and try again."), process.exit(1);
|
|
9588
9625
|
}
|
|
9589
9626
|
handleWebSocketMessage(t) {
|
|
9590
9627
|
if (t.type === "suite_created") this.createdSuiteRun = { id: t.id, name: t.name, url: t.url };
|
|
@@ -9592,27 +9629,27 @@ class jn {
|
|
|
9592
9629
|
const r = `${t.testId}-${t.attemptNumber}`, n = this.pendingUploadUrlRequests.get(r);
|
|
9593
9630
|
if (!n) return;
|
|
9594
9631
|
n(), this.pendingUploadUrlRequests.delete(r);
|
|
9595
|
-
const
|
|
9596
|
-
this.pendingUploads.push(
|
|
9632
|
+
const i = this.uploadAttachments(t.testId, t.attemptNumber, t.uploadUrls);
|
|
9633
|
+
this.pendingUploads.push(i);
|
|
9597
9634
|
}
|
|
9598
9635
|
}
|
|
9599
9636
|
async uploadAttachments(t, r, n) {
|
|
9600
|
-
const
|
|
9601
|
-
const h = `${t}-${r}-${
|
|
9602
|
-
if (
|
|
9603
|
-
await
|
|
9637
|
+
const i = n.map(async ({ artifactId: o, name: c, uploadUrl: l }) => {
|
|
9638
|
+
const h = `${t}-${r}-${o}`, g = this.attachmentFiles.get(h);
|
|
9639
|
+
if (g) try {
|
|
9640
|
+
await La({ fileData: g, maxRetries: 3, uploadUrl: l }), this.attachmentFiles.delete(h);
|
|
9604
9641
|
} catch (m) {
|
|
9605
9642
|
const A = m instanceof Error ? m.message : String(m);
|
|
9606
9643
|
console.error(`[StablyAI reporter] Failed to upload ${c} after retries: ${A}`);
|
|
9607
9644
|
}
|
|
9608
9645
|
});
|
|
9609
|
-
await Promise.allSettled(
|
|
9646
|
+
await Promise.allSettled(i);
|
|
9610
9647
|
}
|
|
9611
9648
|
}
|
|
9612
|
-
function
|
|
9649
|
+
function xa(e) {
|
|
9613
9650
|
return ["@stablyai/playwright-test/reporter", e];
|
|
9614
9651
|
}
|
|
9615
|
-
s(
|
|
9652
|
+
s(xa, "stablyReporter");
|
|
9616
9653
|
|
|
9617
|
-
export {
|
|
9618
|
-
//# sourceMappingURL=index-
|
|
9654
|
+
export { Vn as V, xa as x };
|
|
9655
|
+
//# sourceMappingURL=index-BklBJUIC.mjs.map
|