var BASIS=function(){var Dt="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!=typeof __filename&&(Dt=Dt||__filename),function(e){var r,i,a=void 0!==(e=e||{})?e:{};a.ready=new Promise(function(e,t){r=e,readyPromiseRejectza=t});var t,n={};for(t in a)a.hasOwnProperty(t)&&(n[t]=a[t]);var o,u,s,c,f,l=!1,p=!1,l="object"==typeof window,p="function"==typeof importScripts,d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h=!l&&!d&&!p,y="";d?(y=p?require("path").dirname(y)+"/":__dirname+"/",o=function(e,t){return c=c||require("fs"),e=(f=f||require("path")).normalize(e),c.readFileSync(e,t?null:"utf8")},s=function(e){e=o(e,!0);return T((e=!e.buffer?new Uint8Array(e):e).buffer),e},1>10,56320|1023&u))):i+=String.fromCharCode((31&s)<<6|a)):i+=String.fromCharCode(s)}return i}function P(e,t){return e?$(W,e,t):""}function A(e,t,r){return function(e,t,r,n){if(!(0>6,t[r++]=128|63&u}else if(u<=65535){if(i<=r+2)break;t[r++]=224|u>>12,t[r++]=128|u>>6&63,t[r++]=128|63&u}else{if(i<=r+3)break;t[r++]=240|u>>18,t[r++]=128|u>>12&63,t[r++]=128|u>>6&63,t[r++]=128|63&u}}return t[r]=0,r-o}(e,W,t,r)}var _,S,W,E,F,k,O,j,R,I="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function x(e,t){for(var r,n=e>>1,o=n+t/2;!(o<=n)&&F[n];)++n;if(32<(r=n<<1)-e&&I)return I.decode(W.subarray(e,r));for(var i="",a=0;!(t/2<=a);++a){var u=E[e+2*a>>1];if(0==u)break;i+=String.fromCharCode(u)}return i}function D(e,t,r){if((r=void 0===r?2147483647:r)<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,i=0;i>1]=a,t+=2}return E[t>>1]=0,t-n}function U(e){return 2*e.length}function B(e,t){for(var r=0,n="";!(t/4<=r);){var o,i=k[e+4*r>>2];if(0==i)break;++r,65536<=i?(o=i-65536,n+=String.fromCharCode(55296|o>>10,56320|1023&o)):n+=String.fromCharCode(i)}return n}function M(e,t,r){if((r=void 0===r?2147483647:r)<4)return 0;for(var n=t,o=n+r-4,i=0;i>2]=a,o<(t+=4)+4)break}return k[t>>2]=0,t-n}function V(e){for(var t=0,r=0;r>2])}var le={},pe={},de={},he=48,ye=57;function ve(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return he<=t&&t<=ye?"_"+e:e}function me(e,t){return e=ve(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function ge(e,t){var r=me(t,function(e){this.name=t,this.message=e;e=new Error(e).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(e.prototype),(r.prototype.constructor=r).prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var we=void 0;function be(e){throw new we(e)}function Te(n,t,o){function r(e){var t=o(e);t.length!==n.length&&be("Mismatched type converter count");for(var r=0;r>2)+n]);return r}function ht(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=me(e.name||"unknownFunctionName",function(){});r.prototype=e.prototype;r=new r,t=e.apply(r,t);return t instanceof Object?t:r}function yt(e,t,r,n,o){var i=t.length;i<2&&_e("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,u=!1,s=1;s>2]},getStr:function(e){return P(e)},get64:function(e,t){return e}};we=a.InternalError=ge(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);$e=e}(),Ae=a.BindingError=ge(Error,"BindingError"),Ve.prototype.isAliasOf=We,Ve.prototype.clone=Re,Ve.prototype.delete=Ie,Ve.prototype.isDeleted=xe,Ve.prototype.deleteLater=Me,at.prototype.getPointee=Ke,at.prototype.destructor=Qe,at.prototype.argPackAdvance=8,at.prototype.readValueFromPointer=fe,at.prototype.deleteObject=Ye,at.prototype.fromWireType=it,a.getInheritedInstanceCount=Ze,a.getLiveInheritedInstances=et,a.flushPendingDeletes=Be,a.setDelayFunction=tt,ft=a.UnboundTypeError=ge(Error,"UnboundTypeError"),a.count_emval_handles=wt,a.get_first_emval=bt;var kt,Ot={t:function(e){var t=se[e];delete se[e];var o=t.rawConstructor,i=t.rawDestructor,l=t.fields;Te([e],l.map(function(e){return e.getterReturnType}).concat(l.map(function(e){return e.setterArgumentType})),function(c){var f={};return l.forEach(function(e,t){var r=e.fieldName,n=c[t],o=e.getter,i=e.getterContext,a=c[t+l.length],u=e.setter,s=e.setterContext;f[r]={read:function(e){return n.fromWireType(o(i,e))},write:function(e,t){var r=[];u(s,e,a.toWireType(r,t)),ce(r)}}}),[{name:t.name,fromWireType:function(e){var t,r={};for(t in f)r[t]=f[t].read(e);return i(e),r},toWireType:function(e,t){for(var r in f)if(!(r in t))throw new TypeError('Missing field: "'+r+'"');var n=o();for(r in f)f[r].write(n,t[r]);return null!==e&&e.push(i,n),n},argPackAdvance:8,readValueFromPointer:fe,destructorFunction:i}]})},I:function(e,r,n,o,i){var a=Ce(n);Se(e,{name:r=Pe(r),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?o:i},argPackAdvance:8,readValueFromPointer:function(e){var t;if(1===n)t=S;else if(2===n)t=E;else{if(4!==n)throw new TypeError("Unknown boolean type size: "+r);t=k}return this.fromWireType(t[e>>a])},destructorFunction:null})},x:function(a,e,t,u,r,s,n,c,o,f,l,i,p){l=Pe(l),s=ct(r,s),c=c&&ct(n,c),f=f&&ct(o,f),p=ct(i,p);var d=ve(l);ze(d,function(){pt("Cannot construct "+l+" due to unbound types",[u])}),Te([a,e,t],u?[u]:[],function(e){e=e[0];var t=u?(i=e.registeredClass).instancePrototype:Ve.prototype,r=me(d,function(){if(Object.getPrototypeOf(this)!==n)throw new Ae("Use 'new' to construct "+l);if(void 0===o.constructor_body)throw new Ae(l+" has no accessible constructor");var e=o.constructor_body[arguments.length];if(void 0===e)throw new Ae("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(o.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)}),n=Object.create(t,{constructor:{value:r}});r.prototype=n;var o=new Ne(l,r,n,p,i,s,c,f),e=new at(l,o,!0,!1,!1),t=new at(l+"*",o,!1,!1,!1),i=new at(l+" const*",o,!1,!0,!1);return He[a]={pointerType:t,constPointerType:i},ut(d,r),[e,t,i]})},w:function(e,o,t,r,i,n){T(0>1])};case 2:return function(e){var t=r?k:O;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}(t,r,n),destructorFunction:null}),ze(t,o)},a:function(e,t,r){var n=Ct(e,"enum");t=Pe(t),e=n.constructor,n=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:me(n.name+"_"+t,function(){})}}),e.values[r]=n,e[t]=n},A:function(e,t,r){r=Ce(r),Se(e,{name:t=Pe(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+$t(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:function(e,t){switch(t){case 2:return function(e){return this.fromWireType(j[e>>2])};case 3:return function(e){return this.fromWireType(R[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}(t,r),destructorFunction:null})},i:function(t,r,e,n,o,i){var a=dt(r,e);t=Pe(t),o=ct(n,o),ze(t,function(){pt("Cannot call "+t+" due to unbound types",a)},r-1),Te([],a,function(e){e=[e[0],null].concat(e.slice(1));return ut(t,yt(t,e,null,o,i),r-1),[]})},j:function(e,r,t,n,o){r=Pe(r),-1===o&&(o=4294967295);var i,a=Ce(t),u=function(e){return e};0===n&&(i=32-8*t,u=function(e){return e<>>i});var s=-1!=r.indexOf("unsigned");Se(e,{name:r,fromWireType:u,toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+$t(t)+'" to '+this.name);if(t>>0:0|t},argPackAdvance:8,readValueFromPointer:function(e,t,r){switch(t){case 0:return r?function(e){return S[e]}:function(e){return W[e]};case 1:return r?function(e){return E[e>>1]}:function(e){return F[e>>1]};case 2:return r?function(e){return k[e>>2]}:function(e){return O[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}(r,a,0!==n),destructorFunction:null})},h:function(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=O,r=t[e>>=2],e=t[e+1];return new n(_,e,r)}Se(e,{name:r=Pe(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},B:function(e,t){var s="std::string"===(t=Pe(t));Se(e,{name:t,fromWireType:function(e){var t,r=O[e>>2];if(s)for(var n=e+4,o=0;o<=r;++o){var i,a=e+4+o;o!=r&&0!=W[a]||(i=P(n,a-n),void 0===t?t=i:(t+=String.fromCharCode(0),t+=i),n=a+1)}else{for(var u=new Array(r),o=0;o>2]=n,s&&r)A(t,o+4,n+1);else if(r)for(var i=0;i>2],n=f(),o=e+4,i=0;i<=r;++i){var a,u=e+4+i*s;i!=r&&0!=n[u>>l]||(a=c(o,u-o),void 0===t?t=a:(t+=String.fromCharCode(0),t+=a),o=u+s)}return Rt(e),t},toWireType:function(e,t){"string"!=typeof t&&_e("Cannot pass non-string to C++ string type "+o);var r=a(t),n=jt(4+r+s);return O[n>>2]=r>>l,i(t,n+4,r+s),null!==e&&e.push(Rt,n),n},argPackAdvance:8,readValueFromPointer:fe,destructorFunction:function(e){Rt(e)}})},u:function(e,t,r,n,o,i){se[e]={name:Pe(t),rawConstructor:ct(r,n),rawDestructor:ct(o,i),fields:[]}},c:function(e,t,r,n,o,i,a,u,s,c){se[e].fields.push({fieldName:Pe(t),getterReturnType:r,getter:ct(n,o),getterContext:i,setterArgumentType:a,setter:ct(u,s),setterContext:c})},J:function(e,t){Se(e,{isVoid:!0,name:t=Pe(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},m:function(e,t,r){e=Pt(e),t=Ct(t,"emval::as");var n=[],o=Tt(n);return k[r>>2]=o,t.toWireType(n,e)},s:function(e,t,r,n){(e=St[e])(t=Pt(t),r=_t(r),null,n)},b:gt,y:function(e){return 0===e?Tt(Wt()):(e=_t(e),Tt(Wt()[e]))},p:function(e,t){for(var r=function(e,t){for(var r=new Array(e),n=0;n>2)+n],"parameter "+n);return r}(e,t),n=r[0],t=n.name+"_$"+r.slice(1).map(function(e){return e.name}).join("_")+"$",o=["retType"],i=[n],a="",u=0;u>> 2) + "+r+'], "parameter '+r+'");\nvar arg'+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\n";return n+="var obj = new constructor("+t+");\nreturn __emval_register(obj);\n}\n",new Function("requireRegisteredType","Module","__emval_register",n)(Ct,a,Tt)}(t),Et[t]=o),o(e,r,n)},f:function(e){return Tt(_t(e))},l:function(e){ce(mt[e].value),gt(e)},o:function(){Z()},E:function(e,t,r){W.copyWithin(e,t,t+r)},F:function(e){var t=W.length,r=2147483648;if(r<(e>>>=0))return!1;for(var n,o=1;o<=4;o*=2){var i=t*(1+.2/o),i=Math.min(i,e+100663296);if(function(e){try{return w.grow(e-_.byteLength+65535>>>16),H(w.buffer),1}catch(e){}}(Math.min(r,(0<(n=Math.max(e,i))%(i=65536)&&(n+=i-n%i),n))))return!0}return!1},G:function(e){return 0},C:function(e,t,r,n,o){},z:function(e,t,r,n){for(var o=0,i=0;i>2],u=k[t+(8*i+4)>>2],s=0;s>2]=o,0},D:function(e){0}},jt=(function(){var t={a:Ot};function r(e,t){e=e.exports;a.asm=e,H((w=a.asm.K).buffer),q=a.asm.O,e=a.asm.L,N.unshift(e),K--,a.monitorRunDependencies&&a.monitorRunDependencies(K),0==K&&(null!==Q&&(clearInterval(Q),Q=null),Y&&(e=Y,Y=null,e()))}function n(e){r(e.instance)}function o(e){return function(){if(!g&&(l||p)){if("function"==typeof fetch&&!ne(ie))return fetch(ie,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ie+"'";return e.arrayBuffer()}).catch(function(){return ae(ie)});if(u)return new Promise(function(t,e){u(ie,function(e){t(new Uint8Array(e))},e)})}return Promise.resolve().then(function(){return ae(ie)})}().then(function(e){return WebAssembly.instantiate(e,t)}).then(e,function(e){m("failed to asynchronously prepare wasm: "+e),Z(e)})}if(K++,a.monitorRunDependencies&&a.monitorRunDependencies(K),a.instantiateWasm)try{return a.instantiateWasm(t,r)}catch(e){return m("Module.instantiateWasm callback failed with error: "+e)}(g||"function"!=typeof WebAssembly.instantiateStreaming||te(ie)||ne(ie)||"function"!=typeof fetch?o(n):fetch(ie,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,t).then(n,function(e){return m("wasm streaming compile failed: "+e),m("falling back to ArrayBuffer instantiation"),o(n)})})).catch(i)}(),a.___wasm_call_ctors=function(){return(a.___wasm_call_ctors=a.asm.L).apply(null,arguments)},a._malloc=function(){return(jt=a._malloc=a.asm.M).apply(null,arguments)}),Rt=a._free=function(){return(Rt=a._free=a.asm.N).apply(null,arguments)},It=a.___getTypeName=function(){return(It=a.___getTypeName=a.asm.P).apply(null,arguments)};a.___embind_register_native_and_builtin_types=function(){return(a.___embind_register_native_and_builtin_types=a.asm.Q).apply(null,arguments)},a.dynCall_jiji=function(){return(a.dynCall_jiji=a.asm.R).apply(null,arguments)};function xt(e){function t(){kt||(kt=!0,a.calledRun=!0,b||(ue(N),ue(G),r(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),J()))}0