1 line
141 KiB
JavaScript
1 line
141 KiB
JavaScript
(()=>{var t,e,r={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,d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h="";if(d){var y=r(716),v=r(401);h=p?v.dirname(h)+"/":"//",a=(t,e)=>(t=N(t)?new URL(t):v.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=N(t)?new URL(t):v.normalize(t),y.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?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):"",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 g,m,w=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&&(g=i.wasmBinary),i.noExitRuntime,"object"!=typeof WebAssembly&&B("no native wasm support detected");var b,T,P,C,$,_,A,k,S,x=!1,E="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function O(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&&E)return E.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}(P,t,e):""}function R(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 F(t){b=t,i.HEAP8=T=new Int8Array(t),i.HEAP16=C=new Int16Array(t),i.HEAP32=_=new Int32Array(t),i.HEAPU8=P=new Uint8Array(t),i.HEAPU16=$=new Uint16Array(t),i.HEAPU32=A=new Uint32Array(t),i.HEAPF32=k=new Float32Array(t),i.HEAPF64=S=new Float64Array(t)}i.INITIAL_MEMORY;var W,j=[],D=[],I=[],U=0,H=null,L=null;function B(t){i.onAbort&&i.onAbort(t),w(t="Aborted("+t+")"),x=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}var M,V;function z(t){return t.startsWith("data:application/octet-stream;base64,")}function N(t){return t.startsWith("file://")}function q(t){try{if(t==M&&g)return new Uint8Array(g);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){B(t)}}function G(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function J(t){for(;t.length>0;)t.shift()(i)}function X(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(be(this.get_type()))return A[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}z(M="charlswasm_decode.wasm")||(V=M,M=i.locateFile?i.locateFile(V,h):h+V);var Y={};function K(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function Z(t){return this.fromWireType(_[t>>2])}var Q={},tt={},et={},rt=48,nt=57;function ot(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=rt&&e<=nt?"_"+t:t}function it(t,e){return t=ot(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function at(t,e){var r=it(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 st=void 0;function ut(t){throw new st(t)}function ct(t,e,r){function n(e){var n=r(e);n.length!==t.length&&ut("Mismatched type converter count");for(var o=0;o<t.length;++o)yt(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),Q.hasOwnProperty(t)||(Q[t]=[]),Q[t].push((()=>{o[e]=tt[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function lt(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 ft=void 0;function pt(t){for(var e="",r=t;P[r];)e+=ft[P[r++]];return e}var dt=void 0;function ht(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||ht('type "'+n+'" must have a positive integer typeid pointer'),tt.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;ht("Cannot register type '"+n+"' twice")}if(tt[t]=e,delete et[t],Q.hasOwnProperty(t)){var o=Q[t];delete Q[t],o.forEach((t=>t()))}}function vt(t){ht(t.$$.ptrType.registeredClass.name+" instance already deleted")}var gt=!1;function mt(t){}function wt(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 bt(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=bt(t,e,r.baseClass);return null===n?null:r.downcast(n)}var Tt={};var Pt=[];function Ct(){for(;Pt.length;){var t=Pt.pop();t.$$.deleteScheduled=!1,t.delete()}}var $t=void 0;var _t={};function At(t,e){return e.ptrType&&e.ptr||ut("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&ut("Both smartPtrType and smartPtr must be specified"),e.count={value:1},kt(Object.create(t,{$$:{value:e}}))}function kt(t){return"undefined"==typeof FinalizationRegistry?(kt=t=>t,t):(gt=new FinalizationRegistry((t=>{wt(t.$$)})),kt=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};gt.register(t,r,t)}return t},mt=t=>gt.unregister(t),kt(t))}function St(){}function xt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||ht("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 Et(t,e,r){i.hasOwnProperty(t)?((void 0===r||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[r])&&ht("Cannot register public name '"+t+"' twice"),xt(i,t,t),i.hasOwnProperty(r)&&ht("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 Ot(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 Rt(t,e,r){for(;e!==r;)e.upcast||ht("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Ft(t,e){if(null===e)return this.isReference&&ht("null is not a valid "+this.name),0;e.$$||ht('Cannot pass "'+Kt(e)+'" as a '+this.name),e.$$.ptr||ht("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Rt(e.$$.ptr,r,this.registeredClass)}function Wt(t,e){var r;if(null===e)return this.isReference&&ht("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||ht('Cannot pass "'+Kt(e)+'" as a '+this.name),e.$$.ptr||ht("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&ht("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=Rt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&ht("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:ht("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,Yt.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:ht("Unsupporting sharing policy")}return r}function jt(t,e){if(null===e)return this.isReference&&ht("null is not a valid "+this.name),0;e.$$||ht('Cannot pass "'+Kt(e)+'" as a '+this.name),e.$$.ptr||ht("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&ht("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Rt(e.$$.ptr,r,this.registeredClass)}function Dt(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=Wt:n?(this.toWireType=Ft,this.destructorFunction=null):(this.toWireType=jt,this.destructorFunction=null)}function It(t,e,r){i.hasOwnProperty(t)||ut("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 Ut=[];function Ht(t){var e=Ut[t];return e||(t>=Ut.length&&(Ut.length=t+1),Ut[t]=e=W.get(t)),e}function Lt(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):Ht(e).apply(null,r)}function Bt(t,e){var r,n,o,i=(t=pt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),Lt(r,n,o)}):Ht(e);return"function"!=typeof i&&ht("unknown function pointer with signature "+t+": "+e),i}var Mt=void 0;function Vt(t){var e=ye(t),r=pt(e);return ve(e),r}function zt(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 Mt(t+": "+r.map(Vt).join([", "]))}function Nt(t,e){for(var r=[],n=0;n<t;n++)r.push(A[e+4*n>>2]);return r}function qt(t,e,r,n,o){var i=e.length;i<2&&ht("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 "+ot(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 d=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[ht,n,o,K,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+e[u+2].name+"\n",h.push("argType"+u),y.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 v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=v+"_dtor("+v+"); // "+e[u].name+"\n",h.push(v+"_dtor"),y.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.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=it(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,h).apply(null,y)}var Gt=[],Jt=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Xt(t){t>4&&0==--Jt[t].refcount&&(Jt[t]=void 0,Gt.push(t))}var Yt={toValue:t=>(t||ht("Cannot use deleted val. handle = "+t),Jt[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=Gt.length?Gt.pop():Jt.length;return Jt[e]={refcount:1,value:t},e}}};function Kt(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function Zt(t,e){switch(e){case 2:return function(t){return this.fromWireType(k[t>>2])};case 3:return function(t){return this.fromWireType(S[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function Qt(t,e,r){switch(e){case 0:return r?function(t){return T[t]}:function(t){return P[t]};case 1:return r?function(t){return C[t>>1]}:function(t){return $[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 te="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ee(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&$[n];)++n;if((r=n<<1)-t>32&&te)return te.decode(P.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=C[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function re(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);C[e>>1]=a,e+=2}return C[e>>1]=0,e-n}function ne(t){return 2*t.length}function oe(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 ie(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 ae(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 se={};function ue(){return"object"==typeof globalThis?globalThis:Function("return this")()}function ce(t,e){var r=tt[t];return void 0===r&&ht(e+" has unknown type "+Vt(t)),r}var le={};function fe(t){try{return m.grow(t-b.byteLength+65535>>>16),F(m.buffer),1}catch(t){}}st=i.InternalError=at(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);ft=t}(),dt=i.BindingError=at(Error,"BindingError"),St.prototype.isAliasOf=function(t){if(!(this instanceof St))return!1;if(!(t instanceof St))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},St.prototype.clone=function(){if(this.$$.ptr||vt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=kt(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},St.prototype.delete=function(){this.$$.ptr||vt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ht("Object already scheduled for deletion"),mt(this),wt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},St.prototype.isDeleted=function(){return!this.$$.ptr},St.prototype.deleteLater=function(){return this.$$.ptr||vt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ht("Object already scheduled for deletion"),Pt.push(this),1===Pt.length&&$t&&$t(Ct),this.$$.deleteScheduled=!0,this},i.getInheritedInstanceCount=function(){return Object.keys(_t).length},i.getLiveInheritedInstances=function(){var t=[];for(var e in _t)_t.hasOwnProperty(e)&&t.push(_t[e]);return t},i.flushPendingDeletes=Ct,i.setDelayFunction=function(t){$t=t,Pt.length&&$t&&$t(Ct)},Dt.prototype.getPointee=function(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},Dt.prototype.destructor=function(t){this.rawDestructor&&this.rawDestructor(t)},Dt.prototype.argPackAdvance=8,Dt.prototype.readValueFromPointer=Z,Dt.prototype.deleteObject=function(t){null!==t&&t.delete()},Dt.prototype.fromWireType=function(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=function(t,e){return e=function(t,e){for(void 0===e&&ht("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),_t[e]}(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?At(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):At(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=Tt[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=bt(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?At(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):At(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})},Mt=i.UnboundTypeError=at(Error,"UnboundTypeError"),i.count_emval_handles=function(){for(var t=0,e=5;e<Jt.length;++e)void 0!==Jt[e]&&++t;return t},i.get_first_emval=function(){for(var t=5;t<Jt.length;++t)if(void 0!==Jt[t])return Jt[t];return null};var pe,de={h:function(t,e,r){throw new X(t).init(e,r),t},q:function(t){var e=Y[t];delete Y[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;ct([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)),K(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:Z,destructorFunction:n}]}))},r:function(t,e,r,n,o){},w:function(t,e,r,n,o){var i=lt(r);yt(t,{name:e=pt(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=C;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=pt(l),i=Bt(o,i),s&&(s=Bt(a,s)),c&&(c=Bt(u,c)),p=Bt(f,p);var d=ot(l);Et(d,(function(){zt("Cannot construct "+l+" due to unbound types",[n])})),ct([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:St.prototype;var a=it(d,(function(){if(Object.getPrototypeOf(this)!==u)throw new dt("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new dt(l+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new dt("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 Ot(l,a,u,p,r,i,s,c),h=new Dt(l,f,!0,!1,!1),y=new Dt(l+"*",f,!1,!1,!1),v=new Dt(l+" const*",f,!1,!0,!1);return Tt[t]={pointerType:y,constPointerType:v},It(d,a),[h,y,v]}))},o:function(t,e,r,n,o,i){e>0||B(undefined);var a=Nt(e,r);o=Bt(n,o),ct([],[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]=()=>{zt("Cannot construct "+t.name+" due to unbound types",a)},ct([],a,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=qt(r,n,null,o,i),[]})),[]}))},c:function(t,e,r,n,o,i,a,s){var u=Nt(r,n);e=pt(e),i=Bt(o,i),ct([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){zt("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):(xt(c,e,n),c[e].overloadTable[r-2]=o),ct([],u,(function(o){var s=qt(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){yt(t,{name:e=pt(e),fromWireType:function(t){var e=Yt.toValue(t);return Xt(t),e},toWireType:function(t,e){return Yt.toHandle(e)},argPackAdvance:8,readValueFromPointer:Z,destructorFunction:null})},k:function(t,e,r){var n=lt(r);yt(t,{name:e=pt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:Zt(e,n),destructorFunction:null})},e:function(t,e,r,n,o,i){var a=Nt(e,r);t=pt(t),o=Bt(n,o),Et(t,(function(){zt("Cannot call "+t+" due to unbound types",a)}),e-1),ct([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return It(t,qt(t,n,null,o,i),e-1),[]}))},b:function(t,e,r,n,o){e=pt(e),-1===o&&(o=4294967295);var i=lt(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:Qt(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)}yt(t,{name:r=pt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},j:function(t,e){var r="std::string"===(e=pt(e));yt(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==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 ve(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||ht("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=he(4+n+1),a=i+4;if(A[i>>2]=n,r&&o)R(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(ve(a),ht("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(ve,i),i},argPackAdvance:8,readValueFromPointer:Z,destructorFunction:function(t){ve(t)}})},g:function(t,e,r){var n,o,i,a,s;r=pt(r),2===e?(n=ee,o=re,a=ne,i=()=>$,s=1):4===e&&(n=oe,o=ie,a=ae,i=()=>A,s=2),yt(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 ve(t),r},toWireType:function(t,n){"string"!=typeof n&&ht("Cannot pass non-string to C++ string type "+r);var i=a(n),u=he(4+i+e);return A[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(ve,u),u},argPackAdvance:8,readValueFromPointer:Z,destructorFunction:function(t){ve(t)}})},u:function(t,e,r,n,o,i){Y[t]={name:pt(e),rawConstructor:Bt(r,n),rawDestructor:Bt(o,i),fields:[]}},d:function(t,e,r,n,o,i,a,s,u,c){Y[t].fields.push({fieldName:pt(e),getterReturnType:r,getter:Bt(n,o),getterContext:i,setterArgumentType:a,setter:Bt(s,u),setterContext:c})},x:function(t,e){yt(t,{isVoid:!0,name:e=pt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},i:Xt,m:function(t){return 0===t?Yt.toHandle(ue()):(t=void 0===(r=se[e=t])?pt(e):r,Yt.toHandle(ue()[t]));var e,r},l:function(t){t>4&&(Jt[t].refcount+=1)},y:function(t,e,r,n){t=Yt.toValue(t);var o=le[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,Yt.toHandle,(()=>A))}(e),le[e]=o),o(t,r,n)},n:function(t,e){var r=(t=ce(t,"_emval_take_value")).readValueFromPointer(e);return Yt.toHandle(r)},f:function(){B("")},t:function(t,e,r){P.copyWithin(t,e,e+r)},s:function(t){var e,r=P.length,n=2147483648;if((t>>>=0)>n)return!1;for(var o=1;o<=4;o*=2){var i=r*(1+.2/o);if(i=Math.min(i,t+100663296),fe(Math.min(n,(e=Math.max(t,i))+(65536-e%65536)%65536)))return!0}return!1}},he=(function(){var t={a:de};function e(t,e){var r,n=t.exports;i.asm=n,F((m=i.asm.z).buffer),W=i.asm.C,r=i.asm.A,D.unshift(r),function(t){if(U--,i.monitorRunDependencies&&i.monitorRunDependencies(U),0==U&&(null!==H&&(clearInterval(H),H=null),L)){var e=L;L=null,e()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!g&&(f||p)){if("function"==typeof fetch&&!N(M))return fetch(M,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+M+"'";return t.arrayBuffer()})).catch((function(){return q(M)}));if(s)return new Promise((function(t,e){s(M,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return q(M)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){w("failed to asynchronously prepare wasm: "+t),B(t)}))}if(U++,i.monitorRunDependencies&&i.monitorRunDependencies(U),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){w("Module.instantiateWasm callback failed with error: "+t),o(t)}(g||"function"!=typeof WebAssembly.instantiateStreaming||z(M)||N(M)||d||"function"!=typeof fetch?n(r):fetch(M,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return w("wasm streaming compile failed: "+t),w("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(he=i._malloc=i.asm.B).apply(null,arguments)}),ye=i.___getTypeName=function(){return(ye=i.___getTypeName=i.asm.D).apply(null,arguments)},ve=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.E).apply(null,arguments)},i._free=function(){return(ve=i._free=i.asm.F).apply(null,arguments)}),ge=i.stackSave=function(){return(ge=i.stackSave=i.asm.G).apply(null,arguments)},me=i.stackRestore=function(){return(me=i.stackRestore=i.asm.H).apply(null,arguments)},we=i.stackAlloc=function(){return(we=i.stackAlloc=i.asm.I).apply(null,arguments)},be=i.___cxa_is_pointer_type=function(){return(be=i.___cxa_is_pointer_type=i.asm.J).apply(null,arguments)};function Te(t){function r(){pe||(pe=!0,i.calledRun=!0,x||(J(D),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(),I.unshift(t);var t;J(I)}()))}t=t||l,U>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),j.unshift(t);var t;J(j)}(),U>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);R(t,e=we(r),r)}return e},array:t=>{var e=we(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=ge()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return function(t){return 0!==c&&me(c),function(t){return"string"===e?O(t):"boolean"===e?Boolean(t):t}(t)}(p)},L=function t(){pe||Te(),pe||(L=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Te(),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},d="object"==typeof window,h="function"==typeof importScripts,y="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v="";if(y){var g=r(491),m=r(33);v=h?m.dirname(v)+"/":"//",a=(t,e)=>(t=K(t)?new URL(t):m.normalize(t),g.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=K(t)?new URL(t):m.normalize(t),g.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 Q))throw t})),process.on("unhandledRejection",(function(t){throw t})),p=(t,e)=>{if(V())throw process.exitCode=t,e;var r;(r=e)instanceof Q||T("exiting due to exception: "+r),process.exit(t)},i.inspect=function(){return"[Emscripten Module object]"}}else(d||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 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 P,C=i.noExitRuntime||!0;"object"!=typeof WebAssembly&&G("no native wasm support detected");var $,_,A,k,S,x,E,O,R,F=!1,W="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function j(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 D(t,e){return t?j(A,t,e):""}function I(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 U(t){$=t,i.HEAP8=_=new Int8Array(t),i.HEAP16=k=new Int16Array(t),i.HEAP32=x=new Int32Array(t),i.HEAPU8=A=new Uint8Array(t),i.HEAPU16=S=new Uint16Array(t),i.HEAPU32=E=new Uint32Array(t),i.HEAPF32=O=new Float32Array(t),i.HEAPF64=R=new Float64Array(t)}i.INITIAL_MEMORY;var H,L=[],B=[],M=[];function V(){return C}var z=0,N=null,q=null;function G(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}var J,X;function Y(t){return t.startsWith("data:application/octet-stream;base64,")}function K(t){return t.startsWith("file://")}function Z(t){try{if(t==J&&w)return new Uint8Array(w);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){G(t)}}function Q(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){E[this.ptr+4>>2]=t},this.get_type=function(){return E[this.ptr+4>>2]},this.set_destructor=function(t){E[this.ptr+8>>2]=t},this.get_destructor=function(){return E[this.ptr+8>>2]},this.set_refcount=function(t){x[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=x[this.ptr>>2];x[this.ptr>>2]=t+1},this.release_ref=function(){var t=x[this.ptr>>2];return x[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){E[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return E[this.ptr+16>>2]},this.get_exception_ptr=function(){if(xe(this.get_type()))return E[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}Y(J="libjpegturbowasm_decode.wasm")||(X=J,J=i.locateFile?i.locateFile(X,v):v+X);var rt={};function nt(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function ot(t){return this.fromWireType(x[t>>2])}var it={},at={},st={},ut=48,ct=57;function lt(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=ut&&e<=ct?"_"+t:t}function ft(t,e){return t=lt(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function pt(t,e){var r=ft(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 dt=void 0;function ht(t){throw new dt(t)}function yt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&ht("Mismatched type converter count");for(var o=0;o<t.length;++o)Tt(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 vt(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 gt=void 0;function mt(t){for(var e="",r=t;A[r];)e+=gt[A[r++]];return e}var wt=void 0;function bt(t){throw new wt(t)}function Tt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||bt('type "'+n+'" must have a positive integer typeid pointer'),at.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;bt("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 Pt(t){bt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var Ct=!1;function $t(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 At(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=At(t,e,r.baseClass);return null===n?null:r.downcast(n)}var kt={};var St=[];function xt(){for(;St.length;){var t=St.pop();t.$$.deleteScheduled=!1,t.delete()}}var Et=void 0;var Ot={};function Rt(t,e){return e.ptrType&&e.ptr||ht("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&ht("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ft(Object.create(t,{$$:{value:e}}))}function Ft(t){return"undefined"==typeof FinalizationRegistry?(Ft=t=>t,t):(Ct=new FinalizationRegistry((t=>{_t(t.$$)})),Ft=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};Ct.register(t,r,t)}return t},$t=t=>Ct.unregister(t),Ft(t))}function Wt(){}function jt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||bt("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 Dt(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 It(t,e,r){for(;e!==r;)e.upcast||bt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Ut(t,e){if(null===e)return this.isReference&&bt("null is not a valid "+this.name),0;e.$$||bt('Cannot pass "'+ee(e)+'" as a '+this.name),e.$$.ptr||bt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return It(e.$$.ptr,r,this.registeredClass)}function Ht(t,e){var r;if(null===e)return this.isReference&&bt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||bt('Cannot pass "'+ee(e)+'" as a '+this.name),e.$$.ptr||bt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&bt("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=It(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&bt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:bt("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,te.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:bt("Unsupporting sharing policy")}return r}function Lt(t,e){if(null===e)return this.isReference&&bt("null is not a valid "+this.name),0;e.$$||bt('Cannot pass "'+ee(e)+'" as a '+this.name),e.$$.ptr||bt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&bt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return It(e.$$.ptr,r,this.registeredClass)}function Bt(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=Ht:n?(this.toWireType=Ut,this.destructorFunction=null):(this.toWireType=Lt,this.destructorFunction=null)}var Mt=[];function Vt(t){var e=Mt[t];return e||(t>=Mt.length&&(Mt.length=t+1),Mt[t]=e=H.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):Vt(e).apply(null,r)}function Nt(t,e){var r,n,o,i=(t=mt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),zt(r,n,o)}):Vt(e);return"function"!=typeof i&&bt("unknown function pointer with signature "+t+": "+e),i}var qt=void 0;function Gt(t){var e=$e(t),r=mt(e);return Ce(e),r}function Jt(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 qt(t+": "+r.map(Gt).join([", "]))}function Xt(t,e){for(var r=[],n=0;n<t;n++)r.push(E[e+4*n>>2]);return r}function Yt(t,e,r,n,o){var i=e.length;i<2&&bt("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 "+lt(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 d=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[bt,n,o,nt,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+e[u+2].name+"\n",h.push("argType"+u),y.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 v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=v+"_dtor("+v+"); // "+e[u].name+"\n",h.push(v+"_dtor"),y.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.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=ft(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,h).apply(null,y)}var Kt=[],Zt=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Qt(t){t>4&&0==--Zt[t].refcount&&(Zt[t]=void 0,Kt.push(t))}var te={toValue:t=>(t||bt("Cannot use deleted val. handle = "+t),Zt[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=Kt.length?Kt.pop():Zt.length;return Zt[e]={refcount:1,value:t},e}}};function ee(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function re(t,e){switch(e){case 2:return function(t){return this.fromWireType(O[t>>2])};case 3:return function(t){return this.fromWireType(R[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function ne(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 k[t>>1]}:function(t){return S[t>>1]};case 2:return r?function(t){return x[t>>2]}:function(t){return E[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var oe="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ie(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&S[n];)++n;if((r=n<<1)-t>32&&oe)return oe.decode(A.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=k[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function ae(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);k[e>>1]=a,e+=2}return k[e>>1]=0,e-n}function se(t){return 2*t.length}function ue(t,e){for(var r=0,n="";!(r>=e/4);){var o=x[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)),x[e>>2]=a,(e+=4)+4>o)break}return x[e>>2]=0,e-n}function le(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 fe={};function pe(){return"object"==typeof globalThis?globalThis:Function("return this")()}function de(t,e){var r=at[t];return void 0===r&&bt(e+" has unknown type "+Gt(t)),r}var he={};function ye(t){try{return P.grow(t-$.byteLength+65535>>>16),U(P.buffer),1}catch(t){}}var ve={};function ge(){if(!ge.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 ve)void 0===ve[e]?delete t[e]:t[e]=ve[e];var r=[];for(var e in t)r.push(e+"="+t[e]);ge.strings=r}return ge.strings}var me=[null,[],[]];function we(t,e){var r=me[t];0===e||10===e?((1===t?b:T)(j(r,0)),r.length=0):r.push(e)}dt=i.InternalError=pt(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);gt=t}(),wt=i.BindingError=pt(Error,"BindingError"),Wt.prototype.isAliasOf=function(t){if(!(this instanceof Wt))return!1;if(!(t instanceof Wt))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},Wt.prototype.clone=function(){if(this.$$.ptr||Pt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Ft(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},Wt.prototype.delete=function(){this.$$.ptr||Pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&bt("Object already scheduled for deletion"),$t(this),_t(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},Wt.prototype.isDeleted=function(){return!this.$$.ptr},Wt.prototype.deleteLater=function(){return this.$$.ptr||Pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&bt("Object already scheduled for deletion"),St.push(this),1===St.length&&Et&&Et(xt),this.$$.deleteScheduled=!0,this},i.getInheritedInstanceCount=function(){return Object.keys(Ot).length},i.getLiveInheritedInstances=function(){var t=[];for(var e in Ot)Ot.hasOwnProperty(e)&&t.push(Ot[e]);return t},i.flushPendingDeletes=xt,i.setDelayFunction=function(t){Et=t,St.length&&Et&&Et(xt)},Bt.prototype.getPointee=function(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},Bt.prototype.destructor=function(t){this.rawDestructor&&this.rawDestructor(t)},Bt.prototype.argPackAdvance=8,Bt.prototype.readValueFromPointer=ot,Bt.prototype.deleteObject=function(t){null!==t&&t.delete()},Bt.prototype.fromWireType=function(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=function(t,e){return e=function(t,e){for(void 0===e&&bt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Ot[e]}(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?Rt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Rt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=kt[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=At(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?Rt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):Rt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})},qt=i.UnboundTypeError=pt(Error,"UnboundTypeError"),i.count_emval_handles=function(){for(var t=0,e=5;e<Zt.length;++e)void 0!==Zt[e]&&++t;return t},i.get_first_emval=function(){for(var t=5;t<Zt.length;++t)if(void 0!==Zt[t])return Zt[t];return null};var be,Te={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;yt([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=vt(r);Tt(t,{name:e=mt(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=k;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=x}return this.fromWireType(n[t>>i])},destructorFunction:null})},u:function(t,e,r,n,o,a,s,u,c,l,f,p,d){f=mt(f),a=Nt(o,a),u&&(u=Nt(s,u)),l&&(l=Nt(c,l)),d=Nt(p,d);var h=lt(f);!function(t,e,r){i.hasOwnProperty(t)?(bt("Cannot register public name '"+t+"' twice"),jt(i,t,t),i.hasOwnProperty(r)&&bt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[t].overloadTable[r]=e):i[t]=e}(h,(function(){Jt("Cannot construct "+f+" due to unbound types",[n])})),yt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Wt.prototype;var s=ft(h,(function(){if(Object.getPrototypeOf(this)!==c)throw new wt("Use 'new' to construct "+f);if(void 0===p.constructor_body)throw new wt(f+" has no accessible constructor");var t=p.constructor_body[arguments.length];if(void 0===t)throw new wt("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 Dt(f,s,c,d,r,a,u,l),y=new Bt(f,p,!0,!1,!1),v=new Bt(f+"*",p,!1,!1,!1),g=new Bt(f+" const*",p,!1,!0,!1);return kt[t]={pointerType:v,constPointerType:g},function(t,e,r){i.hasOwnProperty(t)||ht("Replacing nonexistant public symbol"),i[t].overloadTable,i[t]=e,i[t].argCount=r}(h,s),[y,v,g]}))},t:function(t,e,r,n,o,i){e>0||G(undefined);var a=Xt(e,r);o=Nt(n,o),yt([],[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 wt("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]=()=>{Jt("Cannot construct "+t.name+" due to unbound types",a)},yt([],a,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=Yt(r,n,null,o,i),[]})),[]}))},c:function(t,e,r,n,o,i,a,s){var u=Xt(r,n);e=mt(e),i=Nt(o,i),yt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){Jt("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):(jt(c,e,n),c[e].overloadTable[r-2]=o),yt([],u,(function(o){var s=Yt(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){Tt(t,{name:e=mt(e),fromWireType:function(t){var e=te.toValue(t);return Qt(t),e},toWireType:function(t,e){return te.toHandle(e)},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:null})},m:function(t,e,r){var n=vt(r);Tt(t,{name:e=mt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:re(e,n),destructorFunction:null})},b:function(t,e,r,n,o){e=mt(e),-1===o&&(o=4294967295);var i=vt(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");Tt(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:ne(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=E,r=e[t>>=2],o=e[t+1];return new n($,o,r)}Tt(t,{name:r=mt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},l:function(t,e){var r="std::string"===(e=mt(e));Tt(t,{name:e,fromWireType:function(t){var e,n=E[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 Ce(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||bt("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=Pe(4+n+1),a=i+4;if(E[i>>2]=n,r&&o)I(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(Ce(a),bt("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(Ce,i),i},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:function(t){Ce(t)}})},h:function(t,e,r){var n,o,i,a,s;r=mt(r),2===e?(n=ie,o=ae,a=se,i=()=>S,s=1):4===e&&(n=ue,o=ce,a=le,i=()=>E,s=2),Tt(t,{name:r,fromWireType:function(t){for(var r,o=E[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 Ce(t),r},toWireType:function(t,n){"string"!=typeof n&&bt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=Pe(4+i+e);return E[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(Ce,u),u},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:function(t){Ce(t)}})},J:function(t,e,r,n,o,i){rt[t]={name:mt(e),rawConstructor:Nt(r,n),rawDestructor:Nt(o,i),fields:[]}},d:function(t,e,r,n,o,i,a,s,u,c){rt[t].fields.push({fieldName:mt(e),getterReturnType:r,getter:Nt(n,o),getterContext:i,setterArgumentType:a,setter:Nt(s,u),setterContext:c})},G:function(t,e){Tt(t,{isVoid:!0,name:e=mt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},x:function(){throw 1/0},i:Qt,r:function(t){return 0===t?te.toHandle(pe()):(t=void 0===(r=fe[e=t])?mt(e):r,te.toHandle(pe()[t]));var e,r},p:function(t){t>4&&(Zt[t].refcount+=1)},q:function(t,e,r,n){t=te.toValue(t);var o=he[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)(de,i,te.toHandle,(()=>E))}(e),he[e]=o),o(t,r,n)},s:function(t,e){var r=(t=de(t,"_emval_take_value")).readValueFromPointer(e);return te.toHandle(r)},j:function(){G("")},D:function(t,e,r){A.copyWithin(t,e,e+r)},y:function(t){var e,r=A.length,n=2147483648;if((t>>>=0)>n)return!1;for(var o=1;o<=4;o*=2){var i=r*(1+.2/o);if(i=Math.min(i,t+100663296),ye(Math.min(n,(e=Math.max(t,i))+(65536-e%65536)%65536)))return!0}return!1},z:function(t,e){var r=0;return ge().forEach((function(n,o){var i=e+r;E[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)_[e++>>0]=t.charCodeAt(n);_[e>>0]=0}(n,i),r+=n.length+1})),0},B:function(t,e){var r=ge();E[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),E[e>>2]=n,0},I:function(t,e){var r;r=t,V()||(i.onExit&&i.onExit(r),F=!0),p(r,new Q(r))},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=E[e>>2],s=E[e+4>>2];e+=8;for(var u=0;u<s;u++)we(t,A[a+u]);o+=s}return E[n>>2]=o,0},o:function(t,e){var r=Ae();try{return Vt(t)(e)}catch(t){if(ke(r),t!==t+0)throw t;_e(1,0)}},n:function(t,e,r){var n=Ae();try{return Vt(t)(e,r)}catch(t){if(ke(n),t!==t+0)throw t;_e(1,0)}},H:function(t,e,r,n){var o=Ae();try{return Vt(t)(e,r,n)}catch(t){if(ke(o),t!==t+0)throw t;_e(1,0)}},f:function(t,e){var r=Ae();try{Vt(t)(e)}catch(t){if(ke(r),t!==t+0)throw t;_e(1,0)}},e:function(t,e,r,n){var o=Ae();try{Vt(t)(e,r,n)}catch(t){if(ke(o),t!==t+0)throw t;_e(1,0)}}},Pe=(function(){var t={a:Te};function e(t,e){var r,n=t.exports;i.asm=n,U((P=i.asm.K).buffer),H=i.asm.M,r=i.asm.L,B.unshift(r),function(t){if(z--,i.monitorRunDependencies&&i.monitorRunDependencies(z),0==z&&(null!==N&&(clearInterval(N),N=null),q)){var e=q;q=null,e()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!w&&(d||h)){if("function"==typeof fetch&&!K(J))return fetch(J,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+J+"'";return t.arrayBuffer()})).catch((function(){return Z(J)}));if(s)return new Promise((function(t,e){s(J,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return Z(J)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){T("failed to asynchronously prepare wasm: "+t),G(t)}))}if(z++,i.monitorRunDependencies&&i.monitorRunDependencies(z),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||Y(J)||K(J)||y||"function"!=typeof fetch?n(r):fetch(J,{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(Pe=i._malloc=i.asm.N).apply(null,arguments)}),Ce=i._free=function(){return(Ce=i._free=i.asm.O).apply(null,arguments)},$e=i.___getTypeName=function(){return($e=i.___getTypeName=i.asm.P).apply(null,arguments)},_e=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.Q).apply(null,arguments)},i._setThrew=function(){return(_e=i._setThrew=i.asm.R).apply(null,arguments)}),Ae=i.stackSave=function(){return(Ae=i.stackSave=i.asm.S).apply(null,arguments)},ke=i.stackRestore=function(){return(ke=i.stackRestore=i.asm.T).apply(null,arguments)},Se=i.stackAlloc=function(){return(Se=i.stackAlloc=i.asm.U).apply(null,arguments)},xe=i.___cxa_is_pointer_type=function(){return(xe=i.___cxa_is_pointer_type=i.asm.V).apply(null,arguments)};function Ee(t){function r(){be||(be=!0,i.calledRun=!0,F||(tt(B),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(),M.unshift(t);var t;tt(M)}()))}t=t||l,z>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),L.unshift(t);var t;tt(L)}(),z>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);I(t,e=Se(r),r)}return e},array:t=>{var e=Se(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=Ae()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return function(t){return 0!==c&&ke(c),function(t){return"string"===e?D(t):"boolean"===e?Boolean(t):t}(t)}(p)},q=function t(){be||Ee(),be||(q=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ee(),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,d="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,y="";if(h){var v=r(261),g=r(926);y=d?g.dirname(y)+"/":"//",a=(t,e)=>(t=J(t)?new URL(t):g.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=J(t)?new URL(t):g.normalize(t),v.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 Y))throw t})),process.on("unhandledRejection",(function(t){throw t})),i.inspect=function(){return"[Emscripten Module object]"}}else(p||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 m,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&&i.quit,i.wasmBinary&&(m=i.wasmBinary),i.noExitRuntime,"object"!=typeof WebAssembly&&z("no native wasm support detected");var P,C,$,_,A,k,S,x,E,O=!1,R="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&&R)return R.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 W(t,e){return t?F($,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,$,e,r)}function D(t){P=t,i.HEAP8=C=new Int8Array(t),i.HEAP16=_=new Int16Array(t),i.HEAP32=k=new Int32Array(t),i.HEAPU8=$=new Uint8Array(t),i.HEAPU16=A=new Uint16Array(t),i.HEAPU32=S=new Uint32Array(t),i.HEAPF32=x=new Float32Array(t),i.HEAPF64=E=new Float64Array(t)}i.INITIAL_MEMORY;var I,U=[],H=[],L=[],B=0,M=null,V=null;function z(t){i.onAbort&&i.onAbort(t),T(t="Aborted("+t+")"),O=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}var N,q;function G(t){return t.startsWith("data:application/octet-stream;base64,")}function J(t){return t.startsWith("file://")}function X(t){try{if(t==N&&m)return new Uint8Array(m);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){z(t)}}function Y(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function K(t){for(;t.length>0;)t.shift()(i)}function Z(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){S[this.ptr+4>>2]=t},this.get_type=function(){return S[this.ptr+4>>2]},this.set_destructor=function(t){S[this.ptr+8>>2]=t},this.get_destructor=function(){return S[this.ptr+8>>2]},this.set_refcount=function(t){k[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,C[this.ptr+12>>0]=t},this.get_caught=function(){return 0!=C[this.ptr+12>>0]},this.set_rethrown=function(t){t=t?1:0,C[this.ptr+13>>0]=t},this.get_rethrown=function(){return 0!=C[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=k[this.ptr>>2];k[this.ptr>>2]=t+1},this.release_ref=function(){var t=k[this.ptr>>2];return k[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){S[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return S[this.ptr+16>>2]},this.get_exception_ptr=function(){if(_e(this.get_type()))return S[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}G(N="openjpegwasm_decode.wasm")||(q=N,N=i.locateFile?i.locateFile(q,y):y+q);var Q={};function tt(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function et(t){return this.fromWireType(k[t>>2])}var rt={},nt={},ot={},it=48,at=57;function st(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=it&&e<=at?"_"+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)mt(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 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 ht=void 0;function yt(t){for(var e="",r=t;$[r];)e+=ht[$[r++]];return e}var vt=void 0;function gt(t){throw new vt(t)}function mt(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'),nt.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;gt("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 wt(t){gt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var bt=!1;function Tt(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 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={};var _t=[];function At(){for(;_t.length;){var t=_t.pop();t.$$.deleteScheduled=!1,t.delete()}}var kt=void 0;var St={};function xt(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},Et(Object.create(t,{$$:{value:e}}))}function Et(t){return"undefined"==typeof FinalizationRegistry?(Et=t=>t,t):(bt=new FinalizationRegistry((t=>{Pt(t.$$)})),Et=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};bt.register(t,r,t)}return t},Tt=t=>bt.unregister(t),Et(t))}function Ot(){}function Rt(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 Ft(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 Wt(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 jt(t,e){if(null===e)return this.isReference&>("null is not a valid "+this.name),0;e.$$||gt('Cannot pass "'+Zt(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 Wt(e.$$.ptr,r,this.registeredClass)}function Dt(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 "'+Zt(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=Wt(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,Kt.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:gt("Unsupporting sharing policy")}return r}function It(t,e){if(null===e)return this.isReference&>("null is not a valid "+this.name),0;e.$$||gt('Cannot pass "'+Zt(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 Wt(e.$$.ptr,r,this.registeredClass)}function Ut(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=Dt:n?(this.toWireType=jt,this.destructorFunction=null):(this.toWireType=It,this.destructorFunction=null)}var Ht=[];function Lt(t){var e=Ht[t];return e||(t>=Ht.length&&(Ht.length=t+1),Ht[t]=e=I.get(t)),e}function Bt(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):Lt(e).apply(null,r)}function Mt(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),Bt(r,n,o)}):Lt(e);return"function"!=typeof i&>("unknown function pointer with signature "+t+": "+e),i}var Vt=void 0;function zt(t){var e=Te(t),r=yt(e);return be(e),r}function Nt(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 Vt(t+": "+r.map(zt).join([", "]))}function qt(t,e){for(var r=[],n=0;n<t;n++)r.push(S[e+4*n>>2]);return r}function Gt(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 "+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 d=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[gt,n,o,tt,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+e[u+2].name+"\n",h.push("argType"+u),y.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 v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=v+"_dtor("+v+"); // "+e[u].name+"\n",h.push(v+"_dtor"),y.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.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,h).apply(null,y)}var Jt=[],Xt=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Yt(t){t>4&&0==--Xt[t].refcount&&(Xt[t]=void 0,Jt.push(t))}var Kt={toValue:t=>(t||gt("Cannot use deleted val. handle = "+t),Xt[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=Jt.length?Jt.pop():Xt.length;return Xt[e]={refcount:1,value:t},e}}};function Zt(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function Qt(t,e){switch(e){case 2:return function(t){return this.fromWireType(x[t>>2])};case 3:return function(t){return this.fromWireType(E[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function te(t,e,r){switch(e){case 0:return r?function(t){return C[t]}:function(t){return $[t]};case 1:return r?function(t){return _[t>>1]}:function(t){return A[t>>1]};case 2:return r?function(t){return k[t>>2]}:function(t){return S[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var ee="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function re(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&A[n];)++n;if((r=n<<1)-t>32&&ee)return ee.decode($.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 ne(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 oe(t){return 2*t.length}function ie(t,e){for(var r=0,n="";!(r>=e/4);){var o=k[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 ae(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)),k[e>>2]=a,(e+=4)+4>o)break}return k[e>>2]=0,e-n}function se(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 ue={};function ce(){return"object"==typeof globalThis?globalThis:Function("return this")()}function le(t,e){var r=nt[t];return void 0===r&>(e+" has unknown type "+zt(t)),r}var fe={};function pe(t){try{return w.grow(t-P.byteLength+65535>>>16),D(w.buffer),1}catch(t){}}var de={};function he(){if(!he.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 de)void 0===de[e]?delete t[e]:t[e]=de[e];var r=[];for(var e in t)r.push(e+"="+t[e]);he.strings=r}return he.strings}var ye=[null,[],[]];function ve(t,e){var r=ye[t];0===e||10===e?((1===t?b:T)(F(r,0)),r.length=0):r.push(e)}lt=i.InternalError=ct(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);ht=t}(),vt=i.BindingError=ct(Error,"BindingError"),Ot.prototype.isAliasOf=function(t){if(!(this instanceof Ot))return!1;if(!(t instanceof Ot))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},Ot.prototype.clone=function(){if(this.$$.ptr||wt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Et(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},Ot.prototype.delete=function(){this.$$.ptr||wt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&>("Object already scheduled for deletion"),Tt(this),Pt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},Ot.prototype.isDeleted=function(){return!this.$$.ptr},Ot.prototype.deleteLater=function(){return this.$$.ptr||wt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&>("Object already scheduled for deletion"),_t.push(this),1===_t.length&&kt&&kt(At),this.$$.deleteScheduled=!0,this},i.getInheritedInstanceCount=function(){return Object.keys(St).length},i.getLiveInheritedInstances=function(){var t=[];for(var e in St)St.hasOwnProperty(e)&&t.push(St[e]);return t},i.flushPendingDeletes=At,i.setDelayFunction=function(t){kt=t,_t.length&&kt&&kt(At)},Ut.prototype.getPointee=function(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},Ut.prototype.destructor=function(t){this.rawDestructor&&this.rawDestructor(t)},Ut.prototype.argPackAdvance=8,Ut.prototype.readValueFromPointer=et,Ut.prototype.deleteObject=function(t){null!==t&&t.delete()},Ut.prototype.fromWireType=function(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=function(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),St[e]}(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=$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?xt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):xt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})},Vt=i.UnboundTypeError=ct(Error,"UnboundTypeError"),i.count_emval_handles=function(){for(var t=0,e=5;e<Xt.length;++e)void 0!==Xt[e]&&++t;return t},i.get_first_emval=function(){for(var t=5;t<Xt.length;++t)if(void 0!==Xt[t])return Xt[t];return null};var ge,me={D:function(t,e,r){throw new Z(t).init(e,r),t},e:function(t){var e=Q[t];delete Q[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)),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=dt(r);mt(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=C;else if(2===r)n=_;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=k}return this.fromWireType(n[t>>i])},destructorFunction:null})},r:function(t,e,r,n,o,a,s,u,c,l,f,p,d){f=yt(f),a=Mt(o,a),u&&(u=Mt(s,u)),l&&(l=Mt(c,l)),d=Mt(p,d);var h=st(f);!function(t,e,r){i.hasOwnProperty(t)?(gt("Cannot register public name '"+t+"' twice"),Rt(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}(h,(function(){Nt("Cannot construct "+f+" 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:Ot.prototype;var s=ut(h,(function(){if(Object.getPrototypeOf(this)!==c)throw new vt("Use 'new' to construct "+f);if(void 0===p.constructor_body)throw new vt(f+" has no accessible constructor");var t=p.constructor_body[arguments.length];if(void 0===t)throw new vt("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 Ft(f,s,c,d,r,a,u,l),y=new Ut(f,p,!0,!1,!1),v=new Ut(f+"*",p,!1,!1,!1),g=new Ut(f+" const*",p,!1,!0,!1);return $t[t]={pointerType:v,constPointerType:g},function(t,e,r){i.hasOwnProperty(t)||ft("Replacing nonexistant public symbol"),i[t].overloadTable,i[t]=e,i[t].argCount=r}(h,s),[y,v,g]}))},q:function(t,e,r,n,o,i){e>0||z(undefined);var a=qt(e,r);o=Mt(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 vt("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]=()=>{Nt("Cannot construct "+t.name+" due to unbound types",a)},pt([],a,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=Gt(r,n,null,o,i),[]})),[]}))},b:function(t,e,r,n,o,i,a,s){var u=qt(r,n);e=yt(e),i=Mt(o,i),pt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){Nt("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):(Rt(c,e,n),c[e].overloadTable[r-2]=o),pt([],u,(function(o){var s=Gt(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){mt(t,{name:e=yt(e),fromWireType:function(t){var e=Kt.toValue(t);return Yt(t),e},toWireType:function(t,e){return Kt.toHandle(e)},argPackAdvance:8,readValueFromPointer:et,destructorFunction:null})},l:function(t,e,r){var n=dt(r);mt(t,{name:e=yt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:Qt(e,n),destructorFunction:null})},d: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");mt(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:te(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=S,r=e[t>>=2],o=e[t+1];return new n(P,o,r)}mt(t,{name:r=yt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},k:function(t,e){var r="std::string"===(e=yt(e));mt(t,{name:e,fromWireType:function(t){var e,n=S[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==$[s]){var u=W(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($[o+a]);e=c.join("")}return be(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=we(4+n+1),a=i+4;if(S[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&&(be(a),gt("String has UTF-16 code units that do not fit in 8 bits")),$[a+s]=u}else for(s=0;s<n;++s)$[a+s]=e[s];return null!==t&&t.push(be,i),i},argPackAdvance:8,readValueFromPointer:et,destructorFunction:function(t){be(t)}})},f:function(t,e,r){var n,o,i,a,s;r=yt(r),2===e?(n=re,o=ne,a=oe,i=()=>A,s=1):4===e&&(n=ie,o=ae,a=se,i=()=>S,s=2),mt(t,{name:r,fromWireType:function(t){for(var r,o=S[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 be(t),r},toWireType:function(t,n){"string"!=typeof n&>("Cannot pass non-string to C++ string type "+r);var i=a(n),u=we(4+i+e);return S[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(be,u),u},argPackAdvance:8,readValueFromPointer:et,destructorFunction:function(t){be(t)}})},g:function(t,e,r,n,o,i){Q[t]={name:yt(e),rawConstructor:Mt(r,n),rawDestructor:Mt(o,i),fields:[]}},c:function(t,e,r,n,o,i,a,s,u,c){Q[t].fields.push({fieldName:yt(e),getterReturnType:r,getter:Mt(n,o),getterContext:i,setterArgumentType:a,setter:Mt(s,u),setterContext:c})},C:function(t,e){mt(t,{isVoid:!0,name:e=yt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},h:Yt,o:function(t){return 0===t?Kt.toHandle(ce()):(t=void 0===(r=ue[e=t])?yt(e):r,Kt.toHandle(ce()[t]));var e,r},m:function(t){t>4&&(Xt[t].refcount+=1)},n:function(t,e,r,n){t=Kt.toValue(t);var o=fe[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)(le,i,Kt.toHandle,(()=>S))}(e),fe[e]=o),o(t,r,n)},p:function(t,e){var r=(t=le(t,"_emval_take_value")).readValueFromPointer(e);return Kt.toHandle(r)},i:function(){z("")},v:function(){return 2147483648},z:function(t,e,r){$.copyWithin(t,e,e+r)},u:function(t){var e,r=$.length,n=2147483648;if((t>>>=0)>n)return!1;for(var o=1;o<=4;o*=2){var i=r*(1+.2/o);if(i=Math.min(i,t+100663296),pe(Math.min(n,(e=Math.max(t,i))+(65536-e%65536)%65536)))return!0}return!1},w:function(t,e){var r=0;return he().forEach((function(n,o){var i=e+r;S[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)C[e++>>0]=t.charCodeAt(n);C[e>>0]=0}(n,i),r+=n.length+1})),0},x:function(t,e){var r=he();S[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),S[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=S[e>>2],s=S[e+4>>2];e+=8;for(var u=0;u<s;u++)ve(t,$[a+u]);o+=s}return S[n>>2]=o,0}},we=(function(){var t={a:me};function e(t,e){var r,n=t.exports;i.asm=n,D((w=i.asm.E).buffer),I=i.asm.G,r=i.asm.F,H.unshift(r),function(t){if(B--,i.monitorRunDependencies&&i.monitorRunDependencies(B),0==B&&(null!==M&&(clearInterval(M),M=null),V)){var e=V;V=null,e()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!m&&(p||d)){if("function"==typeof fetch&&!J(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 X(N)}));if(s)return new Promise((function(t,e){s(N,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return X(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),z(t)}))}if(B++,i.monitorRunDependencies&&i.monitorRunDependencies(B),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){T("Module.instantiateWasm callback failed with error: "+t),o(t)}(m||"function"!=typeof WebAssembly.instantiateStreaming||G(N)||J(N)||h||"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.F).apply(null,arguments)},i._malloc=function(){return(we=i._malloc=i.asm.H).apply(null,arguments)}),be=i._free=function(){return(be=i._free=i.asm.I).apply(null,arguments)},Te=i.___getTypeName=function(){return(Te=i.___getTypeName=i.asm.J).apply(null,arguments)},Pe=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.K).apply(null,arguments)},i.stackSave=function(){return(Pe=i.stackSave=i.asm.L).apply(null,arguments)}),Ce=i.stackRestore=function(){return(Ce=i.stackRestore=i.asm.M).apply(null,arguments)},$e=i.stackAlloc=function(){return($e=i.stackAlloc=i.asm.N).apply(null,arguments)},_e=i.___cxa_is_pointer_type=function(){return(_e=i.___cxa_is_pointer_type=i.asm.O).apply(null,arguments)};function Ae(t){function r(){ge||(ge=!0,i.calledRun=!0,O||(K(H),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(),L.unshift(t);var t;K(L)}()))}t=t||l,B>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;K(U)}(),B>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);j(t,e=$e(r),r)}return e},array:t=>{var e=$e(t.length);return function(t,e){C.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=Pe()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return function(t){return 0!==c&&Ce(c),function(t){return"string"===e?W(t):"boolean"===e?Boolean(t):t}(t)}(p)},V=function t(){ge||Ae(),ge||(V=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ae(),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,d="";if(p){var h=r(280),y=r(103);d=f?y.dirname(d)+"/":"//",i=(t,e)=>(t=q(t)?new URL(t):y.normalize(t),h.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):y.normalize(t),h.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 J))throw t})),process.on("unhandledRejection",(function(t){throw t})),t.inspect=function(){return"[Emscripten Module object]"}}else(l||f)&&(f?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):"",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 v,g,m=t.print||console.log.bind(console),w=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&&(v=t.wasmBinary),t.noExitRuntime,"object"!=typeof WebAssembly&&M("no native wasm support detected");var b,T,P,C,$,_,A,k,S,x=!1,E="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function O(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&E)return E.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 R(t,e){return t?O(P,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,P,e,r)}function W(e){b=e,t.HEAP8=T=new Int8Array(e),t.HEAP16=C=new Int16Array(e),t.HEAP32=_=new Int32Array(e),t.HEAPU8=P=new Uint8Array(e),t.HEAPU16=$=new Uint16Array(e),t.HEAPU32=A=new Uint32Array(e),t.HEAPF32=k=new Float32Array(e),t.HEAPF64=S=new Float64Array(e)}t.INITIAL_MEMORY;var j,D=[],I=[],U=[],H=0,L=null,B=null;function M(e){t.onAbort&&t.onAbort(e),w(e="Aborted("+e+")"),x=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw o(r),r}var V,z;function N(t){return t.startsWith("data:application/octet-stream;base64,")}function q(t){return t.startsWith("file://")}function G(t){try{if(t==V&&v)return new Uint8Array(v);if(s)return s(t);throw"both async and sync fetching of the wasm failed"}catch(t){M(t)}}function J(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function X(e){for(;e.length>0;)e.shift()(t)}N(V="openjphjs.wasm")||(z=V,V=t.locateFile?t.locateFile(z,d):d+z);var Y=[],K=0,Z=[];function Q(t){var e=Z[t];return e||(t>=Z.length&&(Z.length=t+1),Z[t]=e=j.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($e(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={},st=48,ut=57;function ct(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=st&&e<=ut?"_"+t:t}function lt(t,e){return t=ct(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function ft(t,e){var r=lt(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 pt=void 0;function dt(t){throw new pt(t)}function ht(t,e,r){function n(e){var n=r(e);n.length!==t.length&&dt("Mismatched type converter count");for(var o=0;o<t.length;++o)bt(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 yt(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 gt(t){for(var e="",r=t;P[r];)e+=vt[P[r++]];return e}var mt=void 0;function wt(t){throw new mt(t)}function bt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||wt('type "'+n+'" must have a positive integer typeid pointer'),it.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;wt("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 Tt(t){wt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var Pt=!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 _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={};var kt=[];function St(){for(;kt.length;){var t=kt.pop();t.$$.deleteScheduled=!1,t.delete()}}var xt=void 0;var Et={};function Ot(t,e){return e.ptrType&&e.ptr||dt("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&dt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Rt(Object.create(t,{$$:{value:e}}))}function Rt(t){return"undefined"==typeof FinalizationRegistry?(Rt=t=>t,t):(Pt=new FinalizationRegistry((t=>{$t(t.$$)})),Rt=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};Pt.register(t,r,t)}return t},Ct=t=>Pt.unregister(t),Rt(t))}function Ft(){}function Wt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||wt("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 jt(e,r,n){t.hasOwnProperty(e)?((void 0===n||void 0!==t[e].overloadTable&&void 0!==t[e].overloadTable[n])&&wt("Cannot register public name '"+e+"' twice"),Wt(t,e,e),t.hasOwnProperty(n)&&wt("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 Dt(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 It(t,e,r){for(;e!==r;)e.upcast||wt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Ut(t,e){if(null===e)return this.isReference&&wt("null is not a valid "+this.name),0;e.$$||wt('Cannot pass "'+te(e)+'" as a '+this.name),e.$$.ptr||wt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return It(e.$$.ptr,r,this.registeredClass)}function Ht(t,e){var r;if(null===e)return this.isReference&&wt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||wt('Cannot pass "'+te(e)+'" as a '+this.name),e.$$.ptr||wt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&wt("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=It(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&wt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:wt("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,Qt.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:wt("Unsupporting sharing policy")}return r}function Lt(t,e){if(null===e)return this.isReference&&wt("null is not a valid "+this.name),0;e.$$||wt('Cannot pass "'+te(e)+'" as a '+this.name),e.$$.ptr||wt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&wt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return It(e.$$.ptr,r,this.registeredClass)}function Bt(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=Ht:n?(this.toWireType=Ut,this.destructorFunction=null):(this.toWireType=Lt,this.destructorFunction=null)}function Mt(e,r,n){t.hasOwnProperty(e)||dt("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 Vt(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):Q(r).apply(null,n)}function zt(t,e){var r,n,o,i=(t=gt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),Vt(r,n,o)}):Q(e);return"function"!=typeof i&&wt("unknown function pointer with signature "+t+": "+e),i}var Nt=void 0;function qt(t){var e=me(t),r=gt(e);return ge(e),r}function Gt(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 Nt(t+": "+r.map(qt).join([", "]))}function Jt(t,e){for(var r=[],n=0;n<t;n++)r.push(A[e+4*n>>2]);return r}function Xt(t,e,r,n,o){var i=e.length;i<2&&wt("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 "+ct(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 d=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[wt,n,o,rt,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+e[u+2].name+"\n",h.push("argType"+u),y.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 v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=v+"_dtor("+v+"); // "+e[u].name+"\n",h.push(v+"_dtor"),y.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.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=lt(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,h).apply(null,y)}var Yt=[],Kt=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Zt(t){t>4&&0==--Kt[t].refcount&&(Kt[t]=void 0,Yt.push(t))}var Qt={toValue:t=>(t||wt("Cannot use deleted val. handle = "+t),Kt[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=Yt.length?Yt.pop():Kt.length;return Kt[e]={refcount:1,value:t},e}}};function te(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function ee(t,e){switch(e){case 2:return function(t){return this.fromWireType(k[t>>2])};case 3:return function(t){return this.fromWireType(S[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function re(t,e,r){switch(e){case 0:return r?function(t){return T[t]}:function(t){return P[t]};case 1:return r?function(t){return C[t>>1]}:function(t){return $[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 ne="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function oe(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&$[n];)++n;if((r=n<<1)-t>32&&ne)return ne.decode(P.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=C[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function ie(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);C[e>>1]=a,e+=2}return C[e>>1]=0,e-n}function ae(t){return 2*t.length}function se(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 ue(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 le(t){try{return g.grow(t-b.byteLength+65535>>>16),W(g.buffer),1}catch(t){}}var fe=[null,[],[]];function pe(t,e){var r=fe[t];0===e||10===e?((1===t?m:w)(O(r,0)),r.length=0):r.push(e)}pt=t.InternalError=ft(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);vt=t}(),mt=t.BindingError=ft(Error,"BindingError"),Ft.prototype.isAliasOf=function(t){if(!(this instanceof Ft))return!1;if(!(t instanceof Ft))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},Ft.prototype.clone=function(){if(this.$$.ptr||Tt(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},Ft.prototype.delete=function(){this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&wt("Object already scheduled for deletion"),Ct(this),$t(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},Ft.prototype.isDeleted=function(){return!this.$$.ptr},Ft.prototype.deleteLater=function(){return this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&wt("Object already scheduled for deletion"),kt.push(this),1===kt.length&&xt&&xt(St),this.$$.deleteScheduled=!0,this},t.getInheritedInstanceCount=function(){return Object.keys(Et).length},t.getLiveInheritedInstances=function(){var t=[];for(var e in Et)Et.hasOwnProperty(e)&&t.push(Et[e]);return t},t.flushPendingDeletes=St,t.setDelayFunction=function(t){xt=t,kt.length&&xt&&xt(St)},Bt.prototype.getPointee=function(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},Bt.prototype.destructor=function(t){this.rawDestructor&&this.rawDestructor(t)},Bt.prototype.argPackAdvance=8,Bt.prototype.readValueFromPointer=nt,Bt.prototype.deleteObject=function(t){null!==t&&t.delete()},Bt.prototype.fromWireType=function(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=function(t,e){return e=function(t,e){for(void 0===e&&wt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Et[e]}(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=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?Ot(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):Ot(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})},Nt=t.UnboundTypeError=ft(Error,"UnboundTypeError"),t.count_emval_handles=function(){for(var t=0,e=5;e<Kt.length;++e)void 0!==Kt[e]&&++t;return t},t.get_first_emval=function(){for(var t=5;t<Kt.length;++t)if(void 0!==Kt[t])return Kt[t];return null};var de,he={M:function(t){var e=new tt(t);return e.get_caught()||e.set_caught(!0),e.set_rethrown(!1),Y.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&&Q(e)(t.excPtr),ve(t.excPtr)}}(Y.pop()),K=0},c:function(){var t=K;if(!t)return we(0),0;var e=new tt(t);e.set_adjusted_ptr(t);var r=e.get_type();if(!r)return we(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(Ce(o,r,i))return we(o),t}return we(r),t},j:function(){var t=K;if(!t)return we(0),0;var e=new tt(t);e.set_adjusted_ptr(t);var r=e.get_type();if(!r)return we(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(Ce(o,r,i))return we(o),t}return we(r),t},i:function(t,e,r){throw new tt(t).init(e,r),K=t,t},f:function(t){throw K||(K=t),t},B:function(t){var e=et[t];delete et[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)),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}]}))},E:function(t,e,r,n,o){},J:function(t,e,r,n,o){var i=yt(r);bt(t,{name:e=gt(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=C;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=_}return this.fromWireType(n[t>>i])},destructorFunction:null})},z:function(t,e,r,n,o,i,a,s,u,c,l,f,p){l=gt(l),i=zt(o,i),s&&(s=zt(a,s)),c&&(c=zt(u,c)),p=zt(f,p);var d=ct(l);jt(d,(function(){Gt("Cannot construct "+l+" 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:Ft.prototype;var a=lt(d,(function(){if(Object.getPrototypeOf(this)!==u)throw new mt("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new mt(l+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new mt("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 Dt(l,a,u,p,r,i,s,c),h=new Bt(l,f,!0,!1,!1),y=new Bt(l+"*",f,!1,!1,!1),v=new Bt(l+" const*",f,!1,!0,!1);return At[t]={pointerType:y,constPointerType:v},Mt(d,a),[h,y,v]}))},y:function(t,e,r,n,o,i){e>0||M(undefined);var a=Jt(e,r);o=zt(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]=()=>{Gt("Cannot construct "+t.name+" due to unbound types",a)},ht([],a,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=Xt(r,n,null,o,i),[]})),[]}))},a:function(t,e,r,n,o,i,a,s){var u=Jt(r,n);e=gt(e),i=zt(o,i),ht([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){Gt("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):(Wt(c,e,n),c[e].overloadTable[r-2]=o),ht([],u,(function(o){var s=Xt(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},I:function(t,e){bt(t,{name:e=gt(e),fromWireType:function(t){var e=Qt.toValue(t);return Zt(t),e},toWireType:function(t,e){return Qt.toHandle(e)},argPackAdvance:8,readValueFromPointer:nt,destructorFunction:null})},u:function(t,e,r){var n=yt(r);bt(t,{name:e=gt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:ee(e,n),destructorFunction:null})},o:function(t,e,r,n,o,i){var a=Jt(e,r);t=gt(t),o=zt(n,o),jt(t,(function(){Gt("Cannot call "+t+" due to unbound types",a)}),e-1),ht([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return Mt(t,Xt(t,n,null,o,i),e-1),[]}))},h:function(t,e,r,n,o){e=gt(e),-1===o&&(o=4294967295);var i=yt(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");bt(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:re(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)}bt(t,{name:r=gt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},t:function(t,e){var r="std::string"===(e=gt(e));bt(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==P[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(P[o+a]);e=c.join("")}return ge(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||wt("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=ye(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&&(ge(a),wt("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(ge,i),i},argPackAdvance:8,readValueFromPointer:nt,destructorFunction:function(t){ge(t)}})},q:function(t,e,r){var n,o,i,a,s;r=gt(r),2===e?(n=oe,o=ie,a=ae,i=()=>$,s=1):4===e&&(n=se,o=ue,a=ce,i=()=>A,s=2),bt(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 ge(t),r},toWireType:function(t,n){"string"!=typeof n&&wt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=ye(4+i+e);return A[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(ge,u),u},argPackAdvance:8,readValueFromPointer:nt,destructorFunction:function(t){ge(t)}})},p:function(t,e,r,n,o,i){et[t]={name:gt(e),rawConstructor:zt(r,n),rawDestructor:zt(o,i),fields:[]}},C:function(t,e,r,n,o,i,a,s,u,c){et[t].fields.push({fieldName:gt(e),getterReturnType:r,getter:zt(n,o),getterContext:i,setterArgumentType:a,setter:zt(s,u),setterContext:c})},K:function(t,e){bt(t,{isVoid:!0,name:e=gt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},O:Zt,P:function(t){t>4&&(Kt[t].refcount+=1)},n:function(t,e){var r,n;void 0===(n=it[r=t])&&wt("_emval_take_value has unknown type "+qt(r));var o=(t=n).readValueFromPointer(e);return Qt.toHandle(o)},r:function(){M("")},H:function(t,e,r){P.copyWithin(t,e,e+r)},F:function(t){var e,r=P.length,n=2147483648;if((t>>>=0)>n)return!1;for(var o=1;o<=4;o*=2){var i=r*(1+.2/o);if(i=Math.min(i,t+100663296),le(Math.min(n,(e=Math.max(t,i))+(65536-e%65536)%65536)))return!0}return!1},G:function(t){return 52},D: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++)pe(t,P[a+u]);o+=s}return A[n>>2]=o,0},b:function(t,e){var r=be();try{return Q(t)(e)}catch(t){if(Te(r),t!==t+0)throw t;_setThrew(1,0)}},A:function(t,e,r){var n=be();try{return Q(t)(e,r)}catch(t){if(Te(n),t!==t+0)throw t;_setThrew(1,0)}},w:function(t,e,r,n){var o=be();try{return Q(t)(e,r,n)}catch(t){if(Te(o),t!==t+0)throw t;_setThrew(1,0)}},e:function(t,e){var r=be();try{Q(t)(e)}catch(t){if(Te(r),t!==t+0)throw t;_setThrew(1,0)}},k:function(t,e,r){var n=be();try{Q(t)(e,r)}catch(t){if(Te(n),t!==t+0)throw t;_setThrew(1,0)}},l:function(t,e,r,n){var o=be();try{Q(t)(e,r,n)}catch(t){if(Te(o),t!==t+0)throw t;_setThrew(1,0)}},x:function(t,e,r,n,o){var i=be();try{Q(t)(e,r,n,o)}catch(t){if(Te(i),t!==t+0)throw t;_setThrew(1,0)}},L:function(t,e,r,n,o,i,a){var s=be();try{Q(t)(e,r,n,o,i,a)}catch(t){if(Te(s),t!==t+0)throw t;_setThrew(1,0)}},m:function(t,e,r,n,o,i,a,s){var u=be();try{Q(t)(e,r,n,o,i,a,s)}catch(t){if(Te(u),t!==t+0)throw t;_setThrew(1,0)}},g:function(t,e,r,n,o,i,a,s,u,c,l){var f=be();try{Q(t)(e,r,n,o,i,a,s,u,c,l)}catch(t){if(Te(f),t!==t+0)throw t;_setThrew(1,0)}},N:function(t){return t}},ye=(function(){var e={a:he};function r(e,r){var n,o=e.exports;t.asm=o,W((g=t.asm.Q).buffer),j=t.asm.U,n=t.asm.R,I.unshift(n),function(e){if(H--,t.monitorRunDependencies&&t.monitorRunDependencies(H),0==H&&(null!==L&&(clearInterval(L),L=null),B)){var r=B;B=null,r()}}()}function n(t){r(t.instance)}function i(t){return function(){if(!v&&(l||f)){if("function"==typeof fetch&&!q(V))return fetch(V,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+V+"'";return t.arrayBuffer()})).catch((function(){return G(V)}));if(a)return new Promise((function(t,e){a(V,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return G(V)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(t){return t})).then(t,(function(t){w("failed to asynchronously prepare wasm: "+t),M(t)}))}if(H++,t.monitorRunDependencies&&t.monitorRunDependencies(H),t.instantiateWasm)try{return t.instantiateWasm(e,r)}catch(t){w("Module.instantiateWasm callback failed with error: "+t),o(t)}(v||"function"!=typeof WebAssembly.instantiateStreaming||N(V)||q(V)||p||"function"!=typeof fetch?i(n):fetch(V,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(t){return w("wasm streaming compile failed: "+t),w("falling back to ArrayBuffer instantiation"),i(n)}))}))).catch(o)}(),t.___wasm_call_ctors=function(){return(t.___wasm_call_ctors=t.asm.R).apply(null,arguments)},t._malloc=function(){return(ye=t._malloc=t.asm.S).apply(null,arguments)}),ve=t.___cxa_free_exception=function(){return(ve=t.___cxa_free_exception=t.asm.T).apply(null,arguments)},ge=t._free=function(){return(ge=t._free=t.asm.V).apply(null,arguments)},me=t.___getTypeName=function(){return(me=t.___getTypeName=t.asm.W).apply(null,arguments)},we=(t.__embind_initialize_bindings=function(){return(t.__embind_initialize_bindings=t.asm.X).apply(null,arguments)},t.setTempRet0=function(){return(we=t.setTempRet0=t.asm.Y).apply(null,arguments)}),be=t.stackSave=function(){return(be=t.stackSave=t.asm.Z).apply(null,arguments)},Te=t.stackRestore=function(){return(Te=t.stackRestore=t.asm._).apply(null,arguments)},Pe=t.stackAlloc=function(){return(Pe=t.stackAlloc=t.asm.$).apply(null,arguments)},Ce=t.___cxa_can_catch=function(){return(Ce=t.___cxa_can_catch=t.asm.aa).apply(null,arguments)},$e=t.___cxa_is_pointer_type=function(){return($e=t.___cxa_is_pointer_type=t.asm.ba).apply(null,arguments)};function _e(r){function n(){de||(de=!0,t.calledRun=!0,x||(X(I),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(),U.unshift(e);var e;X(U)}()))}r=r||c,H>0||(function(){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)e=t.preRun.shift(),D.unshift(e);var e;X(D)}(),H>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.ca).apply(null,arguments)},t.dynCall_iiji=function(){return(t.dynCall_iiji=t.asm.da).apply(null,arguments)},t.dynCall_jiji=function(){return(t.dynCall_jiji=t.asm.ea).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=Pe(r),r)}return e},array:t=>{var e=Pe(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=be()),u[l]=f(o[l])):u[l]=o[l]}var p=s.apply(null,u);return function(t){return 0!==c&&Te(c),function(t){return"string"===r?R(t):"boolean"===r?Boolean(t):t}(t)}(p)},B=function t(){de||_e(),de||(B=t)},t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();return _e(),t.ready});t.exports=o},716:()=>{},401:()=>{},491:()=>{},33:()=>{},261:()=>{},926:()=>{},280:()=>{},103:()=>{}},n={};function o(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return r[t].call(i.exports,i,i.exports,o),i.exports}o.m=r,o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,o.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var i=Object.create(null);o.r(i);var a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&n&&r;"object"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((t=>a[t]=()=>r[t]));return a.default=()=>r,o.d(i,a),i},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,r)=>(o.f[r](t,e),e)),[])),o.u=t=>t+".min.worker.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&!t;)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{var t={362:1};o.f.i=(e,r)=>{t[e]||importScripts(o.p+o.u(e))};var e=self.webpackChunk=self.webpackChunk||[],r=e.push.bind(e);e.push=e=>{var[n,i,a]=e;for(var s in i)o.o(i,s)&&(o.m[s]=i[s]);for(a&&a(o);n.length;)t[n.pop()]=1;r(e)}})(),(()=>{"use strict";const t={};let e,r=!1;function n(n){if(t[n.taskType])return console.log('attempt to register duplicate task handler "',n.taskType,'"'),!1;t[n.taskType]=n,r&&n.initialize(e.taskConfiguration)}self.onmessage=async function(o){if(o.data.taskType)if("initialize"!==o.data.taskType){if("loadWebWorkerTask"===o.data.taskType)return i=o.data,e=i.config,void self.importScripts(i.sourcePath);var i;if(t[o.data.taskType])try{t[o.data.taskType].handler(o.data,(function(t,e){self.postMessage({taskType:o.data.taskType,status:"success",result:t,workerIndex:o.data.workerIndex},e)}))}catch(t){console.log(`task ${o.data.taskType} failed - ${t.message}`,t),self.postMessage({taskType:o.data.taskType,status:"failed",result:t.message,workerIndex:o.data.workerIndex})}else console.log("no task handler for ",o.data.taskType),console.log(t),self.postMessage({taskType:o.data.taskType,status:"failed - no task handler registered",workerIndex:o.data.workerIndex})}else!function(o){if(!r){if(e=o.config,self.registerTaskHandler=n,o.config.webWorkerTaskPaths)for(let t=0;t<o.config.webWorkerTaskPaths.length;t++)self.importScripts(o.config.webWorkerTaskPaths[t]);Object.keys(t).forEach((function(r){t[r].initialize(e.taskConfiguration)})),self.postMessage({taskType:"initialize",status:"success",result:{},workerIndex:o.workerIndex}),r=!0}}(o.data);else console.log(o.data)};var i=o(272),a=o.n(i);const s=o.p+"65916ef3def695744bda.wasm",u={codec:void 0,decoder:void 0,decodeConfig:{}};function c(t){if(u.decodeConfig=t,u.codec)return Promise.resolve();const e=a()({locateFile:t=>t.endsWith(".wasm")?s.toString():t});return new Promise(((t,r)=>{e.then((e=>{u.codec=e,u.decoder=new e.J2KDecoder,t()}),r)}))}const l=async function(t,e){await c();const r=u.decoder,n=r.getEncodedBuffer(t.length);n.set(t),r.decode();const o=r.getFrameInfo(),i=r.getDecodedBuffer();new Uint8Array(i.length).set(i);const a=`x: ${r.getImageOffset().x}, y: ${r.getImageOffset().y}`,s=r.getNumDecompositions(),l=r.getNumLayers(),f=["unknown","LRCP","RLCP","RPCL","PCRL","CPRL"][r.getProgressionOrder()+1],p=r.getIsReversible(),d=`${r.getBlockDimensions().width} x ${r.getBlockDimensions().height}`,h=`${r.getTileSize().width} x ${r.getTileSize().height}`,y=`${r.getTileOffset().x}, ${r.getTileOffset().y}`,v=r.getColorSpace(),g=`${i.length.toLocaleString()} bytes`,m=`${(i.length/n.length).toFixed(2)}:1`,w={columns:o.width,rows:o.height,bitsPerPixel:o.bitsPerSample,signed:o.isSigned,bytesPerPixel:e.bytesPerPixel,componentsPerPixel:o.componentCount},b=function(t,e){return t.bitsPerSample>8?t.isSigned?new Int16Array(e.buffer,e.byteOffset,e.byteLength/2):new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2):t.isSigned?new Int8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}(o,i),T={imageOffset:a,numDecompositions:s,numLayers:l,progessionOrder:f,reversible:p,blockDimensions:d,tileSize:h,tileOffset:y,colorTransform:v,decodedSize:g,compressionRatio:m};return{...e,pixelData:b,imageInfo:w,encodeOptions:T,...T,...w}};var f=o(37),p=o.n(f);const d=o.p+"5004fdc02f329ce53b69.wasm",h={codec:void 0,decoder:void 0,decodeConfig:{}};function y(t){if(h.decodeConfig=t,h.codec)return Promise.resolve();const e=p()({locateFile:t=>t.endsWith(".wasm")?d.toString():t});return new Promise(((t,r)=>{e.then((e=>{h.codec=e,h.decoder=new e.JpegLSDecoder,t()}),r)}))}const v=function(t){let e,r=t[0],n=t[0];const o=t.length;for(let i=1;i<o;i++)e=t[i],r=Math.min(r,e),n=Math.max(n,e);return{min:r,max:n}};function g(t){return"number"==typeof t}var m=o(851),w=o.n(m);const b=o.p+"c22b37c3488e1d6c3aa4.wasm",T={codec:void 0,decoder:void 0},P={JpegImage:void 0,decodeConfig:{}},C=async function(t,e){if(await(P.decodeConfig=void 0,P.JpegImage?Promise.resolve():new Promise(((t,e)=>{o.e(945).then(o.t.bind(o,945,23)).then((e=>{let{JpegImage:r}=e;P.JpegImage=r,t()}),e)}))),void 0===P.JpegImage)throw new Error("No JPEG Baseline decoder loaded");const r=new P.JpegImage;return r.parse(e),r.colorTransform=!1,8===t.bitsAllocated?(t.pixelData=r.getData(t.columns,t.rows),t):16===t.bitsAllocated?(t.pixelData=r.getData16(t.columns,t.rows),t):void 0},$={jpeg:void 0,decodeConfig:{}},_=async function(t,e){if(await($.decodeConfig=void 0,$.jpeg?Promise.resolve():new Promise(((t,e)=>{o.e(610).then(o.t.bind(o,610,23)).then((e=>{$.jpeg=e,t()}),e)}))),void 0===$.jpeg||void 0===$.jpeg.lossless||void 0===$.jpeg.lossless.Decoder)throw new Error("No JPEG Lossless decoder loaded");const r=t.bitsAllocated<=8?1:2,n=e.buffer,i=(new $.jpeg.lossless.Decoder).decode(n,e.byteOffset,e.length,r);return 0===t.pixelRepresentation?16===t.bitsAllocated?(t.pixelData=new Uint16Array(i.buffer),t):(t.pixelData=new Uint8Array(i.buffer),t):(t.pixelData=new Int16Array(i.buffer),t)};var A=o(430),k=o.n(A);const S=o.p+"75788f12450d4c5ed494.wasm",x={codec:void 0,decoder:void 0,decodeConfig:{}};function E(t,e,r){const n=function(t,e){let r;return Number.isInteger(t)&&Number.isInteger(e)?t>=0?e<=255?r=Uint8Array:e<=65535&&(r=Uint16Array):t>=-128&&e<=127?r=Int8Array:t>=-32768&&e<=32767&&(r=Int16Array):r=Float32Array,r}(t,e),o=new n(r.pixelData.length);return o.set(r.pixelData,0),o}function O(t){if(!t)throw new Error("options.preScale.scalingParameters must be defined if preScale.enabled is true, and scalingParameters cannot be derived from the metadata providers.")}const R=async function(t,e,r,n,o,i){const a=(new Date).getTime();let s,u=null;switch(e){case"1.2.840.10008.1.2":case"1.2.840.10008.1.2.1":case"1.2.840.10008.1.2.1.99":u=async function(t,e){let r=e.buffer,n=e.byteOffset;const o=e.length;return 16===t.bitsAllocated?(n%2&&(r=r.slice(n),n=0),0===t.pixelRepresentation?t.pixelData=new Uint16Array(r,n,o/2):t.pixelData=new Int16Array(r,n,o/2)):8===t.bitsAllocated||1===t.bitsAllocated?t.pixelData=e:32===t.bitsAllocated&&(n%2&&(r=r.slice(n),n=0),t.pixelData=new Float32Array(r,n,o/4)),t}(t,r);break;case"1.2.840.10008.1.2.2":u=async function(t,e){if(16===t.bitsAllocated){let n=e.buffer,o=e.byteOffset;const i=e.length;o%2&&(n=n.slice(o),o=0),0===t.pixelRepresentation?t.pixelData=new Uint16Array(n,o,i/2):t.pixelData=new Int16Array(n,o,i/2);for(let e=0;e<t.pixelData.length;e++)t.pixelData[e]=(255&(r=t.pixelData[e]))<<8|r>>8&255}else 8===t.bitsAllocated&&(t.pixelData=e);var r;return t}(t,r);break;case"1.2.840.10008.1.2.5":u=async function(t,e){if(8===t.bitsAllocated)return t.planarConfiguration?function(t,e){const r=e,n=t.rows*t.columns,o=new ArrayBuffer(n*t.samplesPerPixel),i=new DataView(r.buffer,r.byteOffset),a=new Int8Array(r.buffer,r.byteOffset),s=new Int8Array(o);let u=0;const c=i.getInt32(0,!0);for(let t=0;t<c;++t){u=t*n;let e=i.getInt32(4*(t+1),!0),o=i.getInt32(4*(t+2),!0);0===o&&(o=r.length);const l=n*c;for(;e<o;){const t=a[e++];if(t>=0&&t<=127)for(let r=0;r<t+1&&u<l;++r)s[u]=a[e++],u++;else if(t<=-1&&t>=-127){const r=a[e++];for(let e=0;e<1-t&&u<l;++e)s[u]=r,u++}}}return t.pixelData=new Uint8Array(o),t}(t,e):function(t,e){const r=e,n=t.rows*t.columns,o=new ArrayBuffer(n*t.samplesPerPixel),i=new DataView(r.buffer,r.byteOffset),a=new Int8Array(r.buffer,r.byteOffset),s=new Int8Array(o);let u=0;const c=i.getInt32(0,!0);for(let e=0;e<c;++e){u=e;let o=i.getInt32(4*(e+1),!0),l=i.getInt32(4*(e+2),!0);0===l&&(l=r.length);const f=n*c;for(;o<l;){const e=a[o++];if(e>=0&&e<=127)for(let r=0;r<e+1&&u<f;++r)s[u]=a[o++],u+=t.samplesPerPixel;else if(e<=-1&&e>=-127){const r=a[o++];for(let n=0;n<1-e&&u<f;++n)s[u]=r,u+=t.samplesPerPixel}}}return t.pixelData=new Uint8Array(o),t}(t,e);if(16===t.bitsAllocated)return function(t,e){const r=e,n=t.rows*t.columns,o=new ArrayBuffer(n*t.samplesPerPixel*2),i=new DataView(r.buffer,r.byteOffset),a=new Int8Array(r.buffer,r.byteOffset),s=new Int8Array(o),u=i.getInt32(0,!0);for(let t=0;t<u;++t){let e=0;const o=0===t?1:0;let u=i.getInt32(4*(t+1),!0),c=i.getInt32(4*(t+2),!0);for(0===c&&(c=r.length);u<c;){const t=a[u++];if(t>=0&&t<=127)for(let r=0;r<t+1&&e<n;++r)s[2*e+o]=a[u++],e++;else if(t<=-1&&t>=-127){const r=a[u++];for(let i=0;i<1-t&&e<n;++i)s[2*e+o]=r,e++}}}return 0===t.pixelRepresentation?t.pixelData=new Uint16Array(o):t.pixelData=new Int16Array(o),t}(t,e);throw new Error("unsupported pixel format for RLE")}(t,r);break;case"1.2.840.10008.1.2.4.50":s={...t},u=async function(t,e){await function(){if(T.codec)return Promise.resolve();const t=w()({locateFile:t=>t.endsWith(".wasm")?b.toString():t});return new Promise(((e,r)=>{t.then((t=>{T.codec=t,T.decoder=new t.JPEGDecoder,e()}),r)}))}();const r=T.decoder;r.getEncodedBuffer(t.length).set(t),r.decode();const n=r.getFrameInfo(),o=r.getDecodedBuffer(),i={columns:n.width,rows:n.height,bitsPerPixel:n.bitsPerSample,signed:e.signed,bytesPerPixel:e.bytesPerPixel,componentsPerPixel:n.componentCount},a=function(t,e){return t.isSigned?new Int8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}(n,o),s={frameInfo:n};return{...e,pixelData:a,imageInfo:i,encodeOptions:s,...s,...i}}(r,s);break;case"1.2.840.10008.1.2.4.51":u=C(t,r);break;case"1.2.840.10008.1.2.4.57":case"1.2.840.10008.1.2.4.70":u=_(t,r);break;case"1.2.840.10008.1.2.4.80":case"1.2.840.10008.1.2.4.81":s={signed:1===t.pixelRepresentation,bytesPerPixel:t.bitsAllocated<=8?1:2,...t},u=async function(t,e){try{await y();const r=h.decoder;r.getEncodedBuffer(t.length).set(t),r.decode();const n=r.getFrameInfo(),o=r.getInterleaveMode(),i=r.getNearLossless(),a=r.getDecodedBuffer(),s={columns:n.width,rows:n.height,bitsPerPixel:n.bitsPerSample,signed:e.signed,bytesPerPixel:e.bytesPerPixel,componentsPerPixel:n.componentCount},u=function(t,e,r){return t.bitsPerSample>8?r?new Int16Array(e.buffer,e.byteOffset,e.byteLength/2):new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2):r?new Int8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}(n,a,e.signed),c={nearLossless:i,interleaveMode:o,frameInfo:n};return{...e,pixelData:u,imageInfo:s,encodeOptions:c,...c,...s}}catch(t){throw"number"==typeof(r=t)?h.codec.getExceptionMessage(r):r}var r}(r,s);break;case"1.2.840.10008.1.2.4.90":case"1.2.840.10008.1.2.4.91":s={...t},u=l(r,s);break;case"3.2.840.10008.1.2.4.96":s={...t},u=async function(t,e){await function(t){if(x.decodeConfig=void 0,x.codec)return Promise.resolve();const e=k()({locateFile:t=>t.endsWith(".wasm")?S:t});return new Promise(((t,r)=>{e.then((e=>{x.codec=e,x.decoder=new e.HTJ2KDecoder,t()}),r)}))}();const r=x.decoder,n=r.getEncodedBuffer(t.length);n.set(t),r.decode();const o=r.getFrameInfo(),i=r.getDecodedBuffer();new Uint8Array(i.length).set(i);const a=`x: ${r.getImageOffset().x}, y: ${r.getImageOffset().y}`,s=r.getNumDecompositions(),u=r.getNumLayers(),c=["unknown","LRCP","RLCP","RPCL","PCRL","CPRL"][r.getProgressionOrder()+1],l=r.getIsReversible(),f=`${r.getBlockDimensions().width} x ${r.getBlockDimensions().height}`,p=`${r.getTileSize().width} x ${r.getTileSize().height}`,d=`${r.getTileOffset().x}, ${r.getTileOffset().y}`,h=`${i.length.toLocaleString()} bytes`,y=`${(i.length/n.length).toFixed(2)}:1`,v={columns:o.width,rows:o.height,bitsPerPixel:o.bitsPerSample,signed:o.isSigned,bytesPerPixel:e.bytesPerPixel,componentsPerPixel:o.componentCount};let g=function(t,e){return t.bitsPerSample>8?t.isSigned?new Int16Array(e.buffer,e.byteOffset,e.byteLength/2):new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2):t.isSigned?new Int8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}(o,i);const{buffer:m,byteOffset:w,byteLength:b}=g,T=m.slice(w,w+b);g=new g.constructor(T);const P={imageOffset:a,numDecompositions:s,numLayers:u,progessionOrder:c,reversible:l,blockDimensions:f,tileSize:p,tileOffset:d,decodedSize:h,compressionRatio:y};return{...e,pixelData:g,imageInfo:v,encodeOptions:P,...P,...v}}(r,s);break;default:throw new Error(`no decoder for transfer syntax ${e}`)}if(!u)throw new Error("decodePromise not defined");const c=function(t,e,r,n){const{use16BitDataType:o}=n||{},i=void 0!==t.pixelRepresentation&&1===t.pixelRepresentation,a=i&&void 0!==t.bitsStored?32-t.bitsStored:void 0;if(i&&void 0!==a)for(let e=0;e<t.pixelData.length;e++)t.pixelData[e]=t.pixelData[e]<<a>>a;let s=t.pixelData;t.pixelDataLength=t.pixelData.length;const{min:u,max:c}=v(t.pixelData),l={Uint8Array,Uint16Array:o?Uint16Array:void 0,Int16Array:o?Int16Array:void 0,Float32Array},f=e.targetBuffer?.type,p=!("RGB"!==(d=t.photometricInterpretation)&&"PALETTE COLOR"!==d&&"YBR_FULL"!==d&&"YBR_FULL_422"!==d&&"YBR_PARTIAL_422"!==d&&"YBR_PARTIAL_420"!==d&&"YBR_RCT"!==d&&"YBR_ICT"!==d||void 0!==e.targetBuffer?.offset);var d;s=f&&!p?function(t,e,r,n){const{arrayBuffer:o,type:i,offset:a=0,length:s}=t.targetBuffer,u=e.pixelDataLength,c=a,l=null!=s?s:u-c,f=r[i];if(!f)throw new Error(`target array ${i} is not supported`);const p=e.pixelData;if(l!==p.length)throw new Error(`target array for image does not have the same length (${l}) as the decoded image length (${p.length}).`);const d=o?new f(o,c,l):new f(l);return d.set(p,0),d}(e,t,l):e.preScale.enabled?function(t,e,r,n){const o=t.preScale.scalingParameters;O(o);const{rescaleSlope:i,rescaleIntercept:a}=o;let s=e,u=r;return"number"==typeof i&&"number"==typeof a&&(s=i*e+a,u=i*r+a),E(s,u,n)}(e,u,c,t):E(u,c,t);let h=u,y=c;if(e.preScale.enabled){const r=e.preScale.scalingParameters;O(r);const{rescaleSlope:n,rescaleIntercept:o,suvbw:i}=r;if("number"==typeof n&&"number"==typeof o){!function(t,e){const r=t.length,{rescaleSlope:n,rescaleIntercept:o,suvbw:i}=e;if("PT"===e.modality&&"number"==typeof i)for(let e=0;e<r;e++)t[e]=i*(t[e]*n+o);else for(let e=0;e<r;e++)t[e]=t[e]*n+o}(s,r),t.preScale={...e.preScale,scaled:!0};const{rescaleIntercept:n,rescaleSlope:o,suvbw:i}=r;h=o*u+n,y=o*c+n,i&&(h*=i,y*=i)}}void 0!==e.targetBuffer&&e.isSharedArrayBuffer||(t.pixelData=s),t.minAfterScale=h,t.maxAfterScale=y;const g=(new Date).getTime();return t.decodeTimeInMS=g-r,t}(await u,o,a,n);return i?.(c),c};let F;function W(t){t.decodeTask.initializeCodecsOnStartup&&(c(t.decodeTask),y(t.decodeTask))}const j={taskType:"decodeTask",handler:async function(t,e){W(F);const r=F&&F.decodeTask&&F.decodeTask.strict,n=new Uint8Array(t.data.pixelData),o=await R(t.data.imageFrame,t.data.transferSyntax,n,Object.assign(F.decodeTask,t.data.decodeConfig),t.data.options);if(!o.pixelData)throw new Error("decodeTask: imageFrame.pixelData is undefined after decoding");return function(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=void 0!==t.minAfterScale||void 0!==t.maxAfterScale?{min:t.minAfterScale,max:t.maxAfterScale}:v(t.pixelData),n=!(g(t.smallestPixelValue)&&g(t.largestPixelValue));!0!==e||n?(t.smallestPixelValue=r.min,t.largestPixelValue=r.max):(t.smallestPixelValue!==r.min&&console.warn("Image smallestPixelValue tag is incorrect. Rendering performance will suffer considerably."),t.largestPixelValue!==r.max&&console.warn("Image largestPixelValue tag is incorrect. Rendering performance will suffer considerably."))}(o,r),o.pixelData=o.pixelData.buffer,e?.(o,[o.pixelData]),{result:o,transferList:[o.pixelData]}},initialize:function(t){F=t,W(t)}};n(j)})()})(); |