cornerstone-wado-image-loader
Version:
Cornerstone Image Loader for DICOM WADO-URI and WADO-RS
1 lines • 1.68 MB
JavaScript
!function(A,I){"object"==typeof exports&&"object"==typeof module?module.exports=I():"function"==typeof define&&define.amd?define("cornerstoneWADOImageLoader",[],I):"object"==typeof exports?exports.cornerstoneWADOImageLoader=I():A.cornerstoneWADOImageLoader=I()}(this,(function(){return(()=>{var A,I,g,C,B={4559:(A,I,g)=>{A.exports=g(9842)},7552:(A,I,g)=>{A.exports=g(5697)},7647:(A,I,g)=>{A.exports=g(3798)},6028:(A,I,g)=>{A.exports=g(671)},187:(A,I,g)=>{A.exports=g(7283)},1655:(A,I,g)=>{A.exports=g(2882)},1246:(A,I,g)=>{A.exports=g(8730)},337:(A,I,g)=>{A.exports=g(3751)},2770:(A,I,g)=>{A.exports=g(1380)},1882:(A,I,g)=>{A.exports=g(6601)},7878:(A,I,g)=>{A.exports=g(8783)},2204:(A,I,g)=>{A.exports=g(4731)},1082:(A,I,g)=>{A.exports=g(5723)},5534:(A,I,g)=>{A.exports=g(5213)},7458:A=>{var I=function(A){"use strict";var I,g=Object.prototype,C=g.hasOwnProperty,B="function"==typeof Symbol?Symbol:{},Q=B.iterator||"@@iterator",E=B.asyncIterator||"@@asyncIterator",i=B.toStringTag||"@@toStringTag";function o(A,I,g){return Object.defineProperty(A,I,{value:g,enumerable:!0,configurable:!0,writable:!0}),A[I]}try{o({},"")}catch(A){o=function(A,I,g){return A[I]=g}}function a(A,I,g,C){var B=I&&I.prototype instanceof F?I:F,Q=Object.create(B.prototype),E=new K(C||[]);return Q._invoke=function(A,I,g){var C=D;return function(B,Q){if(C===e)throw new Error("Generator is already running");if(C===s){if("throw"===B)throw Q;return Y()}for(g.method=B,g.arg=Q;;){var E=g.delegate;if(E){var i=U(E,g);if(i){if(i===r)continue;return i}}if("next"===g.method)g.sent=g._sent=g.arg;else if("throw"===g.method){if(C===D)throw C=s,g.arg;g.dispatchException(g.arg)}else"return"===g.method&&g.abrupt("return",g.arg);C=e;var o=t(A,I,g);if("normal"===o.type){if(C=g.done?s:n,o.arg===r)continue;return{value:o.arg,done:g.done}}"throw"===o.type&&(C=s,g.method="throw",g.arg=o.arg)}}}(A,g,E),Q}function t(A,I,g){try{return{type:"normal",arg:A.call(I,g)}}catch(A){return{type:"throw",arg:A}}}A.wrap=a;var D="suspendedStart",n="suspendedYield",e="executing",s="completed",r={};function F(){}function w(){}function c(){}var h={};o(h,Q,(function(){return this}));var y=Object.getPrototypeOf,G=y&&y(y(l([])));G&&G!==g&&C.call(G,Q)&&(h=G);var N=c.prototype=F.prototype=Object.create(h);function R(A){["next","throw","return"].forEach((function(I){o(A,I,(function(A){return this._invoke(I,A)}))}))}function S(A,I){function g(B,Q,E,i){var o=t(A[B],A,Q);if("throw"!==o.type){var a=o.arg,D=a.value;return D&&"object"==typeof D&&C.call(D,"__await")?I.resolve(D.__await).then((function(A){g("next",A,E,i)}),(function(A){g("throw",A,E,i)})):I.resolve(D).then((function(A){a.value=A,E(a)}),(function(A){return g("throw",A,E,i)}))}i(o.arg)}var B;this._invoke=function(A,C){function Q(){return new I((function(I,B){g(A,C,I,B)}))}return B=B?B.then(Q,Q):Q()}}function U(A,g){var C=A.iterator[g.method];if(C===I){if(g.delegate=null,"throw"===g.method){if(A.iterator.return&&(g.method="return",g.arg=I,U(A,g),"throw"===g.method))return r;g.method="throw",g.arg=new TypeError("The iterator does not provide a 'throw' method")}return r}var B=t(C,A.iterator,g.arg);if("throw"===B.type)return g.method="throw",g.arg=B.arg,g.delegate=null,r;var Q=B.arg;return Q?Q.done?(g[A.resultName]=Q.value,g.next=A.nextLoc,"return"!==g.method&&(g.method="next",g.arg=I),g.delegate=null,r):Q:(g.method="throw",g.arg=new TypeError("iterator result is not an object"),g.delegate=null,r)}function k(A){var I={tryLoc:A[0]};1 in A&&(I.catchLoc=A[1]),2 in A&&(I.finallyLoc=A[2],I.afterLoc=A[3]),this.tryEntries.push(I)}function J(A){var I=A.completion||{};I.type="normal",delete I.arg,A.completion=I}function K(A){this.tryEntries=[{tryLoc:"root"}],A.forEach(k,this),this.reset(!0)}function l(A){if(A){var g=A[Q];if(g)return g.call(A);if("function"==typeof A.next)return A;if(!isNaN(A.length)){var B=-1,E=function g(){for(;++B<A.length;)if(C.call(A,B))return g.value=A[B],g.done=!1,g;return g.value=I,g.done=!0,g};return E.next=E}}return{next:Y}}function Y(){return{value:I,done:!0}}return w.prototype=c,o(N,"constructor",c),o(c,"constructor",w),w.displayName=o(c,i,"GeneratorFunction"),A.isGeneratorFunction=function(A){var I="function"==typeof A&&A.constructor;return!!I&&(I===w||"GeneratorFunction"===(I.displayName||I.name))},A.mark=function(A){return Object.setPrototypeOf?Object.setPrototypeOf(A,c):(A.__proto__=c,o(A,i,"GeneratorFunction")),A.prototype=Object.create(N),A},A.awrap=function(A){return{__await:A}},R(S.prototype),o(S.prototype,E,(function(){return this})),A.AsyncIterator=S,A.async=function(I,g,C,B,Q){void 0===Q&&(Q=Promise);var E=new S(a(I,g,C,B),Q);return A.isGeneratorFunction(g)?E:E.next().then((function(A){return A.done?A.value:E.next()}))},R(N),o(N,i,"Generator"),o(N,Q,(function(){return this})),o(N,"toString",(function(){return"[object Generator]"})),A.keys=function(A){var I=[];for(var g in A)I.push(g);return I.reverse(),function g(){for(;I.length;){var C=I.pop();if(C in A)return g.value=C,g.done=!1,g}return g.done=!0,g}},A.values=l,K.prototype={constructor:K,reset:function(A){if(this.prev=0,this.next=0,this.sent=this._sent=I,this.done=!1,this.delegate=null,this.method="next",this.arg=I,this.tryEntries.forEach(J),!A)for(var g in this)"t"===g.charAt(0)&&C.call(this,g)&&!isNaN(+g.slice(1))&&(this[g]=I)},stop:function(){this.done=!0;var A=this.tryEntries[0].completion;if("throw"===A.type)throw A.arg;return this.rval},dispatchException:function(A){if(this.done)throw A;var g=this;function B(C,B){return i.type="throw",i.arg=A,g.next=C,B&&(g.method="next",g.arg=I),!!B}for(var Q=this.tryEntries.length-1;Q>=0;--Q){var E=this.tryEntries[Q],i=E.completion;if("root"===E.tryLoc)return B("end");if(E.tryLoc<=this.prev){var o=C.call(E,"catchLoc"),a=C.call(E,"finallyLoc");if(o&&a){if(this.prev<E.catchLoc)return B(E.catchLoc,!0);if(this.prev<E.finallyLoc)return B(E.finallyLoc)}else if(o){if(this.prev<E.catchLoc)return B(E.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<E.finallyLoc)return B(E.finallyLoc)}}}},abrupt:function(A,I){for(var g=this.tryEntries.length-1;g>=0;--g){var B=this.tryEntries[g];if(B.tryLoc<=this.prev&&C.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var Q=B;break}}Q&&("break"===A||"continue"===A)&&Q.tryLoc<=I&&I<=Q.finallyLoc&&(Q=null);var E=Q?Q.completion:{};return E.type=A,E.arg=I,Q?(this.method="next",this.next=Q.finallyLoc,r):this.complete(E)},complete:function(A,I){if("throw"===A.type)throw A.arg;return"break"===A.type||"continue"===A.type?this.next=A.arg:"return"===A.type?(this.rval=this.arg=A.arg,this.method="return",this.next="end"):"normal"===A.type&&I&&(this.next=I),r},finish:function(A){for(var I=this.tryEntries.length-1;I>=0;--I){var g=this.tryEntries[I];if(g.finallyLoc===A)return this.complete(g.completion,g.afterLoc),J(g),r}},catch:function(A){for(var I=this.tryEntries.length-1;I>=0;--I){var g=this.tryEntries[I];if(g.tryLoc===A){var C=g.completion;if("throw"===C.type){var B=C.arg;J(g)}return B}}throw new Error("illegal catch attempt")},delegateYield:function(A,g,C){return this.delegate={iterator:l(A),resultName:g,nextLoc:C},"next"===this.method&&(this.arg=I),r}},A}(A.exports);try{regeneratorRuntime=I}catch(A){"object"==typeof globalThis?globalThis.regeneratorRuntime=I:Function("r","regeneratorRuntime = r")(I)}},2043:(A,I,g)=>{A.exports=g(7458)},8327:(A,I,g)=>{var C,B=(C=(C="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(A){var I,B=void 0!==(A=A||{})?A:{},Q={};for(I in B)B.hasOwnProperty(I)&&(Q[I]=B[I]);var E=[],i=!1,o=!1,a=!1,t=!1;i="object"==typeof window,o="function"==typeof importScripts,a="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&!i&&!o,t=!i&&!a&&!o;var D,n,e,s,r="";function F(A){return B.locateFile?B.locateFile(A,r):r+A}a?(r="//",D=function(A,I){return e||(e=g(981)),s||(s=g(1209)),A=s.normalize(A),e.readFileSync(A,I?null:"utf8")},n=function(A){var I=D(A,!0);return I.buffer||(I=new Uint8Array(I)),S(I.buffer),I},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),E=process.argv.slice(2),process.on("uncaughtException",(function(A){if(!(A instanceof Xg))throw A})),process.on("unhandledRejection",nA),B.inspect=function(){return"[Emscripten Module object]"}):t?("undefined"!=typeof read&&(D=function(A){return read(A)}),n=function(A){var I;return"function"==typeof readbuffer?new Uint8Array(readbuffer(A)):(S("object"==typeof(I=read(A,"binary"))),I)},"undefined"!=typeof scriptArgs?E=scriptArgs:void 0!==arguments&&(E=arguments),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(i||o)&&(o?r=self.location.href:document.currentScript&&(r=document.currentScript.src),C&&(r=C),r=0!==r.indexOf("blob:")?r.substr(0,r.lastIndexOf("/")+1):"",D=function(A){var I=new XMLHttpRequest;return I.open("GET",A,!1),I.send(null),I.responseText},o&&(n=function(A){var I=new XMLHttpRequest;return I.open("GET",A,!1),I.responseType="arraybuffer",I.send(null),new Uint8Array(I.response)}));var w=B.print||console.log.bind(console),c=B.printErr||console.warn.bind(console);for(I in Q)Q.hasOwnProperty(I)&&(B[I]=Q[I]);Q=null,B.arguments&&(E=B.arguments),B.thisProgram&&B.thisProgram,B.quit&&B.quit;var h,y,G=function(A){};B.wasmBinary&&(h=B.wasmBinary),B.noExitRuntime&&B.noExitRuntime,"object"!=typeof WebAssembly&&c("no native wasm support detected");var N=new WebAssembly.Table({initial:181,maximum:181,element:"anyfunc"}),R=!1;function S(A,I){A||nA("Assertion failed: "+I)}function U(A){var I=B["_"+A];return S(I,"Cannot call unknown function "+A+", make sure it is exported"),I}function k(A,I,g,C,B){var Q={string:function(A){var I=0;if(null!=A&&0!==A){var g=1+(A.length<<2);d(A,I=Wg(g),g)}return I},array:function(A){var I=Wg(A.length);return L(A,I),I}},E=U(A),i=[],o=0;if(C)for(var a=0;a<C.length;a++){var t=Q[g[a]];t?(0===o&&(o=Zg()),i[a]=t(C[a])):i[a]=C[a]}var D=E.apply(null,i);return D=function(A){return"string"===I?l(A):"boolean"===I?Boolean(A):A}(D),0!==o&&xg(o),D}var J="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function K(A,I,g){for(var C=I+g,B=I;A[B]&&!(B>=C);)++B;if(B-I>16&&A.subarray&&J)return J.decode(A.subarray(I,B));for(var Q="";I<B;){var E=A[I++];if(128&E){var i=63&A[I++];if(192!=(224&E)){var o=63&A[I++];if((E=224==(240&E)?(15&E)<<12|i<<6|o:(7&E)<<18|i<<12|o<<6|63&A[I++])<65536)Q+=String.fromCharCode(E);else{var a=E-65536;Q+=String.fromCharCode(55296|a>>10,56320|1023&a)}}else Q+=String.fromCharCode((31&E)<<6|i)}else Q+=String.fromCharCode(E)}return Q}function l(A,I){return A?K(H,A,I):""}function Y(A,I,g,C){if(!(C>0))return 0;for(var B=g,Q=g+C-1,E=0;E<A.length;++E){var i=A.charCodeAt(E);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&A.charCodeAt(++E)),i<=127){if(g>=Q)break;I[g++]=i}else if(i<=2047){if(g+1>=Q)break;I[g++]=192|i>>6,I[g++]=128|63&i}else if(i<=65535){if(g+2>=Q)break;I[g++]=224|i>>12,I[g++]=128|i>>6&63,I[g++]=128|63&i}else{if(g+3>=Q)break;I[g++]=240|i>>18,I[g++]=128|i>>12&63,I[g++]=128|i>>6&63,I[g++]=128|63&i}}return I[g]=0,g-B}function d(A,I,g){return Y(A,H,I,g)}function M(A){for(var I=0,g=0;g<A.length;++g){var C=A.charCodeAt(g);C>=55296&&C<=57343&&(C=65536+((1023&C)<<10)|1023&A.charCodeAt(++g)),C<=127?++I:I+=C<=2047?2:C<=65535?3:4}return I}function L(A,I){u.set(A,I)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var f,u,H,q,p,b,m,Z,W,x=65536;function X(A,I){return A%I>0&&(A+=I-A%I),A}function V(A){f=A,B.HEAP8=u=new Int8Array(A),B.HEAP16=q=new Int16Array(A),B.HEAP32=b=new Int32Array(A),B.HEAPU8=H=new Uint8Array(A),B.HEAPU16=p=new Uint16Array(A),B.HEAPU32=m=new Uint32Array(A),B.HEAPF32=Z=new Float32Array(A),B.HEAPF64=W=new Float64Array(A)}var v=5289088,T=46048,j=B.TOTAL_MEMORY||1073741824;function P(A){for(;A.length>0;){var I=A.shift();if("function"!=typeof I){var g=I.func;"number"==typeof g?void 0===I.arg?B.dynCall_v(g):B.dynCall_vi(g,I.arg):g(void 0===I.arg?null:I.arg)}else I()}}(y=B.wasmMemory?B.wasmMemory:new WebAssembly.Memory({initial:j/x}))&&(f=y.buffer),j=f.byteLength,V(f),b[T>>2]=v;var O=[],z=[],_=[],$=[],AA=[];function IA(){if(B.preRun)for("function"==typeof B.preRun&&(B.preRun=[B.preRun]);B.preRun.length;)QA(B.preRun.shift());P(O)}function gA(){P(z)}function CA(){P(_)}function BA(){if(B.postRun)for("function"==typeof B.postRun&&(B.postRun=[B.postRun]);B.postRun.length;)EA(B.postRun.shift());P(AA)}function QA(A){O.unshift(A)}function EA(A){AA.unshift(A)}Math.abs,Math.ceil,Math.floor,Math.min;var iA=0,oA=null,aA=null;function tA(A){iA++,B.monitorRunDependencies&&B.monitorRunDependencies(iA)}function DA(A){if(iA--,B.monitorRunDependencies&&B.monitorRunDependencies(iA),0==iA&&(null!==oA&&(clearInterval(oA),oA=null),aA)){var I=aA;aA=null,I()}}function nA(A){throw B.onAbort&&B.onAbort(A),w(A+=""),c(A),R=!0,A="abort("+A+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(A)}B.preloadedImages={},B.preloadedAudios={};var eA="data:application/octet-stream;base64,";function sA(A){return String.prototype.startsWith?A.startsWith(eA):0===A.indexOf(eA)}var rA="charlswasm_decode.wasm";function FA(){try{if(h)return new Uint8Array(h);if(n)return n(rA);throw"both async and sync fetching of the wasm failed"}catch(A){nA(A)}}function wA(){return h||!i&&!o||"function"!=typeof fetch?new Promise((function(A,I){A(FA())})):fetch(rA,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+rA+"'";return A.arrayBuffer()})).catch((function(){return FA()}))}function cA(){var A={env:Lg,wasi_snapshot_preview1:Lg};function I(A,I){var g=A.exports;B.asm=g,DA()}function g(A){I(A.instance)}function C(I){return wA().then((function(I){return WebAssembly.instantiate(I,A)})).then(I,(function(A){c("failed to asynchronously prepare wasm: "+A),nA(A)}))}if(tA(),B.instantiateWasm)try{return B.instantiateWasm(A,I)}catch(A){return c("Module.instantiateWasm callback failed with error: "+A),!1}return function(){if(h||"function"!=typeof WebAssembly.instantiateStreaming||sA(rA)||"function"!=typeof fetch)return C(g);fetch(rA,{credentials:"same-origin"}).then((function(I){return WebAssembly.instantiateStreaming(I,A).then(g,(function(A){c("wasm streaming compile failed: "+A),c("falling back to ArrayBuffer instantiation"),C(g)}))}))}(),{}}function hA(A){return qg(A)}function yA(A,I){$.unshift({func:A,arg:I})}function GA(){return yA.apply(null,arguments)}function NA(){return yA.apply(null,arguments)}sA(rA)||(rA=F(rA)),z.push({func:function(){Hg()}});var RA={};function SA(A,I,g){throw RA[A]={ptr:A,adjusted:[A],type:I,destructor:g,refcount:0,caught:!1,rethrown:!1},"uncaught_exception"in pg?pg.uncaught_exceptions++:pg.uncaught_exceptions=1,A}var UA={};function kA(A){for(;A.length;){var I=A.pop();A.pop()(I)}}function JA(A){return this.fromWireType(m[A>>2])}var KA={},lA={},YA={},dA=48,MA=57;function LA(A){if(void 0===A)return"_unknown";var I=(A=A.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return I>=dA&&I<=MA?"_"+A:A}function fA(A,I){return A=LA(A),new Function("body","return function "+A+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(I)}function uA(A,I){var g=fA(I,(function(A){this.name=I,this.message=A;var g=new Error(A).stack;void 0!==g&&(this.stack=this.toString()+"\n"+g.replace(/^Error(:[^\n]*)?\n/,""))}));return g.prototype=Object.create(A.prototype),g.prototype.constructor=g,g.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},g}var HA=void 0;function qA(A){throw new HA(A)}function pA(A,I,g){function C(I){var C=g(I);C.length!==A.length&&qA("Mismatched type converter count");for(var B=0;B<A.length;++B)vA(A[B],C[B])}A.forEach((function(A){YA[A]=I}));var B=new Array(I.length),Q=[],E=0;I.forEach((function(A,I){lA.hasOwnProperty(A)?B[I]=lA[A]:(Q.push(A),KA.hasOwnProperty(A)||(KA[A]=[]),KA[A].push((function(){B[I]=lA[A],++E===Q.length&&C(B)})))})),0===Q.length&&C(B)}function bA(A){var I=UA[A];delete UA[A];var g=I.rawConstructor,C=I.rawDestructor,B=I.fields;pA([A],B.map((function(A){return A.getterReturnType})).concat(B.map((function(A){return A.setterArgumentType}))),(function(A){var Q={};return B.forEach((function(I,g){var C=I.fieldName,E=A[g],i=I.getter,o=I.getterContext,a=A[g+B.length],t=I.setter,D=I.setterContext;Q[C]={read:function(A){return E.fromWireType(i(o,A))},write:function(A,I){var g=[];t(D,A,a.toWireType(g,I)),kA(g)}}})),[{name:I.name,fromWireType:function(A){var I={};for(var g in Q)I[g]=Q[g].read(A);return C(A),I},toWireType:function(A,I){for(var B in Q)if(!(B in I))throw new TypeError("Missing field");var E=g();for(B in Q)Q[B].write(E,I[B]);return null!==A&&A.push(C,E),E},argPackAdvance:8,readValueFromPointer:JA,destructorFunction:C}]}))}function mA(A){switch(A){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+A)}}function ZA(){for(var A=new Array(256),I=0;I<256;++I)A[I]=String.fromCharCode(I);WA=A}var WA=void 0;function xA(A){for(var I="",g=A;H[g];)I+=WA[H[g++]];return I}var XA=void 0;function VA(A){throw new XA(A)}function vA(A,I,g){if(g=g||{},!("argPackAdvance"in I))throw new TypeError("registerType registeredInstance requires argPackAdvance");var C=I.name;if(A||VA('type "'+C+'" must have a positive integer typeid pointer'),lA.hasOwnProperty(A)){if(g.ignoreDuplicateRegistrations)return;VA("Cannot register type '"+C+"' twice")}if(lA[A]=I,delete YA[A],KA.hasOwnProperty(A)){var B=KA[A];delete KA[A],B.forEach((function(A){A()}))}}function TA(A,I,g,C,B){var Q=mA(g);vA(A,{name:I=xA(I),fromWireType:function(A){return!!A},toWireType:function(A,I){return I?C:B},argPackAdvance:8,readValueFromPointer:function(A){var C;if(1===g)C=u;else if(2===g)C=q;else{if(4!==g)throw new TypeError("Unknown boolean type size: "+I);C=b}return this.fromWireType(C[A>>Q])},destructorFunction:null})}function jA(A){if(!(this instanceof tI))return!1;if(!(A instanceof tI))return!1;for(var I=this.$$.ptrType.registeredClass,g=this.$$.ptr,C=A.$$.ptrType.registeredClass,B=A.$$.ptr;I.baseClass;)g=I.upcast(g),I=I.baseClass;for(;C.baseClass;)B=C.upcast(B),C=C.baseClass;return I===C&&g===B}function PA(A){return{count:A.count,deleteScheduled:A.deleteScheduled,preservePointerOnDelete:A.preservePointerOnDelete,ptr:A.ptr,ptrType:A.ptrType,smartPtr:A.smartPtr,smartPtrType:A.smartPtrType}}function OA(A){VA(A.$$.ptrType.registeredClass.name+" instance already deleted")}var zA=!1;function _A(A){}function $A(A){A.smartPtr?A.smartPtrType.rawDestructor(A.smartPtr):A.ptrType.registeredClass.rawDestructor(A.ptr)}function AI(A){A.count.value-=1,0===A.count.value&&$A(A)}function II(A){return"undefined"==typeof FinalizationGroup?(II=function(A){return A},A):(zA=new FinalizationGroup((function(A){for(var I=A.next();!I.done;I=A.next()){var g=I.value;g.ptr?AI(g):console.warn("object already deleted: "+g.ptr)}})),_A=function(A){zA.unregister(A.$$)},(II=function(A){return zA.register(A,A.$$,A.$$),A})(A))}function gI(){if(this.$$.ptr||OA(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var A=II(Object.create(Object.getPrototypeOf(this),{$$:{value:PA(this.$$)}}));return A.$$.count.value+=1,A.$$.deleteScheduled=!1,A}function CI(){this.$$.ptr||OA(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&VA("Object already scheduled for deletion"),_A(this),AI(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function BI(){return!this.$$.ptr}var QI=void 0,EI=[];function iI(){for(;EI.length;){var A=EI.pop();A.$$.deleteScheduled=!1,A.delete()}}function oI(){return this.$$.ptr||OA(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&VA("Object already scheduled for deletion"),EI.push(this),1===EI.length&&QI&&QI(iI),this.$$.deleteScheduled=!0,this}function aI(){tI.prototype.isAliasOf=jA,tI.prototype.clone=gI,tI.prototype.delete=CI,tI.prototype.isDeleted=BI,tI.prototype.deleteLater=oI}function tI(){}var DI={};function nI(A,I,g){if(void 0===A[I].overloadTable){var C=A[I];A[I]=function(){return A[I].overloadTable.hasOwnProperty(arguments.length)||VA("Function '"+g+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+A[I].overloadTable+")!"),A[I].overloadTable[arguments.length].apply(this,arguments)},A[I].overloadTable=[],A[I].overloadTable[C.argCount]=C}}function eI(A,I,g){B.hasOwnProperty(A)?((void 0===g||void 0!==B[A].overloadTable&&void 0!==B[A].overloadTable[g])&&VA("Cannot register public name '"+A+"' twice"),nI(B,A,A),B.hasOwnProperty(g)&&VA("Cannot register multiple overloads of a function with the same number of arguments ("+g+")!"),B[A].overloadTable[g]=I):(B[A]=I,void 0!==g&&(B[A].numArguments=g))}function sI(A,I,g,C,B,Q,E,i){this.name=A,this.constructor=I,this.instancePrototype=g,this.rawDestructor=C,this.baseClass=B,this.getActualType=Q,this.upcast=E,this.downcast=i,this.pureVirtualFunctions=[]}function rI(A,I,g){for(;I!==g;)I.upcast||VA("Expected null or instance of "+g.name+", got an instance of "+I.name),A=I.upcast(A),I=I.baseClass;return A}function FI(A,I){if(null===I)return this.isReference&&VA("null is not a valid "+this.name),0;I.$$||VA('Cannot pass "'+$I(I)+'" as a '+this.name),I.$$.ptr||VA("Cannot pass deleted object as a pointer of type "+this.name);var g=I.$$.ptrType.registeredClass;return rI(I.$$.ptr,g,this.registeredClass)}function wI(A,I){var g;if(null===I)return this.isReference&&VA("null is not a valid "+this.name),this.isSmartPointer?(g=this.rawConstructor(),null!==A&&A.push(this.rawDestructor,g),g):0;I.$$||VA('Cannot pass "'+$I(I)+'" as a '+this.name),I.$$.ptr||VA("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&I.$$.ptrType.isConst&&VA("Cannot convert argument of type "+(I.$$.smartPtrType?I.$$.smartPtrType.name:I.$$.ptrType.name)+" to parameter type "+this.name);var C=I.$$.ptrType.registeredClass;if(g=rI(I.$$.ptr,C,this.registeredClass),this.isSmartPointer)switch(void 0===I.$$.smartPtr&&VA("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:I.$$.smartPtrType===this?g=I.$$.smartPtr:VA("Cannot convert argument of type "+(I.$$.smartPtrType?I.$$.smartPtrType.name:I.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:g=I.$$.smartPtr;break;case 2:if(I.$$.smartPtrType===this)g=I.$$.smartPtr;else{var B=I.clone();g=this.rawShare(g,zI((function(){B.delete()}))),null!==A&&A.push(this.rawDestructor,g)}break;default:VA("Unsupporting sharing policy")}return g}function cI(A,I){if(null===I)return this.isReference&&VA("null is not a valid "+this.name),0;I.$$||VA('Cannot pass "'+$I(I)+'" as a '+this.name),I.$$.ptr||VA("Cannot pass deleted object as a pointer of type "+this.name),I.$$.ptrType.isConst&&VA("Cannot convert argument of type "+I.$$.ptrType.name+" to parameter type "+this.name);var g=I.$$.ptrType.registeredClass;return rI(I.$$.ptr,g,this.registeredClass)}function hI(A){return this.rawGetPointee&&(A=this.rawGetPointee(A)),A}function yI(A){this.rawDestructor&&this.rawDestructor(A)}function GI(A){null!==A&&A.delete()}function NI(A,I,g){if(I===g)return A;if(void 0===g.baseClass)return null;var C=NI(A,I,g.baseClass);return null===C?null:g.downcast(C)}function RI(){return Object.keys(JI).length}function SI(){var A=[];for(var I in JI)JI.hasOwnProperty(I)&&A.push(JI[I]);return A}function UI(A){QI=A,EI.length&&QI&&QI(iI)}function kI(){B.getInheritedInstanceCount=RI,B.getLiveInheritedInstances=SI,B.flushPendingDeletes=iI,B.setDelayFunction=UI}var JI={};function KI(A,I){for(void 0===I&&VA("ptr should not be undefined");A.baseClass;)I=A.upcast(I),A=A.baseClass;return I}function lI(A,I){return I=KI(A,I),JI[I]}function YI(A,I){return I.ptrType&&I.ptr||qA("makeClassHandle requires ptr and ptrType"),!!I.smartPtrType!=!!I.smartPtr&&qA("Both smartPtrType and smartPtr must be specified"),I.count={value:1},II(Object.create(A,{$$:{value:I}}))}function dI(A){var I=this.getPointee(A);if(!I)return this.destructor(A),null;var g=lI(this.registeredClass,I);if(void 0!==g){if(0===g.$$.count.value)return g.$$.ptr=I,g.$$.smartPtr=A,g.clone();var C=g.clone();return this.destructor(A),C}function B(){return this.isSmartPointer?YI(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:I,smartPtrType:this,smartPtr:A}):YI(this.registeredClass.instancePrototype,{ptrType:this,ptr:A})}var Q,E=this.registeredClass.getActualType(I),i=DI[E];if(!i)return B.call(this);Q=this.isConst?i.constPointerType:i.pointerType;var o=NI(I,this.registeredClass,Q.registeredClass);return null===o?B.call(this):this.isSmartPointer?YI(Q.registeredClass.instancePrototype,{ptrType:Q,ptr:o,smartPtrType:this,smartPtr:A}):YI(Q.registeredClass.instancePrototype,{ptrType:Q,ptr:o})}function MI(){LI.prototype.getPointee=hI,LI.prototype.destructor=yI,LI.prototype.argPackAdvance=8,LI.prototype.readValueFromPointer=JA,LI.prototype.deleteObject=GI,LI.prototype.fromWireType=dI}function LI(A,I,g,C,B,Q,E,i,o,a,t){this.name=A,this.registeredClass=I,this.isReference=g,this.isConst=C,this.isSmartPointer=B,this.pointeeType=Q,this.sharingPolicy=E,this.rawGetPointee=i,this.rawConstructor=o,this.rawShare=a,this.rawDestructor=t,B||void 0!==I.baseClass?this.toWireType=wI:C?(this.toWireType=FI,this.destructorFunction=null):(this.toWireType=cI,this.destructorFunction=null)}function fI(A,I,g){B.hasOwnProperty(A)||qA("Replacing nonexistant public symbol"),void 0!==B[A].overloadTable&&void 0!==g?B[A].overloadTable[g]=I:(B[A]=I,B[A].argCount=g)}function uI(A,I){var g;if(A=xA(A),void 0!==B["FUNCTION_TABLE_"+A])g=B["FUNCTION_TABLE_"+A][I];else if("undefined"!=typeof FUNCTION_TABLE)g=FUNCTION_TABLE[I];else{var C=B["dynCall_"+A];void 0===C&&void 0===(C=B["dynCall_"+A.replace(/f/g,"d")])&&VA("No dynCall invoker for signature: "+A),g=function(g){for(var C=[],B=1;B<A.length;++B)C.push("a"+B);var Q="return function dynCall_"+A+"_"+I+"("+C.join(", ")+") {\n";return Q+=" return dynCall(rawFunction"+(C.length?", ":"")+C.join(", ")+");\n",Q+="};\n",new Function("dynCall","rawFunction",Q)(g,I)}(C)}return"function"!=typeof g&&VA("unknown function pointer with signature "+A+": "+I),g}var HI=void 0;function qI(A){var I=mg(A),g=xA(I);return bg(I),g}function pI(A,I){var g=[],C={};throw I.forEach((function A(I){C[I]||lA[I]||(YA[I]?YA[I].forEach(A):(g.push(I),C[I]=!0))})),new HI(A+": "+g.map(qI).join([", "]))}function bI(A,I,g,C,B,Q,E,i,o,a,t,D,n){t=xA(t),Q=uI(B,Q),i&&(i=uI(E,i)),a&&(a=uI(o,a)),n=uI(D,n);var e=LA(t);eI(e,(function(){pI("Cannot construct "+t+" due to unbound types",[C])})),pA([A,I,g],C?[C]:[],(function(I){var g,B;I=I[0],B=C?(g=I.registeredClass).instancePrototype:tI.prototype;var E=fA(e,(function(){if(Object.getPrototypeOf(this)!==o)throw new XA("Use 'new' to construct "+t);if(void 0===D.constructor_body)throw new XA(t+" has no accessible constructor");var A=D.constructor_body[arguments.length];if(void 0===A)throw new XA("Tried to invoke ctor of "+t+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(D.constructor_body).toString()+") parameters instead!");return A.apply(this,arguments)})),o=Object.create(B,{constructor:{value:E}});E.prototype=o;var D=new sI(t,E,o,n,g,Q,i,a),s=new LI(t,D,!0,!1,!1),r=new LI(t+"*",D,!1,!1,!1),F=new LI(t+" const*",D,!1,!0,!1);return DI[A]={pointerType:r,constPointerType:F},fI(e,E),[s,r,F]}))}function mI(A,I){for(var g=[],C=0;C<A;C++)g.push(b[(I>>2)+C]);return g}function ZI(A,I,g,C,B,Q){S(I>0);var E=mI(I,g);B=uI(C,B);var i=[Q],o=[];pA([],[A],(function(A){var g="constructor "+(A=A[0]).name;if(void 0===A.registeredClass.constructor_body&&(A.registeredClass.constructor_body=[]),void 0!==A.registeredClass.constructor_body[I-1])throw new XA("Cannot register multiple constructors with identical number of parameters ("+(I-1)+") for class '"+A.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return A.registeredClass.constructor_body[I-1]=function(){pI("Cannot construct "+A.name+" due to unbound types",E)},pA([],E,(function(C){return A.registeredClass.constructor_body[I-1]=function(){arguments.length!==I-1&&VA(g+" called with "+arguments.length+" arguments, expected "+(I-1)),o.length=0,i.length=I;for(var A=1;A<I;++A)i[A]=C[A].toWireType(o,arguments[A-1]);var Q=B.apply(null,i);return kA(o),C[0].fromWireType(Q)},[]})),[]}))}function WI(A,I){if(!(A instanceof Function))throw new TypeError("new_ called with constructor type "+typeof A+" which is not a function");var g=fA(A.name||"unknownFunctionName",(function(){}));g.prototype=A.prototype;var C=new g,B=A.apply(C,I);return B instanceof Object?B:C}function xI(A,I,g,C,B){var Q=I.length;Q<2&&VA("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var E=null!==I[1]&&null!==g,i=!1,o=1;o<I.length;++o)if(null!==I[o]&&void 0===I[o].destructorFunction){i=!0;break}var a="void"!==I[0].name,t="",D="";for(o=0;o<Q-2;++o)t+=(0!==o?", ":"")+"arg"+o,D+=(0!==o?", ":"")+"arg"+o+"Wired";var n="return function "+LA(A)+"("+t+") {\nif (arguments.length !== "+(Q-2)+") {\nthrowBindingError('function "+A+" called with ' + arguments.length + ' arguments, expected "+(Q-2)+" args!');\n}\n";i&&(n+="var destructors = [];\n");var e=i?"destructors":"null",s=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],r=[VA,C,B,kA,I[0],I[1]];for(E&&(n+="var thisWired = classParam.toWireType("+e+", this);\n"),o=0;o<Q-2;++o)n+="var arg"+o+"Wired = argType"+o+".toWireType("+e+", arg"+o+"); // "+I[o+2].name+"\n",s.push("argType"+o),r.push(I[o+2]);if(E&&(D="thisWired"+(D.length>0?", ":"")+D),n+=(a?"var rv = ":"")+"invoker(fn"+(D.length>0?", ":"")+D+");\n",i)n+="runDestructors(destructors);\n";else for(o=E?1:2;o<I.length;++o){var F=1===o?"thisWired":"arg"+(o-2)+"Wired";null!==I[o].destructorFunction&&(n+=F+"_dtor("+F+"); // "+I[o].name+"\n",s.push(F+"_dtor"),r.push(I[o].destructorFunction))}return a&&(n+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),n+="}\n",s.push(n),WI(Function,s).apply(null,r)}function XI(A,I,g,C,B,Q,E,i){var o=mI(g,C);I=xA(I),Q=uI(B,Q),pA([],[A],(function(A){var C=(A=A[0]).name+"."+I;function B(){pI("Cannot call "+C+" due to unbound types",o)}i&&A.registeredClass.pureVirtualFunctions.push(I);var a=A.registeredClass.instancePrototype,t=a[I];return void 0===t||void 0===t.overloadTable&&t.className!==A.name&&t.argCount===g-2?(B.argCount=g-2,B.className=A.name,a[I]=B):(nI(a,I,C),a[I].overloadTable[g-2]=B),pA([],o,(function(B){var i=xI(C,B,A,Q,E);return void 0===a[I].overloadTable?(i.argCount=g-2,a[I]=i):a[I].overloadTable[g-2]=i,[]})),[]}))}var VI=[],vI=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function TI(A){A>4&&0==--vI[A].refcount&&(vI[A]=void 0,VI.push(A))}function jI(){for(var A=0,I=5;I<vI.length;++I)void 0!==vI[I]&&++A;return A}function PI(){for(var A=5;A<vI.length;++A)if(void 0!==vI[A])return vI[A];return null}function OI(){B.count_emval_handles=jI,B.get_first_emval=PI}function zI(A){switch(A){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var I=VI.length?VI.pop():vI.length;return vI[I]={refcount:1,value:A},I}}function _I(A,I){vA(A,{name:I=xA(I),fromWireType:function(A){var I=vI[A].value;return TI(A),I},toWireType:function(A,I){return zI(I)},argPackAdvance:8,readValueFromPointer:JA,destructorFunction:null})}function $I(A){if(null===A)return"null";var I=typeof A;return"object"===I||"array"===I||"function"===I?A.toString():""+A}function Ag(A,I){switch(I){case 2:return function(A){return this.fromWireType(Z[A>>2])};case 3:return function(A){return this.fromWireType(W[A>>3])};default:throw new TypeError("Unknown float type: "+A)}}function Ig(A,I,g){var C=mA(g);vA(A,{name:I=xA(I),fromWireType:function(A){return A},toWireType:function(A,I){if("number"!=typeof I&&"boolean"!=typeof I)throw new TypeError('Cannot convert "'+$I(I)+'" to '+this.name);return I},argPackAdvance:8,readValueFromPointer:Ag(I,C),destructorFunction:null})}function gg(A,I,g,C,B,Q){var E=mI(I,g);A=xA(A),B=uI(C,B),eI(A,(function(){pI("Cannot call "+A+" due to unbound types",E)}),I-1),pA([],E,(function(g){var C=[g[0],null].concat(g.slice(1));return fI(A,xI(A,C,null,B,Q),I-1),[]}))}function Cg(A,I,g){switch(I){case 0:return g?function(A){return u[A]}:function(A){return H[A]};case 1:return g?function(A){return q[A>>1]}:function(A){return p[A>>1]};case 2:return g?function(A){return b[A>>2]}:function(A){return m[A>>2]};default:throw new TypeError("Unknown integer type: "+A)}}function Bg(A,I,g,C,B){I=xA(I),-1===B&&(B=4294967295);var Q=mA(g),E=function(A){return A};if(0===C){var i=32-8*g;E=function(A){return A<<i>>>i}}var o=-1!=I.indexOf("unsigned");vA(A,{name:I,fromWireType:E,toWireType:function(A,g){if("number"!=typeof g&&"boolean"!=typeof g)throw new TypeError('Cannot convert "'+$I(g)+'" to '+this.name);if(g<C||g>B)throw new TypeError('Passing a number "'+$I(g)+'" from JS side to C/C++ side to an argument of type "'+I+'", which is outside the valid range ['+C+", "+B+"]!");return o?g>>>0:0|g},argPackAdvance:8,readValueFromPointer:Cg(I,Q,0!==C),destructorFunction:null})}function Qg(A,I,g){var C=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][I];function B(A){var I=m,g=I[A>>=2],B=I[A+1];return new C(I.buffer,B,g)}vA(A,{name:g=xA(g),fromWireType:B,argPackAdvance:8,readValueFromPointer:B},{ignoreDuplicateRegistrations:!0})}function Eg(A,I){var g="std::string"===(I=xA(I));vA(A,{name:I,fromWireType:function(A){var I,C=m[A>>2];if(g){var B=H[A+4+C],Q=0;0!=B&&(Q=B,H[A+4+C]=0);for(var E=A+4,i=0;i<=C;++i){var o=A+4+i;if(0==H[o]){var a=l(E);void 0===I?I=a:(I+=String.fromCharCode(0),I+=a),E=o+1}}0!=Q&&(H[A+4+C]=Q)}else{var t=new Array(C);for(i=0;i<C;++i)t[i]=String.fromCharCode(H[A+4+i]);I=t.join("")}return bg(A),I},toWireType:function(A,I){I instanceof ArrayBuffer&&(I=new Uint8Array(I));var C="string"==typeof I;C||I instanceof Uint8Array||I instanceof Uint8ClampedArray||I instanceof Int8Array||VA("Cannot pass non-string to std::string");var B=(g&&C?function(){return M(I)}:function(){return I.length})(),Q=qg(4+B+1);if(m[Q>>2]=B,g&&C)d(I,Q+4,B+1);else if(C)for(var E=0;E<B;++E){var i=I.charCodeAt(E);i>255&&(bg(Q),VA("String has UTF-16 code units that do not fit in 8 bits")),H[Q+4+E]=i}else for(E=0;E<B;++E)H[Q+4+E]=I[E];return null!==A&&A.push(bg,Q),Q},argPackAdvance:8,readValueFromPointer:JA,destructorFunction:function(A){bg(A)}})}function ig(A,I,g){var C,B;g=xA(g),2===I?(C=function(){return p},B=1):4===I&&(C=function(){return m},B=2),vA(A,{name:g,fromWireType:function(A){for(var I=C(),g=m[A>>2],Q=new Array(g),E=A+4>>B,i=0;i<g;++i)Q[i]=String.fromCharCode(I[E+i]);return bg(A),Q.join("")},toWireType:function(A,g){var Q=g.length,E=qg(4+Q*I),i=C();m[E>>2]=Q;for(var o=E+4>>B,a=0;a<Q;++a)i[o+a]=g.charCodeAt(a);return null!==A&&A.push(bg,E),E},argPackAdvance:8,readValueFromPointer:JA,destructorFunction:function(A){bg(A)}})}function og(A,I,g,C,B,Q){UA[A]={name:xA(I),rawConstructor:uI(g,C),rawDestructor:uI(B,Q),fields:[]}}function ag(A,I,g,C,B,Q,E,i,o,a){UA[A].fields.push({fieldName:xA(I),getterReturnType:g,getter:uI(C,B),getterContext:Q,setterArgumentType:E,setter:uI(i,o),setterContext:a})}function tg(A,I){vA(A,{isVoid:!0,name:I=xA(I),argPackAdvance:0,fromWireType:function(){},toWireType:function(A,I){}})}var Dg={};function ng(A){var I=Dg[A];return void 0===I?xA(A):I}function eg(){return"object"==typeof globalThis?globalThis:Function("return this")()}function sg(A){return 0===A?zI(eg()):(A=ng(A),zI(eg()[A]))}function rg(A){A>4&&(vI[A].refcount+=1)}function Fg(A,I){var g=lA[A];return void 0===g&&VA(I+" has unknown type "+qI(A)),g}function wg(A){for(var I="",g=0;g<A;++g)I+=(0!==g?", ":"")+"arg"+g;var C="return function emval_allocator_"+A+"(constructor, argTypes, args) {\n";for(g=0;g<A;++g)C+="var argType"+g+" = requireRegisteredType(Module['HEAP32'][(argTypes >> 2) + "+g+'], "parameter '+g+'");\nvar arg'+g+" = argType"+g+".readValueFromPointer(args);\nargs += argType"+g+"['argPackAdvance'];\n";return C+="var obj = new constructor("+I+");\nreturn __emval_register(obj);\n}\n",new Function("requireRegisteredType","Module","__emval_register",C)(Fg,B,zI)}var cg={};function hg(A){return A||VA("Cannot use deleted val. handle = "+A),vI[A].value}function yg(A,I,g,C){A=hg(A);var B=cg[I];return B||(B=wg(I),cg[I]=B),B(A,g,C)}function Gg(A,I){return zI((A=Fg(A,"_emval_take_value")).readValueFromPointer(I))}function Ng(){nA()}function Rg(){return u.length}function Sg(){return 46048}function Ug(A,I,g){H.set(H.subarray(I,I+g),A)}function kg(A){try{return y.grow(A-f.byteLength+65535>>16),V(y.buffer),1}catch(A){}}function Jg(A){var I=Rg(),g=65536,C=2147418112;if(A>C)return!1;for(var B=Math.max(I,16777216);B<A;)B=B<=536870912?X(2*B,g):Math.min(X((3*B+2147483648)/4,g),C);return!!kg(B)}var Kg={buffers:[null,[],[]],printChar:function(A,I){var g=Kg.buffers[A];0===I||10===I?((1===A?w:c)(K(g,0)),g.length=0):g.push(I)},varargs:0,get:function(A){return Kg.varargs+=4,b[Kg.varargs-4>>2]},getStr:function(){return l(Kg.get())},get64:function(){var A=Kg.get();return Kg.get(),A},getZero:function(){Kg.get()}};function lg(A){try{return 0}catch(A){return"undefined"!=typeof FS&&A instanceof FS.ErrnoError||nA(A),A.errno}}function Yg(A,I,g,C,B){try{return 0}catch(A){return"undefined"!=typeof FS&&A instanceof FS.ErrnoError||nA(A),A.errno}}function dg(A,I,g,C){try{for(var B=0,Q=0;Q<g;Q++){for(var E=b[I+8*Q>>2],i=b[I+(8*Q+4)>>2],o=0;o<i;o++)Kg.printChar(A,H[E+o]);B+=i}return b[C>>2]=B,0}catch(A){return"undefined"!=typeof FS&&A instanceof FS.ErrnoError||nA(A),A.errno}}function Mg(A){G(0|A)}HA=B.InternalError=uA(Error,"InternalError"),ZA(),XA=B.BindingError=uA(Error,"BindingError"),aI(),MI(),kI(),HI=B.UnboundTypeError=uA(Error,"UnboundTypeError"),OI();var Lg={__cxa_allocate_exception:hA,__cxa_atexit:GA,__cxa_thread_atexit:NA,__cxa_throw:SA,_embind_finalize_value_object:bA,_embind_register_bool:TA,_embind_register_class:bI,_embind_register_class_constructor:ZI,_embind_register_class_function:XI,_embind_register_emval:_I,_embind_register_float:Ig,_embind_register_function:gg,_embind_register_integer:Bg,_embind_register_memory_view:Qg,_embind_register_std_string:Eg,_embind_register_std_wstring:ig,_embind_register_value_object:og,_embind_register_value_object_field:ag,_embind_register_void:tg,_emval_decref:TI,_emval_get_global:sg,_emval_incref:rg,_emval_new:yg,_emval_take_value:Gg,abort:Ng,emscripten_get_sbrk_ptr:Sg,emscripten_memcpy_big:Ug,emscripten_resize_heap:Jg,fd_close:lg,fd_seek:Yg,fd_write:dg,memory:y,setTempRet0:Mg,table:N},fg=cA();B.asm=fg;var ug,Hg=B.___wasm_call_ctors=function(){return B.asm.__wasm_call_ctors.apply(null,arguments)},qg=B._malloc=function(){return B.asm.malloc.apply(null,arguments)},pg=(B._setThrew=function(){return B.asm.setThrew.apply(null,arguments)},B.__ZSt18uncaught_exceptionv=function(){return B.asm._ZSt18uncaught_exceptionv.apply(null,arguments)}),bg=B._free=function(){return B.asm.free.apply(null,arguments)},mg=B.___getTypeName=function(){return B.asm.__getTypeName.apply(null,arguments)},Zg=(B.___embind_register_native_and_builtin_types=function(){return B.asm.__embind_register_native_and_builtin_types.apply(null,arguments)},B.stackSave=function(){return B.asm.stackSave.apply(null,arguments)}),Wg=B.stackAlloc=function(){return B.asm.stackAlloc.apply(null,arguments)},xg=B.stackRestore=function(){return B.asm.stackRestore.apply(null,arguments)};function Xg(A){this.name="ExitStatus",this.message="Program terminated with exit("+A+")",this.status=A}function Vg(A){function I(){ug||(ug=!0,R||(gA(),CA(),B.onRuntimeInitialized&&B.onRuntimeInitialized(),BA()))}A=A||E,iA>0||(IA(),iA>0||(B.setStatus?(B.setStatus("Running..."),setTimeout((function(){setTimeout((function(){B.setStatus("")}),1),I()}),1)):I()))}if(B.__growWasmMemory=function(){return B.asm.__growWasmMemory.apply(null,arguments)},B.dynCall_i=function(){return B.asm.dynCall_i.apply(null,arguments)},B.dynCall_vi=function(){return B.asm.dynCall_vi.apply(null,arguments)},B.dynCall_iii=function(){return B.asm.dynCall_iii.apply(null,arguments)},B.dynCall_viii=function(){return B.asm.dynCall_viii.apply(null,arguments)},B.dynCall_ii=function(){return B.asm.dynCall_ii.apply(null,arguments)},B.dynCall_iiii=function(){return B.asm.dynCall_iiii.apply(null,arguments)},B.dynCall_vii=function(){return B.asm.dynCall_vii.apply(null,arguments)},B.dynCall_viiii=function(){return B.asm.dynCall_viiii.apply(null,arguments)},B.dynCall_v=function(){return B.asm.dynCall_v.apply(null,arguments)},B.dynCall_iidiiii=function(){return B.asm.dynCall_iidiiii.apply(null,arguments)},B.dynCall_jiji=function(){return B.asm.dynCall_jiji.apply(null,arguments)},B.dynCall_viiiiii=function(){return B.asm.dynCall_viiiiii.apply(null,arguments)},B.dynCall_viiiii=function(){return B.asm.dynCall_viiiii.apply(null,arguments)},B.asm=fg,B.ccall=k,B.then=function(A){if(ug)A(B);else{var I=B.onRuntimeInitialized;B.onRuntimeInitialized=function(){I&&I(),A(B)}}return B},aA=function A(){ug||Vg(),ug||(aA=A)},B.run=Vg,B.preInit)for("function"==typeof B.preInit&&(B.preInit=[B.preInit]);B.preInit.length>0;)B.preInit.pop()();return Vg(),A});A.exports=B},9400:(A,I,g)=>{var C,B=(C=(C="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(A){var I,B=void 0!==(A=A||{})?A:{},Q={};for(I in B)B.hasOwnProperty(I)&&(Q[I]=B[I]);var E=[],i="./this.program",o=function(A,I){throw I},a=!1,t=!1,D=!1,n=!1;a="object"==typeof window,t="function"==typeof importScripts,D="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&!a&&!t,n=!a&&!D&&!t;var e,s,r,F,w="";function c(A){return B.locateFile?B.locateFile(A,w):w+A}D?(w="//",e=function(A,I){return r||(r=g(1973)),F||(F=g(378)),A=F.normalize(A),r.readFileSync(A,I?null:"utf8")},s=function(A){var I=e(A,!0);return I.buffer||(I=new Uint8Array(I)),l(I.buffer),I},process.argv.length>1&&(i=process.argv[1].replace(/\\/g,"/")),E=process.argv.slice(2),process.on("uncaughtException",(function(A){if(!(A instanceof cC))throw A})),process.on("unhandledRejection",hA),o=function(A){process.exit(A)},B.inspect=function(){return"[Emscripten Module object]"}):n?("undefined"!=typeof read&&(e=function(A){return read(A)}),s=function(A){var I;return"function"==typeof readbuffer?new Uint8Array(readbuffer(A)):(l("object"==typeof(I=read(A,"binary"))),I)},"undefined"!=typeof scriptArgs?E=scriptArgs:void 0!==arguments&&(E=arguments),"function"==typeof quit&&(o=function(A){quit(A)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(a||t)&&(t?w=self.location.href:document.currentScript&&(w=document.currentScript.src),C&&(w=C),w=0!==w.indexOf("blob:")?w.substr(0,w.lastIndexOf("/")+1):"",e=function(A){var I=new XMLHttpRequest;return I.open("GET",A,!1),I.send(null),I.responseText},t&&(s=function(A){var I=new XMLHttpRequest;return I.open("GET",A,!1),I.responseType="arraybuffer",I.send(null),new Uint8Array(I.response)}));var h=B.print||console.log.bind(console),y=B.printErr||console.warn.bind(console);for(I in Q)Q.hasOwnProperty(I)&&(B[I]=Q[I]);Q=null,B.arguments&&(E=B.arguments),B.thisProgram&&(i=B.thisProgram),B.quit&&(o=B.quit);var G,N,R,S=0,U=function(A){S=A},k=function(){return S};B.wasmBinary&&(G=B.wasmBinary),B.noExitRuntime&&(N=B.noExitRuntime),"object"!=typeof WebAssembly&&y("no native wasm support detected");var J=new WebAssembly.Table({initial:204,maximum:204,element:"anyfunc"}),K=!1;function l(A,I){A||hA("Assertion failed: "+I)}function Y(A){var I=B["_"+A];return l(I,"Cannot call unknown function "+A+", make sure it is exported"),I}function d(A,I,g,C,B){var Q={string:function(A){var I=0;if(null!=A&&0!==A){var g=1+(A.length<<2);H(A,I=DC(g),g)}return I},array:function(A){var I=DC(A.length);return p(A,I),I}},E=Y(A),i=[],o=0;if(C)for(var a=0;a<C.length;a++){var t=Q[g[a]];t?(0===o&&(o=tC()),i[a]=t(C[a])):i[a]=C[a]}var D=E.apply(null,i);return D=function(A){return"string"===I?f(A):"boolean"===I?Boolean(A):A}(D),0!==o&&nC(o),D}var M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function L(A,I,g){for(var C=I+g,B=I;A[B]&&!(B>=C);)++B;if(B-I>16&&A.subarray&&M)return M.decode(A.subarray(I,B));for(var Q="";I<B;){var E=A[I++];if(128&E){var i=63&A[I++];if(192!=(224&E)){var o=63&A[I++];if((E=224==(240&E)?(15&E)<<12|i<<6|o:(7&E)<<18|i<<12|o<<6|63&A[I++])<65536)Q+=String.fromCharCode(E);else{var a=E-65536;Q+=String.fromCharCode(55296|a>>10,56320|1023&a)}}else Q+=String.fromCharCode((31&E)<<6|i)}else Q+=String.fromCharCode(E)}return Q}function f(A,I){return A?L(W,A,I):""}function u(A,I,g,C){if(!(C>0))return 0;for(var B=g,Q=g+C-1,E=0;E<A.length;++E){var i=A.charCodeAt(E);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&A.charCodeAt(++E)),i<=127){if(g>=Q)break;I[g++]=i}else if(i<=2047){if(g+1>=Q)break;I[g++]=192|i>>6,I[g++]=128|63&i}else if(i<=65535){if(g+2>=Q)break;I[g++]=224|i>>12,I[g++]=128|i>>6&63,I[g++]=128|63&i}else{if(g+3>=Q)break;I[g++]=240|i>>18,I[g++]=128|i>>12&63,I[g++]=128|i>>6&63,I[g++]=128|63&i}}return I[g]=0,g-B}function H(A,I,g){return u(A,W,I,g)}function q(A){for(var I=0,g=0;g<A.length;++g){var C=A.charCodeAt(g);C>=55296&&C<=57343&&(C=65536+((1023&C)<<10)|1023&A.charCodeAt(++g)),C<=127?++I:I+=C<=2047?2:C<=65535?3:4}return I}function p(A,I){Z.set(A,I)}function b(A,I,g){for(var C=0;C<A.length;++C)Z[I++>>0]=A.charCodeAt(C);g||(Z[I>>0]=0)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var m,Z,W,x,X,V,v,T,j,P=65536;function O(A,I){return A%I>0&&(A+=I-A%I),A}function z(A){m=A,B.HEAP8=Z=new Int8Array(A),B.HEAP16=x=new Int16Array(A),B.HEAP32=V=new Int32Array(A),B.HEAPU8=W=new Uint8Array(A),B.HEAPU16=X=new Uint16Array(A),B.HEAPU32=v=new Uint32Array(A),B.HEAPF32=T=new Float32Array(A),B.HEAPF64=j=new Float64Array(A)}var _=5258768,$=15728,AA=B.TOTAL_MEMORY||1073741824;function IA(A){for(;A.length>0;){var I=A.shift();if("function"!=typeof I){var g=I.func;"number"==typeof g?void 0===I.arg?B.dynCall_v(g):B.dynCall_vi(g,I.arg):g(void 0===I.arg?null:I.arg)}else I()}}(R=B.wasmMemory?B.wasmMemory:new WebAssembly.Memory({initial:AA/P}))&&(m=R.buffer),AA=m.byteLength,z(m),V[$>>2]=_;var gA=[],CA=[],BA=[],QA=[],EA=[];function iA(){if(B.preRun)for("function"==typeof B.preRun&&(B.preRun=[B.preRun]);B.preRun.length;)nA(B.preRun.shift());IA(gA)}function oA(){IA(CA)}function aA(){IA(BA)}function tA(){}function DA(){if(B.postRun)for("function"==typeof B.postRun&&(B.postRun=[B.postRun]);B.postRun.length;)eA(B.postRun.shift());IA(EA)}function nA(A){gA.unshift(A)}function eA(A){EA.unshift(A)}Math.abs,Math.ceil,Math.floor,Math.min;var sA=0,rA=null,FA=null;function wA(A){sA++,B.monitorRunDependencies&&B.monitorRunDependencies(sA)}function cA(A){if(sA--,B.monitorRunDependencies&&B.monitorRunDependencies(sA),0==sA&&(null!==rA&&(clearInterval(rA),rA=null),FA)){var I=FA;FA=null,I()}}function hA(A){throw B.onAbort&&B.onAbort(A),h(A+=""),y(A),K=!0,A="abort("+A+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(A)}B.preloadedImages={},B.preloadedAudios={};var yA="data:application/octet-stream;base64,";function GA(A){return String.prototype.startsWith?A.startsWith(yA):0===A.indexOf(yA)}var NA="libjpegturbowasm_decode.wasm";function RA(){try{if(G)return new Uint8Array(G);if(s)return s(NA);throw"both async and sync fetching of the wasm failed"}catch(A){hA(A)}}function SA(){return G||!a&&!t||"function"!=typeof fetch?new Promise((function(A,I){A(RA())})):fetch(NA,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+NA+"'";return A.arrayBuffer()})).catch((function(){return RA()}))}function UA(){var A={env:Pg,wasi_snapshot_preview1:Pg};function I(A,I){var g=A.exports;B.asm=g,cA()}function g(A){I(A.instance)}function C(I){return SA().then((function(I){return WebAssembly.instantiate(I,A)})).then(I,(function(A){y("failed to asynchronously prepare wasm: "+A),hA(A)}))}if(wA(),B.instantiateWasm)try{return B.instantiateWasm(A,I)}catch(A){return y("Module.instantiateWasm callback failed with error: "+A),!1}return function(){if(G||"function"!=typeof WebAssembly.instantiateStreaming||GA(NA)||"function"!=typeof fetch)return C(g);fetch(NA,{credentials:"same-origin"}).then((function(I){return WebAssembly.instantiateStreaming(I,A).then(g,(function(A){y("wasm streaming compile failed: "+A),y("falling back to ArrayBuffer instantiation"),C(g)}))}))}(),{}}function kA(A){return $g(A)}function JA(A,I){QA.unshift({func:A,arg:I})}function KA(){return JA.apply(null,arguments)}GA(NA)||(NA=c(NA)),CA.push({func:function(){_g()}});var lA={};function YA(A,I,g){throw lA[A]={ptr:A,adjusted:[A],type:I,destructor:g,refcount:0,caught:!1,rethrown:!1},"uncaught_exception"in CC?CC.uncaught_exceptions++:CC.uncaught_exceptions=1,A}var dA={};function MA(A){for(;A.length;){var I=A.pop();A.pop()(I)}}function LA(A){return this.fromWireType(v[A>>2])}var fA={},uA={},HA={},qA=48,pA=57;function bA(A){if(void 0===A)return"_unknown";var I=(A=A.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return I>=qA&&I<=pA?"_"+A:A}function mA(A,I){return A=bA(A),new Function("body","return function "+A+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(I)}function ZA(A,I){var g=mA(I,(function(A){this.name=I,this.message=A;var g=new Error(A).stack;void 0!==g&&(this.stack=this.toString()+"\n"+g.replace(/^Error(:[^\n]*)?\n/,""))}));return g.prototype=Object.create(A.prototype),g.prototype.constructor=g,g.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},g}var WA=void 0;function xA(A){throw new WA(A)}function XA(A,I,g){function C(I){var C=g(I);C.length!==A.length&&xA("Mismatched type converter count");for(var B=0;B<A.length;++B)_A(A[B],C[B])}A.forEach((function(A){HA[A]=I}));var B=new Array(I.length),Q=[],E=0;I.forEach((function(A,I){uA.hasOwnProperty(A)?B[I]=uA[A]:(Q.push(A),fA.hasOwnProperty(A)||(fA[A]=[]),fA[A].push((function(){B[I]=uA[A],++E===Q.length&&C(B)})))})),0===Q.length&&C(B)}function VA(A){var I=dA[A];delete dA[A];var g=I.rawConstructor,C=I.rawDestruc