/arkcompiler/ets_runtime/test/moduletest/container/ |
H A D | container_lightweightmap.js | 47 res.set("test getKeyAt-2:", proxy.getKeyAt(Math.floor(1.3)) == "b"); 77 res.set("test getValueAt:", dProxy.getValueAt(Math.floor(0)) === "cc"); 78 res.set("test getValueAt:", dProxy.getValueAt(Math.floor(1)) === "ee"); 79 res.set("test setValueAt-2:", dProxy.setValueAt(Math.floor(1.3), "ff")); 80 res.set("test getValueAt-2:", dProxy.getValueAt(Math.floor(1.3)) === "ff"); 83 res.set("test removeAt-2:", dProxy.removeAt(Math.floor(1.3)) && dProxy.length == 2); 86 dProxy.increaseCapacityTo(Math.floor(1.3)); 137 // Math.floor as index input should not throw exception. 141 myLm.getKeyAt(Math.floor(1.5)); 142 myLm.getValueAt(Math.floor(1. [all...] |
H A D | container_plainarray.js | 178 // Math.floor as index input should not throw exception. 181 myPa.add(Math.floor(1.5), "b"); 182 myPa.has(Math.floor(1.5)); 183 myPa.get(Math.floor(1.5)); 184 myPa.getValueAt(Math.floor(1.5)); 185 myPa.setValueAt(Math.floor(1.5), "c"); 186 myPa.getKeyAt(Math.floor(1.5)); 187 myPa.getIndexOfKey(Math.floor(1.5)); 188 myPa.removeAt(Math.floor(1.5));
|
H A D | container_list.js | 407 map.set("test list JSAPIList::GetProperty:", testlist[Math.floor(1)] === 8); 485 // Math.floor as the index input should not throw exception. 490 myList1.insert(999, Math.floor(1.5)); 491 myList1.get(Math.floor(1.5)); 492 myList1.set(Math.floor(1.5), 888); 493 myList1.removeByIndex(Math.floor(1.5));
|
H A D | container_lightweightset.js | 160 // Math.floor be index input should not throw exception. 164 myLs.getValueAt(Math.floor(1.5)); 165 myLs.removeAt(Math.floor(1.5));
|
H A D | container_hashmap.js | 54 let ss = Math.floor(Math.random()*10); 62 myTest.set(Math.floor(1.4), 2);
|
H A D | container_arraylist.js | 236 map.set("test arraylist JSAPIArrayList::GetProperty:", testlist[Math.floor(1)] === 9); 282 myAl.insert(30, Math.floor(1.3)); 283 myAl.removeByIndex(Math.floor(1.3));
|
H A D | container_linked_list.js | 399 // Math.floor as the index input should not throw exception. 404 myList1.insert(Math.floor(1.5), 999); 405 myList1.get(Math.floor(1.5)); 406 myList1.set(Math.floor(1.5), 888); 407 myList1.removeByIndex(Math.floor(1.5));
|
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/intrinsics/ |
H A D | std_core_Double.cpp | 168 digitAbs = std::abs((digitAbs >= 0) ? std::floor(digitAbs) : std::ceil(digitAbs)); in StdCoreDoubleToExponential() 201 digitAbs = std::abs((digitAbs >= 0) ? std::floor(digitAbs) : std::ceil(digitAbs)); in StdCoreDoubleToPrecision() 234 digitAbs = std::abs((digitAbs >= 0) ? std::floor(digitAbs) : std::ceil(digitAbs)); in StdCoreDoubleToFixed()
|
/arkcompiler/ets_runtime/tools/circuit_viewer/src/engine/ |
H A D | XTools.js | 74 return Math.floor(Math.random() * (max - min)) + min;
|
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/intrinsics/helpers/ |
H A D | ets_intrinsics_helpers.h | 241 return (number >= 0) ? std::floor(number) : std::ceil(number); in TruncateFp() 251 int64_t integer = std::floor(fraction); in DecimalsToString()
|
H A D | ets_intrinsics_helpers.cpp | 387 int logDigit = std::floor(log10(positiveNumber)); in DoubleToPrecision()
|
/arkcompiler/ets_runtime/test/aottest/exception_case14/ |
H A D | exception_case14.js | 19 mathfloor = Math.floor,
|
/arkcompiler/ets_runtime/ecmascript/base/ |
H A D | number_helper.cpp | 187 double integer = std::floor(number); 199 int64_t digit = std::floor(fraction); 428 int logDigit = std::floor(log10(positiveNumber)); 815 double ret = (d >= 0) ? std::floor(d) : std::ceil(d);
|
/arkcompiler/ets_runtime/ecmascript/compiler/ |
H A D | builtins_lowering.cpp | 135 GateRef floor = builder_.CallNGCRuntime(glue, index, Gate::InvalidGateRef, {value}, gate); in TypedFloor() local 136 result = builder_.DoubleToTaggedDoublePtr(floor); in TypedFloor()
|
/arkcompiler/ets_runtime/tools/circuit_viewer/src/engine/graphics/ |
H A D | XTexture.js | 224 let useHeight = Math.floor((h + 31) / 32);
|
/arkcompiler/ets_runtime/ecmascript/deoptimizer/ |
H A D | deoptimizer.cpp | 631 shift = std::floor(std::log2(depth)) + 1; in ComputeShift()
|
/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 assignment must be a variable or a property access.");case 2778:return _(2778,o.DiagnosticCategory.Error,"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.");case 2779:return _(2779,o.DiagnosticCategory.Error,"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.");case 2781:return _(2781,o.DiagnosticCategory.Error,"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.");case 17012:return _(17012,o.DiagnosticCategory.Error,"_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}'?");case 17013:return _(17013,o.DiagnosticCategory.Error,"Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013","Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor.");case 18010:return _(18010,o.DiagnosticCategory.Error,"An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010","An accessibility modifier cannot be used with a private identifier.");case 18016:return _(18016,o.DiagnosticCategory.Error,"Private_identifiers_are_not_allowed_outside_class_bodies_18016","Private identifiers are not allowed outside class bodies.");case 18019:return _(18019,o.DiagnosticCategory.Error,"_0_modifier_cannot_be_used_with_a_private_identifier_18019","'{0}' modifier cannot be used with a private identifier.");case 19e3:return _(19e3,o.DiagnosticCategory.Error,"In_strict_mode_code_functions_can_only_be_declared_at_top_level_or_inside_a_block_19000","In strict mode code, functions can only be declared at top level or inside a block.");case 19001:return _(19001,o.DiagnosticCategory.Error,"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.");case 19002:return _(19002,o.DiagnosticCategory.Error,"Incorrect_regular_expression_19002","Incorrect regular expression");case 19003:return _(19003,o.DiagnosticCategory.Error,"Invalid_regular_expression_Colon_0_Colon_Invalid_escape_19003","Invalid regular expression: '{0}': Invalid escape");case 19004:return _(19004,o.DiagnosticCategory.Error,"_8_and_9_are_not_allowed_in_strict_mode_19004","\\8 and \\9 are not allowed in strict mode");case 19005:return _(19005,o.DiagnosticCategory.Error,"const_and_let_declarations_not_allowed_in_statement_positions_19005","const and let declarations not allowed in statement positions");case 19006:return _(19006,o.DiagnosticCategory.Error,"Getter_must_not_have_any_formal_parameters_19006","Getter must not have any formal parameters");case 19007:return _(19007,o.DiagnosticCategory.Error,"Class_declaration_not_allowed_in_statement_position_19007","Class declaration not allowed in statement position");case 19008:return _(19008,o.DiagnosticCategory.Error,"Lexical_declaration_let_not_allowed_in_statement_position_19008","Lexical declaration 'let' not allowed in statement position");case 19009:return _(19009,o.DiagnosticCategory.Error,"Lexical_declaration_const_not_allowed_in_statement_position_19009","Lexical declaration 'const' not allowed in statement position");case 19010:return _(19010,o.DiagnosticCategory.Error,"Invalid_regular_expression_flag_0_19010","Invalid regular expression flag '{0}'");default:return void console.log("The syntax error code is not supported.")}}},"./src/expression/arrayLiteralExpression.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.createArrayFromElements=t.compileArrayLiteralExpression=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=a(r("./src/jshelpers.js")),c=r("./src/base/literal.ts"),l=r("./src/base/properties.ts"),u=r("./src/pandagen.ts"),_=r("./src/expression/numericLiteral.ts");function d(e,t,r,n){let i=t.getPandaGen();if(0==r.length)return i.createEmptyArray(e),void i.storeAccumulator(e,n);let a=new c.LiteralBuffer,s=i.getTemp(),u=!1,_=!1;for(let e=0;e<r.length;e++){let c=r[e];if((0,l.isConstantExpr)(c)){let o=p(c);if(!u){a.addLiterals(o),e==r.length-1&&(f(i,a,c),i.storeAccumulator(c,n),u=!0);continue}t.compileExpression(c),_?g(i,c,n,s):i.storeOwnProperty(c,n,e)}else o.isSpreadElement(c)?(u||(f(i,a,c),i.storeAccumulator(c,n),u=!0),_||(_=!0,i.loadAccumulatorInt(c,e),i.storeAccumulator(c,s)),m(t,i,c,n,s)):o.isOmittedExpression(c)?(u||(f(i,a,c),i.storeAccumulator(c,n),u=!0),e==r.length-1&&(_?(i.loadAccumulator(c,s),i.storeObjProperty(c,n,"length")):(i.loadAccumulatorInt(c,r.length),i.storeObjProperty(c,n,"length")))):(u||(f(i,a,c),i.storeAccumulator(c,n),u=!0),t.compileExpression(c),_?g(i,c,n,s):i.storeOwnProperty(c,n,e))}i.loadAccumulator(e,n),i.freeTemps(s)}function p(e){let t;switch(e.kind){case o.SyntaxKind.FalseKeyword:t=new c.Literal(c.LiteralTag.BOOLEAN,!1);break;case o.SyntaxKind.TrueKeyword:t=new c.Literal(c.LiteralTag.BOOLEAN,!0);break;case o.SyntaxKind.StringLiteral:t=new c.Literal(c.LiteralTag.STRING,s.getTextOfIdentifierOrLiteral(e));break;case o.SyntaxKind.NumericLiteral:{let r=Number.parseFloat(s.getTextOfIdentifierOrLiteral(e));t=(0,_.isInteger)(r)?new c.Literal(c.LiteralTag.INTEGER,r):new c.Literal(c.LiteralTag.DOUBLE,r);break}case o.SyntaxKind.NullKeyword:t=new c.Literal(c.LiteralTag.NULLVALUE,null);break;default:throw new Error("invalid constant expression")}return t}function f(e,t,r){if(t.isEmpty())e.createEmptyArray(r);else{let n=u.PandaGen.getLiteralArrayBuffer(),i=n.length;n.push(t),e.createArrayWithBuffer(r,i)}}function g(e,t,r,n){e.storeOwnProperty(t,r,n),e.unary(t,o.SyntaxKind.PlusPlusToken,n),e.storeAccumulator(t,n)}function m(e,t,r,n,i){e.compileExpression(r.expression),t.storeArraySpreadElement(r,n,i),t.storeAccumulator(r,i)}t.compileArrayLiteralExpression=function(e,t){let r=e.getPandaGen(),n=r.getTemp();d(t,e,t.elements,n),r.freeTemps(n)},t.createArrayFromElements=d},"./src/expression/bigIntLiteral.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.compileBigIntLiteral=void 0;const o=a(r("./src/jshelpers.js"));t.compileBigIntLiteral=function(e,t){let r=o.getTextOfIdentifierOrLiteral(t);r=r.substring(0,r.length-1),e.loadAccumulatorBigInt(t,r)}},"./src/expression/callExpression.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.emitCall=t.getHiddenParameters=t.compileCallExpression=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/base/util.ts"),c=r("./src/base/vregisterCache.ts"),l=r("./src/statement/classStatement.ts"),u=r("./src/expression/arrayLiteralExpression.ts"),_=r("./src/expression/memberAccessExpression.ts");function d(e,t){let r=t.getPandaGen(),n=!1,i=[],a=r.getTemp();if((0,s.isMemberExpression)(e)){n=!0;let s=r.getTemp(),c=r.getTemp(),{obj:u,prop:d}=(0,_.getObjAndProp)(e,s,c,t);e.expression.kind==o.SyntaxKind.SuperKeyword?(0,l.compileSuperProperty)(t,e,s,d):r.loadObjProperty(o.isPropertyAccessExpression(e)?e.name:e.argumentExpression,s,d),r.storeAccumulator(e,a),i.push(a,s),r.freeTemps(c)}else t.compileExpression(e),r.storeAccumulator(e,a),i.push(a);return{arguments:i,passThis:n}}function p(e,t,r){let n=e.getPandaGen(),i=!1;for(let e=0;e<t.arguments.length;e++){let r=t.arguments[e];if(i=!!o.isSpreadElement(r),i)break}return i||t.arguments.forEach((t=>{let i=n.getTemp();e.compileExpression(t),n.storeAccumulator(t,i),r.push(i)})),i}function f(e,t,r,n){let i,a=n.getPandaGen(),s=p(n,e,t),l=e.expression;switch(l.kind){case o.SyntaxKind.ElementAccessExpression:i=l.argumentExpression;break;case o.SyntaxKind.PropertyAccessExpression:i=l.name;break;default:i=e}if(!s)return void a.call(i,[...t],r);let _=t[0],d=r?t[1]:(0,c.getVregisterCache)(a,c.CacheList.undefined),f=a.getTemp();(0,u.createArrayFromElements)(e,n,e.arguments,f),a.callSpread(i,_,d,f),a.freeTemps(f)}t.compileCallExpression=function(e,t,r){let n=t.getPandaGen();if((e.expression.kind==o.SyntaxKind.CallExpression||e.expression.kind==o.SyntaxKind.NewExpression)&&t.compileFunctionReturnThis(e.expression))return;if(e.expression.kind==o.SyntaxKind.SuperKeyword){let r=[],i=p(t,e,r);return(0,l.compileSuperCall)(t,e,r,i),void n.freeTemps(...r)}let{arguments:i,passThis:a}=d(e.expression,t);f(e,i,a,t),n.freeTemps(...i)},t.getHiddenParameters=d,t.emitCall=f},"./src/expression/compileCommaListExpression.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compileCommaListExpression=void 0,t.compileCommaListExpression=function(e,t){t.elements.forEach((t=>{e.compileExpression(t)}))}},"./src/expression/memberAccessExpression.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.isValidIndex=t.getObjAndProp=t.compileMemberAccessExpression=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=a(r("./src/jshelpers.js")),c=r("./src/statement/classStatement.ts"),l=Math.pow(2,32)-1;function u(e,t,r,n){let i=n.getPandaGen(),a=t,c=r;if(s.isSuperProperty(e)||(n.compileExpression(e.expression),i.storeAccumulator(e.expression,t)),o.isPropertyAccessExpression(e)){if(e.name.kind!=o.SyntaxKind.Identifier)throw new Error("Property name of type private Identifier is unimplemented");c=s.getTextOfIdentifierOrLiteral(e.name)}else if(o.isStringLiteral(e.argumentExpression)){c=s.getTextOfIdentifierOrLiteral(e.argumentExpression);let t=Number(c);isNaN(Number.parseFloat(c))||isNaN(t)||!_(t)||String(t)!=c||(c=t)}else if(o.isNumericLiteral(e.argumentExpression))c=parseFloat(s.getTextOfIdentifierOrLiteral(e.argumentExpression)),_(c)||(c=c.toString());else if(o.isPrefixUnaryExpression(e.argumentExpression)&&o.isNumericLiteral(e.argumentExpression.operand)&&(e.argumentExpression.operator==o.SyntaxKind.MinusToken||e.argumentExpression.operator==o.SyntaxKind.PlusToken)){let t=e.argumentExpression,r=parseFloat(s.getTextOfIdentifierOrLiteral(t.operand));c=t.operator==o.SyntaxKind.MinusToken?0===r?r:"-"+r.toString():_(r)?r:"+"+r.toString()}else n.compileExpression(e.argumentExpression),i.storeAccumulator(e.argumentExpression,r),c=r;return{obj:a,prop:c}}function _(e){return!!(e>=0&&e<l&&Number.isInteger(e))}t.compileMemberAccessExpression=function(e,t){let r=t.getPandaGen(),n=r.getTemp(),i=r.getTemp(),{obj:a,prop:l}=u(e,n,i,t);if(s.isSuperProperty(e)){let n=r.getTemp();(0,c.compileSuperProperty)(t,e,n,l),r.freeTemps(n)}else r.loadObjProperty(o.isPropertyAccessExpression(e)?e.name:e.argumentExpression,a,l);r.freeTemps(n,i)},t.getObjAndProp=u,t.isValidIndex=_},"./src/expression/metaProperty.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.compileMetaProperty=void 0;const o=a(r("./src/jshelpers.js"));t.compileMetaProperty=function(e,t){let r=t.getCurrentScope();if("target"!=o.getTextOfIdentifierOrLiteral(e.name));else{let{scope:n,level:i,v:a}=r.find("4newTarget");if(t.setCallOpt(n,"4newTarget"),!a)throw new Error("fail to access new.target");t.loadTarget(e,{scope:n,level:i,v:a})}}},"./src/expression/newExpression.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compileNewExpression=void 0;const n=r("./src/base/util.ts"),i=r("./src/expression/arrayLiteralExpression.ts");t.compileNewExpression=function(e,t){let r=t.getPandaGen(),a=r.getTemp(),o=r.getTemp();if(t.compileExpression(e.expression),r.storeAccumulator(e,a),r.moveVreg(e,o,a),(0,n.containSpreadElement)(e.arguments)){let n=r.getTemp();return(0,i.createArrayFromElements)(e,t,e.arguments,n),r.newObjSpread(e,a,o),void r.freeTemps(a,o,n)}let s=2;e.arguments&&(s+=e.arguments.length);let c=new Array(s);c[0]=a,c[1]=o;let l=2;e.arguments&&e.arguments.forEach((n=>{let i=r.getTemp();t.compileExpression(n),r.storeAccumulator(e,i),c[l++]=i})),r.newObject(e,c),r.freeTemps(...c)}},"./src/expression/numericLiteral.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.compileNumericLiteral=t.isInteger=void 0;const o=r("./src/base/vregisterCache.ts"),s=a(r("./src/jshelpers.js")),c=Math.pow(2,31)-1;function l(e){return!(!Number.isSafeInteger(e)||e>c)}t.isInteger=l,t.compileNumericLiteral=function(e,t){let r=s.getTextOfIdentifierOrLiteral(t),n=Number.parseFloat(r);Number.isNaN(n)?e.loadAccumulator(t,(0,o.getVregisterCache)(e,o.CacheList.NaN)):Number.isFinite(n)?l(n)?e.loadAccumulatorInt(t,n):e.loadAccumulatorFloat(t,n):e.loadAccumulator(t,(0,o.getVregisterCache)(e,o.CacheList.Infinity))}},"./src/expression/objectLiteralExpression.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.createMethodOrAccessor=t.compileObjectLiteralExpression=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=a(r("./src/jshelpers.js")),c=r("./src/base/util.ts"),l=r("./src/base/vregisterCache.ts"),u=r("./src/expression/numericLiteral.ts"),_=r("./src/expression/parenthesizedExpression.ts"),d=r("./src/pandagen.ts"),p=r("./src/base/properties.ts"),f=r("./src/base/literal.ts");function g(e){let t;if(e.getValue().kind==o.SyntaxKind.StringLiteral)t=new f.Literal(f.LiteralTag.STRING,s.getTextOfIdentifierOrLiteral(e.getValue()));else if(e.getValue().kind==o.SyntaxKind.NumericLiteral){let r=Number.parseFloat(s.getTextOfIdentifierOrLiteral(e.getValue()));t=(0,u.isInteger)(r)?new f.Literal(f.LiteralTag.INTEGER,r):new f.Literal(f.LiteralTag.DOUBLE,r)}else if(e.getValue().kind==o.SyntaxKind.TrueKeyword||e.getValue().kind==o.SyntaxKind.FalseKeyword)t=e.getValue().kind==o.SyntaxKind.TrueKeyword?new f.Literal(f.LiteralTag.BOOLEAN,!0):new f.Literal(f.LiteralTag.BOOLEAN,!1);else{if(e.getValue().kind!=o.SyntaxKind.NullKeyword)throw new Error("Unreachable Kind of Literal");t=new f.Literal(f.LiteralTag.NULLVALUE,null)}return t}function m(e,t,r,n){let i,a=e.getTemp(),s=e.getTemp(),c=e.getTemp(),u=String(n.getName());if(void 0!==n.getGetter()){let o=n.getGetter();b(e,t,r,o),e.storeAccumulator(o,a),i=o}if(void 0!==n.getSetter()){let a=n.getSetter();b(e,t,r,a),e.storeAccumulator(a,s),i=a}e.loadAccumulatorString(i,u),e.storeAccumulator(i,c),void 0!==n.getGetter()&&void 0!==n.getSetter()?e.defineGetterSetterByValue(i,r,c,a,s,!1):o.isGetAccessorDeclaration(i)?e.defineGetterSetterByValue(i,r,c,a,(0,l.getVregisterCache)(e,l.CacheList.undefined),!1):e.defineGetterSetterByValue(i,r,c,(0,l.getVregisterCache)(e,l.CacheList.undefined),s,!1),e.freeTemps(a,s,c)}function y(e,t,r){let n=e.getPandaGen(),i=n.getTemp();e.compileExpression(t.getValue()),n.storeAccumulator(t.getValue(),i),n.copyDataProperties(t.getValue().parent,r,i),n.freeTemps(i)}function h(e,t,r){let n=e.getPandaGen(),i=n.getTemp();switch(e.compileExpression(t.getName().expression),n.storeAccumulator(t.getValue(),i),t.getValue().kind){case o.SyntaxKind.PropertyAssignment:{e.compileExpression(t.getValue().initializer);let a=x(t.getValue().initializer);n.storeOwnProperty(t.getValue(),r,i,a);break}case o.SyntaxKind.MethodDeclaration:b(n,e,r,t.getValue()),n.storeOwnProperty(t.getValue(),r,i,!0);break;case o.SyntaxKind.GetAccessor:{let a=n.getTemp(),o=t.getValue();b(n,e,r,o),n.storeAccumulator(o,a),n.defineGetterSetterByValue(o,r,i,a,(0,l.getVregisterCache)(n,l.CacheList.undefined),!0),n.freeTemps(a);break}case o.SyntaxKind.SetAccessor:{let a=n.getTemp(),o=t.getValue();b(n,e,r,o),n.storeAccumulator(o,a),n.defineGetterSetterByValue(o,r,i,(0,l.getVregisterCache)(n,l.CacheList.undefined),a,!0),n.freeTemps(a);break}}n.freeTemps(i)}function v(e,t,r){let n=e.getPandaGen(),i=n.getTemp();e.compileExpression(t.getValue()),n.storeAccumulator(t.getValue().parent,i),n.setObjectWithProto(t.getValue().parent,i,r),n.freeTemps(i)}function b(e,t,r,n){let i=t.getCompilerDriver().getFuncInternalName(n,t.getRecorder()),a=t.getCurrentEnv();o.isMethodDeclaration(n)&&n.asteriskToken?e.defineFunction(n,n,i,a):e.defineMethod(n,i,r,a)}function x(e){let t=e;return o.isParenthesizedExpression(e)&&(t=(0,_.findInnerExprOfParenthesis)(e)),!(!o.isFunctionLike(t)&&!o.isClassLike(t)||t.name)}t.compileObjectLiteralExpression=function(e,t){let r=e.getPandaGen(),n=(0,p.generatePropertyFromExpr)(t),i=r.getTemp(),a=!1;if(0==n.length)return r.createEmptyObject(t),r.storeAccumulator(t,i),void r.freeTemps(i);let s=new f.LiteralBuffer;a=function(e,t,r){let n=!1;for(let i of t){if(i.getKind()==p.PropertyKind.Spread||i.getKind()==p.PropertyKind.Computed)break;if(i.getKind()==p.PropertyKind.Prototype||i.isRedeclared())continue;let t=new f.Literal(f.LiteralTag.STRING,String(i.getName()));if(i.getKind()==p.PropertyKind.Constant){let e=g(i);r.addLiterals(t,e),i.setCompiled()}if(i.getKind()==p.PropertyKind.Variable){let a,s=e.getCompilerDriver(),l=i.getValue();if(o.isMethodDeclaration(l)){a=l.asteriskToken?new f.Literal(f.LiteralTag.GENERATOR,s.getFuncInternalName(l,e.getRecorder())):new f.Literal(f.LiteralTag.METHOD,s.getFuncInternalName(l,e.getRecorder()));let o=new f.Literal(f.LiteralTag.METHODAFFILIATE,(0,c.getParamLengthOfFunc)(l));r.addLiterals(t,a,o),i.setCompiled(),n=!0}else a=new f.Literal(f.LiteralTag.NULLVALUE,null),r.addLiterals(t,a)}if(i.getKind()==p.PropertyKind.Accessor){let e=new f.Literal(f.LiteralTag.ACCESSOR,null);r.addLiterals(t,e)}}return n}(e,n,s),function(e,t,r,n,i,a){if(n.isEmpty())t.createEmptyObject(e);else{let r=d.PandaGen.getLiteralArrayBuffer(),o=r.length;if(r.push(n),i){let r=a.getCurrentEnv();t.createObjectHavingMethod(e,o,r)}else t.createObjectWithBuffer(e,o)}t.storeAccumulator(e,r)}(t,r,i,s,a,e),function(e,t,r,n){for(let i of r)if(!i.isCompiled())switch(i.getKind()){case p.PropertyKind.Accessor:m(t,e,n,i);break;case p.PropertyKind.Spread:y(e,i,n);break;case p.PropertyKind.Computed:h(e,i,n);break;case p.PropertyKind.Constant:case p.PropertyKind.Variable:{let r=!1;o.isMethodDeclaration(i.getValue())?b(t,e,n,i.getValue()):(e.compileExpression(i.getValue()),r=x(i.getValue())&&-1!=i.getName().toString().lastIndexOf(".")),t.storeOwnProperty(i.getValue().parent,n,i.getName(),r);break}case p.PropertyKind.Prototype:v(e,i,n);break;default:throw new Error("Unreachable PropertyKind for NullValue setting")}}(e,r,n,i),r.loadAccumulator(t,i),r.freeTemps(i)},t.createMethodOrAccessor=b},"./src/expression/parenthesizedExpression.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.findOuterNodeOfParenthesis=t.findInnerExprOfParenthesis=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js"));t.findInnerExprOfParenthesis=function(e){for(;e.expression.kind==o.SyntaxKind.ParenthesizedExpression;)e=e.expression;return e.expression},t.findOuterNodeOfParenthesis=function(e){let t=e.parent;for(;t.kind==o.SyntaxKind.ParenthesizedExpression;)t=t.parent;return t}},"./src/expression/regularExpression.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.compileRegularExpressionLiteral=t.RegExpFlags=void 0;const o=a(r("./src/jshelpers.js")),s=r("./src/diagnostic.ts");var c;!function(e){e[e.FLAG_GLOBAL=1]="FLAG_GLOBAL",e[e.FLAG_IGNORECASE=2]="FLAG_IGNORECASE",e[e.FLAG_MULTILINE=4]="FLAG_MULTILINE",e[e.FLAG_DOTALL=8]="FLAG_DOTALL",e[e.FLAG_UTF16=16]="FLAG_UTF16",e[e.FLAG_STICKY=32]="FLAG_STICKY"}(c=t.RegExpFlags||(t.RegExpFlags={})),t.compileRegularExpressionLiteral=function(e,t){let r=e.getPandaGen(),n=t.text,i=n,a="",l=n.indexOf("/"),u=n.lastIndexOf("/");if(-1==l||-1==u||l==u)throw new s.DiagnosticError(t,s.DiagnosticCode.Incorrect_regular_expression);i=n.substring(l+1,u),a=n.substring(u+1);let _=function(e,t){let r=0,n=0;for(let i=0;i<e.length;i++){switch(e[i]){case"g":n=c.FLAG_GLOBAL;break;case"i":n=c.FLAG_IGNORECASE;break;case"m":n=c.FLAG_MULTILINE;break;case"s":n=c.FLAG_DOTALL;break;case"u":n=c.FLAG_UTF16;break;case"y":n=c.FLAG_STICKY;break;default:let r=o.getSourceFileOfNode(t);throw new s.DiagnosticError(t,s.DiagnosticCode.Invalid_regular_expression_flag_0,r,[e[i]])}if(0!=(r&n)){let r=o.getSourceFileOfNode(t);throw new s.DiagnosticError(t,s.DiagnosticCode.Invalid_regular_expression_flag_0,r,[e[i]])}r|=n}return r}(a,t);r.createRegExpWithLiteral(t,i,_)}},"./src/expression/stringLiteral.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.compileStringLiteral=void 0;const o=a(r("./src/jshelpers.js"));t.compileStringLiteral=function(e,t){let r=o.getTextOfIdentifierOrLiteral(t);e.loadAccumulatorString(t,r)}},"./src/expression/templateExpression.ts":function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=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]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=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)&&__createBinding(t,e,r);return __setModuleDefault(t,e),t};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getTemplateObject=void 0;const ts=__importStar(__webpack_require__("./node_modules/typescript/lib/typescript.js"));function genRawString(e,t){let r="";r=ts.isTemplateExpression(t)?t.head.rawText:t.rawText,r=r.replace(/(\r?\n|\r)/gm,"\n"),e.loadAccumulatorString(t,r)}function genCookedString(pandaGen,expr){let text="";text=ts.isTemplateExpression(expr)?expr.head.text:expr.text,-1!=text.indexOf("\\u{")&&(text=eval("'"+text+"'"),text=unescape(text.replace(/\u/g,"%u"))),pandaGen.loadAccumulatorString(expr,text)}function genTemplateArrayArg(e,t,r,n){let i;ts.isTemplateExpression(t)&&(i=t.templateSpans);let a=0,o=e.getTemp(),s=e.getTemp(),c=e.getTemp();e.createEmptyArray(t),e.storeAccumulator(t,s),e.createEmptyArray(t),e.storeAccumulator(t,c),e.loadAccumulatorInt(t,a),e.storeAccumulator(t,o),genRawString(e,t),e.storeObjProperty(t,s,o),genCookedString(e,t),e.storeObjProperty(t,c,o),++a,i&&i.length&&i.forEach((t=>{e.loadAccumulatorInt(t,a),e.storeAccumulator(t,o),e.loadAccumulatorString(t,void 0===t.literal.rawText?t.literal.text:t.literal.rawText),e.storeObjProperty(t,s,o),e.loadAccumulatorString(t,t.literal.text),e.storeObjProperty(t,c,o),++a})),e.moveVreg(t,r,s),e.moveVreg(t,n,c),e.freeTemps(o,s,c)}function getTemplateObject(e,t){let r=e.getTemp(),n=e.getTemp(),i=e.getTemp(),a=e.getTemp();genTemplateArrayArg(e,t.template,i,a),e.createEmptyArray(t),e.storeAccumulator(t,r);let o=0;e.loadAccumulatorInt(t,o),e.storeAccumulator(t,n),e.loadAccumulator(t,i),e.storeObjProperty(t,r,n),++o,e.loadAccumulatorInt(t,o),e.storeAccumulator(t,n),e.loadAccumulator(t,a),e.storeObjProperty(t,r,n),e.getTemplateObject(t,r),e.freeTemps(r,n,i,a)}exports.getTemplateObject=getTemplateObject},"./src/expression/yieldExpression.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compileYieldExpression=void 0;const n=r("./src/function/generatorFunctionBuilder.ts"),i=r("./src/diagnostic.ts"),a=r("./src/base/vregisterCache.ts");t.compileYieldExpression=function(e,t){if(!(e.getFuncBuilder()instanceof n.GeneratorFunctionBuilder))throw new i.DiagnosticError(t.parent,i.DiagnosticCode.A_yield_expression_is_only_allowed_in_a_generator_body);t.asteriskToken?function(e,t){let r=e.getFuncBuilder();if(!t.expression)throw new Error("yield* must have an expression!");e.compileExpression(t.expression),r.yieldStar(t)}(e,t):function(e,t){let r=e.getPandaGen(),n=e.getFuncBuilder();if(t.expression){let i=r.getTemp();e.compileExpression(t.expression),r.storeAccumulator(t,i),n.yield(t,i),r.freeTemps(i)}else n.yield(t,(0,a.getVregisterCache)(r,a.CacheList.undefined))}(e,t)}},"./src/function/asyncFunctionBuilder.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.AsyncFunctionBuilder=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/base/vregisterCache.ts"),c=r("./src/debuginfo.ts"),l=r("./src/irnodes.ts"),u=r("./src/statement/tryStatement.ts");var _;!function(e){e[e.Return=0]="Return",e[e.Throw=1]="Throw",e[e.Next=2]="Next"}(_||(_={})),t.AsyncFunctionBuilder=class{constructor(e){this.pandaGen=e,this.beginLabel=new l.Label,this.endLabel=new l.Label,this.asyncObj=e.getTemp(),this.retVal=e.getTemp()}prepare(e){let t=this.pandaGen;t.asyncFunctionEnter(c.NodeKind.Invalid),t.storeAccumulator(c.NodeKind.Invalid,this.asyncObj),t.label(e,this.beginLabel)}await(e,t){let r=this.pandaGen,n=this.pandaGen.getTemp();r.asyncFunctionAwaitUncaught(e,this.asyncObj,t),r.storeAccumulator(e,n),r.suspendGenerator(e,this.asyncObj,n),r.freeTemps(n),r.resumeGenerator(e,this.asyncObj),r.storeAccumulator(e,this.retVal),this.handleMode(e)}handleMode(e){let t=this.pandaGen,r=t.getTemp();t.getResumeMode(e,this.asyncObj),t.storeAccumulator(e,r),t.loadAccumulatorInt(e,_.Throw);let n=new l.Label;t.condition(e,o.SyntaxKind.EqualsEqualsToken,r,n),t.loadAccumulator(e,this.retVal),t.throw(e),t.freeTemps(r),t.label(e,n),t.loadAccumulator(e,this.retVal)}resolve(e,t){let r=this.pandaGen;r.asyncFunctionResolve(e,this.asyncObj,(0,s.getVregisterCache)(r,s.CacheList.True),t)}cleanUp(e){let t=this.pandaGen;t.label(e,this.endLabel);let r=t.getTemp();t.storeAccumulator(c.NodeKind.Invalid,r),t.asyncFunctionReject(c.NodeKind.Invalid,this.asyncObj,(0,s.getVregisterCache)(t,s.CacheList.True),r),t.return(c.NodeKind.Invalid),t.freeTemps(r),t.freeTemps(this.asyncObj,this.retVal),new u.CatchTable(t,this.endLabel,new u.LabelPair(this.beginLabel,this.endLabel))}}},"./src/function/functionBuilder.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FunctionBuilder=void 0,t.FunctionBuilder=class{prepare(e){}cleanUp(e){}}},"./src/function/generatorFunctionBuilder.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.GeneratorFunctionBuilder=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/base/vregisterCache.ts"),c=r("./src/compiler.ts"),l=r("./src/irnodes.ts"),u=r("./src/statement/forOfStatement.ts");var _;!function(e){e[e.Return=0]="Return",e[e.Throw=1]="Throw",e[e.Next=2]="Next"}(_||(_={})),t.GeneratorFunctionBuilder=class{constructor(e,t){this.pandaGen=e,this.compiler=t,this.genObj=e.getTemp(),this.retVal=e.getTemp()}prepare(e,t){let r=this.pandaGen;t.getScopeOfNode(e),r.createGeneratorObj(e,(0,s.getVregisterCache)(r,s.CacheList.FUNC)),r.storeAccumulator(e,this.genObj),r.suspendGenerator(e,this.genObj,(0,s.getVregisterCache)(r,s.CacheList.undefined)),r.resumeGenerator(e,this.genObj),r.storeAccumulator(e,this.retVal),this.handleMode(e)}yield(e,t){let r=this.pandaGen,n=r.getTemp();r.EcmaCreateiterresultobj(e,t,(0,s.getVregisterCache)(r,s.CacheList.False)),r.storeAccumulator(e,n),r.suspendGenerator(e,this.genObj,n),r.freeTemps(n),r.resumeGenerator(e,this.genObj),r.storeAccumulator(e,this.retVal),this.handleMode(e)}yieldStar(e){let t=this.pandaGen,r=t.getTemp(),n=t.getTemp(),i=t.getTemp(),a=t.getTemp(),d=new l.Label,p=new l.Label,f=new l.Label,g=new l.Label,m=new l.Label,y=new l.Label,h=new l.Label,v=new l.Label,b=u.IteratorType.Normal,x=(0,u.getIteratorRecord)(t,e,r,n,b);t.moveVreg(e,i,(0,s.getVregisterCache)(t,s.CacheList.undefined)),t.loadAccumulatorInt(e,_.Next),t.storeAccumulator(e,a),t.label(e,d),t.loadAccumulatorInt(e,_.Next),t.condition(e,o.SyntaxKind.EqualsEqualsToken,a,p),t.call(e,[x.getNextMethod(),x.getObject(),i],!0),t.branch(e,g),t.label(e,p),t.loadAccumulatorInt(e,_.Return),t.condition(e,o.SyntaxKind.EqualsEqualsToken,a,f),t.loadObjProperty(e,x.getObject(),"return"),t.storeAccumulator(e,r),t.condition(e,o.SyntaxKind.ExclamationEqualsEqualsToken,(0,s.getVregisterCache)(t,s.CacheList.undefined),m),t.call(e,[r,x.getObject(),i],!0),t.branch(e,g),t.label(e,m),this.compiler.compileFinallyBeforeCFC(void 0,c.ControlFlowChange.Break,void 0),t.loadAccumulator(e,i),t.return(e),t.label(e,f),t.loadObjProperty(e,x.getObject(),"throw"),t.storeAccumulator(e,r),t.condition(e,o.SyntaxKind.ExclamationEqualsEqualsToken,(0,s.getVregisterCache)(t,s.CacheList.undefined),y),t.call(e,[r,x.getObject(),i],!0),t.branch(e,g),t.label(e,y),t.loadObjProperty(e,x.getObject(),"return"),t.storeAccumulator(e,r),t.condition(e,o.SyntaxKind.ExclamationEqualsEqualsToken,(0,s.getVregisterCache)(t,s.CacheList.undefined),v),t.call(e,[r,x.getObject()],!0);let D=t.getTemp();t.storeAccumulator(e,D),t.throwIfNotObject(e,D),t.freeTemps(D),t.label(e,v),t.throwThrowNotExist(e),t.label(e,g),t.storeAccumulator(e,this.retVal),t.throwIfNotObject(e,this.retVal),t.loadObjProperty(e,this.retVal,"done"),t.jumpIfTrue(e,h),t.suspendGenerator(e,this.genObj,this.retVal),t.resumeGenerator(e,this.genObj),t.storeAccumulator(e,i),t.getResumeMode(e,this.genObj),t.storeAccumulator(e,a),t.branch(e,d);let S=new l.Label;t.label(e,h),t.loadObjProperty(e,this.retVal,"value");let E=t.getTemp();t.storeAccumulator(e,E),t.loadAccumulatorInt(e,_.Return),t.condition(e,o.SyntaxKind.EqualsEqualsToken,a,S),this.compiler.compileFinallyBeforeCFC(void 0,c.ControlFlowChange.Break,void 0),t.loadAccumulator(e,E),t.return(e),t.label(e,S),t.loadAccumulator(e,E),t.freeTemps(r,n,i,a,E)}handleMode(e){let t=this.pandaGen,r=t.getTemp();t.getResumeMode(e,this.genObj),t.storeAccumulator(e,r),t.loadAccumulatorInt(e,_.Return);let n=new l.Label;t.condition(e,o.SyntaxKind.EqualsEqualsToken,r,n),this.compiler.compileFinallyBeforeCFC(void 0,c.ControlFlowChange.Break,void 0),t.loadAccumulator(e,this.retVal),t.return(e),t.label(e,n),t.loadAccumulatorInt(e,_.Throw);let i=new l.Label;t.condition(e,o.SyntaxKind.EqualsEqualsToken,r,i),t.loadAccumulator(e,this.retVal),t.throw(e),t.freeTemps(r),t.label(e,i),t.loadAccumulator(e,this.retVal)}cleanUp(){this.pandaGen.freeTemps(this.genObj,this.retVal)}}},"./src/hoisting.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hoistFunctionInBlock=t.hoistFunction=t.hoistVar=t.hoisting=void 0;const n=r("./src/base/util.ts"),i=r("./src/base/vregisterCache.ts"),a=r("./src/debuginfo.ts"),o=r("./src/scope.ts");function s(e,t,r){let n=e.name;if(t instanceof o.GlobalScope)r.loadAccumulator(e.node,(0,i.getVregisterCache)(r,i.CacheList.undefined)),r.storeGlobalVar(e.node,n);else{if(!(t instanceof o.FunctionScope||t instanceof o.ModuleScope))throw new Error("Wrong scope to hoist");{let e=t.findLocal(n);r.loadAccumulator(a.NodeKind.FirstNodeOfFunction,(0,i.getVregisterCache)(r,i.CacheList.undefined)),r.storeAccToLexEnv(a.NodeKind.FirstNodeOfFunction,t,0,e,!0)}}}function c(e,t,r,i,s){let c=e.name,l=s.getFuncInternalName(e.node,i.getRecorder()),u=i.getCurrentEnv();if(t instanceof o.GlobalScope)r.defineFunction(a.NodeKind.FirstNodeOfFunction,e.node,l,u),r.storeGlobalVar(a.NodeKind.FirstNodeOfFunction,c);else{if(!(t instanceof o.FunctionScope||t instanceof o.LocalScope||t instanceof o.ModuleScope))throw new Error("Wrong scope to hoist");{let i=(0,n.hasExportKeywordModifier)(e.node),s=(0,n.hasDefaultKeywordModifier)(e.node),_=t.findLocal(c);i&&t instanceof o.ModuleScope&&(_.setExport(),s?_.setExportedName("default"):_.setExportedName(_.getName())),r.defineFunction(a.NodeKind.FirstNodeOfFunction,e.node,l,u),r.storeAccToLexEnv(a.NodeKind.FirstNodeOfFunction,t,0,_,!0)}}}t.hoisting=function(e,t,r,n){let i=r.getScopeOfNode(e),a=r.getHoistDeclsOfScope(i);null==a||a.forEach((e=>{if(e instanceof o.VarDecl)s(e,i,t);else{if(!(e instanceof o.FuncDecl))throw new Error("Wrong declaration type to be hoisted");{let r=n.getCompilerDriver();c(e,i,t,n,r)}}}))},t.hoistVar=s,t.hoistFunction=c,t.hoistFunctionInBlock=function(e,t,r,n){let i=e.getDecls(),a=new Array;for(let e=0;e<i.length;e++)i[e]instanceof o.FuncDecl&&a.push(i[e]);r&&a.forEach((r=>{let i=n.getCompilerDriver();c(r,e,t,n,i)}))}},"./src/index.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});const o=a(r("path")),s=a(r("./node_modules/typescript/lib/typescript.js")),c=a(r("fs")),l=r("./src/cmdOptions.ts"),u=r("./src/compilerDriver.ts"),_=a(r("./src/diagnostic.ts")),d=a(r("./src/jshelpers.js")),p=r("./src/log.ts"),f=r("./src/strictMode.ts"),g=r("./src/typeChecker.ts"),m=r("./src/base/util.ts");function y(e){for(let t of e.statements)if(t.modifiers){for(let e of t.modifiers)if(e.kind===s.SyntaxKind.ExportKeyword)return!1}else{if(t.kind===s.SyntaxKind.ExportAssignment)return!1;if(t.kind===s.SyntaxKind.ImportKeyword||t.kind===s.SyntaxKind.ImportDeclaration)return!1}return!0}function h(e,t){let r=v(e),n=new u.CompilerDriver(r);(0,f.setGlobalStrict)(d.isEffectiveStrictModeSourceFile(e,t)),n.compile(e),n.showStatistics()}function v(e){let t=l.CmdOptions.getOutputBinName(),n=e.fileName.substring(0,e.fileName.lastIndexOf(".")),i=l.CmdOptions.getInputFileName();if(/^win/.test(r("os").platform())){var a=i.split(o.sep);i=o.posix.join(...a)}return n!=i&&(t=n+".abc"),t}const b="####",x="watch_expressions";function D(e,t,r,n){l.CmdOptions.setWatchEvaluateExpressionArgs(["",""]);let i=x+".js",a=!1,p=s.createSourceFile(i,c.readFileSync(e).toString(),s.ScriptTarget.ES2017);n.getSyntacticDiagnostics(p).forEach((e=>{a||(c.writeFileSync(t,"There are syntax errors in input expression.\n"),a=!0),_.printDiagnostic(e)})),a||n.emit(void 0,void 0,void 0,void 0,{before:[e=>e=>{o.basename(e.fileName)==i&&(e=p);let t=v(e);return new u.CompilerDriver(t).compileForSyntaxCheck(e),e}],after:[e=>e=>{var t;if(s.getEmitHelpers(e)){let n=[];null===(t=s.getEmitHelpers(e))||void 0===t||t.forEach((t=>{s.createSourceFile(e.fileName,t.text,r.target,!0,s.ScriptKind.JS).statements.forEach((e=>{let t=(0,m.setPos)(e);n.push(t)}))})),n.push(...e.statements),e=s.factory.updateSourceFile(e,n)}let n=v(e),i=new u.CompilerDriver(n);return(0,f.setGlobalStrict)(d.isEffectiveStrictModeSourceFile(e,r)),i.compile(e),e}]})}var S;!function(e){let t;!function(e){e.Default={outDir:"../tmp/build",allowJs:!0,noEmitOnError:!0,noImplicitAny:!0,target:s.ScriptTarget.ES2017,module:s.ModuleKind.ES2015,strictNullChecks:!0,skipLibCheck:!0,alwaysStrict:!0}}(t=e.Options||(e.Options={}))}(S||(S={})),function(e,t){let r=l.CmdOptions.parseUserCmd(e);if(r){t&&(r.options.project||r.options.build||(r.options=t));try{if(l.CmdOptions.isWatchEvaluateDeamonMode())return void function(e){let t=l.CmdOptions.getEvaluateDeamonPath()+o.sep+x,r=t+".js",n=t+".abc",i=t+".err";if(c.existsSync(r))return void console.log("watchFileServer has been initialized supportTimeout");let a=e.fileNames;c.writeFileSync(r,"initJsFile\n"),c.writeFileSync(i,"initErrMsgFile\n"),a.unshift(r);let u=s.createProgram(a,e.options);D(r,i,e.options,u),c.watchFile(r,{persistent:!0,interval:50},((t,n)=>{if(+t.mtime<=+n.mtime)throw new Error("watched js file has not been initialized");if(c.readFileSync(r).toString()==b)return c.unwatchFile(r),void console.log("stopWatchingSuccess");D(r,i,e.options,u)})),console.log("startWatchingSuccess supportTimeout"),process.on("exit",(()=>{c.unlinkSync(r),c.unlinkSync(n),c.unlinkSync(i)}))}(r);if(l.CmdOptions.isStopEvaluateDeamonMode())return void c.writeFileSync(l.CmdOptions.getEvaluateDeamonPath()+o.sep+x+".js",b);if(l.CmdOptions.isWatchEvaluateExpressionMode())return void function(){let e=l.CmdOptions.getEvaluateExpression();if(!(0,m.isBase64Str)(e))throw new Error("Passed expression string for evaluating is not base64 style.");let t=10;0!=l.CmdOptions.getWatchTimeOutValue()&&(t=l.CmdOptions.getWatchTimeOutValue());let r=l.CmdOptions.getWatchJsPath()+o.sep+x,n=Buffer.from(e,"base64").toString(),i=r+".js",a=r+".abc",s=r+".err";c.watchFile(s,{persistent:!0,interval:50},((e,t)=>{if(+e.mtime<=+t.mtime)throw c.unwatchFile(i),c.unwatchFile(a),new Error("watched errMsg file has not been initialized");console.log("error in genarate abc file for this expression."),c.unwatchFile(a),c.unwatchFile(s),process.exit()})),c.watchFile(a,{persistent:!0,interval:50},((e,t)=>{if(+e.mtime<=+t.mtime)throw c.unwatchFile(i),c.unwatchFile(s),new Error("watched abc file has not been initialized");let r=c.readFileSync(a),n=Buffer.from(r).toString("base64");console.log(n),c.unwatchFile(a),c.unwatchFile(s),process.exit()})),c.writeFileSync(i,n),setTimeout((()=>{throw c.unwatchFile(i),c.unwatchFile(a),c.unwatchFile(s),c.unlinkSync(i),c.unlinkSync(a),c.unlinkSync(s),new Error("watchFileServer has not been initialized")}),1e3*t)}();!function(e,t){const r=s.createCompilerHost(t);l.CmdOptions.needGenerateTmpFile()||(r.writeFile=()=>{});let n=s.createProgram(e,t,r);if(g.TypeChecker.getInstance().setTypeChecker(n.getTypeChecker()),l.CmdOptions.needRecordDtsType())for(let e of n.getSourceFiles())e.isDeclarationFile&&!n.isSourceFileDefaultLibrary(e)&&((0,f.setGlobalDeclare)(y(e)),h(e,t));let i=n.emit(void 0,void 0,void 0,void 0,{before:[e=>e=>{let t=v(e);return new u.CompilerDriver(t).compileForSyntaxCheck(e),e}],after:[e=>e=>{var r;if(s.getEmitHelpers(e)){let n=[];null===(r=s.getEmitHelpers(e))||void 0===r||r.forEach((r=>{s.createSourceFile(e.fileName,r.text,t.target,!0,s.ScriptKind.JS).statements.forEach((e=>{let t=(0,m.setPos)(e);n.push(t)}))})),n.push(...e.statements),e=s.factory.updateSourceFile(e,n)}let n=v(e),i=new u.CompilerDriver(n);return(0,f.setGlobalStrict)(d.isEffectiveStrictModeSourceFile(e,t)),i.compile(e),i.showStatistics(),e}]});s.getPreEmitDiagnostics(n).concat(i.diagnostics).forEach((e=>{_.printDiagnostic(e)}))}(r.fileNames.concat(l.CmdOptions.getIncludedFiles()),r.options)}catch(e){if(e instanceof _.DiagnosticError){let t=_.getDiagnostic(e.code);if(null!=t){let r=_.createDiagnostic(e.file,e.irnode,t,...e.args);_.printDiagnostic(r)}}else{if(!(e instanceof SyntaxError))throw e;(0,p.LOGE)(e.name,e.message)}}}}(process.argv.slice(2),S.Options.Default),global.gc()},"./src/irnodes.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.Jgez=t.Jlez=t.Jgtz=t.Jltz=t.Jnez=t.Jeqz=t.JnezObj=t.JeqzObj=t.JneObj=t.JeqObj=t.Jmp=t.FcmpgWide=t.FcmplWide=t.CmpWide=t.StaObj=t.StaWide=t.Sta=t.LdaNull=t.LdaType=t.LdaConst=t.LdaStr=t.FldaiWide=t.LdaiWide=t.Ldai=t.LdaObj=t.LdaWide=t.Lda=t.MovNull=t.FmoviWide=t.MoviWide=t.Movi=t.MovObj=t.MovWide=t.Mov=t.Nop=t.DebugInsEndPlaceHolder=t.DebugInsStartPlaceHolder=t.Label=t.Imm=t.VReg=t.Intrinsic=t.IRNode=t.getInsnFormats=t.getInsnMnemonic=t.OperandKind=t.BuiltIns=t.ResultDst=t.ResultType=t.getInstructionSize=t.IRNodeKind=void 0,t.Starr8=t.LdarrObj=t.FldarrWide=t.Fldarr32=t.LdarrWide=t.Ldarr=t.Ldarru16=t.Ldarr16=t.Ldarru8=t.Ldarr8=t.Inci=t.Mod=t.Div=t.Mul=t.Sub=t.Add=t.Modi=t.Divi=t.Ashri=t.Shri=t.Shli=t.Ori=t.Andi=t.Muli=t.Subi=t.Addi=t.Mod2Wide=t.Mod2=t.Div2Wide=t.Div2=t.Fmod2Wide=t.Fdiv2Wide=t.Fmul2Wide=t.Fsub2Wide=t.Fadd2Wide=t.Mul2Wide=t.Mul2=t.Sub2Wide=t.Sub2=t.Add2Wide=t.Add2=t.NegWide=t.Neg=t.FnegWide=t.Jge=t.Jle=t.Jgt=t.Jlt=t.Jne=t.Jeq=void 0,t.StaDyn=t.LdaDyn=t.MovDyn=t.CallVirtAcc=t.CallVirtAccShort=t.CallVirtRange=t.CallVirt=t.CallVirtShort=t.CallAcc=t.CallAccShort=t.CallRange=t.Call=t.CallShort=t.Isinstance=t.Checkcast=t.Throw=t.ReturnVoid=t.ReturnObj=t.ReturnWide=t.Return=t.StstaticObj=t.StstaticWide=t.Ststatic=t.LdstaticObj=t.LdstaticWide=t.Ldstatic=t.StobjVObj=t.StobjVWide=t.StobjV=t.LdobjVObj=t.LdobjVWide=t.LdobjV=t.StobjObj=t.StobjWide=t.Stobj=t.LdobjObj=t.LdobjWide=t.Ldobj=t.InitobjRange=t.Initobj=t.InitobjShort=t.Newobj=t.Newarr=t.Lenarr=t.StarrObj=t.FstarrWide=t.Fstarr32=t.StarrWide=t.Starr=t.Starr16=void 0,t.I64tou1=t.Fmod2=t.EcmaLdfalse=t.Shl2=t.I32tou1=t.Fdiv2=t.EcmaLdtrue=t.Xor2Wide=t.F64tou64=t.Fmul2=t.EcmaLdglobal=t.Xor2=t.F64tou32=t.Fsub2=t.EcmaLdsymbol=t.Or2Wide=t.Modu2Wide=t.F64toi64=t.Fadd2=t.EcmaLdnull=t.Or2=t.Modu2=t.F64toi32=t.Fneg=t.EcmaLdundefined=t.And2Wide=t.Divu2Wide=t.U64tof64=t.Fcmpg=t.EcmaLdglobalthis=t.And2=t.Divu2=t.I64tof64=t.Fcmpl=t.EcmaLdinfinity=t.NotWide=t.UcmpWide=t.U32tof64=t.Fldai=t.EcmaLdnan=t.Not=t.Ucmp=t.I32tof64=t.Fmovi=t.CalliDynRange=t.CalliDyn=t.CalliDynShort=t.ReturnDyn=t.FldaiDyn=t.LdaiDyn=void 0,t.U64toi32=t.EcmaThrowpatternnoncoercible=t.U32tou8=t.EcmaThrowthrownotexists=t.U32toi8=t.EcmaGetiterator=t.Ashr=t.U32tou16=t.EcmaCreateemptyarray=t.Shr=t.U32toi16=t.F64tof32=t.EcmaCreateemptyobject=t.Shl=t.U32toi64=t.F32tou64=t.EcmaReturnundefined=t.Xor=t.I64toi32=t.F32tou32=t.EcmaLdhole=t.Or=t.I32tou8=t.F32toi64=t.EcmaAsyncfunctionenter=t.And=t.I32toi8=t.F32toi32=t.EcmaGetpropiterator=t.Xori=t.I32tou16=t.F32tof64=t.EcmaGetunmappedargs=t.Ashr2Wide=t.I32toi16=t.U64tof32=t.EcmaPoplexenvdyn=t.Ashr2=t.I32toi64=t.I64tof32=t.EcmaLdlexenvdyn=t.Shr2Wide=t.U64tou1=t.U32tof32=t.EcmaTypeofdyn=t.Shr2=t.U32tou1=t.I32tof32=t.EcmaThrowdyn=t.Shl2Wide=void 0,t.EcmaCallarg1dyn=t.EcmaThrowundefinedifhole=t.EcmaAsyncfunctionawaituncaught=t.EcmaSuspendgenerator=t.EcmaCreateiterresultobj=t.EcmaNewobjspreaddyn=t.EcmaDelobjprop=t.EcmaSupercallspread=t.EcmaCopymodule=t.EcmaCloseiterator=t.EcmaIternext=t.EcmaThrowifnotobject=t.EcmaCallarg0dyn=t.EcmaGetnextpropname=t.EcmaGettemplateobject=t.EcmaThrowconstassignment=t.EcmaCreategeneratorobj=t.EcmaGetresumemode=t.EcmaResumegenerator=t.EcmaStricteqdyn=t.EcmaStrictnoteqdyn=t.EcmaInstanceofdyn=t.EcmaIsindyn=t.EcmaExpdyn=t.EcmaDecdyn=t.EcmaIncdyn=t.EcmaNotdyn=t.EcmaNegdyn=t.EcmaTonumber=t.EcmaXor2dyn=t.EcmaOr2dyn=t.EcmaAnd2dyn=t.EcmaAshr2dyn=t.EcmaShr2dyn=t.EcmaShl2dyn=t.EcmaGreatereqdyn=t.EcmaGreaterdyn=t.EcmaLesseqdyn=t.EcmaLessdyn=t.EcmaNoteqdyn=t.EcmaEqdyn=t.EcmaMod2dyn=t.EcmaDiv2dyn=t.EcmaMul2dyn=t.EcmaSub2dyn=t.EcmaAdd2dyn=t.EcmaDebugger=t.EcmaThrowdeletesuperproperty=t.U64tou32=t.EcmaLdhomeobject=void 0,t.EcmaCreateregexpwithliteral=t.EcmaLdmodvarbyname=t.EcmaStsuperbyname=t.EcmaLdsuperbyname=t.EcmaStownbyname=t.EcmaStobjbyname=t.EcmaLdobjbyname=t.EcmaStglobalvar=t.EcmaLdglobalvar=t.EcmaTrystglobalbyname=t.EcmaTryldglobalbyname=t.EcmaStmodulevar=t.EcmaImportmodule=t.EcmaDefineclasswithbuffer=t.EcmaStlexvardyn=t.EcmaLdlexvardyn=t.EcmaCreateobjectwithbuffer=t.EcmaThrowifsupernotcorrectcall=t.EcmaCreateobjecthavingmethod=t.EcmaCreatearraywithbuffer=t.EcmaCopyrestargs=t.EcmaNewlexenvdyn=t.EcmaDefinemethod=t.EcmaDefineasyncfunc=t.EcmaDefinegeneratorfunc=t.EcmaDefinencfuncdyn=t.EcmaDefinefuncdyn=t.EcmaCreateobjectwithexcludedkeys=t.EcmaSupercall=t.EcmaCallithisrangedyn=t.EcmaCallirangedyn=t.EcmaNewobjdynrange=t.EcmaDefinegettersetterbyvalue=t.EcmaCallargs3dyn=t.EcmaCallargs2dyn=t.EcmaAsyncfunctionreject=t.EcmaAsyncfunctionresolve=t.EcmaCallspreaddyn=t.EcmaStownbyindex=t.EcmaStobjbyindex=t.EcmaLdobjbyindex=t.EcmaStsuperbyvalue=t.EcmaLdsuperbyvalue=t.EcmaStownbyvalue=t.EcmaStobjbyvalue=t.EcmaLdobjbyvalue=t.EcmaSetobjectwithproto=t.EcmaGetiteratornext=t.EcmaStarrayspread=t.EcmaCopydataproperties=void 0,t.EcmaLdbigint=t.EcmaNewlexenvwithnamedyn=t.EcmaLdfunction=t.EcmaStownbynamewithnameset=t.EcmaStownbyvaluewithnameset=t.EcmaStclasstoglobalrecord=t.EcmaStlettoglobalrecord=t.EcmaStconsttoglobalrecord=t.EcmaIsfalse=t.EcmaIstrue=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/debuginfo.ts");var c,l,u,_,d;function p(e){switch(e){case c.NOP:return"nop";case c.MOV:return"mov";case c.MOV_64:return"mov.64";case c.MOV_OBJ:return"mov.obj";case c.MOVI:return"movi";case c.MOVI_64:return"movi.64";case c.FMOVI_64:return"fmovi.64";case c.MOV_NULL:return"mov.null";case c.LDA:return"lda";case c.LDA_64:return"lda.64";case c.LDA_OBJ:return"lda.obj";case c.LDAI:return"ldai";case c.LDAI_64:return"ldai.64";case c.FLDAI_64:return"fldai.64";case c.LDA_STR:return"lda.str";case c.LDA_CONST:return"lda.const";case c.LDA_TYPE:return"lda.type";case c.LDA_NULL:return"lda.null";case c.STA:return"sta";case c.STA_64:return"sta.64";case c.STA_OBJ:return"sta.obj";case c.CMP_64:return"cmp.64";case c.FCMPL_64:return"fcmpl.64";case c.FCMPG_64:return"fcmpg.64";case c.JMP:return"jmp";case c.JEQ_OBJ:return"jeq.obj";case c.JNE_OBJ:return"jne.obj";case c.JEQZ_OBJ:return"jeqz.obj";case c.JNEZ_OBJ:return"jnez.obj";case c.JEQZ:return"jeqz";case c.JNEZ:return"jnez";case c.JLTZ:return"jltz";case c.JGTZ:return"jgtz";case c.JLEZ:return"jlez";case c.JGEZ:return"jgez";case c.JEQ:return"jeq";case c.JNE:return"jne";case c.JLT:return"jlt";case c.JGT:return"jgt";case c.JLE:return"jle";case c.JGE:return"jge";case c.FNEG_64:return"fneg.64";case c.NEG:return"neg";case c.NEG_64:return"neg.64";case c.ADD2:return"add2";case c.ADD2_64:return"add2.64";case c.SUB2:return"sub2";case c.SUB2_64:return"sub2.64";case c.MUL2:return"mul2";case c.MUL2_64:return"mul2.64";case c.FADD2_64:return"fadd2.64";case c.FSUB2_64:return"fsub2.64";case c.FMUL2_64:return"fmul2.64";case c.FDIV2_64:return"fdiv2.64";case c.FMOD2_64:return"fmod2.64";case c.DIV2:return"div2";case c.DIV2_64:return"div2.64";case c.MOD2:return"mod2";case c.MOD2_64:return"mod2.64";case c.ADDI:return"addi";case c.SUBI:return"subi";case c.MULI:return"muli";case c.ANDI:return"andi";case c.ORI:return"ori";case c.SHLI:return"shli";case c.SHRI:return"shri";case c.ASHRI:return"ashri";case c.DIVI:return"divi";case c.MODI:return"modi";case c.ADD:return"add";case c.SUB:return"sub";case c.MUL:return"mul";case c.DIV:return"div";case c.MOD:return"mod";case c.INCI:return"inci";case c.LDARR_8:return"ldarr.8";case c.LDARRU_8:return"ldarru.8";case c.LDARR_16:return"ldarr.16";case c.LDARRU_16:return"ldarru.16";case c.LDARR:return"ldarr";case c.LDARR_64:return"ldarr.64";case c.FLDARR_32:return"fldarr.32";case c.FLDARR_64:return"fldarr.64";case c.LDARR_OBJ:return"ldarr.obj";case c.STARR_8:return"starr.8";case c.STARR_16:return"starr.16";case c.STARR:return"starr";case c.STARR_64:return"starr.64";case c.FSTARR_32:return"fstarr.32";case c.FSTARR_64:return"fstarr.64";case c.STARR_OBJ:return"starr.obj";case c.LENARR:return"lenarr";case c.NEWARR:return"newarr";case c.NEWOBJ:return"newobj";case c.INITOBJ_SHORT:return"initobj.short";case c.INITOBJ:return"initobj";case c.INITOBJ_RANGE:return"initobj.range";case c.LDOBJ:return"ldobj";case c.LDOBJ_64:return"ldobj.64";case c.LDOBJ_OBJ:return"ldobj.obj";case c.STOBJ:return"stobj";case c.STOBJ_64:return"stobj.64";case c.STOBJ_OBJ:return"stobj.obj";case c.LDOBJ_V:return"ldobj.v";case c.LDOBJ_V_64:return"ldobj.v.64";case c.LDOBJ_V_OBJ:return"ldobj.v.obj";case c.STOBJ_V:return"stobj.v";case c.STOBJ_V_64:return"stobj.v.64";case c.STOBJ_V_OBJ:return"stobj.v.obj";case c.LDSTATIC:return"ldstatic";case c.LDSTATIC_64:return"ldstatic.64";case c.LDSTATIC_OBJ:return"ldstatic.obj";case c.STSTATIC:return"ststatic";case c.STSTATIC_64:return"ststatic.64";case c.STSTATIC_OBJ:return"ststatic.obj";case c.RETURN:return"return";case c.RETURN_64:return"return.64";case c.RETURN_OBJ:return"return.obj";case c.RETURN_VOID:return"return.void";case c.THROW:return"throw";case c.CHECKCAST:return"checkcast";case c.ISINSTANCE:return"isinstance";case c.CALL_SHORT:return"call.short";case c.CALL:return"call";case c.CALL_RANGE:return"call.range";case c.CALL_ACC_SHORT:return"call.acc.short";case c.CALL_ACC:return"call.acc";case c.CALL_VIRT_SHORT:return"call.virt.short";case c.CALL_VIRT:return"call.virt";case c.CALL_VIRT_RANGE:return"call.virt.range";case c.CALL_VIRT_ACC_SHORT:return"call.virt.acc.short";case c.CALL_VIRT_ACC:return"call.virt.acc";case c.MOV_DYN:return"mov.dyn";case c.LDA_DYN:return"lda.dyn";case c.STA_DYN:return"sta.dyn";case c.LDAI_DYN:return"ldai.dyn";case c.FLDAI_DYN:return"fldai.dyn";case c.RETURN_DYN:return"return.dyn";case c.CALLI_DYN_SHORT:return"calli.dyn.short";case c.CALLI_DYN:return"calli.dyn";case c.CALLI_DYN_RANGE:return"calli.dyn.range";case c.FMOVI:return"fmovi";case c.I32TOF64:return"i32tof64";case c.UCMP:return"ucmp";case c.NOT:return"not";case c.ECMA_LDNAN:return"ecma.ldnan";case c.FLDAI:return"fldai";case c.U32TOF64:return"u32tof64";case c.UCMP_64:return"ucmp.64";case c.NOT_64:return"not.64";case c.ECMA_LDINFINITY:return"ecma.ldinfinity";case c.FCMPL:return"fcmpl";case c.I64TOF64:return"i64tof64";case c.DIVU2:return"divu2";case c.AND2:return"and2";case c.ECMA_LDGLOBALTHIS:return"ecma.ldglobalthis";case c.FCMPG:return"fcmpg";case c.U64TOF64:return"u64tof64";case c.DIVU2_64:return"divu2.64";case c.AND2_64:return"and2.64";case c.ECMA_LDUNDEFINED:return"ecma.ldundefined";case c.FNEG:return"fneg";case c.F64TOI32:return"f64toi32";case c.MODU2:return"modu2";case c.OR2:return"or2";case c.ECMA_LDNULL:return"ecma.ldnull";case c.FADD2:return"fadd2";case c.F64TOI64:return"f64toi64";case c.MODU2_64:return"modu2.64";case c.OR2_64:return"or2.64";case c.ECMA_LDSYMBOL:return"ecma.ldsymbol";case c.FSUB2:return"fsub2";case c.F64TOU32:return"f64tou32";case c.XOR2:return"xor2";case c.ECMA_LDGLOBAL:return"ecma.ldglobal";case c.FMUL2:return"fmul2";case c.F64TOU64:return"f64tou64";case c.XOR2_64:return"xor2.64";case c.ECMA_LDTRUE:return"ecma.ldtrue";case c.FDIV2:return"fdiv2";case c.I32TOU1:return"i32tou1";case c.SHL2:return"shl2";case c.ECMA_LDFALSE:return"ecma.ldfalse";case c.FMOD2:return"fmod2";case c.I64TOU1:return"i64tou1";case c.SHL2_64:return"shl2.64";case c.ECMA_THROWDYN:return"ecma.throwdyn";case c.I32TOF32:return"i32tof32";case c.U32TOU1:return"u32tou1";case c.SHR2:return"shr2";case c.ECMA_TYPEOFDYN:return"ecma.typeofdyn";case c.U32TOF32:return"u32tof32";case c.U64TOU1:return"u64tou1";case c.SHR2_64:return"shr2.64";case c.ECMA_LDLEXENVDYN:return"ecma.ldlexenvdyn";case c.I64TOF32:return"i64tof32";case c.I32TOI64:return"i32toi64";case c.ASHR2:return"ashr2";case c.ECMA_POPLEXENVDYN:return"ecma.poplexenvdyn";case c.U64TOF32:return"u64tof32";case c.I32TOI16:return"i32toi16";case c.ASHR2_64:return"ashr2.64";case c.ECMA_GETUNMAPPEDARGS:return"ecma.getunmappedargs";case c.F32TOF64:return"f32tof64";case c.I32TOU16:return"i32tou16";case c.XORI:return"xori";case c.ECMA_GETPROPITERATOR:return"ecma.getpropiterator";case c.F32TOI32:return"f32toi32";case c.I32TOI8:return"i32toi8";case c.AND:return"and";case c.ECMA_ASYNCFUNCTIONENTER:return"ecma.asyncfunctionenter";case c.F32TOI64:return"f32toi64";case c.I32TOU8:return"i32tou8";case c.OR:return"or";case c.ECMA_LDHOLE:return"ecma.ldhole";case c.F32TOU32:return"f32tou32";case c.I64TOI32:return"i64toi32";case c.XOR:return"xor";case c.ECMA_RETURNUNDEFINED:return"ecma.returnundefined";case c.F32TOU64:return"f32tou64";case c.U32TOI64:return"u32toi64";case c.SHL:return"shl";case c.ECMA_CREATEEMPTYOBJECT:return"ecma.createemptyobject";case c.F64TOF32:return"f64tof32";case c.U32TOI16:return"u32toi16";case c.SHR:return"shr";case c.ECMA_CREATEEMPTYARRAY:return"ecma.createemptyarray";case c.U32TOU16:return"u32tou16";case c.ASHR:return"ashr";case c.ECMA_GETITERATOR:return"ecma.getiterator";case c.U32TOI8:return"u32toi8";case c.ECMA_THROWTHROWNOTEXISTS:return"ecma.throwthrownotexists";case c.U32TOU8:return"u32tou8";case c.ECMA_THROWPATTERNNONCOERCIBLE:return"ecma.throwpatternnoncoercible";case c.U64TOI32:return"u64toi32";case c.ECMA_LDHOMEOBJECT:return"ecma.ldhomeobject";case c.U64TOU32:return"u64tou32";case c.ECMA_THROWDELETESUPERPROPERTY:return"ecma.throwdeletesuperproperty";case c.ECMA_DEBUGGER:return"ecma.debugger";case c.ECMA_ADD2DYN:return"ecma.add2dyn";case c.ECMA_SUB2DYN:return"ecma.sub2dyn";case c.ECMA_MUL2DYN:return"ecma.mul2dyn";case c.ECMA_DIV2DYN:return"ecma.div2dyn";case c.ECMA_MOD2DYN:return"ecma.mod2dyn";case c.ECMA_EQDYN:return"ecma.eqdyn";case c.ECMA_NOTEQDYN:return"ecma.noteqdyn";case c.ECMA_LESSDYN:return"ecma.lessdyn";case c.ECMA_LESSEQDYN:return"ecma.lesseqdyn";case c.ECMA_GREATERDYN:return"ecma.greaterdyn";case c.ECMA_GREATEREQDYN:return"ecma.greatereqdyn";case c.ECMA_SHL2DYN:return"ecma.shl2dyn";case c.ECMA_SHR2DYN:return"ecma.shr2dyn";case c.ECMA_ASHR2DYN:return"ecma.ashr2dyn";case c.ECMA_AND2DYN:return"ecma.and2dyn";case c.ECMA_OR2DYN:return"ecma.or2dyn";case c.ECMA_XOR2DYN:return"ecma.xor2dyn";case c.ECMA_TONUMBER:return"ecma.tonumber";case c.ECMA_NEGDYN:return"ecma.negdyn";case c.ECMA_NOTDYN:return"ecma.notdyn";case c.ECMA_INCDYN:return"ecma.incdyn";case c.ECMA_DECDYN:return"ecma.decdyn";case c.ECMA_EXPDYN:return"ecma.expdyn";case c.ECMA_ISINDYN:return"ecma.isindyn";case c.ECMA_INSTANCEOFDYN:return"ecma.instanceofdyn";case c.ECMA_STRICTNOTEQDYN:return"ecma.strictnoteqdyn";case c.ECMA_STRICTEQDYN:return"ecma.stricteqdyn";case c.ECMA_RESUMEGENERATOR:return"ecma.resumegenerator";case c.ECMA_GETRESUMEMODE:return"ecma.getresumemode";case c.ECMA_CREATEGENERATOROBJ:return"ecma.creategeneratorobj";case c.ECMA_THROWCONSTASSIGNMENT:return"ecma.throwconstassignment";case c.ECMA_GETTEMPLATEOBJECT:return"ecma.gettemplateobject";case c.ECMA_GETNEXTPROPNAME:return"ecma.getnextpropname";case c.ECMA_CALLARG0DYN:return"ecma.callarg0dyn";case c.ECMA_THROWIFNOTOBJECT:return"ecma.throwifnotobject";case c.ECMA_ITERNEXT:return"ecma.iternext";case c.ECMA_CLOSEITERATOR:return"ecma.closeiterator";case c.ECMA_COPYMODULE:return"ecma.copymodule";case c.ECMA_SUPERCALLSPREAD:return"ecma.supercallspread";case c.ECMA_DELOBJPROP:return"ecma.delobjprop";case c.ECMA_NEWOBJSPREADDYN:return"ecma.newobjspreaddyn";case c.ECMA_CREATEITERRESULTOBJ:return"ecma.createiterresultobj";case c.ECMA_SUSPENDGENERATOR:return"ecma.suspendgenerator";case c.ECMA_ASYNCFUNCTIONAWAITUNCAUGHT:return"ecma.asyncfunctionawaituncaught";case c.ECMA_THROWUNDEFINEDIFHOLE:return"ecma.throwundefinedifhole";case c.ECMA_CALLARG1DYN:return"ecma.callarg1dyn";case c.ECMA_COPYDATAPROPERTIES:return"ecma.copydataproperties";case c.ECMA_STARRAYSPREAD:return"ecma.starrayspread";case c.ECMA_GETITERATORNEXT:return"ecma.getiteratornext";case c.ECMA_SETOBJECTWITHPROTO:return"ecma.setobjectwithproto";case c.ECMA_LDOBJBYVALUE:return"ecma.ldobjbyvalue";case c.ECMA_STOBJBYVALUE:return"ecma.stobjbyvalue";case c.ECMA_STOWNBYVALUE:return"ecma.stownbyvalue";case c.ECMA_LDSUPERBYVALUE:return"ecma.ldsuperbyvalue";case c.ECMA_STSUPERBYVALUE:return"ecma.stsuperbyvalue";case c.ECMA_LDOBJBYINDEX:return"ecma.ldobjbyindex";case c.ECMA_STOBJBYINDEX:return"ecma.stobjbyindex";case c.ECMA_STOWNBYINDEX:return"ecma.stownbyindex";case c.ECMA_CALLSPREADDYN:return"ecma.callspreaddyn";case c.ECMA_ASYNCFUNCTIONRESOLVE:return"ecma.asyncfunctionresolve";case c.ECMA_ASYNCFUNCTIONREJECT:return"ecma.asyncfunctionreject";case c.ECMA_CALLARGS2DYN:return"ecma.callargs2dyn";case c.ECMA_CALLARGS3DYN:return"ecma.callargs3dyn";case c.ECMA_DEFINEGETTERSETTERBYVALUE:return"ecma.definegettersetterbyvalue";case c.ECMA_NEWOBJDYNRANGE:return"ecma.newobjdynrange";case c.ECMA_CALLIRANGEDYN:return"ecma.callirangedyn";case c.ECMA_CALLITHISRANGEDYN:return"ecma.callithisrangedyn";case c.ECMA_SUPERCALL:return"ecma.supercall";case c.ECMA_CREATEOBJECTWITHEXCLUDEDKEYS:return"ecma.createobjectwithexcludedkeys";case c.ECMA_DEFINEFUNCDYN:return"ecma.definefuncdyn";case c.ECMA_DEFINENCFUNCDYN:return"ecma.definencfuncdyn";case c.ECMA_DEFINEGENERATORFUNC:return"ecma.definegeneratorfunc";case c.ECMA_DEFINEASYNCFUNC:return"ecma.defineasyncfunc";case c.ECMA_DEFINEMETHOD:return"ecma.definemethod";case c.ECMA_NEWLEXENVDYN:return"ecma.newlexenvdyn";case c.ECMA_COPYRESTARGS:return"ecma.copyrestargs";case c.ECMA_CREATEARRAYWITHBUFFER:return"ecma.createarraywithbuffer";case c.ECMA_CREATEOBJECTHAVINGMETHOD:return"ecma.createobjecthavingmethod";case c.ECMA_THROWIFSUPERNOTCORRECTCALL:return"ecma.throwifsupernotcorrectcall";case c.ECMA_CREATEOBJECTWITHBUFFER:return"ecma.createobjectwithbuffer";case c.ECMA_LDLEXVARDYN:return"ecma.ldlexvardyn";case c.ECMA_STLEXVARDYN:return"ecma.stlexvardyn";case c.ECMA_DEFINECLASSWITHBUFFER:return"ecma.defineclasswithbuffer";case c.ECMA_IMPORTMODULE:return"ecma.importmodule";case c.ECMA_STMODULEVAR:return"ecma.stmodulevar";case c.ECMA_TRYLDGLOBALBYNAME:return"ecma.tryldglobalbyname";case c.ECMA_TRYSTGLOBALBYNAME:return"ecma.trystglobalbyname";case c.ECMA_LDGLOBALVAR:return"ecma.ldglobalvar";case c.ECMA_STGLOBALVAR:return"ecma.stglobalvar";case c.ECMA_LDOBJBYNAME:return"ecma.ldobjbyname";case c.ECMA_STOBJBYNAME:return"ecma.stobjbyname";case c.ECMA_STOWNBYNAME:return"ecma.stownbyname";case c.ECMA_LDSUPERBYNAME:return"ecma.ldsuperbyname";case c.ECMA_STSUPERBYNAME:return"ecma.stsuperbyname";case c.ECMA_LDMODVARBYNAME:return"ecma.ldmodvarbyname";case c.ECMA_CREATEREGEXPWITHLITERAL:return"ecma.createregexpwithliteral";case c.ECMA_ISTRUE:return"ecma.istrue";case c.ECMA_ISFALSE:return"ecma.isfalse";case c.ECMA_STCONSTTOGLOBALRECORD:return"ecma.stconsttoglobalrecord";case c.ECMA_STLETTOGLOBALRECORD:return"ecma.stlettoglobalrecord";case c.ECMA_STCLASSTOGLOBALRECORD:return"ecma.stclasstoglobalrecord";case c.ECMA_STOWNBYVALUEWITHNAMESET:return"ecma.stownbyvaluewithnameset";case c.ECMA_STOWNBYNAMEWITHNAMESET:return"ecma.stownbynamewithnameset";case c.ECMA_LDFUNCTION:return"ecma.ldfunction";case c.ECMA_NEWLEXENVWITHNAMEDYN:return"ecma.newlexenvwithnamedyn";case c.ECMA_LDBIGINT:return"ecma.ldbigint";default:return""}}function f(e){switch(e){case c.NOP:return[[]];case c.MOV:return[[[1,4],[0,4]],[[1,8],[0,8]],[[1,16],[0,16]]];case c.MOV_64:return[[[1,4],[0,4]],[[1,16],[0,16]]];case c.MOV_OBJ:return[[[1,4],[0,4]],[[1,8],[0,8]],[[1,16],[0,16]]];case c.MOVI:return[[[1,4],[3,4]],[[1,8],[3,8]],[[1,8],[3,16]],[[1,8],[3,32]]];case c.MOVI_64:case c.FMOVI_64:return[[[1,8],[3,64]]];case c.MOV_NULL:return[[[1,8]]];case c.LDA:case c.LDA_64:case c.LDA_OBJ:return[[[0,8]]];case c.LDAI:return[[[3,8]],[[3,16]],[[3,32]]];case c.LDAI_64:case c.FLDAI_64:return[[[3,64]]];case c.LDA_STR:return[[[5,32]]];case c.LDA_CONST:return[[[1,8],[4,32]]];case c.LDA_TYPE:return[[[4,16]]];case c.LDA_NULL:return[[]];case c.STA:case c.STA_64:case c.STA_OBJ:return[[[1,8]]];case c.CMP_64:case c.FCMPL_64:case c.FCMPG_64:return[[[0,8]]];case c.JMP:return[[[6,8]],[[6,16]],[[6,32]]];case c.JEQ_OBJ:case c.JNE_OBJ:return[[[0,8],[6,8]],[[0,8],[6,16]]];case c.JEQZ_OBJ:case c.JNEZ_OBJ:case c.JEQZ:case c.JNEZ:case c.JLTZ:case c.JGTZ:case c.JLEZ:case c.JGEZ:return[[[6,8]],[[6,16]]];case c.JEQ:case c.JNE:case c.JLT:case c.JGT:case c.JLE:case c.JGE:return[[[0,8],[6,8]],[[0,8],[6,16]]];case c.FNEG_64:case c.NEG:case c.NEG_64:return[[]];case c.ADD2:case c.ADD2_64:case c.SUB2:case c.SUB2_64:case c.MUL2:case c.MUL2_64:case c.FADD2_64:case c.FSUB2_64:case c.FMUL2_64:case c.FDIV2_64:case c.FMOD2_64:case c.DIV2:case c.DIV2_64:case c.MOD2:case c.MOD2_64:return[[[0,8]]];case c.ADDI:case c.SUBI:case c.MULI:return[[[3,8]]];case c.ANDI:case c.ORI:return[[[3,32]]];case c.SHLI:case c.SHRI:case c.ASHRI:case c.DIVI:case c.MODI:return[[[3,8]]];case c.ADD:case c.SUB:case c.MUL:case c.DIV:case c.MOD:return[[[0,4],[0,4]]];case c.INCI:return[[[2,4],[3,4]]];case c.LDARR_8:case c.LDARRU_8:case c.LDARR_16:case c.LDARRU_16:case c.LDARR:case c.LDARR_64:case c.FLDARR_32:case c.FLDARR_64:case c.LDARR_OBJ:return[[[0,8]]];case c.STARR_8:case c.STARR_16:case c.STARR:case c.STARR_64:case c.FSTARR_32:case c.FSTARR_64:case c.STARR_OBJ:return[[[0,4],[0,4]]];case c.LENARR:return[[[0,8]]];case c.NEWARR:return[[[1,4],[0,4],[4,16]]];case c.NEWOBJ:return[[[1,8],[4,16]]];case c.INITOBJ_SHORT:return[[[4,16],[0,4],[0,4]]];case c.INITOBJ:return[[[4,16],[0,4],[0,4],[0,4],[0,4]]];case c.INITOBJ_RANGE:return[[[4,16],[0,8]]];case c.LDOBJ:case c.LDOBJ_64:case c.LDOBJ_OBJ:case c.STOBJ:case c.STOBJ_64:case c.STOBJ_OBJ:return[[[0,8],[4,16]]];case c.LDOBJ_V:case c.LDOBJ_V_64:case c.LDOBJ_V_OBJ:return[[[1,4],[0,4],[4,16]]];case c.STOBJ_V:case c.STOBJ_V_64:case c.STOBJ_V_OBJ:return[[[0,4],[0,4],[4,16]]];case c.LDSTATIC:case c.LDSTATIC_64:case c.LDSTATIC_OBJ:case c.STSTATIC:case c.STSTATIC_64:case c.STSTATIC_OBJ:return[[[4,16]]];case c.RETURN:case c.RETURN_64:case c.RETURN_OBJ:case c.RETURN_VOID:return[[]];case c.THROW:return[[[0,8]]];case c.CHECKCAST:case c.ISINSTANCE:return[[[4,16]]];case c.CALL_SHORT:return[[[4,16],[0,4],[0,4]]];case c.CALL:return[[[4,16],[0,4],[0,4],[0,4],[0,4]]];case c.CALL_RANGE:return[[[4,16],[0,8]]];case c.CALL_ACC_SHORT:return[[[4,16],[0,4],[3,4]]];case c.CALL_ACC:return[[[4,16],[0,4],[0,4],[0,4],[3,4]]];case c.CALL_VIRT_SHORT:return[[[4,16],[0,4],[0,4]]];case c.CALL_VIRT:return[[[4,16],[0,4],[0,4],[0,4],[0,4]]];case c.CALL_VIRT_RANGE:return[[[4,16],[0,8]]];case c.CALL_VIRT_ACC_SHORT:return[[[4,16],[0,4],[3,4]]];case c.CALL_VIRT_ACC:return[[[4,16],[0,4],[0,4],[0,4],[3,4]]];case c.MOV_DYN:return[[[1,8],[0,8]],[[1,16],[0,16]]];case c.LDA_DYN:return[[[0,8]]];case c.STA_DYN:return[[[1,8]]];case c.LDAI_DYN:return[[[3,32]]];case c.FLDAI_DYN:return[[[3,64]]];case c.RETURN_DYN:return[[]];case c.CALLI_DYN_SHORT:return[[[3,4],[0,4],[0,4],[0,4]]];case c.CALLI_DYN:return[[[3,4],[0,4],[0,4],[0,4],[0,4],[0,4]]];case c.CALLI_DYN_RANGE:return[[[3,16],[0,16]]];case c.FMOVI:return[[[1,8],[3,32]]];case c.I32TOF64:return[[]];case c.UCMP:return[[[0,8]]];case c.NOT:case c.ECMA_LDNAN:return[[]];case c.FLDAI:return[[[3,32]]];case c.U32TOF64:return[[]];case c.UCMP_64:return[[[0,8]]];case c.NOT_64:case c.ECMA_LDINFINITY:return[[]];case c.FCMPL:return[[[0,8]]];case c.I64TOF64:return[[]];case c.DIVU2:case c.AND2:return[[[0,8]]];case c.ECMA_LDGLOBALTHIS:return[[]];case c.FCMPG:return[[[0,8]]];case c.U64TOF64:return[[]];case c.DIVU2_64:case c.AND2_64:return[[[0,8]]];case c.ECMA_LDUNDEFINED:case c.FNEG:case c.F64TOI32:return[[]];case c.MODU2:case c.OR2:return[[[0,8]]];case c.ECMA_LDNULL:return[[]];case c.FADD2:return[[[0,8]]];case c.F64TOI64:return[[]];case c.MODU2_64:case c.OR2_64:return[[[0,8]]];case c.ECMA_LDSYMBOL:return[[]];case c.FSUB2:return[[[0,8]]];case c.F64TOU32:return[[]];case c.XOR2:return[[[0,8]]];case c.ECMA_LDGLOBAL:return[[]];case c.FMUL2:return[[[0,8]]];case c.F64TOU64:return[[]];case c.XOR2_64:return[[[0,8]]];case c.ECMA_LDTRUE:return[[]];case c.FDIV2:return[[[0,8]]];case c.I32TOU1:return[[]];case c.SHL2:return[[[0,8]]];case c.ECMA_LDFALSE:return[[]];case c.FMOD2:return[[[0,8]]];case c.I64TOU1:return[[]];case c.SHL2_64:return[[[0,8]]];case c.ECMA_THROWDYN:case c.I32TOF32:case c.U32TOU1:return[[]];case c.SHR2:return[[[0,8]]];case c.ECMA_TYPEOFDYN:case c.U32TOF32:case c.U64TOU1:return[[]];case c.SHR2_64:return[[[0,8]]];case c.ECMA_LDLEXENVDYN:case c.I64TOF32:case c.I32TOI64:return[[]];case c.ASHR2:return[[[0,8]]];case c.ECMA_POPLEXENVDYN:case c.U64TOF32:case c.I32TOI16:return[[]];case c.ASHR2_64:return[[[0,8]]];case c.ECMA_GETUNMAPPEDARGS:case c.F32TOF64:case c.I32TOU16:return[[]];case c.XORI:return[[[3,32]]];case c.ECMA_GETPROPITERATOR:case c.F32TOI32:case c.I32TOI8:return[[]];case c.AND:return[[[0,4],[0,4]]];case c.ECMA_ASYNCFUNCTIONENTER:case c.F32TOI64:case c.I32TOU8:return[[]];case c.OR:return[[[0,4],[0,4]]];case c.ECMA_LDHOLE:case c.F32TOU32:case c.I64TOI32:return[[]];case c.XOR:return[[[0,4],[0,4]]];case c.ECMA_RETURNUNDEFINED:case c.F32TOU64:case c.U32TOI64:return[[]];case c.SHL:return[[[0,4],[0,4]]];case c.ECMA_CREATEEMPTYOBJECT:case c.F64TOF32:case c.U32TOI16:return[[]];case c.SHR:return[[[0,4],[0,4]]];case c.ECMA_CREATEEMPTYARRAY:case c.U32TOU16:return[[]];case c.ASHR:return[[[0,4],[0,4]]];case c.ECMA_GETITERATOR:case c.U32TOI8:case c.ECMA_THROWTHROWNOTEXISTS:case c.U32TOU8:case c.ECMA_THROWPATTERNNONCOERCIBLE:case c.U64TOI32:case c.ECMA_LDHOMEOBJECT:case c.U64TOU32:case c.ECMA_THROWDELETESUPERPROPERTY:case c.ECMA_DEBUGGER:return[[]];case c.ECMA_ADD2DYN:case c.ECMA_SUB2DYN:case c.ECMA_MUL2DYN:case c.ECMA_DIV2DYN:case c.ECMA_MOD2DYN:case c.ECMA_EQDYN:case c.ECMA_NOTEQDYN:case c.ECMA_LESSDYN:case c.ECMA_LESSEQDYN:case c.ECMA_GREATERDYN:case c.ECMA_GREATEREQDYN:case c.ECMA_SHL2DYN:case c.ECMA_SHR2DYN:case c.ECMA_ASHR2DYN:case c.ECMA_AND2DYN:case c.ECMA_OR2DYN:case c.ECMA_XOR2DYN:case c.ECMA_TONUMBER:case c.ECMA_NEGDYN:case c.ECMA_NOTDYN:case c.ECMA_INCDYN:case c.ECMA_DECDYN:case c.ECMA_EXPDYN:case c.ECMA_ISINDYN:case c.ECMA_INSTANCEOFDYN:case c.ECMA_STRICTNOTEQDYN:case c.ECMA_STRICTEQDYN:case c.ECMA_RESUMEGENERATOR:case c.ECMA_GETRESUMEMODE:case c.ECMA_CREATEGENERATOROBJ:case c.ECMA_THROWCONSTASSIGNMENT:case c.ECMA_GETTEMPLATEOBJECT:case c.ECMA_GETNEXTPROPNAME:case c.ECMA_CALLARG0DYN:case c.ECMA_THROWIFNOTOBJECT:case c.ECMA_ITERNEXT:case c.ECMA_CLOSEITERATOR:case c.ECMA_COPYMODULE:case c.ECMA_SUPERCALLSPREAD:return[[[0,8]]];case c.ECMA_DELOBJPROP:case c.ECMA_NEWOBJSPREADDYN:case c.ECMA_CREATEITERRESULTOBJ:case c.ECMA_SUSPENDGENERATOR:case c.ECMA_ASYNCFUNCTIONAWAITUNCAUGHT:case c.ECMA_THROWUNDEFINEDIFHOLE:case c.ECMA_CALLARG1DYN:case c.ECMA_COPYDATAPROPERTIES:case c.ECMA_STARRAYSPREAD:case c.ECMA_GETITERATORNEXT:case c.ECMA_SETOBJECTWITHPROTO:case c.ECMA_LDOBJBYVALUE:case c.ECMA_STOBJBYVALUE:case c.ECMA_STOWNBYVALUE:case c.ECMA_LDSUPERBYVALUE:case c.ECMA_STSUPERBYVALUE:return[[[0,8],[0,8]]];case c.ECMA_LDOBJBYINDEX:case c.ECMA_STOBJBYINDEX:case c.ECMA_STOWNBYINDEX:return[[[0,8],[3,32]]];case c.ECMA_CALLSPREADDYN:case c.ECMA_ASYNCFUNCTIONRESOLVE:case c.ECMA_ASYNCFUNCTIONREJECT:case c.ECMA_CALLARGS2DYN:return[[[0,8],[0,8],[0,8]]];case c.ECMA_CALLARGS3DYN:case c.ECMA_DEFINEGETTERSETTERBYVALUE:return[[[0,8],[0,8],[0,8],[0,8]]];case c.ECMA_NEWOBJDYNRANGE:case c.ECMA_CALLIRANGEDYN:case c.ECMA_CALLITHISRANGEDYN:case c.ECMA_SUPERCALL:return[[[3,16],[0,8]]];case c.ECMA_CREATEOBJECTWITHEXCLUDEDKEYS:return[[[3,16],[0,8],[0,8]]];case c.ECMA_DEFINEFUNCDYN:case c.ECMA_DEFINENCFUNCDYN:case c.ECMA_DEFINEGENERATORFUNC:case c.ECMA_DEFINEASYNCFUNC:case c.ECMA_DEFINEMETHOD:return[[[4,16],[3,16],[0,8]]];case c.ECMA_NEWLEXENVDYN:case c.ECMA_COPYRESTARGS:case c.ECMA_CREATEARRAYWITHBUFFER:case c.ECMA_CREATEOBJECTHAVINGMETHOD:case c.ECMA_THROWIFSUPERNOTCORRECTCALL:case c.ECMA_CREATEOBJECTWITHBUFFER:return[[[3,16]]];case c.ECMA_LDLEXVARDYN:return[[[3,4],[3,4]],[[3,8],[3,8]],[[3,16],[3,16]]];case c.ECMA_STLEXVARDYN:return[[[3,4],[3,4],[0,8]],[[3,8],[3,8],[0,8]],[[3,16],[3,16],[0,8]]];case c.ECMA_DEFINECLASSWITHBUFFER:return[[[4,16],[3,16],[3,16],[0,8],[0,8]]];case c.ECMA_IMPORTMODULE:case c.ECMA_STMODULEVAR:case c.ECMA_TRYLDGLOBALBYNAME:case c.ECMA_TRYSTGLOBALBYNAME:case c.ECMA_LDGLOBALVAR:case c.ECMA_STGLOBALVAR:return[[[5,32]]];case c.ECMA_LDOBJBYNAME:case c.ECMA_STOBJBYNAME:case c.ECMA_STOWNBYNAME:case c.ECMA_LDSUPERBYNAME:case c.ECMA_STSUPERBYNAME:case c.ECMA_LDMODVARBYNAME:return[[[5,32],[0,8]]];case c.ECMA_CREATEREGEXPWITHLITERAL:return[[[5,32],[3,8]]];case c.ECMA_ISTRUE:case c.ECMA_ISFALSE:return[[]];case c.ECMA_STCONSTTOGLOBALRECORD:case c.ECMA_STLETTOGLOBALRECORD:case c.ECMA_STCLASSTOGLOBALRECORD:return[[[5,32]]];case c.ECMA_STOWNBYVALUEWITHNAMESET:return[[[0,8],[0,8]]];case c.ECMA_STOWNBYNAMEWITHNAMESET:return[[[5,32],[0,8]]];case c.ECMA_LDFUNCTION:return[[]];case c.ECMA_NEWLEXENVWITHNAMEDYN:return[[[3,16],[3,16]]];case c.ECMA_LDBIGINT:return[[[5,32]]];default:return[]}}!function(e){e[e.NOP=0]="NOP",e[e.MOV=1]="MOV",e[e.MOV_64=2]="MOV_64",e[e.MOV_OBJ=3]="MOV_OBJ",e[e.MOVI=4]="MOVI",e[e.MOVI_64=5]="MOVI_64",e[e.FMOVI_64=6]="FMOVI_64",e[e.MOV_NULL=7]="MOV_NULL",e[e.LDA=8]="LDA",e[e.LDA_64=9]="LDA_64",e[e.LDA_OBJ=10]="LDA_OBJ",e[e.LDAI=11]="LDAI",e[e.LDAI_64=12]="LDAI_64",e[e.FLDAI_64=13]="FLDAI_64",e[e.LDA_STR=14]="LDA_STR",e[e.LDA_CONST=15]="LDA_CONST",e[e.LDA_TYPE=16]="LDA_TYPE",e[e.LDA_NULL=17]="LDA_NULL",e[e.STA=18]="STA",e[e.STA_64=19]="STA_64",e[e.STA_OBJ=20]="STA_OBJ",e[e.CMP_64=21]="CMP_64",e[e.FCMPL_64=22]="FCMPL_64",e[e.FCMPG_64=23]="FCMPG_64",e[e.JMP=24]="JMP",e[e.JEQ_OBJ=25]="JEQ_OBJ",e[e.JNE_OBJ=26]="JNE_OBJ",e[e.JEQZ_OBJ=27]="JEQZ_OBJ",e[e.JNEZ_OBJ=28]="JNEZ_OBJ",e[e.JEQZ=29]="JEQZ",e[e.JNEZ=30]="JNEZ",e[e.JLTZ=31]="JLTZ",e[e.JGTZ=32]="JGTZ",e[e.JLEZ=33]="JLEZ",e[e.JGEZ=34]="JGEZ",e[e.JEQ=35]="JEQ",e[e.JNE=36]="JNE",e[e.JLT=37]="JLT",e[e.JGT=38]="JGT",e[e.JLE=39]="JLE",e[e.JGE=40]="JGE",e[e.FNEG_64=41]="FNEG_64",e[e.NEG=42]="NEG",e[e.NEG_64=43]="NEG_64",e[e.ADD2=44]="ADD2",e[e.ADD2_64=45]="ADD2_64",e[e.SUB2=46]="SUB2",e[e.SUB2_64=47]="SUB2_64",e[e.MUL2=48]="MUL2",e[e.MUL2_64=49]="MUL2_64",e[e.FADD2_64=50]="FADD2_64",e[e.FSUB2_64=51]="FSUB2_64",e[e.FMUL2_64=52]="FMUL2_64",e[e.FDIV2_64=53]="FDIV2_64",e[e.FMOD2_64=54]="FMOD2_64",e[e.DIV2=55]="DIV2",e[e.DIV2_64=56]="DIV2_64",e[e.MOD2=57]="MOD2",e[e.MOD2_64=58]="MOD2_64",e[e.ADDI=59]="ADDI",e[e.SUBI=60]="SUBI",e[e.MULI=61]="MULI",e[e.ANDI=62]="ANDI",e[e.ORI=63]="ORI",e[e.SHLI=64]="SHLI",e[e.SHRI=65]="SHRI",e[e.ASHRI=66]="ASHRI",e[e.DIVI=67]="DIVI",e[e.MODI=68]="MODI",e[e.ADD=69]="ADD",e[e.SUB=70]="SUB",e[e.MUL=71]="MUL",e[e.DIV=72]="DIV",e[e.MOD=73]="MOD",e[e.INCI=74]="INCI",e[e.LDARR_8=75]="LDARR_8",e[e.LDARRU_8=76]="LDARRU_8",e[e.LDARR_16=77]="LDARR_16",e[e.LDARRU_16=78]="LDARRU_16",e[e.LDARR=79]="LDARR",e[e.LDARR_64=80]="LDARR_64",e[e.FLDARR_32=81]="FLDARR_32",e[e.FLDARR_64=82]="FLDARR_64",e[e.LDARR_OBJ=83]="LDARR_OBJ",e[e.STARR_8=84]="STARR_8",e[e.STARR_16=85]="STARR_16",e[e.STARR=86]="STARR",e[e.STARR_64=87]="STARR_64",e[e.FSTARR_32=88]="FSTARR_32",e[e.FSTARR_64=89]="FSTARR_64",e[e.STARR_OBJ=90]="STARR_OBJ",e[e.LENARR=91]="LENARR",e[e.NEWARR=92]="NEWARR",e[e.NEWOBJ=93]="NEWOBJ",e[e.INITOBJ_SHORT=94]="INITOBJ_SHORT",e[e.INITOBJ=95]="INITOBJ",e[e.INITOBJ_RANGE=96]="INITOBJ_RANGE",e[e.LDOBJ=97]="LDOBJ",e[e.LDOBJ_64=98]="LDOBJ_64",e[e.LDOBJ_OBJ=99]="LDOBJ_OBJ",e[e.STOBJ=100]="STOBJ",e[e.STOBJ_64=101]="STOBJ_64",e[e.STOBJ_OBJ=102]="STOBJ_OBJ",e[e.LDOBJ_V=103]="LDOBJ_V",e[e.LDOBJ_V_64=104]="LDOBJ_V_64",e[e.LDOBJ_V_OBJ=105]="LDOBJ_V_OBJ",e[e.STOBJ_V=106]="STOBJ_V",e[e.STOBJ_V_64=107]="STOBJ_V_64",e[e.STOBJ_V_OBJ=108]="STOBJ_V_OBJ",e[e.LDSTATIC=109]="LDSTATIC",e[e.LDSTATIC_64=110]="LDSTATIC_64",e[e.LDSTATIC_OBJ=111]="LDSTATIC_OBJ",e[e.STSTATIC=112]="STSTATIC",e[e.STSTATIC_64=113]="STSTATIC_64",e[e.STSTATIC_OBJ=114]="STSTATIC_OBJ",e[e.RETURN=115]="RETURN",e[e.RETURN_64=116]="RETURN_64",e[e.RETURN_OBJ=117]="RETURN_OBJ",e[e.RETURN_VOID=118]="RETURN_VOID",e[e.THROW=119]="THROW",e[e.CHECKCAST=120]="CHECKCAST",e[e.ISINSTANCE=121]="ISINSTANCE",e[e.CALL_SHORT=122]="CALL_SHORT",e[e.CALL=123]="CALL",e[e.CALL_RANGE=124]="CALL_RANGE",e[e.CALL_ACC_SHORT=125]="CALL_ACC_SHORT",e[e.CALL_ACC=126]="CALL_ACC",e[e.CALL_VIRT_SHORT=127]="CALL_VIRT_SHORT",e[e.CALL_VIRT=128]="CALL_VIRT",e[e.CALL_VIRT_RANGE=129]="CALL_VIRT_RANGE",e[e.CALL_VIRT_ACC_SHORT=130]="CALL_VIRT_ACC_SHORT",e[e.CALL_VIRT_ACC=131]="CALL_VIRT_ACC",e[e.MOV_DYN=132]="MOV_DYN",e[e.LDA_DYN=133]="LDA_DYN",e[e.STA_DYN=134]="STA_DYN",e[e.LDAI_DYN=135]="LDAI_DYN",e[e.FLDAI_DYN=136]="FLDAI_DYN",e[e.RETURN_DYN=137]="RETURN_DYN",e[e.CALLI_DYN_SHORT=138]="CALLI_DYN_SHORT",e[e.CALLI_DYN=139]="CALLI_DYN",e[e.CALLI_DYN_RANGE=140]="CALLI_DYN_RANGE",e[e.FMOVI=141]="FMOVI",e[e.I32TOF64=142]="I32TOF64",e[e.UCMP=143]="UCMP",e[e.NOT=144]="NOT",e[e.ECMA_LDNAN=145]="ECMA_LDNAN",e[e.FLDAI=146]="FLDAI",e[e.U32TOF64=147]="U32TOF64",e[e.UCMP_64=148]="UCMP_64",e[e.NOT_64=149]="NOT_64",e[e.ECMA_LDINFINITY=150]="ECMA_LDINFINITY",e[e.FCMPL=151]="FCMPL",e[e.I64TOF64=152]="I64TOF64",e[e.DIVU2=153]="DIVU2",e[e.AND2=154]="AND2",e[e.ECMA_LDGLOBALTHIS=155]="ECMA_LDGLOBALTHIS",e[e.FCMPG=156]="FCMPG",e[e.U64TOF64=157]="U64TOF64",e[e.DIVU2_64=158]="DIVU2_64",e[e.AND2_64=159]="AND2_64",e[e.ECMA_LDUNDEFINED=160]="ECMA_LDUNDEFINED",e[e.FNEG=161]="FNEG",e[e.F64TOI32=162]="F64TOI32",e[e.MODU2=163]="MODU2",e[e.OR2=164]="OR2",e[e.ECMA_LDNULL=165]="ECMA_LDNULL",e[e.FADD2=166]="FADD2",e[e.F64TOI64=167]="F64TOI64",e[e.MODU2_64=168]="MODU2_64",e[e.OR2_64=169]="OR2_64",e[e.ECMA_LDSYMBOL=170]="ECMA_LDSYMBOL",e[e.FSUB2=171]="FSUB2",e[e.F64TOU32=172]="F64TOU32",e[e.XOR2=173]="XOR2",e[e.ECMA_LDGLOBAL=174]="ECMA_LDGLOBAL",e[e.FMUL2=175]="FMUL2",e[e.F64TOU64=176]="F64TOU64",e[e.XOR2_64=177]="XOR2_64",e[e.ECMA_LDTRUE=178]="ECMA_LDTRUE",e[e.FDIV2=179]="FDIV2",e[e.I32TOU1=180]="I32TOU1",e[e.SHL2=181]="SHL2",e[e.ECMA_LDFALSE=182]="ECMA_LDFALSE",e[e.FMOD2=183]="FMOD2",e[e.I64TOU1=184]="I64TOU1",e[e.SHL2_64=185]="SHL2_64",e[e.ECMA_THROWDYN=186]="ECMA_THROWDYN",e[e.I32TOF32=187]="I32TOF32",e[e.U32TOU1=188]="U32TOU1",e[e.SHR2=189]="SHR2",e[e.ECMA_TYPEOFDYN=190]="ECMA_TYPEOFDYN",e[e.U32TOF32=191]="U32TOF32",e[e.U64TOU1=192]="U64TOU1",e[e.SHR2_64=193]="SHR2_64",e[e.ECMA_LDLEXENVDYN=194]="ECMA_LDLEXENVDYN",e[e.I64TOF32=195]="I64TOF32",e[e.I32TOI64=196]="I32TOI64",e[e.ASHR2=197]="ASHR2",e[e.ECMA_POPLEXENVDYN=198]="ECMA_POPLEXENVDYN",e[e.U64TOF32=199]="U64TOF32",e[e.I32TOI16=200]="I32TOI16",e[e.ASHR2_64=201]="ASHR2_64",e[e.ECMA_GETUNMAPPEDARGS=202]="ECMA_GETUNMAPPEDARGS",e[e.F32TOF64=203]="F32TOF64",e[e.I32TOU16=204]="I32TOU16",e[e.XORI=205]="XORI",e[e.ECMA_GETPROPITERATOR=206]="ECMA_GETPROPITERATOR",e[e.F32TOI32=207]="F32TOI32",e[e.I32TOI8=208]="I32TOI8",e[e.AND=209]="AND",e[e.ECMA_ASYNCFUNCTIONENTER=210]="ECMA_ASYNCFUNCTIONENTER",e[e.F32TOI64=211]="F32TOI64",e[e.I32TOU8=212]="I32TOU8",e[e.OR=213]="OR",e[e.ECMA_LDHOLE=214]="ECMA_LDHOLE",e[e.F32TOU32=215]="F32TOU32",e[e.I64TOI32=216]="I64TOI32",e[e.XOR=217]="XOR",e[e.ECMA_RETURNUNDEFINED=218]="ECMA_RETURNUNDEFINED",e[e.F32TOU64=219]="F32TOU64",e[e.U32TOI64=220]="U32TOI64",e[e.SHL=221]="SHL",e[e.ECMA_CREATEEMPTYOBJECT=222]="ECMA_CREATEEMPTYOBJECT",e[e.F64TOF32=223]="F64TOF32",e[e.U32TOI16=224]="U32TOI16",e[e.SHR=225]="SHR",e[e.ECMA_CREATEEMPTYARRAY=226]="ECMA_CREATEEMPTYARRAY",e[e.U32TOU16=227]="U32TOU16",e[e.ASHR=228]="ASHR",e[e.ECMA_GETITERATOR=229]="ECMA_GETITERATOR",e[e.U32TOI8=230]="U32TOI8",e[e.ECMA_THROWTHROWNOTEXISTS=231]="ECMA_THROWTHROWNOTEXISTS",e[e.U32TOU8=232]="U32TOU8",e[e.ECMA_THROWPATTERNNONCOERCIBLE=233]="ECMA_THROWPATTERNNONCOERCIBLE",e[e.U64TOI32=234]="U64TOI32",e[e.ECMA_LDHOMEOBJECT=235]="ECMA_LDHOMEOBJECT",e[e.U64TOU32=236]="U64TOU32",e[e.ECMA_THROWDELETESUPERPROPERTY=237]="ECMA_THROWDELETESUPERPROPERTY",e[e.ECMA_DEBUGGER=238]="ECMA_DEBUGGER",e[e.ECMA_ADD2DYN=239]="ECMA_ADD2DYN",e[e.ECMA_SUB2DYN=240]="ECMA_SUB2DYN",e[e.ECMA_MUL2DYN=241]="ECMA_MUL2DYN",e[e.ECMA_DIV2DYN=242]="ECMA_DIV2DYN",e[e.ECMA_MOD2DYN=243]="ECMA_MOD2DYN",e[e.ECMA_EQDYN=244]="ECMA_EQDYN",e[e.ECMA_NOTEQDYN=245]="ECMA_NOTEQDYN",e[e.ECMA_LESSDYN=246]="ECMA_LESSDYN",e[e.ECMA_LESSEQDYN=247]="ECMA_LESSEQDYN",e[e.ECMA_GREATERDYN=248]="ECMA_GREATERDYN",e[e.ECMA_GREATEREQDYN=249]="ECMA_GREATEREQDYN",e[e.ECMA_SHL2DYN=250]="ECMA_SHL2DYN",e[e.ECMA_SHR2DYN=251]="ECMA_SHR2DYN",e[e.ECMA_ASHR2DYN=252]="ECMA_ASHR2DYN",e[e.ECMA_AND2DYN=253]="ECMA_AND2DYN",e[e.ECMA_OR2DYN=254]="ECMA_OR2DYN",e[e.ECMA_XOR2DYN=255]="ECMA_XOR2DYN",e[e.ECMA_TONUMBER=256]="ECMA_TONUMBER",e[e.ECMA_NEGDYN=257]="ECMA_NEGDYN",e[e.ECMA_NOTDYN=258]="ECMA_NOTDYN",e[e.ECMA_INCDYN=259]="ECMA_INCDYN",e[e.ECMA_DECDYN=260]="ECMA_DECDYN",e[e.ECMA_EXPDYN=261]="ECMA_EXPDYN",e[e.ECMA_ISINDYN=262]="ECMA_ISINDYN",e[e.ECMA_INSTANCEOFDYN=263]="ECMA_INSTANCEOFDYN",e[e.ECMA_STRICTNOTEQDYN=264]="ECMA_STRICTNOTEQDYN",e[e.ECMA_STRICTEQDYN=265]="ECMA_STRICTEQDYN",e[e.ECMA_RESUMEGENERATOR=266]="ECMA_RESUMEGENERATOR",e[e.ECMA_GETRESUMEMODE=267]="ECMA_GETRESUMEMODE",e[e.ECMA_CREATEGENERATOROBJ=268]="ECMA_CREATEGENERATOROBJ",e[e.ECMA_THROWCONSTASSIGNMENT=269]="ECMA_THROWCONSTASSIGNMENT",e[e.ECMA_GETTEMPLATEOBJECT=270]="ECMA_GETTEMPLATEOBJECT",e[e.ECMA_GETNEXTPROPNAME=271]="ECMA_GETNEXTPROPNAME",e[e.ECMA_CALLARG0DYN=272]="ECMA_CALLARG0DYN",e[e.ECMA_THROWIFNOTOBJECT=273]="ECMA_THROWIFNOTOBJECT",e[e.ECMA_ITERNEXT=274]="ECMA_ITERNEXT",e[e.ECMA_CLOSEITERATOR=275]="ECMA_CLOSEITERATOR",e[e.ECMA_COPYMODULE=276]="ECMA_COPYMODULE",e[e.ECMA_SUPERCALLSPREAD=277]="ECMA_SUPERCALLSPREAD",e[e.ECMA_DELOBJPROP=278]="ECMA_DELOBJPROP",e[e.ECMA_NEWOBJSPREADDYN=279]="ECMA_NEWOBJSPREADDYN",e[e.ECMA_CREATEITERRESULTOBJ=280]="ECMA_CREATEITERRESULTOBJ",e[e.ECMA_SUSPENDGENERATOR=281]="ECMA_SUSPENDGENERATOR",e[e.ECMA_ASYNCFUNCTIONAWAITUNCAUGHT=282]="ECMA_ASYNCFUNCTIONAWAITUNCAUGHT",e[e.ECMA_THROWUNDEFINEDIFHOLE=283]="ECMA_THROWUNDEFINEDIFHOLE",e[e.ECMA_CALLARG1DYN=284]="ECMA_CALLARG1DYN",e[e.ECMA_COPYDATAPROPERTIES=285]="ECMA_COPYDATAPROPERTIES",e[e.ECMA_STARRAYSPREAD=286]="ECMA_STARRAYSPREAD",e[e.ECMA_GETITERATORNEXT=287]="ECMA_GETITERATORNEXT",e[e.ECMA_SETOBJECTWITHPROTO=288]="ECMA_SETOBJECTWITHPROTO",e[e.ECMA_LDOBJBYVALUE=289]="ECMA_LDOBJBYVALUE",e[e.ECMA_STOBJBYVALUE=290]="ECMA_STOBJBYVALUE",e[e.ECMA_STOWNBYVALUE=291]="ECMA_STOWNBYVALUE",e[e.ECMA_LDSUPERBYVALUE=292]="ECMA_LDSUPERBYVALUE",e[e.ECMA_STSUPERBYVALUE=293]="ECMA_STSUPERBYVALUE",e[e.ECMA_LDOBJBYINDEX=294]="ECMA_LDOBJBYINDEX",e[e.ECMA_STOBJBYINDEX=295]="ECMA_STOBJBYINDEX",e[e.ECMA_STOWNBYINDEX=296]="ECMA_STOWNBYINDEX",e[e.ECMA_CALLSPREADDYN=297]="ECMA_CALLSPREADDYN",e[e.ECMA_ASYNCFUNCTIONRESOLVE=298]="ECMA_ASYNCFUNCTIONRESOLVE",e[e.ECMA_ASYNCFUNCTIONREJECT=299]="ECMA_ASYNCFUNCTIONREJECT",e[e.ECMA_CALLARGS2DYN=300]="ECMA_CALLARGS2DYN",e[e.ECMA_CALLARGS3DYN=301]="ECMA_CALLARGS3DYN",e[e.ECMA_DEFINEGETTERSETTERBYVALUE=302]="ECMA_DEFINEGETTERSETTERBYVALUE",e[e.ECMA_NEWOBJDYNRANGE=303]="ECMA_NEWOBJDYNRANGE",e[e.ECMA_CALLIRANGEDYN=304]="ECMA_CALLIRANGEDYN",e[e.ECMA_CALLITHISRANGEDYN=305]="ECMA_CALLITHISRANGEDYN",e[e.ECMA_SUPERCALL=306]="ECMA_SUPERCALL",e[e.ECMA_CREATEOBJECTWITHEXCLUDEDKEYS=307]="ECMA_CREATEOBJECTWITHEXCLUDEDKEYS",e[e.ECMA_DEFINEFUNCDYN=308]="ECMA_DEFINEFUNCDYN",e[e.ECMA_DEFINENCFUNCDYN=309]="ECMA_DEFINENCFUNCDYN",e[e.ECMA_DEFINEGENERATORFUNC=310]="ECMA_DEFINEGENERATORFUNC",e[e.ECMA_DEFINEASYNCFUNC=311]="ECMA_DEFINEASYNCFUNC",e[e.ECMA_DEFINEMETHOD=312]="ECMA_DEFINEMETHOD",e[e.ECMA_NEWLEXENVDYN=313]="ECMA_NEWLEXENVDYN",e[e.ECMA_COPYRESTARGS=314]="ECMA_COPYRESTARGS",e[e.ECMA_CREATEARRAYWITHBUFFER=315]="ECMA_CREATEARRAYWITHBUFFER",e[e.ECMA_CREATEOBJECTHAVINGMETHOD=316]="ECMA_CREATEOBJECTHAVINGMETHOD",e[e.ECMA_THROWIFSUPERNOTCORRECTCALL=317]="ECMA_THROWIFSUPERNOTCORRECTCALL",e[e.ECMA_CREATEOBJECTWITHBUFFER=318]="ECMA_CREATEOBJECTWITHBUFFER",e[e.ECMA_LDLEXVARDYN=319]="ECMA_LDLEXVARDYN",e[e.ECMA_STLEXVARDYN=320]="ECMA_STLEXVARDYN",e[e.ECMA_DEFINECLASSWITHBUFFER=321]="ECMA_DEFINECLASSWITHBUFFER",e[e.ECMA_IMPORTMODULE=322]="ECMA_IMPORTMODULE",e[e.ECMA_STMODULEVAR=323]="ECMA_STMODULEVAR",e[e.ECMA_TRYLDGLOBALBYNAME=324]="ECMA_TRYLDGLOBALBYNAME",e[e.ECMA_TRYSTGLOBALBYNAME=325]="ECMA_TRYSTGLOBALBYNAME",e[e.ECMA_LDGLOBALVAR=326]="ECMA_LDGLOBALVAR",e[e.ECMA_STGLOBALVAR=327]="ECMA_STGLOBALVAR",e[e.ECMA_LDOBJBYNAME=328]="ECMA_LDOBJBYNAME",e[e.ECMA_STOBJBYNAME=329]="ECMA_STOBJBYNAME",e[e.ECMA_STOWNBYNAME=330]="ECMA_STOWNBYNAME",e[e.ECMA_LDSUPERBYNAME=331]="ECMA_LDSUPERBYNAME",e[e.ECMA_STSUPERBYNAME=332]="ECMA_STSUPERBYNAME",e[e.ECMA_LDMODVARBYNAME=333]="ECMA_LDMODVARBYNAME",e[e.ECMA_CREATEREGEXPWITHLITERAL=334]="ECMA_CREATEREGEXPWITHLITERAL",e[e.ECMA_ISTRUE=335]="ECMA_ISTRUE",e[e.ECMA_ISFALSE=336]="ECMA_ISFALSE",e[e.ECMA_STCONSTTOGLOBALRECORD=337]="ECMA_STCONSTTOGLOBALRECORD",e[e.ECMA_STLETTOGLOBALRECORD=338]="ECMA_STLETTOGLOBALRECORD",e[e.ECMA_STCLASSTOGLOBALRECORD=339]="ECMA_STCLASSTOGLOBALRECORD",e[e.ECMA_STOWNBYVALUEWITHNAMESET=340]="ECMA_STOWNBYVALUEWITHNAMESET",e[e.ECMA_STOWNBYNAMEWITHNAMESET=341]="ECMA_STOWNBYNAMEWITHNAMESET",e[e.ECMA_LDFUNCTION=342]="ECMA_LDFUNCTION",e[e.ECMA_NEWLEXENVWITHNAMEDYN=343]="ECMA_NEWLEXENVWITHNAMEDYN",e[e.ECMA_LDBIGINT=344]="ECMA_LDBIGINT",e[e.VREG=345]="VREG",e[e.IMM=346]="IMM",e[e.LABEL=347]="LABEL",e[e.VIRTUALSTARTINS_DYN=348]="VIRTUALSTARTINS_DYN",e[e.VIRTUALENDINS_DYN=349]="VIRTUALENDINS_DYN",e[e.DEFINE_GLOBAL_VAR=350]="DEFINE_GLOBAL_VAR"}(c=t.IRNodeKind||(t.IRNodeKind={})),t.getInstructionSize=function(e){switch(e){case c.NOP:return 1;case c.MOV:return 2;case c.MOV:return 3;case c.MOV:return 5;case c.MOV_64:return 2;case c.MOV_64:return 5;case c.MOV_OBJ:return 2;case c.MOV_OBJ:return 3;case c.MOV_OBJ:return 5;case c.MOVI:return 2;case c.MOVI:return 3;case c.MOVI:return 4;case c.MOVI:return 6;case c.MOVI_64:case c.FMOVI_64:return 10;case c.MOV_NULL:case c.LDA:case c.LDA_64:case c.LDA_OBJ:case c.LDAI:return 2;case c.LDAI:return 3;case c.LDAI:return 5;case c.LDAI_64:case c.FLDAI_64:return 9;case c.LDA_STR:return 5;case c.LDA_CONST:return 6;case c.LDA_TYPE:return 3;case c.LDA_NULL:return 1;case c.STA:case c.STA_64:case c.STA_OBJ:case c.CMP_64:case c.FCMPL_64:case c.FCMPG_64:case c.JMP:return 2;case c.JMP:return 3;case c.JMP:return 5;case c.JEQ_OBJ:return 3;case c.JEQ_OBJ:return 4;case c.JNE_OBJ:return 3;case c.JNE_OBJ:return 4;case c.JEQZ_OBJ:return 2;case c.JEQZ_OBJ:return 3;case c.JNEZ_OBJ:return 2;case c.JNEZ_OBJ:return 3;case c.JEQZ:return 2;case c.JEQZ:return 3;case c.JNEZ:return 2;case c.JNEZ:return 3;case c.JLTZ:return 2;case c.JLTZ:return 3;case c.JGTZ:return 2;case c.JGTZ:return 3;case c.JLEZ:return 2;case c.JLEZ:return 3;case c.JGEZ:return 2;case c.JGEZ:case c.JEQ:return 3;case c.JEQ:return 4;case c.JNE:return 3;case c.JNE:return 4;case c.JLT:return 3;case c.JLT:return 4;case c.JGT:return 3;case c.JGT:return 4;case c.JLE:return 3;case c.JLE:return 4;case c.JGE:return 3;case c.JGE:return 4;case c.FNEG_64:case c.NEG:case c.NEG_64:return 1;case c.ADD2:case c.ADD2_64:case c.SUB2:case c.SUB2_64:case c.MUL2:case c.MUL2_64:case c.FADD2_64:case c.FSUB2_64:case c.FMUL2_64:case c.FDIV2_64:case c.FMOD2_64:case c.DIV2:case c.DIV2_64:case c.MOD2:case c.MOD2_64:case c.ADDI:case c.SUBI:case c.MULI:return 2;case c.ANDI:case c.ORI:return 5;case c.SHLI:case c.SHRI:case c.ASHRI:case c.DIVI:case c.MODI:case c.ADD:case c.SUB:case c.MUL:case c.DIV:case c.MOD:case c.INCI:case c.LDARR_8:case c.LDARRU_8:case c.LDARR_16:case c.LDARRU_16:case c.LDARR:case c.LDARR_64:case c.FLDARR_32:case c.FLDARR_64:case c.LDARR_OBJ:case c.STARR_8:case c.STARR_16:case c.STARR:case c.STARR_64:case c.FSTARR_32:case c.FSTARR_64:case c.STARR_OBJ:case c.LENARR:return 2;case c.NEWARR:case c.NEWOBJ:case c.INITOBJ_SHORT:return 4;case c.INITOBJ:return 5;case c.INITOBJ_RANGE:case c.LDOBJ:case c.LDOBJ_64:case c.LDOBJ_OBJ:case c.STOBJ:case c.STOBJ_64:case c.STOBJ_OBJ:case c.LDOBJ_V:case c.LDOBJ_V_64:case c.LDOBJ_V_OBJ:case c.STOBJ_V:case c.STOBJ_V_64:case c.STOBJ_V_OBJ:return 4;case c.LDSTATIC:case c.LDSTATIC_64:case c.LDSTATIC_OBJ:case c.STSTATIC:case c.STSTATIC_64:case c.STSTATIC_OBJ:return 3;case c.RETURN:case c.RETURN_64:case c.RETURN_OBJ:case c.RETURN_VOID:return 1;case c.THROW:return 2;case c.CHECKCAST:case c.ISINSTANCE:return 3;case c.CALL_SHORT:return 4;case c.CALL:return 5;case c.CALL_RANGE:case c.CALL_ACC_SHORT:return 4;case c.CALL_ACC:return 5;case c.CALL_VIRT_SHORT:return 4;case c.CALL_VIRT:return 5;case c.CALL_VIRT_RANGE:case c.CALL_VIRT_ACC_SHORT:return 4;case c.CALL_VIRT_ACC:return 5;case c.MOV_DYN:return 3;case c.MOV_DYN:return 5;case c.LDA_DYN:case c.STA_DYN:return 2;case c.LDAI_DYN:return 5;case c.FLDAI_DYN:return 9;case c.RETURN_DYN:return 1;case c.CALLI_DYN_SHORT:return 3;case c.CALLI_DYN:return 4;case c.CALLI_DYN_RANGE:return 5;case c.FMOVI:return 7;case c.I32TOF64:return 2;case c.UCMP:return 3;case c.NOT:case c.ECMA_LDNAN:return 2;case c.FLDAI:return 6;case c.U32TOF64:return 2;case c.UCMP_64:return 3;case c.NOT_64:case c.ECMA_LDINFINITY:return 2;case c.FCMPL:return 3;case c.I64TOF64:return 2;case c.DIVU2:case c.AND2:return 3;case c.ECMA_LDGLOBALTHIS:return 2;case c.FCMPG:return 3;case c.U64TOF64:return 2;case c.DIVU2_64:case c.AND2_64:return 3;case c.ECMA_LDUNDEFINED:case c.FNEG:case c.F64TOI32:return 2;case c.MODU2:case c.OR2:return 3;case c.ECMA_LDNULL:return 2;case c.FADD2:return 3;case c.F64TOI64:return 2;case c.MODU2_64:case c.OR2_64:return 3;case c.ECMA_LDSYMBOL:return 2;case c.FSUB2:return 3;case c.F64TOU32:return 2;case c.XOR2:return 3;case c.ECMA_LDGLOBAL:return 2;case c.FMUL2:return 3;case c.F64TOU64:return 2;case c.XOR2_64:return 3;case c.ECMA_LDTRUE:return 2;case c.FDIV2:return 3;case c.I32TOU1:return 2;case c.SHL2:return 3;case c.ECMA_LDFALSE:return 2;case c.FMOD2:return 3;case c.I64TOU1:return 2;case c.SHL2_64:return 3;case c.ECMA_THROWDYN:case c.I32TOF32:case c.U32TOU1:return 2;case c.SHR2:return 3;case c.ECMA_TYPEOFDYN:case c.U32TOF32:case c.U64TOU1:return 2;case c.SHR2_64:return 3;case c.ECMA_LDLEXENVDYN:case c.I64TOF32:case c.I32TOI64:return 2;case c.ASHR2:return 3;case c.ECMA_POPLEXENVDYN:case c.U64TOF32:case c.I32TOI16:return 2;case c.ASHR2_64:return 3;case c.ECMA_GETUNMAPPEDARGS:case c.F32TOF64:case c.I32TOU16:return 2;case c.XORI:return 6;case c.ECMA_GETPROPITERATOR:case c.F32TOI32:case c.I32TOI8:return 2;case c.AND:return 3;case c.ECMA_ASYNCFUNCTIONENTER:case c.F32TOI64:case c.I32TOU8:return 2;case c.OR:return 3;case c.ECMA_LDHOLE:case c.F32TOU32:case c.I64TOI32:return 2;case c.XOR:return 3;case c.ECMA_RETURNUNDEFINED:case c.F32TOU64:case c.U32TOI64:return 2;case c.SHL:return 3;case c.ECMA_CREATEEMPTYOBJECT:case c.F64TOF32:case c.U32TOI16:return 2;case c.SHR:return 3;case c.ECMA_CREATEEMPTYARRAY:case c.U32TOU16:return 2;case c.ASHR:return 3;case c.ECMA_GETITERATOR:case c.U32TOI8:case c.ECMA_THROWTHROWNOTEXISTS:case c.U32TOU8:case c.ECMA_THROWPATTERNNONCOERCIBLE:case c.U64TOI32:case c.ECMA_LDHOMEOBJECT:case c.U64TOU32:case c.ECMA_THROWDELETESUPERPROPERTY:case c.ECMA_DEBUGGER:return 2;case c.ECMA_ADD2DYN:case c.ECMA_SUB2DYN:case c.ECMA_MUL2DYN:case c.ECMA_DIV2DYN:case c.ECMA_MOD2DYN:case c.ECMA_EQDYN:case c.ECMA_NOTEQDYN:case c.ECMA_LESSDYN:case c.ECMA_LESSEQDYN:case c.ECMA_GREATERDYN:case c.ECMA_GREATEREQDYN:case c.ECMA_SHL2DYN:case c.ECMA_SHR2DYN:case c.ECMA_ASHR2DYN:case c.ECMA_AND2DYN:case c.ECMA_OR2DYN:case c.ECMA_XOR2DYN:case c.ECMA_TONUMBER:case c.ECMA_NEGDYN:case c.ECMA_NOTDYN:case c.ECMA_INCDYN:case c.ECMA_DECDYN:case c.ECMA_EXPDYN:case c.ECMA_ISINDYN:case c.ECMA_INSTANCEOFDYN:case c.ECMA_STRICTNOTEQDYN:case c.ECMA_STRICTEQDYN:case c.ECMA_RESUMEGENERATOR:case c.ECMA_GETRESUMEMODE:case c.ECMA_CREATEGENERATOROBJ:case c.ECMA_THROWCONSTASSIGNMENT:case c.ECMA_GETTEMPLATEOBJECT:case c.ECMA_GETNEXTPROPNAME:case c.ECMA_CALLARG0DYN:case c.ECMA_THROWIFNOTOBJECT:case c.ECMA_ITERNEXT:case c.ECMA_CLOSEITERATOR:case c.ECMA_COPYMODULE:case c.ECMA_SUPERCALLSPREAD:return 3;case c.ECMA_DELOBJPROP:case c.ECMA_NEWOBJSPREADDYN:case c.ECMA_CREATEITERRESULTOBJ:case c.ECMA_SUSPENDGENERATOR:case c.ECMA_ASYNCFUNCTIONAWAITUNCAUGHT:case c.ECMA_THROWUNDEFINEDIFHOLE:case c.ECMA_CALLARG1DYN:case c.ECMA_COPYDATAPROPERTIES:case c.ECMA_STARRAYSPREAD:case c.ECMA_GETITERATORNEXT:case c.ECMA_SETOBJECTWITHPROTO:case c.ECMA_LDOBJBYVALUE:case c.ECMA_STOBJBYVALUE:case c.ECMA_STOWNBYVALUE:case c.ECMA_LDSUPERBYVALUE:case c.ECMA_STSUPERBYVALUE:return 4;case c.ECMA_LDOBJBYINDEX:case c.ECMA_STOBJBYINDEX:case c.ECMA_STOWNBYINDEX:return 7;case c.ECMA_CALLSPREADDYN:case c.ECMA_ASYNCFUNCTIONRESOLVE:case c.ECMA_ASYNCFUNCTIONREJECT:case c.ECMA_CALLARGS2DYN:return 5;case c.ECMA_CALLARGS3DYN:case c.ECMA_DEFINEGETTERSETTERBYVALUE:return 6;case c.ECMA_NEWOBJDYNRANGE:case c.ECMA_CALLIRANGEDYN:case c.ECMA_CALLITHISRANGEDYN:case c.ECMA_SUPERCALL:return 5;case c.ECMA_CREATEOBJECTWITHEXCLUDEDKEYS:return 6;case c.ECMA_DEFINEFUNCDYN:case c.ECMA_DEFINENCFUNCDYN:case c.ECMA_DEFINEGENERATORFUNC:case c.ECMA_DEFINEASYNCFUNC:case c.ECMA_DEFINEMETHOD:return 7;case c.ECMA_NEWLEXENVDYN:case c.ECMA_COPYRESTARGS:case c.ECMA_CREATEARRAYWITHBUFFER:case c.ECMA_CREATEOBJECTHAVINGMETHOD:case c.ECMA_THROWIFSUPERNOTCORRECTCALL:case c.ECMA_CREATEOBJECTWITHBUFFER:return 4;case c.ECMA_LDLEXVARDYN:return 3;case c.ECMA_LDLEXVARDYN:return 4;case c.ECMA_LDLEXVARDYN:return 6;case c.ECMA_STLEXVARDYN:return 4;case c.ECMA_STLEXVARDYN:return 5;case c.ECMA_STLEXVARDYN:return 7;case c.ECMA_DEFINECLASSWITHBUFFER:return 10;case c.ECMA_IMPORTMODULE:case c.ECMA_STMODULEVAR:case c.ECMA_TRYLDGLOBALBYNAME:case c.ECMA_TRYSTGLOBALBYNAME:case c.ECMA_LDGLOBALVAR:case c.ECMA_STGLOBALVAR:return 6;case c.ECMA_LDOBJBYNAME:case c.ECMA_STOBJBYNAME:case c.ECMA_STOWNBYNAME:case c.ECMA_LDSUPERBYNAME:case c.ECMA_STSUPERBYNAME:case c.ECMA_LDMODVARBYNAME:case c.ECMA_CREATEREGEXPWITHLITERAL:return 7;case c.ECMA_ISTRUE:case c.ECMA_ISFALSE:return 2;case c.ECMA_STCONSTTOGLOBALRECORD:case c.ECMA_STLETTOGLOBALRECORD:case c.ECMA_STCLASSTOGLOBALRECORD:return 6;case c.ECMA_STOWNBYVALUEWITHNAMESET:return 4;case c.ECMA_STOWNBYNAMEWITHNAMESET:return 7;case c.ECMA_LDFUNCTION:return 2;case c.ECMA_NEWLEXENVWITHNAMEDYN:case c.ECMA_LDBIGINT:return 6;default:return 0}},(d=t.ResultType||(t.ResultType={}))[d.None=0]="None",d[d.Unknown=1]="Unknown",d[d.Int=2]="Int",d[d.Long=3]="Long",d[d.Float=4]="Float",d[d.Obj=5]="Obj",d[d.Boolean=6]="Boolean",(_=t.ResultDst||(t.ResultDst={}))[_.None=0]="None",_[_.Acc=1]="Acc",_[_.VReg=2]="VReg",(u=t.BuiltIns||(t.BuiltIns={}))[u.NaN=0]="NaN",u[u[1/0]=1]="Infinity",u[u.globalThis=2]="globalThis",u[u[void 0]=3]="undefined",u[u.Boolean=4]="Boolean",u[u.Number=5]="Number",u[u.String=6]="String",u[u.BigInt=7]="BigInt",u[u.Symbol=8]="Symbol",u[u.Null=9]="Null",u[u.Object=10]="Object",u[u.Function=11]="Function",u[u.Global=12]="Global",u[u.True=13]="True",u[u.False=14]="False",u[u.LexEnv=15]="LexEnv",u[u.MAX_BUILTIN=16]="MAX_BUILTIN",(l=t.OperandKind||(t.OperandKind={}))[l.SrcVReg=0]="SrcVReg",l[l.DstVReg=1]="DstVReg",l[l.SrcDstVReg=2]="SrcDstVReg",l[l.Imm=3]="Imm",l[l.Id=4]="Id",l[l.StringId=5]="StringId",l[l.Label=6]="Label",t.OperandKind||(t.OperandKind={}),t.getInsnMnemonic=p,t.getInsnFormats=f;class g{constructor(e,t){this.kind=e,this.operands=t,this.node=s.NodeKind.Normal,this.debugPosInfo=new s.DebugPosInfo}toString(){let e=this.getMnemonic(),t=e+"\t";return e.length<8&&(t+="\t"),this.operands.forEach((e=>{t=t+e.toString()+", "})),t}setNode(e){this.node=e}getNodeName(){return this.node!=s.NodeKind.Invalid&&this.node!=s.NodeKind.FirstNodeOfFunction&&this.node!=s.NodeKind.Normal?o.SyntaxKind[this.node.kind]:"undefined"}getMnemonic(){return p(this.kind)}getFormats(){return f(this.kind)}}t.IRNode=g;class m extends g{constructor(e,t){super(e,t),this.kind=e,this.operands=t}toString(){return super.toString()+" [i]"}}t.Intrinsic=m,t.VReg=class{constructor(){this.num=-1}toString(){return"V"+this.num}getTypeIndex(){return this.typeIndex}setTypeIndex(e){this.typeIndex=e}getVariableName(){return this.variableName}setVariableName(e){this.variableName=e}},t.Imm=class extends g{constructor(e){super(c.IMM,[]),this.value=e}toString(){return"#"+this.value}};class y extends g{constructor(){super(c.LABEL,[]),this.id=y.global_id++}toString(){return"LABEL_"+this.id}}t.Label=y,y.global_id=0,t.DebugInsStartPlaceHolder=class extends g{constructor(e){super(c.VIRTUALSTARTINS_DYN,[]),this.scope=e}getScope(){return this.scope}},t.DebugInsEndPlaceHolder=class extends g{constructor(e){super(c.VIRTUALENDINS_DYN,[]),this.scope=e}getScope(){return this.scope}},t.Nop=class extends g{constructor(){super(c.NOP,[])}},t.Mov=class extends g{constructor(e,t){super(c.MOV,[e,t])}},t.MovWide=class extends g{constructor(e,t){super(c.MOV_64,[e,t])}},t.MovObj=class extends g{constructor(e,t){super(c.MOV_OBJ,[e,t])}},t.Movi=class extends g{constructor(e,t){super(c.MOVI,[e,t])}},t.MoviWide=class extends g{constructor(e,t){super(c.MOVI_64,[e,t])}},t.FmoviWide=class extends g{constructor(e,t){super(c.FMOVI_64,[e,t])}},t.MovNull=class extends g{constructor(e){super(c.MOV_NULL,[e])}},t.Lda=class extends g{constructor(e){super(c.LDA,[e])}},t.LdaWide=class extends g{constructor(e){super(c.LDA_64,[e])}},t.LdaObj=class extends g{constructor(e){super(c.LDA_OBJ,[e])}},t.Ldai=class extends g{constructor(e){super(c.LDAI,[e])}},t.LdaiWide=class extends g{constructor(e){super(c.LDAI_64,[e])}},t.FldaiWide=class extends g{constructor(e){super(c.FLDAI_64,[e])}},t.LdaStr=class extends g{constructor(e){super(c.LDA_STR,[e])}},t.LdaConst=class extends g{constructor(e,t){super(c.LDA_CONST,[e,t])}},t.LdaType=class extends g{constructor(e){super(c.LDA_TYPE,[e])}},t.LdaNull=class extends g{constructor(){super(c.LDA_NULL,[])}},t.Sta=class extends g{constructor(e){super(c.STA,[e])}},t.StaWide=class extends g{constructor(e){super(c.STA_64,[e])}},t.StaObj=class extends g{constructor(e){super(c.STA_OBJ,[e])}},t.CmpWide=class extends g{constructor(e){super(c.CMP_64,[e])}},t.FcmplWide=class extends g{constructor(e){super(c.FCMPL_64,[e])}},t.FcmpgWide=class extends g{constructor(e){super(c.FCMPG_64,[e])}},t.Jmp=class extends g{constructor(e){super(c.JMP,[e])}getTarget(){return this.operands[0]}},t.JeqObj=class extends g{constructor(e,t){super(c.JEQ_OBJ,[e,t])}getTarget(){return this.operands[1]}},t.JneObj=class extends g{constructor(e,t){super(c.JNE_OBJ,[e,t])}getTarget(){return this.operands[1]}},t.JeqzObj=class extends g{constructor(e){super(c.JEQZ_OBJ,[e])}getTarget(){return this.operands[0]}},t.JnezObj=class extends g{constructor(e){super(c.JNEZ_OBJ,[e])}getTarget(){return this.operands[0]}},t.Jeqz=class extends g{constructor(e){super(c.JEQZ,[e])}getTarget(){return this.operands[0]}},t.Jnez=class extends g{constructor(e){super(c.JNEZ,[e])}getTarget(){return this.operands[0]}},t.Jltz=class extends g{constructor(e){super(c.JLTZ,[e])}getTarget(){return this.operands[0]}},t.Jgtz=class extends g{constructor(e){super(c.JGTZ,[e])}getTarget(){return this.operands[0]}},t.Jlez=class extends g{constructor(e){super(c.JLEZ,[e])}getTarget(){return this.operands[0]}},t.Jgez=class extends g{constructor(e){super(c.JGEZ,[e])}getTarget(){return this.operands[0]}},t.Jeq=class extends g{constructor(e,t){super(c.JEQ,[e,t])}getTarget(){return this.operands[1]}},t.Jne=class extends g{constructor(e,t){super(c.JNE,[e,t])}getTarget(){return this.operands[1]}},t.Jlt=class extends g{constructor(e,t){super(c.JLT,[e,t])}getTarget(){return this.operands[1]}},t.Jgt=class extends g{constructor(e,t){super(c.JGT,[e,t])}getTarget(){return this.operands[1]}},t.Jle=class extends g{constructor(e,t){super(c.JLE,[e,t])}getTarget(){return this.operands[1]}},t.Jge=class extends g{constructor(e,t){super(c.JGE,[e,t])}getTarget(){return this.operands[1]}},t.FnegWide=class extends g{constructor(){super(c.FNEG_64,[])}},t.Neg=class extends g{constructor(){super(c.NEG,[])}},t.NegWide=class extends g{constructor(){super(c.NEG_64,[])}},t.Add2=class extends g{constructor(e){super(c.ADD2,[e])}},t.Add2Wide=class extends g{constructor(e){super(c.ADD2_64,[e])}},t.Sub2=class extends g{constructor(e){super(c.SUB2,[e])}},t.Sub2Wide=class extends g{constructor(e){super(c.SUB2_64,[e])}},t.Mul2=class extends g{constructor(e){super(c.MUL2,[e])}},t.Mul2Wide=class extends g{constructor(e){super(c.MUL2_64,[e])}},t.Fadd2Wide=class extends g{constructor(e){super(c.FADD2_64,[e])}},t.Fsub2Wide=class extends g{constructor(e){super(c.FSUB2_64,[e])}},t.Fmul2Wide=class extends g{constructor(e){super(c.FMUL2_64,[e])}},t.Fdiv2Wide=class extends g{constructor(e){super(c.FDIV2_64,[e])}},t.Fmod2Wide=class extends g{constructor(e){super(c.FMOD2_64,[e])}},t.Div2=class extends g{constructor(e){super(c.DIV2,[e])}},t.Div2Wide=class extends g{constructor(e){super(c.DIV2_64,[e])}},t.Mod2=class extends g{constructor(e){super(c.MOD2,[e])}},t.Mod2Wide=class extends g{constructor(e){super(c.MOD2_64,[e])}},t.Addi=class extends g{constructor(e){super(c.ADDI,[e])}},t.Subi=class extends g{constructor(e){super(c.SUBI,[e])}},t.Muli=class extends g{constructor(e){super(c.MULI,[e])}},t.Andi=class extends g{constructor(e){super(c.ANDI,[e])}},t.Ori=class extends g{constructor(e){super(c.ORI,[e])}},t.Shli=class extends g{constructor(e){super(c.SHLI,[e])}},t.Shri=class extends g{constructor(e){super(c.SHRI,[e])}},t.Ashri=class extends g{constructor(e){super(c.ASHRI,[e])}},t.Divi=class extends g{constructor(e){super(c.DIVI,[e])}},t.Modi=class extends g{constructor(e){super(c.MODI,[e])}},t.Add=class extends g{constructor(e,t){super(c.ADD,[e,t])}},t.Sub=class extends g{constructor(e,t){super(c.SUB,[e,t])}},t.Mul=class extends g{constructor(e,t){super(c.MUL,[e,t])}},t.Div=class extends g{constructor(e,t){super(c.DIV,[e,t])}},t.Mod=class extends g{constructor(e,t){super(c.MOD,[e,t])}},t.Inci=class extends g{constructor(e,t){super(c.INCI,[e,t])}},t.Ldarr8=class extends g{constructor(e){super(c.LDARR_8,[e])}},t.Ldarru8=class extends g{constructor(e){super(c.LDARRU_8,[e])}},t.Ldarr16=class extends g{constructor(e){super(c.LDARR_16,[e])}},t.Ldarru16=class extends g{constructor(e){super(c.LDARRU_16,[e])}},t.Ldarr=class extends g{constructor(e){super(c.LDARR,[e])}},t.LdarrWide=class extends g{constructor(e){super(c.LDARR_64,[e])}},t.Fldarr32=class extends g{constructor(e){super(c.FLDARR_32,[e])}},t.FldarrWide=class extends g{constructor(e){super(c.FLDARR_64,[e])}},t.LdarrObj=class extends g{constructor(e){super(c.LDARR_OBJ,[e])}},t.Starr8=class extends g{constructor(e,t){super(c.STARR_8,[e,t])}},t.Starr16=class extends g{constructor(e,t){super(c.STARR_16,[e,t])}},t.Starr=class extends g{constructor(e,t){super(c.STARR,[e,t])}},t.StarrWide=class extends g{constructor(e,t){super(c.STARR_64,[e,t])}},t.Fstarr32=class extends g{constructor(e,t){super(c.FSTARR_32,[e,t])}},t.FstarrWide=class extends g{constructor(e,t){super(c.FSTARR_64,[e,t])}},t.StarrObj=class extends g{constructor(e,t){super(c.STARR_OBJ,[e,t])}},t.Lenarr=class extends g{constructor(e){super(c.LENARR,[e])}},t.Newarr=class extends g{constructor(e,t,r){super(c.NEWARR,[e,t,r])}},t.Newobj=class extends g{constructor(e,t){super(c.NEWOBJ,[e,t])}},t.InitobjShort=class extends g{constructor(e,t,r){super(c.INITOBJ_SHORT,[e,t,r])}},t.Initobj=class extends g{constructor(e,t,r,n,i){super(c.INITOBJ,[e,t,r,n,i])}},t.InitobjRange=class extends g{constructor(e,t){super(c.INITOBJ_RANGE,[e,t])}},t.Ldobj=class extends g{constructor(e,t){super(c.LDOBJ,[e,t])}},t.LdobjWide=class extends g{constructor(e,t){super(c.LDOBJ_64,[e,t])}},t.LdobjObj=class extends g{constructor(e,t){super(c.LDOBJ_OBJ,[e,t])}},t.Stobj=class extends g{constructor(e,t){super(c.STOBJ,[e,t])}},t.StobjWide=class extends g{constructor(e,t){super(c.STOBJ_64,[e,t])}},t.StobjObj=class extends g{constructor(e,t){super(c.STOBJ_OBJ,[e,t])}},t.LdobjV=class extends g{constructor(e,t,r){super(c.LDOBJ_V,[e,t,r])}},t.LdobjVWide=class extends g{constructor(e,t,r){super(c.LDOBJ_V_64,[e,t,r])}},t.LdobjVObj=class extends g{constructor(e,t,r){super(c.LDOBJ_V_OBJ,[e,t,r])}},t.StobjV=class extends g{constructor(e,t,r){super(c.STOBJ_V,[e,t,r])}},t.StobjVWide=class extends g{constructor(e,t,r){super(c.STOBJ_V_64,[e,t,r])}},t.StobjVObj=class extends g{constructor(e,t,r){super(c.STOBJ_V_OBJ,[e,t,r])}},t.Ldstatic=class extends g{constructor(e){super(c.LDSTATIC,[e])}},t.LdstaticWide=class extends g{constructor(e){super(c.LDSTATIC_64,[e])}},t.LdstaticObj=class extends g{constructor(e){super(c.LDSTATIC_OBJ,[e])}},t.Ststatic=class extends g{constructor(e){super(c.STSTATIC,[e])}},t.StstaticWide=class extends g{constructor(e){super(c.STSTATIC_64,[e])}},t.StstaticObj=class extends g{constructor(e){super(c.STSTATIC_OBJ,[e])}},t.Return=class extends g{constructor(){super(c.RETURN,[])}},t.ReturnWide=class extends g{constructor(){super(c.RETURN_64,[])}},t.ReturnObj=class extends g{constructor(){super(c.RETURN_OBJ,[])}},t.ReturnVoid=class extends g{constructor(){super(c.RETURN_VOID,[])}},t.Throw=class extends g{constructor(e){super(c.THROW,[e])}},t.Checkcast=class extends g{constructor(e){super(c.CHECKCAST,[e])}},t.Isinstance=class extends g{constructor(e){super(c.ISINSTANCE,[e])}},t.CallShort=class extends g{constructor(e,t,r){var n=[e,t,r],i=[e];for(n.shift();n&&n.length;){let e=n.shift();null!=e&&i.push(e)}super(c.CALL_SHORT,i)}},t.Call=class extends g{constructor(e,t,r,n,i){var a=[e,t,r,n,i],o=[e];for(a.shift();a&&a.length;){let e=a.shift();null!=e&&o.push(e)}super(c.CALL,o)}},t.CallRange=class extends g{constructor(e,t){var r=[e,...t],n=[e];for(r.shift();r&&r.length;){let e=r.shift();null!=e&&n.push(e)}super(c.CALL_RANGE,n)}},t.CallAccShort=class extends g{constructor(e,t,r){var n=[e,t,r],i=[e];for(n.shift();n&&n.length;){let e=n.shift();null!=e&&i.push(e)}super(c.CALL_ACC_SHORT,i)}},t.CallAcc=class extends g{constructor(e,t,r,n,i){var a=[e,t,r,n,i],o=[e];for(a.shift();a&&a.length;){let e=a.shift();null!=e&&o.push(e)}super(c.CALL_ACC,o)}},t.CallVirtShort=class extends g{constructor(e,t,r){var n=[e,t,r],i=[e];for(n.shift();n&&n.length;){let e=n.shift();null!=e&&i.push(e)}super(c.CALL_VIRT_SHORT,i)}},t.CallVirt=class extends g{constructor(e,t,r,n,i){var a=[e,t,r,n,i],o=[e];for(a.shift();a&&a.length;){let e=a.shift();null!=e&&o.push(e)}super(c.CALL_VIRT,o)}},t.CallVirtRange=class extends g{constructor(e,t){var r=[e,t],n=[e];for(r.shift();r&&r.length;){let e=r.shift();null!=e&&n.push(e)}super(c.CALL_VIRT_RANGE,n)}},t.CallVirtAccShort=class extends g{constructor(e,t,r){var n=[e,t,r],i=[e];for(n.shift();n&&n.length;){let e=n.shift();null!=e&&i.push(e)}super(c.CALL_VIRT_ACC_SHORT,i)}},t.CallVirtAcc=class extends g{constructor(e,t,r,n,i){var a=[e,t,r,n,i],o=[e];for(a.shift();a&&a.length;){let e=a.shift();null!=e&&o.push(e)}super(c.CALL_VIRT_ACC,o)}},t.MovDyn=class extends g{constructor(e,t){super(c.MOV_DYN,[e,t])}},t.LdaDyn=class extends g{constructor(e){super(c.LDA_DYN,[e])}},t.StaDyn=class extends g{constructor(e){super(c.STA_DYN,[e])}},t.LdaiDyn=class extends g{constructor(e){super(c.LDAI_DYN,[e])}},t.FldaiDyn=class extends g{constructor(e){super(c.FLDAI_DYN,[e])}},t.ReturnDyn=class extends g{constructor(){super(c.RETURN_DYN,[])}},t.CalliDynShort=class extends g{constructor(e,t,r,n){var i=[e,t,r,n],a=[e];for(i.shift();i&&i.length;){let e=i.shift();null!=e&&a.push(e)}super(c.CALLI_DYN_SHORT,a)}},t.CalliDyn=class extends g{constructor(e,t,r,n,i,a){var o=[e,t,r,n,i,a],s=[e];for(o.shift();o&&o.length;){let e=o.shift();null!=e&&s.push(e)}super(c.CALLI_DYN,s)}},t.CalliDynRange=class extends g{constructor(e,t){var r=[e,...t],n=[e];for(r.shift();r&&r.length;){let e=r.shift();null!=e&&n.push(e)}super(c.CALLI_DYN_RANGE,n)}},t.Fmovi=class extends g{constructor(e,t){super(c.FMOVI,[e,t])}},t.I32tof64=class extends g{constructor(){super(c.I32TOF64,[])}},t.Ucmp=class extends g{constructor(e){super(c.UCMP,[e])}},t.Not=class extends g{constructor(){super(c.NOT,[])}},t.EcmaLdnan=class extends m{constructor(){super(c.ECMA_LDNAN,[])}},t.Fldai=class extends g{constructor(e){super(c.FLDAI,[e])}},t.U32tof64=class extends g{constructor(){super(c.U32TOF64,[])}},t.UcmpWide=class extends g{constructor(e){super(c.UCMP_64,[e])}},t.NotWide=class extends g{constructor(){super(c.NOT_64,[])}},t.EcmaLdinfinity=class extends m{constructor(){super(c.ECMA_LDINFINITY,[])}},t.Fcmpl=class extends g{constructor(e){super(c.FCMPL,[e])}},t.I64tof64=class extends g{constructor(){super(c.I64TOF64,[])}},t.Divu2=class extends g{constructor(e){super(c.DIVU2,[e])}},t.And2=class extends g{constructor(e){super(c.AND2,[e])}},t.EcmaLdglobalthis=class extends m{constructor(){super(c.ECMA_LDGLOBALTHIS,[])}},t.Fcmpg=class extends g{constructor(e){super(c.FCMPG,[e])}},t.U64tof64=class extends g{constructor(){super(c.U64TOF64,[])}},t.Divu2Wide=class extends g{constructor(e){super(c.DIVU2_64,[e])}},t.And2Wide=class extends g{constructor(e){super(c.AND2_64,[e])}},t.EcmaLdundefined=class extends m{constructor(){super(c.ECMA_LDUNDEFINED,[])}},t.Fneg=class extends g{constructor(){super(c.FNEG,[])}},t.F64toi32=class extends g{constructor(){super(c.F64TOI32,[])}},t.Modu2=class extends g{constructor(e){super(c.MODU2,[e])}},t.Or2=class extends g{constructor(e){super(c.OR2,[e])}},t.EcmaLdnull=class extends m{constructor(){super(c.ECMA_LDNULL,[])}},t.Fadd2=class extends g{constructor(e){super(c.FADD2,[e])}},t.F64toi64=class extends g{constructor(){super(c.F64TOI64,[])}},t.Modu2Wide=class extends g{constructor(e){super(c.MODU2_64,[e])}},t.Or2Wide=class extends g{constructor(e){super(c.OR2_64,[e])}},t.EcmaLdsymbol=class extends m{constructor(){super(c.ECMA_LDSYMBOL,[])}},t.Fsub2=class extends g{constructor(e){super(c.FSUB2,[e])}},t.F64tou32=class extends g{constructor(){super(c.F64TOU32,[])}},t.Xor2=class extends g{constructor(e){super(c.XOR2,[e])}},t.EcmaLdglobal=class extends m{constructor(){super(c.ECMA_LDGLOBAL,[])}},t.Fmul2=class extends g{constructor(e){super(c.FMUL2,[e])}},t.F64tou64=class extends g{constructor(){super(c.F64TOU64,[])}},t.Xor2Wide=class extends g{constructor(e){super(c.XOR2_64,[e])}},t.EcmaLdtrue=class extends m{constructor(){super(c.ECMA_LDTRUE,[])}},t.Fdiv2=class extends g{constructor(e){super(c.FDIV2,[e])}},t.I32tou1=class extends g{constructor(){super(c.I32TOU1,[])}},t.Shl2=class extends g{constructor(e){super(c.SHL2,[e])}},t.EcmaLdfalse=class extends m{constructor(){super(c.ECMA_LDFALSE,[])}},t.Fmod2=class extends g{constructor(e){super(c.FMOD2,[e])}},t.I64tou1=class extends g{constructor(){super(c.I64TOU1,[])}},t.Shl2Wide=class extends g{constructor(e){super(c.SHL2_64,[e])}},t.EcmaThrowdyn=class extends m{constructor(){super(c.ECMA_THROWDYN,[])}},t.I32tof32=class extends g{constructor(){super(c.I32TOF32,[])}},t.U32tou1=class extends g{constructor(){super(c.U32TOU1,[])}},t.Shr2=class extends g{constructor(e){super(c.SHR2,[e])}},t.EcmaTypeofdyn=class extends m{constructor(){super(c.ECMA_TYPEOFDYN,[])}},t.U32tof32=class extends g{constructor(){super(c.U32TOF32,[])}},t.U64tou1=class extends g{constructor(){super(c.U64TOU1,[])}},t.Shr2Wide=class extends g{constructor(e){super(c.SHR2_64,[e])}},t.EcmaLdlexenvdyn=class extends m{constructor(){super(c.ECMA_LDLEXENVDYN,[])}},t.I64tof32=class extends g{constructor(){super(c.I64TOF32,[])}},t.I32toi64=class extends g{constructor(){super(c.I32TOI64,[])}},t.Ashr2=class extends g{constructor(e){super(c.ASHR2,[e])}},t.EcmaPoplexenvdyn=class extends m{constructor(){super(c.ECMA_POPLEXENVDYN,[])}},t.U64tof32=class extends g{constructor(){super(c.U64TOF32,[])}},t.I32toi16=class extends g{constructor(){super(c.I32TOI16,[])}},t.Ashr2Wide=class extends g{constructor(e){super(c.ASHR2_64,[e])}},t.EcmaGetunmappedargs=class extends m{constructor(){super(c.ECMA_GETUNMAPPEDARGS,[])}},t.F32tof64=class extends g{constructor(){super(c.F32TOF64,[])}},t.I32tou16=class extends g{constructor(){super(c.I32TOU16,[])}},t.Xori=class extends g{constructor(e){super(c.XORI,[e])}},t.EcmaGetpropiterator=class extends m{constructor(){super(c.ECMA_GETPROPITERATOR,[])}},t.F32toi32=class extends g{constructor(){super(c.F32TOI32,[])}},t.I32toi8=class extends g{constructor(){super(c.I32TOI8,[])}},t.And=class extends g{constructor(e,t){super(c.AND,[e,t])}},t.EcmaAsyncfunctionenter=class extends m{constructor(){super(c.ECMA_ASYNCFUNCTIONENTER,[])}},t.F32toi64=class extends g{constructor(){super(c.F32TOI64,[])}},t.I32tou8=class extends g{constructor(){super(c.I32TOU8,[])}},t.Or=class extends g{constructor(e,t){super(c.OR,[e,t])}},t.EcmaLdhole=class extends m{constructor(){super(c.ECMA_LDHOLE,[])}},t.F32tou32=class extends g{constructor(){super(c.F32TOU32,[])}},t.I64toi32=class extends g{constructor(){super(c.I64TOI32,[])}},t.Xor=class extends g{constructor(e,t){super(c.XOR,[e,t])}},t.EcmaReturnundefined=class extends m{constructor(){super(c.ECMA_RETURNUNDEFINED,[])}},t.F32tou64=class extends g{constructor(){super(c.F32TOU64,[])}},t.U32toi64=class extends g{constructor(){super(c.U32TOI64,[])}},t.Shl=class extends g{constructor(e,t){super(c.SHL,[e,t])}},t.EcmaCreateemptyobject=class extends m{constructor(){super(c.ECMA_CREATEEMPTYOBJECT,[])}},t.F64tof32=class extends g{constructor(){super(c.F64TOF32,[])}},t.U32toi16=class extends g{constructor(){super(c.U32TOI16,[])}},t.Shr=class extends g{constructor(e,t){super(c.SHR,[e,t])}},t.EcmaCreateemptyarray=class extends m{constructor(){super(c.ECMA_CREATEEMPTYARRAY,[])}},t.U32tou16=class extends g{constructor(){super(c.U32TOU16,[])}},t.Ashr=class extends g{constructor(e,t){super(c.ASHR,[e,t])}},t.EcmaGetiterator=class extends m{constructor(){super(c.ECMA_GETITERATOR,[])}},t.U32toi8=class extends g{constructor(){super(c.U32TOI8,[])}},t.EcmaThrowthrownotexists=class extends m{constructor(){super(c.ECMA_THROWTHROWNOTEXISTS,[])}},t.U32tou8=class extends g{constructor(){super(c.U32TOU8,[])}},t.EcmaThrowpatternnoncoercible=class extends m{constructor(){super(c.ECMA_THROWPATTERNNONCOERCIBLE,[])}},t.U64toi32=class extends g{constructor(){super(c.U64TOI32,[])}},t.EcmaLdhomeobject=class extends m{constructor(){super(c.ECMA_LDHOMEOBJECT,[])}},t.U64tou32=class extends g{constructor(){super(c.U64TOU32,[])}},t.EcmaThrowdeletesuperproperty=class extends m{constructor(){super(c.ECMA_THROWDELETESUPERPROPERTY,[])}},t.EcmaDebugger=class extends m{constructor(){super(c.ECMA_DEBUGGER,[])}},t.EcmaAdd2dyn=class extends m{constructor(e){super(c.ECMA_ADD2DYN,[e])}},t.EcmaSub2dyn=class extends m{constructor(e){super(c.ECMA_SUB2DYN,[e])}},t.EcmaMul2dyn=class extends m{constructor(e){super(c.ECMA_MUL2DYN,[e])}},t.EcmaDiv2dyn=class extends m{constructor(e){super(c.ECMA_DIV2DYN,[e])}},t.EcmaMod2dyn=class extends m{constructor(e){super(c.ECMA_MOD2DYN,[e])}},t.EcmaEqdyn=class extends m{constructor(e){super(c.ECMA_EQDYN,[e])}},t.EcmaNoteqdyn=class extends m{constructor(e){super(c.ECMA_NOTEQDYN,[e])}},t.EcmaLessdyn=class extends m{constructor(e){super(c.ECMA_LESSDYN,[e])}},t.EcmaLesseqdyn=class extends m{constructor(e){super(c.ECMA_LESSEQDYN,[e])}},t.EcmaGreaterdyn=class extends m{constructor(e){super(c.ECMA_GREATERDYN,[e])}},t.EcmaGreatereqdyn=class extends m{constructor(e){super(c.ECMA_GREATEREQDYN,[e])}},t.EcmaShl2dyn=class extends m{constructor(e){super(c.ECMA_SHL2DYN,[e])}},t.EcmaShr2dyn=class extends m{constructor(e){super(c.ECMA_SHR2DYN,[e])}},t.EcmaAshr2dyn=class extends m{constructor(e){super(c.ECMA_ASHR2DYN,[e])}},t.EcmaAnd2dyn=class extends m{constructor(e){super(c.ECMA_AND2DYN,[e])}},t.EcmaOr2dyn=class extends m{constructor(e){super(c.ECMA_OR2DYN,[e])}},t.EcmaXor2dyn=class extends m{constructor(e){super(c.ECMA_XOR2DYN,[e])}},t.EcmaTonumber=class extends m{constructor(e){super(c.ECMA_TONUMBER,[e])}},t.EcmaNegdyn=class extends m{constructor(e){super(c.ECMA_NEGDYN,[e])}},t.EcmaNotdyn=class extends m{constructor(e){super(c.ECMA_NOTDYN,[e])}},t.EcmaIncdyn=class extends m{constructor(e){super(c.ECMA_INCDYN,[e])}},t.EcmaDecdyn=class extends m{constructor(e){super(c.ECMA_DECDYN,[e])}},t.EcmaExpdyn=class extends m{constructor(e){super(c.ECMA_EXPDYN,[e])}},t.EcmaIsindyn=class extends m{constructor(e){super(c.ECMA_ISINDYN,[e])}},t.EcmaInstanceofdyn=class extends m{constructor(e){super(c.ECMA_INSTANCEOFDYN,[e])}},t.EcmaStrictnoteqdyn=class extends m{constructor(e){super(c.ECMA_STRICTNOTEQDYN,[e])}},t.EcmaStricteqdyn=class extends m{constructor(e){super(c.ECMA_STRICTEQDYN,[e])}},t.EcmaResumegenerator=class extends m{constructor(e){super(c.ECMA_RESUMEGENERATOR,[e])}},t.EcmaGetresumemode=class extends m{constructor(e){super(c.ECMA_GETRESUMEMODE,[e])}},t.EcmaCreategeneratorobj=class extends m{constructor(e){super(c.ECMA_CREATEGENERATOROBJ,[e])}},t.EcmaThrowconstassignment=class extends m{constructor(e){super(c.ECMA_THROWCONSTASSIGNMENT,[e])}},t.EcmaGettemplateobject=class extends m{constructor(e){super(c.ECMA_GETTEMPLATEOBJECT,[e])}},t.EcmaGetnextpropname=class extends m{constructor(e){super(c.ECMA_GETNEXTPROPNAME,[e])}},t.EcmaCallarg0dyn=class extends m{constructor(e){super(c.ECMA_CALLARG0DYN,[e])}},t.EcmaThrowifnotobject=class extends m{constructor(e){super(c.ECMA_THROWIFNOTOBJECT,[e])}},t.EcmaIternext=class extends m{constructor(e){super(c.ECMA_ITERNEXT,[e])}},t.EcmaCloseiterator=class extends m{constructor(e){super(c.ECMA_CLOSEITERATOR,[e])}},t.EcmaCopymodule=class extends m{constructor(e){super(c.ECMA_COPYMODULE,[e])}},t.EcmaSupercallspread=class extends m{constructor(e){super(c.ECMA_SUPERCALLSPREAD,[e])}},t.EcmaDelobjprop=class extends m{constructor(e,t){super(c.ECMA_DELOBJPROP,[e,t])}},t.EcmaNewobjspreaddyn=class extends m{constructor(e,t){super(c.ECMA_NEWOBJSPREADDYN,[e,t])}},t.EcmaCreateiterresultobj=class extends m{constructor(e,t){super(c.ECMA_CREATEITERRESULTOBJ,[e,t])}},t.EcmaSuspendgenerator=class extends m{constructor(e,t){super(c.ECMA_SUSPENDGENERATOR,[e,t])}},t.EcmaAsyncfunctionawaituncaught=class extends m{constructor(e,t){super(c.ECMA_ASYNCFUNCTIONAWAITUNCAUGHT,[e,t])}},t.EcmaThrowundefinedifhole=class extends m{constructor(e,t){super(c.ECMA_THROWUNDEFINEDIFHOLE,[e,t])}},t.EcmaCallarg1dyn=class extends m{constructor(e,t){super(c.ECMA_CALLARG1DYN,[e,t])}},t.EcmaCopydataproperties=class extends m{constructor(e,t){super(c.ECMA_COPYDATAPROPERTIES,[e,t])}},t.EcmaStarrayspread=class extends m{constructor(e,t){super(c.ECMA_STARRAYSPREAD,[e,t])}},t.EcmaGetiteratornext=class extends m{constructor(e,t){super(c.ECMA_GETITERATORNEXT,[e,t])}},t.EcmaSetobjectwithproto=class extends m{constructor(e,t){super(c.ECMA_SETOBJECTWITHPROTO,[e,t])}},t.EcmaLdobjbyvalue=class extends m{constructor(e,t){super(c.ECMA_LDOBJBYVALUE,[e,t])}},t.EcmaStobjbyvalue=class extends m{constructor(e,t){super(c.ECMA_STOBJBYVALUE,[e,t])}},t.EcmaStownbyvalue=class extends m{constructor(e,t){super(c.ECMA_STOWNBYVALUE,[e,t])}},t.EcmaLdsuperbyvalue=class extends m{constructor(e,t){super(c.ECMA_LDSUPERBYVALUE,[e,t])}},t.EcmaStsuperbyvalue=class extends m{constructor(e,t){super(c.ECMA_STSUPERBYVALUE,[e,t])}},t.EcmaLdobjbyindex=class extends m{constructor(e,t){super(c.ECMA_LDOBJBYINDEX,[e,t])}},t.EcmaStobjbyindex=class extends m{constructor(e,t){super(c.ECMA_STOBJBYINDEX,[e,t])}},t.EcmaStownbyindex=class extends m{constructor(e,t){super(c.ECMA_STOWNBYINDEX,[e,t])}},t.EcmaCallspreaddyn=class extends m{constructor(e,t,r){super(c.ECMA_CALLSPREADDYN,[e,t,r])}},t.EcmaAsyncfunctionresolve=class extends m{constructor(e,t,r){super(c.ECMA_ASYNCFUNCTIONRESOLVE,[e,t,r])}},t.EcmaAsyncfunctionreject=class extends m{constructor(e,t,r){super(c.ECMA_ASYNCFUNCTIONREJECT,[e,t,r])}},t.EcmaCallargs2dyn=class extends m{constructor(e,t,r){super(c.ECMA_CALLARGS2DYN,[e,t,r])}},t.EcmaCallargs3dyn=class extends m{constructor(e,t,r,n){super(c.ECMA_CALLARGS3DYN,[e,t,r,n])}},t.EcmaDefinegettersetterbyvalue=class extends m{constructor(e,t,r,n){super(c.ECMA_DEFINEGETTERSETTERBYVALUE,[e,t,r,n])}},t.EcmaNewobjdynrange=class extends m{constructor(e,t){var r=[e,...t],n=[e];for(r.shift();r&&r.length;){let e=r.shift();null!=e&&n.push(e)}super(c.ECMA_NEWOBJDYNRANGE,n)}},t.EcmaCallirangedyn=class extends m{constructor(e,t){var r=[e,...t],n=[e];for(r.shift();r&&r.length;){let e=r.shift();null!=e&&n.push(e)}super(c.ECMA_CALLIRANGEDYN,n)}},t.EcmaCallithisrangedyn=class extends m{constructor(e,t){var r=[e,...t],n=[e];for(r.shift();r&&r.length;){let e=r.shift();null!=e&&n.push(e)}super(c.ECMA_CALLITHISRANGEDYN,n)}},t.EcmaSupercall=class extends m{constructor(e,t){super(c.ECMA_SUPERCALL,[e,t])}},t.EcmaCreateobjectwithexcludedkeys=class extends m{constructor(e,t,r){var n=[e,t,...r],i=[e,t];for(n.shift(),n.shift();n&&n.length;){let e=n.shift();null!=e&&i.push(e)}super(c.ECMA_CREATEOBJECTWITHEXCLUDEDKEYS,i)}},t.EcmaDefinefuncdyn=class extends m{constructor(e,t,r){super(c.ECMA_DEFINEFUNCDYN,[e,t,r])}},t.EcmaDefinencfuncdyn=class extends m{constructor(e,t,r){super(c.ECMA_DEFINENCFUNCDYN,[e,t,r])}},t.EcmaDefinegeneratorfunc=class extends m{constructor(e,t,r){super(c.ECMA_DEFINEGENERATORFUNC,[e,t,r])}},t.EcmaDefineasyncfunc=class extends m{constructor(e,t,r){super(c.ECMA_DEFINEASYNCFUNC,[e,t,r])}},t.EcmaDefinemethod=class extends m{constructor(e,t,r){super(c.ECMA_DEFINEMETHOD,[e,t,r])}},t.EcmaNewlexenvdyn=class extends m{constructor(e){super(c.ECMA_NEWLEXENVDYN,[e])}},t.EcmaCopyrestargs=class extends m{constructor(e){super(c.ECMA_COPYRESTARGS,[e])}},t.EcmaCreatearraywithbuffer=class extends m{constructor(e){super(c.ECMA_CREATEARRAYWITHBUFFER,[e])}},t.EcmaCreateobjecthavingmethod=class extends m{constructor(e){super(c.ECMA_CREATEOBJECTHAVINGMETHOD,[e])}},t.EcmaThrowifsupernotcorrectcall=class extends m{constructor(e){super(c.ECMA_THROWIFSUPERNOTCORRECTCALL,[e])}},t.EcmaCreateobjectwithbuffer=class extends m{constructor(e){super(c.ECMA_CREATEOBJECTWITHBUFFER,[e])}},t.EcmaLdlexvardyn=class extends m{constructor(e,t){super(c.ECMA_LDLEXVARDYN,[e,t])}},t.EcmaStlexvardyn=class extends m{constructor(e,t,r){super(c.ECMA_STLEXVARDYN,[e,t,r])}},t.EcmaDefineclasswithbuffer=class extends m{constructor(e,t,r,n,i){super(c.ECMA_DEFINECLASSWITHBUFFER,[e,t,r,n,i])}},t.EcmaImportmodule=class extends m{constructor(e){super(c.ECMA_IMPORTMODULE,[e])}},t.EcmaStmodulevar=class extends m{constructor(e){super(c.ECMA_STMODULEVAR,[e])}},t.EcmaTryldglobalbyname=class extends m{constructor(e){super(c.ECMA_TRYLDGLOBALBYNAME,[e])}},t.EcmaTrystglobalbyname=class extends m{constructor(e){super(c.ECMA_TRYSTGLOBALBYNAME,[e])}},t.EcmaLdglobalvar=class extends m{constructor(e){super(c.ECMA_LDGLOBALVAR,[e])}},t.EcmaStglobalvar=class extends m{constructor(e){super(c.ECMA_STGLOBALVAR,[e])}},t.EcmaLdobjbyname=class extends m{constructor(e,t){super(c.ECMA_LDOBJBYNAME,[e,t])}},t.EcmaStobjbyname=class extends m{constructor(e,t){super(c.ECMA_STOBJBYNAME,[e,t])}},t.EcmaStownbyname=class extends m{constructor(e,t){super(c.ECMA_STOWNBYNAME,[e,t])}},t.EcmaLdsuperbyname=class extends m{constructor(e,t){super(c.ECMA_LDSUPERBYNAME,[e,t])}},t.EcmaStsuperbyname=class extends m{constructor(e,t){super(c.ECMA_STSUPERBYNAME,[e,t])}},t.EcmaLdmodvarbyname=class extends m{constructor(e,t){super(c.ECMA_LDMODVARBYNAME,[e,t])}},t.EcmaCreateregexpwithliteral=class extends m{constructor(e,t){super(c.ECMA_CREATEREGEXPWITHLITERAL,[e,t])}},t.EcmaIstrue=class extends m{constructor(){super(c.ECMA_ISTRUE,[])}},t.EcmaIsfalse=class extends m{constructor(){super(c.ECMA_ISFALSE,[])}},t.EcmaStconsttoglobalrecord=class extends m{constructor(e){super(c.ECMA_STCONSTTOGLOBALRECORD,[e])}},t.EcmaStlettoglobalrecord=class extends m{constructor(e){super(c.ECMA_STLETTOGLOBALRECORD,[e])}},t.EcmaStclasstoglobalrecord=class extends m{constructor(e){super(c.ECMA_STCLASSTOGLOBALRECORD,[e])}},t.EcmaStownbyvaluewithnameset=class extends m{constructor(e,t){super(c.ECMA_STOWNBYVALUEWITHNAMESET,[e,t])}},t.EcmaStownbynamewithnameset=class extends m{constructor(e,t){super(c.ECMA_STOWNBYNAMEWITHNAMESET,[e,t])}},t.EcmaLdfunction=class extends m{constructor(){super(c.ECMA_LDFUNCTION,[])}},t.EcmaNewlexenvwithnamedyn=class extends m{constructor(e,t){super(c.ECMA_NEWLEXENVWITHNAMEDYN,[e,t])}},t.EcmaLdbigint=class extends m{constructor(e){super(c.ECMA_LDBIGINT,[e])}}},"./src/lexenv.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.VariableAcessStore=t.VariableAccessLoad=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/base/bcGenUtil.ts"),c=r("./src/base/vregisterCache.ts"),l=r("./src/debuginfo.ts"),u=a(r("./src/jshelpers.js"));class _{constructor(e,t,r){this.variable=r,this.scope=e,this.level=t}isLexVar(){return this.variable.isLexVar}getEnvSlotOfVar(){if(this.isLexVar())return this.variable.idxLex}}function d(e,t,r,n){let i=e.getTemp();n.push((0,s.loadAccumulatorString)(r)),n.push((0,s.storeAccumulator)(i)),n.push((0,s.throwUndefinedIfHole)(t,i)),e.freeTemps(i)}function p(e,t,r,n){let i=e.getTemp();if(t.isConst()&&(r.push((0,s.loadAccumulatorString)(t.getName())),r.push((0,s.storeAccumulator)(i)),r.push((0,s.throwConstAssignment)(i))),t.isClass()&&n!=l.NodeKind.FirstNodeOfFunction&&n!=l.NodeKind.Invalid&&n!=l.NodeKind.Normal){let e=t.getName();for(;n&&(!o.isClassLike(n)||!n.name||u.getTextOfIdentifierOrLiteral(n.name)!=e);)n=n.parent;n&&(r.push((0,s.loadAccumulatorString)(e)),r.push((0,s.storeAccumulator)(i)),r.push((0,s.throwConstAssignment)(i)))}e.freeTemps(i)}t.VariableAccessLoad=class extends _{constructor(e,t,r){super(e,t,r)}expand(e){return this.isLexVar()?this.loadLexEnvVar(e):this.loadLocalVar(e)}loadLocalVar(e){let t=new Array,r=this.variable,n=e.getVregForVariable(r);if(!r.isInitialized()){let n=e.getTemp();return t.push((0,s.loadAccumulator)((0,c.getVregisterCache)(e,c.CacheList.HOLE))),t.push((0,s.storeAccumulator)(n)),d(e,n,r.getName(),t),e.freeTemps(n),t}return"4funcObj"===r.getName()&&this.scope.setCallOpt("4funcObj"),t.push((0,s.loadAccumulator)(n)),t}loadLexEnvVar(e){let t=new Array,r=this.variable,n=r.idxLex;if(t.push((0,s.loadLexicalVar)(this.level,n)),r.isLetOrConst()){let n=e.getTemp();t.push((0,s.storeAccumulator)(n)),d(e,n,r.getName(),t),t.push((0,s.loadAccumulator)(n)),e.freeTemps(n)}return t}},t.VariableAcessStore=class extends _{constructor(e,t,r,n,i){super(e,t,r),this.isDeclaration=n,this.node=i}expand(e){return this.isLexVar()?this.storeLexEnvVar(e):this.storeLocalVar(e)}storeLocalVar(e){let t=new Array,r=this.variable,n=e.getVregForVariable(r);if(!this.isDeclaration){if(!r.isInitialized()){let n=e.getTemp(),i=e.getTemp(),a=e.getTemp();t.push((0,s.storeAccumulator)(i)),t.push((0,s.loadAccumulator)((0,c.getVregisterCache)(e,c.CacheList.HOLE))),t.push((0,s.storeAccumulator)(a)),d(e,a,r.getName(),t),t.push((0,s.loadAccumulator)(i)),e.freeTemps(n,i,a)}p(e,r,t,this.node)}return"4funcObj"===r.getName()&&this.scope.setCallOpt("4funcObj"),t.push((0,s.storeAccumulator)(n)),r.isExportVar()&&t.push((0,s.storeModuleVariable)(r.getExportedName())),t}storeLexEnvVar(e){let t=new Array,r=this.variable,n=e.getTemp();t.push((0,s.storeAccumulator)(n));let i=r.idxLex;if((r.isLetOrConst()||r.isClass())&&!this.isDeclaration){let n=e.getTemp();t.push((0,s.loadLexicalVar)(this.level,i)),t.push((0,s.storeAccumulator)(n)),d(e,n,r.getName(),t),p(e,r,t,this.node),e.freeTemps(n)}return t.push((0,s.storeLexicalVar)(this.level,i,n)),t.push((0,s.loadAccumulator)(n)),r.isExportVar()&&t.push((0,s.storeModuleVariable)(r.getExportedName())),e.freeTemps(n),t}}},"./src/log.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LOGE=t.LOGD=void 0;const n=r("./src/cmdOptions.ts");t.LOGD=function(e,...t){n.CmdOptions.isEnableDebugLog()&&(e?console.log(e+": "+t):console.log(t))},t.LOGE=function(e,...t){e?console.error(e+": "+t):console.error(t)}},"./src/modules.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.setExportBinding=t.setImport=t.ModuleStmt=void 0;const o=a(r("./src/jshelpers.js")),s=r("./src/diagnostic.ts");t.ModuleStmt=class{constructor(e,t=""){this.namespace="",this.bingdingNameMap=new Map,this.bingdingNodeMap=new Map,this.isCopy=!0,this.node=e,this.moduleRequest=t}getNode(){return this.node}getModuleRequest(){return this.moduleRequest}addLocalName(e,t){if(this.bingdingNameMap.has(e))throw new s.DiagnosticError(this.node,s.DiagnosticCode.Duplicate_identifier_0,o.getSourceFileOfNode(this.node),[e]);this.bingdingNameMap.set(e,t)}getBindingNameMap(){return this.bingdingNameMap}addNodeMap(e,t){this.bingdingNodeMap.set(e,t)}getBindingNodeMap(){return this.bingdingNodeMap}setNameSpace(e){this.namespace=e}getNameSpace(){return this.namespace}setCopyFlag(e){this.isCopy=e}getCopyFlag(){return this.isCopy}},t.setImport=function(e,t,r){e.forEach((e=>{if(r.importModule(e.getNode(),e.getModuleRequest()),e.getNameSpace()){let n=t.findLocal(e.getNameSpace());r.storeAccToLexEnv(e.getNode(),t,0,n,!0),n.initialize()}let n=r.allocLocalVreg();r.storeAccumulator(e.getNode(),n),e.getBindingNameMap().forEach(((i,a)=>{let o=t.findLocal(a);r.loadModuleVariable(e.getNode(),n,i),r.storeAccToLexEnv(e.getNode(),t,0,o,!0),o.initialize()}))}))},t.setExportBinding=function(e,t,r){e.forEach((e=>{if(e.getModuleRequest()){r.importModule(e.getNode(),e.getModuleRequest());let t=r.allocLocalVreg();r.storeAccumulator(e.getNode(),t),e.getCopyFlag()?r.copyModule(e.getNode(),t):(e.getNameSpace()&&r.storeModuleVar(e.getNode(),e.getNameSpace()),e.getBindingNameMap().forEach(((n,i)=>{r.loadModuleVariable(e.getNode(),t,n),r.storeModuleVar(e.getNode(),i)})))}else e.getBindingNameMap().forEach(((r,n)=>{let i=t.findLocal(r);if(void 0===i)throw new s.DiagnosticError(e.getNode(),s.DiagnosticCode.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module,o.getSourceFileOfNode(e.getNode()),[r]);i.setExport(),i.setExportedName(n)}))}))}},"./src/pandagen.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.PandaGen=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./node_modules/typescript/lib/typescript.js"),c=r("./src/base/bcGenUtil.ts"),l=r("./src/base/literal.ts"),u=r("./src/base/util.ts"),_=r("./src/base/vregisterCache.ts"),d=r("./src/cmdOptions.ts"),p=r("./src/debuginfo.ts"),f=r("./src/expression/numericLiteral.ts"),g=r("./src/irnodes.ts"),m=r("./src/lexenv.ts"),y=r("./src/log.ts"),h=r("./src/scope.ts"),v=r("./src/typeRecorder.ts");class b{constructor(e,t,r){this.debugTag="PandaGen",this.locals=[],this.temps=[],this.insns=[],this.catchMap=new Map,this.totalRegsNum=0,this.variableDebugInfoArray=[],this.sourceFileDebugInfo="",this.callType=0,this.internalName=e,this.parametersCount=t,this.scope=r,this.vregisterCache=new _.VregisterCache}appendScopeInfo(e){if(0==e.size)return;let t;t=b.getLiteralArrayBuffer().length;let r=new l.LiteralBuffer,n=new Array;return n.push(new l.Literal(l.LiteralTag.INTEGER,e.size)),e.forEach(((e,t)=>{n.push(new l.Literal(l.LiteralTag.STRING,t)),n.push(new l.Literal(l.LiteralTag.INTEGER,e))})),r.addLiterals(...n),b.getLiteralArrayBuffer().push(r),t}setCallType(e){this.callType=e}getCallType(){return this.callType}static getExportedTypes(){return v.TypeRecorder.getInstance()?v.TypeRecorder.getInstance().getExportedType():new Map}static getDeclaredTypes(){return v.TypeRecorder.getInstance()?v.TypeRecorder.getInstance().getDeclaredType():new Map}getSourceCodeDebugInfo(){return this.sourceCodeDebugInfo}setSourceCodeDebugInfo(e){this.sourceCodeDebugInfo=e}getSourceFileDebugInfo(){return this.sourceFileDebugInfo}setSourceFileDebugInfo(e){this.sourceFileDebugInfo=e}static getLiteralArrayBuffer(){return b.literalArrayBuffer}static clearLiteralArrayBuffer(){b.literalArrayBuffer=[]}getParameterLength(){if(this.scope instanceof h.FunctionScope)return this.scope.getParameterLength()}getFuncName(){return this.scope instanceof h.FunctionScope?this.scope.getFuncName():"main"}static appendTypeArrayBuffer(e){let t=b.literalArrayBuffer.length;return b.literalArrayBuffer.push(e.transfer2LiteralBuffer()),t}static setTypeArrayBuffer(e,t){b.literalArrayBuffer[t]=e.transfer2LiteralBuffer()}getFirstStmt(){return this.firstStmt}setFirstStmt(e){this.firstStmt||(this.firstStmt=e)}getVregisterCache(){return this.vregisterCache}getCatchMap(){return this.catchMap}getScope(){return this.scope}getVariableDebugInfoArray(){return this.variableDebugInfoArray}addDebugVariableInfo(e){this.variableDebugInfoArray.push(e)}allocLocalVreg(){let e=new g.VReg;return this.locals.push(e),e}getVregForVariable(e){if(e.hasAlreadyBinded())return e.getVreg();let t=this.allocLocalVreg();return e.bindVreg(t),t}getTemp(){let e;return e=this.temps.length>0?this.temps.shift():new g.VReg,e}freeTemps(...e){this.temps.unshift(...e)}getInsns(){return this.insns}setInsns(e){this.insns=e}printInsns(){(0,y.LOGE)("function "+this.internalName+"() {"),this.getInsns().forEach((e=>{(0,y.LOGE)(e.toString())})),(0,y.LOGE)("}")}setTotalRegsNum(e){this.totalRegsNum=e}getTotalRegsNum(){return this.totalRegsNum}setParametersCount(e){this.parametersCount=e}getParametersCount(){return this.parametersCount}setLocals(e){this.locals=e}getLocals(){return this.locals}getTemps(){return this.temps}storeAccumulator(e,t){this.add(e,(0,c.storeAccumulator)(t))}loadAccFromArgs(e){if(this.scope.getUseArgs()){let t=this.scope.findLocal("arguments");if(this.scope instanceof h.FunctionScope&&this.scope.setArgumentsOrRestargs(),!t)throw new Error("fail to get arguments");{let r=this.getVregForVariable(t);this.getUnmappedArgs(e),this.add(e,(0,c.storeAccumulator)(r))}}}deleteObjProperty(e,t,r){this.add(e,(0,c.deleteObjProperty)(t,r))}loadAccumulator(e,t){this.add(e,(0,c.loadAccumulator)(t))}createLexEnv(e,t,r){let n,i=r.getNumLexEnv(),a=r.getLexVarInfo();d.CmdOptions.isDebugMode()&&(n=this.appendScopeInfo(a)),this.add(e,(0,c.newLexicalEnv)(i,n),(0,c.storeAccumulator)(t))}popLexicalEnv(e){this.add(e,(0,c.popLexicalEnv)())}loadAccFromLexEnv(e,t,r,n){let i=new m.VariableAccessLoad(t,r,n).expand(this);this.add(e,...i)}storeAccToLexEnv(e,t,r,n,i){let a=new m.VariableAcessStore(t,r,n,i,e).expand(this);this.add(e,...a)}loadObjProperty(e,t,r){switch(typeof r){case"number":if((0,f.isInteger)(r))this.loadObjByIndex(e,t,r);else{let n=this.getTemp();this.add(e,(0,c.loadAccumulatorFloat)(r),(0,c.storeAccumulator)(n)),this.loadObjByValue(e,t,n),this.freeTemps(n)}break;case"string":this.loadObjByName(e,t,r);break;default:this.loadObjByValue(e,t,r)}}storeObjProperty(e,t,r){switch(typeof r){case"number":if((0,f.isInteger)(r))this.storeObjByIndex(e,t,r);else{let n=this.getTemp(),i=this.getTemp();this.storeAccumulator(e,n),this.add(e,(0,c.loadAccumulatorFloat)(r),(0,c.storeAccumulator)(i),(0,c.loadAccumulator)(n)),this.storeObjByValue(e,t,i),this.freeTemps(n,i)}break;case"string":this.storeObjByName(e,t,r);break;default:this.storeObjByValue(e,t,r)}}storeOwnProperty(e,t,r,n=!1){switch(typeof r){case"number":if((0,f.isInteger)(r))this.stOwnByIndex(e,t,r);else{let i=this.getTemp(),a=this.getTemp();this.storeAccumulator(e,i),this.add(e,(0,c.loadAccumulatorFloat)(r),(0,c.storeAccumulator)(a),(0,c.loadAccumulator)(i)),this.stOwnByValue(e,t,a,n),this.freeTemps(i,a)}break;case"string":this.stOwnByName(e,t,r,n);break;default:this.stOwnByValue(e,t,r,n)}}loadObjByName(e,t,r){this.add(e,(0,c.loadObjByName)(t,r))}storeObjByName(e,t,r){this.add(e,(0,c.storeObjByName)(t,r))}loadObjByIndex(e,t,r){this.add(e,(0,c.loadObjByIndex)(t,r))}storeObjByIndex(e,t,r){this.add(e,(0,c.storeObjByIndex)(t,r))}loadObjByValue(e,t,r){this.add(e,(0,c.loadObjByValue)(t,r))}storeObjByValue(e,t,r){this.add(e,(0,c.storeObjByValue)(t,r))}stOwnByName(e,t,r,n){this.add(e,(0,c.storeOwnByName)(t,r,n))}stOwnByIndex(e,t,r){this.add(e,(0,c.storeOwnByIndex)(t,r))}stOwnByValue(e,t,r,n){this.add(e,(0,c.storeOwnByValue)(t,r,n))}loadByNameViaDebugger(e,t,r){this.loadObjProperty(e,(0,_.getVregisterCache)(this,_.CacheList.Global),"debuggerGetValue");let n=this.getTemp();this.storeAccumulator(e,n);let i=this.getTemp();this.loadAccumulatorString(e,t),this.storeAccumulator(e,i);let a=this.getTemp();this.moveVreg(e,a,(0,_.getVregisterCache)(this,r)),this.call(e,[n,i,a],!1),this.freeTemps(n,i,a)}tryLoadGlobalByName(e,t){d.CmdOptions.isWatchEvaluateExpressionMode()?this.loadByNameViaDebugger(e,t,_.CacheList.True):this.add(e,(0,c.tryLoadGlobalByName)(t))}storeByNameViaDebugger(e,t){let r=this.getTemp();this.storeAccumulator(e,r),this.loadObjProperty(e,(0,_.getVregisterCache)(this,_.CacheList.Global),"debuggerSetValue");let n=this.getTemp();this.storeAccumulator(e,n);let i=this.getTemp();this.loadAccumulatorString(e,t),this.storeAccumulator(e,i),this.call(e,[n,i,r],!1),this.freeTemps(r,n,i)}tryStoreGlobalByName(e,t){d.CmdOptions.isWatchEvaluateExpressionMode()?this.storeByNameViaDebugger(e,t):this.add(e,(0,c.tryStoreGlobalByName)(t))}loadGlobalVar(e,t){this.add(e,(0,c.loadGlobalVar)(t))}storeGlobalVar(e,t){this.add(e,(0,c.storeGlobalVar)(t))}loadAccumulatorString(e,t){this.add(e,(0,c.loadAccumulatorString)(t))}loadAccumulatorFloat(e,t){this.add(e,(0,c.loadAccumulatorFloat)(t))}loadAccumulatorInt(e,t){this.add(e,(0,c.loadAccumulatorInt)(t))}moveVreg(e,t,r){this.add(e,(0,c.moveVreg)(t,r))}label(e,t){this.add(p.NodeKind.Invalid,t)}branch(e,t){this.add(e,(0,c.jumpTarget)(t))}isTrue(e){this.add(e,(0,c.isTrue)())}jumpIfTrue(e,t){this.isFalse(e),this.add(e,new g.Jeqz(t))}isFalse(e){this.add(e,(0,c.isFalse)())}jumpIfFalse(e,t){this.isTrue(e),this.add(e,new g.Jeqz(t))}debugger(e){this.add(e,(0,c.creatDebugger)())}throwUndefinedIfHole(e,t,r){this.add(e,(0,c.throwUndefinedIfHole)(t,r))}condition(e,t,r,n){switch(t){case s.SyntaxKind.LessThanToken:this.add(e,new g.EcmaLessdyn(r)),this.add(e,new g.Jeqz(n));break;case s.SyntaxKind.GreaterThanToken:this.add(e,new g.EcmaGreaterdyn(r)),this.add(e,new g.Jeqz(n));break;case s.SyntaxKind.LessThanEqualsToken:this.add(e,new g.EcmaLesseqdyn(r)),this.add(e,new g.Jeqz(n));break;case s.SyntaxKind.GreaterThanEqualsToken:this.add(e,new g.EcmaGreatereqdyn(r)),this.add(e,new g.Jeqz(n));break;case s.SyntaxKind.EqualsEqualsToken:this.add(e,new g.EcmaEqdyn(r)),this.add(e,new g.Jeqz(n));break;case s.SyntaxKind.ExclamationEqualsToken:this.add(e,new g.EcmaNoteqdyn(r)),this.add(e,new g.Jeqz(n));break;case s.SyntaxKind.EqualsEqualsEqualsToken:this.add(e,new g.EcmaStricteqdyn(r)),this.add(e,new g.Jeqz(n));break;case s.SyntaxKind.ExclamationEqualsEqualsToken:this.add(e,new g.EcmaStrictnoteqdyn(r)),this.add(e,new g.Jeqz(n))}}unary(e,t,r){switch(t){case s.SyntaxKind.PlusToken:this.add(e,new g.EcmaTonumber(r));break;case s.SyntaxKind.MinusToken:this.add(e,new g.EcmaNegdyn(r));break;case s.SyntaxKind.PlusPlusToken:this.add(e,new g.EcmaIncdyn(r));break;case s.SyntaxKind.MinusMinusToken:this.add(e,new g.EcmaDecdyn(r));break;case s.SyntaxKind.ExclamationToken:let t=new g.Label,n=new g.Label;this.jumpIfFalse(e,t),this.add(e,(0,c.loadAccumulator)((0,_.getVregisterCache)(this,_.CacheList.False))),this.branch(e,n),this.label(e,t),this.add(e,(0,c.loadAccumulator)((0,_.getVregisterCache)(this,_.CacheList.True))),this.label(e,n);break;case s.SyntaxKind.TildeToken:this.add(e,new g.EcmaNotdyn(r));break;default:throw new Error("Unimplemented")}}binary(e,t,r){switch(t){case s.SyntaxKind.LessThanToken:case s.SyntaxKind.GreaterThanToken:case s.SyntaxKind.LessThanEqualsToken:case s.SyntaxKind.GreaterThanEqualsToken:case s.SyntaxKind.EqualsEqualsToken:case s.SyntaxKind.ExclamationEqualsToken:case s.SyntaxKind.EqualsEqualsEqualsToken:case s.SyntaxKind.ExclamationEqualsEqualsToken:this.binaryRelation(e,t,r);break;case s.SyntaxKind.PlusToken:case s.SyntaxKind.PlusEqualsToken:this.add(e,new g.EcmaAdd2dyn(r));break;case s.SyntaxKind.MinusToken:case s.SyntaxKind.MinusEqualsToken:this.add(e,new g.EcmaSub2dyn(r));break;case s.SyntaxKind.AsteriskToken:case s.SyntaxKind.AsteriskEqualsToken:this.add(e,new g.EcmaMul2dyn(r));break;case s.SyntaxKind.AsteriskAsteriskToken:case s.SyntaxKind.AsteriskAsteriskEqualsToken:this.add(e,new g.EcmaExpdyn(r));break;case s.SyntaxKind.SlashToken:case s.SyntaxKind.SlashEqualsToken:this.add(e,new g.EcmaDiv2dyn(r));break;case s.SyntaxKind.PercentToken:case s.SyntaxKind.PercentEqualsToken:this.add(e,new g.EcmaMod2dyn(r));break;case s.SyntaxKind.LessThanLessThanToken:case s.SyntaxKind.LessThanLessThanEqualsToken:this.add(e,new g.EcmaShl2dyn(r));break;case s.SyntaxKind.GreaterThanGreaterThanToken:case s.SyntaxKind.GreaterThanGreaterThanEqualsToken:this.add(e,new g.EcmaShr2dyn(r));break;case s.SyntaxKind.GreaterThanGreaterThanGreaterThanToken:case s.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken:this.add(e,new g.EcmaAshr2dyn(r));break;case s.SyntaxKind.AmpersandToken:case s.SyntaxKind.AmpersandEqualsToken:this.add(e,new g.EcmaAnd2dyn(r));break;case s.SyntaxKind.BarToken:case s.SyntaxKind.BarEqualsToken:this.add(e,new g.EcmaOr2dyn(r));break;case s.SyntaxKind.CaretToken:case s.SyntaxKind.CaretEqualsToken:this.add(e,new g.EcmaXor2dyn(r));break;case s.SyntaxKind.InKeyword:this.add(e,new g.EcmaIsindyn(r));break;case s.SyntaxKind.InstanceOfKeyword:this.add(e,new g.EcmaInstanceofdyn(r));break;default:throw new Error("Unimplemented")}}throw(e){this.add(e,(0,c.throwException)())}throwThrowNotExist(e){this.add(e,(0,c.throwThrowNotExists)())}throwDeleteSuperProperty(e){this.add(e,(0,c.throwDeleteSuperProperty)())}return(e){this.add(e,new g.ReturnDyn)}call(e,t,r){this.add(e,(0,c.call)(t,r))}returnUndefined(e){this.add(e,(0,c.returnUndefined)())}newObject(e,t){this.add(e,(0,c.newObject)(t))}defineMethod(e,t,r,n){let i=(0,u.getParamLengthOfFunc)(e);this.add(e,(0,c.loadAccumulator)(r),(0,c.defineMethod)(t,n,i))}defineFunction(e,t,r,n){let i=(0,u.getParamLengthOfFunc)(t);if(t.modifiers)for(let a=0;a<t.modifiers.length;a++)if(t.modifiers[a].kind==o.SyntaxKind.AsyncKeyword&&!t.asteriskToken)return void this.add(e,(0,c.defineAsyncFunc)(r,n,i));t.asteriskToken?this.add(e,(0,c.defineGeneratorFunc)(r,n,i)):o.isArrowFunction(t)||o.isMethodDeclaration(t)?this.add(e,(0,c.loadHomeObject)(),(0,c.defineNCFunc)(r,n,i)):this.add(e,(0,c.defineFunc)(r,n,i))}typeOf(e){this.add(e,new g.EcmaTypeofdyn)}callSpread(e,t,r,n){this.add(e,new g.EcmaCallspreaddyn(t,r,n))}newObjSpread(e,t,r){this.add(e,new g.EcmaNewobjspreaddyn(t,r))}getUnmappedArgs(e){this.add(e,new g.EcmaGetunmappedargs)}toNumber(e,t){this.add(e,new g.EcmaTonumber(t))}createGeneratorObj(e,t){this.add(e,new g.EcmaCreategeneratorobj(t))}EcmaCreateiterresultobj(e,t,r){this.add(e,new g.EcmaCreateiterresultobj(t,r))}suspendGenerator(e,t,r){this.add(e,new g.EcmaSuspendgenerator(t,r))}resumeGenerator(e,t){this.add(e,new g.EcmaResumegenerator(t))}getResumeMode(e,t){this.add(e,new g.EcmaGetresumemode(t))}asyncFunctionEnter(e){this.add(e,new g.EcmaAsyncfunctionenter)}asyncFunctionAwaitUncaught(e,t,r){this.add(e,new g.EcmaAsyncfunctionawaituncaught(t,r))}asyncFunctionResolve(e,t,r,n){this.add(e,new g.EcmaAsyncfunctionresolve(t,r,n))}asyncFunctionReject(e,t,r,n){this.add(e,new g.EcmaAsyncfunctionreject(t,r,n))}getTemplateObject(e,t){this.add(e,new g.EcmaGettemplateobject(t))}copyRestArgs(e,t){this.add(e,new g.EcmaCopyrestargs(new g.Imm(t)))}getPropIterator(e){this.add(e,(0,c.getPropIterator)())}getNextPropName(e,t){this.add(e,(0,c.getNextPropName)(t))}createEmptyObject(e){this.add(e,(0,c.createEmptyObject)())}createObjectHavingMethod(e,t,r){this.add(e,(0,c.loadAccumulator)(r),(0,c.createObjectHavingMethod)(t))}createObjectWithBuffer(e,t){this.add(e,(0,c.createObjectWithBuffer)(t))}setObjectWithProto(e,t,r){this.add(e,(0,c.setObjectWithProto)(t,r))}copyDataProperties(e,t,r){this.add(e,(0,c.copyDataProperties)(t,r))}defineGetterSetterByValue(e,t,r,n,i,a){a?this.add(e,(0,c.loadAccumulator)((0,_.getVregisterCache)(this,_.CacheList.True))):this.add(e,(0,c.loadAccumulator)((0,_.getVregisterCache)(this,_.CacheList.False))),this.add(e,(0,c.defineGetterSetterByValue)(t,r,n,i))}createEmptyArray(e){this.add(e,(0,c.createEmptyArray)())}createArrayWithBuffer(e,t){this.add(e,(0,c.createArrayWithBuffer)(t))}storeArraySpreadElement(e,t,r){this.add(e,(0,c.storeArraySpread)(t,r))}storeLexicalVar(e,t,r,n){this.add(e,(0,c.storeLexicalVar)(t,r,n))}loadLexicalVar(e,t,r){this.add(e,(0,c.loadLexicalVar)(t,r))}importModule(e,t){this.add(e,(0,c.importModule)(t))}loadModuleVariable(e,t,r){this.add(e,(0,c.loadModuleVarByName)(r,t))}storeModuleVar(e,t){this.add(e,(0,c.storeModuleVariable)(t))}copyModule(e,t){this.add(e,(0,c.copyModuleIntoCurrentModule)(t))}defineClassWithBuffer(e,t,r,n,i){this.add(e,(0,c.defineClassWithBuffer)(t,r,n,(0,_.getVregisterCache)(this,_.CacheList.LexEnv),i))}createObjectWithExcludedKeys(e,t,r){this.add(e,(0,c.createObjectWithExcludedKeys)(t,r))}throwObjectNonCoercible(e){this.add(e,(0,c.throwObjectNonCoercible)())}getIterator(e){this.add(e,(0,c.getIterator)())}getIteratorNext(e,t,r){this.add(e,(0,c.getIteratorNext)(t,r))}closeIterator(e,t){this.add(e,(0,c.closeIterator)(t))}throwIfNotObject(e,t){this.add(e,(0,c.throwIfNotObject)(t))}superCall(e,t,r){this.add(e,(0,c.superCall)(t,r))}superCallSpread(e,t){this.add(e,(0,c.superCallSpread)(t))}ldSuperByName(e,t,r){this.add(e,(0,c.ldSuperByName)(t,r))}stSuperByName(e,t,r){this.add(e,(0,c.stSuperByName)(t,r))}ldSuperByValue(e,t,r){this.add(e,(0,c.ldSuperByValue)(t,r))}stSuperByValue(e,t,r){this.add(e,(0,c.stSuperByValue)(t,r))}loadSuperProperty(e,t,r){switch(typeof r){case"string":this.ldSuperByName(e,t,r);break;case"number":let n=this.getTemp();this.loadAccumulatorInt(e,r),this.storeAccumulator(e,n),this.ldSuperByValue(e,t,n),this.freeTemps(n);break;default:this.ldSuperByValue(e,t,r)}}throwIfSuperNotCorrectCall(e,t){this.add(e,(0,c.throwIfSuperNotCorrectCall)(t))}storeSuperProperty(e,t,r){switch(typeof r){case"string":this.stSuperByName(e,t,r);break;case"number":let n=this.getTemp();this.loadAccumulatorInt(e,r),this.storeAccumulator(e,n),this.stSuperByValue(e,t,n),this.freeTemps(n);break;default:this.stSuperByValue(e,t,r)}}loadHomeObject(e){this.add(e,(0,c.loadHomeObject)())}createRegExpWithLiteral(e,t,r){this.add(e,(0,c.createRegExpWithLiteral)(t,r))}stLetToGlobalRecord(e,t){this.add(e,(0,c.stLetToGlobalRecord)(t))}stConstToGlobalRecord(e,t){this.add(e,(0,c.stConstToGlobalRecord)(t))}stClassToGlobalRecord(e,t){this.add(e,(0,c.stClassToGlobalRecord)(t))}loadAccumulatorBigInt(e,t){this.add(e,(0,c.loadAccumulatorBigInt)(t))}binaryRelation(e,t,r){let n=new g.Label,i=new g.Label;switch(t){case s.SyntaxKind.LessThanToken:this.add(e,new g.EcmaLessdyn(r));break;case s.SyntaxKind.GreaterThanToken:this.add(e,new g.EcmaGreaterdyn(r));break;case s.SyntaxKind.LessThanEqualsToken:this.add(e,new g.EcmaLesseqdyn(r));break;case s.SyntaxKind.GreaterThanEqualsToken:this.add(e,new g.EcmaGreatereqdyn(r));break;case s.SyntaxKind.EqualsEqualsToken:this.add(e,new g.EcmaEqdyn(r));break;case s.SyntaxKind.ExclamationEqualsToken:this.add(e,new g.EcmaNoteqdyn(r));break;case s.SyntaxKind.EqualsEqualsEqualsToken:this.add(e,new g.EcmaStricteqdyn(r));break;case s.SyntaxKind.ExclamationEqualsEqualsToken:this.add(e,new g.EcmaStrictnoteqdyn(r))}this.add(e,new g.Jeqz(n)),this.add(e,(0,c.loadAccumulator)((0,_.getVregisterCache)(this,_.CacheList.True))),this.branch(e,i),this.label(e,n),this.add(e,(0,c.loadAccumulator)((0,_.getVregisterCache)(this,_.CacheList.False))),this.label(e,i)}add(e,...t){p.DebugInfo.setDebuginfoForIns(e,...t),this.insns.push(...t)}}t.PandaGen=b,b.literalArrayBuffer=new Array},"./src/pandasm.ts":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclaredSymbol2Type=t.ExportedSymbol2Type=t.TypeOfVreg=t.CatchTable=t.Program=t.Record=t.Function=t.Ins=t.Signature=t.Metadata=void 0;class r{constructor(e=""){this.attribute=e}}t.Metadata=r,t.Signature=class{constructor(e=0,t){this.p=e,this.rt=t}},t.Ins=class{constructor(e,t,r,n,i,a){this.o=e,this.r=t,this.id=r,this.im=n,this.l=i,this.d=a}},t.Function=class{constructor(e,t,r=0,n=[],i,a,o,s="",c,l,u,_,d){this.n=e,this.s=t,this.i=n,this.l=i,this.r=r,this.ca_tab=o,this.v=a,this.sf=s,this.sc=c,this.ct=l,this.ti=u,this.es2t=_,this.ds2t=d}},t.Record=class{constructor(e,t,n,i,a){this.name=e,this.whole_line=t,this.bound_left=n,this.bound_right=i,this.line_number=a,this.metadata=new r}},t.Program=class{constructor(){this.functions=[],this.records=[],this.strings=new Set,this.strings_arr=[],this.literalArrays=[],this.module_mode=!1,this.debug_mode=!1,this.log_enabled=!1,this.opt_level=1,this.opt_log_level="error"}finalize(){this.strings_arr=Array.from(this.strings)}},t.CatchTable=class{constructor(e,t,r){this.tb_lab=e,this.te_lab=t,this.cb_lab=r}},t.TypeOfVreg=class{constructor(e,t){this.vregNum=e,this.typeIndex=t}},t.ExportedSymbol2Type=class{constructor(e,t){this.symbol=e,this.type=t}},t.DeclaredSymbol2Type=class{constructor(e,t){this.symbol=e,this.type=t}}},"./src/pass/cacheExpander.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CacheExpander=void 0;const n=r("./src/base/vregisterCache.ts");t.CacheExpander=class{run(e){let t=e.getInsns(),r=e.getVregisterCache();for(let i=n.CacheList.MIN;i<n.CacheList.MAX;i++){let n=r.getCache(i);if(n.isNeeded()){let r=n.getExpander()(e);t.unshift(...r)}}}}},"./src/recorder.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.Recorder=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=a(r("./src/astutils.ts")),c=r("./src/base/util.ts"),l=r("./src/cmdOptions.ts"),u=r("./src/diagnostic.ts"),_=r("./src/expression/parenthesizedExpression.ts"),d=a(r("./src/jshelpers.js")),p=r("./src/log.ts"),f=r("./src/modules.ts"),g=r("./src/scope.ts"),m=r("./src/statement/classStatement.ts"),y=r("./src/syntaxChecker.ts"),h=r("./src/syntaxCheckHelper.ts"),v=r("./src/typeChecker.ts"),b=r("./src/variable.ts"),x=r("./src/typeRecorder.ts"),D=r("./src/pandagen.ts");t.Recorder=class{constructor(e,t,r,n,i,a){this.scopeMap=new Map,this.hoistMap=new Map,this.parametersMap=new Map,this.class2Ctor=new Map,this.importStmts=[],this.exportStmts=[],this.defaultUsed=!1,this.node=e,this.scope=t,this.compilerDriver=r,this.recordType=n,this.funcNameMap=new Map,this.funcNameMap.set("main",1),this.isTsFile=i,this.syntaxCheckStatus=a}record(){return this.setParent(this.node),this.setScopeMap(this.node,this.scope),this.recordInfo(this.node,this.scope),this.recordType?(x.TypeRecorder.getInstance().setTypeSummary(),l.CmdOptions.enableTypeLog()&&x.TypeRecorder.getInstance().getLog()):D.PandaGen.clearLiteralArrayBuffer(),this.node}getCtorOfClass(e){return this.class2Ctor.get(e)}setCtorOfClass(e,t){this.class2Ctor.has(e)||this.class2Ctor.set(e,t)}setParent(e){e.forEachChild((t=>{if(!this.isTsFile||null==t.parent||t.parent.kind!=e.kind){t=d.setParent(t,e);let r=o.getOriginalNode(t);t=o.setTextRange(t,r)}this.setParent(t)}))}recordInfo(e,t){e.forEachChild((e=>{switch(this.syntaxCheckStatus&&(0,y.checkSyntaxError)(e),e.kind){case o.SyntaxKind.FunctionExpression:case o.SyntaxKind.MethodDeclaration:case o.SyntaxKind.Constructor:case o.SyntaxKind.GetAccessor:case o.SyntaxKind.SetAccessor:case o.SyntaxKind.ArrowFunction:{let r=this.buildVariableScope(t,e);this.recordOtherFunc(e,r),this.recordInfo(e,r);break}case o.SyntaxKind.FunctionDeclaration:{let r=this.buildVariableScope(t,e);this.recordFuncDecl(e,t),this.recordType&&v.TypeChecker.getInstance().formatNodeType(e),this.recordInfo(e,r);break}case o.SyntaxKind.Block:case o.SyntaxKind.IfStatement:case o.SyntaxKind.SwitchStatement:case o.SyntaxKind.LabeledStatement:case o.SyntaxKind.ThrowStatement:case o.SyntaxKind.TryStatement:case o.SyntaxKind.CatchClause:{let r=new g.LocalScope(t);this.setScopeMap(e,r),this.recordInfo(e,r);break}case o.SyntaxKind.DoStatement:case o.SyntaxKind.WhileStatement:case o.SyntaxKind.ForStatement:case o.SyntaxKind.ForInStatement:case o.SyntaxKind.ForOfStatement:{let r=new g.LoopScope(t);this.setScopeMap(e,r),this.recordInfo(e,r);break}case o.SyntaxKind.ClassDeclaration:case o.SyntaxKind.ClassExpression:this.recordClassInfo(e,t),this.recordType&&v.TypeChecker.getInstance().formatNodeType(e);break;case o.SyntaxKind.InterfaceDeclaration:this.recordType&&v.TypeChecker.getInstance().formatNodeType(e);break;case o.SyntaxKind.Identifier:this.recordVariableDecl(e,t);break;case o.SyntaxKind.ImportDeclaration:{if(!l.CmdOptions.isModules())throw new u.DiagnosticError(e,u.DiagnosticCode.An_import_declaration_can_only_be_used_in_a_namespace_or_module,d.getSourceFileOfNode(e));if(!(t instanceof g.ModuleScope))throw new Error("SyntaxError: import statement cannot in other scope except ModuleScope");let r=this.recordImportInfo(e,t);this.recordType&&v.TypeChecker.getInstance().formatNodeType(e,r);break}case o.SyntaxKind.ExportDeclaration:{if(!l.CmdOptions.isModules())throw new u.DiagnosticError(e,u.DiagnosticCode.An_export_declaration_can_only_be_used_in_a_module,d.getSourceFileOfNode(e));if(!(t instanceof g.ModuleScope))throw new Error("SyntaxError: export statement cannot in other scope except ModuleScope");let r=this.recordExportInfo(e);this.recordType&&v.TypeChecker.getInstance().formatNodeType(e,r);break}case o.SyntaxKind.ExportAssignment:if(this.defaultUsed)throw new u.DiagnosticError(e,u.DiagnosticCode.Duplicate_identifier_0,d.getSourceFileOfNode(e),["default"]);this.defaultUsed=!0,this.recordInfo(e,t),this.recordType&&v.TypeChecker.getInstance().formatNodeType(e);break;case o.SyntaxKind.VariableStatement:this.recordType&&v.TypeChecker.getInstance().formatNodeType(e),this.recordInfo(e,t);break;default:this.recordInfo(e,t)}}))}recordClassInfo(e,t){let r=new g.LocalScope(t);this.setScopeMap(e,r);let n=(0,m.extractCtorOfClass)(e);if(n?this.setCtorOfClass(e,n):(0,m.AddCtor2Class)(this,e,r),e.name){let r=d.getTextOfIdentifierOrLiteral(e.name),n=new g.ClassDecl(r,e);t.setDecls(n)}this.recordInfo(e,r)}buildVariableScope(e,t){let r=new g.FunctionScope(e,t),n=e.getNearestVariableScope();return r.setParentVariableScope(n),n.addChildVariableScope(r),this.setScopeMap(t,r),r}recordVariableDecl(e,t){let r=d.getTextOfIdentifierOrLiteral(e),n=this.getDeclarationNodeOfId(e);if(n){let i=s.getVarDeclarationKind(n),a=this.addVariableDeclToScope(t,e,n,r,i);if(i==b.VarDeclarationKind.VAR){let r=t.getNearestVariableScope();this.collectHoistDecls(e,r,a)}}else{let e=t.findDeclPos(r);if(e){let n=e.getDecl(r);if(n instanceof g.LetDecl||n instanceof g.ConstDecl){let r=t.getNearestVariableScope(),n=e.getNearestLexicalScope(),i=r.getNearestLexicalScope(),a=!1;if(n instanceof g.LoopScope){for(;i;){if(i==n){a=!0;break}i=i.getParent()}a&&n.pendingCreateEnv()}}}}if("arguments"==r){let e=t.getNearestVariableScope();null==e||e.setUseArgs(!0)}}addVariableDeclToScope(e,t,r,n,i){let a=new g.VarDecl(n,t);switch(i){case b.VarDeclarationKind.VAR:break;case b.VarDeclarationKind.LET:a=r.parent.kind==o.SyntaxKind.CatchClause?new g.CatchParameter(n,t):new g.LetDecl(n,t);break;case b.VarDeclarationKind.CONST:a=new g.ConstDecl(n,t);break;default:throw new Error("Wrong type of declaration")}return e.setDecls(a),a}getDeclarationNodeOfId(e){let t=e.parent;if(o.isVariableDeclaration(t)&&t.name==e)return t;if(o.isBindingElement(t)&&t.name==e){for(;t&&!o.isVariableDeclaration(t);)t=t.parent;return t||void 0}}recordImportInfo(e,t){if(!o.isStringLiteral(e.moduleSpecifier))throw new Error("moduleSpecifier must be a stringLiteral");let r;if(e.moduleSpecifier){let t=d.getTextOfIdentifierOrLiteral(e.moduleSpecifier);r=new f.ModuleStmt(e,t)}else r=new f.ModuleStmt(e);if(e.importClause){let n=e.importClause;if(n.name){let e=d.getTextOfIdentifierOrLiteral(n.name);t.setDecls(new g.ConstDecl(e,n.name)),r.addLocalName(e,"default"),r.addNodeMap(n.name,n.name)}if(n.namedBindings){let e=n.namedBindings;if(o.isNamespaceImport(e)){let n=d.getTextOfIdentifierOrLiteral(e.name);t.setDecls(new g.ConstDecl(n,e)),r.setNameSpace(n)}o.isNamedImports(e)&&e.elements.forEach((e=>{let n=d.getTextOfIdentifierOrLiteral(e.name),i=e.propertyName?d.getTextOfIdentifierOrLiteral(e.propertyName):n;t.setDecls(new g.ConstDecl(n,e)),r.addLocalName(n,i),r.addNodeMap(e.name,e.propertyName?e.propertyName:e.name)}))}}return this.importStmts.push(r),r}recordExportInfo(e){let t,r=o.getOriginalNode(e);if(r.moduleSpecifier){if(!o.isStringLiteral(r.moduleSpecifier))throw new Error("moduleSpecifier must be a stringLiteral");t=new f.ModuleStmt(r,d.getTextOfIdentifierOrLiteral(r.moduleSpecifier))}else t=new f.ModuleStmt(r);if(r.exportClause){t.setCopyFlag(!1);let e=r.exportClause;o.isNamespaceExport(e)&&t.setNameSpace(d.getTextOfIdentifierOrLiteral(e.name)),o.isNamedExports(e)&&e.elements.forEach((e=>{let n=d.getTextOfIdentifierOrLiteral(e.name);if("default"==n){if(this.defaultUsed)throw new u.DiagnosticError(r,u.DiagnosticCode.Duplicate_identifier_0,d.getSourceFileOfNode(r),[n]);this.defaultUsed=!0}let i=e.propertyName?d.getTextOfIdentifierOrLiteral(e.propertyName):n;t.addLocalName(n,i),t.addNodeMap(e.name,e.propertyName?e.propertyName:e.name)}))}return this.exportStmts.push(t),t}recordFuncDecl(e,t){this.recordFuncInfo(e);let r=e.name;if(!r)return;let n=d.getTextOfIdentifierOrLiteral(r),i=new g.FuncDecl(n,e),a=t,o=!0;t instanceof g.GlobalScope||t instanceof g.ModuleScope?this.collectHoistDecls(e,a,i):t instanceof g.LocalScope?(a=t.getNearestVariableScope(),a==this.getScopeOfNode(e.parent.parent)&&a instanceof g.FunctionScope&&(o=this.collectHoistDecls(e,a,i))):(0,p.LOGD)("Function declaration"," in function is collected in its body block"),o&&t.setDecls(i)}recordOtherFunc(e,t){if(this.recordFuncInfo(e),(o.isFunctionExpression(e)||o.isMethodDeclaration(e))&&e.name&&o.isIdentifier(e.name)){let r=d.getTextOfIdentifierOrLiteral(e.name),n=new g.FuncDecl(r,e);t.setDecls(n)}}recordFuncInfo(e){this.recordFunctionParameters(e),this.recordFuncName(e)}recordFuncName(e){let t="";if(o.isConstructorDeclaration(e)){let r=e.parent;t=(0,m.getClassNameForConstructor)(r)}else if((0,c.isAnonymousFunctionDefinition)(e)){let r=(0,_.findOuterNodeOfParenthesis)(e);if(o.isVariableDeclaration(r)){let e=r.name;o.isIdentifier(e)&&(t=d.getTextOfIdentifierOrLiteral(e))}else if(o.isBinaryExpression(r))r.operatorToken.kind==o.SyntaxKind.EqualsToken&&o.isIdentifier(r.left)&&(t=d.getTextOfIdentifierOrLiteral(r.left));else if(o.isPropertyAssignment(r)){let e=r.name;(o.isIdentifier(e)||o.isStringLiteral(e)||o.isNumericLiteral(e))&&(t=d.getTextOfIdentifierOrLiteral(e),"__proto__"==t&&(t=""))}}else o.isIdentifier(e.name)&&(t=d.getTextOfIdentifierOrLiteral(e.name));if(this.getScopeOfNode(e).setFuncName(t),""!=t){let e=this.funcNameMap;if(e.has(t)){let r=e.get(t);e.set(t,++r)}else e.set(t,1)}}recordFunctionParameters(e){let t=e.parameters,r=[],n=0,i=!0;t&&t.forEach((e=>{if((e.initializer||this.isRestParameter(e))&&(i=!1),i&&n++,o.isIdentifier(e.name)){let t=d.getTextOfIdentifierOrLiteral(e.name);r.push(new g.FunctionParameter(t,e.name))}else this.recordPatternParameter(e.name,r)})),this.getScopeOfNode(e).setParameterLength(n),this.setParametersMap(e,r)}recordPatternParameter(e,t){let r="";e.elements.forEach((e=>{if(!o.isOmittedExpression(e))if(o.isIdentifier(e.name))r=d.getTextOfIdentifierOrLiteral(e.name),t.push(new g.FunctionParameter(r,e.name));else{let r=e.name;this.recordPatternParameter(r,t)}}))}isRestParameter(e){return!!e.dotDotDotToken}collectHoistDecls(e,t,r){let n=r.name;if(t instanceof g.FunctionScope){let t=d.getContainingFunctionDeclaration(e),r=this.getParametersOfFunction(t);if(r)for(let e=0;e<r.length;e++)if(r[e].name==n)return!1}return!!((0,h.isGlobalIdentifier)(n)&&t instanceof g.GlobalScope)||(this.setHoistMap(t,r),!1)}setScopeMap(e,t){this.scopeMap.set(e,t)}getScopeMap(){return this.scopeMap}getScopeOfNode(e){return this.scopeMap.get(e)}getImportStmts(){return this.importStmts}getExportStmts(){return this.exportStmts}setHoistMap(e,t){if(!this.hoistMap.has(e))return void this.hoistMap.set(e,[t]);let r=this.hoistMap.get(e);for(let e=0;e<r.length;e++)if(t.name==r[e].name)return void(t instanceof g.FuncDecl&&(r[e]=t));r.push(t)}getHoistMap(){return this.hoistMap}getHoistDeclsOfScope(e){return this.hoistMap.get(e)}setParametersMap(e,t){this.parametersMap.set(e,t)}getParametersOfFunction(e){return this.parametersMap.get(e)}getFuncNameMap(){return this.funcNameMap}}},"./src/regAllocator.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegAlloc=void 0;const n=r("./src/base/util.ts"),i=r("./src/base/vregisterCache.ts"),a=r("./src/debuginfo.ts"),o=r("./src/irnodes.ts");class s{constructor(){this.newInsns=[],this.spills=[],this.vRegsId=0,this.usedVreg=[],this.tmpVreg=[],this.vRegsId=0}allocIndexForVreg(e){let t=this.getFreeVreg();e.num=t,this.usedVreg[t]={vreg:e,flag:!1}}findTmpVreg(e){let t=Math.min(256,this.usedVreg.length);for(let r=0;r<t;++r){let t=this.usedVreg[r];if(void 0!==t&&!t.flag){if(16===e&&t.vreg.num>=16)throw new Error("no available tmp vReg from A");return t.flag=!0,this.tmpVreg.push(t),t.vreg}}throw new Error("no available tmp vReg from B")}clearVregFlags(){for(let e of this.tmpVreg)e.flag=!1;this.tmpVreg=[]}allocSpill(){if(this.spills.length>0)return this.spills.pop();let e=new o.VReg;return this.allocIndexForVreg(e),e}freeSpill(e){this.spills.push(e)}getFreeVreg(){if(this.vRegsId>=65536)throw new Error("vreg has been running out");return this.vRegsId++}getNumOfInvalidVregs(e,t){let r=0;for(let n=0;n<e.length;++n)e[n]instanceof o.VReg&&e[n].num>=1<<t[n][1]&&r++;return r}markVregNotAvailableAsTmp(e){let t=e.num;this.usedVreg[t].flag=!0,this.tmpVreg.push(this.usedVreg[t])}doRealAdjustment(e,t,r,n){let i=[],s=[],c=[];for(let t=0;t<e.length;++t)e[t]instanceof o.VReg&&this.markVregNotAvailableAsTmp(e[t]);for(let r=0;r<e.length;++r)if(e[r]instanceof o.VReg){let n=e[r];if(n.num>=1<<t[r][1]){let a,l=this.allocSpill();c.push(l);try{a=this.findTmpVreg(1<<t[r][1])}catch(e){throw Error("no available tmp vReg")}i.push(new o.MovDyn(l,a)),e[r]=a,t[r][0]==o.OperandKind.SrcVReg?i.push(new o.MovDyn(a,n)):t[r][0]==o.OperandKind.DstVReg?s.push(new o.MovDyn(n,a)):t[r][0]==o.OperandKind.SrcDstVReg&&(i.push(new o.MovDyn(a,n)),s.push(new o.MovDyn(n,a))),s.push(new o.MovDyn(a,l))}}a.DebugInfo.copyDebugInfo(n[r],i),a.DebugInfo.copyDebugInfo(n[r],s),this.newInsns.push(...i,n[r],...s);for(let e=c.length-1;e>=0;--e)this.freeSpill(c[e]);this.clearVregFlags()}checkDynRangeInstruction(e,t){let r=e[t].operands,i=(0,n.getRangeStartVregPos)(e[t]),a=1<<e[t].getFormats()[0][i][1];if(r[1].num>=a)return!1;let o=r[i].num,s=i+1;for(;s<e[t].operands.length;++s){if(o+1!=r[s].num)throw Error("Warning: VReg sequence of DynRange is not continuous. Please adjust it now.");o++}return s==e[t].operands.length}adjustDynRangeInstruction(e,t){let r=[],i=[],s=[],c=e[t].operands,l=(0,n.getRangeStartVregPos)(e[t]),u=c.length-(0,n.getRangeStartVregPos)(e[t]),_=1<<e[t].getFormats()[0][l][1],d=this.findTmpVreg(_);for(let e=0;e<u;e++){let t=this.allocSpill();s.push(t),r.push(new o.MovDyn(t,this.usedVreg[d.num+e].vreg)),r.push(new o.MovDyn(this.usedVreg[d.num+e].vreg,c[e+l])),c[e+l]=this.usedVreg[d.num+e].vreg,i.push(new o.MovDyn(this.usedVreg[d.num+e].vreg,t))}a.DebugInfo.copyDebugInfo(e[t],r),a.DebugInfo.copyDebugInfo(e[t],i),this.newInsns.push(...r,e[t],...i);for(let e=s.length-1;e>=0;--e)this.freeSpill(s[e]);this.clearVregFlags()}adjustInstructionsIfNeeded(e){for(let t=0;t<e.length;++t){let r=e[t].operands,i=e[t].getFormats();if((0,n.isRangeInst)(e[t])){if(this.checkDynRangeInstruction(e,t)){this.newInsns.push(e[t]);continue}this.adjustDynRangeInstruction(e,t);continue}let a=r.length,o=i[0];for(let e=0;e<i.length;++e){let t=this.getNumOfInvalidVregs(r,i[e]);t<a&&(o=i[e],a=t)}a>0?this.doRealAdjustment(r,o,t,e):this.newInsns.push(e[t])}}getTotalRegsNum(){return this.vRegsId}run(e){let t=e.getInsns(),r=e.getLocals(),n=e.getTemps(),a=e.getVregisterCache(),s=e.getParametersCount();for(let e=0;e<r.length;++e)this.allocIndexForVreg(r[e]);for(let e=0;e<n.length;++e)this.allocIndexForVreg(n[e]);for(let e=i.CacheList.MIN;e<i.CacheList.MAX;++e){let t=a.getCache(e);t.isNeeded()&&this.allocIndexForVreg(t.getCache())}this.adjustInstructionsIfNeeded(t);for(let e=0;e<s;++e){let t=new o.VReg;this.allocIndexForVreg(t),this.newInsns.unshift(new o.MovDyn(r[e],t))}e.setInsns(this.newInsns)}}t.RegAlloc=class{run(e){let t=new s;t.run(e),e.setTotalRegsNum(t.getTotalRegsNum())}}},"./src/scope.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoopScope=t.LocalScope=t.FunctionScope=t.ModuleScope=t.GlobalScope=t.VariableScope=t.Scope=t.FunctionParameter=t.CatchParameter=t.ClassDecl=t.FuncDecl=t.ConstDecl=t.LetDecl=t.VarDecl=t.Decl=t.InitStatus=void 0;const n=r("./src/log.ts"),i=r("./src/variable.ts");var a;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.UNINITIALIZED=1]="UNINITIALIZED"}(a=t.InitStatus||(t.InitStatus={}));class o{constructor(e,t){this.name=e,this.node=t}}t.Decl=o,t.VarDecl=class extends o{constructor(e,t){super(e,t)}},t.LetDecl=class extends o{constructor(e,t){super(e,t)}},t.ConstDecl=class extends o{constructor(e,t){super(e,t)}},t.FuncDecl=class extends o{constructor(e,t){super(e,t)}},t.ClassDecl=class extends o{constructor(e,t){super(e,t)}},t.CatchParameter=class extends o{constructor(e,t){super(e,t)}},t.FunctionParameter=class extends o{constructor(e,t){super(e,t)}};class s{constructor(){this.debugTag="scope",this.globals=[],this.locals=[],this.name2variable=new Map,this.decls=[],this.parent=void 0,this.callOpt=new Set,this.isArgumentsOrRestargs=!1}getName2variable(){return this.name2variable}getScopeStartInsIdx(){return this.startInsIdx}setScopeStartInsIdx(e){this.startInsIdx=e}setScopeEndInsIdx(e){this.endInsIdx=e}getScopeEndInsIdx(){return this.endInsIdx}setParent(e){this.parent=e}getParent(){return this.parent}getRootScope(){let e=this,t=this.getParent();for(;null!=t;)e=t,t=t.getParent();return e}getNearestVariableScope(){let e=this;for(;e;){if(e instanceof c)return e;e=e.parent}}getNearestLexicalScope(){let e=this;for(;e;){if(e instanceof c||e instanceof p)return e;e=e.parent}}getNthVariableScope(e){let t=this,r=e;for(;t;){if(t instanceof c){if(0==r)return t;r--}t=t.parent}}findLocal(e){return this.name2variable.get(e)}find(e){let t=0,r=this;for(;r;){let i=null,a=t;if((r instanceof c||r instanceof p&&r.need2CreateLexEnv())&&t++,i=r.findLocal(e),i)return(0,n.LOGD)(this.debugTag,"scope.find ("+e+") :"),(0,n.LOGD)(void 0,i),{scope:r,level:a,v:i};r=r.getParent()}return(0,n.LOGD)(this.debugTag,"scope.find ("+e+") : undefined"),{scope:void 0,level:0,v:void 0}}findDeclPos(e){let t,r=this;for(;r;){if(r.hasDecl(e)){t=r;break}r=r.getParent()}return t}setDecls(e){this.decls.push(e)}hasDecl(e){let t=this.decls;for(let r=0;r<t.length;r++)if(t[r].name==e)return!0;return!1}getDecl(e){let t=this.decls;for(let r=0;r<t.length;r++)if(t[r].name==e)return t[r]}getDecls(){return this.decls}getCallOpt(){return this.callOpt}setCallOpt(e){if(this instanceof _)this.callOpt.add(e);else{let t=this.parent;for(;null!=t;){if(t instanceof _){t.callOpt.add(e);break}t=t.parent}}}setArgumentsOrRestargs(){this.isArgumentsOrRestargs=!0}getArgumentsOrRestargs(){return this.isArgumentsOrRestargs}}t.Scope=s;class c extends s{constructor(){super(...arguments),this.startLexIdx=0,this.needCreateLexEnv=!1,this.parameters=[],this.useArgs=!1,this.node=void 0,this.parentVariableScope=null,this.childVariableScope=[],this.lexVarInfo=new Map}getLexVarInfo(){return this.lexVarInfo}getBindingNode(){return this.node}setParentVariableScope(e){this.parentVariableScope=e}getParentVariableScope(){return this.parentVariableScope}getChildVariableScope(){return this.childVariableScope}addChildVariableScope(e){this.childVariableScope.push(e)}addParameter(e,t,r){(0,n.LOGD)(this.debugTag,"VariableScope.addArg("+e+"), kind("+t+")","argIdx("+r+")");let o=this.add(e,t,a.INITIALIZED);if(!(o instanceof i.LocalVariable))throw new Error("Error: argument must be local variable!");return this.parameters.push(o),o}addFuncName(e){let t=this.name2variable.get("4funcObj");this.name2variable.set(e,t)}need2CreateLexEnv(){return this.needCreateLexEnv}pendingCreateEnv(){this.needCreateLexEnv=!0}getNumLexEnv(){return this.startLexIdx}getParametersCount(){return this.parameters.length}getParameters(){return this.parameters}getLexVarIdx(){return this.needCreateLexEnv=!0,this.startLexIdx++}setLexVar(e,t){if(!e.isLexVar){let t=e.setLexVar(this);this.lexVarInfo.set(e.getName(),t)}(0,n.LOGD)(this.debugTag,"VariableScope.setLexVar("+e.idxLex+")");let r=t;for(;r&&r!=this;)(r instanceof c||r instanceof p&&r.need2CreateLexEnv())&&r.pendingCreateEnv(),r=r.getParent()}setUseArgs(e){this.useArgs=e}getUseArgs(){return this.useArgs}}t.VariableScope=c;class l extends c{constructor(e){super(),this.node=e||void 0}add(e,t,r){let a;return(0,n.LOGD)(this.debugTag,"globalscope.add ("+e+"), kind:"+t),t==i.VarDeclarationKind.NONE||t==i.VarDeclarationKind.VAR||t==i.VarDeclarationKind.FUNCTION?(a=new i.GlobalVariable(t,e),this.globals.push(a)):(a=new i.LocalVariable(t,e,r),this.locals.push(a)),this.name2variable.set(e,a),a}}t.GlobalScope=l;class u extends c{constructor(e){super(),this.node=e||void 0}add(e,t,r){let a;return(0,n.LOGD)(this.debugTag,"modulescope.add ("+e+"), kind:"+t),t==i.VarDeclarationKind.NONE?(a=new i.GlobalVariable(t,e),this.globals.push(a)):t==i.VarDeclarationKind.VAR||t==i.VarDeclarationKind.FUNCTION?(a=new i.LocalVariable(t,e),this.locals.push(a)):(a=new i.LocalVariable(t,e,r),this.locals.push(a)),this.name2variable.set(e,a),a}}t.ModuleScope=u;class _ extends c{constructor(e,t){super(),this.parameterLength=0,this.funcName="",this.parent=e||void 0,this.node=t||void 0}setParameterLength(e){this.parameterLength=e}getParameterLength(){return this.parameterLength}setFuncName(e){this.funcName=e}getFuncName(){return this.funcName}getParent(){return this.parent}add(e,t,r){let a;if((0,n.LOGD)(this.debugTag,"functionscope.add ("+e+"), kind:"+t),t==i.VarDeclarationKind.NONE){let r=this.getRootScope();if(!(r instanceof l||r instanceof u))throw a=void 0,new Error("Error: global variable must be defined in global scope");a=r.add(e,t)}else t==i.VarDeclarationKind.VAR||t==i.VarDeclarationKind.FUNCTION?(a=new i.LocalVariable(t,e),this.locals.push(a),this.name2variable.set(e,a)):(a=new i.LocalVariable(t,e,r),this.locals.push(a),this.name2variable.set(e,a));return a}}t.FunctionScope=_;class d extends s{constructor(e){super(),this.parent=e}setLexVar(e,t){this.getNearestLexicalScope().setLexVar(e,t)}add(e,t,r){let a;if((0,n.LOGD)(this.debugTag,"localscope.add ("+e+"), kind:"+t),t==i.VarDeclarationKind.NONE){let i=this.getRootScope();return i instanceof l||i instanceof u?i.add(e,t,r):void(0,n.LOGE)(void 0,"Error: the root of this scope is not global scope, it is wrong")}return t==i.VarDeclarationKind.VAR?a=this.getNearestVariableScope().add(e,t):(a=new i.LocalVariable(t,e,r),this.locals.push(a),this.name2variable.set(e,a)),a}}t.LocalScope=d;class p extends d{constructor(e){super(e),this.startLexIdx=0,this.needCreateLexEnv=!1,this.lexVarInfo=new Map}setLexVar(e,t){if(!e.isLexVar){let t=e.setLexVar(this);this.lexVarInfo.set(e.getName(),t)}(0,n.LOGD)(this.debugTag,"LoopScope.setLexVar("+e.idxLex+")");let r=t;for(;r&&r!=this;)(r instanceof c||r instanceof p&&r.need2CreateLexEnv())&&r.pendingCreateEnv(),r=r.getParent()}getLexVarInfo(){return this.lexVarInfo}need2CreateLexEnv(){return this.needCreateLexEnv}pendingCreateEnv(){this.needCreateLexEnv=!0}getLexVarIdx(){return this.needCreateLexEnv=!0,this.startLexIdx++}getNumLexEnv(){return this.startLexIdx}}t.LoopScope=p},"./src/statement/classStatement.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.checkValidUseSuperBeforeSuper=t.compileSuperProperty=t.shouldReturnThisForConstruct=t.setPrototypeAttributes=t.getClassNameForConstructor=t.defineClassMember=t.extractCtorOfClass=t.compileSuperCall=t.compileConstructor=t.compileReturnThis4Ctor=t.compileDefaultInitClassMembers=t.compileDefaultConstructor=t.AddCtor2Class=t.compileClassDeclaration=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/base/literal.ts"),c=r("./src/base/lreference.ts"),l=r("./src/base/properties.ts"),u=r("./src/base/util.ts"),_=r("./src/base/vregisterCache.ts"),d=r("./src/expression/arrayLiteralExpression.ts"),p=r("./src/expression/objectLiteralExpression.ts"),f=r("./src/expression/parenthesizedExpression.ts"),g=a(r("./src/jshelpers.js")),m=r("./src/pandagen.ts"),y=r("./src/scope.ts");function h(e,t,r){let n=e.getPandaGen(),i=n.getTemp(),a=n.getTemp(),s=!1;o.isMethodDeclaration(t.getValue())?s=C(e,r,i,a,t.getValue()):(e.compileExpression(t.getValue()),s=A(e,t.getValue().parent,r,i,a)),n.storeOwnProperty(t.getValue().parent,s?i:r,t.getName()),n.freeTemps(i,a),t.setCompiled()}function v(e,t,r){let n=e.getPandaGen(),i=t.parent.members;for(let t=0;t<i.length;t++){let r=i[t];if(o.isPropertyDeclaration(r)&&!g.hasStaticModifier(r)){let t=c.LReference.generateLReference(e,r.name,!0);r.initializer&&e.compileExpression(r.initializer),t.setValue()}}if(r)return;let a=n.getTemp();e.getThis(t,a),n.loadAccumulator(t,a),N(e,t),n.return(t),n.freeTemps(a)}function b(e,t,r,n){let i=e.getPandaGen(),a=e.getCurrentScope(),{scope:o,level:s,v:c}=a.find("this");if(e.setCallOpt(o,"this"),e.setCallOpt(o,"4newTarget"),o&&s>=0){let e=a,t=!1;for(;e!=o;)e instanceof y.VariableScope&&(t=!0),e=e.getParent();t&&o.setLexVar(c,a),t&&a instanceof y.FunctionScope&&a.setCallOpt("0newTarget")}if(n){let r=i.getTemp();(0,d.createArrayFromElements)(t,e,t.arguments,r),x(t,e),i.superCallSpread(t,r),i.freeTemps(r)}else{let n=r.length,a=n?r[0]:(0,_.getVregisterCache)(i,_.CacheList.undefined);x(t,e),i.superCall(t,n,a)}let l=i.getTemp();i.storeAccumulator(t,l),N(e,t),i.loadAccumulator(t,l),i.freeTemps(l),e.setThis(t)}function x(e,t){let r=t.getRecorder(),n=t.getPandaGen(),i=g.getContainingFunctionDeclaration(e);if(i&&r.getScopeOfNode(i))if(o.isConstructorDeclaration(i))n.loadAccumulator(e,(0,_.getVregisterCache)(n,_.CacheList.FUNC));else{let t=g.getContainingFunctionDeclaration(i),a=r.getScopeOfNode(t);a.pendingCreateEnv();let s=1;for(;!o.isConstructorDeclaration(t);)t=g.getContainingFunctionDeclaration(t),a.pendingCreateEnv(),s++;let c=a.findLocal("4funcObj");a.setLexVar(c,a);let l=c.idxLex;n.loadLexicalVar(e,s,l)}}function D(e){let t=e.members;for(let e=0;e<t.length;e++){let r=t[e];if(o.isConstructorDeclaration(r))return r}}function S(e,t,r,n,i){let a=!1;if(r==l.PropertyKind.Computed||r==l.PropertyKind.Spread){let i=new l.Property(r,e);i.setValue(t),g.hasStaticModifier(t)?(a=!0,n.push(i)):n.unshift(i)}else{let s=(0,l.propertyKeyAsString)(e);if(!function(e,t,r,n){if(e.has(t)){let i=e.get(t);if(r==l.PropertyKind.Accessor){if(o.isGetAccessorDeclaration(n)){if(!k(i.getGetter(),n))return!1;i.setGetter(n)}else if(o.isSetAccessorDeclaration(n)){if(!k(i.getSetter(),n))return!1;i.setSetter(n)}}else{if(!k(i.getValue(),n))return!1;i.setValue(n),i.setKind(r)}return!0}return!1}(i,s,r,t)){let c=new l.Property(r,e);r==l.PropertyKind.Accessor?o.isGetAccessorDeclaration(t)?c.setGetter(t):o.isSetAccessorDeclaration(t)&&c.setSetter(t):c.setValue(t),g.hasStaticModifier(t)?(a=!0,n.push(c)):n.unshift(c),i.set(s,c)}}return a}function E(e,t,r,n){let i=e.getPandaGen();switch(t.getValue().kind){case o.SyntaxKind.PropertyDeclaration:{let a=t.getValue().initializer;a&&(e.compileExpression(a),i.storeOwnProperty(t.getValue(),r,n));break}case o.SyntaxKind.MethodDeclaration:{let a=i.getTemp(),o=i.getTemp(),s=C(e,r,a,o,t.getValue());i.storeOwnProperty(t.getValue(),s?a:r,n,!0),i.freeTemps(a,o);break}case o.SyntaxKind.GetAccessor:{let a=i.getTemp(),o=i.getTemp(),s=t.getValue(),c=C(e,r,o,a,s);i.defineGetterSetterByValue(s,c?o:r,n,a,(0,_.getVregisterCache)(i,_.CacheList.undefined),!0),i.freeTemps(a,o);break}case o.SyntaxKind.SetAccessor:{let a=i.getTemp(),o=t.getValue(),s=i.getTemp(),c=C(e,r,s,a,o);i.defineGetterSetterByValue(o,c?s:r,n,(0,_.getVregisterCache)(i,_.CacheList.undefined),a,!0),i.freeTemps(a,s);break}}i.freeTemps(n)}function T(e,t,r,n){let i,a=e.getTemp(),s=e.getTemp(),c=e.getTemp(),l=e.getTemp(),u=!1;if(void 0!==n.getGetter()){let e=n.getGetter();i=e,u=C(t,r,l,a,e)}if(void 0!==n.getSetter()){let e=n.getSetter();i=e,u=C(t,r,l,s,e)}e.loadAccumulatorString(i,String(n.getName())),e.storeAccumulator(i,c),void 0!==n.getGetter()&&void 0!==n.getSetter()?e.defineGetterSetterByValue(i,u?l:r,c,a,s,!1):o.isGetAccessorDeclaration(i)?e.defineGetterSetterByValue(i,u?l:r,c,a,(0,_.getVregisterCache)(e,_.CacheList.undefined),!1):e.defineGetterSetterByValue(i,u?l:r,c,(0,_.getVregisterCache)(e,_.CacheList.undefined),s,!1),e.freeTemps(a,s,c,l)}function C(e,t,r,n,i){let a=e.getPandaGen();return g.hasStaticModifier(i)?((0,p.createMethodOrAccessor)(a,e,t,i),a.storeAccumulator(i,n),!1):(a.storeAccumulator(i,n),a.loadObjProperty(i,t,"prototype"),a.storeAccumulator(i,r),a.loadAccumulator(i,n),(0,p.createMethodOrAccessor)(a,e,r,i),a.storeAccumulator(i,n),!0)}function k(e,t){if(e&&t){let r=e.modifiers,n=t.modifiers;if(r&&n)return r.length==n.length&&r.every((function(e,t){return e===n[t]}));if(!r&&!n)return!0}else if(!e&&!t)return!0;return!1}function A(e,t,r,n,i){let a=e.getPandaGen();return a.storeAccumulator(t,i),!g.hasStaticModifier(t)&&(a.loadObjProperty(t,r,"prototype"),a.storeAccumulator(t,n),a.loadAccumulator(t,i),!0)}function N(e,t){let r=e.getPandaGen(),n=g.findAncestor(t,o.isConstructorDeclaration);if(!n||!o.isClassLike(n.parent)||!g.getClassExtendsHeritageElement(n.parent))return;let i=r.getTemp();e.getThis(t,i),r.loadAccumulator(t,i),r.freeTemps(i),(g.isSuperProperty(t)||o.isConstructorDeclaration(t)||t.kind==o.SyntaxKind.ThisKeyword||t.kind==o.SyntaxKind.ReturnStatement)&&r.throwIfSuperNotCorrectCall(n,0),g.isSuperCall(t)&&r.throwIfSuperNotCorrectCall(n,1)}t.compileClassDeclaration=function(e,t){e.pushScope(t);let r=e.getPandaGen(),n=[];n=function(e,t,r){let n,i=[],a=0;e.members.forEach((e=>{switch(e.kind){case o.SyntaxKind.Constructor:n=e;break;case o.SyntaxKind.PropertyDeclaration:if(!g.hasStaticModifier(e)){t.push(e);break}if(o.isComputedPropertyName(e.name))S(e.name,e,l.PropertyKind.Computed,i,r)&&a++;else{let t=(0,l.getPropName)(e.name),n=e.initializer;n?(0,l.isConstantExpr)(n)?S(t,n,l.PropertyKind.Constant,i,r)&&a++:S(t,n,l.PropertyKind.Variable,i,r)&&a++:(n=o.createIdentifier("undefined"),S(t,n,l.PropertyKind.Constant,i,r)&&a++)}break;case o.SyntaxKind.MethodDeclaration:{let t=(0,l.getPropName)(e.name);"string"==typeof t||"number"==typeof t?S(t,e,l.PropertyKind.Variable,i,r)&&a++:S(t,e,l.PropertyKind.Computed,i,r)&&a++;break}case o.SyntaxKind.GetAccessor:case o.SyntaxKind.SetAccessor:{let t=(0,l.getPropName)(e.name);"string"==typeof t||"number"==typeof t?S(t,e,l.PropertyKind.Accessor,i,r)&&a++:S(t,e,l.PropertyKind.Computed,i,r)&&a++;break}case o.SyntaxKind.SemicolonClassElement:break;default:throw new Error("Unreachable Kind")}}));let s=i.slice(i.length-a);return i=i.slice(0,i.length-a),i=i.reverse(),i.push(...s),n&&S("constructor",n,l.PropertyKind.Variable,i,r),i}(t,[],new Map);let i=r.getTemp(),a=function(e,t){let r=e.getPandaGen(),n=r.getTemp();if(t.heritageClauses&&t.heritageClauses.length){let i=t.heritageClauses[0];if(i.types.length){let t=i.types[0];return e.compileExpression(t.expression),r.storeAccumulator(t.expression,n),n}}return r.moveVreg(t,n,(0,_.getVregisterCache)(r,_.CacheList.HOLE)),n}(e,t),c=new s.LiteralBuffer,d=0,p=0,f=null!=D(t);for(;d<n.length;d++){let t=n[d],i=r.getTemp();if(t.getKind()==l.PropertyKind.Constant){p++;let n=new s.Literal(s.LiteralTag.STRING,String(t.getName()));c.addLiterals(n),e.compileExpression(t.getValue()),r.storeAccumulator(t.getValue(),i),t.setCompiled()}if(t.getKind()==l.PropertyKind.Variable){if(t.getValue().kind!=o.SyntaxKind.Constructor){g.hasStaticModifier(t.getValue())&&p++;let e=new s.Literal(s.LiteralTag.STRING,String(t.getName()));c.addLiterals(e)}if(o.isMethodDeclaration(t.getValue())){let r=new s.Literal(s.LiteralTag.METHOD,e.getCompilerDriver().getFuncInternalName(t.getValue(),e.getRecorder())),n=new s.Literal(s.LiteralTag.METHODAFFILIATE,(0,u.getParamLengthOfFunc)(t.getValue()));c.addLiterals(r,n)}else if(!o.isConstructorDeclaration(t.getValue())){let n=new s.Literal(s.LiteralTag.NULLVALUE,null);c.addLiterals(n),e.compileExpression(t.getValue()),r.storeAccumulator(t.getValue(),i)}t.setCompiled()}if(r.freeTemps(i),t.getKind()==l.PropertyKind.Computed||t.getKind()==l.PropertyKind.Accessor)break}let v=d-p,b=new s.Literal(s.LiteralTag.INTEGER,f?v-1:v);if(c.addLiterals(b),function(e,t,r,n){let i=m.PandaGen.getLiteralArrayBuffer();i.push(t);let a=e.getRecorder().getCtorOfClass(r),o=e.getCompilerDriver().getInternalNameForCtor(r,a),s=e.getPandaGen(),c=(0,u.getParameterLength4Ctor)(r),l=i.length-1;s.defineClassWithBuffer(r,o,l,c,n[0]),s.storeAccumulator(r,n[1])}(e,c,t,[a,i]),function(e,t,r){let n=e.getPandaGen();for(let i=0;i<t.length;i++){let a=t[i];if(!a.isCompiled())switch(a.getKind()){case l.PropertyKind.Constant:e.compileExpression(a.getValue()),n.storeOwnProperty(a.getValue().parent,r,a.getName());break;case l.PropertyKind.Variable:h(e,a,r);break;case l.PropertyKind.Computed:let t=n.getTemp();e.compileExpression(a.getName().expression),n.storeAccumulator(a.getValue(),t),E(e,a,r,t);break;case l.PropertyKind.Accessor:T(n,e,r,a);break;default:throw new Error("Unreachable PropertyKind for NullValue setting")}}}(e,n,i),r.loadAccumulator(t,i),t.name){let n=g.getTextOfIdentifierOrLiteral(t.name),i=e.getRecorder().getScopeOfNode(t);if(!o.isClassExpression(t)&&i.getParent()instanceof y.GlobalScope)r.stClassToGlobalRecord(t,n);else{let e=i.find(n);e.v.initialize(),r.storeAccToLexEnv(t,e.scope,e.level,e.v,!0)}}r.freeTemps(i,a),e.popScope()},t.AddCtor2Class=function(e,t,r){let n;if(g.getClassExtendsHeritageElement(t)){let e=o.factory.createParameterDeclaration(void 0,void 0,o.factory.createToken(o.SyntaxKind.DotDotDotToken),"args");n=o.factory.createConstructorDeclaration(void 0,void 0,[e],void 0)}else n=o.factory.createConstructorDeclaration(void 0,void 0,[],void 0);n=g.setParent(n,t),n=o.setTextRange(n,t);let i=o.factory.createBlock([]);i=g.setParent(i,n),i=o.setTextRange(i,t),n=o.factory.updateConstructorDeclaration(n,void 0,void 0,n.parameters,i),n=g.setParent(n,t),n=o.setTextRange(n,t);let a=e.getScopeOfNode(t),s=e.buildVariableScope(r,n);s.setParent(a);let c=new y.LocalScope(s);c.setParent(s),e.setScopeMap(n,s),e.setScopeMap(n.body,c),e.recordFuncName(n),e.recordFunctionParameters(n),e.setCtorOfClass(t,n)},t.compileDefaultConstructor=function(e,t){let r=o.factory.createCallExpression(o.factory.createSuper(),void 0,[o.factory.createSpreadElement(o.factory.createIdentifier("args"))]);r=g.setParent(r,t),r=o.setTextRange(r,t),b(e,r,[],!0),v(e,t,!1)},t.compileDefaultInitClassMembers=function(e,t){let r=e.getPandaGen(),n=t.parent.members;for(let i=0;i<n.length;i++){let a=n[i];if(o.isPropertyDeclaration(a)&&!g.hasStaticModifier(a)){if(!a.initializer)continue;let n="",i=r.getTemp();switch(e.getThis(t,i),e.compileExpression(a.initializer),a.name.kind){case o.SyntaxKind.Identifier:case o.SyntaxKind.StringLiteral:case o.SyntaxKind.NumericLiteral:n=g.getTextOfIdentifierOrLiteral(a.name),r.storeObjProperty(t,i,n);break;case o.SyntaxKind.ComputedPropertyName:{let o=r.getTemp();r.storeAccumulator(t,o),n=r.getTemp(),e.compileExpression(a.name.expression),r.storeAccumulator(t,n),r.loadAccumulator(t,o),r.storeObjProperty(t,i,n),r.freeTemps(o,n);break}default:throw new Error("Private Identifier has not been supported")}r.freeTemps(i)}}},t.compileReturnThis4Ctor=function(e,t,r){let n=e.getPandaGen();if(r)return;let i=n.getTemp();e.getThis(t,i),n.loadAccumulator(t,i),N(e,t),n.return(t),n.freeTemps(i)},t.compileConstructor=v,t.compileSuperCall=b,t.extractCtorOfClass=D,t.defineClassMember=S,t.getClassNameForConstructor=function(e){let t="";if(e.name)t=g.getTextOfIdentifierOrLiteral(e.name);else{let r=(0,f.findOuterNodeOfParenthesis)(e);if(o.isVariableDeclaration(r)){let e=r.name;o.isIdentifier(e)&&(t=g.getTextOfIdentifierOrLiteral(e))}else if(o.isBinaryExpression(r)){let e=r.left;r.operatorToken.kind==o.SyntaxKind.EqualsToken&&o.isIdentifier(e)&&(t=g.getTextOfIdentifierOrLiteral(e))}else if(o.isPropertyAssignment(r)){let e=r.name;(o.isIdentifier(e)||o.isStringLiteral(e)||o.isNumericLiteral(e))&&(t=g.getTextOfIdentifierOrLiteral(e))}}return t},t.setPrototypeAttributes=A,t.shouldReturnThisForConstruct=function(e){let t=g.getContainingFunction(e),r=e.expression;return!(!t||!o.isConstructorDeclaration(t)||r&&!(0,u.isUndefinedIdentifier)(r)&&r.kind!=o.SyntaxKind.ThisKeyword)},t.compileSuperProperty=function(e,t,r,n){N(e,t);let i=e.getPandaGen();e.getThis(t,r),i.loadSuperProperty(t,r,n)},t.checkValidUseSuperBeforeSuper=N},"./src/statement/forOfStatement.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIteratorRecord=t.compileForOfStatement=t.IteratorRecord=t.IteratorType=void 0;const n=r("./src/base/vregisterCache.ts"),i=r("./src/statement/labelTarget.ts"),a=r("./src/irnodes.ts"),o=r("./src/statement/tryStatement.ts");var s;!function(e){e[e.Normal=0]="Normal",e[e.Async=1]="Async"}(s=t.IteratorType||(t.IteratorType={}));class c{constructor(e,t,r=s.Normal){this.type=r,this.object=e,this.nextMethod=t}getType(){return this.type}getObject(){return this.object}getNextMethod(){return this.nextMethod}}function l(e,t,r,n,i){return function(e,t,r){if(r==s.Async)throw new Error("Async Iterator haven't been supported");e.getIterator(t)}(e,t,i),e.storeAccumulator(t,n),e.loadObjProperty(t,n,"next"),e.storeAccumulator(t,r),new c(n,r,i)}t.IteratorRecord=c,t.compileForOfStatement=function(e,t){t.pushScope(e);let r=t.getPandaGen(),c=new a.Label,u=new a.Label,_=r.getTemp(),d=r.getTemp(),p=r.getTemp(),f=t.getRecorder().getScopeOfNode(e).need2CreateLexEnv(),g=r.getTemp(),m=s.Normal;t.compileExpression(e.expression);let y=l(r,e,d,p,m);r.loadAccumulator(e,(0,n.getVregisterCache)(r,n.CacheList.False)),r.storeAccumulator(e,_);let h=new i.LabelTarget(e,u,c,f);i.LabelTarget.pushLabelTarget(h),i.LabelTarget.updateName2LabelTarget(e.parent,h);let v=new o.TryBuilderWithForOf(t,r,e,_,y,h,f,f?g:void 0);t.constructTry(e,v,c),r.label(e,u),i.LabelTarget.popLabelTarget(),f&&(r.popLexicalEnv(e),t.popEnv()),r.freeTemps(_,d,p,g),t.popScope()},t.getIteratorRecord=l},"./src/statement/labelTarget.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.LabelTarget=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=a(r("./src/jshelpers.js")),c=r("./src/diagnostic.ts"),l=r("./src/statement/tryStatement.ts");class u{constructor(e,t,r,n=!1){this.node=e,this.breakTargetLabel=t,this.continueTargetLabel=r,this.hasLoopEnv=n,this.loopEnvLevel=n?1:0,this.tryStatement=l.TryStatement.getCurrentTryStatement()}getBreakTargetLabel(){return this.breakTargetLabel}getContinueTargetLabel(){return this.continueTargetLabel}getLoopEnvLevel(){return this.loopEnvLevel}getTryStatement(){return this.tryStatement}getCorrespondingNode(){return this.node}increaseLoopEnvLevel(){this.loopEnvLevel+=1}decreaseLoopEnvLevel(){this.loopEnvLevel-=1}static isLabelTargetsEmpty(){return 0==u.labelTargetStack.length}static getCloseLabelTarget(){if(!u.isLabelTargetsEmpty())return u.labelTargetStack[u.labelTargetStack.length-1]}static getCloseContinueTarget(){let e=u.getCloseLabelTarget();if(e)return e.continueTargetLabel}static pushLabelTarget(e){e.hasLoopEnv&&(l.TryStatement.getCurrentTryStatement()&&l.TryStatement.getCurrentTryStatement().increaseLoopEnvLevel(),u.labelTargetStack.forEach((e=>e.increaseLoopEnvLevel()))),u.labelTargetStack.push(e)}static popLabelTarget(){!u.isLabelTargetsEmpty()&&u.labelTargetStack.pop().hasLoopEnv&&(l.TryStatement.getCurrentTryStatement()&&l.TryStatement.getCurrentTryStatement().decreaseLoopEnvLevel(),u.labelTargetStack.forEach((e=>e.decreaseLoopEnvLevel())))}static updateName2LabelTarget(e,t){for(;e.kind==o.SyntaxKind.LabeledStatement;){let r=e,n=s.getTextOfIdentifierOrLiteral(r.label);if(u.name2LabelTarget.has(n))throw new c.DiagnosticError(e,c.DiagnosticCode.Duplicate_label_0);u.name2LabelTarget.set(n,t),e=e.parent}}static deleteName2LabelTarget(e){u.name2LabelTarget.delete(e)}static getLabelTarget(e){let t;if(e.label){let r=s.getTextOfIdentifierOrLiteral(e.label);t=u.name2LabelTarget.get(r)}else t=u.getCloseLabelTarget();return t}}t.LabelTarget=u,u.name2LabelTarget=new Map,u.labelTargetStack=[]},"./src/statement/loopStatement.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.compileForInStatement=t.compileForStatement=t.compileWhileStatement=t.compileDoStatement=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/base/lreference.ts"),c=r("./src/base/vregisterCache.ts"),l=r("./src/irnodes.ts"),u=r("./src/statement/labelTarget.ts");t.compileDoStatement=function(e,t){t.pushScope(e);let r=t.getPandaGen(),n=t.getRecorder().getScopeOfNode(e),i=!!n.need2CreateLexEnv(),a=new l.Label,o=new l.Label,s=new l.Label,c=new u.LabelTarget(e,o,s,i);u.LabelTarget.pushLabelTarget(c),u.LabelTarget.updateName2LabelTarget(e.parent,c);let _=r.getTemp();r.label(e,a),i&&(r.createLexEnv(e,_,n),t.pushEnv(_)),t.compileStatement(e.statement),r.label(e,s),t.compileCondition(e.expression,o),i&&r.popLexicalEnv(e),r.branch(e,a),r.label(e,o),i&&(r.popLexicalEnv(e),t.popEnv()),u.LabelTarget.popLabelTarget(),r.freeTemps(_),t.popScope()},t.compileWhileStatement=function(e,t){t.pushScope(e);let r=t.getPandaGen(),n=t.getRecorder().getScopeOfNode(e),i=!!n.need2CreateLexEnv(),a=new l.Label,o=new l.Label,s=new u.LabelTarget(e,o,a,i);u.LabelTarget.pushLabelTarget(s),u.LabelTarget.updateName2LabelTarget(e.parent,s);let c=r.getTemp();r.label(e,a),i&&(r.createLexEnv(e,c,n),t.pushEnv(c)),t.compileCondition(e.expression,o),t.compileStatement(e.statement),i&&r.popLexicalEnv(e),r.branch(e,a),r.label(e,o),i&&(r.popLexicalEnv(e),t.popEnv()),u.LabelTarget.popLabelTarget(),r.freeTemps(c),t.popScope()},t.compileForStatement=function(e,t){t.pushScope(e);let r=t.getPandaGen(),n=t.getRecorder().getScopeOfNode(e),i=n.need2CreateLexEnv(),a=r.getTemp(),s=!1;i&&e.initializer&&o.isVariableDeclarationList(e.initializer)&&n.getName2variable().forEach((e=>{e.isLetOrConst()&&e.isLexVar&&(s=!0)}));let c=new l.Label,_=new l.Label,d=new l.Label,p=new u.LabelTarget(e,_,d,i);if(u.LabelTarget.pushLabelTarget(p),u.LabelTarget.updateName2LabelTarget(e.parent,p),e.initializer&&o.isVariableDeclarationList(e.initializer)&&s&&i){r.createLexEnv(e,a,n),t.pushEnv(a),e.initializer.declarations.forEach((e=>t.compileVariableDeclaration(e))),r.label(e,c),e.condition&&t.compileCondition(e.condition,_),t.compileStatement(e.statement),r.label(e,d);let i=new Map,o=new Array;n.getName2variable().forEach(((a,s)=>{if(a.isLexVar&&a.isLetOrConst()){let a=r.getTemp();o.push(a);let c=n.find(s);i.set(c,a),t.loadTarget(e,c),r.storeAccumulator(e,a)}})),r.popLexicalEnv(e),r.createLexEnv(e,a,n),i.forEach(((t,n)=>{let i=n.v.idxLex;r.storeLexicalVar(e,n.level,i,t)})),e.incrementor&&t.compileExpression(e.incrementor),r.branch(e,c),r.label(e,_),r.popLexicalEnv(e),t.popEnv(),r.freeTemps(...o)}else e.initializer&&(o.isVariableDeclarationList(e.initializer)?e.initializer.declarations.forEach((e=>t.compileVariableDeclaration(e))):t.compileExpression(e.initializer)),r.label(e,c),i&&(r.createLexEnv(e,a,n),t.pushEnv(a)),e.condition&&t.compileCondition(e.condition,_),t.compileStatement(e.statement),r.label(e,d),e.incrementor&&t.compileExpression(e.incrementor),i&&r.popLexicalEnv(e),r.branch(e,c),r.label(e,_),i&&(r.popLexicalEnv(e),t.popEnv());u.LabelTarget.popLabelTarget(),r.freeTemps(a),t.popScope()},t.compileForInStatement=function(e,t){t.pushScope(e);let r=t.getPandaGen(),n=t.getRecorder().getScopeOfNode(e),i=!!n.need2CreateLexEnv(),a=r.getTemp(),_=new l.Label,d=new l.Label,p=new u.LabelTarget(e,d,_,i);u.LabelTarget.pushLabelTarget(p),u.LabelTarget.updateName2LabelTarget(e.parent,p);let f=r.getTemp(),g=r.getTemp();t.compileExpression(e.expression),r.getPropIterator(e),r.storeAccumulator(e,f),r.label(e,_),i&&(r.createLexEnv(e,a,n),t.pushEnv(a)),r.getNextPropName(e,f),r.storeAccumulator(e,g),r.condition(e,o.SyntaxKind.ExclamationEqualsEqualsToken,(0,c.getVregisterCache)(r,c.CacheList.undefined),d);let m=s.LReference.generateLReference(t,e.initializer,!1);r.loadAccumulator(e,g),m.setValue(),t.compileStatement(e.statement),i&&r.popLexicalEnv(e),r.branch(e,_),r.label(e,d),i&&(r.popLexicalEnv(e),t.popEnv()),r.freeTemps(a,f,g),u.LabelTarget.popLabelTarget(),t.popScope()}},"./src/statement/returnStatement.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.compileReturnStatement=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/base/vregisterCache.ts"),c=r("./src/compiler.ts"),l=r("./src/function/asyncFunctionBuilder.ts"),u=r("./src/irnodes.ts"),_=a(r("./src/jshelpers.js")),d=r("./src/statement/classStatement.ts");function p(e,t,r){let n=e.expression,i=r.getPandaGen();n?r.compileExpression(n):i.loadAccumulator(e,(0,s.getVregisterCache)(i,s.CacheList.undefined)),i.storeAccumulator(e,t),r.compileFinallyBeforeCFC(void 0,c.ControlFlowChange.Break,void 0),i.loadAccumulator(e,t);let a=r.getFuncBuilder();if(a instanceof l.AsyncFunctionBuilder){let t=i.getTemp();i.storeAccumulator(e,t),a.resolve(e,t),i.freeTemps(t)}i.return(e)}t.compileReturnStatement=function(e,t){let r=t.getPandaGen(),n=r.getTemp();!function(e){let t=_.getContainingFunctionDeclaration(e);return!(!t||!o.isConstructorDeclaration(t))&&!!(t&&t.parent&&t.parent.heritageClauses)}(e)?p(e,n,t):function(e,t,r){let n=r.getPandaGen(),i=e.expression,a=n.getTemp();if(i){if(o.isCallExpression(i)&&i.expression.kind==o.SyntaxKind.SuperKeyword)return p(e,t,r),void n.freeTemps(a);i.kind==o.SyntaxKind.ThisKeyword?n.moveVreg(e,a,(0,s.getVregisterCache)(n,s.CacheList.True)):(r.compileExpression(i),n.binary(e,o.SyntaxKind.EqualsEqualsEqualsToken,(0,s.getVregisterCache)(n,s.CacheList.undefined)),n.storeAccumulator(e,a))}else n.moveVreg(e,a,(0,s.getVregisterCache)(n,s.CacheList.True));let l=new u.Label,_=new u.Label;n.loadAccumulator(e,a),n.condition(e,o.SyntaxKind.ExclamationEqualsEqualsToken,(0,s.getVregisterCache)(n,s.CacheList.False),l);let f=n.getTemp();r.getThis(e,f),n.loadAccumulator(e,f),n.branch(e,_),n.label(e,l),i?r.compileExpression(i):n.loadAccumulator(e,(0,s.getVregisterCache)(n,s.CacheList.undefined)),n.label(e,_),n.storeAccumulator(e,t),r.compileFinallyBeforeCFC(void 0,c.ControlFlowChange.Break,void 0);let g=new u.Label,m=new u.Label;n.loadAccumulator(e,a),n.condition(e,o.SyntaxKind.ExclamationEqualsEqualsToken,(0,s.getVregisterCache)(n,s.CacheList.False),m),(0,d.checkValidUseSuperBeforeSuper)(r,e),n.branch(e,g),n.label(e,m),n.loadAccumulator(e,t),n.label(e,g),n.return(e),n.freeTemps(a,f)}(e,n,t),r.freeTemps(n)}},"./src/statement/switchStatement.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.compileSwitchStatement=t.SwitchBase=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/irnodes.ts"),c=r("./src/diagnostic.ts"),l=r("./src/statement/labelTarget.ts");class u{constructor(e,t,r,n){this.caseLabels=[],this.stmt=e,this.compiler=t,this.pandaGen=t.getPandaGen(),this.switchEndLabel=n;for(let e=0;e<r;e++){let e=new s.Label;this.caseLabels.push(e)}let i=new l.LabelTarget(e,n,l.LabelTarget.getCloseContinueTarget());l.LabelTarget.pushLabelTarget(i),l.LabelTarget.updateName2LabelTarget(e.parent,i)}setCasePosition(e){let t=this.stmt.caseBlock.clauses[e];this.pandaGen.label(t,this.caseLabels[e])}compileTagOfSwitch(e){this.compiler.compileExpression(this.stmt.expression),this.pandaGen.storeAccumulator(this.stmt.expression,e)}compileCaseStatements(e){this.stmt.caseBlock.clauses[e].statements.forEach((e=>{this.compiler.compileStatement(e)}))}JumpIfCase(e,t){let r=this.stmt,n=this.pandaGen,i=r.caseBlock.clauses[t];this.compiler.compileExpression(i.expression),n.condition(i,o.SyntaxKind.ExclamationEqualsEqualsToken,e,this.caseLabels[t])}JumpToDefault(e){let t=this.stmt.caseBlock.clauses[e];this.pandaGen.branch(t,this.caseLabels[e])}checkDefaultNum(e){if(e>1)throw new c.DiagnosticError(this.stmt,c.DiagnosticCode.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement)}break(){this.pandaGen.branch(this.stmt,this.switchEndLabel)}end(){this.pandaGen.label(this.stmt,this.switchEndLabel)}}t.SwitchBase=u,t.compileSwitchStatement=function(e,t){t.pushScope(e);let r=t.getPandaGen(),n=e.caseBlock.clauses.length,i=new s.Label,a=new u(e,t,n,i),c=r.getTemp();a.compileTagOfSwitch(c);let _=e.caseBlock.clauses,d=0,p=0;for(let e=0;e<_.length;e++){let t=_[e];o.isDefaultClause(t)?(d=e,p++):a.JumpIfCase(c,e)}a.checkDefaultNum(p),d>0?a.JumpToDefault(d):a.break();for(let e=0;e<_.length;e++)a.setCasePosition(e),a.compileCaseStatements(e);a.end(),r.freeTemps(c),l.LabelTarget.popLabelTarget(),t.popScope()}},"./src/statement/tryStatement.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.generateCatchTables=t.updateCatchTables=t.TryBuilderWithForOf=t.TryBuilder=t.TryBuilderBase=t.TryStatement=t.CatchTable=t.LabelPair=t.transformTryCatchFinally=void 0;const o=r("./src/compiler.ts"),s=r("./src/irnodes.ts"),c=a(r("./node_modules/typescript/lib/typescript.js")),l=r("./src/scope.ts"),u=r("./src/base/lreference.ts"),_=r("./src/base/vregisterCache.ts"),d=a(r("./src/jshelpers.js"));t.transformTryCatchFinally=function(e,t){let r=t.getScopeOfNode(e),n=new l.LocalScope(r),i=new l.LocalScope(n);t.getScopeOfNode(e.tryBlock).setParent(i),t.getScopeOfNode(e.catchClause).setParent(i);const a=c.factory.createTryStatement(e.tryBlock,e.catchClause,void 0);t.setScopeMap(a,i);const o=[a];o[0]=d.setParent(o[0],e),o[0]=c.setTextRange(o[0],e.tryBlock);let s=c.factory.updateBlock(e.tryBlock,o);return e=c.factory.updateTryStatement(e,s,void 0,e.finallyBlock),t.setScopeMap(e.tryBlock,n),e};class p{constructor(e,t){this.beginLabel=e,this.endLabel=t}getBeginLabel(){return this.beginLabel}getEndLabel(){return this.endLabel}}t.LabelPair=p,t.CatchTable=class{constructor(e,t,r){this.labelPairs=[],this.catchBeginLabel=t,this.labelPairs.push(r),this.depth=f.getcurrentTryStatementDepth(),e.getCatchMap().set(t,this)}getLabelPairs(){return this.labelPairs}getCatchBeginLabel(){return this.catchBeginLabel}getDepth(){return this.depth}splitLabelPair(e){let t=this.labelPairs.pop();t&&(this.labelPairs.push(new p(t.getBeginLabel(),e.getBeginLabel())),this.labelPairs.push(new p(e.getEndLabel(),t.getEndLabel())))}};class f{constructor(e,t,r){this.loopEnvLevel=0,f.currentTryStatementDepth++,this.outer=f.currentTryStatement,this.stmt=e,this.catchTable=t,r&&(this.trybuilder=r),f.currentTryStatement=this}destroy(){f.currentTryStatementDepth--,f.currentTryStatement=this.outer}static setCurrentTryStatement(e){f.currentTryStatement=e}static getCurrentTryStatement(){return f.currentTryStatement}static getcurrentTryStatementDepth(){return f.currentTryStatementDepth}getOuterTryStatement(){return this.outer}getStatement(){return this.stmt}getCatchTable(){return this.catchTable}getLoopEnvLevel(){return this.loopEnvLevel}increaseLoopEnvLevel(){this.loopEnvLevel+=1}decreaseLoopEnvLevel(){this.loopEnvLevel-=1}}t.TryStatement=f,f.currentTryStatementDepth=0;class g{constructor(e,t,r){this.compiler=e,this.pandaGen=t,this.stmt=r}}t.TryBuilderBase=g,t.TryBuilder=class extends g{constructor(e,t,r){super(e,t,r)}compileTryBlock(e){this.stmt.finallyBlock?this.tryStatement=new f(this.stmt,e,this):this.tryStatement=new f(this.stmt,e),this.compiler.compileStatement(this.stmt.tryBlock),this.tryStatement.destroy()}compileFinallyBlockIfExisted(){this.stmt.finallyBlock&&this.compiler.compileStatement(this.stmt.finallyBlock)}compileExceptionHandler(){let e=this.stmt.catchClause;if(e){this.compiler.pushScope(e),t=this.compiler,(r=e.variableDeclaration)&&t.compileVariableDeclaration(r);let n=e.block;this.compiler.pushScope(n),n.statements.forEach((e=>this.compiler.compileStatement(e))),this.compiler.popScope(),this.compiler.popScope()}else{let e=this.pandaGen.getTemp();this.pandaGen.storeAccumulator(this.stmt,e),this.compiler.compileStatement(this.stmt.finallyBlock),this.pandaGen.loadAccumulator(this.stmt,e),this.pandaGen.throw(this.stmt),this.pandaGen.freeTemps(e)}var t,r}compileFinalizer(e,t){this.compiler.compileStatement(this.stmt.finallyBlock)}},t.TryBuilderWithForOf=class extends g{constructor(e,t,r,n,i,a,o,s){super(e,t,r),this.labelTarget=a,this.doneReg=n,this.iterator=i,this.hasLoopEnv=o,this.loopEnv=s||void 0}compileTryBlock(e){let t=this.stmt,r=this.compiler,n=this.pandaGen;this.tryStatement=new f(t,e,this);let i=this.pandaGen.getTemp(),a=r.getRecorder().getScopeOfNode(t);n.loadAccumulator(t,(0,_.getVregisterCache)(n,_.CacheList.True)),n.storeAccumulator(t,this.doneReg),n.label(t,this.labelTarget.getContinueTargetLabel()),this.hasLoopEnv&&(n.createLexEnv(t,this.loopEnv,a),r.pushEnv(this.loopEnv)),this.compileIteratorNext(t,n,this.iterator,i),n.loadObjProperty(t,i,"done"),n.jumpIfTrue(t,this.labelTarget.getBreakTargetLabel()),n.loadObjProperty(t,i,"value"),n.storeAccumulator(t,i),n.loadAccumulator(t,(0,_.getVregisterCache)(n,_.CacheList.False)),n.storeAccumulator(t,this.doneReg);let o=u.LReference.generateLReference(this.compiler,t.initializer,!1);n.loadAccumulator(t,i),o.setValue(),this.compiler.compileStatement(t.statement),this.tryStatement.destroy(),n.freeTemps(i)}compileFinallyBlockIfExisted(){}compileExceptionHandler(){let e=this.pandaGen,t=new s.Label,r=e.getTemp();e.storeAccumulator(this.stmt,r),e.loadAccumulator(this.stmt,this.doneReg),e.condition(this.stmt.expression,c.SyntaxKind.ExclamationEqualsEqualsToken,(0,_.getVregisterCache)(e,_.CacheList.True),t),e.loadObjProperty(this.stmt,this.iterator.getObject(),"return"),e.storeAccumulator(this.stmt,this.iterator.getNextMethod()),e.condition(this.stmt,c.SyntaxKind.ExclamationEqualsEqualsToken,(0,_.getVregisterCache)(e,_.CacheList.undefined),t),e.call(this.stmt,[this.iterator.getNextMethod(),this.iterator.getObject()],!0),e.label(this.stmt,t),e.loadAccumulator(this.stmt,r),e.throw(this.stmt),e.freeTemps(r)}compileFinalizer(e,t){if(e==o.ControlFlowChange.Break||t!=this.labelTarget.getContinueTargetLabel()){let e=new s.Label,t=this.pandaGen.getTemp();this.pandaGen.loadObjProperty(this.stmt,this.iterator.getObject(),"return"),this.pandaGen.storeAccumulator(this.stmt,this.iterator.getNextMethod()),this.pandaGen.condition(this.stmt,c.SyntaxKind.ExclamationEqualsEqualsToken,(0,_.getVregisterCache)(this.pandaGen,_.CacheList.undefined),e),this.pandaGen.call(this.stmt,[this.iterator.getNextMethod(),this.iterator.getObject()],!0),this.pandaGen.storeAccumulator(this.stmt,t),this.pandaGen.throwIfNotObject(this.stmt,t),this.pandaGen.label(this.stmt,e),this.pandaGen.freeTemps(t)}}compileIteratorNext(e,t,r,n){t.call(e,[r.getNextMethod(),r.getObject()],!0),t.storeAccumulator(e,n),t.throwIfNotObject(e,n)}},t.updateCatchTables=function(e,t,r){for(;e!=t;e=null==e?void 0:e.getOuterTryStatement())e.getCatchTable().splitLabelPair(r);t.getCatchTable().splitLabelPair(r)},t.generateCatchTables=function(e){let t=[];return e.forEach((e=>{t.push(e)})),t.sort(((e,t)=>t.getDepth()-e.getDepth())),t}},"./src/strictMode.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.isGlobalDeclare=t.setGlobalDeclare=t.isStrictMode=t.setGlobalStrict=t.checkStrictModeStatementList=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=a(r("./src/jshelpers.js"));let c=!0,l=!1;function u(e){let t;if(e.kind==o.SyntaxKind.SourceFile)t=e.statements;else{let r=e;if(!r||!r.body)return!1;r.body.kind==o.SyntaxKind.Block&&(t=r.body.statements)}if(null==t)return!1;for(const e of t){if(!s.isPrologueDirective(e))return!1;if(_(e))return!0}return!1}function _(e){let t=s.getSourceFileOfNode(e);const r=s.getSourceTextOfNodeFromSourceFile(t,e.expression);return'"use strict"'===r||"'use strict'"===r}t.checkStrictModeStatementList=u,t.setGlobalStrict=function(e){c=e},t.isStrictMode=function(e){return!!c||function(e){for(;e&&e.parent&&e.parent.kind!=o.SyntaxKind.SourceFile;){let t=s.getContainingFunctionDeclaration(e);if(!t)return!1;if(u(t))return!0;e=t}return!1}(e)},t.setGlobalDeclare=function(e){l=e},t.isGlobalDeclare=function(){return l}},"./src/syntaxCheckHelper.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.isStatement=t.isOptionalParameter=t.isIncludeBackslash8Or9InString=t.isInBlockScope=t.isDeclInGlobal=t.visibilityToString=t.isBindingPattern=t.isGlobalIdentifier=t.allowLetAndConstDeclarations=t.isFunctionLikeDeclaration=t.isOriginalKeyword=t.isAssignmentOperator=t.isLeftHandSideExpression=t.isLeftHandSideExpressionKind=t.isEvalOrArgumentsIdentifier=t.isIncludeOctalEscapeSequence=t.stringLiteralIsInRegExp=t.isNewOrCallExpression=t.isOctalNumber=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=a(r("./src/jshelpers.js"));function c(e){return e.kind===o.SyntaxKind.NewExpression||e.kind===o.SyntaxKind.CallExpression}function l(e){switch(e){case o.SyntaxKind.NumericLiteral:case o.SyntaxKind.BigIntLiteral:case o.SyntaxKind.StringLiteral:case o.SyntaxKind.RegularExpressionLiteral:case o.SyntaxKind.NoSubstitutionTemplateLiteral:case o.SyntaxKind.Identifier:case o.SyntaxKind.FalseKeyword:case o.SyntaxKind.ImportKeyword:case o.SyntaxKind.NullKeyword:case o.SyntaxKind.SuperKeyword:case o.SyntaxKind.ThisKeyword:case o.SyntaxKind.TrueKeyword:case o.SyntaxKind.ArrayLiteralExpression:case o.SyntaxKind.ObjectLiteralExpression:case o.SyntaxKind.PropertyAccessExpression:case o.SyntaxKind.ElementAccessExpression:case o.SyntaxKind.CallExpression:case o.SyntaxKind.NewExpression:case o.SyntaxKind.TaggedTemplateExpression:case o.SyntaxKind.ParenthesizedExpression:case o.SyntaxKind.FunctionExpression:case o.SyntaxKind.TemplateExpression:case o.SyntaxKind.ClassExpression:case o.SyntaxKind.NonNullExpression:case o.SyntaxKind.MetaProperty:case o.SyntaxKind.JsxElement:case o.SyntaxKind.JsxSelfClosingElement:case o.SyntaxKind.JsxFragment:return!0;default:return!1}}t.isOctalNumber=function(e){return!(!e||e.length<2||!/^0[0-7]+$/.test(e))},t.isNewOrCallExpression=c,t.stringLiteralIsInRegExp=function(e){let t=e.parent;if(t&&c(t)){let e=t.expression;if(o.isIdentifier(e)&&"RegExp"===e.escapedText)return!0}return!1},t.isIncludeOctalEscapeSequence=function(e){if(!e.match(/\\(?:[1-7][0-7]{0,2}|[0-7]{2,3})/g))return!1;let t=0;for(;t<e.length;){if("\\"==e[t]&&t!=e.length-1)if("\\"==e[t+1])t++;else if(e[t+1]>="0"&&e[t+1]<="7")return!0;t++}return!1},t.isEvalOrArgumentsIdentifier=function(e){return o.isIdentifier(e)&&("eval"===e.escapedText||"arguments"===e.escapedText)},t.isLeftHandSideExpressionKind=l,t.isLeftHandSideExpression=function(e){return l(o.skipPartiallyEmittedExpressions(e).kind)},t.isAssignmentOperator=function(e){return e>=o.SyntaxKind.FirstAssignment&&e<=o.SyntaxKind.LastAssignment},t.isOriginalKeyword=function(e){return e.originalKeywordKind>=o.SyntaxKind.FirstFutureReservedWord&&e.originalKeywordKind<=o.SyntaxKind.LastFutureReservedWord},t.isFunctionLikeDeclaration=function(e){if(!e)return!1;switch(e.kind){case o.SyntaxKind.ArrowFunction:case o.SyntaxKind.Constructor:case o.SyntaxKind.FunctionExpression:case o.SyntaxKind.FunctionDeclaration:case o.SyntaxKind.GetAccessor:case o.SyntaxKind.MethodDeclaration:case o.SyntaxKind.SetAccessor:return!0;default:return!1}},t.allowLetAndConstDeclarations=function e(t){if(!t)return!1;switch(t.kind){case o.SyntaxKind.DoStatement:case o.SyntaxKind.IfStatement:case o.SyntaxKind.ForStatement:case o.SyntaxKind.ForInStatement:case o.SyntaxKind.ForOfStatement:case o.SyntaxKind.WhileStatement:case o.SyntaxKind.WithStatement:return!1;case o.SyntaxKind.LabeledStatement:return e(t.parent)}return!0},t.isGlobalIdentifier=function(e){switch(e){case"NaN":case"undefined":case"Infinity":return!0;default:return!1}},t.isBindingPattern=function(e){if(!e)return!1;switch(e.kind){case o.SyntaxKind.ArrayBindingPattern:case o.SyntaxKind.ObjectBindingPattern:return!0;default:return!1}},t.visibilityToString=function(e){switch(e){case o.ModifierFlags.Private:return"private";case o.ModifierFlags.Protected:return"protected";default:return"public"}},t.isDeclInGlobal=function(e){let t=e.parent;for(;t&&t.kind!=o.SyntaxKind.Block;)t=t.parent;return!t},t.isInBlockScope=function(e){switch(e.kind){case o.SyntaxKind.SourceFile:case o.SyntaxKind.CaseBlock:case o.SyntaxKind.DefaultClause:case o.SyntaxKind.CaseClause:case o.SyntaxKind.Block:case o.SyntaxKind.Constructor:case o.SyntaxKind.MethodDeclaration:return!0}return!1},t.isIncludeBackslash8Or9InString=function(e){let t=0;for(;t<e.length;){if("\\"==e[t]&&t!=e.length-1)if("\\"==e[t+1])t++;else if("8"==e[t+1]||"9"==e[t+1])return!0;t++}return!1},t.isOptionalParameter=function(e){if(s.hasQuestionToken(e))return!0;if(!e.parent||!e.parent.parent)return!1;let t=s.getImmediatelyInvokedFunctionExpression(e.parent);return!!t&&!e.type&&!e.dotDotDotToken&&e.parent.parameters.indexOf(e)>=t.arguments.length},t.isStatement=function(e){return e>=o.SyntaxKind.FirstStatement&&e<=o.SyntaxKind.LastStatement}},"./src/syntaxChecker.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.checkExportEntries=t.checkSyntaxError=t.checkDuplicateDeclaration=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/cmdOptions.ts"),c=r("./src/diagnostic.ts"),l=r("./src/base/util.ts"),u=r("./src/expression/parenthesizedExpression.ts"),_=a(r("./src/jshelpers.js")),d=r("./src/jshelpers.js"),p=r("./src/log.ts"),f=r("./src/scope.ts"),g=r("./src/strictMode.ts"),m=r("./src/syntaxCheckerForStrcitMode.ts"),y=r("./src/syntaxCheckHelper.ts");function h(e,t){let r=e.getDecls(),n=e;if(r[t]instanceof f.VarDecl)for(;!(n instanceof f.FunctionScope);){if(n=n.getParent(),!n)return;n.getDecls().forEach((e=>{x(r[t],e)&&E(r[t])}))}}function v(e,t){let r=e.getDecls();for(let n=t+1;n<r.length;n++)D(r[t],r[n],e)&&E(r[n])}function b(e,t){if(t.has(e.name)){if(1==t.get(e.name)||(0,l.hasExportKeywordModifier)(e.node))throw new c.DiagnosticError(e.node,c.DiagnosticCode.Duplicate_identifier_0,_.getSourceFileOfNode(e.node),[e.name])}else t.set(e.name,(0,l.hasExportKeywordModifier)(e.node))}function x(e,t){if(t instanceof f.LetDecl||t instanceof f.ConstDecl)return e.name==t.name}function D(e,t,r){return!(e instanceof f.LetDecl||e instanceof f.ConstDecl||e instanceof f.ClassDecl&&o.isClassDeclaration(e.node)||t instanceof f.LetDecl||t instanceof f.ConstDecl||t instanceof f.ClassDecl&&o.isClassDeclaration(e.node))||o.isClassExpression(e.node)||o.isClassExpression(t.node)?!!(r instanceof f.LocalScope&&(0,g.isStrictMode)(e.node)&&(e instanceof f.FuncDecl||t instanceof f.FuncDecl))&&!(0,y.isFunctionLikeDeclaration)(e.node.parent.parent)&&!(0,y.isFunctionLikeDeclaration)(t.node.parent.parent)&&e.name==t.name:e.name==t.name}function S(e,t){if(t instanceof f.GlobalScope&&!(e instanceof f.VarDecl||e instanceof f.CatchParameter)&&(0,y.isGlobalIdentifier)(e.name)&&(0,y.isDeclInGlobal)(e.node)){let t=_.getSourceFileOfNode(e.node);throw new c.DiagnosticError(e.node,c.DiagnosticCode.Declaration_name_conflicts_with_built_in_global_identifier_0,t,[e.name])}}function E(e){let t=_.getSourceFileOfNode(e.node);throw e.node.kind==o.SyntaxKind.FunctionDeclaration&&(e.node=e.node.name),new c.DiagnosticError(e.node,c.DiagnosticCode.Duplicate_identifier_0,t,[e.name])}function T(e){if(e.kind===o.SyntaxKind.Identifier){if(e.originalKeywordKind===o.SyntaxKind.LetKeyword){let t=_.getSourceFileOfNode(e);throw new c.DiagnosticError(e,c.DiagnosticCode.The_let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations,t)}}else{let t=e.elements;for(let e of t)o.isOmittedExpression(e)||T(e.name)}}function C(e){let t=_.getSourceFileOfNode(e);if(!(o.isForInStatement(e.parent.parent)||o.isForOfStatement(e.parent.parent)||o.isCatchClause(e.parent)||e.initializer)){if((0,y.isBindingPattern)(e.name)&&!(0,y.isBindingPattern)(e.parent))throw new c.DiagnosticError(e,c.DiagnosticCode.A_destructuring_declaration_must_have_an_initializer,t);if(_.isVarConst(e))throw new c.DiagnosticError(e,c.DiagnosticCode.The_const_declarations_must_be_initialized,t)}if(e.exclamationToken&&(e.parent.parent.kind!==o.SyntaxKind.VariableStatement||!e.type||e.initializer))throw e.initializer?new c.DiagnosticError(e.exclamationToken,c.DiagnosticCode.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions,t):new c.DiagnosticError(e.exclamationToken,c.DiagnosticCode.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations,t);if((_.isLet(e)||_.isVarConst(e))&&(T(e.name),!((0,y.isInBlockScope)(e.parent.parent.parent)||o.isForInStatement(e.parent.parent)||o.isForOfStatement(e.parent.parent)||o.isForStatement(e.parent.parent))))throw new c.DiagnosticError(e,c.DiagnosticCode.const_and_let_declarations_not_allowed_in_statement_positions,t)}function k(e){if(!e.decorators)return;let t=_.getSourceFileOfNode(e);if(!_.nodeCanBeDecorated(e,e.parent,e.parent.parent))throw o.isMethodDeclaration(e)&&!_.nodeIsPresent(e.body)?new c.DiagnosticError(e,c.DiagnosticCode.A_decorator_can_only_decorate_a_method_implementation_not_an_overload,t):new c.DiagnosticError(e,c.DiagnosticCode.Decorators_are_not_valid_here,t);if(o.isGetAccessorDeclaration(e)||o.isSetAccessorDeclaration(e)){let r=_.getAllAccessorDeclarations(e.parent.members,e);if(r.firstAccessor.decorators&&e===r.secondAccessor)throw new c.DiagnosticError(e,c.DiagnosticCode.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name,t)}}function A(e){if(!e.modifiers)return;let t,r,n,i,a=o.ModifierFlags.None,s=_.getSourceFileOfNode(e);for(let l of e.modifiers){if(l.kind!==o.SyntaxKind.ReadonlyKeyword){if(o.isPropertySignature(e)||o.isMethodSignature(e))throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_appear_on_a_type_member,s,[_.tokenToString(l.kind)]);if(o.isIndexSignatureDeclaration(e))throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_appear_on_an_index_signature,s,[_.tokenToString(l.kind)])}switch(l.kind){case o.SyntaxKind.ConstKeyword:if(o.isEnumDeclaration(e))throw new c.DiagnosticError(e,c.DiagnosticCode.A_class_member_cannot_have_the_0_keyword,s,[_.tokenToString(o.SyntaxKind.ConstKeyword)]);break;case o.SyntaxKind.PublicKeyword:case o.SyntaxKind.ProtectedKeyword:case o.SyntaxKind.PrivateKeyword:{const t=(0,y.visibilityToString)(_.modifierToFlag(l.kind));if(a&o.ModifierFlags.AccessibilityModifier)throw new c.DiagnosticError(l,c.DiagnosticCode.Accessibility_modifier_already_seen,s);if(a&o.ModifierFlags.Static)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_must_precede_1_modifier,s,[t,"static"]);if(a&o.ModifierFlags.Readonly)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_must_precede_1_modifier,s,[t,"readonly"]);if(a&o.ModifierFlags.Async)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_must_precede_1_modifier,s,[t,"async"]);if(o.isModuleBlock(e.parent)||o.isSourceFile(e.parent))throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_appear_on_a_module_or_namespace_element,s,[t]);if(a&o.ModifierFlags.Abstract)throw l.kind===o.SyntaxKind.PrivateKeyword?new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_be_used_with_1_modifier,s,[t,"abstract"]):new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_must_precede_1_modifier,s,[t,"abstract"]);if(o.isPropertyDeclaration(e)&&o.isPrivateIdentifier(e.name))throw new c.DiagnosticError(l,c.DiagnosticCode.An_accessibility_modifier_cannot_be_used_with_a_private_identifier,s);a|=_.modifierToFlag(l.kind);break}case o.SyntaxKind.StaticKeyword:if(a&o.ModifierFlags.Static)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_already_seen,s,["static"]);if(a&o.ModifierFlags.Readonly)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_must_precede_1_modifier,s,["static","readonly"]);if(a&o.ModifierFlags.Async)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_must_precede_1_modifier,s,["static","async"]);if(o.isModuleBlock(e.parent)||o.isSourceFile(e.parent))throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_appear_on_a_module_or_namespace_element,s,["static"]);if(o.isParameter(e))throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_appear_on_a_parameter,s,["static"]);if(a&o.ModifierFlags.Abstract)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_be_used_with_1_modifier,s,["static","abstract"]);if(o.isPropertyDeclaration(e)&&o.isPrivateIdentifier(e.name))throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_be_used_with_a_private_identifier,s,["static"]);a|=o.ModifierFlags.Static,t=l;break;case o.SyntaxKind.ReadonlyKeyword:if(a&o.ModifierFlags.Readonly)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_already_seen,s,["readonly"]);if(!(o.isPropertyDeclaration(e)||o.isPropertySignature(e)||o.isIndexSignatureDeclaration(e)||o.isParameter(e)))throw new c.DiagnosticError(l,c.DiagnosticCode.The_readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature,s);a|=o.ModifierFlags.Readonly,i=l;break;case o.SyntaxKind.ExportKeyword:if(a&o.ModifierFlags.Export)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_already_seen,s,["export"]);if(a&o.ModifierFlags.Ambient)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_must_precede_1_modifier,s,["export","declare"]);if(a&o.ModifierFlags.Abstract)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_must_precede_1_modifier,s,["export","abstract"]);if(a&o.ModifierFlags.Async)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_must_precede_1_modifier,s,["export","async"]);if(o.isClassLike(e.parent))throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_appear_on_class_elements_of_this_kind,s,["export"]);if(o.isParameter(e))throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_appear_on_a_parameter,s,["export"]);a|=o.ModifierFlags.Export;break;case o.SyntaxKind.DefaultKeyword:{let t=o.isSourceFile(e.parent)?e.parent:e.parent.parent;if(o.isModuleDeclaration(t)&&!_.isAmbientModule(t))throw new c.DiagnosticError(l,c.DiagnosticCode.A_default_export_can_only_be_used_in_an_ECMAScript_style_module,s);a|=o.ModifierFlags.Default;break}case o.SyntaxKind.DeclareKeyword:if(a&o.ModifierFlags.Ambient)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_already_seen,s,["declare"]);if(a&o.ModifierFlags.Async)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_be_used_in_an_ambient_context,s,["async"]);if(o.isClassLike(e.parent)&&!o.isPropertyDeclaration(e))throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_appear_on_class_elements_of_this_kind,s,["declare"]);if(o.isParameter(e))throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_appear_on_a_parameter,s,["declare"]);if(o.isPropertyDeclaration(e)&&o.isPrivateIdentifier(e.name))throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_be_used_with_a_private_identifier,s,["declare"]);a|=o.ModifierFlags.Ambient,r=l;break;case o.SyntaxKind.AbstractKeyword:{if(a&o.ModifierFlags.Abstract)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_already_seen,s,["abstract"]);if(o.isClassDeclaration(e)&&o.isConstructorTypeNode(e)){if(!(o.isMethodDeclaration(e)||o.isPropertyDeclaration(e)||o.isGetAccessorDeclaration(e)||o.isSetAccessorDeclaration(e)))throw new c.DiagnosticError(l,c.DiagnosticCode.The_abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration,s);if(a&o.ModifierFlags.Static)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_be_used_with_1_modifier,s,["static","abstract"]);if(a&o.ModifierFlags.Private)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_be_used_with_1_modifier,s,["private","abstract"]);if(a&o.ModifierFlags.Async&&n)throw new c.DiagnosticError(n,c.DiagnosticCode._0_modifier_cannot_be_used_with_1_modifier,s,["async","abstract"])}let t=e.name;if(t&&o.isPrivateIdentifier(t))throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_be_used_with_a_private_identifier,s,["abstract"]);a|=o.ModifierFlags.Abstract;break}case o.SyntaxKind.AsyncKeyword:if(a&o.ModifierFlags.Async)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_already_seen,s,["async"]);if(a&o.ModifierFlags.Ambient)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_be_used_in_an_ambient_context,s,["async"]);if(o.isParameter(e))throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_appear_on_a_parameter,s,["async"]);if(a&o.ModifierFlags.Abstract)throw new c.DiagnosticError(l,c.DiagnosticCode._0_modifier_cannot_be_used_with_1_modifier,s,["async","abstract"]);a|=o.ModifierFlags.Async,n=l}}if(o.isConstructorDeclaration(e)){if(a&o.ModifierFlags.Static)throw new c.DiagnosticError(t,c.DiagnosticCode._0_modifier_cannot_appear_on_a_constructor_declaration,s,["static"]);if(a&o.ModifierFlags.Abstract)throw new c.DiagnosticError(t,c.DiagnosticCode._0_modifier_cannot_appear_on_a_constructor_declaration,s,["abstract"]);if(a&o.ModifierFlags.Async)throw new c.DiagnosticError(n,c.DiagnosticCode._0_modifier_cannot_appear_on_a_constructor_declaration,s,["async"]);if(a&o.ModifierFlags.Readonly)throw new c.DiagnosticError(i,c.DiagnosticCode._0_modifier_cannot_appear_on_a_constructor_declaration,s,["readonly"])}else{if((o.isImportDeclaration(e)||o.isImportEqualsDeclaration(e))&&a&o.ModifierFlags.Ambient)throw new c.DiagnosticError(r,c.DiagnosticCode.A_0_modifier_cannot_be_used_with_an_import_declaration,s,["declare"]);if(o.isParameter(e)&&a&o.ModifierFlags.ParameterPropertyModifier&&(0,y.isBindingPattern)(e.name))throw new c.DiagnosticError(e,c.DiagnosticCode.A_parameter_property_may_not_be_declared_using_a_binding_pattern,s);if(o.isParameter(e)&&a&o.ModifierFlags.ParameterPropertyModifier&&e.dotDotDotToken)throw new c.DiagnosticError(e,c.DiagnosticCode.A_parameter_property_cannot_be_declared_using_a_rest_parameter,s)}a&o.ModifierFlags.Async&&function(e,t){switch(e.kind){case o.SyntaxKind.ArrowFunction:case o.SyntaxKind.FunctionDeclaration:case o.SyntaxKind.FunctionExpression:case o.SyntaxKind.MethodDeclaration:return}let r=_.getSourceFileOfNode(e);throw new c.DiagnosticError(t,c.DiagnosticCode._0_modifier_cannot_be_used_here,r,["async"])}(e,n)}function N(e){let t=e.declarations;if(!t.length)throw new c.DiagnosticError(e,c.DiagnosticCode.Identifier_expected);let r=t[0].name;(0,y.isBindingPattern)(r)&&U(r)}function F(e){let t=_.getSourceFileOfNode(e),r=e.initializer;if(o.isParenthesizedExpression(r)&&(r=(0,u.findInnerExprOfParenthesis)(r)),o.isVariableDeclarationList(r)){let n=r;N(n);let i=n.declarations;if(i.length>1)throw o.isForInStatement(e)?new c.DiagnosticError(n.declarations[1],c.DiagnosticCode.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement,t):new c.DiagnosticError(n.declarations[1],c.DiagnosticCode.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement,t);if(i[0].initializer)throw o.isForInStatement(e)?new c.DiagnosticError(i[0].name,c.DiagnosticCode.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer,t):new c.DiagnosticError(i[0].name,c.DiagnosticCode.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer,t);if(i[0].type)throw o.isForInStatement(e)?new c.DiagnosticError(i[0],c.DiagnosticCode.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation,t):new c.DiagnosticError(i[0],c.DiagnosticCode.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation,t)}else O(r),(o.isArrayLiteralExpression(r)||o.isObjectLiteralExpression(r))&&V(r)}function w(e){let t=e.initializer;t.declarations.length>=1&&C(t.declarations[0])}function P(e,t,r){let n=_.skipOuterExpressions(e,7);if(n.kind!==o.SyntaxKind.Identifier&&n.kind!==o.SyntaxKind.PropertyAccessExpression&&n.kind!==o.SyntaxKind.ElementAccessExpression)throw new c.DiagnosticError(e,t);if(n.flags&o.NodeFlags.OptionalChain)throw new c.DiagnosticError(e,r)}function I(e){if((0,y.isAssignmentOperator)(e.operatorToken.kind)){let t=e.left;o.isParenthesizedExpression(t)&&(t=(0,u.findInnerExprOfParenthesis)(t)),e.operatorToken.kind==o.SyntaxKind.EqualsToken&&(o.isArrayLiteralExpression(t)||o.isObjectLiteralExpression(t))&&V(t),O(t)}}function O(e){if(_.isKeyword(e.kind)||e.kind==o.SyntaxKind.NumericLiteral||e.kind==o.SyntaxKind.StringLiteral)throw new c.DiagnosticError(e,c.DiagnosticCode.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access)}function L(e){if(!o.isComputedPropertyName(e))return;let t=e.expression;if(o.isBinaryExpression(t)&&t.operatorToken.kind===o.SyntaxKind.CommaToken){let r=_.getSourceFileOfNode(e);throw new c.DiagnosticError(t,c.DiagnosticCode.A_comma_expression_is_not_allowed_in_a_computed_property_name,r)}}function M(e){let t=_.isAssignmentTarget(e),r=_.getSourceFileOfNode(e),n=new Map;for(let i of e.properties){if(o.isSpreadAssignment(i)){if(t){let e=_.skipParentheses(i.expression);if(o.isArrayLiteralExpression(e)||o.isObjectLiteralExpression(e))throw new c.DiagnosticError(i.expression,c.DiagnosticCode.A_rest_element_cannot_contain_a_binding_pattern,r)}continue}let e=i.name;if(o.isComputedPropertyName(e)&&L(e),o.isShorthandPropertyAssignment(i)&&!t&&i.objectAssignmentInitializer)throw new c.DiagnosticError(i.equalsToken,c.DiagnosticCode.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,r);if(o.isPrivateIdentifier(e))throw new c.DiagnosticError(e,c.DiagnosticCode.Private_identifiers_are_not_allowed_outside_class_bodies,r);if(i.modifiers)for(let e of i.modifiers)if(!o.isMethodDeclaration(i)||e.kind!=o.SyntaxKind.AsyncKeyword)throw new c.DiagnosticError(e,c.DiagnosticCode._0_modifier_cannot_be_used_here,r,[_.getTextOfNode(e)]);let a=R(i);if(a&&!t){let t=_.getPropertyNameForPropertyNameNode(e);if(!t||o.isComputedPropertyName(e))continue;let i=n.get(t);if(i){if(12&a&&12&i&&"___proto__"===t)throw new c.DiagnosticError(e,c.DiagnosticCode.Duplicate_identifier_0,r,[_.getTextOfNode(e)])}else n.set(t,a)}}}function R(e,t){let r;return o.isShorthandPropertyAssignment(e)?function(e){if(e){let t=_.getSourceFileOfNode(e);throw new c.DiagnosticError(e,c.DiagnosticCode.A_definite_assignment_assertion_is_not_permitted_in_this_context,t)}}(e.exclamationToken):o.isPropertyAssignment(e)?(function(e){if(e){let t=_.getSourceFileOfNode(e);throw new c.DiagnosticError(e,c.DiagnosticCode.An_object_member_cannot_be_declared_optional,t)}}(e.questionToken),r=4):o.isMethodDeclaration(e)?r=8:o.isGetAccessor(e)?(J(e),r=1):o.isSetAccessor(e)?r=2:(0,p.LOGE)("Unexpected syntax kind:"+e.kind),r}function B(e){if(e&&e.hasTrailingComma){let t=_.getSourceFileOfNode(e[0]);throw new c.DiagnosticError(e[0],c.DiagnosticCode.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma,t)}}function j(e){k(e),A(e),function(e){let t=e.length,r=!1;for(let n=0;n<t;n++){let i=e[n],a=_.getSourceFileOfNode(i);if(i.dotDotDotToken){if(n!=t-1)throw new c.DiagnosticError(i.dotDotDotToken,c.DiagnosticCode.A_rest_parameter_must_be_last_in_a_parameter_list,a);if(B(e),i.initializer)throw new c.DiagnosticError(i.name,c.DiagnosticCode.A_rest_parameter_cannot_have_an_initializer,a);if(i.questionToken)throw new c.DiagnosticError(i.questionToken,c.DiagnosticCode.A_rest_parameter_cannot_be_optional,a)}else if((0,y.isOptionalParameter)(i)){if(r=!0,i.questionToken&&i.initializer)throw new c.DiagnosticError(i.name,c.DiagnosticCode.Parameter_cannot_have_question_mark_and_initializer,a)}else if(r&&!i.initializer)throw new c.DiagnosticError(i.name,c.DiagnosticCode.A_required_parameter_cannot_follow_an_optional_parameter,a)}}(e.parameters),function(e){if(!o.isArrowFunction(e))return;const{equalsGreaterThanToken:t}=e;let r=_.getSourceFileOfNode(e);if(r.getLineAndCharacterOfPosition(t.pos).line!==r.getLineAndCharacterOfPosition(t.end).line)throw new c.DiagnosticError(t,c.DiagnosticCode.Line_terminator_not_permitted_before_arrow,r)}(e)}function J(e){if(j(e),0!=e.parameters.length)throw new c.DiagnosticError(e,c.DiagnosticCode.Getter_must_not_have_any_formal_parameters)}function V(e){let t=(0,d.getSourceFileOfNode)(e);if(o.isArrayLiteralExpression(e)){let r=e.elements;for(let e=0;e<r.length;e++){let n=r[e];if(o.isSpreadElement(n)){if(e!=r.length-1)throw new c.DiagnosticError(n,c.DiagnosticCode.A_rest_element_must_be_last_in_a_destructuring_pattern,t);if(r.hasTrailingComma)throw new c.DiagnosticError(n,c.DiagnosticCode.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma,t);(o.isArrayLiteralExpression(n.expression)||o.isObjectLiteralExpression(n.expression))&&V(n.expression)}else if(n=o.isBinaryExpression(n)?n.left:n,!o.isOmittedExpression(n)&&!o.isElementAccessExpression(n))if(o.isIdentifier(n)){let e=_.getTextOfIdentifierOrLiteral(n);if("arguments"==e||"eval"==e)throw new c.DiagnosticError(n,c.DiagnosticCode.Property_destructuring_pattern_expected,t)}else if(o.isPropertyAccessExpression(n)){if(n.questionDotToken)throw new c.DiagnosticError(n,c.DiagnosticCode.Property_destructuring_pattern_expected,t)}else{if(!o.isArrayLiteralExpression(n)&&!o.isObjectLiteralExpression(n))throw new c.DiagnosticError(n,c.DiagnosticCode.Property_destructuring_pattern_expected,t);V(n)}}}if(o.isObjectLiteralExpression(e)){let r=e.properties;for(let n=0;n<r.length;n++){let i=r[n];if(o.isSpreadAssignment(i)){if(n!=r.length-1){let t=(0,d.getSourceFileOfNode)(e);throw new c.DiagnosticError(i,c.DiagnosticCode.A_rest_element_must_be_last_in_a_destructuring_pattern,t)}}else{if(o.isPropertyAssignment(i)){let e=o.isBinaryExpression(i.initializer)?i.initializer.left:i.initializer;if(o.isIdentifier(e)||o.isElementAccessExpression(e))continue;if(o.isPropertyAccessExpression(e)){if(e.questionDotToken)throw new c.DiagnosticError(i,c.DiagnosticCode.Property_destructuring_pattern_expected,t);continue}if(o.isObjectLiteralExpression(e)||o.isArrayLiteralExpression(e)){V(e);continue}throw new c.DiagnosticError(i,c.DiagnosticCode.Property_destructuring_pattern_expected,t)}if(o.isShorthandPropertyAssignment(i)){let e=_.getTextOfIdentifierOrLiteral(i.name);if("arguments"==e||"eval"==e)throw new c.DiagnosticError(i,c.DiagnosticCode.Property_destructuring_pattern_expected,t)}else if(o.isMethodDeclaration(i)||o.isGetAccessorDeclaration(i)||o.isSetAccessorDeclaration(i))throw new c.DiagnosticError(i,c.DiagnosticCode.Property_destructuring_pattern_expected,t)}}}}function U(e){let t=e.elements;for(let r=0;r<t.length;r++){let n=t[r];if(!o.isOmittedExpression(n)&&n.dotDotDotToken){let i=(0,d.getSourceFileOfNode)(e);if(r!=t.length-1)throw new c.DiagnosticError(n,c.DiagnosticCode.A_rest_element_must_be_last_in_a_destructuring_pattern,i);if(n.initializer)throw new c.DiagnosticError(n,c.DiagnosticCode.A_rest_parameter_cannot_have_an_initializer)}}}t.checkDuplicateDeclaration=function(e){let t=e.getScopeMap();t.forEach(((r,n)=>{if((0,y.isFunctionLikeDeclaration)(n)&&((0,g.isStrictMode)(n)&&function(e,t){let r=t.getParametersOfFunction(e),n=[];r&&r.forEach((e=>{n.includes(e.name)?E(e):n.push(e.name)}))}(n,e),n.body)){let r=t.get(n.body),i=function(e,t){let r=t.getParametersOfFunction(e),n=[];if(r)return r.forEach((e=>{n.push(e.name)})),n}(n,e);r&&function(e,t){if(!e)return;let r=t.getDecls();for(let t=0;t<r.length;t++){if(r[t]instanceof f.VarDecl||r[t]instanceof f.FuncDecl)continue;let n=r[t].name;e.includes(n)&&E(r[t])}}(i,r)}n.kind==o.SyntaxKind.Block&&null!=n.parent&&n.parent.kind==o.SyntaxKind.CatchClause&&function(e,t){let r=e.getDecls(),n=t.getDecls();for(let e=0;e<n.length;e++){for(let t=e+1;t<n.length;t++)n[e].name==n[t].name&&E(n[t]);for(let t=0;t<r.length;t++)r[t]instanceof f.VarDecl||n[e].name==r[t].name&&E(r[t])}}(r,t.get(n.parent));let i=r.getDecls(),a=new Map;for(let e=0;e<i.length;e++)S(i[e],r),v(r,e),h(r,e),o.isFunctionDeclaration(i[e].node)&&r instanceof f.ModuleScope&&b(i[e],a)}))},t.checkSyntaxError=function(e){!function(e){switch(e.kind){case o.SyntaxKind.BreakStatement:case o.SyntaxKind.ContinueStatement:!function(e){let t,r=e;for(;r;){if(o.isFunctionLike(r))throw new c.DiagnosticError(e,c.DiagnosticCode.Jump_target_cannot_cross_function_boundary,_.getSourceFileOfNode(r));switch(r.kind){case o.SyntaxKind.SwitchStatement:if(e.kind===o.SyntaxKind.BreakStatement&&!e.label)return;break;case o.SyntaxKind.LabeledStatement:if(e.label&&r.label.escapedText===e.label.escapedText){let t=!1;if(e.kind!==o.SyntaxKind.ContinueStatement||_.isIterationStatement(r.statement,!0)||(t=!0),t)throw new c.DiagnosticError(e,c.DiagnosticCode.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement,_.getSourceFileOfNode(r));return}break;default:if(_.isIterationStatement(r,!1)&&!e.label)return!1}r=r.parent}throw t=e.label?e.kind==o.SyntaxKind.BreakStatement?c.DiagnosticCode.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:c.DiagnosticCode.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:e.kind==o.SyntaxKind.BreakStatement?c.DiagnosticCode.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:c.DiagnosticCode.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement,new c.DiagnosticError(e,t,_.getSourceFileOfNode(e))}(e);break;case o.SyntaxKind.ReturnStatement:!function(e){if(!_.getContainingFunction(e)){let t=_.getSourceFileOfNode(e);throw new c.DiagnosticError(e,c.DiagnosticCode.A_return_statement_can_only_be_used_within_a_function_body,t)}}(e);break;case o.SyntaxKind.ComputedPropertyName:L(e);break;case o.SyntaxKind.ObjectBindingPattern:case o.SyntaxKind.ArrayBindingPattern:U(e);break;case o.SyntaxKind.MetaProperty:!function(e){let t=_.getTextOfIdentifierOrLiteral(e.name),r=_.getSourceFileOfNode(e);switch(e.keywordToken){case o.SyntaxKind.NewKeyword:{let n=[t,_.tokenToString(e.keywordToken),"target"];if("target"!=t)throw new c.DiagnosticError(e,c.DiagnosticCode._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2,r,n);let i=(0,d.getContainingFunctionDeclaration)(e);if(!i)throw new c.DiagnosticError(e,c.DiagnosticCode.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor,r,n);if(o.isMethodDeclaration(i))throw new c.DiagnosticError(e,c.DiagnosticCode.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor,r,n);if(o.isArrowFunction(i)&&!_.getNewTargetContainer(e))throw new c.DiagnosticError(e,c.DiagnosticCode.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor,r,n);break}case o.SyntaxKind.ImportKeyword:if("meta"!=t){let n=[t,_.tokenToString(e.keywordToken),"meta"];throw new c.DiagnosticError(e,c.DiagnosticCode._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2,r,n)}}}(e);break;case o.SyntaxKind.VariableDeclaration:C(e);break;case o.SyntaxKind.VariableStatement:!function(e){k(e),A(e),N(e.declarationList),function(e){if(!(0,y.allowLetAndConstDeclarations)(e.parent)){if(_.isLet(e.declarationList))throw new c.DiagnosticError(e,c.DiagnosticCode.The_let_declarations_can_only_be_declared_inside_a_block);if(_.isVarConst(e.declarationList))throw new c.DiagnosticError(e,c.DiagnosticCode.The_const_declarations_can_only_be_declared_inside_a_block)}}(e)}(e);break;case o.SyntaxKind.ForInStatement:!function(e){F(e);let t=_.getSourceFileOfNode(e);if(o.isVariableDeclarationList(e.initializer))w(e);else{let r=e.initializer;if(o.isArrayLiteralExpression(r)||o.isObjectLiteralExpression(r))throw new c.DiagnosticError(r,c.DiagnosticCode.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern,t)}}(e);break;case o.SyntaxKind.ForOfStatement:!function(e){if(F(e),o.isVariableDeclarationList(e.initializer))w(e);else{let t=e.initializer;o.isArrayLiteralExpression(t)||o.isObjectLiteralExpression(t)?function(e){let t;t=o.isShorthandPropertyAssignment(e)?e.name:e,o.isBinaryExpression(t)&&t.operatorToken.kind===o.SyntaxKind.EqualsToken&&(I(t),t=t.left),o.isObjectLiteralExpression(t)&&M(t),function(e){let t,r;o.isSpreadAssignment(e.parent)?(t=c.DiagnosticCode.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access,r=c.DiagnosticCode.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access):(t=c.DiagnosticCode.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access,r=c.DiagnosticCode.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access),P(e,t,r)}(t)}(t):P(t,c.DiagnosticCode.The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access,c.DiagnosticCode.The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access)}}(e);break;case o.SyntaxKind.ClassDeclaration:case o.SyntaxKind.ClassExpression:!function(e){!function(e){let t=!1;if(k(e),A(e),null==e.heritageClauses)return;let r=_.getSourceFileOfNode(e);for(let n of e.heritageClauses)if(n.token==o.SyntaxKind.ExtendsKeyword){if(t)throw new c.DiagnosticError(n,c.DiagnosticCode.The_extends_clause_already_seen,r);if(n.types.length>1)throw new c.DiagnosticError(n,c.DiagnosticCode.Classes_can_only_extend_a_single_class);t=!0}}(e);let t=!1,r=_.getSourceFileOfNode(e);if(e.members.forEach((n=>{switch(n.kind){case o.SyntaxKind.Constructor:if(t)throw new c.DiagnosticError(e,c.DiagnosticCode.Multiple_constructor_implementations_are_not_allowed,r);t=!0;break;case o.SyntaxKind.MethodDeclaration:case o.SyntaxKind.SetAccessor:j(n);break;case o.SyntaxKind.GetAccessor:J(n)}})),(0,y.isStatement)(e.parent.kind))throw new c.DiagnosticError(e,c.DiagnosticCode.Class_declaration_not_allowed_in_statement_position,r)}(e);break;case o.SyntaxKind.SuperKeyword:!function(e){let t=_.getSourceFileOfNode(e),r=!1;o.isCallExpression(e.parent)&&e.parent.expression===e&&(r=!0);let n=_.getSuperContainer(e,!0);if(!r)for(;n&&o.isArrowFunction(n);)n=_.getSuperContainer(n,!0);if(!function(e,t){return!!e&&(t?o.isConstructorDeclaration(e):!(!o.isClassLike(e.parent)&&!o.isObjectLiteralExpression(e.parent))&&(o.isMethodDeclaration(e)||o.isMethodSignature(e)||o.isGetAccessor(e)||o.isSetAccessor(e)||o.isPropertyDeclaration(e)||o.isPropertySignature(e)||o.isConstructorDeclaration(e)))}(n,r)){let i=_.findAncestor(e,(e=>e===n?"quit":o.isComputedPropertyName(e)));if(i&&o.isComputedPropertyName(i))throw new c.DiagnosticError(e,c.DiagnosticCode.The_super_cannot_be_referenced_in_a_computed_property_name,t);if(_.findAncestor(e,o.isConstructorDeclaration))return;if(r)throw new c.DiagnosticError(e,c.DiagnosticCode.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors,t);if(!n||!n.parent||!o.isClassLike(n.parent)||o.isObjectLiteralExpression(n.parent))throw new c.DiagnosticError(e,c.DiagnosticCode.The_super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions,t);throw new c.DiagnosticError(e,c.DiagnosticCode.The_super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class,t)}}(e);break;case o.SyntaxKind.BinaryExpression:I(e);break;case o.SyntaxKind.Identifier:!function(e){if(_.isIdentifierName(e))return;let t=_.getSourceFileOfNode(e);if(e.originalKeywordKind===o.SyntaxKind.AwaitKeyword){if(_.isExternalOrCommonJsModule(t)&&_.isInTopLevelContext(e))throw new c.DiagnosticError(e,c.DiagnosticCode.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module,t,_.declarationNameToString(e));if(e.flags&o.NodeFlags.AwaitContext)throw new c.DiagnosticError(e,c.DiagnosticCode.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,t,_.declarationNameToString(e))}else if(e.originalKeywordKind===o.SyntaxKind.YieldKeyword&&e.flags&o.NodeFlags.YieldContext)throw new c.DiagnosticError(e,c.DiagnosticCode.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here,t,_.declarationNameToString(e))}(e);break;case o.SyntaxKind.ObjectLiteralExpression:M(e);break;case o.SyntaxKind.FunctionDeclaration:case o.SyntaxKind.MethodSignature:case o.SyntaxKind.MethodDeclaration:case o.SyntaxKind.SetAccessor:case o.SyntaxKind.Constructor:case o.SyntaxKind.FunctionExpression:case o.SyntaxKind.ArrowFunction:j(e);break;case o.SyntaxKind.GetAccessor:J(e);break;case o.SyntaxKind.LabeledStatement:!function(e){let t=_.getSourceFileOfNode(e);_.findAncestor(e.parent,(r=>{if(_.isFunctionLike(r))return"quit";if(o.isLabeledStatement(r)&&r.label.escapedText===e.label.escapedText)throw new c.DiagnosticError(e.label,c.DiagnosticCode.Duplicate_label_0,t,[_.getTextOfNode(e.label)]);return!1}));let r=e.statement;if(o.isVariableStatement(r)){let t=r;if(_.isLet(t.declarationList))throw new c.DiagnosticError(e,c.DiagnosticCode.Lexical_declaration_let_not_allowed_in_statement_position);if(_.isVarConst(t.declarationList))throw new c.DiagnosticError(e,c.DiagnosticCode.Lexical_declaration_const_not_allowed_in_statement_position)}}(e);break;case o.SyntaxKind.ThrowStatement:!function(e){if(o.isIdentifier(e.expression)&&""===e.expression.text)throw new c.DiagnosticError(e,c.DiagnosticCode.Line_break_not_permitted_here,_.getSourceFileOfNode(e))}(e)}}(e),((0,g.isStrictMode)(e)||s.CmdOptions.isModules())&&(0,m.checkSyntaxErrorForStrictMode)(e)},t.checkExportEntries=function(e){let t=e.getExportStmts(),r=new Set;t.forEach((e=>{e.getBindingNameMap().forEach(((t,n)=>{if(r.has(n))throw new c.DiagnosticError(e.getNode(),c.DiagnosticCode.Duplicate_identifier_0,_.getSourceFileOfNode(e.getNode()),[n]);r.add(n)}))}))}},"./src/syntaxCheckerForStrcitMode.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.checkSyntaxErrorForStrictMode=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/cmdOptions.ts"),c=r("./src/diagnostic.ts"),l=r("./src/expression/parenthesizedExpression.ts"),u=a(r("./src/jshelpers.js")),_=r("./src/strictMode.ts"),d=r("./src/syntaxCheckHelper.ts");function p(e,t){if((0,d.isIncludeOctalEscapeSequence)(t))throw new c.DiagnosticError(e,c.DiagnosticCode.Octal_escape_sequences_are_not_allowed_in_strict_mode);if((0,d.isIncludeOctalEscapeSequence)(t))throw new c.DiagnosticError(e,c.DiagnosticCode._8_and_9_are_not_allowed_in_strict_mode)}function f(e,t){if(!t||!o.isIdentifier(t))return;let r=t;if(!(0,d.isEvalOrArgumentsIdentifier)(r)&&!(0,d.isOriginalKeyword)(r))return;let n=u.getSourceFileOfNode(t),i=[o.idText(r)];throw new c.DiagnosticError(t,(a=e,u.getContainingClass(a)?c.DiagnosticCode.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode:c.DiagnosticCode.Invalid_use_of_0_in_strict_mode),n,i);var a}function g(e){let t=e.parameters,r=new Map;for(let n=0;n<t.length;n++){let i=t[n];f(i,i.name);let a=u.getTextOfIdentifierOrLiteral(i.name);if(r.has(a)){let e=[u.declarationNameToString(i.name)];throw new c.DiagnosticError(i.name,c.DiagnosticCode.Duplicate_identifier_0,void 0,e)}if(a&&r.set(a,!0),(i.initializer||i.dotDotDotToken)&&(0,_.checkStrictModeStatementList)(e))throw new c.DiagnosticError(i,c.DiagnosticCode.use_strict_directive_cannot_be_used_with_non_simple_parameter_list)}}t.checkSyntaxErrorForStrictMode=function(e){switch(e.kind){case o.SyntaxKind.NumericLiteral:!function(e){let t=u.getTextOfNode(e);if((0,d.isOctalNumber)(t))throw new c.DiagnosticError(e,c.DiagnosticCode.Octal_literals_are_not_allowed_in_strict_mode)}(e);break;case o.SyntaxKind.StringLiteral:!function(e){(0,d.stringLiteralIsInRegExp)(e)||p(e,u.getTextOfNode(e))}(e);break;case o.SyntaxKind.FunctionDeclaration:!function(e){if(f(e,e.name),g(e),!(0,d.isInBlockScope)(e.parent))throw new c.DiagnosticError(e,c.DiagnosticCode.In_strict_mode_code_functions_can_only_be_declared_at_top_level_or_inside_a_block)}(e);break;case o.SyntaxKind.FunctionExpression:let t=e;f(t,t.name),g(t);break;case o.SyntaxKind.SetAccessor:case o.SyntaxKind.ArrowFunction:g(e);break;case o.SyntaxKind.VariableDeclaration:case o.SyntaxKind.BindingElement:f(e,e.name);break;case o.SyntaxKind.BinaryExpression:!function(e){if(!(0,d.isLeftHandSideExpression)(e.left)||!(0,d.isAssignmentOperator)(e.operatorToken.kind))return;let t=e,r=e.left;switch(e.left.kind){case o.SyntaxKind.ParenthesizedExpression:{let n=(0,l.findInnerExprOfParenthesis)(e.left);t=n,r=n;break}}f(t,r)}(e);break;case o.SyntaxKind.PrefixUnaryExpression:case o.SyntaxKind.PostfixUnaryExpression:f(e,e.operand);break;case o.SyntaxKind.DeleteExpression:!function(e){let t=e.expression;if(o.isIdentifier(t))throw new c.DiagnosticError(t,c.DiagnosticCode.A_delete_cannot_be_called_on_an_identifier_in_strict_mode)}(e);break;case o.SyntaxKind.WithStatement:!function(e){let t=u.getSourceFileOfNode(e);throw new c.DiagnosticError(e,c.DiagnosticCode.A_with_statements_are_not_allowed_in_strict_mode,t)}(e);break;case o.SyntaxKind.Identifier:!function(e){let t=u.getSourceFileOfNode(e);if("await"==u.getTextOfIdentifierOrLiteral(e)&&s.CmdOptions.isModules())throw new c.DiagnosticError(e,c.DiagnosticCode.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module,t,["await"]);if(!u.isIdentifierName(e)&&(0,d.isOriginalKeyword)(e))throw new c.DiagnosticError(e,function(e){return u.getContainingClass(e)?c.DiagnosticCode.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:c.DiagnosticCode.Identifier_expected_0_is_a_reserved_word_in_strict_mode}(e),t,u.declarationNameToString(e))}(e);break;case o.SyntaxKind.NoSubstitutionTemplateLiteral:case o.SyntaxKind.FirstTemplateToken:case o.SyntaxKind.LastLiteralToken:!function(e){let t=u.getTextOfNode(e);p(e,t.substring(1,t.length-1))}(e)}}},"./src/ts2panda.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ts2Panda=void 0;const n=r("./src/cmdOptions.ts"),i=r("./src/irnodes.ts"),a=r("./src/log.ts"),o=r("./src/pandagen.ts"),s=r("./src/pandasm.ts"),c=r("./src/statement/tryStatement.ts"),l=r("./src/base/util.ts"),u=r("./src/compilerDriver.ts"),_=/\$/g;class d{constructor(){}static getFuncSignature(e){return new s.Signature(e.getParametersCount())}static getFuncInsnsAndRegsNum(e){let t=[],r=[];return e.getInsns().forEach((e=>{let n=e.kind>=i.IRNodeKind.VREG?void 0:e.kind,a=[],o=[],c=[],u="";if(e instanceof i.Label)u=d.labelPrefix+e.id,r.push(u);else if((0,l.isRangeInst)(e)){let t=e.operands;c.push(t[0].value),a.push(t[1].num),2==(0,l.getRangeStartVregPos)(e)&&a.push(t[2].num)}else e.operands.forEach((e=>{if(e instanceof i.VReg){let t=e;a.push(t.num)}else if(e instanceof i.Imm){let t=e;c.push(t.value)}else if("string"==typeof e)o.push(e),d.strings.add(e);else if(e instanceof i.Label){let t=d.labelPrefix+e.id;o.push(t)}}));e.debugPosInfo.ClearNodeKind(),t.push(new s.Ins(n,0==a.length?void 0:a,0==o.length?void 0:o,0==c.length?void 0:c,""===u?void 0:u,e.debugPosInfo))})),{insns:t,regsNum:e.getTotalRegsNum()-e.getParametersCount(),labels:0==r.length?void 0:r}}static dumpStringsArray(e){let t={t:2,s:Array.from(d.strings)},r=(0,l.escapeUnicode)(JSON.stringify(t,null,2));r="$"+r.replace(_,"#$")+"$",n.CmdOptions.isEnableDebugLog()&&(d.jsonString+=r),e.stdio[3].write(r+"\n")}static dumpTypeLiteralArrayBuffer(){var e;let t=o.PandaGen.getLiteralArrayBuffer(),r="",n=null===(e=t[0].getLiteral(1))||void 0===e?void 0:e.getValue();if(n)for(let e=0;e<n;e++)r+=(0,l.escapeUnicode)(JSON.stringify(t[1+e],null,2));return r}static dumpConstantPool(e){let t=o.PandaGen.getLiteralArrayBuffer();if(n.CmdOptions.enableTypeLog()){console.log("-------- LiteralArrayBuffer --------");for(let e of o.PandaGen.getLiteralArrayBuffer())console.log(JSON.parse(JSON.stringify(e)))}t.forEach((function(t){let r={t:3,lit_arr:t},i=(0,l.escapeUnicode)(JSON.stringify(r,null,2));i="$"+i.replace(_,"#$")+"$",n.CmdOptions.isEnableDebugLog()&&(d.jsonString+=i),e.stdio[3].write(i+"\n")}))}static dumpCmdOptions(e){let t={t:4,module_mode:n.CmdOptions.isModules(),debug_mode:n.CmdOptions.isDebugMode(),log_enabled:n.CmdOptions.isEnableDebugLog(),opt_level:n.CmdOptions.getOptLevel(),opt_log_level:n.CmdOptions.getOptLogLevel()},r=JSON.stringify(t,null,2);r="$"+r.replace(_,"#$")+"$",n.CmdOptions.isEnableDebugLog()&&(d.jsonString+=r),e.stdio[3].write(r+"\n")}static dumpPandaGen(e,t,r){let i,p,f,g,m,y,h=e.internalName,v=d.getFuncSignature(e),b=d.getFuncInsnsAndRegsNum(e),x=e.getSourceFileDebugInfo(),D=e.getCallType(),S=e.getLocals();if(n.CmdOptions.needRecordType()&&u.CompilerDriver.isTsFile&&(i=new Array,S.forEach((e=>{i.push(e.getTypeIndex()),n.CmdOptions.enableTypeLog()&&(console.log("---------------------------------------"),console.log("- vreg name:",e.getVariableName()),console.log("- vreg local num:",e.num),console.log("- vreg type:",e.getTypeIndex()))})),"func_main_0"==h)){let e=o.PandaGen.getExportedTypes(),t=o.PandaGen.getDeclaredTypes();0!=e.size&&(p=new Array,e.forEach(((e,t)=>{let r=new s.ExportedSymbol2Type(t,e);p.push(r)}))),0!=t.size&&(f=new Array,t.forEach(((e,t)=>{let r=new s.DeclaredSymbol2Type(t,e);f.push(r)})))}n.CmdOptions.isDebugMode()?(g=e.getVariableDebugInfoArray(),m=e.getSourceCodeDebugInfo()):(g=void 0,m=void 0);let E=(0,c.generateCatchTables)(e.getCatchMap());E?(y=[],E.forEach((e=>{let t=e.getCatchBeginLabel();e.getLabelPairs().forEach((e=>{y.push(new s.CatchTable(d.labelPrefix+e.getBeginLabel().id,d.labelPrefix+e.getEndLabel().id,d.labelPrefix+t.id))}))}))):y=void 0;let T=new s.Function(h,v,b.regsNum,b.insns,b.labels,g,y,x,m,D,i,p,f);(0,a.LOGD)(T);let C={t:0,fb:T},k=(0,l.escapeUnicode)(JSON.stringify(C,null,2));k="$"+k.replace(_,"#$")+"$",n.CmdOptions.isEnableDebugLog()&&(d.jsonString+=k),t.stdio[3].write(k+"\n")}static clearDumpData(){d.strings.clear(),d.jsonString=""}}t.Ts2Panda=d,d.strings=new Set,d.labelPrefix="L_",d.jsonString=""},"./src/typeChecker.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.TypeChecker=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/base/typeSystem.ts"),c=a(r("./src/jshelpers.js")),l=r("./src/log.ts"),u=r("./src/strictMode.ts"),_=r("./src/typeRecorder.ts");class d{constructor(){this.compiledTypeChecker=null}static getInstance(){return d.instance||(d.instance=new d),d.instance}setTypeChecker(e){this.compiledTypeChecker=e}getTypeChecker(){return this.compiledTypeChecker}getTypeAtLocation(e){if(e)try{return this.compiledTypeChecker.getTypeAtLocation(e)}catch(t){return void(0,l.LOGD)("Get getTypeAtLocation filed for : "+e.getFullText())}}getTypeDeclForIdentifier(e){if(!e)return;let t;try{t=this.compiledTypeChecker.getSymbolAtLocation(e)}catch(t){return void(0,l.LOGD)("Get getSymbolAtLocation filed for : "+e.getFullText())}return t&&t.declarations?t.declarations[0]:void 0}hasExportKeyword(e){if(e.modifiers)for(let t of e.modifiers)if(t.kind===o.SyntaxKind.ExportKeyword)return!0;return!1}hasDeclareKeyword(e){if(e.modifiers)for(let t of e.modifiers)if(t.kind===o.SyntaxKind.DeclareKeyword)return!0;return!1}getDeclNodeForInitializer(e){switch(e.kind){case o.SyntaxKind.Identifier:return this.getTypeDeclForIdentifier(e);case o.SyntaxKind.NewExpression:let t=e.expression;return t.kind==o.SyntaxKind.ClassExpression?t:this.getTypeDeclForIdentifier(t);case o.SyntaxKind.ClassExpression:case o.SyntaxKind.PropertyAccessExpression:return e;default:return}}getTypeForClassDeclOrExp(e,t){let r=_.TypeRecorder.getInstance().tryGetTypeIndex(e);return r==s.PrimitiveType.ANY&&(r=new s.ClassType(e).shiftedTypeIndex),t&&(_.TypeRecorder.getInstance().hasClass2InstanceMap(r)||new s.ClassInstType(r),r=_.TypeRecorder.getInstance().getClass2InstanceMap(r)),r}getTypeForPropertyAccessExpression(e){let t=e,r=c.getTextOfIdentifierOrLiteral(t.expression),n=c.getTextOfIdentifierOrLiteral(t.name);if(_.TypeRecorder.getInstance().inNampespaceMap(r)){let e=_.TypeRecorder.getInstance().getPathForNamespace(r);return new s.ExternalType(n,e).shiftedTypeIndex}return s.PrimitiveType.ANY}getInterfaceDeclaration(e){let t=_.TypeRecorder.getInstance().tryGetTypeIndex(e);return t==s.PrimitiveType.ANY&&(t=new s.InterfaceType(e).shiftedTypeIndex),t}getTypeFromDecl(e,t){if(!e)return s.PrimitiveType.ANY;switch(e.kind){case o.SyntaxKind.ClassDeclaration:case o.SyntaxKind.ClassExpression:return this.getTypeForClassDeclOrExp(e,t);case o.SyntaxKind.ImportSpecifier:case o.SyntaxKind.ImportClause:let r=_.TypeRecorder.getInstance().tryGetTypeIndex(e);return r!=s.PrimitiveType.ANY?r:s.PrimitiveType.ANY;case o.SyntaxKind.PropertyAccessExpression:return this.getTypeForPropertyAccessExpression(e);case o.SyntaxKind.InterfaceDeclaration:return this.getInterfaceDeclaration(e);default:return s.PrimitiveType.ANY}}getTypeFromAnotation(e){if(!e)return s.PrimitiveType.ANY;switch(e.kind){case o.SyntaxKind.StringKeyword:case o.SyntaxKind.NumberKeyword:case o.SyntaxKind.BooleanKeyword:case o.SyntaxKind.SymbolKeyword:case o.SyntaxKind.UndefinedKeyword:case o.SyntaxKind.VoidKeyword:case o.SyntaxKind.LiteralType:let t=e.getText().toUpperCase(),r=s.PrimitiveType.ANY;return t&&t in s.PrimitiveType&&(r=s.PrimitiveType[t]),r;case o.SyntaxKind.UnionType:return new s.UnionType(e).shiftedTypeIndex;case o.SyntaxKind.ArrayType:return new s.ArrayType(e).shiftedTypeIndex;case o.SyntaxKind.ParenthesizedType:let n=e.type;return n.kind==o.SyntaxKind.UnionType?new s.UnionType(n).shiftedTypeIndex:s.PrimitiveType.ANY;case o.SyntaxKind.TypeLiteral:return new s.ObjectType(e).shiftedTypeIndex;default:return s.PrimitiveType.ANY}}getOrCreateRecordForDeclNode(e,t){if(!e)return s.PrimitiveType.ANY;let r=s.PrimitiveType.ANY,n=this.getDeclNodeForInitializer(e);return r=this.getTypeFromDecl(n,e.kind==o.SyntaxKind.NewExpression),t&&_.TypeRecorder.getInstance().setVariable2Type(t,r),r}getOrCreateRecordForTypeNode(e,t){if(!e)return s.PrimitiveType.ANY;let r=s.PrimitiveType.ANY;if(r=this.getTypeFromAnotation(e),r==s.PrimitiveType.ANY&&e.kind==o.SyntaxKind.TypeReference){let t=e.getChildAt(0),n=this.getDeclNodeForInitializer(t);r=this.getTypeFromDecl(n,!0)}return t&&_.TypeRecorder.getInstance().setVariable2Type(t,r),r}formatVariableStatement(e){e.declarationList.declarations.forEach((t=>{let r=t.name,n=t.type,i=t.initializer,a=this.getOrCreateRecordForTypeNode(n,r);if(a==s.PrimitiveType.ANY&&(a=this.getOrCreateRecordForDeclNode(i,r)),this.hasExportKeyword(e)&&a!=s.PrimitiveType.ANY){let e=c.getTextOfIdentifierOrLiteral(r);_.TypeRecorder.getInstance().setExportedType(e,a)}}))}formatClassDeclaration(e){let t=new s.ClassType(e).shiftedTypeIndex,r=e.name,n="default";r&&(n=c.getTextOfIdentifierOrLiteral(r)),this.hasExportKeyword(e)?_.TypeRecorder.getInstance().setExportedType(n,t):this.hasDeclareKeyword(e)&&(0,u.isGlobalDeclare)()&&_.TypeRecorder.getInstance().setDeclaredType(n,t)}formatNodeType(e,t){if(null!==this.compiledTypeChecker)switch(e.kind){case o.SyntaxKind.VariableStatement:let r=o.getOriginalNode(e);this.formatVariableStatement(r);break;case o.SyntaxKind.FunctionDeclaration:let n=o.getOriginalNode(e),i=n.name?n.name:void 0,a=new s.FunctionType(n);i&&_.TypeRecorder.getInstance().setVariable2Type(i,a.shiftedTypeIndex);break;case o.SyntaxKind.ClassDeclaration:let l=o.getOriginalNode(e);(this.hasExportKeyword(e)||this.hasDeclareKeyword(e))&&this.formatClassDeclaration(l);break;case o.SyntaxKind.InterfaceDeclaration:if((0,u.isGlobalDeclare)()){let t=o.getOriginalNode(e),r=new s.InterfaceType(t),n=t.name;if(n){let e=c.getTextOfIdentifierOrLiteral(n);_.TypeRecorder.getInstance().setDeclaredType(e,r.shiftedTypeIndex)}}break;case o.SyntaxKind.ExportDeclaration:t&&_.TypeRecorder.getInstance().addExportedType(t);break;case o.SyntaxKind.ImportDeclaration:t&&_.TypeRecorder.getInstance().addImportedType(t);break;case o.SyntaxKind.ExportAssignment:let d=e.expression,p="default",f=this.getTypeAtLocation(d);if(f){let e=f.getSymbol().valueDeclaration;_.TypeRecorder.getInstance().addNonReExportedType(p,e,d)}}}}t.TypeChecker=d},"./src/typeRecorder.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.TypeRecorder=void 0;const o=a(r("./node_modules/typescript/lib/typescript.js")),s=r("./src/base/typeSystem.ts"),c=a(r("./src/jshelpers.js")),l=r("./src/typeChecker.ts");class u{constructor(){this.type2Index=new Map,this.variable2Type=new Map,this.userDefinedTypeSet=new Set,this.typeSummary=new s.TypeSummary,this.class2InstanceMap=new Map,this.arrayTypeMap=new Map,this.unionTypeMap=new Map,this.exportedType=new Map,this.declaredType=new Map,this.namespaceMap=new Map,this.anonymousReExport=new Array}static getInstance(){return u.instance}static createInstance(){return u.instance=new u,u.instance}setTypeSummary(){this.typeSummary.setInfo(this.countUserDefinedTypeSet(),this.anonymousReExport)}addUserDefinedTypeSet(e){this.userDefinedTypeSet.add(e)}countUserDefinedTypeSet(){return this.userDefinedTypeSet.size}addType2Index(e,t){this.type2Index.set(e,t),this.addUserDefinedTypeSet(t)}setVariable2Type(e,t){this.variable2Type.set(e,t),t>s.PrimitiveType._LENGTH&&this.addUserDefinedTypeSet(t)}hasType(e){return this.type2Index.has(e)}tryGetTypeIndex(e){return this.type2Index.has(e)?this.type2Index.get(e):s.PrimitiveType.ANY}tryGetVariable2Type(e){return this.variable2Type.has(e)?this.variable2Type.get(e):s.PrimitiveType.ANY}setArrayTypeMap(e,t){this.arrayTypeMap.set(e,t)}hasArrayTypeMapping(e){return this.arrayTypeMap.has(e)}getFromArrayTypeMap(e){return this.arrayTypeMap.get(e)}setUnionTypeMap(e,t){this.unionTypeMap.set(e,t)}hasUnionTypeMapping(e){return this.unionTypeMap.has(e)}getFromUnionTypeMap(e){return this.unionTypeMap.get(e)}setClass2InstanceMap(e,t){this.class2InstanceMap.set(e,t)}hasClass2InstanceMap(e){return this.class2InstanceMap.has(e)}getClass2InstanceMap(e){return this.class2InstanceMap.get(e)}addImportedType(e){if(e.getBindingNodeMap().forEach(((t,r)=>{let n=c.getTextOfIdentifierOrLiteral(t),i=l.TypeChecker.getInstance().getTypeDeclForIdentifier(r),a=new s.ExternalType(n,e.getModuleRequest());this.addType2Index(i,a.shiftedTypeIndex),this.setVariable2Type(r,a.shiftedTypeIndex)})),""!=e.getNameSpace()){this.setNamespaceMap(e.getNameSpace(),e.getModuleRequest());let t=new s.ExternalType("*",e.getNameSpace()).shiftedTypeIndex;this.addUserDefinedTypeSet(t)}}addExportedType(e){if(""!=e.getModuleRequest())if(""!=e.getNameSpace()){let t=new s.ExternalType("*",e.getModuleRequest()).shiftedTypeIndex;this.setExportedType(e.getNameSpace(),t),this.addUserDefinedTypeSet(t)}else 0!=e.getBindingNameMap().size?e.getBindingNameMap().forEach(((t,r)=>{let n=new s.ExternalType(t,e.getModuleRequest()).shiftedTypeIndex;this.setExportedType(r,n),this.addUserDefinedTypeSet(n)})):this.addAnonymousReExport(e.getModuleRequest());else e.getBindingNodeMap().forEach(((e,t)=>{var r;let n=c.getTextOfIdentifierOrLiteral(t),i=null===(r=l.TypeChecker.getInstance().getTypeAtLocation(e).getSymbol())||void 0===r?void 0:r.valueDeclaration;i&&this.addNonReExportedType(n,i,e)}))}addNonReExportedType(e,t,r){let n=this.tryGetTypeIndex(t),i=this.tryGetVariable2Type(t);if(n!=s.PrimitiveType.ANY)this.setExportedType(e,n);else if(i!=s.PrimitiveType.ANY)this.setExportedType(e,i);else{let n=l.TypeChecker.getInstance().getTypeFromDecl(t,r.kind==o.SyntaxKind.NewExpression);this.setExportedType(e,n)}}setExportedType(e,t){this.exportedType.set(e,t)}setDeclaredType(e,t){this.declaredType.set(e,t)}addAnonymousReExport(e){this.anonymousReExport.push(e)}setNamespaceMap(e,t){this.namespaceMap.set(e,t)}inNampespaceMap(e){return this.namespaceMap.has(e)}getPathForNamespace(e){return this.namespaceMap.get(e)}getType2Index(){return this.type2Index}getVariable2Type(){return this.variable2Type}getTypeSet(){return this.userDefinedTypeSet}getExportedType(){return this.exportedType}getDeclaredType(){return this.declaredType}getAnonymousReExport(){return this.anonymousReExport}getNamespaceMap(){return this.namespaceMap}printNodeMap(e){e.forEach(((e,t)=>{console.log(c.getTextOfNode(t)+": "+e)}))}printExportMap(e){e.forEach(((e,t)=>{console.log(t+" : "+e)}))}printReExportMap(e){e.forEach(((e,t)=>{console.log(t+" : "+e)}))}getLog(){console.log("type2Index: "),console.log(this.printNodeMap(this.getType2Index())),console.log("variable2Type: "),console.log(this.printNodeMap(this.getVariable2Type())),console.log("getTypeSet: "),console.log(this.getTypeSet()),console.log("class instance Map:"),console.log(this.class2InstanceMap),console.log("exportedType:"),console.log(this.printExportMap(this.getExportedType())),console.log("AnoymousRedirect:"),console.log(this.getAnonymousReExport()),console.log("namespace Map:"),console.log(this.getNamespaceMap())}}t.TypeRecorder=u},"./src/variable.ts":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalVariable=t.LocalVariable=t.Variable=t.VarDeclarationKind=void 0;const n=r("./src/scope.ts");var i;!function(e){e[e.NONE=0]="NONE",e[e.LET=1]="LET",e[e.CONST=2]="CONST",e[e.VAR=3]="VAR",e[e.FUNCTION=4]="FUNCTION",e[e.MODULE=5]="MODULE",e[e.CLASS=6]="CLASS"}(i=t.VarDeclarationKind||(t.VarDeclarationKind={}));class a{constructor(e,t){this.declKind=e,this.isLexVar=!1,this.idxLex=0,this.name=t,this.vreg=void 0,this.typeIndex=0}bindVreg(e){this.vreg=e,this.vreg.setTypeIndex(this.typeIndex),this.vreg.setVariableName(this.name)}hasAlreadyBinded(){return void 0!==this.vreg}getVreg(){if(!this.vreg)throw new Error("variable has not been binded");return this.vreg}getName(){return this.name}getTypeIndex(){return this.typeIndex}setTypeIndex(e){return this.typeIndex=e}setLexVar(e){return this.idxLex=e.getLexVarIdx(),e.pendingCreateEnv(),this.isLexVar=!0,this.idxLex}clearLexVar(){this.isLexVar=!1,this.idxLex=0}isLet(){return this.declKind==i.LET}isConst(){return this.declKind==i.CONST}isLetOrConst(){return this.declKind==i.LET||this.declKind==i.CONST}isVar(){return this.declKind==i.VAR}isNone(){return this.declKind==i.NONE}isClass(){return this.declKind==i.CLASS}}t.Variable=a,t.LocalVariable=class extends a{constructor(e,t,r){super(e,t),this.isExport=!1,this.exportedName="",this.status=r||null}initialize(){this.status=n.InitStatus.INITIALIZED}isInitialized(){return null==this.status||this.status==n.InitStatus.INITIALIZED}setExport(){this.isExport=!0}isExportVar(){return this.isExport}setExportedName(e){this.exportedName=e}getExportedName(){if(!this.exportedName)throw new Error("Exported Variable "+this.getName()+" doesn't have exported name");return this.exportedName}},t.GlobalVariable=class extends a{constructor(e,t){super(e,t)}}},"./node_modules/typescript/lib/typescript.js":function(e,t,r){"use strict";var n,i=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,a=t.length;i<a;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)},o=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},s=this&&this.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},c=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},l=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});!function(e){function t(){var e={};return e.prev=e,{head:e,tail:e,size:0}}function r(e,t){return e===t||e!=e&&t!=t}function n(e){var t=e.prev;if(!t||t===e)throw new Error("Illegal state");return t}function i(e){for(;e;){var t=!e.prev;if(e=e.next,!t)return e}}function a(e,t){for(var i=e.tail;i!==e.head;i=n(i))if(r(i.key,t))return i}function o(e,t,r){var n=a(e,t);if(!n){var i=function(e,t){return{key:e,value:t,next:void 0,prev:void 0}}(t,r);return i.prev=e.tail,e.tail.next=i,e.tail=i,e.size++,i}n.value=r}function s(e,t){for(var i=e.tail;i!==e.head;i=n(i)){if(void 0===i.prev)throw new Error("Illegal state");if(r(i.key,t)){if(i.next)i.next.prev=i.prev;else{if(e.tail!==i)throw new Error("Illegal state");e.tail=i.prev}return i.prev.next=i.next,i.next=i.prev,i.prev=void 0,e.size--,i}}}function c(e){for(var t=e.tail;t!==e.head;){var r=n(t);t.next=e.head,t.prev=void 0,t=r}e.head.next=void 0,e.tail=e.head,e.size=0}function l(e,t){for(var r=e.head;r;)(r=i(r))&&t(r.value,r.key)}function u(e,t){if(e)for(var r=e.next();!r.done;r=e.next())t(r.value)}function _(e,t){return{current:e.head,selector:t}}function d(e){return e.current=i(e.current),e.current?{value:e.selector(e.current.key,e.current.value),done:!1}:{value:void 0,done:!0}}var p;(p=e.ShimCollections||(e.ShimCollections={})).createMapShim=function(e){var r=function(){function e(e,t){this._data=_(e,t)}return e.prototype.next=function(){return d(this._data)},e}();return function(){function n(r){var n=this;this._mapData=t(),u(e(r),(function(e){var t=e[0],r=e[1];return n.set(t,r)}))}return Object.defineProperty(n.prototype,"size",{get:function(){return this._mapData.size},enumerable:!1,configurable:!0}),n.prototype.get=function(e){var t;return null===(t=a(this._mapData,e))||void 0===t?void 0:t.value},n.prototype.set=function(e,t){return o(this._mapData,e,t),this},n.prototype.has=function(e){return!!a(this._mapData,e)},n.prototype.delete=function(e){return!!s(this._mapData,e)},n.prototype.clear=function(){c(this._mapData)},n.prototype.keys=function(){return new r(this._mapData,(function(e,t){return e}))},n.prototype.values=function(){return new r(this._mapData,(function(e,t){return t}))},n.prototype.entries=function(){return new r(this._mapData,(function(e,t){return[e,t]}))},n.prototype.forEach=function(e){l(this._mapData,e)},n}()},p.createSetShim=function(e){var r=function(){function e(e,t){this._data=_(e,t)}return e.prototype.next=function(){return d(this._data)},e}();return function(){function n(r){var n=this;this._mapData=t(),u(e(r),(function(e){return n.add(e)}))}return Object.defineProperty(n.prototype,"size",{get:function(){return this._mapData.size},enumerable:!1,configurable:!0}),n.prototype.add=function(e){return o(this._mapData,e,e),this},n.prototype.has=function(e){return!!a(this._mapData,e)},n.prototype.delete=function(e){return!!s(this._mapData,e)},n.prototype.clear=function(){c(this._mapData)},n.prototype.keys=function(){return new r(this._mapData,(function(e,t){return e}))},n.prototype.values=function(){return new r(this._mapData,(function(e,t){return t}))},n.prototype.entries=function(){return new r(this._mapData,(function(e,t){return[e,t]}))},n.prototype.forEach=function(e){l(this._mapData,e)},n}()}}(u||(u={})),function(e){var t,r;e.versionMajorMinor="4.4",e.version="4.4.3",(r=e.Comparison||(e.Comparison={}))[r.LessThan=-1]="LessThan",r[r.EqualTo=0]="EqualTo",r[r.GreaterThan=1]="GreaterThan",(t=e.NativeCollections||(e.NativeCollections={})).tryGetNativeMap=function(){return"undefined"!=typeof Map&&"entries"in Map.prototype&&1===new Map([[0,0]]).size?Map:void 0},t.tryGetNativeSet=function(){return"undefined"!=typeof Set&&"entries"in Set.prototype&&1===new Set([0]).size?Set:void 0}}(u||(u={})),function(e){function t(t,n,i){var a,o=null!==(a=e.NativeCollections[n]())&&void 0!==a?a:null===e.ShimCollections||void 0===e.ShimCollections?void 0:e.ShimCollections[i](r);if(o)return o;throw new Error("TypeScript requires an environment that provides a compatible native "+t+" implementation.")}function r(t){if(t){if(A(t))return g(t);if(t instanceof e.Map)return t.entries();if(t instanceof e.Set)return t.values();throw new Error("Iteration not supported.")}}function n(e,t,r){if(void 0===r&&(r=L),e)for(var n=0,i=e;n<i.length;n++)if(r(i[n],t))return!0;return!1}function a(e,t){if(e){if(!t)return e.length>0;for(var r=0,n=e;r<n.length;r++)if(t(n[r]))return!0}return!1}function o(e,t){return a(t)?a(e)?i(i([],e,!0),t,!0):t:e}function s(e,t){return t}function c(e){return e.map(s)}function l(e,t){return void 0===t?e:void 0===e?[t]:(e.push(t),e)}function u(e,t){return t<0?e.length+t:t}function _(e,t,r,n){if(void 0===t||0===t.length)return e;if(void 0===e)return t.slice(r,n);r=void 0===r?0:u(t,r),n=void 0===n?t.length:u(t,n);for(var i=r;i<n&&i<t.length;i++)void 0!==t[i]&&e.push(t[i]);return e}function d(e,t,r){return!n(e,t,r)&&(e.push(t),!0)}function p(e,t,r){t.sort((function(t,n){return r(e[t],e[n])||R(t,n)}))}function f(e,t){return 0===e.length?e:e.slice().sort(t)}function g(e){var t=0;return{next:function(){return t===e.length?{value:void 0,done:!0}:(t++,{value:e[t-1],done:!1})}}}function m(e,t,r,n,i){return y(e,r(t),r,n,i)}function y(e,t,r,n,i){if(!a(e))return-1;for(var o=i||0,s=e.length-1;o<=s;){var c=o+(s-o>>1);switch(n(r(e[c],c),t)){case-1:o=c+1;break;case 0:return c;case 1:s=c-1}}return~o}function h(e,t,r,n,i){if(e&&e.length>0){var a=e.length;if(a>0){var o=void 0===n||n<0?0:n,s=void 0===i||o+i>a-1?a-1:o+i,c=void 0;for(arguments.length<=2?(c=e[o],o++):c=r;o<=s;)c=t(c,e[o],o),o++;return c}}return r}e.Map=t("Map","tryGetNativeMap","createMapShim"),e.Set=t("Set","tryGetNativeSet","createSetShim"),e.getIterator=r,e.emptyArray=[],e.emptyMap=new e.Map,e.emptySet=new e.Set,e.createMap=function(){return new e.Map},e.createMapFromTemplate=function(t){var r=new e.Map;for(var n in t)v.call(t,n)&&r.set(n,t[n]);return r},e.length=function(e){return e?e.length:0},e.forEach=function(e,t){if(e)for(var r=0;r<e.length;r++){var n=t(e[r],r);if(n)return n}},e.forEachRight=function(e,t){if(e)for(var r=e.length-1;r>=0;r--){var n=t(e[r],r);if(n)return n}},e.firstDefined=function(e,t){if(void 0!==e)for(var r=0;r<e.length;r++){var n=t(e[r],r);if(void 0!==n)return n}},e.firstDefinedIterator=function(e,t){for(;;){var r=e.next();if(r.done)return;var n=t(r.value);if(void 0!==n)return n}},e.reduceLeftIterator=function(e,t,r){var n=r;if(e)for(var i=e.next(),a=0;!i.done;i=e.next(),a++)n=t(n,i.value,a);return n},e.zipWith=function(t,r,n){var i=[];e.Debug.assertEqual(t.length,r.length);for(var a=0;a<t.length;a++)i.push(n(t[a],r[a],a));return i},e.zipToIterator=function(t,r){e.Debug.assertEqual(t.length,r.length);var n=0;return{next:function(){return n===t.length?{value:void 0,done:!0}:(n++,{value:[t[n-1],r[n-1]],done:!1})}}},e.zipToMap=function(t,r){e.Debug.assert(t.length===r.length);for(var n=new e.Map,i=0;i<t.length;++i)n.set(t[i],r[i]);return n},e.intersperse=function(e,t){if(e.length<=1)return e;for(var r=[],n=0,i=e.length;n<i;n++)n&&r.push(t),r.push(e[n]);return r},e.every=function(e,t){if(e)for(var r=0;r<e.length;r++)if(!t(e[r],r))return!1;return!0},e.find=function(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(t(n,r))return n}},e.findLast=function(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(t(n,r))return n}},e.findIndex=function(e,t,r){for(var n=r||0;n<e.length;n++)if(t(e[n],n))return n;return-1},e.findLastIndex=function(e,t,r){for(var n=void 0===r?e.length-1:r;n>=0;n--)if(t(e[n],n))return n;return-1},e.findMap=function(t,r){for(var n=0;n<t.length;n++){var i=r(t[n],n);if(i)return i}return e.Debug.fail()},e.contains=n,e.arraysEqual=function(e,t,r){return void 0===r&&(r=L),e.length===t.length&&e.every((function(e,n){return r(e,t[n])}))},e.indexOfAnyCharCode=function(e,t,r){for(var i=r||0;i<e.length;i++)if(n(t,e.charCodeAt(i)))return i;return-1},e.countWhere=function(e,t){var r=0;if(e)for(var n=0;n<e.length;n++)t(e[n],n)&&r++;return r},e.filter=function(e,t){if(e){for(var r=e.length,n=0;n<r&&t(e[n]);)n++;if(n<r){var i=e.slice(0,n);for(n++;n<r;){var a=e[n];t(a)&&i.push(a),n++}return i}}return e},e.filterMutate=function(e,t){for(var r=0,n=0;n<e.length;n++)t(e[n],n,e)&&(e[r]=e[n],r++);e.length=r},e.clear=function(e){e.length=0},e.map=function(e,t){var r;if(e){r=[];for(var n=0;n<e.length;n++)r.push(t(e[n],n))}return r},e.mapIterator=function(e,t){return{next:function(){var r=e.next();return r.done?r:{value:t(r.value),done:!1}}}},e.sameMap=function(e,t){if(e)for(var r=0;r<e.length;r++){var n=e[r],i=t(n,r);if(n!==i){var a=e.slice(0,r);for(a.push(i),r++;r<e.length;r++)a.push(t(e[r],r));return a}}return e},e.flatten=function(e){for(var t=[],r=0,n=e;r<n.length;r++){var i=n[r];i&&(A(i)?_(t,i):t.push(i))}return t},e.flatMap=function(t,r){var n;if(t)for(var i=0;i<t.length;i++){var a=r(t[i],i);a&&(n=A(a)?_(n,a):l(n,a))}return n||e.emptyArray},e.flatMapToMutable=function(e,t){var r=[];if(e)for(var n=0;n<e.length;n++){var i=t(e[n],n);i&&(A(i)?_(r,i):r.push(i))}return r},e.flatMapIterator=function(t,r){var n=t.next();if(n.done)return e.emptyIterator;var i=a(n.value);return{next:function(){for(;;){var e=i.next();if(!e.done)return e;var r=t.next();if(r.done)return r;i=a(r.value)}}};function a(t){var n=r(t);return void 0===n?e.emptyIterator:A(n)?g(n):n}},e.sameFlatMap=function(e,t){var r;if(e)for(var n=0;n<e.length;n++){var i=e[n],a=t(i,n);(r||i!==a||A(a))&&(r||(r=e.slice(0,n)),A(a)?_(r,a):r.push(a))}return r||e},e.mapAllOrFail=function(e,t){for(var r=[],n=0;n<e.length;n++){var i=t(e[n],n);if(void 0===i)return;r.push(i)}return r},e.mapDefined=function(e,t){var r=[];if(e)for(var n=0;n<e.length;n++){var i=t(e[n],n);void 0!==i&&r.push(i)}return r},e.mapDefinedIterator=function(e,t){return{next:function(){for(;;){var r=e.next();if(r.done)return r;var n=t(r.value);if(void 0!==n)return{value:n,done:!1}}}}},e.mapDefinedEntries=function(t,r){if(t){var n=new e.Map;return t.forEach((function(e,t){var i=r(t,e);if(void 0!==i){var a=i[0],o=i[1];void 0!==a&&void 0!==o&&n.set(a,o)}})),n}},e.mapDefinedValues=function(t,r){if(t){var n=new e.Set;return t.forEach((function(e){var t=r(e);void 0!==t&&n.add(t)})),n}},e.getOrUpdate=function(e,t,r){if(e.has(t))return e.get(t);var n=r();return e.set(t,n),n},e.tryAddToSet=function(e,t){return!e.has(t)&&(e.add(t),!0)},e.emptyIterator={next:function(){return{value:void 0,done:!0}}},e.singleIterator=function(e){var t=!1;return{next:function(){var r=t;return t=!0,r?{value:void 0,done:!0}:{value:e,done:!1}}}},e.spanMap=function(e,t,r){var n;if(e){n=[];for(var i=e.length,a=void 0,o=void 0,s=0,c=0;s<i;){for(;c<i;){if(o=t(e[c],c),0===c)a=o;else if(o!==a)break;c++}if(s<c){var l=r(e.slice(s,c),a,s,c);l&&n.push(l),s=c}a=o,c++}}return n},e.mapEntries=function(t,r){if(t){var n=new e.Map;return t.forEach((function(e,t){var i=r(t,e),a=i[0],o=i[1];n.set(a,o)})),n}},e.some=a,e.getRangesWhere=function(e,t,r){for(var n,i=0;i<e.length;i++)t(e[i])?n=void 0===n?i:n:void 0!==n&&(r(n,i),n=void 0);void 0!==n&&r(n,e.length)},e.concatenate=o,e.indicesOf=c,e.deduplicate=function(e,t,r){return 0===e.length?[]:1===e.length?e.slice():r?function(e,t,r){var n=c(e);p(e,n,r);for(var i=e[n[0]],a=[n[0]],o=1;o<n.length;o++){var s=n[o],l=e[s];t(i,l)||(a.push(s),i=l)}return a.sort(),a.map((function(t){return e[t]}))}(e,t,r):function(e,t){for(var r=[],n=0,i=e;n<i.length;n++)d(r,i[n],t);return r}(e,t)},e.insertSorted=function(e,t,r){if(0!==e.length){var n=m(e,t,F,r);n<0&&e.splice(~n,0,t)}else e.push(t)},e.sortAndDeduplicate=function(t,r,n){return function(t,r){if(0===t.length)return e.emptyArray;for(var n=t[0],i=[n],a=1;a<t.length;a++){var o=t[a];switch(r(o,n)){case!0:case 0:continue;case-1:return e.Debug.fail("Array is unsorted.")}i.push(n=o)}return i}(f(t,r),n||r||j)},e.arrayIsSorted=function(e,t){if(e.length<2)return!0;for(var r=e[0],n=0,i=e.slice(1);n<i.length;n++){var a=i[n];if(1===t(r,a))return!1;r=a}return!0},e.arrayIsEqualTo=function(e,t,r){if(void 0===r&&(r=L),!e||!t)return e===t;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!r(e[n],t[n],n))return!1;return!0},e.compact=function(e){var t;if(e)for(var r=0;r<e.length;r++){var n=e[r];!t&&n||(t||(t=e.slice(0,r)),n&&t.push(n))}return t||e},e.relativeComplement=function(t,r,n){if(!r||!t||0===r.length||0===t.length)return r;var i=[];e:for(var a=0,o=0;o<r.length;o++){o>0&&e.Debug.assertGreaterThanOrEqual(n(r[o],r[o-1]),0);t:for(var s=a;a<t.length;a++)switch(a>s&&e.Debug.assertGreaterThanOrEqual(n(t[a],t[a-1]),0),n(r[o],t[a])){case-1:i.push(r[o]);continue e;case 0:continue e;case 1:continue t}}return i},e.sum=function(e,t){for(var r=0,n=0,i=e;n<i.length;n++)r+=i[n][t];return r},e.append=l,e.combine=function(e,t){return void 0===e?t:void 0===t?e:A(e)?A(t)?o(e,t):l(e,t):A(t)?l(t,e):[e,t]},e.addRange=_,e.pushIfUnique=d,e.appendIfUnique=function(e,t,r){return e?(d(e,t,r),e):[t]},e.sort=f,e.arrayIterator=g,e.arrayReverseIterator=function(e){var t=e.length;return{next:function(){return 0===t?{value:void 0,done:!0}:(t--,{value:e[t],done:!1})}}},e.stableSort=function(e,t){var r=c(e);return p(e,r,t),r.map((function(t){return e[t]}))},e.rangeEquals=function(e,t,r,n){for(;r<n;){if(e[r]!==t[r])return!1;r++}return!0},e.elementAt=function(e,t){if(e&&(t=u(e,t))<e.length)return e[t]},e.firstOrUndefined=function(e){return 0===e.length?void 0:e[0]},e.first=function(t){return e.Debug.assert(0!==t.length),t[0]},e.lastOrUndefined=function(e){return 0===e.length?void 0:e[e.length-1]},e.last=function(t){return e.Debug.assert(0!==t.length),t[t.length-1]},e.singleOrUndefined=function(e){return e&&1===e.length?e[0]:void 0},e.singleOrMany=function(e){return e&&1===e.length?e[0]:e},e.replaceElement=function(e,t,r){var n=e.slice(0);return n[t]=r,n},e.binarySearch=m,e.binarySearchKey=y,e.reduceLeft=h;var v=Object.prototype.hasOwnProperty;function b(e,t){return v.call(e,t)}function x(e){var t=[];for(var r in e)v.call(e,r)&&t.push(r);return t}e.hasProperty=b,e.getProperty=function(e,t){return v.call(e,t)?e[t]:void 0},e.getOwnKeys=x,e.getAllKeys=function(e){var t=[];do{for(var r=0,n=Object.getOwnPropertyNames(e);r<n.length;r++)d(t,n[r])}while(e=Object.getPrototypeOf(e));return t},e.getOwnValues=function(e){var t=[];for(var r in e)v.call(e,r)&&t.push(e[r]);return t};var D=Object.entries||function(e){for(var t=x(e),r=Array(t.length),n=0;n<t.length;n++)r[n]=[t[n],e[t[n]]];return r};function S(e,t){for(var r=[],n=e.next();!n.done;n=e.next())r.push(t?t(n.value):n.value);return r}function E(e,t,r){void 0===r&&(r=F);for(var n=T(),i=0,a=e;i<a.length;i++){var o=a[i];n.add(t(o),r(o))}return n}function T(){var t=new e.Map;return t.add=C,t.remove=k,t}function C(e,t){var r=this.get(e);return r?r.push(t):this.set(e,r=[t]),r}function k(e,t){var r=this.get(e);r&&(q(r,t),r.length||this.delete(e))}function A(e){return Array.isArray?Array.isArray(e):e instanceof Array}function N(e){}function F(e){return e}function w(e){return e.toLowerCase()}e.getEntries=function(e){return e?D(e):[]},e.arrayOf=function(e,t){for(var r=new Array(e),n=0;n<e;n++)r[n]=t(n);return r},e.arrayFrom=S,e.assign=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,i=t;n<i.length;n++){var a=i[n];if(void 0!==a)for(var o in a)b(a,o)&&(e[o]=a[o])}return e},e.equalOwnProperties=function(e,t,r){if(void 0===r&&(r=L),e===t)return!0;if(!e||!t)return!1;for(var n in e)if(v.call(e,n)){if(!v.call(t,n))return!1;if(!r(e[n],t[n]))return!1}for(var n in t)if(v.call(t,n)&&!v.call(e,n))return!1;return!0},e.arrayToMap=function(t,r,n){void 0===n&&(n=F);for(var i=new e.Map,a=0,o=t;a<o.length;a++){var s=o[a],c=r(s);void 0!==c&&i.set(c,n(s))}return i},e.arrayToNumericMap=function(e,t,r){void 0===r&&(r=F);for(var n=[],i=0,a=e;i<a.length;i++){var o=a[i];n[t(o)]=r(o)}return n},e.arrayToMultiMap=E,e.group=function(e,t,r){return void 0===r&&(r=F),S(E(e,t).values(),r)},e.clone=function(e){var t={};for(var r in e)v.call(e,r)&&(t[r]=e[r]);return t},e.extend=function(e,t){var r={};for(var n in t)v.call(t,n)&&(r[n]=t[n]);for(var n in e)v.call(e,n)&&(r[n]=e[n]);return r},e.copyProperties=function(e,t){for(var r in t)v.call(t,r)&&(e[r]=t[r])},e.maybeBind=function(e,t){return t?t.bind(e):void 0},e.createMultiMap=T,e.createUnderscoreEscapedMultiMap=function(){return T()},e.isArray=A,e.toArray=function(e){return A(e)?e:[e]},e.isString=function(e){return"string"==typeof e},e.isNumber=function(e){return"number"==typeof e},e.tryCast=function(e,t){return void 0!==e&&t(e)?e:void 0},e.cast=function(t,r){return void 0!==t&&r(t)?t:e.Debug.fail("Invalid cast. The supplied value "+t+" did not pass the test '"+e.Debug.getFunctionName(r)+"'.")},e.noop=N,e.returnFalse=function(){return!1},e.returnTrue=function(){return!0},e.returnUndefined=function(){},e.identity=F,e.toLowerCase=w;var P,I=/[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g;function O(e){return I.test(e)?e.replace(I,w):e}function L(e,t){return e===t}function M(e,t){return e===t?0:void 0===e?-1:void 0===t?1:e<t?-1:1}function R(e,t){return M(e,t)}function B(e,t){return e===t?0:void 0===e?-1:void 0===t?1:(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}function j(e,t){return M(e,t)}e.toFileNameLowerCase=O,e.notImplemented=function(){throw new Error("Not implemented")},e.memoize=function(e){var t;return function(){return e&&(t=e(),e=void 0),t}},e.memoizeOne=function(t){var r=new e.Map;return function(e){var n=typeof e+":"+e,i=r.get(n);return void 0!==i||r.has(n)||(i=t(e),r.set(n,i)),i}},e.compose=function(e,t,r,n,i){if(i){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return function(e){return h(a,(function(e,t){return t(e)}),e)}}return n?function(i){return n(r(t(e(i))))}:r?function(n){return r(t(e(n)))}:t?function(r){return t(e(r))}:e?function(t){return e(t)}:function(e){return e}},(P=e.AssertionLevel||(e.AssertionLevel={}))[P.None=0]="None",P[P.Normal=1]="Normal",P[P.Aggressive=2]="Aggressive",P[P.VeryAggressive=3]="VeryAggressive",e.equateValues=L,e.equateStringsCaseInsensitive=function(e,t){return e===t||void 0!==e&&void 0!==t&&e.toUpperCase()===t.toUpperCase()},e.equateStringsCaseSensitive=function(e,t){return L(e,t)},e.compareValues=R,e.compareTextSpans=function(e,t){return R(null==e?void 0:e.start,null==t?void 0:t.start)||R(null==e?void 0:e.length,null==t?void 0:t.length)},e.min=function(e,t,r){return-1===r(e,t)?e:t},e.compareStringsCaseInsensitive=B,e.compareStringsCaseSensitive=j,e.getStringComparer=function(e){return e?B:j};var J,V,U=function(){var e,t,r="object"==typeof Intl&&"function"==typeof Intl.Collator?i:"function"==typeof String.prototype.localeCompare&&"function"==typeof String.prototype.toLocaleUpperCase&&"a".localeCompare("B")<0?a:o;return function(n){return void 0===n?e||(e=r(n)):"en-US"===n?t||(t=r(n)):r(n)};function n(e,t,r){if(e===t)return 0;if(void 0===e)return-1;if(void 0===t)return 1;var n=r(e,t);return n<0?-1:n>0?1:0}function i(e){var t=new Intl.Collator(e,{usage:"sort",sensitivity:"variant"}).compare;return function(e,r){return n(e,r,t)}}function a(e){return void 0!==e?o():function(e,r){return n(e,r,t)};function t(e,t){return e.localeCompare(t)}}function o(){return function(t,r){return n(t,r,e)};function e(e,r){return t(e.toUpperCase(),r.toUpperCase())||t(e,r)}function t(e,t){return e<t?-1:e>t?1:0}}}();function K(e,t,r){for(var n=new Array(t.length+1),i=new Array(t.length+1),a=r+.01,o=0;o<=t.length;o++)n[o]=o;for(o=1;o<=e.length;o++){var s=e.charCodeAt(o-1),c=Math.ceil(o>r?o-r:1),l=Math.floor(t.length>r+o?r+o:t.length);i[0]=o;for(var u=o,_=1;_<c;_++)i[_]=a;for(_=c;_<=l;_++){var d=e[o-1].toLowerCase()===t[_-1].toLowerCase()?n[_-1]+.1:n[_-1]+2,p=s===t.charCodeAt(_-1)?n[_-1]:Math.min(n[_]+1,i[_-1]+1,d);i[_]=p,u=Math.min(u,p)}for(_=l+1;_<=t.length;_++)i[_]=a;if(u>r)return;var f=n;n=i,i=f}var g=n[t.length];return g>r?void 0:g}function z(e,t){var r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}function G(e,t){for(var r=t;r<e.length-1;r++)e[r]=e[r+1];e.pop()}function W(e,t){e[t]=e[e.length-1],e.pop()}function q(e,t){return function(e,r){for(var n=0;n<e.length;n++)if(e[n]===t)return W(e,n),!0;return!1}(e)}function H(e,t){return 0===e.lastIndexOf(t,0)}function Y(e,t){var r=e.prefix,n=e.suffix;return t.length>=r.length+n.length&&H(t,r)&&z(t,n)}function X(e,t,r,n){for(var i=0,a=e[n];i<a.length;i++){var o=a[i],s=void 0;r?(s=r.slice()).push(o):s=[o],n===e.length-1?t.push(s):X(e,t,s,n+1)}}e.getUILocale=function(){return V},e.setUILocale=function(e){V!==e&&(V=e,J=void 0)},e.compareStringsCaseSensitiveUI=function(e,t){return(J||(J=U(V)))(e,t)},e.compareProperties=function(e,t,r,n){return e===t?0:void 0===e?-1:void 0===t?1:n(e[r],t[r])},e.compareBooleans=function(e,t){return R(e?1:0,t?1:0)},e.getSpellingSuggestion=function(t,r,n){for(var i,a=Math.min(2,Math.floor(.34*t.length)),o=Math.floor(.4*t.length)+1,s=0,c=r;s<c.length;s++){var l=c[s],u=n(l);if(void 0!==u&&Math.abs(u.length-t.length (…) [all...] |
/arkcompiler/ets_frontend/es2panda/test/compiler/js/ |
H A D | cocos_worker_test.js | 1366 t.length = Math.floor(t.length / 3); 3675 const e = Math.floor(t.trackTime / t.animationEnd); 3682 const e = Math.floor(t.trackTime / t.animationEnd); 11201 return Math.floor(yi(t, e)); 11210 return Math.floor(Ai(t, e, i)); 11222 return t - Math.floor(t / e) * e; 11319 t._val = Math.floor((a << 24 >>> 0) + (o << 16) + (r << 8) + n); 11420 this._val = Math.floor((r << 24 >>> 0) + (n << 16) + (s << 8) + i); 11459 const o = Math.floor(t); 11644 static floor( [all...] |
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/mpl2mpl/src/ |
H A D | constantfold.cpp | 983 floatValue = floor(constValue.GetValue()); in FoldFloorMIRConst() 997 doubleValue = floor(constValue.GetValue()); in FoldFloorMIRConst()
|
/arkcompiler/runtime_core/static_core/libllvmbackend/ |
H A D | llvm_ark_interface.cpp | 381 case llvm::Intrinsic::floor: in GetIntrinsicIdSwitch()
|
/arkcompiler/ets_runtime/ecmascript/builtins/ |
H A D | builtins_math.cpp | 352 result = std::floor(value); in Floor()
|
H A D | builtins_string.cpp | 140 std::floor((static_cast<uint32_t>(cp) - ENCODE_SECOND_FACTOR) / ENCODE_FIRST_FACTOR) + ENCODE_LEAD_LOW; in FromCodePoint() 858 uint16_t cu1 = std::floor((static_cast<uint32_t>(cp) - ENCODE_SECOND_FACTOR) / in ToWellFormed()
|
H A D | builtins_shared_typedarray.cpp | 1005 // 5. Let middle be floor(len/2). in Reverse() 1006 int64_t middle = std::floor(len / 2); in Reverse()
|
/arkcompiler/ets_runtime/ecmascript/ |
H A D | js_locale.cpp | 374 // c. Return floor(value). in DefaultNumberOption() 375 return std::floor(num); in DefaultNumberOption()
|
H A D | js_tagged_value.cpp | 339 // If floor(abs(argument)) ≠ abs(argument), return false. in IsInteger() 340 if (std::floor(std::abs(thisValue)) != std::abs(thisValue)) { in IsInteger()
|