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