/** * gpu.js * http://gpu.rocks/ * * GPU Accelerated JavaScript * * @version 0.0.0 * @date Mon Jul 24 2017 11:49:41 GMT+0800 (+08) * * @license MIT * The MIT License * * Copyright (c) 2017 gpu.js Team */ "use strict";!function t(e,n,i){function r(a,o){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!o&&u)return u(a,!0);if(s)return s(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return r(n?n:t)},l,l.exports,t,e,n,i)}return n[a].exports}for(var s="function"==typeof require&&require,a=0;a {\n "+r.toString()+";\n const utils = {\n allPropertiesOf: function "+i.allPropertiesOf.toString()+",\n clone: function "+i.clone.toString()+",\n /*splitArray: function "+i.splitArray.toString()+",\n getArgumentType: function "+i.getArgumentType.toString()+",\n getDimensions: function "+i.getDimensions.toString()+",\n dimToTexSize: function "+i.dimToTexSize.toString()+",\n copyFlatten: function "+i.copyFlatten.toString()+",\n flatten: function "+i.flatten.toString()+",\n systemEndianness: '"+i.systemEndianness()+"',\n initWebGl: function "+i.initWebGl.toString()+",\n isArray: function "+i.isArray.toString()+"*/\n };\n class "+(e||"Kernel")+" {\n constructor() { \n this.argumentsLength = 0;\n this._canvas = null;\n this._webGl = null;\n this.built = false;\n this.program = null;\n this.paramNames = "+JSON.stringify(t.paramNames)+";\n this.paramTypes = "+JSON.stringify(t.paramTypes)+";\n this.texSize = "+JSON.stringify(t.texSize)+";\n this.dimensions = "+JSON.stringify(t.dimensions)+";\n this._kernelString = `"+t._kernelString+"`;\n\t\t this.run = function() {\n this.run = null;\n this.build();\n return this.run.apply(this, arguments);\n }.bind(this);\n this.thread = {\n x: 0,\n y: 0,\n z: 0\n };\n this.runDimensions = {\n x: null,\n y: null,\n z: null\n };\n }\n setCanvas(canvas) { this._canvas = canvas; return this; }\n setWebGl(webGl) { this._webGl = webGl; return this; }\n "+t.build.toString()+"\n run () { "+t.kernelString+" }\n getKernelString() { return this._kernelString; }\n };\n return kernelRunShortcut(new Kernel());\n };"}},{"../../core/utils":24,"../kernel-run-shortcut":9}],4:[function(t,e,n){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(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}function s(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)}var a=function(){function t(t,e){for(var n=0;n=0);else{e.push(t),n&&(i.parent=n,i.constants=n.constants),i.getFunctionString();for(var r=0;r ("+i.length+","+this.paramNames.length+")";this.paramTypes=i}else if("object"===("undefined"==typeof i?"undefined":_typeof(i))){var s=Object.keys(i);if(i.hasOwnProperty("returns")&&(this.returnType=i.returns,s.splice(s.indexOf("returns"),1)),s.length>0&&s.length!==this.paramNames.length)throw"Invalid argument type array length, against function length -> ("+s.length+","+this.paramNames.length+")";this.paramTypes=this.paramNames.map(function(t){return i.hasOwnProperty(t)?i[t]:"float"})}}else this.paramTypes=[];this.returnType||(this.returnType=r||"float")}return _createClass(BaseFunctionNode,[{key:"setAddFunction",value:function(t){return this.addFunction=t,this}},{key:"getJsFunction",value:function getJsFunction(){if(this.jsFunction)return this.jsFunction;if(this.jsFunctionString)return this.jsFunction=eval(this.jsFunctionString),this.jsFunction;throw"Missing jsFunction, and jsFunctionString parameter"}},{key:"getJsAST",value:function(t){if(this.jsFunctionAST)return this.jsFunctionAST;if(t=t||acorn,null===t)throw"Missing JS to AST parser";var e=t.parse("var "+this.functionName+" = "+this.jsFunctionString+";");if(null===e)throw"Failed to parse JS code";var n=e.body[0].declarations[0].init;return this.jsFunctionAST=n,n}},{key:"getFunctionString",value:function(){return this.generate(),this.functionString}},{key:"setFunctionString",value:function(t){this.functionString=t}},{key:"getParamType",value:function(t){var e=this.paramNames.indexOf(t);if(e===-1)return null;if(!this.parent)return null;if(this.paramTypes[e])return this.paramTypes[e];for(var n=this.parent.calledFunctionsArguments[this.functionName],i=0;i0&&e.push(", ");var s=n.getParamType(r);switch(s){case"Texture":case"Array":e.push("sampler2D");break;default:e.push("float")}e.push(" "),e.push("user_"),e.push(r)}e.push(") {\n");for(var a=0;a0&&e.push(","),this.astGeneric(t.declarations[i],e,n);return e.push(";"),e}},{key:"astVariableDeclarator",value:function(t,e,n){return this.astGeneric(t.id,e,n),null!==t.init&&(e.push("="),this.astGeneric(t.init,e,n)),e}},{key:"astIfStatement",value:function(t,e,n){return e.push("if ("),this.astGeneric(t.test,e,n),e.push(")"),"BlockStatement"===t.consequent.type?this.astGeneric(t.consequent,e,n):(e.push(" {\n"),this.astGeneric(t.consequent,e,n),e.push("\n}\n")),t.alternate&&(e.push("else "),"BlockStatement"===t.alternate.type?this.astGeneric(t.alternate,e,n):(e.push(" {\n"),this.astGeneric(t.alternate,e,n),e.push("\n}\n"))),e}},{key:"astBreakStatement",value:function(t,e,n){return e.push("break;\n"),e}},{key:"astContinueStatement",value:function(t,e,n){return e.push("continue;\n"),e}},{key:"astLogicalExpression",value:function(t,e,n){return e.push("("),this.astGeneric(t.left,e,n),e.push(t.operator),this.astGeneric(t.right,e,n),e.push(")"),e}},{key:"astUpdateExpression",value:function(t,e,n){return t.prefix?(e.push(t.operator),this.astGeneric(t.argument,e,n)):(this.astGeneric(t.argument,e,n),e.push(t.operator)),e}},{key:"astUnaryExpression",value:function(t,e,n){return t.prefix?(e.push(t.operator),this.astGeneric(t.argument,e,n)):(this.astGeneric(t.argument,e,n),e.push(t.operator)),e}},{key:"astThisExpression",value:function(t,e,n){return e.push("this"),e}},{key:"astMemberExpression",value:function(t,e,n){if(t.computed)if("Identifier"===t.object.type){var i=t.object.name,r=(n.functionName||"kernel",!1);if(n.paramNames){var s=n.paramNames.indexOf(i);s>=0&&"float"===n.paramTypes[s]&&(r=!0)}r?(this.astGeneric(t.object,e,n),e.push("[int("),this.astGeneric(t.property,e,n),e.push(")]")):(e.push("get("),this.astGeneric(t.object,e,n),e.push(", vec2("),this.astGeneric(t.object,e,n),e.push("Size[0],"),this.astGeneric(t.object,e,n),e.push("Size[1]), vec3("),this.astGeneric(t.object,e,n),e.push("Dim[0],"),this.astGeneric(t.object,e,n),e.push("Dim[1],"),this.astGeneric(t.object,e,n),e.push("Dim[2]"),e.push("), "),this.astGeneric(t.property,e,n),e.push(")"))}else{this.astGeneric(t.object,e,n);var a=e.pop();e.push(","),this.astGeneric(t.property,e,n),e.push(a)}else{var o=this.astMemberExpressionUnroll(t),u=o.toLowerCase();0===o.indexOf(f)&&(o="constants_"+o.slice(f.length)),"this.thread.x"===u?e.push("threadId.x"):"this.thread.y"===u?e.push("threadId.y"):"this.thread.z"===u?e.push("threadId.z"):"this.dimensions.x"===u?e.push("uOutputDim.x"):"this.dimensions.y"===u?e.push("uOutputDim.y"):"this.dimensions.z"===u?e.push("uOutputDim.z"):e.push(o)}return e}},{key:"astSequenceExpression",value:function(t,e,n){for(var i=0;i0&&e.push(","),this.astGeneric(t.expressions,e,n);return e}},{key:"astMemberExpressionUnroll",value:function(t,e){if("Identifier"===t.type)return t.name;if("ThisExpression"===t.type)return"this";if("MemberExpression"===t.type&&t.object&&t.property)return this.astMemberExpressionUnroll(t.object,e)+"."+this.astMemberExpressionUnroll(t.property,e);throw o("Unknown CallExpression_unroll",t,e)}},{key:"astCallExpression",value:function(t,e,n){if(t.callee){var i=this.astMemberExpressionUnroll(t.callee);0===i.indexOf(c)&&(i=i.slice(c.length)),0===i.indexOf(p)&&(i=i.slice(p.length)),n.calledFunctions.indexOf(i)<0&&n.calledFunctions.push(i),n.hasOwnProperty("funcName")||(n.calledFunctionsArguments[i]=[]);var r=[];n.calledFunctionsArguments[i].push(r),e.push(i),e.push("(");for(var s=0;s0&&e.push(", "),this.astGeneric(a,e,n),"Identifier"===a.type){var u=n.paramNames.indexOf(a.name);u===-1?r.push(null):r.push({name:a.name,type:n.paramTypes[u]})}else r.push(null)}return e.push(")"),e}throw o("Unknown CallExpression",t,n)}},{key:"astArrayExpression",value:function(t,e,n){var i=t.elements.length;e.push("float["+i+"](");for(var r=0;r0&&e.push(", ");var s=t.elements[r];this.astGeneric(s,e,n)}return e.push(")"),e}},{key:"getFunctionPrototypeString",value:function(){return this.webGlFunctionPrototypeString?this.webGlFunctionPrototypeString:this.webGlFunctionPrototypeString=this.generate()}},{key:"build",value:function(){return this.getFunctionPrototypeString().length>0}}],[{key:"astFunctionPrototype",value:function(t,e,n){if(n.isRootKernel||n.isSubKernel)return e;e.push(n.returnType),e.push(" "),e.push(n.functionName),e.push("(");for(var i=0;i0&&e.push(", "),e.push(n.paramTypes[i]),e.push(" "),e.push("user_"),e.push(n.paramNames[i]);return e.push(");\n"),e}}]),e}(h)},{"../../core/utils":24,"../function-node-base":7}],13:[function(t,e,n){var i=t("../../core/utils"),r=t("../kernel-run-shortcut");e.exports=function(t,e){return"() => {\n "+r.toString()+";\n const utils = {\n allPropertiesOf: function "+i.allPropertiesOf.toString()+",\n clone: function "+i.clone.toString()+",\n splitArray: function "+i.splitArray.toString()+",\n getArgumentType: function "+i.getArgumentType.toString()+",\n getDimensions: function "+i.getDimensions.toString()+",\n dimToTexSize: function "+i.dimToTexSize.toString()+",\n copyFlatten: function "+i.copyFlatten.toString()+",\n flatten: function "+i.flatten.toString()+",\n systemEndianness: '"+i.systemEndianness()+"',\n initWebGl: function "+i.initWebGl.toString()+",\n isArray: function "+i.isArray.toString()+"\n };\n class "+(e||"Kernel")+" {\n constructor() {\n this.argumentsLength = 0;\n this._canvas = null;\n this._webGl = null;\n this.built = false;\n this.program = null;\n this.paramNames = "+JSON.stringify(t.paramNames)+";\n this.paramTypes = "+JSON.stringify(t.paramTypes)+";\n this.texSize = "+JSON.stringify(t.texSize)+";\n this.dimensions = "+JSON.stringify(t.dimensions)+";\n this.compiledFragShaderString = `"+t.compiledFragShaderString+"`;\n\t\t this.compiledVertShaderString = `"+t.compiledVertShaderString+"`;\n\t\t this.programUniformLocationCache = {};\n\t\t this.textureCache = {};\n\t\t this.subKernelOutputTextures = null;\n }\n "+t._getFragShaderString.toString()+"\n "+t._getVertShaderString.toString()+"\n validateOptions() {}\n setupParams() {}\n setCanvas(canvas) { this._canvas = canvas; return this; }\n setWebGl(webGl) { this._webGl = webGl; return this; }\n "+t.getUniformLocation.toString()+"\n "+t.setupParams.toString()+"\n "+t.build.toString()+"\n\t\t "+t.run.toString()+"\n\t\t "+t._addArgument.toString()+"\n\t\t "+t.getArgumentTexture.toString()+"\n\t\t "+t.getTextureCache.toString()+"\n\t\t "+t.getOutputTexture.toString()+"\n\t\t "+t.renderOutput.toString()+"\n };\n return kernelRunShortcut(new Kernel());\n };"}},{"../../core/utils":24,"../kernel-run-shortcut":9}],14:[function(t,e,n){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(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}function s(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)}var a=function(){function t(t,e){for(var n=0;n0?t.join(";\n")+";\n":"\n"}},{key:"_replaceArtifacts",value:function(t,e){return t.replace(/[ ]*__([A-Z]+[0-9]*([_]?[A-Z])*)__;\n/g,function(t,n){if(e.hasOwnProperty(n))return e[n];throw"unhandled artifact "+n})}},{key:"_addKernels",value:function(){var t=this.functionBuilder,e=this._webGl;if(t.addKernel(this.fnString,{prototypeOnly:!1,constants:this.constants,debug:this.debug,loopMaxIterations:this.loopMaxIterations},this.paramNames,this.paramTypes),null!==this.subKernels){var n=this.ext=e.getExtension("WEBGL_draw_buffers");if(!n)throw new Error("could not instantiate draw buffers extension");this.subKernelOutputTextures=[],this.subKernelOutputVariableNames=[];for(var i=0;it)return!1;if(n+=e[i+1],n>=t)return!0}}function n(t,n){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&w.test(String.fromCharCode(t)):n!==!1&&e(t,A)))}function i(t,n){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&T.test(String.fromCharCode(t)):n!==!1&&(e(t,A)||e(t,O)))))}function r(t,e){return new C(t,{beforeExpr:!0,binop:e})}function s(t,e){return void 0===e&&(e={}),e.keyword=t,F[t]=new C(t,e)}function a(t){return 10===t||13===t||8232===t||8233===t}function o(t,e){return M.call(t,e)}function u(t,e){for(var n=1,i=0;;){D.lastIndex=i;var r=D.exec(t);if(!(r&&r.index=2015&&(e.ecmaVersion-=2009),null==e.allowReserved&&(e.allowReserved=e.ecmaVersion<5),U(e.onToken)){var i=e.onToken;e.onToken=function(t){return i.push(t)}}return U(e.onComment)&&(e.onComment=l(e,e.onComment)),e}function l(t,e){return function(n,i,r,s,a,o){var u={type:n?"Block":"Line",value:i,start:r,end:s};t.locations&&(u.loc=new K(this,a,o)),t.ranges&&(u.range=[r,s]),e.push(u)}}function c(t){return new RegExp("^(?:"+t.replace(/ /g,"|")+")$")}function p(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1}function f(t,e,n,i){return t.type=e,t.end=n,this.options.locations&&(t.loc.end=i),this.options.ranges&&(t.range[1]=n),t}function d(t,e,n,i){try{return new RegExp(t,e)}catch(r){if(void 0!==n)throw r instanceof SyntaxError&&i.raise(n,"Error parsing regular expression: "+r.message),r}}function m(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(1023&t)+56320))}function g(t,e){return new X(e,t).parse()}function y(t,e,n){var i=new X(n,t,e);return i.nextToken(),i.parseExpression()}function b(t,e){return new X(e,t)}function v(e,n,i){t.parse_dammit=e,t.LooseParser=n,t.pluginsLoose=i}var x={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"},k="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",_={5:k,6:k+" const class extends export import super"},S="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",E="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",w=new RegExp("["+S+"]"),T=new RegExp("["+S+E+"]");S=E=null;var A=[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],C=function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null},N={beforeExpr:!0},P={startsExpr:!0},F={},R={num:new C("num",P),regexp:new C("regexp",P),string:new C("string",P),name:new C("name",P),eof:new C("eof"),bracketL:new C("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new C("]"),braceL:new C("{",{beforeExpr:!0,startsExpr:!0}),braceR:new C("}"),parenL:new C("(",{beforeExpr:!0,startsExpr:!0}),parenR:new C(")"),comma:new C(",",N),semi:new C(";",N),colon:new C(":",N),dot:new C("."),question:new C("?",N),arrow:new C("=>",N),template:new C("template"),invalidTemplate:new C("invalidTemplate"),ellipsis:new C("...",N),backQuote:new C("`",P),dollarBraceL:new C("${",{beforeExpr:!0,startsExpr:!0}),eq:new C("=",{beforeExpr:!0,isAssign:!0}),assign:new C("_=",{beforeExpr:!0,isAssign:!0}),incDec:new C("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new C("prefix",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:r("||",1),logicalAND:r("&&",2),bitwiseOR:r("|",3),bitwiseXOR:r("^",4),bitwiseAND:r("&",5),equality:r("==/!=",6),relational:r("",7),bitShift:r("<>",8),plusMin:new C("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:r("%",10),star:r("*",10),slash:r("/",10),starstar:new C("**",{beforeExpr:!0}),_break:s("break"),_case:s("case",N),_catch:s("catch"),_continue:s("continue"),_debugger:s("debugger"),_default:s("default",N),_do:s("do",{isLoop:!0,beforeExpr:!0}),_else:s("else",N),_finally:s("finally"),_for:s("for",{isLoop:!0}),_function:s("function",P),_if:s("if"),_return:s("return",N),_switch:s("switch"),_throw:s("throw",N),_try:s("try"),_var:s("var"),_const:s("const"),_while:s("while",{isLoop:!0}),_with:s("with"),_new:s("new",{beforeExpr:!0,startsExpr:!0}),_this:s("this",P),_super:s("super",P),_class:s("class",P),_extends:s("extends",N),_export:s("export"),_import:s("import"),_null:s("null",P),_true:s("true",P),_false:s("false",P),_in:s("in",{beforeExpr:!0,binop:7}),_instanceof:s("instanceof",{beforeExpr:!0,binop:7}),_typeof:s("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:s("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:s("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},L=/\r\n?|\n|\u2028|\u2029/,D=new RegExp(L.source,"g"),I=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,G=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,j=Object.prototype,M=j.hasOwnProperty,V=j.toString,U=Array.isArray||function(t){return"[object Array]"===V.call(t)},B=function(t,e){this.line=t,this.column=e};B.prototype.offset=function(t){return new B(this.line,this.column+t)};var K=function(t,e,n){this.start=e,this.end=n,null!==t.sourceFile&&(this.source=t.sourceFile)},z={ecmaVersion:7,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1,plugins:{}},W={},X=function(t,e,n){this.options=t=h(t),this.sourceFile=t.sourceFile,this.keywords=c(_[t.ecmaVersion>=6?6:5]);var i="";if(!t.allowReserved){for(var r=t.ecmaVersion;!(i=x[r]);r--);"module"==t.sourceType&&(i+=" await")}this.reservedWords=c(i);var s=(i?i+" ":"")+x.strict;this.reservedWordsStrict=c(s),this.reservedWordsStrictBind=c(s+" "+x.strictBind),this.input=String(e),this.containsEsc=!1,this.loadPlugins(t.plugins),n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(L).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=R.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"===t.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.inFunction=this.inGenerator=this.inAsync=!1,this.yieldPos=this.awaitPos=0,this.labels=[],0===this.pos&&t.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterFunctionScope()};X.prototype.isKeyword=function(t){return this.keywords.test(t)},X.prototype.isReservedWord=function(t){return this.reservedWords.test(t)},X.prototype.extend=function(t,e){this[t]=e(this[t])},X.prototype.loadPlugins=function(t){var e=this;for(var n in t){var i=W[n];if(!i)throw new Error("Plugin '"+n+"' not found");i(e,t[n])}},X.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};var q=X.prototype,Y=/^(?:'((?:[^']|\.)*)'|"((?:[^"]|\.)*)"|;)/;q.strictDirective=function(t){for(var e=this;;){G.lastIndex=t,t+=G.exec(e.input)[0].length;var n=Y.exec(e.input.slice(t));if(!n)return!1;if("use strict"==(n[1]||n[2]))return!0;t+=n[0].length}},q.eat=function(t){return this.type===t&&(this.next(),!0)},q.isContextual=function(t){return this.type===R.name&&this.value===t},q.eatContextual=function(t){return this.value===t&&this.eat(R.name)},q.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},q.canInsertSemicolon=function(){return this.type===R.eof||this.type===R.braceR||L.test(this.input.slice(this.lastTokEnd,this.start))},q.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},q.semicolon=function(){this.eat(R.semi)||this.insertSemicolon()||this.unexpected()},q.afterTrailingComma=function(t,e){if(this.type==t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0},q.expect=function(t){this.eat(t)||this.unexpected()},q.unexpected=function(t){this.raise(null!=t?t:this.start,"Unexpected token")},q.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var n=e?t.parenthesizedAssign:t.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},q.checkExpressionErrors=function(t,e){var n=t?t.shorthandAssign:-1;return e?void(n>-1&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")):n>=0},q.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&(t.sourceType=this.options.sourceType),this.finishNode(t,"Program")};var J={kind:"loop"},$={kind:"switch"};H.isLet=function(){if(this.type!==R.name||this.options.ecmaVersion<6||"let"!=this.value)return!1;G.lastIndex=this.pos;var t=G.exec(this.input),e=this.pos+t[0].length,r=this.input.charCodeAt(e);if(91===r||123==r)return!0;if(n(r,!0)){for(var s=e+1;i(this.input.charCodeAt(s),!0);)++s;var a=this.input.slice(e,s);if(!this.isKeyword(a))return!0}return!1},H.isAsyncFunction=function(){if(this.type!==R.name||this.options.ecmaVersion<8||"async"!=this.value)return!1;G.lastIndex=this.pos;var t=G.exec(this.input),e=this.pos+t[0].length;return!(L.test(this.input.slice(this.pos,e))||"function"!==this.input.slice(e,e+8)||e+8!=this.input.length&&i(this.input.charAt(e+8)))},H.parseStatement=function(t,e,n){var i,r=this.type,s=this.startNode();switch(this.isLet()&&(r=R._var,i="let"),r){case R._break:case R._continue:return this.parseBreakContinueStatement(s,r.keyword);case R._debugger:return this.parseDebuggerStatement(s);case R._do:return this.parseDoStatement(s);case R._for:return this.parseForStatement(s);case R._function:return!t&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1);case R._class:return t||this.unexpected(),this.parseClass(s,!0);case R._if:return this.parseIfStatement(s);case R._return:return this.parseReturnStatement(s);case R._switch:return this.parseSwitchStatement(s);case R._throw:return this.parseThrowStatement(s);case R._try:return this.parseTryStatement(s);case R._const:case R._var:return i=i||this.value,t||"var"==i||this.unexpected(),this.parseVarStatement(s,i);case R._while:return this.parseWhileStatement(s);case R._with:return this.parseWithStatement(s);case R.braceL:return this.parseBlock();case R.semi:return this.parseEmptyStatement(s);case R._export:case R._import:return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===R._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction()&&t)return this.next(),this.parseFunctionStatement(s,!0);var a=this.value,o=this.parseExpression();return r===R.name&&"Identifier"===o.type&&this.eat(R.colon)?this.parseLabeledStatement(s,a,o):this.parseExpressionStatement(s,o)}},H.parseBreakContinueStatement=function(t,e){var n=this,i="break"==e;this.next(),this.eat(R.semi)||this.insertSemicolon()?t.label=null:this.type!==R.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var r=0;r=6?this.eat(R.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},H.parseForStatement=function(t){if(this.next(),this.labels.push(J),this.enterLexicalScope(),this.expect(R.parenL),this.type===R.semi)return this.parseFor(t,null);var e=this.isLet();if(this.type===R._var||this.type===R._const||e){var n=this.startNode(),i=e?"let":this.value;return this.next(),this.parseVar(n,!0,i),this.finishNode(n,"VariableDeclaration"),!(this.type===R._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==n.declarations.length||"var"!==i&&n.declarations[0].init?this.parseFor(t,n):this.parseForIn(t,n)}var r=new p,s=this.parseExpression(!0,r);return this.type===R._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.toAssignable(s),this.checkLVal(s),this.checkPatternErrors(r,!0),this.parseForIn(t,s)):(this.checkExpressionErrors(r,!0),this.parseFor(t,s))},H.parseFunctionStatement=function(t,e){ return this.next(),this.parseFunction(t,!0,!1,e)},H.isFunction=function(){return this.type===R._function||this.isAsyncFunction()},H.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement(!this.strict&&this.isFunction()),t.alternate=this.eat(R._else)?this.parseStatement(!this.strict&&this.isFunction()):null,this.finishNode(t,"IfStatement")},H.parseReturnStatement=function(t){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(R.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},H.parseSwitchStatement=function(t){var e=this;this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(R.braceL),this.labels.push($),this.enterLexicalScope();for(var n,i=!1;this.type!=R.braceR;)if(e.type===R._case||e.type===R._default){var r=e.type===R._case;n&&e.finishNode(n,"SwitchCase"),t.cases.push(n=e.startNode()),n.consequent=[],e.next(),r?n.test=e.parseExpression():(i&&e.raiseRecoverable(e.lastTokStart,"Multiple default clauses"),i=!0,n.test=null),e.expect(R.colon)}else n||e.unexpected(),n.consequent.push(e.parseStatement(!0));return this.exitLexicalScope(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},H.parseThrowStatement=function(t){return this.next(),L.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var Q=[];H.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===R._catch){var e=this.startNode();this.next(),this.expect(R.parenL),e.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(e.param,"let"),this.expect(R.parenR),e.body=this.parseBlock(!1),this.exitLexicalScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(R._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},H.parseVarStatement=function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")},H.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(J),t.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(t,"WhileStatement")},H.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement(!1),this.finishNode(t,"WithStatement")},H.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},H.parseLabeledStatement=function(t,e,n){for(var i=this,r=0,s=i.labels;r=0;u--){var h=i.labels[u];if(h.statementStart!=t.start)break;h.statementStart=i.start,h.kind=o}return this.labels.push({name:e,kind:o,statementStart:this.start}),t.body=this.parseStatement(!0),("ClassDeclaration"==t.body.type||"VariableDeclaration"==t.body.type&&"var"!=t.body.kind||"FunctionDeclaration"==t.body.type&&(this.strict||t.body.generator))&&this.raiseRecoverable(t.body.start,"Invalid labeled declaration"),this.labels.pop(),t.label=n,this.finishNode(t,"LabeledStatement")},H.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},H.parseBlock=function(t){var e=this;void 0===t&&(t=!0);var n=this.startNode();for(n.body=[],this.expect(R.braceL),t&&this.enterLexicalScope();!this.eat(R.braceR);){var i=e.parseStatement(!0);n.body.push(i)}return t&&this.exitLexicalScope(),this.finishNode(n,"BlockStatement")},H.parseFor=function(t,e){return t.init=e,this.expect(R.semi),t.test=this.type===R.semi?null:this.parseExpression(),this.expect(R.semi),t.update=this.type===R.parenR?null:this.parseExpression(),this.expect(R.parenR),this.exitLexicalScope(),t.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(t,"ForStatement")},H.parseForIn=function(t,e){var n=this.type===R._in?"ForInStatement":"ForOfStatement";return this.next(),t.left=e,t.right=this.parseExpression(),this.expect(R.parenR),this.exitLexicalScope(),t.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(t,n)},H.parseVar=function(t,e,n){var i=this;for(t.declarations=[],t.kind=n;;){var r=i.startNode();if(i.parseVarId(r,n),i.eat(R.eq)?r.init=i.parseMaybeAssign(e):"const"!==n||i.type===R._in||i.options.ecmaVersion>=6&&i.isContextual("of")?"Identifier"==r.id.type||e&&(i.type===R._in||i.isContextual("of"))?r.init=null:i.raise(i.lastTokEnd,"Complex binding patterns require an initialization value"):i.unexpected(),t.declarations.push(i.finishNode(r,"VariableDeclarator")),!i.eat(R.comma))break}return t},H.parseVarId=function(t,e){t.id=this.parseBindingAtom(e),this.checkLVal(t.id,e,!1)},H.parseFunction=function(t,e,n,i){this.initFunction(t),this.options.ecmaVersion>=6&&!i&&(t.generator=this.eat(R.star)),this.options.ecmaVersion>=8&&(t.async=!!i),e&&(t.id="nullableID"===e&&this.type!=R.name?null:this.parseIdent(),t.id&&this.checkLVal(t.id,"var"));var r=this.inGenerator,s=this.inAsync,a=this.yieldPos,o=this.awaitPos,u=this.inFunction;return this.inGenerator=t.generator,this.inAsync=t.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),e||(t.id=this.type==R.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,n),this.inGenerator=r,this.inAsync=s,this.yieldPos=a,this.awaitPos=o,this.inFunction=u,this.finishNode(t,e?"FunctionDeclaration":"FunctionExpression")},H.parseFunctionParams=function(t){this.expect(R.parenL),t.params=this.parseBindingList(R.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},H.parseClass=function(t,e){var n=this;this.next(),this.parseClassId(t,e),this.parseClassSuper(t);var i=this.startNode(),r=!1;for(i.body=[],this.expect(R.braceL);!this.eat(R.braceR);)if(!n.eat(R.semi)){var s=n.startNode(),a=n.eat(R.star),o=!1,u=n.type===R.name&&"static"===n.value;n.parsePropertyName(s),s["static"]=u&&n.type!==R.parenL,s["static"]&&(a&&n.unexpected(),a=n.eat(R.star),n.parsePropertyName(s)),n.options.ecmaVersion>=8&&!a&&!s.computed&&"Identifier"===s.key.type&&"async"===s.key.name&&n.type!==R.parenL&&!n.canInsertSemicolon()&&(o=!0,n.parsePropertyName(s)),s.kind="method";var h=!1;if(!s.computed){var l=s.key;a||o||"Identifier"!==l.type||n.type===R.parenL||"get"!==l.name&&"set"!==l.name||(h=!0,s.kind=l.name,l=n.parsePropertyName(s)),!s["static"]&&("Identifier"===l.type&&"constructor"===l.name||"Literal"===l.type&&"constructor"===l.value)&&(r&&n.raise(l.start,"Duplicate constructor in the same class"),h&&n.raise(l.start,"Constructor can't have get/set modifier"),a&&n.raise(l.start,"Constructor can't be a generator"),o&&n.raise(l.start,"Constructor can't be an async method"),s.kind="constructor",r=!0)}if(n.parseClassMethod(i,s,a,o),h){var c="get"===s.kind?0:1;if(s.value.params.length!==c){var p=s.value.start;"get"===s.kind?n.raiseRecoverable(p,"getter should have no params"):n.raiseRecoverable(p,"setter should have exactly one param")}else"set"===s.kind&&"RestElement"===s.value.params[0].type&&n.raiseRecoverable(s.value.params[0].start,"Setter cannot use rest params")}}return t.body=this.finishNode(i,"ClassBody"),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},H.parseClassMethod=function(t,e,n,i){e.value=this.parseMethod(n,i),t.body.push(this.finishNode(e,"MethodDefinition"))},H.parseClassId=function(t,e){t.id=this.type===R.name?this.parseIdent():e===!0?this.unexpected():null},H.parseClassSuper=function(t){t.superClass=this.eat(R._extends)?this.parseExprSubscripts():null},H.parseExport=function(t,e){var n=this;if(this.next(),this.eat(R.star))return this.expectContextual("from"),t.source=this.type===R.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(t,"ExportAllDeclaration");if(this.eat(R._default)){this.checkExport(e,"default",this.lastTokStart);var i;if(this.type===R._function||(i=this.isAsyncFunction())){var r=this.startNode();this.next(),i&&this.next(),t.declaration=this.parseFunction(r,"nullableID",!1,i)}else if(this.type===R._class){var s=this.startNode();t.declaration=this.parseClass(s,"nullableID")}else t.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(t,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())t.declaration=this.parseStatement(!0),"VariableDeclaration"===t.declaration.type?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id.name,t.declaration.id.start),t.specifiers=[],t.source=null;else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))t.source=this.type===R.string?this.parseExprAtom():this.unexpected();else{for(var a=0,o=t.specifiers;a=6&&t)switch(t.type){case"Identifier":this.inAsync&&"await"===t.name&&this.raise(t.start,"Can not use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":break;case"ObjectExpression":t.type="ObjectPattern";for(var i=0,r=t.properties;i=6&&(t.computed||t.method||t.shorthand))){var n,i=t.key;switch(i.type){case"Identifier":n=i.name;break;case"Literal":n=String(i.value);break;default:return}var r=t.kind;if(this.options.ecmaVersion>=6)return void("__proto__"===n&&"init"===r&&(e.proto&&this.raiseRecoverable(i.start,"Redefinition of __proto__ property"),e.proto=!0));n="$"+n;var s=e[n];if(s){var a;a="init"===r?this.strict&&s.init||s.get||s.set:s.init||s[r],a&&this.raiseRecoverable(i.start,"Redefinition of property")}else s=e[n]={init:!1,get:!1,set:!1};s[r]=!0}},tt.parseExpression=function(t,e){var n=this,i=this.start,r=this.startLoc,s=this.parseMaybeAssign(t,e);if(this.type===R.comma){var a=this.startNodeAt(i,r);for(a.expressions=[s];this.eat(R.comma);)a.expressions.push(n.parseMaybeAssign(t,e));return this.finishNode(a,"SequenceExpression")}return s},tt.parseMaybeAssign=function(t,e,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var i=!1,r=-1,s=-1;e?(r=e.parenthesizedAssign,s=e.trailingComma,e.parenthesizedAssign=e.trailingComma=-1):(e=new p,i=!0);var a=this.start,o=this.startLoc;this.type!=R.parenL&&this.type!=R.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(t,e);if(n&&(u=n.call(this,u,a,o)),this.type.isAssign){this.checkPatternErrors(e,!0),i||p.call(e);var h=this.startNodeAt(a,o);return h.operator=this.value,h.left=this.type===R.eq?this.toAssignable(u):u,e.shorthandAssign=-1,this.checkLVal(u),this.next(),h.right=this.parseMaybeAssign(t),this.finishNode(h,"AssignmentExpression")}return i&&this.checkExpressionErrors(e,!0),r>-1&&(e.parenthesizedAssign=r),s>-1&&(e.trailingComma=s),u},tt.parseMaybeConditional=function(t,e){var n=this.start,i=this.startLoc,r=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return r;if(this.eat(R.question)){var s=this.startNodeAt(n,i);return s.test=r,s.consequent=this.parseMaybeAssign(),this.expect(R.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return r},tt.parseExprOps=function(t,e){var n=this.start,i=this.startLoc,r=this.parseMaybeUnary(e,!1);return this.checkExpressionErrors(e)?r:r.start==n&&"ArrowFunctionExpression"===r.type?r:this.parseExprOp(r,n,i,-1,t)},tt.parseExprOp=function(t,e,n,i,r){var s=this.type.binop;if(null!=s&&(!r||this.type!==R._in)&&s>i){var a=this.type===R.logicalOR||this.type===R.logicalAND,o=this.value;this.next();var u=this.start,h=this.startLoc,l=this.parseExprOp(this.parseMaybeUnary(null,!1),u,h,s,r),c=this.buildBinary(e,n,t,l,o,a);return this.parseExprOp(c,e,n,i,r)}return t},tt.buildBinary=function(t,e,n,i,r,s){var a=this.startNodeAt(t,e);return a.left=n,a.operator=r,a.right=i,this.finishNode(a,s?"LogicalExpression":"BinaryExpression")},tt.parseMaybeUnary=function(t,e){var n,i=this,r=this.start,s=this.startLoc;if(this.inAsync&&this.isContextual("await"))n=this.parseAwait(t),e=!0;else if(this.type.prefix){var a=this.startNode(),o=this.type===R.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),o?this.checkLVal(a.argument):this.strict&&"delete"===a.operator&&"Identifier"===a.argument.type?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):e=!0,n=this.finishNode(a,o?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(t),this.checkExpressionErrors(t))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var u=i.startNodeAt(r,s);u.operator=i.value,u.prefix=!1,u.argument=n,i.checkLVal(n),i.next(),n=i.finishNode(u,"UpdateExpression")}}return!e&&this.eat(R.starstar)?this.buildBinary(r,s,n,this.parseMaybeUnary(null,!1),"**",!1):n},tt.parseExprSubscripts=function(t){var e=this.start,n=this.startLoc,i=this.parseExprAtom(t),r="ArrowFunctionExpression"===i.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(t)||r)return i;var s=this.parseSubscripts(i,e,n);return t&&"MemberExpression"===s.type&&(t.parenthesizedAssign>=s.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=s.start&&(t.parenthesizedBind=-1)),s},tt.parseSubscripts=function(t,e,n,i){for(var r=this,s=this.options.ecmaVersion>=8&&"Identifier"===t.type&&"async"===t.name&&this.lastTokEnd==t.end&&!this.canInsertSemicolon(),a=void 0;;)if((a=r.eat(R.bracketL))||r.eat(R.dot)){var o=r.startNodeAt(e,n);o.object=t,o.property=a?r.parseExpression():r.parseIdent(!0),o.computed=!!a,a&&r.expect(R.bracketR),t=r.finishNode(o,"MemberExpression")}else if(!i&&r.eat(R.parenL)){var u=new p,h=r.yieldPos,l=r.awaitPos;r.yieldPos=0,r.awaitPos=0;var c=r.parseExprList(R.parenR,r.options.ecmaVersion>=8,!1,u);if(s&&!r.canInsertSemicolon()&&r.eat(R.arrow))return r.checkPatternErrors(u,!1),r.checkYieldAwaitInDefaultParams(),r.yieldPos=h,r.awaitPos=l,r.parseArrowExpression(r.startNodeAt(e,n),c,!0);r.checkExpressionErrors(u,!0),r.yieldPos=h||r.yieldPos,r.awaitPos=l||r.awaitPos;var f=r.startNodeAt(e,n);f.callee=t,f.arguments=c,t=r.finishNode(f,"CallExpression")}else{if(r.type!==R.backQuote)return t;var d=r.startNodeAt(e,n);d.tag=t,d.quasi=r.parseTemplate({isTagged:!0}),t=r.finishNode(d,"TaggedTemplateExpression")}},tt.parseExprAtom=function(t){var e,n=this.potentialArrowAt==this.start;switch(this.type){case R._super:this.inFunction||this.raise(this.start,"'super' outside of function or class");case R._this:var i=this.type===R._this?"ThisExpression":"Super";return e=this.startNode(),this.next(),this.finishNode(e,i);case R.name:var r=this.start,s=this.startLoc,a=this.parseIdent(this.type!==R.name);if(this.options.ecmaVersion>=8&&"async"===a.name&&!this.canInsertSemicolon()&&this.eat(R._function))return this.parseFunction(this.startNodeAt(r,s),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(R.arrow))return this.parseArrowExpression(this.startNodeAt(r,s),[a],!1);if(this.options.ecmaVersion>=8&&"async"===a.name&&this.type===R.name)return a=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(R.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,s),[a],!0)}return a;case R.regexp:var o=this.value;return e=this.parseLiteral(o.value),e.regex={pattern:o.pattern,flags:o.flags},e;case R.num:case R.string:return this.parseLiteral(this.value);case R._null:case R._true:case R._false:return e=this.startNode(),e.value=this.type===R._null?null:this.type===R._true,e.raw=this.type.keyword,this.next(),this.finishNode(e,"Literal");case R.parenL:var u=this.start,h=this.parseParenAndDistinguishExpression(n);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(h)&&(t.parenthesizedAssign=u),t.parenthesizedBind<0&&(t.parenthesizedBind=u)),h;case R.bracketL:return e=this.startNode(),this.next(),e.elements=this.parseExprList(R.bracketR,!0,!0,t),this.finishNode(e,"ArrayExpression");case R.braceL:return this.parseObj(!1,t);case R._function:return e=this.startNode(),this.next(),this.parseFunction(e,!1);case R._class:return this.parseClass(this.startNode(),!1);case R._new:return this.parseNew();case R.backQuote:return this.parseTemplate();default:this.unexpected()}},tt.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(e,"Literal")},tt.parseParenExpression=function(){this.expect(R.parenL);var t=this.parseExpression();return this.expect(R.parenR),t},tt.parseParenAndDistinguishExpression=function(t){var e,n=this,i=this.start,r=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a,o,u=this.start,h=this.startLoc,l=[],c=!0,f=!1,d=new p,m=this.yieldPos,g=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==R.parenR;){if(c?c=!1:n.expect(R.comma),s&&n.afterTrailingComma(R.parenR,!0)){f=!0;break}if(n.type===R.ellipsis){a=n.start,l.push(n.parseParenItem(n.parseRestBinding())),n.type===R.comma&&n.raise(n.start,"Comma is not permitted after the rest element");break}n.type!==R.parenL||o||(o=n.start),l.push(n.parseMaybeAssign(!1,d,n.parseParenItem))}var y=this.start,b=this.startLoc;if(this.expect(R.parenR),t&&!this.canInsertSemicolon()&&this.eat(R.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),o&&this.unexpected(o),this.yieldPos=m,this.awaitPos=g,this.parseParenArrowList(i,r,l);l.length&&!f||this.unexpected(this.lastTokStart),a&&this.unexpected(a),this.checkExpressionErrors(d,!0),this.yieldPos=m||this.yieldPos,this.awaitPos=g||this.awaitPos,l.length>1?(e=this.startNodeAt(u,h),e.expressions=l,this.finishNodeAt(e,"SequenceExpression",y,b)):e=l[0]}else e=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(i,r);return v.expression=e,this.finishNode(v,"ParenthesizedExpression")}return e},tt.parseParenItem=function(t){return t},tt.parseParenArrowList=function(t,e,n){return this.parseArrowExpression(this.startNodeAt(t,e),n)};var et=[];tt.parseNew=function(){var t=this.startNode(),e=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(R.dot))return t.meta=e,t.property=this.parseIdent(!0),"target"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is new.target"),this.inFunction||this.raiseRecoverable(t.start,"new.target can only be used in functions"),this.finishNode(t,"MetaProperty");var n=this.start,i=this.startLoc;return t.callee=this.parseSubscripts(this.parseExprAtom(),n,i,!0),this.eat(R.parenL)?t.arguments=this.parseExprList(R.parenR,this.options.ecmaVersion>=8,!1):t.arguments=et,this.finishNode(t,"NewExpression")},tt.parseTemplateElement=function(t){var e=t.isTagged,n=this.startNode();return this.type===R.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===R.backQuote,this.finishNode(n,"TemplateElement")},tt.parseTemplate=function(t){var e=this;void 0===t&&(t={});var n=t.isTagged;void 0===n&&(n=!1);var i=this.startNode();this.next(),i.expressions=[];var r=this.parseTemplateElement({isTagged:n});for(i.quasis=[r];!r.tail;)e.expect(R.dollarBraceL),i.expressions.push(e.parseExpression()),e.expect(R.braceR),i.quasis.push(r=e.parseTemplateElement({isTagged:n}));return this.next(),this.finishNode(i,"TemplateLiteral")},tt.isAsyncProp=function(t){return!(t.computed||"Identifier"!==t.key.type||"async"!==t.key.name||this.type!==R.name&&this.type!==R.num&&this.type!==R.string&&this.type!==R.bracketL||L.test(this.input.slice(this.lastTokEnd,this.start)))},tt.parseObj=function(t,e){var n=this,i=this.startNode(),r=!0,s={};for(i.properties=[],this.next();!this.eat(R.braceR);){if(r)r=!1;else if(n.expect(R.comma),n.afterTrailingComma(R.braceR))break;var a=n.startNode(),o=void 0,u=void 0,h=void 0,l=void 0;n.options.ecmaVersion>=6&&(a.method=!1,a.shorthand=!1,(t||e)&&(h=n.start,l=n.startLoc),t||(o=n.eat(R.star))),n.parsePropertyName(a),!t&&n.options.ecmaVersion>=8&&!o&&n.isAsyncProp(a)?(u=!0,n.parsePropertyName(a,e)):u=!1,n.parsePropertyValue(a,t,o,u,h,l,e),n.checkPropClash(a,s),i.properties.push(n.finishNode(a,"Property"))}return this.finishNode(i,t?"ObjectPattern":"ObjectExpression")},tt.parsePropertyValue=function(t,e,n,i,r,s,a){if((n||i)&&this.type===R.colon&&this.unexpected(),this.eat(R.colon))t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),t.kind="init";else if(this.options.ecmaVersion>=6&&this.type===R.parenL)e&&this.unexpected(),t.kind="init",t.method=!0,t.value=this.parseMethod(n,i);else if(this.options.ecmaVersion>=5&&!t.computed&&"Identifier"===t.key.type&&("get"===t.key.name||"set"===t.key.name)&&this.type!=R.comma&&this.type!=R.braceR){(n||i||e)&&this.unexpected(),t.kind=t.key.name,this.parsePropertyName(t),t.value=this.parseMethod(!1);var o="get"===t.kind?0:1;if(t.value.params.length!==o){var u=t.value.start;"get"===t.kind?this.raiseRecoverable(u,"getter should have no params"):this.raiseRecoverable(u,"setter should have exactly one param")}else"set"===t.kind&&"RestElement"===t.value.params[0].type&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!t.computed&&"Identifier"===t.key.type?(this.checkUnreserved(t.key),t.kind="init",e?t.value=this.parseMaybeDefault(r,s,t.key):this.type===R.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),t.value=this.parseMaybeDefault(r,s,t.key)):t.value=t.key,t.shorthand=!0):this.unexpected()},tt.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(R.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(R.bracketR),t.key;t.computed=!1}return t.key=this.type===R.num||this.type===R.string?this.parseExprAtom():this.parseIdent(!0)},tt.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=!1,t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},tt.parseMethod=function(t,e){var n=this.startNode(),i=this.inGenerator,r=this.inAsync,s=this.yieldPos,a=this.awaitPos,o=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=t),this.options.ecmaVersion>=8&&(n.async=!!e),this.inGenerator=n.generator,this.inAsync=n.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),this.expect(R.parenL),n.params=this.parseBindingList(R.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1),this.inGenerator=i,this.inAsync=r,this.yieldPos=s,this.awaitPos=a,this.inFunction=o,this.finishNode(n,"FunctionExpression")},tt.parseArrowExpression=function(t,e,n){var i=this.inGenerator,r=this.inAsync,s=this.yieldPos,a=this.awaitPos,o=this.inFunction;return this.enterFunctionScope(),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!n),this.inGenerator=!1,this.inAsync=t.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0),this.inGenerator=i,this.inAsync=r,this.yieldPos=s,this.awaitPos=a,this.inFunction=o,this.finishNode(t,"ArrowFunctionExpression")},tt.parseFunctionBody=function(t,e){var n=e&&this.type!==R.braceL,i=this.strict,r=!1;if(n)t.body=this.parseMaybeAssign(),t.expression=!0,this.checkParams(t,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);i&&!s||(r=this.strictDirective(this.end),r&&s&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var a=this.labels;this.labels=[],r&&(this.strict=!0),this.checkParams(t,!i&&!r&&!e&&this.isSimpleParamList(t.params)),t.body=this.parseBlock(!1),t.expression=!1,this.labels=a}this.exitFunctionScope(),this.strict&&t.id&&this.checkLVal(t.id,"none"),this.strict=i},tt.isSimpleParamList=function(t){for(var e=0,n=t;e0;)e[n]=arguments[n+1];for(var i=0,r=e;i=1;e--){var n=t.context[e];if("function"===n.token)return n.generator}return!1},ht.updateContext=function(t){var e,n=this.type;n.keyword&&t==R.dot?this.exprAllowed=!1:(e=n.updateContext)?e.call(this,t):this.exprAllowed=n.beforeExpr},R.parenR.updateContext=R.braceR.updateContext=function(){if(1==this.context.length)return void(this.exprAllowed=!0);var t=this.context.pop();t===ut.b_stat&&"function"===this.curContext().token&&(t=this.context.pop()),this.exprAllowed=!t.isExpr},R.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?ut.b_stat:ut.b_expr),this.exprAllowed=!0},R.dollarBraceL.updateContext=function(){this.context.push(ut.b_tmpl),this.exprAllowed=!0},R.parenL.updateContext=function(t){var e=t===R._if||t===R._for||t===R._with||t===R._while;this.context.push(e?ut.p_stat:ut.p_expr),this.exprAllowed=!0},R.incDec.updateContext=function(){},R._function.updateContext=R._class.updateContext=function(t){t.beforeExpr&&t!==R.semi&&t!==R._else&&(t!==R.colon&&t!==R.braceL||this.curContext()!==ut.b_stat)?this.context.push(ut.f_expr):this.context.push(ut.f_stat),this.exprAllowed=!1},R.backQuote.updateContext=function(){this.curContext()===ut.q_tmpl?this.context.pop():this.context.push(ut.q_tmpl),this.exprAllowed=!1},R.star.updateContext=function(t){if(t==R._function){var e=this.context.length-1;this.context[e]===ut.f_expr?this.context[e]=ut.f_expr_gen:this.context[e]=ut.f_gen}this.exprAllowed=!0},R.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&("of"==this.value&&!this.exprAllowed||"yield"==this.value&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var lt=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new K(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},ct=X.prototype,pt="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);ct.next=function(){this.options.onToken&&this.options.onToken(new lt(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},ct.getToken=function(){return this.next(),new lt(this)},"undefined"!=typeof Symbol&&(ct[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===R.eof,value:e}}}}),ct.curContext=function(){return this.context[this.context.length-1]},ct.nextToken=function(){var t=this.curContext();return t&&t.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(R.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},ct.readToken=function(t){return n(t,this.options.ecmaVersion>=6)||92===t?this.readWord():this.getTokenFromCode(t)},ct.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.pos);if(t<=55295||t>=57344)return t;var e=this.input.charCodeAt(this.pos+1);return(t<<10)+e-56613888},ct.skipBlockComment=function(){var t=this,e=this.options.onComment&&this.curPosition(),n=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations){D.lastIndex=n;for(var r;(r=D.exec(this.input))&&r.index8&&e<14||e>=5760&&I.test(String.fromCharCode(e))))break t;++t.pos}}},ct.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=t,this.value=e,this.updateContext(n)},ct.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===t&&46===e?(this.pos+=3,this.finishToken(R.ellipsis)):(++this.pos,this.finishToken(R.dot))},ct.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===t?this.finishOp(R.assign,2):this.finishOp(R.slash,1)},ct.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),n=1,i=42===t?R.star:R.modulo;return this.options.ecmaVersion>=7&&42===e&&(++n,i=R.starstar,e=this.input.charCodeAt(this.pos+2)),61===e?this.finishOp(R.assign,n+1):this.finishOp(i,n)},ct.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?this.finishOp(124===t?R.logicalOR:R.logicalAND,2):61===e?this.finishOp(R.assign,2):this.finishOp(124===t?R.bitwiseOR:R.bitwiseAND,1)},ct.readToken_caret=function(){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(R.assign,2):this.finishOp(R.bitwiseXOR,1)},ct.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?45!=e||62!=this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!L.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(R.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===e?this.finishOp(R.assign,2):this.finishOp(R.plusMin,1)},ct.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),n=1;return e===t?(n=62===t&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(R.assign,n+1):this.finishOp(R.bitShift,n)):33==e&&60==t&&45==this.input.charCodeAt(this.pos+2)&&45==this.input.charCodeAt(this.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===e&&(n=2),this.finishOp(R.relational,n))},ct.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(R.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===t&&62===e&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(R.arrow)):this.finishOp(61===t?R.eq:R.prefix,1)},ct.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(R.parenL);case 41:return++this.pos,this.finishToken(R.parenR);case 59:return++this.pos,this.finishToken(R.semi);case 44:return++this.pos,this.finishToken(R.comma);case 91:return++this.pos,this.finishToken(R.bracketL);case 93:return++this.pos,this.finishToken(R.bracketR);case 123:return++this.pos,this.finishToken(R.braceL);case 125:return++this.pos,this.finishToken(R.braceR);case 58:return++this.pos,this.finishToken(R.colon);case 63:return++this.pos,this.finishToken(R.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(R.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(120===e||88===e)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){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_exp(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(R.prefix,1)}this.raise(this.pos,"Unexpected character '"+m(t)+"'")},ct.finishOp=function(t,e){var n=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,n)};var ft=!!d("￿","u");ct.readRegexp=function(){for(var t,e,n=this,i=this.pos;;){n.pos>=n.input.length&&n.raise(i,"Unterminated regular expression");var r=n.input.charAt(n.pos);if(L.test(r)&&n.raise(i,"Unterminated regular expression"),t)t=!1;else{if("["===r)e=!0;else if("]"===r&&e)e=!1;else if("/"===r&&!e)break;t="\\"===r}++n.pos}var s=this.input.slice(i,this.pos);++this.pos;var a=this.readWord1(),o=s,u="";if(a){var h=/^[gim]*$/;this.options.ecmaVersion>=6&&(h=/^[gimuy]*$/),h.test(a)||this.raise(i,"Invalid regular expression flag"),a.indexOf("u")>=0&&(ft?u="u":(o=o.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(t,e,r){return e=Number("0x"+e),e>1114111&&n.raise(i+r+3,"Code point out of bounds"),"x"}),o=o.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"),u=u.replace("u","")))}var l=null;return pt||(d(o,u,i,this),l=d(s,a)),this.finishToken(R.regexp,{pattern:s,flags:a,value:l})},ct.readInt=function(t,e){for(var n=this,i=this.pos,r=0,s=0,a=null==e?1/0:e;s=97?o-97+10:o>=65?o-65+10:o>=48&&o<=57?o-48:1/0,u>=t)break;++n.pos,r=r*t+u}return this.pos===i||null!=e&&this.pos-i!==e?null:r},ct.readRadixNumber=function(t){this.pos+=2;var e=this.readInt(t);return null==e&&this.raise(this.start+2,"Expected number in radix "+t),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(R.num,e)},ct.readNumber=function(t){var e=this.pos,i=!1,r=48===this.input.charCodeAt(this.pos);t||null!==this.readInt(10)||this.raise(e,"Invalid number"),r&&this.pos==e+1&&(r=!1);var s=this.input.charCodeAt(this.pos);46!==s||r||(++this.pos,this.readInt(10),i=!0,s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||r||(s=this.input.charCodeAt(++this.pos),43!==s&&45!==s||++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number"),i=!0),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a,o=this.input.slice(e,this.pos);return i?a=parseFloat(o):r&&1!==o.length?this.strict?this.raise(e,"Invalid number"):a=/[89]/.test(o)?parseInt(o,10):parseInt(o,8):a=parseInt(o,10),this.finishToken(R.num,a)},ct.readCodePoint=function(){var t,e=this.input.charCodeAt(this.pos);if(123===e){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(n,"Code point out of bounds")}else t=this.readHexChar(4);return t},ct.readString=function(t){for(var e=this,n="",i=++this.pos;;){e.pos>=e.input.length&&e.raise(e.start,"Unterminated string constant");var r=e.input.charCodeAt(e.pos);if(r===t)break;92===r?(n+=e.input.slice(i,e.pos),n+=e.readEscapedChar(!1),i=e.pos):(a(r)&&e.raise(e.start,"Unterminated string constant"),++e.pos)}return n+=this.input.slice(i,this.pos++),this.finishToken(R.string,n)};var dt={};ct.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==dt)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},ct.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw dt;this.raise(t,e)},ct.readTmplToken=function(){for(var t=this,e="",n=this.pos;;){t.pos>=t.input.length&&t.raise(t.start,"Unterminated template");var i=t.input.charCodeAt(t.pos);if(96===i||36===i&&123===t.input.charCodeAt(t.pos+1))return t.pos!==t.start||t.type!==R.template&&t.type!==R.invalidTemplate?(e+=t.input.slice(n,t.pos),t.finishToken(R.template,e)):36===i?(t.pos+=2,t.finishToken(R.dollarBraceL)):(++t.pos,t.finishToken(R.backQuote));if(92===i)e+=t.input.slice(n,t.pos),e+=t.readEscapedChar(!0),n=t.pos;else if(a(i)){switch(e+=t.input.slice(n,t.pos),++t.pos,i){case 13:10===t.input.charCodeAt(t.pos)&&++t.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(i)}t.options.locations&&(++t.curLine,t.lineStart=t.pos),n=t.pos}else++t.pos}},ct.readInvalidTemplateToken=function(){for(var t=this;this.pos=48&&e<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(n,8);return i>255&&(n=n.slice(0,-1),i=parseInt(n,8)),"0"!==n&&(this.strict||t)&&this.invalidStringToken(this.pos-2,"Octal literal in strict mode"),this.pos+=n.length-1,String.fromCharCode(i)}return String.fromCharCode(e)}},ct.readHexChar=function(t){var e=this.pos,n=this.readInt(16,t);return null===n&&this.invalidStringToken(e,"Bad character escape sequence"),n},ct.readWord1=function(){var t=this;this.containsEsc=!1;for(var e="",r=!0,s=this.pos,a=this.options.ecmaVersion>=6;this.pos