-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwasmparser.js
More file actions
1 lines (1 loc) · 65.3 KB
/
Copy pathwasmparser.js
File metadata and controls
1 lines (1 loc) · 65.3 KB
1
(()=>{var I=(t,x)=>()=>(x||t((x={exports:{}}).exports,x),x.exports);var E=I((En,G)=>{var oe={127:"i32",126:"i64",125:"f32",124:"f64",123:"v128",112:"funcref",111:"externref",externref:111,funcref:112,v128:123,f64:124,f32:125,i64:126,i32:127};function se(t,x){let a=0,e=0,f,n=0;do f=t.getUint8(x++),n++,a|=(f&127)<<e,e+=7;while(f&128);return{value:a,bytesRead:n}}function P(t,x){let a=0,e=0,f,n=0;do f=t.getUint8(x++),n++,a|=(f&127)<<e,e+=7;while(f&128);return{value:a>>>0,bytesRead:n}}function re(t,x){let a=0,e=0,f=0,n=0;do f=t.getUint8(x++),n++,a|=(f&127)<<e,e+=7;while(f&128);return e<32&&f&64&&(a|=-1<<e),{value:a|0,bytesRead:n}}function de(t,x){let a=0n,e=0n,f=0,n=0;do f=t.getUint8(x++),n++,a|=BigInt(f&127)<<e,e+=7n;while(f&128);return f&64&&(a|=~0n<<e),{value:a,bytesRead:n}}function V(t,x=!1){let a=[];if(typeof t=="bigint"){if(!x&&t<0n)throw new Error("ULEB128 cannot encode negative value");if(x){let e=t,f=!0;for(;f;){let n=Number(e&0x7fn);e>>=7n;let i=n&64;e===0n&&i===0||e===-1n&&i!==0?f=!1:n|=128,a.push(n)}}else{let e=t;do{let f=Number(e&0x7fn);e>>=7n,e!==0n&&(f|=128),a.push(f)}while(e!==0n)}return a}if(x){let e=!0,f=t|0;for(;e;){let n=f&127;f>>=7;let i=n&64;f===0&&i===0||f===-1&&i!==0?e=!1:n|=128,a.push(n)}}else{let e=t>>>0;do{let f=e&127;e>>>=7,e!==0&&(f|=128),a.push(f)}while(e!==0)}return a}function ce(t,x,a=!1){if(x===void 0||x<1)return V(t,a);let e=[],f=a?BigInt(t):t>>>0;for(let n=0;n<x;n++){let i;a?(i=Number(f&0x7Fn),f>>=7n):(i=f&127,f>>>=7),n<x-1&&(i|=128),e.push(i)}return(!a&&f!==0||a&&f!==0n&&f!==-1n)&&console.warn(`Warning: Value ${t} requires more than ${x} LEB128 bytes (signed=${a})`),e}function le(t,x){let a=P(t,x),e=x+a.bytesRead,f=new Uint8Array(t.buffer,t.byteOffset+e,a.value);return{name:new TextDecoder("utf-8").decode(f),bytesRead:a.bytesRead+a.value}}function _e(t){let x=t.reduce((f,n)=>f+n.length,0),a=new Uint8Array(x),e=0;for(let f of t)a.set(f,e),e+=f.length;return a}function ue(t,x,a=!1){let e=!0,f=Math.min(t.length,x.length);for(let n=0;n<f;n++)if(t[n]!==x[n]){a&&console.log(`byte ${n} different`),a&&console.log(`og:0x${t[n].toString(16).padStart(2,"0")}`),a&&console.log(`rebuilt: 0x${x[n].toString(16).padStart(2,"0")}`),e=!1;break}return e&&t.length===x.length?(a&&console.log("Match."),!0):e?(a&&console.log("Match. Difference in size)"),1):(a&&console.log("No Match"),!1)}G.exports={readLEB128:se,readULEB128:P,readSLEB128:re,readSLEB128i64:de,readString:le,intToLeb128:V,intToLeb128Padded:ce,compareBuffers:ue,concatUint8Arrays:_e,valTypes:oe}});var J=I((Mn,H)=>{var{readLEB128:jn,readULEB128:Nn,readString:Ln,intToLeb128:p,intToLeb128Padded:Bn,concatUint8Arrays:L}=E();function me(t){let x=[];x.push(new Uint8Array(p(t.length)));for(let n of t)x.push(new Uint8Array([96])),x.push(new Uint8Array(p(n.params.length))),x.push(new Uint8Array(n.params)),x.push(new Uint8Array(p(n.results.length))),x.push(new Uint8Array(n.results));let a=x.reduce((n,i)=>n+i.length,0),e=new Uint8Array(a),f=0;for(let n of x)e.set(n,f),f+=n.length;return e}function be(t){let{imports:x}=t,a=[];a.push(new Uint8Array(p(x.length)));for(let i of x){let s=new TextEncoder().encode(i.module);a.push(new Uint8Array(p(s.length))),a.push(s);let r=new TextEncoder().encode(i.field);switch(a.push(new Uint8Array(p(r.length))),a.push(r),a.push(new Uint8Array([i.kind])),i.kind){case 0:a.push(new Uint8Array(p(i.type.typeIndex)));break;case 1:a.push(new Uint8Array([i.type.elementType])),a.push(new Uint8Array(Z(i.type.limits)));break;case 2:a.push(new Uint8Array(Z(i.type.limits)));break;case 3:a.push(new Uint8Array([i.type.valtype])),a.push(new Uint8Array([i.type.mutable?1:0]));break;case 4:a.push(new Uint8Array([i.type.attribute])),a.push(new Uint8Array(p(i.type.typeIndex)));break;default:console.warn(`serializeImportSection: unknown kind ${i.kind}, skipping description`);break}}let e=a.reduce((i,s)=>i+s.length,0),f=new Uint8Array(e),n=0;for(let i of a)f.set(i,n),n+=i.length;return f}function Z(t){let x=[],a=t.maximum!==null?1:0;return x.push(new Uint8Array([a])),x.push(new Uint8Array(p(t.initial))),t.maximum!==null&&x.push(new Uint8Array(p(t.maximum))),L(x)}function pe(t){let{typeIndices:x}=t,a=[];a.push(new Uint8Array(p(x.length)));for(let i of x)a.push(new Uint8Array(p(i)));let e=a.reduce((i,s)=>i+s.length,0),f=new Uint8Array(e),n=0;for(let i of a)f.set(i,n),n+=i.length;return f}function ge(t){let x=[];x.push(new Uint8Array(p(t.length)));for(let n of t){x.push(new Uint8Array([n.elementType]));let i=n.limits.maximum!==null&&n.limits.maximum!==void 0,s=i?1:0;x.push(new Uint8Array([s])),x.push(new Uint8Array(p(n.limits.initial))),i&&x.push(new Uint8Array(p(n.limits.maximum)))}let a=x.reduce((n,i)=>n+i.length,0),e=new Uint8Array(a),f=0;for(let n of x)e.set(n,f),f+=n.length;return e}function ye(t){let x=[];x.push(new Uint8Array(p(t.length)));for(let n of t){let i=n.maximum!==null&&n.maximum!==void 0,s=i?1:0;x.push(new Uint8Array([s])),x.push(new Uint8Array(p(n.initial))),i&&x.push(new Uint8Array(p(n.maximum)))}let a=x.reduce((n,i)=>n+i.length,0),e=new Uint8Array(a),f=0;for(let n of x)e.set(n,f),f+=n.length;return e}function he(t){let x=[];x.push(new Uint8Array(p(t.length)));for(let n of t)x.push(new Uint8Array([n.type])),x.push(new Uint8Array([n.mutable?1:0])),n.initExprBytes?x.push(n.initExprBytes):x.push(new Uint8Array([65,0,11]));let a=x.reduce((n,i)=>n+i.length,0),e=new Uint8Array(a),f=0;for(let n of x)e.set(n,f),f+=n.length;return e}function we(t){let x=[];x.push(new Uint8Array(p(t.size)));for(let[n,i]of t){let s=new TextEncoder().encode(n);x.push(new Uint8Array(p(s.length))),x.push(s),x.push(new Uint8Array([i.kind])),x.push(new Uint8Array(p(i.index)))}let a=x.reduce((n,i)=>n+i.length,0),e=new Uint8Array(a),f=0;for(let n of x)e.set(n,f),f+=n.length;return e}function ve(t){let x=[];x.push(new Uint8Array(p(t.length)));for(let n of t)if(x.push(new Uint8Array(p(n.mode))),(n.mode===2||n.mode===6)&&x.push(new Uint8Array(p(n.tableIndex))),(n.mode===0||n.mode===2||n.mode===4||n.mode===6)&&x.push(n.offsetExprBytes),(n.mode===1||n.mode===2||n.mode===3||n.mode===5||n.mode===6||n.mode===7)&&x.push(new Uint8Array([n.elemType])),x.push(new Uint8Array(p(n.init.length))),n.usesExpressions)for(let i of n.init)x.push(i);else for(let i of n.init)x.push(new Uint8Array(p(i)));let a=x.reduce((n,i)=>n+i.length,0),e=new Uint8Array(a),f=0;for(let n of x)e.set(n,f),f+=n.length;return e}function Ue(t){let x=[];x.push(new Uint8Array(p(t.length)));for(let n of t)x.push(new Uint8Array(p(n.rawBody.length))),x.push(n.rawBody);let a=x.reduce((n,i)=>n+i.length,0),e=new Uint8Array(a),f=0;for(let n of x)e.set(n,f),f+=n.length;return e}function Ae(t){let x=[];x.push(new Uint8Array(p(t.length)));for(let n of t)x.push(new Uint8Array([n.mode])),(n.mode===0||n.mode===2)&&x.push(n.offsetExprBytes),x.push(new Uint8Array(p(n.data.length))),x.push(n.data);let a=x.reduce((n,i)=>n+i.length,0),e=new Uint8Array(a),f=0;for(let n of x)e.set(n,f),f+=n.length;return e}function ke(t){let x=[];F(x,"name");let a=(f,n)=>{x.push(Uint8Array.of(f)),R(x,n.length),x.push(n)},e=[[1,t.functionNames,S],[2,t.localNames,M],[3,t.labelNames,M],[4,t.typeNames,S],[5,t.tableNames,S],[6,t.memoryNames,S],[7,t.globalNames,S],[8,t.elementNames,S],[9,t.dataNames,S],[10,t.fieldNames,M],[11,t.tagNames,S]];for(let[f,n,i]of e)n&&n.size&&a(f,i(n));return L(x)}function Se(t){return new Uint8Array(p(t.count))}function Re(t){let x=[];x.push(new Uint8Array(p(t.length)));for(let n of t)x.push(new Uint8Array([n.attribute])),x.push(new Uint8Array(p(n.typeIndex)));let a=x.reduce((n,i)=>n+i.length,0),e=new Uint8Array(a),f=0;for(let n of x)e.set(n,f),f+=n.length;return e}function ze(t){return new Uint8Array(p(t.functionIndex))}function S(t){let x=[];R(x,t.size);for(let[a,e]of t)R(x,a),F(x,e);return L(x)}function M(t){let x=[];R(x,t.size);for(let[a,e]of t){R(x,a),R(x,e.size);for(let[f,n]of e)R(x,f),F(x,n)}return L(x)}function R(t,x){t.push(new Uint8Array(p(x)))}function F(t,x){let a=qe(x);R(t,a.length),t.push(a)}function qe(t){return new TextEncoder().encode(t)}H.exports={serializeTypeSection:me,serializeImportSection:be,serializeFunctionSection:pe,serializeTableSection:ge,serializeMemorySection:ye,serializeGlobalSection:he,serializeExportSection:we,serializeElementSection:ve,serializeCodeSection:Ue,serializeDataSection:Ae,serializeNameSection:ke,serializeDataCountSection:Se,serializeTagSection:Re,serializeStartSection:ze}});var Q=I((Dn,K)=>{var{readLEB128:g,readULEB128:w,readString:T,intToLeb128:Fn,intToLeb128Padded:On,readSLEB128:Te}=E();function Ie(t,x,a){let e=new Map,f=x,n=x+a,i=g(t,f);f+=i.bytesRead;for(let s=0;s<i.value;s++){let r=T(t,f);f+=r.bytesRead;let o=t.getUint8(f);f+=1;let d=g(t,f);f+=d.bytesRead,e.set(r.name,{kind:o,index:d.value,name:r.name})}return f!==n&&console.warn("Export section: position mismatch"),e}function Ee(t,x,a){let e=x,f=x+a,n=g(t,e);e+=n.bytesRead;let i=new Array(n.value);for(let s=0;s<n.value;s++){let r=g(t,e);e+=r.bytesRead,i[s]=r.value}return e!==f&&console.warn("Function section: position mismatch"),{count:n.value,typeIndices:i}}function je(t,x,a){let e=x,f=x+a,n=g(t,e);e+=n.bytesRead;let i=new Array(n.value);for(let s=0;s<n.value;s++){let r=g(t,e);e+=r.bytesRead;let o=e,d=r.value,u=new Uint8Array(t.buffer,o,d);i[s]={bodyOffset:o,bodySize:d,rawBody:u},e+=d}return e!==f&&console.warn("Code section: position mismatch"),i}function Ne(t,x,a){let e=x,f=x+a,n=g(t,e);e+=n.bytesRead;let i=new Array(n.value);for(let s=0;s<n.value;s++){if(t.getUint8(e++)!==96)throw new Error("Expected func type (0x60)");let r=g(t,e);e+=r.bytesRead;let o=[];for(let _=0;_<r.value;_++)o.push(t.getUint8(e++));let d=g(t,e);e+=d.bytesRead;let u=[];for(let _=0;_<d.value;_++)u.push(t.getUint8(e++));i[s]={params:o,results:u}}return e!==f&&console.warn("Type section: position mismatch"),i}function Le(t,x,a){let e=[],f=0,n=0,i=0,s=0,r=0,o=x,d=x+a,u=g(t,o);o+=u.bytesRead;for(let _=0;_<u.value;_++){let l=T(t,o);o+=l.bytesRead;let b=T(t,o);o+=b.bytesRead;let v=t.getUint8(o);o+=1;let c=null;switch(v){case 0:let m=g(t,o);o+=m.bytesRead,c={kind:"function",typeIndex:m.value},f++;break;case 1:let U=t.getUint8(o++),k=O(t,o);o+=k.bytesRead,c={kind:"table",elementType:U,limits:k},n++;break;case 2:let A=O(t,o);o+=A.bytesRead,c={kind:"memory",limits:A},i++;break;case 3:let q=t.getUint8(o++),j=t.getUint8(o++);c={kind:"global",valtype:q,mutable:!!j},s++;break;case 4:let N=t.getUint8(o++),W=g(t,o);o+=W.bytesRead,c={kind:"tag",attribute:N,typeIndex:W.value},r++;break;default:console.warn(`unknown ${v} offset ${o-1}`);break}e.push({module:l.name,field:b.name,kind:v,type:c})}return o!==d&&console.warn(`import section: position mismatch (ended at ${o}, expected ${d})`),{imports:e,importedFunctions:f,importedTables:n,importedMemories:i,importedGlobals:s,importedTags:r}}function Be(t,x,a){let e=x,f=x+a,n=g(t,e);e+=n.bytesRead;let i=new Array(n.value);for(let s=0;s<n.value;s++){let r=t.getUint8(e++),o=!!t.getUint8(e++),d=e;for(;t.getUint8(e++)!==11;);let u=new Uint8Array(t.buffer,t.byteOffset+d,e-d);i[s]={type:r,mutable:o,initExprBytes:u}}return e!==f&&console.warn("Global section: position mismatch"),i}function Me(t,x,a){let e=x,f=x+a,n=g(t,e);e+=n.bytesRead;let i=new Array(n.value);for(let s=0;s<n.value;s++){let r=t.getUint8(e++),o=t.getUint8(e++),d=g(t,e);e+=d.bytesRead;let u=null;if(o&1){let _=g(t,e);e+=_.bytesRead,u=_.value}i[s]={elementType:r,limits:{initial:d.value,maximum:u}}}return e!==f&&console.warn("Table section: position mismatch"),i}function z(t,x){for(;;){let a=t.getUint8(x++);if(a===11)break;if(a===65){let e=Te(t,x);x+=e.bytesRead}else if(a===210){let e=w(t,x);x+=e.bytesRead}}return x}function Fe(t,x,a){let e=x,f=x+a,n=w(t,e);e+=n.bytesRead;let i=new Array(n.value);for(let s=0;s<n.value;s++){let r=w(t,e);e+=r.bytesRead;let o={mode:r.value,tableIndex:0,offsetExprBytes:void 0,elemType:void 0,init:[],isPassive:!1,isDeclarative:!1,usesExpressions:!1};switch(o.mode){case 0:{let d=e;e=z(t,e);let u=e;o.offsetExprBytes=new Uint8Array(t.buffer,t.byteOffset+d,u-d);let _=w(t,e);e+=_.bytesRead;for(let l=0;l<_.value;l++){let b=w(t,e);e+=b.bytesRead,o.init.push(b.value)}break}case 1:{o.isPassive=!0,o.elemType=t.getUint8(e),e++;let d=w(t,e);e+=d.bytesRead;for(let u=0;u<d.value;u++){let _=w(t,e);e+=_.bytesRead,o.init.push(_.value)}break}case 2:{let d=w(t,e);o.tableIndex=d.value,e+=d.bytesRead;let u=e;e=z(t,e);let _=e;o.offsetExprBytes=new Uint8Array(t.buffer,t.byteOffset+u,_-u),o.elemType=t.getUint8(e),e++;let l=w(t,e);e+=l.bytesRead;for(let b=0;b<l.value;b++){let v=w(t,e);e+=v.bytesRead,o.init.push(v.value)}break}case 3:{o.isDeclarative=!0,o.elemType=t.getUint8(e),e++;let d=w(t,e);e+=d.bytesRead;for(let u=0;u<d.value;u++){let _=w(t,e);e+=_.bytesRead,o.init.push(_.value)}break}case 4:{o.usesExpressions=!0;let d=e;e=z(t,e);let u=e;o.offsetExprBytes=new Uint8Array(t.buffer,t.byteOffset+d,u-d);let _=w(t,e);e+=_.bytesRead;for(let l=0;l<_.value;l++){let b=e;e=z(t,e),o.init.push(new Uint8Array(t.buffer,t.byteOffset+b,e-b))}break}case 5:{o.isPassive=!0,o.usesExpressions=!0,o.elemType=t.getUint8(e),e++;let d=w(t,e);e+=d.bytesRead;for(let u=0;u<d.value;u++){let _=e;e=z(t,e),o.init.push(new Uint8Array(t.buffer,t.byteOffset+_,e-_))}break}case 6:{o.usesExpressions=!0;let d=w(t,e);o.tableIndex=d.value,e+=d.bytesRead;let u=e;e=z(t,e);let _=e;o.offsetExprBytes=new Uint8Array(t.buffer,t.byteOffset+u,_-u),o.elemType=t.getUint8(e),e++;let l=w(t,e);e+=l.bytesRead;for(let b=0;b<l.value;b++){let v=e;e=z(t,e),o.init.push(new Uint8Array(t.buffer,t.byteOffset+v,e-v))}break}case 7:{o.isDeclarative=!0,o.usesExpressions=!0,o.elemType=t.getUint8(e),e++;let d=w(t,e);e+=d.bytesRead;for(let u=0;u<d.value;u++){let _=e;e=z(t,e),o.init.push(new Uint8Array(t.buffer,t.byteOffset+_,e-_))}break}default:throw new Error("Unknown element segment mode "+o.mode)}i[s]=o}return i}function Oe(t,x,a){let e=x,f=x+a,n=g(t,e);e+=n.bytesRead;let i=new Array(n.value);for(let s=0;s<n.value;s++){let r=t.getUint8(e++),o=0,d=e,u=e;if(r===0||r===2){for(;t.getUint8(e++)!==11;);u=e}r===2&&(o=g(t,d).value,d+=g(t,d).bytesRead);let _=g(t,e);e+=_.bytesRead;let l=new Uint8Array(t.buffer,t.byteOffset+e,_.value);e+=_.value,i[s]={mode:r,memoryIndex:r===2?o:void 0,offsetExprBytes:r===0||r===2?new Uint8Array(t.buffer,t.byteOffset+d,u-d):void 0,data:l}}return e!==f&&console.warn("Data section: position mismatch"),i}function De(t,x,a){let e=x,f=x+a,n={moduleName:null,functionNames:new Map,typeNames:new Map,tableNames:new Map,memoryNames:new Map,globalNames:new Map,elementNames:new Map,dataNames:new Map,tagNames:new Map,localNames:new Map,labelNames:new Map,fieldNames:new Map};if(e<f){let o=T(t,e);o.bytesRead>0&&(n.moduleName=o.name,e+=o.bytesRead)}for(;e<f;){let l=function(m){n[m]=$e(t,u,_),e=_},b=function(m){n[m]=Ce(t,u,_),e=_},v=function(){let m=T(t,u);n.moduleName=m.name,e=u+m.bytesRead};var i=l,s=b,r=v;let o=t.getUint8(e++),d=g(t,e);e+=d.bytesRead;let u=e,_=u+d.value,c={0:v,1:()=>l("functionNames"),2:()=>b("localNames"),3:()=>b("labelNames"),4:()=>l("typeNames"),5:()=>l("tableNames"),6:()=>l("memoryNames"),7:()=>l("globalNames"),8:()=>l("elementNames"),9:()=>l("dataNames"),10:()=>b("fieldNames"),11:()=>l("tagNames")};c[o]?c[o]():console.warn(`subId: ${o} is not supported`)}return n}function $e(t,x,a){let e=x,f=g(t,e);e+=f.bytesRead;let n=new Map;for(let i=0;i<f.value&&e<a;i++){let s=g(t,e);e+=s.bytesRead;let r=T(t,e);e+=r.bytesRead,n.set(s.value,r.name)}return n}function Ce(t,x,a){let e=x,f=g(t,e);e+=f.bytesRead;let n=new Map;for(let i=0;i<f.value&&e<a;i++){let s=g(t,e);e+=s.bytesRead;let r=g(t,e);e+=r.bytesRead;let o=new Map;for(let d=0;d<r.value&&e<a;d++){let u=g(t,e);e+=u.bytesRead;let _=T(t,e);e+=_.bytesRead,o.set(u.value,_.name)}n.set(s.value,o)}return n}function We(t,x,a){let e=x,f=x+a,n=g(t,e);e+=n.bytesRead;let i=new Array(n.value);for(let s=0;s<n.value;s++){let r=O(t,e);e+=r.bytesRead,i[s]=r}return e!==f&&console.warn("Memory section: position mismatch"),i}function Pe(t,x,a){return a===0?null:{functionIndex:g(t,x).value}}function Ve(t,x,a){return a===0?null:{count:g(t,x).value}}function Ge(t,x,a){let e=x,f=x+a,n=g(t,e);e+=n.bytesRead;let i=new Array(n.value);for(let s=0;s<n.value;s++){let r=t.getUint8(e++),o=g(t,e);e+=o.bytesRead,i[s]={attribute:r,typeIndex:o.value}}return e!==f&&console.warn("Tag section: position mismatch"),i}function O(t,x){let a=t.getUint8(x++),e=w(t,x),f=x+e.bytesRead,n=null,i=1+e.bytesRead;if(a&1){let s=w(t,f);n=s.value,i+=s.bytesRead}return{initial:e.value,maximum:n,bytesRead:i}}K.exports={parseExportSection:Ie,parseFunctionSection:Ee,parseCodeSection:je,parseTypeSection:Ne,parseImportSection:Le,parseGlobalSection:Be,parseTableSection:Me,parseElementSection:Fe,parseDataSection:Oe,parseNameSection:De,parseMemorySection:We,parseStartSection:Pe,parseDataCountSection:Ve,parseTagSection:Ge}});var Y=I((Pn,X)=>{var{serializeTypeSection:Ze,serializeImportSection:He,serializeFunctionSection:Je,serializeTableSection:Ke,serializeMemorySection:Qe,serializeGlobalSection:Xe,serializeExportSection:Ye,serializeElementSection:en,serializeCodeSection:nn,serializeDataSection:tn,serializeNameSection:xn,serializeDataCountSection:an,serializeTagSection:fn,serializeStartSection:on}=J(),{parseExportSection:sn,parseFunctionSection:rn,parseCodeSection:dn,parseTypeSection:cn,parseImportSection:ln,parseGlobalSection:_n,parseTableSection:un,parseElementSection:mn,parseDataSection:bn,parseNameSection:pn,parseMemorySection:gn,parseStartSection:yn,parseDataCountSection:hn,parseTagSection:wn}=Q(),{readLEB128:$n,readULEB128:vn,readString:Un,intToLeb128:Cn,intToLeb128Padded:An,compareBuffers:Wn}=E(),kn={name:xn,type:Ze,import:He,function:Je,table:Ke,memory:Qe,global:Xe,export:Ye,start:on,element:en,code:nn,data:tn,data_count:an,tag:fn},Sn={0:"name",1:"type",2:"import",3:"function",4:"table",5:"memory",6:"global",7:"export",8:"start",9:"element",10:"code",11:"data",12:"data_count",13:"tag"},D=class{constructor(x){this.buffer=x,this.wasmSections=this.getAllWasmSections(this.buffer),this.parsedWasm=this.parseAllWasmSections(this.buffer,this.wasmSections),this.header=this.parsedWasm.header,this.sectionsArray=this.parsedWasm.sectionsArray,this.sections=this.parsedWasm.sections}getAllWasmSections(x=this.buffer){let a=new DataView(x instanceof ArrayBuffer?x:x.buffer),e=0;if(a.getUint32(e,!0)!==1836278016)throw new Error("Not a valid WebAssembly binary (wrong magic)");e+=4;let f=a.getUint32(e,!0);e+=4;let n=[];for(;e<a.byteLength;){let i=e,s=a.getUint8(e++),r=vn(a,e),o=r.value;e+=r.bytesRead;let d=e,u=e+o,_=Sn[s]||`unknown_${s}`,l=null;if(s===0)try{l=Un(a,d).name,_=l==="name"?"name":`custom_${l||"unnamed"}`}catch{console.warn(`Warning: Failed to peek custom section name at ${d}`)}n.push({id:s,name:_,customName:l,offset:i,size:1+r.bytesRead+o,payloadOffset:d,payloadSize:o,sizeFieldBytes:r.bytesRead}),e=u}return{header:{magic:1836278016,version:f},sections:n}}parseAllWasmSections(x=this.buffer,a=this.wasmSections){let e=new DataView(x instanceof ArrayBuffer?x:x.buffer),f={header:a.header,sectionsArray:[],sections:{}};for(let n of a.sections){let i=null;switch(n.id){case 1:i=cn(e,n.payloadOffset,n.payloadSize);break;case 2:i=ln(e,n.payloadOffset,n.payloadSize);break;case 3:i=rn(e,n.payloadOffset,n.payloadSize);break;case 4:i=un(e,n.payloadOffset,n.payloadSize);break;case 5:i=gn(e,n.payloadOffset,n.payloadSize);break;case 6:i=_n(e,n.payloadOffset,n.payloadSize);break;case 7:i=sn(e,n.payloadOffset,n.payloadSize);break;case 8:i=yn(e,n.payloadOffset,n.payloadSize);break;case 9:i=mn(e,n.payloadOffset,n.payloadSize);break;case 10:i=dn(e,n.payloadOffset,n.payloadSize);break;case 11:i=bn(e,n.payloadOffset,n.payloadSize);break;case 12:i=hn(e,n.payloadOffset,n.payloadSize);break;case 13:i=wn(e,n.payloadOffset,n.payloadSize);break;case 0:n.customName==="name"?i=pn(e,n.payloadOffset,n.payloadSize):i={customName:n.customName};break;default:i={raw:!0}}let s=new Uint8Array(e.buffer,e.byteOffset+n.payloadOffset,n.payloadSize);f.sectionsArray.push({...n,rawPayload:s,data:i})}return f.sectionsArray.forEach(n=>{f.sections[n.name]=n.data}),f}rebuildWasmBinary(x=this){if(!x?.header||!Array.isArray(x.sectionsArray))throw new Error("Invalid fullInfo object");let a=[];a.push(new Uint8Array([0,97,115,109,1,0,0,0]));for(let i of x.sectionsArray){let s=kn[i.name],r=s(i.data);a.push(new Uint8Array([i.id]));let o=An(r.length,5);a.push(new Uint8Array(o)),a.push(r)}let e=a.reduce((i,s)=>i+s.length,0),f=new Uint8Array(e),n=0;for(let i of a)f.set(i,n),n+=i.length;return f}};X.exports=D});var $=I((Vn,ee)=>{var Rn={unreachable:0,nop:1,block:2,loop:3,if:4,else:5,try:6,catch:7,throw:8,rethrow:9,try_table:31,throw_ref:10,end:11,br:12,br_if:13,br_table:14,return:15,delegate:24,catch_all:25,br_on_null:213,br_on_non_null:214,nop_for_testing:22,call:16,call_indirect:17,return_call:18,return_call_indirect:19,call_ref:20,return_call_ref:21,drop:26,select:27,"local.get":32,"local.set":33,"local.tee":34,"global.get":35,"global.set":36,"table.get":37,"table.set":38,"i32.const":65,"i64.const":66,"f32.const":67,"f64.const":68,"ref.null":208,"ref.is_null":209,"ref.func":210,"ref.as_non_null":212,"ref.eq":211,"i32.load":40,"i64.load":41,"f32.load":42,"f64.load":43,"i32.load8_s":44,"i32.load8_u":45,"i32.load16_s":46,"i32.load16_u":47,"i64.load8_s":48,"i64.load8_u":49,"i64.load16_s":50,"i64.load16_u":51,"i64.load32_s":52,"i64.load32_u":53,"f32.load_f16":64560,"i32.store":54,"i64.store":55,"f32.store":56,"f64.store":57,"i32.store8":58,"i32.store16":59,"i64.store8":60,"i64.store16":61,"i64.store32":62,"f32.store_f16":64561,"memory.size":63,"memory.grow":64,"i32.add":106,"i32.sub":107,"i32.mul":108,"i64.add":124,"i64.sub":125,"i64.mul":126,"i32.eqz":69,"i32.eq":70,"i32.ne":71,"i32.lt_s":72,"i32.lt_u":73,"i32.gt_s":74,"i32.gt_u":75,"i32.le_s":76,"i32.le_u":77,"i32.ge_s":78,"i32.ge_u":79,"i64.eqz":80,"i64.eq":81,"i64.ne":82,"i64.lt_s":83,"i64.lt_u":84,"i64.gt_s":85,"i64.gt_u":86,"i64.le_s":87,"i64.le_u":88,"i64.ge_s":89,"i64.ge_u":90,"f32.eq":91,"f32.ne":92,"f32.lt":93,"f32.gt":94,"f32.le":95,"f32.ge":96,"f64.eq":97,"f64.ne":98,"f64.lt":99,"f64.gt":100,"f64.le":101,"f64.ge":102,"i32.clz":103,"i32.ctz":104,"i32.popcnt":105,"i32.div_s":109,"i32.div_u":110,"i32.rem_s":111,"i32.rem_u":112,"i32.and":113,"i32.or":114,"i32.xor":115,"i32.shl":116,"i32.shr_s":117,"i32.shr_u":118,"i32.rotl":119,"i32.rotr":120,"i64.clz":121,"i64.ctz":122,"i64.popcnt":123,"i64.div_s":127,"i64.div_u":128,"i64.rem_s":129,"i64.rem_u":130,"i64.and":131,"i64.or":132,"i64.xor":133,"i64.shl":134,"i64.shr_s":135,"i64.shr_u":136,"i64.rotl":137,"i64.rotr":138,"f32.abs":139,"f32.neg":140,"f32.ceil":141,"f32.floor":142,"f32.trunc":143,"f32.nearest":144,"f32.sqrt":145,"f32.add":146,"f32.sub":147,"f32.mul":148,"f32.div":149,"f32.min":150,"f32.max":151,"f32.copysign":152,"f64.abs":153,"f64.neg":154,"f64.ceil":155,"f64.floor":156,"f64.trunc":157,"f64.nearest":158,"f64.sqrt":159,"f64.add":160,"f64.sub":161,"f64.mul":162,"f64.div":163,"f64.min":164,"f64.max":165,"f64.copysign":166,"i32.wrap_i64":167,"i32.trunc_f32_s":168,"i32.trunc_f32_u":169,"i32.trunc_f64_s":170,"i32.trunc_f64_u":171,"i64.extend_i32_s":172,"i64.extend_i32_u":173,"i64.trunc_f32_s":174,"i64.trunc_f32_u":175,"i64.trunc_f64_s":176,"i64.trunc_f64_u":177,"f32.convert_i32_s":178,"f32.convert_i32_u":179,"f32.convert_i64_s":180,"f32.convert_i64_u":181,"f32.demote_f64":182,"f64.convert_i32_s":183,"f64.convert_i32_u":184,"f64.convert_i64_s":185,"f64.convert_i64_u":186,"f64.promote_f32":187,"i32.reinterpret_f32":188,"i64.reinterpret_f64":189,"f32.reinterpret_i32":190,"f64.reinterpret_i64":191,"i32.extend8_s":192,"i32.extend16_s":193,"i64.extend8_s":194,"i64.extend16_s":195,"i64.extend32_s":196,"cont.new":224,"cont.bind":225,suspend:226,resume:227,resume_throw:228,resume_throw_ref:229,switch:230,"f64.acos":64060,"f64.asin":64061,"f64.atan":64062,"f64.cos":64063,"f64.sin":64064,"f64.tan":64065,"f64.exp":64066,"f64.log":64067,"f64.atan2":64068,"f64.pow":64069,"f64.mod":64070,"i32.asmjs_div_s":64071,"i32.asmjs_div_u":64072,"i32.asmjs_rem_s":64073,"i32.asmjs_rem_u":64074,"i32.asmjs_load8_s":64075,"i32.asmjs_load8_u":64076,"i32.asmjs_load16_s":64077,"i32.asmjs_load16_u":64078,"i32.asmjs_load32":64079,"f32.asmjs_load":64080,"f64.asmjs_load":64081,"i32.asmjs_store8":64082,"i32.asmjs_store16":64083,"i32.asmjs_store":64084,"f32.asmjs_store":64085,"f64.asmjs_store":64086,"i32.asmjs_convert_f32_s":64087,"i32.asmjs_convert_f32_u":64088,"i32.asmjs_convert_f64_s":64089,"i32.asmjs_convert_f64_u":64090,"v128.load":64768,"v128.load8x8_s":64769,"v128.load8x8_u":64770,"v128.load16x4_s":64771,"v128.load16x4_u":64772,"v128.load32x2_s":64773,"v128.load32x2_u":64774,"v128.load8_splat":64775,"v128.load16_splat":64776,"v128.load32_splat":64777,"v128.load64_splat":64778,"v128.store":64779,"v128.load32_zero":64860,"v128.load64_zero":64861,"v128.load8_lane":64852,"v128.load16_lane":64853,"v128.load32_lane":64854,"v128.load64_lane":64855,"v128.store8_lane":64856,"v128.store16_lane":64857,"v128.store32_lane":64858,"v128.store64_lane":64859,"v128.const":64780,"i8x16.shuffle":64781,"i8x16.swizzle":64782,"i8x16.splat":64783,"i16x8.splat":64784,"i32x4.splat":64785,"i64x2.splat":64786,"f32x4.splat":64787,"f64x2.splat":64788,"i8x16.eq":64803,"i8x16.ne":64804,"i8x16.lt_s":64805,"i8x16.lt_u":64806,"i8x16.gt_s":64807,"i8x16.gt_u":64808,"i8x16.le_s":64809,"i8x16.le_u":64810,"i8x16.ge_s":64811,"i8x16.ge_u":64812,"i16x8.eq":64813,"i16x8.ne":64814,"i16x8.lt_s":64815,"i16x8.lt_u":64816,"i16x8.gt_s":64817,"i16x8.gt_u":64818,"i16x8.le_s":64819,"i16x8.le_u":64820,"i16x8.ge_s":64821,"i16x8.ge_u":64822,"i32x4.eq":64823,"i32x4.ne":64824,"i32x4.lt_s":64825,"i32x4.lt_u":64826,"i32x4.gt_s":64827,"i32x4.gt_u":64828,"i32x4.le_s":64829,"i32x4.le_u":64830,"i32x4.ge_s":64831,"i32x4.ge_u":64832,"f32x4.eq":64833,"f32x4.ne":64834,"f32x4.lt":64835,"f32x4.gt":64836,"f32x4.le":64837,"f32x4.ge":64838,"f64x2.eq":64839,"f64x2.ne":64840,"f64x2.lt":64841,"f64x2.gt":64842,"f64x2.le":64843,"f64x2.ge":64844,"v128.not":64845,"v128.and":64846,"v128.andnot":64847,"v128.or":64848,"v128.xor":64849,"v128.bitselect":64850,"v128.any_true":64851,"f32x4.demote_f64x2_zero":64862,"f64x2.promote_low_f32x4":64863,"i8x16.abs":64864,"i8x16.neg":64865,"i8x16.popcnt":64866,"i8x16.all_true":64867,"i8x16.bitmask":64868,"i8x16.narrow_i16x8_s":64869,"i8x16.narrow_i16x8_u":64870,"f32x4.ceil":64871,"f32x4.floor":64872,"f32x4.trunc":64873,"f32x4.nearest":64874,"i8x16.shl":64875,"i8x16.shr_s":64876,"i8x16.shr_u":64877,"i8x16.add":64878,"i8x16.add_sat_s":64879,"i8x16.add_sat_u":64880,"i8x16.sub":64881,"i8x16.sub_sat_s":64882,"i8x16.sub_sat_u":64883,"f64x2.ceil":64884,"f64x2.floor":64885,"i8x16.min_s":64886,"i8x16.min_u":64887,"i8x16.max_s":64888,"i8x16.max_u":64889,"f64x2.trunc":64890,"i8x16.avgr_u":64891,"i16x8.extadd_pairwise_i8x16_s":64892,"i16x8.extadd_pairwise_i8x16_u":64893,"i32x4.extadd_pairwise_i16x8_s":64894,"i32x4.extadd_pairwise_i16x8_u":64895,"i16x8.abs":64896,"i16x8.neg":64897,"i16x8.q15mulr_sat_s":64898,"i16x8.all_true":64899,"i16x8.bitmask":64900,"i16x8.narrow_i32x4_s":64901,"i16x8.narrow_i32x4_u":64902,"i16x8.extend_low_i8x16_s":64903,"i16x8.extend_high_i8x16_s":64904,"i16x8.extend_low_i8x16_u":64905,"i16x8.extend_high_i8x16_u":64906,"i16x8.shl":64907,"i16x8.shr_s":64908,"i16x8.shr_u":64909,"i16x8.add":64910,"i16x8.add_sat_s":64911,"i16x8.add_sat_u":64912,"i16x8.sub":64913,"i16x8.sub_sat_s":64914,"i16x8.sub_sat_u":64915,"f64x2.nearest":64916,"i16x8.mul":64917,"i16x8.min_s":64918,"i16x8.min_u":64919,"i16x8.max_s":64920,"i16x8.max_u":64921,"i16x8.avgr_u":64923,"i16x8.extmul_low_i8x16_s":64924,"i16x8.extmul_high_i8x16_s":64925,"i16x8.extmul_low_i8x16_u":64926,"i16x8.extmul_high_i8x16_u":64927,"i32x4.abs":64928,"i32x4.neg":64929,"i32x4.all_true":64931,"i32x4.bitmask":64932,"i32x4.extend_low_i16x8_s":64935,"i32x4.extend_high_i16x8_s":64936,"i32x4.extend_low_i16x8_u":64937,"i32x4.extend_high_i16x8_u":64938,"i32x4.shl":64939,"i32x4.shr_s":64940,"i32x4.shr_u":64941,"i32x4.add":64942,"i32x4.sub":64945,"i32x4.mul":64949,"i32x4.min_s":64950,"i32x4.min_u":64951,"i32x4.max_s":64952,"i32x4.max_u":64953,"i32x4.dot_i16x8_s":64954,"i32x4.extmul_low_i16x8_s":64956,"i32x4.extmul_high_i16x8_s":64957,"i32x4.extmul_low_i16x8_u":64958,"i32x4.extmul_high_i16x8_u":64959,"i64x2.abs":64960,"i64x2.neg":64961,"i64x2.all_true":64963,"i64x2.bitmask":64964,"i64x2.extend_low_i32x4_s":64967,"i64x2.extend_high_i32x4_s":64968,"i64x2.extend_low_i32x4_u":64969,"i64x2.extend_high_i32x4_u":64970,"i64x2.shl":64971,"i64x2.shr_s":64972,"i64x2.shr_u":64973,"i64x2.add":64974,"i64x2.sub":64977,"i64x2.mul":64981,"i64x2.eq":64982,"i64x2.ne":64983,"i64x2.lt_s":64984,"i64x2.gt_s":64985,"i64x2.le_s":64986,"i64x2.ge_s":64987,"i64x2.extmul_low_i32x4_s":64988,"i64x2.extmul_high_i32x4_s":64989,"i64x2.extmul_low_i32x4_u":64990,"i64x2.extmul_high_i32x4_u":64991,"f32x4.abs":64992,"f32x4.neg":64993,"f32x4.sqrt":64995,"f32x4.add":64996,"f32x4.sub":64997,"f32x4.mul":64998,"f32x4.div":64999,"f32x4.min":65e3,"f32x4.max":65001,"f32x4.pmin":65002,"f32x4.pmax":65003,"f64x2.abs":65004,"f64x2.neg":65005,"f64x2.sqrt":65007,"f64x2.add":65008,"f64x2.sub":65009,"f64x2.mul":65010,"f64x2.div":65011,"f64x2.min":65012,"f64x2.max":65013,"f64x2.pmin":65014,"f64x2.pmax":65015,"i32x4.trunc_sat_f32x4_s":65016,"i32x4.trunc_sat_f32x4_u":65017,"f32x4.convert_i32x4_s":65018,"f32x4.convert_i32x4_u":65019,"i32x4.trunc_sat_f64x2_s_zero":65020,"i32x4.trunc_sat_f64x2_u_zero":65021,"f64x2.convert_low_i32x4_s":65022,"f64x2.convert_low_i32x4_u":65023,"i8x16.relaxed_swizzle":1036544,"i32x4.relaxed_trunc_f32x4_s":1036545,"i32x4.relaxed_trunc_f32x4_u":1036546,"i32x4.relaxed_trunc_f64x2_s_zero":1036547,"i32x4.relaxed_trunc_f64x2_u_zero":1036548,"f32x4.qfma":1036549,"f32x4.qfms":1036550,"f64x2.qfma":1036551,"f64x2.qfms":1036552,"i8x16.relaxed_laneselect":1036553,"i16x8.relaxed_laneselect":1036554,"i32x4.relaxed_laneselect":1036555,"i64x2.relaxed_laneselect":1036556,"f32x4.relaxed_min":1036557,"f32x4.relaxed_max":1036558,"f64x2.relaxed_min":1036559,"f64x2.relaxed_max":1036560,"i16x8.relaxed_q15mulr_s":1036561,"i16x8.dot_i8x16_i7x16_s":1036562,"i32x4.dot_i8x16_i7x16_add_s":1036563,"f16x8.splat":1036576,"f16x8.abs":1036592,"f16x8.neg":1036593,"f16x8.sqrt":1036594,"f16x8.ceil":1036595,"f16x8.floor":1036596,"f16x8.trunc":1036597,"f16x8.nearest":1036598,"f16x8.eq":1036599,"f16x8.ne":1036600,"f16x8.lt":1036601,"f16x8.gt":1036602,"f16x8.le":1036603,"f16x8.ge":1036604,"f16x8.add":1036605,"f16x8.sub":1036606,"f16x8.mul":1036607,"f16x8.div":1036608,"f16x8.min":1036609,"f16x8.max":1036610,"f16x8.pmin":1036611,"f16x8.pmax":1036612,"i16x8.trunc_sat_f16x8_s":1036613,"i16x8.trunc_sat_f16x8_u":1036614,"f16x8.convert_i16x8_s":1036615,"f16x8.convert_i16x8_u":1036616,"f16x8.demote_f32x4_zero":1036617,"f16x8.demote_f64x2_zero":1036618,"f32x4.promote_low_f16x8":1036619,"f16x8.madd":1036622,"f16x8.nmadd":1036623,"i8x16.extract_lane_s":64789,"i8x16.extract_lane_u":64790,"i16x8.extract_lane_s":64792,"i16x8.extract_lane_u":64793,"i32x4.extract_lane":64795,"i64x2.extract_lane":64797,"f32x4.extract_lane":64799,"f64x2.extract_lane":64801,"f16x8.extract_lane":1036577,"i8x16.replace_lane":64791,"i16x8.replace_lane":64794,"i32x4.replace_lane":64796,"i64x2.replace_lane":64798,"f32x4.replace_lane":64800,"f64x2.replace_lane":64802,"f16x8.replace_lane":1036578,"i64.add128":64531,"i64.sub128":64532,"i64.mul_wide_s":64533,"i64.mul_wide_u":64534,"i32.trunc_sat_f32_s":64512,"i32.trunc_sat_f32_u":64513,"i32.trunc_sat_f64_s":64514,"i32.trunc_sat_f64_u":64515,"i64.trunc_sat_f32_s":64516,"i64.trunc_sat_f32_u":64517,"i64.trunc_sat_f64_s":64518,"i64.trunc_sat_f64_u":64519,"data.drop":64521,"table.init":64524,"elem.drop":64525,"table.copy":64526,"table.size":64528,"memory.init":64520,"memory.copy":64522,"memory.fill":64523,"table.grow":64527,"table.fill":64529,"memory.atomic.notify":65024,"memory.atomic.wait32":65025,"memory.atomic.wait64":65026,"i32.atomic.load":65040,"i64.atomic.load":65041,"i32.atomic.load8_u":65042,"i32.atomic.load16_u":65043,"i64.atomic.load8_u":65044,"i64.atomic.load16_u":65045,"i64.atomic.load32_u":65046,"i32.atomic.store":65047,"i64.atomic.store":65048,"i32.atomic.store8":65049,"i32.atomic.store16":65050,"i64.atomic.store8":65051,"i64.atomic.store16":65052,"i64.atomic.store32":65053,"i32.atomic.rmw.add":65054,"i64.atomic.rmw.add":65055,"i32.atomic.rmw8.add_u":65056,"i32.atomic.rmw16.add_u":65057,"i64.atomic.rmw8.add_u":65058,"i64.atomic.rmw16.add_u":65059,"i64.atomic.rmw32.add_u":65060,"i32.atomic.rmw.sub":65061,"i64.atomic.rmw.sub":65062,"i32.atomic.rmw8.sub_u":65063,"i32.atomic.rmw16.sub_u":65064,"i64.atomic.rmw8.sub_u":65065,"i64.atomic.rmw16.sub_u":65066,"i64.atomic.rmw32.sub_u":65067,"i32.atomic.rmw.and":65068,"i64.atomic.rmw.and":65069,"i32.atomic.rmw8.and_u":65070,"i32.atomic.rmw16.and_u":65071,"i64.atomic.rmw8.and_u":65072,"i64.atomic.rmw16.and_u":65073,"i64.atomic.rmw32.and_u":65074,"i32.atomic.rmw.or":65075,"i64.atomic.rmw.or":65076,"i32.atomic.rmw8.or_u":65077,"i32.atomic.rmw16.or_u":65078,"i64.atomic.rmw8.or_u":65079,"i64.atomic.rmw16.or_u":65080,"i64.atomic.rmw32.or_u":65081,"i32.atomic.rmw.xor":65082,"i64.atomic.rmw.xor":65083,"i32.atomic.rmw8.xor_u":65084,"i32.atomic.rmw16.xor_u":65085,"i64.atomic.rmw8.xor_u":65086,"i64.atomic.rmw16.xor_u":65087,"i64.atomic.rmw32.xor_u":65088,"i32.atomic.rmw.xchg":65089,"i64.atomic.rmw.xchg":65090,"i32.atomic.rmw8.xchg_u":65091,"i32.atomic.rmw16.xchg_u":65092,"i64.atomic.rmw8.xchg_u":65093,"i64.atomic.rmw16.xchg_u":65094,"i64.atomic.rmw32.xchg_u":65095,"i32.atomic.rmw.cmpxchg":65096,"i64.atomic.rmw.cmpxchg":65097,"i32.atomic.rmw8.cmpxchg_u":65098,"i32.atomic.rmw16.cmpxchg_u":65099,"i64.atomic.rmw8.cmpxchg_u":65100,"i64.atomic.rmw16.cmpxchg_u":65101,"i64.atomic.rmw32.cmpxchg_u":65102,"atomic.fence":65027,"struct.new":64256,"struct.new_default":64257,"struct.get":64258,"struct.get_s":64259,"struct.get_u":64260,"struct.set":64261,"array.new":64262,"array.new_default":64263,"array.new_fixed":64264,"array.new_data":64265,"array.new_elem":64266,"array.get":64267,"array.get_s":64268,"array.get_u":64269,"array.set":64270,"array.len":64271,"array.fill":64272,"array.copy":64273,"array.init_data":64274,"array.init_elem":64275,"ref.test":64276,"ref.test null":64277,"ref.cast":64278,"ref.cast null":64279,br_on_cast:64280,br_on_cast_fail:64281,"any.convert_extern":64282,"extern.convert_any":64283,"ref.i31":64284,"i31.get_s":64285,"i31.get_u":64286,"ref.i31_shared":64287,"struct.new_desc":64288,"struct.new_default_desc":64289,"ref.get_desc":64290,"ref.cast_desc_eq":64291,"ref.cast_desc_eq null":64292,br_on_cast_desc_eq:64293,br_on_cast_desc_eq_fail:64294,"ref.cast_nop":64332,"string.new_utf8":64384,"string.new_wtf16":64385,"string.const":64386,"string.measure_utf8":64387,"string.measure_wtf8":64388,"string.measure_wtf16":64389,"string.encode_utf8":64390,"string.encode_wtf16":64391,"string.concat":64392,"string.eq":64393,"string.is_usv_sequence":64394,"string.new_lossy_utf8":64395,"string.new_wtf8":64396,"string.encode_lossy_utf8":64397,"string.encode_wtf8":64398,"string.new_utf8_try":64399,"string.as_wtf8":64400,"stringview_wtf8.advance":64401,"stringview_wtf8.encode_utf8":64402,"stringview_wtf8.slice":64403,"stringview_wtf8.encode_lossy_utf8":64404,"stringview_wtf8.encode_wtf8":64405,"string.as_wtf16":64408,"stringview_wtf16.length":64409,"stringview_wtf16.get_codeunit":64410,"stringview_wtf16.encode":64411,"stringview_wtf16.slice":64412,"string.as_iter":64416,"stringview_iter.next":64417,"stringview_iter.advance":64418,"stringview_iter.rewind":64419,"stringview_iter.slice":64420,"string.compare":64424,"string.from_code_point":64425,"string.hash":64426,"string.new_utf8_array":64432,"string.new_wtf16_array":64433,"string.encode_utf8_array":64434,"string.encode_wtf16_array":64435,"string.new_lossy_utf8_array":64436,"string.new_wtf8_array":64437,"string.encode_lossy_utf8_array":64438,"string.encode_wtf8_array":64439,"string.new_utf8_array_try":64440,pause:65028,"struct.wait":65029,"struct.notify":65030,"struct.atomic.get":65116,"struct.atomic.get_s":65117,"struct.atomic.get_u":65118,"struct.atomic.set":65119,"struct.atomic.rmw.add":65120,"struct.atomic.rmw.sub":65121,"struct.atomic.rmw.and":65122,"struct.atomic.rmw.or":65123,"struct.atomic.rmw.xor":65124,"struct.atomic.rmw.xchg":65125,"struct.atomic.rmw.cmpxchg":65126,"array.atomic.get":65127,"array.atomic.get_s":65128,"array.atomic.get_u":65129,"array.atomic.set":65130,"array.atomic.rmw.add":65131,"array.atomic.rmw.sub":65132,"array.atomic.rmw.and":65133,"array.atomic.rmw.or":65134,"array.atomic.rmw.xor":65135,"array.atomic.rmw.xchg":65136,"array.atomic.rmw.cmpxchg":65137},zn={0:["unreachable","none"],1:["nop","none"],2:["block","blocktype"],3:["loop","blocktype"],4:["if","blocktype"],5:["else","none"],6:["try","blocktype"],7:["catch","u32"],8:["throw","u32"],9:["rethrow","u32"],10:["throw_ref","none"],11:["end","none"],12:["br","u32"],13:["br_if","u32"],14:["br_table","br_table"],15:["return","none"],16:["call","u32"],17:["call_indirect","call_indirect"],18:["return_call","u32"],19:["return_call_indirect","call_indirect"],20:["call_ref","u32"],21:["return_call_ref","u32"],22:["nop_for_testing","none"],24:["delegate","u32"],25:["catch_all","none"],26:["drop","none"],27:["select","none"],28:["select","select_typed"],31:["try_table","try_table"],32:["local.get","u32"],33:["local.set","u32"],34:["local.tee","u32"],35:["global.get","u32"],36:["global.set","u32"],37:["table.get","u32"],38:["table.set","u32"],40:["i32.load","memarg"],41:["i64.load","memarg"],42:["f32.load","memarg"],43:["f64.load","memarg"],44:["i32.load8_s","memarg"],45:["i32.load8_u","memarg"],46:["i32.load16_s","memarg"],47:["i32.load16_u","memarg"],48:["i64.load8_s","memarg"],49:["i64.load8_u","memarg"],50:["i64.load16_s","memarg"],51:["i64.load16_u","memarg"],52:["i64.load32_s","memarg"],53:["i64.load32_u","memarg"],54:["i32.store","memarg"],55:["i64.store","memarg"],56:["f32.store","memarg"],57:["f64.store","memarg"],58:["i32.store8","memarg"],59:["i32.store16","memarg"],60:["i64.store8","memarg"],61:["i64.store16","memarg"],62:["i64.store32","memarg"],63:["memory.size","memory_index"],64:["memory.grow","memory_index"],65:["i32.const","i32"],66:["i64.const","i64"],67:["f32.const","f32"],68:["f64.const","f64"],69:["i32.eqz","none"],70:["i32.eq","none"],71:["i32.ne","none"],72:["i32.lt_s","none"],73:["i32.lt_u","none"],74:["i32.gt_s","none"],75:["i32.gt_u","none"],76:["i32.le_s","none"],77:["i32.le_u","none"],78:["i32.ge_s","none"],79:["i32.ge_u","none"],80:["i64.eqz","none"],81:["i64.eq","none"],82:["i64.ne","none"],83:["i64.lt_s","none"],84:["i64.lt_u","none"],85:["i64.gt_s","none"],86:["i64.gt_u","none"],87:["i64.le_s","none"],88:["i64.le_u","none"],89:["i64.ge_s","none"],90:["i64.ge_u","none"],91:["f32.eq","none"],92:["f32.ne","none"],93:["f32.lt","none"],94:["f32.gt","none"],95:["f32.le","none"],96:["f32.ge","none"],97:["f64.eq","none"],98:["f64.ne","none"],99:["f64.lt","none"],100:["f64.gt","none"],101:["f64.le","none"],102:["f64.ge","none"],103:["i32.clz","none"],104:["i32.ctz","none"],105:["i32.popcnt","none"],106:["i32.add","none"],107:["i32.sub","none"],108:["i32.mul","none"],109:["i32.div_s","none"],110:["i32.div_u","none"],111:["i32.rem_s","none"],112:["i32.rem_u","none"],113:["i32.and","none"],114:["i32.or","none"],115:["i32.xor","none"],116:["i32.shl","none"],117:["i32.shr_s","none"],118:["i32.shr_u","none"],119:["i32.rotl","none"],120:["i32.rotr","none"],121:["i64.clz","none"],122:["i64.ctz","none"],123:["i64.popcnt","none"],124:["i64.add","none"],125:["i64.sub","none"],126:["i64.mul","none"],127:["i64.div_s","none"],128:["i64.div_u","none"],129:["i64.rem_s","none"],130:["i64.rem_u","none"],131:["i64.and","none"],132:["i64.or","none"],133:["i64.xor","none"],134:["i64.shl","none"],135:["i64.shr_s","none"],136:["i64.shr_u","none"],137:["i64.rotl","none"],138:["i64.rotr","none"],139:["f32.abs","none"],140:["f32.neg","none"],141:["f32.ceil","none"],142:["f32.floor","none"],143:["f32.trunc","none"],144:["f32.nearest","none"],145:["f32.sqrt","none"],146:["f32.add","none"],147:["f32.sub","none"],148:["f32.mul","none"],149:["f32.div","none"],150:["f32.min","none"],151:["f32.max","none"],152:["f32.copysign","none"],153:["f64.abs","none"],154:["f64.neg","none"],155:["f64.ceil","none"],156:["f64.floor","none"],157:["f64.trunc","none"],158:["f64.nearest","none"],159:["f64.sqrt","none"],160:["f64.add","none"],161:["f64.sub","none"],162:["f64.mul","none"],163:["f64.div","none"],164:["f64.min","none"],165:["f64.max","none"],166:["f64.copysign","none"],167:["i32.wrap_i64","none"],168:["i32.trunc_f32_s","none"],169:["i32.trunc_f32_u","none"],170:["i32.trunc_f64_s","none"],171:["i32.trunc_f64_u","none"],172:["i64.extend_i32_s","none"],173:["i64.extend_i32_u","none"],174:["i64.trunc_f32_s","none"],175:["i64.trunc_f32_u","none"],176:["i64.trunc_f64_s","none"],177:["i64.trunc_f64_u","none"],178:["f32.convert_i32_s","none"],179:["f32.convert_i32_u","none"],180:["f32.convert_i64_s","none"],181:["f32.convert_i64_u","none"],182:["f32.demote_f64","none"],183:["f64.convert_i32_s","none"],184:["f64.convert_i32_u","none"],185:["f64.convert_i64_s","none"],186:["f64.convert_i64_u","none"],187:["f64.promote_f32","none"],188:["i32.reinterpret_f32","none"],189:["i64.reinterpret_f64","none"],190:["f32.reinterpret_i32","none"],191:["f64.reinterpret_i64","none"],192:["i32.extend8_s","none"],193:["i32.extend16_s","none"],194:["i64.extend8_s","none"],195:["i64.extend16_s","none"],196:["i64.extend32_s","none"],208:["ref.null","reftype"],209:["ref.is_null","none"],210:["ref.func","u32"],211:["ref.eq","none"],212:["ref.as_non_null","none"],213:["br_on_null","u32"],214:["br_on_non_null","u32"],224:["cont.new","u32"],225:["cont.bind","call_indirect"],226:["suspend","u32"],227:["resume","resume"],228:["resume_throw","resume_throw"],229:["resume_throw_ref","resume_throw"],230:["switch","u32"],250:["asmjs_prefix","prefixed"],251:["gc_prefix","prefixed"],252:["numeric_prefix","prefixed"],253:["simd_prefix","prefixed"],254:["atomic_prefix","prefixed"],64512:["i32.trunc_sat_f32_s","none"],64513:["i32.trunc_sat_f32_u","none"],64514:["i32.trunc_sat_f64_s","none"],64515:["i32.trunc_sat_f64_u","none"],64516:["i64.trunc_sat_f32_s","none"],64517:["i64.trunc_sat_f32_u","none"],64518:["i64.trunc_sat_f64_s","none"],64519:["i64.trunc_sat_f64_u","none"],64520:["memory.init","mem_init"],64521:["data.drop","u32"],64522:["memory.copy","memory_copy"],64523:["memory.fill","memory_index"],64524:["table.init","table_init"],64525:["elem.drop","u32"],64526:["table.copy","table_copy"],64527:["table.grow","u32"],64528:["table.size","u32"],64529:["table.fill","u32"],64531:["i64.add128","none"],64532:["i64.sub128","none"],64533:["i64.mul_wide_s","none"],64534:["i64.mul_wide_u","none"],64560:["f32.load_f16","memarg"],64561:["f32.store_f16","memarg"],64768:["v128.load","memarg"],64769:["v128.load8x8_s","memarg"],64770:["v128.load8x8_u","memarg"],64771:["v128.load16x4_s","memarg"],64772:["v128.load16x4_u","memarg"],64773:["v128.load32x2_s","memarg"],64774:["v128.load32x2_u","memarg"],64775:["v128.load8_splat","memarg"],64776:["v128.load16_splat","memarg"],64777:["v128.load32_splat","memarg"],64778:["v128.load64_splat","memarg"],64779:["v128.store","memarg"],64780:["v128.const","v128_imm"],64781:["i8x16.shuffle","simd_shuffle"],64782:["i8x16.swizzle","none"],64783:["i8x16.splat","none"],64784:["i16x8.splat","none"],64785:["i32x4.splat","none"],64786:["i64x2.splat","none"],64787:["f32x4.splat","none"],64788:["f64x2.splat","none"],64789:["i8x16.extract_lane_s","simd_lane"],64790:["i8x16.extract_lane_u","simd_lane"],64791:["i8x16.replace_lane","simd_lane"],64792:["i16x8.extract_lane_s","simd_lane"],64793:["i16x8.extract_lane_u","simd_lane"],64794:["i16x8.replace_lane","simd_lane"],64795:["i32x4.extract_lane","simd_lane"],64796:["i32x4.replace_lane","simd_lane"],64797:["i64x2.extract_lane","simd_lane"],64798:["i64x2.replace_lane","simd_lane"],64799:["f32x4.extract_lane","simd_lane"],64800:["f32x4.replace_lane","simd_lane"],64801:["f64x2.extract_lane","simd_lane"],64802:["f64x2.replace_lane","simd_lane"],64803:["i8x16.eq","none"],64804:["i8x16.ne","none"],64805:["i8x16.lt_s","none"],64806:["i8x16.lt_u","none"],64807:["i8x16.gt_s","none"],64808:["i8x16.gt_u","none"],64809:["i8x16.le_s","none"],64810:["i8x16.le_u","none"],64811:["i8x16.ge_s","none"],64812:["i8x16.ge_u","none"],64813:["i16x8.eq","none"],64814:["i16x8.ne","none"],64815:["i16x8.lt_s","none"],64816:["i16x8.lt_u","none"],64817:["i16x8.gt_s","none"],64818:["i16x8.gt_u","none"],64819:["i16x8.le_s","none"],64820:["i16x8.le_u","none"],64821:["i16x8.ge_s","none"],64822:["i16x8.ge_u","none"],64823:["i32x4.eq","none"],64824:["i32x4.ne","none"],64825:["i32x4.lt_s","none"],64826:["i32x4.lt_u","none"],64827:["i32x4.gt_s","none"],64828:["i32x4.gt_u","none"],64829:["i32x4.le_s","none"],64830:["i32x4.le_u","none"],64831:["i32x4.ge_s","none"],64832:["i32x4.ge_u","none"],64833:["f32x4.eq","none"],64834:["f32x4.ne","none"],64835:["f32x4.lt","none"],64836:["f32x4.gt","none"],64837:["f32x4.le","none"],64838:["f32x4.ge","none"],64839:["f64x2.eq","none"],64840:["f64x2.ne","none"],64841:["f64x2.lt","none"],64842:["f64x2.gt","none"],64843:["f64x2.le","none"],64844:["f64x2.ge","none"],64845:["v128.not","none"],64846:["v128.and","none"],64847:["v128.andnot","none"],64848:["v128.or","none"],64849:["v128.xor","none"],64850:["v128.bitselect","none"],64851:["v128.any_true","none"],64852:["v128.load8_lane","memarg_lane"],64853:["v128.load16_lane","memarg_lane"],64854:["v128.load32_lane","memarg_lane"],64855:["v128.load64_lane","memarg_lane"],64856:["v128.store8_lane","memarg_lane"],64857:["v128.store16_lane","memarg_lane"],64858:["v128.store32_lane","memarg_lane"],64859:["v128.store64_lane","memarg_lane"],64860:["v128.load32_zero","memarg"],64861:["v128.load64_zero","memarg"],64862:["f32x4.demote_f64x2_zero","none"],64863:["f64x2.promote_low_f32x4","none"],64864:["i8x16.abs","none"],64865:["i8x16.neg","none"],64866:["i8x16.popcnt","none"],64867:["i8x16.all_true","none"],64868:["i8x16.bitmask","none"],64869:["i8x16.narrow_i16x8_s","none"],64870:["i8x16.narrow_i16x8_u","none"],64871:["f32x4.ceil","none"],64872:["f32x4.floor","none"],64873:["f32x4.trunc","none"],64874:["f32x4.nearest","none"],64875:["i8x16.shl","none"],64876:["i8x16.shr_s","none"],64877:["i8x16.shr_u","none"],64878:["i8x16.add","none"],64879:["i8x16.add_sat_s","none"],64880:["i8x16.add_sat_u","none"],64881:["i8x16.sub","none"],64882:["i8x16.sub_sat_s","none"],64883:["i8x16.sub_sat_u","none"],64884:["f64x2.ceil","none"],64885:["f64x2.floor","none"],64886:["i8x16.min_s","none"],64887:["i8x16.min_u","none"],64888:["i8x16.max_s","none"],64889:["i8x16.max_u","none"],64890:["f64x2.trunc","none"],64891:["i8x16.avgr_u","none"],64892:["i16x8.extadd_pairwise_i8x16_s","none"],64893:["i16x8.extadd_pairwise_i8x16_u","none"],64894:["i32x4.extadd_pairwise_i16x8_s","none"],64895:["i32x4.extadd_pairwise_i16x8_u","none"],64896:["i16x8.abs","none"],64897:["i16x8.neg","none"],64898:["i16x8.q15mulr_sat_s","none"],64899:["i16x8.all_true","none"],64900:["i16x8.bitmask","none"],64901:["i16x8.narrow_i32x4_s","none"],64902:["i16x8.narrow_i32x4_u","none"],64903:["i16x8.extend_low_i8x16_s","none"],64904:["i16x8.extend_high_i8x16_s","none"],64905:["i16x8.extend_low_i8x16_u","none"],64906:["i16x8.extend_high_i8x16_u","none"],64907:["i16x8.shl","none"],64908:["i16x8.shr_s","none"],64909:["i16x8.shr_u","none"],64910:["i16x8.add","none"],64911:["i16x8.add_sat_s","none"],64912:["i16x8.add_sat_u","none"],64913:["i16x8.sub","none"],64914:["i16x8.sub_sat_s","none"],64915:["i16x8.sub_sat_u","none"],64916:["f64x2.nearest","none"],64917:["i16x8.mul","none"],64918:["i16x8.min_s","none"],64919:["i16x8.min_u","none"],64920:["i16x8.max_s","none"],64921:["i16x8.max_u","none"],64923:["i16x8.avgr_u","none"],64924:["i16x8.extmul_low_i8x16_s","none"],64925:["i16x8.extmul_high_i8x16_s","none"],64926:["i16x8.extmul_low_i8x16_u","none"],64927:["i16x8.extmul_high_i8x16_u","none"],64928:["i32x4.abs","none"],64929:["i32x4.neg","none"],64931:["i32x4.all_true","none"],64932:["i32x4.bitmask","none"],64935:["i32x4.extend_low_i16x8_s","none"],64936:["i32x4.extend_high_i16x8_s","none"],64937:["i32x4.extend_low_i16x8_u","none"],64938:["i32x4.extend_high_i16x8_u","none"],64939:["i32x4.shl","none"],64940:["i32x4.shr_s","none"],64941:["i32x4.shr_u","none"],64942:["i32x4.add","none"],64945:["i32x4.sub","none"],64949:["i32x4.mul","none"],64950:["i32x4.min_s","none"],64951:["i32x4.min_u","none"],64952:["i32x4.max_s","none"],64953:["i32x4.max_u","none"],64954:["i32x4.dot_i16x8_s","none"],64956:["i32x4.extmul_low_i16x8_s","none"],64957:["i32x4.extmul_high_i16x8_s","none"],64958:["i32x4.extmul_low_i16x8_u","none"],64959:["i32x4.extmul_high_i16x8_u","none"],64960:["i64x2.abs","none"],64961:["i64x2.neg","none"],64963:["i64x2.all_true","none"],64964:["i64x2.bitmask","none"],64967:["i64x2.extend_low_i32x4_s","none"],64968:["i64x2.extend_high_i32x4_s","none"],64969:["i64x2.extend_low_i32x4_u","none"],64970:["i64x2.extend_high_i32x4_u","none"],64971:["i64x2.shl","none"],64972:["i64x2.shr_s","none"],64973:["i64x2.shr_u","none"],64974:["i64x2.add","none"],64977:["i64x2.sub","none"],64981:["i64x2.mul","none"],64982:["i64x2.eq","none"],64983:["i64x2.ne","none"],64984:["i64x2.lt_s","none"],64985:["i64x2.gt_s","none"],64986:["i64x2.le_s","none"],64987:["i64x2.ge_s","none"],64988:["i64x2.extmul_low_i32x4_s","none"],64989:["i64x2.extmul_high_i32x4_s","none"],64990:["i64x2.extmul_low_i32x4_u","none"],64991:["i64x2.extmul_high_i32x4_u","none"],64992:["f32x4.abs","none"],64993:["f32x4.neg","none"],64995:["f32x4.sqrt","none"],64996:["f32x4.add","none"],64997:["f32x4.sub","none"],64998:["f32x4.mul","none"],64999:["f32x4.div","none"],65e3:["f32x4.min","none"],65001:["f32x4.max","none"],65002:["f32x4.pmin","none"],65003:["f32x4.pmax","none"],65004:["f64x2.abs","none"],65005:["f64x2.neg","none"],65007:["f64x2.sqrt","none"],65008:["f64x2.add","none"],65009:["f64x2.sub","none"],65010:["f64x2.mul","none"],65011:["f64x2.div","none"],65012:["f64x2.min","none"],65013:["f64x2.max","none"],65014:["f64x2.pmin","none"],65015:["f64x2.pmax","none"],65016:["i32x4.trunc_sat_f32x4_s","none"],65017:["i32x4.trunc_sat_f32x4_u","none"],65018:["f32x4.convert_i32x4_s","none"],65019:["f32x4.convert_i32x4_u","none"],65020:["i32x4.trunc_sat_f64x2_s_zero","none"],65021:["i32x4.trunc_sat_f64x2_u_zero","none"],65022:["f64x2.convert_low_i32x4_s","none"],65023:["f64x2.convert_low_i32x4_u","none"],1036544:["i8x16.relaxed_swizzle","none"],1036545:["i32x4.relaxed_trunc_f32x4_s","none"],1036546:["i32x4.relaxed_trunc_f32x4_u","none"],1036547:["i32x4.relaxed_trunc_f64x2_s_zero","none"],1036548:["i32x4.relaxed_trunc_f64x2_u_zero","none"],1036549:["f32x4.qfma","none"],1036550:["f32x4.qfms","none"],1036551:["f64x2.qfma","none"],1036552:["f64x2.qfms","none"],1036553:["i8x16.relaxed_laneselect","none"],1036554:["i16x8.relaxed_laneselect","none"],1036555:["i32x4.relaxed_laneselect","none"],1036556:["i64x2.relaxed_laneselect","none"],1036557:["f32x4.relaxed_min","none"],1036558:["f32x4.relaxed_max","none"],1036559:["f64x2.relaxed_min","none"],1036560:["f64x2.relaxed_max","none"],1036561:["i16x8.relaxed_q15mulr_s","none"],1036562:["i16x8.dot_i8x16_i7x16_s","none"],1036563:["i32x4.dot_i8x16_i7x16_add_s","none"],1036576:["f16x8.splat","none"],1036577:["f16x8.extract_lane","simd_lane"],1036578:["f16x8.replace_lane","simd_lane"],1036592:["f16x8.abs","none"],1036593:["f16x8.neg","none"],1036594:["f16x8.sqrt","none"],1036595:["f16x8.ceil","none"],1036596:["f16x8.floor","none"],1036597:["f16x8.trunc","none"],1036598:["f16x8.nearest","none"],1036599:["f16x8.eq","none"],1036600:["f16x8.ne","none"],1036601:["f16x8.lt","none"],1036602:["f16x8.gt","none"],1036603:["f16x8.le","none"],1036604:["f16x8.ge","none"],1036605:["f16x8.add","none"],1036606:["f16x8.sub","none"],1036607:["f16x8.mul","none"],1036608:["f16x8.div","none"],1036609:["f16x8.min","none"],1036610:["f16x8.max","none"],1036611:["f16x8.pmin","none"],1036612:["f16x8.pmax","none"],1036613:["i16x8.trunc_sat_f16x8_s","none"],1036614:["i16x8.trunc_sat_f16x8_u","none"],1036615:["f16x8.convert_i16x8_s","none"],1036616:["f16x8.convert_i16x8_u","none"],1036617:["f16x8.demote_f32x4_zero","none"],1036618:["f16x8.demote_f64x2_zero","none"],1036619:["f32x4.promote_low_f16x8","none"],1036622:["f16x8.madd","none"],1036623:["f16x8.nmadd","none"],65024:["memory.atomic.notify","memarg"],65025:["memory.atomic.wait32","memarg"],65026:["memory.atomic.wait64","memarg"],65027:["atomic.fence","atomic_fence"],65028:["pause","none"],65029:["struct.wait","u32"],65030:["struct.notify","u32"],65040:["i32.atomic.load","memarg"],65041:["i64.atomic.load","memarg"],65042:["i32.atomic.load8_u","memarg"],65043:["i32.atomic.load16_u","memarg"],65044:["i64.atomic.load8_u","memarg"],65045:["i64.atomic.load16_u","memarg"],65046:["i64.atomic.load32_u","memarg"],65047:["i32.atomic.store","memarg"],65048:["i64.atomic.store","memarg"],65049:["i32.atomic.store8","memarg"],65050:["i32.atomic.store16","memarg"],65051:["i64.atomic.store8","memarg"],65052:["i64.atomic.store16","memarg"],65053:["i64.atomic.store32","memarg"],65054:["i32.atomic.rmw.add","memarg"],65055:["i64.atomic.rmw.add","memarg"],65056:["i32.atomic.rmw8.add_u","memarg"],65057:["i32.atomic.rmw16.add_u","memarg"],65058:["i64.atomic.rmw8.add_u","memarg"],65059:["i64.atomic.rmw16.add_u","memarg"],65060:["i64.atomic.rmw32.add_u","memarg"],65061:["i32.atomic.rmw.sub","memarg"],65062:["i64.atomic.rmw.sub","memarg"],65063:["i32.atomic.rmw8.sub_u","memarg"],65064:["i32.atomic.rmw16.sub_u","memarg"],65065:["i64.atomic.rmw8.sub_u","memarg"],65066:["i64.atomic.rmw16.sub_u","memarg"],65067:["i64.atomic.rmw32.sub_u","memarg"],65068:["i32.atomic.rmw.and","memarg"],65069:["i64.atomic.rmw.and","memarg"],65070:["i32.atomic.rmw8.and_u","memarg"],65071:["i32.atomic.rmw16.and_u","memarg"],65072:["i64.atomic.rmw8.and_u","memarg"],65073:["i64.atomic.rmw16.and_u","memarg"],65074:["i64.atomic.rmw32.and_u","memarg"],65075:["i32.atomic.rmw.or","memarg"],65076:["i64.atomic.rmw.or","memarg"],65077:["i32.atomic.rmw8.or_u","memarg"],65078:["i32.atomic.rmw16.or_u","memarg"],65079:["i64.atomic.rmw8.or_u","memarg"],65080:["i64.atomic.rmw16.or_u","memarg"],65081:["i64.atomic.rmw32.or_u","memarg"],65082:["i32.atomic.rmw.xor","memarg"],65083:["i64.atomic.rmw.xor","memarg"],65084:["i32.atomic.rmw8.xor_u","memarg"],65085:["i32.atomic.rmw16.xor_u","memarg"],65086:["i64.atomic.rmw8.xor_u","memarg"],65087:["i64.atomic.rmw16.xor_u","memarg"],65088:["i64.atomic.rmw32.xor_u","memarg"],65089:["i32.atomic.rmw.xchg","memarg"],65090:["i64.atomic.rmw.xchg","memarg"],65091:["i32.atomic.rmw8.xchg_u","memarg"],65092:["i32.atomic.rmw16.xchg_u","memarg"],65093:["i64.atomic.rmw8.xchg_u","memarg"],65094:["i64.atomic.rmw16.xchg_u","memarg"],65095:["i64.atomic.rmw32.xchg_u","memarg"],65096:["i32.atomic.rmw.cmpxchg","memarg"],65097:["i64.atomic.rmw.cmpxchg","memarg"],65098:["i32.atomic.rmw8.cmpxchg_u","memarg"],65099:["i32.atomic.rmw16.cmpxchg_u","memarg"],65100:["i64.atomic.rmw8.cmpxchg_u","memarg"],65101:["i64.atomic.rmw16.cmpxchg_u","memarg"],65102:["i64.atomic.rmw32.cmpxchg_u","memarg"],65116:["struct.atomic.get","struct_field"],65117:["struct.atomic.get_s","struct_field"],65118:["struct.atomic.get_u","struct_field"],65119:["struct.atomic.set","struct_field"],65120:["struct.atomic.rmw.add","struct_field"],65121:["struct.atomic.rmw.sub","struct_field"],65122:["struct.atomic.rmw.and","struct_field"],65123:["struct.atomic.rmw.or","struct_field"],65124:["struct.atomic.rmw.xor","struct_field"],65125:["struct.atomic.rmw.xchg","struct_field"],65126:["struct.atomic.rmw.cmpxchg","struct_field"],65127:["array.atomic.get","u32"],65128:["array.atomic.get_s","u32"],65129:["array.atomic.get_u","u32"],65130:["array.atomic.set","u32"],65131:["array.atomic.rmw.add","u32"],65132:["array.atomic.rmw.sub","u32"],65133:["array.atomic.rmw.and","u32"],65134:["array.atomic.rmw.or","u32"],65135:["array.atomic.rmw.xor","u32"],65136:["array.atomic.rmw.xchg","u32"],65137:["array.atomic.rmw.cmpxchg","u32"],64256:["struct.new","u32"],64257:["struct.new_default","u32"],64258:["struct.get","struct_field"],64259:["struct.get_s","struct_field"],64260:["struct.get_u","struct_field"],64261:["struct.set","struct_field"],64262:["array.new","u32"],64263:["array.new_default","u32"],64264:["array.new_fixed","array_new_fixed"],64265:["array.new_data","array_new_data"],64266:["array.new_elem","array_new_elem"],64267:["array.get","u32"],64268:["array.get_s","u32"],64269:["array.get_u","u32"],64270:["array.set","u32"],64271:["array.len","none"],64272:["array.fill","u32"],64273:["array.copy","array_copy"],64274:["array.init_data","array_new_data"],64275:["array.init_elem","array_new_elem"],64276:["ref.test","reftype"],64277:["ref.test null","reftype"],64278:["ref.cast","reftype"],64279:["ref.cast null","reftype"],64280:["br_on_cast","br_on_cast"],64281:["br_on_cast_fail","br_on_cast"],64282:["any.convert_extern","none"],64283:["extern.convert_any","none"],64284:["ref.i31","none"],64285:["i31.get_s","none"],64286:["i31.get_u","none"],64287:["ref.i31_shared","none"],64288:["struct.new_desc","u32"],64289:["struct.new_default_desc","u32"],64290:["ref.get_desc","none"],64291:["ref.cast_desc_eq","reftype"],64292:["ref.cast_desc_eq null","reftype"],64293:["br_on_cast_desc_eq","br_on_cast"],64294:["br_on_cast_desc_eq_fail","br_on_cast"],64332:["ref.cast_nop","reftype"],64384:["string.new_utf8","mem_init"],64385:["string.new_wtf16","mem_init"],64386:["string.const","u32"],64387:["string.measure_utf8","none"],64388:["string.measure_wtf8","none"],64389:["string.measure_wtf16","none"],64390:["string.encode_utf8","mem_init"],64391:["string.encode_wtf16","mem_init"],64392:["string.concat","none"],64393:["string.eq","none"],64394:["string.is_usv_sequence","none"],64395:["string.new_lossy_utf8","mem_init"],64396:["string.new_wtf8","mem_init"],64397:["string.encode_lossy_utf8","mem_init"],64398:["string.encode_wtf8","mem_init"],64399:["string.new_utf8_try","mem_init"],64400:["string.as_wtf8","none"],64401:["stringview_wtf8.advance","none"],64402:["stringview_wtf8.encode_utf8","mem_init"],64403:["stringview_wtf8.slice","none"],64404:["stringview_wtf8.encode_lossy_utf8","mem_init"],64405:["stringview_wtf8.encode_wtf8","mem_init"],64408:["string.as_wtf16","none"],64409:["stringview_wtf16.length","none"],64410:["stringview_wtf16.get_codeunit","none"],64411:["stringview_wtf16.encode","mem_init"],64412:["stringview_wtf16.slice","none"],64416:["string.as_iter","none"],64417:["stringview_iter.next","none"],64418:["stringview_iter.advance","none"],64419:["stringview_iter.rewind","none"],64420:["stringview_iter.slice","none"],64424:["string.compare","none"],64425:["string.from_code_point","none"],64426:["string.hash","none"],64432:["string.new_utf8_array","u32"],64433:["string.new_wtf16_array","u32"],64434:["string.encode_utf8_array","u32"],64435:["string.encode_wtf16_array","u32"],64436:["string.new_lossy_utf8_array","u32"],64437:["string.new_wtf8_array","u32"],64438:["string.encode_lossy_utf8_array","u32"],64439:["string.encode_wtf8_array","u32"],64440:["string.new_utf8_array_try","u32"],64060:["f64.acos","none"],64061:["f64.asin","none"],64062:["f64.atan","none"],64063:["f64.cos","none"],64064:["f64.sin","none"],64065:["f64.tan","none"],64066:["f64.exp","none"],64067:["f64.log","none"],64068:["f64.atan2","none"],64069:["f64.pow","none"],64070:["f64.mod","none"],64071:["i32.asmjs_div_s","none"],64072:["i32.asmjs_div_u","none"],64073:["i32.asmjs_rem_s","none"],64074:["i32.asmjs_rem_u","none"],64075:["i32.asmjs_load8_s","memarg"],64076:["i32.asmjs_load8_u","memarg"],64077:["i32.asmjs_load16_s","memarg"],64078:["i32.asmjs_load16_u","memarg"],64079:["i32.asmjs_load32","memarg"],64080:["f32.asmjs_load","memarg"],64081:["f64.asmjs_load","memarg"],64082:["i32.asmjs_store8","memarg"],64083:["i32.asmjs_store16","memarg"],64084:["i32.asmjs_store","memarg"],64085:["f32.asmjs_store","memarg"],64086:["f64.asmjs_store","memarg"],64087:["i32.asmjs_convert_f32_s","none"],64088:["i32.asmjs_convert_f32_u","none"],64089:["i32.asmjs_convert_f64_s","none"],64090:["i32.asmjs_convert_f64_u","none"]};ee.exports={opcodes:Rn,opcodeInfo:zn}});var ie=I((Zn,fe)=>{var{readULEB128:h,readSLEB128:C,readSLEB128i64:qn,intToLeb128:y,valTypes:ne}=E(),{opcodes:Gn,opcodeInfo:B}=$();function te(t,x){let a=t.getUint8(x);if(a===64)return{operand:{blockType:-64,text:"empty"},bytesRead:1};if(ne[a])return{operand:{blockType:a,result:ne[a]},bytesRead:1};let e=C(t,x);return{operand:{blockType:e.value,typeIndex:e.value},bytesRead:e.bytesRead}}function xe(t,x=0){let a=t instanceof DataView?t:new DataView(t.buffer,t.byteOffset,t.byteLength),e=0,f=[],n=h(a,e);e+=n.bytesRead;let i=[];for(let s=0;s<n.value;s++){let r=h(a,e);e+=r.bytesRead;let o=h(a,e);e+=o.bytesRead,i.push({count:r.value,type:o.value})}for(f.push({mnemonic:"local",locals:i});e<a.byteLength;){let s=x+e,r=e,o=a.getUint8(e++),d=o;if(o===252||o===253||o===251||o===254){let c=h(a,e);e+=c.bytesRead,d=o<<8|c.value}let u=B[d]||B[o]||[`unknown_0x${d.toString(16).padStart(4,"0")}`,"unknown"],[_,l]=u,b=null;if(l==="blocktype"){let c=te(a,e);b=c.operand,e+=c.bytesRead}else if(l==="u32"){let c=h(a,e);b=c.value,e+=c.bytesRead}else if(l==="i32"){let c=C(a,e);b=c.value,e+=c.bytesRead}else if(l==="i64"){let c=qn(a,e);b=c.value,e+=c.bytesRead}else if(l==="memarg"){let c=h(a,e);e+=c.bytesRead;let m=h(a,e);e+=m.bytesRead,b={align:c.value,offset:m.value}}else if(l==="memarg_lane"){let c=h(a,e);e+=c.bytesRead;let m=h(a,e);e+=m.bytesRead;let U=a.getUint8(e++);b={align:c.value,offset:m.value,lane:U}}else if(l==="memory_index")b=a.getUint8(a,e++);else if(l==="memory_copy"){let c=a.getUint8(a,e++),m=a.getUint8(a,e++);b={dst:c,src:m}}else if(l==="mem_init"){let c=h(a,e);e+=c.bytesRead;let m=a.getUint8(a,e++);b={segment:c.value,memoryIndex:m}}else if(l==="table_init"||l==="elemidx"){let c=h(a,e);e+=c.bytesRead;let m=h(a,e);e+=m.bytesRead,b={elemIndex:c.value,tableIndex:m.value}}else if(l==="table_copy"||l==="u32u32"){let c=h(a,e);e+=c.bytesRead;let m=h(a,e);e+=m.bytesRead,b={index1:c.value,index2:m.value}}else if(l==="call_indirect"){let c=h(a,e);e+=c.bytesRead;let m=h(a,e);e+=m.bytesRead,b={typeIndex:c.value,tableIndex:m.value}}else if(l==="br_table"){let c=h(a,e);e+=c.bytesRead;let m=[];for(let k=0;k<c.value;k++){let A=h(a,e);e+=A.bytesRead,m.push(A.value)}let U=h(a,e);e+=U.bytesRead,b={targets:m,defaultTarget:U.value}}else if(l==="f32")b=new Uint8Array(a.buffer,a.byteOffset+e,4).slice(),e+=4;else if(l==="f64")b=new Uint8Array(a.buffer,a.byteOffset+e,8).slice(),e+=8;else if(l==="v128_imm"){let c=new Uint8Array(16);for(let m=0;m<16;m++)c[m]=a.getUint8(e+m);b=Array.from(c),e+=16}else if(l==="simd_lane")b=a.getUint8(e++);else if(l==="simd_shuffle"){let c=[];for(let m=0;m<16;m++)c.push(a.getUint8(e++));b=c}else if(l==="reftype"){let c=C(a,e);b=c.value,e+=c.bytesRead}else if(l==="select_typed"){let c=h(a,e);e+=c.bytesRead;let m=a.getUint8(e++);b={count:c.value,type:m}}else if(l==="atomic_fence")b=a.getUint8(a,e++);else if(l==="try_table"){let c=te(a,e);e+=c.bytesRead;let m=h(a,e);e+=m.bytesRead;let U=[];for(let k=0;k<m.value;k++){let A=a.getUint8(e++),q=null;if(A===0||A===1){let N=h(a,e);e+=N.bytesRead,q=N.value}let j=h(a,e);e+=j.bytesRead,U.push({tag:A,tagIndex:q,label:j.value})}b={blockType:c.operand,catches:U}}else if(l==="resume"||l==="resume_throw"){let c=h(a,e);e+=c.bytesRead;let m=h(a,e);e+=m.bytesRead;let U=[];for(let k=0;k<m.value;k++){let A=h(a,e);e+=A.bytesRead;let q=h(a,e);e+=q.bytesRead,U.push({tag:A.value,label:q.value})}b={typeIndex:c.value,handlers:U}}else if(l!=="none")if(l==="unknown")console.log("operandType",l,"not parsed");else throw new Error(`Unhandled operand type "${l}" for ${_} at 0x${s.toString(16)}`);let v=e-r;if(f.push({offset:s,opcode:d,mnemonic:_,size:v,operand:b}),v<=0){console.warn(`Zero/invalid size at offset 0x${s.toString(16)} - stopping`);break}}return f}function ae(t){let x=[],a=t.shift();if(a.mnemonic==="local"){let e=a.locals;x.push(...y(e.length));for(let f=0;f<e.length;f++){let n=e[f];x.push(...y(n.count)),x.push(...y(n.type))}}for(let e of t){let f=e.opcode,n=e.operand||{};if(f<=255)x.push(f);else{let o=f>>8&255,d=f&255;x.push(o),x.push(...y(d,!1))}let s=(B[f]||(f>255?B[f>>8]:null)||["unknown","unknown"])[1],r=[];if(s!=="none")if(s==="unknown")console.log("operandType",s,"not encoded");else if(s==="blocktype")if(n.blockType===-64||n.text==="empty")r.push(64);else if(n.result!==void 0)r.push(n.blockType);else{let o=n.blockType??n.typeIndex;r.push(...y(o,!0))}else if(s==="u32")r.push(...y(n,!1));else if(s==="i32")r.push(...y(n,!0));else if(s==="i64")r.push(...y(n,!0));else if(s==="memarg")r.push(...y(n.align,!1)),r.push(...y(n.offset,!1));else if(s==="memarg_lane")r.push(...y(n.align,!1)),r.push(...y(n.offset,!1)),r.push(n.lane&255);else if(s==="memory_index"||s==="atomic_fence")r.push(0);else if(s==="memory_copy")r.push(0,0);else if(s==="mem_init")r.push(...y(n.segment??n.dataIndex,!1)),r.push(0);else if(s==="table_init"||s==="elemidx"||s==="u32u32"||s==="table_copy")r.push(...y(n.elemIndex??n.index1,!1)),r.push(...y(n.tableIndex??n.index2,!1));else if(s==="call_indirect")r.push(...y(n.typeIndex,!1)),r.push(...y(n.tableIndex,!1));else if(s==="br_table"){r.push(...y(n.targets.length,!1));for(let o of n.targets)r.push(...y(o,!1));r.push(...y(n.defaultTarget,!1))}else if(s==="f32")r.push(...n);else if(s==="f64")r.push(...n);else if(s==="v128_imm"){let o=n instanceof Uint8Array?n:new Uint8Array(n);r.push(...o)}else if(s==="simd_lane")r.push(n&255);else if(s==="simd_shuffle")r.push(...n);else if(s==="reftype")r.push(...y(n,!0));else if(s==="select_typed")r.push(...y(n.count??1,!1)),r.push(n.type);else if(s==="try_table"){n.blockType.blockType===-64||n.blockType.text==="empty"?r.push(64):n.blockType.result!==void 0?r.push(n.blockType.blockType):r.push(...y(n.blockType.blockType??n.blockType.typeIndex,!0)),r.push(...y(n.catches.length,!1));for(let o of n.catches)r.push(o.tag),(o.tag===0||o.tag===1)&&r.push(...y(o.tagIndex,!1)),r.push(...y(o.label,!1))}else if(s==="resume"||s==="resume_throw"){r.push(...y(n.typeIndex,!1)),r.push(...y(n.handlers.length,!1));for(let o of n.handlers)r.push(...y(o.tag,!1)),r.push(...y(o.label,!1))}else throw new Error(`Unhandled operand type "${s}" for encoding ${e.mnemonic} (opcode 0x${f.toString(16)})`);x.push(...r)}return new Uint8Array(x)}function Tn(t,x={}){let a=t instanceof DataView?t:new DataView(t.buffer,t.byteOffset,t.byteLength),e=xe(a),f={instructions:e,replace(n,i){e.splice(n,1,...i)},remove(n){e.splice(n,1)},insertAfter(n,i){e.splice(n+1,0,...i)},insertBefore(n,i){e.splice(n,0,...i)}};for(let n=0;n<e.length;n++){let i=e[n],s=x[i.mnemonic];s&&s(i,f,n);let r=x["*"];r&&r(i,f,n),n=Math.min(n,e.length-1)}return ae(e)}fe.exports={traverseWasm:Tn,encodeInstructions:ae,parseWasmInstructions:xe}});window.WASM={parser:Y(),utils:E(),traverse:ie(),opcodes:$()};})();