UNPKG

@hpcc-js/observablehq-compiler

Version:
1,711 lines 5.91 MB
import { i as e, n as t, r as n, t as r } from "./chunk-rwCFCtyI.js"; import { n as i, r as a } from "./interpreters-hA2IQttG.js"; //#region ../../node_modules/acorn/dist/acorn.mjs var o = [ 509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239 ], s = [ 0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489 ], l = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", u = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", d = { 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", 5: "class enum extends super const export import", 6: "enum", strict: "implements interface let package private protected public static yield", strictBind: "eval arguments" }, f = "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", p = { 5: f, "5module": f + " export import", 6: f + " const class extends export import super" }, m = /^in(stanceof)?$/, h = RegExp("[" + u + "]"), g = RegExp("[" + u + l + "]"); function isInAstralSet(e, t) { for (var n = 65536, r = 0; r < t.length; r += 2) { if (n += t[r], n > e) return !1; if (n += t[r + 1], n >= e) return !0; } return !1; } function isIdentifierStart(e, t) { return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && h.test(String.fromCharCode(e)) : t === !1 ? !1 : isInAstralSet(e, s); } function isIdentifierChar(e, t) { return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && g.test(String.fromCharCode(e)) : t === !1 ? !1 : isInAstralSet(e, s) || isInAstralSet(e, o); } var _ = function TokenType(e, t) { t === void 0 && (t = {}), this.label = e, this.keyword = t.keyword, this.beforeExpr = !!t.beforeExpr, this.startsExpr = !!t.startsExpr, this.isLoop = !!t.isLoop, this.isAssign = !!t.isAssign, this.prefix = !!t.prefix, this.postfix = !!t.postfix, this.binop = t.binop || null, this.updateContext = null; }; function binop(e, t) { return new _(e, { beforeExpr: !0, binop: t }); } var v = { beforeExpr: !0 }, y = { startsExpr: !0 }, b = {}; function kw(e, t) { return t === void 0 && (t = {}), t.keyword = e, b[e] = new _(e, t); } var x = { num: new _("num", y), regexp: new _("regexp", y), string: new _("string", y), name: new _("name", y), privateId: new _("privateId", y), eof: new _("eof"), bracketL: new _("[", { beforeExpr: !0, startsExpr: !0 }), bracketR: new _("]"), braceL: new _("{", { beforeExpr: !0, startsExpr: !0 }), braceR: new _("}"), parenL: new _("(", { beforeExpr: !0, startsExpr: !0 }), parenR: new _(")"), comma: new _(",", v), semi: new _(";", v), colon: new _(":", v), dot: new _("."), question: new _("?", v), questionDot: new _("?."), arrow: new _("=>", v), template: new _("template"), invalidTemplate: new _("invalidTemplate"), ellipsis: new _("...", v), backQuote: new _("`", y), dollarBraceL: new _("${", { beforeExpr: !0, startsExpr: !0 }), eq: new _("=", { beforeExpr: !0, isAssign: !0 }), assign: new _("_=", { beforeExpr: !0, isAssign: !0 }), incDec: new _("++/--", { prefix: !0, postfix: !0, startsExpr: !0 }), prefix: new _("!/~", { beforeExpr: !0, prefix: !0, startsExpr: !0 }), logicalOR: binop("||", 1), logicalAND: binop("&&", 2), bitwiseOR: binop("|", 3), bitwiseXOR: binop("^", 4), bitwiseAND: binop("&", 5), equality: binop("==/!=/===/!==", 6), relational: binop("</>/<=/>=", 7), bitShift: binop("<</>>/>>>", 8), plusMin: new _("+/-", { beforeExpr: !0, binop: 9, prefix: !0, startsExpr: !0 }), modulo: binop("%", 10), star: binop("*", 10), slash: binop("/", 10), starstar: new _("**", { beforeExpr: !0 }), coalesce: binop("??", 1), _break: kw("break"), _case: kw("case", v), _catch: kw("catch"), _continue: kw("continue"), _debugger: kw("debugger"), _default: kw("default", v), _do: kw("do", { isLoop: !0, beforeExpr: !0 }), _else: kw("else", v), _finally: kw("finally"), _for: kw("for", { isLoop: !0 }), _function: kw("function", y), _if: kw("if"), _return: kw("return", v), _switch: kw("switch"), _throw: kw("throw", v), _try: kw("try"), _var: kw("var"), _const: kw("const"), _while: kw("while", { isLoop: !0 }), _with: kw("with"), _new: kw("new", { beforeExpr: !0, startsExpr: !0 }), _this: kw("this", y), _super: kw("super", y), _class: kw("class", y), _extends: kw("extends", v), _export: kw("export"), _import: kw("import", y), _null: kw("null", y), _true: kw("true", y), _false: kw("false", y), _in: kw("in", { beforeExpr: !0, binop: 7 }), _instanceof: kw("instanceof", { beforeExpr: !0, binop: 7 }), _typeof: kw("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }), _void: kw("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }), _delete: kw("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 }) }, S = /\r\n?|\n|\u2028|\u2029/, C = new RegExp(S.source, "g"); function isNewLine(e) { return e === 10 || e === 13 || e === 8232 || e === 8233; } function nextLineBreak(e, t, n) { n === void 0 && (n = e.length); for (var r = t; r < n; r++) { var i = e.charCodeAt(r); if (isNewLine(i)) return r < n - 1 && i === 13 && e.charCodeAt(r + 1) === 10 ? r + 2 : r + 1; } return -1; } var w = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, T = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, E = Object.prototype, D = E.hasOwnProperty, O = E.toString, k = Object.hasOwn || (function(e, t) { return D.call(e, t); }), A = Array.isArray || (function(e) { return O.call(e) === "[object Array]"; }), j = Object.create(null); function wordsRegexp(e) { return j[e] || (j[e] = RegExp("^(?:" + e.replace(/ /g, "|") + ")$")); } function codePointToString(e) { return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320)); } var M = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, N = function Position(e, t) { this.line = e, this.column = t; }; N.prototype.offset = function offset(e) { return new N(this.line, this.column + e); }; var P = function SourceLocation(e, t, n) { this.start = t, this.end = n, e.sourceFile !== null && (this.source = e.sourceFile); }; function getLineInfo(e, t) { for (var n = 1, r = 0;;) { var i = nextLineBreak(e, r, t); if (i < 0) return new N(n, t - r); ++n, r = i; } } var F = { ecmaVersion: null, sourceType: "script", onInsertedSemicolon: null, onTrailingComma: null, allowReserved: null, allowReturnOutsideFunction: !1, allowImportExportEverywhere: !1, allowAwaitOutsideFunction: null, allowSuperOutsideMethod: null, allowHashBang: !1, checkPrivateFields: !0, locations: !1, onToken: null, onComment: null, ranges: !1, program: null, sourceFile: null, directSourceFile: null, preserveParens: !1 }, I = !1; function getOptions(e) { var t = {}; for (var n in F) t[n] = e && k(e, n) ? e[n] : F[n]; if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!I && typeof console == "object" && console.warn && (I = !0, console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved ??= t.ecmaVersion < 5, (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14), A(t.onToken)) { var r = t.onToken; t.onToken = function(e) { return r.push(e); }; } if (A(t.onComment) && (t.onComment = pushComment(t, t.onComment)), t.sourceType === "commonjs" && t.allowAwaitOutsideFunction) throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs"); return t; } function pushComment(e, t) { return function(n, r, i, a, o, s) { var l = { type: n ? "Block" : "Line", value: r, start: i, end: a }; e.locations && (l.loc = new P(this, o, s)), e.ranges && (l.range = [i, a]), t.push(l); }; } var ee = 1, L = 2, te = 4, R = 8, z = 16, B = 32, ne = 64, re = 128, V = 256, ie = 512, ae = 1024, oe = ee | L | V; function functionFlags(e, t) { return L | (e ? te : 0) | (t ? R : 0); } var se = 0, ce = 1, le = 2, ue = 3, H = 4, de = 5, fe = function Parser(e, t, n) { this.options = e = getOptions(e), this.sourceFile = e.sourceFile, this.keywords = wordsRegexp(p[e.ecmaVersion >= 6 ? 6 : e.sourceType === "module" ? "5module" : 5]); var r = ""; e.allowReserved !== !0 && (r = d[e.ecmaVersion >= 6 ? 6 : e.ecmaVersion === 5 ? 5 : 3], e.sourceType === "module" && (r += " await")), this.reservedWords = wordsRegexp(r); var i = (r ? r + " " : "") + d.strict; this.reservedWordsStrict = wordsRegexp(i), this.reservedWordsStrictBind = wordsRegexp(i + " " + d.strictBind), this.input = String(t), this.containsEsc = !1, n ? (this.pos = n, this.lineStart = this.input.lastIndexOf("\n", n - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(S).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = x.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 = Object.create(null), this.pos === 0 && e.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(this.options.sourceType === "commonjs" ? L : ee), this.regexpState = null, this.privateNameStack = []; }, pe = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, canAwait: { configurable: !0 }, allowReturn: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 }, allowNewDotTarget: { configurable: !0 }, allowUsing: { configurable: !0 }, inClassStaticBlock: { configurable: !0 } }; fe.prototype.parse = function parse() { var e = this.options.program || this.startNode(); return this.nextToken(), this.parseTopLevel(e); }, pe.inFunction.get = function() { return (this.currentVarScope().flags & L) > 0; }, pe.inGenerator.get = function() { return (this.currentVarScope().flags & R) > 0; }, pe.inAsync.get = function() { return (this.currentVarScope().flags & te) > 0; }, pe.canAwait.get = function() { for (var e = this.scopeStack.length - 1; e >= 0; e--) { var t = this.scopeStack[e].flags; if (t & (V | ie)) return !1; if (t & L) return (t & te) > 0; } return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction; }, pe.allowReturn.get = function() { return !!(this.inFunction || this.options.allowReturnOutsideFunction && this.currentVarScope().flags & ee); }, pe.allowSuper.get = function() { return (this.currentThisScope().flags & ne) > 0 || this.options.allowSuperOutsideMethod; }, pe.allowDirectSuper.get = function() { return (this.currentThisScope().flags & re) > 0; }, pe.treatFunctionsAsVar.get = function() { return this.treatFunctionsAsVarInScope(this.currentScope()); }, pe.allowNewDotTarget.get = function() { for (var e = this.scopeStack.length - 1; e >= 0; e--) { var t = this.scopeStack[e].flags; if (t & (V | ie) || t & L && !(t & z)) return !0; } return !1; }, pe.allowUsing.get = function() { var e = this.currentScope().flags; return !(e & ae || !this.inModule && e & ee); }, pe.inClassStaticBlock.get = function() { return (this.currentVarScope().flags & V) > 0; }, fe.extend = function extend() { for (var e = [], t = arguments.length; t--;) e[t] = arguments[t]; for (var n = this, r = 0; r < e.length; r++) n = e[r](n); return n; }, fe.parse = function parse(e, t) { return new this(t, e).parse(); }, fe.parseExpressionAt = function parseExpressionAt(e, t, n) { var r = new this(n, e, t); return r.nextToken(), r.parseExpression(); }, fe.tokenizer = function tokenizer(e, t) { return new this(t, e); }, Object.defineProperties(fe.prototype, pe); var me = fe.prototype, he = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/; me.strictDirective = function(e) { if (this.options.ecmaVersion < 5) return !1; for (;;) { T.lastIndex = e, e += T.exec(this.input)[0].length; var t = he.exec(this.input.slice(e)); if (!t) return !1; if ((t[1] || t[2]) === "use strict") { T.lastIndex = e + t[0].length; var n = T.exec(this.input), r = n.index + n[0].length, i = this.input.charAt(r); return i === ";" || i === "}" || S.test(n[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(i) || i === "!" && this.input.charAt(r + 1) === "="); } e += t[0].length, T.lastIndex = e, e += T.exec(this.input)[0].length, this.input[e] === ";" && e++; } }, me.eat = function(e) { return this.type === e ? (this.next(), !0) : !1; }, me.isContextual = function(e) { return this.type === x.name && this.value === e && !this.containsEsc; }, me.eatContextual = function(e) { return this.isContextual(e) ? (this.next(), !0) : !1; }, me.expectContextual = function(e) { this.eatContextual(e) || this.unexpected(); }, me.canInsertSemicolon = function() { return this.type === x.eof || this.type === x.braceR || S.test(this.input.slice(this.lastTokEnd, this.start)); }, me.insertSemicolon = function() { if (this.canInsertSemicolon()) return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0; }, me.semicolon = function() { !this.eat(x.semi) && !this.insertSemicolon() && this.unexpected(); }, me.afterTrailingComma = function(e, t) { if (this.type === e) return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), t || this.next(), !0; }, me.expect = function(e) { this.eat(e) || this.unexpected(); }, me.unexpected = function(e) { this.raise(e ?? this.start, "Unexpected token"); }; var ge = function DestructuringErrors() { this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1; }; me.checkPatternErrors = function(e, t) { if (e) { e.trailingComma > -1 && this.raiseRecoverable(e.trailingComma, "Comma is not permitted after the rest element"); var n = t ? e.parenthesizedAssign : e.parenthesizedBind; n > -1 && this.raiseRecoverable(n, t ? "Assigning to rvalue" : "Parenthesized pattern"); } }, me.checkExpressionErrors = function(e, t) { if (!e) return !1; var n = e.shorthandAssign, r = e.doubleProto; if (!t) return n >= 0 || r >= 0; n >= 0 && this.raise(n, "Shorthand property assignments are valid only in destructuring patterns"), r >= 0 && this.raiseRecoverable(r, "Redefinition of __proto__ property"); }, me.checkYieldAwaitInDefaultParams = function() { 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"); }, me.isSimpleAssignTarget = function(e) { return e.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(e.expression) : e.type === "Identifier" || e.type === "MemberExpression"; }; var _e = fe.prototype; _e.parseTopLevel = function(e) { var t = Object.create(null); for (e.body ||= []; this.type !== x.eof;) { var n = this.parseStatement(null, !0, t); e.body.push(n); } if (this.inModule) for (var r = 0, i = Object.keys(this.undefinedExports); r < i.length; r += 1) { var a = i[r]; this.raiseRecoverable(this.undefinedExports[a].start, "Export '" + a + "' is not defined"); } return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType, this.finishNode(e, "Program"); }; var ve = { kind: "loop" }, ye = { kind: "switch" }; _e.isLet = function(e) { if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return !1; T.lastIndex = this.pos; var t = T.exec(this.input), n = this.pos + t[0].length, r = this.fullCharCodeAt(n); if (r === 91 || r === 92) return !0; if (e) return !1; if (r === 123) return !0; if (isIdentifierStart(r)) { var i = n; do n += r <= 65535 ? 1 : 2; while (isIdentifierChar(r = this.fullCharCodeAt(n))); if (r === 92) return !0; var a = this.input.slice(i, n); if (!m.test(a)) return !0; } return !1; }, _e.isAsyncFunction = function() { if (this.options.ecmaVersion < 8 || !this.isContextual("async")) return !1; T.lastIndex = this.pos; var e = T.exec(this.input), t = this.pos + e[0].length, n; return !S.test(this.input.slice(this.pos, t)) && this.input.slice(t, t + 8) === "function" && (t + 8 === this.input.length || !(isIdentifierChar(n = this.fullCharCodeAt(t + 8)) || n === 92)); }, _e.isUsingKeyword = function(e, t) { if (this.options.ecmaVersion < 17 || !this.isContextual(e ? "await" : "using")) return !1; T.lastIndex = this.pos; var n = T.exec(this.input), r = this.pos + n[0].length; if (S.test(this.input.slice(this.pos, r))) return !1; if (e) { var i = r + 5, a; if (this.input.slice(r, i) !== "using" || i === this.input.length || isIdentifierChar(a = this.fullCharCodeAt(i)) || a === 92) return !1; T.lastIndex = i; var o = T.exec(this.input); if (r = i + o[0].length, o && S.test(this.input.slice(i, r))) return !1; } var s = this.fullCharCodeAt(r); if (!isIdentifierStart(s) && s !== 92) return !1; var l = r; do r += s <= 65535 ? 1 : 2; while (isIdentifierChar(s = this.fullCharCodeAt(r))); if (s === 92) return !0; var u = this.input.slice(l, r); return !(m.test(u) || t && u === "of"); }, _e.isAwaitUsing = function(e) { return this.isUsingKeyword(!0, e); }, _e.isUsing = function(e) { return this.isUsingKeyword(!1, e); }, _e.parseStatement = function(e, t, n) { var r = this.type, i = this.startNode(), a; switch (this.isLet(e) && (r = x._var, a = "let"), r) { case x._break: case x._continue: return this.parseBreakContinueStatement(i, r.keyword); case x._debugger: return this.parseDebuggerStatement(i); case x._do: return this.parseDoStatement(i); case x._for: return this.parseForStatement(i); case x._function: return e && (this.strict || e !== "if" && e !== "label") && this.options.ecmaVersion >= 6 && this.unexpected(), this.parseFunctionStatement(i, !1, !e); case x._class: return e && this.unexpected(), this.parseClass(i, !0); case x._if: return this.parseIfStatement(i); case x._return: return this.parseReturnStatement(i); case x._switch: return this.parseSwitchStatement(i); case x._throw: return this.parseThrowStatement(i); case x._try: return this.parseTryStatement(i); case x._const: case x._var: return a ||= this.value, e && a !== "var" && this.unexpected(), this.parseVarStatement(i, a); case x._while: return this.parseWhileStatement(i); case x._with: return this.parseWithStatement(i); case x.braceL: return this.parseBlock(!0, i); case x.semi: return this.parseEmptyStatement(i); case x._export: case x._import: if (this.options.ecmaVersion > 10 && r === x._import) { T.lastIndex = this.pos; var o = T.exec(this.input), s = this.pos + o[0].length, l = this.input.charCodeAt(s); if (l === 40 || l === 46) return this.parseExpressionStatement(i, this.parseExpression()); } return this.options.allowImportExportEverywhere || (t || this.raise(this.start, "'import' and 'export' may only appear at the top level"), this.inModule || this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")), r === x._import ? this.parseImport(i) : this.parseExport(i, n); default: if (this.isAsyncFunction()) return e && this.unexpected(), this.next(), this.parseFunctionStatement(i, !0, !e); var u = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null; if (u) return this.allowUsing || this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"), u === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(i, !1, u), this.semicolon(), this.finishNode(i, "VariableDeclaration"); var d = this.value, f = this.parseExpression(); return r === x.name && f.type === "Identifier" && this.eat(x.colon) ? this.parseLabeledStatement(i, d, f, e) : this.parseExpressionStatement(i, f); } }, _e.parseBreakContinueStatement = function(e, t) { var n = t === "break"; this.next(), this.eat(x.semi) || this.insertSemicolon() ? e.label = null : this.type === x.name ? (e.label = this.parseIdent(), this.semicolon()) : this.unexpected(); for (var r = 0; r < this.labels.length; ++r) { var i = this.labels[r]; if ((e.label == null || i.name === e.label.name) && (i.kind != null && (n || i.kind === "loop") || e.label && n)) break; } return r === this.labels.length && this.raise(e.start, "Unsyntactic " + t), this.finishNode(e, n ? "BreakStatement" : "ContinueStatement"); }, _e.parseDebuggerStatement = function(e) { return this.next(), this.semicolon(), this.finishNode(e, "DebuggerStatement"); }, _e.parseDoStatement = function(e) { return this.next(), this.labels.push(ve), e.body = this.parseStatement("do"), this.labels.pop(), this.expect(x._while), e.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(x.semi) : this.semicolon(), this.finishNode(e, "DoWhileStatement"); }, _e.parseForStatement = function(e) { this.next(); var t = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1; if (this.labels.push(ve), this.enterScope(0), this.expect(x.parenL), this.type === x.semi) return t > -1 && this.unexpected(t), this.parseFor(e, null); var n = this.isLet(); if (this.type === x._var || this.type === x._const || n) { var r = this.startNode(), i = n ? "let" : this.value; return this.next(), this.parseVar(r, !0, i), this.finishNode(r, "VariableDeclaration"), this.parseForAfterInit(e, r, t); } var a = this.isContextual("let"), o = !1, s = this.isUsing(!0) ? "using" : this.isAwaitUsing(!0) ? "await using" : null; if (s) { var l = this.startNode(); return this.next(), s === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.parseVar(l, !0, s), this.finishNode(l, "VariableDeclaration"), this.parseForAfterInit(e, l, t); } var u = this.containsEsc, d = new ge(), f = this.start, p = t > -1 ? this.parseExprSubscripts(d, "await") : this.parseExpression(!0, d); return this.type === x._in || (o = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === x._in && this.unexpected(t), e.await = !0) : o && this.options.ecmaVersion >= 8 && (p.start === f && !u && p.type === "Identifier" && p.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = !1)), a && o && this.raise(p.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(p, !1, d), this.checkLValPattern(p), this.parseForIn(e, p)) : (this.checkExpressionErrors(d, !0), t > -1 && this.unexpected(t), this.parseFor(e, p)); }, _e.parseForAfterInit = function(e, t, n) { return (this.type === x._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && t.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === x._in ? n > -1 && this.unexpected(n) : e.await = n > -1), this.parseForIn(e, t)) : (n > -1 && this.unexpected(n), this.parseFor(e, t)); }, _e.parseFunctionStatement = function(e, t, n) { return this.next(), this.parseFunction(e, xe | (n ? 0 : Se), !1, t); }, _e.parseIfStatement = function(e) { return this.next(), e.test = this.parseParenExpression(), e.consequent = this.parseStatement("if"), e.alternate = this.eat(x._else) ? this.parseStatement("if") : null, this.finishNode(e, "IfStatement"); }, _e.parseReturnStatement = function(e) { return this.allowReturn || this.raise(this.start, "'return' outside of function"), this.next(), this.eat(x.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()), this.finishNode(e, "ReturnStatement"); }, _e.parseSwitchStatement = function(e) { this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(x.braceL), this.labels.push(ye), this.enterScope(ae); for (var t, n = !1; this.type !== x.braceR;) if (this.type === x._case || this.type === x._default) { var r = this.type === x._case; t && this.finishNode(t, "SwitchCase"), e.cases.push(t = this.startNode()), t.consequent = [], this.next(), r ? t.test = this.parseExpression() : (n && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), n = !0, t.test = null), this.expect(x.colon); } else t || this.unexpected(), t.consequent.push(this.parseStatement(null)); return this.exitScope(), t && this.finishNode(t, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(e, "SwitchStatement"); }, _e.parseThrowStatement = function(e) { return this.next(), S.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), e.argument = this.parseExpression(), this.semicolon(), this.finishNode(e, "ThrowStatement"); }; var be = []; _e.parseCatchClauseParam = function() { var e = this.parseBindingAtom(), t = e.type === "Identifier"; return this.enterScope(t ? B : 0), this.checkLValPattern(e, t ? H : le), this.expect(x.parenR), e; }, _e.parseTryStatement = function(e) { if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === x._catch) { var t = this.startNode(); this.next(), this.eat(x.parenL) ? t.param = this.parseCatchClauseParam() : (this.options.ecmaVersion < 10 && this.unexpected(), t.param = null, this.enterScope(0)), t.body = this.parseBlock(!1), this.exitScope(), e.handler = this.finishNode(t, "CatchClause"); } return e.finalizer = this.eat(x._finally) ? this.parseBlock() : null, !e.handler && !e.finalizer && this.raise(e.start, "Missing catch or finally clause"), this.finishNode(e, "TryStatement"); }, _e.parseVarStatement = function(e, t, n) { return this.next(), this.parseVar(e, !1, t, n), this.semicolon(), this.finishNode(e, "VariableDeclaration"); }, _e.parseWhileStatement = function(e) { return this.next(), e.test = this.parseParenExpression(), this.labels.push(ve), e.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(e, "WhileStatement"); }, _e.parseWithStatement = function(e) { return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), e.object = this.parseParenExpression(), e.body = this.parseStatement("with"), this.finishNode(e, "WithStatement"); }, _e.parseEmptyStatement = function(e) { return this.next(), this.finishNode(e, "EmptyStatement"); }, _e.parseLabeledStatement = function(e, t, n, r) { for (var i = 0, a = this.labels; i < a.length; i += 1) a[i].name === t && this.raise(n.start, "Label '" + t + "' is already declared"); for (var o = this.type.isLoop ? "loop" : this.type === x._switch ? "switch" : null, s = this.labels.length - 1; s >= 0; s--) { var l = this.labels[s]; if (l.statementStart === e.start) l.statementStart = this.start, l.kind = o; else break; } return this.labels.push({ name: t, kind: o, statementStart: this.start }), e.body = this.parseStatement(r ? r.indexOf("label") === -1 ? r + "label" : r : "label"), this.labels.pop(), e.label = n, this.finishNode(e, "LabeledStatement"); }, _e.parseExpressionStatement = function(e, t) { return e.expression = t, this.semicolon(), this.finishNode(e, "ExpressionStatement"); }, _e.parseBlock = function(e, t, n) { for (e === void 0 && (e = !0), t === void 0 && (t = this.startNode()), t.body = [], this.expect(x.braceL), e && this.enterScope(0); this.type !== x.braceR;) { var r = this.parseStatement(null); t.body.push(r); } return n && (this.strict = !1), this.next(), e && this.exitScope(), this.finishNode(t, "BlockStatement"); }, _e.parseFor = function(e, t) { return e.init = t, this.expect(x.semi), e.test = this.type === x.semi ? null : this.parseExpression(), this.expect(x.semi), e.update = this.type === x.parenR ? null : this.parseExpression(), this.expect(x.parenR), e.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e, "ForStatement"); }, _e.parseForIn = function(e, t) { var n = this.type === x._in; return this.next(), t.type === "VariableDeclaration" && t.declarations[0].init != null && (!n || this.options.ecmaVersion < 8 || this.strict || t.kind !== "var" || t.declarations[0].id.type !== "Identifier") && this.raise(t.start, (n ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"), e.left = t, e.right = n ? this.parseExpression() : this.parseMaybeAssign(), this.expect(x.parenR), e.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e, n ? "ForInStatement" : "ForOfStatement"); }, _e.parseVar = function(e, t, n, r) { for (e.declarations = [], e.kind = n;;) { var i = this.startNode(); if (this.parseVarId(i, n), this.eat(x.eq) ? i.init = this.parseMaybeAssign(t) : !r && n === "const" && !(this.type === x._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) ? this.unexpected() : !r && (n === "using" || n === "await using") && this.options.ecmaVersion >= 17 && this.type !== x._in && !this.isContextual("of") ? this.raise(this.lastTokEnd, "Missing initializer in " + n + " declaration") : !r && i.id.type !== "Identifier" && !(t && (this.type === x._in || this.isContextual("of"))) ? this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value") : i.init = null, e.declarations.push(this.finishNode(i, "VariableDeclarator")), !this.eat(x.comma)) break; } return e; }, _e.parseVarId = function(e, t) { e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? ce : le, !1); }; var xe = 1, Se = 2, Ce = 4; _e.parseFunction = function(e, t, n, r, i) { this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !r) && (this.type === x.star && t & Se && this.unexpected(), e.generator = this.eat(x.star)), this.options.ecmaVersion >= 8 && (e.async = !!r), t & xe && (e.id = t & Ce && this.type !== x.name ? null : this.parseIdent(), e.id && !(t & Se) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? ce : le : ue)); var a = this.yieldPos, o = this.awaitPos, s = this.awaitIdentPos; return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(functionFlags(e.async, e.generator)), t & xe || (e.id = this.type === x.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, n, !1, i), this.yieldPos = a, this.awaitPos = o, this.awaitIdentPos = s, this.finishNode(e, t & xe ? "FunctionDeclaration" : "FunctionExpression"); }, _e.parseFunctionParams = function(e) { this.expect(x.parenL), e.params = this.parseBindingList(x.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(); }, _e.parseClass = function(e, t) { this.next(); var n = this.strict; this.strict = !0, this.parseClassId(e, t), this.parseClassSuper(e); var r = this.enterClassBody(), i = this.startNode(), a = !1; for (i.body = [], this.expect(x.braceL); this.type !== x.braceR;) { var o = this.parseClassElement(e.superClass !== null); o && (i.body.push(o), o.type === "MethodDefinition" && o.kind === "constructor" ? (a && this.raiseRecoverable(o.start, "Duplicate constructor in the same class"), a = !0) : o.key && o.key.type === "PrivateIdentifier" && isPrivateNameConflicted(r, o) && this.raiseRecoverable(o.key.start, "Identifier '#" + o.key.name + "' has already been declared")); } return this.strict = n, this.next(), e.body = this.finishNode(i, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression"); }, _e.parseClassElement = function(e) { if (this.eat(x.semi)) return null; var t = this.options.ecmaVersion, n = this.startNode(), r = "", i = !1, a = !1, o = "method", s = !1; if (this.eatContextual("static")) { if (t >= 13 && this.eat(x.braceL)) return this.parseClassStaticBlock(n), n; this.isClassElementNameStart() || this.type === x.star ? s = !0 : r = "static"; } if (n.static = s, !r && t >= 8 && this.eatContextual("async") && ((this.isClassElementNameStart() || this.type === x.star) && !this.canInsertSemicolon() ? a = !0 : r = "async"), !r && (t >= 9 || !a) && this.eat(x.star) && (i = !0), !r && !a && !i) { var l = this.value; (this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? o = l : r = l); } if (r ? (n.computed = !1, n.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), n.key.name = r, this.finishNode(n.key, "Identifier")) : this.parseClassElementName(n), t < 13 || this.type === x.parenL || o !== "method" || i || a) { var u = !n.static && checkKeyName(n, "constructor"), d = u && e; u && o !== "method" && this.raise(n.key.start, "Constructor can't have get/set modifier"), n.kind = u ? "constructor" : o, this.parseClassMethod(n, i, a, d); } else this.parseClassField(n); return n; }, _e.isClassElementNameStart = function() { return this.type === x.name || this.type === x.privateId || this.type === x.num || this.type === x.string || this.type === x.bracketL || this.type.keyword; }, _e.parseClassElementName = function(e) { this.type === x.privateId ? (this.value === "constructor" && this.raise(this.start, "Classes can't have an element named '#constructor'"), e.computed = !1, e.key = this.parsePrivateIdent()) : this.parsePropertyName(e); }, _e.parseClassMethod = function(e, t, n, r) { var i = e.key; e.kind === "constructor" ? (t && this.raise(i.start, "Constructor can't be a generator"), n && this.raise(i.start, "Constructor can't be an async method")) : e.static && checkKeyName(e, "prototype") && this.raise(i.start, "Classes may not have a static property named prototype"); var a = e.value = this.parseMethod(t, n, r); return e.kind === "get" && a.params.length !== 0 && this.raiseRecoverable(a.start, "getter should have no params"), e.kind === "set" && a.params.length !== 1 && this.raiseRecoverable(a.start, "setter should have exactly one param"), e.kind === "set" && a.params[0].type === "RestElement" && this.raiseRecoverable(a.params[0].start, "Setter cannot use rest params"), this.finishNode(e, "MethodDefinition"); }, _e.parseClassField = function(e) { return checkKeyName(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && checkKeyName(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(x.eq) ? (this.enterScope(ie | ne), e.value = this.parseMaybeAssign(), this.exitScope()) : e.value = null, this.semicolon(), this.finishNode(e, "PropertyDefinition"); }, _e.parseClassStaticBlock = function(e) { e.body = []; var t = this.labels; for (this.labels = [], this.enterScope(V | ne); this.type !== x.braceR;) { var n = this.parseStatement(null); e.body.push(n); } return this.next(), this.exitScope(), this.labels = t, this.finishNode(e, "StaticBlock"); }, _e.parseClassId = function(e, t) { this.type === x.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id, le, !1)) : (t === !0 && this.unexpected(), e.id = null); }, _e.parseClassSuper = function(e) { e.superClass = this.eat(x._extends) ? this.parseExprSubscripts(null, !1) : null; }, _e.enterClassBody = function() { var e = { declared: Object.create(null), used: [] }; return this.privateNameStack.push(e), e.declared; }, _e.exitClassBody = function() { var e = this.privateNameStack.pop(), t = e.declared, n = e.used; if (this.options.checkPrivateFields) for (var r = this.privateNameStack.length, i = r === 0 ? null : this.privateNameStack[r - 1], a = 0; a < n.length; ++a) { var o = n[a]; k(t, o.name) || (i ? i.used.push(o) : this.raiseRecoverable(o.start, "Private field '#" + o.name + "' must be declared in an enclosing class")); } }; function isPrivateNameConflicted(e, t) { var n = t.key.name, r = e[n], i = "true"; return t.type === "MethodDefinition" && (t.kind === "get" || t.kind === "set") && (i = (t.static ? "s" : "i") + t.kind), r === "iget" && i === "iset" || r === "iset" && i === "iget" || r === "sget" && i === "sset" || r === "sset" && i === "sget" ? (e[n] = "true", !1) : r ? !0 : (e[n] = i, !1); } function checkKeyName(e, t) { var n = e.computed, r = e.key; return !n && (r.type === "Identifier" && r.name === t || r.type === "Literal" && r.value === t); } _e.parseExportAllDeclaration = function(e, t) { return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (e.exported = this.parseModuleExportName(), this.checkExport(t, e.exported, this.lastTokStart)) : e.exported = null), this.expectContextual("from"), this.type !== x.string && this.unexpected(), e.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ExportAllDeclaration"); }, _e.parseExport = function(e, t) { if (this.next(), this.eat(x.star)) return this.parseExportAllDeclaration(e, t); if (this.eat(x._default)) return this.checkExport(t, "default", this.lastTokStart), e.declaration = this.parseExportDefaultDeclaration(), this.finishNode(e, "ExportDefaultDeclaration"); if (this.shouldParseExportStatement()) e.declaration = this.parseExportDeclaration(e), e.declaration.type === "VariableDeclaration" ? this.checkVariableExport(t, e.declaration.declarations) : this.checkExport(t, e.declaration.id, e.declaration.id.start), e.specifiers = [], e.source = null, this.options.ecmaVersion >= 16 && (e.attributes = []); else { if (e.declaration = null, e.specifiers = this.parseExportSpecifiers(t), this.eatContextual("from")) this.type !== x.string && this.unexpected(), e.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()); else { for (var n = 0, r = e.specifiers; n < r.length; n += 1) { var i = r[n]; this.checkUnreserved(i.local), this.checkLocalExport(i.local), i.local.type === "Literal" && this.raise(i.local.start, "A string literal cannot be used as an exported binding without `from`."); } e.source = null, this.options.ecmaVersion >= 16 && (e.attributes = []); } this.semicolon(); } return this.finishNode(e, "ExportNamedDeclaration"); }, _e.parseExportDeclaration = function(e) { return this.parseStatement(null); }, _e.parseExportDefaultDeclaration = function() { var e; if (this.type === x._function || (e = this.isAsyncFunction())) { var t = this.startNode(); return this.next(), e && this.next(), this.parseFunction(t, xe | Ce, !1, e); } else if (this.type === x._class) { var n = this.startNode(); return this.parseClass(n, "nullableID"); } else { var r = this.parseMaybeAssign(); return this.semicolon(), r; } }, _e.checkExport = function(e, t, n) { e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value), k(e, t) && this.raiseRecoverable(n, "Duplicate export '" + t + "'"), e[t] = !0); }, _e.checkPatternExport = function(e, t) { var n = t.type; if (n === "Identifier") this.checkExport(e, t, t.start); else if (n === "ObjectPattern") for (var r = 0, i = t.properties; r < i.length; r += 1) { var a = i[r]; this.checkPatternExport(e, a); } else if (n === "ArrayPattern") for (var o = 0, s = t.elements; o < s.length; o += 1) { var l = s[o]; l && this.checkPatternExport(e, l); } else n === "Property" ? this.checkPatternExport(e, t.value) : n === "AssignmentPattern" ? this.checkPatternExport(e, t.left) : n === "RestElement" && this.checkPatternExport(e, t.argument); }, _e.checkVariableExport = function(e, t) { if (e) for (var n = 0, r = t; n < r.length; n += 1) { var i = r[n]; this.checkPatternExport(e, i.id); } }, _e.shouldParseExportStatement = function() { return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction(); }, _e.parseExportSpecifier = function(e) { var t = this.startNode(); return t.local = this.parseModuleExportName(), t.exported = this.eatContextual("as") ? this.parseModuleExportName() : t.local, this.checkExport(e, t.exported, t.exported.start), this.finishNode(t, "ExportSpecifier"); }, _e.parseExportSpecifiers = function(e) { var t = [], n = !0; for (this.expect(x.braceL); !this.eat(x.braceR);) { if (n) n = !1; else if (this.expect(x.comma), this.afterTrailingComma(x.braceR)) break; t.push(this.parseExportSpecifier(e)); } return t; }, _e.parseImport = function(e) { return this.next(), this.type === x.string ? (e.specifiers = be, e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === x.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ImportDeclaration"); }, _e.parseImportSpecifier = function() { var e = this.startNode(); return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local, le), this.finishNode(e, "ImportSpecifier"); }, _e.parseImportDefaultSpecifier = function() { var e = this.startNode(); return e.local = this.parseIdent(), this.checkLValSimple(e.local, le), this.finishNode(e, "ImportDefaultSpecifier"); }, _e.parseImportNamespaceSpecifier = function() { var e = this.startNode(); return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local, le), this.finishNode(e, "ImportNamespaceSpecifier"); }, _e.parseImportSpecifiers = function() { var e = [], t = !0; if (this.type === x.name && (e.push(this.parseImportDefaultSpecifier()), !this.eat(x.comma))) return e; if (this.type === x.star) return e.push(this.parseImportNamespaceSpecifier()), e; for (this.expect(x.braceL); !this.eat(x.braceR);) { if (t) t = !1; else if (this.expect(x.comma), this.afterTrailingComma(x.braceR)) break; e.push(this.parseImportSpecifier()); } return e; }, _e.parseWithClause = function() { var e = []; if (!this.eat(x._with)) return e; this.expect(x.braceL); for (var t = {}, n = !0; !this.eat(x.braceR);) { if (n) n = !1; else if (this.expect(x.comma), this.afterTrailingComma(x.braceR)) break; var r = this.parseImportAttribute(), i = r.key.type === "Identifier" ? r.key.name : r.key.value; k(t, i) && this.raiseRecoverable(r.key.start, "Duplicate attribute key '" + i + "'"), t[i] = !0, e.push(r); } return e; }, _e.parseImportAttribute = function() { var e = this.startNode(); return e.key = this.type === x.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"), this.expect(x.colon), this.type !== x.string && this.unexpected(), e.value = this.parseExprAtom(), this.finishNode(e, "ImportAttribute"); }, _e.parseModuleExportName = function() { if (this.options.ecmaVersion >= 13 && this.type === x.string) { var e = this.parseLiteral(this.value); return M.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e; } return this.parseIdent(!0); }, _e.adaptDirectivePrologue = function(e) { for (var t = 0; t < e.length && this.isDirectiveCandidate(e[t]); ++t) e[t].directive = e[t].expression.raw.slice(1, -1); }, _e.isDirectiveCandidate = function(e) { return this.options.ecmaVersion >= 5 && e.type === "ExpressionStatement" && e.expression.type === "Literal" && typeof e.expression.value == "string" && (this.input[e.start] === "\"" || this.input[e.start]