svelte-preprocess-readme
Version:
Develop and demo Svelte components from your README.md
1 lines • 240 kB
JavaScript
var e=Object.defineProperty,t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,s=(t,r,i)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,n=(e,n)=>{for(var a in n||(n={}))r.call(n,a)&&s(e,a,n[a]);if(t)for(var a of t(n))i.call(n,a)&&s(e,a,n[a]);return e};import a from"markdown-it";import{highlight as o,languages as c}from"prismjs";import"prism-svelte";"undefined"!=typeof process&&process.hrtime;var l={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"},h="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",u={5:h,"5module":h+" export import",6:h+" const class extends export import super"},p=/^in(stanceof)?$/,d="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",f="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿᫀᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",m=new RegExp("["+d+"]"),g=new RegExp("["+d+f+"]");d=f=null;var x=[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,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,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,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,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,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,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,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,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,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,2357,44,11,6,17,0,370,43,1301,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,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],v=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,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,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,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,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function y(e,t){for(var r=65536,i=0;i<t.length;i+=2){if((r+=t[i])>e)return!1;if((r+=t[i+1])>=e)return!0}}function k(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&m.test(String.fromCharCode(e)):!1!==t&&y(e,x)))}function b(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&g.test(String.fromCharCode(e)):!1!==t&&(y(e,x)||y(e,v)))))}var S=function(e,t){void 0===t&&(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 _(e,t){return new S(e,{beforeExpr:!0,binop:t})}var w={beforeExpr:!0},C={startsExpr:!0},E={};function A(e,t){return void 0===t&&(t={}),t.keyword=e,E[e]=new S(e,t)}var T={num:new S("num",C),regexp:new S("regexp",C),string:new S("string",C),name:new S("name",C),privateId:new S("privateId",C),eof:new S("eof"),bracketL:new S("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new S("]"),braceL:new S("{",{beforeExpr:!0,startsExpr:!0}),braceR:new S("}"),parenL:new S("(",{beforeExpr:!0,startsExpr:!0}),parenR:new S(")"),comma:new S(",",w),semi:new S(";",w),colon:new S(":",w),dot:new S("."),question:new S("?",w),questionDot:new S("?."),arrow:new S("=>",w),template:new S("template"),invalidTemplate:new S("invalidTemplate"),ellipsis:new S("...",w),backQuote:new S("`",C),dollarBraceL:new S("${",{beforeExpr:!0,startsExpr:!0}),eq:new S("=",{beforeExpr:!0,isAssign:!0}),assign:new S("_=",{beforeExpr:!0,isAssign:!0}),incDec:new S("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new S("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:_("||",1),logicalAND:_("&&",2),bitwiseOR:_("|",3),bitwiseXOR:_("^",4),bitwiseAND:_("&",5),equality:_("==/!=/===/!==",6),relational:_("</>/<=/>=",7),bitShift:_("<</>>/>>>",8),plusMin:new S("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:_("%",10),star:_("*",10),slash:_("/",10),starstar:new S("**",{beforeExpr:!0}),coalesce:_("??",1),_break:A("break"),_case:A("case",w),_catch:A("catch"),_continue:A("continue"),_debugger:A("debugger"),_default:A("default",w),_do:A("do",{isLoop:!0,beforeExpr:!0}),_else:A("else",w),_finally:A("finally"),_for:A("for",{isLoop:!0}),_function:A("function",C),_if:A("if"),_return:A("return",w),_switch:A("switch"),_throw:A("throw",w),_try:A("try"),_var:A("var"),_const:A("const"),_while:A("while",{isLoop:!0}),_with:A("with"),_new:A("new",{beforeExpr:!0,startsExpr:!0}),_this:A("this",C),_super:A("super",C),_class:A("class",C),_extends:A("extends",w),_export:A("export"),_import:A("import",C),_null:A("null",C),_true:A("true",C),_false:A("false",C),_in:A("in",{beforeExpr:!0,binop:7}),_instanceof:A("instanceof",{beforeExpr:!0,binop:7}),_typeof:A("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:A("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:A("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},P=/\r\n?|\n|\u2028|\u2029/,L=new RegExp(P.source,"g");function I(e,t){return 10===e||13===e||!t&&(8232===e||8233===e)}var N=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,D=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,R=Object.prototype,B=R.hasOwnProperty,V=R.toString;function O(e,t){return B.call(e,t)}var q=Array.isArray||function(e){return"[object Array]"===V.call(e)};function M(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var U=function(e,t){this.line=e,this.column=t};U.prototype.offset=function(e){return new U(this.line,this.column+e)};var F=function(e,t,r){this.start=t,this.end=r,null!==e.sourceFile&&(this.source=e.sourceFile)};function H(e,t){for(var r=1,i=0;;){L.lastIndex=i;var s=L.exec(e);if(!(s&&s.index<t))return new U(r,t-i);++r,i=s.index+s[0].length}}var W={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},G=!1;function j(e){var t={};for(var r in W)t[r]=e&&O(e,r)?e[r]:W[r];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!G&&"object"==typeof console&&console.warn&&(G=!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),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),q(t.onToken)){var i=t.onToken;t.onToken=function(e){return i.push(e)}}return q(t.onComment)&&(t.onComment=function(e,t){return function(r,i,s,n,a,o){var c={type:r?"Block":"Line",value:i,start:s,end:n};e.locations&&(c.loc=new F(this,a,o)),e.ranges&&(c.range=[s,n]),t.push(c)}}(t,t.onComment)),t}function $(e,t){return 2|(e?4:0)|(t?8:0)}var z=function(e,t,r){this.options=e=j(e),this.sourceFile=e.sourceFile,this.keywords=M(u[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var i="";!0!==e.allowReserved&&(i=l[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(i+=" await")),this.reservedWords=M(i);var s=(i?i+" ":"")+l.strict;this.reservedWordsStrict=M(s),this.reservedWordsStrictBind=M(s+" "+l.strictBind),this.input=String(t),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf("\n",r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(P).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=T.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="module"===e.sourceType,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),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},Y={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},inNonArrowFunction:{configurable:!0}};z.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},Y.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},Y.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},Y.inAsync.get=function(){return(4&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},Y.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit)return!1;if(2&t.flags)return(4&t.flags)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Y.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(64&t)>0||r||this.options.allowSuperOutsideMethod},Y.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Y.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Y.inNonArrowFunction.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(2&t)>0||r},z.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var r=this,i=0;i<e.length;i++)r=e[i](r);return r},z.parse=function(e,t){return new this(t,e).parse()},z.parseExpressionAt=function(e,t,r){var i=new this(r,e,t);return i.nextToken(),i.parseExpression()},z.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(z.prototype,Y);var K=z.prototype,Q=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;function X(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}K.strictDirective=function(e){for(;;){D.lastIndex=e,e+=D.exec(this.input)[0].length;var t=Q.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){D.lastIndex=e+t[0].length;var r=D.exec(this.input),i=r.index+r[0].length,s=this.input.charAt(i);return";"===s||"}"===s||P.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(s)||"!"===s&&"="===this.input.charAt(i+1))}e+=t[0].length,D.lastIndex=e,e+=D.exec(this.input)[0].length,";"===this.input[e]&&e++}},K.eat=function(e){return this.type===e&&(this.next(),!0)},K.isContextual=function(e){return this.type===T.name&&this.value===e&&!this.containsEsc},K.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},K.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},K.canInsertSemicolon=function(){return this.type===T.eof||this.type===T.braceR||P.test(this.input.slice(this.lastTokEnd,this.start))},K.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},K.semicolon=function(){this.eat(T.semi)||this.insertSemicolon()||this.unexpected()},K.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},K.expect=function(e){this.eat(e)||this.unexpected()},K.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},K.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,"Parenthesized pattern")}},K.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,i=e.doubleProto;if(!t)return r>=0||i>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")},K.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")},K.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var Z=z.prototype;Z.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==T.eof;){var r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var i=0,s=Object.keys(this.undefinedExports);i<s.length;i+=1){var n=s[i];this.raiseRecoverable(this.undefinedExports[n].start,"Export '"+n+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var J={kind:"loop"},ee={kind:"switch"};Z.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;D.lastIndex=this.pos;var t=D.exec(this.input),r=this.pos+t[0].length,i=this.input.charCodeAt(r);if(91===i||92===i||i>55295&&i<56320)return!0;if(e)return!1;if(123===i)return!0;if(k(i,!0)){for(var s=r+1;b(i=this.input.charCodeAt(s),!0);)++s;if(92===i||i>55295&&i<56320)return!0;var n=this.input.slice(r,s);if(!p.test(n))return!0}return!1},Z.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;D.lastIndex=this.pos;var e,t=D.exec(this.input),r=this.pos+t[0].length;return!(P.test(this.input.slice(this.pos,r))||"function"!==this.input.slice(r,r+8)||r+8!==this.input.length&&(b(e=this.input.charCodeAt(r+8))||e>55295&&e<56320))},Z.parseStatement=function(e,t,r){var i,s=this.type,n=this.startNode();switch(this.isLet(e)&&(s=T._var,i="let"),s){case T._break:case T._continue:return this.parseBreakContinueStatement(n,s.keyword);case T._debugger:return this.parseDebuggerStatement(n);case T._do:return this.parseDoStatement(n);case T._for:return this.parseForStatement(n);case T._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(n,!1,!e);case T._class:return e&&this.unexpected(),this.parseClass(n,!0);case T._if:return this.parseIfStatement(n);case T._return:return this.parseReturnStatement(n);case T._switch:return this.parseSwitchStatement(n);case T._throw:return this.parseThrowStatement(n);case T._try:return this.parseTryStatement(n);case T._const:case T._var:return i=i||this.value,e&&"var"!==i&&this.unexpected(),this.parseVarStatement(n,i);case T._while:return this.parseWhileStatement(n);case T._with:return this.parseWithStatement(n);case T.braceL:return this.parseBlock(!0,n);case T.semi:return this.parseEmptyStatement(n);case T._export:case T._import:if(this.options.ecmaVersion>10&&s===T._import){D.lastIndex=this.pos;var a=D.exec(this.input),o=this.pos+a[0].length,c=this.input.charCodeAt(o);if(40===c||46===c)return this.parseExpressionStatement(n,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'")),s===T._import?this.parseImport(n):this.parseExport(n,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(n,!0,!e);var l=this.value,h=this.parseExpression();return s===T.name&&"Identifier"===h.type&&this.eat(T.colon)?this.parseLabeledStatement(n,l,h,e):this.parseExpressionStatement(n,h)}},Z.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.eat(T.semi)||this.insertSemicolon()?e.label=null:this.type!==T.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i<this.labels.length;++i){var s=this.labels[i];if(null==e.label||s.name===e.label.name){if(null!=s.kind&&(r||"loop"===s.kind))break;if(e.label&&r)break}}return i===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},Z.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},Z.parseDoStatement=function(e){return this.next(),this.labels.push(J),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(T._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(T.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},Z.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(J),this.enterScope(0),this.expect(T.parenL),this.type===T.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===T._var||this.type===T._const||r){var i=this.startNode(),s=r?"let":this.value;return this.next(),this.parseVar(i,!0,s),this.finishNode(i,"VariableDeclaration"),(this.type===T._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===i.declarations.length?(this.options.ecmaVersion>=9&&(this.type===T._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,i)):(t>-1&&this.unexpected(t),this.parseFor(e,i))}var n=new X,a=this.parseExpression(!(t>-1)||"await",n);return this.type===T._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.options.ecmaVersion>=9&&(this.type===T._in?t>-1&&this.unexpected(t):e.await=t>-1),this.toAssignable(a,!1,n),this.checkLValPattern(a),this.parseForIn(e,a)):(this.checkExpressionErrors(n,!0),t>-1&&this.unexpected(t),this.parseFor(e,a))},Z.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,re|(r?0:ie),!1,t)},Z.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(T._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},Z.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(T.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},Z.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(T.braceL),this.labels.push(ee),this.enterScope(0);for(var r=!1;this.type!==T.braceR;)if(this.type===T._case||this.type===T._default){var i=this.type===T._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(T.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")},Z.parseThrowStatement=function(e){return this.next(),P.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 te=[];Z.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===T._catch){var t=this.startNode();if(this.next(),this.eat(T.parenL)){t.param=this.parseBindingAtom();var r="Identifier"===t.param.type;this.enterScope(r?32:0),this.checkLValPattern(t.param,r?4:2),this.expect(T.parenR)}else 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(T._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},Z.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},Z.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(J),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},Z.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")},Z.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},Z.parseLabeledStatement=function(e,t,r,i){for(var s=0,n=this.labels;s<n.length;s+=1){n[s].name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var a=this.type.isLoop?"loop":this.type===T._switch?"switch":null,o=this.labels.length-1;o>=0;o--){var c=this.labels[o];if(c.statementStart!==e.start)break;c.statementStart=this.start,c.kind=a}return this.labels.push({name:t,kind:a,statementStart:this.start}),e.body=this.parseStatement(i?-1===i.indexOf("label")?i+"label":i:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},Z.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},Z.parseBlock=function(e,t,r){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(T.braceL),e&&this.enterScope(0);this.type!==T.braceR;){var i=this.parseStatement(null);t.body.push(i)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},Z.parseFor=function(e,t){return e.init=t,this.expect(T.semi),e.test=this.type===T.semi?null:this.parseExpression(),this.expect(T.semi),e.update=this.type===T.parenR?null:this.parseExpression(),this.expect(T.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},Z.parseForIn=function(e,t){var r=this.type===T._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!r||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(T.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")},Z.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r;;){var i=this.startNode();if(this.parseVarId(i,r),this.eat(T.eq)?i.init=this.parseMaybeAssign(t):"const"!==r||this.type===T._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===i.id.type||t&&(this.type===T._in||this.isContextual("of"))?i.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(T.comma))break}return e},Z.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var re=1,ie=2;function se(e,t){var r=t.key.name,i=e[r],s="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(s=(t.static?"s":"i")+t.kind),"iget"===i&&"iset"===s||"iset"===i&&"iget"===s||"sget"===i&&"sset"===s||"sset"===i&&"sget"===s?(e[r]="true",!1):!!i||(e[r]=s,!1)}function ne(e,t){var r=e.computed,i=e.key;return!r&&("Identifier"===i.type&&i.name===t||"Literal"===i.type&&i.value===t)}Z.parseFunction=function(e,t,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===T.star&&t&ie&&this.unexpected(),e.generator=this.eat(T.star)),this.options.ecmaVersion>=8&&(e.async=!!i),t&re&&(e.id=4&t&&this.type!==T.name?null:this.parseIdent(),!e.id||t&ie||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var s=this.yieldPos,n=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope($(e.async,e.generator)),t&re||(e.id=this.type===T.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1),this.yieldPos=s,this.awaitPos=n,this.awaitIdentPos=a,this.finishNode(e,t&re?"FunctionDeclaration":"FunctionExpression")},Z.parseFunctionParams=function(e){this.expect(T.parenL),e.params=this.parseBindingList(T.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Z.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var i=this.enterClassBody(),s=this.startNode(),n=!1;for(s.body=[],this.expect(T.braceL);this.type!==T.braceR;){var a=this.parseClassElement(null!==e.superClass);a&&(s.body.push(a),"MethodDefinition"===a.type&&"constructor"===a.kind?(n&&this.raise(a.start,"Duplicate constructor in the same class"),n=!0):"PrivateIdentifier"===a.key.type&&se(i,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(s,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},Z.parseClassElement=function(e){if(this.eat(T.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),i="",s=!1,n=!1,a="method";if(r.static=!1,this.eatContextual("static")&&(this.isClassElementNameStart()||this.type===T.star?r.static=!0:i="static"),!i&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==T.star||this.canInsertSemicolon()?i="async":n=!0),!i&&(t>=9||!n)&&this.eat(T.star)&&(s=!0),!i&&!n&&!s){var o=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=o:i=o)}if(i?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=i,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===T.parenL||"method"!==a||s||n){var c=!r.static&&ne(r,"constructor"),l=c&&e;c&&"method"!==a&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=c?"constructor":a,this.parseClassMethod(r,s,n,l)}else this.parseClassField(r);return r},Z.isClassElementNameStart=function(){return this.type===T.name||this.type===T.privateId||this.type===T.num||this.type===T.string||this.type===T.bracketL||this.type.keyword},Z.parseClassElementName=function(e){this.type===T.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},Z.parseClassMethod=function(e,t,r,i){var s=e.key;"constructor"===e.kind?(t&&this.raise(s.start,"Constructor can't be a generator"),r&&this.raise(s.start,"Constructor can't be an async method")):e.static&&ne(e,"prototype")&&this.raise(s.start,"Classes may not have a static property named prototype");var n=e.value=this.parseMethod(t,r,i);return"get"===e.kind&&0!==n.params.length&&this.raiseRecoverable(n.start,"getter should have no params"),"set"===e.kind&&1!==n.params.length&&this.raiseRecoverable(n.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===n.params[0].type&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},Z.parseClassField=function(e){if(ne(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&ne(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(T.eq)){var t=this.currentThisScope(),r=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=r}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")},Z.parseClassId=function(e,t){this.type===T.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},Z.parseClassSuper=function(e){e.superClass=this.eat(T._extends)?this.parseExprSubscripts():null},Z.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},Z.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,r=e.used,i=this.privateNameStack.length,s=0===i?null:this.privateNameStack[i-1],n=0;n<r.length;++n){var a=r[n];O(t,a.name)||(s?s.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}},Z.parseExport=function(e,t){if(this.next(),this.eat(T.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseIdent(!0),this.checkExport(t,e.exported.name,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==T.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(T._default)){var r;if(this.checkExport(t,"default",this.lastTokStart),this.type===T._function||(r=this.isAsyncFunction())){var i=this.startNode();this.next(),r&&this.next(),e.declaration=this.parseFunction(i,4|re,!1,r)}else if(this.type===T._class){var s=this.startNode();e.declaration=this.parseClass(s,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==T.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var n=0,a=e.specifiers;n<a.length;n+=1){var o=a[n];this.checkUnreserved(o.local),this.checkLocalExport(o.local)}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},Z.checkExport=function(e,t,r){e&&(O(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)},Z.checkPatternExport=function(e,t){var r=t.type;if("Identifier"===r)this.checkExport(e,t.name,t.start);else if("ObjectPattern"===r)for(var i=0,s=t.properties;i<s.length;i+=1){var n=s[i];this.checkPatternExport(e,n)}else if("ArrayPattern"===r)for(var a=0,o=t.elements;a<o.length;a+=1){var c=o[a];c&&this.checkPatternExport(e,c)}else"Property"===r?this.checkPatternExport(e,t.value):"AssignmentPattern"===r?this.checkPatternExport(e,t.left):"RestElement"===r?this.checkPatternExport(e,t.argument):"ParenthesizedExpression"===r&&this.checkPatternExport(e,t.expression)},Z.checkVariableExport=function(e,t){if(e)for(var r=0,i=t;r<i.length;r+=1){var s=i[r];this.checkPatternExport(e,s.id)}},Z.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},Z.parseExportSpecifiers=function(e){var t=[],r=!0;for(this.expect(T.braceL);!this.eat(T.braceR);){if(r)r=!1;else if(this.expect(T.comma),this.afterTrailingComma(T.braceR))break;var i=this.startNode();i.local=this.parseIdent(!0),i.exported=this.eatContextual("as")?this.parseIdent(!0):i.local,this.checkExport(e,i.exported.name,i.exported.start),t.push(this.finishNode(i,"ExportSpecifier"))}return t},Z.parseImport=function(e){return this.next(),this.type===T.string?(e.specifiers=te,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===T.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},Z.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===T.name){var r=this.startNode();if(r.local=this.parseIdent(),this.checkLValSimple(r.local,2),e.push(this.finishNode(r,"ImportDefaultSpecifier")),!this.eat(T.comma))return e}if(this.type===T.star){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdent(),this.checkLValSimple(i.local,2),e.push(this.finishNode(i,"ImportNamespaceSpecifier")),e}for(this.expect(T.braceL);!this.eat(T.braceR);){if(t)t=!1;else if(this.expect(T.comma),this.afterTrailingComma(T.braceR))break;var s=this.startNode();s.imported=this.parseIdent(!0),this.eatContextual("as")?s.local=this.parseIdent():(this.checkUnreserved(s.imported),s.local=s.imported),this.checkLValSimple(s.local,2),e.push(this.finishNode(s,"ImportSpecifier"))}return e},Z.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)},Z.isDirectiveCandidate=function(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var ae=z.prototype;ae.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var i=0,s=e.properties;i<s.length;i+=1){var n=s[i];this.toAssignable(n,t),"RestElement"!==n.type||"ArrayPattern"!==n.argument.type&&"ObjectPattern"!==n.argument.type||this.raise(n.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",r&&this.checkPatternErrors(r,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,r);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else r&&this.checkPatternErrors(r,!0);return e},ae.toAssignableList=function(e,t){for(var r=e.length,i=0;i<r;i++){var s=e[i];s&&this.toAssignable(s,t)}if(r){var n=e[r-1];6===this.options.ecmaVersion&&t&&n&&"RestElement"===n.type&&"Identifier"!==n.argument.type&&this.unexpected(n.argument.start)}return e},ae.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},ae.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==T.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},ae.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case T.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(T.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case T.braceL:return this.parseObj(!0)}return this.parseIdent()},ae.parseBindingList=function(e,t,r){for(var i=[],s=!0;!this.eat(e);)if(s?s=!1:this.expect(T.comma),t&&this.type===T.comma)i.push(null);else{if(r&&this.afterTrailingComma(e))break;if(this.type===T.ellipsis){var n=this.parseRestBinding();this.parseBindingListItem(n),i.push(n),this.type===T.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var a=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(a),i.push(a)}return i},ae.parseBindingListItem=function(e){return e},ae.parseMaybeDefault=function(e,t,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(T.eq))return r;var i=this.startNodeAt(e,t);return i.left=r,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")},ae.checkLValSimple=function(e,t,r){void 0===t&&(t=0);var i=0!==t;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(i?"Binding ":"Assigning to ")+e.name+" in strict mode"),i&&(2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),r&&(O(r,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),r[e.name]=!0),5!==t&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":i&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return i&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,r);default:this.raise(e.start,(i?"Binding":"Assigning to")+" rvalue")}},ae.checkLValPattern=function(e,t,r){switch(void 0===t&&(t=0),e.type){case"ObjectPattern":for(var i=0,s=e.properties;i<s.length;i+=1){var n=s[i];this.checkLValInnerPattern(n,t,r)}break;case"ArrayPattern":for(var a=0,o=e.elements;a<o.length;a+=1){var c=o[a];c&&this.checkLValInnerPattern(c,t,r)}break;default:this.checkLValSimple(e,t,r)}},ae.checkLValInnerPattern=function(e,t,r){switch(void 0===t&&(t=0),e.type){case"Property":this.checkLValInnerPattern(e.value,t,r);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,r);break;case"RestElement":this.checkLValPattern(e.argument,t,r);break;default:this.checkLValPattern(e,t,r)}};var oe=z.prototype;function ce(e){return"MemberExpression"===e.type&&"PrivateIdentifier"===e.property.type||"ChainExpression"===e.type&&ce(e.expression)}oe.checkPropClash=function(e,t,r){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var i,s=e.key;switch(s.type){case"Identifier":i=s.name;break;case"Literal":i=String(s.value);break;default:return}var n=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===i&&"init"===n&&(t.proto&&(r?r.doubleProto<0&&(r.doubleProto=s.start):this.raiseRecoverable(s.start,"Redefinition of __proto__ property")),t.proto=!0);else{var a=t[i="$"+i];if(a)("init"===n?this.strict&&a.init||a.get||a.set:a.init||a[n])&&this.raiseRecoverable(s.start,"Redefinition of property");else a=t[i]={init:!1,get:!1,set:!1};a[n]=!0}}},oe.parseExpression=function(e,t){var r=this.start,i=this.startLoc,s=this.parseMaybeAssign(e,t);if(this.type===T.comma){var n=this.startNodeAt(r,i);for(n.expressions=[s];this.eat(T.comma);)n.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(n,"SequenceExpression")}return s},oe.parseMaybeAssign=function(e,t,r){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var i=!1,s=-1,n=-1;t?(s=t.parenthesizedAssign,n=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new X,i=!0);var a=this.start,o=this.startLoc;this.type!==T.parenL&&this.type!==T.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===e);var c=this.parseMaybeConditional(e,t);if(r&&(c=r.call(this,c,a,o)),this.type.isAssign){var l=this.startNodeAt(a,o);return l.operator=this.value,this.type===T.eq&&(c=this.toAssignable(c,!1,t)),i||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=c.start&&(t.shorthandAssign=-1),this.type===T.eq?this.checkLValPattern(c):this.checkLValSimple(c),l.left=c,this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return i&&this.checkExpressionErrors(t,!0),s>-1&&(t.parenthesizedAssign=s),n>-1&&(t.trailingComma=n),c},oe.parseMaybeConditional=function(e,t){var r=this.start,i=this.startLoc,s=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return s;if(this.eat(T.question)){var n=this.startNodeAt(r,i);return n.test=s,n.consequent=this.parseMaybeAssign(),this.expect(T.colon),n.alternate=this.parseMaybeAssign(e),this.finishNode(n,"ConditionalExpression")}return s},oe.parseExprOps=function(e,t){var r=this.start,i=this.startLoc,s=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)||s.start===r&&"ArrowFunctionExpression"===s.type?s:this.parseExprOp(s,r,i,-1,e)},oe.parseExprOp=function(e,t,r,i,s){var n=this.type.binop;if(null!=n&&(!s||this.type!==T._in)&&n>i){var a=this.type===T.logicalOR||this.type===T.logicalAND,o=this.type===T.coalesce;o&&(n=T.logicalAND.binop);var c=this.value;this.next();var l=this.start,h=this.startLoc,u=this.parseExprOp(this.parseMaybeUnary(null,!1),l,h,n,s),p=this.buildBinary(t,r,e,u,c,a||o);return(a&&this.type===T.coalesce||o&&(this.type===T.logicalOR||this.type===T.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(p,t,r,i,s)}return e},oe.buildBinary=function(e,t,r,i,s,n){var a=this.startNodeAt(e,t);return a.left=r,a.operator=s,a.right=i,this.finishNode(a,n?"LogicalExpression":"BinaryExpression")},oe.parseMaybeUnary=function(e,t,r){var i,s=this.start,n=this.startLoc;if(this.isContextual("await")&&this.canAwait)i=this.parseAwait(),t=!0;else if(this.type.prefix){var a=this.startNode(),o=this.type===T.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0,o),this.checkExpressionErrors(e,!0),o?this.checkLValSimple(a.argument):this.strict&&"delete"===a.operator&&"Identifier"===a.argument.type?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):"delete"===a.operator&&ce(a.argument)?this.raiseRecoverable(a.start,"Private fields can not be deleted"):t=!0,i=this.finishNode(a,o?"UpdateExpression":"UnaryExpression")}else{if(i=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return i;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(s,n);c.operator=this.value,c.prefix=!1,c.argument=i,this.checkLValSimple(i),this.next(),i=this.finishNode(c,"UpdateExpression")}}return r||!this.eat(T.starstar)?i:t?void this.unexpected(this.lastTokStart):this.buildBinary(s,n,i,this.parseMaybeUnary(null,!1),"**",!1)},oe.parseExprSubscripts=function(e){var t=this.start,r=this.startLoc,i=this.parseExprAtom(e);if("ArrowFunctionExpression"===i.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return i;var s=this.parseSubscripts(i,t,r);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1),e.trailingComma>=s.start&&(e.trailingComma=-1)),s},oe.parseSubscripts=function(e,t,r,i){for(var s=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.potentialArrowAt===e.start,n=!1;;){var a=this.parseSubscript(e,t,r,i,s,n);if(a.optional&&(n=!0),a===e||"ArrowFunctionExpression"===a.type){if(n){var o=this.startNodeAt(t,r);o.expression=a,a=this.finishNode(o,"ChainExpression")}return a}e=a}},oe.parseSubscript=function(e,t,r,i,s,n){var a=this.options.ecmaVersion>=11,o=a&&this.eat(T.questionDot);i&&o&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(T.bracketL);if(c||o&&this.type!==T.parenL&&this.type!==T.backQuote||this.eat(T.dot)){var l=this.startNodeAt(t,r);l.object=e,c?(l.property=this.parseExpression(),this.expect(T.bracketR)):this.type===T.privateId&&"Super"!==e.type?l.property=this.parsePrivateIdent():l.property=this.parseIdent("never"!==this.options.allowReserved),l.computed=!!c,a&&(l.optional=o),e=this.finishNode(l,"MemberExpression")}else if(!i&&this.eat(T.parenL)){var h=new X,u=this.yieldPos,p=this.awaitPos,d=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var f=this.parseExprList(T.parenR,this.options.ecmaVersion>=8,!1,h);if(s&&!o&&!this.canInsertSemicolon()&&this.eat(T.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=u,this.awaitPos=p,this.awaitIdentPos=d,this.parseArrowExpression(this.startNodeAt(t,r),f,!0);this.checkExpressionErrors(h,!0),this.yieldPos=u||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=d||this.awaitIdentPos;var m=this.startNodeAt(t,r);m.callee=e,m.arguments=f,a&&(m.optional=o),e=this.finishNode(m,"CallExpression")}else if(this.type===T.backQuote){(o||n)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var g=this.startNodeAt(t,r);g.tag=e,g.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(g,"TaggedTemplateExpression")}return e},oe.parseExprAtom=function(e){this.type===T.slash&&this.readRegexp();var t,r=this.potentialArrowAt===this.start;switch(this.type){case T._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),t=this.startNode(),this.next(),this.type!==T.parenL||this.allowDirectSuper||this.raise(t.start,"super() call outside constructor of a subclass"),this.type!==T.dot&&this.type!==T.bracketL&&this.type!==T.parenL&&this.unexpected(),this.finishNode(t,"Super");case T._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case T.name:var i=this.start,s=this.startLoc,n=this.containsEsc,a=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!n&&"async"===a.name&&!this.canInsertSemicolon()&&this.eat(T._function))return this.parseFunction(this.startNodeAt(i,s),0,!1,!0);if(r&&!this.canInsertSemicolon()){if(this.eat(T.arrow))return this.parseArrowExpression(this.startNodeAt(i,s),[a],!1);if(this.options.ecmaVersion>=8&&"async"===a.name&&this.type===T.name&&!n&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return a=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(T.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(i,s),[a],!0)}return a;case T.regexp:var o=this.value;return(t=this.parseLiteral(o.value)).regex={pattern:o.pattern,flags:o.flags},t;case T.num:case T.string:return this.parseLiteral(this.value);case T._null:case T._true:case T._false:return(t=this.startNode()).value=this.type===T._null?null:this.type===T._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case T.parenL:var c=this.start,l=this.parseParenAndDistinguishExpression(r);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(l)&&(e.parenthesizedAssign=c),e.parenthesizedBind<0&&(e.parenthesizedBind=c)),l;case T.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(T.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case T.braceL:return this.parseObj(!1,e);case T._function:return t=this.startNode(),this.next(),this.parseFunction(t,0);case T._class:return this.parseClass(this.startNode(),!1);case T._new:return this.parseNew();case T.backQuote:return this.parseTemplate();case T._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},oe.parseExprImport=function(){var e=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var t=this.parseIdent(!0);switch(this.type){case T.parenL:return this.parseDynamicImport(e);case T.dot:return e.meta=t,this.parseImportMeta(e);default:this.unexpected(