Subversion Repository Public Repository

Nextrek

@ 1084
1
2
3
4
5
6
function globalEval(e){eval.call(null,e)}function assert(e,r){e||abort("Assertion failed: "+r)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(e){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}function setValue(e,r,t){switch(t=t||"i8","*"===t.charAt(t.length-1)&&(t="i32"),t){case"i1":HEAP8[e>>0]=r;break;case"i8":HEAP8[e>>0]=r;break;case"i16":HEAP16[e>>1]=r;break;case"i32":HEAP32[e>>2]=r;break;case"i64":tempI64=[r>>>0,(tempDouble=r,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[e>>2]=tempI64[0],HEAP32[e+4>>2]=tempI64[1];break;case"float":HEAPF32[e>>2]=r;break;case"double":HEAPF64[e>>3]=r;break;default:abort("invalid type for setValue: "+t)}}function getValue(e,r){switch(r=r||"i8","*"===r.charAt(r.length-1)&&(r="i32"),r){case"i1":return HEAP8[e>>0];case"i8":return HEAP8[e>>0];case"i16":return HEAP16[e>>1];case"i32":return HEAP32[e>>2];case"i64":return HEAP32[e>>2];case"float":return HEAPF32[e>>2];case"double":return HEAPF64[e>>3];default:abort("invalid type for setValue: "+r)}return null}function allocate(e,r,t,n){var o,i;"number"==typeof e?(o=!0,i=e):(o=!1,i=e.length);var a,s="string"==typeof r?r:null;if(a=t==ALLOC_NONE?n:[_malloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][void 0===t?ALLOC_STATIC:t](Math.max(i,s?1:r.length)),o){var u,n=a;for(assert(0==(3&a)),u=a+(-4&i);u>n;n+=4)HEAP32[n>>2]=0;for(u=a+i;u>n;)HEAP8[n++>>0]=0;return a}if("i8"===s)return e.subarray||e.slice?HEAPU8.set(e,a):HEAPU8.set(new Uint8Array(e),a),a;for(var l,c,d,f=0;i>f;){var E=e[f];"function"==typeof E&&(E=Runtime.getFunctionIndex(E)),l=s||r[f],0!==l?("i64"==l&&(l="i32"),setValue(a+f,E,l),d!==l&&(c=Runtime.getNativeTypeSize(l),d=l),f+=c):f++}return a}function getMemory(e){return staticSealed?"undefined"!=typeof _sbrk&&!_sbrk.called||!runtimeInitialized?Runtime.dynamicAlloc(e):_malloc(e):Runtime.staticAlloc(e)}function Pointer_stringify(e,r){if(0===r||!e)return"";for(var t,n=0,o=0;;){if(t=HEAPU8[e+o>>0],n|=t,0==t&&!r)break;if(o++,r&&o==r)break}r||(r=o);var i="";if(128>n){for(var a,s=1024;r>0;)a=String.fromCharCode.apply(String,HEAPU8.subarray(e,e+Math.min(r,s))),i=i?i+a:a,e+=s,r-=s;return i}return Module.UTF8ToString(e)}function AsciiToString(e){for(var r="";;){var t=HEAP8[e++>>0];if(!t)return r;r+=String.fromCharCode(t)}}function stringToAscii(e,r){return writeAsciiToMemory(e,r,!1)}function UTF8ArrayToString(e,r){for(var t,n,o,i,a,s,u="";;){if(t=e[r++],!t)return u;if(128&t)if(n=63&e[r++],192!=(224&t))if(o=63&e[r++],224==(240&t)?t=(15&t)<<12|n<<6|o:(i=63&e[r++],240==(248&t)?t=(7&t)<<18|n<<12|o<<6|i:(a=63&e[r++],248==(252&t)?t=(3&t)<<24|n<<18|o<<12|i<<6|a:(s=63&e[r++],t=(1&t)<<30|n<<24|o<<18|i<<12|a<<6|s))),65536>t)u+=String.fromCharCode(t);else{var l=t-65536;u+=String.fromCharCode(55296|l>>10,56320|1023&l)}else u+=String.fromCharCode((31&t)<<6|n);else u+=String.fromCharCode(t)}}function UTF8ToString(e){return UTF8ArrayToString(HEAPU8,e)}function stringToUTF8Array(e,r,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&57343>=s&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),127>=s){if(t>=i)break;r[t++]=s}else if(2047>=s){if(t+1>=i)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(65535>=s){if(t+2>=i)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else if(2097151>=s){if(t+3>=i)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}else if(67108863>=s){if(t+4>=i)break;r[t++]=248|s>>24,r[t++]=128|s>>18&63,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+5>=i)break;r[t++]=252|s>>30,r[t++]=128|s>>24&63,r[t++]=128|s>>18&63,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o}function stringToUTF8(e,r,t){return stringToUTF8Array(e,HEAPU8,r,t)}function lengthBytesUTF8(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&57343>=n&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++t)),127>=n?++r:r+=2047>=n?2:65535>=n?3:2097151>=n?4:67108863>=n?5:6}return r}function UTF16ToString(e){for(var r=0,t="";;){var n=HEAP16[e+2*r>>1];if(0==n)return t;++r,t+=String.fromCharCode(n)}}function stringToUTF16(e,r,t){if(void 0===t&&(t=2147483647),2>t)return 0;t-=2;for(var n=r,o=t<2*e.length?t/2:e.length,i=0;o>i;++i){var a=e.charCodeAt(i);HEAP16[r>>1]=a,r+=2}return HEAP16[r>>1]=0,r-n}function lengthBytesUTF16(e){return 2*e.length}function UTF32ToString(e){for(var r=0,t="";;){var n=HEAP32[e+4*r>>2];if(0==n)return t;if(++r,n>=65536){var o=n-65536;t+=String.fromCharCode(55296|o>>10,56320|1023&o)}else t+=String.fromCharCode(n)}}function stringToUTF32(e,r,t){if(void 0===t&&(t=2147483647),4>t)return 0;for(var n=r,o=n+t-4,i=0;i<e.length;++i){var a=e.charCodeAt(i);if(a>=55296&&57343>=a){var s=e.charCodeAt(++i);a=65536+((1023&a)<<10)|1023&s}if(HEAP32[r>>2]=a,r+=4,r+4>o)break}return HEAP32[r>>2]=0,r-n}function lengthBytesUTF32(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&57343>=n&&++t,r+=4}return r}function demangle(e){function r(){u++,"K"===e[u]&&u++;for(var r=[];"E"!==e[u];)if("S"!==e[u])if("C"!==e[u]){var t=parseInt(e.substr(u)),n=t.toString().length;if(!t||!n){u--;break}var o=e.substr(u+n,t);r.push(o),c.push(o),u+=n+t}else r.push(r[r.length-1]),u+=2;else{u++;var i=e.indexOf("_",u),a=e.substring(u,i)||0;r.push(c[a]||"?"),u=i+1}return u++,r}function t(n,o,i){function a(){return"("+f.join(", ")+")"}o=o||1/0;var s,c="",f=[];if("N"===e[u]){if(s=r().join("::"),o--,0===o)return n?[s]:s}else{("K"===e[u]||d&&"L"===e[u])&&u++;var E=parseInt(e.substr(u));if(E){var m=E.toString().length;s=e.substr(u+m,E),u+=m+E}}if(d=!1,"I"===e[u]){u++;var S=t(!0),p=t(!0,1,!0);c+=p[0]+" "+s+"<"+S.join(", ")+">"}else c=s;e:for(;u<e.length&&o-->0;){var h=e[u++];if(h in l)f.push(l[h]);else switch(h){case"P":f.push(t(!0,1,!0)[0]+"*");break;case"R":f.push(t(!0,1,!0)[0]+"&");break;case"L":u++;var _=e.indexOf("E",u),E=_-u;f.push(e.substr(u,E)),u+=E+2;break;case"A":var E=parseInt(e.substr(u));if(u+=E.toString().length,"_"!==e[u])throw"?";u++,f.push(t(!0,1,!0)[0]+" ["+E+"]");break;case"E":break e;default:c+="?"+h;break e}}return i||1!==f.length||"void"!==f[0]||(f=[]),n?(c&&f.push(c+"?"),f):c+a()}var n=!!Module.___cxa_demangle;if(n)try{var o=_malloc(e.length);writeStringToMemory(e.substr(1),o);var i=_malloc(4),a=Module.___cxa_demangle(o,0,0,i);if(0===getValue(i,"i32")&&a)return Pointer_stringify(a)}catch(s){}finally{o&&_free(o),i&&_free(i),a&&_free(a)}var u=3,l={v:"void",b:"bool",c:"char",s:"short",i:"int",l:"long",f:"float",d:"double",w:"wchar_t",a:"signed char",h:"unsigned char",t:"unsigned short",j:"unsigned int",m:"unsigned long",x:"long long",y:"unsigned long long",z:"..."},c=[],d=!0,f=e;try{if("Object._main"==e||"_main"==e)return"main()";if("number"==typeof e&&(e=Pointer_stringify(e)),"_"!==e[0])return e;if("_"!==e[1])return e;if("Z"!==e[2])return e;switch(e[3]){case"n":return"operator new()";case"d":return"operator delete()"}f=t()}catch(s){f+="?"}return f.indexOf("?")>=0&&!n&&Runtime.warnOnce("warning: a problem occurred in builtin C++ name demangling; build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling"),f}function demangleAll(e){return e.replace(/__Z[\w\d_]+/g,function(e){var r=demangle(e);return e===r?e:e+" ["+r+"]"})}function jsStackTrace(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(r){e=r}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function stackTrace(){return demangleAll(jsStackTrace())}function alignMemoryPage(e){return e%4096>0&&(e+=4096-e%4096),e}function enlargeMemory(){var e=Math.pow(2,31);if(DYNAMICTOP>=e)return!1;for(;DYNAMICTOP>=TOTAL_MEMORY;)if(e/2>TOTAL_MEMORY)TOTAL_MEMORY=alignMemoryPage(2*TOTAL_MEMORY);else{var r=TOTAL_MEMORY;if(TOTAL_MEMORY=alignMemoryPage((3*TOTAL_MEMORY+e)/4),r>=TOTAL_MEMORY)return!1}if(TOTAL_MEMORY=Math.max(TOTAL_MEMORY,16777216),TOTAL_MEMORY>=e)return!1;try{if(ArrayBuffer.transfer)buffer=ArrayBuffer.transfer(buffer,TOTAL_MEMORY);else{var t=HEAP8;buffer=new ArrayBuffer(TOTAL_MEMORY)}}catch(n){return!1}var o=_emscripten_replace_memory(buffer);return o?(Module.buffer=buffer,Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer),ArrayBuffer.transfer||HEAP8.set(t),!0):!1}function callRuntimeCallbacks(e){for(;e.length>0;){var r=e.shift();if("function"!=typeof r){var t=r.func;"number"==typeof t?void 0===r.arg?Runtime.dynCall("v",t):Runtime.dynCall("vi",t,[r.arg]):t(void 0===r.arg?null:r.arg)}else r()}}function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPreMain(e){__ATMAIN__.unshift(e)}function addOnExit(e){__ATEXIT__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}function intArrayFromString(e,r,t){var n=t>0?t:lengthBytesUTF8(e)+1,o=new Array(n),i=stringToUTF8Array(e,o,0,o.length);return r&&(o.length=i),o}function intArrayToString(e){for(var r=[],t=0;t<e.length;t++){var n=e[t];n>255&&(n&=255),r.push(String.fromCharCode(n))}return r.join("")}function writeStringToMemory(e,r,t){for(var n=intArrayFromString(e,t),o=0;o<n.length;){var i=n[o];HEAP8[r+o>>0]=i,o+=1}}function writeArrayToMemory(e,r){for(var t=0;t<e.length;t++)HEAP8[r++>>0]=e[t]}function writeAsciiToMemory(e,r,t){for(var n=0;n<e.length;++n)HEAP8[r++>>0]=e.charCodeAt(n);t||(HEAP8[r>>0]=0)}function unSign(e,r){return e>=0?e:32>=r?2*Math.abs(1<<r-1)+e:Math.pow(2,r)+e}function reSign(e,r){if(0>=e)return e;var t=32>=r?Math.abs(1<<r-1):Math.pow(2,r-1);return e>=t&&(32>=r||e>t)&&(e=-2*t+e),e}function getUniqueRunDependency(e){return e}function addRunDependency(){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}function removeRunDependency(){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),0==runDependencies&&(null!==runDependencyWatcher&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var e=dependenciesFulfilled;dependenciesFulfilled=null,e()}}function _emscripten_asm_const_0(e){return ASM_CONSTS[e]()}function copyTempFloat(e){HEAP8[tempDoublePtr]=HEAP8[e],HEAP8[tempDoublePtr+1]=HEAP8[e+1],HEAP8[tempDoublePtr+2]=HEAP8[e+2],HEAP8[tempDoublePtr+3]=HEAP8[e+3]}function copyTempDouble(e){HEAP8[tempDoublePtr]=HEAP8[e],HEAP8[tempDoublePtr+1]=HEAP8[e+1],HEAP8[tempDoublePtr+2]=HEAP8[e+2],HEAP8[tempDoublePtr+3]=HEAP8[e+3],HEAP8[tempDoublePtr+4]=HEAP8[e+4],HEAP8[tempDoublePtr+5]=HEAP8[e+5],HEAP8[tempDoublePtr+6]=HEAP8[e+6],HEAP8[tempDoublePtr+7]=HEAP8[e+7]}function ___setErrNo(e){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=e),e}function _sysconf(e){switch(e){case 30:return PAGE_SIZE;case 85:return totalMemory/PAGE_SIZE;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"==typeof navigator?navigator.hardwareConcurrency||1:1}return ___setErrNo(ERRNO_CODES.EINVAL),-1}function _pthread_cleanup_push(e,r){__ATEXIT__.push(function(){Runtime.dynCall("vi",e,[r])}),_pthread_cleanup_push.level=__ATEXIT__.length}function _pthread_cleanup_pop(){assert(_pthread_cleanup_push.level==__ATEXIT__.length,"cannot pop if something else added meanwhile!"),__ATEXIT__.pop(),_pthread_cleanup_push.level=__ATEXIT__.length}function _abort(){Module.abort()}function ___lock(){}function ___unlock(){}function ___syscall6(e,r){SYSCALLS.varargs=r;try{var t=SYSCALLS.getStreamFromFD();return FS.close(t),0}catch(n){return"undefined"!=typeof FS&&n instanceof FS.ErrnoError||abort(n),-n.errno}}function _sbrk(e){var r=_sbrk;r.called||(DYNAMICTOP=alignMemoryPage(DYNAMICTOP),r.called=!0,assert(Runtime.dynamicAlloc),r.alloc=Runtime.dynamicAlloc,Runtime.dynamicAlloc=function(){abort("cannot dynamically allocate, sbrk now has control")});var t=DYNAMICTOP;if(0!=e){var n=r.alloc(e);if(!n)return-1>>>0}return t}function _emscripten_memcpy_big(e,r,t){return HEAPU8.set(HEAPU8.subarray(r,r+t),e),e}function _emscripten_set_main_loop_timing(e,r){function t(e){e.source===window&&e.data===o&&(e.stopPropagation(),n.shift()())}if(Browser.mainLoop.timingMode=e,Browser.mainLoop.timingValue=r,!Browser.mainLoop.func)return 1;if(0==e)Browser.mainLoop.scheduler=function(){setTimeout(Browser.mainLoop.runner,r)},Browser.mainLoop.method="timeout";else if(1==e)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(2==e){if(!window.setImmediate){var n=[],o="__emcc";window.addEventListener("message",t,!0),window.setImmediate=function(e){n.push(e),window.postMessage(o,"*")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function _emscripten_set_main_loop(e,r,t,n,o){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=e,Browser.mainLoop.arg=n;var i=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var r=Date.now(),t=Browser.mainLoop.queue.shift();if(t.func(t.arg),Browser.mainLoop.remainingBlockers){var o=Browser.mainLoop.remainingBlockers,a=o%1==0?o-1:Math.floor(o);t.counted?Browser.mainLoop.remainingBlockers=a:(a+=.5,Browser.mainLoop.remainingBlockers=(8*o+a)/9)}return console.log('main loop blocker "'+t.name+'" took '+(Date.now()-r)+" ms"),Browser.mainLoop.updateStatus(),void setTimeout(Browser.mainLoop.runner,0)}if(!(i<Browser.mainLoop.currentlyRunningMainloop)){if(Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0,1==Browser.mainLoop.timingMode&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0)return void Browser.mainLoop.scheduler();"timeout"===Browser.mainLoop.method&&Module.ctx&&(Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Browser.mainLoop.method=""),Browser.mainLoop.runIter(function(){"undefined"!=typeof n?Runtime.dynCall("vi",e,[n]):Runtime.dynCall("v",e)}),i<Browser.mainLoop.currentlyRunningMainloop||("object"==typeof SDL&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),Browser.mainLoop.scheduler())}}},o||(r&&r>0?_emscripten_set_main_loop_timing(0,1e3/r):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),t)throw"SimulateInfiniteLoop"}function _time(e){var r=Date.now()/1e3|0;return e&&(HEAP32[e>>2]=r),r}function _pthread_self(){return 0}function ___syscall140(e,r){SYSCALLS.varargs=r;try{var t=SYSCALLS.getStreamFromFD(),n=SYSCALLS.get(),o=SYSCALLS.get(),i=SYSCALLS.get(),a=SYSCALLS.get(),s=o;return assert(0===n),FS.llseek(t,s,a),HEAP32[i>>2]=t.position,t.getdents&&0===s&&0===a&&(t.getdents=null),0}catch(u){return"undefined"!=typeof FS&&u instanceof FS.ErrnoError||abort(u),-u.errno}}function ___syscall146(e,r){SYSCALLS.varargs=r;try{var t=SYSCALLS.getStreamFromFD(),n=SYSCALLS.get(),o=SYSCALLS.get();return SYSCALLS.doWritev(t,n,o)}catch(i){return"undefined"!=typeof FS&&i instanceof FS.ErrnoError||abort(i),-i.errno}}function ___syscall54(e,r){SYSCALLS.varargs=r;try{var t=SYSCALLS.getStreamFromFD(),n=SYSCALLS.get();switch(n){case 21505:return t.tty?0:-ERRNO_CODES.ENOTTY;case 21506:return t.tty?0:-ERRNO_CODES.ENOTTY;case 21519:if(!t.tty)return-ERRNO_CODES.ENOTTY;var o=SYSCALLS.get();return HEAP32[o>>2]=0,0;case 21520:return t.tty?-ERRNO_CODES.EINVAL:-ERRNO_CODES.ENOTTY;case 21531:var o=SYSCALLS.get();return FS.ioctl(t,n,o);default:abort("bad ioctl syscall "+n)}}catch(i){return"undefined"!=typeof FS&&i instanceof FS.ErrnoError||abort(i),-i.errno}}function invoke_ii(e,r){try{return Module.dynCall_ii(e,r)}catch(t){if("number"!=typeof t&&"longjmp"!==t)throw t;asm.setThrew(1,0)}}function invoke_iiii(e,r,t,n){try{return Module.dynCall_iiii(e,r,t,n)}catch(o){if("number"!=typeof o&&"longjmp"!==o)throw o;asm.setThrew(1,0)}}function invoke_vi(e,r){try{Module.dynCall_vi(e,r)}catch(t){if("number"!=typeof t&&"longjmp"!==t)throw t;asm.setThrew(1,0)}}function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function run(e){function r(){Module.calledRun||(Module.calledRun=!0,ABORT||(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(e),postRun()))}e=e||Module.arguments,null===preloadStartTime&&(preloadStartTime=Date.now()),runDependencies>0||(preRun(),runDependencies>0||Module.calledRun||(Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),r()},1)):r()))}function exit(e,r){if(!r||!Module.noExitRuntime)throw Module.noExitRuntime||(ABORT=!0,EXITSTATUS=e,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(e)),ENVIRONMENT_IS_NODE?(process.stdout.once("drain",function(){process.exit(e)}),console.log(" "),setTimeout(function(){process.exit(e)},500)):ENVIRONMENT_IS_SHELL&&"function"==typeof quit&&quit(e),new ExitStatus(e)}function abort(e){void 0!==e?(Module.print(e),Module.printErr(e),e=JSON.stringify(e)):e="",ABORT=!0,EXITSTATUS=1;var r="\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.",t="abort("+e+") at "+stackTrace()+r;throw abortDecorators&&abortDecorators.forEach(function(r){t=r(t,e)}),t}var Module;Module||(Module=("undefined"!=typeof Module?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_NODE="object"==typeof process&&"function"==typeof require&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=function(e){process.stdout.write(e+"\n")}),Module.printErr||(Module.printErr=function(e){process.stderr.write(e+"\n")});var nodeFS=require("fs"),nodePath=require("path");Module.read=function(e,r){e=nodePath.normalize(e);var t=nodeFS.readFileSync(e);return t||e==nodePath.resolve(e)||(e=path.join(__dirname,"..","src",e),t=nodeFS.readFileSync(e)),t&&!r&&(t=t.toString()),t},Module.readBinary=function(e){var r=Module.read(e,!0);return r.buffer||(r=new Uint8Array(r)),assert(r.buffer),r},Module.load=function(e){globalEval(read(e))},Module.thisProgram||(Module.thisProgram=process.argv.length>1?process.argv[1].replace(/\\/g,"/"):"unknown-program"),Module.arguments=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=Module),process.on("uncaughtException",function(e){if(!(e instanceof ExitStatus))throw e}),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),"undefined"!=typeof printErr&&(Module.printErr=printErr),Module.read="undefined"!=typeof read?read:function(){throw"no read() available (jsc?)"},Module.readBinary=function(e){if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));var r=read(e,"binary");return assert("object"==typeof r),r},"undefined"!=typeof scriptArgs?Module.arguments=scriptArgs:"undefined"!=typeof arguments&&(Module.arguments=arguments);else{if(!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER)throw"Unknown runtime environment. Where are we?";if(Module.read=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},"undefined"!=typeof arguments&&(Module.arguments=arguments),"undefined"!=typeof console)Module.print||(Module.print=function(e){console.log(e)}),Module.printErr||(Module.printErr=function(e){console.log(e)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&"undefined"!=typeof dump?function(e){dump(e)}:function(){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),"undefined"==typeof Module.setWindowTitle&&(Module.setWindowTitle=function(e){document.title=e})}!Module.load&&Module.read&&(Module.load=function(e){globalEval(Module.read(e))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);var Runtime={setTempRet0:function(e){tempRet0=e},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(e){STACKTOP=e},getNativeTypeSize:function(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:if("*"===e[e.length-1])return Runtime.QUANTUM_SIZE;if("i"===e[0]){var r=parseInt(e.substr(1));return assert(r%8===0),r/8}return 0}},getNativeFieldSize:function(e){return Math.max(Runtime.getNativeTypeSize(e),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(e,r){return"double"===r||"i64"===r?7&e&&(assert(4===(7&e)),e+=4):assert(0===(3&e)),e},getAlignSize:function(e,r,t){return t||"i64"!=e&&"double"!=e?e?Math.min(r||(e?Runtime.getNativeFieldSize(e):0),Runtime.QUANTUM_SIZE):Math.min(r,8):8},dynCall:function(e,r,t){return t&&t.length?(t.splice||(t=Array.prototype.slice.call(t)),t.splice(0,0,r),Module["dynCall_"+e].apply(null,t)):Module["dynCall_"+e].call(null,r)},functionPointers:[],addFunction:function(e){for(var r=0;r<Runtime.functionPointers.length;r++)if(!Runtime.functionPointers[r])return Runtime.functionPointers[r]=e,2*(1+r);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."},removeFunction:function(e){Runtime.functionPointers[(e-2)/2]=null},warnOnce:function(e){Runtime.warnOnce.shown||(Runtime.warnOnce.shown={}),Runtime.warnOnce.shown[e]||(Runtime.warnOnce.shown[e]=1,Module.printErr(e))},funcWrappers:{},getFuncWrapper:function(e,r){assert(r),Runtime.funcWrappers[r]||(Runtime.funcWrappers[r]={});var t=Runtime.funcWrappers[r];return t[e]||(t[e]=function(){return Runtime.dynCall(r,e,arguments)}),t[e]},getCompilerSetting:function(){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"},stackAlloc:function(e){var r=STACKTOP;return STACKTOP=STACKTOP+e|0,STACKTOP=STACKTOP+15&-16,r},staticAlloc:function(e){var r=STATICTOP;return STATICTOP=STATICTOP+e|0,STATICTOP=STATICTOP+15&-16,r},dynamicAlloc:function(e){var r=DYNAMICTOP;if(DYNAMICTOP=DYNAMICTOP+e|0,DYNAMICTOP=DYNAMICTOP+15&-16,DYNAMICTOP>=TOTAL_MEMORY){var t=enlargeMemory();if(!t)return DYNAMICTOP=r,0}return r},alignMemory:function(e,r){var t=e=Math.ceil(e/(r?r:16))*(r?r:16);return t},makeBigInt:function(e,r,t){var n=t?+(e>>>0)+4294967296*+(r>>>0):+(e>>>0)+4294967296*+(0|r);return n},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var __THREW__=0,ABORT=!1,EXITSTATUS=0,undef=0,tempValue,tempInt,tempBigInt,tempInt2,tempBigInt2,tempPair,tempBigIntI,tempBigIntR,tempBigIntS,tempBigIntP,tempBigIntD,tempDouble,tempFloat,tempI64,tempI64b,tempRet0,tempRet1,tempRet2,tempRet3,tempRet4,tempRet5,tempRet6,tempRet7,tempRet8,tempRet9,globalScope=this,cwrap,ccall;!function(){function parseJSFunc(e){var r=e.toString().match(sourceRegex).slice(1);return{arguments:r[0],body:r[1],returnValue:r[2]}}var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(e){var r=Runtime.stackAlloc(e.length);return writeArrayToMemory(e,r),r},stringToC:function(e){var r=0;return null!==e&&void 0!==e&&0!==e&&(r=Runtime.stackAlloc((e.length<<2)+1),writeStringToMemory(e,r)),r}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(e,r,t,n,o){var i=getCFunc(e),a=[],s=0;if(n)for(var u=0;u<n.length;u++){var l=toC[t[u]];l?(0===s&&(s=Runtime.stackSave()),a[u]=l(n[u])):a[u]=n[u]}var c=i.apply(null,a);if("string"===r&&(c=Pointer_stringify(c)),0!==s){if(o&&o.async)return void EmterpreterAsync.asyncFinalizers.push(function(){Runtime.stackRestore(s)});Runtime.stackRestore(s)}return c};var sourceRegex=/^function\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/,JSsource={};for(var fun in JSfuncs)JSfuncs.hasOwnProperty(fun)&&(JSsource[fun]=parseJSFunc(JSfuncs[fun]));cwrap=function cwrap(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every(function(e){return"number"===e}),numericRet="string"!==returnType;if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map(function(e,r){return"$"+r}),funcstr="(function("+argNames.join(",")+") {",nargs=argTypes.length;if(!numericArgs){funcstr+="var stack = "+JSsource.stackSave.body+";";for(var i=0;nargs>i;i++){var arg=argNames[i],type=argTypes[i];if("number"!==type){var convertCode=JSsource[type+"ToC"];funcstr+="var "+convertCode.arguments+" = "+arg+";",funcstr+=convertCode.body+";",funcstr+=arg+"="+convertCode.returnValue+";"}}}var cfuncname=parseJSFunc(function(){return cfunc}).returnValue;if(funcstr+="var ret = "+cfuncname+"("+argNames.join(",")+");",!numericRet){var strgfy=parseJSFunc(function(){return Pointer_stringify}).returnValue;funcstr+="ret = "+strgfy+"(ret);"}return numericArgs||(funcstr+=JSsource.stackRestore.body.replace("()","(stack)")+";"),funcstr+="return ret})",eval(funcstr)}}(),Module.ccall=ccall,Module.cwrap=cwrap,Module.setValue=setValue,Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE,Module.allocate=allocate,Module.getMemory=getMemory,Module.Pointer_stringify=Pointer_stringify,Module.AsciiToString=AsciiToString,Module.stringToAscii=stringToAscii,Module.UTF8ArrayToString=UTF8ArrayToString,Module.UTF8ToString=UTF8ToString,Module.stringToUTF8Array=stringToUTF8Array,Module.stringToUTF8=stringToUTF8,Module.lengthBytesUTF8=lengthBytesUTF8,Module.UTF16ToString=UTF16ToString,Module.stringToUTF16=stringToUTF16,Module.lengthBytesUTF16=lengthBytesUTF16,Module.UTF32ToString=UTF32ToString,Module.stringToUTF32=stringToUTF32,Module.lengthBytesUTF32=lengthBytesUTF32,Module.stackTrace=stackTrace;var PAGE_SIZE=4096,HEAP,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,STATIC_BASE=0,STATICTOP=0,staticSealed=!1,STACK_BASE=0,STACKTOP=0,STACK_MAX=0,DYNAMIC_BASE=0,DYNAMICTOP=0,byteLength;try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get),byteLength(new ArrayBuffer(4))}catch(e){byteLength=function(e){return e.byteLength}}for(var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||16777216,totalMemory=65536;TOTAL_MEMORY>totalMemory||2*TOTAL_STACK>totalMemory;)16777216>totalMemory?totalMemory*=2:totalMemory+=16777216;totalMemory=Math.max(totalMemory,16777216),totalMemory!==TOTAL_MEMORY&&(TOTAL_MEMORY=totalMemory),assert("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&!!new Int32Array(1).subarray&&!!new Int32Array(1).set,"JS engine does not provide full typed array support");var buffer;buffer=new ArrayBuffer(TOTAL_MEMORY),HEAP8=new Int8Array(buffer),HEAP16=new Int16Array(buffer),HEAP32=new Int32Array(buffer),HEAPU8=new Uint8Array(buffer),HEAPU16=new Uint16Array(buffer),HEAPU32=new Uint32Array(buffer),HEAPF32=new Float32Array(buffer),HEAPF64=new Float64Array(buffer),HEAP32[0]=255,assert(255===HEAPU8[0]&&0===HEAPU8[3],"Typed arrays 2 must be run on a little-endian system"),Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;Module.addOnPreRun=addOnPreRun,Module.addOnInit=addOnInit,Module.addOnPreMain=addOnPreMain,Module.addOnExit=addOnExit,Module.addOnPostRun=addOnPostRun,Module.intArrayFromString=intArrayFromString,Module.intArrayToString=intArrayToString,Module.writeStringToMemory=writeStringToMemory,Module.writeArrayToMemory=writeArrayToMemory,Module.writeAsciiToMemory=writeAsciiToMemory,Math.imul&&-5===Math.imul(4294967295,5)||(Math.imul=function(e,r){var t=e>>>16,n=65535&e,o=r>>>16,i=65535&r;return n*i+(t*i+n*o<<16)|0}),Math.imul=Math.imul,Math.clz32||(Math.clz32=function(e){e>>>=0;for(var r=0;32>r;r++)if(e&1<<31-r)return r;return 32}),Math.clz32=Math.clz32;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_min=Math.min,Math_clz32=Math.clz32,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;Module.addRunDependency=addRunDependency,Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var memoryInitializer=null,ASM_CONSTS=[function(){window.ac73d65e9fa723b7=function(e){if(!$PARAMS.needsPreparation)return e;var r=new Uint8Array(e),t=Module._malloc(r.length*r.BYTES_PER_ELEMENT),n=new Uint8Array(Module.HEAPU8.buffer,t,r.length*r.BYTES_PER_ELEMENT);n.set(new Uint8Array(r.buffer)),Module.ccall("ac6d78ea1cf7fe2",null,["number","number"],[n.byteOffset,r.length]);for(var o=new Uint8Array(new ArrayBuffer(r.length)),i=new Uint8Array(n.buffer,n.byteOffset,r.length),a=0;a<o.length;a++)o[a]=i[a];

return Module._free(n.byteOffset),o.buffer},window.GS.DataPreparer.prepare=ac73d65e9fa723b7,delete window.ac73d65e9fa723b7}];STATIC_BASE=8,STATICTOP=STATIC_BASE+2512,__ATINIT__.push(),allocate([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,210,5,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,123,32,119,105,110,100,111,119,46,97,99,55,51,100,54,53,101,57,102,97,55,50,51,98,55,32,61,32,102,117,110,99,116,105,111,110,40,100,97,116,97,41,32,123,32,105,102,40,33,36,80,65,82,65,77,83,46,110,101,101,100,115,80,114,101,112,97,114,97,116,105,111,110,41,32,114,101,116,117,114,110,32,100,97,116,97,59,32,118,97,114,32,100,97,116,97,65,114,114,97,121,32,61,32,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,100,97,116,97,41,59,32,118,97,114,32,100,97,116,97,80,116,114,32,61,32,77,111,100,117,108,101,46,95,109,97,108,108,111,99,40,100,97,116,97,65,114,114,97,121,46,108,101,110,103,116,104,32,42,32,100,97,116,97,65,114,114,97,121,46,66,89,84,69,83,95,80,69,82,95,69,76,69,77,69,78,84,41,59,32,118,97,114,32,100,97,116,97,72,101,97,112,32,61,32,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,77,111,100,117,108,101,46,72,69,65,80,85,56,46,98,117,102,102,101,114,44,32,100,97,116,97,80,116,114,44,32,100,97,116,97,65,114,114,97,121,46,108,101,110,103,116,104,32,42,32,100,97,116,97,65,114,114,97,121,46,66,89,84,69,83,95,80,69,82,95,69,76,69,77,69,78,84,41,59,32,100,97,116,97,72,101,97,112,46,115,101,116,40,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,100,97,116,97,65,114,114,97,121,46,98,117,102,102,101,114,41,41,59,32,77,111,100,117,108,101,46,99,99,97,108,108,40,34,97,99,54,100,55,56,101,97,49,99,102,55,102,101,50,34,44,32,110,117,108,108,44,32,91,34,110,117,109,98,101,114,34,44,32,34,110,117,109,98,101,114,34,93,44,32,91,100,97,116,97,72,101,97,112,46,98,121,116,101,79,102,102,115,101,116,44,32,100,97,116,97,65,114,114,97,121,46,108,101,110,103,116,104,93,41,59,32,118,97,114,32,100,68,97,116,97,32,61,32,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,110,101,119,32,65,114,114,97,121,66,117,102,102,101,114,40,100,97,116,97,65,114,114,97,121,46,108,101,110,103,116,104,41,41,59,32,118,97,114,32,104,68,97,116,97,32,61,32,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,100,97,116,97,72,101,97,112,46,98,117,102,102,101,114,44,32,100,97,116,97,72,101,97,112,46,98,121,116,101,79,102,102,115,101,116,44,32,100,97,116,97,65,114,114,97,121,46,108,101,110,103,116,104,41,59,32,102,111,114,40,118,97,114,32,105,32,61,32,48,59,32,105,32,60,32,100,68,97,116,97,46,108,101,110,103,116,104,59,32,105,43,43,41,32,100,68,97,116,97,91,105,93,32,61,32,104,68,97,116,97,91,105,93,59,32,77,111,100,117,108,101,46,95,102,114,101,101,40,100,97,116,97,72,101,97,112,46,98,121,116,101,79,102,102,115,101,116,41,59,32,114,101,116,117,114,110,32,100,68,97,116,97,46,98,117,102,102,101,114,59,32,125,59,32,119,105,110,100,111,119,46,71,83,46,68,97,116,97,80,114,101,112,97,114,101,114,46,112,114,101,112,97,114,101,32,61,32,97,99,55,51,100,54,53,101,57,102,97,55,50,51,98,55,59,32,100,101,108,101,116,101,32,119,105,110,100,111,119,46,97,99,55,51,100,54,53,101,57,102,97,55,50,51,98,55,59,32,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=Runtime.alignMemory(allocate(12,"i8",ALLOC_STATIC),8);assert(tempDoublePtr%8==0);var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};Module._memset=_memset;var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can   access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"},PATH={splitPath:function(e){var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return r.exec(e).slice(1)},normalizeArray:function(e,r){for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t--;t)e.unshift("..");return e},normalize:function(e){var r="/"===e.charAt(0),t="/"===e.substr(-1);return e=PATH.normalizeArray(e.split("/").filter(function(e){return!!e}),!r).join("/"),e||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:function(e){var r=PATH.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:function(e){if("/"===e)return"/";var r=e.lastIndexOf("/");return-1===r?e:e.substr(r+1)},extname:function(e){return PATH.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return PATH.normalize(e.join("/"))},join2:function(e,r){return PATH.normalize(e+"/"+r)},resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:FS.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r="/"===n.charAt(0)}return e=PATH.normalizeArray(e.split("/").filter(function(e){return!!e}),!r).join("/"),(r?"/":"")+e||"."},relative:function(e,r){function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=PATH.resolve(e).substr(1),r=PATH.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),i=Math.min(n.length,o.length),a=i,s=0;i>s;s++)if(n[s]!==o[s]){a=s;break}for(var u=[],s=a;s<n.length;s++)u.push("..");return u=u.concat(o.slice(a)),u.join("/")}},TTY={ttys:[],init:function(){},shutdown:function(){},register:function(e,r){TTY.ttys[e]={input:[],output:[],ops:r},FS.registerDevice(e,TTY.stream_ops)},stream_ops:{open:function(e){var r=TTY.ttys[e.node.rdev];if(!r)throw new FS.ErrnoError(ERRNO_CODES.ENODEV);e.tty=r,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,r,t,n){if(!e.tty||!e.tty.ops.get_char)throw new FS.ErrnoError(ERRNO_CODES.ENXIO);for(var o=0,i=0;n>i;i++){var a;try{a=e.tty.ops.get_char(e.tty)}catch(s){throw new FS.ErrnoError(ERRNO_CODES.EIO)}if(void 0===a&&0===o)throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);if(null===a||void 0===a)break;o++,r[t+i]=a}return o&&(e.node.timestamp=Date.now()),o},write:function(e,r,t,n){if(!e.tty||!e.tty.ops.put_char)throw new FS.ErrnoError(ERRNO_CODES.ENXIO);for(var o=0;n>o;o++)try{e.tty.ops.put_char(e.tty,r[t+o])}catch(i){throw new FS.ErrnoError(ERRNO_CODES.EIO)}return n&&(e.node.timestamp=Date.now()),o}},default_tty_ops:{get_char:function(e){if(!e.input.length){var r=null;if(ENVIRONMENT_IS_NODE){var t=256,n=new Buffer(t),o=0,i=process.stdin.fd,a=!1;try{i=fs.openSync("/dev/stdin","r"),a=!0}catch(s){}o=fs.readSync(i,n,0,t,null),a&&fs.closeSync(i),r=o>0?n.slice(0,o).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(r=window.prompt("Input: "),null!==r&&(r+="\n")):"function"==typeof readline&&(r=readline(),null!==r&&(r+="\n"));if(!r)return null;e.input=intArrayFromString(r,!0)}return e.input.shift()},put_char:function(e,r){null===r||10===r?(Module.print(UTF8ArrayToString(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},flush:function(e){e.output&&e.output.length>0&&(Module.print(UTF8ArrayToString(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,r){null===r||10===r?(Module.printErr(UTF8ArrayToString(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},flush:function(e){e.output&&e.output.length>0&&(Module.printErr(UTF8ArrayToString(e.output,0)),e.output=[])}}},MEMFS={ops_table:null,mount:function(){return MEMFS.createNode(null,"/",16895,0)},createNode:function(e,r,t,n){if(FS.isBlkdev(t)||FS.isFIFO(t))throw new FS.ErrnoError(ERRNO_CODES.EPERM);MEMFS.ops_table||(MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}});var o=FS.createNode(e,r,t,n);return FS.isDir(o.mode)?(o.node_ops=MEMFS.ops_table.dir.node,o.stream_ops=MEMFS.ops_table.dir.stream,o.contents={}):FS.isFile(o.mode)?(o.node_ops=MEMFS.ops_table.file.node,o.stream_ops=MEMFS.ops_table.file.stream,o.usedBytes=0,o.contents=null):FS.isLink(o.mode)?(o.node_ops=MEMFS.ops_table.link.node,o.stream_ops=MEMFS.ops_table.link.stream):FS.isChrdev(o.mode)&&(o.node_ops=MEMFS.ops_table.chrdev.node,o.stream_ops=MEMFS.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o),o},getFileDataAsRegularArray:function(e){if(e.contents&&e.contents.subarray){for(var r=[],t=0;t<e.usedBytes;++t)r.push(e.contents[t]);return r}return e.contents},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array},expandFileStorage:function(e,r){if(e.contents&&e.contents.subarray&&r>e.contents.length&&(e.contents=MEMFS.getFileDataAsRegularArray(e),e.usedBytes=e.contents.length),!e.contents||e.contents.subarray){var t=e.contents?e.contents.buffer.byteLength:0;if(t>=r)return;var n=1048576;r=Math.max(r,t*(n>t?2:1.125)|0),0!=t&&(r=Math.max(r,256));var o=e.contents;return e.contents=new Uint8Array(r),void(e.usedBytes>0&&e.contents.set(o.subarray(0,e.usedBytes),0))}for(!e.contents&&r>0&&(e.contents=[]);e.contents.length<r;)e.contents.push(0)},resizeFileStorage:function(e,r){if(e.usedBytes!=r){if(0==r)return e.contents=null,void(e.usedBytes=0);if(!e.contents||e.contents.subarray){var t=e.contents;return e.contents=new Uint8Array(new ArrayBuffer(r)),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),void(e.usedBytes=r)}if(e.contents||(e.contents=[]),e.contents.length>r)e.contents.length=r;else for(;e.contents.length<r;)e.contents.push(0);e.usedBytes=r}},node_ops:{getattr:function(e){var r={};return r.dev=FS.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,r.size=FS.isDir(e.mode)?4096:FS.isFile(e.mode)?e.usedBytes:FS.isLink(e.mode)?e.link.length:0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr:function(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&MEMFS.resizeFileStorage(e,r.size)},lookup:function(){throw FS.genericErrors[ERRNO_CODES.ENOENT]},mknod:function(e,r,t,n){return MEMFS.createNode(e,r,t,n)},rename:function(e,r,t){if(FS.isDir(e.mode)){var n;try{n=FS.lookupNode(r,t)}catch(o){}if(n)for(var i in n.contents)throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY)}delete e.parent.contents[e.name],e.name=t,r.contents[t]=e,e.parent=r},unlink:function(e,r){delete e.contents[r]},rmdir:function(e,r){var t=FS.lookupNode(e,r);for(var n in t.contents)throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);delete e.contents[r]},readdir:function(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,r,t){var n=MEMFS.createNode(e,r,41471,0);return n.link=t,n},readlink:function(e){if(!FS.isLink(e.mode))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return e.link}},stream_ops:{read:function(e,r,t,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(assert(a>=0),a>8&&i.subarray)r.set(i.subarray(o,o+a),t);else for(var s=0;a>s;s++)r[t+s]=i[o+s];return a},write:function(e,r,t,n,o,i){if(!n)return 0;var a=e.node;if(a.timestamp=Date.now(),r.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=r.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=new Uint8Array(r.subarray(t,t+n)),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(r.subarray(t,t+n),o),n}if(MEMFS.expandFileStorage(a,o+n),a.contents.subarray&&r.subarray)a.contents.set(r.subarray(t,t+n),o);else for(var s=0;n>s;s++)a.contents[o+s]=r[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&FS.isFile(e.node.mode)&&(n+=e.node.usedBytes),0>n)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return n},allocate:function(e,r,t){MEMFS.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap:function(e,r,t,n,o,i,a){if(!FS.isFile(e.node.mode))throw new FS.ErrnoError(ERRNO_CODES.ENODEV);var s,u,l=e.node.contents;if(2&a||l.buffer!==r&&l.buffer!==r.buffer){if((o>0||o+n<e.node.usedBytes)&&(l=l.subarray?l.subarray(o,o+n):Array.prototype.slice.call(l,o,o+n)),u=!0,s=_malloc(n),!s)throw new FS.ErrnoError(ERRNO_CODES.ENOMEM);r.set(l,s)}else u=!1,s=l.byteOffset;return{ptr:s,allocated:u}},msync:function(e,r,t,n,o){if(!FS.isFile(e.node.mode))throw new FS.ErrnoError(ERRNO_CODES.ENODEV);if(2&o)return 0;MEMFS.stream_ops.write(e,r,0,n,t,!1);return 0}}},IDBFS={dbs:{},indexedDB:function(){if("undefined"!=typeof indexedDB)return indexedDB;var e=null;return"object"==typeof window&&(e=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),assert(e,"IDBFS used, but indexedDB not supported"),e},DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(){return MEMFS.mount.apply(null,arguments)},syncfs:function(e,r,t){IDBFS.getLocalSet(e,function(n,o){return n?t(n):void IDBFS.getRemoteSet(e,function(e,n){if(e)return t(e);var i=r?n:o,a=r?o:n;IDBFS.reconcile(i,a,t)})})},getDB:function(e,r){var t=IDBFS.dbs[e];if(t)return r(null,t);var n;try{n=IDBFS.indexedDB().open(e,IDBFS.DB_VERSION)}catch(o){return r(o)}n.onupgradeneeded=function(e){var r,t=e.target.result,n=e.target.transaction;r=t.objectStoreNames.contains(IDBFS.DB_STORE_NAME)?n.objectStore(IDBFS.DB_STORE_NAME):t.createObjectStore(IDBFS.DB_STORE_NAME),r.indexNames.contains("timestamp")||r.createIndex("timestamp","timestamp",{unique:!1})},n.onsuccess=function(){t=n.result,IDBFS.dbs[e]=t,r(null,t)},n.onerror=function(e){r(this.error),e.preventDefault()}},getLocalSet:function(e,r){function t(e){return"."!==e&&".."!==e}function n(e){return function(r){return PATH.join2(e,r)}}for(var o={},i=FS.readdir(e.mountpoint).filter(t).map(n(e.mountpoint));i.length;){var a,s=i.pop();try{a=FS.stat(s)}catch(u){return r(u)}FS.isDir(a.mode)&&i.push.apply(i,FS.readdir(s).filter(t).map(n(s))),o[s]={timestamp:a.mtime}}return r(null,{type:"local",entries:o})},getRemoteSet:function(e,r){var t={};IDBFS.getDB(e.mountpoint,function(e,n){if(e)return r(e);var o=n.transaction([IDBFS.DB_STORE_NAME],"readonly");o.onerror=function(e){r(this.error),e.preventDefault()};var i=o.objectStore(IDBFS.DB_STORE_NAME),a=i.index("timestamp");a.openKeyCursor().onsuccess=function(e){var o=e.target.result;return o?(t[o.primaryKey]={timestamp:o.key},void o["continue"]()):r(null,{type:"remote",db:n,entries:t})}})},loadLocalEntry:function(e,r){var t,n;try{var o=FS.lookupPath(e);n=o.node,t=FS.stat(e)}catch(i){return r(i)}return FS.isDir(t.mode)?r(null,{timestamp:t.mtime,mode:t.mode}):FS.isFile(t.mode)?(n.contents=MEMFS.getFileDataAsTypedArray(n),r(null,{timestamp:t.mtime,mode:t.mode,contents:n.contents})):r(new Error("node type not supported"))},storeLocalEntry:function(e,r,t){try{if(FS.isDir(r.mode))FS.mkdir(e,r.mode);else{if(!FS.isFile(r.mode))return t(new Error("node type not supported"));FS.writeFile(e,r.contents,{encoding:"binary",canOwn:!0})}FS.chmod(e,r.mode),FS.utime(e,r.timestamp,r.timestamp)}catch(n){return t(n)}t(null)},removeLocalEntry:function(e,r){try{var t=(FS.lookupPath(e),FS.stat(e));FS.isDir(t.mode)?FS.rmdir(e):FS.isFile(t.mode)&&FS.unlink(e)}catch(n){return r(n)}r(null)},loadRemoteEntry:function(e,r,t){var n=e.get(r);n.onsuccess=function(e){t(null,e.target.result)},n.onerror=function(e){t(this.error),e.preventDefault()}},storeRemoteEntry:function(e,r,t,n){var o=e.put(t,r);o.onsuccess=function(){n(null)},o.onerror=function(e){n(this.error),e.preventDefault()}},removeRemoteEntry:function(e,r,t){var n=e["delete"](r);n.onsuccess=function(){t(null)},n.onerror=function(e){t(this.error),e.preventDefault()}},reconcile:function(e,r,t){function n(e){return e?n.errored?void 0:(n.errored=!0,t(e)):++s>=o?t(null):void 0}var o=0,i=[];Object.keys(e.entries).forEach(function(t){var n=e.entries[t],a=r.entries[t];(!a||n.timestamp>a.timestamp)&&(i.push(t),o++)});var a=[];if(Object.keys(r.entries).forEach(function(t){var n=(r.entries[t],e.entries[t]);n||(a.push(t),o++)}),!o)return t(null);var s=0,u="remote"===e.type?e.db:r.db,l=u.transaction([IDBFS.DB_STORE_NAME],"readwrite"),c=l.objectStore(IDBFS.DB_STORE_NAME);l.onerror=function(e){n(this.error),e.preventDefault()},i.sort().forEach(function(e){"local"===r.type?IDBFS.loadRemoteEntry(c,e,function(r,t){return r?n(r):void IDBFS.storeLocalEntry(e,t,n)}):IDBFS.loadLocalEntry(e,function(r,t){return r?n(r):void IDBFS.storeRemoteEntry(c,e,t,n)})}),a.sort().reverse().forEach(function(e){"local"===r.type?IDBFS.removeLocalEntry(e,n):IDBFS.removeRemoteEntry(c,e,n)})}},NODEFS={isWindows:!1,staticInit:function(){NODEFS.isWindows=!!process.platform.match(/^win/)},mount:function(e){return assert(ENVIRONMENT_IS_NODE),NODEFS.createNode(null,"/",NODEFS.getMode(e.opts.root),0)},createNode:function(e,r,t){if(!FS.isDir(t)&&!FS.isFile(t)&&!FS.isLink(t))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var n=FS.createNode(e,r,t);return n.node_ops=NODEFS.node_ops,n.stream_ops=NODEFS.stream_ops,n},getMode:function(e){var r;try{r=fs.lstatSync(e),NODEFS.isWindows&&(r.mode=r.mode|(146&r.mode)>>1)}catch(t){if(!t.code)throw t;throw new FS.ErrnoError(ERRNO_CODES[t.code])}return r.mode},realPath:function(e){for(var r=[];e.parent!==e;)r.push(e.name),e=e.parent;return r.push(e.mount.opts.root),r.reverse(),PATH.join.apply(null,r)},flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:function(e){if(e&=-32769,e in NODEFS.flagsToPermissionStringMap)return NODEFS.flagsToPermissionStringMap[e];throw new FS.ErrnoError(ERRNO_CODES.EINVAL)},node_ops:{getattr:function(e){var r,t=NODEFS.realPath(e);try{r=fs.lstatSync(t)}catch(n){if(!n.code)throw n;throw new FS.ErrnoError(ERRNO_CODES[n.code])}return NODEFS.isWindows&&!r.blksize&&(r.blksize=4096),NODEFS.isWindows&&!r.blocks&&(r.blocks=(r.size+r.blksize-1)/r.blksize|0),{dev:r.dev,ino:r.ino,mode:r.mode,nlink:r.nlink,uid:r.uid,gid:r.gid,rdev:r.rdev,size:r.size,atime:r.atime,mtime:r.mtime,ctime:r.ctime,blksize:r.blksize,blocks:r.blocks}},setattr:function(e,r){var t=NODEFS.realPath(e);try{if(void 0!==r.mode&&(fs.chmodSync(t,r.mode),e.mode=r.mode),void 0!==r.timestamp){var n=new Date(r.timestamp);fs.utimesSync(t,n,n)}void 0!==r.size&&fs.truncateSync(t,r.size)}catch(o){if(!o.code)throw o;throw new FS.ErrnoError(ERRNO_CODES[o.code])}},lookup:function(e,r){var t=PATH.join2(NODEFS.realPath(e),r),n=NODEFS.getMode(t);return NODEFS.createNode(e,r,n)},mknod:function(e,r,t,n){var o=NODEFS.createNode(e,r,t,n),i=NODEFS.realPath(o);try{FS.isDir(o.mode)?fs.mkdirSync(i,o.mode):fs.writeFileSync(i,"",{mode:o.mode})}catch(a){if(!a.code)throw a;throw new FS.ErrnoError(ERRNO_CODES[a.code])}return o},rename:function(e,r,t){var n=NODEFS.realPath(e),o=PATH.join2(NODEFS.realPath(r),t);try{fs.renameSync(n,o)}catch(i){if(!i.code)throw i;throw new FS.ErrnoError(ERRNO_CODES[i.code])}},unlink:function(e,r){var t=PATH.join2(NODEFS.realPath(e),r);try{fs.unlinkSync(t)}catch(n){if(!n.code)throw n;throw new FS.ErrnoError(ERRNO_CODES[n.code])}},rmdir:function(e,r){var t=PATH.join2(NODEFS.realPath(e),r);try{fs.rmdirSync(t)}catch(n){if(!n.code)throw n;throw new FS.ErrnoError(ERRNO_CODES[n.code])}},readdir:function(e){var r=NODEFS.realPath(e);try{return fs.readdirSync(r)}catch(t){if(!t.code)throw t;throw new FS.ErrnoError(ERRNO_CODES[t.code])}},symlink:function(e,r,t){var n=PATH.join2(NODEFS.realPath(e),r);try{fs.symlinkSync(t,n)}catch(o){if(!o.code)throw o;throw new FS.ErrnoError(ERRNO_CODES[o.code])}},readlink:function(e){var r=NODEFS.realPath(e);try{return r=fs.readlinkSync(r),r=NODEJS_PATH.relative(NODEJS_PATH.resolve(e.mount.opts.root),r)}catch(t){if(!t.code)throw t;throw new FS.ErrnoError(ERRNO_CODES[t.code])}}},stream_ops:{open:function(e){var r=NODEFS.realPath(e.node);try{FS.isFile(e.node.mode)&&(e.nfd=fs.openSync(r,NODEFS.flagsToPermissionString(e.flags)))}catch(t){if(!t.code)throw t;throw new FS.ErrnoError(ERRNO_CODES[t.code])}},close:function(e){try{FS.isFile(e.node.mode)&&e.nfd&&fs.closeSync(e.nfd)}catch(r){if(!r.code)throw r;throw new FS.ErrnoError(ERRNO_CODES[r.code])}},read:function(e,r,t,n,o){if(0===n)return 0;var i,a=new Buffer(n);try{i=fs.readSync(e.nfd,a,0,n,o)}catch(s){throw new FS.ErrnoError(ERRNO_CODES[s.code])}if(i>0)for(var u=0;i>u;u++)r[t+u]=a[u];return i},write:function(e,r,t,n,o){var i,a=new Buffer(r.subarray(t,t+n));try{i=fs.writeSync(e.nfd,a,0,n,o)}catch(s){throw new FS.ErrnoError(ERRNO_CODES[s.code])}return i},llseek:function(e,r,t){var n=r;if(1===t)n+=e.position;else if(2===t&&FS.isFile(e.node.mode))try{var o=fs.fstatSync(e.nfd);n+=o.size}catch(i){throw new FS.ErrnoError(ERRNO_CODES[i.code])}if(0>n)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return n}}},WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(e){function r(e){for(var r=e.split("/"),t=n,i=0;i<r.length-1;i++){var a=r.slice(0,i+1).join("/");o[a]||(o[a]=WORKERFS.createNode(t,a,WORKERFS.DIR_MODE,0)),t=o[a]}return t}function t(e){var r=e.split("/");return r[r.length-1]}assert(ENVIRONMENT_IS_WORKER),WORKERFS.reader||(WORKERFS.reader=new FileReaderSync);var n=WORKERFS.createNode(null,"/",WORKERFS.DIR_MODE,0),o={};return Array.prototype.forEach.call(e.opts.files||[],function(e){WORKERFS.createNode(r(e.name),t(e.name),WORKERFS.FILE_MODE,0,e,e.lastModifiedDate)}),(e.opts.blobs||[]).forEach(function(e){WORKERFS.createNode(r(e.name),t(e.name),WORKERFS.FILE_MODE,0,e.data)}),(e.opts.packages||[]).forEach(function(e){e.metadata.files.forEach(function(n){var o=n.filename.substr(1);WORKERFS.createNode(r(o),t(o),WORKERFS.FILE_MODE,0,e.blob.slice(n.start,n.end))})}),n},createNode:function(e,r,t,n,o,i){var a=FS.createNode(e,r,t);return a.mode=t,a.node_ops=WORKERFS.node_ops,a.stream_ops=WORKERFS.stream_ops,a.timestamp=(i||new Date).getTime(),assert(WORKERFS.FILE_MODE!==WORKERFS.DIR_MODE),t===WORKERFS.FILE_MODE?(a.size=o.size,a.contents=o):(a.size=4096,a.contents={}),e&&(e.contents[r]=a),a},node_ops:{getattr:function(e){return{dev:1,ino:void 0,mode:e.mode,nlink:1,uid:0,gid:0,rdev:void 0,size:e.size,atime:new Date(e.timestamp),mtime:new Date(e.timestamp),ctime:new Date(e.timestamp),blksize:4096,blocks:Math.ceil(e.size/4096)}},setattr:function(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp)},lookup:function(){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)},mknod:function(){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},rename:function(){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},unlink:function(){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},rmdir:function(){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},readdir:function(){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},symlink:function(){throw new FS.ErrnoError(ERRNO_CODES.EPERM)},readlink:function(){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}},stream_ops:{read:function(e,r,t,n,o){if(o>=e.node.size)return 0;var i=e.node.contents.slice(o,o+n),a=WORKERFS.reader.readAsArrayBuffer(i);return r.set(new Uint8Array(a),t),i.size},write:function(){throw new FS.ErrnoError(ERRNO_CODES.EIO)},llseek:function(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&FS.isFile(e.node.mode)&&(n+=e.node.size),0>n)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return n}}},_stdin=allocate(1,"i32*",ALLOC_STATIC),_stdout=allocate(1,"i32*",ALLOC_STATIC),_stderr=allocate(1,"i32*",ALLOC_STATIC),FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,handleFSError:function(e){if(!(e instanceof FS.ErrnoError))throw e+" : "+stackTrace();return ___setErrNo(e.errno)},lookupPath:function(e,r){
if(e=PATH.resolve(FS.cwd(),e),r=r||{},!e)return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};for(var n in t)void 0===r[n]&&(r[n]=t[n]);if(r.recurse_count>8)throw new FS.ErrnoError(ERRNO_CODES.ELOOP);for(var o=PATH.normalizeArray(e.split("/").filter(function(e){return!!e}),!1),i=FS.root,a="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&r.parent)break;if(i=FS.lookupNode(i,o[s]),a=PATH.join2(a,o[s]),FS.isMountpoint(i)&&(!u||u&&r.follow_mount)&&(i=i.mounted.root),!u||r.follow)for(var l=0;FS.isLink(i.mode);){var c=FS.readlink(a);a=PATH.resolve(PATH.dirname(a),c);var d=FS.lookupPath(a,{recurse_count:r.recurse_count});if(i=d.node,l++>40)throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}}return{path:a,node:i}},getPath:function(e){for(var r;;){if(FS.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?t+"/"+r:t+r:t}r=r?e.name+"/"+r:e.name,e=e.parent}},hashName:function(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%FS.nameTable.length},hashAddNode:function(e){var r=FS.hashName(e.parent.id,e.name);e.name_next=FS.nameTable[r],FS.nameTable[r]=e},hashRemoveNode:function(e){var r=FS.hashName(e.parent.id,e.name);if(FS.nameTable[r]===e)FS.nameTable[r]=e.name_next;else for(var t=FS.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode:function(e,r){var t=FS.mayLookup(e);if(t)throw new FS.ErrnoError(t,e);for(var n=FS.hashName(e.id,r),o=FS.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===r)return o}return FS.lookup(e,r)},createNode:function(e,r,t,n){if(!FS.FSNode){FS.FSNode=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=FS.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},FS.FSNode.prototype={};var o=365,i=146;Object.defineProperties(FS.FSNode.prototype,{read:{get:function(){return(this.mode&o)===o},set:function(e){e?this.mode|=o:this.mode&=~o}},write:{get:function(){return(this.mode&i)===i},set:function(e){e?this.mode|=i:this.mode&=~i}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}})}var a=new FS.FSNode(e,r,t,n);return FS.hashAddNode(a),a},destroyNode:function(e){FS.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768===(61440&e)},isDir:function(e){return 16384===(61440&e)},isLink:function(e){return 40960===(61440&e)},isChrdev:function(e){return 8192===(61440&e)},isBlkdev:function(e){return 24576===(61440&e)},isFIFO:function(e){return 4096===(61440&e)},isSocket:function(e){return 49152===(49152&e)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(e){var r=FS.flagModes[e];if("undefined"==typeof r)throw new Error("Unknown file open mode: "+e);return r},flagsToPermissionString:function(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:function(e,r){return FS.ignorePermissions?0:(-1===r.indexOf("r")||292&e.mode)&&(-1===r.indexOf("w")||146&e.mode)&&(-1===r.indexOf("x")||73&e.mode)?0:ERRNO_CODES.EACCES},mayLookup:function(e){var r=FS.nodePermissions(e,"x");return r?r:e.node_ops.lookup?0:ERRNO_CODES.EACCES},mayCreate:function(e,r){try{{FS.lookupNode(e,r)}return ERRNO_CODES.EEXIST}catch(t){}return FS.nodePermissions(e,"wx")},mayDelete:function(e,r,t){var n;try{n=FS.lookupNode(e,r)}catch(o){return o.errno}var i=FS.nodePermissions(e,"wx");if(i)return i;if(t){if(!FS.isDir(n.mode))return ERRNO_CODES.ENOTDIR;if(FS.isRoot(n)||FS.getPath(n)===FS.cwd())return ERRNO_CODES.EBUSY}else if(FS.isDir(n.mode))return ERRNO_CODES.EISDIR;return 0},mayOpen:function(e,r){return e?FS.isLink(e.mode)?ERRNO_CODES.ELOOP:FS.isDir(e.mode)&&(0!==(2097155&r)||512&r)?ERRNO_CODES.EISDIR:FS.nodePermissions(e,FS.flagsToPermissionString(r)):ERRNO_CODES.ENOENT},MAX_OPEN_FDS:4096,nextfd:function(e,r){e=e||0,r=r||FS.MAX_OPEN_FDS;for(var t=e;r>=t;t++)if(!FS.streams[t])return t;throw new FS.ErrnoError(ERRNO_CODES.EMFILE)},getStream:function(e){return FS.streams[e]},createStream:function(e,r,t){FS.FSStream||(FS.FSStream=function(){},FS.FSStream.prototype={},Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!==(2097155&this.flags)}},isWrite:{get:function(){return 0!==(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}));var n=new FS.FSStream;for(var o in e)n[o]=e[o];e=n;var i=FS.nextfd(r,t);return e.fd=i,FS.streams[i]=e,e},closeStream:function(e){FS.streams[e]=null},chrdev_stream_ops:{open:function(e){var r=FS.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,r){return e<<8|r},registerDevice:function(e,r){FS.devices[e]={stream_ops:r}},getDevice:function(e){return FS.devices[e]},getMounts:function(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs:function(e,r){function t(e){if(e){if(!t.errored)return t.errored=!0,r(e)}else++o>=n.length&&r(null)}"function"==typeof e&&(r=e,e=!1);var n=FS.getMounts(FS.root.mount),o=0;n.forEach(function(r){return r.type.syncfs?void r.type.syncfs(r,e,t):t(null)})},mount:function(e,r,t){var n,o="/"===t,i=!t;if(o&&FS.root)throw new FS.ErrnoError(ERRNO_CODES.EBUSY);if(!o&&!i){var a=FS.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,FS.isMountpoint(n))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);if(!FS.isDir(n.mode))throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?FS.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(e){var r=FS.lookupPath(e,{follow_mount:!1});if(!FS.isMountpoint(r.node))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var t=r.node,n=t.mounted,o=FS.getMounts(n);Object.keys(FS.nameTable).forEach(function(e){for(var r=FS.nameTable[e];r;){var t=r.name_next;-1!==o.indexOf(r.mount)&&FS.destroyNode(r),r=t}}),t.mounted=null;var i=t.mount.mounts.indexOf(n);assert(-1!==i),t.mount.mounts.splice(i,1)},lookup:function(e,r){return e.node_ops.lookup(e,r)},mknod:function(e,r,t){var n=FS.lookupPath(e,{parent:!0}),o=n.node,i=PATH.basename(e);if(!i||"."===i||".."===i)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var a=FS.mayCreate(o,i);if(a)throw new FS.ErrnoError(a);if(!o.node_ops.mknod)throw new FS.ErrnoError(ERRNO_CODES.EPERM);return o.node_ops.mknod(o,i,r,t)},create:function(e,r){return r=void 0!==r?r:438,r&=4095,r|=32768,FS.mknod(e,r,0)},mkdir:function(e,r){return r=void 0!==r?r:511,r&=1023,r|=16384,FS.mknod(e,r,0)},mkdev:function(e,r,t){return"undefined"==typeof t&&(t=r,r=438),r|=8192,FS.mknod(e,r,t)},symlink:function(e,r){if(!PATH.resolve(e))throw new FS.ErrnoError(ERRNO_CODES.ENOENT);var t=FS.lookupPath(r,{parent:!0}),n=t.node;if(!n)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);var o=PATH.basename(r),i=FS.mayCreate(n,o);if(i)throw new FS.ErrnoError(i);if(!n.node_ops.symlink)throw new FS.ErrnoError(ERRNO_CODES.EPERM);return n.node_ops.symlink(n,o,e)},rename:function(e,r){var t,n,o,i=PATH.dirname(e),a=PATH.dirname(r),s=PATH.basename(e),u=PATH.basename(r);try{t=FS.lookupPath(e,{parent:!0}),n=t.node,t=FS.lookupPath(r,{parent:!0}),o=t.node}catch(l){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(!n||!o)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(n.mount!==o.mount)throw new FS.ErrnoError(ERRNO_CODES.EXDEV);var c=FS.lookupNode(n,s),d=PATH.relative(e,a);if("."!==d.charAt(0))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(d=PATH.relative(r,i),"."!==d.charAt(0))throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);var f;try{f=FS.lookupNode(o,u)}catch(l){}if(c!==f){var E=FS.isDir(c.mode),m=FS.mayDelete(n,s,E);if(m)throw new FS.ErrnoError(m);if(m=f?FS.mayDelete(o,u,E):FS.mayCreate(o,u))throw new FS.ErrnoError(m);if(!n.node_ops.rename)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isMountpoint(c)||f&&FS.isMountpoint(f))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);if(o!==n&&(m=FS.nodePermissions(n,"w")))throw new FS.ErrnoError(m);try{FS.trackingDelegate.willMovePath&&FS.trackingDelegate.willMovePath(e,r)}catch(l){console.log("FS.trackingDelegate['willMovePath']('"+e+"', '"+r+"') threw an exception: "+l.message)}FS.hashRemoveNode(c);try{n.node_ops.rename(c,o,u)}catch(l){throw l}finally{FS.hashAddNode(c)}try{FS.trackingDelegate.onMovePath&&FS.trackingDelegate.onMovePath(e,r)}catch(l){console.log("FS.trackingDelegate['onMovePath']('"+e+"', '"+r+"') threw an exception: "+l.message)}}},rmdir:function(e){var r=FS.lookupPath(e,{parent:!0}),t=r.node,n=PATH.basename(e),o=FS.lookupNode(t,n),i=FS.mayDelete(t,n,!0);if(i)throw new FS.ErrnoError(i);if(!t.node_ops.rmdir)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isMountpoint(o))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);try{FS.trackingDelegate.willDeletePath&&FS.trackingDelegate.willDeletePath(e)}catch(a){console.log("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+a.message)}t.node_ops.rmdir(t,n),FS.destroyNode(o);try{FS.trackingDelegate.onDeletePath&&FS.trackingDelegate.onDeletePath(e)}catch(a){console.log("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+a.message)}},readdir:function(e){var r=FS.lookupPath(e,{follow:!0}),t=r.node;if(!t.node_ops.readdir)throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);return t.node_ops.readdir(t)},unlink:function(e){var r=FS.lookupPath(e,{parent:!0}),t=r.node,n=PATH.basename(e),o=FS.lookupNode(t,n),i=FS.mayDelete(t,n,!1);if(i)throw i===ERRNO_CODES.EISDIR&&(i=ERRNO_CODES.EPERM),new FS.ErrnoError(i);if(!t.node_ops.unlink)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isMountpoint(o))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);try{FS.trackingDelegate.willDeletePath&&FS.trackingDelegate.willDeletePath(e)}catch(a){console.log("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+a.message)}t.node_ops.unlink(t,n),FS.destroyNode(o);try{FS.trackingDelegate.onDeletePath&&FS.trackingDelegate.onDeletePath(e)}catch(a){console.log("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+a.message)}},readlink:function(e){var r=FS.lookupPath(e),t=r.node;if(!t)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(!t.node_ops.readlink)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return PATH.resolve(FS.getPath(t.parent),t.node_ops.readlink(t))},stat:function(e,r){var t=FS.lookupPath(e,{follow:!r}),n=t.node;if(!n)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(!n.node_ops.getattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);return n.node_ops.getattr(n)},lstat:function(e){return FS.stat(e,!0)},chmod:function(e,r,t){var n;if("string"==typeof e){var o=FS.lookupPath(e,{follow:!t});n=o.node}else n=e;if(!n.node_ops.setattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod:function(e,r){FS.chmod(e,r,!0)},fchmod:function(e,r){var t=FS.getStream(e);if(!t)throw new FS.ErrnoError(ERRNO_CODES.EBADF);FS.chmod(t.node,r)},chown:function(e,r,t,n){var o;if("string"==typeof e){var i=FS.lookupPath(e,{follow:!n});o=i.node}else o=e;if(!o.node_ops.setattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(e,r,t){FS.chown(e,r,t,!0)},fchown:function(e,r,t){var n=FS.getStream(e);if(!n)throw new FS.ErrnoError(ERRNO_CODES.EBADF);FS.chown(n.node,r,t)},truncate:function(e,r){if(0>r)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var t;if("string"==typeof e){var n=FS.lookupPath(e,{follow:!0});t=n.node}else t=e;if(!t.node_ops.setattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isDir(t.mode))throw new FS.ErrnoError(ERRNO_CODES.EISDIR);if(!FS.isFile(t.mode))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var o=FS.nodePermissions(t,"w");if(o)throw new FS.ErrnoError(o);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate:function(e,r){var t=FS.getStream(e);if(!t)throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(0===(2097155&t.flags))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);FS.truncate(t.node,r)},utime:function(e,r,t){var n=FS.lookupPath(e,{follow:!0}),o=n.node;o.node_ops.setattr(o,{timestamp:Math.max(r,t)})},open:function(e,r,t,n,o){if(""===e)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);r="string"==typeof r?FS.modeStringToFlags(r):r,t="undefined"==typeof t?438:t,t=64&r?4095&t|32768:0;var i;if("object"==typeof e)i=e;else{e=PATH.normalize(e);try{var a=FS.lookupPath(e,{follow:!(131072&r)});i=a.node}catch(s){}}var u=!1;if(64&r)if(i){if(128&r)throw new FS.ErrnoError(ERRNO_CODES.EEXIST)}else i=FS.mknod(e,t,0),u=!0;if(!i)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(FS.isChrdev(i.mode)&&(r&=-513),65536&r&&!FS.isDir(i.mode))throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);if(!u){var l=FS.mayOpen(i,r);if(l)throw new FS.ErrnoError(l)}512&r&&FS.truncate(i,0),r&=-641;var c=FS.createStream({node:i,path:FS.getPath(i),flags:r,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1},n,o);c.stream_ops.open&&c.stream_ops.open(c),!Module.logReadFiles||1&r||(FS.readFiles||(FS.readFiles={}),e in FS.readFiles||(FS.readFiles[e]=1,Module.printErr("read file: "+e)));try{if(FS.trackingDelegate.onOpenFile){var d=0;1!==(2097155&r)&&(d|=FS.tracking.openFlags.READ),0!==(2097155&r)&&(d|=FS.tracking.openFlags.WRITE),FS.trackingDelegate.onOpenFile(e,d)}}catch(s){console.log("FS.trackingDelegate['onOpenFile']('"+e+"', flags) threw an exception: "+s.message)}return c},close:function(e){e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(r){throw r}finally{FS.closeStream(e.fd)}},llseek:function(e,r,t){if(!e.seekable||!e.stream_ops.llseek)throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read:function(e,r,t,n,o){if(0>n||0>o)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(1===(2097155&e.flags))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(ERRNO_CODES.EISDIR);if(!e.stream_ops.read)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var i=!0;if("undefined"==typeof o)o=e.position,i=!1;else if(!e.seekable)throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);var a=e.stream_ops.read(e,r,t,n,o);return i||(e.position+=a),a},write:function(e,r,t,n,o,i){if(0>n||0>o)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(0===(2097155&e.flags))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(ERRNO_CODES.EISDIR);if(!e.stream_ops.write)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);1024&e.flags&&FS.llseek(e,0,2);var a=!0;if("undefined"==typeof o)o=e.position,a=!1;else if(!e.seekable)throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);var s=e.stream_ops.write(e,r,t,n,o,i);a||(e.position+=s);try{e.path&&FS.trackingDelegate.onWriteToFile&&FS.trackingDelegate.onWriteToFile(e.path)}catch(u){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+u.message)}return s},allocate:function(e,r,t){if(0>r||0>=t)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(0===(2097155&e.flags))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(!FS.isFile(e.node.mode)&&!FS.isDir(node.mode))throw new FS.ErrnoError(ERRNO_CODES.ENODEV);if(!e.stream_ops.allocate)throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP);e.stream_ops.allocate(e,r,t)},mmap:function(e,r,t,n,o,i,a){if(1===(2097155&e.flags))throw new FS.ErrnoError(ERRNO_CODES.EACCES);if(!e.stream_ops.mmap)throw new FS.ErrnoError(ERRNO_CODES.ENODEV);return e.stream_ops.mmap(e,r,t,n,o,i,a)},msync:function(e,r,t,n,o){return e&&e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0},munmap:function(){return 0},ioctl:function(e,r,t){if(!e.stream_ops.ioctl)throw new FS.ErrnoError(ERRNO_CODES.ENOTTY);return e.stream_ops.ioctl(e,r,t)},readFile:function(e,r){if(r=r||{},r.flags=r.flags||"r",r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error('Invalid encoding type "'+r.encoding+'"');var t,n=FS.open(e,r.flags),o=FS.stat(e),i=o.size,a=new Uint8Array(i);return FS.read(n,a,0,i,0),"utf8"===r.encoding?t=UTF8ArrayToString(a,0):"binary"===r.encoding&&(t=a),FS.close(n),t},writeFile:function(e,r,t){if(t=t||{},t.flags=t.flags||"w",t.encoding=t.encoding||"utf8","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var n=FS.open(e,t.flags,t.mode);if("utf8"===t.encoding){var o=new Uint8Array(lengthBytesUTF8(r)+1),i=stringToUTF8Array(r,o,0,o.length);FS.write(n,o,0,i,0,t.canOwn)}else"binary"===t.encoding&&FS.write(n,r,0,r.length,0,t.canOwn);FS.close(n)},cwd:function(){return FS.currentPath},chdir:function(e){var r=FS.lookupPath(e,{follow:!0});if(!FS.isDir(r.node.mode))throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);var t=FS.nodePermissions(r.node,"x");if(t)throw new FS.ErrnoError(t);FS.currentPath=r.path},createDefaultDirectories:function(){FS.mkdir("/tmp"),FS.mkdir("/home"),FS.mkdir("/home/web_user")},createDefaultDevices:function(){FS.mkdir("/dev"),FS.registerDevice(FS.makedev(1,3),{read:function(){return 0},write:function(e,r,t,n){return n}}),FS.mkdev("/dev/null",FS.makedev(1,3)),TTY.register(FS.makedev(5,0),TTY.default_tty_ops),TTY.register(FS.makedev(6,0),TTY.default_tty1_ops),FS.mkdev("/dev/tty",FS.makedev(5,0)),FS.mkdev("/dev/tty1",FS.makedev(6,0));var e;if("undefined"!=typeof crypto){var r=new Uint8Array(1);e=function(){return crypto.getRandomValues(r),r[0]}}else e=ENVIRONMENT_IS_NODE?function(){return require("crypto").randomBytes(1)[0]}:function(){return 256*Math.random()|0};FS.createDevice("/dev","random",e),FS.createDevice("/dev","urandom",e),FS.mkdir("/dev/shm"),FS.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){FS.mkdir("/proc"),FS.mkdir("/proc/self"),FS.mkdir("/proc/self/fd"),FS.mount({mount:function(){var e=FS.createNode("/proc/self","fd",16895,73);return e.node_ops={lookup:function(e,r){var t=+r,n=FS.getStream(t);if(!n)throw new FS.ErrnoError(ERRNO_CODES.EBADF);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:function(){Module.stdin?FS.createDevice("/dev","stdin",Module.stdin):FS.symlink("/dev/tty","/dev/stdin"),Module.stdout?FS.createDevice("/dev","stdout",null,Module.stdout):FS.symlink("/dev/tty","/dev/stdout"),Module.stderr?FS.createDevice("/dev","stderr",null,Module.stderr):FS.symlink("/dev/tty1","/dev/stderr");var e=FS.open("/dev/stdin","r");assert(0===e.fd,"invalid handle for stdin ("+e.fd+")");var r=FS.open("/dev/stdout","w");assert(1===r.fd,"invalid handle for stdout ("+r.fd+")");var t=FS.open("/dev/stderr","w");assert(2===t.fd,"invalid handle for stderr ("+t.fd+")")},ensureErrnoError:function(){FS.ErrnoError||(FS.ErrnoError=function(e,r){this.node=r,this.setErrno=function(e){this.errno=e;for(var r in ERRNO_CODES)if(ERRNO_CODES[r]===e){this.code=r;break}},this.setErrno(e),this.message=ERRNO_MESSAGES[e]},FS.ErrnoError.prototype=new Error,FS.ErrnoError.prototype.constructor=FS.ErrnoError,[ERRNO_CODES.ENOENT].forEach(function(e){FS.genericErrors[e]=new FS.ErrnoError(e),FS.genericErrors[e].stack="<generic error, no stack>"}))},staticInit:function(){FS.ensureErrnoError(),FS.nameTable=new Array(4096),FS.mount(MEMFS,{},"/"),FS.createDefaultDirectories(),FS.createDefaultDevices(),FS.createSpecialDirectories(),FS.filesystems={MEMFS:MEMFS,IDBFS:IDBFS,NODEFS:NODEFS,WORKERFS:WORKERFS}},init:function(e,r,t){assert(!FS.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),FS.init.initialized=!0,FS.ensureErrnoError(),Module.stdin=e||Module.stdin,Module.stdout=r||Module.stdout,Module.stderr=t||Module.stderr,FS.createStandardStreams()},quit:function(){FS.init.initialized=!1;var e=Module._fflush;e&&e(0);for(var r=0;r<FS.streams.length;r++){var t=FS.streams[r];t&&FS.close(t)}},getMode:function(e,r){var t=0;return e&&(t|=365),r&&(t|=146),t},joinPath:function(e,r){var t=PATH.join.apply(null,e);return r&&"/"==t[0]&&(t=t.substr(1)),t},absolutePath:function(e,r){return PATH.resolve(r,e)},standardizePath:function(e){return PATH.normalize(e)},findObject:function(e,r){var t=FS.analyzePath(e,r);return t.exists?t.object:(___setErrNo(t.error),null)},analyzePath:function(e,r){try{var t=FS.lookupPath(e,{follow:!r});e=t.path}catch(n){}var o={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var t=FS.lookupPath(e,{parent:!0});o.parentExists=!0,o.parentPath=t.path,o.parentObject=t.node,o.name=PATH.basename(e),t=FS.lookupPath(e,{follow:!r}),o.exists=!0,o.path=t.path,o.object=t.node,o.name=t.node.name,o.isRoot="/"===t.path}catch(n){o.error=n.errno}return o},createFolder:function(e,r,t,n){var o=PATH.join2("string"==typeof e?e:FS.getPath(e),r),i=FS.getMode(t,n);return FS.mkdir(o,i)},createPath:function(e,r){e="string"==typeof e?e:FS.getPath(e);for(var t=r.split("/").reverse();t.length;){var n=t.pop();if(n){var o=PATH.join2(e,n);try{FS.mkdir(o)}catch(i){}e=o}}return o},createFile:function(e,r,t,n,o){var i=PATH.join2("string"==typeof e?e:FS.getPath(e),r),a=FS.getMode(n,o);return FS.create(i,a)},createDataFile:function(e,r,t,n,o,i){var a=r?PATH.join2("string"==typeof e?e:FS.getPath(e),r):e,s=FS.getMode(n,o),u=FS.create(a,s);if(t){if("string"==typeof t){for(var l=new Array(t.length),c=0,d=t.length;d>c;++c)l[c]=t.charCodeAt(c);t=l}FS.chmod(u,146|s);var f=FS.open(u,"w");FS.write(f,t,0,t.length,0,i),FS.close(f),FS.chmod(u,s)}return u},createDevice:function(e,r,t,n){var o=PATH.join2("string"==typeof e?e:FS.getPath(e),r),i=FS.getMode(!!t,!!n);FS.createDevice.major||(FS.createDevice.major=64);var a=FS.makedev(FS.createDevice.major++,0);return FS.registerDevice(a,{open:function(e){e.seekable=!1},close:function(){n&&n.buffer&&n.buffer.length&&n(10)},read:function(e,r,n,o){for(var i=0,a=0;o>a;a++){var s;try{s=t()}catch(u){throw new FS.ErrnoError(ERRNO_CODES.EIO)}if(void 0===s&&0===i)throw new FS.ErrnoError(ERRNO_CODES.EAGAIN);if(null===s||void 0===s)break;i++,r[n+a]=s}return i&&(e.node.timestamp=Date.now()),i},write:function(e,r,t,o){for(var i=0;o>i;i++)try{n(r[t+i])}catch(a){throw new FS.ErrnoError(ERRNO_CODES.EIO)}return o&&(e.node.timestamp=Date.now()),i}}),FS.mkdev(o,i,a)},createLink:function(e,r,t){var n=PATH.join2("string"==typeof e?e:FS.getPath(e),r);return FS.symlink(t,n)},forceLoadFile:function(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;var r=!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!Module.read)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=intArrayFromString(Module.read(e.url),!0),e.usedBytes=e.contents.length}catch(t){r=!1}return r||___setErrNo(ERRNO_CODES.EIO),r},createLazyFile:function(e,r,t,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(e>this.length-1||0>e)return void 0;var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,i=1048576;o||(i=n);var a=function(e,r){if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),"undefined"!=typeof Uint8Array&&(o.responseType="arraybuffer"),o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):intArrayFromString(o.responseText||"",!0)},s=this;s.setDataGetter(function(e){var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),"undefined"==typeof s.chunks[e]&&(s.chunks[e]=a(r,t)),"undefined"==typeof s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]}),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperty(a,"length",{get:function(){return this.lengthKnown||this.cacheLength(),this._length}}),Object.defineProperty(a,"chunkSize",{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}});var s={isDevice:!1,contents:a}}else var s={isDevice:!1,url:t};var u=FS.createFile(e,r,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperty(u,"usedBytes",{get:function(){return this.contents.length}});var l={},c=Object.keys(u.stream_ops);return c.forEach(function(e){var r=u.stream_ops[e];l[e]=function(){if(!FS.forceLoadFile(u))throw new FS.ErrnoError(ERRNO_CODES.EIO);return r.apply(null,arguments)}}),l.read=function(e,r,t,n,o){if(!FS.forceLoadFile(u))throw new FS.ErrnoError(ERRNO_CODES.EIO);var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(assert(a>=0),i.slice)for(var s=0;a>s;s++)r[t+s]=i[o+s];else for(var s=0;a>s;s++)r[t+s]=i.get(o+s);return a},u.stream_ops=l,u},createPreloadedFile:function(e,r,t,n,o,i,a,s,u,l){function c(t){function c(t){l&&l(),s||FS.createDataFile(e,r,t,n,o,u),i&&i(),removeRunDependency(f)}var E=!1;Module.preloadPlugins.forEach(function(e){E||e.canHandle(d)&&(e.handle(t,d,c,function(){a&&a(),removeRunDependency(f)}),E=!0)}),E||c(t)}Browser.init();var d=r?PATH.resolve(PATH.join2(e,r)):e,f=getUniqueRunDependency("cp "+d);addRunDependency(f),"string"==typeof t?Browser.asyncLoad(t,function(e){c(e)},a):c(t)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(e,r,t){r=r||function(){},t=t||function(){};var n=FS.indexedDB();try{var o=n.open(FS.DB_NAME(),FS.DB_VERSION)}catch(i){return t(i)}o.onupgradeneeded=function(){console.log("creating db");var e=o.result;e.createObjectStore(FS.DB_STORE_NAME)},o.onsuccess=function(){function n(){0==l?r():t()}var i=o.result,a=i.transaction([FS.DB_STORE_NAME],"readwrite"),s=a.objectStore(FS.DB_STORE_NAME),u=0,l=0,c=e.length;e.forEach(function(e){var r=s.put(FS.analyzePath(e).object.contents,e);r.onsuccess=function(){u++,u+l==c&&n()},r.onerror=function(){l++,u+l==c&&n()}}),a.onerror=t},o.onerror=t},loadFilesFromDB:function(e,r,t){r=r||function(){},t=t||function(){};var n=FS.indexedDB();try{var o=n.open(FS.DB_NAME(),FS.DB_VERSION)}catch(i){return t(i)}o.onupgradeneeded=t,o.onsuccess=function(){function n(){0==c?r():t()}var i=o.result;try{var a=i.transaction([FS.DB_STORE_NAME],"readonly")}catch(s){return void t(s)}var u=a.objectStore(FS.DB_STORE_NAME),l=0,c=0,d=e.length;e.forEach(function(e){var r=u.get(e);r.onsuccess=function(){FS.analyzePath(e).exists&&FS.unlink(e),FS.createDataFile(PATH.dirname(e),PATH.basename(e),r.result,!0,!0,!0),l++,l+c==d&&n()},r.onerror=function(){c++,l+c==d&&n()}}),a.onerror=t},o.onerror=t}},SYSCALLS={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function(e,r){if("/"!==r[0]){var t;if(-100===e)t=FS.cwd();else{var n=FS.getStream(e);if(!n)throw new FS.ErrnoError(ERRNO_CODES.EBADF);t=n.path}r=PATH.join2(t,r)}return r},doStat:function(e,r,t){try{var n=e(r)}catch(o){if(o&&o.node&&PATH.normalize(r)!==PATH.normalize(FS.getPath(o.node)))return-ERRNO_CODES.ENOTDIR;throw o}return HEAP32[t>>2]=n.dev,HEAP32[t+4>>2]=0,HEAP32[t+8>>2]=n.ino,HEAP32[t+12>>2]=n.mode,HEAP32[t+16>>2]=n.nlink,HEAP32[t+20>>2]=n.uid,HEAP32[t+24>>2]=n.gid,HEAP32[t+28>>2]=n.rdev,HEAP32[t+32>>2]=0,HEAP32[t+36>>2]=n.size,HEAP32[t+40>>2]=4096,HEAP32[t+44>>2]=n.blocks,HEAP32[t+48>>2]=n.atime.getTime()/1e3|0,HEAP32[t+52>>2]=0,HEAP32[t+56>>2]=n.mtime.getTime()/1e3|0,HEAP32[t+60>>2]=0,HEAP32[t+64>>2]=n.ctime.getTime()/1e3|0,HEAP32[t+68>>2]=0,HEAP32[t+72>>2]=n.ino,0},doMsync:function(e,r,t,n){var o=new Uint8Array(HEAPU8.subarray(e,e+t));FS.msync(r,o,0,t,n)},doMkdir:function(e,r){return e=PATH.normalize(e),"/"===e[e.length-1]&&(e=e.substr(0,e.length-1)),FS.mkdir(e,r,0),0},doMknod:function(e,r,t){switch(61440&r){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-ERRNO_CODES.EINVAL}return FS.mknod(e,r,t),0},doReadlink:function(e,r,t){if(0>=t)return-ERRNO_CODES.EINVAL;var n=FS.readlink(e);return n=n.slice(0,Math.max(0,t)),writeStringToMemory(n,r,!0),n.length},doAccess:function(e,r){if(-8&r)return-ERRNO_CODES.EINVAL;var t,n=FS.lookupPath(e,{follow:!0});t=n.node;var o="";return 4&r&&(o+="r"),2&r&&(o+="w"),1&r&&(o+="x"),o&&FS.nodePermissions(t,o)?-ERRNO_CODES.EACCES:0},doDup:function(e,r,t){var n=FS.getStream(t);return n&&FS.close(n),FS.open(e,r,0,t,t).fd},doReadv:function(e,r,t,n){for(var o=0,i=0;t>i;i++){var a=HEAP32[r+8*i>>2],s=HEAP32[r+(8*i+4)>>2],u=FS.read(e,HEAP8,a,s,n);if(0>u)return-1;if(o+=u,s>u)break}return o},doWritev:function(e,r,t,n){for(var o=0,i=0;t>i;i++){var a=HEAP32[r+8*i>>2],s=HEAP32[r+(8*i+4)>>2],u=FS.write(e,HEAP8,a,s,n);if(0>u)return-1;o+=u}return o},varargs:0,get:function(){SYSCALLS.varargs+=4;var e=HEAP32[SYSCALLS.varargs-4>>2];return e},getStr:function(){var e=Pointer_stringify(SYSCALLS.get());return e},getStreamFromFD:function(){var e=FS.getStream(SYSCALLS.get());if(!e)throw new FS.ErrnoError(ERRNO_CODES.EBADF);return e},getSocketFromFD:function(){var e=SOCKFS.getSocket(SYSCALLS.get());if(!e)throw new FS.ErrnoError(ERRNO_CODES.EBADF);return e},getSocketAddress:function(e){var r=SYSCALLS.get(),t=SYSCALLS.get();if(e&&0===r)return null;var n=__read_sockaddr(r,t);if(n.errno)throw new FS.ErrnoError(n.errno);return n.addr=DNS.lookup_addr(n.addr)||n.addr,n},get64:function(){var e=SYSCALLS.get(),r=SYSCALLS.get();return assert(e>=0?0===r:-1===r),e},getZero:function(){assert(0===SYSCALLS.get())}},_emscripten_asm_const=!0;Module._memcpy=_memcpy;var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var e=Browser.mainLoop.timingMode,r=Browser.mainLoop.timingValue,t=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(t,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(e,r),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var e=Module.statusMessage||"Please wait...",r=Browser.mainLoop.remainingBlockers,t=Browser.mainLoop.expectedBlockers;Module.setStatus(r?t>r?e+" ("+(t-r)+"/"+t+")":e:"")}},runIter:function(e){if(!ABORT){if(Module.preMainLoop){var r=Module.preMainLoop();if(r===!1)return}try{e()}catch(t){if(t instanceof ExitStatus)return;throw t&&"object"==typeof t&&t.stack&&Module.printErr("exception thrown: "+[t,t.stack]),t}Module.postMainLoop&&Module.postMainLoop()}}},isFullScreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){function e(){Browser.pointerLock=document.pointerLockElement===o||document.mozPointerLockElement===o||document.webkitPointerLockElement===o||document.msPointerLockElement===o}if(Module.preloadPlugins||(Module.preloadPlugins=[]),!Browser.initted){Browser.initted=!0;try{new Blob,Browser.hasBlobConstructor=!0}catch(r){Browser.hasBlobConstructor=!1,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}Browser.BlobBuilder="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:Browser.hasBlobConstructor?null:console.log("warning: no BlobBuilder"),
Browser.URLObject="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,Module.noImageDecoding||"undefined"!=typeof Browser.URLObject||(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),Module.noImageDecoding=!0);var t={};t.canHandle=function(e){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(e)},t.handle=function(e,r,t,n){var o=null;if(Browser.hasBlobConstructor)try{o=new Blob([e],{type:Browser.getMimetype(r)}),o.size!==e.length&&(o=new Blob([new Uint8Array(e).buffer],{type:Browser.getMimetype(r)}))}catch(i){Runtime.warnOnce("Blob constructor present but fails: "+i+"; falling back to blob builder")}if(!o){var a=new Browser.BlobBuilder;a.append(new Uint8Array(e).buffer),o=a.getBlob()}var s=Browser.URLObject.createObjectURL(o),u=new Image;u.onload=function(){assert(u.complete,"Image "+r+" could not be decoded");var n=document.createElement("canvas");n.width=u.width,n.height=u.height;var o=n.getContext("2d");o.drawImage(u,0,0),Module.preloadedImages[r]=n,Browser.URLObject.revokeObjectURL(s),t&&t(e)},u.onerror=function(){console.log("Image "+s+" could not be decoded"),n&&n()},u.src=s},Module.preloadPlugins.push(t);var n={};n.canHandle=function(e){return!Module.noAudioDecoding&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},n.handle=function(e,r,t,n){function o(n){a||(a=!0,Module.preloadedAudios[r]=n,t&&t(e))}function i(){a||(a=!0,Module.preloadedAudios[r]=new Audio,n&&n())}var a=!1;if(!Browser.hasBlobConstructor)return i();try{var s=new Blob([e],{type:Browser.getMimetype(r)})}catch(u){return i()}var l=Browser.URLObject.createObjectURL(s),c=new Audio;c.addEventListener("canplaythrough",function(){o(c)},!1),c.onerror=function(){function t(e){for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="=",n="",o=0,i=0,a=0;a<e.length;a++)for(o=o<<8|e[a],i+=8;i>=6;){var s=o>>i-6&63;i-=6,n+=r[s]}return 2==i?(n+=r[(3&o)<<4],n+=t+t):4==i&&(n+=r[(15&o)<<2],n+=t),n}a||(console.log("warning: browser could not fully decode audio "+r+", trying slower base64 approach"),c.src="data:audio/x-"+r.substr(-3)+";base64,"+t(e),o(c))},c.src=l,Browser.safeSetTimeout(function(){o(c)},1e4)},Module.preloadPlugins.push(n);var o=Module.canvas;o&&(o.requestPointerLock=o.requestPointerLock||o.mozRequestPointerLock||o.webkitRequestPointerLock||o.msRequestPointerLock||function(){},o.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},o.exitPointerLock=o.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",e,!1),document.addEventListener("mozpointerlockchange",e,!1),document.addEventListener("webkitpointerlockchange",e,!1),document.addEventListener("mspointerlockchange",e,!1),Module.elementPointerLock&&o.addEventListener("click",function(e){!Browser.pointerLock&&o.requestPointerLock&&(o.requestPointerLock(),e.preventDefault())},!1))}},createContext:function(e,r,t,n){if(r&&Module.ctx&&e==Module.canvas)return Module.ctx;var o,i;if(r){var a={antialias:!1,alpha:!1};if(n)for(var s in n)a[s]=n[s];i=GL.createContext(e,a),i&&(o=GL.getContext(i).GLctx),e.style.backgroundColor="black"}else o=e.getContext("2d");return o?(t&&(r||assert("undefined"==typeof GLctx,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=o,r&&GL.makeContextCurrent(i),Module.useWebGL=r,Browser.moduleContextCreatedCallbacks.forEach(function(e){e()}),Browser.init()),o):null},destroyContext:function(){},fullScreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullScreen:function(e,r,t){function n(){Browser.isFullScreen=!1;var e=o.parentNode;(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===e?(o.cancelFullScreen=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msExitFullscreen||document.exitFullscreen||function(){},o.cancelFullScreen=o.cancelFullScreen.bind(document),Browser.lockPointer&&o.requestPointerLock(),Browser.isFullScreen=!0,Browser.resizeCanvas&&Browser.setFullScreenCanvasSize()):(e.parentNode.insertBefore(o,e),e.parentNode.removeChild(e),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullScreen),Browser.updateCanvasDimensions(o)}Browser.lockPointer=e,Browser.resizeCanvas=r,Browser.vrDevice=t,"undefined"==typeof Browser.lockPointer&&(Browser.lockPointer=!0),"undefined"==typeof Browser.resizeCanvas&&(Browser.resizeCanvas=!1),"undefined"==typeof Browser.vrDevice&&(Browser.vrDevice=null);var o=Module.canvas;Browser.fullScreenHandlersInstalled||(Browser.fullScreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",n,!1),document.addEventListener("mozfullscreenchange",n,!1),document.addEventListener("webkitfullscreenchange",n,!1),document.addEventListener("MSFullscreenChange",n,!1));var i=document.createElement("div");o.parentNode.insertBefore(i,o),i.appendChild(o),i.requestFullScreen=i.requestFullScreen||i.mozRequestFullScreen||i.msRequestFullscreen||(i.webkitRequestFullScreen?function(){i.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),t?i.requestFullScreen({vrDisplay:t}):i.requestFullScreen()},nextRAF:0,fakeRequestAnimationFrame:function(e){var r=Date.now();if(0===Browser.nextRAF)Browser.nextRAF=r+1e3/60;else for(;r+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var t=Math.max(Browser.nextRAF-r,0);setTimeout(e,t)},requestAnimationFrame:function(e){"undefined"==typeof window?Browser.fakeRequestAnimationFrame(e):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(e))},safeCallback:function(e){return function(){return ABORT?void 0:e.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var e=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],e.forEach(function(e){e()})}},safeRequestAnimationFrame:function(e){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?e():Browser.queuedAsyncCallbacks.push(e))})},safeSetTimeout:function(e,r){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?e():Browser.queuedAsyncCallbacks.push(e))},r)},safeSetInterval:function(e,r){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&e()},r)},getMimetype:function(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]},getUserMedia:function(e){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(e)},getMovementX:function(e){return e.movementX||e.mozMovementX||e.webkitMovementX||0},getMovementY:function(e){return e.movementY||e.mozMovementY||e.webkitMovementY||0},getMouseWheelDelta:function(e){var r=0;switch(e.type){case"DOMMouseScroll":r=e.detail;break;case"mousewheel":r=e.wheelDelta;break;case"wheel":r=e.deltaY;break;default:throw"unrecognized mouse wheel event: "+e.type}return r},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(e){if(Browser.pointerLock)"mousemove"!=e.type&&"mozMovementX"in e?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(e),Browser.mouseMovementY=Browser.getMovementY(e)),"undefined"!=typeof SDL?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var r=Module.canvas.getBoundingClientRect(),t=Module.canvas.width,n=Module.canvas.height,o="undefined"!=typeof window.scrollX?window.scrollX:window.pageXOffset,i="undefined"!=typeof window.scrollY?window.scrollY:window.pageYOffset;if("touchstart"===e.type||"touchend"===e.type||"touchmove"===e.type){var a=e.touch;if(void 0===a)return;var s=a.pageX-(o+r.left),u=a.pageY-(i+r.top);s*=t/r.width,u*=n/r.height;var l={x:s,y:u};if("touchstart"===e.type)Browser.lastTouches[a.identifier]=l,Browser.touches[a.identifier]=l;else if("touchend"===e.type||"touchmove"===e.type){var c=Browser.touches[a.identifier];c||(c=l),Browser.lastTouches[a.identifier]=c,Browser.touches[a.identifier]=l}return}var d=e.pageX-(o+r.left),f=e.pageY-(i+r.top);d*=t/r.width,f*=n/r.height,Browser.mouseMovementX=d-Browser.mouseX,Browser.mouseMovementY=f-Browser.mouseY,Browser.mouseX=d,Browser.mouseY=f}},xhrLoad:function(e,r,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)},asyncLoad:function(e,r,t,n){Browser.xhrLoad(e,function(t){assert(t,'Loading data file "'+e+'" failed (no arrayBuffer).'),r(new Uint8Array(t)),n||removeRunDependency("al "+e)},function(){if(!t)throw'Loading data file "'+e+'" failed.';t()}),n||addRunDependency("al "+e)},resizeListeners:[],updateResizeListeners:function(){var e=Module.canvas;Browser.resizeListeners.forEach(function(r){r(e.width,e.height)})},setCanvasSize:function(e,r,t){var n=Module.canvas;Browser.updateCanvasDimensions(n,e,r),t||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:function(){if("undefined"!=typeof SDL){var e=HEAPU32[SDL.screen+0*Runtime.QUANTUM_SIZE>>2];e=8388608|e,HEAP32[SDL.screen+0*Runtime.QUANTUM_SIZE>>2]=e}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if("undefined"!=typeof SDL){var e=HEAPU32[SDL.screen+0*Runtime.QUANTUM_SIZE>>2];e=-8388609&e,HEAP32[SDL.screen+0*Runtime.QUANTUM_SIZE>>2]=e}Browser.updateResizeListeners()},updateCanvasDimensions:function(e,r,t){r&&t?(e.widthNative=r,e.heightNative=t):(r=e.widthNative,t=e.heightNative);var n=r,o=t;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(n/o<Module.forcedAspectRatio?n=Math.round(o*Module.forcedAspectRatio):o=Math.round(n/Module.forcedAspectRatio)),(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===e.parentNode&&"undefined"!=typeof screen){var i=Math.min(screen.width/n,screen.height/o);n=Math.round(n*i),o=Math.round(o*i)}Browser.resizeCanvas?(e.width!=n&&(e.width=n),e.height!=o&&(e.height=o),"undefined"!=typeof e.style&&(e.style.removeProperty("width"),e.style.removeProperty("height"))):(e.width!=r&&(e.width=r),e.height!=t&&(e.height=t),"undefined"!=typeof e.style&&(n!=r||o!=t?(e.style.setProperty("width",n+"px","important"),e.style.setProperty("height",o+"px","important")):(e.style.removeProperty("width"),e.style.removeProperty("height"))))},wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function(){var e=Browser.nextWgetRequestHandle;return Browser.nextWgetRequestHandle++,e}};if(FS.staticInit(),__ATINIT__.unshift(function(){Module.noFSInit||FS.init.initialized||FS.init()}),__ATMAIN__.push(function(){FS.ignorePermissions=!1}),__ATEXIT__.push(function(){FS.quit()}),Module.FS_createFolder=FS.createFolder,Module.FS_createPath=FS.createPath,Module.FS_createDataFile=FS.createDataFile,Module.FS_createPreloadedFile=FS.createPreloadedFile,Module.FS_createLazyFile=FS.createLazyFile,Module.FS_createLink=FS.createLink,Module.FS_createDevice=FS.createDevice,Module.FS_unlink=FS.unlink,__ATINIT__.unshift(function(){TTY.init()}),__ATEXIT__.push(function(){TTY.shutdown()}),ENVIRONMENT_IS_NODE){var fs=require("fs"),NODEJS_PATH=require("path");NODEFS.staticInit()}Module.requestFullScreen=function(e,r,t){Browser.requestFullScreen(e,r,t)},Module.requestAnimationFrame=function(e){Browser.requestAnimationFrame(e)},Module.setCanvasSize=function(e,r,t){Browser.setCanvasSize(e,r,t)},Module.pauseMainLoop=function(){Browser.mainLoop.pause()},Module.resumeMainLoop=function(){Browser.mainLoop.resume()},Module.getUserMedia=function(){Browser.getUserMedia()},Module.createContext=function(e,r,t,n){return Browser.createContext(e,r,t,n)},STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),staticSealed=!0,STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX),assert(TOTAL_MEMORY>DYNAMIC_BASE,"TOTAL_MEMORY not big enough for stack"),Module.asmGlobalArg={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:0/0,Infinity:1/0,byteLength:byteLength},Module.asmLibraryArg={abort:abort,assert:assert,invoke_ii:invoke_ii,invoke_iiii:invoke_iiii,invoke_vi:invoke_vi,_pthread_cleanup_pop:_pthread_cleanup_pop,_pthread_self:_pthread_self,_sysconf:_sysconf,___lock:___lock,___syscall6:___syscall6,___setErrNo:___setErrNo,_abort:_abort,_sbrk:_sbrk,_time:_time,_pthread_cleanup_push:_pthread_cleanup_push,_emscripten_memcpy_big:_emscripten_memcpy_big,___syscall54:___syscall54,___unlock:___unlock,___syscall140:___syscall140,_emscripten_set_main_loop_timing:_emscripten_set_main_loop_timing,_emscripten_set_main_loop:_emscripten_set_main_loop,___syscall146:___syscall146,_emscripten_asm_const_0:_emscripten_asm_const_0,STACKTOP:STACKTOP,STACK_MAX:STACK_MAX,tempDoublePtr:tempDoublePtr,ABORT:ABORT};var asm=function(e,r,t){"use asm";function n(e){return $(e)&16777215||$(e)<=16777215||$(e)>2147483648?!1:(q=new I(e),K=new H(e),W=new U(e),X=new x(e),G=new Y(e),J=new z(e),Z=new j(e),Q=new V(e),t=e,!0)}function o(e){e|=0;var r=0;return r=ee,ee=ee+e|0,ee=ee+15&-16,r|0}function i(){return ee|0}function a(e){e|=0,ee=e}function s(e,r){e|=0,r|=0,ee=e,re=r}function u(e,r){e|=0,r|=0,te||(te=e,ne=r)}function l(e){e|=0,oe=e}function c(){return oe|0}function d(){return 1e5}function f(e,r){e|=0,r|=0;var t=0,n=0,o=0;if(t=R(20)|0,W[t>>2]=10,W[t+4>>2]=43,W[t+8>>2]=54,W[t+12>>2]=111,W[t+16>>2]=11,!((r|0)>0))return void O(t);n=0;do o=e+n|0,q[o>>0]=W[t+(((n|0)%5|0)<<2)>>2]^(X[o>>0]|0),n=n+1|0;while((n|0)!=(r|0));O(t)}function E(e,r){e|=0,r|=0;var t=0,n=0,o=0;if(t=R(20)|0,W[t>>2]=10,W[t+4>>2]=43,W[t+8>>2]=54,W[t+12>>2]=111,W[t+16>>2]=11,!((r|0)>0))return void O(t);n=0;do o=e+n|0,q[o>>0]=W[t+(((n|0)%5|0)<<2)>>2]^(X[o>>0]|0),n=n+1|0;while((n|0)!=(r|0));O(t)}function m(){return Fe(0),0}function S(){var e=0;return W[2]|0?(e=(se()|0)+60|0,e=W[e>>2]|0):e=56,e|0}function p(e){e|=0;var r=0;return e>>>0>4294963200&&(r=S()|0,W[r>>2]=0-e,e=-1),e|0}function h(e){return e|=0,0}function _(e){e|=0}function w(e){e|=0;var r=0,t=0;return r=ee,ee=ee+16|0,t=r,W[t>>2]=W[e+60>>2],e=p(ce(6,t|0)|0)|0,ee=r,e|0}function F(e,r,t){e|=0,r|=0,t|=0;var n=0,o=0,i=0;return o=ee,ee=ee+32|0,i=o,n=o+20|0,W[i>>2]=W[e+60>>2],W[i+4>>2]=0,W[i+8>>2]=r,W[i+12>>2]=n,W[i+16>>2]=t,(p(_e(140,i|0)|0)|0)<0?(W[n>>2]=-1,e=-1):e=W[n>>2]|0,ee=o,e|0}function g(e,r,t){e|=0,r|=0,t|=0;var n=0,o=0,i=0,a=0,s=0,u=0,l=0,c=0,d=0,f=0,E=0,m=0;for(m=ee,ee=ee+48|0,d=m+16|0,c=m,n=m+32|0,f=e+28|0,o=W[f>>2]|0,W[n>>2]=o,E=e+20|0,o=(W[E>>2]|0)-o|0,W[n+4>>2]=o,W[n+8>>2]=r,W[n+12>>2]=t,u=e+60|0,l=e+44|0,r=2,o=o+t|0;;){if(W[2]|0?(me(1,e|0),W[c>>2]=W[u>>2],W[c+4>>2]=n,W[c+8>>2]=r,a=p(we(146,c|0)|0)|0,ae(0)):(W[d>>2]=W[u>>2],W[d+4>>2]=n,W[d+8>>2]=r,a=p(we(146,d|0)|0)|0),(o|0)==(a|0)){o=6;break}if((a|0)<0){o=8;break}o=o-a|0,i=W[n+4>>2]|0,a>>>0<=i>>>0?(r|0)==2?(W[f>>2]=(W[f>>2]|0)+a,s=i,r=2):s=i:(s=W[l>>2]|0,W[f>>2]=s,W[E>>2]=s,s=W[n+12>>2]|0,a=a-i|0,n=n+8|0,r=r+-1|0),W[n>>2]=(W[n>>2]|0)+a,W[n+4>>2]=s-a}return(o|0)==6?(d=W[l>>2]|0,W[e+16>>2]=d+(W[e+48>>2]|0),e=d,W[f>>2]=e,W[E>>2]=e):(o|0)==8&&(W[e+16>>2]=0,W[f>>2]=0,W[E>>2]=0,W[e>>2]=W[e>>2]|32,t=(r|0)==2?0:t-(W[n+4>>2]|0)|0),ee=m,t|0}function y(e,r,t){e|=0,r|=0,t|=0;var n=0,o=0;return o=ee,ee=ee+80|0,n=o,W[e+36>>2]=3,((W[e>>2]&64|0)==0?(W[n>>2]=W[e+60>>2],W[n+4>>2]=21505,W[n+8>>2]=o+12,(pe(54,n|0)|0)!=0):0)&&(q[e+75>>0]=-1),n=g(e,r,t)|0,ee=o,n|0}function v(e){e|=0;var r=0,t=0;do if(e){if((W[e+76>>2]|0)<=-1){r=A(e)|0;break}t=(h(e)|0)==0,r=A(e)|0,t||_(e)}else{if(r=W[13]|0?v(W[13]|0)|0:0,le(36),e=W[8]|0)do t=(W[e+76>>2]|0)>-1?h(e)|0:0,(W[e+20>>2]|0)>>>0>(W[e+28>>2]|0)>>>0&&(r=A(e)|0|r),t&&_(e),e=W[e+56>>2]|0;while((e|0)!=0);he(36)}while(0);return r|0}function M(e){e|=0,W[e+68>>2]|0||_(e)}function A(e){e|=0;var r=0,t=0,n=0,o=0,i=0,a=0;return r=e+20|0,i=e+28|0,((W[r>>2]|0)>>>0>(W[i>>2]|0)>>>0?(ye[W[e+36>>2]&3](e,0,0)|0,(W[r>>2]|0)==0):0)?r=-1:(a=e+4|0,t=W[a>>2]|0,n=e+8|0,o=W[n>>2]|0,t>>>0<o>>>0&&ye[W[e+40>>2]&3](e,t-o|0,1)|0,W[e+16>>2]=0,W[i>>2]=0,W[r>>2]=0,W[n>>2]=0,W[a>>2]=0,r=0),r|0}function R(e){e|=0;var r=0,t=0,n=0,o=0,i=0,a=0,s=0,u=0,l=0,c=0,d=0,f=0,E=0,m=0,p=0,h=0,_=0,w=0,F=0,g=0,y=0,v=0,M=0,A=0,R=0,O=0,T=0,b=0,N=0,D=0,k=0,P=0,C=0,L=0,B=0,I=0,H=0;do if(e>>>0<245){if(E=e>>>0<11?16:e+11&-8,e=E>>>3,s=W[43]|0,t=s>>>e,t&3){e=(t&1^1)+e|0,n=e<<1,t=212+(n<<2)|0,n=212+(n+2<<2)|0,o=W[n>>2]|0,i=o+8|0,a=W[i>>2]|0;do if((t|0)!=(a|0)){if(a>>>0<(W[47]|0)>>>0&&de(),r=a+12|0,(W[r>>2]|0)==(o|0)){W[r>>2]=t,W[n>>2]=a;break}de()}else W[43]=s&~(1<<e);while(0);return H=e<<3,W[o+4>>2]=H|3,H=o+(H|4)|0,W[H>>2]=W[H>>2]|1,H=i,H|0}if(a=W[45]|0,E>>>0>a>>>0){if(t){n=2<<e,n=t<<e&(n|0-n),n=(n&0-n)+-1|0,u=n>>>12&16,n>>>=u,o=n>>>5&8,n>>>=o,i=n>>>2&4,n>>>=i,t=n>>>1&2,n>>>=t,e=n>>>1&1,e=(o|u|i|t|e)+(n>>>e)|0,n=e<<1,t=212+(n<<2)|0,n=212+(n+2<<2)|0,i=W[n>>2]|0,u=i+8|0,o=W[u>>2]|0;do if((t|0)!=(o|0)){if(o>>>0<(W[47]|0)>>>0&&de(),r=o+12|0,(W[r>>2]|0)==(i|0)){W[r>>2]=t,W[n>>2]=o,l=W[45]|0;break}de()}else W[43]=s&~(1<<e),l=a;while(0);return H=e<<3,a=H-E|0,W[i+4>>2]=E|3,s=i+E|0,W[i+(E|4)>>2]=a|1,W[i+H>>2]=a,l&&(o=W[48]|0,t=l>>>3,r=t<<1,n=212+(r<<2)|0,e=W[43]|0,t=1<<t,e&t?(e=212+(r+2<<2)|0,r=W[e>>2]|0,r>>>0<(W[47]|0)>>>0?de():(c=e,d=r)):(W[43]=e|t,c=212+(r+2<<2)|0,d=n),W[c>>2]=o,W[d+12>>2]=o,W[o+8>>2]=d,W[o+12>>2]=n),W[45]=a,W[48]=s,H=u,H|0}if(e=W[44]|0){for(t=(e&0-e)+-1|0,I=t>>>12&16,t>>>=I,B=t>>>5&8,t>>>=B,H=t>>>2&4,t>>>=H,e=t>>>1&2,t>>>=e,n=t>>>1&1,n=W[476+((B|I|H|e|n)+(t>>>n)<<2)>>2]|0,t=(W[n+4>>2]&-8)-E|0,e=n;;){if(r=W[e+16>>2]|0,!r&&(r=W[e+20>>2]|0,!r)){u=t;break}e=(W[r+4>>2]&-8)-E|0,H=e>>>0<t>>>0,t=H?e:t,e=r,n=H?r:n}i=W[47]|0,n>>>0<i>>>0&&de(),s=n+E|0,n>>>0>=s>>>0&&de(),a=W[n+24>>2]|0,t=W[n+12>>2]|0;do if((t|0)==(n|0)){if(e=n+20|0,r=W[e>>2]|0,!r&&(e=n+16|0,r=W[e>>2]|0,!r)){f=0;break}for(;;)if(t=r+20|0,o=W[t>>2]|0)r=o,e=t;else{if(t=r+16|0,o=W[t>>2]|0,!o)break;r=o,e=t}if(!(e>>>0<i>>>0)){W[e>>2]=0,f=r;break}de()}else{if(o=W[n+8>>2]|0,o>>>0<i>>>0&&de(),r=o+12|0,(W[r>>2]|0)!=(n|0)&&de(),e=t+8|0,(W[e>>2]|0)==(n|0)){W[r>>2]=t,W[e>>2]=o,f=t;break}de()}while(0);do if(a){if(r=W[n+28>>2]|0,e=476+(r<<2)|0,(n|0)==(W[e>>2]|0)){if(W[e>>2]=f,!f){W[44]=W[44]&~(1<<r);break}}else if(a>>>0<(W[47]|0)>>>0&&de(),r=a+16|0,(W[r>>2]|0)==(n|0)?W[r>>2]=f:W[a+20>>2]=f,!f)break;e=W[47]|0,f>>>0<e>>>0&&de(),W[f+24>>2]=a,r=W[n+16>>2]|0;do if(r){if(!(r>>>0<e>>>0)){W[f+16>>2]=r,W[r+24>>2]=f;break}de()}while(0);if(r=W[n+20>>2]|0){if(!(r>>>0<(W[47]|0)>>>0)){W[f+20>>2]=r,W[r+24>>2]=f;break}de()}}while(0);return u>>>0<16?(H=u+E|0,W[n+4>>2]=H|3,H=n+(H+4)|0,W[H>>2]=W[H>>2]|1):(W[n+4>>2]=E|3,W[n+(E|4)>>2]=u|1,W[n+(u+E)>>2]=u,r=W[45]|0,r&&(i=W[48]|0,t=r>>>3,r=t<<1,o=212+(r<<2)|0,e=W[43]|0,t=1<<t,e&t?(r=212+(r+2<<2)|0,e=W[r>>2]|0,e>>>0<(W[47]|0)>>>0?de():(m=r,p=e)):(W[43]=e|t,m=212+(r+2<<2)|0,p=o),W[m>>2]=i,W[p+12>>2]=i,W[i+8>>2]=p,W[i+12>>2]=o),W[45]=u,W[48]=s),H=n+8|0,H|0}p=E}else p=E}else if(e>>>0<=4294967231)if(e=e+11|0,d=e&-8,c=W[44]|0){t=0-d|0,e>>>=8,e?d>>>0>16777215?l=31:(p=(e+1048320|0)>>>16&8,g=e<<p,m=(g+520192|0)>>>16&4,g<<=m,l=(g+245760|0)>>>16&2,l=14-(m|p|l)+(g<<l>>>15)|0,l=d>>>(l+7|0)&1|l<<1):l=0,e=W[476+(l<<2)>>2]|0;e:do if(e)for(a=t,o=0,s=d<<((l|0)==31?0:25-(l>>>1)|0),u=e,e=0;;){if(i=W[u+4>>2]&-8,t=i-d|0,t>>>0<a>>>0){if((i|0)==(d|0)){i=u,e=u,g=90;break e}e=u}else t=a;if(g=W[u+20>>2]|0,u=W[u+16+(s>>>31<<2)>>2]|0,o=(g|0)==0|(g|0)==(u|0)?o:g,!u){g=86;break}a=t,s<<=1}else o=0,e=0,g=86;while(0);if((g|0)==86){if((o|0)==0&(e|0)==0){if(e=2<<l,e=c&(e|0-e),!e){p=d;break}e=(e&0-e)+-1|0,f=e>>>12&16,e>>>=f,c=e>>>5&8,e>>>=c,m=e>>>2&4,e>>>=m,p=e>>>1&2,e>>>=p,o=e>>>1&1,o=W[476+((c|f|m|p|o)+(e>>>o)<<2)>>2]|0,e=0}o?(i=o,g=90):(s=t,u=e)}if((g|0)==90)for(;;)if(g=0,p=(W[i+4>>2]&-8)-d|0,o=p>>>0<t>>>0,t=o?p:t,e=o?i:e,o=W[i+16>>2]|0)i=o,g=90;else{if(i=W[i+20>>2]|0,!i){s=t,u=e;break}g=90}if((u|0)!=0?s>>>0<((W[45]|0)-d|0)>>>0:0){o=W[47]|0,u>>>0<o>>>0&&de(),a=u+d|0,u>>>0>=a>>>0&&de(),i=W[u+24>>2]|0,t=W[u+12>>2]|0;do if((t|0)==(u|0)){if(e=u+20|0,r=W[e>>2]|0,!r&&(e=u+16|0,r=W[e>>2]|0,!r)){E=0;break}for(;;)if(t=r+20|0,n=W[t>>2]|0)r=n,e=t;else{if(t=r+16|0,n=W[t>>2]|0,!n)break;r=n,e=t}if(!(e>>>0<o>>>0)){W[e>>2]=0,E=r;break}de()}else{if(n=W[u+8>>2]|0,n>>>0<o>>>0&&de(),r=n+12|0,(W[r>>2]|0)!=(u|0)&&de(),e=t+8|0,(W[e>>2]|0)==(u|0)){W[r>>2]=t,W[e>>2]=n,E=t;break}de()}while(0);do if(i){if(r=W[u+28>>2]|0,e=476+(r<<2)|0,(u|0)==(W[e>>2]|0)){if(W[e>>2]=E,!E){W[44]=W[44]&~(1<<r);break}}else if(i>>>0<(W[47]|0)>>>0&&de(),r=i+16|0,(W[r>>2]|0)==(u|0)?W[r>>2]=E:W[i+20>>2]=E,!E)break;e=W[47]|0,E>>>0<e>>>0&&de(),W[E+24>>2]=i,r=W[u+16>>2]|0;do if(r){if(!(r>>>0<e>>>0)){W[E+16>>2]=r,W[r+24>>2]=E;break}de()}while(0);if(r=W[u+20>>2]|0){if(!(r>>>0<(W[47]|0)>>>0)){W[E+20>>2]=r,W[r+24>>2]=E;break}de()}}while(0);e:do if(s>>>0>=16){if(W[u+4>>2]=d|3,W[u+(d|4)>>2]=s|1,W[u+(s+d)>>2]=s,r=s>>>3,s>>>0<256){e=r<<1,n=212+(e<<2)|0,t=W[43]|0,r=1<<r,t&r?(r=212+(e+2<<2)|0,e=W[r>>2]|0,e>>>0<(W[47]|0)>>>0?de():(_=r,w=e)):(W[43]=t|r,_=212+(e+2<<2)|0,w=n),W[_>>2]=a,W[w+12>>2]=a,W[u+(d+8)>>2]=w,W[u+(d+12)>>2]=n;break}if(r=s>>>8,r?s>>>0>16777215?n=31:(I=(r+1048320|0)>>>16&8,H=r<<I,B=(H+520192|0)>>>16&4,H<<=B,n=(H+245760|0)>>>16&2,n=14-(B|I|n)+(H<<n>>>15)|0,n=s>>>(n+7|0)&1|n<<1):n=0,r=476+(n<<2)|0,W[u+(d+28)>>2]=n,W[u+(d+20)>>2]=0,W[u+(d+16)>>2]=0,e=W[44]|0,t=1<<n,!(e&t)){W[44]=e|t,W[r>>2]=a,W[u+(d+24)>>2]=r,W[u+(d+12)>>2]=a,W[u+(d+8)>>2]=a;break}r=W[r>>2]|0;r:do if((W[r+4>>2]&-8|0)!=(s|0)){for(n=s<<((n|0)==31?0:25-(n>>>1)|0);;){if(e=r+16+(n>>>31<<2)|0,t=W[e>>2]|0,!t)break;if((W[t+4>>2]&-8|0)==(s|0)){M=t;break r}n<<=1,r=t}if(!(e>>>0<(W[47]|0)>>>0)){W[e>>2]=a,W[u+(d+24)>>2]=r,W[u+(d+12)>>2]=a,W[u+(d+8)>>2]=a;break e}de()}else M=r;while(0);if(r=M+8|0,e=W[r>>2]|0,H=W[47]|0,e>>>0>=H>>>0&M>>>0>=H>>>0){W[e+12>>2]=a,W[r>>2]=a,W[u+(d+8)>>2]=e,W[u+(d+12)>>2]=M,W[u+(d+24)>>2]=0;break}de()}else H=s+d|0,W[u+4>>2]=H|3,H=u+(H+4)|0,W[H>>2]=W[H>>2]|1;while(0);return H=u+8|0,H|0}p=d}else p=d;else p=-1;while(0);if(t=W[45]|0,t>>>0>=p>>>0)return r=t-p|0,e=W[48]|0,r>>>0>15?(W[48]=e+p,W[45]=r,W[e+(p+4)>>2]=r|1,W[e+t>>2]=r,W[e+4>>2]=p|3):(W[45]=0,W[48]=0,W[e+4>>2]=t|3,H=e+(t+4)|0,W[H>>2]=W[H>>2]|1),H=e+8|0,H|0;if(e=W[46]|0,e>>>0>p>>>0)return I=e-p|0,W[46]=I,H=W[49]|0,W[49]=H+p,W[H+(p+4)>>2]=I|1,W[H+4>>2]=p|3,H=H+8|0,H|0;do if(!(W[161]|0)){if(e=ue(30)|0,!(e+-1&e)){W[163]=e,W[162]=e,W[164]=-1,W[165]=-1,W[166]=0,W[154]=0,M=(Ee(0)|0)&-16^1431655768,W[161]=M;break}de()}while(0);if(u=p+48|0,s=W[163]|0,l=p+47|0,a=s+l|0,s=0-s|0,c=a&s,c>>>0<=p>>>0)return H=0,H|0;if(e=W[153]|0,(e|0)!=0?(w=W[151]|0,M=w+c|0,M>>>0<=w>>>0|M>>>0>e>>>0):0)return H=0,H|0;e:do if(W[154]&4)e=0,g=191;else{e=W[49]|0;r:do if(e){for(o=620;;){if(t=W[o>>2]|0,t>>>0<=e>>>0?(h=o+4|0,(t+(W[h>>2]|0)|0)>>>0>e>>>0):0){i=o,e=h;break}if(o=W[o+8>>2]|0,!o){g=174;break r}}if(t=a-(W[46]|0)&s,t>>>0<2147483647)if(o=fe(t|0)|0,M=(o|0)==((W[i>>2]|0)+(W[e>>2]|0)|0),e=M?t:0,M){if((o|0)!=-1){y=o,m=e,g=194;break e}}else g=184;else e=0}else g=174;while(0);do if((g|0)==174)if(i=fe(0)|0,(i|0)!=-1)if(e=i,t=W[162]|0,o=t+-1|0,t=o&e?c-e+(o+e&0-t)|0:c,e=W[151]|0,o=e+t|0,t>>>0>p>>>0&t>>>0<2147483647){if(M=W[153]|0,(M|0)!=0?o>>>0<=e>>>0|o>>>0>M>>>0:0){e=0;break}if(o=fe(t|0)|0,M=(o|0)==(i|0),e=M?t:0,M){y=i,m=e,g=194;break e}g=184}else e=0;else e=0;while(0);r:do if((g|0)==184){i=0-t|0;do if(u>>>0>t>>>0&(t>>>0<2147483647&(o|0)!=-1)?(F=W[163]|0,F=l-t+F&0-F,F>>>0<2147483647):0){if((fe(F|0)|0)==-1){fe(i|0)|0;break r}t=F+t|0;break}while(0);if((o|0)!=-1){y=o,m=t,g=194;break e}}while(0);W[154]=W[154]|4,g=191}while(0);if(((((g|0)==191?c>>>0<2147483647:0)?(y=fe(c|0)|0,v=fe(0)|0,y>>>0<v>>>0&((y|0)!=-1&(v|0)!=-1)):0)?(A=v-y|0,R=A>>>0>(p+40|0)>>>0):0)&&(m=R?A:e,g=194),(g|0)==194){e=(W[151]|0)+m|0,W[151]=e,e>>>0>(W[152]|0)>>>0&&(W[152]=e),a=W[49]|0;e:do if(a){i=620;do{if(e=W[i>>2]|0,t=i+4|0,o=W[t>>2]|0,(y|0)==(e+o|0)){O=e,T=t,b=o,N=i,g=204;break}i=W[i+8>>2]|0}while((i|0)!=0);if(((g|0)==204?(W[N+12>>2]&8|0)==0:0)?a>>>0<y>>>0&a>>>0>=O>>>0:0){W[T>>2]=b+m,H=(W[46]|0)+m|0,I=a+8|0,I=(I&7|0)==0?0:0-I&7,B=H-I|0,W[49]=a+I,W[46]=B,W[a+(I+4)>>2]=B|1,W[a+(H+4)>>2]=40,W[50]=W[165];break}for(e=W[47]|0,y>>>0<e>>>0&&(W[47]=y,e=y),t=y+m|0,i=620;;){if((W[i>>2]|0)==(t|0)){o=i,t=i,g=212;break}if(i=W[i+8>>2]|0,!i){t=620;break}}if((g|0)==212){if(!(W[t+12>>2]&8)){W[o>>2]=y,f=t+4|0,W[f>>2]=(W[f>>2]|0)+m,f=y+8|0,f=(f&7|0)==0?0:0-f&7,l=y+(m+8)|0,l=(l&7|0)==0?0:0-l&7,r=y+(l+m)|0,d=f+p|0,E=y+d|0,c=r-(y+f)-p|0,W[y+(f+4)>>2]=p|3;r:do if((r|0)!=(a|0)){if((r|0)==(W[48]|0)){H=(W[45]|0)+c|0,W[45]=H,W[48]=E,W[y+(d+4)>>2]=H|1,W[y+(H+d)>>2]=H;break}if(s=m+4|0,t=W[y+(s+l)>>2]|0,(t&3|0)==1){u=t&-8,i=t>>>3;t:do if(t>>>0>=256){a=W[y+((l|24)+m)>>2]|0,n=W[y+(m+12+l)>>2]|0;do if((n|0)==(r|0)){if(o=l|16,n=y+(s+o)|0,t=W[n>>2]|0,!t&&(n=y+(o+m)|0,t=W[n>>2]|0,!t)){L=0;break}for(;;)if(o=t+20|0,i=W[o>>2]|0)t=i,n=o;else{if(o=t+16|0,i=W[o>>2]|0,!i)break;t=i,n=o}if(!(n>>>0<e>>>0)){W[n>>2]=0,L=t;break}de()}else{if(o=W[y+((l|8)+m)>>2]|0,o>>>0<e>>>0&&de(),e=o+12|0,(W[e>>2]|0)!=(r|0)&&de(),t=n+8|0,(W[t>>2]|0)==(r|0)){W[e>>2]=n,W[t>>2]=o,L=n;break}de()}while(0);if(!a)break;e=W[y+(m+28+l)>>2]|0,t=476+(e<<2)|0;do{if((r|0)==(W[t>>2]|0)){if(W[t>>2]=L,L)break;W[44]=W[44]&~(1<<e);break t}if(a>>>0<(W[47]|0)>>>0&&de(),e=a+16|0,(W[e>>2]|0)==(r|0)?W[e>>2]=L:W[a+20>>2]=L,!L)break t}while(0);t=W[47]|0,L>>>0<t>>>0&&de(),W[L+24>>2]=a,r=l|16,e=W[y+(r+m)>>2]|0;do if(e){if(!(e>>>0<t>>>0)){W[L+16>>2]=e,W[e+24>>2]=L;break}de()}while(0);if(r=W[y+(s+r)>>2]|0,!r)break;if(!(r>>>0<(W[47]|0)>>>0)){W[L+20>>2]=r,W[r+24>>2]=L;break}de()}else{n=W[y+((l|8)+m)>>2]|0,o=W[y+(m+12+l)>>2]|0,t=212+(i<<1<<2)|0;do if((n|0)!=(t|0)){if(n>>>0<e>>>0&&de(),(W[n+12>>2]|0)==(r|0))break;de()}while(0);if((o|0)==(n|0)){W[43]=W[43]&~(1<<i);break}do if((o|0)==(t|0))D=o+8|0;else{if(o>>>0<e>>>0&&de(),e=o+8|0,(W[e>>2]|0)==(r|0)){D=e;break}de()}while(0);W[n+12>>2]=o,W[D>>2]=n}while(0);r=y+((u|l)+m)|0,o=u+c|0}else o=c;if(r=r+4|0,W[r>>2]=W[r>>2]&-2,W[y+(d+4)>>2]=o|1,W[y+(o+d)>>2]=o,r=o>>>3,o>>>0<256){e=r<<1,n=212+(e<<2)|0,t=W[43]|0,r=1<<r;do if(t&r){if(r=212+(e+2<<2)|0,e=W[r>>2]|0,e>>>0>=(W[47]|0)>>>0){B=r,I=e;break}de()}else W[43]=t|r,B=212+(e+2<<2)|0,I=n;while(0);W[B>>2]=E,W[I+12>>2]=E,W[y+(d+8)>>2]=I,W[y+(d+12)>>2]=n;break}r=o>>>8;do if(r){if(o>>>0>16777215){n=31;break}B=(r+1048320|0)>>>16&8,I=r<<B,L=(I+520192|0)>>>16&4,I<<=L,n=(I+245760|0)>>>16&2,n=14-(L|B|n)+(I<<n>>>15)|0,n=o>>>(n+7|0)&1|n<<1}else n=0;while(0);if(r=476+(n<<2)|0,W[y+(d+28)>>2]=n,W[y+(d+20)>>2]=0,W[y+(d+16)>>2]=0,e=W[44]|0,t=1<<n,!(e&t)){W[44]=e|t,W[r>>2]=E,W[y+(d+24)>>2]=r,W[y+(d+12)>>2]=E,W[y+(d+8)>>2]=E;break}r=W[r>>2]|0;t:do if((W[r+4>>2]&-8|0)!=(o|0)){for(n=o<<((n|0)==31?0:25-(n>>>1)|0);;){if(e=r+16+(n>>>31<<2)|0,t=W[e>>2]|0,!t)break;if((W[t+4>>2]&-8|0)==(o|0)){H=t;break t}n<<=1,r=t}if(!(e>>>0<(W[47]|0)>>>0)){W[e>>2]=E,W[y+(d+24)>>2]=r,W[y+(d+12)>>2]=E,W[y+(d+8)>>2]=E;break r}de()}else H=r;while(0);if(r=H+8|0,e=W[r>>2]|0,I=W[47]|0,e>>>0>=I>>>0&H>>>0>=I>>>0){W[e+12>>2]=E,W[r>>2]=E,W[y+(d+8)>>2]=e,W[y+(d+12)>>2]=H,W[y+(d+24)>>2]=0;break}de()}else H=(W[46]|0)+c|0,W[46]=H,W[49]=E,W[y+(d+4)>>2]=H|1;while(0);return H=y+(f|8)|0,H|0}t=620}for(;;){if(e=W[t>>2]|0,e>>>0<=a>>>0?(r=W[t+4>>2]|0,n=e+r|0,n>>>0>a>>>0):0)break;t=W[t+8>>2]|0}if(o=e+(r+-39)|0,e=e+(r+-47+((o&7|0)==0?0:0-o&7))|0,o=a+16|0,e=e>>>0<o>>>0?a:e,r=e+8|0,t=y+8|0,t=(t&7|0)==0?0:0-t&7,H=m+-40-t|0,W[49]=y+t,W[46]=H,W[y+(t+4)>>2]=H|1,W[y+(m+-36)>>2]=40,W[50]=W[165],t=e+4|0,W[t>>2]=27,W[r>>2]=W[155],W[r+4>>2]=W[156],W[r+8>>2]=W[157],W[r+12>>2]=W[158],W[155]=y,W[156]=m,W[158]=0,W[157]=r,r=e+28|0,W[r>>2]=7,(e+32|0)>>>0<n>>>0)do H=r,r=r+4|0,W[r>>2]=7;while((H+8|0)>>>0<n>>>0);if((e|0)!=(a|0)){if(i=e-a|0,W[t>>2]=W[t>>2]&-2,W[a+4>>2]=i|1,W[e>>2]=i,r=i>>>3,i>>>0<256){e=r<<1,n=212+(e<<2)|0,t=W[43]|0,r=1<<r,t&r?(r=212+(e+2<<2)|0,e=W[r>>2]|0,e>>>0<(W[47]|0)>>>0?de():(k=r,P=e)):(W[43]=t|r,k=212+(e+2<<2)|0,P=n),W[k>>2]=a,W[P+12>>2]=a,W[a+8>>2]=P,W[a+12>>2]=n;break}if(r=i>>>8,r?i>>>0>16777215?n=31:(I=(r+1048320|0)>>>16&8,H=r<<I,B=(H+520192|0)>>>16&4,H<<=B,n=(H+245760|0)>>>16&2,n=14-(B|I|n)+(H<<n>>>15)|0,n=i>>>(n+7|0)&1|n<<1):n=0,t=476+(n<<2)|0,W[a+28>>2]=n,W[a+20>>2]=0,W[o>>2]=0,r=W[44]|0,e=1<<n,!(r&e)){W[44]=r|e,W[t>>2]=a,W[a+24>>2]=t,W[a+12>>2]=a,W[a+8>>2]=a;break}r=W[t>>2]|0;r:do if((W[r+4>>2]&-8|0)!=(i|0)){for(n=i<<((n|0)==31?0:25-(n>>>1)|0);;){if(e=r+16+(n>>>31<<2)|0,t=W[e>>2]|0,!t)break;if((W[t+4>>2]&-8|0)==(i|0)){C=t;break r}n<<=1,r=t}if(!(e>>>0<(W[47]|0)>>>0)){W[e>>2]=a,W[a+24>>2]=r,W[a+12>>2]=a,W[a+8>>2]=a;break e}de()}else C=r;while(0);if(r=C+8|0,e=W[r>>2]|0,H=W[47]|0,e>>>0>=H>>>0&C>>>0>=H>>>0){W[e+12>>2]=a,W[r>>2]=a,W[a+8>>2]=e,W[a+12>>2]=C,W[a+24>>2]=0;break}de()}}else{H=W[47]|0,(H|0)==0|y>>>0<H>>>0&&(W[47]=y),W[155]=y,W[156]=m,W[158]=0,W[52]=W[161],W[51]=-1,r=0;do H=r<<1,I=212+(H<<2)|0,W[212+(H+3<<2)>>2]=I,W[212+(H+2<<2)>>2]=I,r=r+1|0;while((r|0)!=32);H=y+8|0,H=(H&7|0)==0?0:0-H&7,I=m+-40-H|0,W[49]=y+H,W[46]=I,W[y+(H+4)>>2]=I|1,W[y+(m+-36)>>2]=40,W[50]=W[165]}while(0);if(r=W[46]|0,r>>>0>p>>>0)return I=r-p|0,W[46]=I,H=W[49]|0,W[49]=H+p,W[H+(p+4)>>2]=I|1,W[H+4>>2]=p|3,H=H+8|0,H|0}return H=S()|0,W[H>>2]=12,H=0,H|0}function O(e){e|=0;var r=0,t=0,n=0,o=0,i=0,a=0,s=0,u=0,l=0,c=0,d=0,f=0,E=0,m=0,S=0,p=0,h=0,_=0,w=0;if(e){r=e+-8|0,s=W[47]|0,r>>>0<s>>>0&&de(),t=W[e+-4>>2]|0,n=t&3,(n|0)==1&&de(),E=t&-8,S=e+(E+-8)|0;do if(t&1)w=r,i=E;else{if(r=W[r>>2]|0,!n)return;if(u=-8-r|0,c=e+u|0,d=r+E|0,c>>>0<s>>>0&&de(),(c|0)==(W[48]|0)){if(r=e+(E+-4)|0,t=W[r>>2]|0,(t&3|0)!=3){w=c,i=d;break}return W[45]=d,W[r>>2]=t&-2,W[e+(u+4)>>2]=d|1,void(W[S>>2]=d)}if(o=r>>>3,r>>>0<256){if(n=W[e+(u+8)>>2]|0,t=W[e+(u+12)>>2]|0,r=212+(o<<1<<2)|0,(n|0)!=(r|0)&&(n>>>0<s>>>0&&de(),(W[n+12>>2]|0)!=(c|0)&&de()),(t|0)==(n|0)){W[43]=W[43]&~(1<<o),w=c,i=d;break}(t|0)!=(r|0)?(t>>>0<s>>>0&&de(),r=t+8|0,(W[r>>2]|0)==(c|0)?a=r:de()):a=t+8|0,W[n+12>>2]=t,W[a>>2]=n,w=c,i=d;break}a=W[e+(u+24)>>2]|0,n=W[e+(u+12)>>2]|0;do if((n|0)==(c|0)){if(t=e+(u+20)|0,r=W[t>>2]|0,!r&&(t=e+(u+16)|0,r=W[t>>2]|0,!r)){l=0;break}for(;;)if(n=r+20|0,o=W[n>>2]|0)r=o,t=n;else{if(n=r+16|0,o=W[n>>2]|0,!o)break;r=o,t=n}if(!(t>>>0<s>>>0)){W[t>>2]=0,l=r;break}de()}else{if(o=W[e+(u+8)>>2]|0,o>>>0<s>>>0&&de(),r=o+12|0,(W[r>>2]|0)!=(c|0)&&de(),t=n+8|0,(W[t>>2]|0)==(c|0)){W[r>>2]=n,W[t>>2]=o,l=n;break}de()}while(0);if(a){if(r=W[e+(u+28)>>2]|0,t=476+(r<<2)|0,(c|0)==(W[t>>2]|0)){if(W[t>>2]=l,!l){W[44]=W[44]&~(1<<r),w=c,i=d;break}}else if(a>>>0<(W[47]|0)>>>0&&de(),r=a+16|0,(W[r>>2]|0)==(c|0)?W[r>>2]=l:W[a+20>>2]=l,!l){w=c,i=d;break}t=W[47]|0,l>>>0<t>>>0&&de(),W[l+24>>2]=a,r=W[e+(u+16)>>2]|0;do if(r){if(!(r>>>0<t>>>0)){W[l+16>>2]=r,W[r+24>>2]=l;break}de()}while(0);if(r=W[e+(u+20)>>2]|0){if(!(r>>>0<(W[47]|0)>>>0)){W[l+20>>2]=r,W[r+24>>2]=l,w=c,i=d;break}de()}else w=c,i=d}else w=c,i=d}while(0);if(w>>>0>=S>>>0&&de(),r=e+(E+-4)|0,t=W[r>>2]|0,t&1||de(),t&2)W[r>>2]=t&-2,W[w+4>>2]=i|1,W[w+i>>2]=i;else{if((S|0)==(W[49]|0)){if(_=(W[46]|0)+i|0,W[46]=_,W[49]=w,W[w+4>>2]=_|1,(w|0)!=(W[48]|0))return;return W[48]=0,void(W[45]=0)}if((S|0)==(W[48]|0))return _=(W[45]|0)+i|0,W[45]=_,W[48]=w,W[w+4>>2]=_|1,void(W[w+_>>2]=_);i=(t&-8)+i|0,o=t>>>3;do if(t>>>0>=256){a=W[e+(E+16)>>2]|0,r=W[e+(E|4)>>2]|0;do if((r|0)==(S|0)){
if(t=e+(E+12)|0,r=W[t>>2]|0,!r&&(t=e+(E+8)|0,r=W[t>>2]|0,!r)){m=0;break}for(;;)if(n=r+20|0,o=W[n>>2]|0)r=o,t=n;else{if(n=r+16|0,o=W[n>>2]|0,!o)break;r=o,t=n}if(!(t>>>0<(W[47]|0)>>>0)){W[t>>2]=0,m=r;break}de()}else{if(t=W[e+E>>2]|0,t>>>0<(W[47]|0)>>>0&&de(),n=t+12|0,(W[n>>2]|0)!=(S|0)&&de(),o=r+8|0,(W[o>>2]|0)==(S|0)){W[n>>2]=r,W[o>>2]=t,m=r;break}de()}while(0);if(a){if(r=W[e+(E+20)>>2]|0,t=476+(r<<2)|0,(S|0)==(W[t>>2]|0)){if(W[t>>2]=m,!m){W[44]=W[44]&~(1<<r);break}}else if(a>>>0<(W[47]|0)>>>0&&de(),r=a+16|0,(W[r>>2]|0)==(S|0)?W[r>>2]=m:W[a+20>>2]=m,!m)break;t=W[47]|0,m>>>0<t>>>0&&de(),W[m+24>>2]=a,r=W[e+(E+8)>>2]|0;do if(r){if(!(r>>>0<t>>>0)){W[m+16>>2]=r,W[r+24>>2]=m;break}de()}while(0);if(r=W[e+(E+12)>>2]|0){if(!(r>>>0<(W[47]|0)>>>0)){W[m+20>>2]=r,W[r+24>>2]=m;break}de()}}}else{if(n=W[e+E>>2]|0,t=W[e+(E|4)>>2]|0,r=212+(o<<1<<2)|0,(n|0)!=(r|0)&&(n>>>0<(W[47]|0)>>>0&&de(),(W[n+12>>2]|0)!=(S|0)&&de()),(t|0)==(n|0)){W[43]=W[43]&~(1<<o);break}(t|0)!=(r|0)?(t>>>0<(W[47]|0)>>>0&&de(),r=t+8|0,(W[r>>2]|0)==(S|0)?f=r:de()):f=t+8|0,W[n+12>>2]=t,W[f>>2]=n}while(0);if(W[w+4>>2]=i|1,W[w+i>>2]=i,(w|0)==(W[48]|0))return void(W[45]=i)}if(r=i>>>3,i>>>0<256)return t=r<<1,o=212+(t<<2)|0,n=W[43]|0,r=1<<r,n&r?(r=212+(t+2<<2)|0,t=W[r>>2]|0,t>>>0<(W[47]|0)>>>0?de():(p=r,h=t)):(W[43]=n|r,p=212+(t+2<<2)|0,h=o),W[p>>2]=w,W[h+12>>2]=w,W[w+8>>2]=h,void(W[w+12>>2]=o);r=i>>>8,r?i>>>0>16777215?o=31:(p=(r+1048320|0)>>>16&8,h=r<<p,S=(h+520192|0)>>>16&4,h<<=S,o=(h+245760|0)>>>16&2,o=14-(S|p|o)+(h<<o>>>15)|0,o=i>>>(o+7|0)&1|o<<1):o=0,r=476+(o<<2)|0,W[w+28>>2]=o,W[w+20>>2]=0,W[w+16>>2]=0,t=W[44]|0,n=1<<o;e:do if(t&n){r=W[r>>2]|0;r:do if((W[r+4>>2]&-8|0)!=(i|0)){for(o=i<<((o|0)==31?0:25-(o>>>1)|0);;){if(t=r+16+(o>>>31<<2)|0,n=W[t>>2]|0,!n)break;if((W[n+4>>2]&-8|0)==(i|0)){_=n;break r}o<<=1,r=n}if(!(t>>>0<(W[47]|0)>>>0)){W[t>>2]=w,W[w+24>>2]=r,W[w+12>>2]=w,W[w+8>>2]=w;break e}de()}else _=r;while(0);if(r=_+8|0,t=W[r>>2]|0,h=W[47]|0,t>>>0>=h>>>0&_>>>0>=h>>>0){W[t+12>>2]=w,W[r>>2]=w,W[w+8>>2]=t,W[w+12>>2]=_,W[w+24>>2]=0;break}de()}else W[44]=t|n,W[r>>2]=w,W[w+24>>2]=r,W[w+12>>2]=w,W[w+8>>2]=w;while(0);if(w=(W[51]|0)+-1|0,W[51]=w,!w){for(r=628;;){if(r=W[r>>2]|0,!r)break;r=r+8|0}W[51]=-1}}}function T(){}function b(e,r,t){e|=0,r|=0,t|=0;var n=0,o=0,i=0,a=0;if(n=e+t|0,(t|0)>=20){if(r&=255,i=e&3,a=r|r<<8|r<<16|r<<24,o=n&-4,i)for(i=e+4-i|0;(e|0)<(i|0);)q[e>>0]=r,e=e+1|0;for(;(e|0)<(o|0);)W[e>>2]=a,e=e+4|0}for(;(e|0)<(n|0);)q[e>>0]=r,e=e+1|0;return e-t|0}function N(e,r,t){e|=0,r|=0,t|=0;var n=0;if((t|0)>=4096)return Se(e|0,r|0,t|0)|0;if(n=e|0,(e&3)==(r&3)){for(;e&3;){if(!t)return n|0;q[e>>0]=q[r>>0]|0,e=e+1|0,r=r+1|0,t=t-1|0}for(;(t|0)>=4;)W[e>>2]=W[r>>2],e=e+4|0,r=r+4|0,t=t-4|0}for(;(t|0)>0;)q[e>>0]=q[r>>0]|0,e=e+1|0,r=r+1|0,t=t-1|0;return n|0}function D(e,r){return e|=0,r|=0,ge[e&1](r|0)|0}function k(e,r,t,n){return e|=0,r|=0,t|=0,n|=0,ye[e&3](r|0,t|0,n|0)|0}function P(e,r){e|=0,r|=0,ve[e&1](r|0)}function C(e){return e|=0,ie(0),0}function L(e,r,t){return e|=0,r|=0,t|=0,ie(1),0}function B(e){e|=0,ie(2)}var I=e.Int8Array,H=e.Int16Array,U=e.Int32Array,x=e.Uint8Array,Y=e.Uint16Array,z=e.Uint32Array,j=e.Float32Array,V=e.Float64Array,q=new I(t),K=new H(t),W=new U(t),X=new x(t),G=new Y(t),J=new z(t),Z=new j(t),Q=new V(t),$=e.byteLength,ee=r.STACKTOP|0,re=r.STACK_MAX|0,te=(r.tempDoublePtr|0,r.ABORT|0,0),ne=0,oe=(e.NaN,e.Infinity,0),ie=(e.Math.floor,e.Math.abs,e.Math.sqrt,e.Math.pow,e.Math.cos,e.Math.sin,e.Math.tan,e.Math.acos,e.Math.asin,e.Math.atan,e.Math.atan2,e.Math.exp,e.Math.log,e.Math.ceil,e.Math.imul,e.Math.min,e.Math.clz32,r.abort),ae=(r.assert,r.invoke_ii,r.invoke_iiii,r.invoke_vi,r._pthread_cleanup_pop),se=r._pthread_self,ue=r._sysconf,le=r.___lock,ce=r.___syscall6,de=(r.___setErrNo,r._abort),fe=r._sbrk,Ee=r._time,me=r._pthread_cleanup_push,Se=r._emscripten_memcpy_big,pe=r.___syscall54,he=r.___unlock,_e=r.___syscall140,we=(r._emscripten_set_main_loop_timing,r._emscripten_set_main_loop,r.___syscall146),Fe=r._emscripten_asm_const_0,ge=[C,w],ye=[L,y,F,g],ve=[B,M];return{_fflush:v,_main:m,_memset:b,_malloc:R,_ac6d88ea1cf7fe2:E,_memcpy:N,_ac6d78ea1cf7fe2:f,_free:O,_sss:d,___errno_location:S,runPostSets:T,_emscripten_replace_memory:n,stackAlloc:o,stackSave:i,stackRestore:a,establishStackSpace:s,setThrew:u,setTempRet0:l,getTempRet0:c,dynCall_ii:D,dynCall_iiii:k,dynCall_vi:P}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_fflush=Module._fflush=asm._fflush,_main=Module._main=asm._main,_memset=Module._memset=asm._memset,_malloc=Module._malloc=asm._malloc,_ac6d88ea1cf7fe2=Module._ac6d88ea1cf7fe2=asm._ac6d88ea1cf7fe2,_memcpy=Module._memcpy=asm._memcpy,_emscripten_replace_memory=Module._emscripten_replace_memory=asm._emscripten_replace_memory,___errno_location=Module.___errno_location=asm.___errno_location,_free=Module._free=asm._free,_sss=Module._sss=asm._sss,_ac6d78ea1cf7fe2=Module._ac6d78ea1cf7fe2=asm._ac6d78ea1cf7fe2,runPostSets=Module.runPostSets=asm.runPostSets,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi;Runtime.stackAlloc=asm.stackAlloc,Runtime.stackSave=asm.stackSave,Runtime.stackRestore=asm.stackRestore,Runtime.establishStackSpace=asm.establishStackSpace,Runtime.setTempRet0=asm.setTempRet0,Runtime.getTempRet0=asm.getTempRet0,ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop,preloadStartTime=null,calledMain=!1;dependenciesFulfilled=function e(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=e)},Module.callMain=Module.callMain=function(e){function r(){for(var e=0;3>e;e++)n.push(0)}assert(0==runDependencies,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),assert(0==__ATPRERUN__.length,"cannot call main when preRun functions remain to be called"),e=e||[],ensureInitRuntime();var t=e.length+1,n=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];r();for(var o=0;t-1>o;o+=1)n.push(allocate(intArrayFromString(e[o]),"i8",ALLOC_NORMAL)),r();n.push(0),n=allocate(n,"i32",ALLOC_NORMAL);try{var i=Module._main(t,n,0);exit(i,!0)}catch(a){if(a instanceof ExitStatus)return;if("SimulateInfiniteLoop"==a)return void(Module.noExitRuntime=!0);throw a&&"object"==typeof a&&a.stack&&Module.printErr("exception thrown: "+[a,a.stack]),a}finally{calledMain=!0}},Module.run=Module.run=run,Module.exit=Module.exit=exit;var abortDecorators=[];if(Module.abort=Module.abort=abort,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run();

Commits for Nextrek/s2s/data/lib/boot.js

Diff revisions: vs.
Revision Author Commited Message
1084 MOliva picture MOliva Fri 11 May, 2018 12:41:55 +0000