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