dicom-microscopy-viewer-changed
Version:
Interactive web-based viewer for DICOM Microscopy Images
1 lines • 192 kB
JavaScript
(()=>{var __webpack_modules__={8327:function(t,e){var r,n=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,"undefined"!=typeof __filename&&(r=r||__filename),function(t){var e,n,o=void 0!==(t=t||{})?t:{};o.ready=new Promise((function(t,r){e=t,n=r}));var i,a,s,u=Object.assign({},o),c=[],f="object"==typeof window,l="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,d="";if(p){var h=require("fs"),v=require("path");d=l?v.dirname(d)+"/":__dirname+"/",i=(t,e)=>(t=B(t)?new URL(t):v.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=B(t)?new URL(t):v.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 G))throw t})),process.on("unhandledRejection",(function(t){throw t})),o.inspect=function(){return"[Emscripten Module object]"}}else(f||l)&&(l?d=self.location.href:"undefined"!=typeof document&&document.currentScript&&(d=document.currentScript.src),r&&(d=r),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},l&&(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)});o.print||console.log.bind(console);var m,y=o.printErr||console.warn.bind(console);Object.assign(o,u),u=null,o.arguments&&(c=o.arguments),o.thisProgram&&o.thisProgram,o.quit&&o.quit,o.wasmBinary&&(m=o.wasmBinary);var g;o.noExitRuntime;"object"!=typeof WebAssembly&&H("no native wasm support detected");var w,b,T,_,P,x,C,$,A,k=!1,S="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function j(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&&S)return S.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}(T,t,e):""}function E(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,T,e,r)}function O(t){w=t,o.HEAP8=b=new Int8Array(t),o.HEAP16=_=new Int16Array(t),o.HEAP32=x=new Int32Array(t),o.HEAPU8=T=new Uint8Array(t),o.HEAPU16=P=new Uint16Array(t),o.HEAPU32=C=new Uint32Array(t),o.HEAPF32=$=new Float32Array(t),o.HEAPF64=A=new Float64Array(t)}o.INITIAL_MEMORY;var F,R=[],W=[],I=[],D=0,U=null,M=null;function H(t){o.onAbort&&o.onAbort(t),y(t="Aborted("+t+")"),k=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw n(e),e}var z,q,L="data:application/octet-stream;base64,";function V(t){return t.startsWith(L)}function B(t){return t.startsWith("file://")}function N(t){try{if(t==z&&m)return new Uint8Array(m);if(s)return s(t);throw"both async and sync fetching of the wasm failed"}catch(t){H(t)}}function G(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function X(t){for(;t.length>0;)t.shift()(o)}function Y(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){C[this.ptr+4>>2]=t},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(t){C[this.ptr+8>>2]=t},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_refcount=function(t){x[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,b[this.ptr+12>>0]=t},this.get_caught=function(){return 0!=b[this.ptr+12>>0]},this.set_rethrown=function(t){t=t?1:0,b[this.ptr+13>>0]=t},this.get_rethrown=function(){return 0!=b[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){C[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(We(this.get_type()))return C[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}V(z="charlswasm_decode.wasm")||(q=z,z=o.locateFile?o.locateFile(q,d):d+q);var J={};function Z(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function K(t){return this.fromWireType(x[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)vt(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 ft(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var lt=void 0;function pt(t){for(var e="",r=t;T[r];)e+=lt[T[r++]];return e}var dt=void 0;function ht(t){throw new dt(t)}function vt(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 mt(t){if(!(this instanceof Ut))return!1;if(!(t instanceof Ut))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function yt(t){ht(t.$$.ptrType.registeredClass.name+" instance already deleted")}var gt=!1;function wt(t){}function bt(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 Tt(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=Tt(t,e,r.baseClass);return null===n?null:r.downcast(n)}var _t={};function Pt(){return Object.keys(St).length}function xt(){var t=[];for(var e in St)St.hasOwnProperty(e)&&t.push(St[e]);return t}var Ct=[];function $t(){for(;Ct.length;){var t=Ct.pop();t.$$.deleteScheduled=!1,t.delete()}}var At=void 0;function kt(t){At=t,Ct.length&&At&&At($t)}var St={};function jt(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),St[e]}function Et(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},Ft(Object.create(t,{$$:{value:e}}))}function Ot(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=jt(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?Et(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Et(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=Tt(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?Et(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):Et(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Ft(t){return"undefined"==typeof FinalizationRegistry?(Ft=t=>t,t):(gt=new FinalizationRegistry((t=>{bt(t.$$)})),Ft=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};gt.register(t,r,t)}return t},wt=t=>gt.unregister(t),Ft(t))}function Rt(){if(this.$$.ptr||yt(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}function Wt(){this.$$.ptr||yt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ht("Object already scheduled for deletion"),wt(this),bt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function It(){return!this.$$.ptr}function Dt(){return this.$$.ptr||yt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ht("Object already scheduled for deletion"),Ct.push(this),1===Ct.length&&At&&At($t),this.$$.deleteScheduled=!0,this}function Ut(){}function Mt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||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 Ht(t,e,r){o.hasOwnProperty(t)?((void 0===r||void 0!==o[t].overloadTable&&void 0!==o[t].overloadTable[r])&&ht("Cannot register public name '"+t+"' twice"),Mt(o,t,t),o.hasOwnProperty(r)&&ht("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),o[t].overloadTable[r]=e):(o[t]=e,void 0!==r&&(o[t].numArguments=r))}function zt(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 qt(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 Lt(t,e){if(null===e)return this.isReference&&ht("null is not a valid "+this.name),0;e.$$||ht('Cannot pass "'+pe(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 qt(e.$$.ptr,r,this.registeredClass)}function Vt(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 "'+pe(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=qt(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,le.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:ht("Unsupporting sharing policy")}return r}function Bt(t,e){if(null===e)return this.isReference&&ht("null is not a valid "+this.name),0;e.$$||ht('Cannot pass "'+pe(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 qt(e.$$.ptr,r,this.registeredClass)}function Nt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Gt(t){this.rawDestructor&&this.rawDestructor(t)}function Xt(t){null!==t&&t.delete()}function Yt(t,e,r,n,o,i,a,s,u,c,f){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=f,o||void 0!==e.baseClass?this.toWireType=Vt:n?(this.toWireType=Lt,this.destructorFunction=null):(this.toWireType=Bt,this.destructorFunction=null)}function Jt(t,e,r){o.hasOwnProperty(t)||ut("Replacing nonexistant public symbol"),void 0!==o[t].overloadTable&&void 0!==r?o[t].overloadTable[r]=e:(o[t]=e,o[t].argCount=r)}var Zt=[];function Kt(t){var e=Zt[t];return e||(t>=Zt.length&&(Zt.length=t+1),Zt[t]=e=F.get(t)),e}function Qt(t,e,r){return t.includes("j")?function(t,e,r){var n=o["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):Kt(e).apply(null,r)}function te(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),Qt(r,n,o)}):Kt(e);return"function"!=typeof i&&ht("unknown function pointer with signature "+t+": "+e),i}var ee=void 0;function re(t){var e=je(t),r=pt(e);return Ee(e),r}function ne(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 ee(t+": "+r.map(re).join([", "]))}function oe(t,e){for(var r=[],n=0;n<t;n++)r.push(C[e+4*n>>2]);return r}function ie(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,f="",l="";for(u=0;u<i-2;++u)f+=(0!==u?", ":"")+"arg"+u,l+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+ot(t)+"("+f+") {\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"],v=[ht,n,o,Z,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),v.push(e[u+2]);if(a&&(l="thisWired"+(l.length>0?", ":"")+l),p+=(c?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var m=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=m+"_dtor("+m+"); // "+e[u].name+"\n",h.push(m+"_dtor"),v.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,v)}var ae=[],se=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function ue(t){t>4&&0==--se[t].refcount&&(se[t]=void 0,ae.push(t))}function ce(){for(var t=0,e=5;e<se.length;++e)void 0!==se[e]&&++t;return t}function fe(){for(var t=5;t<se.length;++t)if(void 0!==se[t])return se[t];return null}var le={toValue:t=>(t||ht("Cannot use deleted val. handle = "+t),se[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=ae.length?ae.pop():se.length;return se[e]={refcount:1,value:t},e}}};function pe(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function de(t,e){switch(e){case 2:return function(t){return this.fromWireType($[t>>2])};case 3:return function(t){return this.fromWireType(A[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function he(t,e,r){switch(e){case 0:return r?function(t){return b[t]}:function(t){return T[t]};case 1:return r?function(t){return _[t>>1]}:function(t){return P[t>>1]};case 2:return r?function(t){return x[t>>2]}:function(t){return C[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var ve="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function me(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&P[n];)++n;if((r=n<<1)-t>32&&ve)return ve.decode(T.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=_[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function ye(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);_[e>>1]=a,e+=2}return _[e>>1]=0,e-n}function ge(t){return 2*t.length}function we(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 be(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 Te(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 _e={};function Pe(){return"object"==typeof globalThis?globalThis:Function("return this")()}function xe(t,e){var r=tt[t];return void 0===r&&ht(e+" has unknown type "+re(t)),r}var Ce={};function $e(t){try{return g.grow(t-w.byteLength+65535>>>16),O(g.buffer),1}catch(t){}}st=o.InternalError=at(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);lt=t}(),dt=o.BindingError=at(Error,"BindingError"),Ut.prototype.isAliasOf=mt,Ut.prototype.clone=Rt,Ut.prototype.delete=Wt,Ut.prototype.isDeleted=It,Ut.prototype.deleteLater=Dt,o.getInheritedInstanceCount=Pt,o.getLiveInheritedInstances=xt,o.flushPendingDeletes=$t,o.setDelayFunction=kt,Yt.prototype.getPointee=Nt,Yt.prototype.destructor=Gt,Yt.prototype.argPackAdvance=8,Yt.prototype.readValueFromPointer=K,Yt.prototype.deleteObject=Xt,Yt.prototype.fromWireType=Ot,ee=o.UnboundTypeError=at(Error,"UnboundTypeError"),o.count_emval_handles=ce,o.get_first_emval=fe;var Ae,ke={h:function(t,e,r){throw new Y(t).init(e,r),t},q:function(t){var e=J[t];delete J[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;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],f=e.setter,l=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];f(l,t,c.toWireType(r,e)),Z(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:K,destructorFunction:n}]}))},r:function(t,e,r,n,o){},w:function(t,e,r,n,o){var i=ft(r);vt(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=b;else if(2===r)n=_;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=x}return this.fromWireType(n[t>>i])},destructorFunction:null})},p:function(t,e,r,n,o,i,a,s,u,c,f,l,p){f=pt(f),i=te(o,i),s&&(s=te(a,s)),c&&(c=te(u,c)),p=te(l,p);var d=ot(f);Ht(d,(function(){ne("Cannot construct "+f+" 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:Ut.prototype;var a=it(d,(function(){if(Object.getPrototypeOf(this)!==u)throw new dt("Use 'new' to construct "+f);if(void 0===l.constructor_body)throw new dt(f+" has no accessible constructor");var t=l.constructor_body[arguments.length];if(void 0===t)throw new dt("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(l.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),u=Object.create(o,{constructor:{value:a}});a.prototype=u;var l=new zt(f,a,u,p,r,i,s,c),h=new Yt(f,l,!0,!1,!1),v=new Yt(f+"*",l,!1,!1,!1),m=new Yt(f+" const*",l,!1,!0,!1);return _t[t]={pointerType:v,constPointerType:m},Jt(d,a),[h,v,m]}))},o:function(t,e,r,n,o,i){var a;e>0||H(a);var s=oe(e,r);o=te(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]=()=>{ne("Cannot construct "+t.name+" due to unbound types",s)},ct([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=ie(r,n,null,o,i),[]})),[]}))},c:function(t,e,r,n,o,i,a,s){var u=oe(r,n);e=pt(e),i=te(o,i),ct([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){ne("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,f=c[e];return void 0===f||void 0===f.overloadTable&&f.className!==t.name&&f.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(Mt(c,e,n),c[e].overloadTable[r-2]=o),ct([],u,(function(o){var s=ie(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){vt(t,{name:e=pt(e),fromWireType:function(t){var e=le.toValue(t);return ue(t),e},toWireType:function(t,e){return le.toHandle(e)},argPackAdvance:8,readValueFromPointer:K,destructorFunction:null})},k:function(t,e,r){var n=ft(r);vt(t,{name:e=pt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:de(e,n),destructorFunction:null})},e:function(t,e,r,n,o,i){var a=oe(e,r);t=pt(t),o=te(n,o),Ht(t,(function(){ne("Cannot call "+t+" due to unbound types",a)}),e-1),ct([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return Jt(t,ie(t,n,null,o,i),e-1),[]}))},b:function(t,e,r,n,o){e=pt(e),-1===o&&(o=4294967295);var i=ft(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");vt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:he(e,i,0!==n),destructorFunction:null})},a:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=C,r=e[t>>=2],o=e[t+1];return new n(w,o,r)}vt(t,{name:r=pt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},j:function(t,e){var r="std::string"===(e=pt(e));vt(t,{name:e,fromWireType:function(t){var e,n=C[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==T[s]){var u=j(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(T[o+a]);e=c.join("")}return Ee(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=Se(4+n+1),a=i+4;if(C[i>>2]=n,r&&o)E(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(Ee(a),ht("String has UTF-16 code units that do not fit in 8 bits")),T[a+s]=u}else for(s=0;s<n;++s)T[a+s]=e[s];return null!==t&&t.push(Ee,i),i},argPackAdvance:8,readValueFromPointer:K,destructorFunction:function(t){Ee(t)}})},g:function(t,e,r){var n,o,i,a,s;r=pt(r),2===e?(n=me,o=ye,a=ge,i=()=>P,s=1):4===e&&(n=we,o=be,a=Te,i=()=>C,s=2),vt(t,{name:r,fromWireType:function(t){for(var r,o=C[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var f=t+4+c*e;if(c==o||0==a[f>>s]){var l=n(u,f-u);void 0===r?r=l:(r+=String.fromCharCode(0),r+=l),u=f+e}}return Ee(t),r},toWireType:function(t,n){"string"!=typeof n&&ht("Cannot pass non-string to C++ string type "+r);var i=a(n),u=Se(4+i+e);return C[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(Ee,u),u},argPackAdvance:8,readValueFromPointer:K,destructorFunction:function(t){Ee(t)}})},u:function(t,e,r,n,o,i){J[t]={name:pt(e),rawConstructor:te(r,n),rawDestructor:te(o,i),fields:[]}},d:function(t,e,r,n,o,i,a,s,u,c){J[t].fields.push({fieldName:pt(e),getterReturnType:r,getter:te(n,o),getterContext:i,setterArgumentType:a,setter:te(s,u),setterContext:c})},x:function(t,e){vt(t,{isVoid:!0,name:e=pt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},i:ue,m:function(t){return 0===t?le.toHandle(Pe()):(t=void 0===(r=_e[e=t])?pt(e):r,le.toHandle(Pe()[t]));var e,r},l:function(t){t>4&&(se[t].refcount+=1)},y:function(t,e,r,n){t=le.toValue(t);var i=Ce[e];return i||(i=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)(xe,o,le.toHandle,(()=>C))}(e),Ce[e]=i),i(t,r,n)},n:function(t,e){var r=(t=xe(t,"_emval_take_value")).readValueFromPointer(e);return le.toHandle(r)},f:function(){H("")},t:function(t,e,r){T.copyWithin(t,e,e+r)},s:function(t){var e,r,n=T.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),$e(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1}},Se=(function(){var t={a:ke};function e(t,e){var r,n=t.exports;o.asm=n,O((g=o.asm.z).buffer),F=o.asm.C,r=o.asm.A,W.unshift(r),function(t){if(D--,o.monitorRunDependencies&&o.monitorRunDependencies(D),0==D&&(null!==U&&(clearInterval(U),U=null),M)){var e=M;M=null,e()}}()}function r(t){e(t.instance)}function i(e){return function(){if(!m&&(f||l)){if("function"==typeof fetch&&!B(z))return fetch(z,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+z+"'";return t.arrayBuffer()})).catch((function(){return N(z)}));if(a)return new Promise((function(t,e){a(z,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return N(z)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){y("failed to asynchronously prepare wasm: "+t),H(t)}))}if(D++,o.monitorRunDependencies&&o.monitorRunDependencies(D),o.instantiateWasm)try{return o.instantiateWasm(t,e)}catch(t){y("Module.instantiateWasm callback failed with error: "+t),n(t)}(m||"function"!=typeof WebAssembly.instantiateStreaming||V(z)||B(z)||p||"function"!=typeof fetch?i(r):fetch(z,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return y("wasm streaming compile failed: "+t),y("falling back to ArrayBuffer instantiation"),i(r)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.A).apply(null,arguments)},o._malloc=function(){return(Se=o._malloc=o.asm.B).apply(null,arguments)}),je=o.___getTypeName=function(){return(je=o.___getTypeName=o.asm.D).apply(null,arguments)},Ee=(o.__embind_initialize_bindings=function(){return(o.__embind_initialize_bindings=o.asm.E).apply(null,arguments)},o._free=function(){return(Ee=o._free=o.asm.F).apply(null,arguments)}),Oe=o.stackSave=function(){return(Oe=o.stackSave=o.asm.G).apply(null,arguments)},Fe=o.stackRestore=function(){return(Fe=o.stackRestore=o.asm.H).apply(null,arguments)},Re=o.stackAlloc=function(){return(Re=o.stackAlloc=o.asm.I).apply(null,arguments)},We=o.___cxa_is_pointer_type=function(){return(We=o.___cxa_is_pointer_type=o.asm.J).apply(null,arguments)};function Ie(t){function r(){Ae||(Ae=!0,o.calledRun=!0,k||(X(W),e(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)t=o.postRun.shift(),I.unshift(t);var t;X(I)}()))}t=t||c,D>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)t=o.preRun.shift(),R.unshift(t);var t;X(R)}(),D>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),r()}),1)):r()))}if(o.ccall=function(t,e,r,n,i){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);E(t,e=Re(r),r)}return e},array:t=>{var e=Re(t.length);return function(t,e){b.set(t,e)}(t,e),e}},s=function(t){return o["_"+t]}(t),u=[],c=0;if(n)for(var f=0;f<n.length;f++){var l=a[r[f]];l?(0===c&&(c=Oe()),u[f]=l(n[f])):u[f]=n[f]}var p=s.apply(null,u);return p=function(t){return 0!==c&&Fe(c),function(t){return"string"===e?j(t):"boolean"===e?Boolean(t):t}(t)}(p)},M=function t(){Ae||Ie(),Ae||(M=t)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return Ie(),t.ready});"object"==typeof e&&"object"==typeof t?t.exports=n:"function"==typeof define&&define.amd?define([],(function(){return n})):"object"==typeof e&&(e.CharLSWASM=n)},9400:function(t,e){var r,n=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,"undefined"!=typeof __filename&&(r=r||__filename),function(t){var e,n,o=void 0!==(t=t||{})?t:{};o.ready=new Promise((function(t,r){e=t,n=r}));var i,a,s,u=Object.assign({},o),c=[],f="./this.program",l=(t,e)=>{throw e},p="object"==typeof window,d="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v="";if(h){var m=require("fs"),y=require("path");v=d?y.dirname(v)+"/":__dirname+"/",i=(t,e)=>(t=Z(t)?new URL(t):y.normalize(t),m.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=Z(t)?new URL(t):y.normalize(t),m.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&(f=process.argv[1].replace(/\\/g,"/")),c=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof Q))throw t})),process.on("unhandledRejection",(function(t){throw t})),l=(t,e)=>{if(q())throw process.exitCode=t,e;var r;(r=e)instanceof Q||b("exiting due to exception: "+r),process.exit(t)},o.inspect=function(){return"[Emscripten Module object]"}}else(p||d)&&(d?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),r&&(v=r),v=0!==v.indexOf("blob:")?v.substr(0,v.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},d&&(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 g,w=o.print||console.log.bind(console),b=o.printErr||console.warn.bind(console);Object.assign(o,u),u=null,o.arguments&&(c=o.arguments),o.thisProgram&&(f=o.thisProgram),o.quit&&(l=o.quit),o.wasmBinary&&(g=o.wasmBinary);var T,_=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&N("no native wasm support detected");var P,x,C,$,A,k,S,j,E,O=!1,F="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function R(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&F)return F.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?R(C,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,C,e,r)}function D(t){P=t,o.HEAP8=x=new Int8Array(t),o.HEAP16=$=new Int16Array(t),o.HEAP32=k=new Int32Array(t),o.HEAPU8=C=new Uint8Array(t),o.HEAPU16=A=new Uint16Array(t),o.HEAPU32=S=new Uint32Array(t),o.HEAPF32=j=new Float32Array(t),o.HEAPF64=E=new Float64Array(t)}o.INITIAL_MEMORY;var U,M=[],H=[],z=[];function q(){return _}var L=0,V=null,B=null;function N(t){o.onAbort&&o.onAbort(t),b(t="Aborted("+t+")"),O=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw n(e),e}var G,X,Y="data:application/octet-stream;base64,";function J(t){return t.startsWith(Y)}function Z(t){return t.startsWith("file://")}function K(t){try{if(t==G&&g)return new Uint8Array(g);if(s)return s(t);throw"both async and sync fetching of the wasm failed"}catch(t){N(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()(o)}function et(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,x[this.ptr+12>>0]=t},this.get_caught=function(){return 0!=x[this.ptr+12>>0]},this.set_rethrown=function(t){t=t?1:0,x[this.ptr+13>>0]=t},this.get_rethrown=function(){return 0!=x[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(Be(this.get_type()))return S[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}J(G="libjpegturbowasm_decode.wasm")||(X=G,G=o.locateFile?o.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(k[t>>2])}var it={},at={},st={},ut=48,ct=57;function ft(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 lt(t,e){return t=ft(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function pt(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 dt=void 0;function ht(t){throw new dt(t)}function vt(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 mt(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 yt=void 0;function gt(t){for(var e="",r=t;C[r];)e+=yt[C[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 _t(t){if(!(this instanceof Vt))return!1;if(!(t instanceof Vt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function Pt(t){bt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var xt=!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 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={};function St(){return Object.keys(Wt).length}function jt(){var t=[];for(var e in Wt)Wt.hasOwnProperty(e)&&t.push(Wt[e]);return t}var Et=[];function Ot(){for(;Et.length;){var t=Et.pop();t.$$.deleteScheduled=!1,t.delete()}}var Ft=void 0;function Rt(t){Ft=t,Et.length&&Ft&&Ft(Ot)}var Wt={};function It(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),Wt[e]}function Dt(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},Mt(Object.create(t,{$$:{value:e}}))}function Ut(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=It(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?Dt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Dt(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?Dt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):Dt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Mt(t){return"undefined"==typeof FinalizationRegistry?(Mt=t=>t,t):(xt=new FinalizationRegistry((t=>{$t(t.$$)})),Mt=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};xt.register(t,r,t)}return t},Ct=t=>xt.unregister(t),Mt(t))}function Ht(){if(this.$$.ptr||Pt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Mt(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function zt(){this.$$.ptr||Pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&bt("Object already scheduled for deletion"),Ct(this),$t(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function qt(){return!this.$$.ptr}function Lt(){return this.$$.ptr||Pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&bt("Object already scheduled for deletion"),Et.push(this),1===Et.length&&Ft&&Ft(Ot),this.$$.deleteScheduled=!0,this}function Vt(){}function Bt(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 Nt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Gt(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 Xt(t,e){if(null===e)return this.isReference&&bt("null is not a valid "+this.name),0;e.$$||bt('Cannot pass "'+me(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 Gt(e.$$.ptr,r,this.registeredClass)}function Yt(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 "'+me(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=Gt(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,ve.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:bt("Unsupporting sharing policy")}return r}function Jt(t,e){if(null===e)return this.isReference&&bt("null is not a valid "+this.name),0;e.$$||bt('Cannot pass "'+me(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 Gt(e.$$.ptr,r,this.registeredClass)}function Zt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Kt(t){this.rawDestructor&&this.rawDestructor(t)}function Qt(t){null!==t&&t.delete()}function te(t,e,r,n,o,i,a,s,u,c,f){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=f,o||void 0!==e.baseClass?this.toWireType=Yt:n?(this.toWireType=Xt,this.destructorFunction=null):(this.toWireType=Jt,this.destructorFunction=null)}var ee=[];function re(t){var e=ee[t];return e||(t>=ee.length&&(ee.length=t+1),ee[t]=e=U.get(t)),e}function ne(t,e,r){return t.includes("j")?function(t,e,r){var n=o["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):re(e).apply(null,r)}function oe(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),ne(r,n,o)}):re(e);return"function"!=typeof i&&bt("unknown function pointer with signature "+t+": "+e),i}var ie=void 0;function ae(t){var e=He(t),r=gt(e);return Me(e),r}function se(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 ie(t+": "+r.map(ae).join([", "]))}function ue(t,e){for(var r=[],n=0;n<t;n++)r.push(S[e+4*n>>2]);return r}function ce(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,f="",l="";for(u=0;u<i-2;++u)f+=(0!==u?", ":"")+"arg"+u,l+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+ft(t)+"("+f+") {\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"],v=[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),v.push(e[u+2]);if(a&&(l="thisWired"+(l.length>0?", ":"")+l),p+=(c?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var m=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=m+"_dtor("+m+"); // "+e[u].name+"\n",h.push(m+"_dtor"),v.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,v)}var fe=[],le=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function pe(t){t>4&&0==--le[t].refcount&&(le[t]=void 0,fe.push(t))}function de(){for(var t=0,e=5;e<le.length;++e)void 0!==le[e]&&++t;return t}function he(){for(var t=5;t<le.length;++t)if(void 0!==le[t])return le[t];return null}var ve={toValue:t=>(t||bt("Cannot use deleted val. handle = "+t),le[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=fe.length?fe.pop():le.length;return le[e]={refcount:1,value:t},e}}};function me(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function ye(t,e){switch(e){case 2:return function(t){return this.fromWireType(j[t>>2])};case 3:return function(t){return this.fromWireType(E[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function ge(t,e,r){switch(e){case 0:return r?function(t){return x[t]}:function(t){return C[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 we="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function be(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&A[n];)++n;if((r=n<<1)-t>32&&we)return we.decode(C.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=$[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function Te(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 _e(t){return 2*t.length}function Pe(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 xe(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 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}var $e={};function Ae(){return"object"==typeof globalThis?globalThis:Function("return this")()}function ke(t,e){var r=at[t];return void 0===r&&bt(e+" has unknown type "+ae(t)),r}var Se={};function je(t){try{return T.grow(t-P.byteLength+65535>>>16),D(T.buffer),1}catch(t){}}var Ee={};function Oe(){if(!Oe.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 Ee)void 0===Ee[e]?delete t[e]:t[e]=Ee[e];var r=[];for(var e in t)r.push(e+"="+t[