@cornerstonejs/dicom-image-loader 2.1.9 → 2.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/codecs/jpeg.d.ts +29 -1
- package/dist/esm/codecs/jpeg.js +820 -825
- package/dist/esm/codecs/jpegLossless.d.ts +2 -7
- package/dist/esm/codecs/jpegLossless.js +1 -0
- package/dist/esm/shared/decoders/decodeJPEGBaseline12Bit-js.js +5 -3
- package/package.json +4 -5
- package/dist/dynamic-import/031089e563a18ada8441.wasm +0 -0
- package/dist/dynamic-import/20fc4c659b85ccd2a9c0.wasm +0 -0
- package/dist/dynamic-import/5004fdc02f329ce53b69.wasm +0 -0
- package/dist/dynamic-import/54.min.js +0 -2
- package/dist/dynamic-import/54.min.js.map +0 -1
- package/dist/dynamic-import/548.min.js +0 -2
- package/dist/dynamic-import/548.min.js.map +0 -1
- package/dist/dynamic-import/918.min.js +0 -2
- package/dist/dynamic-import/918.min.js.map +0 -1
- package/dist/dynamic-import/958.min.js +0 -3
- package/dist/dynamic-import/958.min.js.LICENSE.txt +0 -5
- package/dist/dynamic-import/958.min.js.map +0 -1
- package/dist/dynamic-import/c22b37c3488e1d6c3aa4.wasm +0 -0
- package/dist/dynamic-import/cornerstoneDICOMImageLoader.min.js +0 -2
- package/dist/dynamic-import/cornerstoneDICOMImageLoader.min.js.map +0 -1
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 958.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk=this.webpackChunk||[]).push([[958],{37:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c=Object.assign({},i),l=[],f="object"==typeof window,p="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,d="";if(h){var v=r(716),y=r(401);d=p?y.dirname(d)+"/":"//",a=(t,e)=>(t=B(t)?new URL(t):y.normalize(t),v.readFileSync(t,e?void 0:"utf8")),u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{t=B(t)?new URL(t):y.normalize(t),v.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),l=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof G))throw t})),process.on("unhandledRejection",(function(t){throw t})),i.inspect=function(){return"[Emscripten Module object]"}}else(f||p)&&(p?d=self.location.href:"undefined"!=typeof document&&document.currentScript&&(d=document.currentScript.src),n&&(d=n),d=0!==d.indexOf("blob:")?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},p&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});i.print||console.log.bind(console);var m,g=i.printErr||console.warn.bind(console);Object.assign(i,c),c=null,i.arguments&&(l=i.arguments),i.thisProgram&&i.thisProgram,i.quit&&i.quit,i.wasmBinary&&(m=i.wasmBinary);var w;i.noExitRuntime;"object"!=typeof WebAssembly&&L("no native wasm support detected");var b,T,C,$,P,_,A,E,k,S=!1,W="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function R(t,e){return t?function(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&W)return W.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}(C,t,e):""}function j(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,C,e,r)}function F(t){b=t,i.HEAP8=T=new Int8Array(t),i.HEAP16=$=new Int16Array(t),i.HEAP32=_=new Int32Array(t),i.HEAPU8=C=new Uint8Array(t),i.HEAPU16=P=new Uint16Array(t),i.HEAPU32=A=new Uint32Array(t),i.HEAPF32=E=new Float32Array(t),i.HEAPF64=k=new Float64Array(t)}i.INITIAL_MEMORY;var O,x,D,U=[],I=[],H=[],M=0,V=null,z=null;function L(t){i.onAbort&&i.onAbort(t),g(t="Aborted("+t+")"),S=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}function N(t){return t.startsWith("data:application/octet-stream;base64,")}function B(t){return t.startsWith("file://")}function q(t){try{if(t==x&&m)return new Uint8Array(m);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){L(t)}}function G(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function X(t){for(;t.length>0;)t.shift()(i)}function Y(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){A[this.ptr+4>>2]=t},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(t){A[this.ptr+8>>2]=t},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_refcount=function(t){_[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,T[this.ptr+12|0]=t},this.get_caught=function(){return 0!=T[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,T[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=T[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=_[this.ptr>>2];_[this.ptr>>2]=t+1},this.release_ref=function(){var t=_[this.ptr>>2];return _[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){A[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Fe(this.get_type()))return A[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}N(x="charlswasm_decode.wasm")||(D=x,x=i.locateFile?i.locateFile(D,d):d+D);var J={};function Z(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function Q(t){return this.fromWireType(_[t>>2])}var K={},tt={},et={};function rt(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=48&&e<=57?"_"+t:t}function nt(t,e){return t=rt(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function ot(t,e){var r=nt(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var it=void 0;function at(t){throw new it(t)}function st(t,e,r){function n(e){var n=r(e);n.length!==t.length&&at("Mismatched type converter count");for(var o=0;o<t.length;++o)ht(t[o],n[o])}t.forEach((function(t){et[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{tt.hasOwnProperty(t)?o[e]=tt[t]:(i.push(t),K.hasOwnProperty(t)||(K[t]=[]),K[t].push((()=>{o[e]=tt[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function ut(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var ct=void 0;function lt(t){for(var e="",r=t;C[r];)e+=ct[C[r++]];return e}var ft=void 0;function pt(t){throw new ft(t)}function ht(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||pt('type "'+n+'" must have a positive integer typeid pointer'),tt.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;pt("Cannot register type '"+n+"' twice")}if(tt[t]=e,delete et[t],K.hasOwnProperty(t)){var o=K[t];delete K[t],o.forEach((t=>t()))}}function dt(t){if(!(this instanceof Dt))return!1;if(!(t instanceof Dt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function vt(t){pt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var yt=!1;function mt(t){}function gt(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function wt(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=wt(t,e,r.baseClass);return null===n?null:r.downcast(n)}var bt={};function Tt(){return Object.keys(Et).length}function Ct(){var t=[];for(var e in Et)Et.hasOwnProperty(e)&&t.push(Et[e]);return t}var $t=[];function Pt(){for(;$t.length;){var t=$t.pop();t.$$.deleteScheduled=!1,t.delete()}}var _t=void 0;function At(t){_t=t,$t.length&&_t&&_t(Pt)}var Et={};function kt(t,e){return e=function(t,e){for(void 0===e&&pt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Et[e]}function St(t,e){return e.ptrType&&e.ptr||at("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&at("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Rt(Object.create(t,{$$:{value:e}}))}function Wt(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=kt(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?St(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):St(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=bt[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=wt(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?St(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):St(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Rt(t){return"undefined"==typeof FinalizationRegistry?(Rt=t=>t,t):(yt=new FinalizationRegistry((t=>{gt(t.$$)})),Rt=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};yt.register(t,r,t)}return t},mt=t=>yt.unregister(t),Rt(t))}function jt(){if(this.$$.ptr||vt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Rt(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Ft(){this.$$.ptr||vt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&pt("Object already scheduled for deletion"),mt(this),gt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Ot(){return!this.$$.ptr}function xt(){return this.$$.ptr||vt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&pt("Object already scheduled for deletion"),$t.push(this),1===$t.length&&_t&&_t(Pt),this.$$.deleteScheduled=!0,this}function Dt(){}function Ut(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||pt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function It(t,e,r){i.hasOwnProperty(t)?((void 0===r||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[r])&&pt("Cannot register public name '"+t+"' twice"),Ut(i,t,t),i.hasOwnProperty(r)&&pt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[t].overloadTable[r]=e):(i[t]=e,void 0!==r&&(i[t].numArguments=r))}function Ht(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Mt(t,e,r){for(;e!==r;)e.upcast||pt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Vt(t,e){if(null===e)return this.isReference&&pt("null is not a valid "+this.name),0;e.$$||pt('Cannot pass "'+le(e)+'" as a '+this.name),e.$$.ptr||pt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Mt(e.$$.ptr,r,this.registeredClass)}function zt(t,e){var r;if(null===e)return this.isReference&&pt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||pt('Cannot pass "'+le(e)+'" as a '+this.name),e.$$.ptr||pt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&pt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=Mt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&pt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:pt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,ce.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:pt("Unsupporting sharing policy")}return r}function Lt(t,e){if(null===e)return this.isReference&&pt("null is not a valid "+this.name),0;e.$$||pt('Cannot pass "'+le(e)+'" as a '+this.name),e.$$.ptr||pt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&pt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Mt(e.$$.ptr,r,this.registeredClass)}function Nt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Bt(t){this.rawDestructor&&this.rawDestructor(t)}function qt(t){null!==t&&t.delete()}function Gt(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=zt:n?(this.toWireType=Vt,this.destructorFunction=null):(this.toWireType=Lt,this.destructorFunction=null)}function Xt(t,e,r){i.hasOwnProperty(t)||at("Replacing nonexistant public symbol"),void 0!==i[t].overloadTable&&void 0!==r?i[t].overloadTable[r]=e:(i[t]=e,i[t].argCount=r)}var Yt=[];function Jt(t){var e=Yt[t];return e||(t>=Yt.length&&(Yt.length=t+1),Yt[t]=e=O.get(t)),e}function Zt(t,e,r){return t.includes("j")?function(t,e,r){var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):Jt(e).apply(null,r)}function Qt(t,e){var r,n,o,i=(t=lt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),Zt(r,n,o)}):Jt(e);return"function"!=typeof i&&pt("unknown function pointer with signature "+t+": "+e),i}var Kt=void 0;function te(t){var e=ke(t),r=lt(e);return Se(e),r}function ee(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||tt[e]||(et[e]?et[e].forEach(t):(r.push(e),n[e]=!0))})),new Kt(t+": "+r.map(te).join([", "]))}function re(t,e){for(var r=[],n=0;n<t;n++)r.push(A[e+4*n>>2]);return r}function ne(t,e,r,n,o){var i=e.length;i<2&&pt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+rt(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var h=s?"destructors":"null",d=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[pt,n,o,Z,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+e[u+2].name+"\n",d.push("argType"+u),v.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var y=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=y+"_dtor("+y+"); // "+e[u].name+"\n",d.push(y+"_dtor"),v.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",d.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=nt(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,d).apply(null,v)}var oe=[],ie=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function ae(t){t>4&&0==--ie[t].refcount&&(ie[t]=void 0,oe.push(t))}function se(){for(var t=0,e=5;e<ie.length;++e)void 0!==ie[e]&&++t;return t}function ue(){for(var t=5;t<ie.length;++t)if(void 0!==ie[t])return ie[t];return null}var ce={toValue:t=>(t||pt("Cannot use deleted val. handle = "+t),ie[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=oe.length?oe.pop():ie.length;return ie[e]={refcount:1,value:t},e}}};function le(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function fe(t,e){switch(e){case 2:return function(t){return this.fromWireType(E[t>>2])};case 3:return function(t){return this.fromWireType(k[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function pe(t,e,r){switch(e){case 0:return r?function(t){return T[t]}:function(t){return C[t]};case 1:return r?function(t){return $[t>>1]}:function(t){return P[t>>1]};case 2:return r?function(t){return _[t>>2]}:function(t){return A[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var he="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function de(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&P[n];)++n;if((r=n<<1)-t>32&&he)return he.decode(C.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=$[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function ve(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);$[e>>1]=a,e+=2}return $[e>>1]=0,e-n}function ye(t){return 2*t.length}function me(t,e){for(var r=0,n="";!(r>=e/4);){var o=_[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function ge(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),_[e>>2]=a,(e+=4)+4>o)break}return _[e>>2]=0,e-n}function we(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}var be={};function Te(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Ce(t,e){var r=tt[t];return void 0===r&&pt(e+" has unknown type "+te(t)),r}var $e={};function Pe(t){try{return w.grow(t-b.byteLength+65535>>>16),F(w.buffer),1}catch(t){}}it=i.InternalError=ot(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);ct=t}(),ft=i.BindingError=ot(Error,"BindingError"),Dt.prototype.isAliasOf=dt,Dt.prototype.clone=jt,Dt.prototype.delete=Ft,Dt.prototype.isDeleted=Ot,Dt.prototype.deleteLater=xt,i.getInheritedInstanceCount=Tt,i.getLiveInheritedInstances=Ct,i.flushPendingDeletes=Pt,i.setDelayFunction=At,Gt.prototype.getPointee=Nt,Gt.prototype.destructor=Bt,Gt.prototype.argPackAdvance=8,Gt.prototype.readValueFromPointer=Q,Gt.prototype.deleteObject=qt,Gt.prototype.fromWireType=Wt,Kt=i.UnboundTypeError=ot(Error,"UnboundTypeError"),i.count_emval_handles=se,i.get_first_emval=ue;var _e,Ae={h:function(t,e,r){throw new Y(t).init(e,r),t},q:function(t){var e=J[t];delete J[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;st([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),Z(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:Q,destructorFunction:n}]}))},r:function(t,e,r,n,o){},w:function(t,e,r,n,o){var i=ut(r);ht(t,{name:e=lt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=T;else if(2===r)n=$;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=_}return this.fromWireType(n[t>>i])},destructorFunction:null})},p:function(t,e,r,n,o,i,a,s,u,c,l,f,p){l=lt(l),i=Qt(o,i),s&&(s=Qt(a,s)),c&&(c=Qt(u,c)),p=Qt(f,p);var h=rt(l);It(h,(function(){ee("Cannot construct "+l+" due to unbound types",[n])})),st([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Dt.prototype;var a=nt(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new ft("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new ft(l+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new ft("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),u=Object.create(o,{constructor:{value:a}});a.prototype=u;var f=new Ht(l,a,u,p,r,i,s,c),d=new Gt(l,f,!0,!1,!1),v=new Gt(l+"*",f,!1,!1,!1),y=new Gt(l+" const*",f,!1,!0,!1);return bt[t]={pointerType:v,constPointerType:y},Xt(h,a),[d,v,y]}))},o:function(t,e,r,n,o,i){var a;e>0||L(a);var s=re(e,r);o=Qt(n,o),st([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new ft("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{ee("Cannot construct "+t.name+" due to unbound types",s)},st([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=ne(r,n,null,o,i),[]})),[]}))},c:function(t,e,r,n,o,i,a,s){var u=re(r,n);e=lt(e),i=Qt(o,i),st([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){ee("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(Ut(c,e,n),c[e].overloadTable[r-2]=o),st([],u,(function(o){var s=ne(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},v:function(t,e){ht(t,{name:e=lt(e),fromWireType:function(t){var e=ce.toValue(t);return ae(t),e},toWireType:function(t,e){return ce.toHandle(e)},argPackAdvance:8,readValueFromPointer:Q,destructorFunction:null})},k:function(t,e,r){var n=ut(r);ht(t,{name:e=lt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:fe(e,n),destructorFunction:null})},e:function(t,e,r,n,o,i){var a=re(e,r);t=lt(t),o=Qt(n,o),It(t,(function(){ee("Cannot call "+t+" due to unbound types",a)}),e-1),st([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return Xt(t,ne(t,n,null,o,i),e-1),[]}))},b:function(t,e,r,n,o){e=lt(e),-1===o&&(o=4294967295);var i=ut(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");ht(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:pe(e,i,0!==n),destructorFunction:null})},a:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=A,r=e[t>>=2],o=e[t+1];return new n(b,o,r)}ht(t,{name:r=lt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},j:function(t,e){var r="std::string"===(e=lt(e));ht(t,{name:e,fromWireType:function(t){var e,n=A[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==C[s]){var u=R(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(C[o+a]);e=c.join("")}return Se(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||pt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=Ee(4+n+1),a=i+4;if(A[i>>2]=n,r&&o)j(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(Se(a),pt("String has UTF-16 code units that do not fit in 8 bits")),C[a+s]=u}else for(s=0;s<n;++s)C[a+s]=e[s];return null!==t&&t.push(Se,i),i},argPackAdvance:8,readValueFromPointer:Q,destructorFunction:function(t){Se(t)}})},g:function(t,e,r){var n,o,i,a,s;r=lt(r),2===e?(n=de,o=ve,a=ye,i=()=>P,s=1):4===e&&(n=me,o=ge,a=we,i=()=>A,s=2),ht(t,{name:r,fromWireType:function(t){for(var r,o=A[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return Se(t),r},toWireType:function(t,n){"string"!=typeof n&&pt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=Ee(4+i+e);return A[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(Se,u),u},argPackAdvance:8,readValueFromPointer:Q,destructorFunction:function(t){Se(t)}})},u:function(t,e,r,n,o,i){J[t]={name:lt(e),rawConstructor:Qt(r,n),rawDestructor:Qt(o,i),fields:[]}},d:function(t,e,r,n,o,i,a,s,u,c){J[t].fields.push({fieldName:lt(e),getterReturnType:r,getter:Qt(n,o),getterContext:i,setterArgumentType:a,setter:Qt(s,u),setterContext:c})},x:function(t,e){ht(t,{isVoid:!0,name:e=lt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},i:ae,m:function(t){return 0===t?ce.toHandle(Te()):(t=void 0===(r=be[e=t])?lt(e):r,ce.toHandle(Te()[t]));var e,r},l:function(t){t>4&&(ie[t].refcount+=1)},y:function(t,e,r,n){t=ce.toValue(t);var o=$e[e];return o||(o=function(t){for(var e="",r=0;r<t;++r)e+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+t+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(r=0;r<t;++r)n+="var argType"+r+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+r+"');\nvar arg"+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+e+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(Ce,i,ce.toHandle,(()=>A))}(e),$e[e]=o),o(t,r,n)},n:function(t,e){var r=(t=Ce(t,"_emval_take_value")).readValueFromPointer(e);return ce.toHandle(r)},f:function(){L("")},t:function(t,e,r){C.copyWithin(t,e,e+r)},s:function(t){var e,r,n=C.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),Pe(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1}},Ee=(function(){var t={a:Ae};function e(t,e){var r,n=t.exports;i.asm=n,F((w=i.asm.z).buffer),O=i.asm.C,r=i.asm.A,I.unshift(r),function(){if(M--,i.monitorRunDependencies&&i.monitorRunDependencies(M),0==M&&(null!==V&&(clearInterval(V),V=null),z)){var t=z;z=null,t()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!m&&(f||p)){if("function"==typeof fetch&&!B(x))return fetch(x,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+x+"'";return t.arrayBuffer()})).catch((function(){return q(x)}));if(s)return new Promise((function(t,e){s(x,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return q(x)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){g("failed to asynchronously prepare wasm: "+t),L(t)}))}if(M++,i.monitorRunDependencies&&i.monitorRunDependencies(M),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){g("Module.instantiateWasm callback failed with error: "+t),o(t)}(m||"function"!=typeof WebAssembly.instantiateStreaming||N(x)||B(x)||h||"function"!=typeof fetch?n(r):fetch(x,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return g("wasm streaming compile failed: "+t),g("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.A).apply(null,arguments)},i._malloc=function(){return(Ee=i._malloc=i.asm.B).apply(null,arguments)}),ke=i.___getTypeName=function(){return(ke=i.___getTypeName=i.asm.D).apply(null,arguments)},Se=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.E).apply(null,arguments)},i._free=function(){return(Se=i._free=i.asm.F).apply(null,arguments)}),We=i.stackSave=function(){return(We=i.stackSave=i.asm.G).apply(null,arguments)},Re=i.stackRestore=function(){return(Re=i.stackRestore=i.asm.H).apply(null,arguments)},je=i.stackAlloc=function(){return(je=i.stackAlloc=i.asm.I).apply(null,arguments)},Fe=i.___cxa_is_pointer_type=function(){return(Fe=i.___cxa_is_pointer_type=i.asm.J).apply(null,arguments)};function Oe(t){function r(){_e||(_e=!0,i.calledRun=!0,S||(X(I),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),H.unshift(t);var t;X(H)}()))}t=t||l,M>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),U.unshift(t);var t;X(U)}(),M>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}if(i.ccall=function(t,e,r,n,o){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);j(t,e=je(r),r)}return e},array:t=>{var e=je(t.length);return function(t,e){T.set(t,e)}(t,e),e}},s=function(t){return i["_"+t]}(t),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var f=a[r[l]];f?(0===c&&(c=We()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&Re(c),function(t){return"string"===e?R(t):"boolean"===e?Boolean(t):t}(t)}(p)},z=function t(){_e||Oe(),_e||(z=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Oe(),t.ready});t.exports=o},851:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c=Object.assign({},i),l=[],f="./this.program",p=(t,e)=>{throw e},h="object"==typeof window,d="function"==typeof importScripts,v="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,y="";if(v){var m=r(491),g=r(33);y=d?g.dirname(y)+"/":"//",a=(t,e)=>(t=Z(t)?new URL(t):g.normalize(t),m.readFileSync(t,e?void 0:"utf8")),u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{t=Z(t)?new URL(t):g.normalize(t),m.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&(f=process.argv[1].replace(/\\/g,"/")),l=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof K))throw t})),process.on("unhandledRejection",(function(t){throw t})),p=(t,e)=>{if(L())throw process.exitCode=t,e;var r;(r=e)instanceof K||T("exiting due to exception: "+r),process.exit(t)},i.inspect=function(){return"[Emscripten Module object]"}}else(h||d)&&(d?y=self.location.href:"undefined"!=typeof document&&document.currentScript&&(y=document.currentScript.src),n&&(y=n),y=0!==y.indexOf("blob:")?y.substr(0,y.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},d&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var w,b=i.print||console.log.bind(console),T=i.printErr||console.warn.bind(console);Object.assign(i,c),c=null,i.arguments&&(l=i.arguments),i.thisProgram&&(f=i.thisProgram),i.quit&&(p=i.quit),i.wasmBinary&&(w=i.wasmBinary);var C,$=i.noExitRuntime||!0;"object"!=typeof WebAssembly&&Y("no native wasm support detected");var P,_,A,E,k,S,W,R,j,F=!1,O="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function x(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&O)return O.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function D(t,e){return t?x(A,t,e):""}function U(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,A,e,r)}function I(t){P=t,i.HEAP8=_=new Int8Array(t),i.HEAP16=E=new Int16Array(t),i.HEAP32=S=new Int32Array(t),i.HEAPU8=A=new Uint8Array(t),i.HEAPU16=k=new Uint16Array(t),i.HEAPU32=W=new Uint32Array(t),i.HEAPF32=R=new Float32Array(t),i.HEAPF64=j=new Float64Array(t)}i.INITIAL_MEMORY;var H,M=[],V=[],z=[];function L(){return $}var N,B,q=0,G=null,X=null;function Y(t){i.onAbort&&i.onAbort(t),T(t="Aborted("+t+")"),F=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}function J(t){return t.startsWith("data:application/octet-stream;base64,")}function Z(t){return t.startsWith("file://")}function Q(t){try{if(t==N&&w)return new Uint8Array(w);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){Y(t)}}function K(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function tt(t){for(;t.length>0;)t.shift()(i)}function et(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){W[this.ptr+4>>2]=t},this.get_type=function(){return W[this.ptr+4>>2]},this.set_destructor=function(t){W[this.ptr+8>>2]=t},this.get_destructor=function(){return W[this.ptr+8>>2]},this.set_refcount=function(t){S[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,_[this.ptr+12|0]=t},this.get_caught=function(){return 0!=_[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,_[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=_[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=S[this.ptr>>2];S[this.ptr>>2]=t+1},this.release_ref=function(){var t=S[this.ptr>>2];return S[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){W[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return W[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Le(this.get_type()))return W[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}J(N="libjpegturbowasm_decode.wasm")||(B=N,N=i.locateFile?i.locateFile(B,y):y+B);var rt={};function nt(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function ot(t){return this.fromWireType(S[t>>2])}var it={},at={},st={};function ut(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=48&&e<=57?"_"+t:t}function ct(t,e){return t=ut(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function lt(t,e){var r=ct(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ft=void 0;function pt(t){throw new ft(t)}function ht(t,e,r){function n(e){var n=r(e);n.length!==t.length&&pt("Mismatched type converter count");for(var o=0;o<t.length;++o)wt(t[o],n[o])}t.forEach((function(t){st[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{at.hasOwnProperty(t)?o[e]=at[t]:(i.push(t),it.hasOwnProperty(t)||(it[t]=[]),it[t].push((()=>{o[e]=at[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function dt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var vt=void 0;function yt(t){for(var e="",r=t;A[r];)e+=vt[A[r++]];return e}var mt=void 0;function gt(t){throw new mt(t)}function wt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||gt('type "'+n+'" must have a positive integer typeid pointer'),at.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;gt("Cannot register type '"+n+"' twice")}if(at[t]=e,delete st[t],it.hasOwnProperty(t)){var o=it[t];delete it[t],o.forEach((t=>t()))}}function bt(t){if(!(this instanceof zt))return!1;if(!(t instanceof zt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function Tt(t){gt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var Ct=!1;function $t(t){}function Pt(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function _t(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=_t(t,e,r.baseClass);return null===n?null:r.downcast(n)}var At={};function Et(){return Object.keys(Ft).length}function kt(){var t=[];for(var e in Ft)Ft.hasOwnProperty(e)&&t.push(Ft[e]);return t}var St=[];function Wt(){for(;St.length;){var t=St.pop();t.$$.deleteScheduled=!1,t.delete()}}var Rt=void 0;function jt(t){Rt=t,St.length&&Rt&&Rt(Wt)}var Ft={};function Ot(t,e){return e=function(t,e){for(void 0===e&>("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Ft[e]}function xt(t,e){return e.ptrType&&e.ptr||pt("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&pt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ut(Object.create(t,{$$:{value:e}}))}function Dt(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Ot(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?xt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):xt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=At[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=_t(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?xt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):xt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Ut(t){return"undefined"==typeof FinalizationRegistry?(Ut=t=>t,t):(Ct=new FinalizationRegistry((t=>{Pt(t.$$)})),Ut=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};Ct.register(t,r,t)}return t},$t=t=>Ct.unregister(t),Ut(t))}function It(){if(this.$$.ptr||Tt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Ut(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Ht(){this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&>("Object already scheduled for deletion"),$t(this),Pt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Mt(){return!this.$$.ptr}function Vt(){return this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&>("Object already scheduled for deletion"),St.push(this),1===St.length&&Rt&&Rt(Wt),this.$$.deleteScheduled=!0,this}function zt(){}function Lt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||gt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function Nt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Bt(t,e,r){for(;e!==r;)e.upcast||gt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function qt(t,e){if(null===e)return this.isReference&>("null is not a valid "+this.name),0;e.$$||gt('Cannot pass "'+de(e)+'" as a '+this.name),e.$$.ptr||gt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Bt(e.$$.ptr,r,this.registeredClass)}function Gt(t,e){var r;if(null===e)return this.isReference&>("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||gt('Cannot pass "'+de(e)+'" as a '+this.name),e.$$.ptr||gt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&>("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=Bt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&>("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:gt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,he.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:gt("Unsupporting sharing policy")}return r}function Xt(t,e){if(null===e)return this.isReference&>("null is not a valid "+this.name),0;e.$$||gt('Cannot pass "'+de(e)+'" as a '+this.name),e.$$.ptr||gt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&>("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Bt(e.$$.ptr,r,this.registeredClass)}function Yt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Jt(t){this.rawDestructor&&this.rawDestructor(t)}function Zt(t){null!==t&&t.delete()}function Qt(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Gt:n?(this.toWireType=qt,this.destructorFunction=null):(this.toWireType=Xt,this.destructorFunction=null)}var Kt=[];function te(t){var e=Kt[t];return e||(t>=Kt.length&&(Kt.length=t+1),Kt[t]=e=H.get(t)),e}function ee(t,e,r){return t.includes("j")?function(t,e,r){var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):te(e).apply(null,r)}function re(t,e){var r,n,o,i=(t=yt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),ee(r,n,o)}):te(e);return"function"!=typeof i&>("unknown function pointer with signature "+t+": "+e),i}var ne=void 0;function oe(t){var e=Ie(t),r=yt(e);return Ue(e),r}function ie(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||at[e]||(st[e]?st[e].forEach(t):(r.push(e),n[e]=!0))})),new ne(t+": "+r.map(oe).join([", "]))}function ae(t,e){for(var r=[],n=0;n<t;n++)r.push(W[e+4*n>>2]);return r}function se(t,e,r,n,o){var i=e.length;i<2&>("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+ut(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var h=s?"destructors":"null",d=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[gt,n,o,nt,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+e[u+2].name+"\n",d.push("argType"+u),v.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var y=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=y+"_dtor("+y+"); // "+e[u].name+"\n",d.push(y+"_dtor"),v.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",d.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=ct(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,d).apply(null,v)}var ue=[],ce=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function le(t){t>4&&0==--ce[t].refcount&&(ce[t]=void 0,ue.push(t))}function fe(){for(var t=0,e=5;e<ce.length;++e)void 0!==ce[e]&&++t;return t}function pe(){for(var t=5;t<ce.length;++t)if(void 0!==ce[t])return ce[t];return null}var he={toValue:t=>(t||gt("Cannot use deleted val. handle = "+t),ce[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=ue.length?ue.pop():ce.length;return ce[e]={refcount:1,value:t},e}}};function de(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function ve(t,e){switch(e){case 2:return function(t){return this.fromWireType(R[t>>2])};case 3:return function(t){return this.fromWireType(j[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function ye(t,e,r){switch(e){case 0:return r?function(t){return _[t]}:function(t){return A[t]};case 1:return r?function(t){return E[t>>1]}:function(t){return k[t>>1]};case 2:return r?function(t){return S[t>>2]}:function(t){return W[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var me="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ge(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&k[n];)++n;if((r=n<<1)-t>32&&me)return me.decode(A.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=E[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function we(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);E[e>>1]=a,e+=2}return E[e>>1]=0,e-n}function be(t){return 2*t.length}function Te(t,e){for(var r=0,n="";!(r>=e/4);){var o=S[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function Ce(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),S[e>>2]=a,(e+=4)+4>o)break}return S[e>>2]=0,e-n}function $e(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}var Pe={};function _e(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Ae(t,e){var r=at[t];return void 0===r&>(e+" has unknown type "+oe(t)),r}var Ee={};function ke(t){try{return C.grow(t-P.byteLength+65535>>>16),I(C.buffer),1}catch(t){}}var Se={};function We(){if(!We.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:f||"./this.program"};for(var e in Se)void 0===Se[e]?delete t[e]:t[e]=Se[e];var r=[];for(var e in t)r.push(e+"="+t[e]);We.strings=r}return We.strings}var Re=function(t,e){var r;r=t,L()||(i.onExit&&i.onExit(r),F=!0),p(r,new K(r))},je=[null,[],[]];function Fe(t,e){var r=je[t];0===e||10===e?((1===t?b:T)(x(r,0)),r.length=0):r.push(e)}ft=i.InternalError=lt(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);vt=t}(),mt=i.BindingError=lt(Error,"BindingError"),zt.prototype.isAliasOf=bt,zt.prototype.clone=It,zt.prototype.delete=Ht,zt.prototype.isDeleted=Mt,zt.prototype.deleteLater=Vt,i.getInheritedInstanceCount=Et,i.getLiveInheritedInstances=kt,i.flushPendingDeletes=Wt,i.setDelayFunction=jt,Qt.prototype.getPointee=Yt,Qt.prototype.destructor=Jt,Qt.prototype.argPackAdvance=8,Qt.prototype.readValueFromPointer=ot,Qt.prototype.deleteObject=Zt,Qt.prototype.fromWireType=Dt,ne=i.UnboundTypeError=lt(Error,"UnboundTypeError"),i.count_emval_handles=fe,i.get_first_emval=pe;var Oe,xe={g:function(t,e,r){throw new et(t).init(e,r),t},A:function(t){var e=rt[t];delete rt[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;ht([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),nt(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:n}]}))},w:function(t,e,r,n,o){},F:function(t,e,r,n,o){var i=dt(r);wt(t,{name:e=yt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=_;else if(2===r)n=E;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=S}return this.fromWireType(n[t>>i])},destructorFunction:null})},u:function(t,e,r,n,o,a,s,u,c,l,f,p,h){f=yt(f),a=re(o,a),u&&(u=re(s,u)),l&&(l=re(c,l)),h=re(p,h);var d=ut(f);!function(t,e,r){i.hasOwnProperty(t)?((void 0===r||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[r])&>("Cannot register public name '"+t+"' twice"),Lt(i,t,t),i.hasOwnProperty(r)&>("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[t].overloadTable[r]=e):(i[t]=e,void 0!==r&&(i[t].numArguments=r))}(d,(function(){ie("Cannot construct "+f+" due to unbound types",[n])})),ht([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:zt.prototype;var s=ct(d,(function(){if(Object.getPrototypeOf(this)!==c)throw new mt("Use 'new' to construct "+f);if(void 0===p.constructor_body)throw new mt(f+" has no accessible constructor");var t=p.constructor_body[arguments.length];if(void 0===t)throw new mt("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(p.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),c=Object.create(o,{constructor:{value:s}});s.prototype=c;var p=new Nt(f,s,c,h,r,a,u,l),v=new Qt(f,p,!0,!1,!1),y=new Qt(f+"*",p,!1,!1,!1),m=new Qt(f+" const*",p,!1,!0,!1);return At[t]={pointerType:y,constPointerType:m},function(t,e,r){i.hasOwnProperty(t)||pt("Replacing nonexistant public symbol"),void 0!==i[t].overloadTable&&void 0!==r?i[t].overloadTable[r]=e:(i[t]=e,i[t].argCount=r)}(d,s),[v,y,m]}))},t:function(t,e,r,n,o,i){var a;e>0||Y(a);var s=ae(e,r);o=re(n,o),ht([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new mt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{ie("Cannot construct "+t.name+" due to unbound types",s)},ht([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=se(r,n,null,o,i),[]})),[]}))},c:function(t,e,r,n,o,i,a,s){var u=ae(r,n);e=yt(e),i=re(o,i),ht([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){ie("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(Lt(c,e,n),c[e].overloadTable[r-2]=o),ht([],u,(function(o){var s=se(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},E:function(t,e){wt(t,{name:e=yt(e),fromWireType:function(t){var e=he.toValue(t);return le(t),e},toWireType:function(t,e){return he.toHandle(e)},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:null})},m:function(t,e,r){var n=dt(r);wt(t,{name:e=yt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:ve(e,n),destructorFunction:null})},b:function(t,e,r,n,o){e=yt(e),-1===o&&(o=4294967295);var i=dt(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");wt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:ye(e,i,0!==n),destructorFunction:null})},a:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=W,r=e[t>>=2],o=e[t+1];return new n(P,o,r)}wt(t,{name:r=yt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},l:function(t,e){var r="std::string"===(e=yt(e));wt(t,{name:e,fromWireType:function(t){var e,n=W[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==A[s]){var u=D(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(A[o+a]);e=c.join("")}return Ue(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||gt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=De(4+n+1),a=i+4;if(W[i>>2]=n,r&&o)U(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(Ue(a),gt("String has UTF-16 code units that do not fit in 8 bits")),A[a+s]=u}else for(s=0;s<n;++s)A[a+s]=e[s];return null!==t&&t.push(Ue,i),i},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:function(t){Ue(t)}})},h:function(t,e,r){var n,o,i,a,s;r=yt(r),2===e?(n=ge,o=we,a=be,i=()=>k,s=1):4===e&&(n=Te,o=Ce,a=$e,i=()=>W,s=2),wt(t,{name:r,fromWireType:function(t){for(var r,o=W[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return Ue(t),r},toWireType:function(t,n){"string"!=typeof n&>("Cannot pass non-string to C++ string type "+r);var i=a(n),u=De(4+i+e);return W[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(Ue,u),u},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:function(t){Ue(t)}})},J:function(t,e,r,n,o,i){rt[t]={name:yt(e),rawConstructor:re(r,n),rawDestructor:re(o,i),fields:[]}},d:function(t,e,r,n,o,i,a,s,u,c){rt[t].fields.push({fieldName:yt(e),getterReturnType:r,getter:re(n,o),getterContext:i,setterArgumentType:a,setter:re(s,u),setterContext:c})},G:function(t,e){wt(t,{isVoid:!0,name:e=yt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},x:function(){throw 1/0},i:le,r:function(t){return 0===t?he.toHandle(_e()):(t=void 0===(r=Pe[e=t])?yt(e):r,he.toHandle(_e()[t]));var e,r},p:function(t){t>4&&(ce[t].refcount+=1)},q:function(t,e,r,n){t=he.toValue(t);var o=Ee[e];return o||(o=function(t){for(var e="",r=0;r<t;++r)e+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+t+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(r=0;r<t;++r)n+="var argType"+r+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+r+"');\nvar arg"+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+e+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(Ae,i,he.toHandle,(()=>W))}(e),Ee[e]=o),o(t,r,n)},s:function(t,e){var r=(t=Ae(t,"_emval_take_value")).readValueFromPointer(e);return he.toHandle(r)},j:function(){Y("")},D:function(t,e,r){A.copyWithin(t,e,e+r)},y:function(t){var e,r,n=A.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),ke(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1},z:function(t,e){var r=0;return We().forEach((function(n,o){var i=e+r;W[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)_[0|e++]=t.charCodeAt(n);r||(_[0|e]=0)}(n,i),r+=n.length+1})),0},B:function(t,e){var r=We();W[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),W[e>>2]=n,0},I:Re,C:function(t){return 52},v:function(t,e,r,n,o){return 70},k:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=W[e>>2],s=W[e+4>>2];e+=8;for(var u=0;u<s;u++)Fe(t,A[a+u]);o+=s}return W[n>>2]=o,0},o:function(t,e){var r=Me();try{return te(t)(e)}catch(t){if(Ve(r),t!==t+0)throw t;He(1,0)}},n:function(t,e,r){var n=Me();try{return te(t)(e,r)}catch(t){if(Ve(n),t!==t+0)throw t;He(1,0)}},H:function(t,e,r,n){var o=Me();try{return te(t)(e,r,n)}catch(t){if(Ve(o),t!==t+0)throw t;He(1,0)}},f:function(t,e){var r=Me();try{te(t)(e)}catch(t){if(Ve(r),t!==t+0)throw t;He(1,0)}},e:function(t,e,r,n){var o=Me();try{te(t)(e,r,n)}catch(t){if(Ve(o),t!==t+0)throw t;He(1,0)}}},De=(function(){var t={a:xe};function e(t,e){var r,n=t.exports;i.asm=n,I((C=i.asm.K).buffer),H=i.asm.M,r=i.asm.L,V.unshift(r),function(){if(q--,i.monitorRunDependencies&&i.monitorRunDependencies(q),0==q&&(null!==G&&(clearInterval(G),G=null),X)){var t=X;X=null,t()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!w&&(h||d)){if("function"==typeof fetch&&!Z(N))return fetch(N,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+N+"'";return t.arrayBuffer()})).catch((function(){return Q(N)}));if(s)return new Promise((function(t,e){s(N,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return Q(N)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){T("failed to asynchronously prepare wasm: "+t),Y(t)}))}if(q++,i.monitorRunDependencies&&i.monitorRunDependencies(q),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){T("Module.instantiateWasm callback failed with error: "+t),o(t)}(w||"function"!=typeof WebAssembly.instantiateStreaming||J(N)||Z(N)||v||"function"!=typeof fetch?n(r):fetch(N,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return T("wasm streaming compile failed: "+t),T("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.L).apply(null,arguments)},i._malloc=function(){return(De=i._malloc=i.asm.N).apply(null,arguments)}),Ue=i._free=function(){return(Ue=i._free=i.asm.O).apply(null,arguments)},Ie=i.___getTypeName=function(){return(Ie=i.___getTypeName=i.asm.P).apply(null,arguments)},He=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.Q).apply(null,arguments)},i._setThrew=function(){return(He=i._setThrew=i.asm.R).apply(null,arguments)}),Me=i.stackSave=function(){return(Me=i.stackSave=i.asm.S).apply(null,arguments)},Ve=i.stackRestore=function(){return(Ve=i.stackRestore=i.asm.T).apply(null,arguments)},ze=i.stackAlloc=function(){return(ze=i.stackAlloc=i.asm.U).apply(null,arguments)},Le=i.___cxa_is_pointer_type=function(){return(Le=i.___cxa_is_pointer_type=i.asm.V).apply(null,arguments)};function Ne(t){function r(){Oe||(Oe=!0,i.calledRun=!0,F||(tt(V),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),z.unshift(t);var t;tt(z)}()))}t=t||l,q>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),M.unshift(t);var t;tt(M)}(),q>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}if(i.dynCall_jiji=function(){return(i.dynCall_jiji=i.asm.W).apply(null,arguments)},i.ccall=function(t,e,r,n,o){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);U(t,e=ze(r),r)}return e},array:t=>{var e=ze(t.length);return function(t,e){_.set(t,e)}(t,e),e}},s=function(t){return i["_"+t]}(t),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var f=a[r[l]];f?(0===c&&(c=Me()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&Ve(c),function(t){return"string"===e?D(t):"boolean"===e?Boolean(t):t}(t)}(p)},X=function t(){Oe||Ne(),Oe||(X=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ne(),t.ready});t.exports=o},272:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c=Object.assign({},i),l=[],f="./this.program",p="object"==typeof window,h="function"==typeof importScripts,d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v="";if(d){var y=r(261),m=r(926);v=h?m.dirname(v)+"/":"//",a=(t,e)=>(t=X(t)?new URL(t):m.normalize(t),y.readFileSync(t,e?void 0:"utf8")),u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{t=X(t)?new URL(t):m.normalize(t),y.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&(f=process.argv[1].replace(/\\/g,"/")),l=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof J))throw t})),process.on("unhandledRejection",(function(t){throw t})),i.inspect=function(){return"[Emscripten Module object]"}}else(p||h)&&(h?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),n&&(v=n),v=0!==v.indexOf("blob:")?v.substr(0,v.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},h&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var g,w=i.print||console.log.bind(console),b=i.printErr||console.warn.bind(console);Object.assign(i,c),c=null,i.arguments&&(l=i.arguments),i.thisProgram&&(f=i.thisProgram),i.quit&&i.quit,i.wasmBinary&&(g=i.wasmBinary);var T;i.noExitRuntime;"object"!=typeof WebAssembly&&q("no native wasm support detected");var C,$,P,_,A,E,k,S,W,R=!1,j="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function F(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&j)return j.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function O(t,e){return t?F(P,t,e):""}function x(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,P,e,r)}function D(t){C=t,i.HEAP8=$=new Int8Array(t),i.HEAP16=_=new Int16Array(t),i.HEAP32=E=new Int32Array(t),i.HEAPU8=P=new Uint8Array(t),i.HEAPU16=A=new Uint16Array(t),i.HEAPU32=k=new Uint32Array(t),i.HEAPF32=S=new Float32Array(t),i.HEAPF64=W=new Float64Array(t)}i.INITIAL_MEMORY;var U,I,H,M=[],V=[],z=[],L=0,N=null,B=null;function q(t){i.onAbort&&i.onAbort(t),b(t="Aborted("+t+")"),R=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}function G(t){return t.startsWith("data:application/octet-stream;base64,")}function X(t){return t.startsWith("file://")}function Y(t){try{if(t==I&&g)return new Uint8Array(g);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){q(t)}}function J(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Z(t){for(;t.length>0;)t.shift()(i)}function Q(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){k[this.ptr+4>>2]=t},this.get_type=function(){return k[this.ptr+4>>2]},this.set_destructor=function(t){k[this.ptr+8>>2]=t},this.get_destructor=function(){return k[this.ptr+8>>2]},this.set_refcount=function(t){E[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,$[this.ptr+12|0]=t},this.get_caught=function(){return 0!=$[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,$[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=$[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=E[this.ptr>>2];E[this.ptr>>2]=t+1},this.release_ref=function(){var t=E[this.ptr>>2];return E[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){k[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return k[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Ie(this.get_type()))return k[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}G(I="openjpegwasm_decode.wasm")||(H=I,I=i.locateFile?i.locateFile(H,v):v+H);var K={};function tt(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function et(t){return this.fromWireType(E[t>>2])}var rt={},nt={},ot={};function it(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=48&&e<=57?"_"+t:t}function at(t,e){return t=it(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function st(t,e){var r=at(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ut=void 0;function ct(t){throw new ut(t)}function lt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&ct("Mismatched type converter count");for(var o=0;o<t.length;++o)yt(t[o],n[o])}t.forEach((function(t){ot[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{nt.hasOwnProperty(t)?o[e]=nt[t]:(i.push(t),rt.hasOwnProperty(t)||(rt[t]=[]),rt[t].push((()=>{o[e]=nt[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function ft(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var pt=void 0;function ht(t){for(var e="",r=t;P[r];)e+=pt[P[r++]];return e}var dt=void 0;function vt(t){throw new dt(t)}function yt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||vt('type "'+n+'" must have a positive integer typeid pointer'),nt.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;vt("Cannot register type '"+n+"' twice")}if(nt[t]=e,delete ot[t],rt.hasOwnProperty(t)){var o=rt[t];delete rt[t],o.forEach((t=>t()))}}function mt(t){if(!(this instanceof Ht))return!1;if(!(t instanceof Ht))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function gt(t){vt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var wt=!1;function bt(t){}function Tt(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function Ct(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=Ct(t,e,r.baseClass);return null===n?null:r.downcast(n)}var $t={};function Pt(){return Object.keys(Wt).length}function _t(){var t=[];for(var e in Wt)Wt.hasOwnProperty(e)&&t.push(Wt[e]);return t}var At=[];function Et(){for(;At.length;){var t=At.pop();t.$$.deleteScheduled=!1,t.delete()}}var kt=void 0;function St(t){kt=t,At.length&&kt&&kt(Et)}var Wt={};function Rt(t,e){return e=function(t,e){for(void 0===e&&vt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Wt[e]}function jt(t,e){return e.ptrType&&e.ptr||ct("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&ct("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ot(Object.create(t,{$$:{value:e}}))}function Ft(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Rt(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=$t[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=Ct(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?jt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):jt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Ot(t){return"undefined"==typeof FinalizationRegistry?(Ot=t=>t,t):(wt=new FinalizationRegistry((t=>{Tt(t.$$)})),Ot=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};wt.register(t,r,t)}return t},bt=t=>wt.unregister(t),Ot(t))}function xt(){if(this.$$.ptr||gt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Ot(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Dt(){this.$$.ptr||gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&vt("Object already scheduled for deletion"),bt(this),Tt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Ut(){return!this.$$.ptr}function It(){return this.$$.ptr||gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&vt("Object already scheduled for deletion"),At.push(this),1===At.length&&kt&&kt(Et),this.$$.deleteScheduled=!0,this}function Ht(){}function Mt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||vt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function Vt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function zt(t,e,r){for(;e!==r;)e.upcast||vt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Lt(t,e){if(null===e)return this.isReference&&vt("null is not a valid "+this.name),0;e.$$||vt('Cannot pass "'+fe(e)+'" as a '+this.name),e.$$.ptr||vt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return zt(e.$$.ptr,r,this.registeredClass)}function Nt(t,e){var r;if(null===e)return this.isReference&&vt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||vt('Cannot pass "'+fe(e)+'" as a '+this.name),e.$$.ptr||vt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&vt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=zt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&vt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:vt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,le.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:vt("Unsupporting sharing policy")}return r}function Bt(t,e){if(null===e)return this.isReference&&vt("null is not a valid "+this.name),0;e.$$||vt('Cannot pass "'+fe(e)+'" as a '+this.name),e.$$.ptr||vt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&vt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return zt(e.$$.ptr,r,this.registeredClass)}function qt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Gt(t){this.rawDestructor&&this.rawDestructor(t)}function Xt(t){null!==t&&t.delete()}function Yt(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Nt:n?(this.toWireType=Lt,this.destructorFunction=null):(this.toWireType=Bt,this.destructorFunction=null)}var Jt=[];function Zt(t){var e=Jt[t];return e||(t>=Jt.length&&(Jt.length=t+1),Jt[t]=e=U.get(t)),e}function Qt(t,e,r){return t.includes("j")?function(t,e,r){var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):Zt(e).apply(null,r)}function Kt(t,e){var r,n,o,i=(t=ht(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),Qt(r,n,o)}):Zt(e);return"function"!=typeof i&&vt("unknown function pointer with signature "+t+": "+e),i}var te=void 0;function ee(t){var e=Oe(t),r=ht(e);return Fe(e),r}function re(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||nt[e]||(ot[e]?ot[e].forEach(t):(r.push(e),n[e]=!0))})),new te(t+": "+r.map(ee).join([", "]))}function ne(t,e){for(var r=[],n=0;n<t;n++)r.push(k[e+4*n>>2]);return r}function oe(t,e,r,n,o){var i=e.length;i<2&&vt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+it(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var h=s?"destructors":"null",d=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[vt,n,o,tt,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+e[u+2].name+"\n",d.push("argType"+u),v.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var y=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=y+"_dtor("+y+"); // "+e[u].name+"\n",d.push(y+"_dtor"),v.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",d.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=at(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,d).apply(null,v)}var ie=[],ae=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function se(t){t>4&&0==--ae[t].refcount&&(ae[t]=void 0,ie.push(t))}function ue(){for(var t=0,e=5;e<ae.length;++e)void 0!==ae[e]&&++t;return t}function ce(){for(var t=5;t<ae.length;++t)if(void 0!==ae[t])return ae[t];return null}var le={toValue:t=>(t||vt("Cannot use deleted val. handle = "+t),ae[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=ie.length?ie.pop():ae.length;return ae[e]={refcount:1,value:t},e}}};function fe(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function pe(t,e){switch(e){case 2:return function(t){return this.fromWireType(S[t>>2])};case 3:return function(t){return this.fromWireType(W[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function he(t,e,r){switch(e){case 0:return r?function(t){return $[t]}:function(t){return P[t]};case 1:return r?function(t){return _[t>>1]}:function(t){return A[t>>1]};case 2:return r?function(t){return E[t>>2]}:function(t){return k[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var de="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ve(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&A[n];)++n;if((r=n<<1)-t>32&&de)return de.decode(P.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=_[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function ye(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);_[e>>1]=a,e+=2}return _[e>>1]=0,e-n}function me(t){return 2*t.length}function ge(t,e){for(var r=0,n="";!(r>=e/4);){var o=E[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function we(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),E[e>>2]=a,(e+=4)+4>o)break}return E[e>>2]=0,e-n}function be(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}var Te={};function Ce(){return"object"==typeof globalThis?globalThis:Function("return this")()}function $e(t,e){var r=nt[t];return void 0===r&&vt(e+" has unknown type "+ee(t)),r}var Pe={};function _e(t){try{return T.grow(t-C.byteLength+65535>>>16),D(T.buffer),1}catch(t){}}var Ae={};function Ee(){if(!Ee.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:f||"./this.program"};for(var e in Ae)void 0===Ae[e]?delete t[e]:t[e]=Ae[e];var r=[];for(var e in t)r.push(e+"="+t[e]);Ee.strings=r}return Ee.strings}var ke=[null,[],[]];function Se(t,e){var r=ke[t];0===e||10===e?((1===t?w:b)(F(r,0)),r.length=0):r.push(e)}ut=i.InternalError=st(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);pt=t}(),dt=i.BindingError=st(Error,"BindingError"),Ht.prototype.isAliasOf=mt,Ht.prototype.clone=xt,Ht.prototype.delete=Dt,Ht.prototype.isDeleted=Ut,Ht.prototype.deleteLater=It,i.getInheritedInstanceCount=Pt,i.getLiveInheritedInstances=_t,i.flushPendingDeletes=Et,i.setDelayFunction=St,Yt.prototype.getPointee=qt,Yt.prototype.destructor=Gt,Yt.prototype.argPackAdvance=8,Yt.prototype.readValueFromPointer=et,Yt.prototype.deleteObject=Xt,Yt.prototype.fromWireType=Ft,te=i.UnboundTypeError=st(Error,"UnboundTypeError"),i.count_emval_handles=ue,i.get_first_emval=ce;var We,Re={D:function(t,e,r){throw new Q(t).init(e,r),t},e:function(t){var e=K[t];delete K[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;lt([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),tt(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:et,destructorFunction:n}]}))},t:function(t,e,r,n,o){},B:function(t,e,r,n,o){var i=ft(r);yt(t,{name:e=ht(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=$;else if(2===r)n=_;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=E}return this.fromWireType(n[t>>i])},destructorFunction:null})},r:function(t,e,r,n,o,a,s,u,c,l,f,p,h){f=ht(f),a=Kt(o,a),u&&(u=Kt(s,u)),l&&(l=Kt(c,l)),h=Kt(p,h);var d=it(f);!function(t,e,r){i.hasOwnProperty(t)?((void 0===r||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[r])&&vt("Cannot register public name '"+t+"' twice"),Mt(i,t,t),i.hasOwnProperty(r)&&vt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[t].overloadTable[r]=e):(i[t]=e,void 0!==r&&(i[t].numArguments=r))}(d,(function(){re("Cannot construct "+f+" due to unbound types",[n])})),lt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Ht.prototype;var s=at(d,(function(){if(Object.getPrototypeOf(this)!==c)throw new dt("Use 'new' to construct "+f);if(void 0===p.constructor_body)throw new dt(f+" has no accessible constructor");var t=p.constructor_body[arguments.length];if(void 0===t)throw new dt("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(p.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),c=Object.create(o,{constructor:{value:s}});s.prototype=c;var p=new Vt(f,s,c,h,r,a,u,l),v=new Yt(f,p,!0,!1,!1),y=new Yt(f+"*",p,!1,!1,!1),m=new Yt(f+" const*",p,!1,!0,!1);return $t[t]={pointerType:y,constPointerType:m},function(t,e,r){i.hasOwnProperty(t)||ct("Replacing nonexistant public symbol"),void 0!==i[t].overloadTable&&void 0!==r?i[t].overloadTable[r]=e:(i[t]=e,i[t].argCount=r)}(d,s),[v,y,m]}))},q:function(t,e,r,n,o,i){var a;e>0||q(a);var s=ne(e,r);o=Kt(n,o),lt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new dt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{re("Cannot construct "+t.name+" due to unbound types",s)},lt([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=oe(r,n,null,o,i),[]})),[]}))},b:function(t,e,r,n,o,i,a,s){var u=ne(r,n);e=ht(e),i=Kt(o,i),lt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){re("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(Mt(c,e,n),c[e].overloadTable[r-2]=o),lt([],u,(function(o){var s=oe(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},A:function(t,e){yt(t,{name:e=ht(e),fromWireType:function(t){var e=le.toValue(t);return se(t),e},toWireType:function(t,e){return le.toHandle(e)},argPackAdvance:8,readValueFromPointer:et,destructorFunction:null})},l:function(t,e,r){var n=ft(r);yt(t,{name:e=ht(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:pe(e,n),destructorFunction:null})},d:function(t,e,r,n,o){e=ht(e),-1===o&&(o=4294967295);var i=ft(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");yt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:he(e,i,0!==n),destructorFunction:null})},a:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=k,r=e[t>>=2],o=e[t+1];return new n(C,o,r)}yt(t,{name:r=ht(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},k:function(t,e){var r="std::string"===(e=ht(e));yt(t,{name:e,fromWireType:function(t){var e,n=k[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==P[s]){var u=O(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(P[o+a]);e=c.join("")}return Fe(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||vt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=je(4+n+1),a=i+4;if(k[i>>2]=n,r&&o)x(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(Fe(a),vt("String has UTF-16 code units that do not fit in 8 bits")),P[a+s]=u}else for(s=0;s<n;++s)P[a+s]=e[s];return null!==t&&t.push(Fe,i),i},argPackAdvance:8,readValueFromPointer:et,destructorFunction:function(t){Fe(t)}})},f:function(t,e,r){var n,o,i,a,s;r=ht(r),2===e?(n=ve,o=ye,a=me,i=()=>A,s=1):4===e&&(n=ge,o=we,a=be,i=()=>k,s=2),yt(t,{name:r,fromWireType:function(t){for(var r,o=k[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return Fe(t),r},toWireType:function(t,n){"string"!=typeof n&&vt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=je(4+i+e);return k[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(Fe,u),u},argPackAdvance:8,readValueFromPointer:et,destructorFunction:function(t){Fe(t)}})},g:function(t,e,r,n,o,i){K[t]={name:ht(e),rawConstructor:Kt(r,n),rawDestructor:Kt(o,i),fields:[]}},c:function(t,e,r,n,o,i,a,s,u,c){K[t].fields.push({fieldName:ht(e),getterReturnType:r,getter:Kt(n,o),getterContext:i,setterArgumentType:a,setter:Kt(s,u),setterContext:c})},C:function(t,e){yt(t,{isVoid:!0,name:e=ht(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},h:se,o:function(t){return 0===t?le.toHandle(Ce()):(t=void 0===(r=Te[e=t])?ht(e):r,le.toHandle(Ce()[t]));var e,r},m:function(t){t>4&&(ae[t].refcount+=1)},n:function(t,e,r,n){t=le.toValue(t);var o=Pe[e];return o||(o=function(t){for(var e="",r=0;r<t;++r)e+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+t+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(r=0;r<t;++r)n+="var argType"+r+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+r+"');\nvar arg"+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+e+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)($e,i,le.toHandle,(()=>k))}(e),Pe[e]=o),o(t,r,n)},p:function(t,e){var r=(t=$e(t,"_emval_take_value")).readValueFromPointer(e);return le.toHandle(r)},i:function(){q("")},v:function(){return 2147483648},z:function(t,e,r){P.copyWithin(t,e,e+r)},u:function(t){var e,r,n=P.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),_e(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1},w:function(t,e){var r=0;return Ee().forEach((function(n,o){var i=e+r;k[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)$[0|e++]=t.charCodeAt(n);r||($[0|e]=0)}(n,i),r+=n.length+1})),0},x:function(t,e){var r=Ee();k[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),k[e>>2]=n,0},y:function(t){return 52},s:function(t,e,r,n,o){return 70},j:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=k[e>>2],s=k[e+4>>2];e+=8;for(var u=0;u<s;u++)Se(t,P[a+u]);o+=s}return k[n>>2]=o,0}},je=(function(){var t={a:Re};function e(t,e){var r,n=t.exports;i.asm=n,D((T=i.asm.E).buffer),U=i.asm.G,r=i.asm.F,V.unshift(r),function(){if(L--,i.monitorRunDependencies&&i.monitorRunDependencies(L),0==L&&(null!==N&&(clearInterval(N),N=null),B)){var t=B;B=null,t()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!g&&(p||h)){if("function"==typeof fetch&&!X(I))return fetch(I,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+I+"'";return t.arrayBuffer()})).catch((function(){return Y(I)}));if(s)return new Promise((function(t,e){s(I,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return Y(I)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){b("failed to asynchronously prepare wasm: "+t),q(t)}))}if(L++,i.monitorRunDependencies&&i.monitorRunDependencies(L),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){b("Module.instantiateWasm callback failed with error: "+t),o(t)}(g||"function"!=typeof WebAssembly.instantiateStreaming||G(I)||X(I)||d||"function"!=typeof fetch?n(r):fetch(I,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return b("wasm streaming compile failed: "+t),b("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.F).apply(null,arguments)},i._malloc=function(){return(je=i._malloc=i.asm.H).apply(null,arguments)}),Fe=i._free=function(){return(Fe=i._free=i.asm.I).apply(null,arguments)},Oe=i.___getTypeName=function(){return(Oe=i.___getTypeName=i.asm.J).apply(null,arguments)},xe=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.K).apply(null,arguments)},i.stackSave=function(){return(xe=i.stackSave=i.asm.L).apply(null,arguments)}),De=i.stackRestore=function(){return(De=i.stackRestore=i.asm.M).apply(null,arguments)},Ue=i.stackAlloc=function(){return(Ue=i.stackAlloc=i.asm.N).apply(null,arguments)},Ie=i.___cxa_is_pointer_type=function(){return(Ie=i.___cxa_is_pointer_type=i.asm.O).apply(null,arguments)};function He(t){function r(){We||(We=!0,i.calledRun=!0,R||(Z(V),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),z.unshift(t);var t;Z(z)}()))}t=t||l,L>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),M.unshift(t);var t;Z(M)}(),L>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}if(i.dynCall_iji=function(){return(i.dynCall_iji=i.asm.P).apply(null,arguments)},i.dynCall_jji=function(){return(i.dynCall_jji=i.asm.Q).apply(null,arguments)},i.dynCall_iiji=function(){return(i.dynCall_iiji=i.asm.R).apply(null,arguments)},i.dynCall_jiji=function(){return(i.dynCall_jiji=i.asm.S).apply(null,arguments)},i.ccall=function(t,e,r,n,o){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);x(t,e=Ue(r),r)}return e},array:t=>{var e=Ue(t.length);return function(t,e){$.set(t,e)}(t,e),e}},s=function(t){return i["_"+t]}(t),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var f=a[r[l]];f?(0===c&&(c=xe()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&De(c),function(t){return"string"===e?O(t):"boolean"===e?Boolean(t):t}(t)}(p)},B=function t(){We||He(),We||(B=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return He(),t.ready});t.exports=o},430:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o;(t=void 0!==(t=t||{})?t:{}).ready=new Promise((function(t,r){e=t,o=r}));var i,a,s,u=Object.assign({},t),c=[],l="object"==typeof window,f="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h="";if(p){var d=r(280),v=r(103);h=f?v.dirname(h)+"/":"//",i=(t,e)=>(t=q(t)?new URL(t):v.normalize(t),d.readFileSync(t,e?void 0:"utf8")),s=t=>{var e=i(t,!0);return e.buffer||(e=new Uint8Array(e)),e},a=(t,e,r)=>{t=q(t)?new URL(t):v.normalize(t),d.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),c=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof X))throw t})),process.on("unhandledRejection",(function(t){throw t})),t.inspect=function(){return"[Emscripten Module object]"}}else(l||f)&&(f?h=self.location.href:"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),n&&(h=n),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},f&&(s=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),a=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var y,m=t.print||console.log.bind(console),g=t.printErr||console.warn.bind(console);Object.assign(t,u),u=null,t.arguments&&(c=t.arguments),t.thisProgram&&t.thisProgram,t.quit&&t.quit,t.wasmBinary&&(y=t.wasmBinary);var w;t.noExitRuntime;"object"!=typeof WebAssembly&&N("no native wasm support detected");var b,T,C,$,P,_,A,E,k,S=!1,W="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function R(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&W)return W.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function j(t,e){return t?R(C,t,e):""}function F(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,C,e,r)}function O(e){b=e,t.HEAP8=T=new Int8Array(e),t.HEAP16=$=new Int16Array(e),t.HEAP32=_=new Int32Array(e),t.HEAPU8=C=new Uint8Array(e),t.HEAPU16=P=new Uint16Array(e),t.HEAPU32=A=new Uint32Array(e),t.HEAPF32=E=new Float32Array(e),t.HEAPF64=k=new Float64Array(e)}t.INITIAL_MEMORY;var x,D,U,I=[],H=[],M=[],V=0,z=null,L=null;function N(e){t.onAbort&&t.onAbort(e),g(e="Aborted("+e+")"),S=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw o(r),r}function B(t){return t.startsWith("data:application/octet-stream;base64,")}function q(t){return t.startsWith("file://")}function G(t){try{if(t==D&&y)return new Uint8Array(y);if(s)return s(t);throw"both async and sync fetching of the wasm failed"}catch(t){N(t)}}function X(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Y(e){for(;e.length>0;)e.shift()(t)}B(D="openjphjs.wasm")||(U=D,D=t.locateFile?t.locateFile(U,h):h+U);var J=[],Z=0,Q=[];function K(t){var e=Q[t];return e||(t>=Q.length&&(Q.length=t+1),Q[t]=e=x.get(t)),e}function tt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){A[this.ptr+4>>2]=t},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(t){A[this.ptr+8>>2]=t},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_refcount=function(t){_[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,T[this.ptr+12|0]=t},this.get_caught=function(){return 0!=T[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,T[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=T[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=_[this.ptr>>2];_[this.ptr>>2]=t+1},this.release_ref=function(){var t=_[this.ptr>>2];return _[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){A[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Ue(this.get_type()))return A[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}var et={};function rt(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function nt(t){return this.fromWireType(_[t>>2])}var ot={},it={},at={};function st(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=48&&e<=57?"_"+t:t}function ut(t,e){return t=st(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function ct(t,e){var r=ut(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var lt=void 0;function ft(t){throw new lt(t)}function pt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&ft("Mismatched type converter count");for(var o=0;o<t.length;++o)gt(t[o],n[o])}t.forEach((function(t){at[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{it.hasOwnProperty(t)?o[e]=it[t]:(i.push(t),ot.hasOwnProperty(t)||(ot[t]=[]),ot[t].push((()=>{o[e]=it[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function ht(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var dt=void 0;function vt(t){for(var e="",r=t;C[r];)e+=dt[C[r++]];return e}var yt=void 0;function mt(t){throw new yt(t)}function gt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||mt('type "'+n+'" must have a positive integer typeid pointer'),it.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;mt("Cannot register type '"+n+"' twice")}if(it[t]=e,delete at[t],ot.hasOwnProperty(t)){var o=ot[t];delete ot[t],o.forEach((t=>t()))}}function wt(t){if(!(this instanceof Vt))return!1;if(!(t instanceof Vt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function bt(t){mt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var Tt=!1;function Ct(t){}function $t(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function Pt(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=Pt(t,e,r.baseClass);return null===n?null:r.downcast(n)}var _t={};function At(){return Object.keys(jt).length}function Et(){var t=[];for(var e in jt)jt.hasOwnProperty(e)&&t.push(jt[e]);return t}var kt=[];function St(){for(;kt.length;){var t=kt.pop();t.$$.deleteScheduled=!1,t.delete()}}var Wt=void 0;function Rt(t){Wt=t,kt.length&&Wt&&Wt(St)}var jt={};function Ft(t,e){return e=function(t,e){for(void 0===e&&mt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),jt[e]}function Ot(t,e){return e.ptrType&&e.ptr||ft("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&ft("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Dt(Object.create(t,{$$:{value:e}}))}function xt(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Ft(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?Ot(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Ot(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=_t[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=Pt(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?Ot(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):Ot(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Dt(t){return"undefined"==typeof FinalizationRegistry?(Dt=t=>t,t):(Tt=new FinalizationRegistry((t=>{$t(t.$$)})),Dt=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};Tt.register(t,r,t)}return t},Ct=t=>Tt.unregister(t),Dt(t))}function Ut(){if(this.$$.ptr||bt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Dt(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function It(){this.$$.ptr||bt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&mt("Object already scheduled for deletion"),Ct(this),$t(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Ht(){return!this.$$.ptr}function Mt(){return this.$$.ptr||bt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&mt("Object already scheduled for deletion"),kt.push(this),1===kt.length&&Wt&&Wt(St),this.$$.deleteScheduled=!0,this}function Vt(){}function zt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||mt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function Lt(e,r,n){t.hasOwnProperty(e)?((void 0===n||void 0!==t[e].overloadTable&&void 0!==t[e].overloadTable[n])&&mt("Cannot register public name '"+e+"' twice"),zt(t,e,e),t.hasOwnProperty(n)&&mt("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),t[e].overloadTable[n]=r):(t[e]=r,void 0!==n&&(t[e].numArguments=n))}function Nt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Bt(t,e,r){for(;e!==r;)e.upcast||mt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function qt(t,e){if(null===e)return this.isReference&&mt("null is not a valid "+this.name),0;e.$$||mt('Cannot pass "'+he(e)+'" as a '+this.name),e.$$.ptr||mt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Bt(e.$$.ptr,r,this.registeredClass)}function Gt(t,e){var r;if(null===e)return this.isReference&&mt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||mt('Cannot pass "'+he(e)+'" as a '+this.name),e.$$.ptr||mt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&mt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=Bt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&mt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:mt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,pe.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:mt("Unsupporting sharing policy")}return r}function Xt(t,e){if(null===e)return this.isReference&&mt("null is not a valid "+this.name),0;e.$$||mt('Cannot pass "'+he(e)+'" as a '+this.name),e.$$.ptr||mt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&mt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Bt(e.$$.ptr,r,this.registeredClass)}function Yt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Jt(t){this.rawDestructor&&this.rawDestructor(t)}function Zt(t){null!==t&&t.delete()}function Qt(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Gt:n?(this.toWireType=qt,this.destructorFunction=null):(this.toWireType=Xt,this.destructorFunction=null)}function Kt(e,r,n){t.hasOwnProperty(e)||ft("Replacing nonexistant public symbol"),void 0!==t[e].overloadTable&&void 0!==n?t[e].overloadTable[n]=r:(t[e]=r,t[e].argCount=n)}function te(e,r,n){return e.includes("j")?function(e,r,n){var o=t["dynCall_"+e];return n&&n.length?o.apply(null,[r].concat(n)):o.call(null,r)}(e,r,n):K(r).apply(null,n)}function ee(t,e){var r,n,o,i=(t=vt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),te(r,n,o)}):K(e);return"function"!=typeof i&&mt("unknown function pointer with signature "+t+": "+e),i}var re=void 0;function ne(t){var e=Re(t),r=vt(e);return We(e),r}function oe(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||it[e]||(at[e]?at[e].forEach(t):(r.push(e),n[e]=!0))})),new re(t+": "+r.map(ne).join([", "]))}function ie(t,e){for(var r=[],n=0;n<t;n++)r.push(A[e+4*n>>2]);return r}function ae(t,e,r,n,o){var i=e.length;i<2&&mt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+st(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var h=s?"destructors":"null",d=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[mt,n,o,rt,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+e[u+2].name+"\n",d.push("argType"+u),v.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var y=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=y+"_dtor("+y+"); // "+e[u].name+"\n",d.push(y+"_dtor"),v.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",d.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=ut(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,d).apply(null,v)}var se=[],ue=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function ce(t){t>4&&0==--ue[t].refcount&&(ue[t]=void 0,se.push(t))}function le(){for(var t=0,e=5;e<ue.length;++e)void 0!==ue[e]&&++t;return t}function fe(){for(var t=5;t<ue.length;++t)if(void 0!==ue[t])return ue[t];return null}var pe={toValue:t=>(t||mt("Cannot use deleted val. handle = "+t),ue[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=se.length?se.pop():ue.length;return ue[e]={refcount:1,value:t},e}}};function he(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function de(t,e){switch(e){case 2:return function(t){return this.fromWireType(E[t>>2])};case 3:return function(t){return this.fromWireType(k[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function ve(t,e,r){switch(e){case 0:return r?function(t){return T[t]}:function(t){return C[t]};case 1:return r?function(t){return $[t>>1]}:function(t){return P[t>>1]};case 2:return r?function(t){return _[t>>2]}:function(t){return A[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var ye="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function me(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&P[n];)++n;if((r=n<<1)-t>32&&ye)return ye.decode(C.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=$[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function ge(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);$[e>>1]=a,e+=2}return $[e>>1]=0,e-n}function we(t){return 2*t.length}function be(t,e){for(var r=0,n="";!(r>=e/4);){var o=_[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function Te(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),_[e>>2]=a,(e+=4)+4>o)break}return _[e>>2]=0,e-n}function Ce(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}function $e(t){try{return w.grow(t-b.byteLength+65535>>>16),O(w.buffer),1}catch(t){}}var Pe=[null,[],[]];function _e(t,e){var r=Pe[t];0===e||10===e?((1===t?m:g)(R(r,0)),r.length=0):r.push(e)}lt=t.InternalError=ct(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);dt=t}(),yt=t.BindingError=ct(Error,"BindingError"),Vt.prototype.isAliasOf=wt,Vt.prototype.clone=Ut,Vt.prototype.delete=It,Vt.prototype.isDeleted=Ht,Vt.prototype.deleteLater=Mt,t.getInheritedInstanceCount=At,t.getLiveInheritedInstances=Et,t.flushPendingDeletes=St,t.setDelayFunction=Rt,Qt.prototype.getPointee=Yt,Qt.prototype.destructor=Jt,Qt.prototype.argPackAdvance=8,Qt.prototype.readValueFromPointer=nt,Qt.prototype.deleteObject=Zt,Qt.prototype.fromWireType=xt,re=t.UnboundTypeError=ct(Error,"UnboundTypeError"),t.count_emval_handles=le,t.get_first_emval=fe;var Ae,Ee={L:function(t){var e=new tt(t);return e.get_caught()||e.set_caught(!0),e.set_rethrown(!1),J.push(e),function(t){t.add_ref()}(e),e.get_exception_ptr()},v:function(){_setThrew(0),function(t){if(t.release_ref()&&!t.get_rethrown()){var e=t.get_destructor();e&&K(e)(t.excPtr),Se(t.excPtr)}}(J.pop()),Z=0},c:function(){var t=Z;if(!t)return je(0),0;var e=new tt(t);e.set_adjusted_ptr(t);var r=e.get_type();if(!r)return je(0),t;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===r)break;var i=e.ptr+16;if(De(o,r,i))return je(o),t}return je(r),t},k:function(){var t=Z;if(!t)return je(0),0;var e=new tt(t);e.set_adjusted_ptr(t);var r=e.get_type();if(!r)return je(0),t;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===r)break;var i=e.ptr+16;if(De(o,r,i))return je(o),t}return je(r),t},i:function(t,e,r){throw new tt(t).init(e,r),Z=t,t},f:function(t){throw Z||(Z=t),t},A:function(t){var e=et[t];delete et[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;pt([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),rt(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:nt,destructorFunction:n}]}))},D:function(t,e,r,n,o){},I:function(t,e,r,n,o){var i=ht(r);gt(t,{name:e=vt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=T;else if(2===r)n=$;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=_}return this.fromWireType(n[t>>i])},destructorFunction:null})},y:function(t,e,r,n,o,i,a,s,u,c,l,f,p){l=vt(l),i=ee(o,i),s&&(s=ee(a,s)),c&&(c=ee(u,c)),p=ee(f,p);var h=st(l);Lt(h,(function(){oe("Cannot construct "+l+" due to unbound types",[n])})),pt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Vt.prototype;var a=ut(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new yt("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new yt(l+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new yt("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),u=Object.create(o,{constructor:{value:a}});a.prototype=u;var f=new Nt(l,a,u,p,r,i,s,c),d=new Qt(l,f,!0,!1,!1),v=new Qt(l+"*",f,!1,!1,!1),y=new Qt(l+" const*",f,!1,!0,!1);return _t[t]={pointerType:v,constPointerType:y},Kt(h,a),[d,v,y]}))},x:function(t,e,r,n,o,i){var a;e>0||N(a);var s=ie(e,r);o=ee(n,o),pt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new yt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{oe("Cannot construct "+t.name+" due to unbound types",s)},pt([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=ae(r,n,null,o,i),[]})),[]}))},a:function(t,e,r,n,o,i,a,s){var u=ie(r,n);e=vt(e),i=ee(o,i),pt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){oe("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(zt(c,e,n),c[e].overloadTable[r-2]=o),pt([],u,(function(o){var s=ae(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},H:function(t,e){gt(t,{name:e=vt(e),fromWireType:function(t){var e=pe.toValue(t);return ce(t),e},toWireType:function(t,e){return pe.toHandle(e)},argPackAdvance:8,readValueFromPointer:nt,destructorFunction:null})},u:function(t,e,r){var n=ht(r);gt(t,{name:e=vt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:de(e,n),destructorFunction:null})},o:function(t,e,r,n,o,i){var a=ie(e,r);t=vt(t),o=ee(n,o),Lt(t,(function(){oe("Cannot call "+t+" due to unbound types",a)}),e-1),pt([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return Kt(t,ae(t,n,null,o,i),e-1),[]}))},h:function(t,e,r,n,o){e=vt(e),-1===o&&(o=4294967295);var i=ht(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");gt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:ve(e,i,0!==n),destructorFunction:null})},d:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=A,r=e[t>>=2],o=e[t+1];return new n(b,o,r)}gt(t,{name:r=vt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},t:function(t,e){var r="std::string"===(e=vt(e));gt(t,{name:e,fromWireType:function(t){var e,n=A[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==C[s]){var u=j(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(C[o+a]);e=c.join("")}return We(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||mt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=ke(4+n+1),a=i+4;if(A[i>>2]=n,r&&o)F(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(We(a),mt("String has UTF-16 code units that do not fit in 8 bits")),C[a+s]=u}else for(s=0;s<n;++s)C[a+s]=e[s];return null!==t&&t.push(We,i),i},argPackAdvance:8,readValueFromPointer:nt,destructorFunction:function(t){We(t)}})},q:function(t,e,r){var n,o,i,a,s;r=vt(r),2===e?(n=me,o=ge,a=we,i=()=>P,s=1):4===e&&(n=be,o=Te,a=Ce,i=()=>A,s=2),gt(t,{name:r,fromWireType:function(t){for(var r,o=A[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return We(t),r},toWireType:function(t,n){"string"!=typeof n&&mt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=ke(4+i+e);return A[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(We,u),u},argPackAdvance:8,readValueFromPointer:nt,destructorFunction:function(t){We(t)}})},p:function(t,e,r,n,o,i){et[t]={name:vt(e),rawConstructor:ee(r,n),rawDestructor:ee(o,i),fields:[]}},B:function(t,e,r,n,o,i,a,s,u,c){et[t].fields.push({fieldName:vt(e),getterReturnType:r,getter:ee(n,o),getterContext:i,setterArgumentType:a,setter:ee(s,u),setterContext:c})},J:function(t,e){gt(t,{isVoid:!0,name:e=vt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},N:ce,O:function(t){t>4&&(ue[t].refcount+=1)},n:function(t,e){var r,n,o;n="_emval_take_value",void 0===(o=it[r=t])&&mt(n+" has unknown type "+ne(r));var i=(t=o).readValueFromPointer(e);return pe.toHandle(i)},r:function(){N("")},G:function(t,e,r){C.copyWithin(t,e,e+r)},E:function(t){var e,r,n=C.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),$e(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1},F:function(t){return 52},C:function(t,e,r,n,o){return 70},s:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=A[e>>2],s=A[e+4>>2];e+=8;for(var u=0;u<s;u++)_e(t,C[a+u]);o+=s}return A[n>>2]=o,0},b:function(t,e){var r=Fe();try{return K(t)(e)}catch(t){if(Oe(r),t!==t+0)throw t;_setThrew(1,0)}},z:function(t,e,r){var n=Fe();try{return K(t)(e,r)}catch(t){if(Oe(n),t!==t+0)throw t;_setThrew(1,0)}},w:function(t,e,r,n){var o=Fe();try{return K(t)(e,r,n)}catch(t){if(Oe(o),t!==t+0)throw t;_setThrew(1,0)}},e:function(t,e){var r=Fe();try{K(t)(e)}catch(t){if(Oe(r),t!==t+0)throw t;_setThrew(1,0)}},l:function(t,e,r){var n=Fe();try{K(t)(e,r)}catch(t){if(Oe(n),t!==t+0)throw t;_setThrew(1,0)}},m:function(t,e,r,n){var o=Fe();try{K(t)(e,r,n)}catch(t){if(Oe(o),t!==t+0)throw t;_setThrew(1,0)}},j:function(t,e,r,n,o){var i=Fe();try{K(t)(e,r,n,o)}catch(t){if(Oe(i),t!==t+0)throw t;_setThrew(1,0)}},K:function(t,e,r,n,o,i,a){var s=Fe();try{K(t)(e,r,n,o,i,a)}catch(t){if(Oe(s),t!==t+0)throw t;_setThrew(1,0)}},g:function(t,e,r,n,o,i,a,s,u,c,l){var f=Fe();try{K(t)(e,r,n,o,i,a,s,u,c,l)}catch(t){if(Oe(f),t!==t+0)throw t;_setThrew(1,0)}},M:function(t){return t}},ke=(function(){var e={a:Ee};function r(e,r){var n,o=e.exports;t.asm=o,O((w=t.asm.P).buffer),x=t.asm.T,n=t.asm.Q,H.unshift(n),function(){if(V--,t.monitorRunDependencies&&t.monitorRunDependencies(V),0==V&&(null!==z&&(clearInterval(z),z=null),L)){var e=L;L=null,e()}}()}function n(t){r(t.instance)}function i(t){return function(){if(!y&&(l||f)){if("function"==typeof fetch&&!q(D))return fetch(D,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+D+"'";return t.arrayBuffer()})).catch((function(){return G(D)}));if(a)return new Promise((function(t,e){a(D,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return G(D)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(t){return t})).then(t,(function(t){g("failed to asynchronously prepare wasm: "+t),N(t)}))}if(V++,t.monitorRunDependencies&&t.monitorRunDependencies(V),t.instantiateWasm)try{return t.instantiateWasm(e,r)}catch(t){g("Module.instantiateWasm callback failed with error: "+t),o(t)}(y||"function"!=typeof WebAssembly.instantiateStreaming||B(D)||q(D)||p||"function"!=typeof fetch?i(n):fetch(D,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(t){return g("wasm streaming compile failed: "+t),g("falling back to ArrayBuffer instantiation"),i(n)}))}))).catch(o)}(),t.___wasm_call_ctors=function(){return(t.___wasm_call_ctors=t.asm.Q).apply(null,arguments)},t._malloc=function(){return(ke=t._malloc=t.asm.R).apply(null,arguments)}),Se=t.___cxa_free_exception=function(){return(Se=t.___cxa_free_exception=t.asm.S).apply(null,arguments)},We=t._free=function(){return(We=t._free=t.asm.U).apply(null,arguments)},Re=t.___getTypeName=function(){return(Re=t.___getTypeName=t.asm.V).apply(null,arguments)},je=(t.__embind_initialize_bindings=function(){return(t.__embind_initialize_bindings=t.asm.W).apply(null,arguments)},t.setTempRet0=function(){return(je=t.setTempRet0=t.asm.X).apply(null,arguments)}),Fe=t.stackSave=function(){return(Fe=t.stackSave=t.asm.Y).apply(null,arguments)},Oe=t.stackRestore=function(){return(Oe=t.stackRestore=t.asm.Z).apply(null,arguments)},xe=t.stackAlloc=function(){return(xe=t.stackAlloc=t.asm._).apply(null,arguments)},De=t.___cxa_can_catch=function(){return(De=t.___cxa_can_catch=t.asm.$).apply(null,arguments)},Ue=t.___cxa_is_pointer_type=function(){return(Ue=t.___cxa_is_pointer_type=t.asm.aa).apply(null,arguments)};function Ie(r){function n(){Ae||(Ae=!0,t.calledRun=!0,S||(Y(H),e(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),function(){if(t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;)e=t.postRun.shift(),M.unshift(e);var e;Y(M)}()))}r=r||c,V>0||(function(){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)e=t.preRun.shift(),I.unshift(e);var e;Y(I)}(),V>0||(t.setStatus?(t.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t.setStatus("")}),1),n()}),1)):n()))}if(t.dynCall_ji=function(){return(t.dynCall_ji=t.asm.ba).apply(null,arguments)},t.dynCall_iiji=function(){return(t.dynCall_iiji=t.asm.ca).apply(null,arguments)},t.dynCall_jiji=function(){return(t.dynCall_jiji=t.asm.da).apply(null,arguments)},t.ccall=function(e,r,n,o,i){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);F(t,e=xe(r),r)}return e},array:t=>{var e=xe(t.length);return function(t,e){T.set(t,e)}(t,e),e}},s=function(e){return t["_"+e]}(e),u=[],c=0;if(o)for(var l=0;l<o.length;l++){var f=a[n[l]];f?(0===c&&(c=Fe()),u[l]=f(o[l])):u[l]=o[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&Oe(c),function(t){return"string"===r?j(t):"boolean"===r?Boolean(t):t}(t)}(p)},L=function t(){Ae||Ie(),Ae||(L=t)},t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();return Ie(),t.ready});t.exports=o},69:(t,e,r)=>{"use strict";t.exports=r.p+"5004fdc02f329ce53b69.wasm"},427:(t,e,r)=>{"use strict";t.exports=r.p+"c22b37c3488e1d6c3aa4.wasm"},699:(t,e,r)=>{"use strict";t.exports=r.p+"031089e563a18ada8441.wasm"},813:(t,e,r)=>{"use strict";t.exports=r.p+"20fc4c659b85ccd2a9c0.wasm"},635:(t,e,r)=>{"use strict";r.d(e,{Jj:()=>l});const n=Symbol("Comlink.proxy"),o=Symbol("Comlink.endpoint"),i=Symbol("Comlink.releaseProxy"),a=Symbol("Comlink.finalizer"),s=Symbol("Comlink.thrown"),u=t=>"object"==typeof t&&null!==t||"function"==typeof t,c=new Map([["proxy",{canHandle:t=>u(t)&&t[n],serialize(t){const{port1:e,port2:r}=new MessageChannel;return l(t,e),[r,[r]]},deserialize(t){return t.start(),y(t,[],e);var e}}],["throw",{canHandle:t=>u(t)&&s in t,serialize({value:t}){let e;return e=t instanceof Error?{isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:{isError:!1,value:t},[e,[]]},deserialize(t){if(t.isError)throw Object.assign(new Error(t.value.message),t.value);throw t.value}}]]);function l(t,e=globalThis,r=["*"]){e.addEventListener("message",(function o(i){if(!i||!i.data)return;if(!function(t,e){for(const r of t){if(e===r||"*"===r)return!0;if(r instanceof RegExp&&r.test(e))return!0}return!1}(r,i.origin))return void console.warn(`Invalid origin '${i.origin}' for comlink proxy`);const{id:u,type:c,path:p}=Object.assign({path:[]},i.data),h=(i.data.argumentList||[]).map(b);let d;try{const e=p.slice(0,-1).reduce(((t,e)=>t[e]),t),r=p.reduce(((t,e)=>t[e]),t);switch(c){case"GET":d=r;break;case"SET":e[p.slice(-1)[0]]=b(i.data.value),d=!0;break;case"APPLY":d=r.apply(e,h);break;case"CONSTRUCT":d=function(t){return Object.assign(t,{[n]:!0})}(new r(...h));break;case"ENDPOINT":{const{port1:e,port2:r}=new MessageChannel;l(t,r),d=function(t,e){return g.set(t,e),t}(e,[e])}break;case"RELEASE":d=void 0;break;default:return}}catch(t){d={value:t,[s]:0}}Promise.resolve(d).catch((t=>({value:t,[s]:0}))).then((r=>{const[n,i]=w(r);e.postMessage(Object.assign(Object.assign({},n),{id:u}),i),"RELEASE"===c&&(e.removeEventListener("message",o),f(e),a in t&&"function"==typeof t[a]&&t[a]())})).catch((t=>{const[r,n]=w({value:new TypeError("Unserializable return value"),[s]:0});e.postMessage(Object.assign(Object.assign({},r),{id:u}),n)}))})),e.start&&e.start()}function f(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function p(t){if(t)throw new Error("Proxy has been released and is not useable")}function h(t){return T(t,{type:"RELEASE"}).then((()=>{f(t)}))}const d=new WeakMap,v="FinalizationRegistry"in globalThis&&new FinalizationRegistry((t=>{const e=(d.get(t)||0)-1;d.set(t,e),0===e&&h(t)}));function y(t,e=[],r=function(){}){let n=!1;const a=new Proxy(r,{get(r,o){if(p(n),o===i)return()=>{!function(t){v&&v.unregister(t)}(a),h(t),n=!0};if("then"===o){if(0===e.length)return{then:()=>a};const r=T(t,{type:"GET",path:e.map((t=>t.toString()))}).then(b);return r.then.bind(r)}return y(t,[...e,o])},set(r,o,i){p(n);const[a,s]=w(i);return T(t,{type:"SET",path:[...e,o].map((t=>t.toString())),value:a},s).then(b)},apply(r,i,a){p(n);const s=e[e.length-1];if(s===o)return T(t,{type:"ENDPOINT"}).then(b);if("bind"===s)return y(t,e.slice(0,-1));const[u,c]=m(a);return T(t,{type:"APPLY",path:e.map((t=>t.toString())),argumentList:u},c).then(b)},construct(r,o){p(n);const[i,a]=m(o);return T(t,{type:"CONSTRUCT",path:e.map((t=>t.toString())),argumentList:i},a).then(b)}});return function(t,e){const r=(d.get(e)||0)+1;d.set(e,r),v&&v.register(t,e,t)}(a,t),a}function m(t){const e=t.map(w);return[e.map((t=>t[0])),(r=e.map((t=>t[1])),Array.prototype.concat.apply([],r))];var r}const g=new WeakMap;function w(t){for(const[e,r]of c)if(r.canHandle(t)){const[n,o]=r.serialize(t);return[{type:"HANDLER",name:e,value:n},o]}return[{type:"RAW",value:t},g.get(t)||[]]}function b(t){switch(t.type){case"HANDLER":return c.get(t.name).deserialize(t.value);case"RAW":return t.value}}function T(t,e,r){return new Promise((n=>{const o=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.addEventListener("message",(function e(r){r.data&&r.data.id&&r.data.id===o&&(t.removeEventListener("message",e),n(r.data))})),t.start&&t.start(),t.postMessage(Object.assign({id:o},e),r)}))}}}]);
|
|
3
|
-
//# sourceMappingURL=958.min.js.map
|