/arkcompiler/ets_frontend/es2panda/typescript/core/ |
H A D | destructuringContext.cpp | 380 void ArrayDestructuringContext::HandleRest(const ir::SpreadElement *rest) in HandleRest() argument 382 Type *inferedRestType = GetRestType(rest->Start()); in HandleRest() 384 if (rest->Argument()->IsIdentifier()) { in HandleRest() 386 HandleDestructuringAssignment(rest->Argument()->AsIdentifier(), inferedRestType, nullptr); in HandleRest() 390 SetInferedTypeForVariable(rest->Argument()->AsIdentifier()->Variable(), inferedRestType, rest->Start()); in HandleRest() 394 if (rest->Argument()->IsArrayPattern()) { in HandleRest() 395 ArrayDestructuringContext nextContext = ArrayDestructuringContext(checker_, rest->Argument(), inAssignment_, in HandleRest() 402 ASSERT(rest->Argument()->IsObjectPattern()); in HandleRest() 404 ObjectDestructuringContext(checker_, rest in HandleRest() 533 HandleRest(const ir::SpreadElement *rest) HandleRest() argument [all...] |
H A D | destructuringContext.h | 73 virtual void HandleRest(const ir::SpreadElement *rest) = 0; 104 void HandleRest(const ir::SpreadElement *rest) override; 125 void HandleRest(const ir::SpreadElement *rest) override;
|
/arkcompiler/ets_frontend/ets2panda/checker/ts/ |
H A D | destructuringContext.cpp | 384 void ArrayDestructuringContext::HandleRest(ir::SpreadElement *rest) in HandleRest() argument 386 Type *inferredRestType = GetRestType(rest->Start()); in HandleRest() 388 if (rest->Argument()->IsIdentifier()) { in HandleRest() 390 HandleDestructuringAssignment(rest->Argument()->AsIdentifier(), inferredRestType, nullptr); in HandleRest() 394 SetInferredTypeForVariable(rest->Argument()->AsIdentifier()->Variable(), inferredRestType, rest->Start()); in HandleRest() 398 if (rest->Argument()->IsArrayPattern()) { in HandleRest() 400 {checker_, rest->Argument(), inAssignment_, convertTupleToArray_, nullptr, nullptr}); in HandleRest() 406 ASSERT(rest->Argument()->IsObjectPattern()); in HandleRest() 408 ObjectDestructuringContext({checker_, rest in HandleRest() 541 HandleRest(ir::SpreadElement *rest) HandleRest() argument [all...] |
H A D | destructuringContext.h | 84 virtual void HandleRest(ir::SpreadElement *rest) = 0; 114 void HandleRest(ir::SpreadElement *rest) override; 131 void HandleRest(ir::SpreadElement *rest) override;
|
/arkcompiler/ets_frontend/ets2panda/test/parser/js/ |
H A D | test-patterns.js | 26 function test1(...rest){} 27 function test2(...[...[...rest]]){}
|
/arkcompiler/ets_frontend/es2panda/test/parser/js/ |
H A D | test-patterns.js | 26 function test1(...rest){} 27 function test2(...[...[...rest]]){}
|
/arkcompiler/ets_frontend/es2panda/ir/ts/ |
H A D | tsNamedTupleMember.h | 34 explicit TSNamedTupleMember(Expression *label, Expression *elementType, bool optional, bool rest) in TSNamedTupleMember() argument 39 rest_(rest) in TSNamedTupleMember()
|
/arkcompiler/runtime_core/static_core/libpandabase/os/ |
H A D | mutex.h | 270 inline int TryLock(L0 &lock0, L1 &...rest) NO_THREAD_SAFETY_ANALYSIS 273 int failedIndex = TryLock<TYPE>(rest...); 304 void Lock(L0 &lock0, L1 &...rest) NO_THREAD_SAFETY_ANALYSIS 307 int failedIndex = detail::TryLock<TYPE>(rest...); 314 Lock<TYPE>(rest..., lock0);
|
/arkcompiler/ets_runtime/ecmascript/base/ |
H A D | dtoa_helper.cpp | 66 void DtoaHelper::GrisuRound(char *buffer, int len, uint64_t delta, uint64_t rest, uint64_t tenKappa, uint64_t distance) in GrisuRound() argument 68 while (rest < distance && delta - rest >= tenKappa && in GrisuRound() 69 (rest + tenKappa < distance || distance - rest > rest + tenKappa - distance)) { in GrisuRound() 71 rest += tenKappa; in GrisuRound()
|
H A D | dtoa_helper.h | 279 static void GrisuRound(char* buffer, int len, uint64_t delta, uint64_t rest, uint64_t tenKappa, uint64_t distance);
|
/arkcompiler/ets_frontend/ets2panda/declgen_ets2ts/ |
H A D | declgenEts2Ts.h | 80 void Out(F &&first, T &&...rest) in Out() argument 83 Out(std::forward<T>(rest)...); in Out()
|
/arkcompiler/runtime_core/compiler/tests/ |
H A D | unit_test.h | 178 auto rest = std::accumulate(users_map.begin(), users_map.end(), 0, [](int a, auto &x) { return a + x.second; }); in CheckUsers() local 179 EXPECT_EQ(rest, 0); in CheckUsers() 180 return (rest == 0) ? true : false; in CheckUsers()
|
/arkcompiler/runtime_core/static_core/compiler/tests/ |
H A D | unit_test.h | 240 auto rest = std::accumulate(usersMap.begin(), usersMap.end(), 0, [](int a, auto &x) { return a + x.second; }); in CheckUsers() local 241 EXPECT_EQ(rest, 0); in CheckUsers() 242 return rest == 0; in CheckUsers()
|
/arkcompiler/runtime_core/static_core/templates/ |
H A D | messages.rb | 44 parts << escape_string_literal(scanner.rest)
|
/arkcompiler/runtime_core/templates/ |
H A D | messages.rb | 44 parts << escape_string_literal(scanner.rest)
|
/arkcompiler/runtime_core/static_core/tests/tests-u-runner/tools/generate-es-checked/ |
H A D | main.rb | 237 rest = (sub["rest"] || ["emptyRest"]).map { |p| eval(p, conf.vars.instance_eval { binding }) } 257 gen_params(add + pars, mandatory: mandatory, rest_supp: rest).each { |pars|
|
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/intrinsics/helpers/ |
H A D | dtoa_helper.h | 181 void GrisuRound(uint64_t delta, uint64_t rest, uint64_t tenKappa, uint64_t distance);
|
/arkcompiler/ets_frontend/legacy_bin/api8/src/ |
H A D | index.js | 2 (()=>{var __webpack_modules__={"./node_modules/buffer-from/index.js":e=>{var t=Object.prototype.toString,r="undefined"!=typeof Buffer&&"function"==typeof Buffer.alloc&&"function"==typeof Buffer.allocUnsafe&&"function"==typeof Buffer.from;e.exports=function(e,n,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return a=e,"ArrayBuffer"===t.call(a).slice(8,-1)?function(e,t,n){t>>>=0;var i=e.byteLength-t;if(i<0)throw new RangeError("'offset' is out of bounds");if(void 0===n)n=i;else if((n>>>=0)>i)throw new RangeError("'length' is out of bounds");return r?Buffer.from(e.slice(t,t+n)):new Buffer(new Uint8Array(e.slice(t,t+n)))}(e,n,i):"string"==typeof e?function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Buffer.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return r?Buffer.from(e,t):new Buffer(e,t)}(e,n):r?Buffer.from(e):new Buffer(e);var a}},"./node_modules/source-map-support/node_modules/source-map/lib/array-set.js":(e,t,r)=>{var n=r("./node_modules/source-map-support/node_modules/source-map/lib/util.js"),i=Object.prototype.hasOwnProperty,a="undefined"!=typeof Map;function o(){this._array=[],this._set=a?new Map:Object.create(null)}o.fromArray=function(e,t){for(var r=new o,n=0,i=e.length;n<i;n++)r.add(e[n],t);return r},o.prototype.size=function(){return a?this._set.size:Object.getOwnPropertyNames(this._set).length},o.prototype.add=function(e,t){var r=a?e:n.toSetString(e),o=a?this.has(e):i.call(this._set,r),s=this._array.length;o&&!t||this._array.push(e),o||(a?this._set.set(e,s):this._set[r]=s)},o.prototype.has=function(e){if(a)return this._set.has(e);var t=n.toSetString(e);return i.call(this._set,t)},o.prototype.indexOf=function(e){if(a){var t=this._set.get(e);if(t>=0)return t}else{var r=n.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},o.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},o.prototype.toArray=function(){return this._array.slice()},t.ArraySet=o},"./node_modules/source-map-support/node_modules/source-map/lib/base64-vlq.js":(e,t,r)=>{var n=r("./node_modules/source-map-support/node_modules/source-map/lib/base64.js");t.encode=function(e){var t,r="",i=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&i,(i>>>=5)>0&&(t|=32),r+=n.encode(t)}while(i>0);return r},t.decode=function(e,t,r){var i,a,o,s,c=e.length,l=0,u=0;do{if(t>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(a=n.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));i=!!(32&a),l+=(a&=31)<<u,u+=5}while(i);r.value=(s=(o=l)>>1,1==(1&o)?-s:s),r.rest=t}},"./node_modules/source-map-support/node_modules/source-map/lib/base64.js":(e,t)=>{var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<r.length)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},t.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},"./node_modules/source-map-support/node_modules/source-map/lib/binary-search.js":(e,t)=>{function r(e,n,i,a,o,s){var c=Math.floor((n-e)/2)+e,l=o(i,a[c],!0);return 0===l?c:l>0?n-c>1?r(c,n,i,a,o,s):s==t.LEAST_UPPER_BOUND?n<a.length?n:-1:c:c-e>1?r(e,c,i,a,o,s):s==t.LEAST_UPPER_BOUND?c:e<0?-1:e}t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,n,i,a){if(0===n.length)return-1;var o=r(-1,n.length,e,n,i,a||t.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===i(n[o],n[o-1],!0);)--o;return o}},"./node_modules/source-map-support/node_modules/source-map/lib/mapping-list.js":(e,t,r)=>{var n=r("./node_modules/source-map-support/node_modules/source-map/lib/util.js");function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){var t,r,i,a,o,s;r=e,i=(t=this._last).generatedLine,a=r.generatedLine,o=t.generatedColumn,s=r.generatedColumn,a>i||a==i&&s>=o||n.compareByGeneratedPositionsInflated(t,r)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(n.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.MappingList=i},"./node_modules/source-map-support/node_modules/source-map/lib/quick-sort.js":(e,t)=>{function r(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function n(e,t,i,a){if(i<a){var o=i-1;r(e,(u=i,_=a,Math.round(u+Math.random()*(_-u))),a);for(var s=e[a],c=i;c<a;c++)t(e[c],s)<=0&&r(e,o+=1,c);r(e,o+1,c);var l=o+1;n(e,t,i,l-1),n(e,t,l+1,a)}var u,_}t.quickSort=function(e,t){n(e,t,0,e.length-1)}},"./node_modules/source-map-support/node_modules/source-map/lib/source-map-consumer.js":(e,t,r)=>{var n=r("./node_modules/source-map-support/node_modules/source-map/lib/util.js"),i=r("./node_modules/source-map-support/node_modules/source-map/lib/binary-search.js"),a=r("./node_modules/source-map-support/node_modules/source-map/lib/array-set.js").ArraySet,o=r("./node_modules/source-map-support/node_modules/source-map/lib/base64-vlq.js"),s=r("./node_modules/source-map-support/node_modules/source-map/lib/quick-sort.js").quickSort;function c(e,t){var r=e;return"string"==typeof e&&(r=n.parseSourceMapInput(e)),null!=r.sections?new _(r,t):new l(r,t)}function l(e,t){var r=e;"string"==typeof e&&(r=n.parseSourceMapInput(e));var i=n.getArg(r,"version"),o=n.getArg(r,"sources"),s=n.getArg(r,"names",[]),c=n.getArg(r,"sourceRoot",null),l=n.getArg(r,"sourcesContent",null),u=n.getArg(r,"mappings"),_=n.getArg(r,"file",null);if(i!=this._version)throw new Error("Unsupported version: "+i);c&&(c=n.normalize(c)),o=o.map(String).map(n.normalize).map((function(e){return c&&n.isAbsolute(c)&&n.isAbsolute(e)?n.relative(c,e):e})),this._names=a.fromArray(s.map(String),!0),this._sources=a.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map((function(e){return n.computeSourceURL(c,e,t)})),this.sourceRoot=c,this.sourcesContent=l,this._mappings=u,this._sourceMapURL=t,this.file=_}function u(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function _(e,t){var r=e;"string"==typeof e&&(r=n.parseSourceMapInput(e));var i=n.getArg(r,"version"),o=n.getArg(r,"sections");if(i!=this._version)throw new Error("Unsupported version: "+i);this._sources=new a,this._names=new a;var s={line:-1,column:0};this._sections=o.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var r=n.getArg(e,"offset"),i=n.getArg(r,"line"),a=n.getArg(r,"column");if(i<s.line||i===s.line&&a<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=r,{generatedOffset:{generatedLine:i+1,generatedColumn:a+1},consumer:new c(n.getArg(e,"map"),t)}}))}c.fromSourceMap=function(e,t){return l.fromSourceMap(e,t)},c.prototype._version=3,c.prototype.__generatedMappings=null,Object.defineProperty(c.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),c.prototype.__originalMappings=null,Object.defineProperty(c.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),c.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},c.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},c.GENERATED_ORDER=1,c.ORIGINAL_ORDER=2,c.GREATEST_LOWER_BOUND=1,c.LEAST_UPPER_BOUND=2,c.prototype.eachMapping=function(e,t,r){var i,a=t||null;switch(r||c.GENERATED_ORDER){case c.GENERATED_ORDER:i=this._generatedMappings;break;case c.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var o=this.sourceRoot;i.map((function(e){var t=null===e.source?null:this._sources.at(e.source);return{source:t=n.computeSourceURL(o,t,this._sourceMapURL),generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}}),this).forEach(e,a)},c.prototype.allGeneratedPositionsFor=function(e){var t=n.getArg(e,"line"),r={source:n.getArg(e,"source"),originalLine:t,originalColumn:n.getArg(e,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var a=[],o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(void 0===e.column)for(var c=s.originalLine;s&&s.originalLine===c;)a.push({line:n.getArg(s,"generatedLine",null),column:n.getArg(s,"generatedColumn",null),lastColumn:n.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var l=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==l;)a.push({line:n.getArg(s,"generatedLine",null),column:n.getArg(s,"generatedColumn",null),lastColumn:n.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return a},t.SourceMapConsumer=c,l.prototype=Object.create(c.prototype),l.prototype.consumer=c,l.prototype._findSourceIndex=function(e){var t,r=e;if(null!=this.sourceRoot&&(r=n.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==e)return t;return-1},l.fromSourceMap=function(e,t){var r=Object.create(l.prototype),i=r._names=a.fromArray(e._names.toArray(),!0),o=r._sources=a.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=t,r._absoluteSources=r._sources.toArray().map((function(e){return n.computeSourceURL(r.sourceRoot,e,t)}));for(var c=e._mappings.toArray().slice(),_=r.__generatedMappings=[],d=r.__originalMappings=[],p=0,f=c.length;p<f;p++){var g=c[p],m=new u;m.generatedLine=g.generatedLine,m.generatedColumn=g.generatedColumn,g.source&&(m.source=o.indexOf(g.source),m.originalLine=g.originalLine,m.originalColumn=g.originalColumn,g.name&&(m.name=i.indexOf(g.name)),d.push(m)),_.push(m)}return s(r.__originalMappings,n.compareByOriginalPositions),r},l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),l.prototype._parseMappings=function(e,t){for(var r,i,a,c,l,_=1,d=0,p=0,f=0,g=0,m=0,y=e.length,h=0,v={},b={},x=[],D=[];h<y;)if(";"===e.charAt(h))_++,h++,d=0;else if(","===e.charAt(h))h++;else{for((r=new u).generatedLine=_,c=h;c<y&&!this._charIsMappingSeparator(e,c);c++);if(a=v[i=e.slice(h,c)])h+=i.length;else{for(a=[];h<c;)o.decode(e,h,b),l=b.value,h=b.rest,a.push(l);if(2===a.length)throw new Error("Found a source, but no line and column");if(3===a.length)throw new Error("Found a source and line, but no column");v[i]=a}r.generatedColumn=d+a[0],d=r.generatedColumn,a.length>1&&(r.source=g+a[1],g+=a[1],r.originalLine=p+a[2],p=r.originalLine,r.originalLine+=1,r.originalColumn=f+a[3],f=r.originalColumn,a.length>4&&(r.name=m+a[4],m+=a[4])),D.push(r),"number"==typeof r.originalLine&&x.push(r)}s(D,n.compareByGeneratedPositionsDeflated),this.__generatedMappings=D,s(x,n.compareByOriginalPositions),this.__originalMappings=x},l.prototype._findMapping=function(e,t,r,n,a,o){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return i.search(e,t,a,o)},l.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},l.prototype.originalPositionFor=function(e){var t={generatedLine:n.getArg(e,"line"),generatedColumn:n.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",n.compareByGeneratedPositionsDeflated,n.getArg(e,"bias",c.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var a=n.getArg(i,"source",null);null!==a&&(a=this._sources.at(a),a=n.computeSourceURL(this.sourceRoot,a,this._sourceMapURL));var o=n.getArg(i,"name",null);return null!==o&&(o=this._names.at(o)),{source:a,line:n.getArg(i,"originalLine",null),column:n.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e}))},l.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var i,a=e;if(null!=this.sourceRoot&&(a=n.relative(this.sourceRoot,a)),null!=this.sourceRoot&&(i=n.urlParse(this.sourceRoot))){var o=a.replace(/^file:\/\//,"");if("file"==i.scheme&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!i.path||"/"==i.path)&&this._sources.has("/"+a))return this.sourcesContent[this._sources.indexOf("/"+a)]}if(t)return null;throw new Error('"'+a+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(e){var t=n.getArg(e,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var r={source:t,originalLine:n.getArg(e,"line"),originalColumn:n.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,n.getArg(e,"bias",c.GREATEST_LOWER_BOUND));if(i>=0){var a=this._originalMappings[i];if(a.source===r.source)return{line:n.getArg(a,"generatedLine",null),column:n.getArg(a,"generatedColumn",null),lastColumn:n.getArg(a,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},t.BasicSourceMapConsumer=l,_.prototype=Object.create(c.prototype),_.prototype.constructor=c,_.prototype._version=3,Object.defineProperty(_.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}}),_.prototype.originalPositionFor=function(e){var t={generatedLine:n.getArg(e,"line"),generatedColumn:n.getArg(e,"column")},r=i.search(t,this._sections,(function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn})),a=this._sections[r];return a?a.consumer.originalPositionFor({line:t.generatedLine-(a.generatedOffset.generatedLine-1),column:t.generatedColumn-(a.generatedOffset.generatedLine===t.generatedLine?a.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},_.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))},_.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r].consumer.sourceContentFor(e,!0);if(n)return n}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},_.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(-1!==r.consumer._findSourceIndex(n.getArg(e,"source"))){var i=r.consumer.generatedPositionFor(e);if(i)return{line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},_.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],a=i.consumer._generatedMappings,o=0;o<a.length;o++){var c=a[o],l=i.consumer._sources.at(c.source);l=n.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var u=null;c.name&&(u=i.consumer._names.at(c.name),this._names.add(u),u=this._names.indexOf(u));var _={source:l,generatedLine:c.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:c.generatedColumn+(i.generatedOffset.generatedLine===c.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:c.originalLine,originalColumn:c.originalColumn,name:u};this.__generatedMappings.push(_),"number"==typeof _.originalLine&&this.__originalMappings.push(_)}s(this.__generatedMappings,n.compareByGeneratedPositionsDeflated),s(this.__originalMappings,n.compareByOriginalPositions)},t.IndexedSourceMapConsumer=_},"./node_modules/source-map-support/node_modules/source-map/lib/source-map-generator.js":(e,t,r)=>{var n=r("./node_modules/source-map-support/node_modules/source-map/lib/base64-vlq.js"),i=r("./node_modules/source-map-support/node_modules/source-map/lib/util.js"),a=r("./node_modules/source-map-support/node_modules/source-map/lib/array-set.js").ArraySet,o=r("./node_modules/source-map-support/node_modules/source-map/lib/mapping-list.js").MappingList;function s(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new a,this._names=new a,this._mappings=new o,this._sourcesContents=null}s.prototype._version=3,s.fromSourceMap=function(e){var t=e.sourceRoot,r=new s({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=i.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)})),e.sources.forEach((function(n){var a=n;null!==t&&(a=i.relative(t,n)),r._sources.has(a)||r._sources.add(a);var o=e.sourceContentFor(n);null!=o&&r.setSourceContent(n,o)})),r},s.prototype.addMapping=function(e){var t=i.getArg(e,"generated"),r=i.getArg(e,"original",null),n=i.getArg(e,"source",null),a=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,a),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=a&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:a})},s.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},s.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=e.file}var o=this._sourceRoot;null!=o&&(n=i.relative(o,n));var s=new a,c=new a;this._mappings.unsortedForEach((function(t){if(t.source===n&&null!=t.originalLine){var a=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=a.source&&(t.source=a.source,null!=r&&(t.source=i.join(r,t.source)),null!=o&&(t.source=i.relative(o,t.source)),t.originalLine=a.line,t.originalColumn=a.column,null!=a.name&&(t.name=a.name))}var l=t.source;null==l||s.has(l)||s.add(l);var u=t.name;null==u||c.has(u)||c.add(u)}),this),this._sources=s,this._names=c,e.sources.forEach((function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=i.join(r,t)),null!=o&&(t=i.relative(o,t)),this.setSourceContent(t,n))}),this)},s.prototype._validateMapping=function(e,t,r,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},s.prototype._serializeMappings=function(){for(var e,t,r,a,o=0,s=1,c=0,l=0,u=0,_=0,d="",p=this._mappings.toArray(),f=0,g=p.length;f<g;f++){if(e="",(t=p[f]).generatedLine!==s)for(o=0;t.generatedLine!==s;)e+=";",s++;else if(f>0){if(!i.compareByGeneratedPositionsInflated(t,p[f-1]))continue;e+=","}e+=n.encode(t.generatedColumn-o),o=t.generatedColumn,null!=t.source&&(a=this._sources.indexOf(t.source),e+=n.encode(a-_),_=a,e+=n.encode(t.originalLine-1-l),l=t.originalLine-1,e+=n.encode(t.originalColumn-c),c=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=n.encode(r-u),u=r)),d+=e}return d},s.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=i.relative(t,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)},s.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},s.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=s},"./node_modules/source-map-support/node_modules/source-map/lib/source-node.js":(e,t,r)=>{var n=r("./node_modules/source-map-support/node_modules/source-map/lib/source-map-generator.js").SourceMapGenerator,i=r("./node_modules/source-map-support/node_modules/source-map/lib/util.js"),a=/(\r?\n)/,o="$$$isSourceNode$$$";function s(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==i?null:i,this[o]=!0,null!=n&&this.add(n)}s.fromStringWithSourceMap=function(e,t,r){var n=new s,o=e.split(a),c=0,l=function(){return e()+(e()||"");function e(){return c<o.length?o[c++]:void 0}},u=1,_=0,d=null;return t.eachMapping((function(e){if(null!==d){if(!(u<e.generatedLine)){var t=(r=o[c]||"").substr(0,e.generatedColumn-_);return o[c]=r.substr(e.generatedColumn-_),_=e.generatedColumn,p(d,t),void(d=e)}p(d,l()),u++,_=0}for(;u<e.generatedLine;)n.add(l()),u++;if(_<e.generatedColumn){var r=o[c]||"";n.add(r.substr(0,e.generatedColumn)),o[c]=r.substr(e.generatedColumn),_=e.generatedColumn}d=e}),this),c<o.length&&(d&&p(d,l()),n.add(o.splice(c).join(""))),t.sources.forEach((function(e){var a=t.sourceContentFor(e);null!=a&&(null!=r&&(e=i.join(r,e)),n.setSourceContent(e,a))})),n;function p(e,t){if(null===e||void 0===e.source)n.add(t);else{var a=r?i.join(r,e.source):e.source;n.add(new s(e.originalLine,e.originalColumn,a,t,e.name))}}},s.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},s.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},s.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r<n;r++)(t=this.children[r])[o]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},s.prototype.join=function(e){var t,r,n=this.children.length;if(n>0){for(t=[],r=0;r<n-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this},s.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[o]?r.replaceRight(e,t):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this},s.prototype.setSourceContent=function(e,t){this.sourceContents[i.toSetString(e)]=t},s.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][o]&&this.children[t].walkSourceContents(e);var n=Object.keys(this.sourceContents);for(t=0,r=n.length;t<r;t++)e(i.fromSetString(n[t]),this.sourceContents[n[t]])},s.prototype.toString=function(){var e="";return this.walk((function(t){e+=t})),e},s.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new n(e),i=!1,a=null,o=null,s=null,c=null;return this.walk((function(e,n){t.code+=e,null!==n.source&&null!==n.line&&null!==n.column?(a===n.source&&o===n.line&&s===n.column&&c===n.name||r.addMapping({source:n.source,original:{line:n.line,column:n.column},generated:{line:t.line,column:t.column},name:n.name}),a=n.source,o=n.line,s=n.column,c=n.name,i=!0):i&&(r.addMapping({generated:{line:t.line,column:t.column}}),a=null,i=!1);for(var l=0,u=e.length;l<u;l++)10===e.charCodeAt(l)?(t.line++,t.column=0,l+1===u?(a=null,i=!1):i&&r.addMapping({source:n.source,original:{line:n.line,column:n.column},generated:{line:t.line,column:t.column},name:n.name})):t.column++})),this.walkSourceContents((function(e,t){r.setSourceContent(e,t)})),{code:t.code,map:r}},t.SourceNode=s},"./node_modules/source-map-support/node_modules/source-map/lib/util.js":(e,t)=>{t.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function i(e){var t=e.match(r);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function a(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function o(e){var r=e,n=i(e);if(n){if(!n.path)return e;r=n.path}for(var o,s=t.isAbsolute(r),c=r.split(/\/+/),l=0,u=c.length-1;u>=0;u--)"."===(o=c[u])?c.splice(u,1):".."===o?l++:l>0&&(""===o?(c.splice(u+1,l),l=0):(c.splice(u,2),l--));return""===(r=c.join("/"))&&(r=s?"/":"."),n?(n.path=r,a(n)):r}function s(e,t){""===e&&(e="."),""===t&&(t=".");var r=i(t),s=i(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),a(r);if(r||t.match(n))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var c="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=c,a(s)):c}t.urlParse=i,t.urlGenerate=a,t.normalize=o,t.join=s,t.isAbsolute=function(e){return"/"===e.charAt(0)||r.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var c=!("__proto__"in Object.create(null));function l(e){return e}function u(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function _(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=c?l:function(e){return u(e)?"$"+e:e},t.fromSetString=c?l:function(e){return u(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,r){var n=_(e.source,t.source);return 0!==n||0!=(n=e.originalLine-t.originalLine)||0!=(n=e.originalColumn-t.originalColumn)||r||0!=(n=e.generatedColumn-t.generatedColumn)||0!=(n=e.generatedLine-t.generatedLine)?n:_(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n||0!=(n=e.generatedColumn-t.generatedColumn)||r||0!==(n=_(e.source,t.source))||0!=(n=e.originalLine-t.originalLine)||0!=(n=e.originalColumn-t.originalColumn)?n:_(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r||0!=(r=e.generatedColumn-t.generatedColumn)||0!==(r=_(e.source,t.source))||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)?r:_(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,r){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),r){var n=i(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var c=n.path.lastIndexOf("/");c>=0&&(n.path=n.path.substring(0,c+1))}t=s(a(n),t)}return o(t)}},"./node_modules/source-map-support/node_modules/source-map/source-map.js":(e,t,r)=>{t.SourceMapGenerator=r("./node_modules/source-map-support/node_modules/source-map/lib/source-map-generator.js").SourceMapGenerator,t.SourceMapConsumer=r("./node_modules/source-map-support/node_modules/source-map/lib/source-map-consumer.js").SourceMapConsumer,t.SourceNode=r("./node_modules/source-map-support/node_modules/source-map/lib/source-node.js").SourceNode},"./node_modules/source-map-support/source-map-support.js":(e,t,r)=>{e=r.nmd(e);var n,i=r("./node_modules/source-map-support/node_modules/source-map/source-map.js").SourceMapConsumer,a=r("path");try{(n=r("fs")).existsSync&&n.readFileSync||(n=null)}catch(e){}var o=r("./node_modules/buffer-from/index.js");function s(e,t){return e.require(t)}var c=!1,l=!1,u=!1,_="auto",d={},p={},f=/^data:application\/json[^,]+base64,/,g=[],m=[];function y(){return"browser"===_||"node"!==_&&"undefined"!=typeof window&&"function"==typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type)}function h(e){return function(t){for(var r=0;r<e.length;r++){var n=e[r](t);if(n)return n}return null}}var v=h(g);function b(e,t){if(!e)return t;var r=a.dirname(e),n=/^\w+:\/\/[^\/]*/.exec(r),i=n?n[0]:"",o=r.slice(i.length);return i&&/^\/\w\:/.test(o)?(i+="/")+a.resolve(r.slice(i.length),t).replace(/\\/g,"/"):i+a.resolve(r.slice(i.length),t)}g.push((function(e){if(e=e.trim(),/^file:/.test(e)&&(e=e.replace(/file:\/\/\/(\w:)?/,(function(e,t){return t?"":"/"}))),e in d)return d[e];var t="";try{if(n)n.existsSync(e)&&(t=n.readFileSync(e,"utf8"));else{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),4===r.readyState&&200===r.status&&(t=r.responseText)}}catch(e){}return d[e]=t}));var x=h(m);function D(e){var t=p[e.source];if(!t){var r=x(e.source);r?(t=p[e.source]={url:r.url,map:new i(r.map)}).map.sourcesContent&&t.map.sources.forEach((function(e,r){var n=t.map.sourcesContent[r];if(n){var i=b(t.url,e);d[i]=n}})):t=p[e.source]={url:null,map:null}}if(t&&t.map&&"function"==typeof t.map.originalPositionFor){var n=t.map.originalPositionFor(e);if(null!==n.source)return n.source=b(t.url,n.source),n}return e}function S(e){var t=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e);if(t){var r=D({source:t[2],line:+t[3],column:t[4]-1});return"eval at "+t[1]+" ("+r.source+":"+r.line+":"+(r.column+1)+")"}return(t=/^eval at ([^(]+) \((.+)\)$/.exec(e))?"eval at "+t[1]+" ("+S(t[2])+")":e}function E(){var e,t="";if(this.isNative())t="native";else{!(e=this.getScriptNameOrSourceURL())&&this.isEval()&&(t=this.getEvalOrigin(),t+=", "),t+=e||"<anonymous>";var r=this.getLineNumber();if(null!=r){t+=":"+r;var n=this.getColumnNumber();n&&(t+=":"+n)}}var i="",a=this.getFunctionName(),o=!0,s=this.isConstructor();if(this.isToplevel()||s)s?i+="new "+(a||"<anonymous>"):a?i+=a:(i+=t,o=!1);else{var c=this.getTypeName();"[object Object]"===c&&(c="null");var l=this.getMethodName();a?(c&&0!=a.indexOf(c)&&(i+=c+"."),i+=a,l&&a.indexOf("."+l)!=a.length-l.length-1&&(i+=" [as "+l+"]")):i+=c+"."+(l||"<anonymous>")}return o&&(i+=" ("+t+")"),i}function T(e){var t={};return Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(r){t[r]=/^(?:is|get)/.test(r)?function(){return e[r].call(e)}:e[r]})),t.toString=E,t}function C(e,t){if(void 0===t&&(t={nextPosition:null,curPosition:null}),e.isNative())return t.curPosition=null,e;var r=e.getFileName()||e.getScriptNameOrSourceURL();if(r){var n=e.getLineNumber(),i=e.getColumnNumber()-1,a=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/.test("object"==typeof process&&null!==process?process.version:"")?0:62;1===n&&i>a&&!y()&&!e.isEval()&&(i-=a);var o=D({source:r,line:n,column:i});t.curPosition=o;var s=(e=T(e)).getFunctionName;return e.getFunctionName=function(){return null==t.nextPosition?s():t.nextPosition.name||s()},e.getFileName=function(){return o.source},e.getLineNumber=function(){return o.line},e.getColumnNumber=function(){return o.column+1},e.getScriptNameOrSourceURL=function(){return o.source},e}var c=e.isEval()&&e.getEvalOrigin();return c?(c=S(c),(e=T(e)).getEvalOrigin=function(){return c},e):e}function k(e,t){u&&(d={},p={});for(var r=(e.name||"Error")+": "+(e.message||""),n={nextPosition:null,curPosition:null},i=[],a=t.length-1;a>=0;a--)i.push("\n at "+C(t[a],n)),n.nextPosition=n.curPosition;return n.curPosition=n.nextPosition=null,r+i.reverse().join("")}function A(e){var t=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(t){var r=t[1],i=+t[2],a=+t[3],o=d[r];if(!o&&n&&n.existsSync(r))try{o=n.readFileSync(r,"utf8")}catch(e){o=""}if(o){var s=o.split(/(?:\r\n|\r|\n)/)[i-1];if(s)return r+":"+i+"\n"+s+"\n"+new Array(a).join(" ")+"^"}}return null}function N(e){var t=A(e),r=function(){if("object"==typeof process&&null!==process)return process.stderr}();r&&r._handle&&r._handle.setBlocking&&r._handle.setBlocking(!0),t&&(console.error(),console.error(t)),console.error(e.stack),"object"==typeof process&&null!==process&&"function"==typeof process.exit&&process.exit(1)}m.push((function(e){var t,r=function(e){var t;if(y())try{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),t=4===r.readyState?r.responseText:null;var n=r.getResponseHeader("SourceMap")||r.getResponseHeader("X-SourceMap");if(n)return n}catch(e){}t=v(e);for(var i,a,o=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/gm;a=o.exec(t);)i=a;return i?i[1]:null}(e);if(!r)return null;if(f.test(r)){var n=r.slice(r.indexOf(",")+1);t=o(n,"base64").toString(),r=e}else r=b(e,r),t=v(r);return t?{url:r,map:t}:null}));var F=g.slice(0),w=m.slice(0);t.wrapCallSite=C,t.getErrorSource=A,t.mapSourcePosition=D,t.retrieveSourceMap=x,t.install=function(t){if((t=t||{}).environment&&(_=t.environment,-1===["node","browser","auto"].indexOf(_)))throw new Error("environment "+_+" was unknown. Available options are {auto, browser, node}");if(t.retrieveFile&&(t.overrideRetrieveFile&&(g.length=0),g.unshift(t.retrieveFile)),t.retrieveSourceMap&&(t.overrideRetrieveSourceMap&&(m.length=0),m.unshift(t.retrieveSourceMap)),t.hookRequire&&!y()){var r=s(e,"module"),n=r.prototype._compile;n.__sourceMapSupport||(r.prototype._compile=function(e,t){return d[t]=e,p[t]=void 0,n.call(this,e,t)},r.prototype._compile.__sourceMapSupport=!0)}if(u||(u="emptyCacheBetweenOperations"in t&&t.emptyCacheBetweenOperations),c||(c=!0,Error.prepareStackTrace=k),!l){var i=!("handleUncaughtExceptions"in t)||t.handleUncaughtExceptions;try{!1===s(e,"worker_threads").isMainThread&&(i=!1)}catch(e){}i&&"object"==typeof process&&null!==process&&"function"==typeof process.on&&(l=!0,a=process.emit,process.emit=function(e){if("uncaughtException"===e){var t=arguments[1]&&arguments[1].stack,r=this.listeners(e).length>0;if(t&&!r)return N(arguments[1])}return a.apply(this,arguments)})}var a},t.resetRetrieveHandlers=function(){g.length=0,m.length=0,g=F.slice(0),m=w.slice(0),x=h(m),v=h(g)}},"./src/addVariable2Scope.ts":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.addVariableToScope=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/base/util.ts"),c=r("./src/cmdOptions.ts"),l=a(r("./src/jshelpers.js")),u=r("./src/scope.ts"),_=r("./src/syntaxCheckHelper.ts"),d=r("./src/typeRecorder.ts"),p=r("./src/variable.ts");function f(e,t,r){r?function(e,t){if(t){let r=d.TypeRecorder.getInstance().tryGetTypeIndex(o.getOriginalNode(e));t.setTypeIndex(r)}}(e,t):function(e,t){if(t){let r=d.TypeRecorder.getInstance().tryGetVariable2Type(o.getOriginalNode(e));t.setTypeIndex(r)}}(e,t)}function g(e,t){let r="";e.elements.forEach((e=>{o.isOmittedExpression(e)||(o.isIdentifier(e.name)?(r=l.getTextOfIdentifierOrLiteral(e.name),t.add(r,p.VarDeclarationKind.VAR)):(0,s.isBindingPattern)(e.name)&&g(e.name,t))}))}t.addVariableToScope=function(e,t){let r=e.getScopeMap(),n=e.getHoistMap();r.forEach(((r,i)=>{let a=[];r instanceof u.VariableScope&&(function(e,t,r){if(t.addParameter("4funcObj",p.VarDeclarationKind.CONST,-1),e.kind==o.SyntaxKind.ArrowFunction?(t.addParameter("0newTarget",p.VarDeclarationKind.CONST,-1),t.addParameter("0this",p.VarDeclarationKind.CONST,0)):(t.addParameter("4newTarget",p.VarDeclarationKind.CONST,-1),t.addParameter("this",p.VarDeclarationKind.CONST,0)),e.kind!=o.SyntaxKind.SourceFile&&function(e,t,r){let n=new Array;for(let i=0;i<e.parameters.length;++i){let a=e.parameters[i],c="";(0,s.isBindingPattern)(a.name)?(n.push(a.name),c=i.toString()+"pattern"):o.isIdentifier(a.name)&&(c=l.getTextOfIdentifierOrLiteral(a.name));let u=t.addParameter(c,p.VarDeclarationKind.VAR,i+1);r&&f(a.name,u,!1)}for(let e=0;e<n.length;e++)g(n[e],t)}(e,t,r),t.getUseArgs()||c.CmdOptions.isDebugMode())if(o.isArrowFunction(e)){let e=t.getParentVariableScope();e.add("arguments",p.VarDeclarationKind.CONST,u.InitStatus.INITIALIZED),e.setUseArgs(!0),t.setUseArgs(!1)}else t.getUseArgs()&&(t.findLocal("arguments")||t.add("arguments",p.VarDeclarationKind.CONST,u.InitStatus.INITIALIZED))}(i,r,t),a=n.get(r),a&&a.forEach((e=>{let n;if(e instanceof u.VarDecl)n=r.add(e.name,p.VarDeclarationKind.VAR);else{if(!(e instanceof u.FuncDecl))throw new Error("Wrong type of declaration to be hoisted");n=r.add(e.name,p.VarDeclarationKind.FUNCTION)}t&&f(e.node,n,e instanceof u.FuncDecl)})));let d=r.getDecls(),m=r.getNearestVariableScope();a=n.get(m);for(let n=0;n<d.length;n++){let i,s=d[n];if(!a||!a.includes(s)){if(s instanceof u.LetDecl)i=r.add(s.name,p.VarDeclarationKind.LET,u.InitStatus.UNINITIALIZED);else if(s instanceof u.ConstDecl)i=r.add(s.name,p.VarDeclarationKind.CONST,u.InitStatus.UNINITIALIZED);else if(s instanceof u.FuncDecl){let t=s.node;o.isFunctionDeclaration(t)?i=r.add(s.name,p.VarDeclarationKind.FUNCTION):o.isFunctionExpression(t)&&(i=e.getScopeOfNode(t).add(s.name,p.VarDeclarationKind.FUNCTION))}else if(s instanceof u.CatchParameter)i=r.add(s.name,p.VarDeclarationKind.LET);else if(s instanceof u.ClassDecl){let t=s.node;i=o.isClassDeclaration(t)?r.add(s.name,p.VarDeclarationKind.CLASS,u.InitStatus.UNINITIALIZED):e.getScopeOfNode(t).add(s.name,p.VarDeclarationKind.CLASS,u.InitStatus.UNINITIALIZED)}else(0,_.isGlobalIdentifier)(d[n].name)&&(i=r.add(d[n].name,p.VarDeclarationKind.VAR));t&&f(s.node,i,s instanceof u.ClassDecl||s instanceof u.FuncDecl)}}}))}},"./src/assemblyDumper.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AssemblyDumper=t.IntrinsicInfo=void 0;const n=r("./src/irnodes.ts"),i=r("./src/statement/tryStatement.ts"),a=r("./src/base/util.ts");t.IntrinsicInfo=class{constructor(e,t,r){this.intrinsicName=e,this.argsNum=t,this.returnType=r}};class o{constructor(e){this.labelPrefix="LABEL_",this.pg=e,this.labels=new Map,this.labelId=0,this.output=""}static writeLanguageTag(e){e.str+=".language ECMAScript\n",e.str+="\n"}writeFunctionHeader(){let e=this.pg.getParametersCount();this.output+=".function any "+this.pg.internalName+"(";for(let t=0;t<e;++t)this.output+="any a"+t.toString(),t!==e-1&&(this.output+=", ");this.output+=") {\n"}writeFunctionBody(){let e=this.pg.getInsns(),t=this.pg.getParametersCount();for(let r=0;r<t;++r){let t=e[r];this.output+="\t",this.output+=t.getMnemonic()+" v"+t.operands[0].num+", a"+t.operands[0].num+"\n"}for(let i=t;i<e.length;++i){let t=e[i];if(t.kind===n.IRNodeKind.VREG||t.kind===n.IRNodeKind.IMM)continue;if(t.kind===n.IRNodeKind.LABEL){this.writeLabel(t);continue}this.output+="\t",this.output+=t.getMnemonic()+" ";let o=t.operands,s=t.getFormats();var r=(0,a.getRangeExplicitVregNums)(t);for(let e=0;e<o.length&&0!=r;++e){let i=s[0][e][0],c=o[e];if(i==n.OperandKind.Imm){let e=c;this.output+=e.value.toString()}else if(i==n.OperandKind.Id)this.output+=c;else if(i==n.OperandKind.StringId){let e=c.toString().replace(/\\/g,"\\\\").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\"/g,'\\"');this.output+='"'+e+'"'}else if(i==n.OperandKind.DstVReg||i==n.OperandKind.SrcDstVReg||i==n.OperandKind.SrcVReg){let e=c;if(e.num<0)throw Error("invalid register, please check your insn!\n");if(this.output+="v"+e.num.toString(),(0,a.isRangeInst)(t)){r--;continue}}else{if(i!=n.OperandKind.Label)throw new Error("Unexpected OperandKind");this.output+=this.getLabelName(c)}e<o.length-1&&(this.output+=", ")}this.output+="\n"}}writeFunctionTail(){this.output+="}\n"}writeFunctionCatchTable(){let e=(0,i.generateCatchTables)(this.pg.getCatchMap());0!=e.length&&(this.output+="\n",e.forEach((e=>{let t=e.getCatchBeginLabel();e.getLabelPairs().forEach((e=>{this.output+=".catchall "+this.getLabelName(e.getBeginLabel())+", "+this.getLabelName(e.getEndLabel())+", "+this.getLabelName(t)+"\n"}))})))}getLabelName(e){let t;return this.labels.has(e.id)?t=this.labels.get(e.id):(t=this.labelPrefix+this.labelId++,this.labels.set(e.id,t)),t}writeLabel(e){let t=this.getLabelName(e);this.output+=t+":\n"}dump(){this.writeFunctionHeader(),this.writeFunctionBody(),this.writeFunctionCatchTable(),this.writeFunctionTail(),console.log(this.output)}static dumpHeader(){let e={str:""};o.writeLanguageTag(e),console.log(e.str)}}t.AssemblyDumper=o,o.intrinsicRec=new Map},"./src/astutils.ts":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getVarDeclarationKind=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/variable.ts");t.getVarDeclarationKind=function(e){if(e.parent.kind==o.SyntaxKind.VariableDeclarationList){let t=e.parent;return 0!=(t.flags&o.NodeFlags.Let)?s.VarDeclarationKind.LET:0!=(t.flags&o.NodeFlags.Const)?s.VarDeclarationKind.CONST:s.VarDeclarationKind.VAR}if(e.parent.kind==o.SyntaxKind.CatchClause)return s.VarDeclarationKind.LET;throw new Error("VariableDeclaration inside "+o.SyntaxKind[e.parent]+" is not implemented")}},"./src/base/bcGenUtil.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwObjectNonCoercible=t.createObjectWithExcludedKeys=t.defineClassWithBuffer=t.storeArraySpread=t.createArrayWithBuffer=t.createEmptyArray=t.defineGetterSetterByValue=t.copyDataProperties=t.setObjectWithProto=t.createObjectWithBuffer=t.createObjectHavingMethod=t.createEmptyObject=t.returnUndefined=t.getNextPropName=t.getPropIterator=t.newObject=t.call=t.throwIfSuperNotCorrectCall=t.storeOwnByValue=t.storeOwnByIndex=t.storeOwnByName=t.storeObjByValue=t.loadObjByValue=t.storeObjByIndex=t.loadObjByIndex=t.storeObjByName=t.loadObjByName=t.storeGlobalVar=t.loadGlobalVar=t.tryStoreGlobalByName=t.tryLoadGlobalByName=t.storeLexicalVar=t.loadLexicalVar=t.popLexicalEnv=t.loadLexicalEnv=t.newLexicalEnv=t.throwDeleteSuperProperty=t.throwThrowNotExists=t.throwUndefinedIfHole=t.throwConstAssignment=t.throwException=t.creatDebugger=t.jumpTarget=t.moveVreg=t.deleteObjProperty=t.storeAccumulator=t.loadAccumulator=t.loadAccumulatorString=t.loadAccumulatorFloat=t.loadAccumulatorInt=void 0,t.loadAccumulatorBigInt=t.stClassToGlobalRecord=t.stConstToGlobalRecord=t.stLetToGlobalRecord=t.createRegExpWithLiteral=t.isFalse=t.isTrue=t.defineMethod=t.defineNCFunc=t.defineGeneratorFunc=t.defineAsyncFunc=t.defineFunc=t.loadHomeObject=t.copyModuleIntoCurrentModule=t.storeModuleVariable=t.loadModuleVarByName=t.importModule=t.ldSuperByValue=t.stSuperByValue=t.stSuperByName=t.ldSuperByName=t.superCallSpread=t.superCall=t.closeIterator=t.getIteratorNext=t.getIterator=t.throwIfNotObject=void 0;const n=r("./src/irnodes.ts");t.loadAccumulatorInt=function(e){return new n.LdaiDyn(new n.Imm(e))},t.loadAccumulatorFloat=function(e){return new n.FldaiDyn(new n.Imm(e))},t.loadAccumulatorString=function(e){return new n.LdaStr(e)},t.loadAccumulator=function(e){return new n.LdaDyn(e)},t.storeAccumulator=function(e){return new n.StaDyn(e)},t.deleteObjProperty=function(e,t){return new n.EcmaDelobjprop(e,t)},t.moveVreg=function(e,t){return new n.MovDyn(e,t)},t.jumpTarget=function(e){return new n.Jmp(e)},t.creatDebugger=function(){return new n.EcmaDebugger},t.throwException=function(){return new n.EcmaThrowdyn},t.throwConstAssignment=function(e){return new n.EcmaThrowconstassignment(e)},t.throwUndefinedIfHole=function(e,t){return new n.EcmaThrowundefinedifhole(e,t)},t.throwThrowNotExists=function(){return new n.EcmaThrowthrownotexists},t.throwDeleteSuperProperty=function(){return new n.EcmaThrowdeletesuperproperty},t.newLexicalEnv=function(e,t){return null==t?new n.EcmaNewlexenvdyn(new n.Imm(e)):new n.EcmaNewlexenvwithnamedyn(new n.Imm(e),new n.Imm(t))},t.loadLexicalEnv=function(){return new n.EcmaLdlexenvdyn},t.popLexicalEnv=function(){return new n.EcmaPoplexenvdyn},t.loadLexicalVar=function(e,t){return new n.EcmaLdlexvardyn(new n.Imm(e),new n.Imm(t))},t.storeLexicalVar=function(e,t,r){return new n.EcmaStlexvardyn(new n.Imm(e),new n.Imm(t),r)},t.tryLoadGlobalByName=function(e){return new n.EcmaTryldglobalbyname(e)},t.tryStoreGlobalByName=function(e){return new n.EcmaTrystglobalbyname(e)},t.loadGlobalVar=function(e){return new n.EcmaLdglobalvar(e)},t.storeGlobalVar=function(e){return new n.EcmaStglobalvar(e)},t.loadObjByName=function(e,t){return new n.EcmaLdobjbyname(t,e)},t.storeObjByName=function(e,t){return new n.EcmaStobjbyname(t,e)},t.loadObjByIndex=function(e,t){return new n.EcmaLdobjbyindex(e,new n.Imm(t))},t.storeObjByIndex=function(e,t){return new n.EcmaStobjbyindex(e,new n.Imm(t))},t.loadObjByValue=function(e,t){return new n.EcmaLdobjbyvalue(e,t)},t.storeObjByValue=function(e,t){return new n.EcmaStobjbyvalue(e,t)},t.storeOwnByName=function(e,t,r){return r?new n.EcmaStownbynamewithnameset(t,e):new n.EcmaStownbyname(t,e)},t.storeOwnByIndex=function(e,t){return new n.EcmaStownbyindex(e,new n.Imm(t))},t.storeOwnByValue=function(e,t,r){return r?new n.EcmaStownbyvaluewithnameset(e,t):new n.EcmaStownbyvalue(e,t)},t.throwIfSuperNotCorrectCall=function(e){return new n.EcmaThrowifsupernotcorrectcall(new n.Imm(e))},t.call=function(e,t){let r,i=e.length;if(t)r=new n.EcmaCallithisrangedyn(new n.Imm(i-1),e);else switch(i){case 1:r=new n.EcmaCallarg0dyn(e[0]);break;case 2:r=new n.EcmaCallarg1dyn(e[0],e[1]);break;case 3:r=new n.EcmaCallargs2dyn(e[0],e[1],e[2]);break;case 4:r=new n.EcmaCallargs3dyn(e[0],e[1],e[2],e[3]);break;default:r=new n.EcmaCallirangedyn(new n.Imm(i-1),e)}return r},t.newObject=function(e){return new n.EcmaNewobjdynrange(new n.Imm(e.length),e)},t.getPropIterator=function(){return new n.EcmaGetpropiterator},t.getNextPropName=function(e){return new n.EcmaGetnextpropname(e)},t.returnUndefined=function(){return new n.EcmaReturnundefined},t.createEmptyObject=function(){return new n.EcmaCreateemptyobject},t.createObjectHavingMethod=function(e){return new n.EcmaCreateobjecthavingmethod(new n.Imm(e))},t.createObjectWithBuffer=function(e){return new n.EcmaCreateobjectwithbuffer(new n.Imm(e))},t.setObjectWithProto=function(e,t){return new n.EcmaSetobjectwithproto(e,t)},t.copyDataProperties=function(e,t){return new n.EcmaCopydataproperties(e,t)},t.defineGetterSetterByValue=function(e,t,r,i){return new n.EcmaDefinegettersetterbyvalue(e,t,r,i)},t.createEmptyArray=function(){return new n.EcmaCreateemptyarray},t.createArrayWithBuffer=function(e){return new n.EcmaCreatearraywithbuffer(new n.Imm(e))},t.storeArraySpread=function(e,t){return new n.EcmaStarrayspread(e,t)},t.defineClassWithBuffer=function(e,t,r,i,a){return new n.EcmaDefineclasswithbuffer(e,new n.Imm(t),new n.Imm(r),i,a)},t.createObjectWithExcludedKeys=function(e,t){return new n.EcmaCreateobjectwithexcludedkeys(new n.Imm(t.length-1),e,t)},t.throwObjectNonCoercible=function(){return new n.EcmaThrowpatternnoncoercible},t.throwIfNotObject=function(e){return new n.EcmaThrowifnotobject(e)},t.getIterator=function(){return new n.EcmaGetiterator},t.getIteratorNext=function(e,t){return new n.EcmaGetiteratornext(e,t)},t.closeIterator=function(e){return new n.EcmaCloseiterator(e)},t.superCall=function(e,t){return new n.EcmaSupercall(new n.Imm(e),t)},t.superCallSpread=function(e){return new n.EcmaSupercallspread(e)},t.ldSuperByName=function(e,t){return new n.EcmaLdsuperbyname(t,e)},t.stSuperByName=function(e,t){return new n.EcmaStsuperbyname(t,e)},t.stSuperByValue=function(e,t){return new n.EcmaStsuperbyvalue(e,t)},t.ldSuperByValue=function(e,t){return new n.EcmaLdsuperbyvalue(e,t)},t.importModule=function(e){return new n.EcmaImportmodule(e)},t.loadModuleVarByName=function(e,t){return new n.EcmaLdmodvarbyname(e,t)},t.storeModuleVariable=function(e){return new n.EcmaStmodulevar(e)},t.copyModuleIntoCurrentModule=function(e){return new n.EcmaCopymodule(e)},t.loadHomeObject=function(){return new n.EcmaLdhomeobject},t.defineFunc=function(e,t,r){return new n.EcmaDefinefuncdyn(e,new n.Imm(r),t)},t.defineAsyncFunc=function(e,t,r){return new n.EcmaDefineasyncfunc(e,new n.Imm(r),t)},t.defineGeneratorFunc=function(e,t,r){return new n.EcmaDefinegeneratorfunc(e,new n.Imm(r),t)},t.defineNCFunc=function(e,t,r){return new n.EcmaDefinencfuncdyn(e,new n.Imm(r),t)},t.defineMethod=function(e,t,r){return new n.EcmaDefinemethod(e,new n.Imm(r),t)},t.isTrue=function(){return new n.EcmaIstrue},t.isFalse=function(){return new n.EcmaIsfalse},t.createRegExpWithLiteral=function(e,t){return new n.EcmaCreateregexpwithliteral(e,new n.Imm(t))},t.stLetToGlobalRecord=function(e){return new n.EcmaStlettoglobalrecord(e)},t.stConstToGlobalRecord=function(e){return new n.EcmaStconsttoglobalrecord(e)},t.stClassToGlobalRecord=function(e){return new n.EcmaStclasstoglobalrecord(e)},t.loadAccumulatorBigInt=function(e){return new n.EcmaLdbigint(e)}},"./src/base/builtIn.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expandFunc=t.expandFalse=t.expandTrue=t.expandNull=t.expandSymbol=t.expandUndefined=t.expandGlobal=t.expandInfinity=t.expandNaN=t.expandHole=void 0;const n=r("./src/irnodes.ts"),i=r("./src/base/vregisterCache.ts");t.expandHole=function(e){let t=(0,i.getVregisterCache)(e,i.CacheList.HOLE);return[new n.EcmaLdhole,new n.StaDyn(t)]},t.expandNaN=function(e){let t=(0,i.getVregisterCache)(e,i.CacheList.NaN);return[new n.EcmaLdnan,new n.StaDyn(t)]},t.expandInfinity=function(e){let t=(0,i.getVregisterCache)(e,i.CacheList.Infinity);return[new n.EcmaLdinfinity,new n.StaDyn(t)]},t.expandGlobal=function(e){let t=(0,i.getVregisterCache)(e,i.CacheList.Global);return[new n.EcmaLdglobal,new n.StaDyn(t)]},t.expandUndefined=function(e){let t=(0,i.getVregisterCache)(e,i.CacheList.undefined);return[new n.EcmaLdundefined,new n.StaDyn(t)]},t.expandSymbol=function(e){let t=(0,i.getVregisterCache)(e,i.CacheList.Symbol);return[new n.EcmaLdsymbol,new n.StaDyn(t)]},t.expandNull=function(e){let t=(0,i.getVregisterCache)(e,i.CacheList.Null);return[new n.EcmaLdnull,new n.StaDyn(t)]},t.expandTrue=function(e){let t=(0,i.getVregisterCache)(e,i.CacheList.True);return[new n.EcmaLdtrue,new n.StaDyn(t)]},t.expandFalse=function(e){let t=(0,i.getVregisterCache)(e,i.CacheList.False);return[new n.EcmaLdfalse,new n.StaDyn(t)]},t.expandFunc=function(e){let t=(0,i.getVregisterCache)(e,i.CacheList.FUNC);return[new n.EcmaLdfunction,new n.StaDyn(t)]}},"./src/base/iterator.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Iterator=void 0,t.Iterator=class{constructor(e,t,r,n,i){this.iterRecord=e,this.iterDone=t,this.iterValue=r,this.pandaGen=n,this.node=i}getIterator(){let e=this.pandaGen,t=this.iterRecord.iterator;e.getIterator(this.node),e.storeAccumulator(this.node,t),e.loadObjProperty(this.node,t,"next"),e.storeAccumulator(this.node,this.iterRecord.nextMethod)}callNext(e){this.pandaGen.getIteratorNext(this.node,this.iterRecord.iterator,this.iterRecord.nextMethod),this.pandaGen.storeAccumulator(this.node,e)}iteratorComplete(e){this.pandaGen.loadObjProperty(this.node,e,"done"),this.pandaGen.storeAccumulator(this.node,this.iterDone)}iteratorValue(e){this.pandaGen.loadObjProperty(this.node,e,"value"),this.pandaGen.storeAccumulator(this.node,this.iterValue)}close(){this.pandaGen.closeIterator(this.node,this.iterRecord.iterator)}getCurrentValue(){return this.iterValue}getCurrrentDone(){return this.iterDone}}},"./src/base/lexEnv.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expandLexEnv=void 0;const n=r("./src/cmdOptions.ts"),i=r("./src/base/bcGenUtil.ts"),a=r("./src/base/vregisterCache.ts");t.expandLexEnv=function(e){let t,r=e.getScope().getNearestVariableScope();if(!r)throw new Error("pandagen must have one variable scope");return t=r.need2CreateLexEnv()?function(e,t){let r,o=t.getNumLexEnv(),s=[],c=t.getLexVarInfo();return n.CmdOptions.isDebugMode()&&(r=e.appendScopeInfo(c)),s.push((0,i.newLexicalEnv)(o,r),(0,i.storeAccumulator)((0,a.getVregisterCache)(e,a.CacheList.LexEnv))),s}(e,r):function(e){let t=[];return t.push((0,i.loadLexicalEnv)(),(0,i.storeAccumulator)((0,a.getVregisterCache)(e,a.CacheList.LexEnv))),t}(e),t}},"./src/base/literal.ts":(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LiteralBuffer=t.Literal=t.LiteralTag=void 0,(r=t.LiteralTag||(t.LiteralTag={}))[r.BOOLEAN=1]="BOOLEAN",r[r.INTEGER=2]="INTEGER",r[r.DOUBLE=4]="DOUBLE",r[r.STRING=5]="STRING",r[r.METHOD=6]="METHOD",r[r.GENERATOR=7]="GENERATOR",r[r.ACCESSOR=8]="ACCESSOR",r[r.METHODAFFILIATE=9]="METHODAFFILIATE",r[r.NULLVALUE=255]="NULLVALUE",t.Literal=class{constructor(e,t){this.t=e,this.v=t}getTag(){return this.t}getValue(){return this.v}},t.LiteralBuffer=class{constructor(){this.lb=[]}addLiterals(...e){this.lb.push(...e)}getLiterals(){return this.lb}isEmpty(){return 0==this.lb.length}getLiteral(e){if(!(e>=this.lb.length||this.lb.length<=0))return this.lb[e]}}},"./src/base/lreference.ts":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LReference=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/compilerUtils.ts"),c=r("./src/diagnostic.ts"),l=r("./src/expression/memberAccessExpression.ts"),u=r("./src/expression/parenthesizedExpression.ts"),_=r("./src/irnodes.ts"),d=a(r("./src/jshelpers.js")),p=r("./src/variable.ts"),f=r("./src/base/util.ts");var g;!function(e){e[e.MemberAccess=0]="MemberAccess",e[e.LocalOrGlobal=1]="LocalOrGlobal",e[e.Destructuring=2]="Destructuring"}(g||(g={}));class m{constructor(e,t,r,n,i){this.obj=void 0,this.prop=void 0,this.propLiteral=void 0,this.node=e,this.compiler=t,this.isDeclaration=r,this.refKind=n,n==g.Destructuring?this.destructuringTarget=e:n==g.LocalOrGlobal?this.variable=i:n==g.MemberAccess&&(this.obj=t.getPandaGen().getTemp(),this.prop=t.getPandaGen().getTemp())}getValue(){let e=this.compiler.getPandaGen();switch(this.refKind){case g.MemberAccess:let t;return t=void 0===this.propLiteral?this.prop:this.propLiteral,void e.loadObjProperty(this.node,this.obj,t);case g.LocalOrGlobal:return void this.compiler.loadTarget(this.node,this.variable);case g.Destructuring:throw new Error("Destructuring target can't be loaded");default:throw new Error("Invalid LReference kind to GetValue")}}setValue(){let e=this.compiler.getPandaGen();switch(this.refKind){case g.MemberAccess:{let t;if(t=void 0===this.propLiteral?this.prop:this.propLiteral,d.isSuperProperty(this.node)){let r=e.getTemp();this.compiler.getThis(this.node,r),e.storeSuperProperty(this.node,r,t),e.freeTemps(r)}else e.storeObjProperty(this.node,this.obj,t);return void e.freeTemps(this.obj,this.prop)}case g.LocalOrGlobal:return void this.compiler.storeTarget(this.node,this.variable,this.isDeclaration);case g.Destructuring:return void(0,s.compileDestructuring)(this.destructuringTarget,e,this.compiler);default:throw new Error("Invalid LReference kind to SetValue")}}setObjectAndProperty(e,t,r){d.isSuperProperty(this.node)||e.moveVreg(this.node,this.obj,t),r instanceof _.VReg?e.moveVreg(this.node,this.prop,r):this.propLiteral=r}static generateLReference(e,t,r){let n=e.getPandaGen(),i=t;if(o.isParenthesizedExpression(t)&&(i=(0,u.findInnerExprOfParenthesis)(t)),o.isIdentifier(i)){let t=d.getTextOfIdentifierOrLiteral(i),n=e.getCurrentScope().find(t);return n.v||(n.v=e.getCurrentScope().add(t,p.VarDeclarationKind.NONE)),new m(i,e,r,g.LocalOrGlobal,n)}if(o.isPropertyAccessExpression(i)||o.isElementAccessExpression(i)){let t=new m(i,e,!1,g.MemberAccess,void 0),r=n.getTemp(),a=n.getTemp(),{obj:o,prop:s}=(0,l.getObjAndProp)(i,r,a,e);return t.setObjectAndProperty(n,o,s),n.freeTemps(r,a),t}if(o.isVariableDeclarationList(i)){let t=i.declarations;if(1!=t.length)throw new Error("Malformed variable declaration");return m.generateLReference(e,t[0].name,!0)}if((0,f.isBindingOrAssignmentPattern)(i))return new m(i,e,r,g.Destructuring,void 0);throw new c.DiagnosticError(t,c.DiagnosticCode.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access)}}t.LReference=m},"./src/base/properties.ts":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getPropName=t.propertyKeyAsString=t.isConstantExpr=t.generatePropertyFromExpr=t.Property=t.PropertyKind=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/expression/memberAccessExpression.ts"),c=a(r("./src/jshelpers.js"));var l;!function(e){e[e.Variable=0]="Variable",e[e.Constant=1]="Constant",e[e.Computed=2]="Computed",e[e.Prototype=3]="Prototype",e[e.Accessor=4]="Accessor",e[e.Spread=5]="Spread"}(l=t.PropertyKind||(t.PropertyKind={}));class u{constructor(e,t){this.compiled=!1,this.redeclared=!1,this.propKind=e,void 0!==t&&(this.name=t)}setCompiled(){this.compiled=!0}setRedeclared(){this.redeclared=!0}isCompiled(){return this.compiled}isRedeclared(){return this.redeclared}getName(){if(void 0===this.name)throw new Error("this property doesn't have a name");return this.name}getKind(){return this.propKind}getValue(){if(this.propKind==l.Accessor)throw new Error("Accessor doesn't have valueNode");return this.valueNode}getGetter(){return this.getterNode}getSetter(){return this.setterNode}setValue(e){this.valueNode=e,this.getterNode=void 0,this.setterNode=void 0}setGetter(e){this.propKind!=l.Accessor&&(this.valueNode=void 0,this.setterNode=void 0,this.propKind=l.Accessor),this.getterNode=e}setSetter(e){this.propKind!=l.Accessor&&(this.valueNode=void 0,this.getterNode=void 0,this.propKind=l.Accessor),this.setterNode=e}setKind(e){this.propKind=e}}function _(e,t,r,n,i){if(r==l.Computed||r==l.Spread){let i=new u(r,e);i.setValue(t),n.push(i)}else{let a=new u(r,e),s=p(e);if(i.has(s)){let e=n[i.get(s)];if(!(e.getKind()!=l.Accessor&&e.getKind()!=l.Constant||r!=l.Accessor&&r!=l.Constant))return void(r==l.Accessor?o.isGetAccessorDeclaration(t)?e.setGetter(t):o.isSetAccessorDeclaration(t)&&e.setSetter(t):(e.setValue(t),e.setKind(l.Constant)));a.setRedeclared()}i.set(s,n.length),r==l.Accessor?o.isGetAccessorDeclaration(t)?a.setGetter(t):o.isSetAccessorDeclaration(t)&&a.setSetter(t):a.setValue(t),n.push(a)}}function d(e){switch(e.kind){case o.SyntaxKind.StringLiteral:case o.SyntaxKind.NumericLiteral:case o.SyntaxKind.NullKeyword:case o.SyntaxKind.TrueKeyword:case o.SyntaxKind.FalseKeyword:return!0;default:return!1}}function p(e){return"number"==typeof e?e.toString():e}function f(e){if(o.isComputedPropertyName(e))return e;let t=c.getTextOfIdentifierOrLiteral(e);if(e.kind==o.SyntaxKind.NumericLiteral)t=Number.parseFloat(t),(0,s.isValidIndex)(t)||(t=t.toString());else if(e.kind==o.SyntaxKind.StringLiteral){let e=Number(t);isNaN(Number.parseFloat(t))||isNaN(e)||!(0,s.isValidIndex)(e)||String(e)!=t||(t=e)}return t}t.Property=u,t.generatePropertyFromExpr=function(e){let t=!1,r=[],n=new Map;return e.properties.forEach((e=>{switch(e.kind){case o.SyntaxKind.PropertyAssignment:{if(e.name.kind==o.SyntaxKind.ComputedPropertyName){_(e.name,e,l.Computed,r,n);break}let i=f(e.name);if("__proto__"==i){if(t)throw new Error("__proto__ was set multiple times in the object definition.");_(i,e.initializer,l.Prototype,r,n),t=!0;break}d(e.initializer)?_(i,e.initializer,l.Constant,r,n):_(i,e.initializer,l.Variable,r,n);break}case o.SyntaxKind.ShorthandPropertyAssignment:_(c.getTextOfIdentifierOrLiteral(e.name),e.name,l.Variable,r,n);break;case o.SyntaxKind.SpreadAssignment:_(void 0,e.expression,l.Spread,r,n);break;case o.SyntaxKind.MethodDeclaration:{let t=f(e.name);_(t,e,"string"==typeof t||"number"==typeof t?l.Variable:l.Computed,r,n);break}case o.SyntaxKind.GetAccessor:case o.SyntaxKind.SetAccessor:{let t=f(e.name);_(t,e,"string"==typeof t||"number"==typeof t?l.Accessor:l.Computed,r,n);break}default:throw new Error("Unreachable Kind")}})),r},t.isConstantExpr=d,t.propertyKeyAsString=p,t.getPropName=f},"./src/base/typeSystem.ts":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.InterfaceType=t.ObjectType=t.ArrayType=t.UnionType=t.ExternalType=t.FunctionType=t.ClassInstType=t.ClassType=t.TypeSummary=t.PlaceHolderType=t.BaseType=t.AccessFlag=t.ModifierReadonly=t.ModifierStatic=t.ModifierAbstract=t.L2Type=t.PrimitiveType=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=a(r("./src/jshelpers.js")),c=r("./src/pandagen.ts"),l=r("./src/typeChecker.ts"),u=r("./src/typeRecorder.ts"),_=r("./src/base/literal.ts");var d,p,f,g,m,y;!function(e){e[e.ANY=0]="ANY",e[e.NUMBER=1]="NUMBER",e[e.BOOLEAN=2]="BOOLEAN",e[e.VOID=3]="VOID",e[e.STRING=4]="STRING",e[e.SYMBOL=5]="SYMBOL",e[e.NULL=6]="NULL",e[e.UNDEFINED=7]="UNDEFINED",e[e.INT=8]="INT",e[e._LENGTH=50]="_LENGTH"}(d=t.PrimitiveType||(t.PrimitiveType={})),function(e){e[e._COUNTER=0]="_COUNTER",e[e.CLASS=1]="CLASS",e[e.CLASSINST=2]="CLASSINST",e[e.FUNCTION=3]="FUNCTION",e[e.UNION=4]="UNION",e[e.ARRAY=5]="ARRAY",e[e.OBJECT=6]="OBJECT",e[e.EXTERNAL=7]="EXTERNAL",e[e.INTERFACE=8]="INTERFACE"}(p=t.L2Type||(t.L2Type={})),function(e){e[e.NONABSTRACT=0]="NONABSTRACT",e[e.ABSTRACT=1]="ABSTRACT"}(f=t.ModifierAbstract||(t.ModifierAbstract={})),function(e){e[e.NONSTATIC=0]="NONSTATIC",e[e.STATIC=1]="STATIC"}(g=t.ModifierStatic||(t.ModifierStatic={})),function(e){e[e.NONREADONLY=0]="NONREADONLY",e[e.READONLY=1]="READONLY"}(m=t.ModifierReadonly||(t.ModifierReadonly={})),function(e){e[e.PUBLIC=0]="PUBLIC",e[e.PRIVATE=1]="PRIVATE",e[e.PROTECTED=2]="PROTECTED"}(y=t.AccessFlag||(t.AccessFlag={}));class h{constructor(){this.typeChecker=l.TypeChecker.getInstance(),this.typeRecorder=u.TypeRecorder.getInstance()}addCurrentType(e,t){this.typeRecorder.addType2Index(e,t)}setVariable2Type(e,t){this.typeRecorder.setVariable2Type(e,t)}tryGetTypeIndex(e){return this.typeRecorder.tryGetTypeIndex(e)}getOrCreateRecordForDeclNode(e,t){return this.typeChecker.getOrCreateRecordForDeclNode(e,t)}getOrCreateRecordForTypeNode(e,t){return this.typeChecker.getOrCreateRecordForTypeNode(e,t)}getIndexFromTypeArrayBuffer(e){return c.PandaGen.appendTypeArrayBuffer(e)}setTypeArrayBuffer(e,t){c.PandaGen.setTypeArrayBuffer(e,t)}}t.BaseType=h;class v extends h{transfer2LiteralBuffer(){return new _.LiteralBuffer}}t.PlaceHolderType=v,t.TypeSummary=class extends h{constructor(){super(),this.preservedIndex=0,this.userDefinedClassNum=0,this.anonymousRedirect=new Array,this.preservedIndex=this.getIndexFromTypeArrayBuffer(new v)}setInfo(e,t){this.userDefinedClassNum=e,this.anonymousRedirect=t,this.setTypeArrayBuffer(this,this.preservedIndex)}transfer2LiteralBuffer(){let e=new _.LiteralBuffer,t=new Array;t.push(new _.Literal(_.LiteralTag.INTEGER,p._COUNTER)),t.push(new _.Literal(_.LiteralTag.INTEGER,this.userDefinedClassNum)),t.push(new _.Literal(_.LiteralTag.INTEGER,this.anonymousRedirect.length));for(let e of this.anonymousRedirect)t.push(new _.Literal(_.LiteralTag.STRING,e));return e.addLiterals(...t),e}},t.ClassType=class extends h{constructor(e){super(),this.modifier=f.NONABSTRACT,this.extendsHeritage=d.ANY,this.implementsHeritages=new Array,this.staticFields=new Map,this.staticMethods=new Map,this.fields=new Map,this.methods=new Map,this.typeIndex=this.getIndexFromTypeArrayBuffer(new v),this.shiftedTypeIndex=this.typeIndex+d._LENGTH,this.addCurrentType(e,this.shiftedTypeIndex),this.fillInModifiers(e),this.fillInHeritages(e),this.fillInFieldsAndMethods(e),this.setTypeArrayBuffer(this,this.typeIndex)}fillInModifiers(e){if(e.modifiers)for(let t of e.modifiers)t.kind===o.SyntaxKind.AbstractKeyword&&(this.modifier=f.ABSTRACT)}fillInHeritages(e){if(e.heritageClauses)for(let t of e.heritageClauses){let e=t.getText();for(let r of t.types){let t=r.expression,n=this.getOrCreateRecordForDeclNode(t,t);e.startsWith("extends ")?this.extendsHeritage=n:e.startsWith("implements ")&&this.implementsHeritages.push(n)}}}fillInFields(e){let t=s.getTextOfIdentifierOrLiteral(e.name),r=Array(d.ANY,y.PUBLIC,m.NONREADONLY),n=!1;if(e.modifiers)for(let t of e.modifiers)switch(t.kind){case o.SyntaxKind.StaticKeyword:n=!0;break;case o.SyntaxKind.PrivateKeyword:r[1]=y.PRIVATE;break;case o.SyntaxKind.ProtectedKeyword:r[1]=y.PROTECTED;break;case o.SyntaxKind.ReadonlyKeyword:r[2]=m.READONLY}let i=e.type,a=e.name;r[0]=this.getOrCreateRecordForTypeNode(i,a),n?this.staticFields.set(t,r):this.fields.set(t,r)}fillInMethods(e){let t=e.name?e.name:void 0,r=new b(e);t&&this.setVariable2Type(t,r.shiftedTypeIndex);let n=this.tryGetTypeIndex(e);r.getModifier()?this.staticMethods.set(r.getFunctionName(),n):this.methods.set(r.getFunctionName(),n)}fillInFieldsAndMethods(e){if(e.members)for(let t of e.members)switch(t.kind){case o.SyntaxKind.MethodDeclaration:case o.SyntaxKind.Constructor:case o.SyntaxKind.GetAccessor:case o.SyntaxKind.SetAccessor:this.fillInMethods(t);break;case o.SyntaxKind.PropertyDeclaration:this.fillInFields(t)}}transfer2LiteralBuffer(){let e=new _.LiteralBuffer,t=new Array;return t.push(new _.Literal(_.LiteralTag.INTEGER,p.CLASS)),t.push(new _.Literal(_.LiteralTag.INTEGER,this.modifier)),t.push(new _.Literal(_.LiteralTag.INTEGER,this.extendsHeritage)),t.push(new _.Literal(_.LiteralTag.INTEGER,this.implementsHeritages.length)),this.implementsHeritages.forEach((e=>{t.push(new _.Literal(_.LiteralTag.INTEGER,e))})),this.transferFields2Literal(t,!1),this.transferMethods2Literal(t,!1),this.transferFields2Literal(t,!0),this.transferMethods2Literal(t,!0),e.addLiterals(...t),e}transferFields2Literal(e,t){let r=t?this.staticFields:this.fields;e.push(new _.Literal(_.LiteralTag.INTEGER,r.size)),r.forEach(((t,r)=>{e.push(new _.Literal(_.LiteralTag.STRING,r)),e.push(new _.Literal(_.LiteralTag.INTEGER,t[0])),e.push(new _.Literal(_.LiteralTag.INTEGER,t[1])),e.push(new _.Literal(_.LiteralTag.INTEGER,t[2]))}))}transferMethods2Literal(e,t){let r=t?this.staticMethods:this.methods;e.push(new _.Literal(_.LiteralTag.INTEGER,r.size)),r.forEach(((t,r)=>{e.push(new _.Literal(_.LiteralTag.STRING,r)),e.push(new _.Literal(_.LiteralTag.INTEGER,t))}))}},t.ClassInstType=class extends h{constructor(e){super(),this.shiftedReferredClassIndex=e,this.typeIndex=this.getIndexFromTypeArrayBuffer(this),this.shiftedTypeIndex=this.typeIndex+d._LENGTH,this.typeRecorder.setClass2InstanceMap(this.shiftedReferredClassIndex,this.shiftedTypeIndex)}transfer2LiteralBuffer(){let e=new _.LiteralBuffer,t=new Array;return t.push(new _.Literal(_.LiteralTag.INTEGER,p.CLASSINST)),t.push(new _.Literal(_.LiteralTag.INTEGER,this.shiftedReferredClassIndex)),e.addLiterals(...t),e}};class b extends h{constructor(e){super(),this.name="",this.accessFlag=y.PUBLIC,this.modifierStatic=g.NONSTATIC,this.parameters=new Array,this.returnType=d.ANY,this.typeIndex=this.getIndexFromTypeArrayBuffer(new v),this.shiftedTypeIndex=this.typeIndex+d._LENGTH,this.addCurrentType(e,this.shiftedTypeIndex),e.name?this.name=s.getTextOfIdentifierOrLiteral(e.name):this.name="constructor",this.fillInModifiers(e),this.fillInParameters(e),this.fillInReturn(e),this.setTypeArrayBuffer(this,this.typeIndex)}getFunctionName(){return this.name}fillInModifiers(e){if(e.modifiers)for(let t of e.modifiers)switch(t.kind){case o.SyntaxKind.PrivateKeyword:this.accessFlag=y.PRIVATE;break;case o.SyntaxKind.ProtectedKeyword:this.accessFlag=y.PROTECTED;break;case o.SyntaxKind.StaticKeyword:this.modifierStatic=g.STATIC}}fillInParameters(e){if(e.parameters)for(let t of e.parameters){let e=t.type,r=t.name,n=this.getOrCreateRecordForTypeNode(e,r);this.parameters.push(n)}}fillInReturn(e){let t=e.type,r=this.getOrCreateRecordForTypeNode(t,t);this.returnType=r}getModifier(){return this.modifierStatic}transfer2LiteralBuffer(){let e=new _.LiteralBuffer,t=new Array;return t.push(new _.Literal(_.LiteralTag.INTEGER,p.FUNCTION)),t.push(new _.Literal(_.LiteralTag.INTEGER,this.accessFlag)),t.push(new _.Literal(_.LiteralTag.INTEGER,this.modifierStatic)),t.push(new _.Literal(_.LiteralTag.STRING,this.name)),t.push(new _.Literal(_.LiteralTag.INTEGER,this.parameters.length)),this.parameters.forEach((e=>{t.push(new _.Literal(_.LiteralTag.INTEGER,e))})),t.push(new _.Literal(_.LiteralTag.INTEGER,this.returnType)),e.addLiterals(...t),e}}t.FunctionType=b,t.ExternalType=class extends h{constructor(e,t){super(),this.fullRedirectNath=`#${e}#${t}`,this.typeIndex=this.getIndexFromTypeArrayBuffer(this),this.shiftedTypeIndex=this.typeIndex+d._LENGTH}transfer2LiteralBuffer(){let e=new _.LiteralBuffer,t=new Array;return t.push(new _.Literal(_.LiteralTag.INTEGER,p.EXTERNAL)),t.push(new _.Literal(_.LiteralTag.STRING,this.fullRedirectNath)),e.addLiterals(...t),e}},t.UnionType=class extends h{constructor(e){super(),this.unionedTypeArray=[],this.typeIndex=d.ANY,this.shiftedTypeIndex=d.ANY,this.setOrReadFromArrayRecord(e)}setOrReadFromArrayRecord(e){let t=e.getText();this.hasUnionTypeMapping(t)?this.shiftedTypeIndex=this.getFromUnionTypeMap(t):(this.typeIndex=this.getIndexFromTypeArrayBuffer(new v),this.shiftedTypeIndex=this.typeIndex+d._LENGTH,this.fillInUnionArray(e,this.unionedTypeArray),this.setUnionTypeMap(t,this.shiftedTypeIndex),this.setTypeArrayBuffer(this,this.typeIndex))}hasUnionTypeMapping(e){return this.typeRecorder.hasUnionTypeMapping(e)}getFromUnionTypeMap(e){return this.typeRecorder.getFromUnionTypeMap(e)}setUnionTypeMap(e,t){return this.typeRecorder.setUnionTypeMap(e,t)}fillInUnionArray(e,t){for(let r of e.types){let e=r,n=this.getOrCreateRecordForTypeNode(e,e);t.push(n)}}transfer2LiteralBuffer(){let e=new _.LiteralBuffer,t=new Array;t.push(new _.Literal(_.LiteralTag.INTEGER,p.UNION)),t.push(new _.Literal(_.LiteralTag.INTEGER,this.unionedTypeArray.length));for(let e of this.unionedTypeArray)t.push(new _.Literal(_.LiteralTag.INTEGER,e));return e.addLiterals(...t),e}},t.ArrayType=class extends h{constructor(e){super(),this.referedTypeIndex=d.ANY,this.typeIndex=d.ANY,this.shiftedTypeIndex=d.ANY;let t=e.elementType;this.referedTypeIndex=this.getOrCreateRecordForTypeNode(t,t),this.setOrReadFromArrayRecord()}setOrReadFromArrayRecord(){this.hasArrayTypeMapping(this.referedTypeIndex)?this.shiftedTypeIndex=this.getFromArrayTypeMap(this.referedTypeIndex):(this.typeIndex=this.getIndexFromTypeArrayBuffer(this),this.shiftedTypeIndex=this.typeIndex+d._LENGTH,this.setTypeArrayBuffer(this,this.typeIndex),this.setArrayTypeMap(this.referedTypeIndex,this.shiftedTypeIndex))}hasArrayTypeMapping(e){return this.typeRecorder.hasArrayTypeMapping(e)}getFromArrayTypeMap(e){return this.typeRecorder.getFromArrayTypeMap(e)}setArrayTypeMap(e,t){return this.typeRecorder.setArrayTypeMap(e,t)}transfer2LiteralBuffer(){let e=new _.LiteralBuffer,t=new Array;return t.push(new _.Literal(_.LiteralTag.INTEGER,p.ARRAY)),t.push(new _.Literal(_.LiteralTag.INTEGER,this.referedTypeIndex)),e.addLiterals(...t),e}},t.ObjectType=class extends h{constructor(e){super(),this.properties=new Map,this.typeIndex=d.ANY,this.shiftedTypeIndex=d.ANY,this.typeIndex=this.getIndexFromTypeArrayBuffer(new v),this.shiftedTypeIndex=this.typeIndex+d._LENGTH,this.fillInMembers(e),this.setTypeArrayBuffer(this,this.typeIndex)}fillInMembers(e){for(let t of e.members){let e=t,r=t.name?t.name.getText():"#undefined",n=this.getOrCreateRecordForTypeNode(e.type,t.name);this.properties.set(r,n)}}transfer2LiteralBuffer(){let e=new _.LiteralBuffer,t=new Array;return t.push(new _.Literal(_.LiteralTag.INTEGER,p.OBJECT)),t.push(new _.Literal(_.LiteralTag.INTEGER,this.properties.size)),this.properties.forEach(((e,r)=>{t.push(new _.Literal(_.LiteralTag.STRING,r)),t.push(new _.Literal(_.LiteralTag.INTEGER,e))})),e.addLiterals(...t),e}},t.InterfaceType=class extends h{constructor(e){super(),this.heritages=new Array,this.fields=new Map,this.methods=new Array,this.typeIndex=this.getIndexFromTypeArrayBuffer(new v),this.shiftedTypeIndex=this.typeIndex+d._LENGTH,this.addCurrentType(e,this.shiftedTypeIndex),this.fillInHeritages(e),this.fillInFieldsAndMethods(e),this.setTypeArrayBuffer(this,this.typeIndex)}fillInHeritages(e){if(e.heritageClauses)for(let t of e.heritageClauses)for(let e of t.types){let t=e.expression,r=this.getOrCreateRecordForDeclNode(t,t);this.heritages.push(r)}}fillInFields(e){let t=s.getTextOfIdentifierOrLiteral(e.name),r=Array(d.ANY,y.PUBLIC,m.NONREADONLY);if(e.modifiers)for(let t of e.modifiers)switch(t.kind){case o.SyntaxKind.PrivateKeyword:r[1]=y.PRIVATE;break;case o.SyntaxKind.ProtectedKeyword:r[1]=y.PROTECTED;break;case o.SyntaxKind.ReadonlyKeyword:r[2]=m.READONLY}let n=e.type,i=e.name;r[0]=this.getOrCreateRecordForTypeNode(n,i),this.fields.set(t,r)}fillInMethods(e){let t=e.name?e.name:void 0,r=new b(e);t&&this.setVariable2Type(t,r.shiftedTypeIndex);let n=this.tryGetTypeIndex(e);this.methods.push(n)}fillInFieldsAndMethods(e){if(e.members)for(let t of e.members)switch(t.kind){case o.SyntaxKind.MethodSignature:this.fillInMethods(t);break;case o.SyntaxKind.PropertySignature:this.fillInFields(t)}}transfer2LiteralBuffer(){let e=new _.LiteralBuffer,t=new Array;return t.push(new _.Literal(_.LiteralTag.INTEGER,p.INTERFACE)),t.push(new _.Literal(_.LiteralTag.INTEGER,this.heritages.length)),this.heritages.forEach((e=>{t.push(new _.Literal(_.LiteralTag.INTEGER,e))})),this.transferFields2Literal(t),this.transferMethods2Literal(t),e.addLiterals(...t),e}transferFields2Literal(e){let t=this.fields;e.push(new _.Literal(_.LiteralTag.INTEGER,t.size)),t.forEach(((t,r)=>{e.push(new _.Literal(_.LiteralTag.STRING,r)),e.push(new _.Literal(_.LiteralTag.INTEGER,t[0])),e.push(new _.Literal(_.LiteralTag.INTEGER,t[1])),e.push(new _.Literal(_.LiteralTag.INTEGER,t[2]))}))}transferMethods2Literal(e){let t=this.methods;e.push(new _.Literal(_.LiteralTag.INTEGER,t.length)),t.forEach((t=>{e.push(new _.Literal(_.LiteralTag.INTEGER,t))}))}}},"./src/base/util.ts":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getDtsFiles=t.isBase64Str=t.setPos=t.getRangeStartVregPos=t.getParameterLength4Ctor=t.getParamLengthOfFunc=t.isRestParameter=t.getRangeExplicitVregNums=t.isRangeInst=t.listenErrorEvent=t.listenChildExit=t.terminateWritePipe=t.initiateTs2abc=t.escapeUnicode=t.isAnonymousFunctionDefinition=t.isUndefinedIdentifier=t.isMemberExpression=t.isBindingOrAssignmentPattern=t.isArrayBindingOrAssignmentPattern=t.isObjectBindingOrAssignmentPattern=t.isBindingPattern=t.addUnicodeEscape=t.execute=t.setVariableExported=t.hasDefaultKeywordModifier=t.hasExportKeywordModifier=t.containSpreadElement=void 0;const o=a(r("fs")),s=a(r("path")),c=a(r("./node_modules/typescript/lib/typescript.js")),l=r("./src/statement/classStatement.ts"),u=r("./src/irnodes.ts"),_=a(r("./src/jshelpers.js")),d=r("./src/log.ts"),p=r("./src/scope.ts"),f=r("./src/syntaxCheckHelper.ts");function g(e){let t=0,r=0,n=e.length,i="";for(;r!=n;)"\\"==e[r]&&r+1!=n&&"u"==e[r+1]?(0!=r&&"\\"==e[r-1]?i+=e.substr(t,r-t)+"\\\\\\u":i+=e.substr(t,r-t)+"\\\\u",r+=2,t=r):r++;return r==n&&t!=r&&(i+=e.substr(t)),i}function m(e){return c.isObjectLiteralExpression(e)||c.isObjectBindingPattern(e)}function y(e){return c.isArrayLiteralExpression(e)||c.isArrayBindingPattern(e)}function h(e){return e instanceof u.EcmaCallithisrangedyn||e instanceof u.EcmaCallirangedyn||e instanceof u.EcmaNewobjdynrange||e instanceof u.EcmaCreateobjectwithexcludedkeys}function v(e){return!!e.dotDotDotToken}function b(e){let t=0,r=!0,n=e.parameters;return n&&n.forEach((e=>{(e.initializer||v(e))&&(r=!1),r&&t++})),t}t.containSpreadElement=function(e){if(!e)return!1;for(let t=0;t<e.length;t++)if(e[t].kind===c.SyntaxKind.SpreadElement)return!0;return!1},t.hasExportKeywordModifier=function(e){let t=!1;return e.modifiers&&e.modifiers.forEach((e=>{e.kind==c.SyntaxKind.ExportKeyword&&(t=!0)})),t},t.hasDefaultKeywordModifier=function(e){let t=!1;return e.modifiers&&e.modifiers.forEach((e=>{e.kind==c.SyntaxKind.DefaultKeyword&&(t=!0)})),t},t.setVariableExported=function(e,t){if(!(t instanceof p.ModuleScope))throw new Error("variable can't be exported out of module scope");let r=t.find(e);r.v.setExport(),r.v.setExportedName(e)},t.execute=function(e,t){return(0,r("child_process").spawn)(e,[...t],{stdio:["pipe","inherit","inherit"]}).on("exit",(t=>1===t?((0,d.LOGD)("fail to execute cmd: ",e),0):((0,d.LOGD)("execute cmd successfully: ",e),1))),1},t.addUnicodeEscape=g,t.isBindingPattern=function(e){return c.isArrayBindingPattern(e)||c.isObjectBindingPattern(e)},t.isObjectBindingOrAssignmentPattern=m,t.isArrayBindingOrAssignmentPattern=y,t.isBindingOrAssignmentPattern=function(e){return y(e)||m(e)},t.isMemberExpression=function(e){return!(!c.isPropertyAccessExpression(e)&&!c.isElementAccessExpression(e))},t.isUndefinedIdentifier=function(e){return!!c.isIdentifier(e)&&"undefined"==_.getTextOfIdentifierOrLiteral(e)},t.isAnonymousFunctionDefinition=function(e){return!!(0,f.isFunctionLikeDeclaration)(e)&&!e.name},t.escapeUnicode=function(e){let t=0,r=0,n="";for(;-1!==(r=e.indexOf("\n",t));){let i=e.substring(t,r);-1!=i.indexOf("\\u")&&(i=g(i)),n=n.concat(i,"\n"),t=r+1}return n=n.concat("}\n"),n},t.initiateTs2abc=function(e){let t=s.join(s.resolve(__dirname,"../bin"),"js2abc");return e.unshift("--compile-by-pipe"),(0,r("child_process").spawn)(t,[...e],{stdio:["pipe","inherit","inherit","pipe"]})},t.terminateWritePipe=function(e){e||(0,d.LOGD)("ts2abc is not a valid object"),e.stdio[3].end()},t.listenChildExit=function(e){e||(0,d.LOGD)("child is not a valid object"),e.on("exit",(e=>{1===e&&(0,d.LOGD)("fail to generate panda binary file"),(0,d.LOGD)("success to generate panda binary file")}))},t.listenErrorEvent=function(e){e||(0,d.LOGD)("child is not a valid object"),e.on("error",(e=>{(0,d.LOGD)(e.toString())}))},t.isRangeInst=h,t.getRangeExplicitVregNums=function(e){return h(e)?e instanceof u.EcmaCreateobjectwithexcludedkeys?2:1:-1},t.isRestParameter=v,t.getParamLengthOfFunc=b,t.getParameterLength4Ctor=function(e){if(!(0,l.extractCtorOfClass)(e))return 0;let t,r=e.members;for(let e=0;e<r.length;e++){let n=r[e];c.isConstructorDeclaration(n)&&(t=n)}return b(t)},t.getRangeStartVregPos=function(e){return h(e)?e instanceof u.EcmaCreateobjectwithexcludedkeys?2:1:-1},t.setPos=function e(t){return c.setTextRange(t,{pos:-1,end:-1}),t.forEachChild((t=>{e(t)})),t},t.isBase64Str=function(e){return""!=e&&""!=e.trim()&&Buffer.from(Buffer.from(e,"base64").toString()).toString("base64")==e},t.getDtsFiles=function(e){let t=[];return function e(r){o.readdirSync(r).forEach((function(n,i){let a=s.join(r,n),c=o.statSync(a);!0===c.isDirectory()&&e(a),!0===c.isFile()&&!0===n.endsWith(".d.ts")&&t.push(a)}))}(e),t}},"./src/base/vregisterCache.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getVregisterCache=t.VregisterCache=t.CacheList=void 0;const n=r("./src/irnodes.ts"),i=r("./src/base/builtIn.ts"),a=r("./src/base/lexEnv.ts");var o;!function(e){e[e.MIN=0]="MIN",e[e.NaN=0]="NaN",e[e.HOLE=1]="HOLE",e[e.FUNC=2]="FUNC",e[e[1/0]=3]="Infinity",e[e[void 0]=4]="undefined",e[e.Symbol=5]="Symbol",e[e.Null=6]="Null",e[e.Global=7]="Global",e[e.LexEnv=8]="LexEnv",e[e.True=9]="True",e[e.False=10]="False",e[e.MAX=11]="MAX"}(o=t.CacheList||(t.CacheList={}));let s=new Map([[o.HOLE,i.expandHole],[o.NaN,i.expandNaN],[o.Infinity,i.expandInfinity],[o.undefined,i.expandUndefined],[o.Symbol,i.expandSymbol],[o.Null,i.expandNull],[o.Global,i.expandGlobal],[o.LexEnv,a.expandLexEnv],[o.True,i.expandTrue],[o.False,i.expandFalse],[o.FUNC,i.expandFunc]]);class c{constructor(e){this.flag=!1,this.vreg=void 0,this.expander=e}isNeeded(){return this.flag}getCache(){return this.flag&&this.vreg||(this.flag=!0,this.vreg=new n.VReg),this.vreg}getExpander(){return this.expander}}t.VregisterCache=class{constructor(){this.cache=[];for(let e=o.MIN;e<o.MAX;++e){let t=s.get(e);if(!t)throw new Error("invalid expand handler");this.cache[e]=new c(t)}}getCache(e){if(e<o.MIN||e>o.MAX)throw new Error("invalid builtin index");return this.cache[e]}},t.getVregisterCache=function(e,t){return e.getVregisterCache().getCache(t).getCache()}},"./src/cmdOptions.ts":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CmdOptions=void 0;const o=r("./node_modules/commander/index.js"),s=a(r("path")),c=a(r("./node_modules/typescript/lib/typescript.js")),l=r("./src/log.ts"),u=r("./src/base/util.ts");class _{static initOptions(){this.cmd.option("-m, --modules","compile as module.",!1).option("-l, --debug-log","show info debug log and generate the json file.",!1).option("-a, --dump-assembly","dump assembly to file.",!1).option("-d, --debug","compile with debug info.",!1).option("-w, --debug-add-watch <args...>","watch expression and abc file path in debug mode.",[]).option("-k, --keep-persistent-watch <watchArgs...>","keep persistent watch on js file with watched expression.",[]).option("-s, --show-statistics <items...>","show compile statistics(ast, histogram, hoisting, all).",[""]).option("-o, --output <outputFile>","set output file.","").option("-t, --timeout <time>","js to abc timeout threshold(unit: seconds).","0").option("--opt-log-level <level>","specifie optimizer log level. Possible values: [debug, info, error, fatal]","error").option("--opt-level <level>","Optimization level. Possible values: [0, 1, 2]. Default: 0\n 0: no optimizations\n 1: basic bytecode optimizations, including valueNumber, lowering, constantResolver, regAccAllocator\n 2: other bytecode optimizations, unimplemented yet","1").option("-h, --help","Show usage guide.",!1).option("-v, --bc-version","Print ark bytecode version",!1).option("--bc-min-version","Print ark bytecode minimum supported version",!1).option("-i, --included-files <files...>","The list of dependent files.",[]).option("-p, --record-type","Record type info. Default: true",!1).option("-q, --dts-type-record","Record type info for .d.ts files. Default: false",!1).option("-g, --debug-type","Print type-related log. Default: false",!1).option("--output-type","set output type.",!1).option("--source-file <file>","specify the file path info recorded in generated abc","").option("--generate-tmp-file","whether to generate intermediate temporary files",!1)}static parseUserCmd(e){this.initOptions();let t=this.cmd.parseOptions(process.argv);if(this.options=this.cmd.opts(),this.options.help)return void this.showHelp();if(this.isBcVersion()||this.isBcMinVersion())return void this.getVersion(this.isBcVersion());if(t.operands=t.operands.slice(2),0===t.operands.length&&0===this.getDeamonModeArgs().length&&!this.isWatchEvaluateExpressionMode())return(0,l.LOGE)("options at least one file is needed"),void this.showHelp();let r=(0,u.getDtsFiles)(s.join(__dirname,"../node_modules/typescript/lib"));return this.unknownOpts=c.parseCommandLine(t.operands),this.unknownOpts.fileNames.push(...r),this.unknownOpts}static showHelp(){this.cmd.outputHelp()}static isBcVersion(){return!!this.options&&this.options.bcVersion}static isBcMinVersion(){return!!this.options&&this.options.bcMinVersion}static getVersion(e=!0){let t=s.join(s.resolve(__dirname,"../bin"),"js2abc"),r=e?"--bc-version":"--bc-min-version";(0,u.execute)(`${t}`,[r])}static setWatchEvaluateExpressionArgs(e){this.options.debugAddWatch=e}static getDeamonModeArgs(){return this.options?this.options.keepPersistentWatch:[]}static isWatchEvaluateDeamonMode(){return"start"==_.getDeamonModeArgs()[0]}static isStopEvaluateDeamonMode(){return"stop"==_.getDeamonModeArgs()[0]}static getEvaluateDeamonPath(){return _.getDeamonModeArgs()[1]}static isWatchEvaluateExpressionMode(){return!!this.options&&0!=this.options.debugAddWatch.length}static getEvaluateExpression(){return this.options.debugAddWatch[0]}static getWatchJsPath(){return this.options.debugAddWatch[1]}static getWatchTimeOutValue(){return 2==this.options.debugAddWatch.length?0:this.options.debugAddWatch[2]}static getIncludedFiles(){return this.options?this.options.includedFiles:[]}static getInputFileName(){let e=this.unknownOpts.fileNames[0];return e.substring(0,e.lastIndexOf("."))}static getOutputBinName(){let e=this.options.output;return""==e&&(e=_.getInputFileName()+".abc"),e}static needRecordType(){return!!this.options&&!this.options.recordType}static needRecordDtsType(){return!!this.options&&this.options.dtsTypeRecord}static isAssemblyMode(){return!!this.options&&this.options.dumpAssembly}static isEnableDebugLog(){return!!this.options&&this.options.debugLog}static isDebugMode(){return!!this.options&&this.options.debug}static isModules(){return!!this.options&&this.options.modules}static getOptLevel(){return this.options?Number.parseFloat(this.options.optLevel):0}static getOptLogLevel(){return this.options?this.options.optLogLevel:""}static showASTStatistics(){return!!this.options&&(this.options.showStatistics.includes("ast")||this.options.showStatistics.includes("all"))}static showHistogramStatistics(){return!!this.options&&(this.options.showStatistics.includes("histogram")||this.options.showStatistics.includes("all"))}static showHoistingStatistics(){return!!this.options&&(this.options.showStatistics.includes("hoisting")||this.options.showStatistics.includes("all"))}static getTimeOut(){return this.options?Number.parseFloat(this.options.timeout):0}static isOutputType(){return!!this.options&&this.options.outputType}static enableTypeLog(){return!!this.options&&this.options.debugType}static getSourceFile(){return this.options?this.options.sourceFile:""}static needGenerateTmpFile(){return!!this.options&&this.options.generateTmpFile}}t.CmdOptions=_,_.cmd=new o.Command,_.options=void 0},"./src/compiler.ts":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Compiler=t.ControlFlowChange=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=a(r("./src/astutils.ts")),c=r("./src/base/lreference.ts"),l=r("./src/base/util.ts"),u=r("./src/base/vregisterCache.ts"),_=r("./src/cmdOptions.ts"),d=r("./src/debuginfo.ts"),p=r("./src/diagnostic.ts"),f=r("./src/expression/arrayLiteralExpression.ts"),g=r("./src/expression/bigIntLiteral.ts"),m=r("./src/expression/callExpression.ts"),y=r("./src/expression/memberAccessExpression.ts"),h=r("./src/expression/metaProperty.ts"),v=r("./src/expression/newExpression.ts"),b=r("./src/expression/numericLiteral.ts"),x=r("./src/expression/objectLiteralExpression.ts"),D=r("./src/expression/parenthesizedExpression.ts"),S=r("./src/expression/regularExpression.ts"),E=r("./src/expression/stringLiteral.ts"),T=r("./src/expression/templateExpression.ts"),C=r("./src/expression/yieldExpression.ts"),k=r("./src/function/asyncFunctionBuilder.ts"),A=r("./src/function/functionBuilder.ts"),N=r("./src/function/generatorFunctionBuilder.ts"),F=r("./src/hoisting.ts"),w=r("./src/irnodes.ts"),P=a(r("./src/jshelpers.js")),I=r("./src/log.ts"),O=r("./src/scope.ts"),L=r("./src/statement/classStatement.ts"),M=r("./src/statement/forOfStatement.ts"),R=r("./src/statement/labelTarget.ts"),B=r("./src/statement/loopStatement.ts"),j=r("./src/statement/returnStatement.ts"),J=r("./src/statement/switchStatement.ts"),V=r("./src/statement/tryStatement.ts"),U=r("./src/strictMode.ts"),K=r("./src/syntaxCheckHelper.ts"),z=r("./src/variable.ts"),G=r("./src/expression/compileCommaListExpression.ts");var W;!function(e){e[e.Continue=0]="Continue",e[e.Break=1]="Break"}(W=t.ControlFlowChange||(t.ControlFlowChange={})),t.Compiler=class{constructor(e,t,r,n){this.debugTag="compiler",this.envUnion=new Array,this.rootNode=e,this.pandaGen=t,this.compilerDriver=r,this.recorder=n,this.funcBuilder=new A.FunctionBuilder,this.scope=this.pandaGen.getScope();let i=this.scope.getParameters();for(let e=0;e<i.length;++e)this.pandaGen.getVregForVariable(i[e]);(0,u.getVregisterCache)(this.pandaGen,u.CacheList.LexEnv),this.envUnion.push((0,u.getVregisterCache)(this.pandaGen,u.CacheList.LexEnv)),this.pandaGen.loadAccFromArgs(this.rootNode)}compile(){this.storeFuncObj2LexEnvIfNeeded(),this.compileLexicalBindingForArrowFunction(),this.rootNode.kind==o.SyntaxKind.SourceFile?this.compileSourceFileOrBlock(this.rootNode):(this.compileFunctionLikeDeclaration(this.rootNode),this.callOpt())}pushEnv(e){this.envUnion.push(e)}popEnv(){this.envUnion.pop()}getCurrentEnv(){return this.envUnion[this.envUnion.length-1]}callOpt(){var e,t;if(_.CmdOptions.isDebugMode())return;let r=new Map([["this",1],["4newTarget",2],["0newTarget",2],["argumentsOrRestargs",4],["4funcObj",8]]),n=0,i=this.pandaGen.getScope();if(i instanceof O.FunctionScope){let a=[],o=new Set,s=0;for(let t=0;t<3;t++)i.getCallOpt().has(i.getParameters()[t].getName())?(a.push(this.pandaGen.getLocals()[t]),n+=null!==(e=r.get(i.getParameters()[t].getName()))&&void 0!==e?e:0):(o.add(i.getParameters()[t].getName()),s++);for(let e=3;e<this.pandaGen.getLocals().length;e++)a.push(this.pandaGen.getLocals()[e]);let c=i.getName2variable();c.forEach(((e,t)=>{o.has(t)&&c.delete(t)})),this.pandaGen.setLocals(a),this.pandaGen.setParametersCount(this.pandaGen.getParametersCount()-s),i.getArgumentsOrRestargs()&&(n+=null!==(t=r.get("argumentsOrRestargs"))&&void 0!==t?t:0),this.pandaGen.setCallType(n)}}storeFuncObj2LexEnvIfNeeded(){let e=this.rootNode;if(!o.isFunctionExpression(e)&&!o.isMethodDeclaration(e))return;let t=this.recorder.getScopeOfNode(e);if(e.name){let r=P.getTextOfIdentifierOrLiteral(e.name),n=t.find(r);n.scope==t&&(this.pandaGen.loadAccumulator(d.NodeKind.FirstNodeOfFunction,(0,u.getVregisterCache)(this.pandaGen,u.CacheList.FUNC)),this.pandaGen.storeAccToLexEnv(d.NodeKind.FirstNodeOfFunction,n.scope,n.level,n.v,!0))}}compileLexicalBindingForArrowFunction(){let e=this.rootNode;if(!o.isArrowFunction(e)){let t=this.scope.getChildVariableScope(),r=!1;if(t.forEach((e=>{let t=e.getBindingNode();o.isArrowFunction(t)&&(r=!0)})),r){if(this.storeSpecialArg2LexEnv("4newTarget"),this.storeSpecialArg2LexEnv("arguments"),o.isConstructorDeclaration(e)&&e.parent.heritageClauses)return void this.storeSpecialArg2LexEnv("4funcObj");this.storeSpecialArg2LexEnv("this")}}}storeSpecialArg2LexEnv(e){let t=this.scope.find(e),r=t.v,n=this.pandaGen;if(_.CmdOptions.isDebugMode())t.scope.setLexVar(r,this.scope),n.storeLexicalVar(this.rootNode,t.level,t.v.idxLex,n.getVregForVariable(t.v));else if(r&&r.isLexVar){("this"===e||"4newTarget"===e)&&t.scope instanceof O.FunctionScope&&t.scope.setCallOpt(e),"arguments"===e&&t.scope instanceof O.FunctionScope&&t.scope.setArgumentsOrRestargs();let i="4funcObj"===e?(0,u.getVregisterCache)(n,u.CacheList.FUNC):n.getVregForVariable(t.v);n.storeLexicalVar(this.rootNode,t.level,r.idxLex,i)}}compileSourceFileOrBlock(e){let t=this.pandaGen,r=e.statements,n=!1;e.parent&&o.isConstructorDeclaration(e.parent)&&(0,L.compileDefaultInitClassMembers)(this,e.parent),r.forEach((e=>{this.compileStatement(e),e.kind==o.SyntaxKind.ReturnStatement&&(n=!0)})),e.parent&&o.isConstructorDeclaration(e.parent)?(0,L.compileReturnThis4Ctor)(this,e.parent,n):n||(this.funcBuilder instanceof k.AsyncFunctionBuilder?(this.funcBuilder.resolve(d.NodeKind.Invalid,(0,u.getVregisterCache)(t,u.CacheList.undefined)),t.return(d.NodeKind.Invalid)):_.CmdOptions.isWatchEvaluateExpressionMode()?t.return(d.NodeKind.Invalid):t.returnUndefined(d.NodeKind.Invalid))}compileFunctionBody(e,t){let r=this.pandaGen;if(t.kind==o.SyntaxKind.Block)this.pushScope(t),this.compileSourceFileOrBlock(t),this.popScope();else{if(e!=o.SyntaxKind.ArrowFunction)throw new Error("Node "+this.getNodeName(t)+" is unimplemented as a function body");{this.compileExpression(t);let e=r.getTemp();r.storeAccumulator(t,e),this.funcBuilder instanceof k.AsyncFunctionBuilder?(this.funcBuilder.resolve(t,e),r.return(d.NodeKind.Invalid)):r.loadAccumulator(t,e),r.freeTemps(e),r.return(d.NodeKind.Invalid)}}}compileFunctionParameterDeclaration(e){let t=this.pandaGen;for(let r=0;r<e.parameters.length;++r){let n,i=e.parameters[r],a=i.name,s=c.LReference.generateLReference(this,a,!0);if(o.isIdentifier(a))n=s.variable.v;else if((0,l.isBindingPattern)(a)){let e=r.toString()+"pattern";n=this.scope.find(e).v}let _=t.getVregForVariable(n);if(i.dotDotDotToken){let e=this.pandaGen.getScope();e instanceof O.FunctionScope&&e.setArgumentsOrRestargs(),t.copyRestArgs(i,r),t.storeAccumulator(i,_)}if(i.initializer){let r=new w.Label;t.loadAccumulator(e,_),t.condition(e,o.SyntaxKind.EqualsEqualsEqualsToken,(0,u.getVregisterCache)(t,u.CacheList.undefined),r),this.compileExpression(i.initializer),t.storeAccumulator(i,_),t.label(e,r)}((0,l.isBindingPattern)(a)||o.isIdentifier(a)&&n.isLexVar)&&(t.loadAccumulator(i,_),s.setValue())}}createFuncBuilder(e){let t=this.pandaGen;if(e.modifiers)for(let r=0;r<e.modifiers.length;r++)if(e.modifiers[r].kind==o.SyntaxKind.AsyncKeyword){if(e.asteriskToken)throw new Error("Async generator is not supported");return new k.AsyncFunctionBuilder(t)}return e.asteriskToken?new N.GeneratorFunctionBuilder(t,this):new A.FunctionBuilder}compileFunctionLikeDeclaration(e){let t=this.pandaGen;if(this.compileFunctionParameterDeclaration(e),o.isConstructorDeclaration(e)){let t=e.parent;if(P.getClassExtendsHeritageElement(t)&&!(0,L.extractCtorOfClass)(t))return void(0,L.compileDefaultConstructor)(this,e)}if(e.kind==o.SyntaxKind.FunctionExpression&&e.name){let r=P.getTextOfIdentifierOrLiteral(e.name);t.getScope().addFuncName(r)}this.funcBuilder=this.createFuncBuilder(e),this.funcBuilder.prepare(e,this.recorder),e.body&&this.compileFunctionBody(e.kind,e.body),this.funcBuilder.cleanUp(e)}compileStatement(e){switch(this.pandaGen.setFirstStmt(e),(0,I.LOGD)(this.debugTag,"compile statement: "+this.getNodeName(e)),e.kind){case o.SyntaxKind.Block:this.compileBlock(e);break;case o.SyntaxKind.EmptyStatement:break;case o.SyntaxKind.VariableStatement:this.compileVariableStatement(e);break;case o.SyntaxKind.ExpressionStatement:this.compileExpression(e.expression);break;case o.SyntaxKind.IfStatement:this.compileIfStatement(e);break;case o.SyntaxKind.DoStatement:(0,B.compileDoStatement)(e,this);break;case o.SyntaxKind.WhileStatement:(0,B.compileWhileStatement)(e,this);break;case o.SyntaxKind.ForStatement:(0,B.compileForStatement)(e,this);break;case o.SyntaxKind.ForInStatement:(0,B.compileForInStatement)(e,this);break;case o.SyntaxKind.ForOfStatement:(0,M.compileForOfStatement)(e,this);break;case o.SyntaxKind.ContinueStatement:this.compileContinueStatement(e);break;case o.SyntaxKind.BreakStatement:this.compileBreakStatement(e);break;case o.SyntaxKind.ReturnStatement:(0,j.compileReturnStatement)(e,this);break;case o.SyntaxKind.SwitchStatement:(0,J.compileSwitchStatement)(e,this);break;case o.SyntaxKind.LabeledStatement:this.compileLabeledStatement(e);break;case o.SyntaxKind.ThrowStatement:this.compileThrowStatement(e);break;case o.SyntaxKind.TryStatement:this.compileTryStatement(e);break;case o.SyntaxKind.DebuggerStatement:this.pandaGen.debugger(e);break;case o.SyntaxKind.FunctionDeclaration:this.compileFunctionDeclaration(e);break;case o.SyntaxKind.ClassDeclaration:(0,L.compileClassDeclaration)(this,e);case o.SyntaxKind.ImportDeclaration:break;case o.SyntaxKind.ExportAssignment:this.compileExportAssignment(e);break;case o.SyntaxKind.ExportDeclaration:case o.SyntaxKind.NotEmittedStatement:case o.SyntaxKind.InterfaceDeclaration:break;default:throw new Error("Statement "+this.getNodeName(e)+" is unimplemented")}}compileBlock(e){this.pushScope(e),(0,F.hoistFunctionInBlock)(this.scope,this.pandaGen,(0,U.isStrictMode)(e),this),e.statements.forEach((e=>this.compileStatement(e))),this.popScope()}compileVariableStatement(e){let t=e.declarationList,r=(0,l.hasExportKeywordModifier)(e);t.declarations.forEach((e=>{this.compileVariableDeclaration(e,r)}))}compileVariableDeclaration(e,t=!1){if(t){let t=P.getTextOfIdentifierOrLiteral(e.name);(0,l.setVariableExported)(t,this.getCurrentScope())}let r=c.LReference.generateLReference(this,e.name,!0);if(e.initializer)this.compileExpression(e.initializer);else{if(s.getVarDeclarationKind(e)==z.VarDeclarationKind.VAR)return;s.getVarDeclarationKind(e)==z.VarDeclarationKind.LET&&e.parent.kind!=o.SyntaxKind.CatchClause&&this.pandaGen.loadAccumulator(e,(0,u.getVregisterCache)(this.pandaGen,u.CacheList.undefined))}r.setValue()}compileIfStatement(e){this.pushScope(e);let t=new w.Label,r=new w.Label;this.compileCondition(e.expression,e.elseStatement?t:r),this.compileStatement(e.thenStatement),e.elseStatement&&(this.pandaGen.branch(d.DebugInfo.getLastNode(),r),this.pandaGen.label(e,t),this.compileStatement(e.elseStatement)),this.pandaGen.label(e,r),this.popScope()}popLoopEnv(e,t){for(;t--;)this.pandaGen.popLexicalEnv(e)}popLoopEnvWhenContinueOrBreak(e,t){let r=e.getCorrespondingNode(),n=e.getLoopEnvLevel();switch(r.kind){case o.SyntaxKind.DoStatement:case o.SyntaxKind.ForStatement:this.popLoopEnv(r,n-1);break;case o.SyntaxKind.WhileStatement:case o.SyntaxKind.ForInStatement:case o.SyntaxKind.ForOfStatement:{let e=t?n:n-1;this.popLoopEnv(r,e);break}default:this.popLoopEnv(r,n)}}compileContinueStatement(e){let t=R.LabelTarget.getLabelTarget(e);this.compileFinallyBeforeCFC(t.getTryStatement(),W.Continue,t.getContinueTargetLabel()),t.getLoopEnvLevel()&&this.popLoopEnvWhenContinueOrBreak(t,!0),this.pandaGen.branch(e,t.getContinueTargetLabel())}compileBreakStatement(e){let t=R.LabelTarget.getLabelTarget(e);this.compileFinallyBeforeCFC(t.getTryStatement(),W.Break,void 0),t.getLoopEnvLevel()&&this.popLoopEnvWhenContinueOrBreak(t,!1),this.pandaGen.branch(e,t.getBreakTargetLabel())}compileLabeledStatement(e){this.pushScope(e);let t,r=P.getTextOfIdentifierOrLiteral(e.label);if(e.statement.kind==o.SyntaxKind.Block||e.statement.kind==o.SyntaxKind.IfStatement){t=new w.Label;let r=new R.LabelTarget(e,t,void 0);R.LabelTarget.updateName2LabelTarget(e,r)}this.compileStatement(e.statement),t&&this.pandaGen.label(e,t),R.LabelTarget.deleteName2LabelTarget(r),this.popScope()}compileThrowStatement(e){let t=this.pandaGen;if(!e.expression)throw new p.DiagnosticError(e,p.DiagnosticCode.Line_break_not_permitted_here);this.compileExpression(e.expression);let r=V.TryStatement.getCurrentTryStatement()?V.TryStatement.getCurrentTryStatement().getLoopEnvLevel():0;this.popLoopEnv(e,r),t.throw(e)}compileFinallyBeforeCFC(e,t,r){let n=V.TryStatement.getCurrentTryStatement(),i=n,a=this.scope;for(;n!=e;n=null==n?void 0:n.getOuterTryStatement())if(n&&n.trybuilder){let e=new w.Label,a=new w.Label,o=new V.LabelPair(e,a),s=V.TryStatement.getCurrentTryStatement();V.TryStatement.setCurrentTryStatement(n.getOuterTryStatement()),this.pandaGen.label(n.getStatement(),e),n.trybuilder.compileFinalizer(t,r),this.pandaGen.label(n.getStatement(),a),V.TryStatement.setCurrentTryStatement(s),(0,V.updateCatchTables)(i,n,o)}this.scope=a}constructTry(e,t,r){let n=this.pandaGen,i=new w.Label,a=new w.Label,s=new w.Label,c=r||new w.Label,l=new V.CatchTable(n,s,new V.LabelPair(i,a));n.label(e,i),t.compileTryBlock(l),n.label(e,a),t.compileFinallyBlockIfExisted(),o.isForOfStatement(e)&&this.getRecorder().getScopeOfNode(e).need2CreateLexEnv()&&n.popLexicalEnv(e),n.branch(e,c),n.label(e,s),t.compileExceptionHandler(),r||n.label(e,c)}compileTryStatement(e){this.pushScope(e),e.catchClause&&e.finallyBlock&&(e=(0,V.transformTryCatchFinally)(e,this.recorder));let t=new V.TryBuilder(this,this.pandaGen,e);this.constructTry(e,t),this.popScope()}compileFunctionDeclaration(e){if(!e.name){let t=(0,l.hasExportKeywordModifier)(e),r=(0,l.hasDefaultKeywordModifier)(e);if(!t||!r)throw new Error("Function declaration without name is unimplemented");if(!(this.scope instanceof O.ModuleScope))throw new Error("SyntaxError: export function declaration cannot in other scope except ModuleScope");{let t=this.compilerDriver.getFuncInternalName(e,this.recorder),r=this.getCurrentEnv();this.pandaGen.defineFunction(d.NodeKind.FirstNodeOfFunction,e,t,r),this.pandaGen.storeModuleVar(e,"default")}}}compileExportAssignment(e){this.compileExpression(e.expression),this.pandaGen.storeModuleVar(e,"default")}compileCondition(e,t){let r=this.pandaGen;if(e.kind==o.SyntaxKind.BinaryExpression){let n=e;switch(n.operatorToken.kind){case o.SyntaxKind.LessThanToken:case o.SyntaxKind.GreaterThanToken:case o.SyntaxKind.LessThanEqualsToken:case o.SyntaxKind.GreaterThanEqualsToken:case o.SyntaxKind.EqualsEqualsToken:case o.SyntaxKind.ExclamationEqualsToken:case o.SyntaxKind.EqualsEqualsEqualsToken:case o.SyntaxKind.ExclamationEqualsEqualsToken:{let e=r.getTemp();return this.compileExpression(n.left),r.storeAccumulator(n,e),this.compileExpression(n.right),r.condition(n,n.operatorToken.kind,e,t),void r.freeTemps(e)}case o.SyntaxKind.AmpersandAmpersandToken:return this.compileExpression(n.left),r.jumpIfFalse(n,t),this.compileExpression(n.right),void r.jumpIfFalse(n,t);case o.SyntaxKind.BarBarToken:{let e=new w.Label;return this.compileExpression(n.left),r.jumpIfTrue(n,e),this.compileExpression(n.right),r.jumpIfFalse(n,t),void r.label(n,e)}}}this.compileExpression(e),r.jumpIfFalse(e,t)}compileExpression(e){switch((0,I.LOGD)(this.debugTag,"compile expr:"+e.kind),e.kind){case o.SyntaxKind.NumericLiteral:(0,b.compileNumericLiteral)(this.pandaGen,e);break;case o.SyntaxKind.BigIntLiteral:(0,g.compileBigIntLiteral)(this.pandaGen,e);break;case o.SyntaxKind.StringLiteral:(0,E.compileStringLiteral)(this.pandaGen,e);break;case o.SyntaxKind.RegularExpressionLiteral:(0,S.compileRegularExpressionLiteral)(this,e);break;case o.SyntaxKind.Identifier:this.compileIdentifier(e);break;case o.SyntaxKind.TrueKeyword:case o.SyntaxKind.FalseKeyword:this.compileBooleanLiteral(e);break;case o.SyntaxKind.CallExpression:(0,m.compileCallExpression)(e,this);break;case o.SyntaxKind.NullKeyword:this.pandaGen.loadAccumulator(e,(0,u.getVregisterCache)(this.pandaGen,u.CacheList.Null));break;case o.SyntaxKind.ThisKeyword:this.compileThisKeyword(e);break;case o.SyntaxKind.MetaProperty:(0,h.compileMetaProperty)(e,this);break;case o.SyntaxKind.ArrayLiteralExpression:(0,f.compileArrayLiteralExpression)(this,e);break;case o.SyntaxKind.ObjectLiteralExpression:(0,x.compileObjectLiteralExpression)(this,e);break;case o.SyntaxKind.PropertyAccessExpression:case o.SyntaxKind.ElementAccessExpression:(0,y.compileMemberAccessExpression)(e,this);break;case o.SyntaxKind.NewExpression:(0,v.compileNewExpression)(e,this);break;case o.SyntaxKind.ParenthesizedExpression:this.compileExpression((0,D.findInnerExprOfParenthesis)(e));break;case o.SyntaxKind.FunctionExpression:this.compileFunctionExpression(e);break;case o.SyntaxKind.DeleteExpression:this.compileDeleteExpression(e);break;case o.SyntaxKind.TypeOfExpression:this.compileTypeOfExpression(e);break;case o.SyntaxKind.VoidExpression:this.compileVoidExpression(e);break;case o.SyntaxKind.AwaitExpression:this.compileAwaitExpression(e);break;case o.SyntaxKind.PrefixUnaryExpression:this.compilePrefixUnaryExpression(e);break;case o.SyntaxKind.PostfixUnaryExpression:this.compilePostfixUnaryExpression(e);break;case o.SyntaxKind.BinaryExpression:this.compileBinaryExpression(e);break;case o.SyntaxKind.ConditionalExpression:this.compileConditionalExpression(e);break;case o.SyntaxKind.YieldExpression:(0,C.compileYieldExpression)(this,e);break;case o.SyntaxKind.ArrowFunction:this.compileArrowFunction(e);break;case o.SyntaxKind.TemplateExpression:this.compileTemplateExpression(e);break;case o.SyntaxKind.NoSubstitutionTemplateLiteral:case o.SyntaxKind.FirstTemplateToken:case o.SyntaxKind.LastLiteralToken:this.compileNoSubstitutionTemplateLiteral(e);break;case o.SyntaxKind.TaggedTemplateExpression:this.compileTaggedTemplateExpression(e);break;case o.SyntaxKind.Constructor:case o.SyntaxKind.PropertyDeclaration:break;case o.SyntaxKind.ClassExpression:(0,L.compileClassDeclaration)(this,e);break;case o.SyntaxKind.PartiallyEmittedExpression:break;case o.SyntaxKind.CommaListExpression:(0,G.compileCommaListExpression)(this,e);break;default:throw new Error("Expression of type "+this.getNodeName(e)+" is unimplemented")}}compileIdentifier(e){let t=P.getTextOfIdentifierOrLiteral(e),{scope:r,level:n,v:i}=this.scope.find(t);i?this.loadTarget(e,{scope:r,level:n,v:i}):this.compileUnscopedIdentifier(e)}compileUnscopedIdentifier(e){let t=P.getTextOfIdentifierOrLiteral(e),r=this.pandaGen;switch(t){case"NaN":return void r.loadAccumulator(e,(0,u.getVregisterCache)(this.pandaGen,u.CacheList.NaN));case"Infinity":return void r.loadAccumulator(e,(0,u.getVregisterCache)(this.pandaGen,u.CacheList.Infinity));case"globalThis":return void r.loadAccumulator(e,(0,u.getVregisterCache)(this.pandaGen,u.CacheList.Global));case"undefined":return void r.loadAccumulator(e,(0,u.getVregisterCache)(this.pandaGen,u.CacheList.undefined));default:(0,D.findOuterNodeOfParenthesis)(e).kind==o.SyntaxKind.TypeOfExpression?_.CmdOptions.isWatchEvaluateExpressionMode()?r.loadByNameViaDebugger(e,t,u.CacheList.False):r.loadObjProperty(e,(0,u.getVregisterCache)(r,u.CacheList.Global),t):r.tryLoadGlobalByName(e,t)}}compileBooleanLiteral(e){e.kind==o.SyntaxKind.TrueKeyword?this.pandaGen.loadAccumulator(e,(0,u.getVregisterCache)(this.pandaGen,u.CacheList.True)):this.pandaGen.loadAccumulator(e,(0,u.getVregisterCache)(this.pandaGen,u.CacheList.False))}compileFunctionReturnThis(e){if(e.expression.kind==o.SyntaxKind.Identifier){let t=e.expression,r=e.arguments;if("Function"==t.escapedText&&r&&r.length>0)return!!o.isStringLiteral(r[r.length-1])&&(null!=r[r.length-1].text.match(/ *return +this[;]? *$/)&&(this.pandaGen.loadAccumulator(e,(0,u.getVregisterCache)(this.pandaGen,u.CacheList.Global)),!0))}return!1}compileThisKeyword(e){let t=this.pandaGen;(0,L.checkValidUseSuperBeforeSuper)(this,e);let{scope:r,level:n,v:i}=this.scope.find("this");if(this.setCallOpt(r,"this"),!i)throw new Error('"this" not found');if(!(i instanceof z.LocalVariable))throw new Error('"this" must be a local variable');if(r&&n>=0){let e=this.scope,t=!1;for(;e!=r;){if(e instanceof O.VariableScope){t=!0;break}e=e.getParent()}t&&r.setLexVar(i,this.scope)}_.CmdOptions.isWatchEvaluateExpressionMode()?t.loadByNameViaDebugger(e,"this",u.CacheList.True):t.loadAccFromLexEnv(e,r,n,i)}compileFunctionExpression(e){let t=this.compilerDriver.getFuncInternalName(e,this.recorder),r=this.getCurrentEnv();this.pandaGen.defineFunction(e,e,t,r)}compileDeleteExpression(e){let t,r,n=this.pandaGen,i=e.expression;switch(i.kind){case o.SyntaxKind.Identifier:{let r=P.getTextOfIdentifierOrLiteral(i),{scope:a,v:o}=this.scope.find(r);if(!o||a instanceof O.GlobalScope&&o instanceof z.GlobalVariable){let a=n.getTemp();t=(0,u.getVregisterCache)(n,u.CacheList.Global),n.loadAccumulatorString(i,r),n.storeAccumulator(i,a),n.deleteObjProperty(e,t,a),n.freeTemps(a)}else n.loadAccumulator(i,(0,u.getVregisterCache)(n,u.CacheList.False));break}case o.SyntaxKind.PropertyAccessExpression:case o.SyntaxKind.ElementAccessExpression:{if(t=n.getTemp(),r=n.getTemp(),P.isSuperProperty(i))return n.throwDeleteSuperProperty(i),void n.freeTemps(t,r);let{prop:a}=(0,y.getObjAndProp)(i,t,r,this);switch(typeof a){case"string":n.loadAccumulatorString(e,a),n.storeAccumulator(e,r);break;case"number":n.loadAccumulatorInt(e,a),n.storeAccumulator(e,r)}n.deleteObjProperty(e,t,r),n.freeTemps(t,r);break}default:this.compileExpression(i),n.loadAccumulator(e,(0,u.getVregisterCache)(n,u.CacheList.True))}}compileTypeOfExpression(e){this.compileExpression(e.expression),this.pandaGen.typeOf(e)}compileVoidExpression(e){let t=this.pandaGen;this.compileExpression(e.expression),t.loadAccumulator(e,(0,u.getVregisterCache)(t,u.CacheList.undefined))}compileAwaitExpression(e){let t=this.pandaGen;if(!(this.funcBuilder instanceof k.AsyncFunctionBuilder))throw new p.DiagnosticError(e.parent,p.DiagnosticCode.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules);if(e.expression){let r=t.getTemp();this.compileExpression(e.expression),t.storeAccumulator(e,r),this.funcBuilder.await(e,r),t.freeTemps(r)}else this.funcBuilder.await(e,(0,u.getVregisterCache)(t,u.CacheList.undefined))}compilePrefixUnaryExpression(e){let t=this.pandaGen,r=t.getTemp();switch(e.operator){case o.SyntaxKind.PlusPlusToken:case o.SyntaxKind.MinusMinusToken:{let n=c.LReference.generateLReference(this,e.operand,!1);n.getValue(),t.storeAccumulator(e,r),t.unary(e,e.operator,r),n.setValue();break}case o.SyntaxKind.PlusToken:case o.SyntaxKind.MinusToken:case o.SyntaxKind.ExclamationToken:case o.SyntaxKind.TildeToken:this.compileExpression(e.operand),t.storeAccumulator(e,r),t.unary(e,e.operator,r)}t.freeTemps(r)}compilePostfixUnaryExpression(e){let t=this.pandaGen,r=t.getTemp(),n=c.LReference.generateLReference(this,e.operand,!1);switch(n.getValue(),t.storeAccumulator(e,r),e.operator){case o.SyntaxKind.PlusPlusToken:case o.SyntaxKind.MinusMinusToken:t.unary(e,e.operator,r)}n.setValue(),t.toNumber(e,r),t.freeTemps(r)}compileLogicalExpression(e){let t=this.pandaGen,r=t.getTemp();switch(e.operatorToken.kind){case o.SyntaxKind.AmpersandAmpersandToken:{let n=new w.Label,i=new w.Label;this.compileExpression(e.left),t.storeAccumulator(e,r),t.jumpIfFalse(e,n),this.compileExpression(e.right),t.branch(e,i),t.label(e,n),t.loadAccumulator(e,r),t.label(e,i);break}case o.SyntaxKind.BarBarToken:{let n=new w.Label,i=new w.Label;this.compileExpression(e.left),t.storeAccumulator(e,r),t.jumpIfTrue(e,n),this.compileExpression(e.right),t.branch(e,i),t.label(e,n),t.loadAccumulator(e,r),t.label(e,i);break}case o.SyntaxKind.QuestionQuestionToken:{let n=new w.Label,i=new w.Label;this.compileExpression(e.left),t.storeAccumulator(e,r),t.condition(e,o.SyntaxKind.ExclamationEqualsEqualsToken,(0,u.getVregisterCache)(t,u.CacheList.Null),n),t.loadAccumulator(e.left,r),t.condition(e,o.SyntaxKind.ExclamationEqualsEqualsToken,(0,u.getVregisterCache)(t,u.CacheList.undefined),n),t.loadAccumulator(e,r),t.branch(e,i),t.label(e,n),this.compileExpression(e.right),t.label(e,i);break}default:throw new Error("BinaryExpression with operatorToken "+this.getNodeName(e.operatorToken)+" is not Logical Operator")}t.freeTemps(r)}compileBinaryExpression(e){if((0,K.isAssignmentOperator)(e.operatorToken.kind))return void this.compileAssignmentExpression(e.left,e.right,e.operatorToken.kind);if(e.operatorToken.kind==o.SyntaxKind.AmpersandAmpersandToken||e.operatorToken.kind==o.SyntaxKind.BarBarToken||e.operatorToken.kind==o.SyntaxKind.QuestionQuestionToken)return void this.compileLogicalExpression(e);let t=this.pandaGen,r=t.getTemp();this.compileExpression(e.left),t.storeAccumulator(e,r),this.compileExpression(e.right),e.operatorToken.kind!=o.SyntaxKind.CommaToken&&t.binary(e,e.operatorToken.kind,r),t.freeTemps(r)}compileConditionalExpression(e){let t=new w.Label,r=new w.Label;this.compileCondition(e.condition,t),this.compileExpression(e.whenTrue),this.pandaGen.branch(e,r),this.pandaGen.label(e,t),this.compileExpression(e.whenFalse),this.pandaGen.label(e,r)}compileArrowFunction(e){let t=this.compilerDriver.getFuncInternalName(e,this.recorder),r=this.getCurrentEnv();this.pandaGen.defineFunction(e,e,t,r)}compileTemplateSpan(e){let t=e.expression;this.compileExpression(t);let r=e.literal,n=this.pandaGen.getTemp(),i=r.text;0!=i.length&&(this.pandaGen.storeAccumulator(e,n),this.pandaGen.loadAccumulatorString(e,i),this.pandaGen.binary(e,o.SyntaxKind.PlusToken,n)),this.pandaGen.freeTemps(n)}compileTemplateExpression(e){let t=this.pandaGen,r=e.head,n=e.templateSpans,i=t.getTemp();t.loadAccumulatorString(e,r.text),n&&n.length>0&&n.forEach((r=>{t.storeAccumulator(e,i),this.compileTemplateSpan(r),t.binary(e,o.SyntaxKind.PlusToken,i)})),t.freeTemps(i)}compileNoSubstitutionTemplateLiteral(e){let t=e.text;this.pandaGen.loadAccumulatorString(e,t)}compileTaggedTemplateExpression(e){let t,r=this.pandaGen;o.isTemplateExpression(e.template)&&(t=e.template.templateSpans);let{arguments:n,passThis:i}=(0,m.getHiddenParameters)(e.tag,this);(0,T.getTemplateObject)(r,e);let a=r.getTemp();r.storeAccumulator(e,a),n.push(a),t&&t.length&&t.forEach((e=>{let t=r.getTemp();this.compileExpression(e.expression),r.storeAccumulator(e,t),n.push(t)})),r.call(e,n,i),r.freeTemps(...n)}compileAssignmentExpression(e,t,r){let n=c.LReference.generateLReference(this,e,!1);if(r!=o.SyntaxKind.EqualsToken){let i=this.pandaGen.getTemp();n.getValue(),this.pandaGen.storeAccumulator(e,i),this.compileExpression(t),this.pandaGen.binary(e.parent,r,i),this.pandaGen.freeTemps(i)}else this.compileExpression(t);n.setValue()}pushScope(e){let t=this.recorder.getScopeOfNode(e);this.scope=t,d.DebugInfo.addDebugIns(t,this.pandaGen,!0)}popScope(){d.DebugInfo.addDebugIns(this.scope,this.pandaGen,!1),this.scope=this.scope.getParent()}getNodeName(e){return o.SyntaxKind[e.kind]}getThis(e,t){let r=this.pandaGen,n=this.getCurrentScope(),i=this.getCurrentScope().find("this"),a=i.scope,o=i.level,s=i.v;if(this.setCallOpt(a,"this"),a&&o>=0){let e=!1;for(;n!=a;){if(n instanceof O.VariableScope){e=!0;break}n=n.getParent()}e&&a.setLexVar(s,n)}if(s.isLexVar){let n=s.idxLex;r.loadLexicalVar(e,o,n),r.storeAccumulator(e,t)}else r.moveVreg(e,t,r.getVregForVariable(s))}setThis(e){let t=this.pandaGen,r=this.getCurrentScope().find("this");if(this.setCallOpt(r.scope,"this"),r.v.isLexVar){let n=r.v.idxLex,i=t.getTemp();t.storeAccumulator(e,i),t.storeLexicalVar(e,r.level,n,i),t.freeTemps(i)}else t.storeAccumulator(e,t.getVregForVariable(r.v))}setCallOpt(e,t){e instanceof O.FunctionScope&&e.setCallOpt(t)}getPandaGen(){return this.pandaGen}getCurrentScope(){return this.scope}getCompilerDriver(){return this.compilerDriver}getRecorder(){return this.recorder}getFuncBuilder(){return this.funcBuilder}storeTarget(e,t,r){if(t.v instanceof z.LocalVariable){if(r&&t.v.isLetOrConst()&&(t.v.initialize(),t.scope instanceof O.GlobalScope))return void(t.v.isLet()?this.pandaGen.stLetToGlobalRecord(e,t.v.getName()):this.pandaGen.stConstToGlobalRecord(e,t.v.getName()));if(t.v.isLetOrConst()&&t.scope instanceof O.GlobalScope)return void this.pandaGen.tryStoreGlobalByName(e,t.v.getName());if(t.scope&&t.level>=0){let e=this.scope,r=!1;for(;e!=t.scope;){if(e instanceof O.VariableScope){r=!0;break}e=e.getParent()}r&&t.scope.setLexVar(t.v,this.scope)}this.pandaGen.storeAccToLexEnv(e,t.scope,t.level,t.v,r)}else{if(!(t.v instanceof z.GlobalVariable))throw new Error("invalid lhsRef to store");t.v.isNone()&&(0,U.isStrictMode)(e)?this.pandaGen.tryStoreGlobalByName(e,t.v.getName()):this.pandaGen.storeGlobalVar(e,t.v.getName())}}loadTarget(e,t){if(t.v instanceof z.LocalVariable){if((t.v.isLetOrConst()||t.v.isClass())&&t.scope instanceof O.GlobalScope)return void this.pandaGen.tryLoadGlobalByName(e,t.v.getName());if(t.scope&&t.level>=0){let e=this.scope,r=!1;for(;e!=t.scope;){if(e instanceof O.VariableScope){r=!0;break}e=e.getParent()}r&&t.scope.setLexVar(t.v,this.scope)}this.pandaGen.loadAccFromLexEnv(e,t.scope,t.level,t.v)}else{if(!(t.v instanceof z.GlobalVariable))throw new Error("Only local and global variables are implemented");t.v.isNone()?(0,D.findOuterNodeOfParenthesis)(e).kind==o.SyntaxKind.TypeOfExpression?_.CmdOptions.isWatchEvaluateExpressionMode()?this.pandaGen.loadByNameViaDebugger(e,t.v.getName(),u.CacheList.False):this.pandaGen.loadObjProperty(e,(0,u.getVregisterCache)(this.pandaGen,u.CacheList.Global),t.v.getName()):this.pandaGen.tryLoadGlobalByName(e,t.v.getName()):this.pandaGen.loadGlobalVar(e,t.v.getName())}}}},"./src/compilerDriver.ts":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.CompilerDriver=t.PendingCompilationUnit=void 0;const o=r("fs"),s=a(r("./node_modules/typescript/lib/typescript.js")),c=r("./src/addVariable2Scope.ts"),l=r("./src/assemblyDumper.ts"),u=r("./src/base/util.ts"),_=r("./src/cmdOptions.ts"),d=r("./src/compiler.ts"),p=r("./src/compilerStatistics.ts"),f=r("./src/debuginfo.ts"),g=r("./src/hoisting.ts"),m=r("./src/log.ts"),y=r("./src/modules.ts"),h=r("./src/pandagen.ts"),v=r("./src/pass/cacheExpander.ts"),b=r("./src/recorder.ts"),x=r("./src/regAllocator.ts"),D=r("./src/scope.ts"),S=r("./src/statement/classStatement.ts"),E=r("./src/syntaxChecker.ts"),T=r("./src/ts2panda.ts"),C=r("./src/typeRecorder.ts");class k{constructor(e,t,r){this.decl=e,this.scope=t,this.internalName=r}}t.PendingCompilationUnit=k;class A{constructor(e){this.passes=[],this.functionId=1,this.funcIdMap=new Map,this.needDumpHeader=!0,this.ts2abcProcess=void 0,this.fileName=e,this.passes=[new v.CacheExpander,new x.RegAlloc],this.compilationUnits=[],this.pendingCompilationUnits=[],(_.CmdOptions.showHistogramStatistics()||_.CmdOptions.showHoistingStatistics())&&(this.statistics=new p.CompilerStatistics)}initiateTs2abcChildProcess(){this.ts2abcProcess=(0,u.initiateTs2abc)([this.fileName])}getTs2abcProcess(){if(void 0===this.ts2abcProcess)throw new Error("ts2abc hasn't been initiated");return this.ts2abcProcess}getStatistics(){return this.statistics}setCustomPasses(e){this.passes=e}addCompilationUnit(e,t,r){let n=this.getFuncInternalName(e,r);return this.pendingCompilationUnits.push(new k(e,t,n)),n}getCompilationUnits(){return this.compilationUnits}kind2String(e){return s.SyntaxKind[e]}getASTStatistics(e,t){e.forEachChild((e=>{t[e.kind]=t[e.kind]+1,this.getASTStatistics(e,t)}))}postOrderAnalysis(e){let t=[],r=[];for(r.push(e);r.length>0;){let e=r.pop();if(null==e)break;t.push(e);for(let t of e.getChildVariableScope())r.push(t)}return t.reverse()}compileForSyntaxCheck(e){let t=this.compilePrologue(e,!1,!0);(0,E.checkDuplicateDeclaration)(t),(0,E.checkExportEntries)(t)}compile(e){if(A.isTsFile=A.isTypeScriptSourceFile(e),_.CmdOptions.showASTStatistics()){let t=new Array(s.SyntaxKind.Count).fill(0);this.getASTStatistics(e,t),t.forEach(((e,t)=>{e>0&&(0,m.LOGD)(this.kind2String(t)+" = "+e)}))}let t=this.compilePrologue(e,!0,!1);if(_.CmdOptions.isAssemblyMode())for(let e=0;e<this.pendingCompilationUnits.length;e++){let r=this.pendingCompilationUnits[e];this.compileImpl(r.decl,r.scope,r.internalName,t)}else{this.initiateTs2abcChildProcess();let e=this.getTs2abcProcess();(0,u.listenChildExit)(e),(0,u.listenErrorEvent)(e);try{T.Ts2Panda.dumpCmdOptions(e);for(let e=0;e<this.pendingCompilationUnits.length;e++){let r=this.pendingCompilationUnits[e];this.compileImpl(r.decl,r.scope,r.internalName,t)}if(T.Ts2Panda.dumpStringsArray(e),T.Ts2Panda.dumpConstantPool(e),(0,u.terminateWritePipe)(e),_.CmdOptions.isEnableDebugLog()){let e=this.fileName.substring(0,this.fileName.lastIndexOf(".")).concat(".json");(0,o.writeFileSync)(e,T.Ts2Panda.jsonString),(0,m.LOGD)("Successfully generate ",`${e}`)}if(_.CmdOptions.isOutputType()){let e=this.fileName.substring(0,this.fileName.lastIndexOf(".")).concat(".txt");(0,o.writeFileSync)(e,T.Ts2Panda.dumpTypeLiteralArrayBuffer())}T.Ts2Panda.clearDumpData()}catch(t){throw(0,u.terminateWritePipe)(e),t}}h.PandaGen.clearLiteralArrayBuffer()}compileImpl(e,t,r,n){let i=new h.PandaGen(r,this.getParametersCount(e),t);f.DebugInfo.addDebugIns(t,i,!0);let a=new d.Compiler(e,i,this,n);_.CmdOptions.isModules()&&s.isSourceFile(e)&&t instanceof D.ModuleScope&&((0,y.setImport)(n.getImportStmts(),t,i),(0,y.setExportBinding)(n.getExportStmts(),t,i)),(0,g.hoisting)(e,i,n,a),a.compile(),this.passes.forEach((e=>e.run(i))),f.DebugInfo.addDebugIns(t,i,!1),f.DebugInfo.setDebugInfo(i),f.DebugInfo.setSourceFileDebugInfo(i,e),_.CmdOptions.isAssemblyMode()?this.writeBinaryFile(i):T.Ts2Panda.dumpPandaGen(i,this.getTs2abcProcess(),n.recordType),_.CmdOptions.showHistogramStatistics()&&this.statistics.getInsHistogramStatistics(i)}compileUnitTest(e,t){A.isTsFile=A.isTypeScriptSourceFile(e);let r=this.compilePrologue(e,!0,!0);for(let e=0;e<this.pendingCompilationUnits.length;e++){let t=this.pendingCompilationUnits[e];this.compileUnitTestImpl(t.decl,t.scope,t.internalName,r)}t&&h.PandaGen.getLiteralArrayBuffer().forEach((e=>t.push(e))),h.PandaGen.clearLiteralArrayBuffer()}compileUnitTestImpl(e,t,r,n){let i=new h.PandaGen(r,this.getParametersCount(e),t),a=new d.Compiler(e,i,this,n);_.CmdOptions.isModules()&&s.isSourceFile(e)&&t instanceof D.ModuleScope&&((0,y.setImport)(n.getImportStmts(),t,i),(0,y.setExportBinding)(n.getExportStmts(),t,i)),(0,g.hoisting)(e,i,n,a),a.compile(),this.passes.forEach((e=>e.run(i))),this.compilationUnits.push(i)}static isTypeScriptSourceFile(e){let t=e.fileName;return!(!t||!t.endsWith(".ts"))}compilePrologue(e,t,r){let n;n=_.CmdOptions.isModules()?new D.ModuleScope(e):new D.GlobalScope(e);let i=t&&_.CmdOptions.needRecordType()&&A.isTsFile;i&&C.TypeRecorder.createInstance();let a=new b.Recorder(e,n,this,i,A.isTsFile,r);a.record(),(0,c.addVariableToScope)(a,i);let o=this.postOrderAnalysis(n);for(let e of o)this.addCompilationUnit(e.getBindingNode(),e,a);return a}showStatistics(){_.CmdOptions.showHistogramStatistics()&&this.statistics.printHistogram(!1),_.CmdOptions.showHoistingStatistics()&&this.statistics.printHoistStatistics()}getFuncId(e){if(this.funcIdMap.has(e))return this.funcIdMap.get(e);if(s.isSourceFile(e))return this.funcIdMap.set(e,0),0;let t=this.functionId++;return this.funcIdMap.set(e,t),t}getFuncInternalName(e,t){let r;if(s.isSourceFile(e))r="func_main_0";else if(s.isConstructorDeclaration(e)){let t=e.parent;r=this.getInternalNameForCtor(t,e)}else{let n=e;if(r=t.getScopeOfNode(n).getFuncName(),""==r)return`#${this.getFuncId(n)}#`;if("func_main_0"==r)return`#${this.getFuncId(n)}#${r}`;let i=t.getFuncNameMap();if(!i.has(r))throw new Error("the function name is missing from the name map");i.get(r)>1&&(r=`#${this.getFuncId(n)}#${r}`),-1==r.lastIndexOf(".")&&-1==r.lastIndexOf("\\")||(r=`#${this.getFuncId(n)}#`)}return r}getInternalNameForCtor(e,t){let r=(0,S.getClassNameForConstructor)(e);return r=`#${this.getFuncId(t)}#${r}`,-1!=r.lastIndexOf(".")&&(r=`#${this.getFuncId(t)}#`),r}writeBinaryFile(e){this.needDumpHeader&&(l.AssemblyDumper.dumpHeader(),this.needDumpHeader=!1),new l.AssemblyDumper(e).dump()}getParametersCount(e){let t=3;return e.kind==s.SyntaxKind.SourceFile||(t+=e.parameters.length),t}}t.CompilerDriver=A,A.isTsFile=!1},"./src/compilerStatistics.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompilerStatistics=t.HoistingType=void 0;const n=r("./src/irnodes.ts"),i=r("./src/log.ts");var a;(a=t.HoistingType||(t.HoistingType={}))[a.GLOBAL_VAR=0]="GLOBAL_VAR",a[a.LOCAL_VAR=1]="LOCAL_VAR",a[a.GLOBAL_FUNCTION=2]="GLOBAL_FUNCTION",a[a.LOCAL_FUNCTION=3]="LOCAL_FUNCTION";class o{constructor(e,t){this.count=1,this.relatedInsns=[],this.nodeMap=new Map,this.instSize=e,t&&this.relatedInsns.push(t)}add(e){this.count+=e,this.relatedInsns.forEach((t=>{t.num+=e}))}set(e){this.count=e,this.relatedInsns.forEach((t=>{t.num=e}))}getCount(){return this.count}getInstSize(){return this.instSize}getTotalSize(){return this.count*this.instSize}getRelatedInsns(){return this.relatedInsns}getNodeMap(){return this.nodeMap}updateNodeMap(e){if(this.nodeMap.has(e)){let t=this.nodeMap.get(e);this.nodeMap.set(e,t+1)}else this.nodeMap.set(e,1)}unionNodeMap(e){e.forEach(((e,t)=>{if(this.nodeMap.has(t)){let r=this.nodeMap.get(t);r+=e,this.nodeMap.set(t,r)}else this.nodeMap.set(t,e)}))}getSavedSizeIfRemoved(e){let t=this.getTotalSize();return this.relatedInsns.forEach((r=>{let n=e.getStatistics().get(r.name);n&&(t+=r.num*n.getInstSize())})),t}static createItemValue(e,t){let r;return"lda.str"==e&&(r={name:"sta.dyn",num:1}),new o(t,r)}}class s{constructor(e){this.insHistogram=new Map,this.funcName=e}getInsName(e){return e.kind==n.IRNodeKind.LABEL?"Label":e.kind==n.IRNodeKind.CALL||e.kind==n.IRNodeKind.CALL_SHORT||e.kind==n.IRNodeKind.CALL_RANGE?e.operands[0].split(".")[2]:e.getMnemonic()}unionStatistics(e){e.getStatistics().forEach(((e,t)=>{if(this.insHistogram.has(t)){let r=this.insHistogram.get(t);r.add(e.getCount()),r.unionNodeMap(e.getNodeMap()),this.insHistogram.set(t,r)}else this.insHistogram.set(t,e)}))}catchStatistics(e){e.getInsns().forEach((e=>{let t=this.getInsName(e),r=(0,n.getInstructionSize)(e.kind),a=e.getNodeName();if(t.length<=1&&(0,i.LOGD)("this IRNode had no key: "+e.toString()),this.insHistogram.has(t)){let e=this.insHistogram.get(t);e.updateNodeMap(a),e.add(1),this.insHistogram.set(t,e)}else{let e=o.createItemValue(t,r);e.updateNodeMap(a),this.insHistogram.set(t,e)}}))}getStatistics(){return this.insHistogram}getTotal(){let e=0,t=0;return this.insHistogram.forEach(((r,n)=>{e+=r.getCount(),t+=r.getTotalSize()})),[e,t]}print(){let e=this.getTotal()[0],t=this.getTotal()[1];(0,i.LOGD)("\n"),(0,i.LOGD)("Histogram:","====== ("+this.funcName+") ======"),(0,i.LOGD)("op code\t\t\tinsns number\tins size\ttotal size\tsize percentage"),this.insHistogram.forEach(((e,r)=>{r.length<8?(0,i.LOGD)(r+"\t\t\t"+e.getCount()+"\t\t"+e.getInstSize()+"\t\t"+e.getTotalSize()+"\t\t"+e.getSavedSizeIfRemoved(this)+"\t"+Math.round(e.getSavedSizeIfRemoved(this)/t*100)+"%"):r.length<16?(0,i.LOGD)(r+"\t\t"+e.getCount()+"\t\t"+e.getInstSize()+"\t\t"+e.getTotalSize()+"\t\t"+e.getSavedSizeIfRemoved(this)+"\t"+Math.round(e.getSavedSizeIfRemoved(this)/t*100)+"%"):(0,i.LOGD)(r+"\t"+e.getCount()+"\t\t"+e.getInstSize()+"\t\t"+e.getTotalSize()+"\t\t"+e.getSavedSizeIfRemoved(this)+"\t"+Math.round(e.getSavedSizeIfRemoved(this)/t*100)+"%")})),(0,i.LOGD)("total insns number : \t"+e+"\t\ttotal Size : \t"+t),(0,i.LOGD)("\n"),this.insHistogram.forEach(((e,t)=>{e.getNodeMap().size>1&&((0,i.LOGD)("op code: "+t),e.getNodeMap().forEach(((t,r)=>{r.length<8?(0,i.LOGD)("Node: \t"+r+"\t\t\t\t\t\tnum: \t"+t+"\t\t"+Math.round(t/e.getCount()*100)+"%"):r.length<16?(0,i.LOGD)("Node: \t"+r+"\t\t\t\t\tnum: \t"+t+"\t\t"+Math.round(t/e.getCount()*100)+"%"):r.length<24?(0,i.LOGD)("Node: \t"+r+"\t\t\t\tnum: \t"+t+"\t\t"+Math.round(t/e.getCount()*100)+"%"):(0,i.LOGD)("Node: \t"+r+"\t\t\tnum: \t"+t+"\t\t"+Math.round(t/e.getCount()*100)+"%")})),(0,i.LOGD)("\n"))}))}}t.CompilerStatistics=class{constructor(){this.histogramMap=new Map,this.numOfHoistingCases=[0,0,0,0],this.hoistingRelatedInsnNum=0}addHoistingRelatedInsnNum(e){this.hoistingRelatedInsnNum+=e}addNumOfHoistCases(e){this.numOfHoistingCases[e]++}getInsHistogramStatistics(e){let t=new s(e.internalName);t.catchStatistics(e),this.histogramMap.set(e.internalName,t)}printHistogram(e){let t=new s("Total");this.histogramMap.forEach(((r,n)=>{t.unionStatistics(r),e&&r.print()})),t.print()}printHoistStatistics(){(0,i.LOGD)("\n"),(0,i.LOGD)("HoistingRelated Histogram:","======whole file======="),(0,i.LOGD)("global var\tlocal var\tglobal function\tlocal function"),(0,i.LOGD)(this.numOfHoistingCases[0]+"\t\t"+this.numOfHoistingCases[1]+"\t\t"+this.numOfHoistingCases[2]+"\t\t"+this.numOfHoistingCases[3]),(0,i.LOGD)("\n"),(0,i.LOGD)("Approximately hoisting related insns nums"),(0,i.LOGD)(this.hoistingRelatedInsnNum)}}},"./src/compilerUtils.ts":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.compileDestructuring=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/base/lreference.ts"),c=r("./src/base/util.ts"),l=r("./src/base/vregisterCache.ts"),u=r("./src/irnodes.ts"),_=a(r("./src/jshelpers.js")),d=r("./src/statement/tryStatement.ts"),p=r("./src/base/iterator.ts");function f(e,t,r,n,i,a){let c=n.getTemp(),_=n.getTemp(),d=new u.Label,p=new u.Label,f=e,g=s.LReference.generateLReference(i,f,a);n.createEmptyArray(e),n.storeAccumulator(e,c),n.loadAccumulatorInt(e,0),n.storeAccumulator(e,_),n.label(e,d),t.iteratorComplete(r),n.condition(e,o.SyntaxKind.ExclamationEqualsEqualsToken,(0,l.getVregisterCache)(n,l.CacheList.True),p),t.iteratorValue(r),n.storeObjProperty(e,c,_),n.loadAccumulatorInt(e,1),n.binary(e,o.SyntaxKind.PlusToken,_),n.storeAccumulator(e,_),t.callNext(r),n.branch(e,d),n.label(e,p),n.loadAccumulator(e,c),g.setValue(),n.freeTemps(c,_)}function g(e,t,r,n,i){let a=o.isBindingElement(e)?e.name:e.expression,c=s.LReference.generateLReference(i,a,!0),u=n.getTemp();0==t.length&&(n.loadAccumulator(e,(0,l.getVregisterCache)(n,l.CacheList.undefined)),n.storeAccumulator(e,u),t.push(u)),n.createObjectWithExcludedKeys(e,r,t),c.setValue(),n.freeTemps(u)}function m(e){return!!e.dotDotDotToken}t.compileDestructuring=function(e,t,r){let n=t.getTemp();t.storeAccumulator(e,n),(0,c.isArrayBindingOrAssignmentPattern)(e)&&function(e,t,r){let n=t.getTemp(),i=t.getTemp(),a=t.getTemp(),c=t.getTemp(),_=t.getTemp(),g=t.getTemp(),m=!!o.isArrayBindingPattern(e),y=new p.Iterator({iterator:n,nextMethod:i},a,c,t,e);y.getIterator();let h=new u.Label,v=new u.Label,b=new u.Label,x=new u.Label,D=new u.Label,S=new u.Label;new d.CatchTable(t,b,new d.LabelPair(h,v)),t.label(e,h);for(let n=0;n<e.elements.length;n++){let i=e.elements[n];if(y.callNext(_),o.isOmittedExpression(i))continue;if(!m&&o.isSpreadElement(i)||m&&i.dotDotDotToken){f(m?i.name:i.expression,y,_,t,r,m),t.branch(i,S);break}let a,c=!1,d=m?i.name:i;if(!m&&o.isBinaryExpression(i)){if(i.operatorToken.kind!=o.SyntaxKind.EqualsToken)throw new Error("Invalid destructuring assignment target");d=i.left,a=i.right,c=!0}else m&&i.initializer&&(a=i.initializer,c=!0);let p=s.LReference.generateLReference(r,d,!!m),g=new u.Label,h=new u.Label,v=new u.Label;y.iteratorComplete(_),t.condition(i,o.SyntaxKind.ExclamationEqualsEqualsToken,(0,l.getVregisterCache)(t,l.CacheList.True),c?g:h),y.iteratorValue(_),c?(t.condition(i,o.SyntaxKind.ExclamationEqualsEqualsToken,(0,l.getVregisterCache)(t,l.CacheList.undefined),g),t.loadAccumulator(i,y.getCurrentValue()),t.branch(i,v),t.label(i,g),r.compileExpression(a),t.branch(i,v)):t.branch(i,v),t.label(i,h),t.loadAccumulator(i,(0,l.getVregisterCache)(t,l.CacheList.undefined)),t.label(i,v),p.setValue()}t.label(e,v),t.loadAccumulator(e,y.getCurrrentDone()),t.condition(e,o.SyntaxKind.EqualsEqualsEqualsToken,(0,l.getVregisterCache)(t,l.CacheList.True),D),t.branch(e,S),t.label(e,b),t.storeAccumulator(e,g),y.close(),t.loadAccumulator(e,g),t.throw(e),t.label(e,x),t.label(e,D),y.close(),t.label(e,S),t.freeTemps(n,i,a,c,_,g)}(e,t,r),(0,c.isObjectBindingOrAssignmentPattern)(e)&&function(e,t,r){let n=t.getTemp();t.storeAccumulator(e,n);let i=!o.isObjectLiteralExpression(e),a=i?e.elements:e.properties,c=a.length;if(0==c||i&&m(a[0])||!i&&o.isSpreadAssignment(a[0])){let r=new u.Label,i=new u.Label;t.loadAccumulator(e,n),t.condition(e,o.SyntaxKind.ExclamationEqualsEqualsToken,(0,l.getVregisterCache)(t,l.CacheList.Null),i),t.loadAccumulator(e,n),t.condition(e,o.SyntaxKind.ExclamationEqualsEqualsToken,(0,l.getVregisterCache)(t,l.CacheList.undefined),i),t.branch(e,r),t.label(e,i),t.throwObjectNonCoercible(e),t.label(e,r)}let d=new Array,p=new Array;for(let e=0;e<c;e++){let e=t.getTemp();d.push(e)}for(let e=0;e<c;e++){let c=a[e];if(i&&m(c)||!i&&o.isSpreadAssignment(c)){g(c,p,n,t,r);break}p.push(d[e]);let f,y,h=t.getTemp(),v=c,b=!1;if(i){let e=c;v=e.name,f=e.propertyName?e.propertyName:e.name,e.initializer&&(b=!0,y=e.initializer)}else if(o.isPropertyAssignment(c)){f=c.name;let e=c.initializer;if(o.isBinaryExpression(e)){if(e.operatorToken.kind!=o.SyntaxKind.EqualsToken)throw new Error("Invalid destructuring target");v=e.left,y=e.right}else v=e}else{if(!o.isShorthandPropertyAssignment(c))throw new Error("Invalid destructuring target");f=c.name,v=c.name,y=c.objectAssignmentInitializer?c.objectAssignmentInitializer:void 0}if(o.isComputedPropertyName(f))r.compileExpression(f.expression);else if(o.isIdentifier(f)){let e=_.getTextOfIdentifierOrLiteral(f);t.loadAccumulatorString(f,e)}else r.compileExpression(f);t.storeAccumulator(f,d[e]);let x=s.LReference.generateLReference(r,v,i);t.loadObjProperty(c,n,d[e]),t.storeAccumulator(c,h);let D=new u.Label,S=new u.Label;b&&(t.condition(c,o.SyntaxKind.ExclamationEqualsEqualsToken,(0,l.getVregisterCache)(t,l.CacheList.undefined),D),t.loadAccumulator(c,h),t.branch(c,S),t.label(c,D),r.compileExpression(y),t.label(c,S)),x.setValue(),t.freeTemps(h)}t.freeTemps(n,...d)}(e,t,r),t.loadAccumulator(e,n),t.freeTemps(n)}},"./src/debuginfo.ts":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.DebugInfo=t.NodeKind=t.VariableDebugInfo=t.DebugPosInfo=void 0;const o=r("./src/cmdOptions.ts"),s=r("./src/irnodes.ts"),c=a(r("./src/jshelpers.js"));t.DebugPosInfo=class{constructor(){this.l=-1,this.c=-1,this.nodeKind=u.FirstNodeOfFunction}setDebugPosInfoNodeState(e){_.isNode(e)?this.nodeKind=u.Normal:this.nodeKind=e}getDebugPosInfoNodeState(){return this.nodeKind}setBoundLeft(e){this.bl=e}getBoundLeft(){return this.bl}setBoundRight(e){this.br=e}getBoundRight(){return this.br}setSourecLineNum(e){this.l=e}getSourceLineNum(){return this.l}setSourecColumnNum(e){this.c=e}getSourceColumnNum(){return this.c}ClearNodeKind(){this.nodeKind=void 0}};class l{constructor(e,t,r,n,i=0,a=0){this.n="",this.s="",this.st="",this.r=-1,this.start=-1,this.len=-1,this.n=e,this.s=t,this.st=r,this.r=n,this.start=i,this.len=a}setStart(e){this.start=e}getStart(){return this.start}setLength(e){this.len=e}}var u;t.VariableDebugInfo=l,function(e){e[e.Normal=0]="Normal",e[e.Invalid=1]="Invalid",e[e.FirstNodeOfFunction=2]="FirstNodeOfFunction"}(u=t.NodeKind||(t.NodeKind={}));class _{constructor(){}static isNode(e){return e!=u.Invalid&&e!=u.FirstNodeOfFunction&&e!=u.Normal}static updateLastNode(e){_.isNode(e)&&(_.lastNode=e)}static getLastNode(){return _.lastNode}static searchForPos(e){let t=c.getSourceFileOfNode(e);if(!t)return;let r=0;return-1===e.pos||-1===e.end?{loc:{line:-1,character:-1}}:(r=e.getStart(),{loc:t.getLineAndCharacterOfPosition(r)})}static setPosInfoForUninitializeIns(e,t){let r=t.getFirstStmt();if(r){let t=this.searchForPos(r);if(!t)return;e.setSourecLineNum(t.loc.line),e.setSourecColumnNum(t.loc.character)}}static setInvalidPosInfoForUninitializeIns(e,t){e.setSourecLineNum(-1),e.setSourecColumnNum(-1)}static addScope(e){_.scopeArray.push(e)}static getScopeArray(){return _.scopeArray}static clearScopeArray(){_.scopeArray=[]}static setDebuginfoForIns(e,...t){_.updateLastNode(e);let r=-1,n=-1;if(_.isNode(e)){let t=e,i=this.searchForPos(t);if(!i)return;r=i.loc.line,n=i.loc.character}t.forEach((t=>{t.debugPosInfo.setSourecLineNum(r),t.debugPosInfo.setSourecColumnNum(n),t.debugPosInfo.setDebugPosInfoNodeState(e)}))}static matchFormat(e){let t=0,r=e.getFormats();for(let n=0;n<r[0].length;n++)if(e.operands[n]instanceof s.VReg)for(let i=0;i<r.length;i++)e.operands[n].num<1<<r[i][n][1]&&(t=i>t?i:t);return t}static getIRNodeWholeLength(e){if(e instanceof s.Label||e instanceof s.DebugInsStartPlaceHolder||e instanceof s.DebugInsEndPlaceHolder)return 0;let t=1;if(!e.getFormats()[0])return 0;let r=this.matchFormat(e),n=e.getFormats()[r];for(let r=0;r<n.length;r++){if(e instanceof s.CalliDynRange||e instanceof s.CallRange){t+=n[0][1]/8,t+=n[1][1]/8;break}t+=n[r][1]/8}return t}static setPosDebugInfo(e){let t=e.getInsns(),r=0;for(let n=0;n<t.length;n++){t[n].debugPosInfo.getDebugPosInfoNodeState()==u.FirstNodeOfFunction&&_.setInvalidPosInfoForUninitializeIns(t[n].debugPosInfo,e);let i=_.getIRNodeWholeLength(t[n]),a=t[n].debugPosInfo;a&&o.CmdOptions.isDebugMode()&&(a.setBoundLeft(r),a.setBoundRight(r+i)),r+=i,n>0&&t[n-1]instanceof s.Label&&(t[n-1].debugPosInfo=t[n].debugPosInfo)}}static setVariablesDebugInfo(e){let t=e.getInsns();for(let e=0;e<t.length;e++)t[e]instanceof s.DebugInsStartPlaceHolder&&(t[e].getScope().setScopeStartInsIdx(e),t.splice(e,1),e--),t[e]instanceof s.DebugInsEndPlaceHolder&&(t[e].getScope().setScopeEndInsIdx(e),t.splice(e,1),e--);_.getScopeArray().forEach((t=>{t.getName2variable().forEach(((r,n)=>{if(!r.hasAlreadyBinded())return;if("0this"==r.getName()||"0newTarget"==r.getName())return;let i=new l(n,"any","any",r.getVreg().num);i.setStart(t.getScopeStartInsIdx()),i.setLength(t.getScopeEndInsIdx()-t.getScopeStartInsIdx()),e.addDebugVariableInfo(i)}))}))}static setDebugInfo(e){if(_.setPosDebugInfo(e),o.CmdOptions.isDebugMode())return _.setVariablesDebugInfo(e),void _.clearScopeArray()}static setSourceFileDebugInfo(e,t){let r=c.getSourceFileOfNode(t);o.CmdOptions.getSourceFile().length>0?e.setSourceFileDebugInfo(o.CmdOptions.getSourceFile()):e.setSourceFileDebugInfo(r.fileName)}static copyDebugInfo(e,t){t.forEach((t=>t.debugPosInfo=e.debugPosInfo))}static addDebugIns(e,t,r){if(!o.CmdOptions.isDebugMode())return;let n,i=t.getInsns();r?(n=new s.DebugInsStartPlaceHolder(e),_.addScope(e)):n=new s.DebugInsEndPlaceHolder(e),i.push(n)}}t.DebugInfo=_,_.scopeArray=[]},"./src/diagnostic.ts":function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getDiagnostic=t.DiagnosticCode=t.createDiagnostic=t.createFileDiagnostic=t.createDiagnosticOnFirstToken=t.printDiagnostic=t.DiagnosticError=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=a(r("./src/jshelpers.js")),c=r("./src/log.ts");function l(e,t,r,...n){let i=s.getSpanOfTokenAtPosition(e,t.pos);return s.createFileDiagnostic(e,i.start,i.length,r,...n)}function u(e,t,r,...n){let i,a=s.getErrorSpanForNode(e,t);switch(t.kind){case o.SyntaxKind.Identifier:case o.SyntaxKind.PrivateIdentifier:i=s.createFileDiagnostic(e,a.start,a.length,r,o.idText(t));break;case o.SyntaxKind.ReturnStatement:i=l(e,t,r,...n);break;default:i=s.createFileDiagnostic(e,a.start,a.length,r,...n)}return i}function _(e,t,r,n,i,a){return{code:e,category:t,key:r,message:n,reportsUnnecessary:i}}var d;t.DiagnosticError=class{constructor(e,t,r,n){this.code=t,this.irnode=e,this.file=r||void 0,this.args=n||[]}},t.printDiagnostic=function(e){let t=o.flattenDiagnosticMessageText(e.messageText,"\n");if(e.file&&null!=e.start){let{line:r,character:n}=e.file.getLineAndCharacterOfPosition(e.start);(0,c.LOGE)(`${e.file.fileName} (${r+1},${n+1})`,`${t}`)}else(0,c.LOGE)("Error",t)},t.createDiagnosticOnFirstToken=l,t.createFileDiagnostic=u,t.createDiagnostic=function(e,t,r,...n){return t?e?u(e,t,r,...n):s.createDiagnosticForNode(t,r,...n):s.createCompilerDiagnostic(r,...n)},(d=t.DiagnosticCode||(t.DiagnosticCode={}))[d.Identifier_expected=1003]="Identifier_expected",d[d.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma=1013]="A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma",d[d.A_rest_parameter_must_be_last_in_a_parameter_list=1014]="A_rest_parameter_must_be_last_in_a_parameter_list",d[d.Parameter_cannot_have_question_mark_and_initializer=1015]="Parameter_cannot_have_question_mark_and_initializer",d[d.A_required_parameter_cannot_follow_an_optional_parameter=1016]="A_required_parameter_cannot_follow_an_optional_parameter",d[d.The_readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature=1024]="The_readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature",d[d.Accessibility_modifier_already_seen=1028]="Accessibility_modifier_already_seen",d[d._0_modifier_must_precede_1_modifier=1029]="_0_modifier_must_precede_1_modifier",d[d._0_modifier_already_seen=1030]="_0_modifier_already_seen",d[d._0_modifier_cannot_appear_on_class_elements_of_this_kind=1031]="_0_modifier_cannot_appear_on_class_elements_of_this_kind",d[d.A_declare_modifier_cannot_be_used_in_an_already_ambient_context=1038]="A_declare_modifier_cannot_be_used_in_an_already_ambient_context",d[d._0_modifier_cannot_be_used_in_an_ambient_context=1040]="_0_modifier_cannot_be_used_in_an_ambient_context",d[d._0_modifier_cannot_be_used_here=1042]="_0_modifier_cannot_be_used_here",d[d._0_modifier_cannot_appear_on_a_module_or_namespace_element=1044]="_0_modifier_cannot_appear_on_a_module_or_namespace_element",d[d.A_rest_parameter_cannot_be_optional=1047]="A_rest_parameter_cannot_be_optional",d[d.A_rest_parameter_cannot_have_an_initializer=1048]="A_rest_parameter_cannot_have_an_initializer",d[d._0_modifier_cannot_appear_on_a_type_member=1070]="_0_modifier_cannot_appear_on_a_type_member",d[d._0_modifier_cannot_appear_on_an_index_signature=1071]="_0_modifier_cannot_appear_on_an_index_signature",d[d.A_0_modifier_cannot_be_used_with_an_import_declaration=1079]="A_0_modifier_cannot_be_used_with_an_import_declaration",d[d._0_modifier_cannot_appear_on_a_constructor_declaration=1089]="_0_modifier_cannot_appear_on_a_constructor_declaration",d[d._0_modifier_cannot_appear_on_a_parameter=1090]="_0_modifier_cannot_appear_on_a_parameter",d[d.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement=1091]="Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement",d[d.Invalid_use_of_0_in_strict_mode=1100]="Invalid_use_of_0_in_strict_mode",d[d.A_with_statements_are_not_allowed_in_strict_mode=1101]="A_with_statements_are_not_allowed_in_strict_mode",d[d.A_delete_cannot_be_called_on_an_identifier_in_strict_mode=1102]="A_delete_cannot_be_called_on_an_identifier_in_strict_mode",d[d.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement=1104]="A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement",d[d.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement=1105]="A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement",d[d.Jump_target_cannot_cross_function_boundary=1107]="Jump_target_cannot_cross_function_boundary",d[d.A_return_statement_can_only_be_used_within_a_function_body=1108]="A_return_statement_can_only_be_used_within_a_function_body",d[d.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement=1113]="A_default_clause_cannot_appear_more_than_once_in_a_switch_statement",d[d.Duplicate_label_0=1114]="Duplicate_label_0",d[d.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement=1115]="A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement",d[d.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement=1116]="A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement",d[d.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode=1117]="An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode",d[d.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name=1118]="An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name",d[d.An_object_literal_cannot_have_property_and_accessor_with_the_same_name=1119]="An_object_literal_cannot_have_property_and_accessor_with_the_same_name",d[d.Octal_literals_are_not_allowed_in_strict_mode=1121]="Octal_literals_are_not_allowed_in_strict_mode",d[d.Octal_escape_sequences_are_not_allowed_in_strict_mode=1122]="Octal_escape_sequences_are_not_allowed_in_strict_mode",d[d.Variable_declaration_list_cannot_be_empty=1123]="Variable_declaration_list_cannot_be_empty",d[d.Line_break_not_permitted_here=1142]="Line_break_not_permitted_here",d[d.The_const_declarations_can_only_be_declared_inside_a_block=1156]="The_const_declarations_can_only_be_declared_inside_a_block",d[d.The_const_declarations_must_be_initialized=1155]="The_const_declarations_must_be_initialized",d[d.The_let_declarations_can_only_be_declared_inside_a_block=1157]="The_let_declarations_can_only_be_declared_inside_a_block",d[d.Unterminated_regular_expression_literal=1161]="Unterminated_regular_expression_literal",d[d.An_object_member_cannot_be_declared_optional=1162]="An_object_member_cannot_be_declared_optional",d[d.A_yield_expression_is_only_allowed_in_a_generator_body=1163]="A_yield_expression_is_only_allowed_in_a_generator_body",d[d.A_comma_expression_is_not_allowed_in_a_computed_property_name=1171]="A_comma_expression_is_not_allowed_in_a_computed_property_name",d[d.The_extends_clause_already_seen=1172]="The_extends_clause_already_seen",d[d.Classes_can_only_extend_a_single_class=1174]="Classes_can_only_extend_a_single_class",d[d.The_implements_clause_already_seen=1175]="The_implements_clause_already_seen",d[d.Property_destructuring_pattern_expected=1180]="Property_destructuring_pattern_expected",d[d.A_destructuring_declaration_must_have_an_initializer=1182]="A_destructuring_declaration_must_have_an_initializer",d[d.A_rest_element_cannot_have_an_initializer=1186]="A_rest_element_cannot_have_an_initializer",d[d.A_parameter_property_may_not_be_declared_using_a_binding_pattern=1187]="A_parameter_property_may_not_be_declared_using_a_binding_pattern",d[d.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement=1188]="Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement",d[d.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer=1189]="The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer",d[d.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer=1190]="The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer",d[d.Line_terminator_not_permitted_before_arrow=1200]="Line_terminator_not_permitted_before_arrow",d[d.Decorators_are_not_valid_here=1206]="Decorators_are_not_valid_here",d[d.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name=1207]="Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name",d[d.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode=1210]="Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode",d[d.Identifier_expected_0_is_a_reserved_word_in_strict_mode=1212]="Identifier_expected_0_is_a_reserved_word_in_strict_mode",d[d.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode=1213]="Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode",d[d.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode=1214]="Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode",d[d.An_import_declaration_can_only_be_used_in_a_namespace_or_module=1232]="An_import_declaration_can_only_be_used_in_a_namespace_or_module",d[d.An_export_declaration_can_only_be_used_in_a_module=1233]="An_export_declaration_can_only_be_used_in_a_module",d[d.The_abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration=1242]="The_abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration",d[d._0_modifier_cannot_be_used_with_1_modifier=1243]="_0_modifier_cannot_be_used_with_1_modifier",d[d.Abstract_methods_can_only_appear_within_an_abstract_class=1244]="Abstract_methods_can_only_appear_within_an_abstract_class",d[d.A_class_member_cannot_have_the_0_keyword=1248]="A_class_member_cannot_have_the_0_keyword",d[d.A_decorator_can_only_decorate_a_method_implementation_not_an_overload=1249]="A_decorator_can_only_decorate_a_method_implementation_not_an_overload",d[d.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5=1250]="Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5",d[d.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode=1251]="Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode",d[d.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode=1252]="Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode",d[d.A_definite_assignment_assertion_is_not_permitted_in_this_context=1255]="A_definite_assignment_assertion_is_not_permitted_in_this_context",d[d.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module=1262]="Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module",d[d.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions=1263]="Declarations_with_initializers_cannot_also_have_definite_assignment_assertions",d[d.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations=1264]="Declarations_with_definite_assignment_assertions_must_also_have_type_annotations",d[d.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules=1308]="await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules",d[d.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern=1312]="Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern",d[d.A_parameter_property_cannot_be_declared_using_a_rest_parameter=1317]="A_parameter_property_cannot_be_declared_using_a_rest_parameter",d[d.A_default_export_can_only_be_used_in_an_ECMAScript_style_module=1319]="A_default_export_can_only_be_used_in_an_ECMAScript_style_module",d[d.use_strict_directive_cannot_be_used_with_non_simple_parameter_list=1347]="use_strict_directive_cannot_be_used_with_non_simple_parameter_list",d[d.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here=1359]="Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here",d[d.Duplicate_identifier_0=2300]="Duplicate_identifier_0",d[d.The_super_can_only_be_referenced_in_a_derived_class=2335]="The_super_can_only_be_referenced_in_a_derived_class",d[d.The_super_cannot_be_referenced_in_constructor_arguments=2336]="The_super_cannot_be_referenced_in_constructor_arguments",d[d.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors=2337]="Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors",d[d.The_super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class=2338]="The_super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class",d[d.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter=2358]="The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter",d[d.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type=2359]="The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type",d[d.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol=2360]="The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol",d[d.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter=2361]="The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter",d[d.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type=2362]="The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type",d[d.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type=2363]="The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type",d[d.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access=2364]="The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access",d[d.Multiple_constructor_implementations_are_not_allowed=2392]="Multiple_constructor_implementations_are_not_allowed",d[d.Declaration_name_conflicts_with_built_in_global_identifier_0=2397]="Declaration_name_conflicts_with_built_in_global_identifier_0",d[d.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation=2404]="The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation",d[d.The_super_cannot_be_referenced_in_a_computed_property_name=2466]="The_super_cannot_be_referenced_in_a_computed_property_name",d[d.A_rest_element_must_be_last_in_a_destructuring_pattern=2462]="A_rest_element_must_be_last_in_a_destructuring_pattern",d[d.The_let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations=2480]="The_let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations",d[d.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation=2483]="The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation",d[d.The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access=2487]="The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access",d[d.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern=2491]="The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern",d[d.A_rest_element_cannot_contain_a_binding_pattern=2501]="A_rest_element_cannot_contain_a_binding_pattern",d[d.The_super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions=2660]="The_super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions",d[d.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module=2661]="Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module",d[d.Left_side_of_comma_operator_is_unused_and_has_no_side_effects=2695]="Left_side_of_comma_operator_is_unused_and_has_no_side_effects",d[d.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access=2701]="The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access",d[d.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access=2778]="The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access",d[d.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access=2779]="The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access",d[d.The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access=2781]="The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access",d[d._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2=17012]="_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2",d[d.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor=17013]="Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor",d[d.An_accessibility_modifier_cannot_be_used_with_a_private_identifier=18010]="An_accessibility_modifier_cannot_be_used_with_a_private_identifier",d[d.Private_identifiers_are_not_allowed_outside_class_bodies=18016]="Private_identifiers_are_not_allowed_outside_class_bodies",d[d._0_modifier_cannot_be_used_with_a_private_identifier=18019]="_0_modifier_cannot_be_used_with_a_private_identifier",d[d.In_strict_mode_code_functions_can_only_be_declared_at_top_level_or_inside_a_block=19e3]="In_strict_mode_code_functions_can_only_be_declared_at_top_level_or_inside_a_block",d[d.Class_Declaration_can_only_be_declared_at_top_level_or_inside_a_block=19001]="Class_Declaration_can_only_be_declared_at_top_level_or_inside_a_block",d[d.Incorrect_regular_expression=19002]="Incorrect_regular_expression",d[d.Invalid_regular_expression_Colon_0_Colon_Invalid_escape=19003]="Invalid_regular_expression_Colon_0_Colon_Invalid_escape",d[d._8_and_9_are_not_allowed_in_strict_mode=19004]="_8_and_9_are_not_allowed_in_strict_mode",d[d.const_and_let_declarations_not_allowed_in_statement_positions=19005]="const_and_let_declarations_not_allowed_in_statement_positions",d[d.Getter_must_not_have_any_formal_parameters=19006]="Getter_must_not_have_any_formal_parameters",d[d.Class_declaration_not_allowed_in_statement_position=19007]="Class_declaration_not_allowed_in_statement_position",d[d.Lexical_declaration_let_not_allowed_in_statement_position=19008]="Lexical_declaration_let_not_allowed_in_statement_position",d[d.Lexical_declaration_const_not_allowed_in_statement_position=19009]="Lexical_declaration_const_not_allowed_in_statement_position",d[d.Invalid_regular_expression_flag_0=19010]="Invalid_regular_expression_flag_0",t.getDiagnostic=function(e){switch(e){case 1003:return _(1003,o.DiagnosticCategory.Error,"Identifier_expected_1003","Identifier expected.");case 1013:return _(1013,o.DiagnosticCategory.Error,"A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013","A rest parameter or binding pattern may not have a trailing comma.");case 1014:return _(1014,o.DiagnosticCategory.Error,"A_rest_parameter_must_be_last_in_a_parameter_list_1014","A rest parameter must be last in a parameter list.");case 1015:return _(1015,o.DiagnosticCategory.Error,"Parameter_cannot_have_question_mark_and_initializer_1015","Parameter cannot have question mark and initializer.");case 1016:return _(1016,o.DiagnosticCategory.Error,"A_required_parameter_cannot_follow_an_optional_parameter_1016","A required parameter cannot follow an optional parameter.");case 1024:return _(1024,o.DiagnosticCategory.Error,"The_readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024","The 'readonly' modifier can only appear on a property declaration or index signature.");case 1028:return _(1028,o.DiagnosticCategory.Error,"Accessibility_modifier_already_seen_1028","Accessibility modifier already seen.");case 1029:return _(1029,o.DiagnosticCategory.Error,"_0_modifier_must_precede_1_modifier_1029","'{0}' modifier must precede '{1}' modifier.");case 1030:return _(1030,o.DiagnosticCategory.Error,"_0_modifier_already_seen_1030","'{0}' modifier already seen.");case 1031:return _(1031,o.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031","'{0}' modifier cannot appear on class elements of this kind.");case 1038:return _(1038,o.DiagnosticCategory.Error,"A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038","A 'declare' modifier cannot be used in an already ambient context.");case 1040:return _(1040,o.DiagnosticCategory.Error,"_0_modifier_cannot_be_used_in_an_ambient_context_1040","'{0}' modifier cannot be used in an ambient context.");case 1042:return _(1042,o.DiagnosticCategory.Error,"_0_modifier_cannot_be_used_here_1042","'{0}' modifier cannot be used here.");case 1044:return _(1044,o.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044","'{0}' modifier cannot appear on a module or namespace element.");case 1047:return _(1047,o.DiagnosticCategory.Error,"A_rest_parameter_cannot_be_optional_1047","A rest parameter cannot be optional.");case 1048:return _(1048,o.DiagnosticCategory.Error,"A_rest_parameter_cannot_have_an_initializer_1048","A rest parameter cannot have an initializer.");case 1070:return _(1070,o.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_type_member_1070","'{0}' modifier cannot appear on a type member.");case 1071:return _(1071,o.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_an_index_signature_1071","'{0}' modifier cannot appear on an index signature.");case 1079:return _(1079,o.DiagnosticCategory.Error,"A_0_modifier_cannot_be_used_with_an_import_declaration_1079","A '{0}' modifier cannot be used with an import declaration.");case 1089:return _(1089,o.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration.");case 1090:return _(1090,o.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_parameter_1090","'{0}' modifier cannot appear on a parameter.");case 1091:return _(1091,o.DiagnosticCategory.Error,"Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091","Only a single variable declaration is allowed in a 'for...in' statement.");case 1100:return _(1100,o.DiagnosticCategory.Error,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode.");case 1101:return _(1101,o.DiagnosticCategory.Error,"A_with_statements_are_not_allowed_in_strict_mode_1101","A 'with' statements are not allowed in strict mode.");case 1102:return _(1102,o.DiagnosticCategory.Error,"A_delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","A 'delete' cannot be called on an identifier in strict mode.");case 1104:return _(1104,o.DiagnosticCategory.Error,"A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104","A 'continue' statement can only be used within an enclosing iteration statement.");case 1105:return _(1105,o.DiagnosticCategory.Error,"A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105","A 'break' statement can only be used within an enclosing iteration or switch statement.");case 1107:return _(1107,o.DiagnosticCategory.Error,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary.");case 1108:return _(1108,o.DiagnosticCategory.Error,"A_return_statement_can_only_be_used_within_a_function_body_1108","A 'return' statement can only be used within a function body.");case 1113:return _(1113,o.DiagnosticCategory.Error,"A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113","A 'default' clause cannot appear more than once in a 'switch' statement.");case 1114:return _(1114,o.DiagnosticCategory.Error,"Duplicate_label_0_1114","Duplicate label '{0}'.");case 1115:return _(1115,o.DiagnosticCategory.Error,"A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115","A 'continue' statement can only jump to a label of an enclosing iteration statement.");case 1116:return _(1116,o.DiagnosticCategory.Error,"A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116","A 'break' statement can only jump to a label of an enclosing statement.");case 1117:return _(1117,o.DiagnosticCategory.Error,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117","An object literal cannot have multiple properties with the same name in strict mode.");case 1118:return _(1118,o.DiagnosticCategory.Error,"An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118","An object literal cannot have multiple get/set accessors with the same name.");case 1119:return _(1119,o.DiagnosticCategory.Error,"An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119","An object literal cannot have property and accessor with the same name.");case 1121:return _(1121,o.DiagnosticCategory.Error,"Octal_literals_are_not_allowed_in_strict_mode_1121","Octal literals are not allowed in strict mode.");case 1122:return _(1122,o.DiagnosticCategory.Error,"Octal_escape_sequences_are_not_allowed_in_strict_mode_1122","Octal escape sequences are not allowed in strict mode.");case 1123:return _(1123,o.DiagnosticCategory.Error,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty.");case 1142:return _(1142,o.DiagnosticCategory.Error,"Line_break_not_permitted_here_1142","Line break not permitted here.");case 1156:return _(1156,o.DiagnosticCategory.Error,"The_const_declarations_can_only_be_declared_inside_a_block_1156","The 'const' declarations can only be declared inside a block.");case 1155:return _(1155,o.DiagnosticCategory.Error,"The_const_declarations_must_be_initialized_1155","The 'const' declarations must be initialized.");case 1157:return _(1157,o.DiagnosticCategory.Error,"The_let_declarations_can_only_be_declared_inside_a_block_1157","The 'let' declarations can only be declared inside a block.");case 1161:return _(1161,o.DiagnosticCategory.Error,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal.");case 1162:return _(1162,o.DiagnosticCategory.Error,"An_object_member_cannot_be_declared_optional_1162","An object member cannot be declared optional.");case 1163:return _(1163,o.DiagnosticCategory.Error,"A_yield_expression_is_only_allowed_in_a_generator_body_1163","A 'yield' expression is only allowed in a generator body.");case 1171:return _(1171,o.DiagnosticCategory.Error,"A_comma_expression_is_not_allowed_in_a_computed_property_name_1171","A comma expression is not allowed in a computed property name.");case 1172:return _(1172,o.DiagnosticCategory.Error,"The_extends_clause_already_seen_1172","The 'extends' clause already seen.");case 1174:return _(1174,o.DiagnosticCategory.Error,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class.");case 1175:return _(1175,o.DiagnosticCategory.Error,"The_implements_clause_already_seen_1175","The 'implements' clause already seen.");case 1180:return _(1180,o.DiagnosticCategory.Error,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected.");case 1182:return _(1182,o.DiagnosticCategory.Error,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer.");case 1186:return _(1186,o.DiagnosticCategory.Error,"A_rest_element_cannot_have_an_initializer_1186","A_rest_element_cannot_have_an_initializer.");case 1187:return _(1187,o.DiagnosticCategory.Error,"A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187","A parameter property may not be declared using a binding pattern.");case 1188:return _(1188,o.DiagnosticCategory.Error,"Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188","Only a single variable declaration is allowed in a 'for...of' statement.");case 1189:return _(1189,o.DiagnosticCategory.Error,"The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189","The variable declaration of a 'for...in' statement cannot have an initializer.");case 1190:return _(1190,o.DiagnosticCategory.Error,"The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190","The variable declaration of a 'for...of' statement cannot have an initializer.");case 1200:return _(1200,o.DiagnosticCategory.Error,"Line_terminator_not_permitted_before_arrow_1200","Line terminator not permitted before arrow.");case 1206:return _(1206,o.DiagnosticCategory.Error,"Decorators_are_not_valid_here_1206","Decorators are not valid here.");case 1207:return _(1207,o.DiagnosticCategory.Error,"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207","Decorators cannot be applied to multiple get/set accessors of the same name.");case 1210:return _(1210,o.DiagnosticCategory.Error,"Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210","Invalid use of '{0}'. Class definitions are automatically in strict mode.");case 1212:return _(1212,o.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212","Identifier expected. '{0}' is a reserved word in strict mode.");case 1213:return _(1213,o.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213","Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode.");case 1214:return _(1214,o.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214","Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode.");case 1232:return _(1232,o.DiagnosticCategory.Error,"An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232","An import declaration can only be used in a namespace or module.");case 1233:return _(1233,o.DiagnosticCategory.Error,"An_export_declaration_can_only_be_used_in_a_module_1233","An export declaration can only be used in a module.");case 1242:return _(1242,o.DiagnosticCategory.Error,"The_abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242","The 'abstract' modifier can only appear on a class, method, or property declaration.");case 1243:return _(1243,o.DiagnosticCategory.Error,"_0_modifier_cannot_be_used_with_1_modifier_1243","'{0}' modifier cannot be used with '{1}' modifier.");case 1244:return _(1244,o.DiagnosticCategory.Error,"Abstract_methods_can_only_appear_within_an_abstract_class_1244","Abstract methods can only appear within an abstract class.");case 1248:return _(1248,o.DiagnosticCategory.Error,"A_class_member_cannot_have_the_0_keyword_1248","A class member cannot have the '{0}' keyword.");case 1249:return _(1249,o.DiagnosticCategory.Error,"A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249","A decorator can only decorate a method implementation, not an overload.");case 1250:return _(1250,o.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'.");case 1251:return _(1251,o.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode.");case 1252:return _(1252,o.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode.");case 1255:return _(1255,o.DiagnosticCategory.Error,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context.");case 1262:return _(1262,o.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262","Identifier expected. '{0}' is a reserved word at the top-level of a module.");case 1263:return _(1263,o.DiagnosticCategory.Error,"Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263","Declarations with initializers cannot also have definite assignment assertions.");case 1264:return _(1264,o.DiagnosticCategory.Error,"Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264","Declarations with definite assignment assertions must also have type annotations.");case 1308:return _(1308,o.DiagnosticCategory.Error,"await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308","await expressions are only allowed within async functions and at the top levels of modules.");case 1312:return _(1312,o.DiagnosticCategory.Error,"Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312","Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern.");case 1317:return _(1317,o.DiagnosticCategory.Error,"A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317","A parameter property cannot be declared using a rest parameter.");case 1319:return _(1319,o.DiagnosticCategory.Error,"A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319","A default export can only be used in an ECMAScript-style module.");case 1347:return _(1347,o.DiagnosticCategory.Error,"use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347","use strict directive cannot be used with non-simple parameter list.");case 1359:return _(1359,o.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359","Identifier expected. '{0}' is a reserved word that cannot be used here.");case 2300:return _(2300,o.DiagnosticCategory.Error,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'.");case 2335:return _(2335,o.DiagnosticCategory.Error,"The_super_can_only_be_referenced_in_a_derived_class_2335","The 'super' can only be referenced in a derived class.");case 2336:return _(2336,o.DiagnosticCategory.Error,"The_super_cannot_be_referenced_in_constructor_arguments_2336","The 'super' cannot be referenced in constructor arguments.");case 2337:return _(2337,o.DiagnosticCategory.Error,"Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337","Super calls are not permitted outside constructors or in nested functions inside constructors.");case 2338:return _(2338,o.DiagnosticCategory.Error,"The_super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_2338","The 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.");case 2358:return _(2358,o.DiagnosticCategory.Error,"The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358","The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.");case 2359:return _(2359,o.DiagnosticCategory.Error,"The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359","The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type.");case 2360:return _(2360,o.DiagnosticCategory.Error,"The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360","The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'.");case 2361:return _(2361,o.DiagnosticCategory.Error,"The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361","The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter.");case 2362:return _(2362,o.DiagnosticCategory.Error,"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362","The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.");case 2363:return _(2363,o.DiagnosticCategory.Error,"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363","The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.");case 2364:return _(2364,o.DiagnosticCategory.Error,"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364","The left-hand side of an assignment expression must be a variable or a property access.");case 2392:return _(2392,o.DiagnosticCategory.Error,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed.");case 2397:return _(2397,o.DiagnosticCategory.Error,"Declaration_name_conflicts_with_built_in_global_identifier_0_2397","Declaration name conflicts with built-in global identifier '{0}'.");case 2404:return _(2404,o.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404","The left-hand side of a 'for...in' statement cannot use a type annotation.");case 2466:return _(2466,o.DiagnosticCategory.Error,"The_super_cannot_be_referenced_in_a_computed_property_name_2466","The 'super' cannot be referenced in a computed property name.");case 2462:return _(2462,o.DiagnosticCategory.Error,"A_rest_element_must_be_last_in_a_destructuring_pattern_2462","A rest element must be last in a destructuring pattern.");case 2480:return _(2480,o.DiagnosticCategory.Error,"The_let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480","The 'let' is not allowed to be used as a name in 'let' or 'const' declarations.");case 2483:return _(2483,o.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483","The left-hand side of a 'for...of' statement cannot use a type annotation.");case 2487:return _(2487,o.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487","The left-hand side of a 'for...of' statement must be a variable or a property access.");case 2491:return _(2491,o.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491","The left-hand side of a 'for...in' statement cannot be a destructuring pattern.");case 2501:return _(2501,o.DiagnosticCategory.Error,"A_rest_element_cannot_contain_a_binding_pattern_2501","A rest element cannot contain a binding pattern.");case 2660:return _(2660,o.DiagnosticCategory.Error,"The_super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660","The 'super' can only be referenced in members of derived classes or object literal expressions.");case 2661:return _(2661,o.DiagnosticCategory.Error,"Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661","Cannot export '{0}'. Only local declarations can be exported from a module.");case 2695:return _(2695,o.DiagnosticCategory.Error,"Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695","Left side of comma operator is unused and has no side effects.",!0);case 2701:return _(2701,o.DiagnosticCategory.Error,"The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701","The target of an object rest assignmen [all...] |