@c4a/context-cli 0.6.0-beta.1 → 0.6.0-beta.3

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/cli.js CHANGED
@@ -10435,4279 +10435,6 @@ var require_picomatch2 = __commonJS((exports, module2) => {
10435
10435
  module2.exports = picomatch;
10436
10436
  });
10437
10437
 
10438
- // ../../node_modules/.bun/jiti@2.7.0/node_modules/jiti/dist/jiti.cjs
10439
- var require_jiti = __commonJS((exports, module2) => {
10440
- (() => {
10441
- var e = { "./node_modules/.pnpm/mlly@1.8.2/node_modules/mlly/dist lazy recursive"(e2) {
10442
- function webpackEmptyAsyncContext(e3) {
10443
- return Promise.resolve().then(function() {
10444
- var t2 = new Error("Cannot find module '" + e3 + "'");
10445
- throw t2.code = "MODULE_NOT_FOUND", t2;
10446
- });
10447
- }
10448
- webpackEmptyAsyncContext.keys = () => [], webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext, webpackEmptyAsyncContext.id = "./node_modules/.pnpm/mlly@1.8.2/node_modules/mlly/dist lazy recursive", e2.exports = webpackEmptyAsyncContext;
10449
- }, fs(e2) {
10450
- e2.exports = __require("fs");
10451
- }, "node:fs"(e2) {
10452
- e2.exports = __require("node:fs");
10453
- }, "node:module"(e2) {
10454
- e2.exports = __require("node:module");
10455
- }, "node:path"(e2) {
10456
- e2.exports = __require("node:path");
10457
- }, os(e2) {
10458
- e2.exports = __require("os");
10459
- }, path(e2) {
10460
- e2.exports = __require("path");
10461
- }, "./node_modules/.pnpm/get-tsconfig@4.14.0/node_modules/get-tsconfig/dist/index.cjs"(e2, t2, i2) {
10462
- var n = Object.defineProperty, r = (e3, t3) => n(e3, "name", { value: t3, configurable: true }), a = i2("node:path"), c = i2("node:fs"), l = i2("node:module"), y = i2("./node_modules/.pnpm/resolve-pkg-maps@1.0.0/node_modules/resolve-pkg-maps/dist/index.cjs"), E = i2("fs"), w = i2("os"), C2 = i2("path");
10463
- function h(e3) {
10464
- return e3.startsWith("\\\\?\\") ? e3 : e3.replace(/\\/g, "/");
10465
- }
10466
- r(h, "slash");
10467
- const S = r((e3) => {
10468
- const t3 = c[e3];
10469
- return (i3, ...n2) => {
10470
- const a2 = `${e3}:${n2.join(":")}`;
10471
- let l2 = i3 == null ? undefined : i3.get(a2);
10472
- return l2 === undefined && (l2 = Reflect.apply(t3, c, n2), i3 == null || i3.set(a2, l2)), l2;
10473
- };
10474
- }, "cacheFs"), I = S("existsSync"), N = S("readFileSync"), O = S("statSync"), j = r((e3, t3, i3) => {
10475
- for (;; ) {
10476
- const n2 = a.posix.join(e3, t3);
10477
- if (I(i3, n2))
10478
- return n2;
10479
- const c2 = a.dirname(e3);
10480
- if (c2 === e3)
10481
- return;
10482
- e3 = c2;
10483
- }
10484
- }, "findUp"), F = /^\.{1,2}(\/.*)?$/, B = r((e3) => {
10485
- const t3 = h(e3);
10486
- return F.test(t3) ? t3 : `./${t3}`;
10487
- }, "normalizeRelativePath");
10488
- function Ne(e3, t3 = false) {
10489
- const i3 = e3.length;
10490
- let n2 = 0, a2 = "", c2 = 0, l2 = 16, y2 = 0, E2 = 0, w2 = 0, C3 = 0, S2 = 0;
10491
- function _(t4, i4) {
10492
- let a3 = 0, c3 = 0;
10493
- for (;a3 < t4; ) {
10494
- let t5 = e3.charCodeAt(n2);
10495
- if (t5 >= 48 && t5 <= 57)
10496
- c3 = 16 * c3 + t5 - 48;
10497
- else if (t5 >= 65 && t5 <= 70)
10498
- c3 = 16 * c3 + t5 - 65 + 10;
10499
- else {
10500
- if (!(t5 >= 97 && t5 <= 102))
10501
- break;
10502
- c3 = 16 * c3 + t5 - 97 + 10;
10503
- }
10504
- n2++, a3++;
10505
- }
10506
- return a3 < t4 && (c3 = -1), c3;
10507
- }
10508
- function b(e4) {
10509
- n2 = e4, a2 = "", c2 = 0, l2 = 16, S2 = 0;
10510
- }
10511
- function p() {
10512
- let t4 = n2;
10513
- if (e3.charCodeAt(n2) === 48)
10514
- n2++;
10515
- else
10516
- for (n2++;n2 < e3.length && R(e3.charCodeAt(n2)); )
10517
- n2++;
10518
- if (n2 < e3.length && e3.charCodeAt(n2) === 46) {
10519
- if (n2++, !(n2 < e3.length && R(e3.charCodeAt(n2))))
10520
- return S2 = 3, e3.substring(t4, n2);
10521
- for (n2++;n2 < e3.length && R(e3.charCodeAt(n2)); )
10522
- n2++;
10523
- }
10524
- let i4 = n2;
10525
- if (n2 < e3.length && (e3.charCodeAt(n2) === 69 || e3.charCodeAt(n2) === 101))
10526
- if (n2++, (n2 < e3.length && e3.charCodeAt(n2) === 43 || e3.charCodeAt(n2) === 45) && n2++, n2 < e3.length && R(e3.charCodeAt(n2))) {
10527
- for (n2++;n2 < e3.length && R(e3.charCodeAt(n2)); )
10528
- n2++;
10529
- i4 = n2;
10530
- } else
10531
- S2 = 3;
10532
- return e3.substring(t4, i4);
10533
- }
10534
- function L() {
10535
- let t4 = "", a3 = n2;
10536
- for (;; ) {
10537
- if (n2 >= i3) {
10538
- t4 += e3.substring(a3, n2), S2 = 2;
10539
- break;
10540
- }
10541
- const c3 = e3.charCodeAt(n2);
10542
- if (c3 === 34) {
10543
- t4 += e3.substring(a3, n2), n2++;
10544
- break;
10545
- }
10546
- if (c3 !== 92) {
10547
- if (c3 >= 0 && c3 <= 31) {
10548
- if (M(c3)) {
10549
- t4 += e3.substring(a3, n2), S2 = 2;
10550
- break;
10551
- }
10552
- S2 = 6;
10553
- }
10554
- n2++;
10555
- } else {
10556
- if (t4 += e3.substring(a3, n2), n2++, n2 >= i3) {
10557
- S2 = 2;
10558
- break;
10559
- }
10560
- switch (e3.charCodeAt(n2++)) {
10561
- case 34:
10562
- t4 += '"';
10563
- break;
10564
- case 92:
10565
- t4 += "\\";
10566
- break;
10567
- case 47:
10568
- t4 += "/";
10569
- break;
10570
- case 98:
10571
- t4 += "\b";
10572
- break;
10573
- case 102:
10574
- t4 += "\f";
10575
- break;
10576
- case 110:
10577
- t4 += `
10578
- `;
10579
- break;
10580
- case 114:
10581
- t4 += "\r";
10582
- break;
10583
- case 116:
10584
- t4 += "\t";
10585
- break;
10586
- case 117:
10587
- const e4 = _(4);
10588
- e4 >= 0 ? t4 += String.fromCharCode(e4) : S2 = 4;
10589
- break;
10590
- default:
10591
- S2 = 5;
10592
- }
10593
- a3 = n2;
10594
- }
10595
- }
10596
- return t4;
10597
- }
10598
- function A() {
10599
- if (a2 = "", S2 = 0, c2 = n2, E2 = y2, C3 = w2, n2 >= i3)
10600
- return c2 = i3, l2 = 17;
10601
- let t4 = e3.charCodeAt(n2);
10602
- if (ee(t4)) {
10603
- do {
10604
- n2++, a2 += String.fromCharCode(t4), t4 = e3.charCodeAt(n2);
10605
- } while (ee(t4));
10606
- return l2 = 15;
10607
- }
10608
- if (M(t4))
10609
- return n2++, a2 += String.fromCharCode(t4), t4 === 13 && e3.charCodeAt(n2) === 10 && (n2++, a2 += `
10610
- `), y2++, w2 = n2, l2 = 14;
10611
- switch (t4) {
10612
- case 123:
10613
- return n2++, l2 = 1;
10614
- case 125:
10615
- return n2++, l2 = 2;
10616
- case 91:
10617
- return n2++, l2 = 3;
10618
- case 93:
10619
- return n2++, l2 = 4;
10620
- case 58:
10621
- return n2++, l2 = 6;
10622
- case 44:
10623
- return n2++, l2 = 5;
10624
- case 34:
10625
- return n2++, a2 = L(), l2 = 10;
10626
- case 47:
10627
- const E3 = n2 - 1;
10628
- if (e3.charCodeAt(n2 + 1) === 47) {
10629
- for (n2 += 2;n2 < i3 && !M(e3.charCodeAt(n2)); )
10630
- n2++;
10631
- return a2 = e3.substring(E3, n2), l2 = 12;
10632
- }
10633
- if (e3.charCodeAt(n2 + 1) === 42) {
10634
- n2 += 2;
10635
- const t5 = i3 - 1;
10636
- let c3 = false;
10637
- for (;n2 < t5; ) {
10638
- const t6 = e3.charCodeAt(n2);
10639
- if (t6 === 42 && e3.charCodeAt(n2 + 1) === 47) {
10640
- n2 += 2, c3 = true;
10641
- break;
10642
- }
10643
- n2++, M(t6) && (t6 === 13 && e3.charCodeAt(n2) === 10 && n2++, y2++, w2 = n2);
10644
- }
10645
- return c3 || (n2++, S2 = 1), a2 = e3.substring(E3, n2), l2 = 13;
10646
- }
10647
- return a2 += String.fromCharCode(t4), n2++, l2 = 16;
10648
- case 45:
10649
- if (a2 += String.fromCharCode(t4), n2++, n2 === i3 || !R(e3.charCodeAt(n2)))
10650
- return l2 = 16;
10651
- case 48:
10652
- case 49:
10653
- case 50:
10654
- case 51:
10655
- case 52:
10656
- case 53:
10657
- case 54:
10658
- case 55:
10659
- case 56:
10660
- case 57:
10661
- return a2 += p(), l2 = 11;
10662
- default:
10663
- for (;n2 < i3 && D(t4); )
10664
- n2++, t4 = e3.charCodeAt(n2);
10665
- if (c2 !== n2) {
10666
- switch (a2 = e3.substring(c2, n2), a2) {
10667
- case "true":
10668
- return l2 = 8;
10669
- case "false":
10670
- return l2 = 9;
10671
- case "null":
10672
- return l2 = 7;
10673
- }
10674
- return l2 = 16;
10675
- }
10676
- return a2 += String.fromCharCode(t4), n2++, l2 = 16;
10677
- }
10678
- }
10679
- function D(e4) {
10680
- if (ee(e4) || M(e4))
10681
- return false;
10682
- switch (e4) {
10683
- case 125:
10684
- case 93:
10685
- case 123:
10686
- case 91:
10687
- case 34:
10688
- case 58:
10689
- case 44:
10690
- case 47:
10691
- return false;
10692
- }
10693
- return true;
10694
- }
10695
- function x() {
10696
- let e4;
10697
- do {
10698
- e4 = A();
10699
- } while (e4 >= 12 && e4 <= 15);
10700
- return e4;
10701
- }
10702
- return r(_, "scanHexDigits"), r(b, "setPosition"), r(p, "scanNumber"), r(L, "scanString"), r(A, "scanNext"), r(D, "isUnknownContentCharacter"), r(x, "scanNextNonTrivia"), { setPosition: b, getPosition: r(() => n2, "getPosition"), scan: t3 ? x : A, getToken: r(() => l2, "getToken"), getTokenValue: r(() => a2, "getTokenValue"), getTokenOffset: r(() => c2, "getTokenOffset"), getTokenLength: r(() => n2 - c2, "getTokenLength"), getTokenStartLine: r(() => E2, "getTokenStartLine"), getTokenStartCharacter: r(() => c2 - C3, "getTokenStartCharacter"), getTokenError: r(() => S2, "getTokenError") };
10703
- }
10704
- function ee(e3) {
10705
- return e3 === 32 || e3 === 9;
10706
- }
10707
- function M(e3) {
10708
- return e3 === 10 || e3 === 13;
10709
- }
10710
- function R(e3) {
10711
- return e3 >= 48 && e3 <= 57;
10712
- }
10713
- var $, q;
10714
- r(Ne, "createScanner"), r(ee, "isWhiteSpace"), r(M, "isLineBreak"), r(R, "isDigit"), (q = $ || ($ = {}))[q.lineFeed = 10] = "lineFeed", q[q.carriageReturn = 13] = "carriageReturn", q[q.space = 32] = "space", q[q._0 = 48] = "_0", q[q._1 = 49] = "_1", q[q._2 = 50] = "_2", q[q._3 = 51] = "_3", q[q._4 = 52] = "_4", q[q._5 = 53] = "_5", q[q._6 = 54] = "_6", q[q._7 = 55] = "_7", q[q._8 = 56] = "_8", q[q._9 = 57] = "_9", q[q.a = 97] = "a", q[q.b = 98] = "b", q[q.c = 99] = "c", q[q.d = 100] = "d", q[q.e = 101] = "e", q[q.f = 102] = "f", q[q.g = 103] = "g", q[q.h = 104] = "h", q[q.i = 105] = "i", q[q.j = 106] = "j", q[q.k = 107] = "k", q[q.l = 108] = "l", q[q.m = 109] = "m", q[q.n = 110] = "n", q[q.o = 111] = "o", q[q.p = 112] = "p", q[q.q = 113] = "q", q[q.r = 114] = "r", q[q.s = 115] = "s", q[q.t = 116] = "t", q[q.u = 117] = "u", q[q.v = 118] = "v", q[q.w = 119] = "w", q[q.x = 120] = "x", q[q.y = 121] = "y", q[q.z = 122] = "z", q[q.A = 65] = "A", q[q.B = 66] = "B", q[q.C = 67] = "C", q[q.D = 68] = "D", q[q.E = 69] = "E", q[q.F = 70] = "F", q[q.G = 71] = "G", q[q.H = 72] = "H", q[q.I = 73] = "I", q[q.J = 74] = "J", q[q.K = 75] = "K", q[q.L = 76] = "L", q[q.M = 77] = "M", q[q.N = 78] = "N", q[q.O = 79] = "O", q[q.P = 80] = "P", q[q.Q = 81] = "Q", q[q.R = 82] = "R", q[q.S = 83] = "S", q[q.T = 84] = "T", q[q.U = 85] = "U", q[q.V = 86] = "V", q[q.W = 87] = "W", q[q.X = 88] = "X", q[q.Y = 89] = "Y", q[q.Z = 90] = "Z", q[q.asterisk = 42] = "asterisk", q[q.backslash = 92] = "backslash", q[q.closeBrace = 125] = "closeBrace", q[q.closeBracket = 93] = "closeBracket", q[q.colon = 58] = "colon", q[q.comma = 44] = "comma", q[q.dot = 46] = "dot", q[q.doubleQuote = 34] = "doubleQuote", q[q.minus = 45] = "minus", q[q.openBrace = 123] = "openBrace", q[q.openBracket = 91] = "openBracket", q[q.plus = 43] = "plus", q[q.slash = 47] = "slash", q[q.formFeed = 12] = "formFeed", q[q.tab = 9] = "tab", new Array(20).fill(0).map((e3, t3) => " ".repeat(t3));
10715
- const W = 200;
10716
- var K, H, Y;
10717
- function Pe(e3, t3 = [], i3 = K.DEFAULT) {
10718
- let n2 = null, a2 = [];
10719
- const c2 = [];
10720
- function o(e4) {
10721
- Array.isArray(a2) ? a2.push(e4) : n2 !== null && (a2[n2] = e4);
10722
- }
10723
- return r(o, "onValue"), We(e3, { onObjectBegin: r(() => {
10724
- const e4 = {};
10725
- o(e4), c2.push(a2), a2 = e4, n2 = null;
10726
- }, "onObjectBegin"), onObjectProperty: r((e4) => {
10727
- n2 = e4;
10728
- }, "onObjectProperty"), onObjectEnd: r(() => {
10729
- a2 = c2.pop();
10730
- }, "onObjectEnd"), onArrayBegin: r(() => {
10731
- const e4 = [];
10732
- o(e4), c2.push(a2), a2 = e4, n2 = null;
10733
- }, "onArrayBegin"), onArrayEnd: r(() => {
10734
- a2 = c2.pop();
10735
- }, "onArrayEnd"), onLiteralValue: o, onError: r((e4, i4, n3) => {
10736
- t3.push({ error: e4, offset: i4, length: n3 });
10737
- }, "onError") }, i3), a2[0];
10738
- }
10739
- function We(e3, t3, i3 = K.DEFAULT) {
10740
- const n2 = Ne(e3, false), a2 = [];
10741
- let c2 = 0;
10742
- function o(e4) {
10743
- return e4 ? () => c2 === 0 && e4(n2.getTokenOffset(), n2.getTokenLength(), n2.getTokenStartLine(), n2.getTokenStartCharacter()) : () => true;
10744
- }
10745
- function f(e4) {
10746
- return e4 ? (t4) => c2 === 0 && e4(t4, n2.getTokenOffset(), n2.getTokenLength(), n2.getTokenStartLine(), n2.getTokenStartCharacter()) : () => true;
10747
- }
10748
- function u(e4) {
10749
- return e4 ? (t4) => c2 === 0 && e4(t4, n2.getTokenOffset(), n2.getTokenLength(), n2.getTokenStartLine(), n2.getTokenStartCharacter(), () => a2.slice()) : () => true;
10750
- }
10751
- function g(e4) {
10752
- return e4 ? () => {
10753
- c2 > 0 ? c2++ : e4(n2.getTokenOffset(), n2.getTokenLength(), n2.getTokenStartLine(), n2.getTokenStartCharacter(), () => a2.slice()) === false && (c2 = 1);
10754
- } : () => true;
10755
- }
10756
- function m(e4) {
10757
- return e4 ? () => {
10758
- c2 > 0 && c2--, c2 === 0 && e4(n2.getTokenOffset(), n2.getTokenLength(), n2.getTokenStartLine(), n2.getTokenStartCharacter());
10759
- } : () => true;
10760
- }
10761
- r(o, "toNoArgVisit"), r(f, "toOneArgVisit"), r(u, "toOneArgVisitWithPath"), r(g, "toBeginVisit"), r(m, "toEndVisit");
10762
- const l2 = g(t3.onObjectBegin), y2 = u(t3.onObjectProperty), E2 = m(t3.onObjectEnd), w2 = g(t3.onArrayBegin), C3 = m(t3.onArrayEnd), S2 = u(t3.onLiteralValue), I2 = f(t3.onSeparator), N2 = o(t3.onComment), O2 = f(t3.onError), j2 = i3 && i3.disallowComments, F2 = i3 && i3.allowTrailingComma;
10763
- function T() {
10764
- for (;; ) {
10765
- const e4 = n2.scan();
10766
- switch (n2.getTokenError()) {
10767
- case 4:
10768
- k(14);
10769
- break;
10770
- case 5:
10771
- k(15);
10772
- break;
10773
- case 3:
10774
- k(13);
10775
- break;
10776
- case 1:
10777
- j2 || k(11);
10778
- break;
10779
- case 2:
10780
- k(12);
10781
- break;
10782
- case 6:
10783
- k(16);
10784
- }
10785
- switch (e4) {
10786
- case 12:
10787
- case 13:
10788
- j2 ? k(10) : N2();
10789
- break;
10790
- case 16:
10791
- k(1);
10792
- break;
10793
- case 15:
10794
- case 14:
10795
- break;
10796
- default:
10797
- return e4;
10798
- }
10799
- }
10800
- }
10801
- function k(e4, t4 = [], i4 = []) {
10802
- if (O2(e4), t4.length + i4.length > 0) {
10803
- let e5 = n2.getToken();
10804
- for (;e5 !== 17; ) {
10805
- if (t4.indexOf(e5) !== -1) {
10806
- T();
10807
- break;
10808
- }
10809
- if (i4.indexOf(e5) !== -1)
10810
- break;
10811
- e5 = T();
10812
- }
10813
- }
10814
- }
10815
- function P(e4) {
10816
- const t4 = n2.getTokenValue();
10817
- return e4 ? S2(t4) : (y2(t4), a2.push(t4)), T(), true;
10818
- }
10819
- function J() {
10820
- switch (n2.getToken()) {
10821
- case 11:
10822
- const e4 = n2.getTokenValue();
10823
- let t4 = Number(e4);
10824
- isNaN(t4) && (k(2), t4 = 0), S2(t4);
10825
- break;
10826
- case 7:
10827
- S2(null);
10828
- break;
10829
- case 8:
10830
- S2(true);
10831
- break;
10832
- case 9:
10833
- S2(false);
10834
- break;
10835
- default:
10836
- return false;
10837
- }
10838
- return T(), true;
10839
- }
10840
- function V() {
10841
- return n2.getToken() !== 10 ? (k(3, [], [2, 5]), false) : (P(false), n2.getToken() === 6 ? (I2(":"), T(), U() || k(4, [], [2, 5])) : k(5, [], [2, 5]), a2.pop(), true);
10842
- }
10843
- function z() {
10844
- l2(), T();
10845
- let e4 = false;
10846
- for (;n2.getToken() !== 2 && n2.getToken() !== 17; ) {
10847
- if (n2.getToken() === 5) {
10848
- if (e4 || k(4, [], []), I2(","), T(), n2.getToken() === 2 && F2)
10849
- break;
10850
- } else
10851
- e4 && k(6, [], []);
10852
- V() || k(4, [], [2, 5]), e4 = true;
10853
- }
10854
- return E2(), n2.getToken() !== 2 ? k(7, [2], []) : T(), true;
10855
- }
10856
- function G() {
10857
- w2(), T();
10858
- let e4 = true, t4 = false;
10859
- for (;n2.getToken() !== 4 && n2.getToken() !== 17; ) {
10860
- if (n2.getToken() === 5) {
10861
- if (t4 || k(4, [], []), I2(","), T(), n2.getToken() === 4 && F2)
10862
- break;
10863
- } else
10864
- t4 && k(6, [], []);
10865
- e4 ? (a2.push(0), e4 = false) : a2[a2.length - 1]++, U() || k(4, [], [4, 5]), t4 = true;
10866
- }
10867
- return C3(), e4 || a2.pop(), n2.getToken() !== 4 ? k(8, [4], []) : T(), true;
10868
- }
10869
- function U() {
10870
- switch (n2.getToken()) {
10871
- case 3:
10872
- return G();
10873
- case 1:
10874
- return z();
10875
- case 10:
10876
- return P(true);
10877
- default:
10878
- return J();
10879
- }
10880
- }
10881
- return r(T, "scanNext"), r(k, "handleError"), r(P, "parseString"), r(J, "parseLiteral"), r(V, "parseProperty"), r(z, "parseObject"), r(G, "parseArray"), r(U, "parseValue"), T(), n2.getToken() === 17 ? !!i3.allowEmptyContent || (k(4, [], []), false) : U() ? (n2.getToken() !== 17 && k(9, [], []), true) : (k(4, [], []), false);
10882
- }
10883
- new Array(W).fill(0).map((e3, t3) => `
10884
- ` + " ".repeat(t3)), new Array(W).fill(0).map((e3, t3) => "\r" + " ".repeat(t3)), new Array(W).fill(0).map((e3, t3) => `\r
10885
- ` + " ".repeat(t3)), new Array(W).fill(0).map((e3, t3) => `
10886
- ` + "\t".repeat(t3)), new Array(W).fill(0).map((e3, t3) => "\r" + "\t".repeat(t3)), new Array(W).fill(0).map((e3, t3) => `\r
10887
- ` + "\t".repeat(t3)), function(e3) {
10888
- e3.DEFAULT = { allowTrailingComma: false };
10889
- }(K || (K = {})), r(Pe, "parse$1"), r(We, "visit"), function(e3) {
10890
- e3[e3.None = 0] = "None", e3[e3.UnexpectedEndOfComment = 1] = "UnexpectedEndOfComment", e3[e3.UnexpectedEndOfString = 2] = "UnexpectedEndOfString", e3[e3.UnexpectedEndOfNumber = 3] = "UnexpectedEndOfNumber", e3[e3.InvalidUnicode = 4] = "InvalidUnicode", e3[e3.InvalidEscapeCharacter = 5] = "InvalidEscapeCharacter", e3[e3.InvalidCharacter = 6] = "InvalidCharacter";
10891
- }(H || (H = {})), function(e3) {
10892
- e3[e3.OpenBraceToken = 1] = "OpenBraceToken", e3[e3.CloseBraceToken = 2] = "CloseBraceToken", e3[e3.OpenBracketToken = 3] = "OpenBracketToken", e3[e3.CloseBracketToken = 4] = "CloseBracketToken", e3[e3.CommaToken = 5] = "CommaToken", e3[e3.ColonToken = 6] = "ColonToken", e3[e3.NullKeyword = 7] = "NullKeyword", e3[e3.TrueKeyword = 8] = "TrueKeyword", e3[e3.FalseKeyword = 9] = "FalseKeyword", e3[e3.StringLiteral = 10] = "StringLiteral", e3[e3.NumericLiteral = 11] = "NumericLiteral", e3[e3.LineCommentTrivia = 12] = "LineCommentTrivia", e3[e3.BlockCommentTrivia = 13] = "BlockCommentTrivia", e3[e3.LineBreakTrivia = 14] = "LineBreakTrivia", e3[e3.Trivia = 15] = "Trivia", e3[e3.Unknown = 16] = "Unknown", e3[e3.EOF = 17] = "EOF";
10893
- }(Y || (Y = {}));
10894
- const Q = Pe;
10895
- var Z;
10896
- (function(e3) {
10897
- e3[e3.InvalidSymbol = 1] = "InvalidSymbol", e3[e3.InvalidNumberFormat = 2] = "InvalidNumberFormat", e3[e3.PropertyNameExpected = 3] = "PropertyNameExpected", e3[e3.ValueExpected = 4] = "ValueExpected", e3[e3.ColonExpected = 5] = "ColonExpected", e3[e3.CommaExpected = 6] = "CommaExpected", e3[e3.CloseBraceExpected = 7] = "CloseBraceExpected", e3[e3.CloseBracketExpected = 8] = "CloseBracketExpected", e3[e3.EndOfFileExpected = 9] = "EndOfFileExpected", e3[e3.InvalidCommentToken = 10] = "InvalidCommentToken", e3[e3.UnexpectedEndOfComment = 11] = "UnexpectedEndOfComment", e3[e3.UnexpectedEndOfString = 12] = "UnexpectedEndOfString", e3[e3.UnexpectedEndOfNumber = 13] = "UnexpectedEndOfNumber", e3[e3.InvalidUnicode = 14] = "InvalidUnicode", e3[e3.InvalidEscapeCharacter = 15] = "InvalidEscapeCharacter", e3[e3.InvalidCharacter = 16] = "InvalidCharacter";
10898
- })(Z || (Z = {}));
10899
- const X = r((e3, t3) => Q(N(t3, e3, "utf8")), "readJsonc"), te = Symbol("implicitBaseUrl"), ie = "${configDir}", se = r(() => {
10900
- const { findPnpApi: e3 } = l;
10901
- return e3 && e3(process.cwd());
10902
- }, "getPnpApi"), re = r((e3, t3, i3, n2) => {
10903
- const c2 = `resolveFromPackageJsonPath:${e3}:${t3}:${i3}`;
10904
- if (n2 != null && n2.has(c2))
10905
- return n2.get(c2);
10906
- const l2 = X(e3, n2);
10907
- if (!l2)
10908
- return;
10909
- let E2 = t3 || "tsconfig.json";
10910
- if (!i3 && l2.exports)
10911
- try {
10912
- const [e4] = y.resolveExports(l2.exports, t3, ["require", "types"]);
10913
- E2 = e4;
10914
- } catch {
10915
- return false;
10916
- }
10917
- else
10918
- !t3 && l2.tsconfig && (E2 = l2.tsconfig);
10919
- return E2 = a.join(e3, "..", E2), n2 == null || n2.set(c2, E2), E2;
10920
- }, "resolveFromPackageJsonPath"), ne = "package.json", ae = "tsconfig.json", oe = r((e3, t3, i3) => {
10921
- let n2 = e3;
10922
- if (e3 === ".." && (n2 = a.join(n2, ae)), e3[0] === "." && (n2 = a.resolve(t3, n2)), a.isAbsolute(n2)) {
10923
- if (I(i3, n2)) {
10924
- if (O(i3, n2).isFile())
10925
- return n2;
10926
- } else if (!n2.endsWith(".json")) {
10927
- const e4 = `${n2}.json`;
10928
- if (I(i3, e4))
10929
- return e4;
10930
- }
10931
- return;
10932
- }
10933
- const [c2, ...l2] = e3.split("/"), y2 = c2[0] === "@" ? `${c2}/${l2.shift()}` : c2, E2 = l2.join("/"), w2 = se();
10934
- if (w2) {
10935
- const { resolveRequest: n3 } = w2;
10936
- try {
10937
- if (y2 === e3) {
10938
- const e4 = n3(a.join(y2, ne), t3);
10939
- if (e4) {
10940
- const t4 = re(e4, E2, false, i3);
10941
- if (t4 && I(i3, t4))
10942
- return t4;
10943
- }
10944
- } else {
10945
- let i4;
10946
- try {
10947
- i4 = n3(e3, t3, { extensions: [".json"] });
10948
- } catch {
10949
- i4 = n3(a.join(e3, ae), t3);
10950
- }
10951
- if (i4)
10952
- return i4;
10953
- }
10954
- } catch {}
10955
- }
10956
- const C3 = j(a.resolve(t3), a.join("node_modules", y2), i3);
10957
- if (!C3 || !O(i3, C3).isDirectory())
10958
- return;
10959
- const S2 = a.join(C3, ne);
10960
- if (I(i3, S2)) {
10961
- const e4 = re(S2, E2, false, i3);
10962
- if (e4 === false)
10963
- return;
10964
- if (e4 && I(i3, e4) && O(i3, e4).isFile())
10965
- return e4;
10966
- }
10967
- const N2 = a.join(C3, E2), F2 = N2.endsWith(".json");
10968
- if (!F2) {
10969
- const e4 = `${N2}.json`;
10970
- if (I(i3, e4))
10971
- return e4;
10972
- }
10973
- if (I(i3, N2)) {
10974
- if (O(i3, N2).isDirectory()) {
10975
- const e4 = a.join(N2, ne);
10976
- if (I(i3, e4)) {
10977
- const t5 = re(e4, "", true, i3);
10978
- if (t5 && I(i3, t5))
10979
- return t5;
10980
- }
10981
- const t4 = a.join(N2, ae);
10982
- if (I(i3, t4))
10983
- return t4;
10984
- } else if (F2)
10985
- return N2;
10986
- }
10987
- }, "resolveExtendsPath"), ce = r((e3, t3) => B(a.relative(e3, t3)), "pathRelative"), he = ["files", "include", "exclude"], le = r((e3, t3, i3) => {
10988
- const n2 = a.join(t3, i3);
10989
- return h(a.relative(e3, n2)) || "./";
10990
- }, "resolveAndRelativize"), pe = r((e3, t3, i3) => {
10991
- const n2 = a.relative(e3, t3);
10992
- if (!n2)
10993
- return i3;
10994
- return h(`${n2}/${i3.startsWith("./") ? i3.slice(2) : i3}`);
10995
- }, "prefixPattern"), ue = r((e3, t3, i3, n2) => {
10996
- const c2 = oe(e3, t3, n2);
10997
- if (!c2)
10998
- throw new Error(`File '${e3}' not found.`);
10999
- if (i3.has(c2))
11000
- throw new Error(`Circularity detected while resolving configuration: ${c2}`);
11001
- i3.add(c2);
11002
- const l2 = a.dirname(c2), y2 = fe(c2, n2, i3);
11003
- delete y2.references;
11004
- const { compilerOptions: E2 } = y2;
11005
- if (E2) {
11006
- const { baseUrl: e4 } = E2;
11007
- e4 && !e4.startsWith(ie) && (E2.baseUrl = le(t3, l2, e4));
11008
- const { outDir: i4 } = E2;
11009
- i4 && !i4.startsWith(ie) && (E2.outDir = le(t3, l2, i4));
11010
- const { declarationDir: n3 } = E2;
11011
- n3 && !n3.startsWith(ie) && (E2.declarationDir = le(t3, l2, n3));
11012
- const { rootDir: a2 } = E2;
11013
- a2 && !a2.startsWith(ie) && (E2.rootDir = le(t3, l2, a2));
11014
- const { rootDirs: c3 } = E2;
11015
- c3 && (E2.rootDirs = c3.map((e5) => e5.startsWith(ie) ? e5 : le(t3, l2, e5)));
11016
- const { typeRoots: y3 } = E2;
11017
- y3 && (E2.typeRoots = y3.map((e5) => e5.startsWith(ie) ? e5 : le(t3, l2, e5)));
11018
- }
11019
- for (const e4 of he) {
11020
- const i4 = y2[e4];
11021
- i4 && (y2[e4] = i4.map((e5) => e5.startsWith(ie) ? e5 : pe(t3, l2, e5)));
11022
- }
11023
- return y2;
11024
- }, "resolveExtends"), de = ["outDir", "declarationDir"], fe = r((e3, t3, i3 = new Set) => {
11025
- let n2;
11026
- try {
11027
- n2 = X(e3, t3) || {};
11028
- } catch {
11029
- throw new Error(`Cannot resolve tsconfig at path: ${e3}`);
11030
- }
11031
- if (typeof n2 != "object")
11032
- throw new SyntaxError(`Failed to parse tsconfig at: ${e3}`);
11033
- const c2 = a.dirname(e3);
11034
- if (n2.compilerOptions) {
11035
- const { compilerOptions: e4 } = n2;
11036
- e4.paths && !e4.baseUrl && (e4[te] = c2);
11037
- }
11038
- if (n2.extends) {
11039
- const e4 = Array.isArray(n2.extends) ? n2.extends : [n2.extends];
11040
- delete n2.extends;
11041
- for (const a2 of e4.reverse()) {
11042
- const e5 = ue(a2, c2, new Set(i3), t3), l2 = { ...e5, ...n2, compilerOptions: { ...e5.compilerOptions, ...n2.compilerOptions } };
11043
- e5.watchOptions && (l2.watchOptions = { ...e5.watchOptions, ...n2.watchOptions }), n2 = l2;
11044
- }
11045
- }
11046
- if (n2.compilerOptions) {
11047
- const { compilerOptions: e4 } = n2, t4 = ["baseUrl", "rootDir"];
11048
- for (const i4 of t4) {
11049
- const t5 = e4[i4];
11050
- if (t5 && !t5.startsWith(ie)) {
11051
- const n3 = a.resolve(c2, t5), l2 = ce(c2, n3);
11052
- e4[i4] = l2;
11053
- }
11054
- }
11055
- for (const t5 of de) {
11056
- let i4 = e4[t5];
11057
- i4 && (Array.isArray(n2.exclude) || (n2.exclude = de.map((t6) => e4[t6]).filter(Boolean)), i4.startsWith(ie) || (i4 = B(i4)), e4[t5] = i4);
11058
- }
11059
- } else
11060
- n2.compilerOptions = {};
11061
- if (n2.include && (n2.include = n2.include.map(h)), n2.files && (n2.files = n2.files.map((e4) => e4.startsWith(ie) ? e4 : B(e4))), n2.watchOptions) {
11062
- const { watchOptions: e4 } = n2;
11063
- e4.excludeDirectories && (e4.excludeDirectories = e4.excludeDirectories.map((e5) => h(a.resolve(c2, e5)))), e4.excludeFiles && (e4.excludeFiles = e4.excludeFiles.map((e5) => h(a.resolve(c2, e5)))), e4.watchFile && (e4.watchFile = e4.watchFile.toLowerCase()), e4.watchDirectory && (e4.watchDirectory = e4.watchDirectory.toLowerCase()), e4.fallbackPolling && (e4.fallbackPolling = e4.fallbackPolling.toLowerCase());
11064
- }
11065
- return n2;
11066
- }, "_parseTsconfig"), me = r((e3, t3) => {
11067
- if (e3.startsWith(ie))
11068
- return h(a.join(t3, e3.slice(12)));
11069
- }, "interpolateConfigDir"), ge = ["outDir", "declarationDir", "outFile", "rootDir", "baseUrl", "tsBuildInfoFile"], xe = r((e3) => {
11070
- if (e3.strict) {
11071
- const t3 = ["noImplicitAny", "noImplicitThis", "strictNullChecks", "strictFunctionTypes", "strictBindCallApply", "strictPropertyInitialization", "strictBuiltinIteratorReturn", "alwaysStrict", "useUnknownInCatchVariables"];
11072
- for (const i3 of t3)
11073
- e3[i3] === undefined && (e3[i3] = true);
11074
- }
11075
- if (e3.composite && (e3.declaration != null || (e3.declaration = true), e3.incremental != null || (e3.incremental = true)), e3.target) {
11076
- let t3 = e3.target.toLowerCase();
11077
- t3 === "es2015" && (t3 = "es6"), e3.target = t3, t3 === "esnext" && (e3.module != null || (e3.module = "es6"), e3.useDefineForClassFields != null || (e3.useDefineForClassFields = true)), (t3 === "es6" || t3 === "es2016" || t3 === "es2017" || t3 === "es2018" || t3 === "es2019" || t3 === "es2020" || t3 === "es2021" || t3 === "es2022" || t3 === "es2023" || t3 === "es2024") && (e3.module != null || (e3.module = "es6")), (t3 === "es2022" || t3 === "es2023" || t3 === "es2024") && (e3.useDefineForClassFields != null || (e3.useDefineForClassFields = true));
11078
- }
11079
- if (e3.module) {
11080
- let t3 = e3.module.toLowerCase();
11081
- if (t3 === "es2015" && (t3 = "es6"), e3.module = t3, (t3 === "es6" || t3 === "es2020" || t3 === "es2022" || t3 === "esnext" || t3 === "none" || t3 === "system" || t3 === "umd" || t3 === "amd") && (e3.moduleResolution != null || (e3.moduleResolution = "classic")), t3 === "system" && (e3.allowSyntheticDefaultImports != null || (e3.allowSyntheticDefaultImports = true)), (t3 === "node16" || t3 === "node18" || t3 === "node20" || t3 === "nodenext" || t3 === "preserve") && (e3.esModuleInterop != null || (e3.esModuleInterop = true), e3.allowSyntheticDefaultImports != null || (e3.allowSyntheticDefaultImports = true)), (t3 === "node16" || t3 === "node18" || t3 === "node20" || t3 === "nodenext") && (e3.moduleDetection != null || (e3.moduleDetection = "force")), t3 === "node16" && (e3.target != null || (e3.target = "es2022"), e3.moduleResolution != null || (e3.moduleResolution = "node16")), t3 === "node18" && (e3.target != null || (e3.target = "es2022"), e3.moduleResolution != null || (e3.moduleResolution = "node16")), t3 === "node20" && (e3.target != null || (e3.target = "es2023"), e3.moduleResolution != null || (e3.moduleResolution = "node16"), e3.resolveJsonModule != null || (e3.resolveJsonModule = true)), t3 === "nodenext" && (e3.target != null || (e3.target = "esnext"), e3.moduleResolution != null || (e3.moduleResolution = "nodenext"), e3.resolveJsonModule != null || (e3.resolveJsonModule = true)), t3 === "node16" || t3 === "node18" || t3 === "node20" || t3 === "nodenext") {
11082
- const t4 = e3.target;
11083
- (t4 === "es3" || t4 === "es2022" || t4 === "es2023" || t4 === "es2024" || t4 === "esnext") && (e3.useDefineForClassFields != null || (e3.useDefineForClassFields = true));
11084
- }
11085
- t3 === "preserve" && (e3.moduleResolution != null || (e3.moduleResolution = "bundler"));
11086
- }
11087
- if (e3.moduleResolution) {
11088
- let t3 = e3.moduleResolution.toLowerCase();
11089
- t3 === "node" && (t3 = "node10"), e3.moduleResolution = t3, (t3 === "node16" || t3 === "nodenext" || t3 === "bundler") && (e3.resolvePackageJsonExports != null || (e3.resolvePackageJsonExports = true), e3.resolvePackageJsonImports != null || (e3.resolvePackageJsonImports = true)), t3 === "bundler" && (e3.allowSyntheticDefaultImports != null || (e3.allowSyntheticDefaultImports = true), e3.resolveJsonModule != null || (e3.resolveJsonModule = true));
11090
- }
11091
- e3.jsx && (e3.jsx = e3.jsx.toLowerCase()), e3.moduleDetection && (e3.moduleDetection = e3.moduleDetection.toLowerCase()), e3.importsNotUsedAsValues && (e3.importsNotUsedAsValues = e3.importsNotUsedAsValues.toLowerCase()), e3.newLine && (e3.newLine = e3.newLine.toLowerCase()), e3.esModuleInterop && (e3.allowSyntheticDefaultImports != null || (e3.allowSyntheticDefaultImports = true)), e3.verbatimModuleSyntax && (e3.isolatedModules != null || (e3.isolatedModules = true), e3.preserveConstEnums != null || (e3.preserveConstEnums = true)), e3.isolatedModules && (e3.preserveConstEnums != null || (e3.preserveConstEnums = true)), e3.rewriteRelativeImportExtensions && (e3.allowImportingTsExtensions != null || (e3.allowImportingTsExtensions = true)), e3.lib && (e3.lib = e3.lib.map((e4) => e4.toLowerCase())), e3.checkJs && (e3.allowJs != null || (e3.allowJs = true));
11092
- }, "normalizeCompilerOptions"), ve = r((e3, t3 = new Map) => {
11093
- const i3 = a.resolve(e3), n2 = fe(i3, t3), c2 = a.dirname(i3), { compilerOptions: l2 } = n2;
11094
- if (l2) {
11095
- for (const e5 of ge) {
11096
- const t4 = l2[e5];
11097
- if (t4) {
11098
- const i4 = me(t4, c2);
11099
- l2[e5] = i4 ? ce(c2, i4) : t4;
11100
- }
11101
- }
11102
- for (const e5 of ["rootDirs", "typeRoots"]) {
11103
- const t4 = l2[e5];
11104
- t4 && (l2[e5] = t4.map((e6) => {
11105
- const t5 = me(e6, c2);
11106
- return t5 ? ce(c2, t5) : B(e6);
11107
- }));
11108
- }
11109
- const { paths: e4 } = l2;
11110
- if (e4)
11111
- for (const t4 of Object.keys(e4))
11112
- e4[t4] = e4[t4].map((e5) => {
11113
- var t5;
11114
- return (t5 = me(e5, c2)) != null ? t5 : e5;
11115
- });
11116
- xe(l2);
11117
- }
11118
- for (const e4 of he) {
11119
- const t4 = n2[e4];
11120
- t4 && (n2[e4] = t4.map((e5) => {
11121
- var t5;
11122
- return (t5 = me(e5, c2)) != null ? t5 : e5;
11123
- }));
11124
- }
11125
- return n2;
11126
- }, "parseTsconfig");
11127
- var ye = Object.defineProperty, _e = r((e3, t3) => ye(e3, "name", { value: t3, configurable: true }), "s");
11128
- const Ee = _e((e3) => {
11129
- let t3 = "";
11130
- for (let i3 = 0;i3 < e3.length; i3 += 1) {
11131
- const n2 = e3[i3], a2 = n2.toUpperCase();
11132
- t3 += n2 === a2 ? n2.toLowerCase() : a2;
11133
- }
11134
- return t3;
11135
- }, "invertCase"), be = new Map, ke = _e((e3, t3) => {
11136
- const i3 = C2.join(e3, `.is-fs-case-sensitive-test-${process.pid}`);
11137
- try {
11138
- return t3.writeFileSync(i3, ""), !t3.existsSync(Ee(i3));
11139
- } finally {
11140
- try {
11141
- t3.unlinkSync(i3);
11142
- } catch {}
11143
- }
11144
- }, "checkDirectoryCaseWithWrite"), we = _e((e3, t3, i3) => {
11145
- try {
11146
- return ke(e3, i3);
11147
- } catch (e4) {
11148
- if (t3 === undefined)
11149
- return ke(w.tmpdir(), i3);
11150
- throw e4;
11151
- }
11152
- }, "checkDirectoryCaseWithFallback"), Ce = _e((e3, t3 = E, i3 = true) => {
11153
- const n2 = e3 != null ? e3 : process.cwd();
11154
- if (i3 && be.has(n2))
11155
- return be.get(n2);
11156
- let a2;
11157
- const c2 = Ee(n2);
11158
- return a2 = c2 !== n2 && t3.existsSync(n2) ? !t3.existsSync(c2) : we(n2, e3, t3), i3 && be.set(n2, a2), a2;
11159
- }, "isFsCaseSensitive"), { join: Se } = a.posix, Ie = { ts: [".ts", ".tsx", ".d.ts"], cts: [".cts", ".d.cts"], mts: [".mts", ".d.mts"] }, Te = r((e3) => {
11160
- const t3 = [...Ie.ts], i3 = [...Ie.cts], n2 = [...Ie.mts];
11161
- return e3 != null && e3.allowJs && (t3.push(".js", ".jsx"), i3.push(".cjs"), n2.push(".mjs")), [...t3, ...i3, ...n2];
11162
- }, "getSupportedExtensions"), Re = r((e3) => {
11163
- const t3 = [];
11164
- if (!e3)
11165
- return t3;
11166
- const { outDir: i3, declarationDir: n2 } = e3;
11167
- return i3 && t3.push(i3), n2 && t3.push(n2), t3;
11168
- }, "getDefaultExcludeSpec"), Ae = r((e3) => e3.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`), "escapeForRegexp"), Le = `(?!(${["node_modules", "bower_components", "jspm_packages"].join("|")})(/|$))`, Oe = /(?:^|\/)[^.*?]+$/, De = "**/*", Ve = "[^/]", Ue = "[^./]", Me = process.platform === "win32", je = r(({ config: e3, path: t3 }, i3 = Ce()) => {
11169
- if ("extends" in e3)
11170
- throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");
11171
- if (!a.isAbsolute(t3))
11172
- throw new Error("The tsconfig path must be absolute");
11173
- Me && (t3 = h(t3));
11174
- const n2 = a.dirname(t3), { files: c2, include: l2, exclude: y2, compilerOptions: E2 } = e3, w2 = r((e4) => a.isAbsolute(e4) ? e4 : Se(n2, e4), "resolvePattern"), C3 = c2 == null ? undefined : c2.map(w2), S2 = Te(E2), I2 = i3 ? "" : "i", N2 = (y2 || Re(E2)).map((e4) => {
11175
- const t4 = w2(e4), i4 = Ae(t4).replaceAll(String.raw`\*\*/`, "(.+/)?").replaceAll(String.raw`\*`, `${Ve}*`).replaceAll(String.raw`\?`, Ve);
11176
- return new RegExp(`^${i4}($|/)`, I2);
11177
- }), O2 = c2 || l2 ? l2 : [De], j2 = O2 ? O2.map((e4) => {
11178
- let t4 = w2(e4);
11179
- Oe.test(t4) && (t4 = Se(t4, De));
11180
- const i4 = Ae(t4).replaceAll(String.raw`/\*\*`, `(/${Le}${Ue}${Ve}*)*?`).replaceAll(/(\/)?\\\*/g, (e5, t5) => {
11181
- const i5 = `(${Ue}|(\\.(?!min\\.js$))?)*`;
11182
- return t5 ? `/${Le}${Ue}${i5}` : i5;
11183
- }).replaceAll(/(\/)?\\\?/g, (e5, t5) => t5 ? `/${Le}${Ve}` : Ve);
11184
- return new RegExp(`^${i4}$`, I2);
11185
- }) : undefined;
11186
- return (t4) => {
11187
- if (!a.isAbsolute(t4))
11188
- throw new Error("filePath must be absolute");
11189
- return Me && (t4 = h(t4)), C3 != null && C3.includes(t4) || S2.some((e4) => t4.endsWith(e4)) && !N2.some((e4) => e4.test(t4)) && j2 && j2.some((e4) => e4.test(t4)) ? e3 : undefined;
11190
- };
11191
- }, "createFilesMatcher"), Fe = r((e3, t3, i3) => {
11192
- const n2 = a.resolve(e3);
11193
- let c2 = h(e3);
11194
- for (;; ) {
11195
- const e4 = j(c2, t3, i3);
11196
- if (!e4)
11197
- return;
11198
- const l2 = a.resolve(e4), y2 = ve(l2, i3), E2 = { path: h(l2), config: y2 };
11199
- if (je(E2)(n2))
11200
- return E2;
11201
- const w2 = a.dirname(e4), C3 = a.dirname(w2);
11202
- if (C3 === w2)
11203
- return;
11204
- c2 = C3;
11205
- }
11206
- }, "findConfigApplicable"), Be = r((e3 = process.cwd(), t3 = "tsconfig.json", i3 = new Map, n2 = false) => {
11207
- var a2;
11208
- return n2 ? (a2 = Fe(e3, t3, i3)) == null ? undefined : a2.path : j(h(e3), t3, i3);
11209
- }, "findTsconfig"), $e = r((e3 = process.cwd(), t3 = "tsconfig.json", i3 = new Map, n2 = false) => {
11210
- var a2;
11211
- if (!n2) {
11212
- const n3 = Be(e3, t3, i3);
11213
- if (!n3)
11214
- return null;
11215
- return { path: n3, config: ve(n3, i3) };
11216
- }
11217
- return (a2 = Fe(e3, t3, i3)) != null ? a2 : null;
11218
- }, "getTsconfig"), qe = /\*/g, Ge = r((e3, t3) => {
11219
- const i3 = e3.match(qe);
11220
- if (i3 && i3.length > 1)
11221
- throw new Error(t3);
11222
- }, "assertStarCount"), Ke = r((e3) => {
11223
- if (e3.includes("*")) {
11224
- const [t3, i3] = e3.split("*");
11225
- return { prefix: t3, suffix: i3 };
11226
- }
11227
- return e3;
11228
- }, "parsePattern"), He = r(({ prefix: e3, suffix: t3 }, i3) => i3.startsWith(e3) && i3.endsWith(t3), "isPatternMatch"), ze = r((e3, t3, i3) => Object.entries(e3).map(([e4, n2]) => (Ge(e4, `Pattern '${e4}' can have at most one '*' character.`), { pattern: Ke(e4), substitutions: n2.map((n3) => {
11229
- if (Ge(n3, `Substitution '${n3}' in pattern '${e4}' can have at most one '*' character.`), !t3 && !F.test(n3) && !a.isAbsolute(n3))
11230
- throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");
11231
- return a.resolve(i3, n3);
11232
- }) })), "parsePaths"), Je = r((e3) => {
11233
- const { compilerOptions: t3 } = e3.config;
11234
- if (!t3)
11235
- return null;
11236
- const { baseUrl: i3, paths: n2 } = t3;
11237
- if (!i3 && !n2)
11238
- return null;
11239
- const c2 = te in t3 && t3[te], l2 = a.resolve(a.dirname(e3.path), i3 || c2 || "."), y2 = n2 ? ze(n2, i3, l2) : [];
11240
- return (e4) => {
11241
- if (F.test(e4))
11242
- return [];
11243
- const t4 = [];
11244
- for (const i4 of y2) {
11245
- if (i4.pattern === e4)
11246
- return i4.substitutions.map(h);
11247
- typeof i4.pattern != "string" && t4.push(i4);
11248
- }
11249
- let n3, c3 = -1;
11250
- for (const i4 of t4)
11251
- He(i4.pattern, e4) && i4.pattern.prefix.length > c3 && (c3 = i4.pattern.prefix.length, n3 = i4);
11252
- if (!n3)
11253
- return i3 ? [h(a.join(l2, e4))] : [];
11254
- const E2 = e4.slice(n3.pattern.prefix.length, e4.length - n3.pattern.suffix.length);
11255
- return n3.substitutions.map((e5) => h(e5.replace("*", E2)));
11256
- };
11257
- }, "createPathsMatcher");
11258
- t2.createPathsMatcher = Je, t2.getTsconfig = $e;
11259
- }, "./node_modules/.pnpm/resolve-pkg-maps@1.0.0/node_modules/resolve-pkg-maps/dist/index.cjs"(e2, t2) {
11260
- Object.defineProperty(t2, "__esModule", { value: true });
11261
- const d = (e3) => e3 !== null && typeof e3 == "object", s = (e3, t3) => Object.assign(new Error(`[${e3}]: ${t3}`), { code: e3 }), i2 = "ERR_INVALID_PACKAGE_CONFIG", n = "ERR_INVALID_PACKAGE_TARGET", a = /^\d+$/, c = /^(\.{1,2}|node_modules)$/i, l = /\/|\\/;
11262
- var y, E = ((y = E || {}).Export = "exports", y.Import = "imports", y);
11263
- const f = (e3, t3, y2, E2, w2) => {
11264
- if (t3 == null)
11265
- return [];
11266
- if (typeof t3 == "string") {
11267
- const [i3, ...a2] = t3.split(l);
11268
- if (i3 === ".." || a2.some((e4) => c.test(e4)))
11269
- throw s(n, `Invalid "${e3}" target "${t3}" defined in the package config`);
11270
- return [w2 ? t3.replace(/\*/g, w2) : t3];
11271
- }
11272
- if (Array.isArray(t3))
11273
- return t3.flatMap((t4) => f(e3, t4, y2, E2, w2));
11274
- if (d(t3)) {
11275
- for (const n2 of Object.keys(t3)) {
11276
- if (a.test(n2))
11277
- throw s(i2, "Cannot contain numeric property keys");
11278
- if (n2 === "default" || E2.includes(n2))
11279
- return f(e3, t3[n2], y2, E2, w2);
11280
- }
11281
- return [];
11282
- }
11283
- throw s(n, `Invalid "${e3}" target "${t3}"`);
11284
- }, w = "*", v = (e3, t3) => {
11285
- const i3 = e3.indexOf(w), n2 = t3.indexOf(w);
11286
- return i3 === n2 ? t3.length > e3.length : n2 > i3;
11287
- };
11288
- function A(e3, t3) {
11289
- if (!t3.includes(w) && e3.hasOwnProperty(t3))
11290
- return [t3];
11291
- let i3, n2;
11292
- for (const a2 of Object.keys(e3))
11293
- if (a2.includes(w)) {
11294
- const [e4, c2, l2] = a2.split(w);
11295
- if (l2 === undefined && t3.startsWith(e4) && t3.endsWith(c2)) {
11296
- const l3 = t3.slice(e4.length, -c2.length || undefined);
11297
- l3 && (!i3 || v(i3, a2)) && (i3 = a2, n2 = l3);
11298
- }
11299
- }
11300
- return [i3, n2];
11301
- }
11302
- const C2 = /^\w+:/;
11303
- t2.resolveExports = (e3, t3, a2) => {
11304
- if (!e3)
11305
- throw new Error('"exports" is required');
11306
- t3 = t3 === "" ? "." : `./${t3}`, (typeof e3 == "string" || Array.isArray(e3) || d(e3) && ((e4) => Object.keys(e4).reduce((e5, t4) => {
11307
- const n2 = t4 === "" || t4[0] !== ".";
11308
- if (e5 === undefined || e5 === n2)
11309
- return n2;
11310
- throw s(i2, '"exports" cannot contain some keys starting with "." and some not');
11311
- }, undefined))(e3)) && (e3 = { ".": e3 });
11312
- const [c2, l2] = A(e3, t3), y2 = f(E.Export, e3[c2], t3, a2, l2);
11313
- if (y2.length === 0)
11314
- throw s("ERR_PACKAGE_PATH_NOT_EXPORTED", t3 === "." ? 'No "exports" main defined' : `Package subpath '${t3}' is not defined by "exports"`);
11315
- for (const e4 of y2)
11316
- if (!e4.startsWith("./") && !C2.test(e4))
11317
- throw s(n, `Invalid "exports" target "${e4}" defined in the package config`);
11318
- return y2;
11319
- }, t2.resolveImports = (e3, t3, i3) => {
11320
- if (!e3)
11321
- throw new Error('"imports" is required');
11322
- const [n2, a2] = A(e3, t3), c2 = f(E.Import, e3[n2], t3, i3, a2);
11323
- if (c2.length === 0)
11324
- throw s("ERR_PACKAGE_IMPORT_NOT_DEFINED", `Package import specifier "${t3}" is not defined in package`);
11325
- return c2;
11326
- };
11327
- } }, t = {};
11328
- function __webpack_require__(i2) {
11329
- var n = t[i2];
11330
- if (n !== undefined)
11331
- return n.exports;
11332
- var a = t[i2] = { exports: {} };
11333
- return e[i2](a, a.exports, __webpack_require__), a.exports;
11334
- }
11335
- __webpack_require__.n = (e2) => {
11336
- var t2 = e2 && e2.__esModule ? () => e2.default : () => e2;
11337
- return __webpack_require__.d(t2, { a: t2 }), t2;
11338
- }, __webpack_require__.d = (e2, t2) => {
11339
- for (var i2 in t2)
11340
- __webpack_require__.o(t2, i2) && !__webpack_require__.o(e2, i2) && Object.defineProperty(e2, i2, { enumerable: true, get: t2[i2] });
11341
- }, __webpack_require__.o = (e2, t2) => Object.prototype.hasOwnProperty.call(e2, t2);
11342
- var i = {};
11343
- (() => {
11344
- __webpack_require__.d(i, { default: () => createJiti });
11345
- const e2 = __require("node:os");
11346
- var t2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239], n = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489], a = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", c = { 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", 5: "class enum extends super const export import", 6: "enum", strict: "implements interface let package private protected public static yield", strictBind: "eval arguments" }, l = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this", y = { 5: l, "5module": l + " export import", 6: l + " const class extends export import super" }, E = /^in(stanceof)?$/, w = new RegExp("[" + a + "]"), C2 = new RegExp("[" + a + "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");
11347
- function isInAstralSet(e3, t3) {
11348
- for (var i2 = 65536, n2 = 0;n2 < t3.length; n2 += 2) {
11349
- if ((i2 += t3[n2]) > e3)
11350
- return false;
11351
- if ((i2 += t3[n2 + 1]) >= e3)
11352
- return true;
11353
- }
11354
- return false;
11355
- }
11356
- function isIdentifierStart(e3, t3) {
11357
- return e3 < 65 ? e3 === 36 : e3 < 91 || (e3 < 97 ? e3 === 95 : e3 < 123 || (e3 <= 65535 ? e3 >= 170 && w.test(String.fromCharCode(e3)) : t3 !== false && isInAstralSet(e3, n)));
11358
- }
11359
- function isIdentifierChar(e3, i2) {
11360
- return e3 < 48 ? e3 === 36 : e3 < 58 || !(e3 < 65) && (e3 < 91 || (e3 < 97 ? e3 === 95 : e3 < 123 || (e3 <= 65535 ? e3 >= 170 && C2.test(String.fromCharCode(e3)) : i2 !== false && (isInAstralSet(e3, n) || isInAstralSet(e3, t2)))));
11361
- }
11362
- var acorn_TokenType = function(e3, t3) {
11363
- t3 === undefined && (t3 = {}), this.label = e3, this.keyword = t3.keyword, this.beforeExpr = !!t3.beforeExpr, this.startsExpr = !!t3.startsExpr, this.isLoop = !!t3.isLoop, this.isAssign = !!t3.isAssign, this.prefix = !!t3.prefix, this.postfix = !!t3.postfix, this.binop = t3.binop || null, this.updateContext = null;
11364
- };
11365
- function binop(e3, t3) {
11366
- return new acorn_TokenType(e3, { beforeExpr: true, binop: t3 });
11367
- }
11368
- var S = { beforeExpr: true }, I = { startsExpr: true }, N = {};
11369
- function kw(e3, t3) {
11370
- return t3 === undefined && (t3 = {}), t3.keyword = e3, N[e3] = new acorn_TokenType(e3, t3);
11371
- }
11372
- var O = { num: new acorn_TokenType("num", I), regexp: new acorn_TokenType("regexp", I), string: new acorn_TokenType("string", I), name: new acorn_TokenType("name", I), privateId: new acorn_TokenType("privateId", I), eof: new acorn_TokenType("eof"), bracketL: new acorn_TokenType("[", { beforeExpr: true, startsExpr: true }), bracketR: new acorn_TokenType("]"), braceL: new acorn_TokenType("{", { beforeExpr: true, startsExpr: true }), braceR: new acorn_TokenType("}"), parenL: new acorn_TokenType("(", { beforeExpr: true, startsExpr: true }), parenR: new acorn_TokenType(")"), comma: new acorn_TokenType(",", S), semi: new acorn_TokenType(";", S), colon: new acorn_TokenType(":", S), dot: new acorn_TokenType("."), question: new acorn_TokenType("?", S), questionDot: new acorn_TokenType("?."), arrow: new acorn_TokenType("=>", S), template: new acorn_TokenType("template"), invalidTemplate: new acorn_TokenType("invalidTemplate"), ellipsis: new acorn_TokenType("...", S), backQuote: new acorn_TokenType("`", I), dollarBraceL: new acorn_TokenType("${", { beforeExpr: true, startsExpr: true }), eq: new acorn_TokenType("=", { beforeExpr: true, isAssign: true }), assign: new acorn_TokenType("_=", { beforeExpr: true, isAssign: true }), incDec: new acorn_TokenType("++/--", { prefix: true, postfix: true, startsExpr: true }), prefix: new acorn_TokenType("!/~", { beforeExpr: true, prefix: true, startsExpr: true }), logicalOR: binop("||", 1), logicalAND: binop("&&", 2), bitwiseOR: binop("|", 3), bitwiseXOR: binop("^", 4), bitwiseAND: binop("&", 5), equality: binop("==/!=/===/!==", 6), relational: binop("</>/<=/>=", 7), bitShift: binop("<</>>/>>>", 8), plusMin: new acorn_TokenType("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }), modulo: binop("%", 10), star: binop("*", 10), slash: binop("/", 10), starstar: new acorn_TokenType("**", { beforeExpr: true }), coalesce: binop("??", 1), _break: kw("break"), _case: kw("case", S), _catch: kw("catch"), _continue: kw("continue"), _debugger: kw("debugger"), _default: kw("default", S), _do: kw("do", { isLoop: true, beforeExpr: true }), _else: kw("else", S), _finally: kw("finally"), _for: kw("for", { isLoop: true }), _function: kw("function", I), _if: kw("if"), _return: kw("return", S), _switch: kw("switch"), _throw: kw("throw", S), _try: kw("try"), _var: kw("var"), _const: kw("const"), _while: kw("while", { isLoop: true }), _with: kw("with"), _new: kw("new", { beforeExpr: true, startsExpr: true }), _this: kw("this", I), _super: kw("super", I), _class: kw("class", I), _extends: kw("extends", S), _export: kw("export"), _import: kw("import", I), _null: kw("null", I), _true: kw("true", I), _false: kw("false", I), _in: kw("in", { beforeExpr: true, binop: 7 }), _instanceof: kw("instanceof", { beforeExpr: true, binop: 7 }), _typeof: kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true }), _void: kw("void", { beforeExpr: true, prefix: true, startsExpr: true }), _delete: kw("delete", { beforeExpr: true, prefix: true, startsExpr: true }) }, j = /\r\n?|\n|\u2028|\u2029/, F = new RegExp(j.source, "g");
11373
- function isNewLine(e3) {
11374
- return e3 === 10 || e3 === 13 || e3 === 8232 || e3 === 8233;
11375
- }
11376
- function nextLineBreak(e3, t3, i2) {
11377
- i2 === undefined && (i2 = e3.length);
11378
- for (var n2 = t3;n2 < i2; n2++) {
11379
- var a2 = e3.charCodeAt(n2);
11380
- if (isNewLine(a2))
11381
- return n2 < i2 - 1 && a2 === 13 && e3.charCodeAt(n2 + 1) === 10 ? n2 + 2 : n2 + 1;
11382
- }
11383
- return -1;
11384
- }
11385
- var B = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, $ = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, q = Object.prototype, W = q.hasOwnProperty, K = q.toString, H = Object.hasOwn || function(e3, t3) {
11386
- return W.call(e3, t3);
11387
- }, Y = Array.isArray || function(e3) {
11388
- return K.call(e3) === "[object Array]";
11389
- }, Q = Object.create(null);
11390
- function wordsRegexp(e3) {
11391
- return Q[e3] || (Q[e3] = new RegExp("^(?:" + e3.replace(/ /g, "|") + ")$"));
11392
- }
11393
- function codePointToString(e3) {
11394
- return e3 <= 65535 ? String.fromCharCode(e3) : (e3 -= 65536, String.fromCharCode(55296 + (e3 >> 10), 56320 + (1023 & e3)));
11395
- }
11396
- var Z = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, acorn_Position = function(e3, t3) {
11397
- this.line = e3, this.column = t3;
11398
- };
11399
- acorn_Position.prototype.offset = function(e3) {
11400
- return new acorn_Position(this.line, this.column + e3);
11401
- };
11402
- var acorn_SourceLocation = function(e3, t3, i2) {
11403
- this.start = t3, this.end = i2, e3.sourceFile !== null && (this.source = e3.sourceFile);
11404
- };
11405
- function getLineInfo(e3, t3) {
11406
- for (var i2 = 1, n2 = 0;; ) {
11407
- var a2 = nextLineBreak(e3, n2, t3);
11408
- if (a2 < 0)
11409
- return new acorn_Position(i2, t3 - n2);
11410
- ++i2, n2 = a2;
11411
- }
11412
- }
11413
- var X = { ecmaVersion: null, sourceType: "script", onInsertedSemicolon: null, onTrailingComma: null, allowReserved: null, allowReturnOutsideFunction: false, allowImportExportEverywhere: false, allowAwaitOutsideFunction: null, allowSuperOutsideMethod: null, allowHashBang: false, checkPrivateFields: true, locations: false, onToken: null, onComment: null, ranges: false, program: null, sourceFile: null, directSourceFile: null, preserveParens: false }, te = false;
11414
- function getOptions(e3) {
11415
- var t3 = {};
11416
- for (var i2 in X)
11417
- t3[i2] = e3 && H(e3, i2) ? e3[i2] : X[i2];
11418
- if (t3.ecmaVersion === "latest" ? t3.ecmaVersion = 1e8 : t3.ecmaVersion == null ? (!te && typeof console == "object" && console.warn && (te = true, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
11419
- Defaulting to 2020, but this will stop working in the future.`)), t3.ecmaVersion = 11) : t3.ecmaVersion >= 2015 && (t3.ecmaVersion -= 2009), t3.allowReserved == null && (t3.allowReserved = t3.ecmaVersion < 5), e3 && e3.allowHashBang != null || (t3.allowHashBang = t3.ecmaVersion >= 14), Y(t3.onToken)) {
11420
- var n2 = t3.onToken;
11421
- t3.onToken = function(e4) {
11422
- return n2.push(e4);
11423
- };
11424
- }
11425
- if (Y(t3.onComment) && (t3.onComment = function(e4, t4) {
11426
- return function(i3, n3, a2, c2, l2, y2) {
11427
- var E2 = { type: i3 ? "Block" : "Line", value: n3, start: a2, end: c2 };
11428
- e4.locations && (E2.loc = new acorn_SourceLocation(this, l2, y2)), e4.ranges && (E2.range = [a2, c2]), t4.push(E2);
11429
- };
11430
- }(t3, t3.onComment)), t3.sourceType === "commonjs" && t3.allowAwaitOutsideFunction)
11431
- throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");
11432
- return t3;
11433
- }
11434
- var ie = 256, se = 259;
11435
- function functionFlags(e3, t3) {
11436
- return 2 | (e3 ? 4 : 0) | (t3 ? 8 : 0);
11437
- }
11438
- var acorn_Parser = function(e3, t3, i2) {
11439
- this.options = e3 = getOptions(e3), this.sourceFile = e3.sourceFile, this.keywords = wordsRegexp(y[e3.ecmaVersion >= 6 ? 6 : e3.sourceType === "module" ? "5module" : 5]);
11440
- var n2 = "";
11441
- e3.allowReserved !== true && (n2 = c[e3.ecmaVersion >= 6 ? 6 : e3.ecmaVersion === 5 ? 5 : 3], e3.sourceType === "module" && (n2 += " await")), this.reservedWords = wordsRegexp(n2);
11442
- var a2 = (n2 ? n2 + " " : "") + c.strict;
11443
- this.reservedWordsStrict = wordsRegexp(a2), this.reservedWordsStrictBind = wordsRegexp(a2 + " " + c.strictBind), this.input = String(t3), this.containsEsc = false, i2 ? (this.pos = i2, this.lineStart = this.input.lastIndexOf(`
11444
- `, i2 - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(j).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = O.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = true, this.inModule = e3.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = false, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = Object.create(null), this.pos === 0 && e3.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(this.options.sourceType === "commonjs" ? 2 : 1), this.regexpState = null, this.privateNameStack = [];
11445
- }, re = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowReturn: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, allowUsing: { configurable: true }, inClassStaticBlock: { configurable: true } };
11446
- acorn_Parser.prototype.parse = function() {
11447
- var e3 = this.options.program || this.startNode();
11448
- return this.nextToken(), this.parseTopLevel(e3);
11449
- }, re.inFunction.get = function() {
11450
- return (2 & this.currentVarScope().flags) > 0;
11451
- }, re.inGenerator.get = function() {
11452
- return (8 & this.currentVarScope().flags) > 0;
11453
- }, re.inAsync.get = function() {
11454
- return (4 & this.currentVarScope().flags) > 0;
11455
- }, re.canAwait.get = function() {
11456
- for (var e3 = this.scopeStack.length - 1;e3 >= 0; e3--) {
11457
- var t3 = this.scopeStack[e3].flags;
11458
- if (768 & t3)
11459
- return false;
11460
- if (2 & t3)
11461
- return (4 & t3) > 0;
11462
- }
11463
- return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
11464
- }, re.allowReturn.get = function() {
11465
- return !!this.inFunction || !!(this.options.allowReturnOutsideFunction && 1 & this.currentVarScope().flags);
11466
- }, re.allowSuper.get = function() {
11467
- return (64 & this.currentThisScope().flags) > 0 || this.options.allowSuperOutsideMethod;
11468
- }, re.allowDirectSuper.get = function() {
11469
- return (128 & this.currentThisScope().flags) > 0;
11470
- }, re.treatFunctionsAsVar.get = function() {
11471
- return this.treatFunctionsAsVarInScope(this.currentScope());
11472
- }, re.allowNewDotTarget.get = function() {
11473
- for (var e3 = this.scopeStack.length - 1;e3 >= 0; e3--) {
11474
- var t3 = this.scopeStack[e3].flags;
11475
- if (768 & t3 || 2 & t3 && !(16 & t3))
11476
- return true;
11477
- }
11478
- return false;
11479
- }, re.allowUsing.get = function() {
11480
- var e3 = this.currentScope().flags;
11481
- return !(1024 & e3) && !(!this.inModule && 1 & e3);
11482
- }, re.inClassStaticBlock.get = function() {
11483
- return (this.currentVarScope().flags & ie) > 0;
11484
- }, acorn_Parser.extend = function() {
11485
- for (var e3 = [], t3 = arguments.length;t3--; )
11486
- e3[t3] = arguments[t3];
11487
- for (var i2 = this, n2 = 0;n2 < e3.length; n2++)
11488
- i2 = e3[n2](i2);
11489
- return i2;
11490
- }, acorn_Parser.parse = function(e3, t3) {
11491
- return new this(t3, e3).parse();
11492
- }, acorn_Parser.parseExpressionAt = function(e3, t3, i2) {
11493
- var n2 = new this(i2, e3, t3);
11494
- return n2.nextToken(), n2.parseExpression();
11495
- }, acorn_Parser.tokenizer = function(e3, t3) {
11496
- return new this(t3, e3);
11497
- }, Object.defineProperties(acorn_Parser.prototype, re);
11498
- var ne = acorn_Parser.prototype, ae = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
11499
- ne.strictDirective = function(e3) {
11500
- if (this.options.ecmaVersion < 5)
11501
- return false;
11502
- for (;; ) {
11503
- $.lastIndex = e3, e3 += $.exec(this.input)[0].length;
11504
- var t3 = ae.exec(this.input.slice(e3));
11505
- if (!t3)
11506
- return false;
11507
- if ((t3[1] || t3[2]) === "use strict") {
11508
- $.lastIndex = e3 + t3[0].length;
11509
- var i2 = $.exec(this.input), n2 = i2.index + i2[0].length, a2 = this.input.charAt(n2);
11510
- return a2 === ";" || a2 === "}" || j.test(i2[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(a2) || a2 === "!" && this.input.charAt(n2 + 1) === "=");
11511
- }
11512
- e3 += t3[0].length, $.lastIndex = e3, e3 += $.exec(this.input)[0].length, this.input[e3] === ";" && e3++;
11513
- }
11514
- }, ne.eat = function(e3) {
11515
- return this.type === e3 && (this.next(), true);
11516
- }, ne.isContextual = function(e3) {
11517
- return this.type === O.name && this.value === e3 && !this.containsEsc;
11518
- }, ne.eatContextual = function(e3) {
11519
- return !!this.isContextual(e3) && (this.next(), true);
11520
- }, ne.expectContextual = function(e3) {
11521
- this.eatContextual(e3) || this.unexpected();
11522
- }, ne.canInsertSemicolon = function() {
11523
- return this.type === O.eof || this.type === O.braceR || j.test(this.input.slice(this.lastTokEnd, this.start));
11524
- }, ne.insertSemicolon = function() {
11525
- if (this.canInsertSemicolon())
11526
- return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), true;
11527
- }, ne.semicolon = function() {
11528
- this.eat(O.semi) || this.insertSemicolon() || this.unexpected();
11529
- }, ne.afterTrailingComma = function(e3, t3) {
11530
- if (this.type === e3)
11531
- return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), t3 || this.next(), true;
11532
- }, ne.expect = function(e3) {
11533
- this.eat(e3) || this.unexpected();
11534
- }, ne.unexpected = function(e3) {
11535
- this.raise(e3 != null ? e3 : this.start, "Unexpected token");
11536
- };
11537
- var acorn_DestructuringErrors = function() {
11538
- this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
11539
- };
11540
- ne.checkPatternErrors = function(e3, t3) {
11541
- if (e3) {
11542
- e3.trailingComma > -1 && this.raiseRecoverable(e3.trailingComma, "Comma is not permitted after the rest element");
11543
- var i2 = t3 ? e3.parenthesizedAssign : e3.parenthesizedBind;
11544
- i2 > -1 && this.raiseRecoverable(i2, t3 ? "Assigning to rvalue" : "Parenthesized pattern");
11545
- }
11546
- }, ne.checkExpressionErrors = function(e3, t3) {
11547
- if (!e3)
11548
- return false;
11549
- var { shorthandAssign: i2, doubleProto: n2 } = e3;
11550
- if (!t3)
11551
- return i2 >= 0 || n2 >= 0;
11552
- i2 >= 0 && this.raise(i2, "Shorthand property assignments are valid only in destructuring patterns"), n2 >= 0 && this.raiseRecoverable(n2, "Redefinition of __proto__ property");
11553
- }, ne.checkYieldAwaitInDefaultParams = function() {
11554
- this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos) && this.raise(this.yieldPos, "Yield expression cannot be a default value"), this.awaitPos && this.raise(this.awaitPos, "Await expression cannot be a default value");
11555
- }, ne.isSimpleAssignTarget = function(e3) {
11556
- return e3.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(e3.expression) : e3.type === "Identifier" || e3.type === "MemberExpression";
11557
- };
11558
- var oe = acorn_Parser.prototype;
11559
- oe.parseTopLevel = function(e3) {
11560
- var t3 = Object.create(null);
11561
- for (e3.body || (e3.body = []);this.type !== O.eof; ) {
11562
- var i2 = this.parseStatement(null, true, t3);
11563
- e3.body.push(i2);
11564
- }
11565
- if (this.inModule)
11566
- for (var n2 = 0, a2 = Object.keys(this.undefinedExports);n2 < a2.length; n2 += 1) {
11567
- var c2 = a2[n2];
11568
- this.raiseRecoverable(this.undefinedExports[c2].start, "Export '" + c2 + "' is not defined");
11569
- }
11570
- return this.adaptDirectivePrologue(e3.body), this.next(), e3.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType, this.finishNode(e3, "Program");
11571
- };
11572
- var ce = { kind: "loop" }, he = { kind: "switch" };
11573
- oe.isLet = function(e3) {
11574
- if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
11575
- return false;
11576
- $.lastIndex = this.pos;
11577
- var t3 = $.exec(this.input), i2 = this.pos + t3[0].length, n2 = this.fullCharCodeAt(i2);
11578
- if (n2 === 91 || n2 === 92)
11579
- return true;
11580
- if (e3)
11581
- return false;
11582
- if (n2 === 123)
11583
- return true;
11584
- if (isIdentifierStart(n2)) {
11585
- var a2 = i2;
11586
- do {
11587
- i2 += n2 <= 65535 ? 1 : 2;
11588
- } while (isIdentifierChar(n2 = this.fullCharCodeAt(i2)));
11589
- if (n2 === 92)
11590
- return true;
11591
- var c2 = this.input.slice(a2, i2);
11592
- if (!E.test(c2))
11593
- return true;
11594
- }
11595
- return false;
11596
- }, oe.isAsyncFunction = function() {
11597
- if (this.options.ecmaVersion < 8 || !this.isContextual("async"))
11598
- return false;
11599
- $.lastIndex = this.pos;
11600
- var e3, t3 = $.exec(this.input), i2 = this.pos + t3[0].length;
11601
- return !(j.test(this.input.slice(this.pos, i2)) || this.input.slice(i2, i2 + 8) !== "function" || i2 + 8 !== this.input.length && (isIdentifierChar(e3 = this.fullCharCodeAt(i2 + 8)) || e3 === 92));
11602
- }, oe.isUsingKeyword = function(e3, t3) {
11603
- if (this.options.ecmaVersion < 17 || !this.isContextual(e3 ? "await" : "using"))
11604
- return false;
11605
- $.lastIndex = this.pos;
11606
- var i2 = $.exec(this.input), n2 = this.pos + i2[0].length;
11607
- if (j.test(this.input.slice(this.pos, n2)))
11608
- return false;
11609
- if (e3) {
11610
- var a2, c2 = n2 + 5;
11611
- if (this.input.slice(n2, c2) !== "using" || c2 === this.input.length || isIdentifierChar(a2 = this.fullCharCodeAt(c2)) || a2 === 92)
11612
- return false;
11613
- $.lastIndex = c2;
11614
- var l2 = $.exec(this.input);
11615
- if (n2 = c2 + l2[0].length, l2 && j.test(this.input.slice(c2, n2)))
11616
- return false;
11617
- }
11618
- var y2 = this.fullCharCodeAt(n2);
11619
- if (!isIdentifierStart(y2) && y2 !== 92)
11620
- return false;
11621
- var w2 = n2;
11622
- do {
11623
- n2 += y2 <= 65535 ? 1 : 2;
11624
- } while (isIdentifierChar(y2 = this.fullCharCodeAt(n2)));
11625
- if (y2 === 92)
11626
- return true;
11627
- var C3 = this.input.slice(w2, n2);
11628
- return !(E.test(C3) || t3 && C3 === "of");
11629
- }, oe.isAwaitUsing = function(e3) {
11630
- return this.isUsingKeyword(true, e3);
11631
- }, oe.isUsing = function(e3) {
11632
- return this.isUsingKeyword(false, e3);
11633
- }, oe.parseStatement = function(e3, t3, i2) {
11634
- var n2, a2 = this.type, c2 = this.startNode();
11635
- switch (this.isLet(e3) && (a2 = O._var, n2 = "let"), a2) {
11636
- case O._break:
11637
- case O._continue:
11638
- return this.parseBreakContinueStatement(c2, a2.keyword);
11639
- case O._debugger:
11640
- return this.parseDebuggerStatement(c2);
11641
- case O._do:
11642
- return this.parseDoStatement(c2);
11643
- case O._for:
11644
- return this.parseForStatement(c2);
11645
- case O._function:
11646
- return e3 && (this.strict || e3 !== "if" && e3 !== "label") && this.options.ecmaVersion >= 6 && this.unexpected(), this.parseFunctionStatement(c2, false, !e3);
11647
- case O._class:
11648
- return e3 && this.unexpected(), this.parseClass(c2, true);
11649
- case O._if:
11650
- return this.parseIfStatement(c2);
11651
- case O._return:
11652
- return this.parseReturnStatement(c2);
11653
- case O._switch:
11654
- return this.parseSwitchStatement(c2);
11655
- case O._throw:
11656
- return this.parseThrowStatement(c2);
11657
- case O._try:
11658
- return this.parseTryStatement(c2);
11659
- case O._const:
11660
- case O._var:
11661
- return n2 = n2 || this.value, e3 && n2 !== "var" && this.unexpected(), this.parseVarStatement(c2, n2);
11662
- case O._while:
11663
- return this.parseWhileStatement(c2);
11664
- case O._with:
11665
- return this.parseWithStatement(c2);
11666
- case O.braceL:
11667
- return this.parseBlock(true, c2);
11668
- case O.semi:
11669
- return this.parseEmptyStatement(c2);
11670
- case O._export:
11671
- case O._import:
11672
- if (this.options.ecmaVersion > 10 && a2 === O._import) {
11673
- $.lastIndex = this.pos;
11674
- var l2 = $.exec(this.input), y2 = this.pos + l2[0].length, E2 = this.input.charCodeAt(y2);
11675
- if (E2 === 40 || E2 === 46)
11676
- return this.parseExpressionStatement(c2, this.parseExpression());
11677
- }
11678
- return this.options.allowImportExportEverywhere || (t3 || this.raise(this.start, "'import' and 'export' may only appear at the top level"), this.inModule || this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")), a2 === O._import ? this.parseImport(c2) : this.parseExport(c2, i2);
11679
- default:
11680
- if (this.isAsyncFunction())
11681
- return e3 && this.unexpected(), this.next(), this.parseFunctionStatement(c2, true, !e3);
11682
- var w2 = this.isAwaitUsing(false) ? "await using" : this.isUsing(false) ? "using" : null;
11683
- if (w2)
11684
- return this.allowUsing || this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"), w2 === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(c2, false, w2), this.semicolon(), this.finishNode(c2, "VariableDeclaration");
11685
- var C3 = this.value, S2 = this.parseExpression();
11686
- return a2 === O.name && S2.type === "Identifier" && this.eat(O.colon) ? this.parseLabeledStatement(c2, C3, S2, e3) : this.parseExpressionStatement(c2, S2);
11687
- }
11688
- }, oe.parseBreakContinueStatement = function(e3, t3) {
11689
- var i2 = t3 === "break";
11690
- this.next(), this.eat(O.semi) || this.insertSemicolon() ? e3.label = null : this.type !== O.name ? this.unexpected() : (e3.label = this.parseIdent(), this.semicolon());
11691
- for (var n2 = 0;n2 < this.labels.length; ++n2) {
11692
- var a2 = this.labels[n2];
11693
- if (e3.label == null || a2.name === e3.label.name) {
11694
- if (a2.kind != null && (i2 || a2.kind === "loop"))
11695
- break;
11696
- if (e3.label && i2)
11697
- break;
11698
- }
11699
- }
11700
- return n2 === this.labels.length && this.raise(e3.start, "Unsyntactic " + t3), this.finishNode(e3, i2 ? "BreakStatement" : "ContinueStatement");
11701
- }, oe.parseDebuggerStatement = function(e3) {
11702
- return this.next(), this.semicolon(), this.finishNode(e3, "DebuggerStatement");
11703
- }, oe.parseDoStatement = function(e3) {
11704
- return this.next(), this.labels.push(ce), e3.body = this.parseStatement("do"), this.labels.pop(), this.expect(O._while), e3.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(O.semi) : this.semicolon(), this.finishNode(e3, "DoWhileStatement");
11705
- }, oe.parseForStatement = function(e3) {
11706
- this.next();
11707
- var t3 = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
11708
- if (this.labels.push(ce), this.enterScope(0), this.expect(O.parenL), this.type === O.semi)
11709
- return t3 > -1 && this.unexpected(t3), this.parseFor(e3, null);
11710
- var i2 = this.isLet();
11711
- if (this.type === O._var || this.type === O._const || i2) {
11712
- var n2 = this.startNode(), a2 = i2 ? "let" : this.value;
11713
- return this.next(), this.parseVar(n2, true, a2), this.finishNode(n2, "VariableDeclaration"), this.parseForAfterInit(e3, n2, t3);
11714
- }
11715
- var c2 = this.isContextual("let"), l2 = false, y2 = this.isUsing(true) ? "using" : this.isAwaitUsing(true) ? "await using" : null;
11716
- if (y2) {
11717
- var E2 = this.startNode();
11718
- return this.next(), y2 === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.parseVar(E2, true, y2), this.finishNode(E2, "VariableDeclaration"), this.parseForAfterInit(e3, E2, t3);
11719
- }
11720
- var w2 = this.containsEsc, C3 = new acorn_DestructuringErrors, S2 = this.start, I2 = t3 > -1 ? this.parseExprSubscripts(C3, "await") : this.parseExpression(true, C3);
11721
- return this.type === O._in || (l2 = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t3 > -1 ? (this.type === O._in && this.unexpected(t3), e3.await = true) : l2 && this.options.ecmaVersion >= 8 && (I2.start !== S2 || w2 || I2.type !== "Identifier" || I2.name !== "async" ? this.options.ecmaVersion >= 9 && (e3.await = false) : this.unexpected()), c2 && l2 && this.raise(I2.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(I2, false, C3), this.checkLValPattern(I2), this.parseForIn(e3, I2)) : (this.checkExpressionErrors(C3, true), t3 > -1 && this.unexpected(t3), this.parseFor(e3, I2));
11722
- }, oe.parseForAfterInit = function(e3, t3, i2) {
11723
- return (this.type === O._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && t3.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === O._in ? i2 > -1 && this.unexpected(i2) : e3.await = i2 > -1), this.parseForIn(e3, t3)) : (i2 > -1 && this.unexpected(i2), this.parseFor(e3, t3));
11724
- }, oe.parseFunctionStatement = function(e3, t3, i2) {
11725
- return this.next(), this.parseFunction(e3, pe | (i2 ? 0 : ue), false, t3);
11726
- }, oe.parseIfStatement = function(e3) {
11727
- return this.next(), e3.test = this.parseParenExpression(), e3.consequent = this.parseStatement("if"), e3.alternate = this.eat(O._else) ? this.parseStatement("if") : null, this.finishNode(e3, "IfStatement");
11728
- }, oe.parseReturnStatement = function(e3) {
11729
- return this.allowReturn || this.raise(this.start, "'return' outside of function"), this.next(), this.eat(O.semi) || this.insertSemicolon() ? e3.argument = null : (e3.argument = this.parseExpression(), this.semicolon()), this.finishNode(e3, "ReturnStatement");
11730
- }, oe.parseSwitchStatement = function(e3) {
11731
- var t3;
11732
- this.next(), e3.discriminant = this.parseParenExpression(), e3.cases = [], this.expect(O.braceL), this.labels.push(he), this.enterScope(1024);
11733
- for (var i2 = false;this.type !== O.braceR; )
11734
- if (this.type === O._case || this.type === O._default) {
11735
- var n2 = this.type === O._case;
11736
- t3 && this.finishNode(t3, "SwitchCase"), e3.cases.push(t3 = this.startNode()), t3.consequent = [], this.next(), n2 ? t3.test = this.parseExpression() : (i2 && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), i2 = true, t3.test = null), this.expect(O.colon);
11737
- } else
11738
- t3 || this.unexpected(), t3.consequent.push(this.parseStatement(null));
11739
- return this.exitScope(), t3 && this.finishNode(t3, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(e3, "SwitchStatement");
11740
- }, oe.parseThrowStatement = function(e3) {
11741
- return this.next(), j.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), e3.argument = this.parseExpression(), this.semicolon(), this.finishNode(e3, "ThrowStatement");
11742
- };
11743
- var le = [];
11744
- oe.parseCatchClauseParam = function() {
11745
- var e3 = this.parseBindingAtom(), t3 = e3.type === "Identifier";
11746
- return this.enterScope(t3 ? 32 : 0), this.checkLValPattern(e3, t3 ? 4 : 2), this.expect(O.parenR), e3;
11747
- }, oe.parseTryStatement = function(e3) {
11748
- if (this.next(), e3.block = this.parseBlock(), e3.handler = null, this.type === O._catch) {
11749
- var t3 = this.startNode();
11750
- this.next(), this.eat(O.parenL) ? t3.param = this.parseCatchClauseParam() : (this.options.ecmaVersion < 10 && this.unexpected(), t3.param = null, this.enterScope(0)), t3.body = this.parseBlock(false), this.exitScope(), e3.handler = this.finishNode(t3, "CatchClause");
11751
- }
11752
- return e3.finalizer = this.eat(O._finally) ? this.parseBlock() : null, e3.handler || e3.finalizer || this.raise(e3.start, "Missing catch or finally clause"), this.finishNode(e3, "TryStatement");
11753
- }, oe.parseVarStatement = function(e3, t3, i2) {
11754
- return this.next(), this.parseVar(e3, false, t3, i2), this.semicolon(), this.finishNode(e3, "VariableDeclaration");
11755
- }, oe.parseWhileStatement = function(e3) {
11756
- return this.next(), e3.test = this.parseParenExpression(), this.labels.push(ce), e3.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(e3, "WhileStatement");
11757
- }, oe.parseWithStatement = function(e3) {
11758
- return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), e3.object = this.parseParenExpression(), e3.body = this.parseStatement("with"), this.finishNode(e3, "WithStatement");
11759
- }, oe.parseEmptyStatement = function(e3) {
11760
- return this.next(), this.finishNode(e3, "EmptyStatement");
11761
- }, oe.parseLabeledStatement = function(e3, t3, i2, n2) {
11762
- for (var a2 = 0, c2 = this.labels;a2 < c2.length; a2 += 1) {
11763
- c2[a2].name === t3 && this.raise(i2.start, "Label '" + t3 + "' is already declared");
11764
- }
11765
- for (var l2 = this.type.isLoop ? "loop" : this.type === O._switch ? "switch" : null, y2 = this.labels.length - 1;y2 >= 0; y2--) {
11766
- var E2 = this.labels[y2];
11767
- if (E2.statementStart !== e3.start)
11768
- break;
11769
- E2.statementStart = this.start, E2.kind = l2;
11770
- }
11771
- return this.labels.push({ name: t3, kind: l2, statementStart: this.start }), e3.body = this.parseStatement(n2 ? n2.indexOf("label") === -1 ? n2 + "label" : n2 : "label"), this.labels.pop(), e3.label = i2, this.finishNode(e3, "LabeledStatement");
11772
- }, oe.parseExpressionStatement = function(e3, t3) {
11773
- return e3.expression = t3, this.semicolon(), this.finishNode(e3, "ExpressionStatement");
11774
- }, oe.parseBlock = function(e3, t3, i2) {
11775
- for (e3 === undefined && (e3 = true), t3 === undefined && (t3 = this.startNode()), t3.body = [], this.expect(O.braceL), e3 && this.enterScope(0);this.type !== O.braceR; ) {
11776
- var n2 = this.parseStatement(null);
11777
- t3.body.push(n2);
11778
- }
11779
- return i2 && (this.strict = false), this.next(), e3 && this.exitScope(), this.finishNode(t3, "BlockStatement");
11780
- }, oe.parseFor = function(e3, t3) {
11781
- return e3.init = t3, this.expect(O.semi), e3.test = this.type === O.semi ? null : this.parseExpression(), this.expect(O.semi), e3.update = this.type === O.parenR ? null : this.parseExpression(), this.expect(O.parenR), e3.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e3, "ForStatement");
11782
- }, oe.parseForIn = function(e3, t3) {
11783
- var i2 = this.type === O._in;
11784
- return this.next(), t3.type === "VariableDeclaration" && t3.declarations[0].init != null && (!i2 || this.options.ecmaVersion < 8 || this.strict || t3.kind !== "var" || t3.declarations[0].id.type !== "Identifier") && this.raise(t3.start, (i2 ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"), e3.left = t3, e3.right = i2 ? this.parseExpression() : this.parseMaybeAssign(), this.expect(O.parenR), e3.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e3, i2 ? "ForInStatement" : "ForOfStatement");
11785
- }, oe.parseVar = function(e3, t3, i2, n2) {
11786
- for (e3.declarations = [], e3.kind = i2;; ) {
11787
- var a2 = this.startNode();
11788
- if (this.parseVarId(a2, i2), this.eat(O.eq) ? a2.init = this.parseMaybeAssign(t3) : n2 || i2 !== "const" || this.type === O._in || this.options.ecmaVersion >= 6 && this.isContextual("of") ? n2 || i2 !== "using" && i2 !== "await using" || !(this.options.ecmaVersion >= 17) || this.type === O._in || this.isContextual("of") ? n2 || a2.id.type === "Identifier" || t3 && (this.type === O._in || this.isContextual("of")) ? a2.init = null : this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value") : this.raise(this.lastTokEnd, "Missing initializer in " + i2 + " declaration") : this.unexpected(), e3.declarations.push(this.finishNode(a2, "VariableDeclarator")), !this.eat(O.comma))
11789
- break;
11790
- }
11791
- return e3;
11792
- }, oe.parseVarId = function(e3, t3) {
11793
- e3.id = t3 === "using" || t3 === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e3.id, t3 === "var" ? 1 : 2, false);
11794
- };
11795
- var pe = 1, ue = 2;
11796
- function isPrivateNameConflicted(e3, t3) {
11797
- var i2 = t3.key.name, n2 = e3[i2], a2 = "true";
11798
- return t3.type !== "MethodDefinition" || t3.kind !== "get" && t3.kind !== "set" || (a2 = (t3.static ? "s" : "i") + t3.kind), n2 === "iget" && a2 === "iset" || n2 === "iset" && a2 === "iget" || n2 === "sget" && a2 === "sset" || n2 === "sset" && a2 === "sget" ? (e3[i2] = "true", false) : !!n2 || (e3[i2] = a2, false);
11799
- }
11800
- function checkKeyName(e3, t3) {
11801
- var { computed: i2, key: n2 } = e3;
11802
- return !i2 && (n2.type === "Identifier" && n2.name === t3 || n2.type === "Literal" && n2.value === t3);
11803
- }
11804
- oe.parseFunction = function(e3, t3, i2, n2, a2) {
11805
- this.initFunction(e3), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !n2) && (this.type === O.star && t3 & ue && this.unexpected(), e3.generator = this.eat(O.star)), this.options.ecmaVersion >= 8 && (e3.async = !!n2), t3 & pe && (e3.id = 4 & t3 && this.type !== O.name ? null : this.parseIdent(), !e3.id || t3 & ue || this.checkLValSimple(e3.id, this.strict || e3.generator || e3.async ? this.treatFunctionsAsVar ? 1 : 2 : 3));
11806
- var c2 = this.yieldPos, l2 = this.awaitPos, y2 = this.awaitIdentPos;
11807
- return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(functionFlags(e3.async, e3.generator)), t3 & pe || (e3.id = this.type === O.name ? this.parseIdent() : null), this.parseFunctionParams(e3), this.parseFunctionBody(e3, i2, false, a2), this.yieldPos = c2, this.awaitPos = l2, this.awaitIdentPos = y2, this.finishNode(e3, t3 & pe ? "FunctionDeclaration" : "FunctionExpression");
11808
- }, oe.parseFunctionParams = function(e3) {
11809
- this.expect(O.parenL), e3.params = this.parseBindingList(O.parenR, false, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
11810
- }, oe.parseClass = function(e3, t3) {
11811
- this.next();
11812
- var i2 = this.strict;
11813
- this.strict = true, this.parseClassId(e3, t3), this.parseClassSuper(e3);
11814
- var n2 = this.enterClassBody(), a2 = this.startNode(), c2 = false;
11815
- for (a2.body = [], this.expect(O.braceL);this.type !== O.braceR; ) {
11816
- var l2 = this.parseClassElement(e3.superClass !== null);
11817
- l2 && (a2.body.push(l2), l2.type === "MethodDefinition" && l2.kind === "constructor" ? (c2 && this.raiseRecoverable(l2.start, "Duplicate constructor in the same class"), c2 = true) : l2.key && l2.key.type === "PrivateIdentifier" && isPrivateNameConflicted(n2, l2) && this.raiseRecoverable(l2.key.start, "Identifier '#" + l2.key.name + "' has already been declared"));
11818
- }
11819
- return this.strict = i2, this.next(), e3.body = this.finishNode(a2, "ClassBody"), this.exitClassBody(), this.finishNode(e3, t3 ? "ClassDeclaration" : "ClassExpression");
11820
- }, oe.parseClassElement = function(e3) {
11821
- if (this.eat(O.semi))
11822
- return null;
11823
- var t3 = this.options.ecmaVersion, i2 = this.startNode(), n2 = "", a2 = false, c2 = false, l2 = "method", y2 = false;
11824
- if (this.eatContextual("static")) {
11825
- if (t3 >= 13 && this.eat(O.braceL))
11826
- return this.parseClassStaticBlock(i2), i2;
11827
- this.isClassElementNameStart() || this.type === O.star ? y2 = true : n2 = "static";
11828
- }
11829
- if (i2.static = y2, !n2 && t3 >= 8 && this.eatContextual("async") && (!this.isClassElementNameStart() && this.type !== O.star || this.canInsertSemicolon() ? n2 = "async" : c2 = true), !n2 && (t3 >= 9 || !c2) && this.eat(O.star) && (a2 = true), !n2 && !c2 && !a2) {
11830
- var E2 = this.value;
11831
- (this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? l2 = E2 : n2 = E2);
11832
- }
11833
- if (n2 ? (i2.computed = false, i2.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), i2.key.name = n2, this.finishNode(i2.key, "Identifier")) : this.parseClassElementName(i2), t3 < 13 || this.type === O.parenL || l2 !== "method" || a2 || c2) {
11834
- var w2 = !i2.static && checkKeyName(i2, "constructor"), C3 = w2 && e3;
11835
- w2 && l2 !== "method" && this.raise(i2.key.start, "Constructor can't have get/set modifier"), i2.kind = w2 ? "constructor" : l2, this.parseClassMethod(i2, a2, c2, C3);
11836
- } else
11837
- this.parseClassField(i2);
11838
- return i2;
11839
- }, oe.isClassElementNameStart = function() {
11840
- return this.type === O.name || this.type === O.privateId || this.type === O.num || this.type === O.string || this.type === O.bracketL || this.type.keyword;
11841
- }, oe.parseClassElementName = function(e3) {
11842
- this.type === O.privateId ? (this.value === "constructor" && this.raise(this.start, "Classes can't have an element named '#constructor'"), e3.computed = false, e3.key = this.parsePrivateIdent()) : this.parsePropertyName(e3);
11843
- }, oe.parseClassMethod = function(e3, t3, i2, n2) {
11844
- var a2 = e3.key;
11845
- e3.kind === "constructor" ? (t3 && this.raise(a2.start, "Constructor can't be a generator"), i2 && this.raise(a2.start, "Constructor can't be an async method")) : e3.static && checkKeyName(e3, "prototype") && this.raise(a2.start, "Classes may not have a static property named prototype");
11846
- var c2 = e3.value = this.parseMethod(t3, i2, n2);
11847
- return e3.kind === "get" && c2.params.length !== 0 && this.raiseRecoverable(c2.start, "getter should have no params"), e3.kind === "set" && c2.params.length !== 1 && this.raiseRecoverable(c2.start, "setter should have exactly one param"), e3.kind === "set" && c2.params[0].type === "RestElement" && this.raiseRecoverable(c2.params[0].start, "Setter cannot use rest params"), this.finishNode(e3, "MethodDefinition");
11848
- }, oe.parseClassField = function(e3) {
11849
- return checkKeyName(e3, "constructor") ? this.raise(e3.key.start, "Classes can't have a field named 'constructor'") : e3.static && checkKeyName(e3, "prototype") && this.raise(e3.key.start, "Classes can't have a static field named 'prototype'"), this.eat(O.eq) ? (this.enterScope(576), e3.value = this.parseMaybeAssign(), this.exitScope()) : e3.value = null, this.semicolon(), this.finishNode(e3, "PropertyDefinition");
11850
- }, oe.parseClassStaticBlock = function(e3) {
11851
- e3.body = [];
11852
- var t3 = this.labels;
11853
- for (this.labels = [], this.enterScope(320);this.type !== O.braceR; ) {
11854
- var i2 = this.parseStatement(null);
11855
- e3.body.push(i2);
11856
- }
11857
- return this.next(), this.exitScope(), this.labels = t3, this.finishNode(e3, "StaticBlock");
11858
- }, oe.parseClassId = function(e3, t3) {
11859
- this.type === O.name ? (e3.id = this.parseIdent(), t3 && this.checkLValSimple(e3.id, 2, false)) : (t3 === true && this.unexpected(), e3.id = null);
11860
- }, oe.parseClassSuper = function(e3) {
11861
- e3.superClass = this.eat(O._extends) ? this.parseExprSubscripts(null, false) : null;
11862
- }, oe.enterClassBody = function() {
11863
- var e3 = { declared: Object.create(null), used: [] };
11864
- return this.privateNameStack.push(e3), e3.declared;
11865
- }, oe.exitClassBody = function() {
11866
- var e3 = this.privateNameStack.pop(), t3 = e3.declared, i2 = e3.used;
11867
- if (this.options.checkPrivateFields)
11868
- for (var n2 = this.privateNameStack.length, a2 = n2 === 0 ? null : this.privateNameStack[n2 - 1], c2 = 0;c2 < i2.length; ++c2) {
11869
- var l2 = i2[c2];
11870
- H(t3, l2.name) || (a2 ? a2.used.push(l2) : this.raiseRecoverable(l2.start, "Private field '#" + l2.name + "' must be declared in an enclosing class"));
11871
- }
11872
- }, oe.parseExportAllDeclaration = function(e3, t3) {
11873
- return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (e3.exported = this.parseModuleExportName(), this.checkExport(t3, e3.exported, this.lastTokStart)) : e3.exported = null), this.expectContextual("from"), this.type !== O.string && this.unexpected(), e3.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e3.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e3, "ExportAllDeclaration");
11874
- }, oe.parseExport = function(e3, t3) {
11875
- if (this.next(), this.eat(O.star))
11876
- return this.parseExportAllDeclaration(e3, t3);
11877
- if (this.eat(O._default))
11878
- return this.checkExport(t3, "default", this.lastTokStart), e3.declaration = this.parseExportDefaultDeclaration(), this.finishNode(e3, "ExportDefaultDeclaration");
11879
- if (this.shouldParseExportStatement())
11880
- e3.declaration = this.parseExportDeclaration(e3), e3.declaration.type === "VariableDeclaration" ? this.checkVariableExport(t3, e3.declaration.declarations) : this.checkExport(t3, e3.declaration.id, e3.declaration.id.start), e3.specifiers = [], e3.source = null, this.options.ecmaVersion >= 16 && (e3.attributes = []);
11881
- else {
11882
- if (e3.declaration = null, e3.specifiers = this.parseExportSpecifiers(t3), this.eatContextual("from"))
11883
- this.type !== O.string && this.unexpected(), e3.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e3.attributes = this.parseWithClause());
11884
- else {
11885
- for (var i2 = 0, n2 = e3.specifiers;i2 < n2.length; i2 += 1) {
11886
- var a2 = n2[i2];
11887
- this.checkUnreserved(a2.local), this.checkLocalExport(a2.local), a2.local.type === "Literal" && this.raise(a2.local.start, "A string literal cannot be used as an exported binding without `from`.");
11888
- }
11889
- e3.source = null, this.options.ecmaVersion >= 16 && (e3.attributes = []);
11890
- }
11891
- this.semicolon();
11892
- }
11893
- return this.finishNode(e3, "ExportNamedDeclaration");
11894
- }, oe.parseExportDeclaration = function(e3) {
11895
- return this.parseStatement(null);
11896
- }, oe.parseExportDefaultDeclaration = function() {
11897
- var e3;
11898
- if (this.type === O._function || (e3 = this.isAsyncFunction())) {
11899
- var t3 = this.startNode();
11900
- return this.next(), e3 && this.next(), this.parseFunction(t3, 4 | pe, false, e3);
11901
- }
11902
- if (this.type === O._class) {
11903
- var i2 = this.startNode();
11904
- return this.parseClass(i2, "nullableID");
11905
- }
11906
- var n2 = this.parseMaybeAssign();
11907
- return this.semicolon(), n2;
11908
- }, oe.checkExport = function(e3, t3, i2) {
11909
- e3 && (typeof t3 != "string" && (t3 = t3.type === "Identifier" ? t3.name : t3.value), H(e3, t3) && this.raiseRecoverable(i2, "Duplicate export '" + t3 + "'"), e3[t3] = true);
11910
- }, oe.checkPatternExport = function(e3, t3) {
11911
- var i2 = t3.type;
11912
- if (i2 === "Identifier")
11913
- this.checkExport(e3, t3, t3.start);
11914
- else if (i2 === "ObjectPattern")
11915
- for (var n2 = 0, a2 = t3.properties;n2 < a2.length; n2 += 1) {
11916
- var c2 = a2[n2];
11917
- this.checkPatternExport(e3, c2);
11918
- }
11919
- else if (i2 === "ArrayPattern")
11920
- for (var l2 = 0, y2 = t3.elements;l2 < y2.length; l2 += 1) {
11921
- var E2 = y2[l2];
11922
- E2 && this.checkPatternExport(e3, E2);
11923
- }
11924
- else
11925
- i2 === "Property" ? this.checkPatternExport(e3, t3.value) : i2 === "AssignmentPattern" ? this.checkPatternExport(e3, t3.left) : i2 === "RestElement" && this.checkPatternExport(e3, t3.argument);
11926
- }, oe.checkVariableExport = function(e3, t3) {
11927
- if (e3)
11928
- for (var i2 = 0, n2 = t3;i2 < n2.length; i2 += 1) {
11929
- var a2 = n2[i2];
11930
- this.checkPatternExport(e3, a2.id);
11931
- }
11932
- }, oe.shouldParseExportStatement = function() {
11933
- return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
11934
- }, oe.parseExportSpecifier = function(e3) {
11935
- var t3 = this.startNode();
11936
- return t3.local = this.parseModuleExportName(), t3.exported = this.eatContextual("as") ? this.parseModuleExportName() : t3.local, this.checkExport(e3, t3.exported, t3.exported.start), this.finishNode(t3, "ExportSpecifier");
11937
- }, oe.parseExportSpecifiers = function(e3) {
11938
- var t3 = [], i2 = true;
11939
- for (this.expect(O.braceL);!this.eat(O.braceR); ) {
11940
- if (i2)
11941
- i2 = false;
11942
- else if (this.expect(O.comma), this.afterTrailingComma(O.braceR))
11943
- break;
11944
- t3.push(this.parseExportSpecifier(e3));
11945
- }
11946
- return t3;
11947
- }, oe.parseImport = function(e3) {
11948
- return this.next(), this.type === O.string ? (e3.specifiers = le, e3.source = this.parseExprAtom()) : (e3.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e3.source = this.type === O.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (e3.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e3, "ImportDeclaration");
11949
- }, oe.parseImportSpecifier = function() {
11950
- var e3 = this.startNode();
11951
- return e3.imported = this.parseModuleExportName(), this.eatContextual("as") ? e3.local = this.parseIdent() : (this.checkUnreserved(e3.imported), e3.local = e3.imported), this.checkLValSimple(e3.local, 2), this.finishNode(e3, "ImportSpecifier");
11952
- }, oe.parseImportDefaultSpecifier = function() {
11953
- var e3 = this.startNode();
11954
- return e3.local = this.parseIdent(), this.checkLValSimple(e3.local, 2), this.finishNode(e3, "ImportDefaultSpecifier");
11955
- }, oe.parseImportNamespaceSpecifier = function() {
11956
- var e3 = this.startNode();
11957
- return this.next(), this.expectContextual("as"), e3.local = this.parseIdent(), this.checkLValSimple(e3.local, 2), this.finishNode(e3, "ImportNamespaceSpecifier");
11958
- }, oe.parseImportSpecifiers = function() {
11959
- var e3 = [], t3 = true;
11960
- if (this.type === O.name && (e3.push(this.parseImportDefaultSpecifier()), !this.eat(O.comma)))
11961
- return e3;
11962
- if (this.type === O.star)
11963
- return e3.push(this.parseImportNamespaceSpecifier()), e3;
11964
- for (this.expect(O.braceL);!this.eat(O.braceR); ) {
11965
- if (t3)
11966
- t3 = false;
11967
- else if (this.expect(O.comma), this.afterTrailingComma(O.braceR))
11968
- break;
11969
- e3.push(this.parseImportSpecifier());
11970
- }
11971
- return e3;
11972
- }, oe.parseWithClause = function() {
11973
- var e3 = [];
11974
- if (!this.eat(O._with))
11975
- return e3;
11976
- this.expect(O.braceL);
11977
- for (var t3 = {}, i2 = true;!this.eat(O.braceR); ) {
11978
- if (i2)
11979
- i2 = false;
11980
- else if (this.expect(O.comma), this.afterTrailingComma(O.braceR))
11981
- break;
11982
- var n2 = this.parseImportAttribute(), a2 = n2.key.type === "Identifier" ? n2.key.name : n2.key.value;
11983
- H(t3, a2) && this.raiseRecoverable(n2.key.start, "Duplicate attribute key '" + a2 + "'"), t3[a2] = true, e3.push(n2);
11984
- }
11985
- return e3;
11986
- }, oe.parseImportAttribute = function() {
11987
- var e3 = this.startNode();
11988
- return e3.key = this.type === O.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"), this.expect(O.colon), this.type !== O.string && this.unexpected(), e3.value = this.parseExprAtom(), this.finishNode(e3, "ImportAttribute");
11989
- }, oe.parseModuleExportName = function() {
11990
- if (this.options.ecmaVersion >= 13 && this.type === O.string) {
11991
- var e3 = this.parseLiteral(this.value);
11992
- return Z.test(e3.value) && this.raise(e3.start, "An export name cannot include a lone surrogate."), e3;
11993
- }
11994
- return this.parseIdent(true);
11995
- }, oe.adaptDirectivePrologue = function(e3) {
11996
- for (var t3 = 0;t3 < e3.length && this.isDirectiveCandidate(e3[t3]); ++t3)
11997
- e3[t3].directive = e3[t3].expression.raw.slice(1, -1);
11998
- }, oe.isDirectiveCandidate = function(e3) {
11999
- return this.options.ecmaVersion >= 5 && e3.type === "ExpressionStatement" && e3.expression.type === "Literal" && typeof e3.expression.value == "string" && (this.input[e3.start] === '"' || this.input[e3.start] === "'");
12000
- };
12001
- var de = acorn_Parser.prototype;
12002
- de.toAssignable = function(e3, t3, i2) {
12003
- if (this.options.ecmaVersion >= 6 && e3)
12004
- switch (e3.type) {
12005
- case "Identifier":
12006
- this.inAsync && e3.name === "await" && this.raise(e3.start, "Cannot use 'await' as identifier inside an async function");
12007
- break;
12008
- case "ObjectPattern":
12009
- case "ArrayPattern":
12010
- case "AssignmentPattern":
12011
- case "RestElement":
12012
- break;
12013
- case "ObjectExpression":
12014
- e3.type = "ObjectPattern", i2 && this.checkPatternErrors(i2, true);
12015
- for (var n2 = 0, a2 = e3.properties;n2 < a2.length; n2 += 1) {
12016
- var c2 = a2[n2];
12017
- this.toAssignable(c2, t3), c2.type !== "RestElement" || c2.argument.type !== "ArrayPattern" && c2.argument.type !== "ObjectPattern" || this.raise(c2.argument.start, "Unexpected token");
12018
- }
12019
- break;
12020
- case "Property":
12021
- e3.kind !== "init" && this.raise(e3.key.start, "Object pattern can't contain getter or setter"), this.toAssignable(e3.value, t3);
12022
- break;
12023
- case "ArrayExpression":
12024
- e3.type = "ArrayPattern", i2 && this.checkPatternErrors(i2, true), this.toAssignableList(e3.elements, t3);
12025
- break;
12026
- case "SpreadElement":
12027
- e3.type = "RestElement", this.toAssignable(e3.argument, t3), e3.argument.type === "AssignmentPattern" && this.raise(e3.argument.start, "Rest elements cannot have a default value");
12028
- break;
12029
- case "AssignmentExpression":
12030
- e3.operator !== "=" && this.raise(e3.left.end, "Only '=' operator can be used for specifying default value."), e3.type = "AssignmentPattern", delete e3.operator, this.toAssignable(e3.left, t3);
12031
- break;
12032
- case "ParenthesizedExpression":
12033
- this.toAssignable(e3.expression, t3, i2);
12034
- break;
12035
- case "ChainExpression":
12036
- this.raiseRecoverable(e3.start, "Optional chaining cannot appear in left-hand side");
12037
- break;
12038
- case "MemberExpression":
12039
- if (!t3)
12040
- break;
12041
- default:
12042
- this.raise(e3.start, "Assigning to rvalue");
12043
- }
12044
- else
12045
- i2 && this.checkPatternErrors(i2, true);
12046
- return e3;
12047
- }, de.toAssignableList = function(e3, t3) {
12048
- for (var i2 = e3.length, n2 = 0;n2 < i2; n2++) {
12049
- var a2 = e3[n2];
12050
- a2 && this.toAssignable(a2, t3);
12051
- }
12052
- if (i2) {
12053
- var c2 = e3[i2 - 1];
12054
- this.options.ecmaVersion === 6 && t3 && c2 && c2.type === "RestElement" && c2.argument.type !== "Identifier" && this.unexpected(c2.argument.start);
12055
- }
12056
- return e3;
12057
- }, de.parseSpread = function(e3) {
12058
- var t3 = this.startNode();
12059
- return this.next(), t3.argument = this.parseMaybeAssign(false, e3), this.finishNode(t3, "SpreadElement");
12060
- }, de.parseRestBinding = function() {
12061
- var e3 = this.startNode();
12062
- return this.next(), this.options.ecmaVersion === 6 && this.type !== O.name && this.unexpected(), e3.argument = this.parseBindingAtom(), this.finishNode(e3, "RestElement");
12063
- }, de.parseBindingAtom = function() {
12064
- if (this.options.ecmaVersion >= 6)
12065
- switch (this.type) {
12066
- case O.bracketL:
12067
- var e3 = this.startNode();
12068
- return this.next(), e3.elements = this.parseBindingList(O.bracketR, true, true), this.finishNode(e3, "ArrayPattern");
12069
- case O.braceL:
12070
- return this.parseObj(true);
12071
- }
12072
- return this.parseIdent();
12073
- }, de.parseBindingList = function(e3, t3, i2, n2) {
12074
- for (var a2 = [], c2 = true;!this.eat(e3); )
12075
- if (c2 ? c2 = false : this.expect(O.comma), t3 && this.type === O.comma)
12076
- a2.push(null);
12077
- else {
12078
- if (i2 && this.afterTrailingComma(e3))
12079
- break;
12080
- if (this.type === O.ellipsis) {
12081
- var l2 = this.parseRestBinding();
12082
- this.parseBindingListItem(l2), a2.push(l2), this.type === O.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.expect(e3);
12083
- break;
12084
- }
12085
- a2.push(this.parseAssignableListItem(n2));
12086
- }
12087
- return a2;
12088
- }, de.parseAssignableListItem = function(e3) {
12089
- var t3 = this.parseMaybeDefault(this.start, this.startLoc);
12090
- return this.parseBindingListItem(t3), t3;
12091
- }, de.parseBindingListItem = function(e3) {
12092
- return e3;
12093
- }, de.parseMaybeDefault = function(e3, t3, i2) {
12094
- if (i2 = i2 || this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(O.eq))
12095
- return i2;
12096
- var n2 = this.startNodeAt(e3, t3);
12097
- return n2.left = i2, n2.right = this.parseMaybeAssign(), this.finishNode(n2, "AssignmentPattern");
12098
- }, de.checkLValSimple = function(e3, t3, i2) {
12099
- t3 === undefined && (t3 = 0);
12100
- var n2 = t3 !== 0;
12101
- switch (e3.type) {
12102
- case "Identifier":
12103
- this.strict && this.reservedWordsStrictBind.test(e3.name) && this.raiseRecoverable(e3.start, (n2 ? "Binding " : "Assigning to ") + e3.name + " in strict mode"), n2 && (t3 === 2 && e3.name === "let" && this.raiseRecoverable(e3.start, "let is disallowed as a lexically bound name"), i2 && (H(i2, e3.name) && this.raiseRecoverable(e3.start, "Argument name clash"), i2[e3.name] = true), t3 !== 5 && this.declareName(e3.name, t3, e3.start));
12104
- break;
12105
- case "ChainExpression":
12106
- this.raiseRecoverable(e3.start, "Optional chaining cannot appear in left-hand side");
12107
- break;
12108
- case "MemberExpression":
12109
- n2 && this.raiseRecoverable(e3.start, "Binding member expression");
12110
- break;
12111
- case "ParenthesizedExpression":
12112
- return n2 && this.raiseRecoverable(e3.start, "Binding parenthesized expression"), this.checkLValSimple(e3.expression, t3, i2);
12113
- default:
12114
- this.raise(e3.start, (n2 ? "Binding" : "Assigning to") + " rvalue");
12115
- }
12116
- }, de.checkLValPattern = function(e3, t3, i2) {
12117
- switch (t3 === undefined && (t3 = 0), e3.type) {
12118
- case "ObjectPattern":
12119
- for (var n2 = 0, a2 = e3.properties;n2 < a2.length; n2 += 1) {
12120
- var c2 = a2[n2];
12121
- this.checkLValInnerPattern(c2, t3, i2);
12122
- }
12123
- break;
12124
- case "ArrayPattern":
12125
- for (var l2 = 0, y2 = e3.elements;l2 < y2.length; l2 += 1) {
12126
- var E2 = y2[l2];
12127
- E2 && this.checkLValInnerPattern(E2, t3, i2);
12128
- }
12129
- break;
12130
- default:
12131
- this.checkLValSimple(e3, t3, i2);
12132
- }
12133
- }, de.checkLValInnerPattern = function(e3, t3, i2) {
12134
- switch (t3 === undefined && (t3 = 0), e3.type) {
12135
- case "Property":
12136
- this.checkLValInnerPattern(e3.value, t3, i2);
12137
- break;
12138
- case "AssignmentPattern":
12139
- this.checkLValPattern(e3.left, t3, i2);
12140
- break;
12141
- case "RestElement":
12142
- this.checkLValPattern(e3.argument, t3, i2);
12143
- break;
12144
- default:
12145
- this.checkLValPattern(e3, t3, i2);
12146
- }
12147
- };
12148
- var acorn_TokContext = function(e3, t3, i2, n2, a2) {
12149
- this.token = e3, this.isExpr = !!t3, this.preserveSpace = !!i2, this.override = n2, this.generator = !!a2;
12150
- }, fe = { b_stat: new acorn_TokContext("{", false), b_expr: new acorn_TokContext("{", true), b_tmpl: new acorn_TokContext("${", false), p_stat: new acorn_TokContext("(", false), p_expr: new acorn_TokContext("(", true), q_tmpl: new acorn_TokContext("`", true, true, function(e3) {
12151
- return e3.tryReadTemplateToken();
12152
- }), f_stat: new acorn_TokContext("function", false), f_expr: new acorn_TokContext("function", true), f_expr_gen: new acorn_TokContext("function", true, false, null, true), f_gen: new acorn_TokContext("function", false, false, null, true) }, me = acorn_Parser.prototype;
12153
- me.initialContext = function() {
12154
- return [fe.b_stat];
12155
- }, me.curContext = function() {
12156
- return this.context[this.context.length - 1];
12157
- }, me.braceIsBlock = function(e3) {
12158
- var t3 = this.curContext();
12159
- return t3 === fe.f_expr || t3 === fe.f_stat || (e3 !== O.colon || t3 !== fe.b_stat && t3 !== fe.b_expr ? e3 === O._return || e3 === O.name && this.exprAllowed ? j.test(this.input.slice(this.lastTokEnd, this.start)) : e3 === O._else || e3 === O.semi || e3 === O.eof || e3 === O.parenR || e3 === O.arrow || (e3 === O.braceL ? t3 === fe.b_stat : e3 !== O._var && e3 !== O._const && e3 !== O.name && !this.exprAllowed) : !t3.isExpr);
12160
- }, me.inGeneratorContext = function() {
12161
- for (var e3 = this.context.length - 1;e3 >= 1; e3--) {
12162
- var t3 = this.context[e3];
12163
- if (t3.token === "function")
12164
- return t3.generator;
12165
- }
12166
- return false;
12167
- }, me.updateContext = function(e3) {
12168
- var t3, i2 = this.type;
12169
- i2.keyword && e3 === O.dot ? this.exprAllowed = false : (t3 = i2.updateContext) ? t3.call(this, e3) : this.exprAllowed = i2.beforeExpr;
12170
- }, me.overrideContext = function(e3) {
12171
- this.curContext() !== e3 && (this.context[this.context.length - 1] = e3);
12172
- }, O.parenR.updateContext = O.braceR.updateContext = function() {
12173
- if (this.context.length !== 1) {
12174
- var e3 = this.context.pop();
12175
- e3 === fe.b_stat && this.curContext().token === "function" && (e3 = this.context.pop()), this.exprAllowed = !e3.isExpr;
12176
- } else
12177
- this.exprAllowed = true;
12178
- }, O.braceL.updateContext = function(e3) {
12179
- this.context.push(this.braceIsBlock(e3) ? fe.b_stat : fe.b_expr), this.exprAllowed = true;
12180
- }, O.dollarBraceL.updateContext = function() {
12181
- this.context.push(fe.b_tmpl), this.exprAllowed = true;
12182
- }, O.parenL.updateContext = function(e3) {
12183
- var t3 = e3 === O._if || e3 === O._for || e3 === O._with || e3 === O._while;
12184
- this.context.push(t3 ? fe.p_stat : fe.p_expr), this.exprAllowed = true;
12185
- }, O.incDec.updateContext = function() {}, O._function.updateContext = O._class.updateContext = function(e3) {
12186
- !e3.beforeExpr || e3 === O._else || e3 === O.semi && this.curContext() !== fe.p_stat || e3 === O._return && j.test(this.input.slice(this.lastTokEnd, this.start)) || (e3 === O.colon || e3 === O.braceL) && this.curContext() === fe.b_stat ? this.context.push(fe.f_stat) : this.context.push(fe.f_expr), this.exprAllowed = false;
12187
- }, O.colon.updateContext = function() {
12188
- this.curContext().token === "function" && this.context.pop(), this.exprAllowed = true;
12189
- }, O.backQuote.updateContext = function() {
12190
- this.curContext() === fe.q_tmpl ? this.context.pop() : this.context.push(fe.q_tmpl), this.exprAllowed = false;
12191
- }, O.star.updateContext = function(e3) {
12192
- if (e3 === O._function) {
12193
- var t3 = this.context.length - 1;
12194
- this.context[t3] === fe.f_expr ? this.context[t3] = fe.f_expr_gen : this.context[t3] = fe.f_gen;
12195
- }
12196
- this.exprAllowed = true;
12197
- }, O.name.updateContext = function(e3) {
12198
- var t3 = false;
12199
- this.options.ecmaVersion >= 6 && e3 !== O.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (t3 = true), this.exprAllowed = t3;
12200
- };
12201
- var ge = acorn_Parser.prototype;
12202
- function isLocalVariableAccess(e3) {
12203
- return e3.type === "Identifier" || e3.type === "ParenthesizedExpression" && isLocalVariableAccess(e3.expression);
12204
- }
12205
- function isPrivateFieldAccess(e3) {
12206
- return e3.type === "MemberExpression" && e3.property.type === "PrivateIdentifier" || e3.type === "ChainExpression" && isPrivateFieldAccess(e3.expression) || e3.type === "ParenthesizedExpression" && isPrivateFieldAccess(e3.expression);
12207
- }
12208
- ge.checkPropClash = function(e3, t3, i2) {
12209
- if (!(this.options.ecmaVersion >= 9 && e3.type === "SpreadElement" || this.options.ecmaVersion >= 6 && (e3.computed || e3.method || e3.shorthand))) {
12210
- var n2, a2 = e3.key;
12211
- switch (a2.type) {
12212
- case "Identifier":
12213
- n2 = a2.name;
12214
- break;
12215
- case "Literal":
12216
- n2 = String(a2.value);
12217
- break;
12218
- default:
12219
- return;
12220
- }
12221
- var c2 = e3.kind;
12222
- if (this.options.ecmaVersion >= 6)
12223
- n2 === "__proto__" && c2 === "init" && (t3.proto && (i2 ? i2.doubleProto < 0 && (i2.doubleProto = a2.start) : this.raiseRecoverable(a2.start, "Redefinition of __proto__ property")), t3.proto = true);
12224
- else {
12225
- var l2 = t3[n2 = "$" + n2];
12226
- if (l2)
12227
- (c2 === "init" ? this.strict && l2.init || l2.get || l2.set : l2.init || l2[c2]) && this.raiseRecoverable(a2.start, "Redefinition of property");
12228
- else
12229
- l2 = t3[n2] = { init: false, get: false, set: false };
12230
- l2[c2] = true;
12231
- }
12232
- }
12233
- }, ge.parseExpression = function(e3, t3) {
12234
- var i2 = this.start, n2 = this.startLoc, a2 = this.parseMaybeAssign(e3, t3);
12235
- if (this.type === O.comma) {
12236
- var c2 = this.startNodeAt(i2, n2);
12237
- for (c2.expressions = [a2];this.eat(O.comma); )
12238
- c2.expressions.push(this.parseMaybeAssign(e3, t3));
12239
- return this.finishNode(c2, "SequenceExpression");
12240
- }
12241
- return a2;
12242
- }, ge.parseMaybeAssign = function(e3, t3, i2) {
12243
- if (this.isContextual("yield")) {
12244
- if (this.inGenerator)
12245
- return this.parseYield(e3);
12246
- this.exprAllowed = false;
12247
- }
12248
- var n2 = false, a2 = -1, c2 = -1, l2 = -1;
12249
- t3 ? (a2 = t3.parenthesizedAssign, c2 = t3.trailingComma, l2 = t3.doubleProto, t3.parenthesizedAssign = t3.trailingComma = -1) : (t3 = new acorn_DestructuringErrors, n2 = true);
12250
- var y2 = this.start, E2 = this.startLoc;
12251
- this.type !== O.parenL && this.type !== O.name || (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e3 === "await");
12252
- var w2 = this.parseMaybeConditional(e3, t3);
12253
- if (i2 && (w2 = i2.call(this, w2, y2, E2)), this.type.isAssign) {
12254
- var C3 = this.startNodeAt(y2, E2);
12255
- return C3.operator = this.value, this.type === O.eq && (w2 = this.toAssignable(w2, false, t3)), n2 || (t3.parenthesizedAssign = t3.trailingComma = t3.doubleProto = -1), t3.shorthandAssign >= w2.start && (t3.shorthandAssign = -1), this.type === O.eq ? this.checkLValPattern(w2) : this.checkLValSimple(w2), C3.left = w2, this.next(), C3.right = this.parseMaybeAssign(e3), l2 > -1 && (t3.doubleProto = l2), this.finishNode(C3, "AssignmentExpression");
12256
- }
12257
- return n2 && this.checkExpressionErrors(t3, true), a2 > -1 && (t3.parenthesizedAssign = a2), c2 > -1 && (t3.trailingComma = c2), w2;
12258
- }, ge.parseMaybeConditional = function(e3, t3) {
12259
- var i2 = this.start, n2 = this.startLoc, a2 = this.parseExprOps(e3, t3);
12260
- if (this.checkExpressionErrors(t3))
12261
- return a2;
12262
- if (this.eat(O.question)) {
12263
- var c2 = this.startNodeAt(i2, n2);
12264
- return c2.test = a2, c2.consequent = this.parseMaybeAssign(), this.expect(O.colon), c2.alternate = this.parseMaybeAssign(e3), this.finishNode(c2, "ConditionalExpression");
12265
- }
12266
- return a2;
12267
- }, ge.parseExprOps = function(e3, t3) {
12268
- var i2 = this.start, n2 = this.startLoc, a2 = this.parseMaybeUnary(t3, false, false, e3);
12269
- return this.checkExpressionErrors(t3) || a2.start === i2 && a2.type === "ArrowFunctionExpression" ? a2 : this.parseExprOp(a2, i2, n2, -1, e3);
12270
- }, ge.parseExprOp = function(e3, t3, i2, n2, a2) {
12271
- var c2 = this.type.binop;
12272
- if (c2 != null && (!a2 || this.type !== O._in) && c2 > n2) {
12273
- var l2 = this.type === O.logicalOR || this.type === O.logicalAND, y2 = this.type === O.coalesce;
12274
- y2 && (c2 = O.logicalAND.binop);
12275
- var E2 = this.value;
12276
- this.next();
12277
- var w2 = this.start, C3 = this.startLoc, S2 = this.parseExprOp(this.parseMaybeUnary(null, false, false, a2), w2, C3, c2, a2), I2 = this.buildBinary(t3, i2, e3, S2, E2, l2 || y2);
12278
- return (l2 && this.type === O.coalesce || y2 && (this.type === O.logicalOR || this.type === O.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(I2, t3, i2, n2, a2);
12279
- }
12280
- return e3;
12281
- }, ge.buildBinary = function(e3, t3, i2, n2, a2, c2) {
12282
- n2.type === "PrivateIdentifier" && this.raise(n2.start, "Private identifier can only be left side of binary expression");
12283
- var l2 = this.startNodeAt(e3, t3);
12284
- return l2.left = i2, l2.operator = a2, l2.right = n2, this.finishNode(l2, c2 ? "LogicalExpression" : "BinaryExpression");
12285
- }, ge.parseMaybeUnary = function(e3, t3, i2, n2) {
12286
- var a2, c2 = this.start, l2 = this.startLoc;
12287
- if (this.isContextual("await") && this.canAwait)
12288
- a2 = this.parseAwait(n2), t3 = true;
12289
- else if (this.type.prefix) {
12290
- var y2 = this.startNode(), E2 = this.type === O.incDec;
12291
- y2.operator = this.value, y2.prefix = true, this.next(), y2.argument = this.parseMaybeUnary(null, true, E2, n2), this.checkExpressionErrors(e3, true), E2 ? this.checkLValSimple(y2.argument) : this.strict && y2.operator === "delete" && isLocalVariableAccess(y2.argument) ? this.raiseRecoverable(y2.start, "Deleting local variable in strict mode") : y2.operator === "delete" && isPrivateFieldAccess(y2.argument) ? this.raiseRecoverable(y2.start, "Private fields can not be deleted") : t3 = true, a2 = this.finishNode(y2, E2 ? "UpdateExpression" : "UnaryExpression");
12292
- } else if (t3 || this.type !== O.privateId) {
12293
- if (a2 = this.parseExprSubscripts(e3, n2), this.checkExpressionErrors(e3))
12294
- return a2;
12295
- for (;this.type.postfix && !this.canInsertSemicolon(); ) {
12296
- var w2 = this.startNodeAt(c2, l2);
12297
- w2.operator = this.value, w2.prefix = false, w2.argument = a2, this.checkLValSimple(a2), this.next(), a2 = this.finishNode(w2, "UpdateExpression");
12298
- }
12299
- } else
12300
- (n2 || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), a2 = this.parsePrivateIdent(), this.type !== O._in && this.unexpected();
12301
- return i2 || !this.eat(O.starstar) ? a2 : t3 ? void this.unexpected(this.lastTokStart) : this.buildBinary(c2, l2, a2, this.parseMaybeUnary(null, false, false, n2), "**", false);
12302
- }, ge.parseExprSubscripts = function(e3, t3) {
12303
- var i2 = this.start, n2 = this.startLoc, a2 = this.parseExprAtom(e3, t3);
12304
- if (a2.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")")
12305
- return a2;
12306
- var c2 = this.parseSubscripts(a2, i2, n2, false, t3);
12307
- return e3 && c2.type === "MemberExpression" && (e3.parenthesizedAssign >= c2.start && (e3.parenthesizedAssign = -1), e3.parenthesizedBind >= c2.start && (e3.parenthesizedBind = -1), e3.trailingComma >= c2.start && (e3.trailingComma = -1)), c2;
12308
- }, ge.parseSubscripts = function(e3, t3, i2, n2, a2) {
12309
- for (var c2 = this.options.ecmaVersion >= 8 && e3.type === "Identifier" && e3.name === "async" && this.lastTokEnd === e3.end && !this.canInsertSemicolon() && e3.end - e3.start === 5 && this.potentialArrowAt === e3.start, l2 = false;; ) {
12310
- var y2 = this.parseSubscript(e3, t3, i2, n2, c2, l2, a2);
12311
- if (y2.optional && (l2 = true), y2 === e3 || y2.type === "ArrowFunctionExpression") {
12312
- if (l2) {
12313
- var E2 = this.startNodeAt(t3, i2);
12314
- E2.expression = y2, y2 = this.finishNode(E2, "ChainExpression");
12315
- }
12316
- return y2;
12317
- }
12318
- e3 = y2;
12319
- }
12320
- }, ge.shouldParseAsyncArrow = function() {
12321
- return !this.canInsertSemicolon() && this.eat(O.arrow);
12322
- }, ge.parseSubscriptAsyncArrow = function(e3, t3, i2, n2) {
12323
- return this.parseArrowExpression(this.startNodeAt(e3, t3), i2, true, n2);
12324
- }, ge.parseSubscript = function(e3, t3, i2, n2, a2, c2, l2) {
12325
- var y2 = this.options.ecmaVersion >= 11, E2 = y2 && this.eat(O.questionDot);
12326
- n2 && E2 && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
12327
- var w2 = this.eat(O.bracketL);
12328
- if (w2 || E2 && this.type !== O.parenL && this.type !== O.backQuote || this.eat(O.dot)) {
12329
- var C3 = this.startNodeAt(t3, i2);
12330
- C3.object = e3, w2 ? (C3.property = this.parseExpression(), this.expect(O.bracketR)) : this.type === O.privateId && e3.type !== "Super" ? C3.property = this.parsePrivateIdent() : C3.property = this.parseIdent(this.options.allowReserved !== "never"), C3.computed = !!w2, y2 && (C3.optional = E2), e3 = this.finishNode(C3, "MemberExpression");
12331
- } else if (!n2 && this.eat(O.parenL)) {
12332
- var S2 = new acorn_DestructuringErrors, I2 = this.yieldPos, N2 = this.awaitPos, j2 = this.awaitIdentPos;
12333
- this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
12334
- var F2 = this.parseExprList(O.parenR, this.options.ecmaVersion >= 8, false, S2);
12335
- if (a2 && !E2 && this.shouldParseAsyncArrow())
12336
- return this.checkPatternErrors(S2, false), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = I2, this.awaitPos = N2, this.awaitIdentPos = j2, this.parseSubscriptAsyncArrow(t3, i2, F2, l2);
12337
- this.checkExpressionErrors(S2, true), this.yieldPos = I2 || this.yieldPos, this.awaitPos = N2 || this.awaitPos, this.awaitIdentPos = j2 || this.awaitIdentPos;
12338
- var B2 = this.startNodeAt(t3, i2);
12339
- B2.callee = e3, B2.arguments = F2, y2 && (B2.optional = E2), e3 = this.finishNode(B2, "CallExpression");
12340
- } else if (this.type === O.backQuote) {
12341
- (E2 || c2) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
12342
- var $2 = this.startNodeAt(t3, i2);
12343
- $2.tag = e3, $2.quasi = this.parseTemplate({ isTagged: true }), e3 = this.finishNode($2, "TaggedTemplateExpression");
12344
- }
12345
- return e3;
12346
- }, ge.parseExprAtom = function(e3, t3, i2) {
12347
- this.type === O.slash && this.readRegexp();
12348
- var n2, a2 = this.potentialArrowAt === this.start;
12349
- switch (this.type) {
12350
- case O._super:
12351
- return this.allowSuper || this.raise(this.start, "'super' keyword outside a method"), n2 = this.startNode(), this.next(), this.type !== O.parenL || this.allowDirectSuper || this.raise(n2.start, "super() call outside constructor of a subclass"), this.type !== O.dot && this.type !== O.bracketL && this.type !== O.parenL && this.unexpected(), this.finishNode(n2, "Super");
12352
- case O._this:
12353
- return n2 = this.startNode(), this.next(), this.finishNode(n2, "ThisExpression");
12354
- case O.name:
12355
- var c2 = this.start, l2 = this.startLoc, y2 = this.containsEsc, E2 = this.parseIdent(false);
12356
- if (this.options.ecmaVersion >= 8 && !y2 && E2.name === "async" && !this.canInsertSemicolon() && this.eat(O._function))
12357
- return this.overrideContext(fe.f_expr), this.parseFunction(this.startNodeAt(c2, l2), 0, false, true, t3);
12358
- if (a2 && !this.canInsertSemicolon()) {
12359
- if (this.eat(O.arrow))
12360
- return this.parseArrowExpression(this.startNodeAt(c2, l2), [E2], false, t3);
12361
- if (this.options.ecmaVersion >= 8 && E2.name === "async" && this.type === O.name && !y2 && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc))
12362
- return E2 = this.parseIdent(false), !this.canInsertSemicolon() && this.eat(O.arrow) || this.unexpected(), this.parseArrowExpression(this.startNodeAt(c2, l2), [E2], true, t3);
12363
- }
12364
- return E2;
12365
- case O.regexp:
12366
- var w2 = this.value;
12367
- return (n2 = this.parseLiteral(w2.value)).regex = { pattern: w2.pattern, flags: w2.flags }, n2;
12368
- case O.num:
12369
- case O.string:
12370
- return this.parseLiteral(this.value);
12371
- case O._null:
12372
- case O._true:
12373
- case O._false:
12374
- return (n2 = this.startNode()).value = this.type === O._null ? null : this.type === O._true, n2.raw = this.type.keyword, this.next(), this.finishNode(n2, "Literal");
12375
- case O.parenL:
12376
- var C3 = this.start, S2 = this.parseParenAndDistinguishExpression(a2, t3);
12377
- return e3 && (e3.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(S2) && (e3.parenthesizedAssign = C3), e3.parenthesizedBind < 0 && (e3.parenthesizedBind = C3)), S2;
12378
- case O.bracketL:
12379
- return n2 = this.startNode(), this.next(), n2.elements = this.parseExprList(O.bracketR, true, true, e3), this.finishNode(n2, "ArrayExpression");
12380
- case O.braceL:
12381
- return this.overrideContext(fe.b_expr), this.parseObj(false, e3);
12382
- case O._function:
12383
- return n2 = this.startNode(), this.next(), this.parseFunction(n2, 0);
12384
- case O._class:
12385
- return this.parseClass(this.startNode(), false);
12386
- case O._new:
12387
- return this.parseNew();
12388
- case O.backQuote:
12389
- return this.parseTemplate();
12390
- case O._import:
12391
- return this.options.ecmaVersion >= 11 ? this.parseExprImport(i2) : this.unexpected();
12392
- default:
12393
- return this.parseExprAtomDefault();
12394
- }
12395
- }, ge.parseExprAtomDefault = function() {
12396
- this.unexpected();
12397
- }, ge.parseExprImport = function(e3) {
12398
- var t3 = this.startNode();
12399
- if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type === O.parenL && !e3)
12400
- return this.parseDynamicImport(t3);
12401
- if (this.type === O.dot) {
12402
- var i2 = this.startNodeAt(t3.start, t3.loc && t3.loc.start);
12403
- return i2.name = "import", t3.meta = this.finishNode(i2, "Identifier"), this.parseImportMeta(t3);
12404
- }
12405
- this.unexpected();
12406
- }, ge.parseDynamicImport = function(e3) {
12407
- if (this.next(), e3.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16)
12408
- this.eat(O.parenR) ? e3.options = null : (this.expect(O.comma), this.afterTrailingComma(O.parenR) ? e3.options = null : (e3.options = this.parseMaybeAssign(), this.eat(O.parenR) || (this.expect(O.comma), this.afterTrailingComma(O.parenR) || this.unexpected())));
12409
- else if (!this.eat(O.parenR)) {
12410
- var t3 = this.start;
12411
- this.eat(O.comma) && this.eat(O.parenR) ? this.raiseRecoverable(t3, "Trailing comma is not allowed in import()") : this.unexpected(t3);
12412
- }
12413
- return this.finishNode(e3, "ImportExpression");
12414
- }, ge.parseImportMeta = function(e3) {
12415
- this.next();
12416
- var t3 = this.containsEsc;
12417
- return e3.property = this.parseIdent(true), e3.property.name !== "meta" && this.raiseRecoverable(e3.property.start, "The only valid meta property for import is 'import.meta'"), t3 && this.raiseRecoverable(e3.start, "'import.meta' must not contain escaped characters"), this.options.sourceType === "module" || this.options.allowImportExportEverywhere || this.raiseRecoverable(e3.start, "Cannot use 'import.meta' outside a module"), this.finishNode(e3, "MetaProperty");
12418
- }, ge.parseLiteral = function(e3) {
12419
- var t3 = this.startNode();
12420
- return t3.value = e3, t3.raw = this.input.slice(this.start, this.end), t3.raw.charCodeAt(t3.raw.length - 1) === 110 && (t3.bigint = t3.value != null ? t3.value.toString() : t3.raw.slice(0, -1).replace(/_/g, "")), this.next(), this.finishNode(t3, "Literal");
12421
- }, ge.parseParenExpression = function() {
12422
- this.expect(O.parenL);
12423
- var e3 = this.parseExpression();
12424
- return this.expect(O.parenR), e3;
12425
- }, ge.shouldParseArrow = function(e3) {
12426
- return !this.canInsertSemicolon();
12427
- }, ge.parseParenAndDistinguishExpression = function(e3, t3) {
12428
- var i2, n2 = this.start, a2 = this.startLoc, c2 = this.options.ecmaVersion >= 8;
12429
- if (this.options.ecmaVersion >= 6) {
12430
- this.next();
12431
- var l2, y2 = this.start, E2 = this.startLoc, w2 = [], C3 = true, S2 = false, I2 = new acorn_DestructuringErrors, N2 = this.yieldPos, j2 = this.awaitPos;
12432
- for (this.yieldPos = 0, this.awaitPos = 0;this.type !== O.parenR; ) {
12433
- if (C3 ? C3 = false : this.expect(O.comma), c2 && this.afterTrailingComma(O.parenR, true)) {
12434
- S2 = true;
12435
- break;
12436
- }
12437
- if (this.type === O.ellipsis) {
12438
- l2 = this.start, w2.push(this.parseParenItem(this.parseRestBinding())), this.type === O.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element");
12439
- break;
12440
- }
12441
- w2.push(this.parseMaybeAssign(false, I2, this.parseParenItem));
12442
- }
12443
- var F2 = this.lastTokEnd, B2 = this.lastTokEndLoc;
12444
- if (this.expect(O.parenR), e3 && this.shouldParseArrow(w2) && this.eat(O.arrow))
12445
- return this.checkPatternErrors(I2, false), this.checkYieldAwaitInDefaultParams(), this.yieldPos = N2, this.awaitPos = j2, this.parseParenArrowList(n2, a2, w2, t3);
12446
- w2.length && !S2 || this.unexpected(this.lastTokStart), l2 && this.unexpected(l2), this.checkExpressionErrors(I2, true), this.yieldPos = N2 || this.yieldPos, this.awaitPos = j2 || this.awaitPos, w2.length > 1 ? ((i2 = this.startNodeAt(y2, E2)).expressions = w2, this.finishNodeAt(i2, "SequenceExpression", F2, B2)) : i2 = w2[0];
12447
- } else
12448
- i2 = this.parseParenExpression();
12449
- if (this.options.preserveParens) {
12450
- var $2 = this.startNodeAt(n2, a2);
12451
- return $2.expression = i2, this.finishNode($2, "ParenthesizedExpression");
12452
- }
12453
- return i2;
12454
- }, ge.parseParenItem = function(e3) {
12455
- return e3;
12456
- }, ge.parseParenArrowList = function(e3, t3, i2, n2) {
12457
- return this.parseArrowExpression(this.startNodeAt(e3, t3), i2, false, n2);
12458
- };
12459
- var xe = [];
12460
- ge.parseNew = function() {
12461
- this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
12462
- var e3 = this.startNode();
12463
- if (this.next(), this.options.ecmaVersion >= 6 && this.type === O.dot) {
12464
- var t3 = this.startNodeAt(e3.start, e3.loc && e3.loc.start);
12465
- t3.name = "new", e3.meta = this.finishNode(t3, "Identifier"), this.next();
12466
- var i2 = this.containsEsc;
12467
- return e3.property = this.parseIdent(true), e3.property.name !== "target" && this.raiseRecoverable(e3.property.start, "The only valid meta property for new is 'new.target'"), i2 && this.raiseRecoverable(e3.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(e3.start, "'new.target' can only be used in functions and class static block"), this.finishNode(e3, "MetaProperty");
12468
- }
12469
- var n2 = this.start, a2 = this.startLoc;
12470
- return e3.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), n2, a2, true, false), this.eat(O.parenL) ? e3.arguments = this.parseExprList(O.parenR, this.options.ecmaVersion >= 8, false) : e3.arguments = xe, this.finishNode(e3, "NewExpression");
12471
- }, ge.parseTemplateElement = function(e3) {
12472
- var t3 = e3.isTagged, i2 = this.startNode();
12473
- return this.type === O.invalidTemplate ? (t3 || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), i2.value = { raw: this.value.replace(/\r\n?/g, `
12474
- `), cooked: null }) : i2.value = { raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, `
12475
- `), cooked: this.value }, this.next(), i2.tail = this.type === O.backQuote, this.finishNode(i2, "TemplateElement");
12476
- }, ge.parseTemplate = function(e3) {
12477
- e3 === undefined && (e3 = {});
12478
- var t3 = e3.isTagged;
12479
- t3 === undefined && (t3 = false);
12480
- var i2 = this.startNode();
12481
- this.next(), i2.expressions = [];
12482
- var n2 = this.parseTemplateElement({ isTagged: t3 });
12483
- for (i2.quasis = [n2];!n2.tail; )
12484
- this.type === O.eof && this.raise(this.pos, "Unterminated template literal"), this.expect(O.dollarBraceL), i2.expressions.push(this.parseExpression()), this.expect(O.braceR), i2.quasis.push(n2 = this.parseTemplateElement({ isTagged: t3 }));
12485
- return this.next(), this.finishNode(i2, "TemplateLiteral");
12486
- }, ge.isAsyncProp = function(e3) {
12487
- return !e3.computed && e3.key.type === "Identifier" && e3.key.name === "async" && (this.type === O.name || this.type === O.num || this.type === O.string || this.type === O.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === O.star) && !j.test(this.input.slice(this.lastTokEnd, this.start));
12488
- }, ge.parseObj = function(e3, t3) {
12489
- var i2 = this.startNode(), n2 = true, a2 = {};
12490
- for (i2.properties = [], this.next();!this.eat(O.braceR); ) {
12491
- if (n2)
12492
- n2 = false;
12493
- else if (this.expect(O.comma), this.options.ecmaVersion >= 5 && this.afterTrailingComma(O.braceR))
12494
- break;
12495
- var c2 = this.parseProperty(e3, t3);
12496
- e3 || this.checkPropClash(c2, a2, t3), i2.properties.push(c2);
12497
- }
12498
- return this.finishNode(i2, e3 ? "ObjectPattern" : "ObjectExpression");
12499
- }, ge.parseProperty = function(e3, t3) {
12500
- var i2, n2, a2, c2, l2 = this.startNode();
12501
- if (this.options.ecmaVersion >= 9 && this.eat(O.ellipsis))
12502
- return e3 ? (l2.argument = this.parseIdent(false), this.type === O.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.finishNode(l2, "RestElement")) : (l2.argument = this.parseMaybeAssign(false, t3), this.type === O.comma && t3 && t3.trailingComma < 0 && (t3.trailingComma = this.start), this.finishNode(l2, "SpreadElement"));
12503
- this.options.ecmaVersion >= 6 && (l2.method = false, l2.shorthand = false, (e3 || t3) && (a2 = this.start, c2 = this.startLoc), e3 || (i2 = this.eat(O.star)));
12504
- var y2 = this.containsEsc;
12505
- return this.parsePropertyName(l2), !e3 && !y2 && this.options.ecmaVersion >= 8 && !i2 && this.isAsyncProp(l2) ? (n2 = true, i2 = this.options.ecmaVersion >= 9 && this.eat(O.star), this.parsePropertyName(l2)) : n2 = false, this.parsePropertyValue(l2, e3, i2, n2, a2, c2, t3, y2), this.finishNode(l2, "Property");
12506
- }, ge.parseGetterSetter = function(e3) {
12507
- var t3 = e3.key.name;
12508
- this.parsePropertyName(e3), e3.value = this.parseMethod(false), e3.kind = t3;
12509
- var i2 = e3.kind === "get" ? 0 : 1;
12510
- if (e3.value.params.length !== i2) {
12511
- var n2 = e3.value.start;
12512
- e3.kind === "get" ? this.raiseRecoverable(n2, "getter should have no params") : this.raiseRecoverable(n2, "setter should have exactly one param");
12513
- } else
12514
- e3.kind === "set" && e3.value.params[0].type === "RestElement" && this.raiseRecoverable(e3.value.params[0].start, "Setter cannot use rest params");
12515
- }, ge.parsePropertyValue = function(e3, t3, i2, n2, a2, c2, l2, y2) {
12516
- (i2 || n2) && this.type === O.colon && this.unexpected(), this.eat(O.colon) ? (e3.value = t3 ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, l2), e3.kind = "init") : this.options.ecmaVersion >= 6 && this.type === O.parenL ? (t3 && this.unexpected(), e3.method = true, e3.value = this.parseMethod(i2, n2), e3.kind = "init") : t3 || y2 || !(this.options.ecmaVersion >= 5) || e3.computed || e3.key.type !== "Identifier" || e3.key.name !== "get" && e3.key.name !== "set" || this.type === O.comma || this.type === O.braceR || this.type === O.eq ? this.options.ecmaVersion >= 6 && !e3.computed && e3.key.type === "Identifier" ? ((i2 || n2) && this.unexpected(), this.checkUnreserved(e3.key), e3.key.name !== "await" || this.awaitIdentPos || (this.awaitIdentPos = a2), t3 ? e3.value = this.parseMaybeDefault(a2, c2, this.copyNode(e3.key)) : this.type === O.eq && l2 ? (l2.shorthandAssign < 0 && (l2.shorthandAssign = this.start), e3.value = this.parseMaybeDefault(a2, c2, this.copyNode(e3.key))) : e3.value = this.copyNode(e3.key), e3.kind = "init", e3.shorthand = true) : this.unexpected() : ((i2 || n2) && this.unexpected(), this.parseGetterSetter(e3));
12517
- }, ge.parsePropertyName = function(e3) {
12518
- if (this.options.ecmaVersion >= 6) {
12519
- if (this.eat(O.bracketL))
12520
- return e3.computed = true, e3.key = this.parseMaybeAssign(), this.expect(O.bracketR), e3.key;
12521
- e3.computed = false;
12522
- }
12523
- return e3.key = this.type === O.num || this.type === O.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
12524
- }, ge.initFunction = function(e3) {
12525
- e3.id = null, this.options.ecmaVersion >= 6 && (e3.generator = e3.expression = false), this.options.ecmaVersion >= 8 && (e3.async = false);
12526
- }, ge.parseMethod = function(e3, t3, i2) {
12527
- var n2 = this.startNode(), a2 = this.yieldPos, c2 = this.awaitPos, l2 = this.awaitIdentPos;
12528
- return this.initFunction(n2), this.options.ecmaVersion >= 6 && (n2.generator = e3), this.options.ecmaVersion >= 8 && (n2.async = !!t3), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 | functionFlags(t3, n2.generator) | (i2 ? 128 : 0)), this.expect(O.parenL), n2.params = this.parseBindingList(O.parenR, false, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(n2, false, true, false), this.yieldPos = a2, this.awaitPos = c2, this.awaitIdentPos = l2, this.finishNode(n2, "FunctionExpression");
12529
- }, ge.parseArrowExpression = function(e3, t3, i2, n2) {
12530
- var a2 = this.yieldPos, c2 = this.awaitPos, l2 = this.awaitIdentPos;
12531
- return this.enterScope(16 | functionFlags(i2, false)), this.initFunction(e3), this.options.ecmaVersion >= 8 && (e3.async = !!i2), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, e3.params = this.toAssignableList(t3, true), this.parseFunctionBody(e3, true, false, n2), this.yieldPos = a2, this.awaitPos = c2, this.awaitIdentPos = l2, this.finishNode(e3, "ArrowFunctionExpression");
12532
- }, ge.parseFunctionBody = function(e3, t3, i2, n2) {
12533
- var a2 = t3 && this.type !== O.braceL, c2 = this.strict, l2 = false;
12534
- if (a2)
12535
- e3.body = this.parseMaybeAssign(n2), e3.expression = true, this.checkParams(e3, false);
12536
- else {
12537
- var y2 = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e3.params);
12538
- c2 && !y2 || (l2 = this.strictDirective(this.end)) && y2 && this.raiseRecoverable(e3.start, "Illegal 'use strict' directive in function with non-simple parameter list");
12539
- var E2 = this.labels;
12540
- this.labels = [], l2 && (this.strict = true), this.checkParams(e3, !c2 && !l2 && !t3 && !i2 && this.isSimpleParamList(e3.params)), this.strict && e3.id && this.checkLValSimple(e3.id, 5), e3.body = this.parseBlock(false, undefined, l2 && !c2), e3.expression = false, this.adaptDirectivePrologue(e3.body.body), this.labels = E2;
12541
- }
12542
- this.exitScope();
12543
- }, ge.isSimpleParamList = function(e3) {
12544
- for (var t3 = 0, i2 = e3;t3 < i2.length; t3 += 1) {
12545
- if (i2[t3].type !== "Identifier")
12546
- return false;
12547
- }
12548
- return true;
12549
- }, ge.checkParams = function(e3, t3) {
12550
- for (var i2 = Object.create(null), n2 = 0, a2 = e3.params;n2 < a2.length; n2 += 1) {
12551
- var c2 = a2[n2];
12552
- this.checkLValInnerPattern(c2, 1, t3 ? null : i2);
12553
- }
12554
- }, ge.parseExprList = function(e3, t3, i2, n2) {
12555
- for (var a2 = [], c2 = true;!this.eat(e3); ) {
12556
- if (c2)
12557
- c2 = false;
12558
- else if (this.expect(O.comma), t3 && this.afterTrailingComma(e3))
12559
- break;
12560
- var l2 = undefined;
12561
- i2 && this.type === O.comma ? l2 = null : this.type === O.ellipsis ? (l2 = this.parseSpread(n2), n2 && this.type === O.comma && n2.trailingComma < 0 && (n2.trailingComma = this.start)) : l2 = this.parseMaybeAssign(false, n2), a2.push(l2);
12562
- }
12563
- return a2;
12564
- }, ge.checkUnreserved = function(e3) {
12565
- var { start: t3, end: i2, name: n2 } = e3;
12566
- (this.inGenerator && n2 === "yield" && this.raiseRecoverable(t3, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && n2 === "await" && this.raiseRecoverable(t3, "Cannot use 'await' as identifier inside an async function"), this.currentThisScope().flags & se || n2 !== "arguments" || this.raiseRecoverable(t3, "Cannot use 'arguments' in class field initializer"), !this.inClassStaticBlock || n2 !== "arguments" && n2 !== "await" || this.raise(t3, "Cannot use " + n2 + " in class static initialization block"), this.keywords.test(n2) && this.raise(t3, "Unexpected keyword '" + n2 + "'"), this.options.ecmaVersion < 6 && this.input.slice(t3, i2).indexOf("\\") !== -1) || (this.strict ? this.reservedWordsStrict : this.reservedWords).test(n2) && (this.inAsync || n2 !== "await" || this.raiseRecoverable(t3, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(t3, "The keyword '" + n2 + "' is reserved"));
12567
- }, ge.parseIdent = function(e3) {
12568
- var t3 = this.parseIdentNode();
12569
- return this.next(!!e3), this.finishNode(t3, "Identifier"), e3 || (this.checkUnreserved(t3), t3.name !== "await" || this.awaitIdentPos || (this.awaitIdentPos = t3.start)), t3;
12570
- }, ge.parseIdentNode = function() {
12571
- var e3 = this.startNode();
12572
- return this.type === O.name ? e3.name = this.value : this.type.keyword ? (e3.name = this.type.keyword, e3.name !== "class" && e3.name !== "function" || this.lastTokEnd === this.lastTokStart + 1 && this.input.charCodeAt(this.lastTokStart) === 46 || this.context.pop(), this.type = O.name) : this.unexpected(), e3;
12573
- }, ge.parsePrivateIdent = function() {
12574
- var e3 = this.startNode();
12575
- return this.type === O.privateId ? e3.name = this.value : this.unexpected(), this.next(), this.finishNode(e3, "PrivateIdentifier"), this.options.checkPrivateFields && (this.privateNameStack.length === 0 ? this.raise(e3.start, "Private field '#" + e3.name + "' must be declared in an enclosing class") : this.privateNameStack[this.privateNameStack.length - 1].used.push(e3)), e3;
12576
- }, ge.parseYield = function(e3) {
12577
- this.yieldPos || (this.yieldPos = this.start);
12578
- var t3 = this.startNode();
12579
- return this.next(), this.type === O.semi || this.canInsertSemicolon() || this.type !== O.star && !this.type.startsExpr ? (t3.delegate = false, t3.argument = null) : (t3.delegate = this.eat(O.star), t3.argument = this.parseMaybeAssign(e3)), this.finishNode(t3, "YieldExpression");
12580
- }, ge.parseAwait = function(e3) {
12581
- this.awaitPos || (this.awaitPos = this.start);
12582
- var t3 = this.startNode();
12583
- return this.next(), t3.argument = this.parseMaybeUnary(null, true, false, e3), this.finishNode(t3, "AwaitExpression");
12584
- };
12585
- var ve = acorn_Parser.prototype;
12586
- ve.raise = function(e3, t3) {
12587
- var i2 = getLineInfo(this.input, e3);
12588
- t3 += " (" + i2.line + ":" + i2.column + ")", this.sourceFile && (t3 += " in " + this.sourceFile);
12589
- var n2 = new SyntaxError(t3);
12590
- throw n2.pos = e3, n2.loc = i2, n2.raisedAt = this.pos, n2;
12591
- }, ve.raiseRecoverable = ve.raise, ve.curPosition = function() {
12592
- if (this.options.locations)
12593
- return new acorn_Position(this.curLine, this.pos - this.lineStart);
12594
- };
12595
- var ye = acorn_Parser.prototype, acorn_Scope = function(e3) {
12596
- this.flags = e3, this.var = [], this.lexical = [], this.functions = [];
12597
- };
12598
- ye.enterScope = function(e3) {
12599
- this.scopeStack.push(new acorn_Scope(e3));
12600
- }, ye.exitScope = function() {
12601
- this.scopeStack.pop();
12602
- }, ye.treatFunctionsAsVarInScope = function(e3) {
12603
- return 2 & e3.flags || !this.inModule && 1 & e3.flags;
12604
- }, ye.declareName = function(e3, t3, i2) {
12605
- var n2 = false;
12606
- if (t3 === 2) {
12607
- var a2 = this.currentScope();
12608
- n2 = a2.lexical.indexOf(e3) > -1 || a2.functions.indexOf(e3) > -1 || a2.var.indexOf(e3) > -1, a2.lexical.push(e3), this.inModule && 1 & a2.flags && delete this.undefinedExports[e3];
12609
- } else if (t3 === 4) {
12610
- this.currentScope().lexical.push(e3);
12611
- } else if (t3 === 3) {
12612
- var c2 = this.currentScope();
12613
- n2 = this.treatFunctionsAsVar ? c2.lexical.indexOf(e3) > -1 : c2.lexical.indexOf(e3) > -1 || c2.var.indexOf(e3) > -1, c2.functions.push(e3);
12614
- } else
12615
- for (var l2 = this.scopeStack.length - 1;l2 >= 0; --l2) {
12616
- var y2 = this.scopeStack[l2];
12617
- if (y2.lexical.indexOf(e3) > -1 && !(32 & y2.flags && y2.lexical[0] === e3) || !this.treatFunctionsAsVarInScope(y2) && y2.functions.indexOf(e3) > -1) {
12618
- n2 = true;
12619
- break;
12620
- }
12621
- if (y2.var.push(e3), this.inModule && 1 & y2.flags && delete this.undefinedExports[e3], y2.flags & se)
12622
- break;
12623
- }
12624
- n2 && this.raiseRecoverable(i2, "Identifier '" + e3 + "' has already been declared");
12625
- }, ye.checkLocalExport = function(e3) {
12626
- this.scopeStack[0].lexical.indexOf(e3.name) === -1 && this.scopeStack[0].var.indexOf(e3.name) === -1 && (this.undefinedExports[e3.name] = e3);
12627
- }, ye.currentScope = function() {
12628
- return this.scopeStack[this.scopeStack.length - 1];
12629
- }, ye.currentVarScope = function() {
12630
- for (var e3 = this.scopeStack.length - 1;; e3--) {
12631
- var t3 = this.scopeStack[e3];
12632
- if (771 & t3.flags)
12633
- return t3;
12634
- }
12635
- }, ye.currentThisScope = function() {
12636
- for (var e3 = this.scopeStack.length - 1;; e3--) {
12637
- var t3 = this.scopeStack[e3];
12638
- if (771 & t3.flags && !(16 & t3.flags))
12639
- return t3;
12640
- }
12641
- };
12642
- var acorn_Node = function(e3, t3, i2) {
12643
- this.type = "", this.start = t3, this.end = 0, e3.options.locations && (this.loc = new acorn_SourceLocation(e3, i2)), e3.options.directSourceFile && (this.sourceFile = e3.options.directSourceFile), e3.options.ranges && (this.range = [t3, 0]);
12644
- }, _e = acorn_Parser.prototype;
12645
- function finishNodeAt(e3, t3, i2, n2) {
12646
- return e3.type = t3, e3.end = i2, this.options.locations && (e3.loc.end = n2), this.options.ranges && (e3.range[1] = i2), e3;
12647
- }
12648
- _e.startNode = function() {
12649
- return new acorn_Node(this, this.start, this.startLoc);
12650
- }, _e.startNodeAt = function(e3, t3) {
12651
- return new acorn_Node(this, e3, t3);
12652
- }, _e.finishNode = function(e3, t3) {
12653
- return finishNodeAt.call(this, e3, t3, this.lastTokEnd, this.lastTokEndLoc);
12654
- }, _e.finishNodeAt = function(e3, t3, i2, n2) {
12655
- return finishNodeAt.call(this, e3, t3, i2, n2);
12656
- }, _e.copyNode = function(e3) {
12657
- var t3 = new acorn_Node(this, e3.start, this.startLoc);
12658
- for (var i2 in e3)
12659
- t3[i2] = e3[i2];
12660
- return t3;
12661
- };
12662
- var Ee = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", be = Ee + " Extended_Pictographic", ke = be + " EBase EComp EMod EPres ExtPict", we = { 9: Ee, 10: be, 11: be, 12: ke, 13: ke, 14: ke }, Ce = { 9: "", 10: "", 11: "", 12: "", 13: "", 14: "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji" }, Se = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", Ie = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", Te = Ie + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", Re = Te + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", Ae = Re + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", Le = Ae + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", Oe = { 9: Ie, 10: Te, 11: Re, 12: Ae, 13: Le, 14: Le + " Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz" }, De = {};
12663
- function buildUnicodeData(e3) {
12664
- var t3 = De[e3] = { binary: wordsRegexp(we[e3] + " " + Se), binaryOfStrings: wordsRegexp(Ce[e3]), nonBinary: { General_Category: wordsRegexp(Se), Script: wordsRegexp(Oe[e3]) } };
12665
- t3.nonBinary.Script_Extensions = t3.nonBinary.Script, t3.nonBinary.gc = t3.nonBinary.General_Category, t3.nonBinary.sc = t3.nonBinary.Script, t3.nonBinary.scx = t3.nonBinary.Script_Extensions;
12666
- }
12667
- for (var Ve = 0, Ue = [9, 10, 11, 12, 13, 14];Ve < Ue.length; Ve += 1) {
12668
- buildUnicodeData(Ue[Ve]);
12669
- }
12670
- var Me = acorn_Parser.prototype, acorn_BranchID = function(e3, t3) {
12671
- this.parent = e3, this.base = t3 || this;
12672
- };
12673
- acorn_BranchID.prototype.separatedFrom = function(e3) {
12674
- for (var t3 = this;t3; t3 = t3.parent)
12675
- for (var i2 = e3;i2; i2 = i2.parent)
12676
- if (t3.base === i2.base && t3 !== i2)
12677
- return true;
12678
- return false;
12679
- }, acorn_BranchID.prototype.sibling = function() {
12680
- return new acorn_BranchID(this.parent, this.base);
12681
- };
12682
- var acorn_RegExpValidationState = function(e3) {
12683
- this.parser = e3, this.validFlags = "gim" + (e3.options.ecmaVersion >= 6 ? "uy" : "") + (e3.options.ecmaVersion >= 9 ? "s" : "") + (e3.options.ecmaVersion >= 13 ? "d" : "") + (e3.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = De[e3.options.ecmaVersion >= 14 ? 14 : e3.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = false, this.switchV = false, this.switchN = false, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = false, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = Object.create(null), this.backReferenceNames = [], this.branchID = null;
12684
- };
12685
- function isRegularExpressionModifier(e3) {
12686
- return e3 === 105 || e3 === 109 || e3 === 115;
12687
- }
12688
- function isSyntaxCharacter(e3) {
12689
- return e3 === 36 || e3 >= 40 && e3 <= 43 || e3 === 46 || e3 === 63 || e3 >= 91 && e3 <= 94 || e3 >= 123 && e3 <= 125;
12690
- }
12691
- function isControlLetter(e3) {
12692
- return e3 >= 65 && e3 <= 90 || e3 >= 97 && e3 <= 122;
12693
- }
12694
- acorn_RegExpValidationState.prototype.reset = function(e3, t3, i2) {
12695
- var n2 = i2.indexOf("v") !== -1, a2 = i2.indexOf("u") !== -1;
12696
- this.start = 0 | e3, this.source = t3 + "", this.flags = i2, n2 && this.parser.options.ecmaVersion >= 15 ? (this.switchU = true, this.switchV = true, this.switchN = true) : (this.switchU = a2 && this.parser.options.ecmaVersion >= 6, this.switchV = false, this.switchN = a2 && this.parser.options.ecmaVersion >= 9);
12697
- }, acorn_RegExpValidationState.prototype.raise = function(e3) {
12698
- this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + e3);
12699
- }, acorn_RegExpValidationState.prototype.at = function(e3, t3) {
12700
- t3 === undefined && (t3 = false);
12701
- var i2 = this.source, n2 = i2.length;
12702
- if (e3 >= n2)
12703
- return -1;
12704
- var a2 = i2.charCodeAt(e3);
12705
- if (!t3 && !this.switchU || a2 <= 55295 || a2 >= 57344 || e3 + 1 >= n2)
12706
- return a2;
12707
- var c2 = i2.charCodeAt(e3 + 1);
12708
- return c2 >= 56320 && c2 <= 57343 ? (a2 << 10) + c2 - 56613888 : a2;
12709
- }, acorn_RegExpValidationState.prototype.nextIndex = function(e3, t3) {
12710
- t3 === undefined && (t3 = false);
12711
- var i2 = this.source, n2 = i2.length;
12712
- if (e3 >= n2)
12713
- return n2;
12714
- var a2, c2 = i2.charCodeAt(e3);
12715
- return !t3 && !this.switchU || c2 <= 55295 || c2 >= 57344 || e3 + 1 >= n2 || (a2 = i2.charCodeAt(e3 + 1)) < 56320 || a2 > 57343 ? e3 + 1 : e3 + 2;
12716
- }, acorn_RegExpValidationState.prototype.current = function(e3) {
12717
- return e3 === undefined && (e3 = false), this.at(this.pos, e3);
12718
- }, acorn_RegExpValidationState.prototype.lookahead = function(e3) {
12719
- return e3 === undefined && (e3 = false), this.at(this.nextIndex(this.pos, e3), e3);
12720
- }, acorn_RegExpValidationState.prototype.advance = function(e3) {
12721
- e3 === undefined && (e3 = false), this.pos = this.nextIndex(this.pos, e3);
12722
- }, acorn_RegExpValidationState.prototype.eat = function(e3, t3) {
12723
- return t3 === undefined && (t3 = false), this.current(t3) === e3 && (this.advance(t3), true);
12724
- }, acorn_RegExpValidationState.prototype.eatChars = function(e3, t3) {
12725
- t3 === undefined && (t3 = false);
12726
- for (var i2 = this.pos, n2 = 0, a2 = e3;n2 < a2.length; n2 += 1) {
12727
- var c2 = a2[n2], l2 = this.at(i2, t3);
12728
- if (l2 === -1 || l2 !== c2)
12729
- return false;
12730
- i2 = this.nextIndex(i2, t3);
12731
- }
12732
- return this.pos = i2, true;
12733
- }, Me.validateRegExpFlags = function(e3) {
12734
- for (var { validFlags: t3, flags: i2 } = e3, n2 = false, a2 = false, c2 = 0;c2 < i2.length; c2++) {
12735
- var l2 = i2.charAt(c2);
12736
- t3.indexOf(l2) === -1 && this.raise(e3.start, "Invalid regular expression flag"), i2.indexOf(l2, c2 + 1) > -1 && this.raise(e3.start, "Duplicate regular expression flag"), l2 === "u" && (n2 = true), l2 === "v" && (a2 = true);
12737
- }
12738
- this.options.ecmaVersion >= 15 && n2 && a2 && this.raise(e3.start, "Invalid regular expression flag");
12739
- }, Me.validateRegExpPattern = function(e3) {
12740
- this.regexp_pattern(e3), !e3.switchN && this.options.ecmaVersion >= 9 && function(e4) {
12741
- for (var t3 in e4)
12742
- return true;
12743
- return false;
12744
- }(e3.groupNames) && (e3.switchN = true, this.regexp_pattern(e3));
12745
- }, Me.regexp_pattern = function(e3) {
12746
- e3.pos = 0, e3.lastIntValue = 0, e3.lastStringValue = "", e3.lastAssertionIsQuantifiable = false, e3.numCapturingParens = 0, e3.maxBackReference = 0, e3.groupNames = Object.create(null), e3.backReferenceNames.length = 0, e3.branchID = null, this.regexp_disjunction(e3), e3.pos !== e3.source.length && (e3.eat(41) && e3.raise("Unmatched ')'"), (e3.eat(93) || e3.eat(125)) && e3.raise("Lone quantifier brackets")), e3.maxBackReference > e3.numCapturingParens && e3.raise("Invalid escape");
12747
- for (var t3 = 0, i2 = e3.backReferenceNames;t3 < i2.length; t3 += 1) {
12748
- var n2 = i2[t3];
12749
- e3.groupNames[n2] || e3.raise("Invalid named capture referenced");
12750
- }
12751
- }, Me.regexp_disjunction = function(e3) {
12752
- var t3 = this.options.ecmaVersion >= 16;
12753
- for (t3 && (e3.branchID = new acorn_BranchID(e3.branchID, null)), this.regexp_alternative(e3);e3.eat(124); )
12754
- t3 && (e3.branchID = e3.branchID.sibling()), this.regexp_alternative(e3);
12755
- t3 && (e3.branchID = e3.branchID.parent), this.regexp_eatQuantifier(e3, true) && e3.raise("Nothing to repeat"), e3.eat(123) && e3.raise("Lone quantifier brackets");
12756
- }, Me.regexp_alternative = function(e3) {
12757
- for (;e3.pos < e3.source.length && this.regexp_eatTerm(e3); )
12758
- ;
12759
- }, Me.regexp_eatTerm = function(e3) {
12760
- return this.regexp_eatAssertion(e3) ? (e3.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(e3) && e3.switchU && e3.raise("Invalid quantifier"), true) : !!(e3.switchU ? this.regexp_eatAtom(e3) : this.regexp_eatExtendedAtom(e3)) && (this.regexp_eatQuantifier(e3), true);
12761
- }, Me.regexp_eatAssertion = function(e3) {
12762
- var t3 = e3.pos;
12763
- if (e3.lastAssertionIsQuantifiable = false, e3.eat(94) || e3.eat(36))
12764
- return true;
12765
- if (e3.eat(92)) {
12766
- if (e3.eat(66) || e3.eat(98))
12767
- return true;
12768
- e3.pos = t3;
12769
- }
12770
- if (e3.eat(40) && e3.eat(63)) {
12771
- var i2 = false;
12772
- if (this.options.ecmaVersion >= 9 && (i2 = e3.eat(60)), e3.eat(61) || e3.eat(33))
12773
- return this.regexp_disjunction(e3), e3.eat(41) || e3.raise("Unterminated group"), e3.lastAssertionIsQuantifiable = !i2, true;
12774
- }
12775
- return e3.pos = t3, false;
12776
- }, Me.regexp_eatQuantifier = function(e3, t3) {
12777
- return t3 === undefined && (t3 = false), !!this.regexp_eatQuantifierPrefix(e3, t3) && (e3.eat(63), true);
12778
- }, Me.regexp_eatQuantifierPrefix = function(e3, t3) {
12779
- return e3.eat(42) || e3.eat(43) || e3.eat(63) || this.regexp_eatBracedQuantifier(e3, t3);
12780
- }, Me.regexp_eatBracedQuantifier = function(e3, t3) {
12781
- var i2 = e3.pos;
12782
- if (e3.eat(123)) {
12783
- var n2 = 0, a2 = -1;
12784
- if (this.regexp_eatDecimalDigits(e3) && (n2 = e3.lastIntValue, e3.eat(44) && this.regexp_eatDecimalDigits(e3) && (a2 = e3.lastIntValue), e3.eat(125)))
12785
- return a2 !== -1 && a2 < n2 && !t3 && e3.raise("numbers out of order in {} quantifier"), true;
12786
- e3.switchU && !t3 && e3.raise("Incomplete quantifier"), e3.pos = i2;
12787
- }
12788
- return false;
12789
- }, Me.regexp_eatAtom = function(e3) {
12790
- return this.regexp_eatPatternCharacters(e3) || e3.eat(46) || this.regexp_eatReverseSolidusAtomEscape(e3) || this.regexp_eatCharacterClass(e3) || this.regexp_eatUncapturingGroup(e3) || this.regexp_eatCapturingGroup(e3);
12791
- }, Me.regexp_eatReverseSolidusAtomEscape = function(e3) {
12792
- var t3 = e3.pos;
12793
- if (e3.eat(92)) {
12794
- if (this.regexp_eatAtomEscape(e3))
12795
- return true;
12796
- e3.pos = t3;
12797
- }
12798
- return false;
12799
- }, Me.regexp_eatUncapturingGroup = function(e3) {
12800
- var t3 = e3.pos;
12801
- if (e3.eat(40)) {
12802
- if (e3.eat(63)) {
12803
- if (this.options.ecmaVersion >= 16) {
12804
- var i2 = this.regexp_eatModifiers(e3), n2 = e3.eat(45);
12805
- if (i2 || n2) {
12806
- for (var a2 = 0;a2 < i2.length; a2++) {
12807
- var c2 = i2.charAt(a2);
12808
- i2.indexOf(c2, a2 + 1) > -1 && e3.raise("Duplicate regular expression modifiers");
12809
- }
12810
- if (n2) {
12811
- var l2 = this.regexp_eatModifiers(e3);
12812
- i2 || l2 || e3.current() !== 58 || e3.raise("Invalid regular expression modifiers");
12813
- for (var y2 = 0;y2 < l2.length; y2++) {
12814
- var E2 = l2.charAt(y2);
12815
- (l2.indexOf(E2, y2 + 1) > -1 || i2.indexOf(E2) > -1) && e3.raise("Duplicate regular expression modifiers");
12816
- }
12817
- }
12818
- }
12819
- }
12820
- if (e3.eat(58)) {
12821
- if (this.regexp_disjunction(e3), e3.eat(41))
12822
- return true;
12823
- e3.raise("Unterminated group");
12824
- }
12825
- }
12826
- e3.pos = t3;
12827
- }
12828
- return false;
12829
- }, Me.regexp_eatCapturingGroup = function(e3) {
12830
- if (e3.eat(40)) {
12831
- if (this.options.ecmaVersion >= 9 ? this.regexp_groupSpecifier(e3) : e3.current() === 63 && e3.raise("Invalid group"), this.regexp_disjunction(e3), e3.eat(41))
12832
- return e3.numCapturingParens += 1, true;
12833
- e3.raise("Unterminated group");
12834
- }
12835
- return false;
12836
- }, Me.regexp_eatModifiers = function(e3) {
12837
- for (var t3 = "", i2 = 0;(i2 = e3.current()) !== -1 && isRegularExpressionModifier(i2); )
12838
- t3 += codePointToString(i2), e3.advance();
12839
- return t3;
12840
- }, Me.regexp_eatExtendedAtom = function(e3) {
12841
- return e3.eat(46) || this.regexp_eatReverseSolidusAtomEscape(e3) || this.regexp_eatCharacterClass(e3) || this.regexp_eatUncapturingGroup(e3) || this.regexp_eatCapturingGroup(e3) || this.regexp_eatInvalidBracedQuantifier(e3) || this.regexp_eatExtendedPatternCharacter(e3);
12842
- }, Me.regexp_eatInvalidBracedQuantifier = function(e3) {
12843
- return this.regexp_eatBracedQuantifier(e3, true) && e3.raise("Nothing to repeat"), false;
12844
- }, Me.regexp_eatSyntaxCharacter = function(e3) {
12845
- var t3 = e3.current();
12846
- return !!isSyntaxCharacter(t3) && (e3.lastIntValue = t3, e3.advance(), true);
12847
- }, Me.regexp_eatPatternCharacters = function(e3) {
12848
- for (var t3 = e3.pos, i2 = 0;(i2 = e3.current()) !== -1 && !isSyntaxCharacter(i2); )
12849
- e3.advance();
12850
- return e3.pos !== t3;
12851
- }, Me.regexp_eatExtendedPatternCharacter = function(e3) {
12852
- var t3 = e3.current();
12853
- return !(t3 === -1 || t3 === 36 || t3 >= 40 && t3 <= 43 || t3 === 46 || t3 === 63 || t3 === 91 || t3 === 94 || t3 === 124) && (e3.advance(), true);
12854
- }, Me.regexp_groupSpecifier = function(e3) {
12855
- if (e3.eat(63)) {
12856
- this.regexp_eatGroupName(e3) || e3.raise("Invalid group");
12857
- var t3 = this.options.ecmaVersion >= 16, i2 = e3.groupNames[e3.lastStringValue];
12858
- if (i2)
12859
- if (t3)
12860
- for (var n2 = 0, a2 = i2;n2 < a2.length; n2 += 1) {
12861
- a2[n2].separatedFrom(e3.branchID) || e3.raise("Duplicate capture group name");
12862
- }
12863
- else
12864
- e3.raise("Duplicate capture group name");
12865
- t3 ? (i2 || (e3.groupNames[e3.lastStringValue] = [])).push(e3.branchID) : e3.groupNames[e3.lastStringValue] = true;
12866
- }
12867
- }, Me.regexp_eatGroupName = function(e3) {
12868
- if (e3.lastStringValue = "", e3.eat(60)) {
12869
- if (this.regexp_eatRegExpIdentifierName(e3) && e3.eat(62))
12870
- return true;
12871
- e3.raise("Invalid capture group name");
12872
- }
12873
- return false;
12874
- }, Me.regexp_eatRegExpIdentifierName = function(e3) {
12875
- if (e3.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(e3)) {
12876
- for (e3.lastStringValue += codePointToString(e3.lastIntValue);this.regexp_eatRegExpIdentifierPart(e3); )
12877
- e3.lastStringValue += codePointToString(e3.lastIntValue);
12878
- return true;
12879
- }
12880
- return false;
12881
- }, Me.regexp_eatRegExpIdentifierStart = function(e3) {
12882
- var t3 = e3.pos, i2 = this.options.ecmaVersion >= 11, n2 = e3.current(i2);
12883
- return e3.advance(i2), n2 === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e3, i2) && (n2 = e3.lastIntValue), function(e4) {
12884
- return isIdentifierStart(e4, true) || e4 === 36 || e4 === 95;
12885
- }(n2) ? (e3.lastIntValue = n2, true) : (e3.pos = t3, false);
12886
- }, Me.regexp_eatRegExpIdentifierPart = function(e3) {
12887
- var t3 = e3.pos, i2 = this.options.ecmaVersion >= 11, n2 = e3.current(i2);
12888
- return e3.advance(i2), n2 === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e3, i2) && (n2 = e3.lastIntValue), function(e4) {
12889
- return isIdentifierChar(e4, true) || e4 === 36 || e4 === 95 || e4 === 8204 || e4 === 8205;
12890
- }(n2) ? (e3.lastIntValue = n2, true) : (e3.pos = t3, false);
12891
- }, Me.regexp_eatAtomEscape = function(e3) {
12892
- return !!(this.regexp_eatBackReference(e3) || this.regexp_eatCharacterClassEscape(e3) || this.regexp_eatCharacterEscape(e3) || e3.switchN && this.regexp_eatKGroupName(e3)) || (e3.switchU && (e3.current() === 99 && e3.raise("Invalid unicode escape"), e3.raise("Invalid escape")), false);
12893
- }, Me.regexp_eatBackReference = function(e3) {
12894
- var t3 = e3.pos;
12895
- if (this.regexp_eatDecimalEscape(e3)) {
12896
- var i2 = e3.lastIntValue;
12897
- if (e3.switchU)
12898
- return i2 > e3.maxBackReference && (e3.maxBackReference = i2), true;
12899
- if (i2 <= e3.numCapturingParens)
12900
- return true;
12901
- e3.pos = t3;
12902
- }
12903
- return false;
12904
- }, Me.regexp_eatKGroupName = function(e3) {
12905
- if (e3.eat(107)) {
12906
- if (this.regexp_eatGroupName(e3))
12907
- return e3.backReferenceNames.push(e3.lastStringValue), true;
12908
- e3.raise("Invalid named reference");
12909
- }
12910
- return false;
12911
- }, Me.regexp_eatCharacterEscape = function(e3) {
12912
- return this.regexp_eatControlEscape(e3) || this.regexp_eatCControlLetter(e3) || this.regexp_eatZero(e3) || this.regexp_eatHexEscapeSequence(e3) || this.regexp_eatRegExpUnicodeEscapeSequence(e3, false) || !e3.switchU && this.regexp_eatLegacyOctalEscapeSequence(e3) || this.regexp_eatIdentityEscape(e3);
12913
- }, Me.regexp_eatCControlLetter = function(e3) {
12914
- var t3 = e3.pos;
12915
- if (e3.eat(99)) {
12916
- if (this.regexp_eatControlLetter(e3))
12917
- return true;
12918
- e3.pos = t3;
12919
- }
12920
- return false;
12921
- }, Me.regexp_eatZero = function(e3) {
12922
- return e3.current() === 48 && !isDecimalDigit(e3.lookahead()) && (e3.lastIntValue = 0, e3.advance(), true);
12923
- }, Me.regexp_eatControlEscape = function(e3) {
12924
- var t3 = e3.current();
12925
- return t3 === 116 ? (e3.lastIntValue = 9, e3.advance(), true) : t3 === 110 ? (e3.lastIntValue = 10, e3.advance(), true) : t3 === 118 ? (e3.lastIntValue = 11, e3.advance(), true) : t3 === 102 ? (e3.lastIntValue = 12, e3.advance(), true) : t3 === 114 && (e3.lastIntValue = 13, e3.advance(), true);
12926
- }, Me.regexp_eatControlLetter = function(e3) {
12927
- var t3 = e3.current();
12928
- return !!isControlLetter(t3) && (e3.lastIntValue = t3 % 32, e3.advance(), true);
12929
- }, Me.regexp_eatRegExpUnicodeEscapeSequence = function(e3, t3) {
12930
- t3 === undefined && (t3 = false);
12931
- var i2, n2 = e3.pos, a2 = t3 || e3.switchU;
12932
- if (e3.eat(117)) {
12933
- if (this.regexp_eatFixedHexDigits(e3, 4)) {
12934
- var c2 = e3.lastIntValue;
12935
- if (a2 && c2 >= 55296 && c2 <= 56319) {
12936
- var l2 = e3.pos;
12937
- if (e3.eat(92) && e3.eat(117) && this.regexp_eatFixedHexDigits(e3, 4)) {
12938
- var y2 = e3.lastIntValue;
12939
- if (y2 >= 56320 && y2 <= 57343)
12940
- return e3.lastIntValue = 1024 * (c2 - 55296) + (y2 - 56320) + 65536, true;
12941
- }
12942
- e3.pos = l2, e3.lastIntValue = c2;
12943
- }
12944
- return true;
12945
- }
12946
- if (a2 && e3.eat(123) && this.regexp_eatHexDigits(e3) && e3.eat(125) && ((i2 = e3.lastIntValue) >= 0 && i2 <= 1114111))
12947
- return true;
12948
- a2 && e3.raise("Invalid unicode escape"), e3.pos = n2;
12949
- }
12950
- return false;
12951
- }, Me.regexp_eatIdentityEscape = function(e3) {
12952
- if (e3.switchU)
12953
- return !!this.regexp_eatSyntaxCharacter(e3) || !!e3.eat(47) && (e3.lastIntValue = 47, true);
12954
- var t3 = e3.current();
12955
- return !(t3 === 99 || e3.switchN && t3 === 107) && (e3.lastIntValue = t3, e3.advance(), true);
12956
- }, Me.regexp_eatDecimalEscape = function(e3) {
12957
- e3.lastIntValue = 0;
12958
- var t3 = e3.current();
12959
- if (t3 >= 49 && t3 <= 57) {
12960
- do {
12961
- e3.lastIntValue = 10 * e3.lastIntValue + (t3 - 48), e3.advance();
12962
- } while ((t3 = e3.current()) >= 48 && t3 <= 57);
12963
- return true;
12964
- }
12965
- return false;
12966
- };
12967
- function isUnicodePropertyNameCharacter(e3) {
12968
- return isControlLetter(e3) || e3 === 95;
12969
- }
12970
- function isUnicodePropertyValueCharacter(e3) {
12971
- return isUnicodePropertyNameCharacter(e3) || isDecimalDigit(e3);
12972
- }
12973
- function isDecimalDigit(e3) {
12974
- return e3 >= 48 && e3 <= 57;
12975
- }
12976
- function isHexDigit(e3) {
12977
- return e3 >= 48 && e3 <= 57 || e3 >= 65 && e3 <= 70 || e3 >= 97 && e3 <= 102;
12978
- }
12979
- function hexToInt(e3) {
12980
- return e3 >= 65 && e3 <= 70 ? e3 - 65 + 10 : e3 >= 97 && e3 <= 102 ? e3 - 97 + 10 : e3 - 48;
12981
- }
12982
- function isOctalDigit(e3) {
12983
- return e3 >= 48 && e3 <= 55;
12984
- }
12985
- Me.regexp_eatCharacterClassEscape = function(e3) {
12986
- var t3 = e3.current();
12987
- if (function(e4) {
12988
- return e4 === 100 || e4 === 68 || e4 === 115 || e4 === 83 || e4 === 119 || e4 === 87;
12989
- }(t3))
12990
- return e3.lastIntValue = -1, e3.advance(), 1;
12991
- var i2 = false;
12992
- if (e3.switchU && this.options.ecmaVersion >= 9 && ((i2 = t3 === 80) || t3 === 112)) {
12993
- var n2;
12994
- if (e3.lastIntValue = -1, e3.advance(), e3.eat(123) && (n2 = this.regexp_eatUnicodePropertyValueExpression(e3)) && e3.eat(125))
12995
- return i2 && n2 === 2 && e3.raise("Invalid property name"), n2;
12996
- e3.raise("Invalid property name");
12997
- }
12998
- return 0;
12999
- }, Me.regexp_eatUnicodePropertyValueExpression = function(e3) {
13000
- var t3 = e3.pos;
13001
- if (this.regexp_eatUnicodePropertyName(e3) && e3.eat(61)) {
13002
- var i2 = e3.lastStringValue;
13003
- if (this.regexp_eatUnicodePropertyValue(e3)) {
13004
- var n2 = e3.lastStringValue;
13005
- return this.regexp_validateUnicodePropertyNameAndValue(e3, i2, n2), 1;
13006
- }
13007
- }
13008
- if (e3.pos = t3, this.regexp_eatLoneUnicodePropertyNameOrValue(e3)) {
13009
- var a2 = e3.lastStringValue;
13010
- return this.regexp_validateUnicodePropertyNameOrValue(e3, a2);
13011
- }
13012
- return 0;
13013
- }, Me.regexp_validateUnicodePropertyNameAndValue = function(e3, t3, i2) {
13014
- H(e3.unicodeProperties.nonBinary, t3) || e3.raise("Invalid property name"), e3.unicodeProperties.nonBinary[t3].test(i2) || e3.raise("Invalid property value");
13015
- }, Me.regexp_validateUnicodePropertyNameOrValue = function(e3, t3) {
13016
- return e3.unicodeProperties.binary.test(t3) ? 1 : e3.switchV && e3.unicodeProperties.binaryOfStrings.test(t3) ? 2 : void e3.raise("Invalid property name");
13017
- }, Me.regexp_eatUnicodePropertyName = function(e3) {
13018
- var t3 = 0;
13019
- for (e3.lastStringValue = "";isUnicodePropertyNameCharacter(t3 = e3.current()); )
13020
- e3.lastStringValue += codePointToString(t3), e3.advance();
13021
- return e3.lastStringValue !== "";
13022
- }, Me.regexp_eatUnicodePropertyValue = function(e3) {
13023
- var t3 = 0;
13024
- for (e3.lastStringValue = "";isUnicodePropertyValueCharacter(t3 = e3.current()); )
13025
- e3.lastStringValue += codePointToString(t3), e3.advance();
13026
- return e3.lastStringValue !== "";
13027
- }, Me.regexp_eatLoneUnicodePropertyNameOrValue = function(e3) {
13028
- return this.regexp_eatUnicodePropertyValue(e3);
13029
- }, Me.regexp_eatCharacterClass = function(e3) {
13030
- if (e3.eat(91)) {
13031
- var t3 = e3.eat(94), i2 = this.regexp_classContents(e3);
13032
- return e3.eat(93) || e3.raise("Unterminated character class"), t3 && i2 === 2 && e3.raise("Negated character class may contain strings"), true;
13033
- }
13034
- return false;
13035
- }, Me.regexp_classContents = function(e3) {
13036
- return e3.current() === 93 ? 1 : e3.switchV ? this.regexp_classSetExpression(e3) : (this.regexp_nonEmptyClassRanges(e3), 1);
13037
- }, Me.regexp_nonEmptyClassRanges = function(e3) {
13038
- for (;this.regexp_eatClassAtom(e3); ) {
13039
- var t3 = e3.lastIntValue;
13040
- if (e3.eat(45) && this.regexp_eatClassAtom(e3)) {
13041
- var i2 = e3.lastIntValue;
13042
- !e3.switchU || t3 !== -1 && i2 !== -1 || e3.raise("Invalid character class"), t3 !== -1 && i2 !== -1 && t3 > i2 && e3.raise("Range out of order in character class");
13043
- }
13044
- }
13045
- }, Me.regexp_eatClassAtom = function(e3) {
13046
- var t3 = e3.pos;
13047
- if (e3.eat(92)) {
13048
- if (this.regexp_eatClassEscape(e3))
13049
- return true;
13050
- if (e3.switchU) {
13051
- var i2 = e3.current();
13052
- (i2 === 99 || isOctalDigit(i2)) && e3.raise("Invalid class escape"), e3.raise("Invalid escape");
13053
- }
13054
- e3.pos = t3;
13055
- }
13056
- var n2 = e3.current();
13057
- return n2 !== 93 && (e3.lastIntValue = n2, e3.advance(), true);
13058
- }, Me.regexp_eatClassEscape = function(e3) {
13059
- var t3 = e3.pos;
13060
- if (e3.eat(98))
13061
- return e3.lastIntValue = 8, true;
13062
- if (e3.switchU && e3.eat(45))
13063
- return e3.lastIntValue = 45, true;
13064
- if (!e3.switchU && e3.eat(99)) {
13065
- if (this.regexp_eatClassControlLetter(e3))
13066
- return true;
13067
- e3.pos = t3;
13068
- }
13069
- return this.regexp_eatCharacterClassEscape(e3) || this.regexp_eatCharacterEscape(e3);
13070
- }, Me.regexp_classSetExpression = function(e3) {
13071
- var t3, i2 = 1;
13072
- if (this.regexp_eatClassSetRange(e3))
13073
- ;
13074
- else if (t3 = this.regexp_eatClassSetOperand(e3)) {
13075
- t3 === 2 && (i2 = 2);
13076
- for (var n2 = e3.pos;e3.eatChars([38, 38]); )
13077
- e3.current() !== 38 && (t3 = this.regexp_eatClassSetOperand(e3)) ? t3 !== 2 && (i2 = 1) : e3.raise("Invalid character in character class");
13078
- if (n2 !== e3.pos)
13079
- return i2;
13080
- for (;e3.eatChars([45, 45]); )
13081
- this.regexp_eatClassSetOperand(e3) || e3.raise("Invalid character in character class");
13082
- if (n2 !== e3.pos)
13083
- return i2;
13084
- } else
13085
- e3.raise("Invalid character in character class");
13086
- for (;; )
13087
- if (!this.regexp_eatClassSetRange(e3)) {
13088
- if (!(t3 = this.regexp_eatClassSetOperand(e3)))
13089
- return i2;
13090
- t3 === 2 && (i2 = 2);
13091
- }
13092
- }, Me.regexp_eatClassSetRange = function(e3) {
13093
- var t3 = e3.pos;
13094
- if (this.regexp_eatClassSetCharacter(e3)) {
13095
- var i2 = e3.lastIntValue;
13096
- if (e3.eat(45) && this.regexp_eatClassSetCharacter(e3)) {
13097
- var n2 = e3.lastIntValue;
13098
- return i2 !== -1 && n2 !== -1 && i2 > n2 && e3.raise("Range out of order in character class"), true;
13099
- }
13100
- e3.pos = t3;
13101
- }
13102
- return false;
13103
- }, Me.regexp_eatClassSetOperand = function(e3) {
13104
- return this.regexp_eatClassSetCharacter(e3) ? 1 : this.regexp_eatClassStringDisjunction(e3) || this.regexp_eatNestedClass(e3);
13105
- }, Me.regexp_eatNestedClass = function(e3) {
13106
- var t3 = e3.pos;
13107
- if (e3.eat(91)) {
13108
- var i2 = e3.eat(94), n2 = this.regexp_classContents(e3);
13109
- if (e3.eat(93))
13110
- return i2 && n2 === 2 && e3.raise("Negated character class may contain strings"), n2;
13111
- e3.pos = t3;
13112
- }
13113
- if (e3.eat(92)) {
13114
- var a2 = this.regexp_eatCharacterClassEscape(e3);
13115
- if (a2)
13116
- return a2;
13117
- e3.pos = t3;
13118
- }
13119
- return null;
13120
- }, Me.regexp_eatClassStringDisjunction = function(e3) {
13121
- var t3 = e3.pos;
13122
- if (e3.eatChars([92, 113])) {
13123
- if (e3.eat(123)) {
13124
- var i2 = this.regexp_classStringDisjunctionContents(e3);
13125
- if (e3.eat(125))
13126
- return i2;
13127
- } else
13128
- e3.raise("Invalid escape");
13129
- e3.pos = t3;
13130
- }
13131
- return null;
13132
- }, Me.regexp_classStringDisjunctionContents = function(e3) {
13133
- for (var t3 = this.regexp_classString(e3);e3.eat(124); )
13134
- this.regexp_classString(e3) === 2 && (t3 = 2);
13135
- return t3;
13136
- }, Me.regexp_classString = function(e3) {
13137
- for (var t3 = 0;this.regexp_eatClassSetCharacter(e3); )
13138
- t3++;
13139
- return t3 === 1 ? 1 : 2;
13140
- }, Me.regexp_eatClassSetCharacter = function(e3) {
13141
- var t3 = e3.pos;
13142
- if (e3.eat(92))
13143
- return !(!this.regexp_eatCharacterEscape(e3) && !this.regexp_eatClassSetReservedPunctuator(e3)) || (e3.eat(98) ? (e3.lastIntValue = 8, true) : (e3.pos = t3, false));
13144
- var i2 = e3.current();
13145
- return !(i2 < 0 || i2 === e3.lookahead() && function(e4) {
13146
- return e4 === 33 || e4 >= 35 && e4 <= 38 || e4 >= 42 && e4 <= 44 || e4 === 46 || e4 >= 58 && e4 <= 64 || e4 === 94 || e4 === 96 || e4 === 126;
13147
- }(i2)) && (!function(e4) {
13148
- return e4 === 40 || e4 === 41 || e4 === 45 || e4 === 47 || e4 >= 91 && e4 <= 93 || e4 >= 123 && e4 <= 125;
13149
- }(i2) && (e3.advance(), e3.lastIntValue = i2, true));
13150
- }, Me.regexp_eatClassSetReservedPunctuator = function(e3) {
13151
- var t3 = e3.current();
13152
- return !!function(e4) {
13153
- return e4 === 33 || e4 === 35 || e4 === 37 || e4 === 38 || e4 === 44 || e4 === 45 || e4 >= 58 && e4 <= 62 || e4 === 64 || e4 === 96 || e4 === 126;
13154
- }(t3) && (e3.lastIntValue = t3, e3.advance(), true);
13155
- }, Me.regexp_eatClassControlLetter = function(e3) {
13156
- var t3 = e3.current();
13157
- return !(!isDecimalDigit(t3) && t3 !== 95) && (e3.lastIntValue = t3 % 32, e3.advance(), true);
13158
- }, Me.regexp_eatHexEscapeSequence = function(e3) {
13159
- var t3 = e3.pos;
13160
- if (e3.eat(120)) {
13161
- if (this.regexp_eatFixedHexDigits(e3, 2))
13162
- return true;
13163
- e3.switchU && e3.raise("Invalid escape"), e3.pos = t3;
13164
- }
13165
- return false;
13166
- }, Me.regexp_eatDecimalDigits = function(e3) {
13167
- var t3 = e3.pos, i2 = 0;
13168
- for (e3.lastIntValue = 0;isDecimalDigit(i2 = e3.current()); )
13169
- e3.lastIntValue = 10 * e3.lastIntValue + (i2 - 48), e3.advance();
13170
- return e3.pos !== t3;
13171
- }, Me.regexp_eatHexDigits = function(e3) {
13172
- var t3 = e3.pos, i2 = 0;
13173
- for (e3.lastIntValue = 0;isHexDigit(i2 = e3.current()); )
13174
- e3.lastIntValue = 16 * e3.lastIntValue + hexToInt(i2), e3.advance();
13175
- return e3.pos !== t3;
13176
- }, Me.regexp_eatLegacyOctalEscapeSequence = function(e3) {
13177
- if (this.regexp_eatOctalDigit(e3)) {
13178
- var t3 = e3.lastIntValue;
13179
- if (this.regexp_eatOctalDigit(e3)) {
13180
- var i2 = e3.lastIntValue;
13181
- t3 <= 3 && this.regexp_eatOctalDigit(e3) ? e3.lastIntValue = 64 * t3 + 8 * i2 + e3.lastIntValue : e3.lastIntValue = 8 * t3 + i2;
13182
- } else
13183
- e3.lastIntValue = t3;
13184
- return true;
13185
- }
13186
- return false;
13187
- }, Me.regexp_eatOctalDigit = function(e3) {
13188
- var t3 = e3.current();
13189
- return isOctalDigit(t3) ? (e3.lastIntValue = t3 - 48, e3.advance(), true) : (e3.lastIntValue = 0, false);
13190
- }, Me.regexp_eatFixedHexDigits = function(e3, t3) {
13191
- var i2 = e3.pos;
13192
- e3.lastIntValue = 0;
13193
- for (var n2 = 0;n2 < t3; ++n2) {
13194
- var a2 = e3.current();
13195
- if (!isHexDigit(a2))
13196
- return e3.pos = i2, false;
13197
- e3.lastIntValue = 16 * e3.lastIntValue + hexToInt(a2), e3.advance();
13198
- }
13199
- return true;
13200
- };
13201
- var acorn_Token = function(e3) {
13202
- this.type = e3.type, this.value = e3.value, this.start = e3.start, this.end = e3.end, e3.options.locations && (this.loc = new acorn_SourceLocation(e3, e3.startLoc, e3.endLoc)), e3.options.ranges && (this.range = [e3.start, e3.end]);
13203
- }, je = acorn_Parser.prototype;
13204
- function stringToBigInt(e3) {
13205
- return typeof BigInt != "function" ? null : BigInt(e3.replace(/_/g, ""));
13206
- }
13207
- je.next = function(e3) {
13208
- !e3 && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new acorn_Token(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
13209
- }, je.getToken = function() {
13210
- return this.next(), new acorn_Token(this);
13211
- }, typeof Symbol != "undefined" && (je[Symbol.iterator] = function() {
13212
- var e3 = this;
13213
- return { next: function() {
13214
- var t3 = e3.getToken();
13215
- return { done: t3.type === O.eof, value: t3 };
13216
- } };
13217
- }), je.nextToken = function() {
13218
- var e3 = this.curContext();
13219
- return e3 && e3.preserveSpace || this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length ? this.finishToken(O.eof) : e3.override ? e3.override(this) : void this.readToken(this.fullCharCodeAtPos());
13220
- }, je.readToken = function(e3) {
13221
- return isIdentifierStart(e3, this.options.ecmaVersion >= 6) || e3 === 92 ? this.readWord() : this.getTokenFromCode(e3);
13222
- }, je.fullCharCodeAt = function(e3) {
13223
- var t3 = this.input.charCodeAt(e3);
13224
- if (t3 <= 55295 || t3 >= 56320)
13225
- return t3;
13226
- var i2 = this.input.charCodeAt(e3 + 1);
13227
- return i2 <= 56319 || i2 >= 57344 ? t3 : (t3 << 10) + i2 - 56613888;
13228
- }, je.fullCharCodeAtPos = function() {
13229
- return this.fullCharCodeAt(this.pos);
13230
- }, je.skipBlockComment = function() {
13231
- var e3 = this.options.onComment && this.curPosition(), t3 = this.pos, i2 = this.input.indexOf("*/", this.pos += 2);
13232
- if (i2 === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = i2 + 2, this.options.locations)
13233
- for (var n2 = undefined, a2 = t3;(n2 = nextLineBreak(this.input, a2, this.pos)) > -1; )
13234
- ++this.curLine, a2 = this.lineStart = n2;
13235
- this.options.onComment && this.options.onComment(true, this.input.slice(t3 + 2, i2), t3, this.pos, e3, this.curPosition());
13236
- }, je.skipLineComment = function(e3) {
13237
- for (var t3 = this.pos, i2 = this.options.onComment && this.curPosition(), n2 = this.input.charCodeAt(this.pos += e3);this.pos < this.input.length && !isNewLine(n2); )
13238
- n2 = this.input.charCodeAt(++this.pos);
13239
- this.options.onComment && this.options.onComment(false, this.input.slice(t3 + e3, this.pos), t3, this.pos, i2, this.curPosition());
13240
- }, je.skipSpace = function() {
13241
- e:
13242
- for (;this.pos < this.input.length; ) {
13243
- var e3 = this.input.charCodeAt(this.pos);
13244
- switch (e3) {
13245
- case 32:
13246
- case 160:
13247
- ++this.pos;
13248
- break;
13249
- case 13:
13250
- this.input.charCodeAt(this.pos + 1) === 10 && ++this.pos;
13251
- case 10:
13252
- case 8232:
13253
- case 8233:
13254
- ++this.pos, this.options.locations && (++this.curLine, this.lineStart = this.pos);
13255
- break;
13256
- case 47:
13257
- switch (this.input.charCodeAt(this.pos + 1)) {
13258
- case 42:
13259
- this.skipBlockComment();
13260
- break;
13261
- case 47:
13262
- this.skipLineComment(2);
13263
- break;
13264
- default:
13265
- break e;
13266
- }
13267
- break;
13268
- default:
13269
- if (!(e3 > 8 && e3 < 14 || e3 >= 5760 && B.test(String.fromCharCode(e3))))
13270
- break e;
13271
- ++this.pos;
13272
- }
13273
- }
13274
- }, je.finishToken = function(e3, t3) {
13275
- this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
13276
- var i2 = this.type;
13277
- this.type = e3, this.value = t3, this.updateContext(i2);
13278
- }, je.readToken_dot = function() {
13279
- var e3 = this.input.charCodeAt(this.pos + 1);
13280
- if (e3 >= 48 && e3 <= 57)
13281
- return this.readNumber(true);
13282
- var t3 = this.input.charCodeAt(this.pos + 2);
13283
- return this.options.ecmaVersion >= 6 && e3 === 46 && t3 === 46 ? (this.pos += 3, this.finishToken(O.ellipsis)) : (++this.pos, this.finishToken(O.dot));
13284
- }, je.readToken_slash = function() {
13285
- var e3 = this.input.charCodeAt(this.pos + 1);
13286
- return this.exprAllowed ? (++this.pos, this.readRegexp()) : e3 === 61 ? this.finishOp(O.assign, 2) : this.finishOp(O.slash, 1);
13287
- }, je.readToken_mult_modulo_exp = function(e3) {
13288
- var t3 = this.input.charCodeAt(this.pos + 1), i2 = 1, n2 = e3 === 42 ? O.star : O.modulo;
13289
- return this.options.ecmaVersion >= 7 && e3 === 42 && t3 === 42 && (++i2, n2 = O.starstar, t3 = this.input.charCodeAt(this.pos + 2)), t3 === 61 ? this.finishOp(O.assign, i2 + 1) : this.finishOp(n2, i2);
13290
- }, je.readToken_pipe_amp = function(e3) {
13291
- var t3 = this.input.charCodeAt(this.pos + 1);
13292
- if (t3 === e3) {
13293
- if (this.options.ecmaVersion >= 12) {
13294
- if (this.input.charCodeAt(this.pos + 2) === 61)
13295
- return this.finishOp(O.assign, 3);
13296
- }
13297
- return this.finishOp(e3 === 124 ? O.logicalOR : O.logicalAND, 2);
13298
- }
13299
- return t3 === 61 ? this.finishOp(O.assign, 2) : this.finishOp(e3 === 124 ? O.bitwiseOR : O.bitwiseAND, 1);
13300
- }, je.readToken_caret = function() {
13301
- return this.input.charCodeAt(this.pos + 1) === 61 ? this.finishOp(O.assign, 2) : this.finishOp(O.bitwiseXOR, 1);
13302
- }, je.readToken_plus_min = function(e3) {
13303
- var t3 = this.input.charCodeAt(this.pos + 1);
13304
- return t3 === e3 ? t3 !== 45 || this.inModule || this.input.charCodeAt(this.pos + 2) !== 62 || this.lastTokEnd !== 0 && !j.test(this.input.slice(this.lastTokEnd, this.pos)) ? this.finishOp(O.incDec, 2) : (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : t3 === 61 ? this.finishOp(O.assign, 2) : this.finishOp(O.plusMin, 1);
13305
- }, je.readToken_lt_gt = function(e3) {
13306
- var t3 = this.input.charCodeAt(this.pos + 1), i2 = 1;
13307
- return t3 === e3 ? (i2 = e3 === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2, this.input.charCodeAt(this.pos + i2) === 61 ? this.finishOp(O.assign, i2 + 1) : this.finishOp(O.bitShift, i2)) : t3 !== 33 || e3 !== 60 || this.inModule || this.input.charCodeAt(this.pos + 2) !== 45 || this.input.charCodeAt(this.pos + 3) !== 45 ? (t3 === 61 && (i2 = 2), this.finishOp(O.relational, i2)) : (this.skipLineComment(4), this.skipSpace(), this.nextToken());
13308
- }, je.readToken_eq_excl = function(e3) {
13309
- var t3 = this.input.charCodeAt(this.pos + 1);
13310
- return t3 === 61 ? this.finishOp(O.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) : e3 === 61 && t3 === 62 && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(O.arrow)) : this.finishOp(e3 === 61 ? O.eq : O.prefix, 1);
13311
- }, je.readToken_question = function() {
13312
- var e3 = this.options.ecmaVersion;
13313
- if (e3 >= 11) {
13314
- var t3 = this.input.charCodeAt(this.pos + 1);
13315
- if (t3 === 46) {
13316
- var i2 = this.input.charCodeAt(this.pos + 2);
13317
- if (i2 < 48 || i2 > 57)
13318
- return this.finishOp(O.questionDot, 2);
13319
- }
13320
- if (t3 === 63) {
13321
- if (e3 >= 12) {
13322
- if (this.input.charCodeAt(this.pos + 2) === 61)
13323
- return this.finishOp(O.assign, 3);
13324
- }
13325
- return this.finishOp(O.coalesce, 2);
13326
- }
13327
- }
13328
- return this.finishOp(O.question, 1);
13329
- }, je.readToken_numberSign = function() {
13330
- var e3 = 35;
13331
- if (this.options.ecmaVersion >= 13 && (++this.pos, isIdentifierStart(e3 = this.fullCharCodeAtPos(), true) || e3 === 92))
13332
- return this.finishToken(O.privateId, this.readWord1());
13333
- this.raise(this.pos, "Unexpected character '" + codePointToString(e3) + "'");
13334
- }, je.getTokenFromCode = function(e3) {
13335
- switch (e3) {
13336
- case 46:
13337
- return this.readToken_dot();
13338
- case 40:
13339
- return ++this.pos, this.finishToken(O.parenL);
13340
- case 41:
13341
- return ++this.pos, this.finishToken(O.parenR);
13342
- case 59:
13343
- return ++this.pos, this.finishToken(O.semi);
13344
- case 44:
13345
- return ++this.pos, this.finishToken(O.comma);
13346
- case 91:
13347
- return ++this.pos, this.finishToken(O.bracketL);
13348
- case 93:
13349
- return ++this.pos, this.finishToken(O.bracketR);
13350
- case 123:
13351
- return ++this.pos, this.finishToken(O.braceL);
13352
- case 125:
13353
- return ++this.pos, this.finishToken(O.braceR);
13354
- case 58:
13355
- return ++this.pos, this.finishToken(O.colon);
13356
- case 96:
13357
- if (this.options.ecmaVersion < 6)
13358
- break;
13359
- return ++this.pos, this.finishToken(O.backQuote);
13360
- case 48:
13361
- var t3 = this.input.charCodeAt(this.pos + 1);
13362
- if (t3 === 120 || t3 === 88)
13363
- return this.readRadixNumber(16);
13364
- if (this.options.ecmaVersion >= 6) {
13365
- if (t3 === 111 || t3 === 79)
13366
- return this.readRadixNumber(8);
13367
- if (t3 === 98 || t3 === 66)
13368
- return this.readRadixNumber(2);
13369
- }
13370
- case 49:
13371
- case 50:
13372
- case 51:
13373
- case 52:
13374
- case 53:
13375
- case 54:
13376
- case 55:
13377
- case 56:
13378
- case 57:
13379
- return this.readNumber(false);
13380
- case 34:
13381
- case 39:
13382
- return this.readString(e3);
13383
- case 47:
13384
- return this.readToken_slash();
13385
- case 37:
13386
- case 42:
13387
- return this.readToken_mult_modulo_exp(e3);
13388
- case 124:
13389
- case 38:
13390
- return this.readToken_pipe_amp(e3);
13391
- case 94:
13392
- return this.readToken_caret();
13393
- case 43:
13394
- case 45:
13395
- return this.readToken_plus_min(e3);
13396
- case 60:
13397
- case 62:
13398
- return this.readToken_lt_gt(e3);
13399
- case 61:
13400
- case 33:
13401
- return this.readToken_eq_excl(e3);
13402
- case 63:
13403
- return this.readToken_question();
13404
- case 126:
13405
- return this.finishOp(O.prefix, 1);
13406
- case 35:
13407
- return this.readToken_numberSign();
13408
- }
13409
- this.raise(this.pos, "Unexpected character '" + codePointToString(e3) + "'");
13410
- }, je.finishOp = function(e3, t3) {
13411
- var i2 = this.input.slice(this.pos, this.pos + t3);
13412
- return this.pos += t3, this.finishToken(e3, i2);
13413
- }, je.readRegexp = function() {
13414
- for (var e3, t3, i2 = this.pos;; ) {
13415
- this.pos >= this.input.length && this.raise(i2, "Unterminated regular expression");
13416
- var n2 = this.input.charAt(this.pos);
13417
- if (j.test(n2) && this.raise(i2, "Unterminated regular expression"), e3)
13418
- e3 = false;
13419
- else {
13420
- if (n2 === "[")
13421
- t3 = true;
13422
- else if (n2 === "]" && t3)
13423
- t3 = false;
13424
- else if (n2 === "/" && !t3)
13425
- break;
13426
- e3 = n2 === "\\";
13427
- }
13428
- ++this.pos;
13429
- }
13430
- var a2 = this.input.slice(i2, this.pos);
13431
- ++this.pos;
13432
- var c2 = this.pos, l2 = this.readWord1();
13433
- this.containsEsc && this.unexpected(c2);
13434
- var y2 = this.regexpState || (this.regexpState = new acorn_RegExpValidationState(this));
13435
- y2.reset(i2, a2, l2), this.validateRegExpFlags(y2), this.validateRegExpPattern(y2);
13436
- var E2 = null;
13437
- try {
13438
- E2 = new RegExp(a2, l2);
13439
- } catch (e4) {}
13440
- return this.finishToken(O.regexp, { pattern: a2, flags: l2, value: E2 });
13441
- }, je.readInt = function(e3, t3, i2) {
13442
- for (var n2 = this.options.ecmaVersion >= 12 && t3 === undefined, a2 = i2 && this.input.charCodeAt(this.pos) === 48, c2 = this.pos, l2 = 0, y2 = 0, E2 = 0, w2 = t3 == null ? 1 / 0 : t3;E2 < w2; ++E2, ++this.pos) {
13443
- var C3 = this.input.charCodeAt(this.pos), S2 = undefined;
13444
- if (n2 && C3 === 95)
13445
- a2 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), y2 === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), E2 === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), y2 = C3;
13446
- else {
13447
- if ((S2 = C3 >= 97 ? C3 - 97 + 10 : C3 >= 65 ? C3 - 65 + 10 : C3 >= 48 && C3 <= 57 ? C3 - 48 : 1 / 0) >= e3)
13448
- break;
13449
- y2 = C3, l2 = l2 * e3 + S2;
13450
- }
13451
- }
13452
- return n2 && y2 === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === c2 || t3 != null && this.pos - c2 !== t3 ? null : l2;
13453
- }, je.readRadixNumber = function(e3) {
13454
- var t3 = this.pos;
13455
- this.pos += 2;
13456
- var i2 = this.readInt(e3);
13457
- return i2 == null && this.raise(this.start + 2, "Expected number in radix " + e3), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i2 = stringToBigInt(this.input.slice(t3, this.pos)), ++this.pos) : isIdentifierStart(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(O.num, i2);
13458
- }, je.readNumber = function(e3) {
13459
- var t3 = this.pos;
13460
- e3 || this.readInt(10, undefined, true) !== null || this.raise(t3, "Invalid number");
13461
- var i2 = this.pos - t3 >= 2 && this.input.charCodeAt(t3) === 48;
13462
- i2 && this.strict && this.raise(t3, "Invalid number");
13463
- var n2 = this.input.charCodeAt(this.pos);
13464
- if (!i2 && !e3 && this.options.ecmaVersion >= 11 && n2 === 110) {
13465
- var a2 = stringToBigInt(this.input.slice(t3, this.pos));
13466
- return ++this.pos, isIdentifierStart(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(O.num, a2);
13467
- }
13468
- i2 && /[89]/.test(this.input.slice(t3, this.pos)) && (i2 = false), n2 !== 46 || i2 || (++this.pos, this.readInt(10), n2 = this.input.charCodeAt(this.pos)), n2 !== 69 && n2 !== 101 || i2 || ((n2 = this.input.charCodeAt(++this.pos)) !== 43 && n2 !== 45 || ++this.pos, this.readInt(10) === null && this.raise(t3, "Invalid number")), isIdentifierStart(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
13469
- var c2, l2 = (c2 = this.input.slice(t3, this.pos), i2 ? parseInt(c2, 8) : parseFloat(c2.replace(/_/g, "")));
13470
- return this.finishToken(O.num, l2);
13471
- }, je.readCodePoint = function() {
13472
- var e3;
13473
- if (this.input.charCodeAt(this.pos) === 123) {
13474
- this.options.ecmaVersion < 6 && this.unexpected();
13475
- var t3 = ++this.pos;
13476
- e3 = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos), ++this.pos, e3 > 1114111 && this.invalidStringToken(t3, "Code point out of bounds");
13477
- } else
13478
- e3 = this.readHexChar(4);
13479
- return e3;
13480
- }, je.readString = function(e3) {
13481
- for (var t3 = "", i2 = ++this.pos;; ) {
13482
- this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
13483
- var n2 = this.input.charCodeAt(this.pos);
13484
- if (n2 === e3)
13485
- break;
13486
- n2 === 92 ? (t3 += this.input.slice(i2, this.pos), t3 += this.readEscapedChar(false), i2 = this.pos) : n2 === 8232 || n2 === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (isNewLine(n2) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
13487
- }
13488
- return t3 += this.input.slice(i2, this.pos++), this.finishToken(O.string, t3);
13489
- };
13490
- var Fe = {};
13491
- je.tryReadTemplateToken = function() {
13492
- this.inTemplateElement = true;
13493
- try {
13494
- this.readTmplToken();
13495
- } catch (e3) {
13496
- if (e3 !== Fe)
13497
- throw e3;
13498
- this.readInvalidTemplateToken();
13499
- }
13500
- this.inTemplateElement = false;
13501
- }, je.invalidStringToken = function(e3, t3) {
13502
- if (this.inTemplateElement && this.options.ecmaVersion >= 9)
13503
- throw Fe;
13504
- this.raise(e3, t3);
13505
- }, je.readTmplToken = function() {
13506
- for (var e3 = "", t3 = this.pos;; ) {
13507
- this.pos >= this.input.length && this.raise(this.start, "Unterminated template");
13508
- var i2 = this.input.charCodeAt(this.pos);
13509
- if (i2 === 96 || i2 === 36 && this.input.charCodeAt(this.pos + 1) === 123)
13510
- return this.pos !== this.start || this.type !== O.template && this.type !== O.invalidTemplate ? (e3 += this.input.slice(t3, this.pos), this.finishToken(O.template, e3)) : i2 === 36 ? (this.pos += 2, this.finishToken(O.dollarBraceL)) : (++this.pos, this.finishToken(O.backQuote));
13511
- if (i2 === 92)
13512
- e3 += this.input.slice(t3, this.pos), e3 += this.readEscapedChar(true), t3 = this.pos;
13513
- else if (isNewLine(i2)) {
13514
- switch (e3 += this.input.slice(t3, this.pos), ++this.pos, i2) {
13515
- case 13:
13516
- this.input.charCodeAt(this.pos) === 10 && ++this.pos;
13517
- case 10:
13518
- e3 += `
13519
- `;
13520
- break;
13521
- default:
13522
- e3 += String.fromCharCode(i2);
13523
- }
13524
- this.options.locations && (++this.curLine, this.lineStart = this.pos), t3 = this.pos;
13525
- } else
13526
- ++this.pos;
13527
- }
13528
- }, je.readInvalidTemplateToken = function() {
13529
- for (;this.pos < this.input.length; this.pos++)
13530
- switch (this.input[this.pos]) {
13531
- case "\\":
13532
- ++this.pos;
13533
- break;
13534
- case "$":
13535
- if (this.input[this.pos + 1] !== "{")
13536
- break;
13537
- case "`":
13538
- return this.finishToken(O.invalidTemplate, this.input.slice(this.start, this.pos));
13539
- case "\r":
13540
- this.input[this.pos + 1] === `
13541
- ` && ++this.pos;
13542
- case `
13543
- `:
13544
- case "\u2028":
13545
- case "\u2029":
13546
- ++this.curLine, this.lineStart = this.pos + 1;
13547
- }
13548
- this.raise(this.start, "Unterminated template");
13549
- }, je.readEscapedChar = function(e3) {
13550
- var t3 = this.input.charCodeAt(++this.pos);
13551
- switch (++this.pos, t3) {
13552
- case 110:
13553
- return `
13554
- `;
13555
- case 114:
13556
- return "\r";
13557
- case 120:
13558
- return String.fromCharCode(this.readHexChar(2));
13559
- case 117:
13560
- return codePointToString(this.readCodePoint());
13561
- case 116:
13562
- return "\t";
13563
- case 98:
13564
- return "\b";
13565
- case 118:
13566
- return "\v";
13567
- case 102:
13568
- return "\f";
13569
- case 13:
13570
- this.input.charCodeAt(this.pos) === 10 && ++this.pos;
13571
- case 10:
13572
- return this.options.locations && (this.lineStart = this.pos, ++this.curLine), "";
13573
- case 56:
13574
- case 57:
13575
- if (this.strict && this.invalidStringToken(this.pos - 1, "Invalid escape sequence"), e3) {
13576
- var i2 = this.pos - 1;
13577
- this.invalidStringToken(i2, "Invalid escape sequence in template string");
13578
- }
13579
- default:
13580
- if (t3 >= 48 && t3 <= 55) {
13581
- var n2 = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0], a2 = parseInt(n2, 8);
13582
- return a2 > 255 && (n2 = n2.slice(0, -1), a2 = parseInt(n2, 8)), this.pos += n2.length - 1, t3 = this.input.charCodeAt(this.pos), n2 === "0" && t3 !== 56 && t3 !== 57 || !this.strict && !e3 || this.invalidStringToken(this.pos - 1 - n2.length, e3 ? "Octal literal in template string" : "Octal literal in strict mode"), String.fromCharCode(a2);
13583
- }
13584
- return isNewLine(t3) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(t3);
13585
- }
13586
- }, je.readHexChar = function(e3) {
13587
- var t3 = this.pos, i2 = this.readInt(16, e3);
13588
- return i2 === null && this.invalidStringToken(t3, "Bad character escape sequence"), i2;
13589
- }, je.readWord1 = function() {
13590
- this.containsEsc = false;
13591
- for (var e3 = "", t3 = true, i2 = this.pos, n2 = this.options.ecmaVersion >= 6;this.pos < this.input.length; ) {
13592
- var a2 = this.fullCharCodeAtPos();
13593
- if (isIdentifierChar(a2, n2))
13594
- this.pos += a2 <= 65535 ? 1 : 2;
13595
- else {
13596
- if (a2 !== 92)
13597
- break;
13598
- this.containsEsc = true, e3 += this.input.slice(i2, this.pos);
13599
- var c2 = this.pos;
13600
- this.input.charCodeAt(++this.pos) !== 117 && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos;
13601
- var l2 = this.readCodePoint();
13602
- (t3 ? isIdentifierStart : isIdentifierChar)(l2, n2) || this.invalidStringToken(c2, "Invalid Unicode escape"), e3 += codePointToString(l2), i2 = this.pos;
13603
- }
13604
- t3 = false;
13605
- }
13606
- return e3 + this.input.slice(i2, this.pos);
13607
- }, je.readWord = function() {
13608
- var e3 = this.readWord1(), t3 = O.name;
13609
- return this.keywords.test(e3) && (t3 = N[e3]), this.finishToken(t3, e3);
13610
- };
13611
- acorn_Parser.acorn = { Parser: acorn_Parser, version: "8.16.0", defaultOptions: X, Position: acorn_Position, SourceLocation: acorn_SourceLocation, getLineInfo, Node: acorn_Node, TokenType: acorn_TokenType, tokTypes: O, keywordTypes: N, TokContext: acorn_TokContext, tokContexts: fe, isIdentifierChar, isIdentifierStart, Token: acorn_Token, isNewLine, lineBreak: j, lineBreakG: F, nonASCIIwhitespace: B };
13612
- var Be = __webpack_require__("node:module"), $e = __webpack_require__("node:fs");
13613
- String.fromCharCode;
13614
- const qe = /\/$|\/\?|\/#/, Ge = /^\.?\//;
13615
- function hasTrailingSlash(e3 = "", t3) {
13616
- return t3 ? qe.test(e3) : e3.endsWith("/");
13617
- }
13618
- function withTrailingSlash(e3 = "", t3) {
13619
- if (!t3)
13620
- return e3.endsWith("/") ? e3 : e3 + "/";
13621
- if (hasTrailingSlash(e3, true))
13622
- return e3 || "/";
13623
- let i2 = e3, n2 = "";
13624
- const a2 = e3.indexOf("#");
13625
- if (a2 !== -1 && (i2 = e3.slice(0, a2), n2 = e3.slice(a2), !i2))
13626
- return n2;
13627
- const [c2, ...l2] = i2.split("?");
13628
- return c2 + "/" + (l2.length > 0 ? `?${l2.join("?")}` : "") + n2;
13629
- }
13630
- function isNonEmptyURL(e3) {
13631
- return e3 && e3 !== "/";
13632
- }
13633
- function dist_joinURL(e3, ...t3) {
13634
- let i2 = e3 || "";
13635
- for (const e4 of t3.filter((e5) => isNonEmptyURL(e5)))
13636
- if (i2) {
13637
- const t4 = e4.replace(Ge, "");
13638
- i2 = withTrailingSlash(i2) + t4;
13639
- } else
13640
- i2 = e4;
13641
- return i2;
13642
- }
13643
- Symbol.for("ufo:protocolRelative");
13644
- const Ke = /^[A-Za-z]:\//;
13645
- function pathe_M_eThtNZ_normalizeWindowsPath(e3 = "") {
13646
- return e3 ? e3.replace(/\\/g, "/").replace(Ke, (e4) => e4.toUpperCase()) : e3;
13647
- }
13648
- const He = /^[/\\]{2}/, ze = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, Je = /^[A-Za-z]:$/, Ye = /.(\.[^./]+|\.)$/, pathe_M_eThtNZ_normalize = function(e3) {
13649
- if (e3.length === 0)
13650
- return ".";
13651
- const t3 = (e3 = pathe_M_eThtNZ_normalizeWindowsPath(e3)).match(He), i2 = isAbsolute2(e3), n2 = e3[e3.length - 1] === "/";
13652
- return (e3 = normalizeString(e3, !i2)).length === 0 ? i2 ? "/" : n2 ? "./" : "." : (n2 && (e3 += "/"), Je.test(e3) && (e3 += "/"), t3 ? i2 ? `//${e3}` : `//./${e3}` : i2 && !isAbsolute2(e3) ? `/${e3}` : e3);
13653
- }, pathe_M_eThtNZ_join = function(...e3) {
13654
- let t3 = "";
13655
- for (const i2 of e3)
13656
- if (i2)
13657
- if (t3.length > 0) {
13658
- const e4 = t3[t3.length - 1] === "/", n2 = i2[0] === "/";
13659
- t3 += e4 && n2 ? i2.slice(1) : e4 || n2 ? i2 : `/${i2}`;
13660
- } else
13661
- t3 += i2;
13662
- return pathe_M_eThtNZ_normalize(t3);
13663
- };
13664
- function pathe_M_eThtNZ_cwd() {
13665
- return typeof process != "undefined" && typeof process.cwd == "function" ? process.cwd().replace(/\\/g, "/") : "/";
13666
- }
13667
- const pathe_M_eThtNZ_resolve = function(...e3) {
13668
- let t3 = "", i2 = false;
13669
- for (let n2 = (e3 = e3.map((e4) => pathe_M_eThtNZ_normalizeWindowsPath(e4))).length - 1;n2 >= -1 && !i2; n2--) {
13670
- const a2 = n2 >= 0 ? e3[n2] : pathe_M_eThtNZ_cwd();
13671
- a2 && a2.length !== 0 && (t3 = `${a2}/${t3}`, i2 = isAbsolute2(a2));
13672
- }
13673
- return t3 = normalizeString(t3, !i2), i2 && !isAbsolute2(t3) ? `/${t3}` : t3.length > 0 ? t3 : ".";
13674
- };
13675
- function normalizeString(e3, t3) {
13676
- let i2 = "", n2 = 0, a2 = -1, c2 = 0, l2 = null;
13677
- for (let y2 = 0;y2 <= e3.length; ++y2) {
13678
- if (y2 < e3.length)
13679
- l2 = e3[y2];
13680
- else {
13681
- if (l2 === "/")
13682
- break;
13683
- l2 = "/";
13684
- }
13685
- if (l2 === "/") {
13686
- if (a2 === y2 - 1 || c2 === 1)
13687
- ;
13688
- else if (c2 === 2) {
13689
- if (i2.length < 2 || n2 !== 2 || i2[i2.length - 1] !== "." || i2[i2.length - 2] !== ".") {
13690
- if (i2.length > 2) {
13691
- const e4 = i2.lastIndexOf("/");
13692
- e4 === -1 ? (i2 = "", n2 = 0) : (i2 = i2.slice(0, e4), n2 = i2.length - 1 - i2.lastIndexOf("/")), a2 = y2, c2 = 0;
13693
- continue;
13694
- }
13695
- if (i2.length > 0) {
13696
- i2 = "", n2 = 0, a2 = y2, c2 = 0;
13697
- continue;
13698
- }
13699
- }
13700
- t3 && (i2 += i2.length > 0 ? "/.." : "..", n2 = 2);
13701
- } else
13702
- i2.length > 0 ? i2 += `/${e3.slice(a2 + 1, y2)}` : i2 = e3.slice(a2 + 1, y2), n2 = y2 - a2 - 1;
13703
- a2 = y2, c2 = 0;
13704
- } else
13705
- l2 === "." && c2 !== -1 ? ++c2 : c2 = -1;
13706
- }
13707
- return i2;
13708
- }
13709
- const isAbsolute2 = function(e3) {
13710
- return ze.test(e3);
13711
- }, extname = function(e3) {
13712
- if (e3 === "..")
13713
- return "";
13714
- const t3 = Ye.exec(pathe_M_eThtNZ_normalizeWindowsPath(e3));
13715
- return t3 && t3[1] || "";
13716
- }, pathe_M_eThtNZ_dirname = function(e3) {
13717
- const t3 = pathe_M_eThtNZ_normalizeWindowsPath(e3).replace(/\/$/, "").split("/").slice(0, -1);
13718
- return t3.length === 1 && Je.test(t3[0]) && (t3[0] += "/"), t3.join("/") || (isAbsolute2(e3) ? "/" : ".");
13719
- }, basename3 = function(e3, t3) {
13720
- const i2 = pathe_M_eThtNZ_normalizeWindowsPath(e3).split("/");
13721
- let n2 = "";
13722
- for (let e4 = i2.length - 1;e4 >= 0; e4--) {
13723
- const t4 = i2[e4];
13724
- if (t4) {
13725
- n2 = t4;
13726
- break;
13727
- }
13728
- }
13729
- return t3 && n2.endsWith(t3) ? n2.slice(0, -t3.length) : n2;
13730
- }, Qe = __require("node:url"), Ze = __require("node:assert"), Xe = __require("node:process");
13731
- var et = __webpack_require__("node:path");
13732
- const tt = __require("node:v8"), it = __require("node:util"), st = new Set(Be.builtinModules);
13733
- function normalizeSlash(e3) {
13734
- return e3.replace(/\\/g, "/");
13735
- }
13736
- const rt = {}.hasOwnProperty, nt = /^([A-Z][a-z\d]*)+$/, at = new Set(["string", "function", "number", "object", "Function", "Object", "boolean", "bigint", "symbol"]), ot = {};
13737
- function formatList(e3, t3 = "and") {
13738
- return e3.length < 3 ? e3.join(` ${t3} `) : `${e3.slice(0, -1).join(", ")}, ${t3} ${e3[e3.length - 1]}`;
13739
- }
13740
- const ct = new Map;
13741
- let ht;
13742
- function createError(e3, t3, i2) {
13743
- return ct.set(e3, t3), function(e4, t4) {
13744
- return NodeError;
13745
- function NodeError(...i3) {
13746
- const n2 = Error.stackTraceLimit;
13747
- isErrorStackTraceLimitWritable() && (Error.stackTraceLimit = 0);
13748
- const a2 = new e4;
13749
- isErrorStackTraceLimitWritable() && (Error.stackTraceLimit = n2);
13750
- const c2 = function(e5, t5, i4) {
13751
- const n3 = ct.get(e5);
13752
- if (Ze.ok(n3 !== undefined, "expected `message` to be found"), typeof n3 == "function")
13753
- return Ze.ok(n3.length <= t5.length, `Code: ${e5}; The provided arguments length (${t5.length}) does not match the required ones (${n3.length}).`), Reflect.apply(n3, i4, t5);
13754
- const a3 = /%[dfijoOs]/g;
13755
- let c3 = 0;
13756
- for (;a3.exec(n3) !== null; )
13757
- c3++;
13758
- return Ze.ok(c3 === t5.length, `Code: ${e5}; The provided arguments length (${t5.length}) does not match the required ones (${c3}).`), t5.length === 0 ? n3 : (t5.unshift(n3), Reflect.apply(it.format, null, t5));
13759
- }(t4, i3, a2);
13760
- return Object.defineProperties(a2, { message: { value: c2, enumerable: false, writable: true, configurable: true }, toString: { value() {
13761
- return `${this.name} [${t4}]: ${this.message}`;
13762
- }, enumerable: false, writable: true, configurable: true } }), lt(a2), a2.code = t4, a2;
13763
- }
13764
- }(i2, e3);
13765
- }
13766
- function isErrorStackTraceLimitWritable() {
13767
- try {
13768
- if (tt.startupSnapshot.isBuildingSnapshot())
13769
- return false;
13770
- } catch {}
13771
- const e3 = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
13772
- return e3 === undefined ? Object.isExtensible(Error) : rt.call(e3, "writable") && e3.writable !== undefined ? e3.writable : e3.set !== undefined;
13773
- }
13774
- ot.ERR_INVALID_ARG_TYPE = createError("ERR_INVALID_ARG_TYPE", (e3, t3, i2) => {
13775
- Ze.ok(typeof e3 == "string", "'name' must be a string"), Array.isArray(t3) || (t3 = [t3]);
13776
- let n2 = "The ";
13777
- if (e3.endsWith(" argument"))
13778
- n2 += `${e3} `;
13779
- else {
13780
- const t4 = e3.includes(".") ? "property" : "argument";
13781
- n2 += `"${e3}" ${t4} `;
13782
- }
13783
- n2 += "must be ";
13784
- const a2 = [], c2 = [], l2 = [];
13785
- for (const e4 of t3)
13786
- Ze.ok(typeof e4 == "string", "All expected entries have to be of type string"), at.has(e4) ? a2.push(e4.toLowerCase()) : nt.exec(e4) === null ? (Ze.ok(e4 !== "object", 'The value "object" should be written as "Object"'), l2.push(e4)) : c2.push(e4);
13787
- if (c2.length > 0) {
13788
- const e4 = a2.indexOf("object");
13789
- e4 !== -1 && (a2.slice(e4, 1), c2.push("Object"));
13790
- }
13791
- return a2.length > 0 && (n2 += `${a2.length > 1 ? "one of type" : "of type"} ${formatList(a2, "or")}`, (c2.length > 0 || l2.length > 0) && (n2 += " or ")), c2.length > 0 && (n2 += `an instance of ${formatList(c2, "or")}`, l2.length > 0 && (n2 += " or ")), l2.length > 0 && (l2.length > 1 ? n2 += `one of ${formatList(l2, "or")}` : (l2[0].toLowerCase() !== l2[0] && (n2 += "an "), n2 += `${l2[0]}`)), n2 += `. Received ${function(e4) {
13792
- if (e4 == null)
13793
- return String(e4);
13794
- if (typeof e4 == "function" && e4.name)
13795
- return `function ${e4.name}`;
13796
- if (typeof e4 == "object")
13797
- return e4.constructor && e4.constructor.name ? `an instance of ${e4.constructor.name}` : `${(0, it.inspect)(e4, { depth: -1 })}`;
13798
- let t4 = (0, it.inspect)(e4, { colors: false });
13799
- t4.length > 28 && (t4 = `${t4.slice(0, 25)}...`);
13800
- return `type ${typeof e4} (${t4})`;
13801
- }(i2)}`, n2;
13802
- }, TypeError), ot.ERR_INVALID_MODULE_SPECIFIER = createError("ERR_INVALID_MODULE_SPECIFIER", (e3, t3, i2 = undefined) => `Invalid module "${e3}" ${t3}${i2 ? ` imported from ${i2}` : ""}`, TypeError), ot.ERR_INVALID_PACKAGE_CONFIG = createError("ERR_INVALID_PACKAGE_CONFIG", (e3, t3, i2) => `Invalid package config ${e3}${t3 ? ` while importing ${t3}` : ""}${i2 ? `. ${i2}` : ""}`, Error), ot.ERR_INVALID_PACKAGE_TARGET = createError("ERR_INVALID_PACKAGE_TARGET", (e3, t3, i2, n2 = false, a2 = undefined) => {
13803
- const c2 = typeof i2 == "string" && !n2 && i2.length > 0 && !i2.startsWith("./");
13804
- return t3 === "." ? (Ze.ok(n2 === false), `Invalid "exports" main target ${JSON.stringify(i2)} defined in the package config ${e3}package.json${a2 ? ` imported from ${a2}` : ""}${c2 ? '; targets must start with "./"' : ""}`) : `Invalid "${n2 ? "imports" : "exports"}" target ${JSON.stringify(i2)} defined for '${t3}' in the package config ${e3}package.json${a2 ? ` imported from ${a2}` : ""}${c2 ? '; targets must start with "./"' : ""}`;
13805
- }, Error), ot.ERR_MODULE_NOT_FOUND = createError("ERR_MODULE_NOT_FOUND", (e3, t3, i2 = false) => `Cannot find ${i2 ? "module" : "package"} '${e3}' imported from ${t3}`, Error), ot.ERR_NETWORK_IMPORT_DISALLOWED = createError("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supported: %s", Error), ot.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError("ERR_PACKAGE_IMPORT_NOT_DEFINED", (e3, t3, i2) => `Package import specifier "${e3}" is not defined${t3 ? ` in package ${t3}package.json` : ""} imported from ${i2}`, TypeError), ot.ERR_PACKAGE_PATH_NOT_EXPORTED = createError("ERR_PACKAGE_PATH_NOT_EXPORTED", (e3, t3, i2 = undefined) => t3 === "." ? `No "exports" main defined in ${e3}package.json${i2 ? ` imported from ${i2}` : ""}` : `Package subpath '${t3}' is not defined by "exports" in ${e3}package.json${i2 ? ` imported from ${i2}` : ""}`, Error), ot.ERR_UNSUPPORTED_DIR_IMPORT = createError("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error), ot.ERR_UNSUPPORTED_RESOLVE_REQUEST = createError("ERR_UNSUPPORTED_RESOLVE_REQUEST", 'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.', TypeError), ot.ERR_UNKNOWN_FILE_EXTENSION = createError("ERR_UNKNOWN_FILE_EXTENSION", (e3, t3) => `Unknown file extension "${e3}" for ${t3}`, TypeError), ot.ERR_INVALID_ARG_VALUE = createError("ERR_INVALID_ARG_VALUE", (e3, t3, i2 = "is invalid") => {
13806
- let n2 = (0, it.inspect)(t3);
13807
- n2.length > 128 && (n2 = `${n2.slice(0, 128)}...`);
13808
- return `The ${e3.includes(".") ? "property" : "argument"} '${e3}' ${i2}. Received ${n2}`;
13809
- }, TypeError);
13810
- const lt = function(e3) {
13811
- const t3 = "__node_internal_" + e3.name;
13812
- return Object.defineProperty(e3, "name", { value: t3 }), e3;
13813
- }(function(e3) {
13814
- const t3 = isErrorStackTraceLimitWritable();
13815
- return t3 && (ht = Error.stackTraceLimit, Error.stackTraceLimit = Number.POSITIVE_INFINITY), Error.captureStackTrace(e3), t3 && (Error.stackTraceLimit = ht), e3;
13816
- });
13817
- const pt = {}.hasOwnProperty, { ERR_INVALID_PACKAGE_CONFIG: ut } = ot, dt = new Map;
13818
- function read(e3, { base: t3, specifier: i2 }) {
13819
- const n2 = dt.get(e3);
13820
- if (n2)
13821
- return n2;
13822
- let a2;
13823
- try {
13824
- a2 = $e.readFileSync(et.toNamespacedPath(e3), "utf8");
13825
- } catch (e4) {
13826
- const t4 = e4;
13827
- if (t4.code !== "ENOENT")
13828
- throw t4;
13829
- }
13830
- const c2 = { exists: false, pjsonPath: e3, main: undefined, name: undefined, type: "none", exports: undefined, imports: undefined };
13831
- if (a2 !== undefined) {
13832
- let n3;
13833
- try {
13834
- n3 = JSON.parse(a2);
13835
- } catch (n4) {
13836
- const a3 = n4, c3 = new ut(e3, (t3 ? `"${i2}" from ` : "") + (0, Qe.fileURLToPath)(t3 || i2), a3.message);
13837
- throw c3.cause = a3, c3;
13838
- }
13839
- c2.exists = true, pt.call(n3, "name") && typeof n3.name == "string" && (c2.name = n3.name), pt.call(n3, "main") && typeof n3.main == "string" && (c2.main = n3.main), pt.call(n3, "exports") && (c2.exports = n3.exports), pt.call(n3, "imports") && (c2.imports = n3.imports), !pt.call(n3, "type") || n3.type !== "commonjs" && n3.type !== "module" || (c2.type = n3.type);
13840
- }
13841
- return dt.set(e3, c2), c2;
13842
- }
13843
- function getPackageScopeConfig(e3) {
13844
- let t3 = new URL("package.json", e3);
13845
- for (;; ) {
13846
- if (t3.pathname.endsWith("node_modules/package.json"))
13847
- break;
13848
- const i2 = read((0, Qe.fileURLToPath)(t3), { specifier: e3 });
13849
- if (i2.exists)
13850
- return i2;
13851
- const n2 = t3;
13852
- if (t3 = new URL("../package.json", t3), t3.pathname === n2.pathname)
13853
- break;
13854
- }
13855
- return { pjsonPath: (0, Qe.fileURLToPath)(t3), exists: false, type: "none" };
13856
- }
13857
- function getPackageType(e3) {
13858
- return getPackageScopeConfig(e3).type;
13859
- }
13860
- const { ERR_UNKNOWN_FILE_EXTENSION: ft } = ot, mt = {}.hasOwnProperty, gt = { __proto__: null, ".cjs": "commonjs", ".js": "module", ".json": "json", ".mjs": "module" };
13861
- const xt = { __proto__: null, "data:": function(e3) {
13862
- const { 1: t3 } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e3.pathname) || [null, null, null];
13863
- return function(e4) {
13864
- return e4 && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e4) ? "module" : e4 === "application/json" ? "json" : null;
13865
- }(t3);
13866
- }, "file:": function(e3, t3, i2) {
13867
- const n2 = function(e4) {
13868
- const t4 = e4.pathname;
13869
- let i3 = t4.length;
13870
- for (;i3--; ) {
13871
- const e5 = t4.codePointAt(i3);
13872
- if (e5 === 47)
13873
- return "";
13874
- if (e5 === 46)
13875
- return t4.codePointAt(i3 - 1) === 47 ? "" : t4.slice(i3);
13876
- }
13877
- return "";
13878
- }(e3);
13879
- if (n2 === ".js") {
13880
- const t4 = getPackageType(e3);
13881
- return t4 !== "none" ? t4 : "commonjs";
13882
- }
13883
- if (n2 === "") {
13884
- const t4 = getPackageType(e3);
13885
- return t4 === "none" || t4 === "commonjs" ? "commonjs" : "module";
13886
- }
13887
- const a2 = gt[n2];
13888
- if (a2)
13889
- return a2;
13890
- if (i2)
13891
- return;
13892
- const c2 = (0, Qe.fileURLToPath)(e3);
13893
- throw new ft(n2, c2);
13894
- }, "http:": getHttpProtocolModuleFormat, "https:": getHttpProtocolModuleFormat, "node:": () => "builtin" };
13895
- function getHttpProtocolModuleFormat() {}
13896
- const vt = Object.freeze(["node", "import"]), yt = new Set(vt);
13897
- function getConditionsSet(e3) {
13898
- return yt;
13899
- }
13900
- const _t = RegExp.prototype[Symbol.replace], { ERR_INVALID_MODULE_SPECIFIER: Et, ERR_INVALID_PACKAGE_CONFIG: bt, ERR_INVALID_PACKAGE_TARGET: kt, ERR_MODULE_NOT_FOUND: wt, ERR_PACKAGE_IMPORT_NOT_DEFINED: Ct, ERR_PACKAGE_PATH_NOT_EXPORTED: St, ERR_UNSUPPORTED_DIR_IMPORT: It, ERR_UNSUPPORTED_RESOLVE_REQUEST: Tt } = ot, Rt = {}.hasOwnProperty, At = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i, Pt = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i, Lt = /^\.|%|\\/, Nt = /\*/g, Ot = /%2f|%5c/i, Dt = new Set, Vt = /[/\\]{2}/;
13901
- function emitInvalidSegmentDeprecation(e3, t3, i2, n2, a2, c2, l2) {
13902
- if (Xe.noDeprecation)
13903
- return;
13904
- const y2 = (0, Qe.fileURLToPath)(n2), E2 = Vt.exec(l2 ? e3 : t3) !== null;
13905
- Xe.emitWarning(`Use of deprecated ${E2 ? "double slash" : "leading or trailing slash matching"} resolving "${e3}" for module request "${t3}" ${t3 === i2 ? "" : `matched to "${i2}" `}in the "${a2 ? "imports" : "exports"}" field module resolution of the package at ${y2}${c2 ? ` imported from ${(0, Qe.fileURLToPath)(c2)}` : ""}.`, "DeprecationWarning", "DEP0166");
13906
- }
13907
- function emitLegacyIndexDeprecation(e3, t3, i2, n2) {
13908
- if (Xe.noDeprecation)
13909
- return;
13910
- const a2 = function(e4, t4) {
13911
- const i3 = e4.protocol;
13912
- return mt.call(xt, i3) && xt[i3](e4, t4, true) || null;
13913
- }(e3, { parentURL: i2.href });
13914
- if (a2 !== "module")
13915
- return;
13916
- const c2 = (0, Qe.fileURLToPath)(e3.href), l2 = (0, Qe.fileURLToPath)(new URL(".", t3)), y2 = (0, Qe.fileURLToPath)(i2);
13917
- n2 ? et.resolve(l2, n2) !== c2 && Xe.emitWarning(`Package ${l2} has a "main" field set to "${n2}", excluding the full filename and extension to the resolved file at "${c2.slice(l2.length)}", imported from ${y2}.
13918
- Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151") : Xe.emitWarning(`No "main" or "exports" field defined in the package.json for ${l2} resolving the main entry point "${c2.slice(l2.length)}", imported from ${y2}.
13919
- Default "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
13920
- }
13921
- function tryStatSync(e3) {
13922
- try {
13923
- return (0, $e.statSync)(e3);
13924
- } catch {}
13925
- }
13926
- function fileExists(e3) {
13927
- const t3 = (0, $e.statSync)(e3, { throwIfNoEntry: false }), i2 = t3 ? t3.isFile() : undefined;
13928
- return i2 != null && i2;
13929
- }
13930
- function legacyMainResolve(e3, t3, i2) {
13931
- let n2;
13932
- if (t3.main !== undefined) {
13933
- if (n2 = new URL(t3.main, e3), fileExists(n2))
13934
- return n2;
13935
- const a3 = [`./${t3.main}.js`, `./${t3.main}.json`, `./${t3.main}.node`, `./${t3.main}/index.js`, `./${t3.main}/index.json`, `./${t3.main}/index.node`];
13936
- let c3 = -1;
13937
- for (;++c3 < a3.length && (n2 = new URL(a3[c3], e3), !fileExists(n2)); )
13938
- n2 = undefined;
13939
- if (n2)
13940
- return emitLegacyIndexDeprecation(n2, e3, i2, t3.main), n2;
13941
- }
13942
- const a2 = ["./index.js", "./index.json", "./index.node"];
13943
- let c2 = -1;
13944
- for (;++c2 < a2.length && (n2 = new URL(a2[c2], e3), !fileExists(n2)); )
13945
- n2 = undefined;
13946
- if (n2)
13947
- return emitLegacyIndexDeprecation(n2, e3, i2, t3.main), n2;
13948
- throw new wt((0, Qe.fileURLToPath)(new URL(".", e3)), (0, Qe.fileURLToPath)(i2));
13949
- }
13950
- function exportsNotFound(e3, t3, i2) {
13951
- return new St((0, Qe.fileURLToPath)(new URL(".", t3)), e3, i2 && (0, Qe.fileURLToPath)(i2));
13952
- }
13953
- function invalidPackageTarget(e3, t3, i2, n2, a2) {
13954
- return t3 = typeof t3 == "object" && t3 !== null ? JSON.stringify(t3, null, "") : `${t3}`, new kt((0, Qe.fileURLToPath)(new URL(".", i2)), e3, t3, n2, a2 && (0, Qe.fileURLToPath)(a2));
13955
- }
13956
- function resolvePackageTargetString(e3, t3, i2, n2, a2, c2, l2, y2, E2) {
13957
- if (t3 !== "" && !c2 && e3[e3.length - 1] !== "/")
13958
- throw invalidPackageTarget(i2, e3, n2, l2, a2);
13959
- if (!e3.startsWith("./")) {
13960
- if (l2 && !e3.startsWith("../") && !e3.startsWith("/")) {
13961
- let i3 = false;
13962
- try {
13963
- new URL(e3), i3 = true;
13964
- } catch {}
13965
- if (!i3) {
13966
- return packageResolve(c2 ? _t.call(Nt, e3, () => t3) : e3 + t3, n2, E2);
13967
- }
13968
- }
13969
- throw invalidPackageTarget(i2, e3, n2, l2, a2);
13970
- }
13971
- if (At.exec(e3.slice(2)) !== null) {
13972
- if (Pt.exec(e3.slice(2)) !== null)
13973
- throw invalidPackageTarget(i2, e3, n2, l2, a2);
13974
- if (!y2) {
13975
- const y3 = c2 ? i2.replace("*", () => t3) : i2 + t3;
13976
- emitInvalidSegmentDeprecation(c2 ? _t.call(Nt, e3, () => t3) : e3, y3, i2, n2, l2, a2, true);
13977
- }
13978
- }
13979
- const w2 = new URL(e3, n2), C3 = w2.pathname, S2 = new URL(".", n2).pathname;
13980
- if (!C3.startsWith(S2))
13981
- throw invalidPackageTarget(i2, e3, n2, l2, a2);
13982
- if (t3 === "")
13983
- return w2;
13984
- if (At.exec(t3) !== null) {
13985
- const E3 = c2 ? i2.replace("*", () => t3) : i2 + t3;
13986
- if (Pt.exec(t3) === null) {
13987
- if (!y2) {
13988
- emitInvalidSegmentDeprecation(c2 ? _t.call(Nt, e3, () => t3) : e3, E3, i2, n2, l2, a2, false);
13989
- }
13990
- } else
13991
- (function(e4, t4, i3, n3, a3) {
13992
- const c3 = `request is not a valid match in pattern "${t4}" for the "${n3 ? "imports" : "exports"}" resolution of ${(0, Qe.fileURLToPath)(i3)}`;
13993
- throw new Et(e4, c3, a3 && (0, Qe.fileURLToPath)(a3));
13994
- })(E3, i2, n2, l2, a2);
13995
- }
13996
- return c2 ? new URL(_t.call(Nt, w2.href, () => t3)) : new URL(t3, w2);
13997
- }
13998
- function isArrayIndex(e3) {
13999
- const t3 = Number(e3);
14000
- return `${t3}` === e3 && (t3 >= 0 && t3 < 4294967295);
14001
- }
14002
- function resolvePackageTarget(e3, t3, i2, n2, a2, c2, l2, y2, E2) {
14003
- if (typeof t3 == "string")
14004
- return resolvePackageTargetString(t3, i2, n2, e3, a2, c2, l2, y2, E2);
14005
- if (Array.isArray(t3)) {
14006
- const w2 = t3;
14007
- if (w2.length === 0)
14008
- return null;
14009
- let C3, S2 = -1;
14010
- for (;++S2 < w2.length; ) {
14011
- const t4 = w2[S2];
14012
- let I2;
14013
- try {
14014
- I2 = resolvePackageTarget(e3, t4, i2, n2, a2, c2, l2, y2, E2);
14015
- } catch (e4) {
14016
- if (C3 = e4, e4.code === "ERR_INVALID_PACKAGE_TARGET")
14017
- continue;
14018
- throw e4;
14019
- }
14020
- if (I2 !== undefined) {
14021
- if (I2 !== null)
14022
- return I2;
14023
- C3 = null;
14024
- }
14025
- }
14026
- if (C3 == null)
14027
- return null;
14028
- throw C3;
14029
- }
14030
- if (typeof t3 == "object" && t3 !== null) {
14031
- const w2 = Object.getOwnPropertyNames(t3);
14032
- let C3 = -1;
14033
- for (;++C3 < w2.length; ) {
14034
- if (isArrayIndex(w2[C3]))
14035
- throw new bt((0, Qe.fileURLToPath)(e3), a2, '"exports" cannot contain numeric property keys.');
14036
- }
14037
- for (C3 = -1;++C3 < w2.length; ) {
14038
- const S2 = w2[C3];
14039
- if (S2 === "default" || E2 && E2.has(S2)) {
14040
- const w3 = resolvePackageTarget(e3, t3[S2], i2, n2, a2, c2, l2, y2, E2);
14041
- if (w3 === undefined)
14042
- continue;
14043
- return w3;
14044
- }
14045
- }
14046
- return null;
14047
- }
14048
- if (t3 === null)
14049
- return null;
14050
- throw invalidPackageTarget(n2, t3, e3, l2, a2);
14051
- }
14052
- function emitTrailingSlashPatternDeprecation(e3, t3, i2) {
14053
- if (Xe.noDeprecation)
14054
- return;
14055
- const n2 = (0, Qe.fileURLToPath)(t3);
14056
- Dt.has(n2 + "|" + e3) || (Dt.add(n2 + "|" + e3), Xe.emitWarning(`Use of deprecated trailing slash pattern mapping "${e3}" in the "exports" field module resolution of the package at ${n2}${i2 ? ` imported from ${(0, Qe.fileURLToPath)(i2)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, "DeprecationWarning", "DEP0155"));
14057
- }
14058
- function packageExportsResolve(e3, t3, i2, n2, a2) {
14059
- let c2 = i2.exports;
14060
- if (function(e4, t4, i3) {
14061
- if (typeof e4 == "string" || Array.isArray(e4))
14062
- return true;
14063
- if (typeof e4 != "object" || e4 === null)
14064
- return false;
14065
- const n3 = Object.getOwnPropertyNames(e4);
14066
- let a3 = false, c3 = 0, l3 = -1;
14067
- for (;++l3 < n3.length; ) {
14068
- const e5 = n3[l3], y3 = e5 === "" || e5[0] !== ".";
14069
- if (c3++ === 0)
14070
- a3 = y3;
14071
- else if (a3 !== y3)
14072
- throw new bt((0, Qe.fileURLToPath)(t4), i3, `"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`);
14073
- }
14074
- return a3;
14075
- }(c2, e3, n2) && (c2 = { ".": c2 }), Rt.call(c2, t3) && !t3.includes("*") && !t3.endsWith("/")) {
14076
- const i3 = resolvePackageTarget(e3, c2[t3], "", t3, n2, false, false, false, a2);
14077
- if (i3 == null)
14078
- throw exportsNotFound(t3, e3, n2);
14079
- return i3;
14080
- }
14081
- let l2 = "", y2 = "";
14082
- const E2 = Object.getOwnPropertyNames(c2);
14083
- let w2 = -1;
14084
- for (;++w2 < E2.length; ) {
14085
- const i3 = E2[w2], a3 = i3.indexOf("*");
14086
- if (a3 !== -1 && t3.startsWith(i3.slice(0, a3))) {
14087
- t3.endsWith("/") && emitTrailingSlashPatternDeprecation(t3, e3, n2);
14088
- const c3 = i3.slice(a3 + 1);
14089
- t3.length >= i3.length && t3.endsWith(c3) && patternKeyCompare(l2, i3) === 1 && i3.lastIndexOf("*") === a3 && (l2 = i3, y2 = t3.slice(a3, t3.length - c3.length));
14090
- }
14091
- }
14092
- if (l2) {
14093
- const i3 = resolvePackageTarget(e3, c2[l2], y2, l2, n2, true, false, t3.endsWith("/"), a2);
14094
- if (i3 == null)
14095
- throw exportsNotFound(t3, e3, n2);
14096
- return i3;
14097
- }
14098
- throw exportsNotFound(t3, e3, n2);
14099
- }
14100
- function patternKeyCompare(e3, t3) {
14101
- const i2 = e3.indexOf("*"), n2 = t3.indexOf("*"), a2 = i2 === -1 ? e3.length : i2 + 1, c2 = n2 === -1 ? t3.length : n2 + 1;
14102
- return a2 > c2 ? -1 : c2 > a2 || i2 === -1 ? 1 : n2 === -1 || e3.length > t3.length ? -1 : t3.length > e3.length ? 1 : 0;
14103
- }
14104
- function packageImportsResolve(e3, t3, i2) {
14105
- if (e3 === "#" || e3.startsWith("#/") || e3.endsWith("/")) {
14106
- throw new Et(e3, "is not a valid internal imports specifier name", (0, Qe.fileURLToPath)(t3));
14107
- }
14108
- let n2;
14109
- const a2 = getPackageScopeConfig(t3);
14110
- if (a2.exists) {
14111
- n2 = (0, Qe.pathToFileURL)(a2.pjsonPath);
14112
- const c2 = a2.imports;
14113
- if (c2)
14114
- if (Rt.call(c2, e3) && !e3.includes("*")) {
14115
- const a3 = resolvePackageTarget(n2, c2[e3], "", e3, t3, false, true, false, i2);
14116
- if (a3 != null)
14117
- return a3;
14118
- } else {
14119
- let a3 = "", l2 = "";
14120
- const y2 = Object.getOwnPropertyNames(c2);
14121
- let E2 = -1;
14122
- for (;++E2 < y2.length; ) {
14123
- const t4 = y2[E2], i3 = t4.indexOf("*");
14124
- if (i3 !== -1 && e3.startsWith(t4.slice(0, -1))) {
14125
- const n3 = t4.slice(i3 + 1);
14126
- e3.length >= t4.length && e3.endsWith(n3) && patternKeyCompare(a3, t4) === 1 && t4.lastIndexOf("*") === i3 && (a3 = t4, l2 = e3.slice(i3, e3.length - n3.length));
14127
- }
14128
- }
14129
- if (a3) {
14130
- const e4 = resolvePackageTarget(n2, c2[a3], l2, a3, t3, true, true, false, i2);
14131
- if (e4 != null)
14132
- return e4;
14133
- }
14134
- }
14135
- }
14136
- throw function(e4, t4, i3) {
14137
- return new Ct(e4, t4 && (0, Qe.fileURLToPath)(new URL(".", t4)), (0, Qe.fileURLToPath)(i3));
14138
- }(e3, n2, t3);
14139
- }
14140
- function packageResolve(e3, t3, i2) {
14141
- if (Be.builtinModules.includes(e3))
14142
- return new URL("node:" + e3);
14143
- const { packageName: n2, packageSubpath: a2, isScoped: c2 } = function(e4, t4) {
14144
- let i3 = e4.indexOf("/"), n3 = true, a3 = false;
14145
- e4[0] === "@" && (a3 = true, i3 === -1 || e4.length === 0 ? n3 = false : i3 = e4.indexOf("/", i3 + 1));
14146
- const c3 = i3 === -1 ? e4 : e4.slice(0, i3);
14147
- if (Lt.exec(c3) !== null && (n3 = false), !n3)
14148
- throw new Et(e4, "is not a valid package name", (0, Qe.fileURLToPath)(t4));
14149
- return { packageName: c3, packageSubpath: "." + (i3 === -1 ? "" : e4.slice(i3)), isScoped: a3 };
14150
- }(e3, t3), l2 = getPackageScopeConfig(t3);
14151
- if (l2.exists) {
14152
- const e4 = (0, Qe.pathToFileURL)(l2.pjsonPath);
14153
- if (l2.name === n2 && l2.exports !== undefined && l2.exports !== null)
14154
- return packageExportsResolve(e4, a2, l2, t3, i2);
14155
- }
14156
- let y2, E2 = new URL("./node_modules/" + n2 + "/package.json", t3), w2 = (0, Qe.fileURLToPath)(E2);
14157
- do {
14158
- const l3 = tryStatSync(w2.slice(0, -13));
14159
- if (!l3 || !l3.isDirectory()) {
14160
- y2 = w2, E2 = new URL((c2 ? "../../../../node_modules/" : "../../../node_modules/") + n2 + "/package.json", E2), w2 = (0, Qe.fileURLToPath)(E2);
14161
- continue;
14162
- }
14163
- const C3 = read(w2, { base: t3, specifier: e3 });
14164
- return C3.exports !== undefined && C3.exports !== null ? packageExportsResolve(E2, a2, C3, t3, i2) : a2 === "." ? legacyMainResolve(E2, C3, t3) : new URL(a2, E2);
14165
- } while (w2.length !== y2.length);
14166
- }
14167
- function moduleResolve(e3, t3, i2, n2) {
14168
- i2 === undefined && (i2 = getConditionsSet());
14169
- const a2 = t3.protocol, c2 = a2 === "data:" || a2 === "http:" || a2 === "https:";
14170
- let l2;
14171
- if (function(e4) {
14172
- return e4 !== "" && (e4[0] === "/" || function(e5) {
14173
- if (e5[0] === ".") {
14174
- if (e5.length === 1 || e5[1] === "/")
14175
- return true;
14176
- if (e5[1] === "." && (e5.length === 2 || e5[2] === "/"))
14177
- return true;
14178
- }
14179
- return false;
14180
- }(e4));
14181
- }(e3))
14182
- try {
14183
- l2 = new URL(e3, t3);
14184
- } catch (i3) {
14185
- const n3 = new Tt(e3, t3);
14186
- throw n3.cause = i3, n3;
14187
- }
14188
- else if (a2 === "file:" && e3[0] === "#")
14189
- l2 = packageImportsResolve(e3, t3, i2);
14190
- else
14191
- try {
14192
- l2 = new URL(e3);
14193
- } catch (n3) {
14194
- if (c2 && !Be.builtinModules.includes(e3)) {
14195
- const i3 = new Tt(e3, t3);
14196
- throw i3.cause = n3, i3;
14197
- }
14198
- l2 = packageResolve(e3, t3, i2);
14199
- }
14200
- return Ze.ok(l2 !== undefined, "expected to be defined"), l2.protocol !== "file:" ? l2 : function(e4, t4) {
14201
- if (Ot.exec(e4.pathname) !== null)
14202
- throw new Et(e4.pathname, 'must not include encoded "/" or "\\" characters', (0, Qe.fileURLToPath)(t4));
14203
- let i3;
14204
- try {
14205
- i3 = (0, Qe.fileURLToPath)(e4);
14206
- } catch (i4) {
14207
- const n4 = i4;
14208
- throw Object.defineProperty(n4, "input", { value: String(e4) }), Object.defineProperty(n4, "module", { value: String(t4) }), n4;
14209
- }
14210
- const n3 = tryStatSync(i3.endsWith("/") ? i3.slice(-1) : i3);
14211
- if (n3 && n3.isDirectory()) {
14212
- const n4 = new It(i3, (0, Qe.fileURLToPath)(t4));
14213
- throw n4.url = String(e4), n4;
14214
- }
14215
- if (!n3 || !n3.isFile()) {
14216
- const n4 = new wt(i3 || e4.pathname, t4 && (0, Qe.fileURLToPath)(t4), true);
14217
- throw n4.url = String(e4), n4;
14218
- }
14219
- {
14220
- const t5 = (0, $e.realpathSync)(i3), { search: n4, hash: a3 } = e4;
14221
- (e4 = (0, Qe.pathToFileURL)(t5 + (i3.endsWith(et.sep) ? "/" : ""))).search = n4, e4.hash = a3;
14222
- }
14223
- return e4;
14224
- }(l2, t3);
14225
- }
14226
- function fileURLToPath(e3) {
14227
- return typeof e3 != "string" || e3.startsWith("file://") ? normalizeSlash((0, Qe.fileURLToPath)(e3)) : normalizeSlash(e3);
14228
- }
14229
- function pathToFileURL(e3) {
14230
- return (0, Qe.pathToFileURL)(fileURLToPath(e3)).toString();
14231
- }
14232
- const Ut = new Set(["node", "import"]), Mt = [".mjs", ".cjs", ".js", ".json"], jt = new Set(["ERR_MODULE_NOT_FOUND", "ERR_UNSUPPORTED_DIR_IMPORT", "MODULE_NOT_FOUND", "ERR_PACKAGE_PATH_NOT_EXPORTED"]);
14233
- function _tryModuleResolve(e3, t3, i2) {
14234
- try {
14235
- return moduleResolve(e3, t3, i2);
14236
- } catch (e4) {
14237
- if (!jt.has(e4?.code))
14238
- throw e4;
14239
- }
14240
- }
14241
- function _resolve(e3, t3 = {}) {
14242
- if (typeof e3 != "string") {
14243
- if (!(e3 instanceof URL))
14244
- throw new TypeError("input must be a `string` or `URL`");
14245
- e3 = fileURLToPath(e3);
14246
- }
14247
- if (/(?:node|data|http|https):/.test(e3))
14248
- return e3;
14249
- if (st.has(e3))
14250
- return "node:" + e3;
14251
- if (e3.startsWith("file://") && (e3 = fileURLToPath(e3)), isAbsolute2(e3))
14252
- try {
14253
- if ((0, $e.statSync)(e3).isFile())
14254
- return pathToFileURL(e3);
14255
- } catch (e4) {
14256
- if (e4?.code !== "ENOENT")
14257
- throw e4;
14258
- }
14259
- const i2 = t3.conditions ? new Set(t3.conditions) : Ut, n2 = (Array.isArray(t3.url) ? t3.url : [t3.url]).filter(Boolean).map((e4) => new URL(function(e5) {
14260
- return typeof e5 != "string" && (e5 = e5.toString()), /(?:node|data|http|https|file):/.test(e5) ? e5 : st.has(e5) ? "node:" + e5 : "file://" + encodeURI(normalizeSlash(e5));
14261
- }(e4.toString())));
14262
- n2.length === 0 && n2.push(new URL(pathToFileURL(process.cwd())));
14263
- const a2 = [...n2];
14264
- for (const e4 of n2)
14265
- e4.protocol === "file:" && a2.push(new URL("./", e4), new URL(dist_joinURL(e4.pathname, "_index.js"), e4), new URL("node_modules", e4));
14266
- let c2;
14267
- for (const n3 of a2) {
14268
- if (c2 = _tryModuleResolve(e3, n3, i2), c2)
14269
- break;
14270
- for (const a3 of ["", "/index"]) {
14271
- for (const l2 of t3.extensions || Mt)
14272
- if (c2 = _tryModuleResolve(dist_joinURL(e3, a3) + l2, n3, i2), c2)
14273
- break;
14274
- if (c2)
14275
- break;
14276
- }
14277
- if (c2)
14278
- break;
14279
- }
14280
- if (!c2) {
14281
- const t4 = new Error(`Cannot find module ${e3} imported from ${a2.join(", ")}`);
14282
- throw t4.code = "ERR_MODULE_NOT_FOUND", t4;
14283
- }
14284
- return pathToFileURL(c2);
14285
- }
14286
- function resolveSync(e3, t3) {
14287
- return _resolve(e3, t3);
14288
- }
14289
- function resolvePathSync(e3, t3) {
14290
- return fileURLToPath(resolveSync(e3, t3));
14291
- }
14292
- const Ft = /(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m, Bt = /\/\*.+?\*\/|\/\/.*(?=[nr])/g;
14293
- function hasESMSyntax(e3, t3 = {}) {
14294
- return t3.stripComments && (e3 = e3.replace(Bt, "")), Ft.test(e3);
14295
- }
14296
- function escapeStringRegexp(e3) {
14297
- if (typeof e3 != "string")
14298
- throw new TypeError("Expected a string");
14299
- return e3.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
14300
- }
14301
- const $t = new Set(["/", "\\", undefined]), qt = Symbol.for("pathe:normalizedAlias"), Wt = /[/\\]/;
14302
- function normalizeAliases(e3) {
14303
- if (e3[qt])
14304
- return e3;
14305
- const t3 = Object.fromEntries(Object.entries(e3).sort(([e4], [t4]) => function(e5, t5) {
14306
- return t5.split("/").length - e5.split("/").length;
14307
- }(e4, t4)));
14308
- for (const e4 in t3)
14309
- for (const i2 in t3)
14310
- i2 === e4 || e4.startsWith(i2) || t3[e4]?.startsWith(i2) && $t.has(t3[e4][i2.length]) && (t3[e4] = t3[i2] + t3[e4].slice(i2.length));
14311
- return Object.defineProperty(t3, qt, { value: true, enumerable: false }), t3;
14312
- }
14313
- function utils_hasTrailingSlash(e3 = "/") {
14314
- const t3 = e3[e3.length - 1];
14315
- return t3 === "/" || t3 === "\\";
14316
- }
14317
- var Gt = { rE: "2.6.1" };
14318
- const Kt = __require("node:crypto");
14319
- var Ht = __webpack_require__.n(Kt);
14320
- const zt = globalThis.process?.env || Object.create(null), Jt = globalThis.process || { env: zt }, Yt = Jt !== undefined && Jt.env && Jt.env.NODE_ENV || undefined, Qt = [["claude", ["CLAUDECODE", "CLAUDE_CODE"]], ["replit", ["REPL_ID"]], ["gemini", ["GEMINI_CLI"]], ["codex", ["CODEX_SANDBOX", "CODEX_THREAD_ID"]], ["opencode", ["OPENCODE"]], ["pi", [dist_i("PATH", /\.pi[\\/]agent/)]], ["auggie", ["AUGMENT_AGENT"]], ["goose", ["GOOSE_PROVIDER"]], ["devin", [dist_i("EDITOR", /devin/)]], ["cursor", ["CURSOR_AGENT"]], ["kiro", [dist_i("TERM_PROGRAM", /kiro/)]]];
14321
- function dist_i(e3, t3) {
14322
- return () => {
14323
- let i2 = zt[e3];
14324
- return !!i2 && t3.test(i2);
14325
- };
14326
- }
14327
- const Zt = function() {
14328
- let e3 = zt.AI_AGENT;
14329
- if (e3)
14330
- return { name: e3.toLowerCase() };
14331
- for (let [e4, t3] of Qt)
14332
- for (let i2 of t3)
14333
- if (typeof i2 == "string" ? zt[i2] : i2())
14334
- return { name: e4 };
14335
- return {};
14336
- }(), Xt = (Zt.name, Zt.name, [["APPVEYOR"], ["AWS_AMPLIFY", "AWS_APP_ID", { ci: true }], ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"], ["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"], ["APPCIRCLE", "AC_APPCIRCLE"], ["BAMBOO", "bamboo_planKey"], ["BITBUCKET", "BITBUCKET_COMMIT"], ["BITRISE", "BITRISE_IO"], ["BUDDY", "BUDDY_WORKSPACE_ID"], ["BUILDKITE"], ["CIRCLE", "CIRCLECI"], ["CIRRUS", "CIRRUS_CI"], ["CLOUDFLARE_PAGES", "CF_PAGES", { ci: true }], ["CLOUDFLARE_WORKERS", "WORKERS_CI", { ci: true }], ["GOOGLE_CLOUDRUN", "K_SERVICE"], ["GOOGLE_CLOUDRUN_JOB", "CLOUD_RUN_JOB"], ["CODEBUILD", "CODEBUILD_BUILD_ARN"], ["CODEFRESH", "CF_BUILD_ID"], ["DRONE"], ["DRONE", "DRONE_BUILD_EVENT"], ["DSARI"], ["GITHUB_ACTIONS"], ["GITLAB", "GITLAB_CI"], ["GITLAB", "CI_MERGE_REQUEST_ID"], ["GOCD", "GO_PIPELINE_LABEL"], ["LAYERCI"], ["JENKINS", "JENKINS_URL"], ["HUDSON", "HUDSON_URL"], ["MAGNUM"], ["NETLIFY"], ["NETLIFY", "NETLIFY_LOCAL", { ci: false }], ["NEVERCODE"], ["RENDER"], ["SAIL", "SAILCI"], ["SEMAPHORE"], ["SCREWDRIVER"], ["SHIPPABLE"], ["SOLANO", "TDDIUM"], ["STRIDER"], ["TEAMCITY", "TEAMCITY_VERSION"], ["TRAVIS"], ["VERCEL", "NOW_BUILDER"], ["VERCEL", "VERCEL", { ci: false }], ["VERCEL", "VERCEL_ENV", { ci: false }], ["APPCENTER", "APPCENTER_BUILD_ID"], ["CODESANDBOX", "CODESANDBOX_SSE", { ci: false }], ["CODESANDBOX", "CODESANDBOX_HOST", { ci: false }], ["STACKBLITZ"], ["STORMKIT"], ["CLEAVR"], ["ZEABUR"], ["CODESPHERE", "CODESPHERE_APP_ID", { ci: true }], ["RAILWAY", "RAILWAY_PROJECT_ID"], ["RAILWAY", "RAILWAY_SERVICE_ID"], ["DENO-DEPLOY", "DENO_DEPLOY"], ["DENO-DEPLOY", "DENO_DEPLOYMENT_ID"], ["FIREBASE_APP_HOSTING", "FIREBASE_APP_HOSTING", { ci: true }], ["EDGEONE_PAGES", "EO_PAGES_CI", { ci: true }]]);
14337
- const ei = function() {
14338
- for (let e3 of Xt)
14339
- if (zt[e3[1] || e3[0]])
14340
- return { name: e3[0].toLowerCase(), ...e3[2] };
14341
- return zt.SHELL === "/bin/jsh" && Jt.versions?.webcontainer ? { name: "stackblitz", ci: false } : { name: "", ci: false };
14342
- }(), ti = (ei.name, Jt.platform || ""), ii = !!zt.CI || ei.ci !== false, si = !!Jt.stdout?.isTTY, ri = (zt.DEBUG, Yt === "test" || !!zt.TEST), ni = (Yt === "production" || zt.MODE, Yt === "dev" || Yt === "development" || zt.MODE, zt.MINIMAL, /^win/i.test(ti)), ai = (/^linux/i.test(ti), /^darwin/i.test(ti), !zt.NO_COLOR && (!!zt.FORCE_COLOR || (si || ni) && zt.TERM), (Jt.versions?.node || "").replace(/^v/, "") || null), oi = (Number(ai?.split(".")[0]), !!Jt?.versions?.node), ci = "Bun" in globalThis, hi = "Deno" in globalThis, li = "fastly" in globalThis, pi = [["Netlify" in globalThis, "netlify"], ["EdgeRuntime" in globalThis, "edge-light"], [globalThis.navigator?.userAgent === "Cloudflare-Workers", "workerd"], [li, "fastly"], [hi, "deno"], [ci, "bun"], [oi, "node"]];
14343
- (function() {
14344
- let e3 = pi.find((e4) => e4[0]);
14345
- if (e3)
14346
- e3[1];
14347
- })();
14348
- const ui = __require("node:tty"), di = ui?.WriteStream?.prototype?.hasColors?.() ?? false, base_format = (e3, t3) => {
14349
- if (!di)
14350
- return (e4) => e4;
14351
- const i2 = `\x1B[${e3}m`, n2 = `\x1B[${t3}m`;
14352
- return (e4) => {
14353
- const a2 = e4 + "";
14354
- let c2 = a2.indexOf(n2);
14355
- if (c2 === -1)
14356
- return i2 + a2 + n2;
14357
- let l2 = i2, y2 = 0;
14358
- const E2 = (t3 === 22 ? n2 : "") + i2;
14359
- for (;c2 !== -1; )
14360
- l2 += a2.slice(y2, c2) + E2, y2 = c2 + n2.length, c2 = a2.indexOf(n2, y2);
14361
- return l2 += a2.slice(y2) + n2, l2;
14362
- };
14363
- }, fi = (base_format(0, 0), base_format(1, 22), base_format(2, 22), base_format(3, 23), base_format(4, 24), base_format(53, 55), base_format(7, 27), base_format(8, 28), base_format(9, 29), base_format(30, 39), base_format(31, 39)), mi = base_format(32, 39), gi = base_format(33, 39), xi = base_format(34, 39), vi = (base_format(35, 39), base_format(36, 39)), yi = (base_format(37, 39), base_format(90, 39));
14364
- base_format(40, 49), base_format(41, 49), base_format(42, 49), base_format(43, 49), base_format(44, 49), base_format(45, 49), base_format(46, 49), base_format(47, 49), base_format(100, 49), base_format(91, 39), base_format(92, 39), base_format(93, 39), base_format(94, 39), base_format(95, 39), base_format(96, 39), base_format(97, 39), base_format(101, 49), base_format(102, 49), base_format(103, 49), base_format(104, 49), base_format(105, 49), base_format(106, 49), base_format(107, 49);
14365
- function isDir(e3) {
14366
- if (typeof e3 != "string" || e3.startsWith("file://"))
14367
- return false;
14368
- try {
14369
- return (0, $e.lstatSync)(e3).isDirectory();
14370
- } catch {
14371
- return false;
14372
- }
14373
- }
14374
- function utils_hash(e3, t3 = 8) {
14375
- return (function() {
14376
- if (Ei !== undefined)
14377
- return Ei;
14378
- try {
14379
- return Ei = !!Ht().getFips?.(), Ei;
14380
- } catch {
14381
- return Ei = false, Ei;
14382
- }
14383
- }() ? Ht().createHash("sha256") : Ht().createHash("md5")).update(e3).digest("hex").slice(0, t3);
14384
- }
14385
- const _i = { true: mi("true"), false: gi("false"), "[rebuild]": gi("[rebuild]"), "[esm]": xi("[esm]"), "[cjs]": mi("[cjs]"), "[import]": xi("[import]"), "[require]": mi("[require]"), "[native]": vi("[native]"), "[transpile]": gi("[transpile]"), "[fallback]": fi("[fallback]"), "[unknown]": fi("[unknown]"), "[hit]": mi("[hit]"), "[miss]": gi("[miss]"), "[json]": mi("[json]"), "[data]": mi("[data]") };
14386
- function debug(e3, ...t3) {
14387
- if (!e3.opts.debug)
14388
- return;
14389
- const i2 = process.cwd();
14390
- console.log(yi(["[jiti]", ...t3.map((e4) => (e4 in _i) ? _i[e4] : typeof e4 != "string" ? JSON.stringify(e4) : e4.replace(i2, "."))].join(" ")));
14391
- }
14392
- function jitiInteropDefault(e3, t3) {
14393
- return e3.opts.interopDefault ? function(e4) {
14394
- const t4 = typeof e4;
14395
- if (e4 === null || t4 !== "object" && t4 !== "function")
14396
- return e4;
14397
- const i2 = e4.default, n2 = typeof i2, a2 = i2 == null, c2 = n2 === "object" || n2 === "function";
14398
- if (a2 && e4 instanceof Promise)
14399
- return e4;
14400
- const l2 = n2 === "function" && t4 !== "function", y2 = c2 && !(i2 instanceof Promise), E2 = new Map;
14401
- return new Proxy(e4, { get(t5, n3) {
14402
- if (E2.has(n3))
14403
- return E2.get(n3);
14404
- let c3;
14405
- return n3 === "__esModule" ? c3 = true : n3 === "default" ? c3 = a2 ? e4 : typeof i2?.default == "function" && e4.__esModule ? i2.default : i2 : (n3 in t5) ? c3 = t5[n3] : y2 && (c3 = i2[n3], typeof c3 == "function" && (c3 = c3.bind(i2))), E2.set(n3, c3), c3;
14406
- }, apply: l2 ? (e5, t5, n3) => Reflect.apply(i2, t5, n3) : undefined });
14407
- }(t3) : t3;
14408
- }
14409
- let Ei;
14410
- function _booleanEnv(e3, t3) {
14411
- const i2 = _jsonEnv(e3, t3);
14412
- return Boolean(i2);
14413
- }
14414
- function _jsonEnv(e3, t3, i2) {
14415
- const n2 = process.env[e3];
14416
- if (!(e3 in process.env))
14417
- return t3;
14418
- try {
14419
- return JSON.parse(n2);
14420
- } catch {
14421
- return i2 ? n2 : t3;
14422
- }
14423
- }
14424
- const bi = /\.(c|m)?j(sx?)$/, ki = /\.(c|m)?t(sx?)$/;
14425
- function jitiResolve(e3, t3, i2) {
14426
- let n2, a2;
14427
- if (e3.isNativeRe.test(t3))
14428
- return t3;
14429
- if (e3.resolveTsConfigPaths && !i2.skipTsConfigPaths) {
14430
- const n3 = e3.resolveTsConfigPaths(t3);
14431
- for (const t4 of n3) {
14432
- const n4 = jitiResolve(e3, t4, { ...i2, try: true, skipTsConfigPaths: true });
14433
- if (n4)
14434
- return n4;
14435
- }
14436
- }
14437
- e3.alias && (t3 = function(e4, t4) {
14438
- const i3 = pathe_M_eThtNZ_normalizeWindowsPath(e4);
14439
- t4 = normalizeAliases(t4);
14440
- for (const [e5, n3] of Object.entries(t4)) {
14441
- if (!i3.startsWith(e5))
14442
- continue;
14443
- const t5 = utils_hasTrailingSlash(e5) ? e5.slice(0, -1) : e5;
14444
- if (utils_hasTrailingSlash(i3[t5.length]))
14445
- return pathe_M_eThtNZ_join(n3, i3.slice(e5.length));
14446
- }
14447
- return i3;
14448
- }(t3, e3.alias));
14449
- let c2 = i2?.parentURL || e3.url;
14450
- isDir(c2) && (c2 = pathe_M_eThtNZ_join(c2, "_index.js"));
14451
- const l2 = ((i2?.async) ? [i2?.conditions, ["node", "import"], ["node", "require"]] : [i2?.conditions, ["node", "require"], ["node", "import"]]).filter(Boolean);
14452
- for (const i3 of l2) {
14453
- try {
14454
- n2 = resolvePathSync(t3, { url: c2, conditions: i3, extensions: e3.opts.extensions });
14455
- } catch (e4) {
14456
- a2 = e4;
14457
- }
14458
- if (n2)
14459
- return n2;
14460
- }
14461
- try {
14462
- return e3.nativeRequire.resolve(t3, { paths: i2.paths });
14463
- } catch (e4) {
14464
- a2 = e4;
14465
- }
14466
- for (const a3 of e3.additionalExts) {
14467
- if (n2 = tryNativeRequireResolve(e3, t3 + a3, c2, i2) || tryNativeRequireResolve(e3, t3 + "/index" + a3, c2, i2), n2)
14468
- return n2;
14469
- if ((ki.test(e3.filename) || ki.test(e3.parentModule?.filename || "") || bi.test(t3)) && (n2 = tryNativeRequireResolve(e3, t3.replace(bi, ".$1t$2"), c2, i2), n2))
14470
- return n2;
14471
- }
14472
- if (!i2?.try)
14473
- throw a2;
14474
- }
14475
- function tryNativeRequireResolve(e3, t3, i2, n2) {
14476
- try {
14477
- return e3.nativeRequire.resolve(t3, { ...n2, paths: [pathe_M_eThtNZ_dirname(fileURLToPath(i2)), ...n2?.paths || []] });
14478
- } catch {}
14479
- }
14480
- const wi = __require("node:fs/promises"), Ci = __require("node:perf_hooks"), Si = __require("node:vm");
14481
- var Ii = __webpack_require__.n(Si);
14482
- function jitiRequire(e3, t3, i2) {
14483
- const n2 = e3.parentCache || {};
14484
- if (t3.startsWith("node:"))
14485
- return nativeImportOrRequire(e3, t3, i2.async);
14486
- if (t3.startsWith("file:"))
14487
- t3 = (0, Qe.fileURLToPath)(t3);
14488
- else if (t3.startsWith("data:")) {
14489
- if (!i2.async)
14490
- throw new Error("`data:` URLs are only supported in ESM context. Use `import` or `jiti.import` instead.");
14491
- return debug(e3, "[native]", "[data]", "[import]", t3), nativeImportOrRequire(e3, t3, true);
14492
- }
14493
- if (Be.builtinModules.includes(t3) || t3 === ".pnp.js")
14494
- return nativeImportOrRequire(e3, t3, i2.async);
14495
- if (e3.opts.virtualModules && t3 in e3.opts.virtualModules) {
14496
- debug(e3, "[virtual]", t3);
14497
- const n3 = e3.opts.virtualModules[t3];
14498
- return i2.async ? Promise.resolve(jitiInteropDefault(e3, n3)) : jitiInteropDefault(e3, n3);
14499
- }
14500
- if (e3.opts.tryNative && !e3.opts.transformOptions)
14501
- try {
14502
- if (!(t3 = jitiResolve(e3, t3, i2)) && i2.try)
14503
- return;
14504
- if (debug(e3, "[try-native]", i2.async && e3.nativeImport ? "[import]" : "[require]", t3), i2.async && e3.nativeImport)
14505
- return e3.nativeImport(t3).then((i3) => (e3.opts.moduleCache === false && delete e3.nativeRequire.cache[t3], jitiInteropDefault(e3, i3))).catch((n3) => (debug(e3, `[try-native] Using fallback for ${t3} because of an error:`, n3), jitiRequire({ ...e3, opts: { ...e3.opts, tryNative: false } }, t3, i2)));
14506
- {
14507
- const i3 = e3.nativeRequire(t3);
14508
- return e3.opts.moduleCache === false && delete e3.nativeRequire.cache[t3], jitiInteropDefault(e3, i3);
14509
- }
14510
- } catch (i3) {
14511
- debug(e3, `[try-native] Using fallback for ${t3} because of an error:`, i3);
14512
- }
14513
- const a2 = jitiResolve(e3, t3, i2);
14514
- if (!a2 && i2.try)
14515
- return;
14516
- const c2 = extname(a2);
14517
- if (c2 === ".json") {
14518
- debug(e3, "[json]", a2);
14519
- const t4 = e3.nativeRequire(a2);
14520
- return t4 && !("default" in t4) && Object.defineProperty(t4, "default", { value: t4, enumerable: false }), t4;
14521
- }
14522
- if (c2 && !e3.opts.extensions.includes(c2))
14523
- return debug(e3, "[native]", "[unknown]", i2.async ? "[import]" : "[require]", a2), nativeImportOrRequire(e3, a2, i2.async);
14524
- if (e3.isNativeRe.test(a2))
14525
- return debug(e3, "[native]", i2.async ? "[import]" : "[require]", a2), nativeImportOrRequire(e3, a2, i2.async);
14526
- if (n2[a2])
14527
- return jitiInteropDefault(e3, n2[a2]?.exports);
14528
- if (e3.opts.moduleCache) {
14529
- const t4 = e3.nativeRequire.cache[a2];
14530
- if (t4?.loaded)
14531
- return jitiInteropDefault(e3, t4.exports);
14532
- }
14533
- const l2 = (0, $e.readFileSync)(a2, "utf8");
14534
- return eval_evalModule(e3, l2, { id: t3, filename: a2, ext: c2, cache: n2, async: i2.async });
14535
- }
14536
- function nativeImportOrRequire(e3, t3, i2) {
14537
- return i2 && e3.nativeImport ? e3.nativeImport(function(e4) {
14538
- return ni && isAbsolute2(e4) ? pathToFileURL(e4) : e4;
14539
- }(t3)).then((t4) => jitiInteropDefault(e3, t4)) : jitiInteropDefault(e3, e3.nativeRequire(t3));
14540
- }
14541
- const Ti = "9";
14542
- function getCache(e3, t3, i2) {
14543
- if (!e3.opts.fsCache || !t3.filename)
14544
- return i2();
14545
- const n2 = ` /* v${Ti}-${utils_hash(t3.source, 16)} */
14546
- `;
14547
- let a2 = `${basename3(pathe_M_eThtNZ_dirname(t3.filename))}-${function(e4) {
14548
- const t4 = e4.split(Wt).pop();
14549
- if (!t4)
14550
- return;
14551
- const i3 = t4.lastIndexOf(".");
14552
- return i3 <= 0 ? t4 : t4.slice(0, i3);
14553
- }(t3.filename)}` + (e3.opts.sourceMaps ? "+map" : "") + (t3.interopDefault ? ".i" : "") + `.${utils_hash(t3.filename)}` + (t3.async ? ".mjs" : ".cjs");
14554
- t3.jsx && t3.filename.endsWith("x") && (a2 += "x");
14555
- const c2 = e3.opts.fsCache, l2 = pathe_M_eThtNZ_join(c2, a2);
14556
- if (!e3.opts.rebuildFsCache && (0, $e.existsSync)(l2)) {
14557
- const i3 = (0, $e.readFileSync)(l2, "utf8");
14558
- if (i3.endsWith(n2))
14559
- return debug(e3, "[cache]", "[hit]", t3.filename, "~>", l2), i3;
14560
- }
14561
- debug(e3, "[cache]", "[miss]", t3.filename);
14562
- const y2 = i2();
14563
- return y2.includes("__JITI_ERROR__") || ((0, $e.writeFileSync)(l2, y2 + n2, "utf8"), debug(e3, "[cache]", "[store]", t3.filename, "~>", l2)), y2;
14564
- }
14565
- function prepareCacheDir(t3) {
14566
- if (t3.opts.fsCache === true && (t3.opts.fsCache = function(t4) {
14567
- const i2 = t4.filename && pathe_M_eThtNZ_resolve(t4.filename, "../node_modules");
14568
- if (i2 && (0, $e.existsSync)(i2))
14569
- return pathe_M_eThtNZ_join(i2, ".cache/jiti");
14570
- let n2 = (0, e2.tmpdir)();
14571
- if (process.env.TMPDIR && n2 === process.cwd() && !process.env.JITI_RESPECT_TMPDIR_ENV) {
14572
- const t5 = process.env.TMPDIR;
14573
- delete process.env.TMPDIR, n2 = (0, e2.tmpdir)(), process.env.TMPDIR = t5;
14574
- }
14575
- return pathe_M_eThtNZ_join(n2, "jiti");
14576
- }(t3)), t3.opts.fsCache)
14577
- try {
14578
- if ((0, $e.mkdirSync)(t3.opts.fsCache, { recursive: true }), !function(e3) {
14579
- try {
14580
- return (0, $e.accessSync)(e3, $e.constants.W_OK), true;
14581
- } catch {
14582
- return false;
14583
- }
14584
- }(t3.opts.fsCache))
14585
- throw new Error("directory is not writable!");
14586
- } catch (e3) {
14587
- debug(t3, "Error creating cache directory at ", t3.opts.fsCache, e3), t3.opts.fsCache = false;
14588
- }
14589
- }
14590
- function transform(e3, t3) {
14591
- let i2 = getCache(e3, t3, () => {
14592
- const i3 = e3.opts.transform({ ...e3.opts.transformOptions, babel: { ...e3.opts.sourceMaps ? { sourceFileName: t3.filename, sourceMaps: "inline" } : {}, ...e3.opts.transformOptions?.babel }, interopDefault: e3.opts.interopDefault, ...t3 });
14593
- return i3.error && e3.opts.debug && debug(e3, i3.error), i3.code;
14594
- });
14595
- return i2.startsWith("#!") && (i2 = "// " + i2), i2;
14596
- }
14597
- function eval_evalModule(t3, i2, n2 = {}) {
14598
- const a2 = n2.id || (n2.filename ? basename3(n2.filename) : `_jitiEval.${n2.ext || (n2.async ? "mjs" : "js")}`), c2 = n2.filename || jitiResolve(t3, a2, { async: n2.async }), l2 = n2.ext || extname(c2), y2 = n2.cache || t3.parentCache || {}, E2 = /\.[cm]?tsx?$/.test(l2), w2 = l2 === ".mjs" || l2 === ".js" && function(e3) {
14599
- for (;e3 && e3 !== "." && e3 !== "/"; ) {
14600
- e3 = pathe_M_eThtNZ_join(e3, "..");
14601
- try {
14602
- const t4 = (0, $e.readFileSync)(pathe_M_eThtNZ_join(e3, "package.json"), "utf8");
14603
- try {
14604
- return JSON.parse(t4);
14605
- } catch {}
14606
- break;
14607
- } catch {}
14608
- }
14609
- }(c2)?.type === "module", C3 = l2 === ".cjs", S2 = n2.forceTranspile ?? (!C3 && !(w2 && n2.async) && (E2 || w2 || t3.isTransformRe.test(c2) || hasESMSyntax(i2))), I2 = Ci.performance.now();
14610
- if (S2) {
14611
- i2 = transform(t3, { filename: c2, source: i2, ts: E2, async: n2.async ?? false, jsx: t3.opts.jsx });
14612
- const e3 = Math.round(1000 * (Ci.performance.now() - I2)) / 1000;
14613
- debug(t3, "[transpile]", n2.async ? "[esm]" : "[cjs]", c2, `(${e3}ms)`);
14614
- } else {
14615
- if (debug(t3, "[native]", n2.async ? "[import]" : "[require]", c2), n2.async)
14616
- return Promise.resolve(nativeImportOrRequire(t3, c2, n2.async)).catch((e3) => (debug(t3, "Native import error:", e3), debug(t3, "[fallback]", c2), eval_evalModule(t3, i2, { ...n2, forceTranspile: true })));
14617
- try {
14618
- return nativeImportOrRequire(t3, c2, n2.async);
14619
- } catch (e3) {
14620
- debug(t3, "Native require error:", e3), debug(t3, "[fallback]", c2), i2 = transform(t3, { filename: c2, source: i2, ts: E2, async: n2.async ?? false, jsx: t3.opts.jsx });
14621
- }
14622
- }
14623
- const N2 = new Be.Module(c2);
14624
- N2.filename = c2, t3.parentModule && (N2.parent = t3.parentModule, Array.isArray(t3.parentModule.children) && !t3.parentModule.children.includes(N2) && t3.parentModule.children.push(N2));
14625
- const O2 = createJiti(c2, t3.opts, { parentModule: N2, parentCache: y2, nativeImport: t3.nativeImport, onError: t3.onError, createRequire: t3.createRequire }, true);
14626
- let j2;
14627
- N2.require = O2, N2.path = pathe_M_eThtNZ_dirname(c2), N2.paths = Be.Module._nodeModulePaths(N2.path), y2[c2] = N2, t3.opts.moduleCache && (t3.nativeRequire.cache[c2] = N2);
14628
- const F2 = function(e3, t4) {
14629
- return `(${t4?.async ? "async " : ""}function (exports, require, module, __filename, __dirname, jitiImport, jitiESMResolve) { ${e3}
14630
- });`;
14631
- }(i2, { async: n2.async });
14632
- try {
14633
- j2 = Ii().runInThisContext(F2, { filename: c2, lineOffset: 0, displayErrors: false });
14634
- } catch (i3) {
14635
- i3.name === "SyntaxError" && n2.async && t3.nativeImport ? (debug(t3, "[esm]", "[import]", "[fallback]", c2), j2 = function(t4, i4, n3, a3, c3) {
14636
- const l3 = `export default ${i4}`, y3 = c3 ? undefined : `data:text/javascript;base64,${Buffer.from(l3).toString("base64")}`;
14637
- return (...i5) => {
14638
- let c4;
14639
- const importViaTempFile = () => (c4 = function(t5, i6) {
14640
- const n4 = pathe_M_eThtNZ_join((0, e2.tmpdir)(), "jiti-esm");
14641
- try {
14642
- (0, $e.mkdirSync)(n4, { recursive: true });
14643
- } catch {}
14644
- const a4 = pathe_M_eThtNZ_join(n4, `${basename3(i6, extname(i6))}-${Date.now()}-${Math.random().toString(36).slice(2)}.mjs`);
14645
- return (0, $e.writeFileSync)(a4, t5), a4;
14646
- }(l3, n3), debug(t4, "[esm]", "[tempfile]", c4), a3(pathToFileURL(c4))), E3 = y3 ? a3(y3).catch((e3) => {
14647
- if (e3?.code !== "ENAMETOOLONG")
14648
- throw e3;
14649
- return importViaTempFile();
14650
- }) : importViaTempFile();
14651
- return E3.then((e3) => e3.default(...i5)).finally(() => {
14652
- c4 && (0, wi.unlink)(c4).catch(() => {});
14653
- });
14654
- };
14655
- }(t3, F2, c2, t3.nativeImport, t3.opts.esmEvalTempFile)) : (t3.opts.moduleCache && delete t3.nativeRequire.cache[c2], t3.onError(i3));
14656
- }
14657
- let B2;
14658
- try {
14659
- B2 = j2(N2.exports, N2.require, N2, N2.filename, pathe_M_eThtNZ_dirname(N2.filename), O2.import, O2.esmResolve);
14660
- } catch (e3) {
14661
- t3.opts.moduleCache && delete t3.nativeRequire.cache[c2], t3.onError(e3);
14662
- }
14663
- function next() {
14664
- if (N2.exports && N2.exports.__JITI_ERROR__) {
14665
- const { filename: e3, line: i3, column: n3, code: a3, message: c3 } = N2.exports.__JITI_ERROR__, l3 = new Error(`${a3}: ${c3}
14666
- ${`${e3}:${i3}:${n3}`}`);
14667
- Error.captureStackTrace(l3, jitiRequire), t3.onError(l3);
14668
- }
14669
- N2.loaded = true;
14670
- return jitiInteropDefault(t3, N2.exports);
14671
- }
14672
- return n2.async ? Promise.resolve(B2).then(next) : next();
14673
- }
14674
- const Ri = (0, e2.platform)() === "win32";
14675
- function createJiti(e3, t3 = {}, i2, n2 = false) {
14676
- const a2 = n2 ? t3 : function(e4) {
14677
- const t4 = { fsCache: _booleanEnv("JITI_FS_CACHE", _booleanEnv("JITI_CACHE", true)), rebuildFsCache: _booleanEnv("JITI_REBUILD_FS_CACHE", false), moduleCache: _booleanEnv("JITI_MODULE_CACHE", _booleanEnv("JITI_REQUIRE_CACHE", true)), debug: _booleanEnv("JITI_DEBUG", false), sourceMaps: _booleanEnv("JITI_SOURCE_MAPS", false), interopDefault: _booleanEnv("JITI_INTEROP_DEFAULT", true), extensions: _jsonEnv("JITI_EXTENSIONS", [".js", ".mjs", ".cjs", ".ts", ".tsx", ".mts", ".cts", ".mtsx", ".ctsx"]), alias: _jsonEnv("JITI_ALIAS", {}), nativeModules: _jsonEnv("JITI_NATIVE_MODULES", []), transformModules: _jsonEnv("JITI_TRANSFORM_MODULES", []), tryNative: _jsonEnv("JITI_TRY_NATIVE", "Bun" in globalThis), esmEvalTempFile: _booleanEnv("JITI_ESM_EVAL_TEMP_FILE", false), jsx: _booleanEnv("JITI_JSX", false), tsconfigPaths: _jsonEnv("JITI_TSCONFIG_PATHS", false, true) };
14678
- t4.jsx && t4.extensions.push(".jsx", ".tsx");
14679
- const i3 = {};
14680
- return e4.cache !== undefined && (i3.fsCache = e4.cache), e4.requireCache !== undefined && (i3.moduleCache = e4.requireCache), { ...t4, ...i3, ...e4 };
14681
- }(t3);
14682
- typeof e3 == "string" && e3.startsWith("file://") && (e3 = fileURLToPath(e3));
14683
- const c2 = a2.alias && Object.keys(a2.alias).length > 0 ? normalizeAliases(a2.alias || {}) : undefined;
14684
- let l2;
14685
- if (a2.tsconfigPaths) {
14686
- const { getTsconfig: t4, createPathsMatcher: i3 } = __webpack_require__("./node_modules/.pnpm/get-tsconfig@4.14.0/node_modules/get-tsconfig/dist/index.cjs"), n3 = t4(typeof a2.tsconfigPaths == "string" ? a2.tsconfigPaths : pathe_M_eThtNZ_dirname(e3));
14687
- n3 && (l2 = i3(n3));
14688
- }
14689
- const y2 = ["typescript", "jiti", ...a2.nativeModules || []], E2 = new RegExp(`node_modules/(${y2.map((e4) => escapeStringRegexp(e4)).join("|")})/`), w2 = [...a2.transformModules || []], C3 = new RegExp(`node_modules/(${w2.map((e4) => escapeStringRegexp(e4)).join("|")})/`);
14690
- e3 || (e3 = process.cwd()), !n2 && isDir(e3) && (e3 = pathe_M_eThtNZ_join(e3, "_index.js"));
14691
- const S2 = pathToFileURL(e3), I2 = [...a2.extensions].filter((e4) => e4 !== ".js"), N2 = i2.createRequire(Ri ? e3.replace(/\//g, "\\") : e3), O2 = { filename: e3, url: S2, opts: a2, alias: c2, resolveTsConfigPaths: l2, nativeModules: y2, transformModules: w2, isNativeRe: E2, isTransformRe: C3, additionalExts: I2, nativeRequire: N2, onError: i2.onError, parentModule: i2.parentModule, parentCache: i2.parentCache, nativeImport: i2.nativeImport, createRequire: i2.createRequire };
14692
- n2 || debug(O2, "[init]", ...[["version:", Gt.rE], ["module-cache:", a2.moduleCache], ["fs-cache:", a2.fsCache], ["rebuild-fs-cache:", a2.rebuildFsCache], ["interop-defaults:", a2.interopDefault]].flat()), n2 || prepareCacheDir(O2);
14693
- const j2 = Object.assign(function(e4) {
14694
- return jitiRequire(O2, e4, { async: false });
14695
- }, { cache: a2.moduleCache ? N2.cache : Object.create(null), extensions: N2.extensions, main: N2.main, options: a2, resolve: Object.assign(function(e4, t4) {
14696
- return jitiResolve(O2, e4, { ...t4, async: false });
14697
- }, { paths: N2.resolve.paths }), transform: (e4) => transform(O2, e4), evalModule: (e4, t4) => eval_evalModule(O2, e4, t4), async import(e4, t4) {
14698
- const i3 = await jitiRequire(O2, e4, { ...t4, async: true });
14699
- return t4?.default ? i3?.default ?? i3 : i3;
14700
- }, esmResolve(e4, t4) {
14701
- typeof t4 == "string" && (t4 = { parentURL: t4 });
14702
- const i3 = jitiResolve(O2, e4, { parentURL: S2, ...t4, async: true });
14703
- return !i3 || typeof i3 != "string" || i3.startsWith("file://") ? i3 : pathToFileURL(i3);
14704
- } });
14705
- return j2;
14706
- }
14707
- })(), module2.exports = i.default;
14708
- })();
14709
- });
14710
-
14711
10438
  // ../../node_modules/.bun/web-tree-sitter@0.20.8/node_modules/web-tree-sitter/tree-sitter.js
14712
10439
  var require_tree_sitter = __commonJS((exports, module2) => {
14713
10440
  var __dirname = "/Users/bytedance/github/c4a/context/node_modules/.bun/web-tree-sitter@0.20.8/node_modules/web-tree-sitter";
@@ -33872,36 +29599,10 @@ var ExitCode = {
33872
29599
  // src/project/workspace.ts
33873
29600
  import { existsSync as existsSync4, readFileSync as readFileSync2 } from "node:fs";
33874
29601
  import { mkdir, readFile, readdir as readdir3, writeFile } from "node:fs/promises";
33875
- import { createRequire as createRequire3 } from "node:module";
29602
+ import { createRequire as createRequire2 } from "node:module";
33876
29603
  import { basename as basename3, dirname as dirname3, isAbsolute as isAbsolute2, join as join6, parse as parse2, relative, resolve as resolve3 } from "node:path";
33877
29604
  import { fileURLToPath } from "node:url";
33878
-
33879
- // ../../node_modules/.bun/jiti@2.7.0/node_modules/jiti/lib/jiti.mjs
33880
- var import_jiti = __toESM(require_jiti(), 1);
33881
- import { createRequire as createRequire2 } from "node:module";
33882
- function onError(err2) {
33883
- throw err2;
33884
- }
33885
- var nativeImport = (id2) => import(id2);
33886
- var _transform;
33887
- function lazyTransform(...args2) {
33888
- if (!_transform) {
33889
- _transform = createRequire2(import.meta.url)("../dist/babel.cjs");
33890
- }
33891
- return _transform(...args2);
33892
- }
33893
- function createJiti(id2, opts = {}) {
33894
- if (!opts.transform) {
33895
- opts = { ...opts, transform: lazyTransform };
33896
- }
33897
- return import_jiti.default(id2, opts, {
33898
- onError,
33899
- nativeImport,
33900
- createRequire: createRequire2
33901
- });
33902
- }
33903
-
33904
- // src/project/workspace.ts
29605
+ import { createJiti } from "jiti";
33905
29606
  var PROJECT_DIRS = ["src", "sources", "unapproved", "knowledge", "dist"];
33906
29607
  var DEFAULT_PROJECT_DIR = "context";
33907
29608
  var DEFAULT_PROJECT_ENTRY = "src/index.ts";
@@ -33955,7 +29656,7 @@ function resolveExportImportTarget(packageJsonPath) {
33955
29656
  function resolveContextSdkImportAlias(entryPath) {
33956
29657
  for (const requireBase of [entryPath, import.meta.url]) {
33957
29658
  try {
33958
- const packageJsonPath = createRequire3(requireBase).resolve("@c4a/context/package.json");
29659
+ const packageJsonPath = createRequire2(requireBase).resolve("@c4a/context/package.json");
33959
29660
  const importTarget = resolveExportImportTarget(packageJsonPath);
33960
29661
  if (importTarget !== null)
33961
29662
  return importTarget;
@@ -34100,7 +29801,7 @@ async function listStaticTemplateFiles(root, dir = root) {
34100
29801
  }
34101
29802
  function resolveContextPackageTemplatesRoot() {
34102
29803
  try {
34103
- const packageJsonPath = createRequire3(import.meta.url).resolve("@c4a/context/package.json");
29804
+ const packageJsonPath = createRequire2(import.meta.url).resolve("@c4a/context/package.json");
34104
29805
  const templateRoot = join6(dirname3(packageJsonPath), "templates", "package-templates");
34105
29806
  if (existsSync4(templateRoot))
34106
29807
  return templateRoot;
@@ -34118,7 +29819,7 @@ async function writeDefaultPackageTemplates(projectRoot, result) {
34118
29819
  }
34119
29820
  }
34120
29821
  function resolveLocalSdkDependency() {
34121
- const packageJsonPath = createRequire3(import.meta.url).resolve("@c4a/context/package.json");
29822
+ const packageJsonPath = createRequire2(import.meta.url).resolve("@c4a/context/package.json");
34122
29823
  return `file:${dirname3(packageJsonPath)}`;
34123
29824
  }
34124
29825
  function resolveSdkDependency(dev, version2) {
@@ -76619,6 +72320,17 @@ async function runExternalOptional(command, args2) {
76619
72320
  async function commandAvailable(command) {
76620
72321
  return runExternalOptional("sh", ["-lc", `command -v ${command} >/dev/null 2>&1`]);
76621
72322
  }
72323
+ async function claudePluginInstalled() {
72324
+ try {
72325
+ const { stdout } = await execFileAsync5("claude", ["plugin", "list", "--json"], {
72326
+ maxBuffer: 1024 * 1024
72327
+ });
72328
+ const parsed = JSON.parse(stdout);
72329
+ return Array.isArray(parsed) && parsed.some((item) => item !== null && typeof item === "object" && ("id" in item) && item.id === PLUGIN_ID);
72330
+ } catch {
72331
+ return false;
72332
+ }
72333
+ }
76622
72334
  function missingAgentResult(agent) {
76623
72335
  return {
76624
72336
  agent,
@@ -76802,6 +72514,24 @@ async function pruneClaudeLegacyPluginCache(dryRun, steps) {
76802
72514
  });
76803
72515
  }
76804
72516
  }
72517
+ async function pruneClaudeSupersededContextCache(root2, dryRun, steps) {
72518
+ const manifest = await readFile31(join44(root2, "claude", ".claude-plugin", "plugin.json"), "utf8").then((content3) => JSON.parse(content3)).catch(() => null);
72519
+ const currentVersion = typeof manifest?.version === "string" ? manifest.version : null;
72520
+ if (!currentVersion)
72521
+ return;
72522
+ const pluginDir = join44(claudePluginCacheRoot(), MARKETPLACE_NAME, PLUGIN_NAME);
72523
+ const staleVersions = (await readdir15(pluginDir, { withFileTypes: true }).catch(() => [])).filter((entry) => entry.isDirectory() && entry.name !== currentVersion).map((entry) => entry.name);
72524
+ if (staleVersions.length === 0)
72525
+ return;
72526
+ steps.push({
72527
+ agent: "claude",
72528
+ command: `prune superseded Claude ${MARKETPLACE_NAME}/${PLUGIN_NAME} version(s): ${staleVersions.join(", ")}`,
72529
+ status: dryRun ? "planned" : "ran"
72530
+ });
72531
+ if (!dryRun) {
72532
+ await Promise.all(staleVersions.map((version3) => rm10(join44(pluginDir, version3), { recursive: true, force: true })));
72533
+ }
72534
+ }
76805
72535
  function enableCodexPluginConfig(content3) {
76806
72536
  const header = `[plugins."${PLUGIN_ID}"]`;
76807
72537
  const blockStart = content3.indexOf(header);
@@ -76903,14 +72633,22 @@ async function installClaude(root2, dryRun, steps) {
76903
72633
  const addArgs = ["plugin", "marketplace", "add", root2];
76904
72634
  const installArgs = ["plugin", "install", PLUGIN_ID, "--scope", "user"];
76905
72635
  steps.push({ agent: "claude", command: commandLine("claude", addArgs), status: dryRun ? "planned" : "ran" });
76906
- steps.push({ agent: "claude", command: commandLine("claude", installArgs), status: dryRun ? "planned" : "ran" });
76907
- if (dryRun)
72636
+ if (dryRun) {
72637
+ steps.push({ agent: "claude", command: commandLine("claude", installArgs), status: "planned" });
76908
72638
  return;
72639
+ }
76909
72640
  const added = await runExternalOptional("claude", addArgs);
76910
72641
  if (!added) {
76911
72642
  await runExternal("claude", ["plugin", "marketplace", "update", MARKETPLACE_NAME]);
76912
72643
  }
72644
+ if (await claudePluginInstalled()) {
72645
+ const uninstallArgs = ["plugin", "uninstall", PLUGIN_ID, "--scope", "user"];
72646
+ steps.push({ agent: "claude", command: commandLine("claude", uninstallArgs), status: "ran" });
72647
+ await runExternal("claude", uninstallArgs);
72648
+ }
72649
+ steps.push({ agent: "claude", command: commandLine("claude", installArgs), status: "ran" });
76913
72650
  await runExternal("claude", installArgs);
72651
+ await pruneClaudeSupersededContextCache(root2, dryRun, steps);
76914
72652
  }
76915
72653
  async function installCodex(root2, dryRun, steps) {
76916
72654
  await pruneLegacyCodexConfig(dryRun, steps);