@datapos/datapos-development 0.3.152 → 0.3.154
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/datapos-development.es.js +459 -471
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { exec as Ei } from "node:child_process";
|
|
2
|
-
import { promises as
|
|
2
|
+
import { promises as R } from "node:fs";
|
|
3
3
|
import { nanoid as Ii } from "nanoid";
|
|
4
4
|
import { promisify as Ni } from "node:util";
|
|
5
|
-
var _i = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239],
|
|
5
|
+
var _i = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239], je = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], Li = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", Ue = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", oe = {
|
|
6
6
|
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",
|
|
7
7
|
5: "class enum extends super const export import",
|
|
8
8
|
6: "enum",
|
|
9
9
|
strict: "implements interface let package private protected public static yield",
|
|
10
10
|
strictBind: "eval arguments"
|
|
11
|
-
},
|
|
12
|
-
5:
|
|
13
|
-
"5module":
|
|
14
|
-
6:
|
|
15
|
-
}, Ri = /^in(stanceof)?$/, Mi = new RegExp("[" +
|
|
16
|
-
function
|
|
11
|
+
}, he = "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", Oi = {
|
|
12
|
+
5: he,
|
|
13
|
+
"5module": he + " export import",
|
|
14
|
+
6: he + " const class extends export import super"
|
|
15
|
+
}, Ri = /^in(stanceof)?$/, Mi = new RegExp("[" + Ue + "]"), Di = new RegExp("[" + Ue + Li + "]");
|
|
16
|
+
function le(t, e) {
|
|
17
17
|
for (var r = 65536, a = 0; a < e.length; a += 2) {
|
|
18
18
|
if (r += e[a], r > t)
|
|
19
19
|
return !1;
|
|
@@ -23,10 +23,10 @@ function me(t, e) {
|
|
|
23
23
|
return !1;
|
|
24
24
|
}
|
|
25
25
|
function pt(t, e) {
|
|
26
|
-
return t < 65 ? t === 36 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 && Mi.test(String.fromCharCode(t)) : e === !1 ? !1 :
|
|
26
|
+
return t < 65 ? t === 36 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 && Mi.test(String.fromCharCode(t)) : e === !1 ? !1 : le(t, je);
|
|
27
27
|
}
|
|
28
28
|
function dt(t, e) {
|
|
29
|
-
return t < 48 ? t === 36 : t < 58 ? !0 : t < 65 ? !1 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 && Di.test(String.fromCharCode(t)) : e === !1 ? !1 :
|
|
29
|
+
return t < 48 ? t === 36 : t < 58 ? !0 : t < 65 ? !1 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 && Di.test(String.fromCharCode(t)) : e === !1 ? !1 : le(t, je) || le(t, _i);
|
|
30
30
|
}
|
|
31
31
|
var O = function(e, r) {
|
|
32
32
|
r === void 0 && (r = {}), this.label = e, this.keyword = r.keyword, this.beforeExpr = !!r.beforeExpr, this.startsExpr = !!r.startsExpr, this.isLoop = !!r.isLoop, this.isAssign = !!r.isAssign, this.prefix = !!r.prefix, this.postfix = !!r.postfix, this.binop = r.binop || null, this.updateContext = null;
|
|
@@ -34,9 +34,9 @@ var O = function(e, r) {
|
|
|
34
34
|
function ot(t, e) {
|
|
35
35
|
return new O(t, { beforeExpr: !0, binop: e });
|
|
36
36
|
}
|
|
37
|
-
var ht = { beforeExpr: !0 }, st = { startsExpr: !0 },
|
|
37
|
+
var ht = { beforeExpr: !0 }, st = { startsExpr: !0 }, kt = {};
|
|
38
38
|
function F(t, e) {
|
|
39
|
-
return e === void 0 && (e = {}), e.keyword = t,
|
|
39
|
+
return e === void 0 && (e = {}), e.keyword = t, kt[t] = new O(t, e);
|
|
40
40
|
}
|
|
41
41
|
var h = {
|
|
42
42
|
num: new O("num", st),
|
|
@@ -131,48 +131,48 @@ var h = {
|
|
|
131
131
|
_typeof: F("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
132
132
|
_void: F("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }),
|
|
133
133
|
_delete: F("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 })
|
|
134
|
-
},
|
|
135
|
-
function
|
|
134
|
+
}, Z = /\r\n?|\n|\u2028|\u2029/, qe = new RegExp(Z.source, "g");
|
|
135
|
+
function Tt(t) {
|
|
136
136
|
return t === 10 || t === 13 || t === 8232 || t === 8233;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function He(t, e, r) {
|
|
139
139
|
r === void 0 && (r = t.length);
|
|
140
140
|
for (var a = e; a < r; a++) {
|
|
141
141
|
var u = t.charCodeAt(a);
|
|
142
|
-
if (
|
|
142
|
+
if (Tt(u))
|
|
143
143
|
return a < r - 1 && u === 13 && t.charCodeAt(a + 1) === 10 ? a + 2 : a + 1;
|
|
144
144
|
}
|
|
145
145
|
return -1;
|
|
146
146
|
}
|
|
147
|
-
var
|
|
147
|
+
var ye = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, X = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, ze = Object.prototype, Vi = ze.hasOwnProperty, Fi = ze.toString, wt = Object.hasOwn || (function(t, e) {
|
|
148
148
|
return Vi.call(t, e);
|
|
149
|
-
}),
|
|
149
|
+
}), Ee = Array.isArray || (function(t) {
|
|
150
150
|
return Fi.call(t) === "[object Array]";
|
|
151
|
-
}),
|
|
151
|
+
}), Ie = /* @__PURE__ */ Object.create(null);
|
|
152
152
|
function bt(t) {
|
|
153
|
-
return
|
|
153
|
+
return Ie[t] || (Ie[t] = new RegExp("^(?:" + t.replace(/ /g, "|") + ")$"));
|
|
154
154
|
}
|
|
155
155
|
function mt(t) {
|
|
156
156
|
return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320));
|
|
157
157
|
}
|
|
158
|
-
var Bi = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,
|
|
158
|
+
var Bi = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, At = function(e, r) {
|
|
159
159
|
this.line = e, this.column = r;
|
|
160
160
|
};
|
|
161
|
-
|
|
162
|
-
return new
|
|
161
|
+
At.prototype.offset = function(e) {
|
|
162
|
+
return new At(this.line, this.column + e);
|
|
163
163
|
};
|
|
164
|
-
var
|
|
164
|
+
var Ft = function(e, r, a) {
|
|
165
165
|
this.start = r, this.end = a, e.sourceFile !== null && (this.source = e.sourceFile);
|
|
166
166
|
};
|
|
167
|
-
function
|
|
167
|
+
function xe(t, e) {
|
|
168
168
|
for (var r = 1, a = 0; ; ) {
|
|
169
|
-
var u =
|
|
169
|
+
var u = He(t, a, e);
|
|
170
170
|
if (u < 0)
|
|
171
|
-
return new
|
|
171
|
+
return new At(r, e - a);
|
|
172
172
|
++r, a = u;
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
-
var
|
|
175
|
+
var Kt = {
|
|
176
176
|
// `ecmaVersion` indicates the ECMAScript version to parse. Must be
|
|
177
177
|
// either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
|
|
178
178
|
// (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
|
|
@@ -268,19 +268,19 @@ var Gt = {
|
|
|
268
268
|
// When enabled, parenthesized expressions are represented by
|
|
269
269
|
// (non-standard) ParenthesizedExpression nodes
|
|
270
270
|
preserveParens: !1
|
|
271
|
-
},
|
|
271
|
+
}, Ne = !1;
|
|
272
272
|
function ji(t) {
|
|
273
273
|
var e = {};
|
|
274
|
-
for (var r in
|
|
275
|
-
e[r] = t &&
|
|
276
|
-
if (e.ecmaVersion === "latest" ? e.ecmaVersion = 1e8 : e.ecmaVersion == null ? (!
|
|
277
|
-
Defaulting to 2020, but this will stop working in the future.`)), e.ecmaVersion = 11) : e.ecmaVersion >= 2015 && (e.ecmaVersion -= 2009), e.allowReserved == null && (e.allowReserved = e.ecmaVersion < 5), (!t || t.allowHashBang == null) && (e.allowHashBang = e.ecmaVersion >= 14),
|
|
274
|
+
for (var r in Kt)
|
|
275
|
+
e[r] = t && wt(t, r) ? t[r] : Kt[r];
|
|
276
|
+
if (e.ecmaVersion === "latest" ? e.ecmaVersion = 1e8 : e.ecmaVersion == null ? (!Ne && typeof console == "object" && console.warn && (Ne = !0, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
277
|
+
Defaulting to 2020, but this will stop working in the future.`)), e.ecmaVersion = 11) : e.ecmaVersion >= 2015 && (e.ecmaVersion -= 2009), e.allowReserved == null && (e.allowReserved = e.ecmaVersion < 5), (!t || t.allowHashBang == null) && (e.allowHashBang = e.ecmaVersion >= 14), Ee(e.onToken)) {
|
|
278
278
|
var a = e.onToken;
|
|
279
279
|
e.onToken = function(u) {
|
|
280
280
|
return a.push(u);
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
|
-
return
|
|
283
|
+
return Ee(e.onComment) && (e.onComment = Ui(e, e.onComment)), e;
|
|
284
284
|
}
|
|
285
285
|
function Ui(t, e) {
|
|
286
286
|
return function(r, a, u, f, d, v) {
|
|
@@ -290,50 +290,50 @@ function Ui(t, e) {
|
|
|
290
290
|
start: u,
|
|
291
291
|
end: f
|
|
292
292
|
};
|
|
293
|
-
t.locations && (g.loc = new
|
|
293
|
+
t.locations && (g.loc = new Ft(this, d, v)), t.ranges && (g.range = [u, f]), e.push(g);
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
|
-
var
|
|
297
|
-
function
|
|
298
|
-
return
|
|
296
|
+
var Vt = 1, Et = 2, ve = 4, We = 8, ge = 16, Ke = 32, Yt = 64, Je = 128, Pt = 256, Bt = 512, Zt = Vt | Et | Pt;
|
|
297
|
+
function be(t, e) {
|
|
298
|
+
return Et | (t ? ve : 0) | (e ? We : 0);
|
|
299
299
|
}
|
|
300
|
-
var
|
|
300
|
+
var Jt = 0, Se = 1, xt = 2, Ge = 3, $e = 4, Xe = 5, K = function(e, r, a) {
|
|
301
301
|
this.options = e = ji(e), this.sourceFile = e.sourceFile, this.keywords = bt(Oi[e.ecmaVersion >= 6 ? 6 : e.sourceType === "module" ? "5module" : 5]);
|
|
302
302
|
var u = "";
|
|
303
|
-
e.allowReserved !== !0 && (u =
|
|
304
|
-
var f = (u ? u + " " : "") +
|
|
305
|
-
this.reservedWordsStrict = bt(f), this.reservedWordsStrictBind = bt(f + " " +
|
|
306
|
-
`, a - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(
|
|
303
|
+
e.allowReserved !== !0 && (u = oe[e.ecmaVersion >= 6 ? 6 : e.ecmaVersion === 5 ? 5 : 3], e.sourceType === "module" && (u += " await")), this.reservedWords = bt(u);
|
|
304
|
+
var f = (u ? u + " " : "") + oe.strict;
|
|
305
|
+
this.reservedWordsStrict = bt(f), this.reservedWordsStrictBind = bt(f + " " + oe.strictBind), this.input = String(r), this.containsEsc = !1, a ? (this.pos = a, this.lineStart = this.input.lastIndexOf(`
|
|
306
|
+
`, a - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(Z).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = h.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 || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = /* @__PURE__ */ Object.create(null), this.pos === 0 && e.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(Vt), this.regexpState = null, this.privateNameStack = [];
|
|
307
307
|
}, lt = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, canAwait: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 }, allowNewDotTarget: { configurable: !0 }, inClassStaticBlock: { configurable: !0 } };
|
|
308
308
|
K.prototype.parse = function() {
|
|
309
309
|
var e = this.options.program || this.startNode();
|
|
310
310
|
return this.nextToken(), this.parseTopLevel(e);
|
|
311
311
|
};
|
|
312
312
|
lt.inFunction.get = function() {
|
|
313
|
-
return (this.currentVarScope().flags &
|
|
313
|
+
return (this.currentVarScope().flags & Et) > 0;
|
|
314
314
|
};
|
|
315
315
|
lt.inGenerator.get = function() {
|
|
316
|
-
return (this.currentVarScope().flags &
|
|
316
|
+
return (this.currentVarScope().flags & We) > 0;
|
|
317
317
|
};
|
|
318
318
|
lt.inAsync.get = function() {
|
|
319
|
-
return (this.currentVarScope().flags &
|
|
319
|
+
return (this.currentVarScope().flags & ve) > 0;
|
|
320
320
|
};
|
|
321
321
|
lt.canAwait.get = function() {
|
|
322
322
|
for (var t = this.scopeStack.length - 1; t >= 0; t--) {
|
|
323
323
|
var e = this.scopeStack[t], r = e.flags;
|
|
324
|
-
if (r & (
|
|
324
|
+
if (r & (Pt | Bt))
|
|
325
325
|
return !1;
|
|
326
|
-
if (r &
|
|
327
|
-
return (r &
|
|
326
|
+
if (r & Et)
|
|
327
|
+
return (r & ve) > 0;
|
|
328
328
|
}
|
|
329
329
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
330
330
|
};
|
|
331
331
|
lt.allowSuper.get = function() {
|
|
332
332
|
var t = this.currentThisScope(), e = t.flags;
|
|
333
|
-
return (e &
|
|
333
|
+
return (e & Yt) > 0 || this.options.allowSuperOutsideMethod;
|
|
334
334
|
};
|
|
335
335
|
lt.allowDirectSuper.get = function() {
|
|
336
|
-
return (this.currentThisScope().flags &
|
|
336
|
+
return (this.currentThisScope().flags & Je) > 0;
|
|
337
337
|
};
|
|
338
338
|
lt.treatFunctionsAsVar.get = function() {
|
|
339
339
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
@@ -341,13 +341,13 @@ lt.treatFunctionsAsVar.get = function() {
|
|
|
341
341
|
lt.allowNewDotTarget.get = function() {
|
|
342
342
|
for (var t = this.scopeStack.length - 1; t >= 0; t--) {
|
|
343
343
|
var e = this.scopeStack[t], r = e.flags;
|
|
344
|
-
if (r & (
|
|
344
|
+
if (r & (Pt | Bt) || r & Et && !(r & ge))
|
|
345
345
|
return !0;
|
|
346
346
|
}
|
|
347
347
|
return !1;
|
|
348
348
|
};
|
|
349
349
|
lt.inClassStaticBlock.get = function() {
|
|
350
|
-
return (this.currentVarScope().flags &
|
|
350
|
+
return (this.currentVarScope().flags & Pt) > 0;
|
|
351
351
|
};
|
|
352
352
|
K.extend = function() {
|
|
353
353
|
for (var e = [], r = arguments.length; r--; ) e[r] = arguments[r];
|
|
@@ -366,66 +366,66 @@ K.tokenizer = function(e, r) {
|
|
|
366
366
|
return new this(r, e);
|
|
367
367
|
};
|
|
368
368
|
Object.defineProperties(K.prototype, lt);
|
|
369
|
-
var
|
|
370
|
-
|
|
369
|
+
var tt = K.prototype, qi = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
370
|
+
tt.strictDirective = function(t) {
|
|
371
371
|
if (this.options.ecmaVersion < 5)
|
|
372
372
|
return !1;
|
|
373
373
|
for (; ; ) {
|
|
374
|
-
|
|
374
|
+
X.lastIndex = t, t += X.exec(this.input)[0].length;
|
|
375
375
|
var e = qi.exec(this.input.slice(t));
|
|
376
376
|
if (!e)
|
|
377
377
|
return !1;
|
|
378
378
|
if ((e[1] || e[2]) === "use strict") {
|
|
379
|
-
|
|
380
|
-
var r =
|
|
381
|
-
return u === ";" || u === "}" ||
|
|
379
|
+
X.lastIndex = t + e[0].length;
|
|
380
|
+
var r = X.exec(this.input), a = r.index + r[0].length, u = this.input.charAt(a);
|
|
381
|
+
return u === ";" || u === "}" || Z.test(r[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(u) || u === "!" && this.input.charAt(a + 1) === "=");
|
|
382
382
|
}
|
|
383
|
-
t += e[0].length,
|
|
383
|
+
t += e[0].length, X.lastIndex = t, t += X.exec(this.input)[0].length, this.input[t] === ";" && t++;
|
|
384
384
|
}
|
|
385
385
|
};
|
|
386
|
-
|
|
386
|
+
tt.eat = function(t) {
|
|
387
387
|
return this.type === t ? (this.next(), !0) : !1;
|
|
388
388
|
};
|
|
389
|
-
|
|
389
|
+
tt.isContextual = function(t) {
|
|
390
390
|
return this.type === h.name && this.value === t && !this.containsEsc;
|
|
391
391
|
};
|
|
392
|
-
|
|
392
|
+
tt.eatContextual = function(t) {
|
|
393
393
|
return this.isContextual(t) ? (this.next(), !0) : !1;
|
|
394
394
|
};
|
|
395
|
-
|
|
395
|
+
tt.expectContextual = function(t) {
|
|
396
396
|
this.eatContextual(t) || this.unexpected();
|
|
397
397
|
};
|
|
398
|
-
|
|
399
|
-
return this.type === h.eof || this.type === h.braceR ||
|
|
398
|
+
tt.canInsertSemicolon = function() {
|
|
399
|
+
return this.type === h.eof || this.type === h.braceR || Z.test(this.input.slice(this.lastTokEnd, this.start));
|
|
400
400
|
};
|
|
401
|
-
|
|
401
|
+
tt.insertSemicolon = function() {
|
|
402
402
|
if (this.canInsertSemicolon())
|
|
403
403
|
return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0;
|
|
404
404
|
};
|
|
405
|
-
|
|
405
|
+
tt.semicolon = function() {
|
|
406
406
|
!this.eat(h.semi) && !this.insertSemicolon() && this.unexpected();
|
|
407
407
|
};
|
|
408
|
-
|
|
408
|
+
tt.afterTrailingComma = function(t, e) {
|
|
409
409
|
if (this.type === t)
|
|
410
410
|
return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), e || this.next(), !0;
|
|
411
411
|
};
|
|
412
|
-
|
|
412
|
+
tt.expect = function(t) {
|
|
413
413
|
this.eat(t) || this.unexpected();
|
|
414
414
|
};
|
|
415
|
-
|
|
415
|
+
tt.unexpected = function(t) {
|
|
416
416
|
this.raise(t ?? this.start, "Unexpected token");
|
|
417
417
|
};
|
|
418
|
-
var
|
|
418
|
+
var te = function() {
|
|
419
419
|
this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
|
|
420
420
|
};
|
|
421
|
-
|
|
421
|
+
tt.checkPatternErrors = function(t, e) {
|
|
422
422
|
if (t) {
|
|
423
423
|
t.trailingComma > -1 && this.raiseRecoverable(t.trailingComma, "Comma is not permitted after the rest element");
|
|
424
424
|
var r = e ? t.parenthesizedAssign : t.parenthesizedBind;
|
|
425
425
|
r > -1 && this.raiseRecoverable(r, e ? "Assigning to rvalue" : "Parenthesized pattern");
|
|
426
426
|
}
|
|
427
427
|
};
|
|
428
|
-
|
|
428
|
+
tt.checkExpressionErrors = function(t, e) {
|
|
429
429
|
if (!t)
|
|
430
430
|
return !1;
|
|
431
431
|
var r = t.shorthandAssign, a = t.doubleProto;
|
|
@@ -433,10 +433,10 @@ et.checkExpressionErrors = function(t, e) {
|
|
|
433
433
|
return r >= 0 || a >= 0;
|
|
434
434
|
r >= 0 && this.raise(r, "Shorthand property assignments are valid only in destructuring patterns"), a >= 0 && this.raiseRecoverable(a, "Redefinition of __proto__ property");
|
|
435
435
|
};
|
|
436
|
-
|
|
436
|
+
tt.checkYieldAwaitInDefaultParams = function() {
|
|
437
437
|
this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos) && this.raise(this.yieldPos, "Yield expression cannot be a default value"), this.awaitPos && this.raise(this.awaitPos, "Await expression cannot be a default value");
|
|
438
438
|
};
|
|
439
|
-
|
|
439
|
+
tt.isSimpleAssignTarget = function(t) {
|
|
440
440
|
return t.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(t.expression) : t.type === "Identifier" || t.type === "MemberExpression";
|
|
441
441
|
};
|
|
442
442
|
var k = K.prototype;
|
|
@@ -453,12 +453,12 @@ k.parseTopLevel = function(t) {
|
|
|
453
453
|
}
|
|
454
454
|
return this.adaptDirectivePrologue(t.body), this.next(), t.sourceType = this.options.sourceType, this.finishNode(t, "Program");
|
|
455
455
|
};
|
|
456
|
-
var
|
|
456
|
+
var Te = { kind: "loop" }, Hi = { kind: "switch" };
|
|
457
457
|
k.isLet = function(t) {
|
|
458
458
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
|
|
459
459
|
return !1;
|
|
460
|
-
|
|
461
|
-
var e =
|
|
460
|
+
X.lastIndex = this.pos;
|
|
461
|
+
var e = X.exec(this.input), r = this.pos + e[0].length, a = this.input.charCodeAt(r);
|
|
462
462
|
if (a === 91 || a === 92)
|
|
463
463
|
return !0;
|
|
464
464
|
if (t)
|
|
@@ -479,24 +479,24 @@ k.isLet = function(t) {
|
|
|
479
479
|
k.isAsyncFunction = function() {
|
|
480
480
|
if (this.options.ecmaVersion < 8 || !this.isContextual("async"))
|
|
481
481
|
return !1;
|
|
482
|
-
|
|
483
|
-
var t =
|
|
484
|
-
return !
|
|
482
|
+
X.lastIndex = this.pos;
|
|
483
|
+
var t = X.exec(this.input), e = this.pos + t[0].length, r;
|
|
484
|
+
return !Z.test(this.input.slice(this.pos, e)) && this.input.slice(e, e + 8) === "function" && (e + 8 === this.input.length || !(dt(r = this.input.charCodeAt(e + 8)) || r > 55295 && r < 56320));
|
|
485
485
|
};
|
|
486
486
|
k.isUsingKeyword = function(t, e) {
|
|
487
487
|
if (this.options.ecmaVersion < 17 || !this.isContextual(t ? "await" : "using"))
|
|
488
488
|
return !1;
|
|
489
|
-
|
|
490
|
-
var r =
|
|
491
|
-
if (
|
|
489
|
+
X.lastIndex = this.pos;
|
|
490
|
+
var r = X.exec(this.input), a = this.pos + r[0].length;
|
|
491
|
+
if (Z.test(this.input.slice(this.pos, a)))
|
|
492
492
|
return !1;
|
|
493
493
|
if (t) {
|
|
494
494
|
var u = a + 5, f;
|
|
495
495
|
if (this.input.slice(a, u) !== "using" || u === this.input.length || dt(f = this.input.charCodeAt(u)) || f > 55295 && f < 56320)
|
|
496
496
|
return !1;
|
|
497
|
-
|
|
498
|
-
var d =
|
|
499
|
-
if (d &&
|
|
497
|
+
X.lastIndex = u;
|
|
498
|
+
var d = X.exec(this.input);
|
|
499
|
+
if (d && Z.test(this.input.slice(u, u + d[0].length)))
|
|
500
500
|
return !1;
|
|
501
501
|
}
|
|
502
502
|
if (e) {
|
|
@@ -553,8 +553,8 @@ k.parseStatement = function(t, e, r) {
|
|
|
553
553
|
case h._export:
|
|
554
554
|
case h._import:
|
|
555
555
|
if (this.options.ecmaVersion > 10 && a === h._import) {
|
|
556
|
-
|
|
557
|
-
var d =
|
|
556
|
+
X.lastIndex = this.pos;
|
|
557
|
+
var d = X.exec(this.input), v = this.pos + d[0].length, g = this.input.charCodeAt(v);
|
|
558
558
|
if (g === 40 || g === 46)
|
|
559
559
|
return this.parseExpressionStatement(u, this.parseExpression());
|
|
560
560
|
}
|
|
@@ -588,12 +588,12 @@ k.parseDebuggerStatement = function(t) {
|
|
|
588
588
|
return this.next(), this.semicolon(), this.finishNode(t, "DebuggerStatement");
|
|
589
589
|
};
|
|
590
590
|
k.parseDoStatement = function(t) {
|
|
591
|
-
return this.next(), this.labels.push(
|
|
591
|
+
return this.next(), this.labels.push(Te), t.body = this.parseStatement("do"), this.labels.pop(), this.expect(h._while), t.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(h.semi) : this.semicolon(), this.finishNode(t, "DoWhileStatement");
|
|
592
592
|
};
|
|
593
593
|
k.parseForStatement = function(t) {
|
|
594
594
|
this.next();
|
|
595
595
|
var e = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
596
|
-
if (this.labels.push(
|
|
596
|
+
if (this.labels.push(Te), this.enterScope(0), this.expect(h.parenL), this.type === h.semi)
|
|
597
597
|
return e > -1 && this.unexpected(e), this.parseFor(t, null);
|
|
598
598
|
var r = this.isLet();
|
|
599
599
|
if (this.type === h._var || this.type === h._const || r) {
|
|
@@ -605,14 +605,14 @@ k.parseForStatement = function(t) {
|
|
|
605
605
|
var g = this.startNode();
|
|
606
606
|
return this.next(), v === "await using" && this.next(), this.parseVar(g, !0, v), this.finishNode(g, "VariableDeclaration"), this.parseForAfterInit(t, g, e);
|
|
607
607
|
}
|
|
608
|
-
var o = this.containsEsc, w = new
|
|
609
|
-
return this.type === h._in || (d = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (e > -1 ? (this.type === h._in && this.unexpected(e), t.await = !0) : d && this.options.ecmaVersion >= 8 && (
|
|
608
|
+
var o = this.containsEsc, w = new te(), _ = this.start, M = e > -1 ? this.parseExprSubscripts(w, "await") : this.parseExpression(!0, w);
|
|
609
|
+
return this.type === h._in || (d = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (e > -1 ? (this.type === h._in && this.unexpected(e), t.await = !0) : d && this.options.ecmaVersion >= 8 && (M.start === _ && !o && M.type === "Identifier" && M.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (t.await = !1)), f && d && this.raise(M.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(M, !1, w), this.checkLValPattern(M), this.parseForIn(t, M)) : (this.checkExpressionErrors(w, !0), e > -1 && this.unexpected(e), this.parseFor(t, M));
|
|
610
610
|
};
|
|
611
611
|
k.parseForAfterInit = function(t, e, r) {
|
|
612
612
|
return (this.type === h._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && e.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === h._in ? r > -1 && this.unexpected(r) : t.await = r > -1), this.parseForIn(t, e)) : (r > -1 && this.unexpected(r), this.parseFor(t, e));
|
|
613
613
|
};
|
|
614
614
|
k.parseFunctionStatement = function(t, e, r) {
|
|
615
|
-
return this.next(), this.parseFunction(t,
|
|
615
|
+
return this.next(), this.parseFunction(t, Rt | (r ? 0 : fe), !1, e);
|
|
616
616
|
};
|
|
617
617
|
k.parseIfStatement = function(t) {
|
|
618
618
|
return this.next(), t.test = this.parseParenExpression(), t.consequent = this.parseStatement("if"), t.alternate = this.eat(h._else) ? this.parseStatement("if") : null, this.finishNode(t, "IfStatement");
|
|
@@ -631,12 +631,12 @@ k.parseSwitchStatement = function(t) {
|
|
|
631
631
|
return this.exitScope(), e && this.finishNode(e, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(t, "SwitchStatement");
|
|
632
632
|
};
|
|
633
633
|
k.parseThrowStatement = function(t) {
|
|
634
|
-
return this.next(),
|
|
634
|
+
return this.next(), Z.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), t.argument = this.parseExpression(), this.semicolon(), this.finishNode(t, "ThrowStatement");
|
|
635
635
|
};
|
|
636
636
|
var zi = [];
|
|
637
637
|
k.parseCatchClauseParam = function() {
|
|
638
638
|
var t = this.parseBindingAtom(), e = t.type === "Identifier";
|
|
639
|
-
return this.enterScope(e ?
|
|
639
|
+
return this.enterScope(e ? Ke : 0), this.checkLValPattern(t, e ? $e : xt), this.expect(h.parenR), t;
|
|
640
640
|
};
|
|
641
641
|
k.parseTryStatement = function(t) {
|
|
642
642
|
if (this.next(), t.block = this.parseBlock(), t.handler = null, this.type === h._catch) {
|
|
@@ -649,7 +649,7 @@ k.parseVarStatement = function(t, e, r) {
|
|
|
649
649
|
return this.next(), this.parseVar(t, !1, e, r), this.semicolon(), this.finishNode(t, "VariableDeclaration");
|
|
650
650
|
};
|
|
651
651
|
k.parseWhileStatement = function(t) {
|
|
652
|
-
return this.next(), t.test = this.parseParenExpression(), this.labels.push(
|
|
652
|
+
return this.next(), t.test = this.parseParenExpression(), this.labels.push(Te), t.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(t, "WhileStatement");
|
|
653
653
|
};
|
|
654
654
|
k.parseWithStatement = function(t) {
|
|
655
655
|
return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), t.object = this.parseParenExpression(), t.body = this.parseStatement("with"), this.finishNode(t, "WithStatement");
|
|
@@ -700,13 +700,13 @@ k.parseVar = function(t, e, r, a) {
|
|
|
700
700
|
return t;
|
|
701
701
|
};
|
|
702
702
|
k.parseVarId = function(t, e) {
|
|
703
|
-
t.id = e === "using" || e === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(t.id, e === "var" ?
|
|
703
|
+
t.id = e === "using" || e === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(t.id, e === "var" ? Se : xt, !1);
|
|
704
704
|
};
|
|
705
|
-
var
|
|
705
|
+
var Rt = 1, fe = 2, Qe = 4;
|
|
706
706
|
k.parseFunction = function(t, e, r, a, u) {
|
|
707
|
-
this.initFunction(t), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !a) && (this.type === h.star && e &
|
|
707
|
+
this.initFunction(t), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !a) && (this.type === h.star && e & fe && this.unexpected(), t.generator = this.eat(h.star)), this.options.ecmaVersion >= 8 && (t.async = !!a), e & Rt && (t.id = e & Qe && this.type !== h.name ? null : this.parseIdent(), t.id && !(e & fe) && this.checkLValSimple(t.id, this.strict || t.generator || t.async ? this.treatFunctionsAsVar ? Se : xt : Ge));
|
|
708
708
|
var f = this.yieldPos, d = this.awaitPos, v = this.awaitIdentPos;
|
|
709
|
-
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
709
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(be(t.async, t.generator)), e & Rt || (t.id = this.type === h.name ? this.parseIdent() : null), this.parseFunctionParams(t), this.parseFunctionBody(t, r, !1, u), this.yieldPos = f, this.awaitPos = d, this.awaitIdentPos = v, this.finishNode(t, e & Rt ? "FunctionDeclaration" : "FunctionExpression");
|
|
710
710
|
};
|
|
711
711
|
k.parseFunctionParams = function(t) {
|
|
712
712
|
this.expect(h.parenL), t.params = this.parseBindingList(h.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
@@ -736,7 +736,7 @@ k.parseClassElement = function(t) {
|
|
|
736
736
|
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? d = g : a = g);
|
|
737
737
|
}
|
|
738
738
|
if (a ? (r.computed = !1, r.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), r.key.name = a, this.finishNode(r.key, "Identifier")) : this.parseClassElementName(r), e < 13 || this.type === h.parenL || d !== "method" || u || f) {
|
|
739
|
-
var o = !r.static &&
|
|
739
|
+
var o = !r.static && Gt(r, "constructor"), w = o && t;
|
|
740
740
|
o && d !== "method" && this.raise(r.key.start, "Constructor can't have get/set modifier"), r.kind = o ? "constructor" : d, this.parseClassMethod(r, u, f, w);
|
|
741
741
|
} else
|
|
742
742
|
this.parseClassField(r);
|
|
@@ -750,17 +750,17 @@ k.parseClassElementName = function(t) {
|
|
|
750
750
|
};
|
|
751
751
|
k.parseClassMethod = function(t, e, r, a) {
|
|
752
752
|
var u = t.key;
|
|
753
|
-
t.kind === "constructor" ? (e && this.raise(u.start, "Constructor can't be a generator"), r && this.raise(u.start, "Constructor can't be an async method")) : t.static &&
|
|
753
|
+
t.kind === "constructor" ? (e && this.raise(u.start, "Constructor can't be a generator"), r && this.raise(u.start, "Constructor can't be an async method")) : t.static && Gt(t, "prototype") && this.raise(u.start, "Classes may not have a static property named prototype");
|
|
754
754
|
var f = t.value = this.parseMethod(e, r, a);
|
|
755
755
|
return t.kind === "get" && f.params.length !== 0 && this.raiseRecoverable(f.start, "getter should have no params"), t.kind === "set" && f.params.length !== 1 && this.raiseRecoverable(f.start, "setter should have exactly one param"), t.kind === "set" && f.params[0].type === "RestElement" && this.raiseRecoverable(f.params[0].start, "Setter cannot use rest params"), this.finishNode(t, "MethodDefinition");
|
|
756
756
|
};
|
|
757
757
|
k.parseClassField = function(t) {
|
|
758
|
-
return
|
|
758
|
+
return Gt(t, "constructor") ? this.raise(t.key.start, "Classes can't have a field named 'constructor'") : t.static && Gt(t, "prototype") && this.raise(t.key.start, "Classes can't have a static field named 'prototype'"), this.eat(h.eq) ? (this.enterScope(Bt | Yt), t.value = this.parseMaybeAssign(), this.exitScope()) : t.value = null, this.semicolon(), this.finishNode(t, "PropertyDefinition");
|
|
759
759
|
};
|
|
760
760
|
k.parseClassStaticBlock = function(t) {
|
|
761
761
|
t.body = [];
|
|
762
762
|
var e = this.labels;
|
|
763
|
-
for (this.labels = [], this.enterScope(
|
|
763
|
+
for (this.labels = [], this.enterScope(Pt | Yt); this.type !== h.braceR; ) {
|
|
764
764
|
var r = this.parseStatement(null);
|
|
765
765
|
t.body.push(r);
|
|
766
766
|
}
|
|
@@ -781,14 +781,14 @@ k.exitClassBody = function() {
|
|
|
781
781
|
if (this.options.checkPrivateFields)
|
|
782
782
|
for (var a = this.privateNameStack.length, u = a === 0 ? null : this.privateNameStack[a - 1], f = 0; f < r.length; ++f) {
|
|
783
783
|
var d = r[f];
|
|
784
|
-
|
|
784
|
+
wt(e, d.name) || (u ? u.used.push(d) : this.raiseRecoverable(d.start, "Private field '#" + d.name + "' must be declared in an enclosing class"));
|
|
785
785
|
}
|
|
786
786
|
};
|
|
787
787
|
function Wi(t, e) {
|
|
788
788
|
var r = e.key.name, a = t[r], u = "true";
|
|
789
789
|
return e.type === "MethodDefinition" && (e.kind === "get" || e.kind === "set") && (u = (e.static ? "s" : "i") + e.kind), a === "iget" && u === "iset" || a === "iset" && u === "iget" || a === "sget" && u === "sset" || a === "sset" && u === "sget" ? (t[r] = "true", !1) : a ? !0 : (t[r] = u, !1);
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function Gt(t, e) {
|
|
792
792
|
var r = t.computed, a = t.key;
|
|
793
793
|
return !r && (a.type === "Identifier" && a.name === e || a.type === "Literal" && a.value === e);
|
|
794
794
|
}
|
|
@@ -823,7 +823,7 @@ k.parseExportDefaultDeclaration = function() {
|
|
|
823
823
|
var t;
|
|
824
824
|
if (this.type === h._function || (t = this.isAsyncFunction())) {
|
|
825
825
|
var e = this.startNode();
|
|
826
|
-
return this.next(), t && this.next(), this.parseFunction(e,
|
|
826
|
+
return this.next(), t && this.next(), this.parseFunction(e, Rt | Qe, !1, t);
|
|
827
827
|
} else if (this.type === h._class) {
|
|
828
828
|
var r = this.startNode();
|
|
829
829
|
return this.parseClass(r, "nullableID");
|
|
@@ -833,7 +833,7 @@ k.parseExportDefaultDeclaration = function() {
|
|
|
833
833
|
}
|
|
834
834
|
};
|
|
835
835
|
k.checkExport = function(t, e, r) {
|
|
836
|
-
t && (typeof e != "string" && (e = e.type === "Identifier" ? e.name : e.value),
|
|
836
|
+
t && (typeof e != "string" && (e = e.type === "Identifier" ? e.name : e.value), wt(t, e) && this.raiseRecoverable(r, "Duplicate export '" + e + "'"), t[e] = !0);
|
|
837
837
|
};
|
|
838
838
|
k.checkPatternExport = function(t, e) {
|
|
839
839
|
var r = e.type;
|
|
@@ -921,7 +921,7 @@ k.parseWithClause = function() {
|
|
|
921
921
|
else if (this.expect(h.comma), this.afterTrailingComma(h.braceR))
|
|
922
922
|
break;
|
|
923
923
|
var a = this.parseImportAttribute(), u = a.key.type === "Identifier" ? a.key.name : a.key.value;
|
|
924
|
-
|
|
924
|
+
wt(e, u) && this.raiseRecoverable(a.key.start, "Duplicate attribute key '" + u + "'"), e[u] = !0, t.push(a);
|
|
925
925
|
}
|
|
926
926
|
return t;
|
|
927
927
|
};
|
|
@@ -1050,11 +1050,11 @@ ct.parseMaybeDefault = function(t, e, r) {
|
|
|
1050
1050
|
return a.left = r, a.right = this.parseMaybeAssign(), this.finishNode(a, "AssignmentPattern");
|
|
1051
1051
|
};
|
|
1052
1052
|
ct.checkLValSimple = function(t, e, r) {
|
|
1053
|
-
e === void 0 && (e =
|
|
1054
|
-
var a = e !==
|
|
1053
|
+
e === void 0 && (e = Jt);
|
|
1054
|
+
var a = e !== Jt;
|
|
1055
1055
|
switch (t.type) {
|
|
1056
1056
|
case "Identifier":
|
|
1057
|
-
this.strict && this.reservedWordsStrictBind.test(t.name) && this.raiseRecoverable(t.start, (a ? "Binding " : "Assigning to ") + t.name + " in strict mode"), a && (e === xt && t.name === "let" && this.raiseRecoverable(t.start, "let is disallowed as a lexically bound name"), r && (
|
|
1057
|
+
this.strict && this.reservedWordsStrictBind.test(t.name) && this.raiseRecoverable(t.start, (a ? "Binding " : "Assigning to ") + t.name + " in strict mode"), a && (e === xt && t.name === "let" && this.raiseRecoverable(t.start, "let is disallowed as a lexically bound name"), r && (wt(r, t.name) && this.raiseRecoverable(t.start, "Argument name clash"), r[t.name] = !0), e !== Xe && this.declareName(t.name, e, t.start));
|
|
1058
1058
|
break;
|
|
1059
1059
|
case "ChainExpression":
|
|
1060
1060
|
this.raiseRecoverable(t.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -1069,7 +1069,7 @@ ct.checkLValSimple = function(t, e, r) {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
};
|
|
1071
1071
|
ct.checkLValPattern = function(t, e, r) {
|
|
1072
|
-
switch (e === void 0 && (e =
|
|
1072
|
+
switch (e === void 0 && (e = Jt), t.type) {
|
|
1073
1073
|
case "ObjectPattern":
|
|
1074
1074
|
for (var a = 0, u = t.properties; a < u.length; a += 1) {
|
|
1075
1075
|
var f = u[a];
|
|
@@ -1087,7 +1087,7 @@ ct.checkLValPattern = function(t, e, r) {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
};
|
|
1089
1089
|
ct.checkLValInnerPattern = function(t, e, r) {
|
|
1090
|
-
switch (e === void 0 && (e =
|
|
1090
|
+
switch (e === void 0 && (e = Jt), t.type) {
|
|
1091
1091
|
case "Property":
|
|
1092
1092
|
this.checkLValInnerPattern(t.value, e, r);
|
|
1093
1093
|
break;
|
|
@@ -1101,33 +1101,33 @@ ct.checkLValInnerPattern = function(t, e, r) {
|
|
|
1101
1101
|
this.checkLValPattern(t, e, r);
|
|
1102
1102
|
}
|
|
1103
1103
|
};
|
|
1104
|
-
var
|
|
1104
|
+
var Y = function(e, r, a, u, f) {
|
|
1105
1105
|
this.token = e, this.isExpr = !!r, this.preserveSpace = !!a, this.override = u, this.generator = !!f;
|
|
1106
1106
|
}, q = {
|
|
1107
|
-
b_stat: new
|
|
1108
|
-
b_expr: new
|
|
1109
|
-
b_tmpl: new
|
|
1110
|
-
p_stat: new
|
|
1111
|
-
p_expr: new
|
|
1112
|
-
q_tmpl: new
|
|
1107
|
+
b_stat: new Y("{", !1),
|
|
1108
|
+
b_expr: new Y("{", !0),
|
|
1109
|
+
b_tmpl: new Y("${", !1),
|
|
1110
|
+
p_stat: new Y("(", !1),
|
|
1111
|
+
p_expr: new Y("(", !0),
|
|
1112
|
+
q_tmpl: new Y("`", !0, !0, function(t) {
|
|
1113
1113
|
return t.tryReadTemplateToken();
|
|
1114
1114
|
}),
|
|
1115
|
-
f_stat: new
|
|
1116
|
-
f_expr: new
|
|
1117
|
-
f_expr_gen: new
|
|
1118
|
-
f_gen: new
|
|
1119
|
-
},
|
|
1120
|
-
|
|
1115
|
+
f_stat: new Y("function", !1),
|
|
1116
|
+
f_expr: new Y("function", !0),
|
|
1117
|
+
f_expr_gen: new Y("function", !0, !1, null, !0),
|
|
1118
|
+
f_gen: new Y("function", !1, !1, null, !0)
|
|
1119
|
+
}, It = K.prototype;
|
|
1120
|
+
It.initialContext = function() {
|
|
1121
1121
|
return [q.b_stat];
|
|
1122
1122
|
};
|
|
1123
|
-
|
|
1123
|
+
It.curContext = function() {
|
|
1124
1124
|
return this.context[this.context.length - 1];
|
|
1125
1125
|
};
|
|
1126
|
-
|
|
1126
|
+
It.braceIsBlock = function(t) {
|
|
1127
1127
|
var e = this.curContext();
|
|
1128
|
-
return e === q.f_expr || e === q.f_stat ? !0 : t === h.colon && (e === q.b_stat || e === q.b_expr) ? !e.isExpr : t === h._return || t === h.name && this.exprAllowed ?
|
|
1128
|
+
return e === q.f_expr || e === q.f_stat ? !0 : t === h.colon && (e === q.b_stat || e === q.b_expr) ? !e.isExpr : t === h._return || t === h.name && this.exprAllowed ? Z.test(this.input.slice(this.lastTokEnd, this.start)) : t === h._else || t === h.semi || t === h.eof || t === h.parenR || t === h.arrow ? !0 : t === h.braceL ? e === q.b_stat : t === h._var || t === h._const || t === h.name ? !1 : !this.exprAllowed;
|
|
1129
1129
|
};
|
|
1130
|
-
|
|
1130
|
+
It.inGeneratorContext = function() {
|
|
1131
1131
|
for (var t = this.context.length - 1; t >= 1; t--) {
|
|
1132
1132
|
var e = this.context[t];
|
|
1133
1133
|
if (e.token === "function")
|
|
@@ -1135,11 +1135,11 @@ Nt.inGeneratorContext = function() {
|
|
|
1135
1135
|
}
|
|
1136
1136
|
return !1;
|
|
1137
1137
|
};
|
|
1138
|
-
|
|
1138
|
+
It.updateContext = function(t) {
|
|
1139
1139
|
var e, r = this.type;
|
|
1140
1140
|
r.keyword && t === h.dot ? this.exprAllowed = !1 : (e = r.updateContext) ? e.call(this, t) : this.exprAllowed = r.beforeExpr;
|
|
1141
1141
|
};
|
|
1142
|
-
|
|
1142
|
+
It.overrideContext = function(t) {
|
|
1143
1143
|
this.curContext() !== t && (this.context[this.context.length - 1] = t);
|
|
1144
1144
|
};
|
|
1145
1145
|
h.parenR.updateContext = h.braceR.updateContext = function() {
|
|
@@ -1163,7 +1163,7 @@ h.parenL.updateContext = function(t) {
|
|
|
1163
1163
|
h.incDec.updateContext = function() {
|
|
1164
1164
|
};
|
|
1165
1165
|
h._function.updateContext = h._class.updateContext = function(t) {
|
|
1166
|
-
t.beforeExpr && t !== h._else && !(t === h.semi && this.curContext() !== q.p_stat) && !(t === h._return &&
|
|
1166
|
+
t.beforeExpr && t !== h._else && !(t === h.semi && this.curContext() !== q.p_stat) && !(t === h._return && Z.test(this.input.slice(this.lastTokEnd, this.start))) && !((t === h.colon || t === h.braceL) && this.curContext() === q.b_stat) ? this.context.push(q.f_expr) : this.context.push(q.f_stat), this.exprAllowed = !1;
|
|
1167
1167
|
};
|
|
1168
1168
|
h.colon.updateContext = function() {
|
|
1169
1169
|
this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0;
|
|
@@ -1232,7 +1232,7 @@ N.parseMaybeAssign = function(t, e, r) {
|
|
|
1232
1232
|
this.exprAllowed = !1;
|
|
1233
1233
|
}
|
|
1234
1234
|
var a = !1, u = -1, f = -1, d = -1;
|
|
1235
|
-
e ? (u = e.parenthesizedAssign, f = e.trailingComma, d = e.doubleProto, e.parenthesizedAssign = e.trailingComma = -1) : (e = new
|
|
1235
|
+
e ? (u = e.parenthesizedAssign, f = e.trailingComma, d = e.doubleProto, e.parenthesizedAssign = e.trailingComma = -1) : (e = new te(), a = !0);
|
|
1236
1236
|
var v = this.start, g = this.startLoc;
|
|
1237
1237
|
(this.type === h.parenL || this.type === h.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = t === "await");
|
|
1238
1238
|
var o = this.parseMaybeConditional(t, e);
|
|
@@ -1264,8 +1264,8 @@ N.parseExprOp = function(t, e, r, a, u) {
|
|
|
1264
1264
|
v && (f = h.logicalAND.binop);
|
|
1265
1265
|
var g = this.value;
|
|
1266
1266
|
this.next();
|
|
1267
|
-
var o = this.start, w = this.startLoc, _ = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, u), o, w, f, u),
|
|
1268
|
-
return (d && this.type === h.coalesce || v && (this.type === h.logicalOR || this.type === h.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(
|
|
1267
|
+
var o = this.start, w = this.startLoc, _ = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, u), o, w, f, u), M = this.buildBinary(e, r, t, _, g, d || v);
|
|
1268
|
+
return (d && this.type === h.coalesce || v && (this.type === h.logicalOR || this.type === h.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(M, e, r, a, u);
|
|
1269
1269
|
}
|
|
1270
1270
|
return t;
|
|
1271
1271
|
};
|
|
@@ -1280,7 +1280,7 @@ N.parseMaybeUnary = function(t, e, r, a) {
|
|
|
1280
1280
|
d = this.parseAwait(a), e = !0;
|
|
1281
1281
|
else if (this.type.prefix) {
|
|
1282
1282
|
var v = this.startNode(), g = this.type === h.incDec;
|
|
1283
|
-
v.operator = this.value, v.prefix = !0, this.next(), v.argument = this.parseMaybeUnary(null, !0, g, a), this.checkExpressionErrors(t, !0), g ? this.checkLValSimple(v.argument) : this.strict && v.operator === "delete" &&
|
|
1283
|
+
v.operator = this.value, v.prefix = !0, this.next(), v.argument = this.parseMaybeUnary(null, !0, g, a), this.checkExpressionErrors(t, !0), g ? this.checkLValSimple(v.argument) : this.strict && v.operator === "delete" && Ye(v.argument) ? this.raiseRecoverable(v.start, "Deleting local variable in strict mode") : v.operator === "delete" && de(v.argument) ? this.raiseRecoverable(v.start, "Private fields can not be deleted") : e = !0, d = this.finishNode(v, g ? "UpdateExpression" : "UnaryExpression");
|
|
1284
1284
|
} else if (!e && this.type === h.privateId)
|
|
1285
1285
|
(a || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), d = this.parsePrivateIdent(), this.type !== h._in && this.unexpected();
|
|
1286
1286
|
else {
|
|
@@ -1299,11 +1299,11 @@ N.parseMaybeUnary = function(t, e, r, a) {
|
|
|
1299
1299
|
else
|
|
1300
1300
|
return d;
|
|
1301
1301
|
};
|
|
1302
|
-
function
|
|
1303
|
-
return t.type === "Identifier" || t.type === "ParenthesizedExpression" &&
|
|
1302
|
+
function Ye(t) {
|
|
1303
|
+
return t.type === "Identifier" || t.type === "ParenthesizedExpression" && Ye(t.expression);
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1306
|
-
return t.type === "MemberExpression" && t.property.type === "PrivateIdentifier" || t.type === "ChainExpression" &&
|
|
1305
|
+
function de(t) {
|
|
1306
|
+
return t.type === "MemberExpression" && t.property.type === "PrivateIdentifier" || t.type === "ChainExpression" && de(t.expression) || t.type === "ParenthesizedExpression" && de(t.expression);
|
|
1307
1307
|
}
|
|
1308
1308
|
N.parseExprSubscripts = function(t, e) {
|
|
1309
1309
|
var r = this.start, a = this.startLoc, u = this.parseExprAtom(t, e);
|
|
@@ -1339,18 +1339,18 @@ N.parseSubscript = function(t, e, r, a, u, f, d) {
|
|
|
1339
1339
|
var w = this.startNodeAt(e, r);
|
|
1340
1340
|
w.object = t, o ? (w.property = this.parseExpression(), this.expect(h.bracketR)) : this.type === h.privateId && t.type !== "Super" ? w.property = this.parsePrivateIdent() : w.property = this.parseIdent(this.options.allowReserved !== "never"), w.computed = !!o, v && (w.optional = g), t = this.finishNode(w, "MemberExpression");
|
|
1341
1341
|
} else if (!a && this.eat(h.parenL)) {
|
|
1342
|
-
var _ = new
|
|
1342
|
+
var _ = new te(), M = this.yieldPos, j = this.awaitPos, D = this.awaitIdentPos;
|
|
1343
1343
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
1344
1344
|
var J = this.parseExprList(h.parenR, this.options.ecmaVersion >= 8, !1, _);
|
|
1345
1345
|
if (u && !g && this.shouldParseAsyncArrow())
|
|
1346
|
-
return this.checkPatternErrors(_, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos =
|
|
1347
|
-
this.checkExpressionErrors(_, !0), this.yieldPos =
|
|
1346
|
+
return this.checkPatternErrors(_, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = M, this.awaitPos = j, this.awaitIdentPos = D, this.parseSubscriptAsyncArrow(e, r, J, d);
|
|
1347
|
+
this.checkExpressionErrors(_, !0), this.yieldPos = M || this.yieldPos, this.awaitPos = j || this.awaitPos, this.awaitIdentPos = D || this.awaitIdentPos;
|
|
1348
1348
|
var I = this.startNodeAt(e, r);
|
|
1349
1349
|
I.callee = t, I.arguments = J, v && (I.optional = g), t = this.finishNode(I, "CallExpression");
|
|
1350
1350
|
} else if (this.type === h.backQuote) {
|
|
1351
1351
|
(g || f) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
1352
|
-
var
|
|
1353
|
-
|
|
1352
|
+
var et = this.startNodeAt(e, r);
|
|
1353
|
+
et.tag = t, et.quasi = this.parseTemplate({ isTagged: !0 }), t = this.finishNode(et, "TaggedTemplateExpression");
|
|
1354
1354
|
}
|
|
1355
1355
|
return t;
|
|
1356
1356
|
};
|
|
@@ -1447,13 +1447,13 @@ N.parseParenAndDistinguishExpression = function(t, e) {
|
|
|
1447
1447
|
var r = this.start, a = this.startLoc, u, f = this.options.ecmaVersion >= 8;
|
|
1448
1448
|
if (this.options.ecmaVersion >= 6) {
|
|
1449
1449
|
this.next();
|
|
1450
|
-
var d = this.start, v = this.startLoc, g = [], o = !0, w = !1, _ = new
|
|
1450
|
+
var d = this.start, v = this.startLoc, g = [], o = !0, w = !1, _ = new te(), M = this.yieldPos, j = this.awaitPos, D;
|
|
1451
1451
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== h.parenR; )
|
|
1452
1452
|
if (o ? o = !1 : this.expect(h.comma), f && this.afterTrailingComma(h.parenR, !0)) {
|
|
1453
1453
|
w = !0;
|
|
1454
1454
|
break;
|
|
1455
1455
|
} else if (this.type === h.ellipsis) {
|
|
1456
|
-
|
|
1456
|
+
D = this.start, g.push(this.parseParenItem(this.parseRestBinding())), this.type === h.comma && this.raiseRecoverable(
|
|
1457
1457
|
this.start,
|
|
1458
1458
|
"Comma is not permitted after the rest element"
|
|
1459
1459
|
);
|
|
@@ -1462,13 +1462,13 @@ N.parseParenAndDistinguishExpression = function(t, e) {
|
|
|
1462
1462
|
g.push(this.parseMaybeAssign(!1, _, this.parseParenItem));
|
|
1463
1463
|
var J = this.lastTokEnd, I = this.lastTokEndLoc;
|
|
1464
1464
|
if (this.expect(h.parenR), t && this.shouldParseArrow(g) && this.eat(h.arrow))
|
|
1465
|
-
return this.checkPatternErrors(_, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos =
|
|
1466
|
-
(!g.length || w) && this.unexpected(this.lastTokStart),
|
|
1465
|
+
return this.checkPatternErrors(_, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = M, this.awaitPos = j, this.parseParenArrowList(r, a, g, e);
|
|
1466
|
+
(!g.length || w) && this.unexpected(this.lastTokStart), D && this.unexpected(D), this.checkExpressionErrors(_, !0), this.yieldPos = M || this.yieldPos, this.awaitPos = j || this.awaitPos, g.length > 1 ? (u = this.startNodeAt(d, v), u.expressions = g, this.finishNodeAt(u, "SequenceExpression", J, I)) : u = g[0];
|
|
1467
1467
|
} else
|
|
1468
1468
|
u = this.parseParenExpression();
|
|
1469
1469
|
if (this.options.preserveParens) {
|
|
1470
|
-
var
|
|
1471
|
-
return
|
|
1470
|
+
var et = this.startNodeAt(r, a);
|
|
1471
|
+
return et.expression = u, this.finishNode(et, "ParenthesizedExpression");
|
|
1472
1472
|
} else
|
|
1473
1473
|
return u;
|
|
1474
1474
|
};
|
|
@@ -1515,7 +1515,7 @@ N.parseTemplate = function(t) {
|
|
|
1515
1515
|
return this.next(), this.finishNode(r, "TemplateLiteral");
|
|
1516
1516
|
};
|
|
1517
1517
|
N.isAsyncProp = function(t) {
|
|
1518
|
-
return !t.computed && t.key.type === "Identifier" && t.key.name === "async" && (this.type === h.name || this.type === h.num || this.type === h.string || this.type === h.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === h.star) && !
|
|
1518
|
+
return !t.computed && t.key.type === "Identifier" && t.key.name === "async" && (this.type === h.name || this.type === h.num || this.type === h.string || this.type === h.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === h.star) && !Z.test(this.input.slice(this.lastTokEnd, this.start));
|
|
1519
1519
|
};
|
|
1520
1520
|
N.parseObj = function(t, e) {
|
|
1521
1521
|
var r = this.startNode(), a = !0, u = {};
|
|
@@ -1563,11 +1563,11 @@ N.initFunction = function(t) {
|
|
|
1563
1563
|
};
|
|
1564
1564
|
N.parseMethod = function(t, e, r) {
|
|
1565
1565
|
var a = this.startNode(), u = this.yieldPos, f = this.awaitPos, d = this.awaitIdentPos;
|
|
1566
|
-
return this.initFunction(a), this.options.ecmaVersion >= 6 && (a.generator = t), this.options.ecmaVersion >= 8 && (a.async = !!e), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
1566
|
+
return this.initFunction(a), this.options.ecmaVersion >= 6 && (a.generator = t), this.options.ecmaVersion >= 8 && (a.async = !!e), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(be(e, a.generator) | Yt | (r ? Je : 0)), this.expect(h.parenL), a.params = this.parseBindingList(h.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(a, !1, !0, !1), this.yieldPos = u, this.awaitPos = f, this.awaitIdentPos = d, this.finishNode(a, "FunctionExpression");
|
|
1567
1567
|
};
|
|
1568
1568
|
N.parseArrowExpression = function(t, e, r, a) {
|
|
1569
1569
|
var u = this.yieldPos, f = this.awaitPos, d = this.awaitIdentPos;
|
|
1570
|
-
return this.enterScope(
|
|
1570
|
+
return this.enterScope(be(r, !1) | ge), this.initFunction(t), this.options.ecmaVersion >= 8 && (t.async = !!r), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, t.params = this.toAssignableList(e, !0), this.parseFunctionBody(t, !0, !1, a), this.yieldPos = u, this.awaitPos = f, this.awaitIdentPos = d, this.finishNode(t, "ArrowFunctionExpression");
|
|
1571
1571
|
};
|
|
1572
1572
|
N.parseFunctionBody = function(t, e, r, a) {
|
|
1573
1573
|
var u = e && this.type !== h.braceL, f = this.strict, d = !1;
|
|
@@ -1577,7 +1577,7 @@ N.parseFunctionBody = function(t, e, r, a) {
|
|
|
1577
1577
|
var v = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(t.params);
|
|
1578
1578
|
(!f || v) && (d = this.strictDirective(this.end), d && v && this.raiseRecoverable(t.start, "Illegal 'use strict' directive in function with non-simple parameter list"));
|
|
1579
1579
|
var g = this.labels;
|
|
1580
|
-
this.labels = [], d && (this.strict = !0), this.checkParams(t, !f && !d && !e && !r && this.isSimpleParamList(t.params)), this.strict && t.id && this.checkLValSimple(t.id,
|
|
1580
|
+
this.labels = [], d && (this.strict = !0), this.checkParams(t, !f && !d && !e && !r && this.isSimpleParamList(t.params)), this.strict && t.id && this.checkLValSimple(t.id, Xe), t.body = this.parseBlock(!1, void 0, d && !f), t.expression = !1, this.adaptDirectivePrologue(t.body.body), this.labels = g;
|
|
1581
1581
|
}
|
|
1582
1582
|
this.exitScope();
|
|
1583
1583
|
};
|
|
@@ -1592,7 +1592,7 @@ N.isSimpleParamList = function(t) {
|
|
|
1592
1592
|
N.checkParams = function(t, e) {
|
|
1593
1593
|
for (var r = /* @__PURE__ */ Object.create(null), a = 0, u = t.params; a < u.length; a += 1) {
|
|
1594
1594
|
var f = u[a];
|
|
1595
|
-
this.checkLValInnerPattern(f,
|
|
1595
|
+
this.checkLValInnerPattern(f, Se, e ? null : r);
|
|
1596
1596
|
}
|
|
1597
1597
|
};
|
|
1598
1598
|
N.parseExprList = function(t, e, r, a) {
|
|
@@ -1608,7 +1608,7 @@ N.parseExprList = function(t, e, r, a) {
|
|
|
1608
1608
|
};
|
|
1609
1609
|
N.checkUnreserved = function(t) {
|
|
1610
1610
|
var e = t.start, r = t.end, a = t.name;
|
|
1611
|
-
if (this.inGenerator && a === "yield" && this.raiseRecoverable(e, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && a === "await" && this.raiseRecoverable(e, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags &
|
|
1611
|
+
if (this.inGenerator && a === "yield" && this.raiseRecoverable(e, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && a === "await" && this.raiseRecoverable(e, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags & Zt) && a === "arguments" && this.raiseRecoverable(e, "Cannot use 'arguments' in class field initializer"), this.inClassStaticBlock && (a === "arguments" || a === "await") && this.raise(e, "Cannot use " + a + " in class static initialization block"), this.keywords.test(a) && this.raise(e, "Unexpected keyword '" + a + "'"), !(this.options.ecmaVersion < 6 && this.input.slice(e, r).indexOf("\\") !== -1)) {
|
|
1612
1612
|
var u = this.strict ? this.reservedWordsStrict : this.reservedWords;
|
|
1613
1613
|
u.test(a) && (!this.inAsync && a === "await" && this.raiseRecoverable(e, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(e, "The keyword '" + a + "' is reserved"));
|
|
1614
1614
|
}
|
|
@@ -1635,17 +1635,17 @@ N.parseAwait = function(t) {
|
|
|
1635
1635
|
var e = this.startNode();
|
|
1636
1636
|
return this.next(), e.argument = this.parseMaybeUnary(null, !0, !1, t), this.finishNode(e, "AwaitExpression");
|
|
1637
1637
|
};
|
|
1638
|
-
var
|
|
1639
|
-
|
|
1640
|
-
var r =
|
|
1638
|
+
var $t = K.prototype;
|
|
1639
|
+
$t.raise = function(t, e) {
|
|
1640
|
+
var r = xe(this.input, t);
|
|
1641
1641
|
e += " (" + r.line + ":" + r.column + ")", this.sourceFile && (e += " in " + this.sourceFile);
|
|
1642
1642
|
var a = new SyntaxError(e);
|
|
1643
1643
|
throw a.pos = t, a.loc = r, a.raisedAt = this.pos, a;
|
|
1644
1644
|
};
|
|
1645
|
-
|
|
1646
|
-
|
|
1645
|
+
$t.raiseRecoverable = $t.raise;
|
|
1646
|
+
$t.curPosition = function() {
|
|
1647
1647
|
if (this.options.locations)
|
|
1648
|
-
return new
|
|
1648
|
+
return new At(this.curLine, this.pos - this.lineStart);
|
|
1649
1649
|
};
|
|
1650
1650
|
var St = K.prototype, Ji = function(e) {
|
|
1651
1651
|
this.flags = e, this.var = [], this.lexical = [], this.functions = [];
|
|
@@ -1657,27 +1657,27 @@ St.exitScope = function() {
|
|
|
1657
1657
|
this.scopeStack.pop();
|
|
1658
1658
|
};
|
|
1659
1659
|
St.treatFunctionsAsVarInScope = function(t) {
|
|
1660
|
-
return t.flags &
|
|
1660
|
+
return t.flags & Et || !this.inModule && t.flags & Vt;
|
|
1661
1661
|
};
|
|
1662
1662
|
St.declareName = function(t, e, r) {
|
|
1663
1663
|
var a = !1;
|
|
1664
1664
|
if (e === xt) {
|
|
1665
1665
|
var u = this.currentScope();
|
|
1666
|
-
a = u.lexical.indexOf(t) > -1 || u.functions.indexOf(t) > -1 || u.var.indexOf(t) > -1, u.lexical.push(t), this.inModule && u.flags &
|
|
1667
|
-
} else if (e ===
|
|
1666
|
+
a = u.lexical.indexOf(t) > -1 || u.functions.indexOf(t) > -1 || u.var.indexOf(t) > -1, u.lexical.push(t), this.inModule && u.flags & Vt && delete this.undefinedExports[t];
|
|
1667
|
+
} else if (e === $e) {
|
|
1668
1668
|
var f = this.currentScope();
|
|
1669
1669
|
f.lexical.push(t);
|
|
1670
|
-
} else if (e ===
|
|
1670
|
+
} else if (e === Ge) {
|
|
1671
1671
|
var d = this.currentScope();
|
|
1672
1672
|
this.treatFunctionsAsVar ? a = d.lexical.indexOf(t) > -1 : a = d.lexical.indexOf(t) > -1 || d.var.indexOf(t) > -1, d.functions.push(t);
|
|
1673
1673
|
} else
|
|
1674
1674
|
for (var v = this.scopeStack.length - 1; v >= 0; --v) {
|
|
1675
1675
|
var g = this.scopeStack[v];
|
|
1676
|
-
if (g.lexical.indexOf(t) > -1 && !(g.flags &
|
|
1676
|
+
if (g.lexical.indexOf(t) > -1 && !(g.flags & Ke && g.lexical[0] === t) || !this.treatFunctionsAsVarInScope(g) && g.functions.indexOf(t) > -1) {
|
|
1677
1677
|
a = !0;
|
|
1678
1678
|
break;
|
|
1679
1679
|
}
|
|
1680
|
-
if (g.var.push(t), this.inModule && g.flags &
|
|
1680
|
+
if (g.var.push(t), this.inModule && g.flags & Vt && delete this.undefinedExports[t], g.flags & Zt)
|
|
1681
1681
|
break;
|
|
1682
1682
|
}
|
|
1683
1683
|
a && this.raiseRecoverable(r, "Identifier '" + t + "' has already been declared");
|
|
@@ -1691,47 +1691,47 @@ St.currentScope = function() {
|
|
|
1691
1691
|
St.currentVarScope = function() {
|
|
1692
1692
|
for (var t = this.scopeStack.length - 1; ; t--) {
|
|
1693
1693
|
var e = this.scopeStack[t];
|
|
1694
|
-
if (e.flags & (
|
|
1694
|
+
if (e.flags & (Zt | Bt | Pt))
|
|
1695
1695
|
return e;
|
|
1696
1696
|
}
|
|
1697
1697
|
};
|
|
1698
1698
|
St.currentThisScope = function() {
|
|
1699
1699
|
for (var t = this.scopeStack.length - 1; ; t--) {
|
|
1700
1700
|
var e = this.scopeStack[t];
|
|
1701
|
-
if (e.flags & (
|
|
1701
|
+
if (e.flags & (Zt | Bt | Pt) && !(e.flags & ge))
|
|
1702
1702
|
return e;
|
|
1703
1703
|
}
|
|
1704
1704
|
};
|
|
1705
|
-
var
|
|
1706
|
-
this.type = "", this.start = r, this.end = 0, e.options.locations && (this.loc = new
|
|
1707
|
-
},
|
|
1708
|
-
|
|
1709
|
-
return new
|
|
1705
|
+
var jt = function(e, r, a) {
|
|
1706
|
+
this.type = "", this.start = r, this.end = 0, e.options.locations && (this.loc = new Ft(e, a)), e.options.directSourceFile && (this.sourceFile = e.options.directSourceFile), e.options.ranges && (this.range = [r, 0]);
|
|
1707
|
+
}, Ut = K.prototype;
|
|
1708
|
+
Ut.startNode = function() {
|
|
1709
|
+
return new jt(this, this.start, this.startLoc);
|
|
1710
1710
|
};
|
|
1711
|
-
|
|
1712
|
-
return new
|
|
1711
|
+
Ut.startNodeAt = function(t, e) {
|
|
1712
|
+
return new jt(this, t, e);
|
|
1713
1713
|
};
|
|
1714
|
-
function
|
|
1714
|
+
function Ze(t, e, r, a) {
|
|
1715
1715
|
return t.type = e, t.end = r, this.options.locations && (t.loc.end = a), this.options.ranges && (t.range[1] = r), t;
|
|
1716
1716
|
}
|
|
1717
|
-
|
|
1718
|
-
return
|
|
1717
|
+
Ut.finishNode = function(t, e) {
|
|
1718
|
+
return Ze.call(this, t, e, this.lastTokEnd, this.lastTokEndLoc);
|
|
1719
1719
|
};
|
|
1720
|
-
|
|
1721
|
-
return
|
|
1720
|
+
Ut.finishNodeAt = function(t, e, r, a) {
|
|
1721
|
+
return Ze.call(this, t, e, r, a);
|
|
1722
1722
|
};
|
|
1723
|
-
|
|
1724
|
-
var e = new
|
|
1723
|
+
Ut.copyNode = function(t) {
|
|
1724
|
+
var e = new jt(this, t.start, this.startLoc);
|
|
1725
1725
|
for (var r in t)
|
|
1726
1726
|
e[r] = t[r];
|
|
1727
1727
|
return e;
|
|
1728
1728
|
};
|
|
1729
|
-
var Gi = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz",
|
|
1730
|
-
9:
|
|
1731
|
-
10:
|
|
1732
|
-
11:
|
|
1733
|
-
12:
|
|
1734
|
-
13:
|
|
1729
|
+
var Gi = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz", ti = "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", ei = ti + " Extended_Pictographic", ii = ei, si = ii + " EBase EComp EMod EPres ExtPict", ri = si, $i = ri, Xi = {
|
|
1730
|
+
9: ti,
|
|
1731
|
+
10: ei,
|
|
1732
|
+
11: ii,
|
|
1733
|
+
12: si,
|
|
1734
|
+
13: ri,
|
|
1735
1735
|
14: $i
|
|
1736
1736
|
}, Qi = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji", Yi = {
|
|
1737
1737
|
9: "",
|
|
@@ -1740,44 +1740,44 @@ var Gi = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai
|
|
|
1740
1740
|
12: "",
|
|
1741
1741
|
13: "",
|
|
1742
1742
|
14: Qi
|
|
1743
|
-
},
|
|
1744
|
-
9:
|
|
1745
|
-
10:
|
|
1746
|
-
11:
|
|
1747
|
-
12:
|
|
1748
|
-
13:
|
|
1743
|
+
}, _e = "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", ai = "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", ni = ai + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", oi = ni + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", hi = oi + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", ui = hi + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", Zi = ui + " " + Gi, ts = {
|
|
1744
|
+
9: ai,
|
|
1745
|
+
10: ni,
|
|
1746
|
+
11: oi,
|
|
1747
|
+
12: hi,
|
|
1748
|
+
13: ui,
|
|
1749
1749
|
14: Zi
|
|
1750
|
-
},
|
|
1750
|
+
}, ci = {};
|
|
1751
1751
|
function es(t) {
|
|
1752
|
-
var e =
|
|
1753
|
-
binary: bt(Xi[t] + " " +
|
|
1752
|
+
var e = ci[t] = {
|
|
1753
|
+
binary: bt(Xi[t] + " " + _e),
|
|
1754
1754
|
binaryOfStrings: bt(Yi[t]),
|
|
1755
1755
|
nonBinary: {
|
|
1756
|
-
General_Category: bt(
|
|
1756
|
+
General_Category: bt(_e),
|
|
1757
1757
|
Script: bt(ts[t])
|
|
1758
1758
|
}
|
|
1759
1759
|
};
|
|
1760
1760
|
e.nonBinary.Script_Extensions = e.nonBinary.Script, e.nonBinary.gc = e.nonBinary.General_Category, e.nonBinary.sc = e.nonBinary.Script, e.nonBinary.scx = e.nonBinary.Script_Extensions;
|
|
1761
1761
|
}
|
|
1762
|
-
for (var
|
|
1763
|
-
var is =
|
|
1762
|
+
for (var ue = 0, Le = [9, 10, 11, 12, 13, 14]; ue < Le.length; ue += 1) {
|
|
1763
|
+
var is = Le[ue];
|
|
1764
1764
|
es(is);
|
|
1765
1765
|
}
|
|
1766
|
-
var P = K.prototype,
|
|
1766
|
+
var P = K.prototype, Xt = function(e, r) {
|
|
1767
1767
|
this.parent = e, this.base = r || this;
|
|
1768
1768
|
};
|
|
1769
|
-
|
|
1769
|
+
Xt.prototype.separatedFrom = function(e) {
|
|
1770
1770
|
for (var r = this; r; r = r.parent)
|
|
1771
1771
|
for (var a = e; a; a = a.parent)
|
|
1772
1772
|
if (r.base === a.base && r !== a)
|
|
1773
1773
|
return !0;
|
|
1774
1774
|
return !1;
|
|
1775
1775
|
};
|
|
1776
|
-
|
|
1777
|
-
return new
|
|
1776
|
+
Xt.prototype.sibling = function() {
|
|
1777
|
+
return new Xt(this.parent, this.base);
|
|
1778
1778
|
};
|
|
1779
1779
|
var ft = function(e) {
|
|
1780
|
-
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 =
|
|
1780
|
+
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 = ci[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 = /* @__PURE__ */ Object.create(null), this.backReferenceNames = [], this.branchID = null;
|
|
1781
1781
|
};
|
|
1782
1782
|
ft.prototype.reset = function(e, r, a) {
|
|
1783
1783
|
var u = a.indexOf("v") !== -1, f = a.indexOf("u") !== -1;
|
|
@@ -1860,7 +1860,7 @@ P.regexp_pattern = function(t) {
|
|
|
1860
1860
|
};
|
|
1861
1861
|
P.regexp_disjunction = function(t) {
|
|
1862
1862
|
var e = this.options.ecmaVersion >= 16;
|
|
1863
|
-
for (e && (t.branchID = new
|
|
1863
|
+
for (e && (t.branchID = new Xt(t.branchID, null)), this.regexp_alternative(t); t.eat(
|
|
1864
1864
|
124
|
|
1865
1865
|
/* | */
|
|
1866
1866
|
); )
|
|
@@ -2060,13 +2060,13 @@ P.regexp_eatInvalidBracedQuantifier = function(t) {
|
|
|
2060
2060
|
};
|
|
2061
2061
|
P.regexp_eatSyntaxCharacter = function(t) {
|
|
2062
2062
|
var e = t.current();
|
|
2063
|
-
return
|
|
2063
|
+
return pi(e) ? (t.lastIntValue = e, t.advance(), !0) : !1;
|
|
2064
2064
|
};
|
|
2065
|
-
function
|
|
2065
|
+
function pi(t) {
|
|
2066
2066
|
return t === 36 || t >= 40 && t <= 43 || t === 46 || t === 63 || t >= 91 && t <= 94 || t >= 123 && t <= 125;
|
|
2067
2067
|
}
|
|
2068
2068
|
P.regexp_eatPatternCharacters = function(t) {
|
|
2069
|
-
for (var e = t.pos, r = 0; (r = t.current()) !== -1 && !
|
|
2069
|
+
for (var e = t.pos, r = 0; (r = t.current()) !== -1 && !pi(r); )
|
|
2070
2070
|
t.advance();
|
|
2071
2071
|
return t.pos !== e;
|
|
2072
2072
|
};
|
|
@@ -2170,7 +2170,7 @@ P.regexp_eatCControlLetter = function(t) {
|
|
|
2170
2170
|
return !1;
|
|
2171
2171
|
};
|
|
2172
2172
|
P.regexp_eatZero = function(t) {
|
|
2173
|
-
return t.current() === 48 && !
|
|
2173
|
+
return t.current() === 48 && !ee(t.lookahead()) ? (t.lastIntValue = 0, t.advance(), !0) : !1;
|
|
2174
2174
|
};
|
|
2175
2175
|
P.regexp_eatControlEscape = function(t) {
|
|
2176
2176
|
var e = t.current();
|
|
@@ -2178,9 +2178,9 @@ P.regexp_eatControlEscape = function(t) {
|
|
|
2178
2178
|
};
|
|
2179
2179
|
P.regexp_eatControlLetter = function(t) {
|
|
2180
2180
|
var e = t.current();
|
|
2181
|
-
return
|
|
2181
|
+
return li(e) ? (t.lastIntValue = e % 32, t.advance(), !0) : !1;
|
|
2182
2182
|
};
|
|
2183
|
-
function
|
|
2183
|
+
function li(t) {
|
|
2184
2184
|
return t >= 65 && t <= 90 || t >= 97 && t <= 122;
|
|
2185
2185
|
}
|
|
2186
2186
|
P.regexp_eatRegExpUnicodeEscapeSequence = function(t, e) {
|
|
@@ -2244,7 +2244,7 @@ P.regexp_eatDecimalEscape = function(t) {
|
|
|
2244
2244
|
}
|
|
2245
2245
|
return !1;
|
|
2246
2246
|
};
|
|
2247
|
-
var
|
|
2247
|
+
var fi = 0, yt = 1, ut = 2;
|
|
2248
2248
|
P.regexp_eatCharacterClassEscape = function(t) {
|
|
2249
2249
|
var e = t.current();
|
|
2250
2250
|
if (hs(e))
|
|
@@ -2263,7 +2263,7 @@ P.regexp_eatCharacterClassEscape = function(t) {
|
|
|
2263
2263
|
return r && a === ut && t.raise("Invalid property name"), a;
|
|
2264
2264
|
t.raise("Invalid property name");
|
|
2265
2265
|
}
|
|
2266
|
-
return
|
|
2266
|
+
return fi;
|
|
2267
2267
|
};
|
|
2268
2268
|
function hs(t) {
|
|
2269
2269
|
return t === 100 || t === 68 || t === 115 || t === 83 || t === 119 || t === 87;
|
|
@@ -2284,10 +2284,10 @@ P.regexp_eatUnicodePropertyValueExpression = function(t) {
|
|
|
2284
2284
|
var u = t.lastStringValue;
|
|
2285
2285
|
return this.regexp_validateUnicodePropertyNameOrValue(t, u);
|
|
2286
2286
|
}
|
|
2287
|
-
return
|
|
2287
|
+
return fi;
|
|
2288
2288
|
};
|
|
2289
2289
|
P.regexp_validateUnicodePropertyNameAndValue = function(t, e, r) {
|
|
2290
|
-
|
|
2290
|
+
wt(t.unicodeProperties.nonBinary, e) || t.raise("Invalid property name"), t.unicodeProperties.nonBinary[e].test(r) || t.raise("Invalid property value");
|
|
2291
2291
|
};
|
|
2292
2292
|
P.regexp_validateUnicodePropertyNameOrValue = function(t, e) {
|
|
2293
2293
|
if (t.unicodeProperties.binary.test(e))
|
|
@@ -2298,12 +2298,12 @@ P.regexp_validateUnicodePropertyNameOrValue = function(t, e) {
|
|
|
2298
2298
|
};
|
|
2299
2299
|
P.regexp_eatUnicodePropertyName = function(t) {
|
|
2300
2300
|
var e = 0;
|
|
2301
|
-
for (t.lastStringValue = "";
|
|
2301
|
+
for (t.lastStringValue = ""; di(e = t.current()); )
|
|
2302
2302
|
t.lastStringValue += mt(e), t.advance();
|
|
2303
2303
|
return t.lastStringValue !== "";
|
|
2304
2304
|
};
|
|
2305
|
-
function
|
|
2306
|
-
return
|
|
2305
|
+
function di(t) {
|
|
2306
|
+
return li(t) || t === 95;
|
|
2307
2307
|
}
|
|
2308
2308
|
P.regexp_eatUnicodePropertyValue = function(t) {
|
|
2309
2309
|
var e = 0;
|
|
@@ -2312,7 +2312,7 @@ P.regexp_eatUnicodePropertyValue = function(t) {
|
|
|
2312
2312
|
return t.lastStringValue !== "";
|
|
2313
2313
|
};
|
|
2314
2314
|
function us(t) {
|
|
2315
|
-
return
|
|
2315
|
+
return di(t) || ee(t);
|
|
2316
2316
|
}
|
|
2317
2317
|
P.regexp_eatLoneUnicodePropertyNameOrValue = function(t) {
|
|
2318
2318
|
return this.regexp_eatUnicodePropertyValue(t);
|
|
@@ -2358,7 +2358,7 @@ P.regexp_eatClassAtom = function(t) {
|
|
|
2358
2358
|
return !0;
|
|
2359
2359
|
if (t.switchU) {
|
|
2360
2360
|
var r = t.current();
|
|
2361
|
-
(r === 99 ||
|
|
2361
|
+
(r === 99 || xi(r)) && t.raise("Invalid class escape"), t.raise("Invalid escape");
|
|
2362
2362
|
}
|
|
2363
2363
|
t.pos = e;
|
|
2364
2364
|
}
|
|
@@ -2528,7 +2528,7 @@ function ls(t) {
|
|
|
2528
2528
|
}
|
|
2529
2529
|
P.regexp_eatClassControlLetter = function(t) {
|
|
2530
2530
|
var e = t.current();
|
|
2531
|
-
return
|
|
2531
|
+
return ee(e) || e === 95 ? (t.lastIntValue = e % 32, t.advance(), !0) : !1;
|
|
2532
2532
|
};
|
|
2533
2533
|
P.regexp_eatHexEscapeSequence = function(t) {
|
|
2534
2534
|
var e = t.pos;
|
|
@@ -2544,23 +2544,23 @@ P.regexp_eatHexEscapeSequence = function(t) {
|
|
|
2544
2544
|
};
|
|
2545
2545
|
P.regexp_eatDecimalDigits = function(t) {
|
|
2546
2546
|
var e = t.pos, r = 0;
|
|
2547
|
-
for (t.lastIntValue = 0;
|
|
2547
|
+
for (t.lastIntValue = 0; ee(r = t.current()); )
|
|
2548
2548
|
t.lastIntValue = 10 * t.lastIntValue + (r - 48), t.advance();
|
|
2549
2549
|
return t.pos !== e;
|
|
2550
2550
|
};
|
|
2551
|
-
function
|
|
2551
|
+
function ee(t) {
|
|
2552
2552
|
return t >= 48 && t <= 57;
|
|
2553
2553
|
}
|
|
2554
2554
|
P.regexp_eatHexDigits = function(t) {
|
|
2555
2555
|
var e = t.pos, r = 0;
|
|
2556
|
-
for (t.lastIntValue = 0;
|
|
2557
|
-
t.lastIntValue = 16 * t.lastIntValue +
|
|
2556
|
+
for (t.lastIntValue = 0; mi(r = t.current()); )
|
|
2557
|
+
t.lastIntValue = 16 * t.lastIntValue + yi(r), t.advance();
|
|
2558
2558
|
return t.pos !== e;
|
|
2559
2559
|
};
|
|
2560
|
-
function
|
|
2560
|
+
function mi(t) {
|
|
2561
2561
|
return t >= 48 && t <= 57 || t >= 65 && t <= 70 || t >= 97 && t <= 102;
|
|
2562
2562
|
}
|
|
2563
|
-
function
|
|
2563
|
+
function yi(t) {
|
|
2564
2564
|
return t >= 65 && t <= 70 ? 10 + (t - 65) : t >= 97 && t <= 102 ? 10 + (t - 97) : t - 48;
|
|
2565
2565
|
}
|
|
2566
2566
|
P.regexp_eatLegacyOctalEscapeSequence = function(t) {
|
|
@@ -2577,9 +2577,9 @@ P.regexp_eatLegacyOctalEscapeSequence = function(t) {
|
|
|
2577
2577
|
};
|
|
2578
2578
|
P.regexp_eatOctalDigit = function(t) {
|
|
2579
2579
|
var e = t.current();
|
|
2580
|
-
return
|
|
2580
|
+
return xi(e) ? (t.lastIntValue = e - 48, t.advance(), !0) : (t.lastIntValue = 0, !1);
|
|
2581
2581
|
};
|
|
2582
|
-
function
|
|
2582
|
+
function xi(t) {
|
|
2583
2583
|
return t >= 48 && t <= 55;
|
|
2584
2584
|
}
|
|
2585
2585
|
P.regexp_eatFixedHexDigits = function(t, e) {
|
|
@@ -2587,20 +2587,20 @@ P.regexp_eatFixedHexDigits = function(t, e) {
|
|
|
2587
2587
|
t.lastIntValue = 0;
|
|
2588
2588
|
for (var a = 0; a < e; ++a) {
|
|
2589
2589
|
var u = t.current();
|
|
2590
|
-
if (!
|
|
2590
|
+
if (!mi(u))
|
|
2591
2591
|
return t.pos = r, !1;
|
|
2592
|
-
t.lastIntValue = 16 * t.lastIntValue +
|
|
2592
|
+
t.lastIntValue = 16 * t.lastIntValue + yi(u), t.advance();
|
|
2593
2593
|
}
|
|
2594
2594
|
return !0;
|
|
2595
2595
|
};
|
|
2596
|
-
var
|
|
2597
|
-
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new
|
|
2596
|
+
var ie = function(e) {
|
|
2597
|
+
this.type = e.type, this.value = e.value, this.start = e.start, this.end = e.end, e.options.locations && (this.loc = new Ft(e, e.startLoc, e.endLoc)), e.options.ranges && (this.range = [e.start, e.end]);
|
|
2598
2598
|
}, V = K.prototype;
|
|
2599
2599
|
V.next = function(t) {
|
|
2600
|
-
!t && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new
|
|
2600
|
+
!t && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new ie(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
2601
2601
|
};
|
|
2602
2602
|
V.getToken = function() {
|
|
2603
|
-
return this.next(), new
|
|
2603
|
+
return this.next(), new ie(this);
|
|
2604
2604
|
};
|
|
2605
2605
|
typeof Symbol < "u" && (V[Symbol.iterator] = function() {
|
|
2606
2606
|
var t = this;
|
|
@@ -2635,7 +2635,7 @@ V.fullCharCodeAtPos = function() {
|
|
|
2635
2635
|
V.skipBlockComment = function() {
|
|
2636
2636
|
var t = this.options.onComment && this.curPosition(), e = this.pos, r = this.input.indexOf("*/", this.pos += 2);
|
|
2637
2637
|
if (r === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = r + 2, this.options.locations)
|
|
2638
|
-
for (var a = void 0, u = e; (a =
|
|
2638
|
+
for (var a = void 0, u = e; (a = He(this.input, u, this.pos)) > -1; )
|
|
2639
2639
|
++this.curLine, u = this.lineStart = a;
|
|
2640
2640
|
this.options.onComment && this.options.onComment(
|
|
2641
2641
|
!0,
|
|
@@ -2647,7 +2647,7 @@ V.skipBlockComment = function() {
|
|
|
2647
2647
|
);
|
|
2648
2648
|
};
|
|
2649
2649
|
V.skipLineComment = function(t) {
|
|
2650
|
-
for (var e = this.pos, r = this.options.onComment && this.curPosition(), a = this.input.charCodeAt(this.pos += t); this.pos < this.input.length && !
|
|
2650
|
+
for (var e = this.pos, r = this.options.onComment && this.curPosition(), a = this.input.charCodeAt(this.pos += t); this.pos < this.input.length && !Tt(a); )
|
|
2651
2651
|
a = this.input.charCodeAt(++this.pos);
|
|
2652
2652
|
this.options.onComment && this.options.onComment(
|
|
2653
2653
|
!1,
|
|
@@ -2686,7 +2686,7 @@ V.skipSpace = function() {
|
|
|
2686
2686
|
}
|
|
2687
2687
|
break;
|
|
2688
2688
|
default:
|
|
2689
|
-
if (t > 8 && t < 14 || t >= 5760 &&
|
|
2689
|
+
if (t > 8 && t < 14 || t >= 5760 && ye.test(String.fromCharCode(t)))
|
|
2690
2690
|
++this.pos;
|
|
2691
2691
|
else
|
|
2692
2692
|
break t;
|
|
@@ -2731,7 +2731,7 @@ V.readToken_caret = function() {
|
|
|
2731
2731
|
};
|
|
2732
2732
|
V.readToken_plus_min = function(t) {
|
|
2733
2733
|
var e = this.input.charCodeAt(this.pos + 1);
|
|
2734
|
-
return e === t ? e === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 ||
|
|
2734
|
+
return e === t ? e === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || Z.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(h.incDec, 2) : e === 61 ? this.finishOp(h.assign, 2) : this.finishOp(h.plusMin, 1);
|
|
2735
2735
|
};
|
|
2736
2736
|
V.readToken_lt_gt = function(t) {
|
|
2737
2737
|
var e = this.input.charCodeAt(this.pos + 1), r = 1;
|
|
@@ -2862,7 +2862,7 @@ V.readRegexp = function() {
|
|
|
2862
2862
|
for (var t, e, r = this.pos; ; ) {
|
|
2863
2863
|
this.pos >= this.input.length && this.raise(r, "Unterminated regular expression");
|
|
2864
2864
|
var a = this.input.charAt(this.pos);
|
|
2865
|
-
if (
|
|
2865
|
+
if (Z.test(a) && this.raise(r, "Unterminated regular expression"), t)
|
|
2866
2866
|
t = !1;
|
|
2867
2867
|
else {
|
|
2868
2868
|
if (a === "[")
|
|
@@ -2904,14 +2904,14 @@ V.readInt = function(t, e, r) {
|
|
|
2904
2904
|
function fs(t, e) {
|
|
2905
2905
|
return e ? parseInt(t, 8) : parseFloat(t.replace(/_/g, ""));
|
|
2906
2906
|
}
|
|
2907
|
-
function
|
|
2907
|
+
function vi(t) {
|
|
2908
2908
|
return typeof BigInt != "function" ? null : BigInt(t.replace(/_/g, ""));
|
|
2909
2909
|
}
|
|
2910
2910
|
V.readRadixNumber = function(t) {
|
|
2911
2911
|
var e = this.pos;
|
|
2912
2912
|
this.pos += 2;
|
|
2913
2913
|
var r = this.readInt(t);
|
|
2914
|
-
return r == null && this.raise(this.start + 2, "Expected number in radix " + t), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (r =
|
|
2914
|
+
return r == null && this.raise(this.start + 2, "Expected number in radix " + t), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (r = vi(this.input.slice(e, this.pos)), ++this.pos) : pt(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(h.num, r);
|
|
2915
2915
|
};
|
|
2916
2916
|
V.readNumber = function(t) {
|
|
2917
2917
|
var e = this.pos;
|
|
@@ -2920,7 +2920,7 @@ V.readNumber = function(t) {
|
|
|
2920
2920
|
r && this.strict && this.raise(e, "Invalid number");
|
|
2921
2921
|
var a = this.input.charCodeAt(this.pos);
|
|
2922
2922
|
if (!r && !t && this.options.ecmaVersion >= 11 && a === 110) {
|
|
2923
|
-
var u =
|
|
2923
|
+
var u = vi(this.input.slice(e, this.pos));
|
|
2924
2924
|
return ++this.pos, pt(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(h.num, u);
|
|
2925
2925
|
}
|
|
2926
2926
|
r && /[89]/.test(this.input.slice(e, this.pos)) && (r = !1), a === 46 && !r && (++this.pos, this.readInt(10), a = this.input.charCodeAt(this.pos)), (a === 69 || a === 101) && !r && (a = this.input.charCodeAt(++this.pos), (a === 43 || a === 45) && ++this.pos, this.readInt(10) === null && this.raise(e, "Invalid number")), pt(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number");
|
|
@@ -2943,17 +2943,17 @@ V.readString = function(t) {
|
|
|
2943
2943
|
var a = this.input.charCodeAt(this.pos);
|
|
2944
2944
|
if (a === t)
|
|
2945
2945
|
break;
|
|
2946
|
-
a === 92 ? (e += this.input.slice(r, this.pos), e += this.readEscapedChar(!1), r = this.pos) : a === 8232 || a === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (
|
|
2946
|
+
a === 92 ? (e += this.input.slice(r, this.pos), e += this.readEscapedChar(!1), r = this.pos) : a === 8232 || a === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (Tt(a) && this.raise(this.start, "Unterminated string constant"), ++this.pos);
|
|
2947
2947
|
}
|
|
2948
2948
|
return e += this.input.slice(r, this.pos++), this.finishToken(h.string, e);
|
|
2949
2949
|
};
|
|
2950
|
-
var
|
|
2950
|
+
var gi = {};
|
|
2951
2951
|
V.tryReadTemplateToken = function() {
|
|
2952
2952
|
this.inTemplateElement = !0;
|
|
2953
2953
|
try {
|
|
2954
2954
|
this.readTmplToken();
|
|
2955
2955
|
} catch (t) {
|
|
2956
|
-
if (t ===
|
|
2956
|
+
if (t === gi)
|
|
2957
2957
|
this.readInvalidTemplateToken();
|
|
2958
2958
|
else
|
|
2959
2959
|
throw t;
|
|
@@ -2962,7 +2962,7 @@ V.tryReadTemplateToken = function() {
|
|
|
2962
2962
|
};
|
|
2963
2963
|
V.invalidStringToken = function(t, e) {
|
|
2964
2964
|
if (this.inTemplateElement && this.options.ecmaVersion >= 9)
|
|
2965
|
-
throw
|
|
2965
|
+
throw gi;
|
|
2966
2966
|
this.raise(t, e);
|
|
2967
2967
|
};
|
|
2968
2968
|
V.readTmplToken = function() {
|
|
@@ -2973,7 +2973,7 @@ V.readTmplToken = function() {
|
|
|
2973
2973
|
return this.pos === this.start && (this.type === h.template || this.type === h.invalidTemplate) ? r === 36 ? (this.pos += 2, this.finishToken(h.dollarBraceL)) : (++this.pos, this.finishToken(h.backQuote)) : (t += this.input.slice(e, this.pos), this.finishToken(h.template, t));
|
|
2974
2974
|
if (r === 92)
|
|
2975
2975
|
t += this.input.slice(e, this.pos), t += this.readEscapedChar(!0), e = this.pos;
|
|
2976
|
-
else if (
|
|
2976
|
+
else if (Tt(r)) {
|
|
2977
2977
|
switch (t += this.input.slice(e, this.pos), ++this.pos, r) {
|
|
2978
2978
|
case 13:
|
|
2979
2979
|
this.input.charCodeAt(this.pos) === 10 && ++this.pos;
|
|
@@ -3068,7 +3068,7 @@ V.readEscapedChar = function(t) {
|
|
|
3068
3068
|
t ? "Octal literal in template string" : "Octal literal in strict mode"
|
|
3069
3069
|
), String.fromCharCode(u);
|
|
3070
3070
|
}
|
|
3071
|
-
return
|
|
3071
|
+
return Tt(e) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(e);
|
|
3072
3072
|
}
|
|
3073
3073
|
};
|
|
3074
3074
|
V.readHexChar = function(t) {
|
|
@@ -3095,29 +3095,29 @@ V.readWord1 = function() {
|
|
|
3095
3095
|
};
|
|
3096
3096
|
V.readWord = function() {
|
|
3097
3097
|
var t = this.readWord1(), e = h.name;
|
|
3098
|
-
return this.keywords.test(t) && (e =
|
|
3098
|
+
return this.keywords.test(t) && (e = kt[t]), this.finishToken(e, t);
|
|
3099
3099
|
};
|
|
3100
|
-
var
|
|
3100
|
+
var bi = "8.15.0";
|
|
3101
3101
|
K.acorn = {
|
|
3102
3102
|
Parser: K,
|
|
3103
|
-
version:
|
|
3104
|
-
defaultOptions:
|
|
3105
|
-
Position:
|
|
3106
|
-
SourceLocation:
|
|
3107
|
-
getLineInfo:
|
|
3108
|
-
Node:
|
|
3103
|
+
version: bi,
|
|
3104
|
+
defaultOptions: Kt,
|
|
3105
|
+
Position: At,
|
|
3106
|
+
SourceLocation: Ft,
|
|
3107
|
+
getLineInfo: xe,
|
|
3108
|
+
Node: jt,
|
|
3109
3109
|
TokenType: O,
|
|
3110
3110
|
tokTypes: h,
|
|
3111
|
-
keywordTypes:
|
|
3112
|
-
TokContext:
|
|
3111
|
+
keywordTypes: kt,
|
|
3112
|
+
TokContext: Y,
|
|
3113
3113
|
tokContexts: q,
|
|
3114
3114
|
isIdentifierChar: dt,
|
|
3115
3115
|
isIdentifierStart: pt,
|
|
3116
|
-
Token:
|
|
3117
|
-
isNewLine:
|
|
3118
|
-
lineBreak:
|
|
3119
|
-
lineBreakG:
|
|
3120
|
-
nonASCIIwhitespace:
|
|
3116
|
+
Token: ie,
|
|
3117
|
+
isNewLine: Tt,
|
|
3118
|
+
lineBreak: Z,
|
|
3119
|
+
lineBreakG: qe,
|
|
3120
|
+
nonASCIIwhitespace: ye
|
|
3121
3121
|
};
|
|
3122
3122
|
function ds(t, e) {
|
|
3123
3123
|
return K.parse(t, e);
|
|
@@ -3130,30 +3130,30 @@ function ys(t, e) {
|
|
|
3130
3130
|
}
|
|
3131
3131
|
const xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3132
3132
|
__proto__: null,
|
|
3133
|
-
Node:
|
|
3133
|
+
Node: jt,
|
|
3134
3134
|
Parser: K,
|
|
3135
|
-
Position:
|
|
3136
|
-
SourceLocation:
|
|
3137
|
-
TokContext:
|
|
3138
|
-
Token:
|
|
3135
|
+
Position: At,
|
|
3136
|
+
SourceLocation: Ft,
|
|
3137
|
+
TokContext: Y,
|
|
3138
|
+
Token: ie,
|
|
3139
3139
|
TokenType: O,
|
|
3140
|
-
defaultOptions:
|
|
3141
|
-
getLineInfo:
|
|
3140
|
+
defaultOptions: Kt,
|
|
3141
|
+
getLineInfo: xe,
|
|
3142
3142
|
isIdentifierChar: dt,
|
|
3143
3143
|
isIdentifierStart: pt,
|
|
3144
|
-
isNewLine:
|
|
3145
|
-
keywordTypes:
|
|
3146
|
-
lineBreak:
|
|
3147
|
-
lineBreakG:
|
|
3148
|
-
nonASCIIwhitespace:
|
|
3144
|
+
isNewLine: Tt,
|
|
3145
|
+
keywordTypes: kt,
|
|
3146
|
+
lineBreak: Z,
|
|
3147
|
+
lineBreakG: qe,
|
|
3148
|
+
nonASCIIwhitespace: ye,
|
|
3149
3149
|
parse: ds,
|
|
3150
3150
|
parseExpressionAt: ms,
|
|
3151
3151
|
tokContexts: q,
|
|
3152
3152
|
tokTypes: h,
|
|
3153
3153
|
tokenizer: ys,
|
|
3154
|
-
version:
|
|
3154
|
+
version: bi
|
|
3155
3155
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3156
|
-
function
|
|
3156
|
+
function Oe(t, e) {
|
|
3157
3157
|
for (var r = 0; r < e.length; r++) {
|
|
3158
3158
|
var a = e[r];
|
|
3159
3159
|
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(t, typeof (u = (function(f, d) {
|
|
@@ -3169,36 +3169,36 @@ function De(t, e) {
|
|
|
3169
3169
|
}
|
|
3170
3170
|
var u;
|
|
3171
3171
|
}
|
|
3172
|
-
function
|
|
3173
|
-
return
|
|
3172
|
+
function Qt() {
|
|
3173
|
+
return Qt = Object.assign ? Object.assign.bind() : function(t) {
|
|
3174
3174
|
for (var e = 1; e < arguments.length; e++) {
|
|
3175
3175
|
var r = arguments[e];
|
|
3176
3176
|
for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
|
|
3177
3177
|
}
|
|
3178
3178
|
return t;
|
|
3179
|
-
},
|
|
3179
|
+
}, Qt.apply(this, arguments);
|
|
3180
3180
|
}
|
|
3181
|
-
function
|
|
3182
|
-
t.prototype = Object.create(e.prototype), t.prototype.constructor = t,
|
|
3181
|
+
function Wt(t, e) {
|
|
3182
|
+
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, me(t, e);
|
|
3183
3183
|
}
|
|
3184
|
-
function
|
|
3185
|
-
return
|
|
3184
|
+
function me(t, e) {
|
|
3185
|
+
return me = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, a) {
|
|
3186
3186
|
return r.__proto__ = a, r;
|
|
3187
|
-
},
|
|
3187
|
+
}, me(t, e);
|
|
3188
3188
|
}
|
|
3189
|
-
function
|
|
3189
|
+
function Re(t, e) {
|
|
3190
3190
|
(e == null || e > t.length) && (e = t.length);
|
|
3191
3191
|
for (var r = 0, a = new Array(e); r < e; r++) a[r] = t[r];
|
|
3192
3192
|
return a;
|
|
3193
3193
|
}
|
|
3194
|
-
function
|
|
3194
|
+
function Me(t, e) {
|
|
3195
3195
|
var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
3196
3196
|
if (r) return (r = r.call(t)).next.bind(r);
|
|
3197
3197
|
if (Array.isArray(t) || (r = (function(u, f) {
|
|
3198
3198
|
if (u) {
|
|
3199
|
-
if (typeof u == "string") return
|
|
3199
|
+
if (typeof u == "string") return Re(u, f);
|
|
3200
3200
|
var d = Object.prototype.toString.call(u).slice(8, -1);
|
|
3201
|
-
return d === "Object" && u.constructor && (d = u.constructor.name), d === "Map" || d === "Set" ? Array.from(u) : d === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d) ?
|
|
3201
|
+
return d === "Object" && u.constructor && (d = u.constructor.name), d === "Map" || d === "Set" ? Array.from(u) : d === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d) ? Re(u, f) : void 0;
|
|
3202
3202
|
}
|
|
3203
3203
|
})(t)) || e) {
|
|
3204
3204
|
r && (t = r);
|
|
@@ -3218,16 +3218,16 @@ var vs = /* @__PURE__ */ new WeakMap();
|
|
|
3218
3218
|
function gs(t) {
|
|
3219
3219
|
var e = vs.get(t.Parser.acorn || t);
|
|
3220
3220
|
if (!e) {
|
|
3221
|
-
var r = { assert: nt(0, { startsExpr: at }), asserts: nt(0, { startsExpr: at }), global: nt(0, { startsExpr: at }), keyof: nt(0, { startsExpr: at }), readonly: nt(0, { startsExpr: at }), unique: nt(0, { startsExpr: at }), abstract: nt(0, { startsExpr: at }), declare: nt(0, { startsExpr: at }), enum: nt(0, { startsExpr: at }), module: nt(0, { startsExpr: at }), namespace: nt(0, { startsExpr: at }), interface: nt(0, { startsExpr: at }), type: nt(0, { startsExpr: at }) }, a = { at: new O("@"), jsxName: new O("jsxName"), jsxText: new O("jsxText", { beforeExpr: !0 }), jsxTagStart: new O("jsxTagStart", { startsExpr: !0 }), jsxTagEnd: new O("jsxTagEnd") }, u = { tc_oTag: new
|
|
3221
|
+
var r = { assert: nt(0, { startsExpr: at }), asserts: nt(0, { startsExpr: at }), global: nt(0, { startsExpr: at }), keyof: nt(0, { startsExpr: at }), readonly: nt(0, { startsExpr: at }), unique: nt(0, { startsExpr: at }), abstract: nt(0, { startsExpr: at }), declare: nt(0, { startsExpr: at }), enum: nt(0, { startsExpr: at }), module: nt(0, { startsExpr: at }), namespace: nt(0, { startsExpr: at }), interface: nt(0, { startsExpr: at }), type: nt(0, { startsExpr: at }) }, a = { at: new O("@"), jsxName: new O("jsxName"), jsxText: new O("jsxText", { beforeExpr: !0 }), jsxTagStart: new O("jsxTagStart", { startsExpr: !0 }), jsxTagEnd: new O("jsxTagEnd") }, u = { tc_oTag: new Y("<tag", !1, !1), tc_cTag: new Y("</tag", !1, !1), tc_expr: new Y("<tag>...</tag>", !0, !0) }, f = new RegExp("^(?:" + Object.keys(r).join("|") + ")$");
|
|
3222
3222
|
a.jsxTagStart.updateContext = function() {
|
|
3223
3223
|
this.context.push(u.tc_expr), this.context.push(u.tc_oTag), this.exprAllowed = !1;
|
|
3224
3224
|
}, a.jsxTagEnd.updateContext = function(d) {
|
|
3225
3225
|
var v = this.context.pop();
|
|
3226
3226
|
v === u.tc_oTag && d === h.slash || v === u.tc_cTag ? (this.context.pop(), this.exprAllowed = this.curContext() === u.tc_expr) : this.exprAllowed = !0;
|
|
3227
|
-
}, e = { tokTypes:
|
|
3228
|
-
return [h.name, h.string, h.num].concat(Object.values(
|
|
3227
|
+
}, e = { tokTypes: Qt({}, r, a), tokContexts: Qt({}, u), keywordsRegExp: f, tokenIsLiteralPropertyName: function(d) {
|
|
3228
|
+
return [h.name, h.string, h.num].concat(Object.values(kt), Object.values(r)).includes(d);
|
|
3229
3229
|
}, tokenIsKeywordOrIdentifier: function(d) {
|
|
3230
|
-
return [h.name].concat(Object.values(
|
|
3230
|
+
return [h.name].concat(Object.values(kt), Object.values(r)).includes(d);
|
|
3231
3231
|
}, tokenIsIdentifier: function(d) {
|
|
3232
3232
|
return [].concat(Object.values(r), [h.name]).includes(d);
|
|
3233
3233
|
}, tokenIsTSDeclarationStart: function(d) {
|
|
@@ -3240,14 +3240,14 @@ function gs(t) {
|
|
|
3240
3240
|
}
|
|
3241
3241
|
return e;
|
|
3242
3242
|
}
|
|
3243
|
-
var
|
|
3243
|
+
var Lt = 1024, bs = new RegExp("(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*", "y"), De = new RegExp("(?=(" + bs.source + "))\\1" + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, "y"), Ot = function() {
|
|
3244
3244
|
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;
|
|
3245
3245
|
};
|
|
3246
3246
|
function Ss(t, e) {
|
|
3247
3247
|
var r = e.key.name, a = t[r], u = "true";
|
|
3248
3248
|
return e.type !== "MethodDefinition" || e.kind !== "get" && e.kind !== "set" || (u = (e.static ? "s" : "i") + e.kind), a === "iget" && u === "iset" || a === "iset" && u === "iget" || a === "sget" && u === "sset" || a === "sset" && u === "sget" ? (t[r] = "true", !1) : !!a || (t[r] = u, !1);
|
|
3249
3249
|
}
|
|
3250
|
-
function
|
|
3250
|
+
function Ve(t, e) {
|
|
3251
3251
|
var r = t.key;
|
|
3252
3252
|
return !t.computed && (r.type === "Identifier" && r.name === e || r.type === "Literal" && r.value === e);
|
|
3253
3253
|
}
|
|
@@ -3289,11 +3289,11 @@ var A = { AbstractMethodHasImplementation: function(t) {
|
|
|
3289
3289
|
}, StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.", TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.", TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.", UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.", UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.", GenericsEndWithComma: "Trailing comma is not allowed at the end of generics.", UnexpectedTypeAnnotation: "Did not expect a type annotation here.", UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.", UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.", UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.", UnsupportedSignatureParameterKind: function(t) {
|
|
3290
3290
|
return "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got " + t.type + ".";
|
|
3291
3291
|
}, LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." }, Ts = { quot: '"', amp: "&", apos: "'", lt: "<", gt: ">", nbsp: " ", iexcl: "¡", cent: "¢", pound: "£", curren: "¤", yen: "¥", brvbar: "¦", sect: "§", uml: "¨", copy: "©", ordf: "ª", laquo: "«", not: "¬", shy: "", reg: "®", macr: "¯", deg: "°", plusmn: "±", sup2: "²", sup3: "³", acute: "´", micro: "µ", para: "¶", middot: "·", cedil: "¸", sup1: "¹", ordm: "º", raquo: "»", frac14: "¼", frac12: "½", frac34: "¾", iquest: "¿", Agrave: "À", Aacute: "Á", Acirc: "Â", Atilde: "Ã", Auml: "Ä", Aring: "Å", AElig: "Æ", Ccedil: "Ç", Egrave: "È", Eacute: "É", Ecirc: "Ê", Euml: "Ë", Igrave: "Ì", Iacute: "Í", Icirc: "Î", Iuml: "Ï", ETH: "Ð", Ntilde: "Ñ", Ograve: "Ò", Oacute: "Ó", Ocirc: "Ô", Otilde: "Õ", Ouml: "Ö", times: "×", Oslash: "Ø", Ugrave: "Ù", Uacute: "Ú", Ucirc: "Û", Uuml: "Ü", Yacute: "Ý", THORN: "Þ", szlig: "ß", agrave: "à", aacute: "á", acirc: "â", atilde: "ã", auml: "ä", aring: "å", aelig: "æ", ccedil: "ç", egrave: "è", eacute: "é", ecirc: "ê", euml: "ë", igrave: "ì", iacute: "í", icirc: "î", iuml: "ï", eth: "ð", ntilde: "ñ", ograve: "ò", oacute: "ó", ocirc: "ô", otilde: "õ", ouml: "ö", divide: "÷", oslash: "ø", ugrave: "ù", uacute: "ú", ucirc: "û", uuml: "ü", yacute: "ý", thorn: "þ", yuml: "ÿ", OElig: "Œ", oelig: "œ", Scaron: "Š", scaron: "š", Yuml: "Ÿ", fnof: "ƒ", circ: "ˆ", tilde: "˜", Alpha: "Α", Beta: "Β", Gamma: "Γ", Delta: "Δ", Epsilon: "Ε", Zeta: "Ζ", Eta: "Η", Theta: "Θ", Iota: "Ι", Kappa: "Κ", Lambda: "Λ", Mu: "Μ", Nu: "Ν", Xi: "Ξ", Omicron: "Ο", Pi: "Π", Rho: "Ρ", Sigma: "Σ", Tau: "Τ", Upsilon: "Υ", Phi: "Φ", Chi: "Χ", Psi: "Ψ", Omega: "Ω", alpha: "α", beta: "β", gamma: "γ", delta: "δ", epsilon: "ε", zeta: "ζ", eta: "η", theta: "θ", iota: "ι", kappa: "κ", lambda: "λ", mu: "μ", nu: "ν", xi: "ξ", omicron: "ο", pi: "π", rho: "ρ", sigmaf: "ς", sigma: "σ", tau: "τ", upsilon: "υ", phi: "φ", chi: "χ", psi: "ψ", omega: "ω", thetasym: "ϑ", upsih: "ϒ", piv: "ϖ", ensp: " ", emsp: " ", thinsp: " ", zwnj: "", zwj: "", lrm: "", rlm: "", ndash: "–", mdash: "—", lsquo: "‘", rsquo: "’", sbquo: "‚", ldquo: "“", rdquo: "”", bdquo: "„", dagger: "†", Dagger: "‡", bull: "•", hellip: "…", permil: "‰", prime: "′", Prime: "″", lsaquo: "‹", rsaquo: "›", oline: "‾", frasl: "⁄", euro: "€", image: "ℑ", weierp: "℘", real: "ℜ", trade: "™", alefsym: "ℵ", larr: "←", uarr: "↑", rarr: "→", darr: "↓", harr: "↔", crarr: "↵", lArr: "⇐", uArr: "⇑", rArr: "⇒", dArr: "⇓", hArr: "⇔", forall: "∀", part: "∂", exist: "∃", empty: "∅", nabla: "∇", isin: "∈", notin: "∉", ni: "∋", prod: "∏", sum: "∑", minus: "−", lowast: "∗", radic: "√", prop: "∝", infin: "∞", ang: "∠", and: "∧", or: "∨", cap: "∩", cup: "∪", int: "∫", there4: "∴", sim: "∼", cong: "≅", asymp: "≈", ne: "≠", equiv: "≡", le: "≤", ge: "≥", sub: "⊂", sup: "⊃", nsub: "⊄", sube: "⊆", supe: "⊇", oplus: "⊕", otimes: "⊗", perp: "⊥", sdot: "⋅", lceil: "⌈", rceil: "⌉", lfloor: "⌊", rfloor: "⌋", lang: "〈", rang: "〉", loz: "◊", spades: "♠", clubs: "♣", hearts: "♥", diams: "♦" }, Ps = /^[\da-fA-F]+$/, Cs = /^\d+$/;
|
|
3292
|
-
function
|
|
3293
|
-
return t && (t.type === "JSXIdentifier" ? t.name : t.type === "JSXNamespacedName" ? t.namespace.name + ":" + t.name.name : t.type === "JSXMemberExpression" ?
|
|
3292
|
+
function Mt(t) {
|
|
3293
|
+
return t && (t.type === "JSXIdentifier" ? t.name : t.type === "JSXNamespacedName" ? t.namespace.name + ":" + t.name.name : t.type === "JSXMemberExpression" ? Mt(t.object) + "." + Mt(t.property) : void 0);
|
|
3294
3294
|
}
|
|
3295
|
-
var
|
|
3296
|
-
function
|
|
3295
|
+
var ce = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
3296
|
+
function Fe(t) {
|
|
3297
3297
|
if (!t) throw new Error("Assert fail");
|
|
3298
3298
|
}
|
|
3299
3299
|
function ks(t) {
|
|
@@ -3302,39 +3302,39 @@ function ks(t) {
|
|
|
3302
3302
|
function As(t) {
|
|
3303
3303
|
return t === "in" || t === "out";
|
|
3304
3304
|
}
|
|
3305
|
-
function
|
|
3305
|
+
function pe(t, e) {
|
|
3306
3306
|
return 2 | (t ? 4 : 0) | (e ? 8 : 0);
|
|
3307
3307
|
}
|
|
3308
3308
|
function ws(t) {
|
|
3309
3309
|
if (t.type !== "MemberExpression") return !1;
|
|
3310
3310
|
var e = t.property;
|
|
3311
|
-
return (!t.computed || !(e.type !== "TemplateLiteral" || e.expressions.length > 0)) &&
|
|
3311
|
+
return (!t.computed || !(e.type !== "TemplateLiteral" || e.expressions.length > 0)) && Si(t.object);
|
|
3312
3312
|
}
|
|
3313
|
-
function
|
|
3314
|
-
return t.type === "Identifier" || t.type === "MemberExpression" && !t.computed &&
|
|
3313
|
+
function Si(t) {
|
|
3314
|
+
return t.type === "Identifier" || t.type === "MemberExpression" && !t.computed && Si(t.object);
|
|
3315
3315
|
}
|
|
3316
|
-
function
|
|
3316
|
+
function Be(t) {
|
|
3317
3317
|
return t === "private" || t === "public" || t === "protected";
|
|
3318
3318
|
}
|
|
3319
3319
|
function Es(t) {
|
|
3320
3320
|
var e = {}, r = e.dts, a = r !== void 0 && r, u = e.allowSatisfies, f = u !== void 0 && u;
|
|
3321
3321
|
return function(d) {
|
|
3322
|
-
var v = d.acorn || xs, g = gs(v), o = v.tokTypes, w = v.keywordTypes, _ = v.isIdentifierStart,
|
|
3323
|
-
function Ai(T, it,
|
|
3324
|
-
|
|
3325
|
-
for (var G = it; G <
|
|
3322
|
+
var v = d.acorn || xs, g = gs(v), o = v.tokTypes, w = v.keywordTypes, _ = v.isIdentifierStart, M = v.lineBreak, j = v.isNewLine, D = v.tokContexts, J = v.isIdentifierChar, I = g.tokTypes, et = g.tokContexts, se = g.keywordsRegExp, Ti = g.tokenIsLiteralPropertyName, Pi = g.tokenIsTemplate, Ci = g.tokenIsTSDeclarationStart, U = g.tokenIsIdentifier, qt = g.tokenIsKeywordOrIdentifier, ki = g.tokenIsTSTypeOperator;
|
|
3323
|
+
function Ai(T, it, Q) {
|
|
3324
|
+
Q === void 0 && (Q = T.length);
|
|
3325
|
+
for (var G = it; G < Q; G++) {
|
|
3326
3326
|
var B = T.charCodeAt(G);
|
|
3327
|
-
if (
|
|
3327
|
+
if (j(B)) return G < Q - 1 && B === 13 && T.charCodeAt(G + 1) === 10 ? G + 2 : G + 1;
|
|
3328
3328
|
}
|
|
3329
3329
|
return -1;
|
|
3330
3330
|
}
|
|
3331
|
-
d = (function(T, it,
|
|
3332
|
-
var G =
|
|
3331
|
+
d = (function(T, it, Q) {
|
|
3332
|
+
var G = Q.tokTypes, B = it.tokTypes;
|
|
3333
3333
|
return (function(p) {
|
|
3334
3334
|
function i() {
|
|
3335
3335
|
return p.apply(this, arguments) || this;
|
|
3336
3336
|
}
|
|
3337
|
-
|
|
3337
|
+
Wt(i, p);
|
|
3338
3338
|
var s = i.prototype;
|
|
3339
3339
|
return s.takeDecorators = function(n) {
|
|
3340
3340
|
var c = this.decoratorStack[this.decoratorStack.length - 1];
|
|
@@ -3368,13 +3368,13 @@ function Es(t) {
|
|
|
3368
3368
|
return n;
|
|
3369
3369
|
}, i;
|
|
3370
3370
|
})(T);
|
|
3371
|
-
})(d, g, v), d = (function(T, it,
|
|
3371
|
+
})(d, g, v), d = (function(T, it, Q, G) {
|
|
3372
3372
|
var B = T.tokTypes, p = it.tokTypes, i = T.isNewLine, s = T.isIdentifierChar, n = Object.assign({ allowNamespaces: !0, allowNamespacedObjects: !0 }, {});
|
|
3373
3373
|
return (function(c) {
|
|
3374
3374
|
function l() {
|
|
3375
3375
|
return c.apply(this, arguments) || this;
|
|
3376
3376
|
}
|
|
3377
|
-
|
|
3377
|
+
Wt(l, c);
|
|
3378
3378
|
var m = l.prototype;
|
|
3379
3379
|
return m.jsx_readToken = function() {
|
|
3380
3380
|
for (var y = "", x = this.pos; ; ) {
|
|
@@ -3489,7 +3489,7 @@ function Es(t) {
|
|
|
3489
3489
|
default:
|
|
3490
3490
|
this.unexpected();
|
|
3491
3491
|
}
|
|
3492
|
-
|
|
3492
|
+
Mt(L.name) !== Mt(E.name) && this.raise(L.start, "Expected corresponding JSX closing tag for <" + Mt(E.name) + ">");
|
|
3493
3493
|
}
|
|
3494
3494
|
var C = E.name ? "Element" : "Fragment";
|
|
3495
3495
|
return b["opening" + C] = E, b["closing" + C] = L, b.children = S, this.type === B.relational && this.value === "<" && this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"), this.finishNode(b, "JSX" + C);
|
|
@@ -3500,14 +3500,14 @@ function Es(t) {
|
|
|
3500
3500
|
var y = this.start, x = this.startLoc;
|
|
3501
3501
|
return this.next(), this.jsx_parseElementAt(y, x);
|
|
3502
3502
|
}, l;
|
|
3503
|
-
})(
|
|
3504
|
-
})(v, g, d), d = (function(T, it,
|
|
3505
|
-
var G = it.tokTypes, B =
|
|
3503
|
+
})(Q);
|
|
3504
|
+
})(v, g, d), d = (function(T, it, Q) {
|
|
3505
|
+
var G = it.tokTypes, B = Q.tokTypes;
|
|
3506
3506
|
return (function(p) {
|
|
3507
3507
|
function i() {
|
|
3508
3508
|
return p.apply(this, arguments) || this;
|
|
3509
3509
|
}
|
|
3510
|
-
|
|
3510
|
+
Wt(i, p);
|
|
3511
3511
|
var s = i.prototype;
|
|
3512
3512
|
return s.parseMaybeImportAttributes = function(n) {
|
|
3513
3513
|
if (this.type === B._with || this.type === G.assert) {
|
|
@@ -3538,18 +3538,18 @@ function Es(t) {
|
|
|
3538
3538
|
return l;
|
|
3539
3539
|
})(c), { allowedModifiers: ["const"], disallowedModifiers: ["in", "out"], errorTemplate: A.InvalidModifierOnTypeParameterPositions }), c;
|
|
3540
3540
|
}
|
|
3541
|
-
|
|
3542
|
-
var
|
|
3541
|
+
Wt(it, T);
|
|
3542
|
+
var Q, G, B, p = it.prototype;
|
|
3543
3543
|
return p.getTokenFromCodeInType = function(i) {
|
|
3544
3544
|
return i === 62 || i === 60 ? this.finishOp(o.relational, 1) : T.prototype.getTokenFromCode.call(this, i);
|
|
3545
3545
|
}, p.readToken = function(i) {
|
|
3546
3546
|
if (!this.inType) {
|
|
3547
3547
|
var s = this.curContext();
|
|
3548
|
-
if (s ===
|
|
3549
|
-
if (s ===
|
|
3548
|
+
if (s === et.tc_expr) return this.jsx_readToken();
|
|
3549
|
+
if (s === et.tc_oTag || s === et.tc_cTag) {
|
|
3550
3550
|
if (_(i)) return this.jsx_readWord();
|
|
3551
3551
|
if (i == 62) return ++this.pos, this.finishToken(I.jsxTagEnd);
|
|
3552
|
-
if ((i === 34 || i === 39) && s ==
|
|
3552
|
+
if ((i === 34 || i === 39) && s == et.tc_oTag) return this.jsx_readString(i);
|
|
3553
3553
|
}
|
|
3554
3554
|
if (i === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) return ++this.pos, this.finishToken(I.jsxTagStart);
|
|
3555
3555
|
}
|
|
@@ -3589,7 +3589,7 @@ function Es(t) {
|
|
|
3589
3589
|
return this.nextTokenStartSince(this.pos);
|
|
3590
3590
|
}, p.tsHasSomeModifiers = function(i, s) {
|
|
3591
3591
|
return s.some(function(n) {
|
|
3592
|
-
return
|
|
3592
|
+
return Be(n) ? i.accessibility === n : !!i[n];
|
|
3593
3593
|
});
|
|
3594
3594
|
}, p.tsIsStartOfStaticBlocks = function() {
|
|
3595
3595
|
return this.isContextual("static") && this.lookaheadCharCode() === 123;
|
|
@@ -3637,7 +3637,7 @@ function Es(t) {
|
|
|
3637
3637
|
}, p.isAbstractConstructorSignature = function() {
|
|
3638
3638
|
return this.ts_isContextual(I.abstract) && this.lookahead().type === o._new;
|
|
3639
3639
|
}, p.nextTokenStartSince = function(i) {
|
|
3640
|
-
return
|
|
3640
|
+
return ce.lastIndex = i, ce.test(this.input) ? ce.lastIndex : i;
|
|
3641
3641
|
}, p.lookaheadCharCode = function() {
|
|
3642
3642
|
return this.input.charCodeAt(this.nextTokenStart());
|
|
3643
3643
|
}, p.compareLookaheadState = function(i, s) {
|
|
@@ -3666,7 +3666,7 @@ function Es(t) {
|
|
|
3666
3666
|
return this.setLookaheadState(s), c;
|
|
3667
3667
|
}, p.readWord = function() {
|
|
3668
3668
|
var i = this.readWord1(), s = o.name;
|
|
3669
|
-
return this.keywords.test(i) ? s = w[i] : new RegExp(
|
|
3669
|
+
return this.keywords.test(i) ? s = w[i] : new RegExp(se).test(i) && (s = I[i]), this.finishToken(s, i);
|
|
3670
3670
|
}, p.skipBlockComment = function() {
|
|
3671
3671
|
var i;
|
|
3672
3672
|
this.isLookahead || (i = this.options.onComment && this.curPosition());
|
|
@@ -3676,7 +3676,7 @@ function Es(t) {
|
|
|
3676
3676
|
}, p.skipLineComment = function(i) {
|
|
3677
3677
|
var s, n = this.pos;
|
|
3678
3678
|
this.isLookahead || (s = this.options.onComment && this.curPosition());
|
|
3679
|
-
for (var c = this.input.charCodeAt(this.pos += i); this.pos < this.input.length && !
|
|
3679
|
+
for (var c = this.input.charCodeAt(this.pos += i); this.pos < this.input.length && !j(c); ) c = this.input.charCodeAt(++this.pos);
|
|
3680
3680
|
this.isLookahead || this.options.onComment && this.options.onComment(!1, this.input.slice(n + i, this.pos), n, this.pos, s, this.curPosition());
|
|
3681
3681
|
}, p.finishToken = function(i, s) {
|
|
3682
3682
|
this.preValue = this.value, this.preToken = this.type, this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition());
|
|
@@ -3687,16 +3687,16 @@ function Es(t) {
|
|
|
3687
3687
|
}, p.isLineTerminator = function() {
|
|
3688
3688
|
return this.eat(o.semi) || T.prototype.canInsertSemicolon.call(this);
|
|
3689
3689
|
}, p.hasFollowingLineBreak = function() {
|
|
3690
|
-
return
|
|
3690
|
+
return De.lastIndex = this.end, De.test(this.input);
|
|
3691
3691
|
}, p.addExtra = function(i, s, n, c) {
|
|
3692
3692
|
if (c === void 0 && (c = !0), i) {
|
|
3693
3693
|
var l = i.extra = i.extra || {};
|
|
3694
3694
|
c ? l[s] = n : Object.defineProperty(l, s, { enumerable: c, value: n });
|
|
3695
3695
|
}
|
|
3696
3696
|
}, p.isLiteralPropertyName = function() {
|
|
3697
|
-
return
|
|
3697
|
+
return Ti(this.type);
|
|
3698
3698
|
}, p.hasPrecedingLineBreak = function() {
|
|
3699
|
-
return
|
|
3699
|
+
return M.test(this.input.slice(this.lastTokEndLoc.index, this.start));
|
|
3700
3700
|
}, p.createIdentifier = function(i, s) {
|
|
3701
3701
|
return i.name = s, this.finishNode(i, "Identifier");
|
|
3702
3702
|
}, p.resetStartLocationFromNode = function(i, s) {
|
|
@@ -3737,7 +3737,7 @@ function Es(t) {
|
|
|
3737
3737
|
}
|
|
3738
3738
|
return !1;
|
|
3739
3739
|
}, p.ts_eatContextualWithState = function(i, s, n) {
|
|
3740
|
-
if (
|
|
3740
|
+
if (se.test(i)) {
|
|
3741
3741
|
if (this.ts_isContextualWithState(n, I[i])) {
|
|
3742
3742
|
for (var c = 0; c < s; c++) this.next();
|
|
3743
3743
|
return !0;
|
|
@@ -3750,7 +3750,7 @@ function Es(t) {
|
|
|
3750
3750
|
}, p.canHaveLeadingDecorator = function() {
|
|
3751
3751
|
return this.match(o._class);
|
|
3752
3752
|
}, p.eatContextual = function(i) {
|
|
3753
|
-
return
|
|
3753
|
+
return se.test(i) ? !!this.ts_isContextual(I[i]) && (this.next(), !0) : T.prototype.eatContextual.call(this, i);
|
|
3754
3754
|
}, p.tsIsExternalModuleReference = function() {
|
|
3755
3755
|
return this.isContextual("require") && this.lookaheadCharCode() === 40;
|
|
3756
3756
|
}, p.tsParseExternalModuleReference = function() {
|
|
@@ -3776,7 +3776,7 @@ function Es(t) {
|
|
|
3776
3776
|
}
|
|
3777
3777
|
return this.next(), T.prototype.exitScope.call(this), this.finishNode(i, "TSModuleBlock");
|
|
3778
3778
|
}, p.tsParseAmbientExternalModuleDeclaration = function(i) {
|
|
3779
|
-
return this.ts_isContextual(I.global) ? (i.global = !0, i.id = this.parseIdent()) : this.match(o.string) ? i.id = this.parseLiteral(this.value) : this.unexpected(), this.match(o.braceL) ? (T.prototype.enterScope.call(this,
|
|
3779
|
+
return this.ts_isContextual(I.global) ? (i.global = !0, i.id = this.parseIdent()) : this.match(o.string) ? i.id = this.parseLiteral(this.value) : this.unexpected(), this.match(o.braceL) ? (T.prototype.enterScope.call(this, Lt), i.body = this.tsParseModuleBlock(), T.prototype.exitScope.call(this)) : T.prototype.semicolon.call(this), this.finishNode(i, "TSModuleDeclaration");
|
|
3780
3780
|
}, p.tsTryParseDeclare = function(i) {
|
|
3781
3781
|
var s = this;
|
|
3782
3782
|
if (!this.isLineTerminator()) {
|
|
@@ -4115,7 +4115,7 @@ function Es(t) {
|
|
|
4115
4115
|
return this.tsIsStartOfFunctionType() ? this.tsParseFunctionOrConstructorType("TSFunctionType") : this.match(o._new) ? this.tsParseFunctionOrConstructorType("TSConstructorType") : this.isAbstractConstructorSignature() ? this.tsParseFunctionOrConstructorType("TSConstructorType", !0) : this.tsParseUnionTypeOrHigher();
|
|
4116
4116
|
}, p.tsParseType = function() {
|
|
4117
4117
|
var i = this;
|
|
4118
|
-
|
|
4118
|
+
Fe(this.inType);
|
|
4119
4119
|
var s = this.tsParseNonConditionalType();
|
|
4120
4120
|
if (this.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(o._extends)) return s;
|
|
4121
4121
|
var n = this.startNodeAtNode(s);
|
|
@@ -4185,7 +4185,7 @@ function Es(t) {
|
|
|
4185
4185
|
}; ; ) {
|
|
4186
4186
|
var L = this.startLoc, C = this.tsParseModifier(c.concat(l ?? []), m);
|
|
4187
4187
|
if (!C) break;
|
|
4188
|
-
|
|
4188
|
+
Be(C) ? n.accessibility ? this.raise(this.start, A.DuplicateAccessibilityModifier()) : (S(L, C, C, "override"), S(L, C, C, "static"), S(L, C, C, "readonly"), S(L, C, C, "accessor"), b.accessibility = C, n.accessibility = C) : As(C) ? n[C] ? this.raise(this.start, A.DuplicateModifier({ modifier: C })) : (S(L, C, "in", "out"), b[C] = C, n[C] = !0) : ks(C) ? n[C] ? this.raise(this.start, A.DuplicateModifier({ modifier: C })) : (E(L, C, "accessor", "readonly"), E(L, C, "accessor", "static"), E(L, C, "accessor", "override"), b[C] = C, n[C] = !0) : Object.hasOwnProperty.call(n, C) ? this.raise(this.start, A.DuplicateModifier({ modifier: C })) : (S(L, C, "static", "readonly"), S(L, C, "static", "override"), S(L, C, "override", "readonly"), S(L, C, "abstract", "override"), E(L, C, "declare", "override"), E(L, C, "static", "abstract"), b[C] = C, n[C] = !0), l != null && l.includes(C) && this.raise(this.start, x);
|
|
4189
4189
|
}
|
|
4190
4190
|
return b;
|
|
4191
4191
|
}, p.tsParseInOutModifiers = function(i) {
|
|
@@ -4261,7 +4261,7 @@ function Es(t) {
|
|
|
4261
4261
|
if (!this.hasFollowingLineBreak()) return i.abstract = !0, this.tsParseInterfaceDeclaration(i);
|
|
4262
4262
|
} else this.unexpected(i.start);
|
|
4263
4263
|
}, p.tsIsDeclarationStart = function() {
|
|
4264
|
-
return
|
|
4264
|
+
return Ci(this.type);
|
|
4265
4265
|
}, p.tsParseExpressionStatement = function(i, s) {
|
|
4266
4266
|
switch (s.name) {
|
|
4267
4267
|
case "declare":
|
|
@@ -4270,7 +4270,7 @@ function Es(t) {
|
|
|
4270
4270
|
break;
|
|
4271
4271
|
case "global":
|
|
4272
4272
|
if (this.match(o.braceL)) {
|
|
4273
|
-
T.prototype.enterScope.call(this,
|
|
4273
|
+
T.prototype.enterScope.call(this, Lt);
|
|
4274
4274
|
var c = i;
|
|
4275
4275
|
return c.global = !0, c.id = s, c.body = this.tsParseModuleBlock(), T.prototype.exitScope.call(this), this.finishNode(c, "TSModuleDeclaration");
|
|
4276
4276
|
}
|
|
@@ -4310,7 +4310,7 @@ function Es(t) {
|
|
|
4310
4310
|
if (s === void 0 && (s = !1), i.id = this.parseIdent(), s || this.checkLValSimple(i.id, 8), this.eat(o.dot)) {
|
|
4311
4311
|
var n = this.startNode();
|
|
4312
4312
|
this.tsParseModuleOrNamespaceDeclaration(n, !0), i.body = n;
|
|
4313
|
-
} else T.prototype.enterScope.call(this,
|
|
4313
|
+
} else T.prototype.enterScope.call(this, Lt), i.body = this.tsParseModuleBlock(), T.prototype.exitScope.call(this);
|
|
4314
4314
|
return this.finishNode(i, "TSModuleDeclaration");
|
|
4315
4315
|
}, p.checkLValSimple = function(i, s, n) {
|
|
4316
4316
|
return s === void 0 && (s = 0), T.prototype.checkLValSimple.call(this, i, s, n);
|
|
@@ -4372,7 +4372,7 @@ function Es(t) {
|
|
|
4372
4372
|
}, p.parseFunction = function(i, s, n, c, l) {
|
|
4373
4373
|
this.initFunction(i), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !c) && (this.type === o.star && 2 & s && this.unexpected(), i.generator = this.eat(o.star)), this.options.ecmaVersion >= 8 && (i.async = !!c), 1 & s && (i.id = 4 & s && this.type !== o.name ? null : this.parseIdent());
|
|
4374
4374
|
var m = this.yieldPos, y = this.awaitPos, x = this.awaitIdentPos, b = this.maybeInArrowParameters;
|
|
4375
|
-
this.maybeInArrowParameters = !1, this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(
|
|
4375
|
+
this.maybeInArrowParameters = !1, this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(pe(i.async, i.generator)), 1 & s || (i.id = this.type === o.name ? this.parseIdent() : null), this.parseFunctionParams(i);
|
|
4376
4376
|
var S = 1 & s;
|
|
4377
4377
|
return this.parseFunctionBody(i, n, !1, l, { isFunctionDeclaration: S }), this.yieldPos = m, this.awaitPos = y, this.awaitIdentPos = x, 1 & s && i.id && !(2 & s) && this.checkLValSimple(i.id, i.body ? this.strict || i.generator || i.async ? this.treatFunctionsAsVar ? 1 : 2 : 3 : 0), this.maybeInArrowParameters = b, this.finishNode(i, S ? "FunctionDeclaration" : "FunctionExpression");
|
|
4378
4378
|
}, p.parseFunctionBody = function(i, s, n, c, l) {
|
|
@@ -4465,7 +4465,7 @@ function Es(t) {
|
|
|
4465
4465
|
else {
|
|
4466
4466
|
if (i.declaration = null, i.specifiers = this.parseExportSpecifiers(s), this.eatContextual("from")) this.type !== o.string && this.unexpected(), i.source = this.parseExprAtom(), this.parseMaybeImportAttributes(i);
|
|
4467
4467
|
else {
|
|
4468
|
-
for (var y, x =
|
|
4468
|
+
for (var y, x = Me(i.specifiers); !(y = x()).done; ) {
|
|
4469
4469
|
var b = y.value;
|
|
4470
4470
|
this.checkUnreserved(b.local), this.checkLocalExport(b.local), b.local.type === "Literal" && this.raise(b.local.start, "A string literal cannot be used as an exported binding without `from`.");
|
|
4471
4471
|
}
|
|
@@ -4494,7 +4494,7 @@ function Es(t) {
|
|
|
4494
4494
|
if (this.type === I.at) return this.parseDecorators(), this.parseExprAtom();
|
|
4495
4495
|
if (U(this.type)) {
|
|
4496
4496
|
var c = this.potentialArrowAt === this.start, l = this.start, m = this.startLoc, y = this.containsEsc, x = this.parseIdent(!1);
|
|
4497
|
-
if (this.options.ecmaVersion >= 8 && !y && x.name === "async" && !this.canInsertSemicolon() && this.eat(o._function)) return this.overrideContext(
|
|
4497
|
+
if (this.options.ecmaVersion >= 8 && !y && x.name === "async" && !this.canInsertSemicolon() && this.eat(o._function)) return this.overrideContext(D.f_expr), this.parseFunction(this.startNodeAt(l, m), 0, !1, !0, s);
|
|
4498
4498
|
if (c && !this.canInsertSemicolon()) {
|
|
4499
4499
|
if (this.eat(o.arrow)) return this.parseArrowExpression(this.startNodeAt(l, m), [x], !1, s);
|
|
4500
4500
|
if (this.options.ecmaVersion >= 8 && x.name === "async" && this.type === o.name && !y && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) return x = this.parseIdent(!1), !this.canInsertSemicolon() && this.eat(o.arrow) || this.unexpected(), this.parseArrowExpression(this.startNodeAt(l, m), [x], !0, s);
|
|
@@ -4521,14 +4521,14 @@ function Es(t) {
|
|
|
4521
4521
|
this.unexpected();
|
|
4522
4522
|
}, p.parseIdentNode = function() {
|
|
4523
4523
|
var i = this.startNode();
|
|
4524
|
-
return
|
|
4524
|
+
return qt(this.type) ? (i.name = this.value, i) : T.prototype.parseIdentNode.call(this);
|
|
4525
4525
|
}, p.parseVarStatement = function(i, s, n) {
|
|
4526
4526
|
n === void 0 && (n = !1);
|
|
4527
4527
|
var c = this.isAmbientContext;
|
|
4528
4528
|
this.next(), T.prototype.parseVar.call(this, i, !1, s, n || c), this.semicolon();
|
|
4529
4529
|
var l = this.finishNode(i, "VariableDeclaration");
|
|
4530
4530
|
if (!c) return l;
|
|
4531
|
-
for (var m, y =
|
|
4531
|
+
for (var m, y = Me(l.declarations); !(m = y()).done; ) {
|
|
4532
4532
|
var x = m.value, b = x.init;
|
|
4533
4533
|
b && (s !== "const" || x.id.typeAnnotation ? this.raise(b.start, A.InitializerNotAllowedInAmbientContext) : b.type !== "StringLiteral" && b.type !== "BooleanLiteral" && b.type !== "NumericLiteral" && b.type !== "BigIntLiteral" && (b.type !== "TemplateLiteral" || b.expressions.length > 0) && !ws(b) && this.raise(b.start, A.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference));
|
|
4534
4534
|
}
|
|
@@ -4605,7 +4605,7 @@ function Es(t) {
|
|
|
4605
4605
|
var x = i.declare, b = i.kind;
|
|
4606
4606
|
!(x !== void 0 && x) || b !== "get" && b !== "set" || this.raise(i.start, A.DeclareAccessor({ kind: b })), y && (i.typeParameters = y);
|
|
4607
4607
|
var S = i.key;
|
|
4608
|
-
i.kind === "constructor" ? (s && this.raise(S.start, "Constructor can't be a generator"), n && this.raise(S.start, "Constructor can't be an async method")) : i.static &&
|
|
4608
|
+
i.kind === "constructor" ? (s && this.raise(S.start, "Constructor can't be a generator"), n && this.raise(S.start, "Constructor can't be an async method")) : i.static && Ve(i, "prototype") && this.raise(S.start, "Classes may not have a static property named prototype");
|
|
4609
4609
|
var E = i.value = this.parseMethod(s, n, c, !0, i);
|
|
4610
4610
|
return i.kind === "get" && E.params.length !== 0 && this.raiseRecoverable(E.start, "getter should have no params"), i.kind === "set" && E.params.length !== 1 && this.raiseRecoverable(E.start, "setter should have exactly one param"), i.kind === "set" && E.params[0].type === "RestElement" && this.raiseRecoverable(E.params[0].start, "Setter cannot use rest params"), this.finishNode(i, "MethodDefinition");
|
|
4611
4611
|
}, p.isClassMethod = function() {
|
|
@@ -4624,7 +4624,7 @@ function Es(t) {
|
|
|
4624
4624
|
(s.eatContextual("get") || s.eatContextual("set")) && (s.isClassElementNameStart() ? b = z : m = z);
|
|
4625
4625
|
}
|
|
4626
4626
|
if (m ? (l.computed = !1, l.key = s.startNodeAt(s.lastTokStart, s.lastTokStartLoc), l.key.name = m, s.finishNode(l.key, "Identifier")) : s.parseClassElementName(l), s.parsePostMemberNameModifiers(l), s.isClassMethod() || c < 13 || s.type === o.parenL || b !== "method" || y || x) {
|
|
4627
|
-
var H = !l.static &&
|
|
4627
|
+
var H = !l.static && Ve(l, "constructor"), W = H && i;
|
|
4628
4628
|
H && b !== "method" && s.raise(l.key.start, "Constructor can't have get/set modifier"), l.kind = H ? "constructor" : b, s.parseClassMethod(l, y, x, W);
|
|
4629
4629
|
} else s.parseClassField(l);
|
|
4630
4630
|
return l;
|
|
@@ -4646,7 +4646,7 @@ function Es(t) {
|
|
|
4646
4646
|
}, p.parseArrowExpression = function(i, s, n, c) {
|
|
4647
4647
|
this.match(o.colon) && (i.returnType = this.tsParseTypeAnnotation());
|
|
4648
4648
|
var l = this.yieldPos, m = this.awaitPos, y = this.awaitIdentPos;
|
|
4649
|
-
this.enterScope(16 |
|
|
4649
|
+
this.enterScope(16 | pe(n, !1)), this.initFunction(i);
|
|
4650
4650
|
var x = this.maybeInArrowParameters;
|
|
4651
4651
|
return this.options.ecmaVersion >= 8 && (i.async = !!n), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.maybeInArrowParameters = !0, i.params = this.toAssignableList(s, !0), this.maybeInArrowParameters = !1, this.parseFunctionBody(i, !0, !1, c), this.yieldPos = l, this.awaitPos = m, this.awaitIdentPos = y, this.maybeInArrowParameters = x, this.finishNode(i, "ArrowFunctionExpression");
|
|
4652
4652
|
}, p.parseMaybeAssignOrigin = function(i, s, n) {
|
|
@@ -4655,7 +4655,7 @@ function Es(t) {
|
|
|
4655
4655
|
this.exprAllowed = !1;
|
|
4656
4656
|
}
|
|
4657
4657
|
var c = !1, l = -1, m = -1, y = -1;
|
|
4658
|
-
s ? (l = s.parenthesizedAssign, m = s.trailingComma, y = s.doubleProto, s.parenthesizedAssign = s.trailingComma = -1) : (s = new
|
|
4658
|
+
s ? (l = s.parenthesizedAssign, m = s.trailingComma, y = s.doubleProto, s.parenthesizedAssign = s.trailingComma = -1) : (s = new Ot(), c = !0);
|
|
4659
4659
|
var x = this.start, b = this.startLoc;
|
|
4660
4660
|
(this.type === o.parenL || U(this.type)) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = i === "await");
|
|
4661
4661
|
var S = this.parseMaybeConditional(i, s);
|
|
@@ -4676,13 +4676,13 @@ function Es(t) {
|
|
|
4676
4676
|
if (!((c = L) != null && c.error || this.tsMatchLeftRelational())) return this.parseMaybeAssignOrigin(i, s, n);
|
|
4677
4677
|
E && !this.compareLookaheadState(E, this.getCurLookaheadState()) || (E = this.cloneCurLookaheadState());
|
|
4678
4678
|
var rt = this.tryParse(function(vt) {
|
|
4679
|
-
var
|
|
4679
|
+
var Nt, _t;
|
|
4680
4680
|
z = H.tsParseTypeParameters();
|
|
4681
4681
|
var gt = H.parseMaybeAssignOrigin(i, s, n);
|
|
4682
|
-
return (gt.type !== "ArrowFunctionExpression" || (
|
|
4682
|
+
return (gt.type !== "ArrowFunctionExpression" || (Nt = gt.extra) != null && Nt.parenthesized) && vt(), ((_t = z) == null ? void 0 : _t.params.length) !== 0 && H.resetStartLocationFromNode(gt, z), gt.typeParameters = z, gt;
|
|
4683
4683
|
}, E);
|
|
4684
4684
|
if (!rt.error && !rt.aborted) return z && this.reportReservedArrowTypeParam(z), rt.node;
|
|
4685
|
-
if (!L && (
|
|
4685
|
+
if (!L && (Fe(!0), !(C = this.tryParse(function() {
|
|
4686
4686
|
return H.parseMaybeAssignOrigin(i, s, n);
|
|
4687
4687
|
}, E)).error)) return C.node;
|
|
4688
4688
|
if ((l = L) != null && l.node) return this.setLookaheadState(L.failState), L.node;
|
|
@@ -4747,7 +4747,7 @@ function Es(t) {
|
|
|
4747
4747
|
return !1;
|
|
4748
4748
|
}
|
|
4749
4749
|
}, p.toAssignable = function(i, s, n) {
|
|
4750
|
-
switch (s === void 0 && (s = !1), n === void 0 && (n = new
|
|
4750
|
+
switch (s === void 0 && (s = !1), n === void 0 && (n = new Ot()), i.type) {
|
|
4751
4751
|
case "ParenthesizedExpression":
|
|
4752
4752
|
return this.toAssignableParenthesizedExpression(i, s, n);
|
|
4753
4753
|
case "TSAsExpression":
|
|
@@ -4812,7 +4812,7 @@ function Es(t) {
|
|
|
4812
4812
|
if (this.options.ecmaVersion >= 6) {
|
|
4813
4813
|
var y = this.maybeInArrowParameters;
|
|
4814
4814
|
this.maybeInArrowParameters = !0, this.next();
|
|
4815
|
-
var x, b = this.start, S = this.startLoc, E = [], L = !0, C = !1, z = new
|
|
4815
|
+
var x, b = this.start, S = this.startLoc, E = [], L = !0, C = !1, z = new Ot(), H = this.yieldPos, W = this.awaitPos;
|
|
4816
4816
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== o.parenR; ) {
|
|
4817
4817
|
if (L ? L = !1 : this.expect(o.comma), m && this.afterTrailingComma(o.parenR, !0)) {
|
|
4818
4818
|
C = !0;
|
|
@@ -4870,24 +4870,24 @@ function Es(t) {
|
|
|
4870
4870
|
if (this.tsMatchLeftRelational() || this.match(o.bitShift)) {
|
|
4871
4871
|
var L, C = this.tsTryParseAndCatch(function() {
|
|
4872
4872
|
if (!c && x.atPossibleAsyncArrow(i)) {
|
|
4873
|
-
var
|
|
4874
|
-
if (
|
|
4873
|
+
var Ce = x.tsTryParseGenericAsyncArrowFunction(s, n, y);
|
|
4874
|
+
if (Ce) return i = Ce;
|
|
4875
4875
|
}
|
|
4876
|
-
var
|
|
4877
|
-
if (!
|
|
4876
|
+
var zt = x.tsParseTypeArgumentsInExpression();
|
|
4877
|
+
if (!zt) return i;
|
|
4878
4878
|
if (E && !x.match(o.parenL)) return L = x.curPosition(), i;
|
|
4879
|
-
if (
|
|
4880
|
-
var
|
|
4881
|
-
return
|
|
4879
|
+
if (Pi(x.type) || x.type === o.backQuote) {
|
|
4880
|
+
var ke = x.parseTaggedTemplateExpression(i, s, n, b);
|
|
4881
|
+
return ke.typeParameters = zt, ke;
|
|
4882
4882
|
}
|
|
4883
4883
|
if (!c && x.eat(o.parenL)) {
|
|
4884
|
-
var
|
|
4885
|
-
return
|
|
4884
|
+
var Ae = new Ot(), Ct = x.startNodeAt(s, n);
|
|
4885
|
+
return Ct.callee = i, Ct.arguments = x.parseExprList(o.parenR, x.options.ecmaVersion >= 8, !1, Ae), x.tsCheckForInvalidTypeCasts(Ct.arguments), Ct.typeParameters = zt, b && (Ct.optional = E), x.checkExpressionErrors(Ae, !0), i = x.finishNode(Ct, "CallExpression");
|
|
4886
4886
|
}
|
|
4887
|
-
var
|
|
4888
|
-
if (!(x.tsMatchRightRelational() ||
|
|
4889
|
-
var
|
|
4890
|
-
return
|
|
4887
|
+
var ae = x.type;
|
|
4888
|
+
if (!(x.tsMatchRightRelational() || ae === o.bitShift || ae !== o.parenL && (we = ae, !!we.startsExpr) && !x.hasPrecedingLineBreak())) {
|
|
4889
|
+
var we, ne = x.startNodeAt(s, n);
|
|
4890
|
+
return ne.expression = i, ne.typeParameters = zt, x.finishNode(ne, "TSInstantiationExpression");
|
|
4891
4891
|
}
|
|
4892
4892
|
});
|
|
4893
4893
|
if (L && this.unexpected(L), C) return C.type === "TSInstantiationExpression" && (this.match(o.dot) || this.match(o.questionDot) && this.lookaheadCharCode() !== 40) && this.raise(this.start, A.InvalidPropertyAccessAfterInstantiationExpression), i = C;
|
|
@@ -4901,20 +4901,20 @@ function Es(t) {
|
|
|
4901
4901
|
} else if (!c && this.eat(o.parenL)) {
|
|
4902
4902
|
var rt = this.maybeInArrowParameters;
|
|
4903
4903
|
this.maybeInArrowParameters = !0;
|
|
4904
|
-
var vt = new
|
|
4904
|
+
var vt = new Ot(), Nt = this.yieldPos, _t = this.awaitPos, gt = this.awaitIdentPos;
|
|
4905
4905
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
4906
|
-
var
|
|
4907
|
-
if (l && !H && this.shouldParseAsyncArrow()) this.checkPatternErrors(vt, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos =
|
|
4906
|
+
var Pe = this.parseExprList(o.parenR, this.options.ecmaVersion >= 8, !1, vt);
|
|
4907
|
+
if (l && !H && this.shouldParseAsyncArrow()) this.checkPatternErrors(vt, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = Nt, this.awaitPos = _t, this.awaitIdentPos = gt, i = this.parseSubscriptAsyncArrow(s, n, Pe, y);
|
|
4908
4908
|
else {
|
|
4909
|
-
this.checkExpressionErrors(vt, !0), this.yieldPos =
|
|
4910
|
-
var
|
|
4911
|
-
|
|
4909
|
+
this.checkExpressionErrors(vt, !0), this.yieldPos = Nt || this.yieldPos, this.awaitPos = _t || this.awaitPos, this.awaitIdentPos = gt || this.awaitIdentPos;
|
|
4910
|
+
var Ht = this.startNodeAt(s, n);
|
|
4911
|
+
Ht.callee = i, Ht.arguments = Pe, z && (Ht.optional = H), i = this.finishNode(Ht, "CallExpression");
|
|
4912
4912
|
}
|
|
4913
4913
|
this.maybeInArrowParameters = rt;
|
|
4914
4914
|
} else if (this.type === o.backQuote) {
|
|
4915
4915
|
(H || b) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
4916
|
-
var
|
|
4917
|
-
|
|
4916
|
+
var re = this.startNodeAt(s, n);
|
|
4917
|
+
re.tag = i, re.quasi = this.parseTemplate({ isTagged: !0 }), i = this.finishNode(re, "TaggedTemplateExpression");
|
|
4918
4918
|
}
|
|
4919
4919
|
return i;
|
|
4920
4920
|
}, p.parseGetterSetter = function(i) {
|
|
@@ -4958,7 +4958,7 @@ function Es(t) {
|
|
|
4958
4958
|
return i && (s.typeParameters = i), s;
|
|
4959
4959
|
}, p.parseMethod = function(i, s, n, c, l) {
|
|
4960
4960
|
var m = this.startNode(), y = this.yieldPos, x = this.awaitPos, b = this.awaitIdentPos;
|
|
4961
|
-
if (this.initFunction(m), this.options.ecmaVersion >= 6 && (m.generator = i), this.options.ecmaVersion >= 8 && (m.async = !!s), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 |
|
|
4961
|
+
if (this.initFunction(m), this.options.ecmaVersion >= 6 && (m.generator = i), this.options.ecmaVersion >= 8 && (m.async = !!s), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(64 | pe(s, m.generator) | (n ? 128 : 0)), this.expect(o.parenL), m.params = this.parseClassFunctionParams(), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(m, !1, !0, !1, { isClassMethod: c }), this.yieldPos = y, this.awaitPos = x, this.awaitIdentPos = b, l && l.abstract && m.body) {
|
|
4962
4962
|
var S = l.key;
|
|
4963
4963
|
this.raise(l.start, A.AbstractMethodHasImplementation({ methodName: S.type !== "Identifier" || l.computed ? "[" + this.input.slice(S.start, S.end) + "]" : S.name }));
|
|
4964
4964
|
}
|
|
@@ -4994,9 +4994,9 @@ function Es(t) {
|
|
|
4994
4994
|
var E = this.parseIdent();
|
|
4995
4995
|
if (this.isContextual("as")) {
|
|
4996
4996
|
var L = this.parseIdent();
|
|
4997
|
-
|
|
4998
|
-
} else
|
|
4999
|
-
} else
|
|
4997
|
+
qt(this.type) ? (x = !0, y = E, c = s ? this.parseIdent() : this.parseModuleExportName(), b = !1) : (c = L, b = !1);
|
|
4998
|
+
} else qt(this.type) ? (b = !1, c = s ? this.parseIdent() : this.parseModuleExportName()) : (x = !0, y = E);
|
|
4999
|
+
} else qt(this.type) && (x = !0, s ? (y = T.prototype.parseIdent.call(this, !0), this.isContextual("as") || this.checkUnreserved(y)) : y = this.parseModuleExportName());
|
|
5000
5000
|
x && n && this.raise(S, s ? A.TypeModifierIsUsedInTypeImports : A.TypeModifierIsUsedInTypeExports), i[l] = y, i[m] = c, i[s ? "importKind" : "exportKind"] = x ? "type" : "value", b && this.eatContextual("as") && (i[m] = s ? this.parseIdent() : this.parseModuleExportName()), i[m] || (i[m] = this.copyNode(i[l])), s && this.checkLValSimple(i[m], 2);
|
|
5001
5001
|
}, p.raiseCommonCheck = function(i, s, n) {
|
|
5002
5002
|
return s === "Comma is not permitted after the rest element" ? this.isAmbientContext && this.match(o.comma) && this.lookaheadCharCode() === 41 ? void this.next() : T.prototype.raise.call(this, i, s) : n ? T.prototype.raiseRecoverable.call(this, i, s) : T.prototype.raise.call(this, i, s);
|
|
@@ -5008,10 +5008,10 @@ function Es(t) {
|
|
|
5008
5008
|
var s = this.type;
|
|
5009
5009
|
if (s == o.braceL) {
|
|
5010
5010
|
var n = this.curContext();
|
|
5011
|
-
n ==
|
|
5011
|
+
n == et.tc_oTag ? this.context.push(D.b_expr) : n == et.tc_expr ? this.context.push(D.b_tmpl) : T.prototype.updateContext.call(this, i), this.exprAllowed = !0;
|
|
5012
5012
|
} else {
|
|
5013
5013
|
if (s !== o.slash || i !== I.jsxTagStart) return T.prototype.updateContext.call(this, i);
|
|
5014
|
-
this.context.length -= 2, this.context.push(
|
|
5014
|
+
this.context.length -= 2, this.context.push(et.tc_cTag), this.exprAllowed = !1;
|
|
5015
5015
|
}
|
|
5016
5016
|
}, p.jsx_parseOpeningElementAt = function(i, s) {
|
|
5017
5017
|
var n = this, c = this.startNodeAt(i, s), l = this.jsx_parseElementName();
|
|
@@ -5024,11 +5024,11 @@ function Es(t) {
|
|
|
5024
5024
|
for (c.attributes = []; this.type !== o.slash && this.type !== I.jsxTagEnd; ) c.attributes.push(this.jsx_parseAttribute());
|
|
5025
5025
|
return c.selfClosing = this.eat(o.slash), this.expect(I.jsxTagEnd), this.finishNode(c, l ? "JSXOpeningElement" : "JSXOpeningFragment");
|
|
5026
5026
|
}, p.enterScope = function(i) {
|
|
5027
|
-
i ===
|
|
5027
|
+
i === Lt && this.importsStack.push([]), T.prototype.enterScope.call(this, i);
|
|
5028
5028
|
var s = T.prototype.currentScope.call(this);
|
|
5029
5029
|
s.types = [], s.enums = [], s.constEnums = [], s.classes = [], s.exportOnlyBindings = [];
|
|
5030
5030
|
}, p.exitScope = function() {
|
|
5031
|
-
T.prototype.currentScope.call(this).flags ===
|
|
5031
|
+
T.prototype.currentScope.call(this).flags === Lt && this.importsStack.pop(), T.prototype.exitScope.call(this);
|
|
5032
5032
|
}, p.hasImport = function(i, s) {
|
|
5033
5033
|
var n = this.importsStack.length;
|
|
5034
5034
|
if (this.importsStack[n - 1].indexOf(i) > -1) return !0;
|
|
@@ -5056,21 +5056,21 @@ function Es(t) {
|
|
|
5056
5056
|
}
|
|
5057
5057
|
T.prototype.checkLocalExport.call(this, i);
|
|
5058
5058
|
}
|
|
5059
|
-
},
|
|
5059
|
+
}, Q = it, B = [{ key: "acornTypeScript", get: function() {
|
|
5060
5060
|
return g;
|
|
5061
5061
|
} }], (G = [{ key: "acornTypeScript", get: function() {
|
|
5062
5062
|
return g;
|
|
5063
|
-
} }]) &&
|
|
5063
|
+
} }]) && Oe(Q.prototype, G), B && Oe(Q, B), Object.defineProperty(Q, "prototype", { writable: !1 }), it;
|
|
5064
5064
|
})(d);
|
|
5065
5065
|
return wi;
|
|
5066
5066
|
};
|
|
5067
5067
|
}
|
|
5068
|
-
const Is = ["createObject", "dropObject", "removeRecords", "upsertRecords"], Ns = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"],
|
|
5068
|
+
const Is = ["createObject", "dropObject", "removeRecords", "upsertRecords"], Ns = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"], Dt = Ni(Ei);
|
|
5069
5069
|
async function Ms() {
|
|
5070
5070
|
try {
|
|
5071
5071
|
console.info("🚀 Building configuration...");
|
|
5072
|
-
const t = JSON.parse(await
|
|
5073
|
-
t.name != null && (e.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (e.version = t.version), await
|
|
5072
|
+
const t = JSON.parse(await R.readFile("package.json", "utf8")), e = JSON.parse(await R.readFile("config.json", "utf8"));
|
|
5073
|
+
t.name != null && (e.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (e.version = t.version), await R.writeFile("config.json", JSON.stringify(e, void 0, 4), "utf8"), console.info("✅ Configuration built.");
|
|
5074
5074
|
} catch (t) {
|
|
5075
5075
|
console.error("❌ Error building configuration.", t);
|
|
5076
5076
|
}
|
|
@@ -5086,10 +5086,10 @@ async function Ds(t) {
|
|
|
5086
5086
|
for (const g of f) {
|
|
5087
5087
|
const o = `${u}/${g}`;
|
|
5088
5088
|
try {
|
|
5089
|
-
const w = await
|
|
5089
|
+
const w = await R.stat(o);
|
|
5090
5090
|
if (w.isDirectory()) {
|
|
5091
|
-
const _ = await
|
|
5092
|
-
d.push(
|
|
5091
|
+
const _ = await R.readdir(o), M = { childCount: _.length, name: g, typeId: "folder" };
|
|
5092
|
+
d.push(M), await r(o, _);
|
|
5093
5093
|
} else {
|
|
5094
5094
|
const _ = { id: Ii(), lastModifiedAt: w.mtimeMs, name: g, size: w.size, typeId: "object" };
|
|
5095
5095
|
d.push(_);
|
|
@@ -5103,57 +5103,45 @@ async function Ds(t) {
|
|
|
5103
5103
|
return w === 0 ? g.name.localeCompare(o.name) : w;
|
|
5104
5104
|
});
|
|
5105
5105
|
}
|
|
5106
|
-
const a = await
|
|
5107
|
-
await r(`public/${t}`, a), await
|
|
5106
|
+
const a = await R.readdir(`public/${t}`);
|
|
5107
|
+
await r(`public/${t}`, a), await R.writeFile(`./public/${t}Index.json`, JSON.stringify(e), "utf8"), console.info("✅ Public directory index built.");
|
|
5108
5108
|
} catch (e) {
|
|
5109
5109
|
console.error("❌ Error building public directory index.", e);
|
|
5110
5110
|
}
|
|
5111
5111
|
}
|
|
5112
5112
|
async function Vs() {
|
|
5113
5113
|
try {
|
|
5114
|
-
let t = function(
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
case "MethodDefinition":
|
|
5121
|
-
const j = R.key?.name, J = R.key?.type === "PrivateIdentifier";
|
|
5122
|
-
j && !J && !(j === "constructor") && d.add(j);
|
|
5123
|
-
break;
|
|
5124
|
-
case "VariableDeclarator":
|
|
5125
|
-
const X = R.id?.name, Tt = R.init;
|
|
5126
|
-
X && Tt && (Tt.type === "ArrowFunctionExpression" || Tt.type === "FunctionExpression") && d.add(X);
|
|
5127
|
-
break;
|
|
5128
|
-
case "PropertyDefinition":
|
|
5129
|
-
const Ht = R.key?.name, ae = R.key?.type === "PrivateIdentifier", ne = R.value?.type === "ArrowFunctionExpression" || R.value?.type === "FunctionExpression";
|
|
5130
|
-
Ht && !ae && ne && d.add(Ht);
|
|
5131
|
-
break;
|
|
5114
|
+
let t = function(j) {
|
|
5115
|
+
switch (j.type) {
|
|
5116
|
+
case "FunctionDeclaration": {
|
|
5117
|
+
const D = j;
|
|
5118
|
+
D.id?.name != null && d.add(D.id.name);
|
|
5119
|
+
break;
|
|
5132
5120
|
}
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
Array.isArray(J) ? J.forEach(t) : J && typeof J == "object" && typeof J.type == "string" && t(J);
|
|
5121
|
+
case "MethodDefinition": {
|
|
5122
|
+
const D = j.key?.name, J = j.key?.type === "PrivateIdentifier";
|
|
5123
|
+
D && !J && !(D === "constructor") && d.add(D);
|
|
5124
|
+
break;
|
|
5138
5125
|
}
|
|
5139
5126
|
}
|
|
5127
|
+
for (const D in j) {
|
|
5128
|
+
if (D === "loc" || D === "range" || D === "start" || D === "end" || D === "comments") continue;
|
|
5129
|
+
const J = j[D];
|
|
5130
|
+
Array.isArray(J) ? J.forEach(t) : J && typeof J == "object" && typeof J.type == "string" && t(J);
|
|
5131
|
+
}
|
|
5140
5132
|
};
|
|
5141
5133
|
console.info("🚀 Building connector configuration...");
|
|
5142
|
-
const e = JSON.parse(await
|
|
5143
|
-
ecmaVersion: "latest",
|
|
5144
|
-
sourceType: "module",
|
|
5145
|
-
locations: !0
|
|
5146
|
-
}), d = /* @__PURE__ */ new Set();
|
|
5134
|
+
const e = JSON.parse(await R.readFile("package.json", "utf8")), r = JSON.parse(await R.readFile("config.json", "utf8")), a = await R.readFile("src/index.ts", "utf8"), f = K.extend(Es()).parse(a, { ecmaVersion: "latest", sourceType: "module", locations: !0 }), d = /* @__PURE__ */ new Set();
|
|
5147
5135
|
t(f), console.log(`Extracted ${d.size} functions:`, Array.from(d));
|
|
5148
5136
|
let v = !1, g = !1;
|
|
5149
|
-
const o = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, w = [...a.matchAll(o)].filter((
|
|
5150
|
-
for (const
|
|
5151
|
-
const
|
|
5152
|
-
_.push(
|
|
5137
|
+
const o = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, w = [...a.matchAll(o)].filter((j) => j[1] == null && j[2] !== "constructor"), _ = [];
|
|
5138
|
+
for (const j of w) {
|
|
5139
|
+
const D = j[2];
|
|
5140
|
+
_.push(D), Is.includes(D) && (v = !0), Ns.includes(D) && (g = !0);
|
|
5153
5141
|
}
|
|
5154
5142
|
_.length > 0 ? console.info(`ℹ️ Implements ${_.length} operations.`) : console.warn("⚠️ Implements no operations.");
|
|
5155
|
-
let
|
|
5156
|
-
g && v ?
|
|
5143
|
+
let M;
|
|
5144
|
+
g && v ? M = "bidirectional" : g ? M = "source" : v ? M = "destination" : M = "unknown", M === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports ${M} usage.`), e.name != null && (r.id = e.name), r.operations = _, r.usageId = M, e.version != null && (r.version = e.version), await R.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8"), console.info("✅ Connector configuration built.");
|
|
5157
5145
|
} catch (t) {
|
|
5158
5146
|
console.error("❌ Error building connector configuration.", t);
|
|
5159
5147
|
}
|
|
@@ -5161,8 +5149,8 @@ async function Vs() {
|
|
|
5161
5149
|
async function Fs() {
|
|
5162
5150
|
try {
|
|
5163
5151
|
console.info("🚀 Building context configuration...");
|
|
5164
|
-
const t = JSON.parse(await
|
|
5165
|
-
t.name != null && (e.id = t.name), e.operations = u, t.version != null && (e.version = t.version), await
|
|
5152
|
+
const t = JSON.parse(await R.readFile("package.json", "utf8")), e = JSON.parse(await R.readFile("config.json", "utf8")), r = await R.readFile("src/index.ts", "utf8"), a = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, u = [...r.matchAll(a)].filter((f) => f[1] == null && f[2] !== "constructor").map((f) => f[2]);
|
|
5153
|
+
t.name != null && (e.id = t.name), e.operations = u, t.version != null && (e.version = t.version), await R.writeFile("config.json", JSON.stringify(e, void 0, 4), "utf8"), console.info("✅ Context configuration built.");
|
|
5166
5154
|
} catch (t) {
|
|
5167
5155
|
console.error("❌ Error building context configuration.", t);
|
|
5168
5156
|
}
|
|
@@ -5170,8 +5158,8 @@ async function Fs() {
|
|
|
5170
5158
|
async function Bs() {
|
|
5171
5159
|
try {
|
|
5172
5160
|
console.info("🚀 Building presenter configuration...");
|
|
5173
|
-
const t = JSON.parse(await
|
|
5174
|
-
t.name != null && (e.id = t.name), e.operations = u, t.version != null && (e.version = t.version), await
|
|
5161
|
+
const t = JSON.parse(await R.readFile("package.json", "utf8")), e = JSON.parse(await R.readFile("config.json", "utf8")), r = await R.readFile("src/index.ts", "utf8"), a = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, u = [...r.matchAll(a)].filter((f) => f[1] == null && f[2] !== "constructor").map((f) => f[2]);
|
|
5162
|
+
t.name != null && (e.id = t.name), e.operations = u, t.version != null && (e.version = t.version), await R.writeFile("config.json", JSON.stringify(e, void 0, 4), "utf8"), console.info("✅ Presenter configuration built.");
|
|
5175
5163
|
} catch (t) {
|
|
5176
5164
|
console.error("❌ Error building context configuration.", t);
|
|
5177
5165
|
}
|
|
@@ -5179,12 +5167,12 @@ async function Bs() {
|
|
|
5179
5167
|
async function js(t = "./") {
|
|
5180
5168
|
try {
|
|
5181
5169
|
console.info("🚀 Bumping version...");
|
|
5182
|
-
const e = JSON.parse(await
|
|
5170
|
+
const e = JSON.parse(await R.readFile(`${t}package.json`, "utf8"));
|
|
5183
5171
|
if (e.version == null)
|
|
5184
|
-
e.version = "0.0.001", await
|
|
5172
|
+
e.version = "0.0.001", await R.writeFile(`${t}package.json`, JSON.stringify(e, void 0, 4), "utf8"), console.warn(`⚠️ Version initialised to ${e.version}.`);
|
|
5185
5173
|
else {
|
|
5186
5174
|
const r = e.version, a = e.version.split(".");
|
|
5187
|
-
e.version = `${a[0]}.${a[1]}.${Number(a[2]) + 1}`, await
|
|
5175
|
+
e.version = `${a[0]}.${a[1]}.${Number(a[2]) + 1}`, await R.writeFile(`${t}package.json`, JSON.stringify(e, void 0, 4), "utf8"), console.info(`✅ Version bumped from ${r} to ${e.version}.`);
|
|
5188
5176
|
}
|
|
5189
5177
|
} catch (e) {
|
|
5190
5178
|
console.error("❌ Error bumping package version.", e);
|
|
@@ -5196,12 +5184,12 @@ function Us(t) {
|
|
|
5196
5184
|
async function qs() {
|
|
5197
5185
|
const t = "<!-- DEPENDENCY_LICENSES_START -->", e = "<!-- DEPENDENCY_LICENSES_END -->";
|
|
5198
5186
|
try {
|
|
5199
|
-
const r = (await
|
|
5187
|
+
const r = (await R.readFile("./licenses.md", "utf8")).trim(), a = await R.readFile("./README.md", "utf8"), u = a.indexOf(t), f = a.indexOf(e);
|
|
5200
5188
|
(u === -1 || f === -1) && (console.error("❌ Dependency license markers not found in readme file."), process.exit(1));
|
|
5201
5189
|
const d = a.substring(0, u + t.length) + `
|
|
5202
5190
|
` + r + `
|
|
5203
5191
|
` + a.substring(f);
|
|
5204
|
-
await
|
|
5192
|
+
await R.writeFile("README.md", d, "utf8"), console.log("✅ Readme file updated with license information");
|
|
5205
5193
|
} catch (r) {
|
|
5206
5194
|
console.error("❌ Error updating readme file.", r), process.exit(1);
|
|
5207
5195
|
}
|
|
@@ -5209,11 +5197,11 @@ async function qs() {
|
|
|
5209
5197
|
async function Hs() {
|
|
5210
5198
|
const t = "<!-- OWASP_BADGE_START -->", e = "<!-- OWASP_BADGE_END -->";
|
|
5211
5199
|
try {
|
|
5212
|
-
const r = JSON.parse(await
|
|
5213
|
-
for (const
|
|
5214
|
-
if (
|
|
5215
|
-
for (const
|
|
5216
|
-
const J =
|
|
5200
|
+
const r = JSON.parse(await R.readFile("./dependency-check-reports/dependency-check-report.json", "utf-8")), a = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
|
|
5201
|
+
for (const j of r.dependencies)
|
|
5202
|
+
if (j.vulnerabilities != null)
|
|
5203
|
+
for (const D of j.vulnerabilities) {
|
|
5204
|
+
const J = D.severity?.toLowerCase() ?? "unknown";
|
|
5217
5205
|
J in a ? a[J]++ : a.unknown++;
|
|
5218
5206
|
}
|
|
5219
5207
|
const u = {
|
|
@@ -5222,20 +5210,20 @@ async function Hs() {
|
|
|
5222
5210
|
moderate: { color: "FBC02D", label: "moderate" },
|
|
5223
5211
|
low: { color: "6D8C31", label: "low" },
|
|
5224
5212
|
unknown: { color: "616161", label: "unknown" }
|
|
5225
|
-
}, f = JSON.parse(await
|
|
5226
|
-
if (Object.values(a).reduce((
|
|
5213
|
+
}, f = JSON.parse(await R.readFile("config.json", "utf8")), d = [];
|
|
5214
|
+
if (Object.values(a).reduce((j, D) => j + D, 0) === 0)
|
|
5227
5215
|
console.info("✅ No vulnerabilities found."), d.push(`[](https://data-positioning.github.io/${f.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
5228
5216
|
else
|
|
5229
|
-
for (const [
|
|
5230
|
-
const J = u[
|
|
5231
|
-
if (console.warn(`⚠️ ${
|
|
5232
|
-
const I = `https://img.shields.io/badge/OWASP-${
|
|
5217
|
+
for (const [j, D] of Object.entries(a)) {
|
|
5218
|
+
const J = u[j];
|
|
5219
|
+
if (console.warn(`⚠️ ${D} ${J.label} vulnerability(ies) found.`), D === 0) continue;
|
|
5220
|
+
const I = `https://img.shields.io/badge/OWASP-${D}%20${J.label}-${J.color}`;
|
|
5233
5221
|
d.push(`[](https://data-positioning.github.io/${f.id}/dependency-check-reports/dependency-check-report.html)`);
|
|
5234
5222
|
}
|
|
5235
|
-
const g = await
|
|
5223
|
+
const g = await R.readFile("./README.md", "utf8"), o = g.indexOf(t), w = g.indexOf(e);
|
|
5236
5224
|
(o === -1 || w === -1) && (console.error("❌ OWASP badge markers not found in README.md."), process.exit(1));
|
|
5237
|
-
const _ = d.join(" "),
|
|
5238
|
-
await
|
|
5225
|
+
const _ = d.join(" "), M = g.substring(0, o + t.length) + _ + g.substring(w);
|
|
5226
|
+
await R.writeFile("README.md", M, "utf8"), console.info("✅ OWASP dependency check badge(s) inserted into README.md");
|
|
5239
5227
|
} catch (r) {
|
|
5240
5228
|
console.error("❌ Error updating README with OWASP badges:", r), process.exit(1);
|
|
5241
5229
|
}
|
|
@@ -5243,7 +5231,7 @@ async function Hs() {
|
|
|
5243
5231
|
async function zs() {
|
|
5244
5232
|
try {
|
|
5245
5233
|
console.info("🚀 Sending deployment notice...");
|
|
5246
|
-
const t = JSON.parse(await
|
|
5234
|
+
const t = JSON.parse(await R.readFile("config.json", "utf8")), e = {
|
|
5247
5235
|
body: JSON.stringify(t),
|
|
5248
5236
|
headers: { "Content-Type": "application/json" },
|
|
5249
5237
|
method: "PUT"
|
|
@@ -5257,8 +5245,8 @@ async function zs() {
|
|
|
5257
5245
|
async function Ws() {
|
|
5258
5246
|
try {
|
|
5259
5247
|
console.info("🚀 Synchronising with GitHub....");
|
|
5260
|
-
const t = JSON.parse(await
|
|
5261
|
-
await
|
|
5248
|
+
const t = JSON.parse(await R.readFile("package.json", "utf8"));
|
|
5249
|
+
await Dt("git add ."), await Dt(`git commit -m "v${t.version}"`), await Dt("git push origin main:main"), console.info(`✅ Synchronised version ${t.version} with GitHub.`);
|
|
5262
5250
|
} catch (t) {
|
|
5263
5251
|
console.error("❌ Error synchronising with GitHub.", t);
|
|
5264
5252
|
}
|
|
@@ -5269,17 +5257,17 @@ async function Ks(t, e) {
|
|
|
5269
5257
|
async function r(u, f, d) {
|
|
5270
5258
|
for (const v of d) {
|
|
5271
5259
|
const g = `${u}/${v}`, o = `${f}/${v}`;
|
|
5272
|
-
if ((await
|
|
5273
|
-
const _ = await
|
|
5260
|
+
if ((await R.stat(g)).isDirectory()) {
|
|
5261
|
+
const _ = await R.readdir(g);
|
|
5274
5262
|
await r(g, o, _);
|
|
5275
5263
|
} else {
|
|
5276
5264
|
console.info(`⚙️ Uploading '${u}/${v}'...`);
|
|
5277
|
-
const _ = `wrangler r2 object put "datapos-sample-data-eu/${f}/${v}" --file="${u}/${v}" --jurisdiction=eu --remote`,
|
|
5278
|
-
if (
|
|
5265
|
+
const _ = `wrangler r2 object put "datapos-sample-data-eu/${f}/${v}" --file="${u}/${v}" --jurisdiction=eu --remote`, M = await Dt(_);
|
|
5266
|
+
if (M.stderr) throw new Error(M.stderr);
|
|
5279
5267
|
}
|
|
5280
5268
|
}
|
|
5281
5269
|
}
|
|
5282
|
-
const a = await
|
|
5270
|
+
const a = await R.readdir(`${t}/${e}/`);
|
|
5283
5271
|
await r(`${t}/${e}`, e, a), console.info("✅ Directory uploaded to R2.");
|
|
5284
5272
|
} catch (r) {
|
|
5285
5273
|
console.error("❌ Error uploading directory to R2.", r);
|
|
@@ -5288,7 +5276,7 @@ async function Ks(t, e) {
|
|
|
5288
5276
|
async function Js() {
|
|
5289
5277
|
try {
|
|
5290
5278
|
console.info("🚀 Uploading module configuration....");
|
|
5291
|
-
const t = JSON.parse(await
|
|
5279
|
+
const t = JSON.parse(await R.readFile("config.json", "utf8")), e = t.id, r = {
|
|
5292
5280
|
body: JSON.stringify(t),
|
|
5293
5281
|
headers: { "Content-Type": "application/json" },
|
|
5294
5282
|
method: "PUT"
|
|
@@ -5302,16 +5290,16 @@ async function Js() {
|
|
|
5302
5290
|
async function Gs(t) {
|
|
5303
5291
|
try {
|
|
5304
5292
|
console.info("🚀 Uploading module to R2...");
|
|
5305
|
-
const r = `v${JSON.parse(await
|
|
5293
|
+
const r = `v${JSON.parse(await R.readFile("package.json", "utf8")).version}`;
|
|
5306
5294
|
async function a(u, f = "") {
|
|
5307
|
-
const d = await
|
|
5295
|
+
const d = await R.readdir(u, { withFileTypes: !0 });
|
|
5308
5296
|
for (const v of d) {
|
|
5309
5297
|
const g = `${u}/${v.name}`, o = f ? `${f}/${v.name}` : v.name;
|
|
5310
5298
|
if (!v.isDirectory()) {
|
|
5311
5299
|
const w = `${t}_${r}/${o}`.replace(/\\/g, "/"), _ = v.name.endsWith(".js") ? "application/javascript" : v.name.endsWith(".css") ? "text/css" : "application/octet-stream";
|
|
5312
5300
|
console.info(`⚙️ Uploading '${o}' → '${w}'...`);
|
|
5313
|
-
const { stderr:
|
|
5314
|
-
if (
|
|
5301
|
+
const { stderr: M } = await Dt(`wrangler r2 object put "${w}" --file="${g}" --content-type ${_} --jurisdiction=eu --remote`);
|
|
5302
|
+
if (M) throw new Error(M);
|
|
5315
5303
|
}
|
|
5316
5304
|
}
|
|
5317
5305
|
}
|