next
Version:
The React Framework
1 lines • 2.5 MB
JavaScript
(function(){var k={75583:function(k,v){"use strict";Object.defineProperty(v,"__esModule",{value:true});v.cloneNode=cloneNode;function cloneNode(k){return Object.assign({},k)}},26333:function(k,v,E){"use strict";Object.defineProperty(v,"__esModule",{value:true});var P={numberLiteralFromRaw:true,withLoc:true,withRaw:true,funcParam:true,indexLiteral:true,memIndexLiteral:true,instruction:true,objectInstruction:true,traverse:true,signatures:true,cloneNode:true,moduleContextFromModuleAST:true};Object.defineProperty(v,"numberLiteralFromRaw",{enumerable:true,get:function get(){return L.numberLiteralFromRaw}});Object.defineProperty(v,"withLoc",{enumerable:true,get:function get(){return L.withLoc}});Object.defineProperty(v,"withRaw",{enumerable:true,get:function get(){return L.withRaw}});Object.defineProperty(v,"funcParam",{enumerable:true,get:function get(){return L.funcParam}});Object.defineProperty(v,"indexLiteral",{enumerable:true,get:function get(){return L.indexLiteral}});Object.defineProperty(v,"memIndexLiteral",{enumerable:true,get:function get(){return L.memIndexLiteral}});Object.defineProperty(v,"instruction",{enumerable:true,get:function get(){return L.instruction}});Object.defineProperty(v,"objectInstruction",{enumerable:true,get:function get(){return L.objectInstruction}});Object.defineProperty(v,"traverse",{enumerable:true,get:function get(){return N.traverse}});Object.defineProperty(v,"signatures",{enumerable:true,get:function get(){return q.signatures}});Object.defineProperty(v,"cloneNode",{enumerable:true,get:function get(){return le.cloneNode}});Object.defineProperty(v,"moduleContextFromModuleAST",{enumerable:true,get:function get(){return pe.moduleContextFromModuleAST}});var R=E(860);Object.keys(R).forEach((function(k){if(k==="default"||k==="__esModule")return;if(Object.prototype.hasOwnProperty.call(P,k))return;if(k in v&&v[k]===R[k])return;Object.defineProperty(v,k,{enumerable:true,get:function get(){return R[k]}})}));var L=E(68958);var N=E(11885);var q=E(96395);var ae=E(20885);Object.keys(ae).forEach((function(k){if(k==="default"||k==="__esModule")return;if(Object.prototype.hasOwnProperty.call(P,k))return;if(k in v&&v[k]===ae[k])return;Object.defineProperty(v,k,{enumerable:true,get:function get(){return ae[k]}})}));var le=E(75583);var pe=E(15067)},68958:function(k,v,E){"use strict";Object.defineProperty(v,"__esModule",{value:true});v.numberLiteralFromRaw=numberLiteralFromRaw;v.instruction=instruction;v.objectInstruction=objectInstruction;v.withLoc=withLoc;v.withRaw=withRaw;v.funcParam=funcParam;v.indexLiteral=indexLiteral;v.memIndexLiteral=memIndexLiteral;var P=E(37197);var R=E(860);function numberLiteralFromRaw(k){var v=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"i32";var E=k;if(typeof k==="string"){k=k.replace(/_/g,"")}if(typeof k==="number"){return(0,R.numberLiteral)(k,String(E))}else{switch(v){case"i32":{return(0,R.numberLiteral)((0,P.parse32I)(k),String(E))}case"u32":{return(0,R.numberLiteral)((0,P.parseU32)(k),String(E))}case"i64":{return(0,R.longNumberLiteral)((0,P.parse64I)(k),String(E))}case"f32":{return(0,R.floatLiteral)((0,P.parse32F)(k),(0,P.isNanLiteral)(k),(0,P.isInfLiteral)(k),String(E))}default:{return(0,R.floatLiteral)((0,P.parse64F)(k),(0,P.isNanLiteral)(k),(0,P.isInfLiteral)(k),String(E))}}}}function instruction(k){var v=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];var E=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return(0,R.instr)(k,undefined,v,E)}function objectInstruction(k,v){var E=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];var P=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};return(0,R.instr)(k,v,E,P)}function withLoc(k,v,E){var P={start:E,end:v};k.loc=P;return k}function withRaw(k,v){k.raw=v;return k}function funcParam(k,v){return{id:v,valtype:k}}function indexLiteral(k){var v=numberLiteralFromRaw(k,"u32");return v}function memIndexLiteral(k){var v=numberLiteralFromRaw(k,"u32");return v}},92489:function(k,v){"use strict";Object.defineProperty(v,"__esModule",{value:true});v.createPath=createPath;function ownKeys(k,v){var E=Object.keys(k);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(k);if(v){P=P.filter((function(v){return Object.getOwnPropertyDescriptor(k,v).enumerable}))}E.push.apply(E,P)}return E}function _objectSpread(k){for(var v=1;v<arguments.length;v++){var E=arguments[v]!=null?arguments[v]:{};if(v%2){ownKeys(Object(E),true).forEach((function(v){_defineProperty(k,v,E[v])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(k,Object.getOwnPropertyDescriptors(E))}else{ownKeys(Object(E)).forEach((function(v){Object.defineProperty(k,v,Object.getOwnPropertyDescriptor(E,v))}))}}return k}function _defineProperty(k,v,E){if(v in k){Object.defineProperty(k,v,{value:E,enumerable:true,configurable:true,writable:true})}else{k[v]=E}return k}function findParent(k,v){var E=k.parentPath;if(E==null){throw new Error("node is root")}var P=E;while(v(P)!==false){if(P.parentPath==null){return null}P=P.parentPath}return P.node}function insertBefore(k,v){return insert(k,v)}function insertAfter(k,v){return insert(k,v,1)}function insert(k,v){var E=k.node,P=k.inList,R=k.parentPath,L=k.parentKey;var N=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;if(!P){throw new Error("inList"+" error: "+("insert can only be used for nodes that are within lists"||0))}if(!(R!=null)){throw new Error("parentPath != null"+" error: "+("Can not remove root node"||0))}var q=R.node[L];var ae=q.findIndex((function(k){return k===E}));q.splice(ae+N,0,v)}function remove(k){var v=k.node,E=k.parentKey,P=k.parentPath;if(!(P!=null)){throw new Error("parentPath != null"+" error: "+("Can not remove root node"||0))}var R=P.node;var L=R[E];if(Array.isArray(L)){R[E]=L.filter((function(k){return k!==v}))}else{delete R[E]}v._deleted=true}function stop(k){k.shouldStop=true}function replaceWith(k,v){var E=k.parentPath.node;var P=E[k.parentKey];if(Array.isArray(P)){var R=P.findIndex((function(v){return v===k.node}));P.splice(R,1,v)}else{E[k.parentKey]=v}k.node._deleted=true;k.node=v}function bindNodeOperations(k,v){var E=Object.keys(k);var P={};E.forEach((function(E){P[E]=k[E].bind(null,v)}));return P}function createPathOperations(k){return bindNodeOperations({findParent:findParent,replaceWith:replaceWith,remove:remove,insertBefore:insertBefore,insertAfter:insertAfter,stop:stop},k)}function createPath(k){var v=_objectSpread({},k);Object.assign(v,createPathOperations(v));return v}},860:function(k,v){"use strict";Object.defineProperty(v,"__esModule",{value:true});v.module=_module;v.moduleMetadata=moduleMetadata;v.moduleNameMetadata=moduleNameMetadata;v.functionNameMetadata=functionNameMetadata;v.localNameMetadata=localNameMetadata;v.binaryModule=binaryModule;v.quoteModule=quoteModule;v.sectionMetadata=sectionMetadata;v.producersSectionMetadata=producersSectionMetadata;v.producerMetadata=producerMetadata;v.producerMetadataVersionedName=producerMetadataVersionedName;v.loopInstruction=loopInstruction;v.instr=instr;v.ifInstruction=ifInstruction;v.stringLiteral=stringLiteral;v.numberLiteral=numberLiteral;v.longNumberLiteral=longNumberLiteral;v.floatLiteral=floatLiteral;v.elem=elem;v.indexInFuncSection=indexInFuncSection;v.valtypeLiteral=valtypeLiteral;v.typeInstruction=typeInstruction;v.start=start;v.globalType=globalType;v.leadingComment=leadingComment;v.blockComment=blockComment;v.data=data;v.global=global;v.table=table;v.memory=memory;v.funcImportDescr=funcImportDescr;v.moduleImport=moduleImport;v.moduleExportDescr=moduleExportDescr;v.moduleExport=moduleExport;v.limit=limit;v.signature=signature;v.program=program;v.identifier=identifier;v.blockInstruction=blockInstruction;v.callInstruction=callInstruction;v.callIndirectInstruction=callIndirectInstruction;v.byteArray=byteArray;v.func=func;v.internalBrUnless=internalBrUnless;v.internalGoto=internalGoto;v.internalCallExtern=internalCallExtern;v.internalEndAndReturn=internalEndAndReturn;v.assertInternalCallExtern=v.assertInternalGoto=v.assertInternalBrUnless=v.assertFunc=v.assertByteArray=v.assertCallIndirectInstruction=v.assertCallInstruction=v.assertBlockInstruction=v.assertIdentifier=v.assertProgram=v.assertSignature=v.assertLimit=v.assertModuleExport=v.assertModuleExportDescr=v.assertModuleImport=v.assertFuncImportDescr=v.assertMemory=v.assertTable=v.assertGlobal=v.assertData=v.assertBlockComment=v.assertLeadingComment=v.assertGlobalType=v.assertStart=v.assertTypeInstruction=v.assertValtypeLiteral=v.assertIndexInFuncSection=v.assertElem=v.assertFloatLiteral=v.assertLongNumberLiteral=v.assertNumberLiteral=v.assertStringLiteral=v.assertIfInstruction=v.assertInstr=v.assertLoopInstruction=v.assertProducerMetadataVersionedName=v.assertProducerMetadata=v.assertProducersSectionMetadata=v.assertSectionMetadata=v.assertQuoteModule=v.assertBinaryModule=v.assertLocalNameMetadata=v.assertFunctionNameMetadata=v.assertModuleNameMetadata=v.assertModuleMetadata=v.assertModule=v.isIntrinsic=v.isImportDescr=v.isNumericLiteral=v.isExpression=v.isInstruction=v.isBlock=v.isNode=v.isInternalEndAndReturn=v.isInternalCallExtern=v.isInternalGoto=v.isInternalBrUnless=v.isFunc=v.isByteArray=v.isCallIndirectInstruction=v.isCallInstruction=v.isBlockInstruction=v.isIdentifier=v.isProgram=v.isSignature=v.isLimit=v.isModuleExport=v.isModuleExportDescr=v.isModuleImport=v.isFuncImportDescr=v.isMemory=v.isTable=v.isGlobal=v.isData=v.isBlockComment=v.isLeadingComment=v.isGlobalType=v.isStart=v.isTypeInstruction=v.isValtypeLiteral=v.isIndexInFuncSection=v.isElem=v.isFloatLiteral=v.isLongNumberLiteral=v.isNumberLiteral=v.isStringLiteral=v.isIfInstruction=v.isInstr=v.isLoopInstruction=v.isProducerMetadataVersionedName=v.isProducerMetadata=v.isProducersSectionMetadata=v.isSectionMetadata=v.isQuoteModule=v.isBinaryModule=v.isLocalNameMetadata=v.isFunctionNameMetadata=v.isModuleNameMetadata=v.isModuleMetadata=v.isModule=void 0;v.nodeAndUnionTypes=v.unionTypesMap=v.assertInternalEndAndReturn=void 0;function _typeof(k){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(k){return typeof k}}else{_typeof=function _typeof(k){return k&&typeof Symbol==="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k}}return _typeof(k)}function isTypeOf(k){return function(v){return v.type===k}}function assertTypeOf(k){return function(v){return function(){if(!(v.type===k)){throw new Error("n.type === t"+" error: "+(undefined||"unknown"))}}()}}function _module(k,v,E){if(k!==null&&k!==undefined){if(!(typeof k==="string")){throw new Error('typeof id === "string"'+" error: "+("Argument id must be of type string, given: "+_typeof(k)||0))}}if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof fields === "object" && typeof fields.length !== "undefined"'+" error: "+(undefined||"unknown"))}var P={type:"Module",id:k,fields:v};if(typeof E!=="undefined"){P.metadata=E}return P}function moduleMetadata(k,v,E,P){if(!(_typeof(k)==="object"&&typeof k.length!=="undefined")){throw new Error('typeof sections === "object" && typeof sections.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(v!==null&&v!==undefined){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof functionNames === "object" && typeof functionNames.length !== "undefined"'+" error: "+(undefined||"unknown"))}}if(E!==null&&E!==undefined){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof localNames === "object" && typeof localNames.length !== "undefined"'+" error: "+(undefined||"unknown"))}}if(P!==null&&P!==undefined){if(!(_typeof(P)==="object"&&typeof P.length!=="undefined")){throw new Error('typeof producers === "object" && typeof producers.length !== "undefined"'+" error: "+(undefined||"unknown"))}}var R={type:"ModuleMetadata",sections:k};if(typeof v!=="undefined"&&v.length>0){R.functionNames=v}if(typeof E!=="undefined"&&E.length>0){R.localNames=E}if(typeof P!=="undefined"&&P.length>0){R.producers=P}return R}function moduleNameMetadata(k){if(!(typeof k==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(k)||0))}var v={type:"ModuleNameMetadata",value:k};return v}function functionNameMetadata(k,v){if(!(typeof k==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(k)||0))}if(!(typeof v==="number")){throw new Error('typeof index === "number"'+" error: "+("Argument index must be of type number, given: "+_typeof(v)||0))}var E={type:"FunctionNameMetadata",value:k,index:v};return E}function localNameMetadata(k,v,E){if(!(typeof k==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(k)||0))}if(!(typeof v==="number")){throw new Error('typeof localIndex === "number"'+" error: "+("Argument localIndex must be of type number, given: "+_typeof(v)||0))}if(!(typeof E==="number")){throw new Error('typeof functionIndex === "number"'+" error: "+("Argument functionIndex must be of type number, given: "+_typeof(E)||0))}var P={type:"LocalNameMetadata",value:k,localIndex:v,functionIndex:E};return P}function binaryModule(k,v){if(k!==null&&k!==undefined){if(!(typeof k==="string")){throw new Error('typeof id === "string"'+" error: "+("Argument id must be of type string, given: "+_typeof(k)||0))}}if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof blob === "object" && typeof blob.length !== "undefined"'+" error: "+(undefined||"unknown"))}var E={type:"BinaryModule",id:k,blob:v};return E}function quoteModule(k,v){if(k!==null&&k!==undefined){if(!(typeof k==="string")){throw new Error('typeof id === "string"'+" error: "+("Argument id must be of type string, given: "+_typeof(k)||0))}}if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof string === "object" && typeof string.length !== "undefined"'+" error: "+(undefined||"unknown"))}var E={type:"QuoteModule",id:k,string:v};return E}function sectionMetadata(k,v,E,P){if(!(typeof v==="number")){throw new Error('typeof startOffset === "number"'+" error: "+("Argument startOffset must be of type number, given: "+_typeof(v)||0))}var R={type:"SectionMetadata",section:k,startOffset:v,size:E,vectorOfSize:P};return R}function producersSectionMetadata(k){if(!(_typeof(k)==="object"&&typeof k.length!=="undefined")){throw new Error('typeof producers === "object" && typeof producers.length !== "undefined"'+" error: "+(undefined||"unknown"))}var v={type:"ProducersSectionMetadata",producers:k};return v}function producerMetadata(k,v,E){if(!(_typeof(k)==="object"&&typeof k.length!=="undefined")){throw new Error('typeof language === "object" && typeof language.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof processedBy === "object" && typeof processedBy.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof sdk === "object" && typeof sdk.length !== "undefined"'+" error: "+(undefined||"unknown"))}var P={type:"ProducerMetadata",language:k,processedBy:v,sdk:E};return P}function producerMetadataVersionedName(k,v){if(!(typeof k==="string")){throw new Error('typeof name === "string"'+" error: "+("Argument name must be of type string, given: "+_typeof(k)||0))}if(!(typeof v==="string")){throw new Error('typeof version === "string"'+" error: "+("Argument version must be of type string, given: "+_typeof(v)||0))}var E={type:"ProducerMetadataVersionedName",name:k,version:v};return E}function loopInstruction(k,v,E){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof instr === "object" && typeof instr.length !== "undefined"'+" error: "+(undefined||"unknown"))}var P={type:"LoopInstruction",id:"loop",label:k,resulttype:v,instr:E};return P}function instr(k,v,E,P){if(!(typeof k==="string")){throw new Error('typeof id === "string"'+" error: "+("Argument id must be of type string, given: "+_typeof(k)||0))}if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof args === "object" && typeof args.length !== "undefined"'+" error: "+(undefined||"unknown"))}var R={type:"Instr",id:k,args:E};if(typeof v!=="undefined"){R.object=v}if(typeof P!=="undefined"&&Object.keys(P).length!==0){R.namedArgs=P}return R}function ifInstruction(k,v,E,P,R){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof test === "object" && typeof test.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof(P)==="object"&&typeof P.length!=="undefined")){throw new Error('typeof consequent === "object" && typeof consequent.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof(R)==="object"&&typeof R.length!=="undefined")){throw new Error('typeof alternate === "object" && typeof alternate.length !== "undefined"'+" error: "+(undefined||"unknown"))}var L={type:"IfInstruction",id:"if",testLabel:k,test:v,result:E,consequent:P,alternate:R};return L}function stringLiteral(k){if(!(typeof k==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(k)||0))}var v={type:"StringLiteral",value:k};return v}function numberLiteral(k,v){if(!(typeof k==="number")){throw new Error('typeof value === "number"'+" error: "+("Argument value must be of type number, given: "+_typeof(k)||0))}if(!(typeof v==="string")){throw new Error('typeof raw === "string"'+" error: "+("Argument raw must be of type string, given: "+_typeof(v)||0))}var E={type:"NumberLiteral",value:k,raw:v};return E}function longNumberLiteral(k,v){if(!(typeof v==="string")){throw new Error('typeof raw === "string"'+" error: "+("Argument raw must be of type string, given: "+_typeof(v)||0))}var E={type:"LongNumberLiteral",value:k,raw:v};return E}function floatLiteral(k,v,E,P){if(!(typeof k==="number")){throw new Error('typeof value === "number"'+" error: "+("Argument value must be of type number, given: "+_typeof(k)||0))}if(v!==null&&v!==undefined){if(!(typeof v==="boolean")){throw new Error('typeof nan === "boolean"'+" error: "+("Argument nan must be of type boolean, given: "+_typeof(v)||0))}}if(E!==null&&E!==undefined){if(!(typeof E==="boolean")){throw new Error('typeof inf === "boolean"'+" error: "+("Argument inf must be of type boolean, given: "+_typeof(E)||0))}}if(!(typeof P==="string")){throw new Error('typeof raw === "string"'+" error: "+("Argument raw must be of type string, given: "+_typeof(P)||0))}var R={type:"FloatLiteral",value:k,raw:P};if(v===true){R.nan=true}if(E===true){R.inf=true}return R}function elem(k,v,E){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof offset === "object" && typeof offset.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof funcs === "object" && typeof funcs.length !== "undefined"'+" error: "+(undefined||"unknown"))}var P={type:"Elem",table:k,offset:v,funcs:E};return P}function indexInFuncSection(k){var v={type:"IndexInFuncSection",index:k};return v}function valtypeLiteral(k){var v={type:"ValtypeLiteral",name:k};return v}function typeInstruction(k,v){var E={type:"TypeInstruction",id:k,functype:v};return E}function start(k){var v={type:"Start",index:k};return v}function globalType(k,v){var E={type:"GlobalType",valtype:k,mutability:v};return E}function leadingComment(k){if(!(typeof k==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(k)||0))}var v={type:"LeadingComment",value:k};return v}function blockComment(k){if(!(typeof k==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(k)||0))}var v={type:"BlockComment",value:k};return v}function data(k,v,E){var P={type:"Data",memoryIndex:k,offset:v,init:E};return P}function global(k,v,E){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof init === "object" && typeof init.length !== "undefined"'+" error: "+(undefined||"unknown"))}var P={type:"Global",globalType:k,init:v,name:E};return P}function table(k,v,E,P){if(!(v.type==="Limit")){throw new Error('limits.type === "Limit"'+" error: "+("Argument limits must be of type Limit, given: "+v.type||0))}if(P!==null&&P!==undefined){if(!(_typeof(P)==="object"&&typeof P.length!=="undefined")){throw new Error('typeof elements === "object" && typeof elements.length !== "undefined"'+" error: "+(undefined||"unknown"))}}var R={type:"Table",elementType:k,limits:v,name:E};if(typeof P!=="undefined"&&P.length>0){R.elements=P}return R}function memory(k,v){var E={type:"Memory",limits:k,id:v};return E}function funcImportDescr(k,v){var E={type:"FuncImportDescr",id:k,signature:v};return E}function moduleImport(k,v,E){if(!(typeof k==="string")){throw new Error('typeof module === "string"'+" error: "+("Argument module must be of type string, given: "+_typeof(k)||0))}if(!(typeof v==="string")){throw new Error('typeof name === "string"'+" error: "+("Argument name must be of type string, given: "+_typeof(v)||0))}var P={type:"ModuleImport",module:k,name:v,descr:E};return P}function moduleExportDescr(k,v){var E={type:"ModuleExportDescr",exportType:k,id:v};return E}function moduleExport(k,v){if(!(typeof k==="string")){throw new Error('typeof name === "string"'+" error: "+("Argument name must be of type string, given: "+_typeof(k)||0))}var E={type:"ModuleExport",name:k,descr:v};return E}function limit(k,v,E){if(!(typeof k==="number")){throw new Error('typeof min === "number"'+" error: "+("Argument min must be of type number, given: "+_typeof(k)||0))}if(v!==null&&v!==undefined){if(!(typeof v==="number")){throw new Error('typeof max === "number"'+" error: "+("Argument max must be of type number, given: "+_typeof(v)||0))}}if(E!==null&&E!==undefined){if(!(typeof E==="boolean")){throw new Error('typeof shared === "boolean"'+" error: "+("Argument shared must be of type boolean, given: "+_typeof(E)||0))}}var P={type:"Limit",min:k};if(typeof v!=="undefined"){P.max=v}if(E===true){P.shared=true}return P}function signature(k,v){if(!(_typeof(k)==="object"&&typeof k.length!=="undefined")){throw new Error('typeof params === "object" && typeof params.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof results === "object" && typeof results.length !== "undefined"'+" error: "+(undefined||"unknown"))}var E={type:"Signature",params:k,results:v};return E}function program(k){if(!(_typeof(k)==="object"&&typeof k.length!=="undefined")){throw new Error('typeof body === "object" && typeof body.length !== "undefined"'+" error: "+(undefined||"unknown"))}var v={type:"Program",body:k};return v}function identifier(k,v){if(!(typeof k==="string")){throw new Error('typeof value === "string"'+" error: "+("Argument value must be of type string, given: "+_typeof(k)||0))}if(v!==null&&v!==undefined){if(!(typeof v==="string")){throw new Error('typeof raw === "string"'+" error: "+("Argument raw must be of type string, given: "+_typeof(v)||0))}}var E={type:"Identifier",value:k};if(typeof v!=="undefined"){E.raw=v}return E}function blockInstruction(k,v,E){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof instr === "object" && typeof instr.length !== "undefined"'+" error: "+(undefined||"unknown"))}var P={type:"BlockInstruction",id:"block",label:k,instr:v,result:E};return P}function callInstruction(k,v,E){if(v!==null&&v!==undefined){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof instrArgs === "object" && typeof instrArgs.length !== "undefined"'+" error: "+(undefined||"unknown"))}}var P={type:"CallInstruction",id:"call",index:k};if(typeof v!=="undefined"&&v.length>0){P.instrArgs=v}if(typeof E!=="undefined"){P.numeric=E}return P}function callIndirectInstruction(k,v){if(v!==null&&v!==undefined){if(!(_typeof(v)==="object"&&typeof v.length!=="undefined")){throw new Error('typeof intrs === "object" && typeof intrs.length !== "undefined"'+" error: "+(undefined||"unknown"))}}var E={type:"CallIndirectInstruction",id:"call_indirect",signature:k};if(typeof v!=="undefined"&&v.length>0){E.intrs=v}return E}function byteArray(k){if(!(_typeof(k)==="object"&&typeof k.length!=="undefined")){throw new Error('typeof values === "object" && typeof values.length !== "undefined"'+" error: "+(undefined||"unknown"))}var v={type:"ByteArray",values:k};return v}function func(k,v,E,P,R){if(!(_typeof(E)==="object"&&typeof E.length!=="undefined")){throw new Error('typeof body === "object" && typeof body.length !== "undefined"'+" error: "+(undefined||"unknown"))}if(P!==null&&P!==undefined){if(!(typeof P==="boolean")){throw new Error('typeof isExternal === "boolean"'+" error: "+("Argument isExternal must be of type boolean, given: "+_typeof(P)||0))}}var L={type:"Func",name:k,signature:v,body:E};if(P===true){L.isExternal=true}if(typeof R!=="undefined"){L.metadata=R}return L}function internalBrUnless(k){if(!(typeof k==="number")){throw new Error('typeof target === "number"'+" error: "+("Argument target must be of type number, given: "+_typeof(k)||0))}var v={type:"InternalBrUnless",target:k};return v}function internalGoto(k){if(!(typeof k==="number")){throw new Error('typeof target === "number"'+" error: "+("Argument target must be of type number, given: "+_typeof(k)||0))}var v={type:"InternalGoto",target:k};return v}function internalCallExtern(k){if(!(typeof k==="number")){throw new Error('typeof target === "number"'+" error: "+("Argument target must be of type number, given: "+_typeof(k)||0))}var v={type:"InternalCallExtern",target:k};return v}function internalEndAndReturn(){var k={type:"InternalEndAndReturn"};return k}var E=isTypeOf("Module");v.isModule=E;var P=isTypeOf("ModuleMetadata");v.isModuleMetadata=P;var R=isTypeOf("ModuleNameMetadata");v.isModuleNameMetadata=R;var L=isTypeOf("FunctionNameMetadata");v.isFunctionNameMetadata=L;var N=isTypeOf("LocalNameMetadata");v.isLocalNameMetadata=N;var q=isTypeOf("BinaryModule");v.isBinaryModule=q;var ae=isTypeOf("QuoteModule");v.isQuoteModule=ae;var le=isTypeOf("SectionMetadata");v.isSectionMetadata=le;var pe=isTypeOf("ProducersSectionMetadata");v.isProducersSectionMetadata=pe;var me=isTypeOf("ProducerMetadata");v.isProducerMetadata=me;var ye=isTypeOf("ProducerMetadataVersionedName");v.isProducerMetadataVersionedName=ye;var _e=isTypeOf("LoopInstruction");v.isLoopInstruction=_e;var Ie=isTypeOf("Instr");v.isInstr=Ie;var Me=isTypeOf("IfInstruction");v.isIfInstruction=Me;var Te=isTypeOf("StringLiteral");v.isStringLiteral=Te;var je=isTypeOf("NumberLiteral");v.isNumberLiteral=je;var Ne=isTypeOf("LongNumberLiteral");v.isLongNumberLiteral=Ne;var Be=isTypeOf("FloatLiteral");v.isFloatLiteral=Be;var qe=isTypeOf("Elem");v.isElem=qe;var Ue=isTypeOf("IndexInFuncSection");v.isIndexInFuncSection=Ue;var Ge=isTypeOf("ValtypeLiteral");v.isValtypeLiteral=Ge;var He=isTypeOf("TypeInstruction");v.isTypeInstruction=He;var We=isTypeOf("Start");v.isStart=We;var Qe=isTypeOf("GlobalType");v.isGlobalType=Qe;var Je=isTypeOf("LeadingComment");v.isLeadingComment=Je;var Ve=isTypeOf("BlockComment");v.isBlockComment=Ve;var Ke=isTypeOf("Data");v.isData=Ke;var Ye=isTypeOf("Global");v.isGlobal=Ye;var Xe=isTypeOf("Table");v.isTable=Xe;var Ze=isTypeOf("Memory");v.isMemory=Ze;var et=isTypeOf("FuncImportDescr");v.isFuncImportDescr=et;var tt=isTypeOf("ModuleImport");v.isModuleImport=tt;var nt=isTypeOf("ModuleExportDescr");v.isModuleExportDescr=nt;var st=isTypeOf("ModuleExport");v.isModuleExport=st;var rt=isTypeOf("Limit");v.isLimit=rt;var ot=isTypeOf("Signature");v.isSignature=ot;var it=isTypeOf("Program");v.isProgram=it;var at=isTypeOf("Identifier");v.isIdentifier=at;var ct=isTypeOf("BlockInstruction");v.isBlockInstruction=ct;var lt=isTypeOf("CallInstruction");v.isCallInstruction=lt;var ut=isTypeOf("CallIndirectInstruction");v.isCallIndirectInstruction=ut;var pt=isTypeOf("ByteArray");v.isByteArray=pt;var dt=isTypeOf("Func");v.isFunc=dt;var ft=isTypeOf("InternalBrUnless");v.isInternalBrUnless=ft;var ht=isTypeOf("InternalGoto");v.isInternalGoto=ht;var mt=isTypeOf("InternalCallExtern");v.isInternalCallExtern=mt;var gt=isTypeOf("InternalEndAndReturn");v.isInternalEndAndReturn=gt;var yt=function isNode(k){return E(k)||P(k)||R(k)||L(k)||N(k)||q(k)||ae(k)||le(k)||pe(k)||me(k)||ye(k)||_e(k)||Ie(k)||Me(k)||Te(k)||je(k)||Ne(k)||Be(k)||qe(k)||Ue(k)||Ge(k)||He(k)||We(k)||Qe(k)||Je(k)||Ve(k)||Ke(k)||Ye(k)||Xe(k)||Ze(k)||et(k)||tt(k)||nt(k)||st(k)||rt(k)||ot(k)||it(k)||at(k)||ct(k)||lt(k)||ut(k)||pt(k)||dt(k)||ft(k)||ht(k)||mt(k)||gt(k)};v.isNode=yt;var bt=function isBlock(k){return _e(k)||ct(k)||dt(k)};v.isBlock=bt;var xt=function isInstruction(k){return _e(k)||Ie(k)||Me(k)||He(k)||ct(k)||lt(k)||ut(k)};v.isInstruction=xt;var kt=function isExpression(k){return Ie(k)||Te(k)||je(k)||Ne(k)||Be(k)||Ge(k)||at(k)};v.isExpression=kt;var vt=function isNumericLiteral(k){return je(k)||Ne(k)||Be(k)};v.isNumericLiteral=vt;var wt=function isImportDescr(k){return Qe(k)||Xe(k)||Ze(k)||et(k)};v.isImportDescr=wt;var At=function isIntrinsic(k){return ft(k)||ht(k)||mt(k)||gt(k)};v.isIntrinsic=At;var Et=assertTypeOf("Module");v.assertModule=Et;var Ct=assertTypeOf("ModuleMetadata");v.assertModuleMetadata=Ct;var St=assertTypeOf("ModuleNameMetadata");v.assertModuleNameMetadata=St;var _t=assertTypeOf("FunctionNameMetadata");v.assertFunctionNameMetadata=_t;var It=assertTypeOf("LocalNameMetadata");v.assertLocalNameMetadata=It;var Mt=assertTypeOf("BinaryModule");v.assertBinaryModule=Mt;var Pt=assertTypeOf("QuoteModule");v.assertQuoteModule=Pt;var Ot=assertTypeOf("SectionMetadata");v.assertSectionMetadata=Ot;var Dt=assertTypeOf("ProducersSectionMetadata");v.assertProducersSectionMetadata=Dt;var Rt=assertTypeOf("ProducerMetadata");v.assertProducerMetadata=Rt;var Tt=assertTypeOf("ProducerMetadataVersionedName");v.assertProducerMetadataVersionedName=Tt;var $t=assertTypeOf("LoopInstruction");v.assertLoopInstruction=$t;var Ft=assertTypeOf("Instr");v.assertInstr=Ft;var jt=assertTypeOf("IfInstruction");v.assertIfInstruction=jt;var Lt=assertTypeOf("StringLiteral");v.assertStringLiteral=Lt;var Nt=assertTypeOf("NumberLiteral");v.assertNumberLiteral=Nt;var Bt=assertTypeOf("LongNumberLiteral");v.assertLongNumberLiteral=Bt;var qt=assertTypeOf("FloatLiteral");v.assertFloatLiteral=qt;var zt=assertTypeOf("Elem");v.assertElem=zt;var Ut=assertTypeOf("IndexInFuncSection");v.assertIndexInFuncSection=Ut;var Gt=assertTypeOf("ValtypeLiteral");v.assertValtypeLiteral=Gt;var Ht=assertTypeOf("TypeInstruction");v.assertTypeInstruction=Ht;var Wt=assertTypeOf("Start");v.assertStart=Wt;var Qt=assertTypeOf("GlobalType");v.assertGlobalType=Qt;var Jt=assertTypeOf("LeadingComment");v.assertLeadingComment=Jt;var Vt=assertTypeOf("BlockComment");v.assertBlockComment=Vt;var Kt=assertTypeOf("Data");v.assertData=Kt;var Yt=assertTypeOf("Global");v.assertGlobal=Yt;var Xt=assertTypeOf("Table");v.assertTable=Xt;var Zt=assertTypeOf("Memory");v.assertMemory=Zt;var en=assertTypeOf("FuncImportDescr");v.assertFuncImportDescr=en;var tn=assertTypeOf("ModuleImport");v.assertModuleImport=tn;var nn=assertTypeOf("ModuleExportDescr");v.assertModuleExportDescr=nn;var sn=assertTypeOf("ModuleExport");v.assertModuleExport=sn;var rn=assertTypeOf("Limit");v.assertLimit=rn;var on=assertTypeOf("Signature");v.assertSignature=on;var an=assertTypeOf("Program");v.assertProgram=an;var cn=assertTypeOf("Identifier");v.assertIdentifier=cn;var ln=assertTypeOf("BlockInstruction");v.assertBlockInstruction=ln;var un=assertTypeOf("CallInstruction");v.assertCallInstruction=un;var pn=assertTypeOf("CallIndirectInstruction");v.assertCallIndirectInstruction=pn;var dn=assertTypeOf("ByteArray");v.assertByteArray=dn;var hn=assertTypeOf("Func");v.assertFunc=hn;var mn=assertTypeOf("InternalBrUnless");v.assertInternalBrUnless=mn;var gn=assertTypeOf("InternalGoto");v.assertInternalGoto=gn;var yn=assertTypeOf("InternalCallExtern");v.assertInternalCallExtern=yn;var bn=assertTypeOf("InternalEndAndReturn");v.assertInternalEndAndReturn=bn;var xn={Module:["Node"],ModuleMetadata:["Node"],ModuleNameMetadata:["Node"],FunctionNameMetadata:["Node"],LocalNameMetadata:["Node"],BinaryModule:["Node"],QuoteModule:["Node"],SectionMetadata:["Node"],ProducersSectionMetadata:["Node"],ProducerMetadata:["Node"],ProducerMetadataVersionedName:["Node"],LoopInstruction:["Node","Block","Instruction"],Instr:["Node","Expression","Instruction"],IfInstruction:["Node","Instruction"],StringLiteral:["Node","Expression"],NumberLiteral:["Node","NumericLiteral","Expression"],LongNumberLiteral:["Node","NumericLiteral","Expression"],FloatLiteral:["Node","NumericLiteral","Expression"],Elem:["Node"],IndexInFuncSection:["Node"],ValtypeLiteral:["Node","Expression"],TypeInstruction:["Node","Instruction"],Start:["Node"],GlobalType:["Node","ImportDescr"],LeadingComment:["Node"],BlockComment:["Node"],Data:["Node"],Global:["Node"],Table:["Node","ImportDescr"],Memory:["Node","ImportDescr"],FuncImportDescr:["Node","ImportDescr"],ModuleImport:["Node"],ModuleExportDescr:["Node"],ModuleExport:["Node"],Limit:["Node"],Signature:["Node"],Program:["Node"],Identifier:["Node","Expression"],BlockInstruction:["Node","Block","Instruction"],CallInstruction:["Node","Instruction"],CallIndirectInstruction:["Node","Instruction"],ByteArray:["Node"],Func:["Node","Block"],InternalBrUnless:["Node","Intrinsic"],InternalGoto:["Node","Intrinsic"],InternalCallExtern:["Node","Intrinsic"],InternalEndAndReturn:["Node","Intrinsic"]};v.unionTypesMap=xn;var kn=["Module","ModuleMetadata","ModuleNameMetadata","FunctionNameMetadata","LocalNameMetadata","BinaryModule","QuoteModule","SectionMetadata","ProducersSectionMetadata","ProducerMetadata","ProducerMetadataVersionedName","LoopInstruction","Instr","IfInstruction","StringLiteral","NumberLiteral","LongNumberLiteral","FloatLiteral","Elem","IndexInFuncSection","ValtypeLiteral","TypeInstruction","Start","GlobalType","LeadingComment","BlockComment","Data","Global","Table","Memory","FuncImportDescr","ModuleImport","ModuleExportDescr","ModuleExport","Limit","Signature","Program","Identifier","BlockInstruction","CallInstruction","CallIndirectInstruction","ByteArray","Func","InternalBrUnless","InternalGoto","InternalCallExtern","InternalEndAndReturn","Node","Block","Instruction","Expression","NumericLiteral","ImportDescr","Intrinsic"];v.nodeAndUnionTypes=kn},96395:function(k,v){"use strict";Object.defineProperty(v,"__esModule",{value:true});v.signatures=void 0;function sign(k,v){return[k,v]}var E="u32";var P="i32";var R="i64";var L="f32";var N="f64";var q=function vector(k){var v=[k];v.vector=true;return v};var ae={unreachable:sign([],[]),nop:sign([],[]),br:sign([E],[]),br_if:sign([E],[]),br_table:sign(q(E),[]),return:sign([],[]),call:sign([E],[]),call_indirect:sign([E],[])};var le={drop:sign([],[]),select:sign([],[])};var pe={get_local:sign([E],[]),set_local:sign([E],[]),tee_local:sign([E],[]),get_global:sign([E],[]),set_global:sign([E],[])};var me={"i32.load":sign([E,E],[P]),"i64.load":sign([E,E],[]),"f32.load":sign([E,E],[]),"f64.load":sign([E,E],[]),"i32.load8_s":sign([E,E],[P]),"i32.load8_u":sign([E,E],[P]),"i32.load16_s":sign([E,E],[P]),"i32.load16_u":sign([E,E],[P]),"i64.load8_s":sign([E,E],[R]),"i64.load8_u":sign([E,E],[R]),"i64.load16_s":sign([E,E],[R]),"i64.load16_u":sign([E,E],[R]),"i64.load32_s":sign([E,E],[R]),"i64.load32_u":sign([E,E],[R]),"i32.store":sign([E,E],[]),"i64.store":sign([E,E],[]),"f32.store":sign([E,E],[]),"f64.store":sign([E,E],[]),"i32.store8":sign([E,E],[]),"i32.store16":sign([E,E],[]),"i64.store8":sign([E,E],[]),"i64.store16":sign([E,E],[]),"i64.store32":sign([E,E],[]),current_memory:sign([],[]),grow_memory:sign([],[])};var ye={"i32.const":sign([P],[P]),"i64.const":sign([R],[R]),"f32.const":sign([L],[L]),"f64.const":sign([N],[N]),"i32.eqz":sign([P],[P]),"i32.eq":sign([P,P],[P]),"i32.ne":sign([P,P],[P]),"i32.lt_s":sign([P,P],[P]),"i32.lt_u":sign([P,P],[P]),"i32.gt_s":sign([P,P],[P]),"i32.gt_u":sign([P,P],[P]),"i32.le_s":sign([P,P],[P]),"i32.le_u":sign([P,P],[P]),"i32.ge_s":sign([P,P],[P]),"i32.ge_u":sign([P,P],[P]),"i64.eqz":sign([R],[R]),"i64.eq":sign([R,R],[P]),"i64.ne":sign([R,R],[P]),"i64.lt_s":sign([R,R],[P]),"i64.lt_u":sign([R,R],[P]),"i64.gt_s":sign([R,R],[P]),"i64.gt_u":sign([R,R],[P]),"i64.le_s":sign([R,R],[P]),"i64.le_u":sign([R,R],[P]),"i64.ge_s":sign([R,R],[P]),"i64.ge_u":sign([R,R],[P]),"f32.eq":sign([L,L],[P]),"f32.ne":sign([L,L],[P]),"f32.lt":sign([L,L],[P]),"f32.gt":sign([L,L],[P]),"f32.le":sign([L,L],[P]),"f32.ge":sign([L,L],[P]),"f64.eq":sign([N,N],[P]),"f64.ne":sign([N,N],[P]),"f64.lt":sign([N,N],[P]),"f64.gt":sign([N,N],[P]),"f64.le":sign([N,N],[P]),"f64.ge":sign([N,N],[P]),"i32.clz":sign([P],[P]),"i32.ctz":sign([P],[P]),"i32.popcnt":sign([P],[P]),"i32.add":sign([P,P],[P]),"i32.sub":sign([P,P],[P]),"i32.mul":sign([P,P],[P]),"i32.div_s":sign([P,P],[P]),"i32.div_u":sign([P,P],[P]),"i32.rem_s":sign([P,P],[P]),"i32.rem_u":sign([P,P],[P]),"i32.and":sign([P,P],[P]),"i32.or":sign([P,P],[P]),"i32.xor":sign([P,P],[P]),"i32.shl":sign([P,P],[P]),"i32.shr_s":sign([P,P],[P]),"i32.shr_u":sign([P,P],[P]),"i32.rotl":sign([P,P],[P]),"i32.rotr":sign([P,P],[P]),"i64.clz":sign([R],[R]),"i64.ctz":sign([R],[R]),"i64.popcnt":sign([R],[R]),"i64.add":sign([R,R],[R]),"i64.sub":sign([R,R],[R]),"i64.mul":sign([R,R],[R]),"i64.div_s":sign([R,R],[R]),"i64.div_u":sign([R,R],[R]),"i64.rem_s":sign([R,R],[R]),"i64.rem_u":sign([R,R],[R]),"i64.and":sign([R,R],[R]),"i64.or":sign([R,R],[R]),"i64.xor":sign([R,R],[R]),"i64.shl":sign([R,R],[R]),"i64.shr_s":sign([R,R],[R]),"i64.shr_u":sign([R,R],[R]),"i64.rotl":sign([R,R],[R]),"i64.rotr":sign([R,R],[R]),"f32.abs":sign([L],[L]),"f32.neg":sign([L],[L]),"f32.ceil":sign([L],[L]),"f32.floor":sign([L],[L]),"f32.trunc":sign([L],[L]),"f32.nearest":sign([L],[L]),"f32.sqrt":sign([L],[L]),"f32.add":sign([L,L],[L]),"f32.sub":sign([L,L],[L]),"f32.mul":sign([L,L],[L]),"f32.div":sign([L,L],[L]),"f32.min":sign([L,L],[L]),"f32.max":sign([L,L],[L]),"f32.copysign":sign([L,L],[L]),"f64.abs":sign([N],[N]),"f64.neg":sign([N],[N]),"f64.ceil":sign([N],[N]),"f64.floor":sign([N],[N]),"f64.trunc":sign([N],[N]),"f64.nearest":sign([N],[N]),"f64.sqrt":sign([N],[N]),"f64.add":sign([N,N],[N]),"f64.sub":sign([N,N],[N]),"f64.mul":sign([N,N],[N]),"f64.div":sign([N,N],[N]),"f64.min":sign([N,N],[N]),"f64.max":sign([N,N],[N]),"f64.copysign":sign([N,N],[N]),"i32.wrap/i64":sign([R],[P]),"i32.trunc_s/f32":sign([L],[P]),"i32.trunc_u/f32":sign([L],[P]),"i32.trunc_s/f64":sign([L],[P]),"i32.trunc_u/f64":sign([N],[P]),"i64.extend_s/i32":sign([P],[R]),"i64.extend_u/i32":sign([P],[R]),"i64.trunc_s/f32":sign([L],[R]),"i64.trunc_u/f32":sign([L],[R]),"i64.trunc_s/f64":sign([N],[R]),"i64.trunc_u/f64":sign([N],[R]),"f32.convert_s/i32":sign([P],[L]),"f32.convert_u/i32":sign([P],[L]),"f32.convert_s/i64":sign([R],[L]),"f32.convert_u/i64":sign([R],[L]),"f32.demote/f64":sign([N],[L]),"f64.convert_s/i32":sign([P],[N]),"f64.convert_u/i32":sign([P],[N]),"f64.convert_s/i64":sign([R],[N]),"f64.convert_u/i64":sign([R],[N]),"f64.promote/f32":sign([L],[N]),"i32.reinterpret/f32":sign([L],[P]),"i64.reinterpret/f64":sign([N],[R]),"f32.reinterpret/i32":sign([P],[L]),"f64.reinterpret/i64":sign([R],[N])};var _e=Object.assign({},ae,le,pe,me,ye);v.signatures=_e},15067:function(k,v,E){"use strict";Object.defineProperty(v,"__esModule",{value:true});v.moduleContextFromModuleAST=moduleContextFromModuleAST;v.ModuleContext=void 0;var P=E(860);function _classCallCheck(k,v){if(!(k instanceof v)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(k,v){for(var E=0;E<v.length;E++){var P=v[E];P.enumerable=P.enumerable||false;P.configurable=true;if("value"in P)P.writable=true;Object.defineProperty(k,P.key,P)}}function _createClass(k,v,E){if(v)_defineProperties(k.prototype,v);if(E)_defineProperties(k,E);return k}function moduleContextFromModuleAST(k){var v=new R;if(!(k.type==="Module")){throw new Error('m.type === "Module"'+" error: "+(undefined||"unknown"))}k.fields.forEach((function(k){switch(k.type){case"Start":{v.setStart(k.index);break}case"TypeInstruction":{v.addType(k);break}case"Func":{v.addFunction(k);break}case"Global":{v.defineGlobal(k);break}case"ModuleImport":{switch(k.descr.type){case"GlobalType":{v.importGlobal(k.descr.valtype,k.descr.mutability);break}case"Memory":{v.addMemory(k.descr.limits.min,k.descr.limits.max);break}case"FuncImportDescr":{v.importFunction(k.descr);break}case"Table":{break}default:throw new Error("Unsupported ModuleImport of type "+JSON.stringify(k.descr.type))}break}case"Memory":{v.addMemory(k.limits.min,k.limits.max);break}}}));return v}var R=function(){function ModuleContext(){_classCallCheck(this,ModuleContext);this.funcs=[];this.funcsOffsetByIdentifier=[];this.types=[];this.globals=[];this.globalsOffsetByIdentifier=[];this.mems=[];this.locals=[];this.labels=[];this["return"]=[];this.debugName="unknown";this.start=null}_createClass(ModuleContext,[{key:"setStart",value:function setStart(k){this.start=k.value}},{key:"getStart",value:function getStart(){return this.start}},{key:"newContext",value:function newContext(k,v){this.locals=[];this.labels=[v];this["return"]=v;this.debugName=k}},{key:"addFunction",value:function addFunction(k){var v=k.signature||{},E=v.params,P=E===void 0?[]:E,R=v.results,L=R===void 0?[]:R;P=P.map((function(k){return k.valtype}));this.funcs.push({args:P,result:L});if(typeof k.name!=="undefined"){this.funcsOffsetByIdentifier[k.name.value]=this.funcs.length-1}}},{key:"importFunction",value:function importFunction(k){if((0,P.isSignature)(k.signature)){var v=k.signature,E=v.params,R=v.results;E=E.map((function(k){return k.valtype}));this.funcs.push({args:E,result:R})}else{if(!(0,P.isNumberLiteral)(k.signature)){throw new Error("isNumberLiteral(funcimport.signature)"+" error: "+(undefined||"unknown"))}var L=k.signature.value;if(!this.hasType(L)){throw new Error("this.hasType(typeId)"+" error: "+(undefined||"unknown"))}var N=this.getType(L);this.funcs.push({args:N.params.map((function(k){return k.valtype})),result:N.results})}if(typeof k.id!=="undefined"){this.funcsOffsetByIdentifier[k.id.value]=this.funcs.length-1}}},{key:"hasFunction",value:function hasFunction(k){return typeof this.getFunction(k)!=="undefined"}},{key:"getFunction",value:function getFunction(k){if(typeof k!=="number"){throw new Error("getFunction only supported for number index")}return this.funcs[k]}},{key:"getFunctionOffsetByIdentifier",value:function getFunctionOffsetByIdentifier(k){if(!(typeof k==="string")){throw new Error('typeof name === "string"'+" error: "+(undefined||"unknown"))}return this.funcsOffsetByIdentifier[k]}},{key:"addLabel",value:function addLabel(k){this.labels.unshift(k)}},{key:"hasLabel",value:function hasLabel(k){return this.labels.length>k&&k>=0}},{key:"getLabel",value:function getLabel(k){return this.labels[k]}},{key:"popLabel",value:function popLabel(){this.labels.shift()}},{key:"hasLocal",value:function hasLocal(k){return typeof this.getLocal(k)!=="undefined"}},{key:"getLocal",value:function getLocal(k){return this.locals[k]}},{key:"addLocal",value:function addLocal(k){this.locals.push(k)}},{key:"addType",value:function addType(k){if(!(k.functype.type==="Signature")){throw new Error('type.functype.type === "Signature"'+" error: "+(undefined||"unknown"))}this.types.push(k.functype)}},{key:"hasType",value:function hasType(k){return this.types[k]!==undefined}},{key:"getType",value:function getType(k){return this.types[k]}},{key:"hasGlobal",value:function hasGlobal(k){return this.globals.length>k&&k>=0}},{key:"getGlobal",value:function getGlobal(k){return this.globals[k].type}},{key:"getGlobalOffsetByIdentifier",value:function getGlobalOffsetByIdentifier(k){if(!(typeof k==="string")){throw new Error('typeof name === "string"'+" error: "+(undefined||"unknown"))}return this.globalsOffsetByIdentifier[k]}},{key:"defineGlobal",value:function defineGlobal(k){var v=k.globalType.valtype;var E=k.globalType.mutability;this.globals.push({type:v,mutability:E});if(typeof k.name!=="undefined"){this.globalsOffsetByIdentifier[k.name.value]=this.globals.length-1}}},{key:"importGlobal",value:function importGlobal(k,v){this.globals.push({type:k,mutability:v})}},{key:"isMutableGlobal",value:function isMutableGlobal(k){return this.globals[k].mutability==="var"}},{key:"isImmutableGlobal",value:function isImmutableGlobal(k){return this.globals[k].mutability==="const"}},{key:"hasMemory",value:function hasMemory(k){return this.mems.length>k&&k>=0}},{key:"addMemory",value:function addMemory(k,v){this.mems.push({min:k,max:v})}},{key:"getMemory",value:function getMemory(k){return this.mems[k]}}]);return ModuleContext}();v.ModuleContext=R},11885:function(k,v,E){"use strict";Object.defineProperty(v,"__esModule",{value:true});v.traverse=traverse;var P=E(92489);var R=E(860);function walk(k,v){var E=false;function innerWalk(k,v){if(E){return}var R=k.node;if(R===undefined){console.warn("traversing with an empty context");return}if(R._deleted===true){return}var L=(0,P.createPath)(k);v(R.type,L);if(L.shouldStop){E=true;return}Object.keys(R).forEach((function(k){var E=R[k];if(E===null||E===undefined){return}var P=Array.isArray(E)?E:[E];P.forEach((function(P){if(typeof P.type==="string"){var R={node:P,parentKey:k,parentPath:L,shouldStop:false,inList:Array.isArray(E)};innerWalk(R,v)}}))}))}innerWalk(k,v)}var L=function noop(){};function traverse(k,v){var E=arguments.length>2&&arguments[2]!==undefined?arguments[2]:L;var P=arguments.length>3&&arguments[3]!==undefined?arguments[3]:L;Object.keys(v).forEach((function(k){if(!R.nodeAndUnionTypes.includes(k)){throw new Error("Unexpected visitor ".concat(k))}}));var N={node:k,inList:false,shouldStop:false,parentPath:null,parentKey:null};walk(N,(function(k,L){if(typeof v[k]==="function"){E(k,L);v[k](L);P(k,L)}var N=R.unionTypesMap[k];if(!N){throw new Error("Unexpected node type ".concat(k))}N.forEach((function(k){if(typeof v[k]==="function"){E(k,L);v[k](L);P(k,L)}}))}))}},20885:function(k,v,E){"use strict";Object.defineProperty(v,"__esModule",{value:true});v.isAnonymous=isAnonymous;v.getSectionMetadata=getSectionMetadata;v.getSectionMetadatas=getSectionMetadatas;v.sortSectionMetadata=sortSectionMetadata;v.orderedInsertNode=orderedInsertNode;v.assertHasLoc=assertHasLoc;v.getEndOfSection=getEndOfSection;v.shiftLoc=shiftLoc;v.shiftSection=shiftSection;v.signatureForOpcode=signatureForOpcode;v.getUniqueNameGenerator=getUniqueNameGenerator;v.getStartByteOffset=getStartByteOffset;v.getEndByteOffset=getEndByteOffset;v.getFunctionBeginingByteOffset=getFunctionBeginingByteOffset;v.getEndBlockByteOffset=getEndBlockByteOffset;v.getStartBlockByteOffset=getStartBlockByteOffset;var P=E(96395);var R=E(11885);var L=_interopRequireWildcard(E(94545));function _getRequireWildcardCache(k){if(typeof WeakMap!=="function")return null;var v=new WeakMap;var E=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(k){return k?E:v})(k)}function _interopRequireWildcard(k,v){if(!v&&k&&k.__esModule){return k}if(k===null||_typeof(k)!=="object"&&typeof k!=="function"){return{default:k}}var E=_getRequireWildcardCache(v);if(E&&E.has(k)){return E.get(k)}var P={};var R=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var L in k){if(L!=="default"&&Object.prototype.hasOwnProperty.call(k,L)){var N=R?Object.getOwnPropertyDescriptor(k,L):null;if(N&&(N.get||N.set)){Object.defineProperty(P,L,N)}else{P[L]=k[L]}}}P["default"]=k;if(E){E.set(k,P)}return P}function _slicedToArray(k,v){return _arrayWithHoles(k)||_iterableToArrayLimit(k,v)||_unsupportedIterableToArray(k,v)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(k,v){if(!k)return;if(typeof k==="string")return _arrayLikeToArray(k,v);var E=Object.prototype.toString.call(k).slice(8,-1);if(E==="Object"&&k.constructor)E=k.constructor.name;if(E==="Map"||E==="Set")return Array.from(k);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return _arrayLikeToArray(k,v)}function _arrayLikeToArray(k,v){if(v==null||v>k.length)v=k.length;for(var E=0,P=new Array(v);E<v;E++){P[E]=k[E]}return P}function _iterableToArrayLimit(k,v){var E=k==null?null:typeof Symbol!=="undefined"&&k[Symbol.iterator]||k["@@iterator"];if(E==null)return;var P=[];var R=true;var L=false;var N,q;try{for(E=E.call(k);!(R=(N=E.next()).done);R=true){P.push(N.value);if(v&&P.length===v)break}}catch(k){L=true;q=k}finally{try{if(!R&&E["return"]!=null)E["return"]()}finally{if(L)throw q}}return P}function _arrayWithHoles(k){if(Array.isArray(k))return k}function _typeof(k){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(k){return typeof k}}else{_typeof=function _typeof(k){return k&&typeof Symbol==="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k}}return _typeof(k)}function isAnonymous(k){return k.raw===""}function getSectionMetadata(k,v){var E;(0,R.traverse)(k,{SectionMetadata:function(k){function SectionMetadata(v){return k.apply(this,arguments)}SectionMetadata.toString=function(){return k.toString()};return SectionMetadata}((function(k){var P=k.node;if(P.section===v){E=P}}))});return E}function getSectionMetadatas(k,v){var E=[];(0,R.traverse)(k,{SectionMetadata:function(k){function SectionMetadata(v){return k.apply(this,arguments)}SectionMetadata.toString=function(){return k.toString()};return SectionMetadata}((function(k){var P=k.node;if(P.section===v){E.push(P)}}))});return E}function sortSectionMetadata(k){if(k.metadata==null