UNPKG

eslint-config-chain-able

Version:
1 lines 130 kB
"use strict";function createError$1(t,e){const s=new SyntaxError(t+" ("+e.start.line+":"+e.start.column+")");return s.loc=e,s}function createCommonjsModule(t,e){return e={exports:{}},t(e,e.exports),e.exports}function parse(t){const e=index,s={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,plugins:["jsx","flow","doExpressions","objectRestSpread","decorators","classProperties","exportExtensions","asyncGenerators","functionBind","functionSent","dynamicImport","numericSeparator"]};let i;try{i=e.parse(t,s)}catch(r){try{i=e.parse(t,Object.assign({},s,{strictMode:!1}))}catch(t){throw createError(r.message.replace(/ \(.*\)/,""),{start:{line:r.loc.line,column:r.loc.column+1}})}}return delete i.tokens,i}var parserCreateError=createError$1,index=createCommonjsModule(function(t,e){function s(t){var e={};for(var s in b)e[s]=t&&s in t?t[s]:b[s];return e}function i(t){var e=t.split(" ");return function(t){return e.indexOf(t)>=0}}function r(t,e){for(var s=65536,i=0;i<e.length;i+=2){if((s+=e[i])>t)return!1;if((s+=e[i+1])>=t)return!0}return!1}function a(t){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&j.test(String.fromCharCode(t)):r(t,D)))}function n(t){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&R.test(String.fromCharCode(t)):r(t,D)||r(t,O))))}function o(t){return 10===t||13===t||8232===t||8233===t}function h(t,e){for(var s=1,i=0;;){F.lastIndex=i;var r=F.exec(t);if(!(r&&r.index<e))return new U(s,e-i);++s,i=r.index+r[0].length}throw new Error("Unreachable")}function p(t){return t[t.length-1]}function c(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function l(t){for(var e={},s=t,i=Array.isArray(s),r=0,s=i?s:s[Symbol.iterator]();;){var a;if(i){if(r>=s.length)break;a=s[r++]}else{if((r=s.next()).done)break;a=r.value}e[a]=!0}return e}function u(t){return null!=t&&"Property"===t.type&&"init"===t.kind&&!1===t.method}function d(t){return"DeclareExportAllDeclaration"===t.type||"DeclareExportDeclaration"===t.type&&(!t.declaration||"TypeAlias"!==t.declaration.type&&"InterfaceDeclaration"!==t.declaration.type)}function f(t){if("JSXIdentifier"===t.type)return t.name;if("JSXNamespacedName"===t.type)return t.namespace.name+":"+t.name.name;if("JSXMemberExpression"===t.type)return f(t.object)+"."+f(t.property);throw new Error("Node had unexpected type: "+t.type)}function m(t,e){return x(e,t).parse()}function y(t,e){var s=x(e,t);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()}function x(t,e){return new(t&&t.plugins?v(t.plugins):et)(t,e)}function v(t){var e=t.filter(function(t){return"estree"===t||"flow"===t||"jsx"===t});e.indexOf("flow")>=0&&(e=e.filter(function(t){return"flow"!==t})).push("flow"),e.indexOf("estree")>=0&&(e=e.filter(function(t){return"estree"!==t})).unshift("estree");var s=e.join("/"),i=ct[s];if(!i){i=et;for(var r=e,a=Array.isArray(r),n=0,r=a?r:r[Symbol.iterator]();;){var o;if(a){if(n>=r.length)break;o=r[n++]}else{if((n=r.next()).done)break;o=n.value}i=tt[o](i)}ct[s]=i}return i}Object.defineProperty(e,"__esModule",{value:!0});var b={sourceType:"script",sourceFilename:void 0,startLine:1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null,ranges:!1},g=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},w=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},P=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},A=!0,k=function t(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};g(this,t),this.label=e,this.keyword=s.keyword,this.beforeExpr=!!s.beforeExpr,this.startsExpr=!!s.startsExpr,this.rightAssociative=!!s.rightAssociative,this.isLoop=!!s.isLoop,this.isAssign=!!s.isAssign,this.prefix=!!s.prefix,this.postfix=!!s.postfix,this.binop=s.binop||null,this.updateContext=null},E=function(t){function e(s){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return g(this,e),i.keyword=s,P(this,t.call(this,s,i))}return w(e,t),e}(k),T=function(t){function e(s,i){return g(this,e),P(this,t.call(this,s,{beforeExpr:A,binop:i}))}return w(e,t),e}(k),C={num:new k("num",{startsExpr:!0}),regexp:new k("regexp",{startsExpr:!0}),string:new k("string",{startsExpr:!0}),name:new k("name",{startsExpr:!0}),eof:new k("eof"),bracketL:new k("[",{beforeExpr:A,startsExpr:!0}),bracketR:new k("]"),braceL:new k("{",{beforeExpr:A,startsExpr:!0}),braceBarL:new k("{|",{beforeExpr:A,startsExpr:!0}),braceR:new k("}"),braceBarR:new k("|}"),parenL:new k("(",{beforeExpr:A,startsExpr:!0}),parenR:new k(")"),comma:new k(",",{beforeExpr:A}),semi:new k(";",{beforeExpr:A}),colon:new k(":",{beforeExpr:A}),doubleColon:new k("::",{beforeExpr:A}),dot:new k("."),question:new k("?",{beforeExpr:A}),questionDot:new k("?."),arrow:new k("=>",{beforeExpr:A}),template:new k("template"),ellipsis:new k("...",{beforeExpr:A}),backQuote:new k("`",{startsExpr:!0}),dollarBraceL:new k("${",{beforeExpr:A,startsExpr:!0}),at:new k("@"),hash:new k("#"),eq:new k("=",{beforeExpr:A,isAssign:!0}),assign:new k("_=",{beforeExpr:A,isAssign:!0}),incDec:new k("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new k("prefix",{beforeExpr:A,prefix:!0,startsExpr:!0}),logicalOR:new T("||",1),logicalAND:new T("&&",2),bitwiseOR:new T("|",3),bitwiseXOR:new T("^",4),bitwiseAND:new T("&",5),equality:new T("==/!=",6),relational:new T("</>",7),bitShift:new T("<</>>",8),plusMin:new k("+/-",{beforeExpr:A,binop:9,prefix:!0,startsExpr:!0}),modulo:new T("%",10),star:new T("*",10),slash:new T("/",10),exponent:new k("**",{beforeExpr:A,binop:11,rightAssociative:!0})},N={break:new E("break"),case:new E("case",{beforeExpr:A}),catch:new E("catch"),continue:new E("continue"),debugger:new E("debugger"),default:new E("default",{beforeExpr:A}),do:new E("do",{isLoop:!0,beforeExpr:A}),else:new E("else",{beforeExpr:A}),finally:new E("finally"),for:new E("for",{isLoop:!0}),function:new E("function",{startsExpr:!0}),if:new E("if"),return:new E("return",{beforeExpr:A}),switch:new E("switch"),throw:new E("throw",{beforeExpr:A}),try:new E("try"),var:new E("var"),let:new E("let"),const:new E("const"),while:new E("while",{isLoop:!0}),with:new E("with"),new:new E("new",{beforeExpr:A,startsExpr:!0}),this:new E("this",{startsExpr:!0}),super:new E("super",{startsExpr:!0}),class:new E("class"),extends:new E("extends",{beforeExpr:A}),export:new E("export"),import:new E("import",{startsExpr:!0}),yield:new E("yield",{beforeExpr:A,startsExpr:!0}),null:new E("null",{startsExpr:!0}),true:new E("true",{startsExpr:!0}),false:new E("false",{startsExpr:!0}),in:new E("in",{beforeExpr:A,binop:7}),instanceof:new E("instanceof",{beforeExpr:A,binop:7}),typeof:new E("typeof",{beforeExpr:A,prefix:!0,startsExpr:!0}),void:new E("void",{beforeExpr:A,prefix:!0,startsExpr:!0}),delete:new E("delete",{beforeExpr:A,prefix:!0,startsExpr:!0})};Object.keys(N).forEach(function(t){C["_"+t]=N[t]});var S={6:i("enum await"),strict:i("implements interface let package private protected public static yield"),strictBind:i("eval arguments")},L=i("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 let const class extends export import yield super"),I="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",_="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",j=new RegExp("["+I+"]"),R=new RegExp("["+I+_+"]");I=_=null;var D=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,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,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,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,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,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,4149,196,60,67,1213,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,42710,42,4148,12,221,3,5761,10591,541],O=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,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,2214,6,110,6,6,9,792487,239],M=/\r\n?|\n|\u2028|\u2029/,F=new RegExp(M.source,"g"),B=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,q=function t(e,s,i,r){g(this,t),this.token=e,this.isExpr=!!s,this.preserveSpace=!!i,this.override=r},V={braceStatement:new q("{",!1),braceExpression:new q("{",!0),templateQuasi:new q("${",!0),parenStatement:new q("(",!1),parenExpression:new q("(",!0),template:new q("`",!0,!0,function(t){return t.readTmplToken()}),functionExpression:new q("function",!0)};C.parenR.updateContext=C.braceR.updateContext=function(){if(1!==this.state.context.length){var t=this.state.context.pop();t===V.braceStatement&&this.curContext()===V.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):t===V.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!t.isExpr}else this.state.exprAllowed=!0},C.name.updateContext=function(t){this.state.exprAllowed=!1,t!==C._let&&t!==C._const&&t!==C._var||M.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0)},C.braceL.updateContext=function(t){this.state.context.push(this.braceIsBlock(t)?V.braceStatement:V.braceExpression),this.state.exprAllowed=!0},C.dollarBraceL.updateContext=function(){this.state.context.push(V.templateQuasi),this.state.exprAllowed=!0},C.parenL.updateContext=function(t){var e=t===C._if||t===C._for||t===C._with||t===C._while;this.state.context.push(e?V.parenStatement:V.parenExpression),this.state.exprAllowed=!0},C.incDec.updateContext=function(){},C._function.updateContext=function(){this.curContext()!==V.braceStatement&&this.state.context.push(V.functionExpression),this.state.exprAllowed=!1},C.backQuote.updateContext=function(){this.curContext()===V.template?this.state.context.pop():this.state.context.push(V.template),this.state.exprAllowed=!1};var U=function t(e,s){g(this,t),this.line=e,this.column=s},X=function t(e,s){g(this,t),this.start=e,this.end=s},J=function(t){function e(){return g(this,e),P(this,t.apply(this,arguments))}return w(e,t),e.prototype.raise=function(t,e){var s=h(this.input,t);e+=` (${s.line}:${s.column})`;var i=new SyntaxError(e);throw i.pos=t,i.loc=s,i},e}(function(t){function e(){return g(this,e),P(this,t.apply(this,arguments))}return w(e,t),e.prototype.addComment=function(t){this.filename&&(t.loc.filename=this.filename),this.state.trailingComments.push(t),this.state.leadingComments.push(t)},e.prototype.processComment=function(t){if(!("Program"===t.type&&t.body.length>0)){var e=this.state.commentStack,s=void 0,i=void 0,r=void 0,a=void 0,n=void 0;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=t.end?(r=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else{var o=p(e);e.length>0&&o.trailingComments&&o.trailingComments[0].start>=t.end&&(r=o.trailingComments,o.trailingComments=null)}for(e.length>0&&p(e).start>=t.start&&(s=e.pop());e.length>0&&p(e).start>=t.start;)i=e.pop();if(!i&&s&&(i=s),s&&("ObjectProperty"===s.type||"CallExpression"===t.type)&&this.state.leadingComments.length>0&&p(this.state.leadingComments).start>=t.start&&this.state.commentPreviousNode){for(n=0;n<this.state.leadingComments.length;n++)this.state.leadingComments[n].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(n,1),n--);this.state.leadingComments.length>0&&(s.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}if(i){if(i.leadingComments)if(i!==t&&p(i.leadingComments).end<=t.start)t.leadingComments=i.leadingComments,i.leadingComments=null;else for(a=i.leadingComments.length-2;a>=0;--a)if(i.leadingComments[a].end<=t.start){t.leadingComments=i.leadingComments.splice(0,a+1);break}}else if(this.state.leadingComments.length>0)if(p(this.state.leadingComments).end<=t.start){if(this.state.commentPreviousNode)for(n=0;n<this.state.leadingComments.length;n++)this.state.leadingComments[n].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(n,1),n--);this.state.leadingComments.length>0&&(t.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(a=0;a<this.state.leadingComments.length&&!(this.state.leadingComments[a].end>t.start);a++);var h=this.state.leadingComments.slice(0,a);t.leadingComments=0===h.length?null:h,0===(r=this.state.leadingComments.slice(a)).length&&(r=null)}this.state.commentPreviousNode=t,r&&(r.length&&r[0].start>=t.start&&p(r).end<=t.end?t.innerComments=r:t.trailingComments=r),e.push(t)}},e}(function(){function t(){g(this,t)}return t.prototype.isReservedWord=function(t){return"await"===t?this.inModule:S[6](t)},t.prototype.hasPlugin=function(t){return!!this.plugins[t]},t}())),W=function(){function t(){g(this,t)}return t.prototype.init=function(t,e){this.strict=!1!==t.strictMode&&"module"===t.sourceType,this.input=e,this.potentialArrowAt=-1,this.inMethod=this.inFunction=this.inGenerator=this.inAsync=this.inPropertyName=this.inType=this.inClass=this.inClassProperty=this.noAnonFunctionType=!1,this.labels=[],this.decorators=[],this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.pos=this.lineStart=0,this.curLine=t.startLine,this.type=C.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=[V.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.invalidTemplateEscapePosition=null,this.exportedIdentifiers=[]},t.prototype.curPosition=function(){return new U(this.curLine,this.pos-this.lineStart)},t.prototype.clone=function(e){var s=new t;for(var i in this){var r=this[i];e&&"context"!==i||!Array.isArray(r)||(r=r.slice()),s[i]=r}return s},t}(),G={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},K=function t(e){g(this,t),this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new X(e.startLoc,e.endLoc)},z=function(t){function e(){return g(this,e),P(this,t.apply(this,arguments))}return w(e,t),e.prototype.addExtra=function(t,e,s){t&&((t.extra=t.extra||{})[e]=s)},e.prototype.isRelational=function(t){return this.match(C.relational)&&this.state.value===t},e.prototype.expectRelational=function(t){this.isRelational(t)?this.next():this.unexpected(null,C.relational)},e.prototype.isContextual=function(t){return this.match(C.name)&&this.state.value===t},e.prototype.eatContextual=function(t){return this.state.value===t&&this.eat(C.name)},e.prototype.expectContextual=function(t,e){this.eatContextual(t)||this.unexpected(null,e)},e.prototype.canInsertSemicolon=function(){return this.match(C.eof)||this.match(C.braceR)||M.test(this.input.slice(this.state.lastTokEnd,this.state.start))},e.prototype.isLineTerminator=function(){return this.eat(C.semi)||this.canInsertSemicolon()},e.prototype.semicolon=function(){this.isLineTerminator()||this.unexpected(null,C.semi)},e.prototype.expect=function(t,e){this.eat(t)||this.unexpected(e,t)},e.prototype.unexpected=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unexpected token";throw"string"!=typeof e&&(e=`Unexpected token, expected ${e.label}`),this.raise(null!=t?t:this.state.start,e)},e}(function(t){function e(s,i){g(this,e);var r=P(this,t.call(this));return r.state=new W,r.state.init(s,i),r}return w(e,t),e.prototype.next=function(){this.isLookahead||this.state.tokens.push(new K(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},e.prototype.eat=function(t){return!!this.match(t)&&(this.next(),!0)},e.prototype.match=function(t){return this.state.type===t},e.prototype.isKeyword=function(t){return L(t)},e.prototype.lookahead=function(){var t=this.state;this.state=t.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var e=this.state.clone(!0);return this.state=t,e},e.prototype.setStrict=function(t){if(this.state.strict=t,this.match(C.num)||this.match(C.string)){for(this.state.pos=this.state.start;this.state.pos<this.state.lineStart;)this.state.lineStart=this.input.lastIndexOf("\n",this.state.lineStart-2)+1,--this.state.curLine;this.nextToken()}},e.prototype.curContext=function(){return this.state.context[this.state.context.length-1]},e.prototype.nextToken=function(){var t=this.curContext();return t&&t.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.input.length?this.finishToken(C.eof):t.override?t.override(this):this.readToken(this.fullCharCodeAtPos())},e.prototype.readToken=function(t){return a(t)||92===t?this.readWord():this.getTokenFromCode(t)},e.prototype.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.state.pos);return t<=55295||t>=57344?t:(t<<10)+this.input.charCodeAt(this.state.pos+1)-56613888},e.prototype.pushComment=function(t,e,s,i,r,a){var n={type:t?"CommentBlock":"CommentLine",value:e,start:s,end:i,loc:new X(r,a)};this.isLookahead||(this.state.tokens.push(n),this.state.comments.push(n),this.addComment(n))},e.prototype.skipBlockComment=function(){var t=this.state.curPosition(),e=this.state.pos,s=this.input.indexOf("*/",this.state.pos+=2);-1===s&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=s+2,F.lastIndex=e;for(var i=void 0;(i=F.exec(this.input))&&i.index<this.state.pos;)++this.state.curLine,this.state.lineStart=i.index+i[0].length;this.pushComment(!0,this.input.slice(e+2,s),e,this.state.pos,t,this.state.curPosition())},e.prototype.skipLineComment=function(t){for(var e=this.state.pos,s=this.state.curPosition(),i=this.input.charCodeAt(this.state.pos+=t);this.state.pos<this.input.length&&10!==i&&13!==i&&8232!==i&&8233!==i;)++this.state.pos,i=this.input.charCodeAt(this.state.pos);this.pushComment(!1,this.input.slice(e+t,this.state.pos),e,this.state.pos,s,this.state.curPosition())},e.prototype.skipSpace=function(){t:for(;this.state.pos<this.input.length;){var t=this.input.charCodeAt(this.state.pos);switch(t){case 32:case 160:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&t<14||t>=5760&&B.test(String.fromCharCode(t))))break t;++this.state.pos}}},e.prototype.finishToken=function(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var s=this.state.type;this.state.type=t,this.state.value=e,this.updateContext(s)},e.prototype.readToken_dot=function(){var t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.state.pos+2);return 46===t&&46===e?(this.state.pos+=3,this.finishToken(C.ellipsis)):(++this.state.pos,this.finishToken(C.dot))},e.prototype.readToken_slash=function(){return this.state.exprAllowed?(++this.state.pos,this.readRegexp()):61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(C.assign,2):this.finishOp(C.slash,1)},e.prototype.readToken_mult_modulo=function(t){var e=42===t?C.star:C.modulo,s=1,i=this.input.charCodeAt(this.state.pos+1);return 42===i&&(s++,i=this.input.charCodeAt(this.state.pos+2),e=C.exponent),61===i&&(s++,e=C.assign),this.finishOp(e,s)},e.prototype.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.state.pos+1);return e===t?this.finishOp(124===t?C.logicalOR:C.logicalAND,2):61===e?this.finishOp(C.assign,2):124===t&&125===e&&this.hasPlugin("flow")?this.finishOp(C.braceBarR,2):this.finishOp(124===t?C.bitwiseOR:C.bitwiseAND,1)},e.prototype.readToken_caret=function(){return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(C.assign,2):this.finishOp(C.bitwiseXOR,1)},e.prototype.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.state.pos+1);return e===t?45===e&&62===this.input.charCodeAt(this.state.pos+2)&&M.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(C.incDec,2):61===e?this.finishOp(C.assign,2):this.finishOp(C.plusMin,1)},e.prototype.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.state.pos+1),s=1;return e===t?(s=62===t&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+s)?this.finishOp(C.assign,s+1):this.finishOp(C.bitShift,s)):33===e&&60===t&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===e&&(s=2),this.finishOp(C.relational,s))},e.prototype.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.state.pos+1);return 61===e?this.finishOp(C.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===t&&62===e?(this.state.pos+=2,this.finishToken(C.arrow)):this.finishOp(61===t?C.eq:C.prefix,1)},e.prototype.readToken_question=function(){var t=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);return 46!==t||e>=48&&e<=57?(++this.state.pos,this.finishToken(C.question)):(this.state.pos+=2,this.finishToken(C.questionDot))},e.prototype.getTokenFromCode=function(t){switch(t){case 35:if(this.hasPlugin("classPrivateProperties")&&this.state.inClass)return++this.state.pos,this.finishToken(C.hash);this.raise(this.state.pos,`Unexpected character '${c(t)}'`);case 46:return this.readToken_dot();case 40:return++this.state.pos,this.finishToken(C.parenL);case 41:return++this.state.pos,this.finishToken(C.parenR);case 59:return++this.state.pos,this.finishToken(C.semi);case 44:return++this.state.pos,this.finishToken(C.comma);case 91:return++this.state.pos,this.finishToken(C.bracketL);case 93:return++this.state.pos,this.finishToken(C.bracketR);case 123:return this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(C.braceBarL,2):(++this.state.pos,this.finishToken(C.braceL));case 125:return++this.state.pos,this.finishToken(C.braceR);case 58:return this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(C.doubleColon,2):(++this.state.pos,this.finishToken(C.colon));case 63:return this.readToken_question();case 64:return++this.state.pos,this.finishToken(C.at);case 96:return++this.state.pos,this.finishToken(C.backQuote);case 48:var e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return this.readRadixNumber(16);if(111===e||79===e)return this.readRadixNumber(8);if(98===e||66===e)return this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 126:return this.finishOp(C.prefix,1)}this.raise(this.state.pos,`Unexpected character '${c(t)}'`)},e.prototype.finishOp=function(t,e){var s=this.input.slice(this.state.pos,this.state.pos+e);return this.state.pos+=e,this.finishToken(t,s)},e.prototype.readRegexp=function(){for(var t=this.state.pos,e=void 0,s=void 0;;){this.state.pos>=this.input.length&&this.raise(t,"Unterminated regular expression");var i=this.input.charAt(this.state.pos);if(M.test(i)&&this.raise(t,"Unterminated regular expression"),e)e=!1;else{if("["===i)s=!0;else if("]"===i&&s)s=!1;else if("/"===i&&!s)break;e="\\"===i}++this.state.pos}var r=this.input.slice(t,this.state.pos);++this.state.pos;var a=this.readWord1();return a&&(/^[gmsiyu]*$/.test(a)||this.raise(t,"Invalid regular expression flag")),this.finishToken(C.regexp,{pattern:r,flags:a})},e.prototype.readInt=function(t,e){for(var s=this.state.pos,i=16===t?G.hex:G.decBinOct,r=0,a=0,n=null==e?1/0:e;a<n;++a){var o=this.input.charCodeAt(this.state.pos),h=void 0;if(this.hasPlugin("numericSeparator")){var p=this.input.charCodeAt(this.state.pos-1),c=this.input.charCodeAt(this.state.pos+1);if(95===o){(i.indexOf(p)>-1||i.indexOf(c)>-1||Number.isNaN(c))&&this.raise(this.state.pos,"Invalid NumericLiteralSeparator"),++this.state.pos;continue}}if((h=o>=97?o-97+10:o>=65?o-65+10:o>=48&&o<=57?o-48:1/0)>=t)break;++this.state.pos,r=r*t+h}return this.state.pos===s||null!=e&&this.state.pos-s!==e?null:r},e.prototype.readRadixNumber=function(t){this.state.pos+=2;var e=this.readInt(t);return null==e&&this.raise(this.state.start+2,"Expected number in radix "+t),a(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(C.num,e)},e.prototype.readNumber=function(t){var e=this.state.pos,s=48===this.input.charCodeAt(e),i=!1;t||null!==this.readInt(10)||this.raise(e,"Invalid number"),s&&this.state.pos==e+1&&(s=!1);var r=this.input.charCodeAt(this.state.pos);46!==r||s||(++this.state.pos,this.readInt(10),i=!0,r=this.input.charCodeAt(this.state.pos)),69!==r&&101!==r||s||(43!==(r=this.input.charCodeAt(++this.state.pos))&&45!==r||++this.state.pos,null===this.readInt(10)&&this.raise(e,"Invalid number"),i=!0),a(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var n=this.input.slice(e,this.state.pos).replace(/_/g,""),o=void 0;return i?o=parseFloat(n):s&&1!==n.length?this.state.strict?this.raise(e,"Invalid number"):o=/[89]/.test(n)?parseInt(n,10):parseInt(n,8):o=parseInt(n,10),this.finishToken(C.num,o)},e.prototype.readCodePoint=function(t){var e=void 0;if(123===this.input.charCodeAt(this.state.pos)){var s=++this.state.pos;if(e=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,t),++this.state.pos,null===e)--this.state.invalidTemplateEscapePosition;else if(e>1114111){if(!t)return this.state.invalidTemplateEscapePosition=s-2,null;this.raise(s,"Code point out of bounds")}}else e=this.readHexChar(4,t);return e},e.prototype.readString=function(t){for(var e="",s=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===t)break;92===i?(e+=this.input.slice(s,this.state.pos),e+=this.readEscapedChar(!1),s=this.state.pos):(o(i)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return e+=this.input.slice(s,this.state.pos++),this.finishToken(C.string,e)},e.prototype.readTmplToken=function(){for(var t="",e=this.state.pos,s=!1;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var i=this.input.charCodeAt(this.state.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(C.template)?36===i?(this.state.pos+=2,this.finishToken(C.dollarBraceL)):(++this.state.pos,this.finishToken(C.backQuote)):(t+=this.input.slice(e,this.state.pos),this.finishToken(C.template,s?null:t));if(92===i){t+=this.input.slice(e,this.state.pos);var r=this.readEscapedChar(!0);null===r?s=!0:t+=r,e=this.state.pos}else if(o(i)){switch(t+=this.input.slice(e,this.state.pos),++this.state.pos,i){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}++this.state.curLine,this.state.lineStart=this.state.pos,e=this.state.pos}else++this.state.pos}},e.prototype.readEscapedChar=function(t){var e=!t,s=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,s){case 110:return"\n";case 114:return"\r";case 120:var i=this.readHexChar(2,e);return null===i?null:String.fromCharCode(i);case 117:var r=this.readCodePoint(e);return null===r?null:c(r);case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(s>=48&&s<=55){var a=this.state.pos-1,n=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(n,8);if(o>255&&(n=n.slice(0,-1),o=parseInt(n,8)),o>0){if(t)return this.state.invalidTemplateEscapePosition=a,null;this.state.strict?this.raise(a,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=a)}return this.state.pos+=n.length-1,String.fromCharCode(o)}return String.fromCharCode(s)}},e.prototype.readHexChar=function(t,e){var s=this.state.pos,i=this.readInt(16,t);return null===i&&(e?this.raise(s,"Bad character escape sequence"):(this.state.pos=s-1,this.state.invalidTemplateEscapePosition=s-1)),i},e.prototype.readWord1=function(){this.state.containsEsc=!1;for(var t="",e=!0,s=this.state.pos;this.state.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(n(i))this.state.pos+=i<=65535?1:2;else{if(92!==i)break;this.state.containsEsc=!0,t+=this.input.slice(s,this.state.pos);var r=this.state.pos;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;var o=this.readCodePoint(!0);(e?a:n)(o,!0)||this.raise(r,"Invalid Unicode escape"),t+=c(o),s=this.state.pos}e=!1}return t+this.input.slice(s,this.state.pos)},e.prototype.readWord=function(){var t=this.readWord1(),e=C.name;return!this.state.containsEsc&&this.isKeyword(t)&&(e=N[t]),this.finishToken(e,t)},e.prototype.braceIsBlock=function(t){if(t===C.colon){var e=this.curContext();if(e===V.braceStatement||e===V.braceExpression)return!e.isExpr}return t===C._return?M.test(this.input.slice(this.state.lastTokEnd,this.state.start)):t===C._else||t===C.semi||t===C.eof||t===C.parenR||(t===C.braceL?this.curContext()===V.braceStatement:!this.state.exprAllowed)},e.prototype.updateContext=function(t){var e=this.state.type,s=void 0;!e.keyword||t!==C.dot&&t!==C.questionDot?(s=e.updateContext)?s.call(this,t):this.state.exprAllowed=e.beforeExpr:this.state.exprAllowed=!1},e}(J)),Q=["leadingComments","trailingComments","innerComments"],Y=function(){function t(e,s,i){g(this,t),this.type="",this.start=s,this.end=0,this.loc=new X(i),e&&e.options.ranges&&(this.range=[s,0]),e&&e.filename&&(this.loc.filename=e.filename)}return t.prototype.__clone=function(){var e=new t;for(var s in this)Q.indexOf(s)<0&&(e[s]=this[s]);return e},t}(),H=[],$={kind:"loop"},Z={kind:"switch"},tt={},et=function(t){function e(i,r){g(this,e),i=s(i);var a=P(this,t.call(this,i,r));return a.options=i,a.inModule="module"===a.options.sourceType,a.input=r,a.plugins=l(a.options.plugins),a.filename=i.sourceFilename,0===a.state.pos&&"#"===a.input[0]&&"!"===a.input[1]&&a.skipLineComment(2),a}return w(e,t),e.prototype.parse=function(){var t=this.startNode(),e=this.startNode();return this.nextToken(),this.parseTopLevel(t,e)},e}(function(t){function e(){return g(this,e),P(this,t.apply(this,arguments))}return w(e,t),e.prototype.parseTopLevel=function(t,e){return e.sourceType=this.options.sourceType,this.parseBlockBody(e,!0,!0,C.eof),t.program=this.finishNode(e,"Program"),t.comments=this.state.comments,t.tokens=this.state.tokens,this.finishNode(t,"File")},e.prototype.stmtToDirective=function(t){var e=t.expression,s=this.startNodeAt(e.start,e.loc.start),i=this.startNodeAt(t.start,t.loc.start),r=this.input.slice(e.start,e.end),a=s.value=r.slice(1,-1);return this.addExtra(s,"raw",r),this.addExtra(s,"rawValue",a),i.value=this.finishNodeAt(s,"DirectiveLiteral",e.end,e.loc.end),this.finishNodeAt(i,"Directive",t.end,t.loc.end)},e.prototype.parseStatement=function(t,e){this.match(C.at)&&this.parseDecorators(!0);var s=this.state.type,i=this.startNode();switch(s){case C._break:case C._continue:return this.parseBreakContinueStatement(i,s.keyword);case C._debugger:return this.parseDebuggerStatement(i);case C._do:return this.parseDoStatement(i);case C._for:return this.parseForStatement(i);case C._function:return t||this.unexpected(),this.parseFunctionStatement(i);case C._class:return t||this.unexpected(),this.parseClass(i,!0);case C._if:return this.parseIfStatement(i);case C._return:return this.parseReturnStatement(i);case C._switch:return this.parseSwitchStatement(i);case C._throw:return this.parseThrowStatement(i);case C._try:return this.parseTryStatement(i);case C._let:case C._const:t||this.unexpected();case C._var:return this.parseVarStatement(i,s);case C._while:return this.parseWhileStatement(i);case C._with:return this.parseWithStatement(i);case C.braceL:return this.parseBlock();case C.semi:return this.parseEmptyStatement(i);case C._export:case C._import:if(this.hasPlugin("dynamicImport")&&this.lookahead().type===C.parenL||this.hasPlugin("importMeta")&&this.lookahead().type===C.dot)break;return this.options.allowImportExportEverywhere||(e||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")),s===C._import?this.parseImport(i):this.parseExport(i);case C.name:if("async"===this.state.value){var r=this.state.clone();if(this.next(),this.match(C._function)&&!this.canInsertSemicolon())return this.expect(C._function),this.parseFunction(i,!0,!1,!0);this.state=r}}var a=this.state.value,n=this.parseExpression();return s===C.name&&"Identifier"===n.type&&this.eat(C.colon)?this.parseLabeledStatement(i,a,n):this.parseExpressionStatement(i,n)},e.prototype.takeDecorators=function(t){this.state.decorators.length&&(t.decorators=this.state.decorators,this.state.decorators=[])},e.prototype.parseDecorators=function(t){for(;this.match(C.at);){var e=this.parseDecorator();this.state.decorators.push(e)}t&&this.match(C._export)||this.match(C._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},e.prototype.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var t=this.startNode();return this.next(),t.expression=this.parseMaybeAssign(),this.finishNode(t,"Decorator")},e.prototype.parseBreakContinueStatement=function(t,e){var s="break"===e;this.next(),this.isLineTerminator()?t.label=null:this.match(C.name)?(t.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var i=void 0;for(i=0;i<this.state.labels.length;++i){var r=this.state.labels[i];if(null==t.label||r.name===t.label.name){if(null!=r.kind&&(s||"loop"===r.kind))break;if(t.label&&s)break}}return i===this.state.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,s?"BreakStatement":"ContinueStatement")},e.prototype.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},e.prototype.parseDoStatement=function(t){return this.next(),this.state.labels.push($),t.body=this.parseStatement(!1),this.state.labels.pop(),this.expect(C._while),t.test=this.parseParenExpression(),this.eat(C.semi),this.finishNode(t,"DoWhileStatement")},e.prototype.parseForStatement=function(t){this.next(),this.state.labels.push($);var e=!1;if(this.hasPlugin("asyncGenerators")&&this.state.inAsync&&this.isContextual("await")&&(e=!0,this.next()),this.expect(C.parenL),this.match(C.semi))return e&&this.unexpected(),this.parseFor(t,null);if(this.match(C._var)||this.match(C._let)||this.match(C._const)){var s=this.startNode(),i=this.state.type;return this.next(),this.parseVar(s,!0,i),this.finishNode(s,"VariableDeclaration"),!this.match(C._in)&&!this.isContextual("of")||1!==s.declarations.length||s.declarations[0].init?(e&&this.unexpected(),this.parseFor(t,s)):this.parseForIn(t,s,e)}var r={start:0},a=this.parseExpression(!0,r);if(this.match(C._in)||this.isContextual("of")){var n=this.isContextual("of")?"for-of statement":"for-in statement";return this.toAssignable(a,void 0,n),this.checkLVal(a,void 0,void 0,n),this.parseForIn(t,a,e)}return r.start&&this.unexpected(r.start),e&&this.unexpected(),this.parseFor(t,a)},e.prototype.parseFunctionStatement=function(t){return this.next(),this.parseFunction(t,!0)},e.prototype.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement(!1),t.alternate=this.eat(C._else)?this.parseStatement(!1):null,this.finishNode(t,"IfStatement")},e.prototype.parseReturnStatement=function(t){return this.state.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},e.prototype.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression();var e=t.cases=[];this.expect(C.braceL),this.state.labels.push(Z);for(var s,i=void 0;!this.match(C.braceR);)if(this.match(C._case)||this.match(C._default)){var r=this.match(C._case);i&&this.finishNode(i,"SwitchCase"),e.push(i=this.startNode()),i.consequent=[],this.next(),r?i.test=this.parseExpression():(s&&this.raise(this.state.lastTokStart,"Multiple default clauses"),s=!0,i.test=null),this.expect(C.colon)}else i?i.consequent.push(this.parseStatement(!0)):this.unexpected();return i&&this.finishNode(i,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")},e.prototype.parseThrowStatement=function(t){return this.next(),M.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")},e.prototype.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(C._catch)){var e=this.startNode();this.next(),this.expect(C.parenL),e.param=this.parseBindingAtom(),this.checkLVal(e.param,!0,Object.create(null),"catch clause"),this.expect(C.parenR),e.body=this.parseBlock(),t.handler=this.finishNode(e,"CatchClause")}return t.guardedHandlers=H,t.finalizer=this.eat(C._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},e.prototype.parseVarStatement=function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")},e.prototype.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.state.labels.push($),t.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(t,"WhileStatement")},e.prototype.parseWithStatement=function(t){return this.state.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement(!1),this.finishNode(t,"WithStatement")},e.prototype.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},e.prototype.parseLabeledStatement=function(t,e,s){for(var i=this.state.labels,r=Array.isArray(i),a=0,i=r?i:i[Symbol.iterator]();;){var n;if(r){if(a>=i.length)break;n=i[a++]}else{if((a=i.next()).done)break;n=a.value}n.name===e&&this.raise(s.start,`Label '${e}' is already declared`)}for(var o=this.state.type.isLoop?"loop":this.match(C._switch)?"switch":null,h=this.state.labels.length-1;h>=0;h--){var p=this.state.labels[h];if(p.statementStart!==t.start)break;p.statementStart=this.state.start,p.kind=o}return this.state.labels.push({name:e,kind:o,statementStart:this.state.start}),t.body=this.parseStatement(!0),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")},e.prototype.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},e.prototype.parseBlock=function(t){var e=this.startNode();return this.expect(C.braceL),this.parseBlockBody(e,t,!1,C.braceR),this.finishNode(e,"BlockStatement")},e.prototype.isValidDirective=function(t){return"ExpressionStatement"===t.type&&"StringLiteral"===t.expression.type&&!t.expression.extra.parenthesized},e.prototype.parseBlockBody=function(t,e,s,i){for(var r=t.body=[],a=t.directives=[],n=!1,o=void 0,h=void 0;!this.eat(i);){n||!this.state.containsOctal||h||(h=this.state.octalPosition);var p=this.parseStatement(!0,s);if(e&&!n&&this.isValidDirective(p)){var c=this.stmtToDirective(p);a.push(c),void 0===o&&"use strict"===c.value.value&&(o=this.state.strict,this.setStrict(!0),h&&this.raise(h,"Octal literal in strict mode"))}else n=!0,r.push(p)}!1===o&&this.setStrict(!1)},e.prototype.parseFor=function(t,e){return t.init=e,this.expect(C.semi),t.test=this.match(C.semi)?null:this.parseExpression(),this.expect(C.semi),t.update=this.match(C.parenR)?null:this.parseExpression(),this.expect(C.parenR),t.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(t,"ForStatement")},e.prototype.parseForIn=function(t,e,s){var i=this.match(C._in)?"ForInStatement":"ForOfStatement";return s?this.eatContextual("of"):this.next(),"ForOfStatement"===i&&(t.await=!!s),t.left=e,t.right=this.parseExpression(),this.expect(C.parenR),t.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(t,i)},e.prototype.parseVar=function(t,e,s){var i=t.declarations=[];for(t.kind=s.keyword;;){var r=this.startNode();if(this.parseVarHead(r),this.eat(C.eq)?r.init=this.parseMaybeAssign(e):s!==C._const||this.match(C._in)||this.isContextual("of")?"Identifier"===r.id.type||e&&(this.match(C._in)||this.isContextual("of"))?r.init=null:this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),i.push(this.finishNode(r,"VariableDeclarator")),!this.eat(C.comma))break}return t},e.prototype.parseVarHead=function(t){t.id=this.parseBindingAtom(),this.checkLVal(t.id,!0,void 0,"variable declaration")},e.prototype.parseFunction=function(t,e,s,i,r){var a=this.state.inMethod;return this.state.inMethod=!1,this.initFunction(t,i),this.match(C.star)&&(t.async&&!this.hasPlugin("asyncGenerators")?this.unexpected():(t.generator=!0,this.next())),!e||r||this.match(C.name)||this.match(C._yield)||this.unexpected(),(this.match(C.name)||this.match(C._yield))&&(t.id=this.parseBindingIdentifier()),this.parseFunctionParams(t),this.parseFunctionBody(t,s),this.state.inMethod=a,this.finishNode(t,e?"FunctionDeclaration":"FunctionExpression")},e.prototype.parseFunctionParams=function(t){this.expect(C.parenL),t.params=this.parseBindingList(C.parenR)},e.prototype.parseClass=function(t,e,s){return this.next(),this.takeDecorators(t),this.parseClassId(t,e,s),this.parseClassSuper(t),this.parseClassBody(t),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},e.prototype.isClassProperty=function(){return this.match(C.eq)||this.match(C.semi)||this.match(C.braceR)},e.prototype.isClassMethod=function(){return this.match(C.parenL)},e.prototype.isNonstaticConstructor=function(t){return!(t.computed||t.static||"constructor"!==t.key.name&&"constructor"!==t.key.value)},e.prototype.parseClassBody=function(t){var e=this.state.strict;this.state.strict=!0,this.state.inClass=!0;var s={hadConstructor:!1},i=[],r=this.startNode();for(r.body=[],this.expect(C.braceL);!this.eat(C.braceR);)if(this.eat(C.semi))i.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(this.match(C.at))i.push(this.parseDecorator());else{var a=this.startNode();i.length&&(a.decorators=i,i=[]),this.parseClassMember(r,a,s)}i.length&&this.raise(this.state.start,"You have trailing decorators with no method"),t.body=this.finishNode(r,"ClassBody"),this.state.inClass=!1,this.state.strict=e},e.prototype.parseClassMember=function(t,e,s){var i=e,r=i,a=i,n=i;if(this.hasPlugin("classPrivateProperties")&&this.match(C.hash)){this.next();var o=i;return o.key=this.parseIdentifier(!0),void t.body.push(this.parsePrivateClassProperty(o))}if(r.static=!1,this.match(C.name)&&"static"===this.state.value){var h=this.parseIdentifier(!0);if(this.isClassMethod())return a.kind="method",a.computed=!1,a.key=h,void this.parseClassMethod(t,a,!1,!1);if(this.isClassProperty())return n.computed=!1,n.key=h,void t.body.push(this.parseClassProperty(n));r.static=!0}if(this.eat(C.star))return a.kind="method",this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be a generator"),a.computed||!a.static||"prototype"!==a.key.name&&"prototype"!==a.key.value||this.raise(a.key.start,"Classes may not have static property named prototype"),void this.parseClassMethod(t,a,!0,!1);var p=this.match(C.name),c=this.parsePropertyName(r);if(r.computed||!r.static||"prototype"!==r.key.name&&"prototype"!==r.key.value||this.raise(r.key.start,"Classes may not have static property named prototype"),this.isClassMethod())this.isNonstaticConstructor(a)?(s.hadConstructor?this.raise(c.start,"Duplicate constructor in the same class"):a.decorators&&this.raise(a.start,"You can't attach decorators to a class constructor"),s.hadConstructor=!0,a.kind="constructor"):a.kind="method",this.parseClassMethod(t,a,!1,!1);else if(this.isClassProperty())this.isNonstaticConstructor(n)&&this.raise(n.key.start,"Classes may not have a non-static field named 'constructor'"),t.body.push(this.parseClassProperty(n));else if(p&&"async"===c.name&&!this.isLineTerminator()){var l=this.hasPlugin("asyncGenerators")&&this.eat(C.star);a.kind="method",this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be an async function"),this.parseClassMethod(t,a,l,!0)}else!p||"get"!==c.name&&"set"!==c.name||this.isLineTerminator()&&this.match(C.star)?this.isLineTerminator()?(this.isNonstaticConstructor(n)&&this.raise(n.key.start,"Classes may not have a non-static field named 'constructor'"),t.body.push(this.parseClassProperty(n))):this.unexpected():(a.kind=c.name,this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't have get/set modifier"),this.parseClassMethod(t,a,!1,!1),this.checkGetterSetterParamCount(a))},e.prototype.parsePrivateClassProperty=function(t){return this.state.inClassProperty=!0,this.match(C.eq)?(this.next(),t.value=this.parseMaybeAssign()):t.value=null,this.semicolon(),this.state.inClassProperty=!1,this.finishNode(t,"ClassPrivateProperty")},e.prototype.parseClassProperty=function(t){var e=this.hasPlugin("classProperties"),s="You can only use Class Properties when the 'classProperties' plugin is enabled.";return t.typeAnnotation||e||this.raise(t.start,s),this.state.inClassProperty=!0,this.match(C.eq)?(e||this.raise(this.state.start,s),this.next(),t.value=this.parseMaybeAssign()):t.value=null,this.semicolon(),this.state.inClassProperty=!1,this.finishNode(t,"ClassProperty")},e.prototype.parseClassMethod=function(t,e,s,i){this.parseMethod(e,s,i),t.body.push(this.finishNode(e,"ClassMethod"))},e.prototype.parseClassId=function(t,e,s){this.match(C.name)?t.id=this.parseIdentifier():s||!e?t.id=null:this.unexpected(null,"A class name is required")},e.prototype.parseClassSuper=function(t){t.superClass=this.eat(C._extends)?this.parseExprSubscripts():null},e.prototype.parseExport=function(t){if(this.eat(C._export),this.match(C.star)){var e=this.startNode();if(this.next(),!this.hasPlugin("exportExtensions")||!this.eatContextual("as"))return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration");e.exported=this.parseIdentifier(!0),t.specifiers=[this.finishNode(e,"ExportNamespaceSpecifi