@dpuse/dpuse-development 0.3.571 → 0.3.573
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/README.md +3 -0
- package/dist/dpuse-development.es.js +919 -943
- package/dist/dpuse-development.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,38 +3,39 @@ import n from "node:path";
|
|
|
3
3
|
import { promisify as r } from "node:util";
|
|
4
4
|
import { execFile as i, spawn as a } from "node:child_process";
|
|
5
5
|
import { fileURLToPath as o } from "node:url";
|
|
6
|
+
import { brotliCompress as s, gzip as c } from "node:zlib";
|
|
6
7
|
//#region \0rolldown/runtime.js
|
|
7
|
-
var
|
|
8
|
+
var l = Object.defineProperty, u = /* @__PURE__ */ ((e, t) => {
|
|
8
9
|
let n = {};
|
|
9
|
-
for (var r in e)
|
|
10
|
+
for (var r in e) l(n, r, {
|
|
10
11
|
get: e[r],
|
|
11
12
|
enumerable: !0
|
|
12
13
|
});
|
|
13
|
-
return t ||
|
|
14
|
+
return t || l(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
14
15
|
})({
|
|
15
|
-
Node: () =>
|
|
16
|
+
Node: () => ot,
|
|
16
17
|
Parser: () => k,
|
|
17
|
-
Position: () =>
|
|
18
|
-
SourceLocation: () =>
|
|
18
|
+
Position: () => _e,
|
|
19
|
+
SourceLocation: () => ve,
|
|
19
20
|
TokContext: () => P,
|
|
20
|
-
Token: () =>
|
|
21
|
+
Token: () => Yt,
|
|
21
22
|
TokenType: () => x,
|
|
22
|
-
defaultOptions: () =>
|
|
23
|
-
getLineInfo: () =>
|
|
23
|
+
defaultOptions: () => be,
|
|
24
|
+
getLineInfo: () => ye,
|
|
24
25
|
isIdentifierChar: () => b,
|
|
25
26
|
isIdentifierStart: () => y,
|
|
26
|
-
isNewLine: () =>
|
|
27
|
-
keywordTypes: () =>
|
|
27
|
+
isNewLine: () => ae,
|
|
28
|
+
keywordTypes: () => re,
|
|
28
29
|
lineBreak: () => D,
|
|
29
|
-
lineBreakG: () =>
|
|
30
|
-
nonASCIIwhitespace: () =>
|
|
31
|
-
parse: () =>
|
|
32
|
-
parseExpressionAt: () =>
|
|
30
|
+
lineBreakG: () => ie,
|
|
31
|
+
nonASCIIwhitespace: () => se,
|
|
32
|
+
parse: () => en,
|
|
33
|
+
parseExpressionAt: () => tn,
|
|
33
34
|
tokContexts: () => F,
|
|
34
35
|
tokTypes: () => E,
|
|
35
|
-
tokenizer: () =>
|
|
36
|
-
version: () =>
|
|
37
|
-
}),
|
|
36
|
+
tokenizer: () => nn,
|
|
37
|
+
version: () => $t
|
|
38
|
+
}), d = [
|
|
38
39
|
509,
|
|
39
40
|
0,
|
|
40
41
|
227,
|
|
@@ -365,7 +366,7 @@ var s = Object.defineProperty, c = (e, t) => () => (t || (e((t = { exports: {} }
|
|
|
365
366
|
9,
|
|
366
367
|
787719,
|
|
367
368
|
239
|
|
368
|
-
],
|
|
369
|
+
], f = [
|
|
369
370
|
0,
|
|
370
371
|
11,
|
|
371
372
|
2,
|
|
@@ -984,18 +985,18 @@ var s = Object.defineProperty, c = (e, t) => () => (t || (e((t = { exports: {} }
|
|
|
984
985
|
4938,
|
|
985
986
|
6,
|
|
986
987
|
8489
|
|
987
|
-
],
|
|
988
|
+
], p = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", m = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", h = {
|
|
988
989
|
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",
|
|
989
990
|
5: "class enum extends super const export import",
|
|
990
991
|
6: "enum",
|
|
991
992
|
strict: "implements interface let package private protected public static yield",
|
|
992
993
|
strictBind: "eval arguments"
|
|
993
|
-
},
|
|
994
|
-
5:
|
|
995
|
-
"5module":
|
|
996
|
-
6:
|
|
997
|
-
},
|
|
998
|
-
function
|
|
994
|
+
}, g = "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", _ = {
|
|
995
|
+
5: g,
|
|
996
|
+
"5module": g + " export import",
|
|
997
|
+
6: g + " const class extends export import super"
|
|
998
|
+
}, ee = /^in(stanceof)?$/, te = RegExp("[" + m + "]"), v = RegExp("[" + m + p + "]");
|
|
999
|
+
function ne(e, t) {
|
|
999
1000
|
for (var n = 65536, r = 0; r < t.length; r += 2) {
|
|
1000
1001
|
if (n += t[r], n > e) return !1;
|
|
1001
1002
|
if (n += t[r + 1], n >= e) return !0;
|
|
@@ -1003,10 +1004,10 @@ function v(e, t) {
|
|
|
1003
1004
|
return !1;
|
|
1004
1005
|
}
|
|
1005
1006
|
function y(e, t) {
|
|
1006
|
-
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
1007
|
+
return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && te.test(String.fromCharCode(e)) : t === !1 ? !1 : ne(e, f);
|
|
1007
1008
|
}
|
|
1008
1009
|
function b(e, t) {
|
|
1009
|
-
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 &&
|
|
1010
|
+
return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && v.test(String.fromCharCode(e)) : t === !1 ? !1 : ne(e, f) || ne(e, d);
|
|
1010
1011
|
}
|
|
1011
1012
|
var x = function(e, t) {
|
|
1012
1013
|
t === void 0 && (t = {}), this.label = e, this.keyword = t.keyword, this.beforeExpr = !!t.beforeExpr, this.startsExpr = !!t.startsExpr, this.isLoop = !!t.isLoop, this.isAssign = !!t.isAssign, this.prefix = !!t.prefix, this.postfix = !!t.postfix, this.binop = t.binop || null, this.updateContext = null;
|
|
@@ -1017,9 +1018,9 @@ function S(e, t) {
|
|
|
1017
1018
|
binop: t
|
|
1018
1019
|
});
|
|
1019
1020
|
}
|
|
1020
|
-
var C = { beforeExpr: !0 }, w = { startsExpr: !0 },
|
|
1021
|
+
var C = { beforeExpr: !0 }, w = { startsExpr: !0 }, re = {};
|
|
1021
1022
|
function T(e, t) {
|
|
1022
|
-
return t === void 0 && (t = {}), t.keyword = e,
|
|
1023
|
+
return t === void 0 && (t = {}), t.keyword = e, re[e] = new x(e, t);
|
|
1023
1024
|
}
|
|
1024
1025
|
var E = {
|
|
1025
1026
|
num: new x("num", w),
|
|
@@ -1154,46 +1155,46 @@ var E = {
|
|
|
1154
1155
|
prefix: !0,
|
|
1155
1156
|
startsExpr: !0
|
|
1156
1157
|
})
|
|
1157
|
-
}, D = /\r\n?|\n|\u2028|\u2029/,
|
|
1158
|
-
function
|
|
1158
|
+
}, D = /\r\n?|\n|\u2028|\u2029/, ie = new RegExp(D.source, "g");
|
|
1159
|
+
function ae(e) {
|
|
1159
1160
|
return e === 10 || e === 13 || e === 8232 || e === 8233;
|
|
1160
1161
|
}
|
|
1161
|
-
function
|
|
1162
|
+
function oe(e, t, n) {
|
|
1162
1163
|
n === void 0 && (n = e.length);
|
|
1163
1164
|
for (var r = t; r < n; r++) {
|
|
1164
1165
|
var i = e.charCodeAt(r);
|
|
1165
|
-
if (
|
|
1166
|
+
if (ae(i)) return r < n - 1 && i === 13 && e.charCodeAt(r + 1) === 10 ? r + 2 : r + 1;
|
|
1166
1167
|
}
|
|
1167
1168
|
return -1;
|
|
1168
1169
|
}
|
|
1169
|
-
var
|
|
1170
|
-
return
|
|
1171
|
-
}),
|
|
1172
|
-
return
|
|
1173
|
-
}),
|
|
1174
|
-
function pe(e) {
|
|
1175
|
-
return fe[e] || (fe[e] = RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
|
|
1176
|
-
}
|
|
1170
|
+
var se = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, O = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, ce = Object.prototype, le = ce.hasOwnProperty, ue = ce.toString, de = Object.hasOwn || (function(e, t) {
|
|
1171
|
+
return le.call(e, t);
|
|
1172
|
+
}), fe = Array.isArray || (function(e) {
|
|
1173
|
+
return ue.call(e) === "[object Array]";
|
|
1174
|
+
}), pe = Object.create(null);
|
|
1177
1175
|
function me(e) {
|
|
1176
|
+
return pe[e] || (pe[e] = RegExp("^(?:" + e.replace(/ /g, "|") + ")$"));
|
|
1177
|
+
}
|
|
1178
|
+
function he(e) {
|
|
1178
1179
|
return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320));
|
|
1179
1180
|
}
|
|
1180
|
-
var
|
|
1181
|
+
var ge = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, _e = function(e, t) {
|
|
1181
1182
|
this.line = e, this.column = t;
|
|
1182
1183
|
};
|
|
1183
|
-
|
|
1184
|
-
return new
|
|
1184
|
+
_e.prototype.offset = function(e) {
|
|
1185
|
+
return new _e(this.line, this.column + e);
|
|
1185
1186
|
};
|
|
1186
|
-
var
|
|
1187
|
+
var ve = function(e, t, n) {
|
|
1187
1188
|
this.start = t, this.end = n, e.sourceFile !== null && (this.source = e.sourceFile);
|
|
1188
1189
|
};
|
|
1189
|
-
function
|
|
1190
|
+
function ye(e, t) {
|
|
1190
1191
|
for (var n = 1, r = 0;;) {
|
|
1191
|
-
var i =
|
|
1192
|
-
if (i < 0) return new
|
|
1192
|
+
var i = oe(e, r, t);
|
|
1193
|
+
if (i < 0) return new _e(n, t - r);
|
|
1193
1194
|
++n, r = i;
|
|
1194
1195
|
}
|
|
1195
1196
|
}
|
|
1196
|
-
var
|
|
1197
|
+
var be = {
|
|
1197
1198
|
ecmaVersion: null,
|
|
1198
1199
|
sourceType: "script",
|
|
1199
1200
|
strict: !1,
|
|
@@ -1214,20 +1215,20 @@ var ye = {
|
|
|
1214
1215
|
sourceFile: null,
|
|
1215
1216
|
directSourceFile: null,
|
|
1216
1217
|
preserveParens: !1
|
|
1217
|
-
},
|
|
1218
|
-
function
|
|
1218
|
+
}, xe = !1;
|
|
1219
|
+
function Se(e) {
|
|
1219
1220
|
var t = {};
|
|
1220
|
-
for (var n in
|
|
1221
|
-
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!
|
|
1221
|
+
for (var n in be) t[n] = e && de(e, n) ? e[n] : be[n];
|
|
1222
|
+
if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!xe && typeof console == "object" && console.warn && (xe = !0, console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved ??= t.ecmaVersion < 5, (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14), fe(t.onToken)) {
|
|
1222
1223
|
var r = t.onToken;
|
|
1223
1224
|
t.onToken = function(e) {
|
|
1224
1225
|
return r.push(e);
|
|
1225
1226
|
};
|
|
1226
1227
|
}
|
|
1227
|
-
if (
|
|
1228
|
+
if (fe(t.onComment) && (t.onComment = Ce(t, t.onComment)), t.sourceType === "commonjs" && t.allowAwaitOutsideFunction) throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");
|
|
1228
1229
|
return t;
|
|
1229
1230
|
}
|
|
1230
|
-
function
|
|
1231
|
+
function Ce(e, t) {
|
|
1231
1232
|
return function(n, r, i, a, o, s) {
|
|
1232
1233
|
var c = {
|
|
1233
1234
|
type: n ? "Block" : "Line",
|
|
@@ -1235,19 +1236,19 @@ function Se(e, t) {
|
|
|
1235
1236
|
start: i,
|
|
1236
1237
|
end: a
|
|
1237
1238
|
};
|
|
1238
|
-
e.locations && (c.loc = new
|
|
1239
|
+
e.locations && (c.loc = new ve(this, o, s)), e.ranges && (c.range = [i, a]), t.push(c);
|
|
1239
1240
|
};
|
|
1240
1241
|
}
|
|
1241
|
-
var
|
|
1242
|
-
function
|
|
1243
|
-
return
|
|
1242
|
+
var we = 1, Te = 2, Ee = 4, De = 8, Oe = 16, ke = 32, Ae = 64, je = 128, Me = 256, Ne = 512, Pe = 1024, Fe = we | Te | Me;
|
|
1243
|
+
function Ie(e, t) {
|
|
1244
|
+
return Te | (e ? Ee : 0) | (t ? De : 0);
|
|
1244
1245
|
}
|
|
1245
|
-
var
|
|
1246
|
-
this.options = e =
|
|
1246
|
+
var Le = 0, Re = 1, ze = 2, Be = 3, Ve = 4, He = 5, k = function(e, t, n) {
|
|
1247
|
+
this.options = e = Se(e), this.sourceFile = e.sourceFile, this.keywords = me(_[e.ecmaVersion >= 6 ? 6 : e.sourceType === "module" ? "5module" : 5]);
|
|
1247
1248
|
var r = "";
|
|
1248
|
-
e.allowReserved !== !0 && (r =
|
|
1249
|
-
var i = (r ? r + " " : "") +
|
|
1250
|
-
this.reservedWordsStrict =
|
|
1249
|
+
e.allowReserved !== !0 && (r = h[e.ecmaVersion >= 6 ? 6 : e.ecmaVersion === 5 ? 5 : 3], e.sourceType === "module" && (r += " await")), this.reservedWords = me(r);
|
|
1250
|
+
var i = (r ? r + " " : "") + h.strict;
|
|
1251
|
+
this.reservedWordsStrict = me(i), this.reservedWordsStrictBind = me(i + " " + h.strictBind), this.input = String(t), this.containsEsc = !1, n ? (this.pos = n, this.lineStart = this.input.lastIndexOf("\n", n - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(D).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = E.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 = !0, this.inModule = e.sourceType === "module", this.strict = this.inModule || e.strict === !0 || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = Object.create(null), this.pos === 0 && e.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(this.options.sourceType === "commonjs" ? Te : we), this.regexpState = null, this.privateNameStack = [];
|
|
1251
1252
|
}, A = {
|
|
1252
1253
|
inFunction: { configurable: !0 },
|
|
1253
1254
|
inGenerator: { configurable: !0 },
|
|
@@ -1267,37 +1268,37 @@ k.prototype.parse = function() {
|
|
|
1267
1268
|
return e.parseTopLevel(t);
|
|
1268
1269
|
});
|
|
1269
1270
|
}, A.inFunction.get = function() {
|
|
1270
|
-
return (this.currentVarScope().flags &
|
|
1271
|
+
return (this.currentVarScope().flags & Te) > 0;
|
|
1271
1272
|
}, A.inGenerator.get = function() {
|
|
1272
|
-
return (this.currentVarScope().flags &
|
|
1273
|
+
return (this.currentVarScope().flags & De) > 0;
|
|
1273
1274
|
}, A.inAsync.get = function() {
|
|
1274
|
-
return (this.currentVarScope().flags &
|
|
1275
|
+
return (this.currentVarScope().flags & Ee) > 0;
|
|
1275
1276
|
}, A.canAwait.get = function() {
|
|
1276
1277
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
1277
1278
|
var t = this.scopeStack[e].flags;
|
|
1278
|
-
if (t & (
|
|
1279
|
-
if (t &
|
|
1279
|
+
if (t & (Me | Ne)) return !1;
|
|
1280
|
+
if (t & Te) return (t & Ee) > 0;
|
|
1280
1281
|
}
|
|
1281
1282
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
1282
1283
|
}, A.allowReturn.get = function() {
|
|
1283
|
-
return !!(this.inFunction || this.options.allowReturnOutsideFunction && this.currentVarScope().flags &
|
|
1284
|
+
return !!(this.inFunction || this.options.allowReturnOutsideFunction && this.currentVarScope().flags & we);
|
|
1284
1285
|
}, A.allowSuper.get = function() {
|
|
1285
|
-
return (this.currentThisScope().flags &
|
|
1286
|
+
return (this.currentThisScope().flags & Ae) > 0 || this.options.allowSuperOutsideMethod;
|
|
1286
1287
|
}, A.allowDirectSuper.get = function() {
|
|
1287
|
-
return (this.currentThisScope().flags &
|
|
1288
|
+
return (this.currentThisScope().flags & je) > 0;
|
|
1288
1289
|
}, A.treatFunctionsAsVar.get = function() {
|
|
1289
1290
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
1290
1291
|
}, A.allowNewDotTarget.get = function() {
|
|
1291
1292
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
1292
1293
|
var t = this.scopeStack[e].flags;
|
|
1293
|
-
if (t & (
|
|
1294
|
+
if (t & (Me | Ne) || t & Te && !(t & Oe)) return !0;
|
|
1294
1295
|
}
|
|
1295
1296
|
return !1;
|
|
1296
1297
|
}, A.allowUsing.get = function() {
|
|
1297
1298
|
var e = this.currentScope().flags;
|
|
1298
|
-
return !(e &
|
|
1299
|
+
return !(e & Pe || !this.inModule && e & we);
|
|
1299
1300
|
}, A.inClassStaticBlock.get = function() {
|
|
1300
|
-
return (this.currentVarScope().flags &
|
|
1301
|
+
return (this.currentVarScope().flags & Me) > 0;
|
|
1301
1302
|
}, k.extend = function() {
|
|
1302
1303
|
for (var e = [], t = arguments.length; t--;) e[t] = arguments[t];
|
|
1303
1304
|
for (var n = this, r = 0; r < e.length; r++) n = e[r](n);
|
|
@@ -1310,12 +1311,12 @@ k.prototype.parse = function() {
|
|
|
1310
1311
|
}, k.tokenizer = function(e, t) {
|
|
1311
1312
|
return new this(t, e);
|
|
1312
1313
|
}, Object.defineProperties(k.prototype, A);
|
|
1313
|
-
var j = k.prototype,
|
|
1314
|
+
var j = k.prototype, Ue = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
1314
1315
|
j.strictDirective = function(e) {
|
|
1315
1316
|
if (this.options.ecmaVersion < 5) return !1;
|
|
1316
1317
|
for (;;) {
|
|
1317
1318
|
O.lastIndex = e, e += O.exec(this.input)[0].length;
|
|
1318
|
-
var t =
|
|
1319
|
+
var t = Ue.exec(this.input.slice(e));
|
|
1319
1320
|
if (!t) return !1;
|
|
1320
1321
|
if ((t[1] || t[2]) === "use strict") {
|
|
1321
1322
|
O.lastIndex = e + t[0].length;
|
|
@@ -1352,7 +1353,7 @@ j.strictDirective = function(e) {
|
|
|
1352
1353
|
}, j.unexpected = function(e) {
|
|
1353
1354
|
this.raise(e ?? this.start, "Unexpected token");
|
|
1354
1355
|
};
|
|
1355
|
-
var
|
|
1356
|
+
var We = function() {
|
|
1356
1357
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
1357
1358
|
};
|
|
1358
1359
|
j.checkPatternErrors = function(e, t) {
|
|
@@ -1384,7 +1385,7 @@ M.parseTopLevel = function(e) {
|
|
|
1384
1385
|
}
|
|
1385
1386
|
return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType, this.finishNode(e, "Program");
|
|
1386
1387
|
};
|
|
1387
|
-
var
|
|
1388
|
+
var Ge = { kind: "loop" }, Ke = { kind: "switch" };
|
|
1388
1389
|
M.isLet = function(e) {
|
|
1389
1390
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return !1;
|
|
1390
1391
|
O.lastIndex = this.pos;
|
|
@@ -1399,7 +1400,7 @@ M.isLet = function(e) {
|
|
|
1399
1400
|
while (b(r = this.fullCharCodeAt(n)));
|
|
1400
1401
|
if (r === 92) return !0;
|
|
1401
1402
|
var a = this.input.slice(i, n);
|
|
1402
|
-
if (!
|
|
1403
|
+
if (!ee.test(a)) return !0;
|
|
1403
1404
|
}
|
|
1404
1405
|
return !1;
|
|
1405
1406
|
}, M.isAsyncFunction = function() {
|
|
@@ -1427,7 +1428,7 @@ M.isLet = function(e) {
|
|
|
1427
1428
|
while (b(s = this.fullCharCodeAt(r)));
|
|
1428
1429
|
if (s === 92) return !0;
|
|
1429
1430
|
var l = this.input.slice(c, r);
|
|
1430
|
-
if (
|
|
1431
|
+
if (ee.test(l)) return !1;
|
|
1431
1432
|
if (t && !e && l === "of") {
|
|
1432
1433
|
O.lastIndex = r;
|
|
1433
1434
|
var u = O.exec(this.input);
|
|
@@ -1485,11 +1486,11 @@ M.isLet = function(e) {
|
|
|
1485
1486
|
}, M.parseDebuggerStatement = function(e) {
|
|
1486
1487
|
return this.next(), this.semicolon(), this.finishNode(e, "DebuggerStatement");
|
|
1487
1488
|
}, M.parseDoStatement = function(e) {
|
|
1488
|
-
return this.next(), this.labels.push(
|
|
1489
|
+
return this.next(), this.labels.push(Ge), e.body = this.parseStatement("do"), this.labels.pop(), this.expect(E._while), e.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(E.semi) : this.semicolon(), this.finishNode(e, "DoWhileStatement");
|
|
1489
1490
|
}, M.parseForStatement = function(e) {
|
|
1490
1491
|
this.next();
|
|
1491
1492
|
var t = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
1492
|
-
if (this.labels.push(
|
|
1493
|
+
if (this.labels.push(Ge), this.enterScope(0), this.expect(E.parenL), this.type === E.semi) return t > -1 && this.unexpected(t), this.parseFor(e, null);
|
|
1493
1494
|
var n = this.isLet();
|
|
1494
1495
|
if (this.type === E._var || this.type === E._const || n) {
|
|
1495
1496
|
var r = this.startNode(), i = n ? "let" : this.value;
|
|
@@ -1500,18 +1501,18 @@ M.isLet = function(e) {
|
|
|
1500
1501
|
var c = this.startNode();
|
|
1501
1502
|
return this.next(), s === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.parseVar(c, !0, s), this.finishNode(c, "VariableDeclaration"), this.parseForAfterInit(e, c, t);
|
|
1502
1503
|
}
|
|
1503
|
-
var l = this.containsEsc, u = new
|
|
1504
|
+
var l = this.containsEsc, u = new We(), d = this.start, f = t > -1 ? this.parseExprSubscripts(u, "await") : this.parseExpression(!0, u);
|
|
1504
1505
|
return this.type === E._in || (o = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === E._in && this.unexpected(t), e.await = !0) : o && this.options.ecmaVersion >= 8 && (f.start === d && !l && f.type === "Identifier" && f.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = !1)), a && o && this.raise(f.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(f, !1, u), this.checkLValPattern(f), this.parseForIn(e, f)) : (this.checkExpressionErrors(u, !0), t > -1 && this.unexpected(t), this.parseFor(e, f));
|
|
1505
1506
|
}, M.parseForAfterInit = function(e, t, n) {
|
|
1506
1507
|
return (this.type === E._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && t.declarations.length === 1 ? (this.type === E._in ? ((t.kind === "using" || t.kind === "await using") && !t.declarations[0].init && this.raise(this.start, "Using declaration is not allowed in for-in loops"), this.options.ecmaVersion >= 9 && n > -1 && this.unexpected(n)) : this.options.ecmaVersion >= 9 && (e.await = n > -1), this.parseForIn(e, t)) : (n > -1 && this.unexpected(n), this.parseFor(e, t));
|
|
1507
1508
|
}, M.parseFunctionStatement = function(e, t, n) {
|
|
1508
|
-
return this.next(), this.parseFunction(e,
|
|
1509
|
+
return this.next(), this.parseFunction(e, Je | (n ? 0 : Ye), !1, t);
|
|
1509
1510
|
}, M.parseIfStatement = function(e) {
|
|
1510
1511
|
return this.next(), e.test = this.parseParenExpression(), e.consequent = this.parseStatement("if"), e.alternate = this.eat(E._else) ? this.parseStatement("if") : null, this.finishNode(e, "IfStatement");
|
|
1511
1512
|
}, M.parseReturnStatement = function(e) {
|
|
1512
1513
|
return this.allowReturn || this.raise(this.start, "'return' outside of function"), this.next(), this.eat(E.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()), this.finishNode(e, "ReturnStatement");
|
|
1513
1514
|
}, M.parseSwitchStatement = function(e) {
|
|
1514
|
-
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(E.braceL), this.labels.push(
|
|
1515
|
+
this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(E.braceL), this.labels.push(Ke), this.enterScope(Pe);
|
|
1515
1516
|
for (var t, n = !1; this.type !== E.braceR;) if (this.type === E._case || this.type === E._default) {
|
|
1516
1517
|
var r = this.type === E._case;
|
|
1517
1518
|
t && this.finishNode(t, "SwitchCase"), e.cases.push(t = this.startNode()), t.consequent = [], this.next(), r ? t.test = this.parseExpression() : (n && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), n = !0, t.test = null), this.expect(E.colon);
|
|
@@ -1520,10 +1521,10 @@ M.isLet = function(e) {
|
|
|
1520
1521
|
}, M.parseThrowStatement = function(e) {
|
|
1521
1522
|
return this.next(), D.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), e.argument = this.parseExpression(), this.semicolon(), this.finishNode(e, "ThrowStatement");
|
|
1522
1523
|
};
|
|
1523
|
-
var
|
|
1524
|
+
var qe = [];
|
|
1524
1525
|
M.parseCatchClauseParam = function() {
|
|
1525
1526
|
var e = this.parseBindingAtom(), t = e.type === "Identifier";
|
|
1526
|
-
return this.enterScope(t ?
|
|
1527
|
+
return this.enterScope(t ? ke : 0), this.checkLValPattern(e, t ? Ve : ze), this.expect(E.parenR), e;
|
|
1527
1528
|
}, M.parseTryStatement = function(e) {
|
|
1528
1529
|
if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === E._catch) {
|
|
1529
1530
|
var t = this.startNode();
|
|
@@ -1533,7 +1534,7 @@ M.parseCatchClauseParam = function() {
|
|
|
1533
1534
|
}, M.parseVarStatement = function(e, t, n) {
|
|
1534
1535
|
return this.next(), this.parseVar(e, !1, t, n), this.semicolon(), this.finishNode(e, "VariableDeclaration");
|
|
1535
1536
|
}, M.parseWhileStatement = function(e) {
|
|
1536
|
-
return this.next(), e.test = this.parseParenExpression(), this.labels.push(
|
|
1537
|
+
return this.next(), e.test = this.parseParenExpression(), this.labels.push(Ge), e.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(e, "WhileStatement");
|
|
1537
1538
|
}, M.parseWithStatement = function(e) {
|
|
1538
1539
|
return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), e.object = this.parseParenExpression(), e.body = this.parseStatement("with"), this.finishNode(e, "WithStatement");
|
|
1539
1540
|
}, M.parseEmptyStatement = function(e) {
|
|
@@ -1570,13 +1571,13 @@ M.parseCatchClauseParam = function() {
|
|
|
1570
1571
|
}
|
|
1571
1572
|
return e;
|
|
1572
1573
|
}, M.parseVarId = function(e, t) {
|
|
1573
|
-
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ?
|
|
1574
|
+
e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? Re : ze, !1);
|
|
1574
1575
|
};
|
|
1575
|
-
var
|
|
1576
|
+
var Je = 1, Ye = 2, Xe = 4;
|
|
1576
1577
|
M.parseFunction = function(e, t, n, r, i) {
|
|
1577
|
-
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === E.star && t &
|
|
1578
|
+
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === E.star && t & Ye && this.unexpected(), e.generator = this.eat(E.star)), this.options.ecmaVersion >= 8 && (e.async = !!r), t & Je && (e.id = t & Xe && this.type !== E.name ? null : this.parseIdent(), e.id && !(t & Ye) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? Re : ze : Be));
|
|
1578
1579
|
var a = this.yieldPos, o = this.awaitPos, s = this.awaitIdentPos;
|
|
1579
|
-
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
1580
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Ie(e.async, e.generator)), t & Je || (e.id = this.type === E.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, n, !1, i), this.yieldPos = a, this.awaitPos = o, this.awaitIdentPos = s, this.finishNode(e, t & Je ? "FunctionDeclaration" : "FunctionExpression");
|
|
1580
1581
|
}, M.parseFunctionParams = function(e) {
|
|
1581
1582
|
this.expect(E.parenL), e.params = this.parseBindingList(E.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
1582
1583
|
}, M.parseClass = function(e, t) {
|
|
@@ -1586,7 +1587,7 @@ M.parseFunction = function(e, t, n, r, i) {
|
|
|
1586
1587
|
var r = this.enterClassBody(), i = this.startNode(), a = !1;
|
|
1587
1588
|
for (i.body = [], this.expect(E.braceL); this.type !== E.braceR;) {
|
|
1588
1589
|
var o = this.parseClassElement(e.superClass !== null);
|
|
1589
|
-
o && (i.body.push(o), o.type === "MethodDefinition" && o.kind === "constructor" ? (a && this.raiseRecoverable(o.start, "Duplicate constructor in the same class"), a = !0) : o.key && o.key.type === "PrivateIdentifier" &&
|
|
1590
|
+
o && (i.body.push(o), o.type === "MethodDefinition" && o.kind === "constructor" ? (a && this.raiseRecoverable(o.start, "Duplicate constructor in the same class"), a = !0) : o.key && o.key.type === "PrivateIdentifier" && Ze(r, o) && this.raiseRecoverable(o.key.start, "Identifier '#" + o.key.name + "' has already been declared"));
|
|
1590
1591
|
}
|
|
1591
1592
|
return this.strict = n, this.next(), e.body = this.finishNode(i, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
1592
1593
|
}, M.parseClassElement = function(e) {
|
|
@@ -1601,7 +1602,7 @@ M.parseFunction = function(e, t, n, r, i) {
|
|
|
1601
1602
|
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? o = c : r = c);
|
|
1602
1603
|
}
|
|
1603
1604
|
if (r ? (n.computed = !1, n.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), n.key.name = r, this.finishNode(n.key, "Identifier")) : this.parseClassElementName(n), t < 13 || this.type === E.parenL || o !== "method" || i || a) {
|
|
1604
|
-
var l = !n.static &&
|
|
1605
|
+
var l = !n.static && Qe(n, "constructor"), u = l && e;
|
|
1605
1606
|
l && o !== "method" && this.raise(n.key.start, "Constructor can't have get/set modifier"), n.kind = l ? "constructor" : o, this.parseClassMethod(n, i, a, u);
|
|
1606
1607
|
} else this.parseClassField(n);
|
|
1607
1608
|
return n;
|
|
@@ -1611,21 +1612,21 @@ M.parseFunction = function(e, t, n, r, i) {
|
|
|
1611
1612
|
this.type === E.privateId ? (this.value === "constructor" && this.raise(this.start, "Classes can't have an element named '#constructor'"), e.computed = !1, e.key = this.parsePrivateIdent()) : this.parsePropertyName(e);
|
|
1612
1613
|
}, M.parseClassMethod = function(e, t, n, r) {
|
|
1613
1614
|
var i = e.key;
|
|
1614
|
-
e.kind === "constructor" ? (t && this.raise(i.start, "Constructor can't be a generator"), n && this.raise(i.start, "Constructor can't be an async method")) : e.static &&
|
|
1615
|
+
e.kind === "constructor" ? (t && this.raise(i.start, "Constructor can't be a generator"), n && this.raise(i.start, "Constructor can't be an async method")) : e.static && Qe(e, "prototype") && this.raise(i.start, "Classes may not have a static property named prototype");
|
|
1615
1616
|
var a = e.value = this.parseMethod(t, n, r);
|
|
1616
1617
|
return e.kind === "get" && a.params.length !== 0 && this.raiseRecoverable(a.start, "getter should have no params"), e.kind === "set" && a.params.length !== 1 && this.raiseRecoverable(a.start, "setter should have exactly one param"), e.kind === "set" && a.params[0].type === "RestElement" && this.raiseRecoverable(a.params[0].start, "Setter cannot use rest params"), this.finishNode(e, "MethodDefinition");
|
|
1617
1618
|
}, M.parseClassField = function(e) {
|
|
1618
|
-
return
|
|
1619
|
+
return Qe(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && Qe(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(E.eq) ? (this.enterScope(Ne | Ae), e.value = this.parseMaybeAssign(), this.exitScope()) : e.value = null, this.semicolon(), this.finishNode(e, "PropertyDefinition");
|
|
1619
1620
|
}, M.parseClassStaticBlock = function(e) {
|
|
1620
1621
|
e.body = [];
|
|
1621
1622
|
var t = this.labels;
|
|
1622
|
-
for (this.labels = [], this.enterScope(
|
|
1623
|
+
for (this.labels = [], this.enterScope(Me | Ae); this.type !== E.braceR;) {
|
|
1623
1624
|
var n = this.parseStatement(null);
|
|
1624
1625
|
e.body.push(n);
|
|
1625
1626
|
}
|
|
1626
1627
|
return this.next(), this.exitScope(), this.labels = t, this.finishNode(e, "StaticBlock");
|
|
1627
1628
|
}, M.parseClassId = function(e, t) {
|
|
1628
|
-
this.type === E.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id,
|
|
1629
|
+
this.type === E.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id, ze, !1)) : (t === !0 && this.unexpected(), e.id = null);
|
|
1629
1630
|
}, M.parseClassSuper = function(e) {
|
|
1630
1631
|
e.superClass = this.eat(E._extends) ? this.parseExprSubscripts(null, !1) : null;
|
|
1631
1632
|
}, M.enterClassBody = function() {
|
|
@@ -1638,14 +1639,14 @@ M.parseFunction = function(e, t, n, r, i) {
|
|
|
1638
1639
|
var e = this.privateNameStack.pop(), t = e.declared, n = e.used;
|
|
1639
1640
|
if (this.options.checkPrivateFields) for (var r = this.privateNameStack.length, i = r === 0 ? null : this.privateNameStack[r - 1], a = 0; a < n.length; ++a) {
|
|
1640
1641
|
var o = n[a];
|
|
1641
|
-
|
|
1642
|
+
de(t, o.name) || (i ? i.used.push(o) : this.raiseRecoverable(o.start, "Private field '#" + o.name + "' must be declared in an enclosing class"));
|
|
1642
1643
|
}
|
|
1643
1644
|
};
|
|
1644
|
-
function
|
|
1645
|
+
function Ze(e, t) {
|
|
1645
1646
|
var n = t.key.name, r = e[n], i = "true";
|
|
1646
1647
|
return t.type === "MethodDefinition" && (t.kind === "get" || t.kind === "set") && (i = (t.static ? "s" : "i") + t.kind), r === "iget" && i === "iset" || r === "iset" && i === "iget" || r === "sget" && i === "sset" || r === "sset" && i === "sget" ? (e[n] = "true", !1) : r ? !0 : (e[n] = i, !1);
|
|
1647
1648
|
}
|
|
1648
|
-
function
|
|
1649
|
+
function Qe(e, t) {
|
|
1649
1650
|
var n = e.computed, r = e.key;
|
|
1650
1651
|
return !n && (r.type === "Identifier" && r.name === t || r.type === "Literal" && r.value === t);
|
|
1651
1652
|
}
|
|
@@ -1673,7 +1674,7 @@ M.parseExportAllDeclaration = function(e, t) {
|
|
|
1673
1674
|
var e;
|
|
1674
1675
|
if (this.type === E._function || (e = this.isAsyncFunction())) {
|
|
1675
1676
|
var t = this.startNode();
|
|
1676
|
-
return this.next(), e && this.next(), this.parseFunction(t,
|
|
1677
|
+
return this.next(), e && this.next(), this.parseFunction(t, Je | Xe, !1, e);
|
|
1677
1678
|
} else if (this.type === E._class) {
|
|
1678
1679
|
var n = this.startNode();
|
|
1679
1680
|
return this.parseClass(n, "nullableID");
|
|
@@ -1682,7 +1683,7 @@ M.parseExportAllDeclaration = function(e, t) {
|
|
|
1682
1683
|
return this.semicolon(), r;
|
|
1683
1684
|
}
|
|
1684
1685
|
}, M.checkExport = function(e, t, n) {
|
|
1685
|
-
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value),
|
|
1686
|
+
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value), de(e, t) && this.raiseRecoverable(n, "Duplicate export '" + t + "'"), e[t] = !0);
|
|
1686
1687
|
}, M.checkPatternExport = function(e, t) {
|
|
1687
1688
|
var n = t.type;
|
|
1688
1689
|
if (n === "Identifier") this.checkExport(e, t, t.start);
|
|
@@ -1714,16 +1715,16 @@ M.parseExportAllDeclaration = function(e, t) {
|
|
|
1714
1715
|
}
|
|
1715
1716
|
return t;
|
|
1716
1717
|
}, M.parseImport = function(e) {
|
|
1717
|
-
return this.next(), this.type === E.string ? (e.specifiers =
|
|
1718
|
+
return this.next(), this.type === E.string ? (e.specifiers = qe, e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === E.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ImportDeclaration");
|
|
1718
1719
|
}, M.parseImportSpecifier = function() {
|
|
1719
1720
|
var e = this.startNode();
|
|
1720
|
-
return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local,
|
|
1721
|
+
return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local, ze), this.finishNode(e, "ImportSpecifier");
|
|
1721
1722
|
}, M.parseImportDefaultSpecifier = function() {
|
|
1722
1723
|
var e = this.startNode();
|
|
1723
|
-
return e.local = this.parseIdent(), this.checkLValSimple(e.local,
|
|
1724
|
+
return e.local = this.parseIdent(), this.checkLValSimple(e.local, ze), this.finishNode(e, "ImportDefaultSpecifier");
|
|
1724
1725
|
}, M.parseImportNamespaceSpecifier = function() {
|
|
1725
1726
|
var e = this.startNode();
|
|
1726
|
-
return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local,
|
|
1727
|
+
return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local, ze), this.finishNode(e, "ImportNamespaceSpecifier");
|
|
1727
1728
|
}, M.parseImportSpecifiers = function() {
|
|
1728
1729
|
var e = [], t = !0;
|
|
1729
1730
|
if (this.type === E.name && (e.push(this.parseImportDefaultSpecifier()), !this.eat(E.comma))) return e;
|
|
@@ -1742,7 +1743,7 @@ M.parseExportAllDeclaration = function(e, t) {
|
|
|
1742
1743
|
if (n) n = !1;
|
|
1743
1744
|
else if (this.expect(E.comma), this.afterTrailingComma(E.braceR)) break;
|
|
1744
1745
|
var r = this.parseImportAttribute(), i = r.key.type === "Identifier" ? r.key.name : r.key.value;
|
|
1745
|
-
|
|
1746
|
+
de(t, i) && this.raiseRecoverable(r.key.start, "Duplicate attribute key '" + i + "'"), t[i] = !0, e.push(r);
|
|
1746
1747
|
}
|
|
1747
1748
|
return e;
|
|
1748
1749
|
}, M.parseImportAttribute = function() {
|
|
@@ -1751,7 +1752,7 @@ M.parseExportAllDeclaration = function(e, t) {
|
|
|
1751
1752
|
}, M.parseModuleExportName = function() {
|
|
1752
1753
|
if (this.options.ecmaVersion >= 13 && this.type === E.string) {
|
|
1753
1754
|
var e = this.parseLiteral(this.value);
|
|
1754
|
-
return
|
|
1755
|
+
return ge.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e;
|
|
1755
1756
|
}
|
|
1756
1757
|
return this.parseIdent(!0);
|
|
1757
1758
|
}, M.adaptDirectivePrologue = function(e) {
|
|
@@ -1842,11 +1843,11 @@ N.toAssignable = function(e, t, n) {
|
|
|
1842
1843
|
var r = this.startNodeAt(e, t);
|
|
1843
1844
|
return r.left = n, r.right = this.parseMaybeAssign(), this.finishNode(r, "AssignmentPattern");
|
|
1844
1845
|
}, N.checkLValSimple = function(e, t, n) {
|
|
1845
|
-
t === void 0 && (t =
|
|
1846
|
-
var r = t !==
|
|
1846
|
+
t === void 0 && (t = Le);
|
|
1847
|
+
var r = t !== Le;
|
|
1847
1848
|
switch (e.type) {
|
|
1848
1849
|
case "Identifier":
|
|
1849
|
-
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (r ? "Binding " : "Assigning to ") + e.name + " in strict mode"), r && (t ===
|
|
1850
|
+
this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (r ? "Binding " : "Assigning to ") + e.name + " in strict mode"), r && (t === ze && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), n && (de(n, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), n[e.name] = !0), t !== He && this.declareName(e.name, t, e.start));
|
|
1850
1851
|
break;
|
|
1851
1852
|
case "ChainExpression":
|
|
1852
1853
|
this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -1858,7 +1859,7 @@ N.toAssignable = function(e, t, n) {
|
|
|
1858
1859
|
default: this.raise(e.start, (r ? "Binding" : "Assigning to") + " rvalue");
|
|
1859
1860
|
}
|
|
1860
1861
|
}, N.checkLValPattern = function(e, t, n) {
|
|
1861
|
-
switch (t === void 0 && (t =
|
|
1862
|
+
switch (t === void 0 && (t = Le), e.type) {
|
|
1862
1863
|
case "ObjectPattern":
|
|
1863
1864
|
for (var r = 0, i = e.properties; r < i.length; r += 1) {
|
|
1864
1865
|
var a = i[r];
|
|
@@ -1874,7 +1875,7 @@ N.toAssignable = function(e, t, n) {
|
|
|
1874
1875
|
default: this.checkLValSimple(e, t, n);
|
|
1875
1876
|
}
|
|
1876
1877
|
}, N.checkLValInnerPattern = function(e, t, n) {
|
|
1877
|
-
switch (t === void 0 && (t =
|
|
1878
|
+
switch (t === void 0 && (t = Le), e.type) {
|
|
1878
1879
|
case "Property":
|
|
1879
1880
|
this.checkLValInnerPattern(e.value, t, n);
|
|
1880
1881
|
break;
|
|
@@ -1902,24 +1903,24 @@ var P = function(e, t, n, r, i) {
|
|
|
1902
1903
|
f_expr: new P("function", !0),
|
|
1903
1904
|
f_expr_gen: new P("function", !0, !1, null, !0),
|
|
1904
1905
|
f_gen: new P("function", !1, !1, null, !0)
|
|
1905
|
-
},
|
|
1906
|
-
|
|
1906
|
+
}, $e = k.prototype;
|
|
1907
|
+
$e.initialContext = function() {
|
|
1907
1908
|
return [F.b_stat];
|
|
1908
|
-
},
|
|
1909
|
+
}, $e.curContext = function() {
|
|
1909
1910
|
return this.context[this.context.length - 1];
|
|
1910
|
-
},
|
|
1911
|
+
}, $e.braceIsBlock = function(e) {
|
|
1911
1912
|
var t = this.curContext();
|
|
1912
1913
|
return t === F.f_expr || t === F.f_stat ? !0 : e === E.colon && (t === F.b_stat || t === F.b_expr) ? !t.isExpr : e === E._return || e === E.name && this.exprAllowed ? D.test(this.input.slice(this.lastTokEnd, this.start)) : e === E._else || e === E.semi || e === E.eof || e === E.parenR || e === E.arrow ? !0 : e === E.braceL ? t === F.b_stat : e === E._var || e === E._const || e === E.name ? !1 : !this.exprAllowed;
|
|
1913
|
-
},
|
|
1914
|
+
}, $e.inGeneratorContext = function() {
|
|
1914
1915
|
for (var e = this.context.length - 1; e >= 1; e--) {
|
|
1915
1916
|
var t = this.context[e];
|
|
1916
1917
|
if (t.token === "function") return t.generator;
|
|
1917
1918
|
}
|
|
1918
1919
|
return !1;
|
|
1919
|
-
},
|
|
1920
|
+
}, $e.updateContext = function(e) {
|
|
1920
1921
|
var t, n = this.type;
|
|
1921
1922
|
n.keyword && e === E.dot ? this.exprAllowed = !1 : (t = n.updateContext) ? t.call(this, e) : this.exprAllowed = n.beforeExpr;
|
|
1922
|
-
},
|
|
1923
|
+
}, $e.overrideContext = function(e) {
|
|
1923
1924
|
this.curContext() !== e && (this.context[this.context.length - 1] = e);
|
|
1924
1925
|
}, E.parenR.updateContext = E.braceR.updateContext = function() {
|
|
1925
1926
|
if (this.context.length === 1) {
|
|
@@ -1994,7 +1995,7 @@ I.checkPropClash = function(e, t, n) {
|
|
|
1994
1995
|
this.exprAllowed = !1;
|
|
1995
1996
|
}
|
|
1996
1997
|
var r = !1, i = -1, a = -1, o = -1;
|
|
1997
|
-
t ? (i = t.parenthesizedAssign, a = t.trailingComma, o = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new
|
|
1998
|
+
t ? (i = t.parenthesizedAssign, a = t.trailingComma, o = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new We(), r = !0);
|
|
1998
1999
|
var s = this.start, c = this.startLoc;
|
|
1999
2000
|
(this.type === E.parenL || this.type === E.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
2000
2001
|
var l = this.parseMaybeConditional(e, t);
|
|
@@ -2034,7 +2035,7 @@ I.checkPropClash = function(e, t, n) {
|
|
|
2034
2035
|
if (this.isContextual("await") && this.canAwait) o = this.parseAwait(r), t = !0;
|
|
2035
2036
|
else if (this.type.prefix) {
|
|
2036
2037
|
var s = this.startNode(), c = this.type === E.incDec;
|
|
2037
|
-
s.operator = this.value, s.prefix = !0, this.next(), s.argument = this.parseMaybeUnary(null, !0, c, r), this.checkExpressionErrors(e, !0), c ? this.checkLValSimple(s.argument) : this.strict && s.operator === "delete" &&
|
|
2038
|
+
s.operator = this.value, s.prefix = !0, this.next(), s.argument = this.parseMaybeUnary(null, !0, c, r), this.checkExpressionErrors(e, !0), c ? this.checkLValSimple(s.argument) : this.strict && s.operator === "delete" && et(s.argument) ? this.raiseRecoverable(s.start, "Deleting local variable in strict mode") : s.operator === "delete" && tt(s.argument) ? this.raiseRecoverable(s.start, "Private fields can not be deleted") : t = !0, o = this.finishNode(s, c ? "UpdateExpression" : "UnaryExpression");
|
|
2038
2039
|
} else if (!t && this.type === E.privateId) (r || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), o = this.parsePrivateIdent(), this.type !== E._in && this.unexpected();
|
|
2039
2040
|
else {
|
|
2040
2041
|
if (o = this.parseExprSubscripts(e, r), this.checkExpressionErrors(e)) return o;
|
|
@@ -2047,11 +2048,11 @@ I.checkPropClash = function(e, t, n) {
|
|
|
2047
2048
|
else return this.buildBinary(i, a, o, this.parseMaybeUnary(null, !1, !1, r), "**", !1);
|
|
2048
2049
|
else return o;
|
|
2049
2050
|
};
|
|
2050
|
-
function $e(e) {
|
|
2051
|
-
return e.type === "Identifier" || e.type === "ParenthesizedExpression" && $e(e.expression);
|
|
2052
|
-
}
|
|
2053
2051
|
function et(e) {
|
|
2054
|
-
return e.type === "
|
|
2052
|
+
return e.type === "Identifier" || e.type === "ParenthesizedExpression" && et(e.expression);
|
|
2053
|
+
}
|
|
2054
|
+
function tt(e) {
|
|
2055
|
+
return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" && tt(e.expression) || e.type === "ParenthesizedExpression" && tt(e.expression);
|
|
2055
2056
|
}
|
|
2056
2057
|
I.parseExprSubscripts = function(e, t) {
|
|
2057
2058
|
var n = this.start, r = this.startLoc, i = this.parseExprAtom(e, t);
|
|
@@ -2082,7 +2083,7 @@ I.parseExprSubscripts = function(e, t) {
|
|
|
2082
2083
|
var u = this.startNodeAt(t, n);
|
|
2083
2084
|
u.object = e, l ? (u.property = this.parseExpression(), this.expect(E.bracketR)) : this.type === E.privateId && e.type !== "Super" ? u.property = this.parsePrivateIdent() : u.property = this.parseIdent(this.options.allowReserved !== "never"), u.computed = !!l, s && (u.optional = c), e = this.finishNode(u, "MemberExpression");
|
|
2084
2085
|
} else if (!r && this.eat(E.parenL)) {
|
|
2085
|
-
var d = new
|
|
2086
|
+
var d = new We(), f = this.yieldPos, p = this.awaitPos, m = this.awaitIdentPos;
|
|
2086
2087
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
2087
2088
|
var h = this.parseExprList(E.parenR, this.options.ecmaVersion >= 8, !1, d);
|
|
2088
2089
|
if (i && !c && this.shouldParseAsyncArrow()) return this.checkPatternErrors(d, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = f, this.awaitPos = p, this.awaitIdentPos = m, this.parseSubscriptAsyncArrow(t, n, h, o);
|
|
@@ -2165,7 +2166,7 @@ I.parseExprSubscripts = function(e, t) {
|
|
|
2165
2166
|
var n = this.start, r = this.startLoc, i, a = this.options.ecmaVersion >= 8;
|
|
2166
2167
|
if (this.options.ecmaVersion >= 6) {
|
|
2167
2168
|
this.next();
|
|
2168
|
-
var o = this.start, s = this.startLoc, c = [], l = !0, u = !1, d = new
|
|
2169
|
+
var o = this.start, s = this.startLoc, c = [], l = !0, u = !1, d = new We(), f = this.yieldPos, p = this.awaitPos, m;
|
|
2169
2170
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== E.parenR;) if (l ? l = !1 : this.expect(E.comma), a && this.afterTrailingComma(E.parenR, !0)) {
|
|
2170
2171
|
u = !0;
|
|
2171
2172
|
break;
|
|
@@ -2186,7 +2187,7 @@ I.parseExprSubscripts = function(e, t) {
|
|
|
2186
2187
|
}, I.parseParenArrowList = function(e, t, n, r) {
|
|
2187
2188
|
return this.parseArrowExpression(this.startNodeAt(e, t), n, !1, r);
|
|
2188
2189
|
};
|
|
2189
|
-
var
|
|
2190
|
+
var nt = [];
|
|
2190
2191
|
I.parseNew = function() {
|
|
2191
2192
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
2192
2193
|
var e = this.startNode();
|
|
@@ -2197,7 +2198,7 @@ I.parseNew = function() {
|
|
|
2197
2198
|
return e.property = this.parseIdent(!0), e.property.name !== "target" && this.raiseRecoverable(e.property.start, "The only valid meta property for new is 'new.target'"), n && this.raiseRecoverable(e.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(e.start, "'new.target' can only be used in functions and class static block"), this.finishNode(e, "MetaProperty");
|
|
2198
2199
|
}
|
|
2199
2200
|
var r = this.start, i = this.startLoc;
|
|
2200
|
-
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), r, i, !0, !1), e.callee.type === "Super" && this.raiseRecoverable(r, "Invalid use of 'super'"), this.eat(E.parenL) ? e.arguments = this.parseExprList(E.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments =
|
|
2201
|
+
return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), r, i, !0, !1), e.callee.type === "Super" && this.raiseRecoverable(r, "Invalid use of 'super'"), this.eat(E.parenL) ? e.arguments = this.parseExprList(E.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments = nt, this.finishNode(e, "NewExpression");
|
|
2201
2202
|
}, I.parseTemplateElement = function(e) {
|
|
2202
2203
|
var t = e.isTagged, n = this.startNode();
|
|
2203
2204
|
return this.type === E.invalidTemplate ? (t || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), n.value = {
|
|
@@ -2253,10 +2254,10 @@ I.parseNew = function() {
|
|
|
2253
2254
|
e.id = null, this.options.ecmaVersion >= 6 && (e.generator = e.expression = !1), this.options.ecmaVersion >= 8 && (e.async = !1);
|
|
2254
2255
|
}, I.parseMethod = function(e, t, n) {
|
|
2255
2256
|
var r = this.startNode(), i = this.yieldPos, a = this.awaitPos, o = this.awaitIdentPos;
|
|
2256
|
-
return this.initFunction(r), this.options.ecmaVersion >= 6 && (r.generator = e), this.options.ecmaVersion >= 8 && (r.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
2257
|
+
return this.initFunction(r), this.options.ecmaVersion >= 6 && (r.generator = e), this.options.ecmaVersion >= 8 && (r.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Ie(t, r.generator) | Ae | (n ? je : 0)), this.expect(E.parenL), r.params = this.parseBindingList(E.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(r, !1, !0, !1), this.yieldPos = i, this.awaitPos = a, this.awaitIdentPos = o, this.finishNode(r, "FunctionExpression");
|
|
2257
2258
|
}, I.parseArrowExpression = function(e, t, n, r) {
|
|
2258
2259
|
var i = this.yieldPos, a = this.awaitPos, o = this.awaitIdentPos;
|
|
2259
|
-
return this.enterScope(
|
|
2260
|
+
return this.enterScope(Ie(n, !1) | Oe), this.initFunction(e), this.options.ecmaVersion >= 8 && (e.async = !!n), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, e.params = this.toAssignableList(t, !0), this.parseFunctionBody(e, !0, !1, r), this.yieldPos = i, this.awaitPos = a, this.awaitIdentPos = o, this.finishNode(e, "ArrowFunctionExpression");
|
|
2260
2261
|
}, I.parseFunctionBody = function(e, t, n, r) {
|
|
2261
2262
|
var i = t && this.type !== E.braceL, a = this.strict, o = !1;
|
|
2262
2263
|
if (i) e.body = this.parseMaybeAssign(r), e.expression = !0, this.checkParams(e, !1);
|
|
@@ -2264,7 +2265,7 @@ I.parseNew = function() {
|
|
|
2264
2265
|
var s = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e.params);
|
|
2265
2266
|
(!a || s) && (o = this.strictDirective(this.end), o && s && this.raiseRecoverable(e.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
|
|
2266
2267
|
var c = this.labels;
|
|
2267
|
-
this.labels = [], o && (this.strict = !0), this.checkParams(e, !a && !o && !t && !n && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id,
|
|
2268
|
+
this.labels = [], o && (this.strict = !0), this.checkParams(e, !a && !o && !t && !n && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id, He), e.body = this.parseBlock(!1, void 0, o && !a), e.expression = !1, this.adaptDirectivePrologue(e.body.body), this.labels = c;
|
|
2268
2269
|
}
|
|
2269
2270
|
this.exitScope();
|
|
2270
2271
|
}, I.isSimpleParamList = function(e) {
|
|
@@ -2273,7 +2274,7 @@ I.parseNew = function() {
|
|
|
2273
2274
|
}, I.checkParams = function(e, t) {
|
|
2274
2275
|
for (var n = Object.create(null), r = 0, i = e.params; r < i.length; r += 1) {
|
|
2275
2276
|
var a = i[r];
|
|
2276
|
-
this.checkLValInnerPattern(a,
|
|
2277
|
+
this.checkLValInnerPattern(a, Re, t ? null : n);
|
|
2277
2278
|
}
|
|
2278
2279
|
}, I.parseExprList = function(e, t, n, r) {
|
|
2279
2280
|
for (var i = [], a = !0; !this.eat(e);) {
|
|
@@ -2285,7 +2286,7 @@ I.parseNew = function() {
|
|
|
2285
2286
|
return i;
|
|
2286
2287
|
}, I.checkUnreserved = function(e) {
|
|
2287
2288
|
var t = e.start, n = e.end, r = e.name;
|
|
2288
|
-
this.inGenerator && r === "yield" && this.raiseRecoverable(t, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && r === "await" && this.raiseRecoverable(t, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags &
|
|
2289
|
+
this.inGenerator && r === "yield" && this.raiseRecoverable(t, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && r === "await" && this.raiseRecoverable(t, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags & Fe) && r === "arguments" && this.raiseRecoverable(t, "Cannot use 'arguments' in class field initializer"), this.inClassStaticBlock && (r === "arguments" || r === "await") && this.raise(t, "Cannot use " + r + " in class static initialization block"), this.keywords.test(r) && this.raise(t, "Unexpected keyword '" + r + "'"), !(this.options.ecmaVersion < 6 && this.input.slice(t, n).indexOf("\\") !== -1) && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(r) && (!this.inAsync && r === "await" && this.raiseRecoverable(t, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(t, "The keyword '" + r + "' is reserved"));
|
|
2289
2290
|
}, I.parseIdent = function(e) {
|
|
2290
2291
|
var t = this.parseIdentNode();
|
|
2291
2292
|
return this.next(!!e), this.finishNode(t, "Identifier"), e || (this.checkUnreserved(t), t.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = t.start)), t;
|
|
@@ -2304,132 +2305,132 @@ I.parseNew = function() {
|
|
|
2304
2305
|
var t = this.startNode();
|
|
2305
2306
|
return this.next(), t.argument = this.parseMaybeUnary(null, !0, !1, e), this.finishNode(t, "AwaitExpression");
|
|
2306
2307
|
};
|
|
2307
|
-
var
|
|
2308
|
-
|
|
2309
|
-
var n =
|
|
2308
|
+
var rt = k.prototype;
|
|
2309
|
+
rt.raise = function(e, t) {
|
|
2310
|
+
var n = ye(this.input, e);
|
|
2310
2311
|
t += " (" + n.line + ":" + n.column + ")", this.sourceFile && (t += " in " + this.sourceFile);
|
|
2311
2312
|
var r = SyntaxError(t);
|
|
2312
2313
|
throw r.pos = e, r.loc = n, r.raisedAt = this.pos, r;
|
|
2313
|
-
},
|
|
2314
|
-
if (this.options.locations) return new
|
|
2314
|
+
}, rt.raiseRecoverable = rt.raise, rt.curPosition = function() {
|
|
2315
|
+
if (this.options.locations) return new _e(this.curLine, this.pos - this.lineStart);
|
|
2315
2316
|
};
|
|
2316
|
-
var
|
|
2317
|
+
var it = k.prototype, at = function(e) {
|
|
2317
2318
|
this.flags = e, this.var = [], this.lexical = [], this.functions = [];
|
|
2318
2319
|
};
|
|
2319
|
-
|
|
2320
|
-
this.scopeStack.push(new
|
|
2321
|
-
},
|
|
2320
|
+
it.enterScope = function(e) {
|
|
2321
|
+
this.scopeStack.push(new at(e));
|
|
2322
|
+
}, it.exitScope = function() {
|
|
2322
2323
|
this.scopeStack.pop();
|
|
2323
|
-
},
|
|
2324
|
-
return e.flags &
|
|
2325
|
-
},
|
|
2324
|
+
}, it.treatFunctionsAsVarInScope = function(e) {
|
|
2325
|
+
return e.flags & Te || !this.inModule && e.flags & we;
|
|
2326
|
+
}, it.declareName = function(e, t, n) {
|
|
2326
2327
|
var r = !1;
|
|
2327
|
-
if (t ===
|
|
2328
|
+
if (t === ze) {
|
|
2328
2329
|
var i = this.currentScope();
|
|
2329
|
-
r = i.lexical.indexOf(e) > -1 || i.functions.indexOf(e) > -1 || i.var.indexOf(e) > -1, i.lexical.push(e), this.inModule && i.flags &
|
|
2330
|
-
} else if (t ===
|
|
2331
|
-
else if (t ===
|
|
2330
|
+
r = i.lexical.indexOf(e) > -1 || i.functions.indexOf(e) > -1 || i.var.indexOf(e) > -1, i.lexical.push(e), this.inModule && i.flags & we && delete this.undefinedExports[e];
|
|
2331
|
+
} else if (t === Ve) this.currentScope().lexical.push(e);
|
|
2332
|
+
else if (t === Be) {
|
|
2332
2333
|
var a = this.currentScope();
|
|
2333
2334
|
r = this.treatFunctionsAsVar ? a.lexical.indexOf(e) > -1 : a.lexical.indexOf(e) > -1 || a.var.indexOf(e) > -1, a.functions.push(e);
|
|
2334
2335
|
} else for (var o = this.scopeStack.length - 1; o >= 0; --o) {
|
|
2335
2336
|
var s = this.scopeStack[o];
|
|
2336
|
-
if (s.lexical.indexOf(e) > -1 && !(s.flags &
|
|
2337
|
+
if (s.lexical.indexOf(e) > -1 && !(s.flags & ke && s.lexical[0] === e) || !this.treatFunctionsAsVarInScope(s) && s.functions.indexOf(e) > -1) {
|
|
2337
2338
|
r = !0;
|
|
2338
2339
|
break;
|
|
2339
2340
|
}
|
|
2340
|
-
if (s.var.push(e), this.inModule && s.flags &
|
|
2341
|
+
if (s.var.push(e), this.inModule && s.flags & we && delete this.undefinedExports[e], s.flags & Fe) break;
|
|
2341
2342
|
}
|
|
2342
2343
|
r && this.raiseRecoverable(n, "Identifier '" + e + "' has already been declared");
|
|
2343
|
-
},
|
|
2344
|
+
}, it.checkLocalExport = function(e) {
|
|
2344
2345
|
this.scopeStack[0].lexical.indexOf(e.name) === -1 && this.scopeStack[0].var.indexOf(e.name) === -1 && (this.undefinedExports[e.name] = e);
|
|
2345
|
-
},
|
|
2346
|
+
}, it.currentScope = function() {
|
|
2346
2347
|
return this.scopeStack[this.scopeStack.length - 1];
|
|
2347
|
-
},
|
|
2348
|
+
}, it.currentVarScope = function() {
|
|
2348
2349
|
for (var e = this.scopeStack.length - 1;; e--) {
|
|
2349
2350
|
var t = this.scopeStack[e];
|
|
2350
|
-
if (t.flags & (
|
|
2351
|
+
if (t.flags & (Fe | Ne | Me)) return t;
|
|
2351
2352
|
}
|
|
2352
|
-
},
|
|
2353
|
+
}, it.currentThisScope = function() {
|
|
2353
2354
|
for (var e = this.scopeStack.length - 1;; e--) {
|
|
2354
2355
|
var t = this.scopeStack[e];
|
|
2355
|
-
if (t.flags & (
|
|
2356
|
+
if (t.flags & (Fe | Ne | Me) && !(t.flags & Oe)) return t;
|
|
2356
2357
|
}
|
|
2357
2358
|
};
|
|
2358
|
-
var
|
|
2359
|
-
this.type = "", this.start = t, this.end = 0, e.options.locations && (this.loc = new
|
|
2360
|
-
},
|
|
2361
|
-
|
|
2362
|
-
return new
|
|
2363
|
-
},
|
|
2364
|
-
return new
|
|
2359
|
+
var ot = function(e, t, n) {
|
|
2360
|
+
this.type = "", this.start = t, this.end = 0, e.options.locations && (this.loc = new ve(e, n)), e.options.directSourceFile && (this.sourceFile = e.options.directSourceFile), e.options.ranges && (this.range = [t, 0]);
|
|
2361
|
+
}, st = k.prototype;
|
|
2362
|
+
st.startNode = function() {
|
|
2363
|
+
return new ot(this, this.start, this.startLoc);
|
|
2364
|
+
}, st.startNodeAt = function(e, t) {
|
|
2365
|
+
return new ot(this, e, t);
|
|
2365
2366
|
};
|
|
2366
|
-
function
|
|
2367
|
+
function ct(e, t, n, r) {
|
|
2367
2368
|
return e.type = t, e.end = n, this.options.locations && (e.loc.end = r), this.options.ranges && (e.range[1] = n), e;
|
|
2368
2369
|
}
|
|
2369
|
-
|
|
2370
|
-
return
|
|
2371
|
-
},
|
|
2372
|
-
return
|
|
2373
|
-
},
|
|
2374
|
-
var t = new
|
|
2370
|
+
st.finishNode = function(e, t) {
|
|
2371
|
+
return ct.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc);
|
|
2372
|
+
}, st.finishNodeAt = function(e, t, n, r) {
|
|
2373
|
+
return ct.call(this, e, t, n, r);
|
|
2374
|
+
}, st.copyNode = function(e) {
|
|
2375
|
+
var t = new ot(this, e.start, this.startLoc);
|
|
2375
2376
|
for (var n in e) t[n] = e[n];
|
|
2376
2377
|
return t;
|
|
2377
2378
|
};
|
|
2378
|
-
var
|
|
2379
|
-
9:
|
|
2380
|
-
10:
|
|
2381
|
-
11:
|
|
2382
|
-
12:
|
|
2383
|
-
13:
|
|
2384
|
-
14:
|
|
2385
|
-
},
|
|
2379
|
+
var lt = "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", ut = "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", dt = ut + " Extended_Pictographic", ft = dt, pt = ft + " EBase EComp EMod EPres ExtPict", mt = pt, ht = {
|
|
2380
|
+
9: ut,
|
|
2381
|
+
10: dt,
|
|
2382
|
+
11: ft,
|
|
2383
|
+
12: pt,
|
|
2384
|
+
13: mt,
|
|
2385
|
+
14: mt
|
|
2386
|
+
}, gt = {
|
|
2386
2387
|
9: "",
|
|
2387
2388
|
10: "",
|
|
2388
2389
|
11: "",
|
|
2389
2390
|
12: "",
|
|
2390
2391
|
13: "",
|
|
2391
2392
|
14: "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"
|
|
2392
|
-
},
|
|
2393
|
-
9:
|
|
2394
|
-
10:
|
|
2395
|
-
11:
|
|
2396
|
-
12:
|
|
2397
|
-
13:
|
|
2398
|
-
14:
|
|
2399
|
-
},
|
|
2400
|
-
function
|
|
2401
|
-
var t =
|
|
2402
|
-
binary:
|
|
2403
|
-
binaryOfStrings:
|
|
2393
|
+
}, _t = "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", vt = "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", yt = vt + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", bt = yt + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", xt = bt + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", St = xt + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", Ct = {
|
|
2394
|
+
9: vt,
|
|
2395
|
+
10: yt,
|
|
2396
|
+
11: bt,
|
|
2397
|
+
12: xt,
|
|
2398
|
+
13: St,
|
|
2399
|
+
14: St + " " + lt
|
|
2400
|
+
}, wt = {};
|
|
2401
|
+
function Tt(e) {
|
|
2402
|
+
var t = wt[e] = {
|
|
2403
|
+
binary: me(ht[e] + " " + _t),
|
|
2404
|
+
binaryOfStrings: me(gt[e]),
|
|
2404
2405
|
nonBinary: {
|
|
2405
|
-
General_Category:
|
|
2406
|
-
Script:
|
|
2406
|
+
General_Category: me(_t),
|
|
2407
|
+
Script: me(Ct[e])
|
|
2407
2408
|
}
|
|
2408
2409
|
};
|
|
2409
2410
|
t.nonBinary.Script_Extensions = t.nonBinary.Script, t.nonBinary.gc = t.nonBinary.General_Category, t.nonBinary.sc = t.nonBinary.Script, t.nonBinary.scx = t.nonBinary.Script_Extensions;
|
|
2410
2411
|
}
|
|
2411
|
-
for (var
|
|
2412
|
+
for (var Et = 0, Dt = [
|
|
2412
2413
|
9,
|
|
2413
2414
|
10,
|
|
2414
2415
|
11,
|
|
2415
2416
|
12,
|
|
2416
2417
|
13,
|
|
2417
2418
|
14
|
|
2418
|
-
];
|
|
2419
|
-
var
|
|
2420
|
-
|
|
2419
|
+
]; Et < Dt.length; Et += 1) {
|
|
2420
|
+
var Ot = Dt[Et];
|
|
2421
|
+
Tt(Ot);
|
|
2421
2422
|
}
|
|
2422
|
-
var L = k.prototype,
|
|
2423
|
+
var L = k.prototype, kt = function(e, t) {
|
|
2423
2424
|
this.parent = e, this.base = t || this;
|
|
2424
2425
|
};
|
|
2425
|
-
|
|
2426
|
+
kt.prototype.separatedFrom = function(e) {
|
|
2426
2427
|
for (var t = this; t; t = t.parent) for (var n = e; n; n = n.parent) if (t.base === n.base && t !== n) return !0;
|
|
2427
2428
|
return !1;
|
|
2428
|
-
},
|
|
2429
|
-
return new
|
|
2429
|
+
}, kt.prototype.sibling = function() {
|
|
2430
|
+
return new kt(this.parent, this.base);
|
|
2430
2431
|
};
|
|
2431
2432
|
var R = function(e) {
|
|
2432
|
-
this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : "") + (e.options.ecmaVersion >= 13 ? "d" : "") + (e.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties =
|
|
2433
|
+
this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : "") + (e.options.ecmaVersion >= 13 ? "d" : "") + (e.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = wt[e.options.ecmaVersion >= 14 ? 14 : e.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = Object.create(null), this.backReferenceNames = [], this.branchID = null;
|
|
2433
2434
|
};
|
|
2434
2435
|
R.prototype.reset = function(e, t, n) {
|
|
2435
2436
|
var r = n.indexOf("v") !== -1, i = n.indexOf("u") !== -1;
|
|
@@ -2473,12 +2474,12 @@ R.prototype.reset = function(e, t, n) {
|
|
|
2473
2474
|
}
|
|
2474
2475
|
this.options.ecmaVersion >= 15 && r && i && this.raise(e.start, "Invalid regular expression flag");
|
|
2475
2476
|
};
|
|
2476
|
-
function
|
|
2477
|
+
function At(e) {
|
|
2477
2478
|
for (var t in e) return !0;
|
|
2478
2479
|
return !1;
|
|
2479
2480
|
}
|
|
2480
2481
|
L.validateRegExpPattern = function(e) {
|
|
2481
|
-
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 &&
|
|
2482
|
+
this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && At(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e));
|
|
2482
2483
|
}, L.regexp_pattern = function(e) {
|
|
2483
2484
|
e.pos = 0, e.lastIntValue = 0, e.lastStringValue = "", e.lastAssertionIsQuantifiable = !1, e.numCapturingParens = 0, e.maxBackReference = 0, e.groupNames = Object.create(null), e.backReferenceNames.length = 0, e.branchID = null, this.regexp_disjunction(e), e.pos !== e.source.length && (e.eat(41) && e.raise("Unmatched ')'"), (e.eat(93) || e.eat(125)) && e.raise("Lone quantifier brackets")), e.maxBackReference > e.numCapturingParens && e.raise("Invalid escape");
|
|
2484
2485
|
for (var t = 0, n = e.backReferenceNames; t < n.length; t += 1) {
|
|
@@ -2487,7 +2488,7 @@ L.validateRegExpPattern = function(e) {
|
|
|
2487
2488
|
}
|
|
2488
2489
|
}, L.regexp_disjunction = function(e) {
|
|
2489
2490
|
var t = this.options.ecmaVersion >= 16;
|
|
2490
|
-
for (t && (e.branchID = new
|
|
2491
|
+
for (t && (e.branchID = new kt(e.branchID, null)), this.regexp_alternative(e); e.eat(124);) t && (e.branchID = e.branchID.sibling()), this.regexp_alternative(e);
|
|
2491
2492
|
t && (e.branchID = e.branchID.parent), this.regexp_eatQuantifier(e, !0) && e.raise("Nothing to repeat"), e.eat(123) && e.raise("Lone quantifier brackets");
|
|
2492
2493
|
}, L.regexp_alternative = function(e) {
|
|
2493
2494
|
for (; e.pos < e.source.length && this.regexp_eatTerm(e););
|
|
@@ -2562,10 +2563,10 @@ L.validateRegExpPattern = function(e) {
|
|
|
2562
2563
|
}
|
|
2563
2564
|
return !1;
|
|
2564
2565
|
}, L.regexp_eatModifiers = function(e) {
|
|
2565
|
-
for (var t = "", n = 0; (n = e.current()) !== -1 &&
|
|
2566
|
+
for (var t = "", n = 0; (n = e.current()) !== -1 && jt(n);) t += he(n), e.advance();
|
|
2566
2567
|
return t;
|
|
2567
2568
|
};
|
|
2568
|
-
function
|
|
2569
|
+
function jt(e) {
|
|
2569
2570
|
return e === 105 || e === 109 || e === 115;
|
|
2570
2571
|
}
|
|
2571
2572
|
L.regexp_eatExtendedAtom = function(e) {
|
|
@@ -2574,13 +2575,13 @@ L.regexp_eatExtendedAtom = function(e) {
|
|
|
2574
2575
|
return this.regexp_eatBracedQuantifier(e, !0) && e.raise("Nothing to repeat"), !1;
|
|
2575
2576
|
}, L.regexp_eatSyntaxCharacter = function(e) {
|
|
2576
2577
|
var t = e.current();
|
|
2577
|
-
return
|
|
2578
|
+
return Mt(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2578
2579
|
};
|
|
2579
|
-
function
|
|
2580
|
+
function Mt(e) {
|
|
2580
2581
|
return e === 36 || e >= 40 && e <= 43 || e === 46 || e === 63 || e >= 91 && e <= 94 || e >= 123 && e <= 125;
|
|
2581
2582
|
}
|
|
2582
2583
|
L.regexp_eatPatternCharacters = function(e) {
|
|
2583
|
-
for (var t = e.pos, n = 0; (n = e.current()) !== -1 && !
|
|
2584
|
+
for (var t = e.pos, n = 0; (n = e.current()) !== -1 && !Mt(n);) e.advance();
|
|
2584
2585
|
return e.pos !== t;
|
|
2585
2586
|
}, L.regexp_eatExtendedPatternCharacter = function(e) {
|
|
2586
2587
|
var t = e.current();
|
|
@@ -2601,22 +2602,22 @@ L.regexp_eatPatternCharacters = function(e) {
|
|
|
2601
2602
|
return !1;
|
|
2602
2603
|
}, L.regexp_eatRegExpIdentifierName = function(e) {
|
|
2603
2604
|
if (e.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(e)) {
|
|
2604
|
-
for (e.lastStringValue +=
|
|
2605
|
+
for (e.lastStringValue += he(e.lastIntValue); this.regexp_eatRegExpIdentifierPart(e);) e.lastStringValue += he(e.lastIntValue);
|
|
2605
2606
|
return !0;
|
|
2606
2607
|
}
|
|
2607
2608
|
return !1;
|
|
2608
2609
|
}, L.regexp_eatRegExpIdentifierStart = function(e) {
|
|
2609
2610
|
var t = e.pos, n = this.options.ecmaVersion >= 11, r = e.current(n);
|
|
2610
|
-
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue),
|
|
2611
|
+
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue), Nt(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
2611
2612
|
};
|
|
2612
|
-
function
|
|
2613
|
+
function Nt(e) {
|
|
2613
2614
|
return y(e, !0) || e === 36 || e === 95;
|
|
2614
2615
|
}
|
|
2615
2616
|
L.regexp_eatRegExpIdentifierPart = function(e) {
|
|
2616
2617
|
var t = e.pos, n = this.options.ecmaVersion >= 11, r = e.current(n);
|
|
2617
|
-
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue),
|
|
2618
|
+
return e.advance(n), r === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, n) && (r = e.lastIntValue), Pt(r) ? (e.lastIntValue = r, !0) : (e.pos = t, !1);
|
|
2618
2619
|
};
|
|
2619
|
-
function
|
|
2620
|
+
function Pt(e) {
|
|
2620
2621
|
return b(e, !0) || e === 36 || e === 95 || e === 8204 || e === 8205;
|
|
2621
2622
|
}
|
|
2622
2623
|
L.regexp_eatAtomEscape = function(e) {
|
|
@@ -2646,15 +2647,15 @@ L.regexp_eatAtomEscape = function(e) {
|
|
|
2646
2647
|
}
|
|
2647
2648
|
return !1;
|
|
2648
2649
|
}, L.regexp_eatZero = function(e) {
|
|
2649
|
-
return e.current() === 48 && !
|
|
2650
|
+
return e.current() === 48 && !Gt(e.lookahead()) ? (e.lastIntValue = 0, e.advance(), !0) : !1;
|
|
2650
2651
|
}, L.regexp_eatControlEscape = function(e) {
|
|
2651
2652
|
var t = e.current();
|
|
2652
2653
|
return t === 116 ? (e.lastIntValue = 9, e.advance(), !0) : t === 110 ? (e.lastIntValue = 10, e.advance(), !0) : t === 118 ? (e.lastIntValue = 11, e.advance(), !0) : t === 102 ? (e.lastIntValue = 12, e.advance(), !0) : t === 114 ? (e.lastIntValue = 13, e.advance(), !0) : !1;
|
|
2653
2654
|
}, L.regexp_eatControlLetter = function(e) {
|
|
2654
2655
|
var t = e.current();
|
|
2655
|
-
return
|
|
2656
|
+
return Ft(t) ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
2656
2657
|
};
|
|
2657
|
-
function
|
|
2658
|
+
function Ft(e) {
|
|
2658
2659
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122;
|
|
2659
2660
|
}
|
|
2660
2661
|
L.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
@@ -2673,12 +2674,12 @@ L.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) {
|
|
|
2673
2674
|
}
|
|
2674
2675
|
return !0;
|
|
2675
2676
|
}
|
|
2676
|
-
if (r && e.eat(123) && this.regexp_eatHexDigits(e) && e.eat(125) &&
|
|
2677
|
+
if (r && e.eat(123) && this.regexp_eatHexDigits(e) && e.eat(125) && It(e.lastIntValue)) return !0;
|
|
2677
2678
|
r && e.raise("Invalid unicode escape"), e.pos = n;
|
|
2678
2679
|
}
|
|
2679
2680
|
return !1;
|
|
2680
2681
|
};
|
|
2681
|
-
function
|
|
2682
|
+
function It(e) {
|
|
2682
2683
|
return e >= 0 && e <= 1114111;
|
|
2683
2684
|
}
|
|
2684
2685
|
L.regexp_eatIdentityEscape = function(e) {
|
|
@@ -2696,10 +2697,10 @@ L.regexp_eatIdentityEscape = function(e) {
|
|
|
2696
2697
|
}
|
|
2697
2698
|
return !1;
|
|
2698
2699
|
};
|
|
2699
|
-
var
|
|
2700
|
+
var Lt = 0, Rt = 1, z = 2;
|
|
2700
2701
|
L.regexp_eatCharacterClassEscape = function(e) {
|
|
2701
2702
|
var t = e.current();
|
|
2702
|
-
if (
|
|
2703
|
+
if (zt(t)) return e.lastIntValue = -1, e.advance(), Rt;
|
|
2703
2704
|
var n = !1;
|
|
2704
2705
|
if (e.switchU && this.options.ecmaVersion >= 9 && ((n = t === 80) || t === 112)) {
|
|
2705
2706
|
e.lastIntValue = -1, e.advance();
|
|
@@ -2707,9 +2708,9 @@ L.regexp_eatCharacterClassEscape = function(e) {
|
|
|
2707
2708
|
if (e.eat(123) && (r = this.regexp_eatUnicodePropertyValueExpression(e)) && e.eat(125)) return n && r === z && e.raise("Invalid property name"), r;
|
|
2708
2709
|
e.raise("Invalid property name");
|
|
2709
2710
|
}
|
|
2710
|
-
return
|
|
2711
|
+
return Lt;
|
|
2711
2712
|
};
|
|
2712
|
-
function
|
|
2713
|
+
function zt(e) {
|
|
2713
2714
|
return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87;
|
|
2714
2715
|
}
|
|
2715
2716
|
L.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
@@ -2718,35 +2719,35 @@ L.regexp_eatUnicodePropertyValueExpression = function(e) {
|
|
|
2718
2719
|
var n = e.lastStringValue;
|
|
2719
2720
|
if (this.regexp_eatUnicodePropertyValue(e)) {
|
|
2720
2721
|
var r = e.lastStringValue;
|
|
2721
|
-
return this.regexp_validateUnicodePropertyNameAndValue(e, n, r),
|
|
2722
|
+
return this.regexp_validateUnicodePropertyNameAndValue(e, n, r), Rt;
|
|
2722
2723
|
}
|
|
2723
2724
|
}
|
|
2724
2725
|
if (e.pos = t, this.regexp_eatLoneUnicodePropertyNameOrValue(e)) {
|
|
2725
2726
|
var i = e.lastStringValue;
|
|
2726
2727
|
return this.regexp_validateUnicodePropertyNameOrValue(e, i);
|
|
2727
2728
|
}
|
|
2728
|
-
return
|
|
2729
|
+
return Lt;
|
|
2729
2730
|
}, L.regexp_validateUnicodePropertyNameAndValue = function(e, t, n) {
|
|
2730
|
-
|
|
2731
|
+
de(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(n) || e.raise("Invalid property value");
|
|
2731
2732
|
}, L.regexp_validateUnicodePropertyNameOrValue = function(e, t) {
|
|
2732
|
-
if (e.unicodeProperties.binary.test(t)) return
|
|
2733
|
+
if (e.unicodeProperties.binary.test(t)) return Rt;
|
|
2733
2734
|
if (e.switchV && e.unicodeProperties.binaryOfStrings.test(t)) return z;
|
|
2734
2735
|
e.raise("Invalid property name");
|
|
2735
2736
|
}, L.regexp_eatUnicodePropertyName = function(e) {
|
|
2736
2737
|
var t = 0;
|
|
2737
|
-
for (e.lastStringValue = "";
|
|
2738
|
+
for (e.lastStringValue = ""; Bt(t = e.current());) e.lastStringValue += he(t), e.advance();
|
|
2738
2739
|
return e.lastStringValue !== "";
|
|
2739
2740
|
};
|
|
2740
|
-
function
|
|
2741
|
-
return
|
|
2741
|
+
function Bt(e) {
|
|
2742
|
+
return Ft(e) || e === 95;
|
|
2742
2743
|
}
|
|
2743
2744
|
L.regexp_eatUnicodePropertyValue = function(e) {
|
|
2744
2745
|
var t = 0;
|
|
2745
|
-
for (e.lastStringValue = "";
|
|
2746
|
+
for (e.lastStringValue = ""; Vt(t = e.current());) e.lastStringValue += he(t), e.advance();
|
|
2746
2747
|
return e.lastStringValue !== "";
|
|
2747
2748
|
};
|
|
2748
|
-
function
|
|
2749
|
-
return
|
|
2749
|
+
function Vt(e) {
|
|
2750
|
+
return Bt(e) || Gt(e);
|
|
2750
2751
|
}
|
|
2751
2752
|
L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
2752
2753
|
return this.regexp_eatUnicodePropertyValue(e);
|
|
@@ -2757,7 +2758,7 @@ L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
2757
2758
|
}
|
|
2758
2759
|
return !1;
|
|
2759
2760
|
}, L.regexp_classContents = function(e) {
|
|
2760
|
-
return e.current() === 93 ?
|
|
2761
|
+
return e.current() === 93 ? Rt : e.switchV ? this.regexp_classSetExpression(e) : (this.regexp_nonEmptyClassRanges(e), Rt);
|
|
2761
2762
|
}, L.regexp_nonEmptyClassRanges = function(e) {
|
|
2762
2763
|
for (; this.regexp_eatClassAtom(e);) {
|
|
2763
2764
|
var t = e.lastIntValue;
|
|
@@ -2772,7 +2773,7 @@ L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
2772
2773
|
if (this.regexp_eatClassEscape(e)) return !0;
|
|
2773
2774
|
if (e.switchU) {
|
|
2774
2775
|
var n = e.current();
|
|
2775
|
-
(n === 99 ||
|
|
2776
|
+
(n === 99 || Jt(n)) && e.raise("Invalid class escape"), e.raise("Invalid escape");
|
|
2776
2777
|
}
|
|
2777
2778
|
e.pos = t;
|
|
2778
2779
|
}
|
|
@@ -2788,12 +2789,12 @@ L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
2788
2789
|
}
|
|
2789
2790
|
return this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e);
|
|
2790
2791
|
}, L.regexp_classSetExpression = function(e) {
|
|
2791
|
-
var t =
|
|
2792
|
+
var t = Rt, n;
|
|
2792
2793
|
if (!this.regexp_eatClassSetRange(e)) if (n = this.regexp_eatClassSetOperand(e)) {
|
|
2793
2794
|
n === z && (t = z);
|
|
2794
2795
|
for (var r = e.pos; e.eatChars([38, 38]);) {
|
|
2795
2796
|
if (e.current() !== 38 && (n = this.regexp_eatClassSetOperand(e))) {
|
|
2796
|
-
n !== z && (t =
|
|
2797
|
+
n !== z && (t = Rt);
|
|
2797
2798
|
continue;
|
|
2798
2799
|
}
|
|
2799
2800
|
e.raise("Invalid character in character class");
|
|
@@ -2818,7 +2819,7 @@ L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
2818
2819
|
}
|
|
2819
2820
|
return !1;
|
|
2820
2821
|
}, L.regexp_eatClassSetOperand = function(e) {
|
|
2821
|
-
return this.regexp_eatClassSetCharacter(e) ?
|
|
2822
|
+
return this.regexp_eatClassSetCharacter(e) ? Rt : this.regexp_eatClassStringDisjunction(e) || this.regexp_eatNestedClass(e);
|
|
2822
2823
|
}, L.regexp_eatNestedClass = function(e) {
|
|
2823
2824
|
var t = e.pos;
|
|
2824
2825
|
if (e.eat(91)) {
|
|
@@ -2847,29 +2848,29 @@ L.regexp_eatLoneUnicodePropertyNameOrValue = function(e) {
|
|
|
2847
2848
|
return t;
|
|
2848
2849
|
}, L.regexp_classString = function(e) {
|
|
2849
2850
|
for (var t = 0; this.regexp_eatClassSetCharacter(e);) t++;
|
|
2850
|
-
return t === 1 ?
|
|
2851
|
+
return t === 1 ? Rt : z;
|
|
2851
2852
|
}, L.regexp_eatClassSetCharacter = function(e) {
|
|
2852
2853
|
var t = e.pos;
|
|
2853
2854
|
if (e.eat(92)) return this.regexp_eatCharacterEscape(e) || this.regexp_eatClassSetReservedPunctuator(e) ? !0 : e.eat(98) ? (e.lastIntValue = 8, !0) : (e.pos = t, !1);
|
|
2854
2855
|
var n = e.current();
|
|
2855
|
-
return n < 0 || n === e.lookahead() &&
|
|
2856
|
+
return n < 0 || n === e.lookahead() && Ht(n) || Ut(n) ? !1 : (e.advance(), e.lastIntValue = n, !0);
|
|
2856
2857
|
};
|
|
2857
|
-
function
|
|
2858
|
+
function Ht(e) {
|
|
2858
2859
|
return e === 33 || e >= 35 && e <= 38 || e >= 42 && e <= 44 || e === 46 || e >= 58 && e <= 64 || e === 94 || e === 96 || e === 126;
|
|
2859
2860
|
}
|
|
2860
|
-
function
|
|
2861
|
+
function Ut(e) {
|
|
2861
2862
|
return e === 40 || e === 41 || e === 45 || e === 47 || e >= 91 && e <= 93 || e >= 123 && e <= 125;
|
|
2862
2863
|
}
|
|
2863
2864
|
L.regexp_eatClassSetReservedPunctuator = function(e) {
|
|
2864
2865
|
var t = e.current();
|
|
2865
|
-
return
|
|
2866
|
+
return Wt(t) ? (e.lastIntValue = t, e.advance(), !0) : !1;
|
|
2866
2867
|
};
|
|
2867
|
-
function
|
|
2868
|
+
function Wt(e) {
|
|
2868
2869
|
return e === 33 || e === 35 || e === 37 || e === 38 || e === 44 || e === 45 || e >= 58 && e <= 62 || e === 64 || e === 96 || e === 126;
|
|
2869
2870
|
}
|
|
2870
2871
|
L.regexp_eatClassControlLetter = function(e) {
|
|
2871
2872
|
var t = e.current();
|
|
2872
|
-
return
|
|
2873
|
+
return Gt(t) || t === 95 ? (e.lastIntValue = t % 32, e.advance(), !0) : !1;
|
|
2873
2874
|
}, L.regexp_eatHexEscapeSequence = function(e) {
|
|
2874
2875
|
var t = e.pos;
|
|
2875
2876
|
if (e.eat(120)) {
|
|
@@ -2879,21 +2880,21 @@ L.regexp_eatClassControlLetter = function(e) {
|
|
|
2879
2880
|
return !1;
|
|
2880
2881
|
}, L.regexp_eatDecimalDigits = function(e) {
|
|
2881
2882
|
var t = e.pos, n = 0;
|
|
2882
|
-
for (e.lastIntValue = 0;
|
|
2883
|
+
for (e.lastIntValue = 0; Gt(n = e.current());) e.lastIntValue = 10 * e.lastIntValue + (n - 48), e.advance();
|
|
2883
2884
|
return e.pos !== t;
|
|
2884
2885
|
};
|
|
2885
|
-
function
|
|
2886
|
+
function Gt(e) {
|
|
2886
2887
|
return e >= 48 && e <= 57;
|
|
2887
2888
|
}
|
|
2888
2889
|
L.regexp_eatHexDigits = function(e) {
|
|
2889
2890
|
var t = e.pos, n = 0;
|
|
2890
|
-
for (e.lastIntValue = 0;
|
|
2891
|
+
for (e.lastIntValue = 0; Kt(n = e.current());) e.lastIntValue = 16 * e.lastIntValue + qt(n), e.advance();
|
|
2891
2892
|
return e.pos !== t;
|
|
2892
2893
|
};
|
|
2893
|
-
function
|
|
2894
|
+
function Kt(e) {
|
|
2894
2895
|
return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102;
|
|
2895
2896
|
}
|
|
2896
|
-
function
|
|
2897
|
+
function qt(e) {
|
|
2897
2898
|
return e >= 65 && e <= 70 ? 10 + (e - 65) : e >= 97 && e <= 102 ? 10 + (e - 97) : e - 48;
|
|
2898
2899
|
}
|
|
2899
2900
|
L.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
@@ -2908,9 +2909,9 @@ L.regexp_eatLegacyOctalEscapeSequence = function(e) {
|
|
|
2908
2909
|
return !1;
|
|
2909
2910
|
}, L.regexp_eatOctalDigit = function(e) {
|
|
2910
2911
|
var t = e.current();
|
|
2911
|
-
return
|
|
2912
|
+
return Jt(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1);
|
|
2912
2913
|
};
|
|
2913
|
-
function
|
|
2914
|
+
function Jt(e) {
|
|
2914
2915
|
return e >= 48 && e <= 55;
|
|
2915
2916
|
}
|
|
2916
2917
|
L.regexp_eatFixedHexDigits = function(e, t) {
|
|
@@ -2918,18 +2919,18 @@ L.regexp_eatFixedHexDigits = function(e, t) {
|
|
|
2918
2919
|
e.lastIntValue = 0;
|
|
2919
2920
|
for (var r = 0; r < t; ++r) {
|
|
2920
2921
|
var i = e.current();
|
|
2921
|
-
if (!
|
|
2922
|
-
e.lastIntValue = 16 * e.lastIntValue +
|
|
2922
|
+
if (!Kt(i)) return e.pos = n, !1;
|
|
2923
|
+
e.lastIntValue = 16 * e.lastIntValue + qt(i), e.advance();
|
|
2923
2924
|
}
|
|
2924
2925
|
return !0;
|
|
2925
2926
|
};
|
|
2926
|
-
var
|
|
2927
|
-
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new
|
|
2927
|
+
var Yt = function(e) {
|
|
2928
|
+
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new ve(e, e.startLoc, e.endLoc)), e.options.ranges && (this.range = [e.start, e.end]);
|
|
2928
2929
|
}, B = k.prototype;
|
|
2929
2930
|
B.next = function(e) {
|
|
2930
|
-
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new
|
|
2931
|
+
!e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new Yt(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
2931
2932
|
}, B.getToken = function() {
|
|
2932
|
-
return this.next(), new
|
|
2933
|
+
return this.next(), new Yt(this);
|
|
2933
2934
|
}, typeof Symbol < "u" && (B[Symbol.iterator] = function() {
|
|
2934
2935
|
var e = this;
|
|
2935
2936
|
return { next: function() {
|
|
@@ -2955,10 +2956,10 @@ B.next = function(e) {
|
|
|
2955
2956
|
return this.fullCharCodeAt(this.pos);
|
|
2956
2957
|
}, B.skipBlockComment = function() {
|
|
2957
2958
|
var e = this.options.onComment && this.curPosition(), t = this.pos, n = this.input.indexOf("*/", this.pos += 2);
|
|
2958
|
-
if (n === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = n + 2, this.options.locations) for (var r = void 0, i = t; (r =
|
|
2959
|
+
if (n === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = n + 2, this.options.locations) for (var r = void 0, i = t; (r = oe(this.input, i, this.pos)) > -1;) ++this.curLine, i = this.lineStart = r;
|
|
2959
2960
|
this.options.onComment && this.options.onComment(!0, this.input.slice(t + 2, n), t, this.pos, e, this.curPosition());
|
|
2960
2961
|
}, B.skipLineComment = function(e) {
|
|
2961
|
-
for (var t = this.pos, n = this.options.onComment && this.curPosition(), r = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !
|
|
2962
|
+
for (var t = this.pos, n = this.options.onComment && this.curPosition(), r = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !ae(r);) r = this.input.charCodeAt(++this.pos);
|
|
2962
2963
|
this.options.onComment && this.options.onComment(!1, this.input.slice(t + e, this.pos), t, this.pos, n, this.curPosition());
|
|
2963
2964
|
}, B.skipSpace = function() {
|
|
2964
2965
|
loop: for (; this.pos < this.input.length;) {
|
|
@@ -2985,7 +2986,7 @@ B.next = function(e) {
|
|
|
2985
2986
|
default: break loop;
|
|
2986
2987
|
}
|
|
2987
2988
|
break;
|
|
2988
|
-
default: if (e > 8 && e < 14 || e >= 5760 &&
|
|
2989
|
+
default: if (e > 8 && e < 14 || e >= 5760 && se.test(String.fromCharCode(e))) ++this.pos;
|
|
2989
2990
|
else break loop;
|
|
2990
2991
|
}
|
|
2991
2992
|
}
|
|
@@ -3032,7 +3033,7 @@ B.next = function(e) {
|
|
|
3032
3033
|
}, B.readToken_numberSign = function() {
|
|
3033
3034
|
var e = this.options.ecmaVersion, t = 35;
|
|
3034
3035
|
if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(), y(t, !0) || t === 92)) return this.finishToken(E.privateId, this.readWord1());
|
|
3035
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
3036
|
+
this.raise(this.pos, "Unexpected character '" + he(t) + "'");
|
|
3036
3037
|
}, B.getTokenFromCode = function(e) {
|
|
3037
3038
|
switch (e) {
|
|
3038
3039
|
case 46: return this.readToken_dot();
|
|
@@ -3082,7 +3083,7 @@ B.next = function(e) {
|
|
|
3082
3083
|
case 126: return this.finishOp(E.prefix, 1);
|
|
3083
3084
|
case 35: return this.readToken_numberSign();
|
|
3084
3085
|
}
|
|
3085
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
3086
|
+
this.raise(this.pos, "Unexpected character '" + he(e) + "'");
|
|
3086
3087
|
}, B.finishOp = function(e, t) {
|
|
3087
3088
|
var n = this.input.slice(this.pos, this.pos + t);
|
|
3088
3089
|
return this.pos += t, this.finishToken(e, n);
|
|
@@ -3126,17 +3127,17 @@ B.next = function(e) {
|
|
|
3126
3127
|
}
|
|
3127
3128
|
return r && s === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === a || t != null && this.pos - a !== t ? null : o;
|
|
3128
3129
|
};
|
|
3129
|
-
function
|
|
3130
|
+
function Xt(e, t) {
|
|
3130
3131
|
return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, ""));
|
|
3131
3132
|
}
|
|
3132
|
-
function
|
|
3133
|
+
function Zt(e) {
|
|
3133
3134
|
return typeof BigInt == "function" ? BigInt(e.replace(/_/g, "")) : null;
|
|
3134
3135
|
}
|
|
3135
3136
|
B.readRadixNumber = function(e) {
|
|
3136
3137
|
var t = this.pos;
|
|
3137
3138
|
this.pos += 2;
|
|
3138
3139
|
var n = this.readInt(e);
|
|
3139
|
-
return n ?? this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (n =
|
|
3140
|
+
return n ?? this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (n = Zt(this.input.slice(t, this.pos)), ++this.pos) : y(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(E.num, n);
|
|
3140
3141
|
}, B.readNumber = function(e) {
|
|
3141
3142
|
var t = this.pos;
|
|
3142
3143
|
!e && this.readInt(10, void 0, !0) === null && this.raise(t, "Invalid number");
|
|
@@ -3144,11 +3145,11 @@ B.readRadixNumber = function(e) {
|
|
|
3144
3145
|
n && this.strict && this.raise(t, "Invalid number");
|
|
3145
3146
|
var r = this.input.charCodeAt(this.pos);
|
|
3146
3147
|
if (!n && !e && this.options.ecmaVersion >= 11 && r === 110) {
|
|
3147
|
-
var i =
|
|
3148
|
+
var i = Zt(this.input.slice(t, this.pos));
|
|
3148
3149
|
return ++this.pos, y(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(E.num, i);
|
|
3149
3150
|
}
|
|
3150
3151
|
n && /[89]/.test(this.input.slice(t, this.pos)) && (n = !1), r === 46 && !n && (++this.pos, this.readInt(10), r = this.input.charCodeAt(this.pos)), (r === 69 || r === 101) && !n && (r = this.input.charCodeAt(++this.pos), (r === 43 || r === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")), y(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
3151
|
-
var a =
|
|
3152
|
+
var a = Xt(this.input.slice(t, this.pos), n);
|
|
3152
3153
|
return this.finishToken(E.num, a);
|
|
3153
3154
|
}, B.readCodePoint = function() {
|
|
3154
3155
|
var e = this.input.charCodeAt(this.pos), t;
|
|
@@ -3163,22 +3164,22 @@ B.readRadixNumber = function(e) {
|
|
|
3163
3164
|
this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant");
|
|
3164
3165
|
var r = this.input.charCodeAt(this.pos);
|
|
3165
3166
|
if (r === e) break;
|
|
3166
|
-
r === 92 ? (t += this.input.slice(n, this.pos), t += this.readEscapedChar(!1), n = this.pos) : r === 8232 || r === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (
|
|
3167
|
+
r === 92 ? (t += this.input.slice(n, this.pos), t += this.readEscapedChar(!1), n = this.pos) : r === 8232 || r === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (ae(r) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
|
|
3167
3168
|
}
|
|
3168
3169
|
return t += this.input.slice(n, this.pos++), this.finishToken(E.string, t);
|
|
3169
3170
|
};
|
|
3170
|
-
var
|
|
3171
|
+
var Qt = {};
|
|
3171
3172
|
B.tryReadTemplateToken = function() {
|
|
3172
3173
|
this.inTemplateElement = !0;
|
|
3173
3174
|
try {
|
|
3174
3175
|
this.readTmplToken();
|
|
3175
3176
|
} catch (e) {
|
|
3176
|
-
if (e ===
|
|
3177
|
+
if (e === Qt) this.readInvalidTemplateToken();
|
|
3177
3178
|
else throw e;
|
|
3178
3179
|
}
|
|
3179
3180
|
this.inTemplateElement = !1;
|
|
3180
3181
|
}, B.invalidStringToken = function(e, t) {
|
|
3181
|
-
if (this.inTemplateElement && this.options.ecmaVersion >= 9) throw
|
|
3182
|
+
if (this.inTemplateElement && this.options.ecmaVersion >= 9) throw Qt;
|
|
3182
3183
|
this.raise(e, t);
|
|
3183
3184
|
}, B.readTmplToken = function() {
|
|
3184
3185
|
for (var e = "", t = this.pos;;) {
|
|
@@ -3186,7 +3187,7 @@ B.tryReadTemplateToken = function() {
|
|
|
3186
3187
|
var n = this.input.charCodeAt(this.pos);
|
|
3187
3188
|
if (n === 96 || n === 36 && this.input.charCodeAt(this.pos + 1) === 123) return this.pos === this.start && (this.type === E.template || this.type === E.invalidTemplate) ? n === 36 ? (this.pos += 2, this.finishToken(E.dollarBraceL)) : (++this.pos, this.finishToken(E.backQuote)) : (e += this.input.slice(t, this.pos), this.finishToken(E.template, e));
|
|
3188
3189
|
if (n === 92) e += this.input.slice(t, this.pos), e += this.readEscapedChar(!0), t = this.pos;
|
|
3189
|
-
else if (
|
|
3190
|
+
else if (ae(n)) {
|
|
3190
3191
|
switch (e += this.input.slice(t, this.pos), ++this.pos, n) {
|
|
3191
3192
|
case 13: this.input.charCodeAt(this.pos) === 10 && ++this.pos;
|
|
3192
3193
|
case 10:
|
|
@@ -3220,7 +3221,7 @@ B.tryReadTemplateToken = function() {
|
|
|
3220
3221
|
case 110: return "\n";
|
|
3221
3222
|
case 114: return "\r";
|
|
3222
3223
|
case 120: return String.fromCharCode(this.readHexChar(2));
|
|
3223
|
-
case 117: return
|
|
3224
|
+
case 117: return he(this.readCodePoint());
|
|
3224
3225
|
case 116: return " ";
|
|
3225
3226
|
case 98: return "\b";
|
|
3226
3227
|
case 118: return "\v";
|
|
@@ -3237,7 +3238,7 @@ B.tryReadTemplateToken = function() {
|
|
|
3237
3238
|
var r = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0], i = parseInt(r, 8);
|
|
3238
3239
|
return i > 255 && (r = r.slice(0, -1), i = parseInt(r, 8)), this.pos += r.length - 1, t = this.input.charCodeAt(this.pos), (r !== "0" || t === 56 || t === 57) && (this.strict || e) && this.invalidStringToken(this.pos - 1 - r.length, e ? "Octal literal in template string" : "Octal literal in strict mode"), String.fromCharCode(i);
|
|
3239
3240
|
}
|
|
3240
|
-
return
|
|
3241
|
+
return ae(t) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(t);
|
|
3241
3242
|
}
|
|
3242
3243
|
}, B.readHexChar = function(e) {
|
|
3243
3244
|
var t = this.pos, n = this.readInt(16, e);
|
|
@@ -3252,49 +3253,49 @@ B.tryReadTemplateToken = function() {
|
|
|
3252
3253
|
var a = this.pos;
|
|
3253
3254
|
this.input.charCodeAt(++this.pos) !== 117 && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos;
|
|
3254
3255
|
var o = this.readCodePoint();
|
|
3255
|
-
(t ? y : b)(o, r) || this.invalidStringToken(a, "Invalid Unicode escape"), e +=
|
|
3256
|
+
(t ? y : b)(o, r) || this.invalidStringToken(a, "Invalid Unicode escape"), e += he(o), n = this.pos;
|
|
3256
3257
|
} else break;
|
|
3257
3258
|
t = !1;
|
|
3258
3259
|
}
|
|
3259
3260
|
return e + this.input.slice(n, this.pos);
|
|
3260
3261
|
}, B.readWord = function() {
|
|
3261
3262
|
var e = this.readWord1(), t = E.name;
|
|
3262
|
-
return this.keywords.test(e) && (t =
|
|
3263
|
+
return this.keywords.test(e) && (t = re[e]), this.finishToken(t, e);
|
|
3263
3264
|
};
|
|
3264
|
-
var
|
|
3265
|
+
var $t = "8.17.0";
|
|
3265
3266
|
k.acorn = {
|
|
3266
3267
|
Parser: k,
|
|
3267
|
-
version:
|
|
3268
|
-
defaultOptions:
|
|
3269
|
-
Position:
|
|
3270
|
-
SourceLocation:
|
|
3271
|
-
getLineInfo:
|
|
3272
|
-
Node:
|
|
3268
|
+
version: $t,
|
|
3269
|
+
defaultOptions: be,
|
|
3270
|
+
Position: _e,
|
|
3271
|
+
SourceLocation: ve,
|
|
3272
|
+
getLineInfo: ye,
|
|
3273
|
+
Node: ot,
|
|
3273
3274
|
TokenType: x,
|
|
3274
3275
|
tokTypes: E,
|
|
3275
|
-
keywordTypes:
|
|
3276
|
+
keywordTypes: re,
|
|
3276
3277
|
TokContext: P,
|
|
3277
3278
|
tokContexts: F,
|
|
3278
3279
|
isIdentifierChar: b,
|
|
3279
3280
|
isIdentifierStart: y,
|
|
3280
|
-
Token:
|
|
3281
|
-
isNewLine:
|
|
3281
|
+
Token: Yt,
|
|
3282
|
+
isNewLine: ae,
|
|
3282
3283
|
lineBreak: D,
|
|
3283
|
-
lineBreakG:
|
|
3284
|
-
nonASCIIwhitespace:
|
|
3284
|
+
lineBreakG: ie,
|
|
3285
|
+
nonASCIIwhitespace: se
|
|
3285
3286
|
};
|
|
3286
|
-
function
|
|
3287
|
+
function en(e, t) {
|
|
3287
3288
|
return k.parse(e, t);
|
|
3288
3289
|
}
|
|
3289
|
-
function
|
|
3290
|
+
function tn(e, t, n) {
|
|
3290
3291
|
return k.parseExpressionAt(e, t, n);
|
|
3291
3292
|
}
|
|
3292
|
-
function
|
|
3293
|
+
function nn(e, t) {
|
|
3293
3294
|
return k.tokenizer(e, t);
|
|
3294
3295
|
}
|
|
3295
3296
|
//#endregion
|
|
3296
3297
|
//#region node_modules/acorn-typescript/lib/index.mjs
|
|
3297
|
-
function
|
|
3298
|
+
function rn(e, t) {
|
|
3298
3299
|
for (var n = 0; n < t.length; n++) {
|
|
3299
3300
|
var r = t[n];
|
|
3300
3301
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, typeof (i = function(e, t) {
|
|
@@ -3310,36 +3311,36 @@ function nn(e, t) {
|
|
|
3310
3311
|
}
|
|
3311
3312
|
var i;
|
|
3312
3313
|
}
|
|
3313
|
-
function
|
|
3314
|
-
return
|
|
3314
|
+
function an() {
|
|
3315
|
+
return an = Object.assign ? Object.assign.bind() : function(e) {
|
|
3315
3316
|
for (var t = 1; t < arguments.length; t++) {
|
|
3316
3317
|
var n = arguments[t];
|
|
3317
3318
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
3318
3319
|
}
|
|
3319
3320
|
return e;
|
|
3320
|
-
},
|
|
3321
|
-
}
|
|
3322
|
-
function an(e, t) {
|
|
3323
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, on(e, t);
|
|
3321
|
+
}, an.apply(this, arguments);
|
|
3324
3322
|
}
|
|
3325
3323
|
function on(e, t) {
|
|
3326
|
-
|
|
3327
|
-
return e.__proto__ = t, e;
|
|
3328
|
-
}, on(e, t);
|
|
3324
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, sn(e, t);
|
|
3329
3325
|
}
|
|
3330
3326
|
function sn(e, t) {
|
|
3327
|
+
return sn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
3328
|
+
return e.__proto__ = t, e;
|
|
3329
|
+
}, sn(e, t);
|
|
3330
|
+
}
|
|
3331
|
+
function cn(e, t) {
|
|
3331
3332
|
(t == null || t > e.length) && (t = e.length);
|
|
3332
3333
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
3333
3334
|
return r;
|
|
3334
3335
|
}
|
|
3335
|
-
function
|
|
3336
|
+
function ln(e, t) {
|
|
3336
3337
|
var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
3337
3338
|
if (n) return (n = n.call(e)).next.bind(n);
|
|
3338
3339
|
if (Array.isArray(e) || (n = function(e, t) {
|
|
3339
3340
|
if (e) {
|
|
3340
|
-
if (typeof e == "string") return
|
|
3341
|
+
if (typeof e == "string") return cn(e, t);
|
|
3341
3342
|
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
3342
|
-
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ?
|
|
3343
|
+
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? cn(e, t) : void 0;
|
|
3343
3344
|
}
|
|
3344
3345
|
}(e)) || t && e && typeof e.length == "number") {
|
|
3345
3346
|
n && (e = n);
|
|
@@ -3357,9 +3358,9 @@ var V = !0;
|
|
|
3357
3358
|
function H(e, t) {
|
|
3358
3359
|
return t === void 0 && (t = {}), new x("name", t);
|
|
3359
3360
|
}
|
|
3360
|
-
var
|
|
3361
|
-
function
|
|
3362
|
-
var t =
|
|
3361
|
+
var un = /* @__PURE__ */ new WeakMap();
|
|
3362
|
+
function dn(e) {
|
|
3363
|
+
var t = un.get(e.Parser.acorn || e);
|
|
3363
3364
|
if (!t) {
|
|
3364
3365
|
var n = {
|
|
3365
3366
|
assert: H(0, { startsExpr: V }),
|
|
@@ -3392,18 +3393,18 @@ function un(e) {
|
|
|
3392
3393
|
var t = this.context.pop();
|
|
3393
3394
|
t === i.tc_oTag && e === E.slash || t === i.tc_cTag ? (this.context.pop(), this.exprAllowed = this.curContext() === i.tc_expr) : this.exprAllowed = !0;
|
|
3394
3395
|
}, t = {
|
|
3395
|
-
tokTypes:
|
|
3396
|
-
tokContexts:
|
|
3396
|
+
tokTypes: an({}, n, r),
|
|
3397
|
+
tokContexts: an({}, i),
|
|
3397
3398
|
keywordsRegExp: a,
|
|
3398
3399
|
tokenIsLiteralPropertyName: function(e) {
|
|
3399
3400
|
return [
|
|
3400
3401
|
E.name,
|
|
3401
3402
|
E.string,
|
|
3402
3403
|
E.num
|
|
3403
|
-
].concat(Object.values(
|
|
3404
|
+
].concat(Object.values(re), Object.values(n)).includes(e);
|
|
3404
3405
|
},
|
|
3405
3406
|
tokenIsKeywordOrIdentifier: function(e) {
|
|
3406
|
-
return [E.name].concat(Object.values(
|
|
3407
|
+
return [E.name].concat(Object.values(re), Object.values(n)).includes(e);
|
|
3407
3408
|
},
|
|
3408
3409
|
tokenIsIdentifier: function(e) {
|
|
3409
3410
|
return [].concat(Object.values(n), [E.name]).includes(e);
|
|
@@ -3433,14 +3434,14 @@ function un(e) {
|
|
|
3433
3434
|
}
|
|
3434
3435
|
return t;
|
|
3435
3436
|
}
|
|
3436
|
-
var
|
|
3437
|
+
var fn = 1024, pn = RegExp("(?=(" + (/* @__PURE__ */ RegExp("(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*", "y")).source + "))\\1(?=[\\n\\r\\u2028\\u2029]|\\/\\*(?!.*?\\*\\/)|$)", "y"), mn = function() {
|
|
3437
3438
|
this.shorthandAssign = void 0, this.trailingComma = void 0, this.parenthesizedAssign = void 0, this.parenthesizedBind = void 0, this.doubleProto = void 0, this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
3438
3439
|
};
|
|
3439
|
-
function
|
|
3440
|
+
function hn(e, t) {
|
|
3440
3441
|
var n = t.key.name, r = e[n], i = "true";
|
|
3441
3442
|
return t.type !== "MethodDefinition" || t.kind !== "get" && t.kind !== "set" || (i = (t.static ? "s" : "i") + t.kind), r === "iget" && i === "iset" || r === "iset" && i === "iget" || r === "sget" && i === "sset" || r === "sset" && i === "sget" ? (e[n] = "true", !1) : !!r || (e[n] = i, !1);
|
|
3442
3443
|
}
|
|
3443
|
-
function
|
|
3444
|
+
function gn(e, t) {
|
|
3444
3445
|
var n = e.key;
|
|
3445
3446
|
return !e.computed && (n.type === "Identifier" && n.name === t || n.type === "Literal" && n.value === t);
|
|
3446
3447
|
}
|
|
@@ -3545,7 +3546,7 @@ var U = {
|
|
|
3545
3546
|
return "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got " + e.type + ".";
|
|
3546
3547
|
},
|
|
3547
3548
|
LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations."
|
|
3548
|
-
},
|
|
3549
|
+
}, _n = {
|
|
3549
3550
|
quot: "\"",
|
|
3550
3551
|
amp: "&",
|
|
3551
3552
|
apos: "'",
|
|
@@ -3799,39 +3800,39 @@ var U = {
|
|
|
3799
3800
|
clubs: "♣",
|
|
3800
3801
|
hearts: "♥",
|
|
3801
3802
|
diams: "♦"
|
|
3802
|
-
},
|
|
3803
|
-
function
|
|
3804
|
-
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ?
|
|
3803
|
+
}, vn = /^[\da-fA-F]+$/, yn = /^\d+$/;
|
|
3804
|
+
function bn(e) {
|
|
3805
|
+
return e && (e.type === "JSXIdentifier" ? e.name : e.type === "JSXNamespacedName" ? e.namespace.name + ":" + e.name.name : e.type === "JSXMemberExpression" ? bn(e.object) + "." + bn(e.property) : void 0);
|
|
3805
3806
|
}
|
|
3806
|
-
var
|
|
3807
|
-
function
|
|
3807
|
+
var xn = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
3808
|
+
function Sn(e) {
|
|
3808
3809
|
if (!e) throw Error("Assert fail");
|
|
3809
3810
|
}
|
|
3810
|
-
function
|
|
3811
|
+
function Cn(e) {
|
|
3811
3812
|
return e === "accessor";
|
|
3812
3813
|
}
|
|
3813
|
-
function
|
|
3814
|
+
function wn(e) {
|
|
3814
3815
|
return e === "in" || e === "out";
|
|
3815
3816
|
}
|
|
3816
|
-
function
|
|
3817
|
+
function Tn(e, t) {
|
|
3817
3818
|
return 2 | (e ? 4 : 0) | (t ? 8 : 0);
|
|
3818
3819
|
}
|
|
3819
|
-
function
|
|
3820
|
+
function En(e) {
|
|
3820
3821
|
if (e.type !== "MemberExpression") return !1;
|
|
3821
3822
|
var t = e.property;
|
|
3822
|
-
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) &&
|
|
3823
|
-
}
|
|
3824
|
-
function En(e) {
|
|
3825
|
-
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed && En(e.object);
|
|
3823
|
+
return (!e.computed || !(t.type !== "TemplateLiteral" || t.expressions.length > 0)) && Dn(e.object);
|
|
3826
3824
|
}
|
|
3827
3825
|
function Dn(e) {
|
|
3828
|
-
return e === "
|
|
3826
|
+
return e.type === "Identifier" || e.type === "MemberExpression" && !e.computed && Dn(e.object);
|
|
3829
3827
|
}
|
|
3830
3828
|
function On(e) {
|
|
3829
|
+
return e === "private" || e === "public" || e === "protected";
|
|
3830
|
+
}
|
|
3831
|
+
function kn(e) {
|
|
3831
3832
|
var t = e || {}, n = t.dts, r = n !== void 0 && n, i = t.allowSatisfies, a = i !== void 0 && i;
|
|
3832
3833
|
return function(t) {
|
|
3833
|
-
var n = t.acorn ||
|
|
3834
|
-
function
|
|
3834
|
+
var n = t.acorn || u, i = dn(n), o = n.tokTypes, s = n.keywordTypes, c = n.isIdentifierStart, l = n.lineBreak, d = n.isNewLine, f = n.tokContexts, p = n.isIdentifierChar, m = i.tokTypes, h = i.tokContexts, g = i.keywordsRegExp, _ = i.tokenIsLiteralPropertyName, ee = i.tokenIsTemplate, te = i.tokenIsTSDeclarationStart, v = i.tokenIsIdentifier, ne = i.tokenIsKeywordOrIdentifier, y = i.tokenIsTSTypeOperator;
|
|
3835
|
+
function b(e, t, n) {
|
|
3835
3836
|
n === void 0 && (n = e.length);
|
|
3836
3837
|
for (var r = t; r < n; r++) {
|
|
3837
3838
|
var i = e.charCodeAt(r);
|
|
@@ -3845,7 +3846,7 @@ function On(e) {
|
|
|
3845
3846
|
function t() {
|
|
3846
3847
|
return e.apply(this, arguments) || this;
|
|
3847
3848
|
}
|
|
3848
|
-
|
|
3849
|
+
on(t, e);
|
|
3849
3850
|
var n = t.prototype;
|
|
3850
3851
|
return n.takeDecorators = function(e) {
|
|
3851
3852
|
var t = this.decoratorStack[this.decoratorStack.length - 1];
|
|
@@ -3888,7 +3889,7 @@ function On(e) {
|
|
|
3888
3889
|
function t() {
|
|
3889
3890
|
return e.apply(this, arguments) || this;
|
|
3890
3891
|
}
|
|
3891
|
-
|
|
3892
|
+
on(t, e);
|
|
3892
3893
|
var n = t.prototype;
|
|
3893
3894
|
return n.jsx_readToken = function() {
|
|
3894
3895
|
for (var e = "", t = this.pos;;) {
|
|
@@ -3921,7 +3922,7 @@ function On(e) {
|
|
|
3921
3922
|
r !== "&" && this.raise(this.pos, "Entity must start with an ampersand");
|
|
3922
3923
|
for (var i = ++this.pos; this.pos < this.input.length && n++ < 10;) {
|
|
3923
3924
|
if ((r = this.input[this.pos++]) === ";") {
|
|
3924
|
-
t[0] === "#" ? t[1] === "x" ? (t = t.substr(2),
|
|
3925
|
+
t[0] === "#" ? t[1] === "x" ? (t = t.substr(2), vn.test(t) && (e = String.fromCharCode(parseInt(t, 16)))) : (t = t.substr(1), yn.test(t) && (e = String.fromCharCode(parseInt(t, 10)))) : e = _n[t];
|
|
3925
3926
|
break;
|
|
3926
3927
|
}
|
|
3927
3928
|
t += r;
|
|
@@ -3995,7 +3996,7 @@ function On(e) {
|
|
|
3995
3996
|
break;
|
|
3996
3997
|
default: this.unexpected();
|
|
3997
3998
|
}
|
|
3998
|
-
|
|
3999
|
+
bn(s.name) !== bn(o.name) && this.raise(s.start, "Expected corresponding JSX closing tag for <" + bn(o.name) + ">");
|
|
3999
4000
|
}
|
|
4000
4001
|
var c = o.name ? "Element" : "Fragment";
|
|
4001
4002
|
return n["opening" + c] = o, n["closing" + c] = s, n.children = r, this.type === i.relational && this.value === "<" && this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"), this.finishNode(n, "JSX" + c);
|
|
@@ -4013,7 +4014,7 @@ function On(e) {
|
|
|
4013
4014
|
function t() {
|
|
4014
4015
|
return e.apply(this, arguments) || this;
|
|
4015
4016
|
}
|
|
4016
|
-
|
|
4017
|
+
on(t, e);
|
|
4017
4018
|
var n = t.prototype;
|
|
4018
4019
|
return n.parseMaybeImportAttributes = function(e) {
|
|
4019
4020
|
if (this.type === i._with || this.type === r.assert) {
|
|
@@ -4047,11 +4048,11 @@ function On(e) {
|
|
|
4047
4048
|
errorTemplate: U.InvalidModifierOnTypeParameterPositions
|
|
4048
4049
|
}), i;
|
|
4049
4050
|
}
|
|
4050
|
-
|
|
4051
|
-
var
|
|
4052
|
-
return
|
|
4051
|
+
on(t, e);
|
|
4052
|
+
var u, x, S, C = t.prototype;
|
|
4053
|
+
return C.getTokenFromCodeInType = function(t) {
|
|
4053
4054
|
return t === 62 || t === 60 ? this.finishOp(o.relational, 1) : e.prototype.getTokenFromCode.call(this, t);
|
|
4054
|
-
},
|
|
4055
|
+
}, C.readToken = function(t) {
|
|
4055
4056
|
if (!this.inType) {
|
|
4056
4057
|
var n = this.curContext();
|
|
4057
4058
|
if (n === h.tc_expr) return this.jsx_readToken();
|
|
@@ -4063,13 +4064,13 @@ function On(e) {
|
|
|
4063
4064
|
if (t === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) return ++this.pos, this.finishToken(m.jsxTagStart);
|
|
4064
4065
|
}
|
|
4065
4066
|
return e.prototype.readToken.call(this, t);
|
|
4066
|
-
},
|
|
4067
|
+
}, C.getTokenFromCode = function(t) {
|
|
4067
4068
|
return this.inType ? this.getTokenFromCodeInType(t) : t === 64 ? (++this.pos, this.finishToken(m.at)) : e.prototype.getTokenFromCode.call(this, t);
|
|
4068
|
-
},
|
|
4069
|
+
}, C.isAbstractClass = function() {
|
|
4069
4070
|
return this.ts_isContextual(m.abstract) && this.lookahead().type === o._class;
|
|
4070
|
-
},
|
|
4071
|
+
}, C.finishNode = function(t, n) {
|
|
4071
4072
|
return t.type !== "" && t.end !== 0 ? t : e.prototype.finishNode.call(this, t, n);
|
|
4072
|
-
},
|
|
4073
|
+
}, C.tryParse = function(e, t) {
|
|
4073
4074
|
t === void 0 && (t = this.cloneCurLookaheadState());
|
|
4074
4075
|
var n = { node: null };
|
|
4075
4076
|
try {
|
|
@@ -4100,37 +4101,37 @@ function On(e) {
|
|
|
4100
4101
|
};
|
|
4101
4102
|
throw e;
|
|
4102
4103
|
}
|
|
4103
|
-
},
|
|
4104
|
+
}, C.setOptionalParametersError = function(e, t) {
|
|
4104
4105
|
e.optionalParametersLoc = t?.loc ?? this.startLoc;
|
|
4105
|
-
},
|
|
4106
|
+
}, C.reScan_lt_gt = function() {
|
|
4106
4107
|
this.type === o.relational && (--this.pos, this.readToken_lt_gt(this.fullCharCodeAtPos()));
|
|
4107
|
-
},
|
|
4108
|
+
}, C.reScan_lt = function() {
|
|
4108
4109
|
var e = this.type;
|
|
4109
4110
|
return e === o.bitShift ? (this.pos -= 2, this.finishOp(o.relational, 1), o.relational) : e;
|
|
4110
|
-
},
|
|
4111
|
+
}, C.resetEndLocation = function(e, t) {
|
|
4111
4112
|
t === void 0 && (t = this.lastTokEndLoc), e.end = t.column, e.loc.end = t, this.options.ranges && (e.range[1] = t.column);
|
|
4112
|
-
},
|
|
4113
|
+
}, C.startNodeAtNode = function(t) {
|
|
4113
4114
|
return e.prototype.startNodeAt.call(this, t.start, t.loc.start);
|
|
4114
|
-
},
|
|
4115
|
+
}, C.nextTokenStart = function() {
|
|
4115
4116
|
return this.nextTokenStartSince(this.pos);
|
|
4116
|
-
},
|
|
4117
|
+
}, C.tsHasSomeModifiers = function(e, t) {
|
|
4117
4118
|
return t.some(function(t) {
|
|
4118
|
-
return
|
|
4119
|
+
return On(t) ? e.accessibility === t : !!e[t];
|
|
4119
4120
|
});
|
|
4120
|
-
},
|
|
4121
|
+
}, C.tsIsStartOfStaticBlocks = function() {
|
|
4121
4122
|
return this.isContextual("static") && this.lookaheadCharCode() === 123;
|
|
4122
|
-
},
|
|
4123
|
+
}, C.tsCheckForInvalidTypeCasts = function(e) {
|
|
4123
4124
|
var t = this;
|
|
4124
4125
|
e.forEach(function(e) {
|
|
4125
4126
|
e?.type === "TSTypeCastExpression" && t.raise(e.typeAnnotation.start, U.UnexpectedTypeAnnotation);
|
|
4126
4127
|
});
|
|
4127
|
-
},
|
|
4128
|
+
}, C.atPossibleAsyncArrow = function(e) {
|
|
4128
4129
|
return e.type === "Identifier" && e.name === "async" && this.lastTokEndLoc.column === e.end && !this.canInsertSemicolon() && e.end - e.start == 5 && e.start === this.potentialArrowAt;
|
|
4129
|
-
},
|
|
4130
|
+
}, C.tsIsIdentifier = function() {
|
|
4130
4131
|
return v(this.type);
|
|
4131
|
-
},
|
|
4132
|
+
}, C.tsTryParseTypeOrTypePredicateAnnotation = function() {
|
|
4132
4133
|
return this.match(o.colon) ? this.tsParseTypeOrTypePredicateAnnotation(o.colon) : void 0;
|
|
4133
|
-
},
|
|
4134
|
+
}, C.tsTryParseGenericAsyncArrowFunction = function(t, n, r) {
|
|
4134
4135
|
var i = this;
|
|
4135
4136
|
if (this.tsMatchLeftRelational()) {
|
|
4136
4137
|
var a = this.maybeInArrowParameters;
|
|
@@ -4141,9 +4142,9 @@ function On(e) {
|
|
|
4141
4142
|
});
|
|
4142
4143
|
if (this.maybeInArrowParameters = a, s) return e.prototype.parseArrowExpression.call(this, s, null, !0, r);
|
|
4143
4144
|
}
|
|
4144
|
-
},
|
|
4145
|
+
}, C.tsParseTypeArgumentsInExpression = function() {
|
|
4145
4146
|
if (this.reScan_lt() === o.relational) return this.tsParseTypeArguments();
|
|
4146
|
-
},
|
|
4147
|
+
}, C.tsInNoContext = function(e) {
|
|
4147
4148
|
var t = this.context;
|
|
4148
4149
|
this.context = [t[0]];
|
|
4149
4150
|
try {
|
|
@@ -4151,30 +4152,30 @@ function On(e) {
|
|
|
4151
4152
|
} finally {
|
|
4152
4153
|
this.context = t;
|
|
4153
4154
|
}
|
|
4154
|
-
},
|
|
4155
|
+
}, C.tsTryParseTypeAnnotation = function() {
|
|
4155
4156
|
return this.match(o.colon) ? this.tsParseTypeAnnotation() : void 0;
|
|
4156
|
-
},
|
|
4157
|
+
}, C.isUnparsedContextual = function(e, t) {
|
|
4157
4158
|
var n = e + t.length;
|
|
4158
4159
|
if (this.input.slice(e, n) === t) {
|
|
4159
4160
|
var r = this.input.charCodeAt(n);
|
|
4160
4161
|
return !(p(r) || (64512 & r) == 55296);
|
|
4161
4162
|
}
|
|
4162
4163
|
return !1;
|
|
4163
|
-
},
|
|
4164
|
+
}, C.isAbstractConstructorSignature = function() {
|
|
4164
4165
|
return this.ts_isContextual(m.abstract) && this.lookahead().type === o._new;
|
|
4165
|
-
},
|
|
4166
|
-
return
|
|
4167
|
-
},
|
|
4166
|
+
}, C.nextTokenStartSince = function(e) {
|
|
4167
|
+
return xn.lastIndex = e, xn.test(this.input) ? xn.lastIndex : e;
|
|
4168
|
+
}, C.lookaheadCharCode = function() {
|
|
4168
4169
|
return this.input.charCodeAt(this.nextTokenStart());
|
|
4169
|
-
},
|
|
4170
|
+
}, C.compareLookaheadState = function(e, t) {
|
|
4170
4171
|
for (var n = 0, r = Object.keys(e); n < r.length; n++) {
|
|
4171
4172
|
var i = r[n];
|
|
4172
4173
|
if (e[i] !== t[i]) return !1;
|
|
4173
4174
|
}
|
|
4174
4175
|
return !0;
|
|
4175
|
-
},
|
|
4176
|
+
}, C.createLookaheadState = function() {
|
|
4176
4177
|
this.value = null, this.context = [this.curContext()];
|
|
4177
|
-
},
|
|
4178
|
+
}, C.getCurLookaheadState = function() {
|
|
4178
4179
|
return {
|
|
4179
4180
|
endLoc: this.endLoc,
|
|
4180
4181
|
lastTokEnd: this.lastTokEnd,
|
|
@@ -4193,7 +4194,7 @@ function On(e) {
|
|
|
4193
4194
|
curPosition: this.curPosition,
|
|
4194
4195
|
containsEsc: this.containsEsc
|
|
4195
4196
|
};
|
|
4196
|
-
},
|
|
4197
|
+
}, C.cloneCurLookaheadState = function() {
|
|
4197
4198
|
return {
|
|
4198
4199
|
pos: this.pos,
|
|
4199
4200
|
value: this.value,
|
|
@@ -4212,43 +4213,43 @@ function On(e) {
|
|
|
4212
4213
|
curPosition: this.curPosition,
|
|
4213
4214
|
containsEsc: this.containsEsc
|
|
4214
4215
|
};
|
|
4215
|
-
},
|
|
4216
|
+
}, C.setLookaheadState = function(e) {
|
|
4216
4217
|
this.pos = e.pos, this.value = e.value, this.endLoc = e.endLoc, this.lastTokEnd = e.lastTokEnd, this.lastTokStart = e.lastTokStart, this.lastTokStartLoc = e.lastTokStartLoc, this.type = e.type, this.start = e.start, this.end = e.end, this.context = e.context, this.startLoc = e.startLoc, this.lastTokEndLoc = e.lastTokEndLoc, this.curLine = e.curLine, this.lineStart = e.lineStart, this.curPosition = e.curPosition, this.containsEsc = e.containsEsc;
|
|
4217
|
-
},
|
|
4218
|
+
}, C.tsLookAhead = function(e) {
|
|
4218
4219
|
var t = this.getCurLookaheadState(), n = e();
|
|
4219
4220
|
return this.setLookaheadState(t), n;
|
|
4220
|
-
},
|
|
4221
|
+
}, C.lookahead = function(e) {
|
|
4221
4222
|
var t = this.getCurLookaheadState();
|
|
4222
4223
|
if (this.createLookaheadState(), this.isLookahead = !0, e !== void 0) for (var n = 0; n < e; n++) this.nextToken();
|
|
4223
4224
|
else this.nextToken();
|
|
4224
4225
|
this.isLookahead = !1;
|
|
4225
4226
|
var r = this.getCurLookaheadState();
|
|
4226
4227
|
return this.setLookaheadState(t), r;
|
|
4227
|
-
},
|
|
4228
|
+
}, C.readWord = function() {
|
|
4228
4229
|
var e = this.readWord1(), t = o.name;
|
|
4229
4230
|
return this.keywords.test(e) ? t = s[e] : new RegExp(g).test(e) && (t = m[e]), this.finishToken(t, e);
|
|
4230
|
-
},
|
|
4231
|
+
}, C.skipBlockComment = function() {
|
|
4231
4232
|
var e;
|
|
4232
4233
|
this.isLookahead || (e = this.options.onComment && this.curPosition());
|
|
4233
4234
|
var t = this.pos, n = this.input.indexOf("*/", this.pos += 2);
|
|
4234
|
-
if (n === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = n + 2, this.options.locations) for (var r, i = t; (r =
|
|
4235
|
+
if (n === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = n + 2, this.options.locations) for (var r, i = t; (r = b(this.input, i, this.pos)) > -1;) ++this.curLine, i = this.lineStart = r;
|
|
4235
4236
|
this.isLookahead || this.options.onComment && this.options.onComment(!0, this.input.slice(t + 2, n), t, this.pos, e, this.curPosition());
|
|
4236
|
-
},
|
|
4237
|
+
}, C.skipLineComment = function(e) {
|
|
4237
4238
|
var t, n = this.pos;
|
|
4238
4239
|
this.isLookahead || (t = this.options.onComment && this.curPosition());
|
|
4239
4240
|
for (var r = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !d(r);) r = this.input.charCodeAt(++this.pos);
|
|
4240
4241
|
this.isLookahead || this.options.onComment && this.options.onComment(!1, this.input.slice(n + e, this.pos), n, this.pos, t, this.curPosition());
|
|
4241
|
-
},
|
|
4242
|
+
}, C.finishToken = function(e, t) {
|
|
4242
4243
|
this.preValue = this.value, this.preToken = this.type, this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
|
|
4243
4244
|
var n = this.type;
|
|
4244
4245
|
this.type = e, this.value = t, this.isLookahead || this.updateContext(n);
|
|
4245
|
-
},
|
|
4246
|
+
}, C.resetStartLocation = function(e, t, n) {
|
|
4246
4247
|
e.start = t, e.loc.start = n, this.options.ranges && (e.range[0] = t);
|
|
4247
|
-
},
|
|
4248
|
+
}, C.isLineTerminator = function() {
|
|
4248
4249
|
return this.eat(o.semi) || e.prototype.canInsertSemicolon.call(this);
|
|
4249
|
-
},
|
|
4250
|
-
return
|
|
4251
|
-
},
|
|
4250
|
+
}, C.hasFollowingLineBreak = function() {
|
|
4251
|
+
return pn.lastIndex = this.end, pn.test(this.input);
|
|
4252
|
+
}, C.addExtra = function(e, t, n, r) {
|
|
4252
4253
|
if (r === void 0 && (r = !0), e) {
|
|
4253
4254
|
var i = e.extra = e.extra || {};
|
|
4254
4255
|
r ? i[t] = n : Object.defineProperty(i, t, {
|
|
@@ -4256,30 +4257,30 @@ function On(e) {
|
|
|
4256
4257
|
value: n
|
|
4257
4258
|
});
|
|
4258
4259
|
}
|
|
4259
|
-
},
|
|
4260
|
+
}, C.isLiteralPropertyName = function() {
|
|
4260
4261
|
return _(this.type);
|
|
4261
|
-
},
|
|
4262
|
-
return
|
|
4263
|
-
},
|
|
4262
|
+
}, C.hasPrecedingLineBreak = function() {
|
|
4263
|
+
return l.test(this.input.slice(this.lastTokEndLoc.index, this.start));
|
|
4264
|
+
}, C.createIdentifier = function(e, t) {
|
|
4264
4265
|
return e.name = t, this.finishNode(e, "Identifier");
|
|
4265
|
-
},
|
|
4266
|
+
}, C.resetStartLocationFromNode = function(e, t) {
|
|
4266
4267
|
this.resetStartLocation(e, t.start, t.loc.start);
|
|
4267
|
-
},
|
|
4268
|
+
}, C.isThisParam = function(e) {
|
|
4268
4269
|
return e.type === "Identifier" && e.name === "this";
|
|
4269
|
-
},
|
|
4270
|
+
}, C.isLookaheadContextual = function(e) {
|
|
4270
4271
|
var t = this.nextTokenStart();
|
|
4271
4272
|
return this.isUnparsedContextual(t, e);
|
|
4272
|
-
},
|
|
4273
|
+
}, C.ts_type_isContextual = function(e, t) {
|
|
4273
4274
|
return e === t && !this.containsEsc;
|
|
4274
|
-
},
|
|
4275
|
+
}, C.ts_isContextual = function(e) {
|
|
4275
4276
|
return this.type === e && !this.containsEsc;
|
|
4276
|
-
},
|
|
4277
|
+
}, C.ts_isContextualWithState = function(e, t) {
|
|
4277
4278
|
return e.type === t && !e.containsEsc;
|
|
4278
|
-
},
|
|
4279
|
+
}, C.isContextualWithState = function(e, t) {
|
|
4279
4280
|
return t.type === o.name && t.value === e && !t.containsEsc;
|
|
4280
|
-
},
|
|
4281
|
+
}, C.tsIsStartOfMappedType = function() {
|
|
4281
4282
|
return this.next(), this.eat(o.plusMin) ? this.ts_isContextual(m.readonly) : (this.ts_isContextual(m.readonly) && this.next(), !!this.match(o.bracketL) && (this.next(), !!this.tsIsIdentifier() && (this.next(), this.match(o._in))));
|
|
4282
|
-
},
|
|
4283
|
+
}, C.tsInDisallowConditionalTypesContext = function(e) {
|
|
4283
4284
|
var t = this.inDisallowConditionalTypesContext;
|
|
4284
4285
|
this.inDisallowConditionalTypesContext = !0;
|
|
4285
4286
|
try {
|
|
@@ -4287,19 +4288,19 @@ function On(e) {
|
|
|
4287
4288
|
} finally {
|
|
4288
4289
|
this.inDisallowConditionalTypesContext = t;
|
|
4289
4290
|
}
|
|
4290
|
-
},
|
|
4291
|
+
}, C.tsTryParseType = function() {
|
|
4291
4292
|
return this.tsEatThenParseType(o.colon);
|
|
4292
|
-
},
|
|
4293
|
+
}, C.match = function(e) {
|
|
4293
4294
|
return this.type === e;
|
|
4294
|
-
},
|
|
4295
|
+
}, C.matchJsx = function(e) {
|
|
4295
4296
|
return this.type === i.tokTypes[e];
|
|
4296
|
-
},
|
|
4297
|
+
}, C.ts_eatWithState = function(e, t, n) {
|
|
4297
4298
|
if (e === n.type) {
|
|
4298
4299
|
for (var r = 0; r < t; r++) this.next();
|
|
4299
4300
|
return !0;
|
|
4300
4301
|
}
|
|
4301
4302
|
return !1;
|
|
4302
|
-
},
|
|
4303
|
+
}, C.ts_eatContextualWithState = function(e, t, n) {
|
|
4303
4304
|
if (g.test(e)) {
|
|
4304
4305
|
if (this.ts_isContextualWithState(n, m[e])) {
|
|
4305
4306
|
for (var r = 0; r < t; r++) this.next();
|
|
@@ -4310,37 +4311,37 @@ function On(e) {
|
|
|
4310
4311
|
if (!this.isContextualWithState(e, n)) return !1;
|
|
4311
4312
|
for (var i = 0; i < t; i++) this.next();
|
|
4312
4313
|
return !0;
|
|
4313
|
-
},
|
|
4314
|
+
}, C.canHaveLeadingDecorator = function() {
|
|
4314
4315
|
return this.match(o._class);
|
|
4315
|
-
},
|
|
4316
|
+
}, C.eatContextual = function(t) {
|
|
4316
4317
|
return g.test(t) ? !!this.ts_isContextual(m[t]) && (this.next(), !0) : e.prototype.eatContextual.call(this, t);
|
|
4317
|
-
},
|
|
4318
|
+
}, C.tsIsExternalModuleReference = function() {
|
|
4318
4319
|
return this.isContextual("require") && this.lookaheadCharCode() === 40;
|
|
4319
|
-
},
|
|
4320
|
+
}, C.tsParseExternalModuleReference = function() {
|
|
4320
4321
|
var e = this.startNode();
|
|
4321
4322
|
return this.expectContextual("require"), this.expect(o.parenL), this.match(o.string) || this.unexpected(), e.expression = this.parseExprAtom(), this.expect(o.parenR), this.finishNode(e, "TSExternalModuleReference");
|
|
4322
|
-
},
|
|
4323
|
+
}, C.tsParseEntityName = function(e) {
|
|
4323
4324
|
e === void 0 && (e = !0);
|
|
4324
4325
|
for (var t = this.parseIdent(e); this.eat(o.dot);) {
|
|
4325
4326
|
var n = this.startNodeAtNode(t);
|
|
4326
4327
|
n.left = t, n.right = this.parseIdent(e), t = this.finishNode(n, "TSQualifiedName");
|
|
4327
4328
|
}
|
|
4328
4329
|
return t;
|
|
4329
|
-
},
|
|
4330
|
+
}, C.tsParseEnumMember = function() {
|
|
4330
4331
|
var e = this.startNode();
|
|
4331
4332
|
return e.id = this.match(o.string) ? this.parseLiteral(this.value) : this.parseIdent(!0), this.eat(o.eq) && (e.initializer = this.parseMaybeAssign()), this.finishNode(e, "TSEnumMember");
|
|
4332
|
-
},
|
|
4333
|
+
}, C.tsParseEnumDeclaration = function(e, t) {
|
|
4333
4334
|
return t === void 0 && (t = {}), t.const && (e.const = !0), t.declare && (e.declare = !0), this.expectContextual("enum"), e.id = this.parseIdent(), this.checkLValSimple(e.id), this.expect(o.braceL), e.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)), this.expect(o.braceR), this.finishNode(e, "TSEnumDeclaration");
|
|
4334
|
-
},
|
|
4335
|
+
}, C.tsParseModuleBlock = function() {
|
|
4335
4336
|
var t = this.startNode();
|
|
4336
4337
|
for (e.prototype.enterScope.call(this, 512), this.expect(o.braceL), t.body = []; this.type !== o.braceR;) {
|
|
4337
4338
|
var n = this.parseStatement(null, !0);
|
|
4338
4339
|
t.body.push(n);
|
|
4339
4340
|
}
|
|
4340
4341
|
return this.next(), e.prototype.exitScope.call(this), this.finishNode(t, "TSModuleBlock");
|
|
4341
|
-
},
|
|
4342
|
-
return this.ts_isContextual(m.global) ? (t.global = !0, t.id = this.parseIdent()) : this.match(o.string) ? t.id = this.parseLiteral(this.value) : this.unexpected(), this.match(o.braceL) ? (e.prototype.enterScope.call(this,
|
|
4343
|
-
},
|
|
4342
|
+
}, C.tsParseAmbientExternalModuleDeclaration = function(t) {
|
|
4343
|
+
return this.ts_isContextual(m.global) ? (t.global = !0, t.id = this.parseIdent()) : this.match(o.string) ? t.id = this.parseLiteral(this.value) : this.unexpected(), this.match(o.braceL) ? (e.prototype.enterScope.call(this, fn), t.body = this.tsParseModuleBlock(), e.prototype.exitScope.call(this)) : e.prototype.semicolon.call(this), this.finishNode(t, "TSModuleDeclaration");
|
|
4344
|
+
}, C.tsTryParseDeclare = function(e) {
|
|
4344
4345
|
var t = this;
|
|
4345
4346
|
if (!this.isLineTerminator()) {
|
|
4346
4347
|
var n, r = this.type;
|
|
@@ -4360,7 +4361,7 @@ function On(e) {
|
|
|
4360
4361
|
return v(r) ? t.tsParseDeclaration(e, t.value, !0) : void 0;
|
|
4361
4362
|
});
|
|
4362
4363
|
}
|
|
4363
|
-
},
|
|
4364
|
+
}, C.tsIsListTerminator = function(e) {
|
|
4364
4365
|
switch (e) {
|
|
4365
4366
|
case "EnumMembers":
|
|
4366
4367
|
case "TypeMembers": return this.match(o.braceR);
|
|
@@ -4368,7 +4369,7 @@ function On(e) {
|
|
|
4368
4369
|
case "TupleElementTypes": return this.match(o.bracketR);
|
|
4369
4370
|
case "TypeParametersOrArguments": return this.tsMatchRightRelational();
|
|
4370
4371
|
}
|
|
4371
|
-
},
|
|
4372
|
+
}, C.tsParseDelimitedListWorker = function(e, t, n, r) {
|
|
4372
4373
|
for (var i = [], a = -1; !this.tsIsListTerminator(e);) {
|
|
4373
4374
|
a = -1;
|
|
4374
4375
|
var s = t();
|
|
@@ -4381,35 +4382,35 @@ function On(e) {
|
|
|
4381
4382
|
a = this.lastTokStart;
|
|
4382
4383
|
}
|
|
4383
4384
|
return r && (r.value = a), i;
|
|
4384
|
-
},
|
|
4385
|
+
}, C.tsParseDelimitedList = function(e, t, n) {
|
|
4385
4386
|
return function(e) {
|
|
4386
4387
|
if (e == null) throw Error("Unexpected " + e + " value.");
|
|
4387
4388
|
return e;
|
|
4388
4389
|
}(this.tsParseDelimitedListWorker(e, t, !0, n));
|
|
4389
|
-
},
|
|
4390
|
+
}, C.tsParseBracketedList = function(e, t, n, r, i) {
|
|
4390
4391
|
r || this.expect(n ? o.bracketL : o.relational);
|
|
4391
4392
|
var a = this.tsParseDelimitedList(e, t, i);
|
|
4392
4393
|
return this.expect(n ? o.bracketR : o.relational), a;
|
|
4393
|
-
},
|
|
4394
|
+
}, C.tsParseTypeParameterName = function() {
|
|
4394
4395
|
return this.parseIdent().name;
|
|
4395
|
-
},
|
|
4396
|
+
}, C.tsEatThenParseType = function(e) {
|
|
4396
4397
|
return this.match(e) ? this.tsNextThenParseType() : void 0;
|
|
4397
|
-
},
|
|
4398
|
+
}, C.tsExpectThenParseType = function(e) {
|
|
4398
4399
|
var t = this;
|
|
4399
4400
|
return this.tsDoThenParseType(function() {
|
|
4400
4401
|
return t.expect(e);
|
|
4401
4402
|
});
|
|
4402
|
-
},
|
|
4403
|
+
}, C.tsNextThenParseType = function() {
|
|
4403
4404
|
var e = this;
|
|
4404
4405
|
return this.tsDoThenParseType(function() {
|
|
4405
4406
|
return e.next();
|
|
4406
4407
|
});
|
|
4407
|
-
},
|
|
4408
|
+
}, C.tsDoThenParseType = function(e) {
|
|
4408
4409
|
var t = this;
|
|
4409
4410
|
return this.tsInType(function() {
|
|
4410
4411
|
return e(), t.tsParseType();
|
|
4411
4412
|
});
|
|
4412
|
-
},
|
|
4413
|
+
}, C.tsSkipParameterStart = function() {
|
|
4413
4414
|
if (v(this.type) || this.match(o._this)) return this.next(), !0;
|
|
4414
4415
|
if (this.match(o.braceL)) try {
|
|
4415
4416
|
return this.parseObj(!0), !0;
|
|
@@ -4425,11 +4426,11 @@ function On(e) {
|
|
|
4425
4426
|
}
|
|
4426
4427
|
}
|
|
4427
4428
|
return !1;
|
|
4428
|
-
},
|
|
4429
|
+
}, C.tsIsUnambiguouslyStartOfFunctionType = function() {
|
|
4429
4430
|
return this.next(), !!(this.match(o.parenR) || this.match(o.ellipsis) || this.tsSkipParameterStart() && (this.match(o.colon) || this.match(o.comma) || this.match(o.question) || this.match(o.eq) || this.match(o.parenR) && (this.next(), this.match(o.arrow))));
|
|
4430
|
-
},
|
|
4431
|
+
}, C.tsIsStartOfFunctionType = function() {
|
|
4431
4432
|
return !!this.tsMatchLeftRelational() || this.match(o.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
|
|
4432
|
-
},
|
|
4433
|
+
}, C.tsInAllowConditionalTypesContext = function(e) {
|
|
4433
4434
|
var t = this.inDisallowConditionalTypesContext;
|
|
4434
4435
|
this.inDisallowConditionalTypesContext = !1;
|
|
4435
4436
|
try {
|
|
@@ -4437,34 +4438,34 @@ function On(e) {
|
|
|
4437
4438
|
} finally {
|
|
4438
4439
|
this.inDisallowConditionalTypesContext = t;
|
|
4439
4440
|
}
|
|
4440
|
-
},
|
|
4441
|
+
}, C.tsParseBindingListForSignature = function() {
|
|
4441
4442
|
var t = this;
|
|
4442
4443
|
return e.prototype.parseBindingList.call(this, o.parenR, !0, !0).map(function(e) {
|
|
4443
4444
|
return e.type !== "Identifier" && e.type !== "RestElement" && e.type !== "ObjectPattern" && e.type !== "ArrayPattern" && t.raise(e.start, U.UnsupportedSignatureParameterKind(e.type)), e;
|
|
4444
4445
|
});
|
|
4445
|
-
},
|
|
4446
|
+
}, C.tsParseTypePredicateAsserts = function() {
|
|
4446
4447
|
if (this.type !== m.asserts) return !1;
|
|
4447
4448
|
var e = this.containsEsc;
|
|
4448
4449
|
return this.next(), !(!v(this.type) && !this.match(o._this) || (e && this.raise(this.lastTokStart, "Escape sequence in keyword asserts"), 0));
|
|
4449
|
-
},
|
|
4450
|
+
}, C.tsParseThisTypeNode = function() {
|
|
4450
4451
|
var e = this.startNode();
|
|
4451
4452
|
return this.next(), this.finishNode(e, "TSThisType");
|
|
4452
|
-
},
|
|
4453
|
+
}, C.tsParseTypeAnnotation = function(e, t) {
|
|
4453
4454
|
var n = this;
|
|
4454
4455
|
return e === void 0 && (e = !0), t === void 0 && (t = this.startNode()), this.tsInType(function() {
|
|
4455
4456
|
e && n.expect(o.colon), t.typeAnnotation = n.tsParseType();
|
|
4456
4457
|
}), this.finishNode(t, "TSTypeAnnotation");
|
|
4457
|
-
},
|
|
4458
|
+
}, C.tsParseThisTypePredicate = function(e) {
|
|
4458
4459
|
this.next();
|
|
4459
4460
|
var t = this.startNodeAtNode(e);
|
|
4460
4461
|
return t.parameterName = e, t.typeAnnotation = this.tsParseTypeAnnotation(!1), t.asserts = !1, this.finishNode(t, "TSTypePredicate");
|
|
4461
|
-
},
|
|
4462
|
+
}, C.tsParseThisTypeOrThisTypePredicate = function() {
|
|
4462
4463
|
var e = this.tsParseThisTypeNode();
|
|
4463
4464
|
return this.isContextual("is") && !this.hasPrecedingLineBreak() ? this.tsParseThisTypePredicate(e) : e;
|
|
4464
|
-
},
|
|
4465
|
+
}, C.tsParseTypePredicatePrefix = function() {
|
|
4465
4466
|
var e = this.parseIdent();
|
|
4466
4467
|
if (this.isContextual("is") && !this.hasPrecedingLineBreak()) return this.next(), e;
|
|
4467
|
-
},
|
|
4468
|
+
}, C.tsParseTypeOrTypePredicateAnnotation = function(e) {
|
|
4468
4469
|
var t = this;
|
|
4469
4470
|
return this.tsInType(function() {
|
|
4470
4471
|
var n = t.startNode();
|
|
@@ -4479,35 +4480,35 @@ function On(e) {
|
|
|
4479
4480
|
var c = t.tsParseTypeAnnotation(!1);
|
|
4480
4481
|
return r.parameterName = s, r.typeAnnotation = c, r.asserts = i, n.typeAnnotation = t.finishNode(r, "TSTypePredicate"), t.finishNode(n, "TSTypeAnnotation");
|
|
4481
4482
|
});
|
|
4482
|
-
},
|
|
4483
|
+
}, C.tsFillSignature = function(e, t) {
|
|
4483
4484
|
var n = e === o.arrow;
|
|
4484
4485
|
t.typeParameters = this.tsTryParseTypeParameters(), this.expect(o.parenL), t.parameters = this.tsParseBindingListForSignature(), (n || this.match(e)) && (t.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(e));
|
|
4485
|
-
},
|
|
4486
|
+
}, C.tsTryNextParseConstantContext = function() {
|
|
4486
4487
|
if (this.lookahead().type !== o._const) return null;
|
|
4487
4488
|
this.next();
|
|
4488
4489
|
var e = this.tsParseTypeReference();
|
|
4489
4490
|
return e.typeParameters && this.raise(e.typeName.start, U.CannotFindName({ name: "const" })), e;
|
|
4490
|
-
},
|
|
4491
|
+
}, C.tsParseFunctionOrConstructorType = function(e, t) {
|
|
4491
4492
|
var n = this, r = this.startNode();
|
|
4492
4493
|
return e === "TSConstructorType" && (r.abstract = !!t, t && this.next(), this.next()), this.tsInAllowConditionalTypesContext(function() {
|
|
4493
4494
|
return n.tsFillSignature(o.arrow, r);
|
|
4494
4495
|
}), this.finishNode(r, e);
|
|
4495
|
-
},
|
|
4496
|
+
}, C.tsParseUnionOrIntersectionType = function(e, t, n) {
|
|
4496
4497
|
var r = this.startNode(), i = this.eat(n), a = [];
|
|
4497
4498
|
do
|
|
4498
4499
|
a.push(t());
|
|
4499
4500
|
while (this.eat(n));
|
|
4500
4501
|
return a.length !== 1 || i ? (r.types = a, this.finishNode(r, e)) : a[0];
|
|
4501
|
-
},
|
|
4502
|
+
}, C.tsCheckTypeAnnotationForReadOnly = function(e) {
|
|
4502
4503
|
switch (e.typeAnnotation.type) {
|
|
4503
4504
|
case "TSTupleType":
|
|
4504
4505
|
case "TSArrayType": return;
|
|
4505
4506
|
default: this.raise(e.start, U.UnexpectedReadonly);
|
|
4506
4507
|
}
|
|
4507
|
-
},
|
|
4508
|
+
}, C.tsParseTypeOperator = function() {
|
|
4508
4509
|
var e = this.startNode(), t = this.value;
|
|
4509
4510
|
return this.next(), e.operator = t, e.typeAnnotation = this.tsParseTypeOperatorOrHigher(), t === "readonly" && this.tsCheckTypeAnnotationForReadOnly(e), this.finishNode(e, "TSTypeOperator");
|
|
4510
|
-
},
|
|
4511
|
+
}, C.tsParseConstraintForInferType = function() {
|
|
4511
4512
|
var e = this;
|
|
4512
4513
|
if (this.eat(o._extends)) {
|
|
4513
4514
|
var t = this.tsInDisallowConditionalTypesContext(function() {
|
|
@@ -4515,14 +4516,14 @@ function On(e) {
|
|
|
4515
4516
|
});
|
|
4516
4517
|
if (this.inDisallowConditionalTypesContext || !this.match(o.question)) return t;
|
|
4517
4518
|
}
|
|
4518
|
-
},
|
|
4519
|
+
}, C.tsParseInferType = function() {
|
|
4519
4520
|
var e = this, t = this.startNode();
|
|
4520
4521
|
this.expectContextual("infer");
|
|
4521
4522
|
var n = this.startNode();
|
|
4522
4523
|
return n.name = this.tsParseTypeParameterName(), n.constraint = this.tsTryParse(function() {
|
|
4523
4524
|
return e.tsParseConstraintForInferType();
|
|
4524
4525
|
}), t.typeParameter = this.finishNode(n, "TSTypeParameter"), this.finishNode(t, "TSInferType");
|
|
4525
|
-
},
|
|
4526
|
+
}, C.tsParseLiteralTypeNode = function() {
|
|
4526
4527
|
var e = this, t = this.startNode();
|
|
4527
4528
|
return t.literal = function() {
|
|
4528
4529
|
switch (e.type) {
|
|
@@ -4533,22 +4534,22 @@ function On(e) {
|
|
|
4533
4534
|
default: e.unexpected();
|
|
4534
4535
|
}
|
|
4535
4536
|
}(), this.finishNode(t, "TSLiteralType");
|
|
4536
|
-
},
|
|
4537
|
+
}, C.tsParseImportType = function() {
|
|
4537
4538
|
var e = this.startNode();
|
|
4538
4539
|
return this.expect(o._import), this.expect(o.parenL), this.match(o.string) || this.raise(this.start, U.UnsupportedImportTypeArgument), e.argument = this.parseExprAtom(), this.expect(o.parenR), this.eat(o.dot) && (e.qualifier = this.tsParseEntityName()), this.tsMatchLeftRelational() && (e.typeParameters = this.tsParseTypeArguments()), this.finishNode(e, "TSImportType");
|
|
4539
|
-
},
|
|
4540
|
+
}, C.tsParseTypeQuery = function() {
|
|
4540
4541
|
var e = this.startNode();
|
|
4541
4542
|
return this.expect(o._typeof), e.exprName = this.match(o._import) ? this.tsParseImportType() : this.tsParseEntityName(), !this.hasPrecedingLineBreak() && this.tsMatchLeftRelational() && (e.typeParameters = this.tsParseTypeArguments()), this.finishNode(e, "TSTypeQuery");
|
|
4542
|
-
},
|
|
4543
|
+
}, C.tsParseMappedTypeParameter = function() {
|
|
4543
4544
|
var e = this.startNode();
|
|
4544
4545
|
return e.name = this.tsParseTypeParameterName(), e.constraint = this.tsExpectThenParseType(o._in), this.finishNode(e, "TSTypeParameter");
|
|
4545
|
-
},
|
|
4546
|
+
}, C.tsParseMappedType = function() {
|
|
4546
4547
|
var e = this.startNode();
|
|
4547
4548
|
return this.expect(o.braceL), this.match(o.plusMin) ? (e.readonly = this.value, this.next(), this.expectContextual("readonly")) : this.eatContextual("readonly") && (e.readonly = !0), this.expect(o.bracketL), e.typeParameter = this.tsParseMappedTypeParameter(), e.nameType = this.eatContextual("as") ? this.tsParseType() : null, this.expect(o.bracketR), this.match(o.plusMin) ? (e.optional = this.value, this.next(), this.expect(o.question)) : this.eat(o.question) && (e.optional = !0), e.typeAnnotation = this.tsTryParseType(), this.semicolon(), this.expect(o.braceR), this.finishNode(e, "TSMappedType");
|
|
4548
|
-
},
|
|
4549
|
+
}, C.tsParseTypeLiteral = function() {
|
|
4549
4550
|
var e = this.startNode();
|
|
4550
4551
|
return e.members = this.tsParseObjectTypeMembers(), this.finishNode(e, "TSTypeLiteral");
|
|
4551
|
-
},
|
|
4552
|
+
}, C.tsParseTupleElementType = function() {
|
|
4552
4553
|
var e = this.startLoc, t = this.start, n = this.eat(o.ellipsis), r = this.tsParseType(), i = this.eat(o.question);
|
|
4553
4554
|
if (this.eat(o.colon)) {
|
|
4554
4555
|
var a = this.startNodeAtNode(r);
|
|
@@ -4562,7 +4563,7 @@ function On(e) {
|
|
|
4562
4563
|
c.typeAnnotation = r, r = this.finishNode(c, "TSRestType");
|
|
4563
4564
|
}
|
|
4564
4565
|
return r;
|
|
4565
|
-
},
|
|
4566
|
+
}, C.tsParseTupleType = function() {
|
|
4566
4567
|
var e = this, t = this.startNode();
|
|
4567
4568
|
t.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), !0, !1);
|
|
4568
4569
|
var n = !1, r = null;
|
|
@@ -4574,20 +4575,20 @@ function On(e) {
|
|
|
4574
4575
|
var o = a === "TSNamedTupleMember";
|
|
4575
4576
|
r ??= o, r !== o && e.raise(t.start, U.MixedLabeledAndUnlabeledElements);
|
|
4576
4577
|
}), this.finishNode(t, "TSTupleType");
|
|
4577
|
-
},
|
|
4578
|
+
}, C.tsParseTemplateLiteralType = function() {
|
|
4578
4579
|
var e = this.startNode();
|
|
4579
4580
|
return e.literal = this.parseTemplate({ isTagged: !1 }), this.finishNode(e, "TSLiteralType");
|
|
4580
|
-
},
|
|
4581
|
+
}, C.tsParseTypeReference = function() {
|
|
4581
4582
|
var e = this.startNode();
|
|
4582
4583
|
return e.typeName = this.tsParseEntityName(), !this.hasPrecedingLineBreak() && this.tsMatchLeftRelational() && (e.typeParameters = this.tsParseTypeArguments()), this.finishNode(e, "TSTypeReference");
|
|
4583
|
-
},
|
|
4584
|
+
}, C.tsMatchLeftRelational = function() {
|
|
4584
4585
|
return this.match(o.relational) && this.value === "<";
|
|
4585
|
-
},
|
|
4586
|
+
}, C.tsMatchRightRelational = function() {
|
|
4586
4587
|
return this.match(o.relational) && this.value === ">";
|
|
4587
|
-
},
|
|
4588
|
+
}, C.tsParseParenthesizedType = function() {
|
|
4588
4589
|
var e = this.startNode();
|
|
4589
4590
|
return this.expect(o.parenL), e.typeAnnotation = this.tsParseType(), this.expect(o.parenR), this.finishNode(e, "TSParenthesizedType");
|
|
4590
|
-
},
|
|
4591
|
+
}, C.tsParseNonArrayType = function() {
|
|
4591
4592
|
switch (this.type) {
|
|
4592
4593
|
case o.string:
|
|
4593
4594
|
case o.num:
|
|
@@ -4633,7 +4634,7 @@ function On(e) {
|
|
|
4633
4634
|
}
|
|
4634
4635
|
}
|
|
4635
4636
|
this.unexpected();
|
|
4636
|
-
},
|
|
4637
|
+
}, C.tsParseArrayTypeOrHigher = function() {
|
|
4637
4638
|
for (var e = this.tsParseNonArrayType(); !this.hasPrecedingLineBreak() && this.eat(o.bracketL);) if (this.match(o.bracketR)) {
|
|
4638
4639
|
var t = this.startNodeAtNode(e);
|
|
4639
4640
|
t.elementType = e, this.expect(o.bracketR), e = this.finishNode(t, "TSArrayType");
|
|
@@ -4642,20 +4643,20 @@ function On(e) {
|
|
|
4642
4643
|
n.objectType = e, n.indexType = this.tsParseType(), this.expect(o.bracketR), e = this.finishNode(n, "TSIndexedAccessType");
|
|
4643
4644
|
}
|
|
4644
4645
|
return e;
|
|
4645
|
-
},
|
|
4646
|
+
}, C.tsParseTypeOperatorOrHigher = function() {
|
|
4646
4647
|
var e = this;
|
|
4647
|
-
return
|
|
4648
|
+
return y(this.type) && !this.containsEsc ? this.tsParseTypeOperator() : this.isContextual("infer") ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(function() {
|
|
4648
4649
|
return e.tsParseArrayTypeOrHigher();
|
|
4649
4650
|
});
|
|
4650
|
-
},
|
|
4651
|
+
}, C.tsParseIntersectionTypeOrHigher = function() {
|
|
4651
4652
|
return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), o.bitwiseAND);
|
|
4652
|
-
},
|
|
4653
|
+
}, C.tsParseUnionTypeOrHigher = function() {
|
|
4653
4654
|
return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), o.bitwiseOR);
|
|
4654
|
-
},
|
|
4655
|
+
}, C.tsParseNonConditionalType = function() {
|
|
4655
4656
|
return this.tsIsStartOfFunctionType() ? this.tsParseFunctionOrConstructorType("TSFunctionType") : this.match(o._new) ? this.tsParseFunctionOrConstructorType("TSConstructorType") : this.isAbstractConstructorSignature() ? this.tsParseFunctionOrConstructorType("TSConstructorType", !0) : this.tsParseUnionTypeOrHigher();
|
|
4656
|
-
},
|
|
4657
|
+
}, C.tsParseType = function() {
|
|
4657
4658
|
var e = this;
|
|
4658
|
-
|
|
4659
|
+
Sn(this.inType);
|
|
4659
4660
|
var t = this.tsParseNonConditionalType();
|
|
4660
4661
|
if (this.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(o._extends)) return t;
|
|
4661
4662
|
var n = this.startNodeAtNode(t);
|
|
@@ -4666,9 +4667,9 @@ function On(e) {
|
|
|
4666
4667
|
}), this.expect(o.colon), n.falseType = this.tsInAllowConditionalTypesContext(function() {
|
|
4667
4668
|
return e.tsParseType();
|
|
4668
4669
|
}), this.finishNode(n, "TSConditionalType");
|
|
4669
|
-
},
|
|
4670
|
+
}, C.tsIsUnambiguouslyIndexSignature = function() {
|
|
4670
4671
|
return this.next(), !!v(this.type) && (this.next(), this.match(o.colon));
|
|
4671
|
-
},
|
|
4672
|
+
}, C.tsInType = function(e) {
|
|
4672
4673
|
var t = this.inType;
|
|
4673
4674
|
this.inType = !0;
|
|
4674
4675
|
try {
|
|
@@ -4676,7 +4677,7 @@ function On(e) {
|
|
|
4676
4677
|
} finally {
|
|
4677
4678
|
this.inType = t;
|
|
4678
4679
|
}
|
|
4679
|
-
},
|
|
4680
|
+
}, C.tsTryParseIndexSignature = function(e) {
|
|
4680
4681
|
if (this.match(o.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))) {
|
|
4681
4682
|
this.expect(o.bracketL);
|
|
4682
4683
|
var t = this.parseIdent();
|
|
@@ -4684,32 +4685,32 @@ function On(e) {
|
|
|
4684
4685
|
var n = this.tsTryParseTypeAnnotation();
|
|
4685
4686
|
return n && (e.typeAnnotation = n), this.tsParseTypeMemberSemicolon(), this.finishNode(e, "TSIndexSignature");
|
|
4686
4687
|
}
|
|
4687
|
-
},
|
|
4688
|
+
}, C.tsParseNoneModifiers = function(e) {
|
|
4688
4689
|
this.tsParseModifiers({
|
|
4689
4690
|
modified: e,
|
|
4690
4691
|
allowedModifiers: [],
|
|
4691
4692
|
disallowedModifiers: ["in", "out"],
|
|
4692
4693
|
errorTemplate: U.InvalidModifierOnTypeParameterPositions
|
|
4693
4694
|
});
|
|
4694
|
-
},
|
|
4695
|
+
}, C.tsParseTypeParameter = function(e) {
|
|
4695
4696
|
e === void 0 && (e = this.tsParseNoneModifiers.bind(this));
|
|
4696
4697
|
var t = this.startNode();
|
|
4697
4698
|
return e(t), t.name = this.tsParseTypeParameterName(), t.constraint = this.tsEatThenParseType(o._extends), t.default = this.tsEatThenParseType(o.eq), this.finishNode(t, "TSTypeParameter");
|
|
4698
|
-
},
|
|
4699
|
+
}, C.tsParseTypeParameters = function(e) {
|
|
4699
4700
|
var t = this.startNode();
|
|
4700
4701
|
this.tsMatchLeftRelational() || this.matchJsx("jsxTagStart") ? this.next() : this.unexpected();
|
|
4701
4702
|
var n = { value: -1 };
|
|
4702
4703
|
return t.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, e), !1, !0, n), t.params.length === 0 && this.raise(this.start, U.EmptyTypeParameters), n.value !== -1 && this.addExtra(t, "trailingComma", n.value), this.finishNode(t, "TSTypeParameterDeclaration");
|
|
4703
|
-
},
|
|
4704
|
+
}, C.tsTryParseTypeParameters = function(e) {
|
|
4704
4705
|
if (this.tsMatchLeftRelational()) return this.tsParseTypeParameters(e);
|
|
4705
|
-
},
|
|
4706
|
+
}, C.tsTryParse = function(e) {
|
|
4706
4707
|
var t = this.getCurLookaheadState(), n = e();
|
|
4707
4708
|
return n !== void 0 && !1 !== n ? n : void this.setLookaheadState(t);
|
|
4708
|
-
},
|
|
4709
|
+
}, C.tsTokenCanFollowModifier = function() {
|
|
4709
4710
|
return (this.match(o.bracketL) || this.match(o.braceL) || this.match(o.star) || this.match(o.ellipsis) || this.match(o.privateId) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak();
|
|
4710
|
-
},
|
|
4711
|
+
}, C.tsNextTokenCanFollowModifier = function() {
|
|
4711
4712
|
return this.next(!0), this.tsTokenCanFollowModifier();
|
|
4712
|
-
},
|
|
4713
|
+
}, C.tsParseModifier = function(e, t) {
|
|
4713
4714
|
if (v(this.type) || this.type === o._in) {
|
|
4714
4715
|
var n = this.value;
|
|
4715
4716
|
if (e.indexOf(n) !== -1 && !this.containsEsc) {
|
|
@@ -4717,12 +4718,12 @@ function On(e) {
|
|
|
4717
4718
|
if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) return n;
|
|
4718
4719
|
}
|
|
4719
4720
|
}
|
|
4720
|
-
},
|
|
4721
|
+
}, C.tsParseModifiersByMap = function(e) {
|
|
4721
4722
|
for (var t = e.modified, n = e.map, r = 0, i = Object.keys(n); r < i.length; r++) {
|
|
4722
4723
|
var a = i[r];
|
|
4723
4724
|
t[a] = n[a];
|
|
4724
4725
|
}
|
|
4725
|
-
},
|
|
4726
|
+
}, C.tsParseModifiers = function(e) {
|
|
4726
4727
|
for (var t = this, n = e.modified, r = e.allowedModifiers, i = e.disallowedModifiers, a = e.stopOnStartOfClassStaticBlock, o = e.errorTemplate, s = o === void 0 ? U.InvalidModifierOnTypeMember : o, c = {}, l = function(e, r, i, a) {
|
|
4727
4728
|
r === i && n[a] && t.raise(e.column, U.InvalidModifiersOrder({ orderedModifiers: [i, a] }));
|
|
4728
4729
|
}, u = function(e, r, i, a) {
|
|
@@ -4730,10 +4731,10 @@ function On(e) {
|
|
|
4730
4731
|
};;) {
|
|
4731
4732
|
var d = this.startLoc, f = this.tsParseModifier(r.concat(i ?? []), a);
|
|
4732
4733
|
if (!f) break;
|
|
4733
|
-
|
|
4734
|
+
On(f) ? n.accessibility ? this.raise(this.start, U.DuplicateAccessibilityModifier()) : (l(d, f, f, "override"), l(d, f, f, "static"), l(d, f, f, "readonly"), l(d, f, f, "accessor"), c.accessibility = f, n.accessibility = f) : wn(f) ? n[f] ? this.raise(this.start, U.DuplicateModifier({ modifier: f })) : (l(d, f, "in", "out"), c[f] = f, n[f] = !0) : Cn(f) ? n[f] ? this.raise(this.start, U.DuplicateModifier({ modifier: f })) : (u(d, f, "accessor", "readonly"), u(d, f, "accessor", "static"), u(d, f, "accessor", "override"), c[f] = f, n[f] = !0) : Object.hasOwnProperty.call(n, f) ? this.raise(this.start, U.DuplicateModifier({ modifier: f })) : (l(d, f, "static", "readonly"), l(d, f, "static", "override"), l(d, f, "override", "readonly"), l(d, f, "abstract", "override"), u(d, f, "declare", "override"), u(d, f, "static", "abstract"), c[f] = f, n[f] = !0), i != null && i.includes(f) && this.raise(this.start, s);
|
|
4734
4735
|
}
|
|
4735
4736
|
return c;
|
|
4736
|
-
},
|
|
4737
|
+
}, C.tsParseInOutModifiers = function(e) {
|
|
4737
4738
|
this.tsParseModifiers({
|
|
4738
4739
|
modified: e,
|
|
4739
4740
|
allowedModifiers: ["in", "out"],
|
|
@@ -4748,29 +4749,29 @@ function On(e) {
|
|
|
4748
4749
|
],
|
|
4749
4750
|
errorTemplate: U.InvalidModifierOnTypeParameter
|
|
4750
4751
|
});
|
|
4751
|
-
},
|
|
4752
|
+
}, C.tsParseTypeArguments = function() {
|
|
4752
4753
|
var e = this, t = this.startNode();
|
|
4753
4754
|
return t.params = this.tsInType(function() {
|
|
4754
4755
|
return e.tsInNoContext(function() {
|
|
4755
4756
|
return e.expect(o.relational), e.tsParseDelimitedList("TypeParametersOrArguments", e.tsParseType.bind(e));
|
|
4756
4757
|
});
|
|
4757
4758
|
}), t.params.length === 0 && this.raise(this.start, U.EmptyTypeArguments), this.exprAllowed = !1, this.expect(o.relational), this.finishNode(t, "TSTypeParameterInstantiation");
|
|
4758
|
-
},
|
|
4759
|
+
}, C.tsParseHeritageClause = function(e) {
|
|
4759
4760
|
var t = this, n = this.start, r = this.tsParseDelimitedList("HeritageClauseElement", function() {
|
|
4760
4761
|
var e = t.startNode();
|
|
4761
4762
|
return e.expression = t.tsParseEntityName(), t.tsMatchLeftRelational() && (e.typeParameters = t.tsParseTypeArguments()), t.finishNode(e, "TSExpressionWithTypeArguments");
|
|
4762
4763
|
});
|
|
4763
4764
|
return r.length || this.raise(n, U.EmptyHeritageClauseType({ token: e })), r;
|
|
4764
|
-
},
|
|
4765
|
+
}, C.tsParseTypeMemberSemicolon = function() {
|
|
4765
4766
|
this.eat(o.comma) || this.isLineTerminator() || this.expect(o.semi);
|
|
4766
|
-
},
|
|
4767
|
+
}, C.tsTryParseAndCatch = function(e) {
|
|
4767
4768
|
var t = this.tryParse(function(t) {
|
|
4768
4769
|
return e() || t();
|
|
4769
4770
|
});
|
|
4770
4771
|
if (!t.aborted && t.node) return t.error && this.setLookaheadState(t.failState), t.node;
|
|
4771
|
-
},
|
|
4772
|
+
}, C.tsParseSignatureMember = function(e, t) {
|
|
4772
4773
|
return this.tsFillSignature(o.colon, t), this.tsParseTypeMemberSemicolon(), this.finishNode(t, e);
|
|
4773
|
-
},
|
|
4774
|
+
}, C.tsParsePropertyOrMethodSignature = function(e, t) {
|
|
4774
4775
|
this.eat(o.question) && (e.optional = !0);
|
|
4775
4776
|
var n = e;
|
|
4776
4777
|
if (this.match(o.parenL) || this.tsMatchLeftRelational()) {
|
|
@@ -4793,7 +4794,7 @@ function On(e) {
|
|
|
4793
4794
|
t && (c.readonly = !0);
|
|
4794
4795
|
var l = this.tsTryParseTypeAnnotation();
|
|
4795
4796
|
return l && (c.typeAnnotation = l), this.tsParseTypeMemberSemicolon(), this.finishNode(c, "TSPropertySignature");
|
|
4796
|
-
},
|
|
4797
|
+
}, C.tsParseTypeMember = function() {
|
|
4797
4798
|
var e = this.startNode();
|
|
4798
4799
|
if (this.match(o.parenL) || this.tsMatchLeftRelational()) return this.tsParseSignatureMember("TSCallSignatureDeclaration", e);
|
|
4799
4800
|
if (this.match(o._new)) {
|
|
@@ -4813,26 +4814,26 @@ function On(e) {
|
|
|
4813
4814
|
"override"
|
|
4814
4815
|
]
|
|
4815
4816
|
}), this.tsTryParseIndexSignature(e) || (this.parsePropertyName(e), e.computed || e.key.type !== "Identifier" || e.key.name !== "get" && e.key.name !== "set" || !this.tsTokenCanFollowModifier() || (e.kind = e.key.name, this.parsePropertyName(e)), this.tsParsePropertyOrMethodSignature(e, !!e.readonly));
|
|
4816
|
-
},
|
|
4817
|
+
}, C.tsParseList = function(e, t) {
|
|
4817
4818
|
for (var n = []; !this.tsIsListTerminator(e);) n.push(t());
|
|
4818
4819
|
return n;
|
|
4819
|
-
},
|
|
4820
|
+
}, C.tsParseObjectTypeMembers = function() {
|
|
4820
4821
|
this.expect(o.braceL);
|
|
4821
4822
|
var e = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this));
|
|
4822
4823
|
return this.expect(o.braceR), e;
|
|
4823
|
-
},
|
|
4824
|
+
}, C.tsParseInterfaceDeclaration = function(e, t) {
|
|
4824
4825
|
if (t === void 0 && (t = {}), this.hasFollowingLineBreak()) return null;
|
|
4825
4826
|
this.expectContextual("interface"), t.declare && (e.declare = !0), v(this.type) ? (e.id = this.parseIdent(), this.checkLValSimple(e.id, 7)) : (e.id = null, this.raise(this.start, U.MissingInterfaceName)), e.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)), this.eat(o._extends) && (e.extends = this.tsParseHeritageClause("extends"));
|
|
4826
4827
|
var n = this.startNode();
|
|
4827
4828
|
return n.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)), e.body = this.finishNode(n, "TSInterfaceBody"), this.finishNode(e, "TSInterfaceDeclaration");
|
|
4828
|
-
},
|
|
4829
|
+
}, C.tsParseAbstractDeclaration = function(e) {
|
|
4829
4830
|
if (this.match(o._class)) return e.abstract = !0, this.parseClass(e, !0);
|
|
4830
4831
|
if (this.ts_isContextual(m.interface)) {
|
|
4831
4832
|
if (!this.hasFollowingLineBreak()) return e.abstract = !0, this.tsParseInterfaceDeclaration(e);
|
|
4832
4833
|
} else this.unexpected(e.start);
|
|
4833
|
-
},
|
|
4834
|
+
}, C.tsIsDeclarationStart = function() {
|
|
4834
4835
|
return te(this.type);
|
|
4835
|
-
},
|
|
4836
|
+
}, C.tsParseExpressionStatement = function(t, n) {
|
|
4836
4837
|
switch (n.name) {
|
|
4837
4838
|
case "declare":
|
|
4838
4839
|
var r = this.tsTryParseDeclare(t);
|
|
@@ -4840,16 +4841,16 @@ function On(e) {
|
|
|
4840
4841
|
break;
|
|
4841
4842
|
case "global":
|
|
4842
4843
|
if (this.match(o.braceL)) {
|
|
4843
|
-
e.prototype.enterScope.call(this,
|
|
4844
|
+
e.prototype.enterScope.call(this, fn);
|
|
4844
4845
|
var i = t;
|
|
4845
4846
|
return i.global = !0, i.id = n, i.body = this.tsParseModuleBlock(), e.prototype.exitScope.call(this), this.finishNode(i, "TSModuleDeclaration");
|
|
4846
4847
|
}
|
|
4847
4848
|
break;
|
|
4848
4849
|
default: return this.tsParseDeclaration(t, n.name, !1);
|
|
4849
4850
|
}
|
|
4850
|
-
},
|
|
4851
|
+
}, C.tsParseModuleReference = function() {
|
|
4851
4852
|
return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(!1);
|
|
4852
|
-
},
|
|
4853
|
+
}, C.tsIsExportDefaultSpecifier = function() {
|
|
4853
4854
|
var e = this.type, t = this.isAsyncFunction(), n = this.isLet();
|
|
4854
4855
|
if (v(e)) {
|
|
4855
4856
|
if (t && !this.containsEsc || n) return !1;
|
|
@@ -4865,7 +4866,7 @@ function On(e) {
|
|
|
4865
4866
|
return s === 34 || s === 39;
|
|
4866
4867
|
}
|
|
4867
4868
|
return !1;
|
|
4868
|
-
},
|
|
4869
|
+
}, C.tsInAmbientContext = function(e) {
|
|
4869
4870
|
var t = this.isAmbientContext;
|
|
4870
4871
|
this.isAmbientContext = !0;
|
|
4871
4872
|
try {
|
|
@@ -4873,17 +4874,17 @@ function On(e) {
|
|
|
4873
4874
|
} finally {
|
|
4874
4875
|
this.isAmbientContext = t;
|
|
4875
4876
|
}
|
|
4876
|
-
},
|
|
4877
|
+
}, C.tsCheckLineTerminator = function(e) {
|
|
4877
4878
|
return e ? !this.hasFollowingLineBreak() && (this.next(), !0) : !this.isLineTerminator();
|
|
4878
|
-
},
|
|
4879
|
+
}, C.tsParseModuleOrNamespaceDeclaration = function(t, n) {
|
|
4879
4880
|
if (n === void 0 && (n = !1), t.id = this.parseIdent(), n || this.checkLValSimple(t.id, 8), this.eat(o.dot)) {
|
|
4880
4881
|
var r = this.startNode();
|
|
4881
4882
|
this.tsParseModuleOrNamespaceDeclaration(r, !0), t.body = r;
|
|
4882
|
-
} else e.prototype.enterScope.call(this,
|
|
4883
|
+
} else e.prototype.enterScope.call(this, fn), t.body = this.tsParseModuleBlock(), e.prototype.exitScope.call(this);
|
|
4883
4884
|
return this.finishNode(t, "TSModuleDeclaration");
|
|
4884
|
-
},
|
|
4885
|
+
}, C.checkLValSimple = function(t, n, r) {
|
|
4885
4886
|
return n === void 0 && (n = 0), e.prototype.checkLValSimple.call(this, t, n, r);
|
|
4886
|
-
},
|
|
4887
|
+
}, C.tsParseTypeAliasDeclaration = function(e) {
|
|
4887
4888
|
var t = this;
|
|
4888
4889
|
return e.id = this.parseIdent(), this.checkLValSimple(e.id, 6), e.typeAnnotation = this.tsInType(function() {
|
|
4889
4890
|
if (e.typeParameters = t.tsTryParseTypeParameters(t.tsParseInOutModifiers.bind(t)), t.expect(o.eq), t.ts_isContextual(m.interface) && t.lookahead().type !== o.dot) {
|
|
@@ -4892,7 +4893,7 @@ function On(e) {
|
|
|
4892
4893
|
}
|
|
4893
4894
|
return t.tsParseType();
|
|
4894
4895
|
}), this.semicolon(), this.finishNode(e, "TSTypeAliasDeclaration");
|
|
4895
|
-
},
|
|
4896
|
+
}, C.tsParseDeclaration = function(e, t, n) {
|
|
4896
4897
|
switch (t) {
|
|
4897
4898
|
case "abstract":
|
|
4898
4899
|
if (this.tsCheckLineTerminator(n) && (this.match(o._class) || v(this.type))) return this.tsParseAbstractDeclaration(e);
|
|
@@ -4908,13 +4909,13 @@ function On(e) {
|
|
|
4908
4909
|
break;
|
|
4909
4910
|
case "type": if (this.tsCheckLineTerminator(n) && v(this.type)) return this.tsParseTypeAliasDeclaration(e);
|
|
4910
4911
|
}
|
|
4911
|
-
},
|
|
4912
|
+
}, C.tsTryParseExportDeclaration = function() {
|
|
4912
4913
|
return this.tsParseDeclaration(this.startNode(), this.value, !0);
|
|
4913
|
-
},
|
|
4914
|
+
}, C.tsParseImportEqualsDeclaration = function(t, n) {
|
|
4914
4915
|
t.isExport = n || !1, t.id = this.parseIdent(), this.checkLValSimple(t.id, 2), e.prototype.expect.call(this, o.eq);
|
|
4915
4916
|
var r = this.tsParseModuleReference();
|
|
4916
4917
|
return t.importKind === "type" && r.type !== "TSExternalModuleReference" && this.raise(r.start, U.ImportAliasHasImportType), t.moduleReference = r, e.prototype.semicolon.call(this), this.finishNode(t, "TSImportEqualsDeclaration");
|
|
4917
|
-
},
|
|
4918
|
+
}, C.isExportDefaultSpecifier = function() {
|
|
4918
4919
|
if (this.tsIsDeclarationStart()) return !1;
|
|
4919
4920
|
var e = this.type;
|
|
4920
4921
|
if (v(e)) {
|
|
@@ -4931,23 +4932,23 @@ function On(e) {
|
|
|
4931
4932
|
return i === 34 || i === 39;
|
|
4932
4933
|
}
|
|
4933
4934
|
return !1;
|
|
4934
|
-
},
|
|
4935
|
+
}, C.parseTemplate = function(e) {
|
|
4935
4936
|
var t = (e === void 0 ? {} : e).isTagged, n = t !== void 0 && t, r = this.startNode();
|
|
4936
4937
|
this.next(), r.expressions = [];
|
|
4937
4938
|
var i = this.parseTemplateElement({ isTagged: n });
|
|
4938
4939
|
for (r.quasis = [i]; !i.tail;) this.type === o.eof && this.raise(this.pos, "Unterminated template literal"), this.expect(o.dollarBraceL), r.expressions.push(this.inType ? this.tsParseType() : this.parseExpression()), this.expect(o.braceR), r.quasis.push(i = this.parseTemplateElement({ isTagged: n }));
|
|
4939
4940
|
return this.next(), this.finishNode(r, "TemplateLiteral");
|
|
4940
|
-
},
|
|
4941
|
+
}, C.parseFunction = function(e, t, n, r, i) {
|
|
4941
4942
|
this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === o.star && 2 & t && this.unexpected(), e.generator = this.eat(o.star)), this.options.ecmaVersion >= 8 && (e.async = !!r), 1 & t && (e.id = 4 & t && this.type !== o.name ? null : this.parseIdent());
|
|
4942
4943
|
var a = this.yieldPos, s = this.awaitPos, c = this.awaitIdentPos, l = this.maybeInArrowParameters;
|
|
4943
|
-
this.maybeInArrowParameters = !1, this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
4944
|
+
this.maybeInArrowParameters = !1, this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Tn(e.async, e.generator)), 1 & t || (e.id = this.type === o.name ? this.parseIdent() : null), this.parseFunctionParams(e);
|
|
4944
4945
|
var u = 1 & t;
|
|
4945
4946
|
return this.parseFunctionBody(e, n, !1, i, { isFunctionDeclaration: u }), this.yieldPos = a, this.awaitPos = s, this.awaitIdentPos = c, 1 & t && e.id && !(2 & t) && this.checkLValSimple(e.id, e.body ? this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? 1 : 2 : 3 : 0), this.maybeInArrowParameters = l, this.finishNode(e, u ? "FunctionDeclaration" : "FunctionExpression");
|
|
4946
|
-
},
|
|
4947
|
+
}, C.parseFunctionBody = function(t, n, r, i, a) {
|
|
4947
4948
|
n === void 0 && (n = !1), r === void 0 && (r = !1), i === void 0 && (i = !1), this.match(o.colon) && (t.returnType = this.tsParseTypeOrTypePredicateAnnotation(o.colon));
|
|
4948
4949
|
var s = a != null && a.isFunctionDeclaration ? "TSDeclareFunction" : a != null && a.isClassMethod ? "TSDeclareMethod" : void 0;
|
|
4949
4950
|
return s && !this.match(o.braceL) && this.isLineTerminator() ? this.finishNode(t, s) : s === "TSDeclareFunction" && this.isAmbientContext && (this.raise(t.start, U.DeclareFunctionHasImplementation), t.declare) ? (e.prototype.parseFunctionBody.call(this, t, n, r, !1), this.finishNode(t, s)) : (e.prototype.parseFunctionBody.call(this, t, n, r, i), t);
|
|
4950
|
-
},
|
|
4951
|
+
}, C.parseNew = function() {
|
|
4951
4952
|
var e;
|
|
4952
4953
|
this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new");
|
|
4953
4954
|
var t = this.startNode(), n = this.parseIdent(!0);
|
|
@@ -4960,14 +4961,14 @@ function On(e) {
|
|
|
4960
4961
|
t.callee = this.parseSubscripts(this.parseExprAtom(), i, a, !0, !1), s && t.callee.type === "ImportExpression" && this.raise(i, "Cannot use new with import()");
|
|
4961
4962
|
var c = t.callee;
|
|
4962
4963
|
return c.type !== "TSInstantiationExpression" || (e = c.extra) != null && e.parenthesized || (t.typeParameters = c.typeParameters, t.callee = c.expression), t.arguments = this.eat(o.parenL) ? this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1) : [], this.finishNode(t, "NewExpression");
|
|
4963
|
-
},
|
|
4964
|
+
}, C.parseExprOp = function(t, n, r, i, s) {
|
|
4964
4965
|
var c;
|
|
4965
4966
|
if (o._in.binop > i && !this.hasPrecedingLineBreak() && (this.isContextual("as") && (c = "TSAsExpression"), a && this.isContextual("satisfies") && (c = "TSSatisfiesExpression"), c)) {
|
|
4966
4967
|
var l = this.startNodeAt(n, r);
|
|
4967
4968
|
return l.expression = t, l.typeAnnotation = this.tsTryNextParseConstantContext() || this.tsNextThenParseType(), this.finishNode(l, c), this.reScan_lt_gt(), this.parseExprOp(l, n, r, i, s);
|
|
4968
4969
|
}
|
|
4969
4970
|
return e.prototype.parseExprOp.call(this, t, n, r, i, s);
|
|
4970
|
-
},
|
|
4971
|
+
}, C.parseImportSpecifiers = function() {
|
|
4971
4972
|
var e = [], t = !0;
|
|
4972
4973
|
if (i.tokenIsIdentifier(this.type) && (e.push(this.parseImportDefaultSpecifier()), !this.eat(o.comma))) return e;
|
|
4973
4974
|
if (this.type === o.star) return e.push(this.parseImportNamespaceSpecifier()), e;
|
|
@@ -4977,7 +4978,7 @@ function On(e) {
|
|
|
4977
4978
|
e.push(this.parseImportSpecifier());
|
|
4978
4979
|
}
|
|
4979
4980
|
return e;
|
|
4980
|
-
},
|
|
4981
|
+
}, C.parseImport = function(e) {
|
|
4981
4982
|
var t = this.lookahead();
|
|
4982
4983
|
if (e.importKind = "value", this.importOrExportOuterKind = "value", v(t.type) || this.match(o.star) || this.match(o.braceL)) {
|
|
4983
4984
|
var n = this.lookahead(2);
|
|
@@ -4988,7 +4989,7 @@ function On(e) {
|
|
|
4988
4989
|
}
|
|
4989
4990
|
}
|
|
4990
4991
|
return this.next(), this.type === o.string ? (e.specifiers = [], e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === o.string ? this.parseExprAtom() : this.unexpected()), this.parseMaybeImportAttributes(e), this.semicolon(), this.finishNode(e, "ImportDeclaration"), this.importOrExportOuterKind = "value", e.importKind === "type" && e.specifiers.length > 1 && e.specifiers[0].type === "ImportDefaultSpecifier" && this.raise(e.start, U.TypeImportCannotSpecifyDefaultAndNamed), e;
|
|
4991
|
-
},
|
|
4992
|
+
}, C.parseExportDefaultDeclaration = function() {
|
|
4992
4993
|
if (this.isAbstractClass()) {
|
|
4993
4994
|
var t = this.startNode();
|
|
4994
4995
|
return this.next(), t.abstract = !0, this.parseClass(t, !0);
|
|
@@ -4998,15 +4999,15 @@ function On(e) {
|
|
|
4998
4999
|
if (n) return n;
|
|
4999
5000
|
}
|
|
5000
5001
|
return e.prototype.parseExportDefaultDeclaration.call(this);
|
|
5001
|
-
},
|
|
5002
|
+
}, C.parseExportAllDeclaration = function(e, t) {
|
|
5002
5003
|
return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (e.exported = this.parseModuleExportName(), this.checkExport(t, e.exported, this.lastTokStart)) : e.exported = null), this.expectContextual("from"), this.type !== o.string && this.unexpected(), e.source = this.parseExprAtom(), this.parseMaybeImportAttributes(e), this.semicolon(), this.finishNode(e, "ExportAllDeclaration");
|
|
5003
|
-
},
|
|
5004
|
+
}, C.parseDynamicImport = function(e) {
|
|
5004
5005
|
if (this.next(), e.source = this.parseMaybeAssign(), this.eat(o.comma) && (e.arguments = [this.parseExpression()]), !this.eat(o.parenR)) {
|
|
5005
5006
|
var t = this.start;
|
|
5006
5007
|
this.eat(o.comma) && this.eat(o.parenR) ? this.raiseRecoverable(t, "Trailing comma is not allowed in import()") : this.unexpected(t);
|
|
5007
5008
|
}
|
|
5008
5009
|
return this.finishNode(e, "ImportExpression");
|
|
5009
|
-
},
|
|
5010
|
+
}, C.parseExport = function(e, t) {
|
|
5010
5011
|
var n = this.lookahead();
|
|
5011
5012
|
if (this.ts_eatWithState(o._import, 2, n)) {
|
|
5012
5013
|
this.ts_isContextual(m.type) && this.lookaheadCharCode() !== 61 ? (e.importKind = "type", this.importOrExportOuterKind = "type", this.next()) : (e.importKind = "value", this.importOrExportOuterKind = "value");
|
|
@@ -5027,7 +5028,7 @@ function On(e) {
|
|
|
5027
5028
|
else {
|
|
5028
5029
|
if (e.declaration = null, e.specifiers = this.parseExportSpecifiers(t), this.eatContextual("from")) this.type !== o.string && this.unexpected(), e.source = this.parseExprAtom(), this.parseMaybeImportAttributes(e);
|
|
5029
5030
|
else {
|
|
5030
|
-
for (var s, c =
|
|
5031
|
+
for (var s, c = ln(e.specifiers); !(s = c()).done;) {
|
|
5031
5032
|
var l = s.value;
|
|
5032
5033
|
this.checkUnreserved(l.local), this.checkLocalExport(l.local), l.local.type === "Literal" && this.raise(l.local.start, "A string literal cannot be used as an exported binding without `from`.");
|
|
5033
5034
|
}
|
|
@@ -5036,20 +5037,20 @@ function On(e) {
|
|
|
5036
5037
|
this.semicolon();
|
|
5037
5038
|
}
|
|
5038
5039
|
return this.finishNode(e, "ExportNamedDeclaration");
|
|
5039
|
-
},
|
|
5040
|
+
}, C.checkExport = function(e, t, n) {
|
|
5040
5041
|
e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value), e[t] = !0);
|
|
5041
|
-
},
|
|
5042
|
+
}, C.parseMaybeDefault = function(t, n, r) {
|
|
5042
5043
|
var i = e.prototype.parseMaybeDefault.call(this, t, n, r);
|
|
5043
5044
|
return i.type === "AssignmentPattern" && i.typeAnnotation && i.right.start < i.typeAnnotation.start && this.raise(i.typeAnnotation.start, U.TypeAnnotationAfterAssign), i;
|
|
5044
|
-
},
|
|
5045
|
+
}, C.typeCastToParameter = function(e) {
|
|
5045
5046
|
return e.expression.typeAnnotation = e.typeAnnotation, this.resetEndLocation(e.expression, e.typeAnnotation.end), e.expression;
|
|
5046
|
-
},
|
|
5047
|
+
}, C.toAssignableList = function(t, n) {
|
|
5047
5048
|
for (var r = 0; r < t.length; r++) {
|
|
5048
5049
|
var i = t[r];
|
|
5049
5050
|
i?.type === "TSTypeCastExpression" && (t[r] = this.typeCastToParameter(i));
|
|
5050
5051
|
}
|
|
5051
5052
|
return e.prototype.toAssignableList.call(this, t, n);
|
|
5052
|
-
},
|
|
5053
|
+
}, C.reportReservedArrowTypeParam = function(e) {}, C.parseExprAtom = function(t, n, r) {
|
|
5053
5054
|
if (this.type === m.jsxText) return this.jsx_parseText();
|
|
5054
5055
|
if (this.type === m.jsxTagStart) return this.jsx_parseElement();
|
|
5055
5056
|
if (this.type === m.at) return this.parseDecorators(), this.parseExprAtom();
|
|
@@ -5063,7 +5064,7 @@ function On(e) {
|
|
|
5063
5064
|
return l;
|
|
5064
5065
|
}
|
|
5065
5066
|
return e.prototype.parseExprAtom.call(this, t, n, r);
|
|
5066
|
-
},
|
|
5067
|
+
}, C.parseExprAtomDefault = function() {
|
|
5067
5068
|
if (v(this.type)) {
|
|
5068
5069
|
var e = this.potentialArrowAt === this.start, t = this.containsEsc, n = this.parseIdent();
|
|
5069
5070
|
if (!t && n.name === "async" && !this.canInsertSemicolon()) {
|
|
@@ -5080,21 +5081,21 @@ function On(e) {
|
|
|
5080
5081
|
return e && this.match(o.arrow) && !this.canInsertSemicolon() ? (this.next(), this.parseArrowExpression(this.startNodeAtNode(n), [n], !1)) : n;
|
|
5081
5082
|
}
|
|
5082
5083
|
this.unexpected();
|
|
5083
|
-
},
|
|
5084
|
+
}, C.parseIdentNode = function() {
|
|
5084
5085
|
var t = this.startNode();
|
|
5085
|
-
return
|
|
5086
|
-
},
|
|
5086
|
+
return ne(this.type) ? (t.name = this.value, t) : e.prototype.parseIdentNode.call(this);
|
|
5087
|
+
}, C.parseVarStatement = function(t, n, r) {
|
|
5087
5088
|
r === void 0 && (r = !1);
|
|
5088
5089
|
var i = this.isAmbientContext;
|
|
5089
5090
|
this.next(), e.prototype.parseVar.call(this, t, !1, n, r || i), this.semicolon();
|
|
5090
5091
|
var a = this.finishNode(t, "VariableDeclaration");
|
|
5091
5092
|
if (!i) return a;
|
|
5092
|
-
for (var o, s =
|
|
5093
|
+
for (var o, s = ln(a.declarations); !(o = s()).done;) {
|
|
5093
5094
|
var c = o.value, l = c.init;
|
|
5094
|
-
l && (n !== "const" || c.id.typeAnnotation ? this.raise(l.start, U.InitializerNotAllowedInAmbientContext) : l.type !== "StringLiteral" && l.type !== "BooleanLiteral" && l.type !== "NumericLiteral" && l.type !== "BigIntLiteral" && (l.type !== "TemplateLiteral" || l.expressions.length > 0) && !
|
|
5095
|
+
l && (n !== "const" || c.id.typeAnnotation ? this.raise(l.start, U.InitializerNotAllowedInAmbientContext) : l.type !== "StringLiteral" && l.type !== "BooleanLiteral" && l.type !== "NumericLiteral" && l.type !== "BigIntLiteral" && (l.type !== "TemplateLiteral" || l.expressions.length > 0) && !En(l) && this.raise(l.start, U.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference));
|
|
5095
5096
|
}
|
|
5096
5097
|
return a;
|
|
5097
|
-
},
|
|
5098
|
+
}, C.parseStatement = function(t, n, r) {
|
|
5098
5099
|
if (this.match(m.at) && this.parseDecorators(!0), this.match(o._const) && this.isLookaheadContextual("enum")) {
|
|
5099
5100
|
var i = this.startNode();
|
|
5100
5101
|
return this.expect(o._const), this.tsParseEnumDeclaration(i, { const: !0 });
|
|
@@ -5105,25 +5106,25 @@ function On(e) {
|
|
|
5105
5106
|
if (a) return a;
|
|
5106
5107
|
}
|
|
5107
5108
|
return e.prototype.parseStatement.call(this, t, n, r);
|
|
5108
|
-
},
|
|
5109
|
+
}, C.parseAccessModifier = function() {
|
|
5109
5110
|
return this.tsParseModifier([
|
|
5110
5111
|
"public",
|
|
5111
5112
|
"protected",
|
|
5112
5113
|
"private"
|
|
5113
5114
|
]);
|
|
5114
|
-
},
|
|
5115
|
+
}, C.parsePostMemberNameModifiers = function(e) {
|
|
5115
5116
|
this.eat(o.question) && (e.optional = !0), e.readonly && this.match(o.parenL) && this.raise(e.start, U.ClassMethodHasReadonly), e.declare && this.match(o.parenL) && this.raise(e.start, U.ClassMethodHasDeclare);
|
|
5116
|
-
},
|
|
5117
|
+
}, C.parseExpressionStatement = function(t, n) {
|
|
5117
5118
|
return (n.type === "Identifier" ? this.tsParseExpressionStatement(t, n) : void 0) || e.prototype.parseExpressionStatement.call(this, t, n);
|
|
5118
|
-
},
|
|
5119
|
+
}, C.shouldParseExportStatement = function() {
|
|
5119
5120
|
return !!this.tsIsDeclarationStart() || !!this.match(m.at) || e.prototype.shouldParseExportStatement.call(this);
|
|
5120
|
-
},
|
|
5121
|
+
}, C.parseConditional = function(e, t, n, r, i) {
|
|
5121
5122
|
if (this.eat(o.question)) {
|
|
5122
5123
|
var a = this.startNodeAt(t, n);
|
|
5123
5124
|
return a.test = e, a.consequent = this.parseMaybeAssign(), this.expect(o.colon), a.alternate = this.parseMaybeAssign(r), this.finishNode(a, "ConditionalExpression");
|
|
5124
5125
|
}
|
|
5125
5126
|
return e;
|
|
5126
|
-
},
|
|
5127
|
+
}, C.parseMaybeConditional = function(e, t) {
|
|
5127
5128
|
var n = this, r = this.start, i = this.startLoc, a = this.parseExprOps(e, t);
|
|
5128
5129
|
if (this.checkExpressionErrors(t)) return a;
|
|
5129
5130
|
if (!this.maybeInArrowParameters || !this.match(o.question)) return this.parseConditional(a, r, i, e, t);
|
|
@@ -5131,14 +5132,14 @@ function On(e) {
|
|
|
5131
5132
|
return n.parseConditional(a, r, i, e, t);
|
|
5132
5133
|
});
|
|
5133
5134
|
return s.node ? (s.error && this.setLookaheadState(s.failState), s.node) : (s.error && this.setOptionalParametersError(t, s.error), a);
|
|
5134
|
-
},
|
|
5135
|
+
}, C.parseParenItem = function(t) {
|
|
5135
5136
|
var n = this.start, r = this.startLoc;
|
|
5136
5137
|
if (t = e.prototype.parseParenItem.call(this, t), this.eat(o.question) && (t.optional = !0, this.resetEndLocation(t)), this.match(o.colon)) {
|
|
5137
5138
|
var i = this.startNodeAt(n, r);
|
|
5138
5139
|
return i.expression = t, i.typeAnnotation = this.tsParseTypeAnnotation(), this.finishNode(i, "TSTypeCastExpression");
|
|
5139
5140
|
}
|
|
5140
5141
|
return t;
|
|
5141
|
-
},
|
|
5142
|
+
}, C.parseExportDeclaration = function(e) {
|
|
5142
5143
|
var t = this;
|
|
5143
5144
|
if (!this.isAmbientContext && this.ts_isContextual(m.declare)) return this.tsInAmbientContext(function() {
|
|
5144
5145
|
return t.parseExportDeclaration(e);
|
|
@@ -5147,35 +5148,35 @@ function On(e) {
|
|
|
5147
5148
|
!i || !this.ts_isContextual(m.declare) && this.shouldParseExportStatement() || this.raise(this.start, U.ExpectedAmbientAfterExportDeclare);
|
|
5148
5149
|
var a = v(this.type) && this.tsTryParseExportDeclaration() || this.parseStatement(null);
|
|
5149
5150
|
return a ? ((a.type === "TSInterfaceDeclaration" || a.type === "TSTypeAliasDeclaration" || i) && (e.exportKind = "type"), i && (this.resetStartLocation(a, n, r), a.declare = !0), a) : null;
|
|
5150
|
-
},
|
|
5151
|
+
}, C.parseClassId = function(t, n) {
|
|
5151
5152
|
if (n || !this.isContextual("implements")) {
|
|
5152
5153
|
e.prototype.parseClassId.call(this, t, n);
|
|
5153
5154
|
var r = this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this));
|
|
5154
5155
|
r && (t.typeParameters = r);
|
|
5155
5156
|
}
|
|
5156
|
-
},
|
|
5157
|
+
}, C.parseClassPropertyAnnotation = function(e) {
|
|
5157
5158
|
e.optional || (this.value === "!" && this.eat(o.prefix) ? e.definite = !0 : this.eat(o.question) && (e.optional = !0));
|
|
5158
5159
|
var t = this.tsTryParseTypeAnnotation();
|
|
5159
5160
|
t && (e.typeAnnotation = t);
|
|
5160
|
-
},
|
|
5161
|
+
}, C.parseClassField = function(t) {
|
|
5161
5162
|
if (t.key.type === "PrivateIdentifier") t.abstract && this.raise(t.start, U.PrivateElementHasAbstract), t.accessibility && this.raise(t.start, U.PrivateElementHasAccessibility({ modifier: t.accessibility })), this.parseClassPropertyAnnotation(t);
|
|
5162
5163
|
else if (this.parseClassPropertyAnnotation(t), this.isAmbientContext && (!t.readonly || t.typeAnnotation) && this.match(o.eq) && this.raise(this.start, U.DeclareClassFieldHasInitializer), t.abstract && this.match(o.eq)) {
|
|
5163
5164
|
var n = t.key;
|
|
5164
5165
|
this.raise(this.start, U.AbstractPropertyHasInitializer({ propertyName: n.type !== "Identifier" || t.computed ? "[" + this.input.slice(n.start, n.end) + "]" : n.name }));
|
|
5165
5166
|
}
|
|
5166
5167
|
return e.prototype.parseClassField.call(this, t);
|
|
5167
|
-
},
|
|
5168
|
+
}, C.parseClassMethod = function(e, t, n, r) {
|
|
5168
5169
|
var i = e.kind === "constructor", a = e.key.type === "PrivateIdentifier", o = this.tsTryParseTypeParameters();
|
|
5169
5170
|
a ? (o && (e.typeParameters = o), e.accessibility && this.raise(e.start, U.PrivateMethodsHasAccessibility({ modifier: e.accessibility }))) : o && i && this.raise(o.start, U.ConstructorHasTypeParameters);
|
|
5170
5171
|
var s = e.declare, c = e.kind;
|
|
5171
5172
|
!(s !== void 0 && s) || c !== "get" && c !== "set" || this.raise(e.start, U.DeclareAccessor({ kind: c })), o && (e.typeParameters = o);
|
|
5172
5173
|
var l = e.key;
|
|
5173
|
-
e.kind === "constructor" ? (t && this.raise(l.start, "Constructor can't be a generator"), n && this.raise(l.start, "Constructor can't be an async method")) : e.static &&
|
|
5174
|
+
e.kind === "constructor" ? (t && this.raise(l.start, "Constructor can't be a generator"), n && this.raise(l.start, "Constructor can't be an async method")) : e.static && gn(e, "prototype") && this.raise(l.start, "Classes may not have a static property named prototype");
|
|
5174
5175
|
var u = e.value = this.parseMethod(t, n, r, !0, e);
|
|
5175
5176
|
return e.kind === "get" && u.params.length !== 0 && this.raiseRecoverable(u.start, "getter should have no params"), e.kind === "set" && u.params.length !== 1 && this.raiseRecoverable(u.start, "setter should have exactly one param"), e.kind === "set" && u.params[0].type === "RestElement" && this.raiseRecoverable(u.params[0].start, "Setter cannot use rest params"), this.finishNode(e, "MethodDefinition");
|
|
5176
|
-
},
|
|
5177
|
+
}, C.isClassMethod = function() {
|
|
5177
5178
|
return this.match(o.relational);
|
|
5178
|
-
},
|
|
5179
|
+
}, C.parseClassElement = function(t) {
|
|
5179
5180
|
var n = this;
|
|
5180
5181
|
if (this.eat(o.semi)) return null;
|
|
5181
5182
|
var r, i = this.options.ecmaVersion, a = this.startNode(), s = "", c = !1, l = !1, u = "method", d = [
|
|
@@ -5205,7 +5206,7 @@ function On(e) {
|
|
|
5205
5206
|
(n.eatContextual("get") || n.eatContextual("set")) && (n.isClassElementNameStart() ? u = p : s = p);
|
|
5206
5207
|
}
|
|
5207
5208
|
if (s ? (a.computed = !1, a.key = n.startNodeAt(n.lastTokStart, n.lastTokStartLoc), a.key.name = s, n.finishNode(a.key, "Identifier")) : n.parseClassElementName(a), n.parsePostMemberNameModifiers(a), n.isClassMethod() || i < 13 || n.type === o.parenL || u !== "method" || c || l) {
|
|
5208
|
-
var m = !a.static &&
|
|
5209
|
+
var m = !a.static && gn(a, "constructor"), h = m && t;
|
|
5209
5210
|
m && u !== "method" && n.raise(a.key.start, "Constructor can't have get/set modifier"), a.kind = m ? "constructor" : u, n.parseClassMethod(a, c, l, h);
|
|
5210
5211
|
} else n.parseClassField(a);
|
|
5211
5212
|
return a;
|
|
@@ -5213,30 +5214,30 @@ function On(e) {
|
|
|
5213
5214
|
if (n.next(), n.next(), n.tsHasSomeModifiers(a, d) && n.raise(n.start, U.StaticBlockCannotHaveModifier), i >= 13) return e.prototype.parseClassStaticBlock.call(n, a), a;
|
|
5214
5215
|
};
|
|
5215
5216
|
return a.declare ? this.tsInAmbientContext(f) : f(), a;
|
|
5216
|
-
},
|
|
5217
|
+
}, C.isClassElementNameStart = function() {
|
|
5217
5218
|
return !!this.tsIsIdentifier() || e.prototype.isClassElementNameStart.call(this);
|
|
5218
|
-
},
|
|
5219
|
+
}, C.parseClassSuper = function(t) {
|
|
5219
5220
|
e.prototype.parseClassSuper.call(this, t), t.superClass && (this.tsMatchLeftRelational() || this.match(o.bitShift)) && (t.superTypeParameters = this.tsParseTypeArgumentsInExpression()), this.eatContextual("implements") && (t.implements = this.tsParseHeritageClause("implements"));
|
|
5220
|
-
},
|
|
5221
|
+
}, C.parseFunctionParams = function(t) {
|
|
5221
5222
|
var n = this.tsTryParseTypeParameters();
|
|
5222
5223
|
n && (t.typeParameters = n), e.prototype.parseFunctionParams.call(this, t);
|
|
5223
|
-
},
|
|
5224
|
+
}, C.parseVarId = function(t, n) {
|
|
5224
5225
|
e.prototype.parseVarId.call(this, t, n), t.id.type === "Identifier" && !this.hasPrecedingLineBreak() && this.value === "!" && this.eat(o.prefix) && (t.definite = !0);
|
|
5225
5226
|
var r = this.tsTryParseTypeAnnotation();
|
|
5226
5227
|
r && (t.id.typeAnnotation = r, this.resetEndLocation(t.id));
|
|
5227
|
-
},
|
|
5228
|
+
}, C.parseArrowExpression = function(e, t, n, r) {
|
|
5228
5229
|
this.match(o.colon) && (e.returnType = this.tsParseTypeAnnotation());
|
|
5229
5230
|
var i = this.yieldPos, a = this.awaitPos, s = this.awaitIdentPos;
|
|
5230
|
-
this.enterScope(16 |
|
|
5231
|
+
this.enterScope(16 | Tn(n, !1)), this.initFunction(e);
|
|
5231
5232
|
var c = this.maybeInArrowParameters;
|
|
5232
5233
|
return this.options.ecmaVersion >= 8 && (e.async = !!n), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.maybeInArrowParameters = !0, e.params = this.toAssignableList(t, !0), this.maybeInArrowParameters = !1, this.parseFunctionBody(e, !0, !1, r), this.yieldPos = i, this.awaitPos = a, this.awaitIdentPos = s, this.maybeInArrowParameters = c, this.finishNode(e, "ArrowFunctionExpression");
|
|
5233
|
-
},
|
|
5234
|
+
}, C.parseMaybeAssignOrigin = function(e, t, n) {
|
|
5234
5235
|
if (this.isContextual("yield")) {
|
|
5235
5236
|
if (this.inGenerator) return this.parseYield(e);
|
|
5236
5237
|
this.exprAllowed = !1;
|
|
5237
5238
|
}
|
|
5238
5239
|
var r = !1, i = -1, a = -1, s = -1;
|
|
5239
|
-
t ? (i = t.parenthesizedAssign, a = t.trailingComma, s = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new
|
|
5240
|
+
t ? (i = t.parenthesizedAssign, a = t.trailingComma, s = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new mn(), r = !0);
|
|
5240
5241
|
var c = this.start, l = this.startLoc;
|
|
5241
5242
|
(this.type === o.parenL || v(this.type)) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await");
|
|
5242
5243
|
var u = this.parseMaybeConditional(e, t);
|
|
@@ -5245,7 +5246,7 @@ function On(e) {
|
|
|
5245
5246
|
return d.operator = this.value, this.type === o.eq && (u = this.toAssignable(u, !0, t)), r || (t.parenthesizedAssign = t.trailingComma = t.doubleProto = -1), t.shorthandAssign >= u.start && (t.shorthandAssign = -1), this.type === o.eq ? this.checkLValPattern(u) : this.checkLValSimple(u), d.left = u, this.next(), d.right = this.parseMaybeAssign(e), s > -1 && (t.doubleProto = s), this.finishNode(d, "AssignmentExpression");
|
|
5246
5247
|
}
|
|
5247
5248
|
return r && this.checkExpressionErrors(t, !0), i > -1 && (t.parenthesizedAssign = i), a > -1 && (t.trailingComma = a), u;
|
|
5248
|
-
},
|
|
5249
|
+
}, C.parseMaybeAssign = function(e, t, n) {
|
|
5249
5250
|
var r, a, o, s, c, l, u, d, f, p = this;
|
|
5250
5251
|
if (this.matchJsx("jsxTagStart") || this.tsMatchLeftRelational()) {
|
|
5251
5252
|
if (l = this.cloneCurLookaheadState(), !(u = this.tryParse(function() {
|
|
@@ -5263,14 +5264,14 @@ function On(e) {
|
|
|
5263
5264
|
return (a.type !== "ArrowFunctionExpression" || (i = a.extra) != null && i.parenthesized) && r(), f?.params.length !== 0 && p.resetStartLocationFromNode(a, f), a.typeParameters = f, a;
|
|
5264
5265
|
}, l);
|
|
5265
5266
|
if (!g.error && !g.aborted) return f && this.reportReservedArrowTypeParam(f), g.node;
|
|
5266
|
-
if (!u && (
|
|
5267
|
+
if (!u && (Sn(!0), !(d = this.tryParse(function() {
|
|
5267
5268
|
return p.parseMaybeAssignOrigin(e, t, n);
|
|
5268
5269
|
}, l)).error)) return d.node;
|
|
5269
5270
|
if ((a = u) != null && a.node) return this.setLookaheadState(u.failState), u.node;
|
|
5270
5271
|
if (g.node) return this.setLookaheadState(g.failState), f && this.reportReservedArrowTypeParam(f), g.node;
|
|
5271
5272
|
if ((o = d) != null && o.node) return this.setLookaheadState(d.failState), d.node;
|
|
5272
5273
|
throw (s = u) != null && s.thrown ? u.error : g.thrown ? g.error : (c = d) != null && c.thrown ? d.error : u?.error || g.error || d?.error;
|
|
5273
|
-
},
|
|
5274
|
+
}, C.parseAssignableListItem = function(e) {
|
|
5274
5275
|
for (var t = []; this.match(m.at);) t.push(this.parseDecorator());
|
|
5275
5276
|
var n, r = this.start, i = this.startLoc, a = !1, o = !1;
|
|
5276
5277
|
if (e !== void 0) {
|
|
@@ -5294,13 +5295,13 @@ function On(e) {
|
|
|
5294
5295
|
return n && (u.accessibility = n), a && (u.readonly = a), o && (u.override = o), l.type !== "Identifier" && l.type !== "AssignmentPattern" && this.raise(u.start, U.UnsupportedParameterPropertyKind), u.parameter = l, this.finishNode(u, "TSParameterProperty");
|
|
5295
5296
|
}
|
|
5296
5297
|
return l;
|
|
5297
|
-
},
|
|
5298
|
+
}, C.checkLValInnerPattern = function(t, n, r) {
|
|
5298
5299
|
n === void 0 && (n = 0), t.type === "TSParameterProperty" ? this.checkLValInnerPattern(t.parameter, n, r) : e.prototype.checkLValInnerPattern.call(this, t, n, r);
|
|
5299
|
-
},
|
|
5300
|
+
}, C.parseBindingListItem = function(e) {
|
|
5300
5301
|
this.eat(o.question) && (e.type === "Identifier" || this.isAmbientContext || this.inType || this.raise(e.start, U.PatternIsOptional), e.optional = !0);
|
|
5301
5302
|
var t = this.tsTryParseTypeAnnotation();
|
|
5302
5303
|
return t && (e.typeAnnotation = t), this.resetEndLocation(e), e;
|
|
5303
|
-
},
|
|
5304
|
+
}, C.isAssignable = function(e, t) {
|
|
5304
5305
|
var n = this;
|
|
5305
5306
|
switch (e.type) {
|
|
5306
5307
|
case "TSTypeCastExpression": return this.isAssignable(e.expression, t);
|
|
@@ -5327,8 +5328,8 @@ function On(e) {
|
|
|
5327
5328
|
case "OptionalMemberExpression": return !t;
|
|
5328
5329
|
default: return !1;
|
|
5329
5330
|
}
|
|
5330
|
-
},
|
|
5331
|
-
switch (n === void 0 && (n = !1), r === void 0 && (r = new
|
|
5331
|
+
}, C.toAssignable = function(t, n, r) {
|
|
5332
|
+
switch (n === void 0 && (n = !1), r === void 0 && (r = new mn()), t.type) {
|
|
5332
5333
|
case "ParenthesizedExpression": return this.toAssignableParenthesizedExpression(t, n, r);
|
|
5333
5334
|
case "TSAsExpression":
|
|
5334
5335
|
case "TSSatisfiesExpression":
|
|
@@ -5340,7 +5341,7 @@ function On(e) {
|
|
|
5340
5341
|
default: return e.prototype.toAssignable.call(this, t, n, r);
|
|
5341
5342
|
}
|
|
5342
5343
|
return t;
|
|
5343
|
-
},
|
|
5344
|
+
}, C.toAssignableParenthesizedExpression = function(t, n, r) {
|
|
5344
5345
|
switch (t.expression.type) {
|
|
5345
5346
|
case "TSAsExpression":
|
|
5346
5347
|
case "TSSatisfiesExpression":
|
|
@@ -5349,7 +5350,7 @@ function On(e) {
|
|
|
5349
5350
|
case "ParenthesizedExpression": return this.toAssignable(t.expression, n, r);
|
|
5350
5351
|
default: return e.prototype.toAssignable.call(this, t, n, r);
|
|
5351
5352
|
}
|
|
5352
|
-
},
|
|
5353
|
+
}, C.curPosition = function() {
|
|
5353
5354
|
if (this.options.locations) {
|
|
5354
5355
|
var t = e.prototype.curPosition.call(this);
|
|
5355
5356
|
return Object.defineProperty(t, "offset", { get: function() {
|
|
@@ -5359,9 +5360,9 @@ function On(e) {
|
|
|
5359
5360
|
};
|
|
5360
5361
|
} }), t.index = this.pos, t;
|
|
5361
5362
|
}
|
|
5362
|
-
},
|
|
5363
|
+
}, C.parseBindingAtom = function() {
|
|
5363
5364
|
return this.type === o._this ? this.parseIdent(!0) : e.prototype.parseBindingAtom.call(this);
|
|
5364
|
-
},
|
|
5365
|
+
}, C.shouldParseArrow = function(e) {
|
|
5365
5366
|
var t, n = this;
|
|
5366
5367
|
if (t = this.match(o.colon) ? e.every(function(e) {
|
|
5367
5368
|
return n.isAssignable(e, !0);
|
|
@@ -5377,15 +5378,15 @@ function On(e) {
|
|
|
5377
5378
|
return !!this.match(o.arrow) || (this.shouldParseArrowReturnType = void 0, !1);
|
|
5378
5379
|
}
|
|
5379
5380
|
return this.shouldParseArrowReturnType = void 0, t;
|
|
5380
|
-
},
|
|
5381
|
+
}, C.parseParenArrowList = function(e, t, n, r) {
|
|
5381
5382
|
var i = this.startNodeAt(e, t);
|
|
5382
5383
|
return i.returnType = this.shouldParseArrowReturnType, this.shouldParseArrowReturnType = void 0, this.parseArrowExpression(i, n, !1, r);
|
|
5383
|
-
},
|
|
5384
|
+
}, C.parseParenAndDistinguishExpression = function(e, t) {
|
|
5384
5385
|
var n, r = this.start, i = this.startLoc, a = this.options.ecmaVersion >= 8;
|
|
5385
5386
|
if (this.options.ecmaVersion >= 6) {
|
|
5386
5387
|
var s = this.maybeInArrowParameters;
|
|
5387
5388
|
this.maybeInArrowParameters = !0, this.next();
|
|
5388
|
-
var c, l = this.start, u = this.startLoc, d = [], f = !0, p = !1, m = new
|
|
5389
|
+
var c, l = this.start, u = this.startLoc, d = [], f = !0, p = !1, m = new mn(), h = this.yieldPos, g = this.awaitPos;
|
|
5389
5390
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== o.parenR;) {
|
|
5390
5391
|
if (f ? f = !1 : this.expect(o.comma), a && this.afterTrailingComma(o.parenR, !0)) {
|
|
5391
5392
|
p = !0;
|
|
@@ -5406,10 +5407,10 @@ function On(e) {
|
|
|
5406
5407
|
return te.expression = n, this.finishNode(te, "ParenthesizedExpression");
|
|
5407
5408
|
}
|
|
5408
5409
|
return n;
|
|
5409
|
-
},
|
|
5410
|
+
}, C.parseTaggedTemplateExpression = function(e, t, n, r) {
|
|
5410
5411
|
var i = this.startNodeAt(t, n);
|
|
5411
5412
|
return i.tag = e, i.quasi = this.parseTemplate({ isTagged: !0 }), r && this.raise(t, "Tagged Template Literals are not allowed in optionalChain."), this.finishNode(i, "TaggedTemplateExpression");
|
|
5412
|
-
},
|
|
5413
|
+
}, C.shouldParseAsyncArrow = function() {
|
|
5413
5414
|
var e = this;
|
|
5414
5415
|
if (!this.match(o.colon)) return !this.canInsertSemicolon() && this.eat(o.arrow);
|
|
5415
5416
|
var t = this.tryParse(function(t) {
|
|
@@ -5417,10 +5418,10 @@ function On(e) {
|
|
|
5417
5418
|
return !e.canInsertSemicolon() && e.match(o.arrow) || t(), n;
|
|
5418
5419
|
});
|
|
5419
5420
|
return t.aborted ? (this.shouldParseAsyncArrowReturnType = void 0, !1) : t.thrown ? void 0 : (t.error && this.setLookaheadState(t.failState), this.shouldParseAsyncArrowReturnType = t.node, !this.canInsertSemicolon() && this.eat(o.arrow));
|
|
5420
|
-
},
|
|
5421
|
+
}, C.parseSubscriptAsyncArrow = function(e, t, n, r) {
|
|
5421
5422
|
var i = this.startNodeAt(e, t);
|
|
5422
5423
|
return i.returnType = this.shouldParseAsyncArrowReturnType, this.shouldParseAsyncArrowReturnType = void 0, this.parseArrowExpression(i, n, !0, r);
|
|
5423
|
-
},
|
|
5424
|
+
}, C.parseExprList = function(e, t, n, r) {
|
|
5424
5425
|
for (var i = [], a = !0; !this.eat(e);) {
|
|
5425
5426
|
if (a) a = !1;
|
|
5426
5427
|
else if (this.expect(o.comma), t && this.afterTrailingComma(e)) break;
|
|
@@ -5428,7 +5429,7 @@ function On(e) {
|
|
|
5428
5429
|
n && this.type === o.comma ? s = null : this.type === o.ellipsis ? (s = this.parseSpread(r), r && this.type === o.comma && r.trailingComma < 0 && (r.trailingComma = this.start)) : s = this.parseMaybeAssign(!1, r, this.parseParenItem), i.push(s);
|
|
5429
5430
|
}
|
|
5430
5431
|
return i;
|
|
5431
|
-
},
|
|
5432
|
+
}, C.parseSubscript = function(e, t, n, r, i, a, s) {
|
|
5432
5433
|
var c = this, l = a;
|
|
5433
5434
|
if (!this.hasPrecedingLineBreak() && this.value === "!" && this.match(o.prefix)) {
|
|
5434
5435
|
this.exprAllowed = !1, this.next();
|
|
@@ -5454,7 +5455,7 @@ function On(e) {
|
|
|
5454
5455
|
return u.typeParameters = a, u;
|
|
5455
5456
|
}
|
|
5456
5457
|
if (!r && c.eat(o.parenL)) {
|
|
5457
|
-
var p = new
|
|
5458
|
+
var p = new mn(), m = c.startNodeAt(t, n);
|
|
5458
5459
|
return m.callee = e, m.arguments = c.parseExprList(o.parenR, c.options.ecmaVersion >= 8, !1, p), c.tsCheckForInvalidTypeCasts(m.arguments), m.typeParameters = a, l && (m.optional = d), c.checkExpressionErrors(p, !0), e = c.finishNode(m, "CallExpression");
|
|
5459
5460
|
}
|
|
5460
5461
|
var h = c.type;
|
|
@@ -5474,27 +5475,27 @@ function On(e) {
|
|
|
5474
5475
|
} else if (!r && this.eat(o.parenL)) {
|
|
5475
5476
|
var te = this.maybeInArrowParameters;
|
|
5476
5477
|
this.maybeInArrowParameters = !0;
|
|
5477
|
-
var v = new
|
|
5478
|
+
var v = new mn(), ne = this.yieldPos, y = this.awaitPos, b = this.awaitIdentPos;
|
|
5478
5479
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
5479
|
-
var
|
|
5480
|
-
if (i && !h && this.shouldParseAsyncArrow()) this.checkPatternErrors(v, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos =
|
|
5480
|
+
var x = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1, v);
|
|
5481
|
+
if (i && !h && this.shouldParseAsyncArrow()) this.checkPatternErrors(v, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = ne, this.awaitPos = y, this.awaitIdentPos = b, e = this.parseSubscriptAsyncArrow(t, n, x, s);
|
|
5481
5482
|
else {
|
|
5482
|
-
this.checkExpressionErrors(v, !0), this.yieldPos =
|
|
5483
|
-
var
|
|
5484
|
-
|
|
5483
|
+
this.checkExpressionErrors(v, !0), this.yieldPos = ne || this.yieldPos, this.awaitPos = y || this.awaitPos, this.awaitIdentPos = b || this.awaitIdentPos;
|
|
5484
|
+
var S = this.startNodeAt(t, n);
|
|
5485
|
+
S.callee = e, S.arguments = x, m && (S.optional = h), e = this.finishNode(S, "CallExpression");
|
|
5485
5486
|
}
|
|
5486
5487
|
this.maybeInArrowParameters = te;
|
|
5487
5488
|
} else if (this.type === o.backQuote) {
|
|
5488
5489
|
(h || l) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
5489
|
-
var
|
|
5490
|
-
|
|
5490
|
+
var C = this.startNodeAt(t, n);
|
|
5491
|
+
C.tag = e, C.quasi = this.parseTemplate({ isTagged: !0 }), e = this.finishNode(C, "TaggedTemplateExpression");
|
|
5491
5492
|
}
|
|
5492
5493
|
return e;
|
|
5493
|
-
},
|
|
5494
|
+
}, C.parseGetterSetter = function(e) {
|
|
5494
5495
|
e.kind = e.key.name, this.parsePropertyName(e), e.value = this.parseMethod(!1);
|
|
5495
5496
|
var t = e.kind === "get" ? 0 : 1, n = e.value.params[0], r = n && this.isThisParam(n);
|
|
5496
5497
|
e.value.params.length === (t = r ? t + 1 : t) ? e.kind === "set" && e.value.params[0].type === "RestElement" && this.raiseRecoverable(e.value.params[0].start, "Setter cannot use rest params") : this.raiseRecoverable(e.value.start, e.kind === "get" ? "getter should have no params" : "setter should have exactly one param");
|
|
5497
|
-
},
|
|
5498
|
+
}, C.parseProperty = function(t, n) {
|
|
5498
5499
|
if (!t) {
|
|
5499
5500
|
var r = [];
|
|
5500
5501
|
if (this.match(m.at)) for (; this.match(m.at);) r.push(this.parseDecorator());
|
|
@@ -5502,12 +5503,12 @@ function On(e) {
|
|
|
5502
5503
|
return i.type === "SpreadElement" && r.length && this.raise(i.start, "Decorators can't be used with SpreadElement"), r.length && (i.decorators = r, r = []), i;
|
|
5503
5504
|
}
|
|
5504
5505
|
return e.prototype.parseProperty.call(this, t, n);
|
|
5505
|
-
},
|
|
5506
|
+
}, C.parseCatchClauseParam = function() {
|
|
5506
5507
|
var e = this.parseBindingAtom(), t = e.type === "Identifier";
|
|
5507
5508
|
this.enterScope(t ? 32 : 0), this.checkLValPattern(e, t ? 4 : 2);
|
|
5508
5509
|
var n = this.tsTryParseTypeAnnotation();
|
|
5509
5510
|
return n && (e.typeAnnotation = n, this.resetEndLocation(e)), this.expect(o.parenR), e;
|
|
5510
|
-
},
|
|
5511
|
+
}, C.parseClass = function(e, t) {
|
|
5511
5512
|
var n = this.inAbstractClass;
|
|
5512
5513
|
this.inAbstractClass = !!e.abstract;
|
|
5513
5514
|
try {
|
|
@@ -5520,18 +5521,18 @@ function On(e) {
|
|
|
5520
5521
|
for (this.expect(o.braceL); this.type !== o.braceR;) if (this.match(m.at)) c.push(this.parseDecorator());
|
|
5521
5522
|
else {
|
|
5522
5523
|
var l = this.parseClassElement(e.superClass !== null);
|
|
5523
|
-
c.length && (l.decorators = c, this.resetStartLocationFromNode(l, c[0]), c = []), l && (a.body.push(l), l.type === "MethodDefinition" && l.kind === "constructor" && l.value.type === "FunctionExpression" ? (s && this.raiseRecoverable(l.start, "Duplicate constructor in the same class"), s = !0, l.decorators && l.decorators.length > 0 && this.raise(l.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")) : l.key && l.key.type === "PrivateIdentifier" &&
|
|
5524
|
+
c.length && (l.decorators = c, this.resetStartLocationFromNode(l, c[0]), c = []), l && (a.body.push(l), l.type === "MethodDefinition" && l.kind === "constructor" && l.value.type === "FunctionExpression" ? (s && this.raiseRecoverable(l.start, "Duplicate constructor in the same class"), s = !0, l.decorators && l.decorators.length > 0 && this.raise(l.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")) : l.key && l.key.type === "PrivateIdentifier" && hn(i, l) && this.raiseRecoverable(l.key.start, "Identifier '#" + l.key.name + "' has already been declared"));
|
|
5524
5525
|
}
|
|
5525
5526
|
return this.strict = r, this.next(), c.length && this.raise(this.start, "Decorators must be attached to a class element."), e.body = this.finishNode(a, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression");
|
|
5526
5527
|
} finally {
|
|
5527
5528
|
this.inAbstractClass = n;
|
|
5528
5529
|
}
|
|
5529
|
-
},
|
|
5530
|
+
}, C.parseClassFunctionParams = function() {
|
|
5530
5531
|
var e = this.tsTryParseTypeParameters(this.tsParseConstModifier), t = this.parseBindingList(o.parenR, !1, this.options.ecmaVersion >= 8, !0);
|
|
5531
5532
|
return e && (t.typeParameters = e), t;
|
|
5532
|
-
},
|
|
5533
|
+
}, C.parseMethod = function(e, t, n, r, i) {
|
|
5533
5534
|
var a = this.startNode(), s = this.yieldPos, c = this.awaitPos, l = this.awaitIdentPos;
|
|
5534
|
-
if (this.initFunction(a), this.options.ecmaVersion >= 6 && (a.generator = e), this.options.ecmaVersion >= 8 && (a.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 |
|
|
5535
|
+
if (this.initFunction(a), this.options.ecmaVersion >= 6 && (a.generator = e), this.options.ecmaVersion >= 8 && (a.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 | Tn(t, a.generator) | (n ? 128 : 0)), this.expect(o.parenL), a.params = this.parseClassFunctionParams(), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(a, !1, !0, !1, { isClassMethod: r }), this.yieldPos = s, this.awaitPos = c, this.awaitIdentPos = l, i && i.abstract && a.body) {
|
|
5535
5536
|
var u = i.key;
|
|
5536
5537
|
this.raise(i.start, U.AbstractMethodHasImplementation({ methodName: u.type !== "Identifier" || i.computed ? "[" + this.input.slice(u.start, u.end) + "]" : u.name }));
|
|
5537
5538
|
}
|
|
@@ -5546,14 +5547,14 @@ function On(e) {
|
|
|
5546
5547
|
n.locations = !0;
|
|
5547
5548
|
var i = new this(n, e, t);
|
|
5548
5549
|
return r && (i.isAmbientContext = !0), i.nextToken(), i.parseExpression();
|
|
5549
|
-
},
|
|
5550
|
+
}, C.parseImportSpecifier = function() {
|
|
5550
5551
|
if (this.ts_isContextual(m.type)) {
|
|
5551
5552
|
var t = this.startNode();
|
|
5552
5553
|
return t.imported = this.parseModuleExportName(), this.parseTypeOnlyImportExportSpecifier(t, !0, this.importOrExportOuterKind === "type"), this.finishNode(t, "ImportSpecifier");
|
|
5553
5554
|
}
|
|
5554
5555
|
var n = e.prototype.parseImportSpecifier.call(this);
|
|
5555
5556
|
return n.importKind = "value", n;
|
|
5556
|
-
},
|
|
5557
|
+
}, C.parseExportSpecifier = function(t) {
|
|
5557
5558
|
var n = this.ts_isContextual(m.type);
|
|
5558
5559
|
if (!this.match(o.string) && n) {
|
|
5559
5560
|
var r = this.startNode();
|
|
@@ -5561,23 +5562,23 @@ function On(e) {
|
|
|
5561
5562
|
}
|
|
5562
5563
|
var i = e.prototype.parseExportSpecifier.call(this, t);
|
|
5563
5564
|
return i.exportKind = "value", i;
|
|
5564
|
-
},
|
|
5565
|
+
}, C.parseTypeOnlyImportExportSpecifier = function(t, n, r) {
|
|
5565
5566
|
var i, a = n ? "imported" : "local", o = n ? "local" : "exported", s = t[a], c = !1, l = !0, u = s.start;
|
|
5566
5567
|
if (this.isContextual("as")) {
|
|
5567
5568
|
var d = this.parseIdent();
|
|
5568
5569
|
if (this.isContextual("as")) {
|
|
5569
5570
|
var f = this.parseIdent();
|
|
5570
|
-
|
|
5571
|
-
} else
|
|
5572
|
-
} else
|
|
5571
|
+
ne(this.type) ? (c = !0, s = d, i = n ? this.parseIdent() : this.parseModuleExportName(), l = !1) : (i = f, l = !1);
|
|
5572
|
+
} else ne(this.type) ? (l = !1, i = n ? this.parseIdent() : this.parseModuleExportName()) : (c = !0, s = d);
|
|
5573
|
+
} else ne(this.type) && (c = !0, n ? (s = e.prototype.parseIdent.call(this, !0), this.isContextual("as") || this.checkUnreserved(s)) : s = this.parseModuleExportName());
|
|
5573
5574
|
c && r && this.raise(u, n ? U.TypeModifierIsUsedInTypeImports : U.TypeModifierIsUsedInTypeExports), t[a] = s, t[o] = i, t[n ? "importKind" : "exportKind"] = c ? "type" : "value", l && this.eatContextual("as") && (t[o] = n ? this.parseIdent() : this.parseModuleExportName()), t[o] || (t[o] = this.copyNode(t[a])), n && this.checkLValSimple(t[o], 2);
|
|
5574
|
-
},
|
|
5575
|
+
}, C.raiseCommonCheck = function(t, n, r) {
|
|
5575
5576
|
return n === "Comma is not permitted after the rest element" ? this.isAmbientContext && this.match(o.comma) && this.lookaheadCharCode() === 41 ? void this.next() : e.prototype.raise.call(this, t, n) : r ? e.prototype.raiseRecoverable.call(this, t, n) : e.prototype.raise.call(this, t, n);
|
|
5576
|
-
},
|
|
5577
|
+
}, C.raiseRecoverable = function(e, t) {
|
|
5577
5578
|
return this.raiseCommonCheck(e, t, !0);
|
|
5578
|
-
},
|
|
5579
|
+
}, C.raise = function(e, t) {
|
|
5579
5580
|
return this.raiseCommonCheck(e, t, !0);
|
|
5580
|
-
},
|
|
5581
|
+
}, C.updateContext = function(t) {
|
|
5581
5582
|
var n = this.type;
|
|
5582
5583
|
if (n == o.braceL) {
|
|
5583
5584
|
var r = this.curContext();
|
|
@@ -5586,7 +5587,7 @@ function On(e) {
|
|
|
5586
5587
|
if (n !== o.slash || t !== m.jsxTagStart) return e.prototype.updateContext.call(this, t);
|
|
5587
5588
|
this.context.length -= 2, this.context.push(h.tc_cTag), this.exprAllowed = !1;
|
|
5588
5589
|
}
|
|
5589
|
-
},
|
|
5590
|
+
}, C.jsx_parseOpeningElementAt = function(e, t) {
|
|
5590
5591
|
var n = this, r = this.startNodeAt(e, t), i = this.jsx_parseElementName();
|
|
5591
5592
|
if (i && (r.name = i), this.match(o.relational) || this.match(o.bitShift)) {
|
|
5592
5593
|
var a = this.tsTryParseAndCatch(function() {
|
|
@@ -5596,31 +5597,31 @@ function On(e) {
|
|
|
5596
5597
|
}
|
|
5597
5598
|
for (r.attributes = []; this.type !== o.slash && this.type !== m.jsxTagEnd;) r.attributes.push(this.jsx_parseAttribute());
|
|
5598
5599
|
return r.selfClosing = this.eat(o.slash), this.expect(m.jsxTagEnd), this.finishNode(r, i ? "JSXOpeningElement" : "JSXOpeningFragment");
|
|
5599
|
-
},
|
|
5600
|
-
t ===
|
|
5600
|
+
}, C.enterScope = function(t) {
|
|
5601
|
+
t === fn && this.importsStack.push([]), e.prototype.enterScope.call(this, t);
|
|
5601
5602
|
var n = e.prototype.currentScope.call(this);
|
|
5602
5603
|
n.types = [], n.enums = [], n.constEnums = [], n.classes = [], n.exportOnlyBindings = [];
|
|
5603
|
-
},
|
|
5604
|
-
e.prototype.currentScope.call(this).flags ===
|
|
5605
|
-
},
|
|
5604
|
+
}, C.exitScope = function() {
|
|
5605
|
+
e.prototype.currentScope.call(this).flags === fn && this.importsStack.pop(), e.prototype.exitScope.call(this);
|
|
5606
|
+
}, C.hasImport = function(e, t) {
|
|
5606
5607
|
var n = this.importsStack.length;
|
|
5607
5608
|
if (this.importsStack[n - 1].indexOf(e) > -1) return !0;
|
|
5608
5609
|
if (!t && n > 1) {
|
|
5609
5610
|
for (var r = 0; r < n - 1; r++) if (this.importsStack[r].indexOf(e) > -1) return !0;
|
|
5610
5611
|
}
|
|
5611
5612
|
return !1;
|
|
5612
|
-
},
|
|
5613
|
+
}, C.maybeExportDefined = function(e, t) {
|
|
5613
5614
|
this.inModule && 1 & e.flags && this.undefinedExports.delete(t);
|
|
5614
|
-
},
|
|
5615
|
+
}, C.isRedeclaredInScope = function(t, n, r) {
|
|
5615
5616
|
return !!(0 & r) && (2 & r ? t.lexical.indexOf(n) > -1 || t.functions.indexOf(n) > -1 || t.var.indexOf(n) > -1 : 3 & r ? t.lexical.indexOf(n) > -1 || !e.prototype.treatFunctionsAsVarInScope.call(this, t) && t.var.indexOf(n) > -1 : t.lexical.indexOf(n) > -1 && !(32 & t.flags && t.lexical[0] === n) || !this.treatFunctionsAsVarInScope(t) && t.functions.indexOf(n) > -1);
|
|
5616
|
-
},
|
|
5617
|
+
}, C.checkRedeclarationInScope = function(e, t, n, r) {
|
|
5617
5618
|
this.isRedeclaredInScope(e, t, n) && this.raise(r, "Identifier '" + t + "' has already been declared.");
|
|
5618
|
-
},
|
|
5619
|
+
}, C.declareName = function(t, n, r) {
|
|
5619
5620
|
if (4096 & n) return this.hasImport(t, !0) && this.raise(r, "Identifier '" + t + "' has already been declared."), void this.importsStack[this.importsStack.length - 1].push(t);
|
|
5620
5621
|
var i = this.currentScope();
|
|
5621
5622
|
if (1024 & n) return this.maybeExportDefined(i, t), void i.exportOnlyBindings.push(t);
|
|
5622
5623
|
e.prototype.declareName.call(this, t, n, r), 0 & n && (0 & n || (this.checkRedeclarationInScope(i, t, n, r), this.maybeExportDefined(i, t)), i.types.push(t)), 256 & n && i.enums.push(t), 512 & n && i.constEnums.push(t), 128 & n && i.classes.push(t);
|
|
5623
|
-
},
|
|
5624
|
+
}, C.checkLocalExport = function(t) {
|
|
5624
5625
|
var n = t.name;
|
|
5625
5626
|
if (!this.hasImport(n)) {
|
|
5626
5627
|
for (var r = this.scopeStack.length - 1; r >= 0; r--) {
|
|
@@ -5629,23 +5630,23 @@ function On(e) {
|
|
|
5629
5630
|
}
|
|
5630
5631
|
e.prototype.checkLocalExport.call(this, t);
|
|
5631
5632
|
}
|
|
5632
|
-
},
|
|
5633
|
+
}, u = t, S = [{
|
|
5633
5634
|
key: "acornTypeScript",
|
|
5634
5635
|
get: function() {
|
|
5635
5636
|
return i;
|
|
5636
5637
|
}
|
|
5637
|
-
}], (
|
|
5638
|
+
}], (x = [{
|
|
5638
5639
|
key: "acornTypeScript",
|
|
5639
5640
|
get: function() {
|
|
5640
5641
|
return i;
|
|
5641
5642
|
}
|
|
5642
|
-
}]) &&
|
|
5643
|
+
}]) && rn(u.prototype, x), S && rn(u, S), Object.defineProperty(u, "prototype", { writable: !1 }), t;
|
|
5643
5644
|
}(t);
|
|
5644
5645
|
};
|
|
5645
5646
|
}
|
|
5646
5647
|
//#endregion
|
|
5647
5648
|
//#region src/utilities/index.ts
|
|
5648
|
-
var
|
|
5649
|
+
var An = [
|
|
5649
5650
|
{
|
|
5650
5651
|
idPrefix: "dpuse-app",
|
|
5651
5652
|
typeId: "app",
|
|
@@ -5718,8 +5719,8 @@ var kn = [
|
|
|
5718
5719
|
publishedTo: "npm",
|
|
5719
5720
|
uploadGroupName: "tools"
|
|
5720
5721
|
}
|
|
5721
|
-
],
|
|
5722
|
-
async function
|
|
5722
|
+
], jn = r(i);
|
|
5723
|
+
async function Mn(e, r) {
|
|
5723
5724
|
e !== void 0 && q(`${e} - clear(${r})`);
|
|
5724
5725
|
let i;
|
|
5725
5726
|
try {
|
|
@@ -5740,15 +5741,15 @@ async function jn(e, r) {
|
|
|
5740
5741
|
}
|
|
5741
5742
|
}));
|
|
5742
5743
|
}
|
|
5743
|
-
async function
|
|
5744
|
+
async function Nn(e, n) {
|
|
5744
5745
|
return t.readdir(e, n);
|
|
5745
5746
|
}
|
|
5746
|
-
async function
|
|
5747
|
+
async function Pn(e, n, r = [], i) {
|
|
5747
5748
|
e !== void 0 && q(`${e} - exec(${n} ${r.join(" ")})`);
|
|
5748
|
-
let { stdout: a, stderr: o } = await
|
|
5749
|
+
let { stdout: a, stderr: o } = await jn(n, r);
|
|
5749
5750
|
i === void 0 ? a.trim() && console.log(a.trim()) : await t.writeFile(i, a.trim(), "utf8"), o.trim() && console.error(o.trim());
|
|
5750
5751
|
}
|
|
5751
|
-
async function
|
|
5752
|
+
async function Fn(e, t, n = [], r = !1, i = !1) {
|
|
5752
5753
|
return q(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, o) => {
|
|
5753
5754
|
a(t, n, {
|
|
5754
5755
|
shell: i,
|
|
@@ -5758,7 +5759,7 @@ async function Pn(e, t, n = [], r = !1, i = !1) {
|
|
|
5758
5759
|
});
|
|
5759
5760
|
});
|
|
5760
5761
|
}
|
|
5761
|
-
async function
|
|
5762
|
+
async function In(e, n, r = [], i, o = !1) {
|
|
5762
5763
|
return q(`${e} - spawn(${n} ${r.join(" ")}) > ${i}`), new Promise((e, s) => {
|
|
5763
5764
|
let c = a(n, r, {
|
|
5764
5765
|
shell: !1,
|
|
@@ -5784,20 +5785,20 @@ async function Fn(e, n, r = [], i, o = !1) {
|
|
|
5784
5785
|
async function W(e) {
|
|
5785
5786
|
return JSON.parse(await t.readFile(e, "utf8"));
|
|
5786
5787
|
}
|
|
5787
|
-
async function
|
|
5788
|
+
async function Ln(e) {
|
|
5788
5789
|
return await t.readFile(e, "utf8");
|
|
5789
5790
|
}
|
|
5790
|
-
async function
|
|
5791
|
+
async function Rn(e) {
|
|
5791
5792
|
try {
|
|
5792
5793
|
await t.unlink(e);
|
|
5793
5794
|
} catch (e) {
|
|
5794
5795
|
if (e.code !== "ENOENT") throw e;
|
|
5795
5796
|
}
|
|
5796
5797
|
}
|
|
5797
|
-
async function
|
|
5798
|
+
async function zn(e, n) {
|
|
5798
5799
|
await t.writeFile(e, JSON.stringify(n, void 0, 4), "utf8");
|
|
5799
5800
|
}
|
|
5800
|
-
async function
|
|
5801
|
+
async function Bn(e, n) {
|
|
5801
5802
|
await t.writeFile(e, n, "utf8");
|
|
5802
5803
|
}
|
|
5803
5804
|
function G(e) {
|
|
@@ -5810,21 +5811,21 @@ function K(e) {
|
|
|
5810
5811
|
function q(e) {
|
|
5811
5812
|
console.info(`\n${e}\n`);
|
|
5812
5813
|
}
|
|
5813
|
-
function
|
|
5814
|
-
let t =
|
|
5814
|
+
function Vn(e) {
|
|
5815
|
+
let t = An.find((t) => e.startsWith(t.idPrefix));
|
|
5815
5816
|
if (!t) throw Error(`Failed to locate module type configuration for identifier '${e}'.`);
|
|
5816
5817
|
return t;
|
|
5817
5818
|
}
|
|
5818
|
-
async function
|
|
5819
|
+
async function Hn(e) {
|
|
5819
5820
|
return await t.stat(e);
|
|
5820
5821
|
}
|
|
5821
|
-
function
|
|
5822
|
-
let t = k.extend(
|
|
5822
|
+
function Un(e) {
|
|
5823
|
+
let t = k.extend(kn()).parse(e, {
|
|
5823
5824
|
ecmaVersion: "latest",
|
|
5824
5825
|
sourceType: "module",
|
|
5825
5826
|
locations: !0
|
|
5826
5827
|
}), n = [];
|
|
5827
|
-
return
|
|
5828
|
+
return Wn(t, (e) => {
|
|
5828
5829
|
if (e.type !== "MethodDefinition") return;
|
|
5829
5830
|
let t = e, r = t.key;
|
|
5830
5831
|
if (r.type !== "Identifier") return;
|
|
@@ -5832,7 +5833,7 @@ function Hn(e) {
|
|
|
5832
5833
|
i && i !== "constructor" && t.accessibility !== "private" && n.push(i);
|
|
5833
5834
|
}), n;
|
|
5834
5835
|
}
|
|
5835
|
-
function
|
|
5836
|
+
function Wn(e, t) {
|
|
5836
5837
|
t(e);
|
|
5837
5838
|
for (let [n, r] of Object.entries(e)) {
|
|
5838
5839
|
if ([
|
|
@@ -5845,40 +5846,40 @@ function Un(e, t) {
|
|
|
5845
5846
|
let e = r;
|
|
5846
5847
|
if (Array.isArray(e)) for (let n of e) {
|
|
5847
5848
|
let e = n;
|
|
5848
|
-
e && typeof e.type == "string" &&
|
|
5849
|
+
e && typeof e.type == "string" && Wn(e, t);
|
|
5849
5850
|
}
|
|
5850
|
-
else e && typeof e == "object" && typeof e.type == "string" &&
|
|
5851
|
+
else e && typeof e == "object" && typeof e.type == "string" && Wn(e, t);
|
|
5851
5852
|
}
|
|
5852
5853
|
}
|
|
5853
|
-
function
|
|
5854
|
+
function Gn(e, t, n, r) {
|
|
5854
5855
|
let i = e.indexOf(n), a = e.indexOf(r);
|
|
5855
5856
|
if (i === -1 || a === -1) throw Error(`Markers ${n}-${r} not found in content.`);
|
|
5856
5857
|
return `${e.slice(0, Math.max(0, i + n.length))}\n${t}\n${e.slice(Math.max(0, a))}`;
|
|
5857
5858
|
}
|
|
5858
5859
|
//#endregion
|
|
5859
5860
|
//#region src/actions/auditDependencies.ts
|
|
5860
|
-
async function
|
|
5861
|
+
async function Kn() {
|
|
5861
5862
|
try {
|
|
5862
|
-
G("Audit Dependencies"), await
|
|
5863
|
+
G("Audit Dependencies"), await Fn("1️⃣ Check using 'npm audit'", "npm", ["audit"]), K("Dependencies audited.");
|
|
5863
5864
|
} catch (e) {
|
|
5864
5865
|
console.error("❌ Error auditing dependencies.", e), process.exit(1);
|
|
5865
5866
|
}
|
|
5866
5867
|
}
|
|
5867
5868
|
//#endregion
|
|
5868
5869
|
//#region src/actions/checkConfigFiles.ts
|
|
5869
|
-
async function
|
|
5870
|
+
async function qn() {
|
|
5870
5871
|
try {
|
|
5871
5872
|
G("Check configuration files.");
|
|
5872
|
-
let e =
|
|
5873
|
-
await
|
|
5873
|
+
let e = Vn((await W("config.json")).id), t = n.dirname(o(import.meta.url));
|
|
5874
|
+
await Jn(t, "../", ".editorconfig"), await Jn(t, "../", ".gitattributes"), await Jn(t, "../", e.publishedTo === "npm" ? ".gitignore_published" : ".gitignore_unpublished"), await Jn(t, "../", ".markdownlint.json"), await Jn(t, "../", "LICENSE"), K("Configuration files checked..");
|
|
5874
5875
|
} catch (e) {
|
|
5875
5876
|
console.error("❌ Error checking configuration files.", e), process.exit(1);
|
|
5876
5877
|
}
|
|
5877
5878
|
}
|
|
5878
|
-
async function
|
|
5879
|
-
let i = await
|
|
5879
|
+
async function Jn(e, t, r) {
|
|
5880
|
+
let i = await Ln(n.resolve(e, `${t}${r}`)), a = n.resolve(process.cwd(), r.split("_", 1)[0] ?? r), o;
|
|
5880
5881
|
try {
|
|
5881
|
-
o = await
|
|
5882
|
+
o = await Ln(a);
|
|
5882
5883
|
} catch (e) {
|
|
5883
5884
|
if (e.code !== "ENOENT") throw e;
|
|
5884
5885
|
}
|
|
@@ -5890,9 +5891,9 @@ async function qn(e, t, r) {
|
|
|
5890
5891
|
}
|
|
5891
5892
|
//#endregion
|
|
5892
5893
|
//#region src/actions/checkDependencies.ts
|
|
5893
|
-
async function
|
|
5894
|
+
async function Yn() {
|
|
5894
5895
|
try {
|
|
5895
|
-
G("Check Dependencies"), await
|
|
5896
|
+
G("Check Dependencies"), await Fn("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), await Fn("2️⃣ Check using 'npm-check-updates'", "npm-check-updates", [
|
|
5896
5897
|
"-i",
|
|
5897
5898
|
"--dep",
|
|
5898
5899
|
"dev,prod,peer,optional"
|
|
@@ -5903,26 +5904,40 @@ async function Jn() {
|
|
|
5903
5904
|
}
|
|
5904
5905
|
//#endregion
|
|
5905
5906
|
//#region src/actions/documentBundleSizes.ts
|
|
5906
|
-
var
|
|
5907
|
-
|
|
5908
|
-
})))(), Xn = r(Yn.gzip), Zn = r(Yn.brotliCompress), Qn = "<!-- BUNDLE_ACTUAL_START -->", $n = "<!-- BUNDLE_ACTUAL_END -->", er = "<!-- BUNDLE_CHUNKS_START -->", tr = "<!-- BUNDLE_CHUNKS_END -->", nr = "<!-- BUNDLE_SIZES_START -->", rr = "<!-- BUNDLE_SIZES_END -->", ir = " ";
|
|
5909
|
-
async function ar() {
|
|
5907
|
+
var Xn = r(c), Zn = r(s), Qn = "<!-- BUNDLE_START -->", $n = "<!-- BUNDLE_END -->", er = " ", tr = 20;
|
|
5908
|
+
async function nr() {
|
|
5910
5909
|
try {
|
|
5911
5910
|
G("Document Bundle Sizes"), q("1️⃣ Read bundle analysis report");
|
|
5912
5911
|
let e = await W("./bundle-analysis-reports/rollup-visualiser/index.json");
|
|
5913
|
-
q("2️⃣ Insert
|
|
5914
|
-
let
|
|
5915
|
-
|
|
5916
|
-
Promise.resolve(cr(e)),
|
|
5917
|
-
or()
|
|
5918
|
-
]);
|
|
5919
|
-
await zn("README.md", Wn(Wn(Wn(await In("./README.md"), `\n${r}\n`, Qn, $n), `\n${t}\n`, er, tr), `\n${n}\n`, nr, rr)), K("Bundle sizes documented.");
|
|
5912
|
+
q("2️⃣ Insert table into 'README.md'");
|
|
5913
|
+
let t = await rr(e);
|
|
5914
|
+
await Bn("README.md", Gn(await Ln("./README.md"), `\n${t}\n`, Qn, $n)), K("Bundle sizes documented.");
|
|
5920
5915
|
} catch (e) {
|
|
5921
5916
|
console.error("❌ Error documenting bundle sizes.", e), process.exit(1);
|
|
5922
5917
|
}
|
|
5923
5918
|
}
|
|
5924
|
-
async function
|
|
5925
|
-
let
|
|
5919
|
+
async function rr(e) {
|
|
5920
|
+
let t = ar(e), n = [...t.values()].reduce((e, t) => e + t.sizes.rendered, 0), r = await ir();
|
|
5921
|
+
r.sort((e, t) => t[1].rendered - e[1].rendered);
|
|
5922
|
+
let i = ["| Module | Composition |", "| ------ | ----------- |"];
|
|
5923
|
+
for (let [e, a] of r) {
|
|
5924
|
+
i.push(`| ${e} | ${fr(a.rendered)} · gz ${fr(a.gzip)} · br ${fr(a.brotli)} |`);
|
|
5925
|
+
let r = [...t.entries()].sort((e, t) => t[1].sizes.rendered - e[1].sizes.rendered);
|
|
5926
|
+
for (let [e, { sizes: t, files: a }] of r) {
|
|
5927
|
+
let r = n > 0 ? t.rendered / n * 100 : 0;
|
|
5928
|
+
i.push(`| ${er}${e} | ${or(r)} |`);
|
|
5929
|
+
let o = [...a.entries()].sort((e, t) => t[1].rendered - e[1].rendered);
|
|
5930
|
+
for (let [e, n] of o) {
|
|
5931
|
+
let r = t.rendered > 0 ? n.rendered / t.rendered * 100 : 0;
|
|
5932
|
+
i.push(`| ${er}${er}${e} | ${or(r)} |`);
|
|
5933
|
+
}
|
|
5934
|
+
}
|
|
5935
|
+
}
|
|
5936
|
+
return i.join("\n");
|
|
5937
|
+
}
|
|
5938
|
+
async function ir() {
|
|
5939
|
+
let e = (await t.readdir("./dist")).filter((e) => e.endsWith(".js") && !e.endsWith(".map"));
|
|
5940
|
+
return Promise.all(e.map(async (e) => {
|
|
5926
5941
|
let n = await t.readFile(`./dist/${e}`), [r, i] = await Promise.all([Xn(n), Zn(n)]);
|
|
5927
5942
|
return [e, {
|
|
5928
5943
|
rendered: n.length,
|
|
@@ -5930,66 +5945,31 @@ async function or() {
|
|
|
5930
5945
|
brotli: i.length
|
|
5931
5946
|
}];
|
|
5932
5947
|
}));
|
|
5933
|
-
n.sort((e, t) => t[1].rendered - e[1].rendered);
|
|
5934
|
-
let r = n.reduce((e, [, t]) => (pr(e, t), e), fr());
|
|
5935
|
-
return [
|
|
5936
|
-
"| File | Size | Gzip | Brotli |",
|
|
5937
|
-
"| ---- | ---: | ---: | -----: |",
|
|
5938
|
-
...n.map(([e, t]) => `| \`${e}\` | ${hr(t.rendered)} | ${hr(t.gzip)} | ${hr(t.brotli)} |`),
|
|
5939
|
-
`| **Total** | **${hr(r.rendered)}** | **${hr(r.gzip)}** | **${hr(r.brotli)}** |`
|
|
5940
|
-
].join("\n");
|
|
5941
|
-
}
|
|
5942
|
-
function sr(e) {
|
|
5943
|
-
let t = /* @__PURE__ */ new Map();
|
|
5944
|
-
for (let n of Object.values(e.nodeMetas)) {
|
|
5945
|
-
let r = lr(n.id);
|
|
5946
|
-
for (let [i, a] of Object.entries(n.moduleParts)) {
|
|
5947
|
-
let n = e.nodeParts[a];
|
|
5948
|
-
if (!n) continue;
|
|
5949
|
-
let o = dr(n), s = t.get(i) ?? {
|
|
5950
|
-
sizes: fr(),
|
|
5951
|
-
groups: /* @__PURE__ */ new Map()
|
|
5952
|
-
};
|
|
5953
|
-
pr(s.sizes, o), pr(s.groups.get(r) ?? (() => {
|
|
5954
|
-
let e = fr();
|
|
5955
|
-
return s.groups.set(r, e), e;
|
|
5956
|
-
})(), o), t.set(i, s);
|
|
5957
|
-
}
|
|
5958
|
-
}
|
|
5959
|
-
let n = [...t.entries()].sort((e, t) => t[1].sizes.rendered - e[1].sizes.rendered), r = n.reduce((e, [, t]) => (pr(e, t.sizes), e), fr()), i = ["| Module | Rendered | Gzip | Brotli |", "| ------ | -------: | ---: | -----: |"];
|
|
5960
|
-
for (let [e, { sizes: t, groups: r }] of n) {
|
|
5961
|
-
i.push(mr(`\`${e}\``, t));
|
|
5962
|
-
let n = [...r.entries()].sort((e, t) => t[1].rendered - e[1].rendered);
|
|
5963
|
-
for (let [e, t] of n) i.push(mr(`${ir}\`${e}\``, t));
|
|
5964
|
-
}
|
|
5965
|
-
return i.push(mr("Total", r, !0)), i.join("\n");
|
|
5966
5948
|
}
|
|
5967
|
-
function
|
|
5949
|
+
function ar(e) {
|
|
5968
5950
|
let t = /* @__PURE__ */ new Map();
|
|
5969
5951
|
for (let n of Object.values(e.nodeMetas)) {
|
|
5970
|
-
let r =
|
|
5952
|
+
let r = sr(n.id), i = cr(n.id);
|
|
5971
5953
|
for (let a of Object.values(n.moduleParts)) {
|
|
5972
5954
|
let n = e.nodeParts[a];
|
|
5973
5955
|
if (!n) continue;
|
|
5974
|
-
let o =
|
|
5975
|
-
sizes:
|
|
5956
|
+
let o = lr(n), s = t.get(r) ?? {
|
|
5957
|
+
sizes: ur(),
|
|
5976
5958
|
files: /* @__PURE__ */ new Map()
|
|
5977
5959
|
};
|
|
5978
|
-
|
|
5979
|
-
let e =
|
|
5960
|
+
dr(s.sizes, o), dr(s.files.get(i) ?? (() => {
|
|
5961
|
+
let e = ur();
|
|
5980
5962
|
return s.files.set(i, e), e;
|
|
5981
5963
|
})(), o), t.set(r, s);
|
|
5982
5964
|
}
|
|
5983
5965
|
}
|
|
5984
|
-
|
|
5985
|
-
for (let [e, { sizes: t, files: r }] of n) {
|
|
5986
|
-
i.push(mr(`\`${e}\``, t));
|
|
5987
|
-
let n = [...r.entries()].sort((e, t) => t[1].rendered - e[1].rendered);
|
|
5988
|
-
for (let [e, t] of n) i.push(mr(`${ir}\`${e}\``, t));
|
|
5989
|
-
}
|
|
5990
|
-
return i.push(mr("Total", r, !0)), i.join("\n");
|
|
5966
|
+
return t;
|
|
5991
5967
|
}
|
|
5992
|
-
function
|
|
5968
|
+
function or(e) {
|
|
5969
|
+
let t = Math.round(e / 100 * tr), n = tr - t;
|
|
5970
|
+
return `${"█".repeat(t)}${"░".repeat(n)} ${e.toFixed(1)}%`;
|
|
5971
|
+
}
|
|
5972
|
+
function sr(e) {
|
|
5993
5973
|
let t = e.startsWith("/") ? e.slice(1) : e;
|
|
5994
5974
|
if (t.startsWith("\0")) return "(runtime)";
|
|
5995
5975
|
if (t.startsWith("node_modules/")) {
|
|
@@ -6002,7 +5982,7 @@ function lr(e) {
|
|
|
6002
5982
|
}
|
|
6003
5983
|
return t.startsWith("rust/") || t.startsWith("__vite-plugin-wasm") ? "wasm" : "src";
|
|
6004
5984
|
}
|
|
6005
|
-
function
|
|
5985
|
+
function cr(e) {
|
|
6006
5986
|
let t = e.startsWith("/") ? e.slice(1) : e;
|
|
6007
5987
|
if (t.startsWith("\0")) return t.slice(1);
|
|
6008
5988
|
if (t.startsWith("node_modules/")) {
|
|
@@ -6011,36 +5991,32 @@ function ur(e) {
|
|
|
6011
5991
|
}
|
|
6012
5992
|
return t.split("/").at(-1) ?? t;
|
|
6013
5993
|
}
|
|
6014
|
-
function
|
|
5994
|
+
function lr(e) {
|
|
6015
5995
|
return {
|
|
6016
5996
|
rendered: e.renderedLength,
|
|
6017
5997
|
gzip: e.gzipLength,
|
|
6018
5998
|
brotli: e.brotliLength
|
|
6019
5999
|
};
|
|
6020
6000
|
}
|
|
6021
|
-
function
|
|
6001
|
+
function ur() {
|
|
6022
6002
|
return {
|
|
6023
6003
|
rendered: 0,
|
|
6024
6004
|
gzip: 0,
|
|
6025
6005
|
brotli: 0
|
|
6026
6006
|
};
|
|
6027
6007
|
}
|
|
6028
|
-
function
|
|
6008
|
+
function dr(e, t) {
|
|
6029
6009
|
e.rendered += t.rendered, e.gzip += t.gzip, e.brotli += t.brotli;
|
|
6030
6010
|
}
|
|
6031
|
-
function
|
|
6032
|
-
let r = (e) => n ? `**${e}**` : e;
|
|
6033
|
-
return `| ${r(e)} | ${r(hr(t.rendered))} | ${r(hr(t.gzip))} | ${r(hr(t.brotli))} |`;
|
|
6034
|
-
}
|
|
6035
|
-
function hr(e) {
|
|
6011
|
+
function fr(e) {
|
|
6036
6012
|
return e < 1024 ? `${e} B` : `${(e / 1024).toFixed(1)} kB`;
|
|
6037
6013
|
}
|
|
6038
6014
|
//#endregion
|
|
6039
6015
|
//#region src/actions/documentDependencies.ts
|
|
6040
|
-
var
|
|
6041
|
-
async function
|
|
6016
|
+
var pr = "<!-- DEPENDENCY_LICENSES_START -->", mr = "<!-- DEPENDENCY_LICENSES_END -->", hr = "<!-- DEPENDENCY_TREE_START -->", gr = "<!-- DEPENDENCY_TREE_END -->";
|
|
6017
|
+
async function _r(e = "MIT") {
|
|
6042
6018
|
try {
|
|
6043
|
-
G("Document Dependencies"), await
|
|
6019
|
+
G("Document Dependencies"), await Mn("1️⃣ Clear downloaded licenses", "licenses/downloads"), await Pn("2️⃣ Identify production licenses", "license-checker-rseidelsohn", [
|
|
6044
6020
|
"--production",
|
|
6045
6021
|
"--json",
|
|
6046
6022
|
"--files",
|
|
@@ -6053,30 +6029,30 @@ async function br(e = "MIT") {
|
|
|
6053
6029
|
(await W("package.json")).name ?? "",
|
|
6054
6030
|
"--out",
|
|
6055
6031
|
"licenses/licenses.json"
|
|
6056
|
-
]), await
|
|
6032
|
+
]), await In("3️⃣ Identify transitive dependencies", "npm", [
|
|
6057
6033
|
"ls",
|
|
6058
6034
|
"--all",
|
|
6059
6035
|
"--json",
|
|
6060
6036
|
"--omit=dev"
|
|
6061
|
-
], "licenses/licenseTree.json"), await
|
|
6037
|
+
], "licenses/licenseTree.json"), await vr("4️⃣ "), K("Dependencies documented.");
|
|
6062
6038
|
} catch (e) {
|
|
6063
6039
|
console.error("❌ Error documenting dependencies.", e), process.exit(1);
|
|
6064
6040
|
}
|
|
6065
6041
|
}
|
|
6066
|
-
async function
|
|
6042
|
+
async function vr(e) {
|
|
6067
6043
|
q(`${e} Insert licenses into 'README.md'`);
|
|
6068
6044
|
let [t, n] = await Promise.all([W("licenses/licenses.json"), W("licenses/licenseTree.json")]), r = /* @__PURE__ */ new Map();
|
|
6069
|
-
for (let [e, n] of Object.entries(t)) r.set(e,
|
|
6045
|
+
for (let [e, n] of Object.entries(t)) r.set(e, yr(e, n));
|
|
6070
6046
|
await Promise.all(r.values().map(async (e) => {
|
|
6071
|
-
let t = await
|
|
6047
|
+
let t = await br(e.name, e.installedVersion);
|
|
6072
6048
|
e.latestVersion = t.latestVersion, e.latestPublishedDate = t.latestPublishedDate, e.publishedDate = t.publishedDate;
|
|
6073
6049
|
}));
|
|
6074
6050
|
let i = "|Name|Version|License(s)|Document|\n|-|:-:|-|-|\n";
|
|
6075
|
-
for (let e of r.values()) i +=
|
|
6051
|
+
for (let e of r.values()) i += xr(e);
|
|
6076
6052
|
let a = [];
|
|
6077
|
-
n.dependencies != null &&
|
|
6053
|
+
n.dependencies != null && Sr(n.dependencies, r, a, 0), await Bn("README.md", Gn(Gn(await Ln("./README.md"), i, pr, mr), a.join("\n"), hr, gr));
|
|
6078
6054
|
}
|
|
6079
|
-
function
|
|
6055
|
+
function yr(e, t) {
|
|
6080
6056
|
let n = e.lastIndexOf("@"), r = n > 0 ? e.slice(0, n) : e, i = n > 0 ? e.slice(n + 1) : "";
|
|
6081
6057
|
return {
|
|
6082
6058
|
name: r,
|
|
@@ -6090,7 +6066,7 @@ function Sr(e, t) {
|
|
|
6090
6066
|
...t.licenseFile != null && { licenseFileLink: t.licenseFile }
|
|
6091
6067
|
};
|
|
6092
6068
|
}
|
|
6093
|
-
async function
|
|
6069
|
+
async function br(e, t) {
|
|
6094
6070
|
try {
|
|
6095
6071
|
let n = await fetch(`https://registry.npmjs.org/${encodeURIComponent(e)}`);
|
|
6096
6072
|
if (n.ok) {
|
|
@@ -6108,25 +6084,25 @@ async function Cr(e, t) {
|
|
|
6108
6084
|
publishedDate: ""
|
|
6109
6085
|
};
|
|
6110
6086
|
}
|
|
6111
|
-
function
|
|
6087
|
+
function xr(e) {
|
|
6112
6088
|
let t = e.licenseFileLink == null || e.licenseFileLink === "" ? "⚠️ No license file" : `[LICENSE](licenses/${e.licenseFileLink})`;
|
|
6113
6089
|
return `|[${e.name}](${e.repository})|${e.installedVersion}|${e.licenseTypes}|${t}|\n`;
|
|
6114
6090
|
}
|
|
6115
|
-
function
|
|
6091
|
+
function Sr(e, t, n, r) {
|
|
6116
6092
|
let i = " ".repeat(r);
|
|
6117
6093
|
for (let [a, o] of Object.entries(e)) {
|
|
6118
|
-
let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l =
|
|
6119
|
-
n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null &&
|
|
6094
|
+
let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l = Cr(s);
|
|
6095
|
+
n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null && Sr(o.dependencies, t, n, r + 1);
|
|
6120
6096
|
}
|
|
6121
6097
|
}
|
|
6122
|
-
function
|
|
6098
|
+
function Cr(e) {
|
|
6123
6099
|
if (e == null) return "";
|
|
6124
|
-
let t = e.publishedDate ?
|
|
6100
|
+
let t = e.publishedDate ? wr(e.publishedDate.split("T", 1)[0]) : "";
|
|
6125
6101
|
if (!(e.latestVersion !== "" && e.latestVersion !== e.installedVersion)) return t === "" ? "" : ` — ${t}`;
|
|
6126
|
-
let n = e.latestPublishedDate ?
|
|
6102
|
+
let n = e.latestPublishedDate ? wr(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
|
|
6127
6103
|
return t === "" ? ` — → ${r}` : ` — ${t} → ${r}`;
|
|
6128
6104
|
}
|
|
6129
|
-
function
|
|
6105
|
+
function wr(e) {
|
|
6130
6106
|
if (e == null || e === "") return "n/a";
|
|
6131
6107
|
let t = e.split("T", 1)[0];
|
|
6132
6108
|
if (t == null || t === "") return "n/a";
|
|
@@ -6135,43 +6111,43 @@ function Dr(e) {
|
|
|
6135
6111
|
}
|
|
6136
6112
|
//#endregion
|
|
6137
6113
|
//#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-B7kVKqVP.js
|
|
6138
|
-
var
|
|
6114
|
+
var Tr, Er = {
|
|
6139
6115
|
lang: void 0,
|
|
6140
6116
|
message: void 0,
|
|
6141
6117
|
abortEarly: void 0,
|
|
6142
6118
|
abortPipeEarly: void 0
|
|
6143
6119
|
};
|
|
6144
6120
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6145
|
-
function
|
|
6146
|
-
return !e && !
|
|
6147
|
-
lang: e?.lang ??
|
|
6121
|
+
function Dr(e) {
|
|
6122
|
+
return !e && !Tr ? Er : {
|
|
6123
|
+
lang: e?.lang ?? Tr?.lang,
|
|
6148
6124
|
message: e?.message,
|
|
6149
|
-
abortEarly: e?.abortEarly ??
|
|
6150
|
-
abortPipeEarly: e?.abortPipeEarly ??
|
|
6125
|
+
abortEarly: e?.abortEarly ?? Tr?.abortEarly,
|
|
6126
|
+
abortPipeEarly: e?.abortPipeEarly ?? Tr?.abortPipeEarly
|
|
6151
6127
|
};
|
|
6152
6128
|
}
|
|
6153
|
-
var
|
|
6129
|
+
var Or;
|
|
6154
6130
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6155
|
-
function
|
|
6156
|
-
return
|
|
6131
|
+
function kr(e) {
|
|
6132
|
+
return Or?.get(e);
|
|
6157
6133
|
}
|
|
6158
|
-
var
|
|
6134
|
+
var Ar;
|
|
6159
6135
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6160
|
-
function
|
|
6161
|
-
return
|
|
6136
|
+
function jr(e) {
|
|
6137
|
+
return Ar?.get(e);
|
|
6162
6138
|
}
|
|
6163
|
-
var
|
|
6139
|
+
var Mr;
|
|
6164
6140
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6165
|
-
function
|
|
6166
|
-
return
|
|
6141
|
+
function Nr(e, t) {
|
|
6142
|
+
return Mr?.get(e)?.get(t);
|
|
6167
6143
|
}
|
|
6168
6144
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6169
|
-
function
|
|
6145
|
+
function Pr(e) {
|
|
6170
6146
|
let t = typeof e;
|
|
6171
6147
|
return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
|
|
6172
6148
|
}
|
|
6173
6149
|
function J(e, t, n, r, i) {
|
|
6174
|
-
let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */
|
|
6150
|
+
let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ Pr(a), c = {
|
|
6175
6151
|
kind: e.kind,
|
|
6176
6152
|
type: e.type,
|
|
6177
6153
|
input: a,
|
|
@@ -6184,44 +6160,44 @@ function J(e, t, n, r, i) {
|
|
|
6184
6160
|
lang: r.lang,
|
|
6185
6161
|
abortEarly: r.abortEarly,
|
|
6186
6162
|
abortPipeEarly: r.abortPipeEarly
|
|
6187
|
-
}, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */
|
|
6163
|
+
}, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */ Nr(e.reference, c.lang) ?? (l ? /* @__PURE__ */ jr(c.lang) : null) ?? r.message ?? /* @__PURE__ */ kr(c.lang);
|
|
6188
6164
|
u !== void 0 && (c.message = typeof u == "function" ? u(c) : u), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
|
|
6189
6165
|
}
|
|
6190
|
-
var
|
|
6166
|
+
var Fr = /* @__PURE__ */ new WeakMap();
|
|
6191
6167
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6192
6168
|
function Y(e) {
|
|
6193
|
-
let t =
|
|
6169
|
+
let t = Fr.get(e);
|
|
6194
6170
|
return t || (t = {
|
|
6195
6171
|
version: 1,
|
|
6196
6172
|
vendor: "valibot",
|
|
6197
6173
|
validate(t) {
|
|
6198
|
-
return e["~run"]({ value: t }, /* @__PURE__ */
|
|
6174
|
+
return e["~run"]({ value: t }, /* @__PURE__ */ Dr());
|
|
6199
6175
|
}
|
|
6200
|
-
},
|
|
6176
|
+
}, Fr.set(e, t)), t;
|
|
6201
6177
|
}
|
|
6202
6178
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6203
|
-
function
|
|
6179
|
+
function Ir(e, t) {
|
|
6204
6180
|
return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
|
|
6205
6181
|
}
|
|
6206
6182
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6207
|
-
function
|
|
6183
|
+
function Lr(e, t) {
|
|
6208
6184
|
let n = [...new Set(e)];
|
|
6209
6185
|
return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
|
|
6210
6186
|
}
|
|
6211
6187
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6212
|
-
function
|
|
6188
|
+
function Rr(e, t, n) {
|
|
6213
6189
|
return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
|
|
6214
6190
|
}
|
|
6215
6191
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6216
|
-
function
|
|
6192
|
+
function zr(e, t, n) {
|
|
6217
6193
|
return typeof e.default == "function" ? e.default(t, n) : e.default;
|
|
6218
6194
|
}
|
|
6219
6195
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6220
|
-
function
|
|
6196
|
+
function Br(e, t) {
|
|
6221
6197
|
return {
|
|
6222
6198
|
kind: "schema",
|
|
6223
6199
|
type: "array",
|
|
6224
|
-
reference:
|
|
6200
|
+
reference: Br,
|
|
6225
6201
|
expects: "Array",
|
|
6226
6202
|
async: !1,
|
|
6227
6203
|
item: e,
|
|
@@ -6257,11 +6233,11 @@ function X(e, t) {
|
|
|
6257
6233
|
};
|
|
6258
6234
|
}
|
|
6259
6235
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6260
|
-
function
|
|
6236
|
+
function Vr(e) {
|
|
6261
6237
|
return {
|
|
6262
6238
|
kind: "schema",
|
|
6263
6239
|
type: "boolean",
|
|
6264
|
-
reference:
|
|
6240
|
+
reference: Vr,
|
|
6265
6241
|
expects: "boolean",
|
|
6266
6242
|
async: !1,
|
|
6267
6243
|
message: e,
|
|
@@ -6274,12 +6250,12 @@ function Ur(e) {
|
|
|
6274
6250
|
};
|
|
6275
6251
|
}
|
|
6276
6252
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6277
|
-
function
|
|
6253
|
+
function Hr(e, t) {
|
|
6278
6254
|
return {
|
|
6279
6255
|
kind: "schema",
|
|
6280
6256
|
type: "literal",
|
|
6281
|
-
reference:
|
|
6282
|
-
expects: /* @__PURE__ */
|
|
6257
|
+
reference: Hr,
|
|
6258
|
+
expects: /* @__PURE__ */ Pr(e),
|
|
6283
6259
|
async: !1,
|
|
6284
6260
|
literal: e,
|
|
6285
6261
|
message: t,
|
|
@@ -6292,11 +6268,11 @@ function Wr(e, t) {
|
|
|
6292
6268
|
};
|
|
6293
6269
|
}
|
|
6294
6270
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6295
|
-
function
|
|
6271
|
+
function X(e, t) {
|
|
6296
6272
|
return {
|
|
6297
6273
|
kind: "schema",
|
|
6298
6274
|
type: "nullable",
|
|
6299
|
-
reference:
|
|
6275
|
+
reference: X,
|
|
6300
6276
|
expects: `(${e.expects} | null)`,
|
|
6301
6277
|
async: !1,
|
|
6302
6278
|
wrapped: e,
|
|
@@ -6305,16 +6281,16 @@ function Z(e, t) {
|
|
|
6305
6281
|
return /* @__PURE__ */ Y(this);
|
|
6306
6282
|
},
|
|
6307
6283
|
"~run"(e, t) {
|
|
6308
|
-
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
6284
|
+
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ zr(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
6309
6285
|
}
|
|
6310
6286
|
};
|
|
6311
6287
|
}
|
|
6312
6288
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6313
|
-
function
|
|
6289
|
+
function Ur(e) {
|
|
6314
6290
|
return {
|
|
6315
6291
|
kind: "schema",
|
|
6316
6292
|
type: "number",
|
|
6317
|
-
reference:
|
|
6293
|
+
reference: Ur,
|
|
6318
6294
|
expects: "number",
|
|
6319
6295
|
async: !1,
|
|
6320
6296
|
message: e,
|
|
@@ -6327,11 +6303,11 @@ function Gr(e) {
|
|
|
6327
6303
|
};
|
|
6328
6304
|
}
|
|
6329
6305
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6330
|
-
function
|
|
6306
|
+
function Z(e, t) {
|
|
6331
6307
|
return {
|
|
6332
6308
|
kind: "schema",
|
|
6333
6309
|
type: "object",
|
|
6334
|
-
reference:
|
|
6310
|
+
reference: Z,
|
|
6335
6311
|
expects: "Object",
|
|
6336
6312
|
async: !1,
|
|
6337
6313
|
entries: e,
|
|
@@ -6346,7 +6322,7 @@ function Q(e, t) {
|
|
|
6346
6322
|
for (let r in this.entries) {
|
|
6347
6323
|
let i = this.entries[r];
|
|
6348
6324
|
if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
|
|
6349
|
-
let a = r in n ? n[r] : /* @__PURE__ */
|
|
6325
|
+
let a = r in n ? n[r] : /* @__PURE__ */ zr(i), o = i["~run"]({ value: a }, t);
|
|
6350
6326
|
if (o.issues) {
|
|
6351
6327
|
let i = {
|
|
6352
6328
|
type: "object",
|
|
@@ -6362,7 +6338,7 @@ function Q(e, t) {
|
|
|
6362
6338
|
}
|
|
6363
6339
|
}
|
|
6364
6340
|
o.typed || (e.typed = !1), e.value[r] = o.value;
|
|
6365
|
-
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */
|
|
6341
|
+
} else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ Rr(i);
|
|
6366
6342
|
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (J(this, "key", e, t, {
|
|
6367
6343
|
input: void 0,
|
|
6368
6344
|
expected: `"${r}"`,
|
|
@@ -6381,11 +6357,11 @@ function Q(e, t) {
|
|
|
6381
6357
|
};
|
|
6382
6358
|
}
|
|
6383
6359
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6384
|
-
function
|
|
6360
|
+
function Q(e, t) {
|
|
6385
6361
|
return {
|
|
6386
6362
|
kind: "schema",
|
|
6387
6363
|
type: "optional",
|
|
6388
|
-
reference:
|
|
6364
|
+
reference: Q,
|
|
6389
6365
|
expects: `(${e.expects} | undefined)`,
|
|
6390
6366
|
async: !1,
|
|
6391
6367
|
wrapped: e,
|
|
@@ -6394,16 +6370,16 @@ function Kr(e, t) {
|
|
|
6394
6370
|
return /* @__PURE__ */ Y(this);
|
|
6395
6371
|
},
|
|
6396
6372
|
"~run"(e, t) {
|
|
6397
|
-
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
6373
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ zr(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
6398
6374
|
}
|
|
6399
6375
|
};
|
|
6400
6376
|
}
|
|
6401
6377
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6402
|
-
function
|
|
6378
|
+
function Wr(e, t, n) {
|
|
6403
6379
|
return {
|
|
6404
6380
|
kind: "schema",
|
|
6405
6381
|
type: "record",
|
|
6406
|
-
reference:
|
|
6382
|
+
reference: Wr,
|
|
6407
6383
|
expects: "Object",
|
|
6408
6384
|
async: !1,
|
|
6409
6385
|
key: e,
|
|
@@ -6416,7 +6392,7 @@ function qr(e, t, n) {
|
|
|
6416
6392
|
let n = e.value;
|
|
6417
6393
|
if (n && typeof n == "object") {
|
|
6418
6394
|
e.typed = !0, e.value = {};
|
|
6419
|
-
for (let r in n) if (/* @__PURE__ */
|
|
6395
|
+
for (let r in n) if (/* @__PURE__ */ Ir(n, r)) {
|
|
6420
6396
|
let i = n[r], a = this.key["~run"]({ value: r }, t);
|
|
6421
6397
|
if (a.issues) {
|
|
6422
6398
|
let o = {
|
|
@@ -6472,19 +6448,19 @@ function $(e) {
|
|
|
6472
6448
|
};
|
|
6473
6449
|
}
|
|
6474
6450
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6475
|
-
function
|
|
6451
|
+
function Gr(e) {
|
|
6476
6452
|
let t;
|
|
6477
6453
|
if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
|
|
6478
6454
|
else t = n.issues;
|
|
6479
6455
|
return t;
|
|
6480
6456
|
}
|
|
6481
6457
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6482
|
-
function
|
|
6458
|
+
function Kr(e, t) {
|
|
6483
6459
|
return {
|
|
6484
6460
|
kind: "schema",
|
|
6485
6461
|
type: "union",
|
|
6486
|
-
reference:
|
|
6487
|
-
expects: /* @__PURE__ */
|
|
6462
|
+
reference: Kr,
|
|
6463
|
+
expects: /* @__PURE__ */ Lr(e.map((e) => e.expects), "|"),
|
|
6488
6464
|
async: !1,
|
|
6489
6465
|
options: e,
|
|
6490
6466
|
message: t,
|
|
@@ -6505,24 +6481,24 @@ function Yr(e, t) {
|
|
|
6505
6481
|
if (n) return n;
|
|
6506
6482
|
if (r) {
|
|
6507
6483
|
if (r.length === 1) return r[0];
|
|
6508
|
-
J(this, "type", e, t, { issues: /* @__PURE__ */
|
|
6484
|
+
J(this, "type", e, t, { issues: /* @__PURE__ */ Gr(r) }), e.typed = !0;
|
|
6509
6485
|
} else if (i?.length === 1) return i[0];
|
|
6510
|
-
else J(this, "type", e, t, { issues: /* @__PURE__ */
|
|
6486
|
+
else J(this, "type", e, t, { issues: /* @__PURE__ */ Gr(i) });
|
|
6511
6487
|
return e;
|
|
6512
6488
|
}
|
|
6513
6489
|
};
|
|
6514
6490
|
}
|
|
6515
|
-
var
|
|
6491
|
+
var qr = (e) => /* @__PURE__ */ Kr(e.map((e) => /* @__PURE__ */ Hr(e))), Jr = /* @__PURE__ */ Z({
|
|
6516
6492
|
en: /* @__PURE__ */ $(),
|
|
6517
6493
|
es: /* @__PURE__ */ $()
|
|
6518
|
-
}),
|
|
6519
|
-
en: /* @__PURE__ */
|
|
6520
|
-
es: /* @__PURE__ */
|
|
6521
|
-
}),
|
|
6522
|
-
en: /* @__PURE__ */
|
|
6523
|
-
es: /* @__PURE__ */
|
|
6494
|
+
}), Yr = /* @__PURE__ */ Z({
|
|
6495
|
+
en: /* @__PURE__ */ Q(/* @__PURE__ */ Br(/* @__PURE__ */ $())),
|
|
6496
|
+
es: /* @__PURE__ */ Q(/* @__PURE__ */ Br(/* @__PURE__ */ $()))
|
|
6497
|
+
}), Xr = /* @__PURE__ */ Z({
|
|
6498
|
+
en: /* @__PURE__ */ Q(/* @__PURE__ */ $()),
|
|
6499
|
+
es: /* @__PURE__ */ Q(/* @__PURE__ */ $())
|
|
6524
6500
|
});
|
|
6525
|
-
|
|
6501
|
+
qr([
|
|
6526
6502
|
"app",
|
|
6527
6503
|
"connector",
|
|
6528
6504
|
"connectorConnection",
|
|
@@ -6547,12 +6523,12 @@ Xr([
|
|
|
6547
6523
|
"presenterPresentation",
|
|
6548
6524
|
"tool"
|
|
6549
6525
|
]);
|
|
6550
|
-
var
|
|
6526
|
+
var Zr = qr([
|
|
6551
6527
|
"amber",
|
|
6552
6528
|
"green",
|
|
6553
6529
|
"red",
|
|
6554
6530
|
"other"
|
|
6555
|
-
]),
|
|
6531
|
+
]), Qr = qr([
|
|
6556
6532
|
"alpha",
|
|
6557
6533
|
"beta",
|
|
6558
6534
|
"generalAvailability",
|
|
@@ -6562,31 +6538,31 @@ var ei = Xr([
|
|
|
6562
6538
|
"releaseCandidate",
|
|
6563
6539
|
"unavailable",
|
|
6564
6540
|
"underReview"
|
|
6565
|
-
]),
|
|
6566
|
-
color:
|
|
6541
|
+
]), $r = /* @__PURE__ */ Z({
|
|
6542
|
+
color: Zr,
|
|
6567
6543
|
label: /* @__PURE__ */ $()
|
|
6568
|
-
}),
|
|
6544
|
+
}), ei = /* @__PURE__ */ Z({
|
|
6569
6545
|
id: /* @__PURE__ */ $(),
|
|
6570
|
-
label:
|
|
6571
|
-
description:
|
|
6572
|
-
icon: /* @__PURE__ */
|
|
6573
|
-
iconDark: /* @__PURE__ */
|
|
6574
|
-
iconNeutral: /* @__PURE__ */
|
|
6575
|
-
order: /* @__PURE__ */
|
|
6546
|
+
label: Xr,
|
|
6547
|
+
description: Yr,
|
|
6548
|
+
icon: /* @__PURE__ */ X(/* @__PURE__ */ $()),
|
|
6549
|
+
iconDark: /* @__PURE__ */ X(/* @__PURE__ */ $()),
|
|
6550
|
+
iconNeutral: /* @__PURE__ */ X(/* @__PURE__ */ $()),
|
|
6551
|
+
order: /* @__PURE__ */ Ur(),
|
|
6576
6552
|
path: /* @__PURE__ */ $()
|
|
6577
|
-
}),
|
|
6553
|
+
}), ti = {
|
|
6578
6554
|
id: /* @__PURE__ */ $(),
|
|
6579
|
-
label:
|
|
6580
|
-
description:
|
|
6581
|
-
firstCreatedAt: /* @__PURE__ */
|
|
6582
|
-
icon: /* @__PURE__ */
|
|
6583
|
-
iconDark: /* @__PURE__ */
|
|
6584
|
-
iconNeutral: /* @__PURE__ */
|
|
6585
|
-
lastUpdatedAt: /* @__PURE__ */
|
|
6586
|
-
status: /* @__PURE__ */
|
|
6587
|
-
statusId: /* @__PURE__ */
|
|
6555
|
+
label: Xr,
|
|
6556
|
+
description: Yr,
|
|
6557
|
+
firstCreatedAt: /* @__PURE__ */ X(/* @__PURE__ */ Ur()),
|
|
6558
|
+
icon: /* @__PURE__ */ X(/* @__PURE__ */ $()),
|
|
6559
|
+
iconDark: /* @__PURE__ */ X(/* @__PURE__ */ $()),
|
|
6560
|
+
iconNeutral: /* @__PURE__ */ X(/* @__PURE__ */ $()),
|
|
6561
|
+
lastUpdatedAt: /* @__PURE__ */ X(/* @__PURE__ */ Ur()),
|
|
6562
|
+
status: /* @__PURE__ */ X($r),
|
|
6563
|
+
statusId: /* @__PURE__ */ X(Qr)
|
|
6588
6564
|
};
|
|
6589
|
-
({ ...
|
|
6565
|
+
({ ...ti }), qr([
|
|
6590
6566
|
"app",
|
|
6591
6567
|
"engine",
|
|
6592
6568
|
"connector",
|
|
@@ -6596,32 +6572,32 @@ var ei = Xr([
|
|
|
6596
6572
|
]);
|
|
6597
6573
|
//#endregion
|
|
6598
6574
|
//#region node_modules/@dpuse/dpuse-shared/dist/moduleConfig.schema-Cvc9QRvr.js
|
|
6599
|
-
var
|
|
6600
|
-
...
|
|
6575
|
+
var ni = {
|
|
6576
|
+
...ti,
|
|
6601
6577
|
version: /* @__PURE__ */ $()
|
|
6602
6578
|
};
|
|
6603
|
-
({ ...
|
|
6579
|
+
({ ...ni });
|
|
6604
6580
|
//#endregion
|
|
6605
6581
|
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleConnector.es.js
|
|
6606
|
-
var
|
|
6582
|
+
var ri = qr([
|
|
6607
6583
|
"application",
|
|
6608
6584
|
"curatedDataset",
|
|
6609
6585
|
"database",
|
|
6610
6586
|
"fileStore"
|
|
6611
|
-
]),
|
|
6612
|
-
authMethodId:
|
|
6587
|
+
]), ii = /* @__PURE__ */ Z({ label: Jr }), ai = /* @__PURE__ */ Z({
|
|
6588
|
+
authMethodId: qr([
|
|
6613
6589
|
"apiKey",
|
|
6614
6590
|
"disabled",
|
|
6615
6591
|
"oAuth2",
|
|
6616
6592
|
"none"
|
|
6617
6593
|
]),
|
|
6618
|
-
activeConnectionCount: /* @__PURE__ */
|
|
6619
|
-
canDescribe: /* @__PURE__ */
|
|
6620
|
-
id: /* @__PURE__ */
|
|
6621
|
-
label: /* @__PURE__ */
|
|
6622
|
-
maxConnectionCount: /* @__PURE__ */
|
|
6623
|
-
params: /* @__PURE__ */
|
|
6624
|
-
}),
|
|
6594
|
+
activeConnectionCount: /* @__PURE__ */ Q(/* @__PURE__ */ Ur()),
|
|
6595
|
+
canDescribe: /* @__PURE__ */ Q(/* @__PURE__ */ Vr()),
|
|
6596
|
+
id: /* @__PURE__ */ Q(/* @__PURE__ */ $()),
|
|
6597
|
+
label: /* @__PURE__ */ Q(Jr),
|
|
6598
|
+
maxConnectionCount: /* @__PURE__ */ X(/* @__PURE__ */ Ur()),
|
|
6599
|
+
params: /* @__PURE__ */ Q(/* @__PURE__ */ Br(/* @__PURE__ */ Wr(/* @__PURE__ */ $(), /* @__PURE__ */ $())))
|
|
6600
|
+
}), oi = qr([
|
|
6625
6601
|
"abortOperation",
|
|
6626
6602
|
"auditObjectContent",
|
|
6627
6603
|
"createObject",
|
|
@@ -6636,17 +6612,17 @@ var oi = Xr([
|
|
|
6636
6612
|
"retrieveChunks",
|
|
6637
6613
|
"retrieveRecords",
|
|
6638
6614
|
"upsertRecords"
|
|
6639
|
-
]),
|
|
6640
|
-
typeId: /* @__PURE__ */
|
|
6641
|
-
...
|
|
6642
|
-
actionNames: /* @__PURE__ */
|
|
6643
|
-
category: /* @__PURE__ */
|
|
6644
|
-
categoryId:
|
|
6645
|
-
implementations: /* @__PURE__ */
|
|
6646
|
-
vendorAccountURL: /* @__PURE__ */
|
|
6647
|
-
vendorDocumentationURL: /* @__PURE__ */
|
|
6648
|
-
vendorHomeURL: /* @__PURE__ */
|
|
6649
|
-
}),
|
|
6615
|
+
]), si = /* @__PURE__ */ Z({
|
|
6616
|
+
typeId: /* @__PURE__ */ Hr("connector"),
|
|
6617
|
+
...ni,
|
|
6618
|
+
actionNames: /* @__PURE__ */ Br(oi),
|
|
6619
|
+
category: /* @__PURE__ */ X(ii),
|
|
6620
|
+
categoryId: ri,
|
|
6621
|
+
implementations: /* @__PURE__ */ Wr(/* @__PURE__ */ $(), ai),
|
|
6622
|
+
vendorAccountURL: /* @__PURE__ */ X(/* @__PURE__ */ $()),
|
|
6623
|
+
vendorDocumentationURL: /* @__PURE__ */ X(/* @__PURE__ */ $()),
|
|
6624
|
+
vendorHomeURL: /* @__PURE__ */ X(/* @__PURE__ */ $())
|
|
6625
|
+
}), ci = {
|
|
6650
6626
|
abortOperation: "Abort Operation",
|
|
6651
6627
|
auditObjectContent: "Audit Object Content",
|
|
6652
6628
|
createObject: "Create Object",
|
|
@@ -6662,29 +6638,29 @@ var oi = Xr([
|
|
|
6662
6638
|
retrieveRecords: "Retrieve Records",
|
|
6663
6639
|
upsertRecords: "Upsert Records"
|
|
6664
6640
|
};
|
|
6665
|
-
function
|
|
6641
|
+
function li(e) {
|
|
6666
6642
|
let t = new Set(e), n = "| Name | Supported |\n";
|
|
6667
6643
|
n += "| ---- | :-------: |\n";
|
|
6668
|
-
for (let e of Object.keys(
|
|
6644
|
+
for (let e of Object.keys(ci)) n += `| ${ci[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
6669
6645
|
return n;
|
|
6670
6646
|
}
|
|
6671
6647
|
//#endregion
|
|
6672
6648
|
//#region src/actions/documentOperations.ts
|
|
6673
|
-
var
|
|
6674
|
-
async function
|
|
6649
|
+
var ui = "<!-- CONNECTOR_OPERATIONS_START -->", di = "<!-- CONNECTOR_OPERATIONS_END -->";
|
|
6650
|
+
async function fi() {
|
|
6675
6651
|
try {
|
|
6676
6652
|
G("Document Operations"), q("1️⃣ Insert operations table into 'README.md'");
|
|
6677
|
-
let e =
|
|
6678
|
-
await
|
|
6653
|
+
let e = li((await W("config.json")).operations ?? []);
|
|
6654
|
+
await Bn("README.md", Gn(await Ln("./README.md"), e, ui, di)), K("Operations documented.");
|
|
6679
6655
|
} catch (e) {
|
|
6680
6656
|
console.error("❌ Error documenting operations.", e), process.exit(1);
|
|
6681
6657
|
}
|
|
6682
6658
|
}
|
|
6683
6659
|
//#endregion
|
|
6684
6660
|
//#region src/actions/formatCode.ts
|
|
6685
|
-
async function
|
|
6661
|
+
async function pi() {
|
|
6686
6662
|
try {
|
|
6687
|
-
G("Format Code"), await
|
|
6663
|
+
G("Format Code"), await Fn("1️⃣ Format", "prettier", [
|
|
6688
6664
|
"--write",
|
|
6689
6665
|
"*.json",
|
|
6690
6666
|
"*.md",
|
|
@@ -6697,16 +6673,16 @@ async function gi() {
|
|
|
6697
6673
|
}
|
|
6698
6674
|
//#endregion
|
|
6699
6675
|
//#region src/actions/lintCode.ts
|
|
6700
|
-
async function
|
|
6676
|
+
async function mi() {
|
|
6701
6677
|
try {
|
|
6702
|
-
G("Lint Code"), await
|
|
6678
|
+
G("Lint Code"), await Fn("1️⃣ Lint", "eslint", ["."]), K("Code linted.");
|
|
6703
6679
|
} catch (e) {
|
|
6704
6680
|
console.error("❌ Error linting code.", e), process.exit(1);
|
|
6705
6681
|
}
|
|
6706
6682
|
}
|
|
6707
6683
|
//#endregion
|
|
6708
6684
|
//#region src/utilities/cloudflare.ts
|
|
6709
|
-
async function
|
|
6685
|
+
async function hi() {
|
|
6710
6686
|
let e = await W("config.json"), t = {
|
|
6711
6687
|
body: JSON.stringify(e),
|
|
6712
6688
|
headers: { "Content-Type": "application/json" },
|
|
@@ -6714,11 +6690,11 @@ async function vi() {
|
|
|
6714
6690
|
}, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
|
|
6715
6691
|
if (!n.ok) throw Error(await n.text());
|
|
6716
6692
|
}
|
|
6717
|
-
async function
|
|
6693
|
+
async function gi(e, t) {
|
|
6718
6694
|
async function n(e, t, r) {
|
|
6719
6695
|
for (let i of r) {
|
|
6720
6696
|
let r = `${e}/${i}`, a = `${t}/${i}`;
|
|
6721
|
-
(await
|
|
6697
|
+
(await Hn(r)).isDirectory() ? await n(r, a, await Nn(r)) : (console.info(`⚙️ Uploading '${e}/${i}'...`), await Pn(void 0, "wrangler", [
|
|
6722
6698
|
"r2",
|
|
6723
6699
|
"object",
|
|
6724
6700
|
"put",
|
|
@@ -6729,10 +6705,10 @@ async function yi(e, t) {
|
|
|
6729
6705
|
]));
|
|
6730
6706
|
}
|
|
6731
6707
|
}
|
|
6732
|
-
let r = await
|
|
6708
|
+
let r = await Nn(`${e}/${t}/`);
|
|
6733
6709
|
await n(`${e}/${t}`, t, r);
|
|
6734
6710
|
}
|
|
6735
|
-
async function
|
|
6711
|
+
async function _i(e) {
|
|
6736
6712
|
let t = e.id, n = {
|
|
6737
6713
|
body: JSON.stringify(e),
|
|
6738
6714
|
headers: { "Content-Type": "application/json" },
|
|
@@ -6740,14 +6716,14 @@ async function bi(e) {
|
|
|
6740
6716
|
}, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
|
|
6741
6717
|
if (!r.ok) throw Error(await r.text());
|
|
6742
6718
|
}
|
|
6743
|
-
async function
|
|
6719
|
+
async function vi(e, t) {
|
|
6744
6720
|
let n = `v${e.version ?? "unknown"}`;
|
|
6745
6721
|
async function r(e, r = "") {
|
|
6746
|
-
let i = await
|
|
6722
|
+
let i = await Nn(e, { withFileTypes: !0 });
|
|
6747
6723
|
for (let a of i) {
|
|
6748
6724
|
if (a.isDirectory()) continue;
|
|
6749
6725
|
let i = `${e}/${a.name}`, o = r ? `${r}/${a.name}` : a.name, s = `${t}_${n}/${o}`.replaceAll("\\", "/"), c = a.name.endsWith(".css") ? "text/css" : "application/octet-stream", l = a.name.endsWith(".js") ? "application/javascript" : c;
|
|
6750
|
-
console.info(`⚙️ Uploading '${o}' → '${s}'...`), await
|
|
6726
|
+
console.info(`⚙️ Uploading '${o}' → '${s}'...`), await Pn(void 0, "wrangler", [
|
|
6751
6727
|
"r2",
|
|
6752
6728
|
"object",
|
|
6753
6729
|
"put",
|
|
@@ -6764,24 +6740,24 @@ async function xi(e, t) {
|
|
|
6764
6740
|
}
|
|
6765
6741
|
//#endregion
|
|
6766
6742
|
//#region node_modules/valibot/dist/index.mjs
|
|
6767
|
-
var
|
|
6743
|
+
var yi, bi = {
|
|
6768
6744
|
lang: void 0,
|
|
6769
6745
|
message: void 0,
|
|
6770
6746
|
abortEarly: void 0,
|
|
6771
6747
|
abortPipeEarly: void 0
|
|
6772
6748
|
};
|
|
6773
6749
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6774
|
-
function
|
|
6775
|
-
return !e && !
|
|
6776
|
-
lang: e?.lang ??
|
|
6750
|
+
function xi(e) {
|
|
6751
|
+
return !e && !yi ? bi : {
|
|
6752
|
+
lang: e?.lang ?? yi?.lang,
|
|
6777
6753
|
message: e?.message,
|
|
6778
|
-
abortEarly: e?.abortEarly ??
|
|
6779
|
-
abortPipeEarly: e?.abortPipeEarly ??
|
|
6754
|
+
abortEarly: e?.abortEarly ?? yi?.abortEarly,
|
|
6755
|
+
abortPipeEarly: e?.abortPipeEarly ?? yi?.abortPipeEarly
|
|
6780
6756
|
};
|
|
6781
6757
|
}
|
|
6782
6758
|
/* @__NO_SIDE_EFFECTS__ */
|
|
6783
|
-
function
|
|
6784
|
-
let r = e["~run"]({ value: t }, /* @__PURE__ */
|
|
6759
|
+
function Si(e, t, n) {
|
|
6760
|
+
let r = e["~run"]({ value: t }, /* @__PURE__ */ xi(n));
|
|
6785
6761
|
return {
|
|
6786
6762
|
typed: r.typed,
|
|
6787
6763
|
success: !r.issues,
|
|
@@ -6791,31 +6767,31 @@ function Ti(e, t, n) {
|
|
|
6791
6767
|
}
|
|
6792
6768
|
//#endregion
|
|
6793
6769
|
//#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleContext.es.js
|
|
6794
|
-
var
|
|
6795
|
-
...
|
|
6796
|
-
typeId: /* @__PURE__ */
|
|
6797
|
-
modelRefs: /* @__PURE__ */
|
|
6798
|
-
order: /* @__PURE__ */
|
|
6799
|
-
}),
|
|
6800
|
-
...
|
|
6801
|
-
typeId: /* @__PURE__ */
|
|
6802
|
-
models: /* @__PURE__ */
|
|
6803
|
-
operations: /* @__PURE__ */
|
|
6804
|
-
}),
|
|
6770
|
+
var Ci = /* @__PURE__ */ Z({
|
|
6771
|
+
...ti,
|
|
6772
|
+
typeId: /* @__PURE__ */ Hr("contextModelGroup"),
|
|
6773
|
+
modelRefs: /* @__PURE__ */ Br(ei),
|
|
6774
|
+
order: /* @__PURE__ */ Ur()
|
|
6775
|
+
}), wi = qr(["listContextFocuses"]), Ti = /* @__PURE__ */ Z({
|
|
6776
|
+
...ni,
|
|
6777
|
+
typeId: /* @__PURE__ */ Hr("context"),
|
|
6778
|
+
models: /* @__PURE__ */ Br(Ci),
|
|
6779
|
+
operations: /* @__PURE__ */ Br(wi)
|
|
6780
|
+
}), Ei = qr([
|
|
6805
6781
|
"list",
|
|
6806
6782
|
"render",
|
|
6807
6783
|
"setColorMode"
|
|
6808
|
-
]),
|
|
6809
|
-
typeId: /* @__PURE__ */
|
|
6810
|
-
...
|
|
6811
|
-
actionNames: /* @__PURE__ */
|
|
6812
|
-
presentations: /* @__PURE__ */
|
|
6813
|
-
}),
|
|
6784
|
+
]), Di = /* @__PURE__ */ Z({
|
|
6785
|
+
typeId: /* @__PURE__ */ Hr("presenter"),
|
|
6786
|
+
...ni,
|
|
6787
|
+
actionNames: /* @__PURE__ */ Br(Ei),
|
|
6788
|
+
presentations: /* @__PURE__ */ Br(ei)
|
|
6789
|
+
}), Oi = /* @__PURE__ */ new Set([
|
|
6814
6790
|
"createObject",
|
|
6815
6791
|
"dropObject",
|
|
6816
6792
|
"removeRecords",
|
|
6817
6793
|
"upsertRecords"
|
|
6818
|
-
]),
|
|
6794
|
+
]), ki = /* @__PURE__ */ new Set([
|
|
6819
6795
|
"auditObjectContent",
|
|
6820
6796
|
"findObjectFolderPath",
|
|
6821
6797
|
"getReadableStream",
|
|
@@ -6825,57 +6801,57 @@ var Ei = /* @__PURE__ */ Q({
|
|
|
6825
6801
|
"retrieveChunks",
|
|
6826
6802
|
"retrieveRecords"
|
|
6827
6803
|
]);
|
|
6828
|
-
async function
|
|
6804
|
+
async function Ai() {
|
|
6829
6805
|
try {
|
|
6830
|
-
G("Build Project"), await
|
|
6806
|
+
G("Build Project"), await Fn("1️⃣ Bundle project", "vite", ["build"]), K("Project built.");
|
|
6831
6807
|
} catch (e) {
|
|
6832
6808
|
console.error("❌ Error building project.", e), process.exit(1);
|
|
6833
6809
|
}
|
|
6834
6810
|
}
|
|
6835
|
-
async function
|
|
6811
|
+
async function ji() {
|
|
6836
6812
|
try {
|
|
6837
6813
|
G("Release Project");
|
|
6838
6814
|
let e = await W("package.json"), t = await W("config.json");
|
|
6839
|
-
await
|
|
6840
|
-
let n =
|
|
6815
|
+
await Vi("1️⃣ ", e);
|
|
6816
|
+
let n = Vn(t.id);
|
|
6841
6817
|
switch (n.typeId) {
|
|
6842
6818
|
case "connector":
|
|
6843
|
-
t = await
|
|
6819
|
+
t = await Ni("2️⃣ ", e);
|
|
6844
6820
|
break;
|
|
6845
6821
|
case "context":
|
|
6846
|
-
t = await
|
|
6822
|
+
t = await Pi("2️⃣ ", e);
|
|
6847
6823
|
break;
|
|
6848
6824
|
case "presenter":
|
|
6849
|
-
t = await
|
|
6825
|
+
t = await Fi("2️⃣ ", e);
|
|
6850
6826
|
break;
|
|
6851
|
-
default: t = await
|
|
6827
|
+
default: t = await Mi("2️⃣ ", e);
|
|
6852
6828
|
}
|
|
6853
|
-
if (await
|
|
6829
|
+
if (await Fn("3️⃣ Bundle project", "vite", ["build"]), await Pn("4️⃣ Stage changes", "git", ["add", "."]), await Pn("5️⃣ Commit changes", "git", [
|
|
6854
6830
|
"commit",
|
|
6855
6831
|
"-m",
|
|
6856
6832
|
`"v${e.version ?? "unknown"}"`
|
|
6857
|
-
]), await
|
|
6833
|
+
]), await Pn("6️⃣ Push changes", "git", [
|
|
6858
6834
|
"push",
|
|
6859
6835
|
"origin",
|
|
6860
6836
|
"main:main"
|
|
6861
|
-
]), n.typeId === "app") q("7️⃣ Register module"), await
|
|
6862
|
-
else if (n.typeId === "engine") q("7️⃣ Register module"), await
|
|
6837
|
+
]), n.typeId === "app") q("7️⃣ Register module"), await hi();
|
|
6838
|
+
else if (n.typeId === "engine") q("7️⃣ Register module"), await vi(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await _i(t);
|
|
6863
6839
|
else if (n.uploadGroupName === void 0) q("7️⃣ Registration NOT required.");
|
|
6864
6840
|
else {
|
|
6865
6841
|
q("7️⃣ Register module");
|
|
6866
6842
|
let r = t.id.split("-").slice(2).join("-");
|
|
6867
|
-
await
|
|
6843
|
+
await vi(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await _i(t);
|
|
6868
6844
|
}
|
|
6869
6845
|
if (n.publishedTo === "npm") {
|
|
6870
6846
|
let e = ".npmrc";
|
|
6871
6847
|
try {
|
|
6872
|
-
await
|
|
6848
|
+
await Bn(e, `registry=https://registry.npmjs.org/\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await Fn("8️⃣ Publish to npm", "npm", [
|
|
6873
6849
|
"publish",
|
|
6874
6850
|
"--access",
|
|
6875
6851
|
"public"
|
|
6876
6852
|
]);
|
|
6877
6853
|
} finally {
|
|
6878
|
-
await
|
|
6854
|
+
await Rn(e);
|
|
6879
6855
|
}
|
|
6880
6856
|
} else q(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
|
|
6881
6857
|
K(`Project version '${e.version ?? "unknown"}' released.`);
|
|
@@ -6883,76 +6859,76 @@ async function Pi() {
|
|
|
6883
6859
|
console.error("❌ Error releasing project.", e), process.exit(1);
|
|
6884
6860
|
}
|
|
6885
6861
|
}
|
|
6886
|
-
async function
|
|
6862
|
+
async function Mi(e, t) {
|
|
6887
6863
|
q(`${e} Build project configuration`);
|
|
6888
6864
|
let n = await W("config.json");
|
|
6889
|
-
return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), await
|
|
6865
|
+
return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), await zn("config.json", n), n;
|
|
6890
6866
|
}
|
|
6891
|
-
async function
|
|
6867
|
+
async function Ni(e, t) {
|
|
6892
6868
|
q(`${e} Build connector project configuration`);
|
|
6893
|
-
let [n, r] = await Promise.all([W("config.json"),
|
|
6869
|
+
let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Si(si, n);
|
|
6894
6870
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
|
|
6895
|
-
let a =
|
|
6896
|
-
return await
|
|
6871
|
+
let a = Un(r);
|
|
6872
|
+
return await Li(t, n, a, Ii(a));
|
|
6897
6873
|
}
|
|
6898
|
-
async function
|
|
6874
|
+
async function Pi(e, t) {
|
|
6899
6875
|
q(`${e} Build context project configuration`);
|
|
6900
|
-
let [n, r] = await Promise.all([W("config.json"),
|
|
6876
|
+
let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Si(Ti, n);
|
|
6901
6877
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
|
|
6902
|
-
return await
|
|
6878
|
+
return await Li(t, n, Un(r));
|
|
6903
6879
|
}
|
|
6904
|
-
async function
|
|
6880
|
+
async function Fi(e, t) {
|
|
6905
6881
|
q(`${e} Build presenter project configuration`);
|
|
6906
|
-
let [n, r] = await Promise.all([W("config.json"),
|
|
6882
|
+
let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Si(Di, n);
|
|
6907
6883
|
if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
|
|
6908
|
-
return await
|
|
6884
|
+
return await Li(t, n, Un(r));
|
|
6909
6885
|
}
|
|
6910
|
-
function
|
|
6886
|
+
function Ii(e) {
|
|
6911
6887
|
let t = !1, n = !1;
|
|
6912
|
-
for (let r of e)
|
|
6888
|
+
for (let r of e) ki.has(r) && (t = !0), Oi.has(r) && (n = !0);
|
|
6913
6889
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
6914
6890
|
}
|
|
6915
|
-
async function
|
|
6916
|
-
return n.length > 0 ? (console.info(`ℹ️ Implements ${String(n.length)} operations:`), console.table(n)) : console.warn("⚠️ Implements no operations."), r === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${r ?? "unknown"}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.operations = n, t.usageId = r ?? "unknown", await
|
|
6891
|
+
async function Li(e, t, n, r) {
|
|
6892
|
+
return n.length > 0 ? (console.info(`ℹ️ Implements ${String(n.length)} operations:`), console.table(n)) : console.warn("⚠️ Implements no operations."), r === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${r ?? "unknown"}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.operations = n, t.usageId = r ?? "unknown", await zn("config.json", t), t;
|
|
6917
6893
|
}
|
|
6918
|
-
async function
|
|
6894
|
+
async function Ri() {
|
|
6919
6895
|
try {
|
|
6920
6896
|
G("Publish Project");
|
|
6921
|
-
let e = await W("package.json"), t = await W("config.json"), n =
|
|
6922
|
-
if (n.typeId === "app") q("1️⃣ Register module"), await
|
|
6923
|
-
else if (n.typeId === "engine") q("1️⃣ Register module"), await
|
|
6897
|
+
let e = await W("package.json"), t = await W("config.json"), n = Vn(t.id);
|
|
6898
|
+
if (n.typeId === "app") q("1️⃣ Register module"), await hi();
|
|
6899
|
+
else if (n.typeId === "engine") q("1️⃣ Register module"), await vi(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await _i(t);
|
|
6924
6900
|
else if (n.uploadGroupName === void 0) q("1️⃣ Publishing NOT required.");
|
|
6925
6901
|
else {
|
|
6926
6902
|
q("1️⃣ Register module");
|
|
6927
6903
|
let r = t.id.split("-").slice(2).join("-");
|
|
6928
|
-
await
|
|
6904
|
+
await vi(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await _i(t);
|
|
6929
6905
|
}
|
|
6930
6906
|
K(`Project version '${e.version ?? "unknown"}' published.`);
|
|
6931
6907
|
} catch (e) {
|
|
6932
6908
|
console.error("❌ Error publishing project.", e), process.exit(1);
|
|
6933
6909
|
}
|
|
6934
6910
|
}
|
|
6935
|
-
async function
|
|
6911
|
+
async function zi() {
|
|
6936
6912
|
try {
|
|
6937
6913
|
G("Synchronise Project with GitHub");
|
|
6938
6914
|
let e = await W("package.json"), t = await W("config.json");
|
|
6939
|
-
switch (await
|
|
6915
|
+
switch (await Vi("1️⃣ ", e), Vn(t.id).typeId) {
|
|
6940
6916
|
case "connector":
|
|
6941
|
-
await
|
|
6917
|
+
await Ni("2️⃣ ", e);
|
|
6942
6918
|
break;
|
|
6943
6919
|
case "context":
|
|
6944
|
-
await
|
|
6920
|
+
await Pi("2️⃣ ", e);
|
|
6945
6921
|
break;
|
|
6946
6922
|
case "presenter":
|
|
6947
|
-
await
|
|
6923
|
+
await Fi("2️⃣ ", e);
|
|
6948
6924
|
break;
|
|
6949
|
-
default: await
|
|
6925
|
+
default: await Mi("2️⃣ ", e);
|
|
6950
6926
|
}
|
|
6951
|
-
await
|
|
6927
|
+
await Pn("3️⃣ Stage changes", "git", ["add", "."]), await Pn("4️⃣ Commit changes", "git", [
|
|
6952
6928
|
"commit",
|
|
6953
6929
|
"-m",
|
|
6954
6930
|
`"v${e.version ?? "unknown"}"`
|
|
6955
|
-
]), await
|
|
6931
|
+
]), await Pn("5️⃣ Push changes", "git", [
|
|
6956
6932
|
"push",
|
|
6957
6933
|
"origin",
|
|
6958
6934
|
"main:main"
|
|
@@ -6961,22 +6937,22 @@ async function Hi() {
|
|
|
6961
6937
|
console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
|
|
6962
6938
|
}
|
|
6963
6939
|
}
|
|
6964
|
-
function
|
|
6940
|
+
function Bi() {
|
|
6965
6941
|
try {
|
|
6966
6942
|
G("Test Project"), console.error("\n❌ No tests implemented.\n");
|
|
6967
6943
|
} catch (e) {
|
|
6968
6944
|
console.error("❌ Error testing project.", e), process.exit(1);
|
|
6969
6945
|
}
|
|
6970
6946
|
}
|
|
6971
|
-
async function
|
|
6947
|
+
async function Vi(e, t, n = "./") {
|
|
6972
6948
|
if (q(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
|
|
6973
6949
|
else {
|
|
6974
6950
|
let e = t.version, n = t.version.split(".");
|
|
6975
6951
|
t.version = `${n[0] ?? "unknown"}.${n[1] ?? "unknown"}.${String(Number(n[2]) + 1)}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`);
|
|
6976
6952
|
}
|
|
6977
|
-
await
|
|
6953
|
+
await zn(`${n}package.json`, t);
|
|
6978
6954
|
}
|
|
6979
6955
|
//#endregion
|
|
6980
|
-
export {
|
|
6956
|
+
export { Kn as auditDependencies, Ai as buildProject, qn as checkConfigFiles, Yn as checkDependencies, nr as documentBundleSizes, _r as documentDependencies, fi as documentOperations, pi as formatCode, mi as lintCode, Ri as publishProject, ji as releaseProject, zi as syncProjectWithGitHub, Bi as testProject, gi as uploadDirectoryToR2 };
|
|
6981
6957
|
|
|
6982
6958
|
//# sourceMappingURL=dpuse-development.es.js.map
|