144 строки
82 KiB
JavaScript
144 строки
82 KiB
JavaScript
function f(a){throw a;}var i=void 0,l=!0,m=null,n=!1;function p(){return function(){}}var r;r||(r=eval("(function() { try { return Module || {} } catch(e) { return {} } })()"));var aa={},t;for(t in r)r.hasOwnProperty(t)&&(aa[t]=r[t]);var u="object"===typeof process&&"function"===typeof require,ba="object"===typeof window,ca="function"===typeof importScripts,da=!ba&&!u&&!ca;
|
|
if(u){r.print||(r.print=function(a){process.stdout.write(a+"\n")});r.printErr||(r.printErr=function(a){process.stderr.write(a+"\n")});var ea=require("fs"),fa=require("path");r.read=function(a,b){var a=fa.normalize(a),c=ea.readFileSync(a);!c&&a!=fa.resolve(a)&&(a=path.join(__dirname,"..","src",a),c=ea.readFileSync(a));c&&!b&&(c=c.toString());return c};r.readBinary=function(a){return r.read(a,l)};r.load=function(a){ga(read(a))};r.arguments=process.argv.slice(2);module.exports=r}else da?(r.print||(r.print=
|
|
print),"undefined"!=typeof printErr&&(r.printErr=printErr),r.read="undefined"!=typeof read?read:function(){f("no read() available (jsc?)")},r.readBinary=function(a){return read(a,"binary")},"undefined"!=typeof scriptArgs?r.arguments=scriptArgs:"undefined"!=typeof arguments&&(r.arguments=arguments),this.Module=r,eval("if (typeof gc === 'function' && gc.toString().indexOf('[native code]') > 0) var gc = undefined")):ba||ca?(r.read=function(a){var b=new XMLHttpRequest;b.open("GET",a,n);b.send(m);return b.responseText},
|
|
"undefined"!=typeof arguments&&(r.arguments=arguments),"undefined"!==typeof console?(r.print||(r.print=function(a){console.log(a)}),r.printErr||(r.printErr=function(a){console.log(a)})):r.print||(r.print=p()),ba?window.Module=r:r.load=importScripts):f("Unknown runtime environment. Where are we?");function ga(a){eval.call(m,a)}"undefined"==!r.load&&r.read&&(r.load=function(a){ga(r.read(a))});r.print||(r.print=p());r.printErr||(r.printErr=r.print);r.arguments||(r.arguments=[]);r.print=r.print;r.S=r.printErr;
|
|
r.preRun=[];r.postRun=[];for(t in aa)aa.hasOwnProperty(t)&&(r[t]=aa[t]);
|
|
var y={vc:function(a){ha=a},bc:function(){return ha},Wa:function(){return v},Va:function(a){v=a},He:function(a,b){b=b||4;return 1==b?a:isNumber(a)&&isNumber(b)?Math.ceil(a/b)*b:isNumber(b)&&isPowerOfTwo(b)?"((("+a+")+"+(b-1)+")&"+-b+")":"Math.ceil(("+a+")/"+b+")*"+b},ic:function(a){return a in y.Pb||a in y.Nb},jc:function(a){return"*"==a[a.length-1]},kc:function(a){return isPointerType(a)?n:isArrayType(a)||/<?\{ ?[^}]* ?\}>?/.test(a)?l:"%"==a[0]},Pb:{i1:0,i8:0,i16:0,i32:0,i64:0},Nb:{"float":0,"double":0},
|
|
Ye:function(a,b){return(a|0|b|0)+4294967296*(Math.round(a/4294967296)|Math.round(b/4294967296))},ze:function(a,b){return((a|0)&(b|0))+4294967296*(Math.round(a/4294967296)&Math.round(b/4294967296))},df:function(a,b){return((a|0)^(b|0))+4294967296*(Math.round(a/4294967296)^Math.round(b/4294967296))},La:function(a){switch(a){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:return"*"===a[a.length-1]?y.P:"i"===
|
|
a[0]?(a=parseInt(a.substr(1)),C(0===a%8),a/8):0}},ob:function(a){return Math.max(y.La(a),y.P)},Yb:function(a,b){var c={};return b?a.filter(function(a){return c[a[b]]?n:c[a[b]]=l}):a.filter(function(a){return c[a]?n:c[a]=l})},set:function(){for(var a="object"===typeof arguments[0]?arguments[0]:arguments,b={},c=0;c<a.length;c++)b[a[c]]=0;return b},pe:8,Ka:function(a,b,c){return!c&&("i64"==a||"double"==a)?8:!a?Math.min(b,8):Math.min(b||(a?y.ob(a):0),y.P)},Ub:function(a){a.D=0;a.U=0;var b=[],c=-1,d=0;
|
|
a.mb=a.Ha.map(function(e){d++;var g,h;y.ic(e)||y.jc(e)?(g=y.La(e),h=y.Ka(e,g)):y.kc(e)?"0"===e[1]?(g=0,h=Types.types[e]?y.Ka(m,Types.types[e].U):a.U||QUANTUM_SIZE):(g=Types.types[e].D,h=y.Ka(m,Types.types[e].U)):"b"==e[0]?(g=e.substr(1)|0,h=1):"<"===e[0]?g=h=Types.types[e].D:"i"===e[0]?(g=h=parseInt(e.substr(1))/8,C(0===g%1,"cannot handle non-byte-size field "+e)):C(n,"invalid type for calculateStructAlignment");a.Ze&&(h=1);a.U=Math.max(a.U,h);e=y.T(a.D,h);a.D=e+g;0<=c&&b.push(e-c);return c=e});a.ub&&
|
|
"["===a.ub[0]&&(a.D=parseInt(a.ub.substr(1))*a.D/2);a.D=y.T(a.D,a.U);0==b.length?a.lb=a.D:1==y.Yb(b).length&&(a.lb=b[0]);a.Ue=1!=a.lb;return a.mb},$b:function(a,b,c){var d,e;if(b){c=c||0;d=("undefined"===typeof Types?y.cf:Types.types)[b];if(!d)return m;if(d.Ha.length!=a.length)return printErr("Number of named fields must match the type for "+b+": possibly duplicate struct names. Cannot return structInfo"),m;e=d.mb}else d={Ha:a.map(function(a){return a[0]})},e=y.Ub(d);var g={re:d.D};b?a.forEach(function(a,
|
|
b){if("string"===typeof a)g[a]=e[b]+c;else{var j,x;for(x in a)j=x;g[j]=y.$b(a[j],d.Ha[b],e[b])}}):a.forEach(function(a,b){g[a[1]]=e[b]});return g},Fa:function(a,b,c){return c&&c.length?(c.splice||(c=Array.prototype.slice.call(c)),c.splice(0,0,b),r["dynCall_"+a].apply(m,c)):r["dynCall_"+a].call(m,b)},na:[],se:function(a){for(var b=0;b<y.na.length;b++)if(!y.na[b])return y.na[b]=a,2*(1+b);f("Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.")},af:function(a){y.na[(a-
|
|
2)/2]=m},Ie:function(a,b){y.Ea||(y.Ea={});var c=y.Ea[a];if(c)return c;for(var c=[],d=0;d<b;d++)c.push(String.fromCharCode(36)+d);d=ia(a);'"'===d[0]&&(d.indexOf('"',1)===d.length-1?d=d.substr(1,d.length-2):D("invalid EM_ASM input |"+d+"|. Please use EM_ASM(..code..) (no quotes) or EM_ASM({ ..code($0).. }, input) (to input values)"));try{var e=eval("(function("+c.join(",")+"){ "+d+" })")}catch(g){r.S("error in executing inline EM_ASM code: "+g+" on: \n\n"+d+"\n\nwith args |"+c+"| (make sure to use the right one out of EM_ASM, EM_ASM_ARGS, etc.)"),
|
|
f(g)}return y.Ea[a]=e},ea:function(a){y.ea.Ta||(y.ea.Ta={});y.ea.Ta[a]||(y.ea.Ta[a]=1,r.S(a))},Ja:{},Ke:function(a,b){C(b);y.Ja[a]||(y.Ja[a]=function(){return y.Fa(b,a,arguments)});return y.Ja[a]},Ca:function(){var a=[],b=0;this.Pa=function(c){c&=255;if(0==a.length){if(0==(c&128))return String.fromCharCode(c);a.push(c);b=192==(c&224)?1:224==(c&240)?2:3;return""}if(b&&(a.push(c),b--,0<b))return"";var c=a[0],d=a[1],e=a[2],g=a[3];2==a.length?c=String.fromCharCode((c&31)<<6|d&63):3==a.length?c=String.fromCharCode((c&
|
|
15)<<12|(d&63)<<6|e&63):(c=(c&7)<<18|(d&63)<<12|(e&63)<<6|g&63,c=String.fromCharCode(Math.floor((c-65536)/1024)+55296,(c-65536)%1024+56320));a.length=0;return c};this.qc=function(a){for(var a=unescape(encodeURIComponent(a)),b=[],e=0;e<a.length;e++)b.push(a.charCodeAt(e));return b}},Je:function(){f("You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work")},Ua:function(a){var b=v;v=v+a|0;v=v+7&-8;return b},Ab:function(a){var b=F;F=
|
|
F+a|0;F=F+7&-8;return b},ba:function(a){var b=H;H=H+a|0;H=H+7&-8;H>=ja&&D("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+ja+", (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.");return b},T:function(a,b){return Math.ceil(a/(b?b:8))*(b?b:8)},mc:function(a,b,c){return c?+(a>>>0)+4294967296*+(b>>>0):+(a>>>0)+4294967296*+(b|0)},
|
|
Ob:8,P:4,qe:0};r.Runtime=y;var ka=n,la,ma,ha;function C(a,b){a||D("Assertion failed: "+b)}r.ccall=function(a,b,c,d){return na(oa(a),b,c,d)};function oa(a){try{var b=r["_"+a];b||(b=eval("_"+a))}catch(c){}C(b,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)");return b}
|
|
function na(a,b,c,d){function e(a,b){if("string"==b){if(a===m||a===i||0===a)return 0;a=J(a);b="array"}if("array"==b){g||(g=y.Wa());var c=y.Ua(a.length);pa(a,c);return c}return a}var g=0,h=0,d=d?d.map(function(a){return e(a,c[h++])}):[];a=a.apply(m,d);"string"==b?b=ia(a):(C("array"!=b),b=a);g&&y.Va(g);return b}r.cwrap=function(a,b,c){var d=oa(a);return function(){return na(d,b,c,Array.prototype.slice.call(arguments))}};
|
|
function qa(a,b,c){c=c||"i8";"*"===c.charAt(c.length-1)&&(c="i32");switch(c){case "i1":K[a>>0]=b;break;case "i8":K[a>>0]=b;break;case "i16":ra[a>>1]=b;break;case "i32":L[a>>2]=b;break;case "i64":ma=[b>>>0,(la=b,1<=+sa(la)?0<la?(ta(+ua(la/4294967296),4294967295)|0)>>>0:~~+va((la-+(~~la>>>0))/4294967296)>>>0:0)];L[a>>2]=ma[0];L[a+4>>2]=ma[1];break;case "float":wa[a>>2]=b;break;case "double":xa[a>>3]=b;break;default:D("invalid type for setValue: "+c)}}r.setValue=qa;
|
|
r.getValue=function(a,b){b=b||"i8";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":return K[a>>0];case "i8":return K[a>>0];case "i16":return ra[a>>1];case "i32":return L[a>>2];case "i64":return L[a>>2];case "float":return wa[a>>2];case "double":return xa[a>>3];default:D("invalid type for setValue: "+b)}return m};var ya=1,M=2,za=4;r.ALLOC_NORMAL=0;r.ALLOC_STACK=ya;r.ALLOC_STATIC=M;r.ALLOC_DYNAMIC=3;r.ALLOC_NONE=za;
|
|
function N(a,b,c,d){var e,g;"number"===typeof a?(e=l,g=a):(e=n,g=a.length);var h="string"===typeof b?b:m,c=c==za?d:[Aa,y.Ua,y.Ab,y.ba][c===i?M:c](Math.max(g,h?1:b.length));if(e){d=c;C(0==(c&3));for(a=c+(g&-4);d<a;d+=4)L[d>>2]=0;for(a=c+g;d<a;)K[d++>>0]=0;return c}if("i8"===h)return a.subarray||a.slice?O.set(a,c):O.set(new Uint8Array(a),c),c;for(var d=0,k,j;d<g;){var x=a[d];"function"===typeof x&&(x=y.Le(x));e=h||b[d];0===e?d++:("i64"==e&&(e="i32"),qa(c+d,x,e),j!==e&&(k=y.La(e),j=e),d+=k)}return c}
|
|
r.allocate=N;function ia(a,b){for(var c=n,d,e=0;;){d=O[a+e>>0];if(128<=d)c=l;else if(0==d&&!b)break;e++;if(b&&e==b)break}b||(b=e);var g="";if(!c){for(;0<b;)d=String.fromCharCode.apply(String,O.subarray(a,a+Math.min(b,1024))),g=g?g+d:d,a+=1024,b-=1024;return g}c=new y.Ca;for(e=0;e<b;e++)d=O[a+e>>0],g+=c.Pa(d);return g}r.Pointer_stringify=ia;r.UTF16ToString=function(a){for(var b=0,c="";;){var d=ra[a+2*b>>1];if(0==d)return c;++b;c+=String.fromCharCode(d)}};
|
|
r.stringToUTF16=function(a,b){for(var c=0;c<a.length;++c)ra[b+2*c>>1]=a.charCodeAt(c);ra[b+2*a.length>>1]=0};r.UTF32ToString=function(a){for(var b=0,c="";;){var d=L[a+4*b>>2];if(0==d)return c;++b;65536<=d?(d-=65536,c+=String.fromCharCode(55296|d>>10,56320|d&1023)):c+=String.fromCharCode(d)}};r.stringToUTF32=function(a,b){for(var c=0,d=0;d<a.length;++d){var e=a.charCodeAt(d);if(55296<=e&&57343>=e)var g=a.charCodeAt(++d),e=65536+((e&1023)<<10)|g&1023;L[b+4*c>>2]=e;++c}L[b+4*c>>2]=0};
|
|
function Ba(a){function b(h,j,x){var j=j||Infinity,E="",q=[],w;if("N"===a[c]){c++;"K"===a[c]&&c++;for(w=[];"E"!==a[c];)if("S"===a[c]){c++;var A=a.indexOf("_",c);w.push(e[a.substring(c,A)||0]||"?");c=A+1}else if("C"===a[c])w.push(w[w.length-1]),c+=2;else{var A=parseInt(a.substr(c)),G=A.toString().length;if(!A||!G){c--;break}var I=a.substr(c+G,A);w.push(I);e.push(I);c+=G+A}c++;w=w.join("::");j--;if(0===j)return h?[w]:w}else if(("K"===a[c]||g&&"L"===a[c])&&c++,A=parseInt(a.substr(c)))G=A.toString().length,
|
|
w=a.substr(c+G,A),c+=G+A;g=n;"I"===a[c]?(c++,A=b(l),G=b(l,1,l),E+=G[0]+" "+w+"<"+A.join(", ")+">"):E=w;a:for(;c<a.length&&0<j--;)if(w=a[c++],w in d)q.push(d[w]);else switch(w){case "P":q.push(b(l,1,l)[0]+"*");break;case "R":q.push(b(l,1,l)[0]+"&");break;case "L":c++;A=a.indexOf("E",c)-c;q.push(a.substr(c,A));c+=A+2;break;case "A":A=parseInt(a.substr(c));c+=A.toString().length;"_"!==a[c]&&f("?");c++;q.push(b(l,1,l)[0]+" ["+A+"]");break;case "E":break a;default:E+="?"+w;break a}!x&&(1===q.length&&"void"===
|
|
q[0])&&(q=[]);return h?(E&&q.push(E+"?"),q):E+("("+q.join(", ")+")")}var c=3,d={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:"..."},e=[],g=l;try{if("Object._main"==a||"_main"==a)return"main()";"number"===typeof a&&(a=ia(a));if("_"!==a[0]||"_"!==a[1]||"Z"!==a[2])return a;switch(a[3]){case "n":return"operator new()";case "d":return"operator delete()"}return b()}catch(h){return a}}
|
|
function Ca(){var a=Error().stack;return a?a.replace(/__Z[\w\d_]+/g,function(a){var c=Ba(a);return a===c?a:a+" ["+c+"]"}):"(no stack trace available)"}for(var K,O,ra,Da,L,Ea,wa,xa,Fa=0,F=0,Ga=0,v=0,Ha=0,Ia=0,H=0,Ja=r.TOTAL_STACK||5242880,ja=r.TOTAL_MEMORY||134217728,P=4096;P<ja||P<2*Ja;)P=16777216>P?2*P:P+16777216;P!==ja&&(r.S("increasing TOTAL_MEMORY to "+P+" to be more reasonable"),ja=P);
|
|
C("undefined"!==typeof Int32Array&&"undefined"!==typeof Float64Array&&!!(new Int32Array(1)).subarray&&!!(new Int32Array(1)).set,"JS engine does not provide full typed array support");var Q=new ArrayBuffer(ja);K=new Int8Array(Q);ra=new Int16Array(Q);L=new Int32Array(Q);O=new Uint8Array(Q);Da=new Uint16Array(Q);Ea=new Uint32Array(Q);wa=new Float32Array(Q);xa=new Float64Array(Q);L[0]=255;C(255===O[0]&&0===O[3],"Typed arrays 2 must be run on a little-endian system");r.HEAP=i;r.HEAP8=K;r.HEAP16=ra;
|
|
r.HEAP32=L;r.HEAPU8=O;r.HEAPU16=Da;r.HEAPU32=Ea;r.HEAPF32=wa;r.HEAPF64=xa;function Ka(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b();else{var c=b.V;"number"===typeof c?b.Da===i?y.Fa("v",c):y.Fa("vi",c,[b.Da]):c(b.Da===i?m:b.Da)}}}var La=[],Ma=[],Na=[],Oa=[],Pa=[],Qa=n;function Ra(a){La.unshift(a)}r.addOnPreRun=r.xe=Ra;r.addOnInit=r.ue=function(a){Ma.unshift(a)};r.addOnPreMain=r.we=function(a){Na.unshift(a)};r.addOnExit=r.te=function(a){Oa.unshift(a)};
|
|
function Sa(a){Pa.unshift(a)}r.addOnPostRun=r.ve=Sa;function J(a,b,c){a=(new y.Ca).qc(a);c&&(a.length=c);b||a.push(0);return a}r.intArrayFromString=J;r.intArrayToString=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];255<d&&(d&=255);b.push(String.fromCharCode(d))}return b.join("")};r.writeStringToMemory=function(a,b,c){a=J(a,c);for(c=0;c<a.length;)K[b+c>>0]=a[c],c+=1};function pa(a,b){for(var c=0;c<a.length;c++)K[b+c>>0]=a[c]}r.writeArrayToMemory=pa;
|
|
r.writeAsciiToMemory=function(a,b,c){for(var d=0;d<a.length;d++)K[b+d>>0]=a.charCodeAt(d);c||(K[b+a.length>>0]=0)};function Ta(a,b){return 0<=a?a:32>=b?2*Math.abs(1<<b-1)+a:Math.pow(2,b)+a}function Ua(a,b){if(0>=a)return a;var c=32>=b?Math.abs(1<<b-1):Math.pow(2,b-1);if(a>=c&&(32>=b||a>c))a=-2*c+a;return a}if(!Math.imul||-5!==Math.imul(4294967295,5))Math.imul=function(a,b){var c=a&65535,d=b&65535;return c*d+((a>>>16)*d+c*(b>>>16)<<16)|0};Math.Oe=Math.imul;
|
|
var sa=Math.abs,va=Math.ceil,ua=Math.floor,ta=Math.min,R=0,Va=m,Wa=m;function Xa(){R++;r.monitorRunDependencies&&r.monitorRunDependencies(R)}r.addRunDependency=Xa;function Ya(){R--;r.monitorRunDependencies&&r.monitorRunDependencies(R);if(0==R&&(Va!==m&&(clearInterval(Va),Va=m),Wa)){var a=Wa;Wa=m;a()}}r.removeRunDependency=Ya;r.preloadedImages={};r.preloadedAudios={};Fa=8;F=Fa+y.T(611);Ma.push();
|
|
N([101,114,114,111,114,58,32,37,100,92,110,0,0,0,0,0,98,108,97,104,61,37,102,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,2,0,0,1,0,0,0,2,0,0,0,1,0,0,0,0,0,0,0,115,116,100,58,58,98,97,100,95,97,108,108,111,99,0,0,83,116,57,98,97,100,95,97,108,108,111,99,0,0,0,0,8,0,0,0,72,2,0,0,0,0,0,0,0,0,0,0],"i8",za,y.Ob);var Za=y.T(N(12,"i8",M),8);C(0==Za%8);
|
|
var S={aa:1,ha:2,ce:3,ad:4,O:5,bb:6,yc:7,yd:8,ga:9,Lc:10,$:11,me:11,Lb:12,Eb:13,Wc:14,Kd:15,Ya:16,Za:17,ne:18,$a:19,Mb:20,ya:21,u:22,td:23,Kb:24,Od:25,je:26,Xc:27,Gd:28,Ba:29,$d:30,md:31,Td:32,Tc:33,Xd:34,Cd:42,Zc:43,Mc:44,cd:45,dd:46,ed:47,ld:48,ke:49,wd:50,bd:51,Rc:35,zd:37,Dc:52,Gc:53,oe:54,ud:55,Hc:56,Ic:57,Sc:35,Jc:59,Id:60,xd:61,ge:62,Hd:63,Dd:64,Ed:65,Zd:66,Ad:67,Bc:68,de:69,Nc:70,Ud:71,od:72,Uc:73,Fc:74,Pd:76,Ec:77,Yd:78,fd:79,gd:80,kd:81,jd:82,hd:83,Jd:38,ab:39,pd:36,za:40,Aa:95,Sd:96,Qc:104,
|
|
vd:105,Cc:97,Wd:91,Md:88,Fd:92,ae:108,Pc:111,zc:98,Oc:103,sd:101,qd:100,he:110,Yc:112,Hb:113,Ib:115,Fb:114,Gb:89,nd:90,Vd:93,be:94,Ac:99,rd:102,Jb:106,ia:107,ie:109,le:87,Vc:122,ee:116,Nd:95,Bd:123,$c:84,Qd:75,Kc:125,Ld:131,Rd:130,fe:86},$a={"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"},ab=0;function bb(a){return L[ab>>2]=a}
|
|
function cb(a,b){for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}function T(a){var b="/"===a.charAt(0),c="/"===a.substr(-1),a=cb(a.split("/").filter(function(a){return!!a}),!b).join("/");!a&&!b&&(a=".");a&&c&&(a+="/");return(b?"/":"")+a}function db(a){if("/"===a)return"/";var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)}
|
|
function eb(){for(var a="",b=n,c=arguments.length-1;-1<=c&&!b;c--){var d=0<=c?arguments[c]:"/";"string"!==typeof d&&f(new TypeError("Arguments to path.resolve must be strings"));d&&(a=d+"/"+a,b="/"===d.charAt(0))}a=cb(a.split("/").filter(function(a){return!!a}),!b).join("/");return(b?"/":"")+a||"."}var fb=[];function gb(a,b){fb[a]={input:[],R:[],ca:b};hb[a]={k:ib}}
|
|
var ib={open:function(a){var b=fb[a.e.ta];b||f(new U(S.$a));a.C=b;a.seekable=n},close:function(a){a.C.R.length&&a.C.ca.sa(a.C,10)},N:function(a,b,c,d){(!a.C||!a.C.ca.qb)&&f(new U(S.bb));for(var e=0,g=0;g<d;g++){var h;try{h=a.C.ca.qb(a.C)}catch(k){f(new U(S.O))}h===i&&0===e&&f(new U(S.$));if(h===m||h===i)break;e++;b[c+g]=h}e&&(a.e.timestamp=Date.now());return e},write:function(a,b,c,d){(!a.C||!a.C.ca.sa)&&f(new U(S.bb));for(var e=0;e<d;e++)try{a.C.ca.sa(a.C,b[c+e])}catch(g){f(new U(S.O))}d&&(a.e.timestamp=
|
|
Date.now());return e}},V={F:m,Db:1,wa:2,Xa:3,M:function(){return V.createNode(m,"/",16895,0)},createNode:function(a,b,c,d){(24576===(c&61440)||4096===(c&61440))&&f(new U(S.aa));V.F||(V.F={dir:{e:{L:V.n.L,A:V.n.A,Na:V.n.Na,pa:V.n.pa,rename:V.n.rename,Cb:V.n.Cb,zb:V.n.zb,xb:V.n.xb,va:V.n.va},G:{Q:V.k.Q}},file:{e:{L:V.n.L,A:V.n.A},G:{Q:V.k.Q,N:V.k.N,write:V.k.write,eb:V.k.eb,tb:V.k.tb}},link:{e:{L:V.n.L,A:V.n.A,ua:V.n.ua},G:{}},hb:{e:{L:V.n.L,A:V.n.A},G:jb}});c=kb(a,b,c,d);16384===(c.mode&61440)?(c.n=
|
|
V.F.dir.e,c.k=V.F.dir.G,c.o={}):32768===(c.mode&61440)?(c.n=V.F.file.e,c.k=V.F.file.G,c.o=[],c.ka=V.wa):40960===(c.mode&61440)?(c.n=V.F.link.e,c.k=V.F.link.G):8192===(c.mode&61440)&&(c.n=V.F.hb.e,c.k=V.F.hb.G);c.timestamp=Date.now();a&&(a.o[b]=c);return c},Ga:function(a){a.ka!==V.wa&&(a.o=Array.prototype.slice.call(a.o),a.ka=V.wa)},n:{L:function(a){var b={};b.Fe=8192===(a.mode&61440)?a.id:1;b.Pe=a.id;b.mode=a.mode;b.Ve=1;b.uid=0;b.Ne=0;b.ta=a.ta;b.size=16384===(a.mode&61440)?4096:32768===(a.mode&
|
|
61440)?a.o.length:40960===(a.mode&61440)?a.link.length:0;b.Ae=new Date(a.timestamp);b.Te=new Date(a.timestamp);b.Ee=new Date(a.timestamp);b.Tb=4096;b.Be=Math.ceil(b.size/b.Tb);return b},A:function(a,b){b.mode!==i&&(a.mode=b.mode);b.timestamp!==i&&(a.timestamp=b.timestamp);if(b.size!==i){V.Ga(a);var c=a.o;if(b.size<c.length)c.length=b.size;else for(;b.size>c.length;)c.push(0)}},Na:function(){f(lb[S.ha])},pa:function(a,b,c,d){return V.createNode(a,b,c,d)},rename:function(a,b,c){if(16384===(a.mode&61440)){var d;
|
|
try{d=mb(b,c)}catch(e){}if(d)for(var g in d.o)f(new U(S.ab))}delete a.parent.o[a.name];a.name=c;b.o[c]=a;a.parent=b},Cb:function(a,b){delete a.o[b]},zb:function(a,b){var c=mb(a,b),d;for(d in c.o)f(new U(S.ab));delete a.o[b]},xb:function(a){var b=[".",".."],c;for(c in a.o)a.o.hasOwnProperty(c)&&b.push(c);return b},va:function(a,b,c){a=V.createNode(a,b,41471,0);a.link=c;return a},ua:function(a){40960!==(a.mode&61440)&&f(new U(S.u));return a.link}},k:{N:function(a,b,c,d,e){a=a.e.o;if(e>=a.length)return 0;
|
|
d=Math.min(a.length-e,d);C(0<=d);if(8<d&&a.subarray)b.set(a.subarray(e,e+d),c);else for(var g=0;g<d;g++)b[c+g]=a[e+g];return d},write:function(a,b,c,d,e,g){var h=a.e;h.timestamp=Date.now();a=h.o;if(d&&0===a.length&&0===e&&b.subarray)return g&&0===c?(h.o=b,h.ka=b.buffer===K.buffer?V.Db:V.Xa):(h.o=new Uint8Array(b.subarray(c,c+d)),h.ka=V.Xa),d;V.Ga(h);for(a=h.o;a.length<e;)a.push(0);for(g=0;g<d;g++)a[e+g]=b[c+g];return d},Q:function(a,b,c){1===c?b+=a.position:2===c&&32768===(a.e.mode&61440)&&(b+=a.e.o.length);
|
|
0>b&&f(new U(S.u));a.wc=[];return a.position=b},eb:function(a,b,c){V.Ga(a.e);a=a.e.o;for(b+=c;b>a.length;)a.push(0)},tb:function(a,b,c,d,e,g,h){32768!==(a.e.mode&61440)&&f(new U(S.$a));a=a.e.o;if(!(h&2)&&(a.buffer===b||a.buffer===b.buffer))e=n,d=a.byteOffset;else{if(0<e||e+d<a.length)a=a.subarray?a.subarray(e,e+d):Array.prototype.slice.call(a,e,e+d);e=l;(d=Aa(d))||f(new U(S.Lb));b.set(a,d)}return{$e:d,ye:e}}}},nb=N(1,"i32*",M),ob=N(1,"i32*",M),qb=N(1,"i32*",M),rb=m,hb=[m],W=[],sb=1,tb=m,ub=l,vb={},
|
|
U=m,lb={};function wb(a){a instanceof U||f(a+" : "+Ca());bb(a.jb)}
|
|
function X(a,b){var a=eb("/",a),b=b||{},c={nb:l,Qa:0},d;for(d in c)b[d]===i&&(b[d]=c[d]);8<b.Qa&&f(new U(S.za));var c=cb(a.split("/").filter(function(a){return!!a}),n),e=rb,g="/";for(d=0;d<c.length;d++){var h=d===c.length-1;if(h&&b.parent)break;e=mb(e,c[d]);g=T(g+"/"+c[d]);if(e.qa&&(!h||h&&b.nb))e=e.qa.root;if(!h||b.Ia)for(h=0;40960===(e.mode&61440);){e=X(g).e;e.n.ua||f(new U(S.u));var e=e.n.ua(e),k=eb;var j=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(g).slice(1),g=j[0],j=
|
|
j[1];!g&&!j?g=".":(j&&(j=j.substr(0,j.length-1)),g+=j);g=k(g,e);e=X(g,{Qa:b.Qa}).e;40<h++&&f(new U(S.za))}}return{path:g,e:e}}function xb(a){for(var b;;){if(a===a.parent)return a=a.M.nc,!b?a:"/"!==a[a.length-1]?a+"/"+b:a+b;b=b?a.name+"/"+b:a.name;a=a.parent}}function yb(a,b){for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%tb.length}
|
|
function mb(a,b){var c=zb(a,"x");c&&f(new U(c));for(c=tb[yb(a.id,b)];c;c=c.pc){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.n.Na(a,b)}
|
|
function kb(a,b,c,d){Ab||(Ab=function(a,b,c,d){a||(a=this);this.parent=a;this.M=a.M;this.qa=m;this.id=sb++;this.name=b;this.mode=c;this.n={};this.k={};this.ta=d},Ab.prototype={},Object.defineProperties(Ab.prototype,{N:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}},hc:{get:function(){return 16384===(this.mode&61440)}},gc:{get:function(){return 8192===
|
|
(this.mode&61440)}}}));a=new Ab(a,b,c,d);b=yb(a.parent.id,a.name);a.pc=tb[b];return tb[b]=a}var Bb={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};function Cb(a){var b=Bb[a];"undefined"===typeof b&&f(Error("Unknown file open mode: "+a));return b}function zb(a,b){return ub?0:-1!==b.indexOf("r")&&!(a.mode&292)||-1!==b.indexOf("w")&&!(a.mode&146)||-1!==b.indexOf("x")&&!(a.mode&73)?S.Eb:0}
|
|
function Db(a,b){try{return mb(a,b),S.Za}catch(c){}return zb(a,"wx")}function Eb(a,b,c){Fb||(Fb=p(),Fb.prototype={},Object.defineProperties(Fb.prototype,{object:{get:function(){return this.e},set:function(a){this.e=a}},Re:{get:function(){return 1!==(this.K&2097155)}},Se:{get:function(){return 0!==(this.K&2097155)}},Qe:{get:function(){return this.K&1024}}}));var d=new Fb,e;for(e in a)d[e]=a[e];var a=d,g;a:{b=b||0;for(c=c||4096;b<=c;b++)if(!W[b]){g=b;break a}f(new U(S.Kb))}a.B=g;return W[g]=a}
|
|
var jb={open:function(a){a.k=hb[a.e.ta].k;a.k.open&&a.k.open(a)},Q:function(){f(new U(S.Ba))}};function Gb(a,b){var c="/"===b,d=!b,e;c&&rb&&f(new U(S.Ya));!c&&!d&&(e=X(b,{nb:n}),b=e.path,e=e.e,e.qa&&f(new U(S.Ya)),16384!==(e.mode&61440)&&f(new U(S.Mb)));var d={type:a,Xe:{},nc:b,oc:[]},g=a.M(d);g.M=d;d.root=g;c?rb=g:e&&(e.qa=d,e.M&&e.M.oc.push(d));return g}function Hb(a,b,c){var d=X(a,{parent:l}).e,a=db(a),e=Db(d,a);e&&f(new U(e));d.n.pa||f(new U(S.aa));return d.n.pa(d,a,b,c)}
|
|
function Ib(a,b){b=(b!==i?b:438)&4095;b|=32768;return Hb(a,b,0)}function Jb(a,b){b=(b!==i?b:511)&1023;b|=16384;return Hb(a,b,0)}function Kb(a,b,c){"undefined"===typeof c&&(c=b,b=438);return Hb(a,b|8192,c)}function Lb(a,b){var c=X(b,{parent:l}).e,d=db(b),e=Db(c,d);e&&f(new U(e));c.n.va||f(new U(S.aa));return c.n.va(c,d,a)}function Mb(a,b){var c;c="string"===typeof a?X(a,{Ia:l}).e:a;c.n.A||f(new U(S.aa));c.n.A(c,{mode:b&4095|c.mode&-4096,timestamp:Date.now()})}
|
|
function Nb(a,b){var c,b="string"===typeof b?Cb(b):b;c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;var d;if("object"===typeof a)d=a;else{a=T(a);try{d=X(a,{Ia:!(b&131072)}).e}catch(e){}}b&64&&(d?b&128&&f(new U(S.Za)):d=Hb(a,c,0));d||f(new U(S.ha));8192===(d.mode&61440)&&(b&=-513);d?40960===(d.mode&61440)?c=S.za:16384===(d.mode&61440)&&(0!==(b&2097155)||b&512)?c=S.ya:(c=["r","w","rw"][b&2097155],b&512&&(c+="w"),c=zb(d,c)):c=S.ha;c&&f(new U(c));if(b&512){c=d;c="string"===typeof c?X(c,{Ia:l}).e:
|
|
c;c.n.A||f(new U(S.aa));16384===(c.mode&61440)&&f(new U(S.ya));32768!==(c.mode&61440)&&f(new U(S.u));var g=zb(c,"w");g&&f(new U(g));c.n.A(c,{size:0,timestamp:Date.now()})}b&=-641;d=Eb({e:d,path:xb(d),K:b,seekable:l,position:0,k:d.k,wc:[],error:n},i,i);d.k.open&&d.k.open(d);r.logReadFiles&&!(b&1)&&(Ob||(Ob={}),a in Ob||(Ob[a]=1,r.printErr("read file: "+a)));try{vb.onOpenFile&&(c=0,1!==(b&2097155)&&(c|=1),0!==(b&2097155)&&(c|=2),vb.onOpenFile(a,c))}catch(h){console.log("FS.trackingDelegate['onOpenFile']('"+
|
|
a+"', flags) threw an exception: "+h.message)}return d}function Pb(a){try{a.k.close&&a.k.close(a)}catch(b){f(b)}finally{W[a.B]=m}}
|
|
function Qb(a,b,c,d,e,g){(0>d||0>e)&&f(new U(S.u));0===(a.K&2097155)&&f(new U(S.ga));16384===(a.e.mode&61440)&&f(new U(S.ya));a.k.write||f(new U(S.u));var h=l;"undefined"===typeof e?(e=a.position,h=n):a.seekable||f(new U(S.Ba));a.K&1024&&((!a.seekable||!a.k.Q)&&f(new U(S.Ba)),a.k.Q(a,0,2));b=a.k.write(a,b,c,d,e,g);h||(a.position+=b);try{if(a.path&&vb.onWriteToFile)vb.onWriteToFile(a.path)}catch(k){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+k.message)}return b}
|
|
function Rb(){U||(U=function(a){this.jb=a;for(var b in S)if(S[b]===a){this.code=b;break}this.message=$a[a]},U.prototype=Error(),[S.ha].forEach(function(a){lb[a]=new U(a);lb[a].stack="<generic error, no stack>"}))}var Sb;function Tb(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c}
|
|
function Ub(a,b,c,d,e,g){a=b?T(("string"===typeof a?a:xb(a))+"/"+b):a;d=Tb(d,e);e=Ib(a,d);if(c){if("string"===typeof c){for(var a=Array(c.length),b=0,h=c.length;b<h;++b)a[b]=c.charCodeAt(b);c=a}Mb(e,d|146);a=Nb(e,"w");Qb(a,c,0,c.length,0,g);Pb(a);Mb(e,d)}return e}
|
|
function Vb(a,b,c,d){a=T(("string"===typeof a?a:xb(a))+"/"+b);b=Tb(!!c,!!d);Vb.sb||(Vb.sb=64);var e;e=Vb.sb++<<8|0;hb[e]={k:{open:function(a){a.seekable=n},close:function(){d&&(d.buffer&&d.buffer.length)&&d(10)},N:function(a,b,d,e){for(var x=0,E=0;E<e;E++){var q;try{q=c()}catch(w){f(new U(S.O))}q===i&&0===x&&f(new U(S.$));if(q===m||q===i)break;x++;b[d+E]=q}x&&(a.e.timestamp=Date.now());return x},write:function(a,b,c,e){for(var x=0;x<e;x++)try{d(b[c+x])}catch(E){f(new U(S.O))}e&&(a.e.timestamp=Date.now());
|
|
return x}}};return Kb(a,b,e)}function Wb(a){if(a.gc||a.hc||a.link||a.o)return l;var b=l;"undefined"!==typeof XMLHttpRequest&&f(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(r.read)try{a.o=J(r.read(a.url),l)}catch(c){b=n}else f(Error("Cannot load without read() or XMLHttpRequest."));b||bb(S.O);return b}var Ab,Fb,Ob;function Xb(){f("TODO")}
|
|
var Y={M:function(){return kb(m,"/",16895,0)},Xb:function(a,b,c){c&&C(1==b==(6==c));a={Zb:a,type:b,protocol:c,p:m,da:{},Oa:[],W:[],Y:Y.q};b=Y.ra();c=kb(Y.root,b,49152,0);c.X=a;b=Eb({path:b,e:c,K:Cb("r+"),seekable:n,k:Y.k});a.G=b;return a},ac:function(a){a=W[a];return!a||49152!==(a.e.mode&49152)?m:a.e.X},k:{wb:function(a){a=a.e.X;return a.Y.wb(a)},rb:function(a,b,c){a=a.e.X;return a.Y.rb(a,b,c)},N:function(a,b,c,d){a=a.e.X;d=a.Y.rc(a,d);if(!d)return 0;b.set(d.buffer,c);return d.buffer.length},write:function(a,
|
|
b,c,d){a=a.e.X;return a.Y.tc(a,b,c,d)},close:function(a){a=a.e.X;a.Y.close(a)}},ra:function(){Y.ra.ib||(Y.ra.ib=0);return"socket["+Y.ra.ib++ +"]"},q:{la:function(a,b,c){var d;"object"===typeof b&&(d=b,c=b=m);if(d)d._socket?(b=d._socket.remoteAddress,c=d._socket.remotePort):((c=/ws[s]?:\/\/([^:]+):(\d+)/.exec(d.url))||f(Error("WebSocket URL must be in the format ws(s)://address:port")),b=c[1],c=parseInt(c[2],10));else try{var e=r.websocket&&"object"===typeof r.websocket,g="ws:#".replace("#","//");
|
|
e&&"string"===typeof r.websocket.url&&(g=r.websocket.url);if("ws://"===g||"wss://"===g)g=g+b+":"+c;var h="binary";e&&"string"===typeof r.websocket.subprotocol&&(h=r.websocket.subprotocol);var h=h.replace(/^ +| +$/g,"").split(/ *, */),k=u?{protocol:h.toString()}:h;d=new (u?require("ws"):window.WebSocket)(g,k);d.binaryType="arraybuffer"}catch(j){f(new U(S.Hb))}b={H:b,port:c,g:d,ma:[]};Y.q.cb(a,b);Y.q.dc(a,b);2===a.type&&"undefined"!==typeof a.Z&&b.ma.push(new Uint8Array([255,255,255,255,112,111,114,
|
|
116,(a.Z&65280)>>8,a.Z&255]));return b},oa:function(a,b,c){return a.da[b+":"+c]},cb:function(a,b){a.da[b.H+":"+b.port]=b},yb:function(a,b){delete a.da[b.H+":"+b.port]},dc:function(a,b){function c(){try{for(var a=b.ma.shift();a;)b.g.send(a),a=b.ma.shift()}catch(c){b.g.close()}}function d(c){C("string"!==typeof c&&c.byteLength!==i);var c=new Uint8Array(c),d=e;e=n;d&&10===c.length&&255===c[0]&&255===c[1]&&255===c[2]&&255===c[3]&&112===c[4]&&111===c[5]&&114===c[6]&&116===c[7]?(c=c[8]<<8|c[9],Y.q.yb(a,
|
|
b),b.port=c,Y.q.cb(a,b)):a.W.push({H:b.H,port:b.port,data:c})}var e=l;u?(b.g.on("open",c),b.g.on("message",function(a,b){b.binary&&d((new Uint8Array(a)).buffer)}),b.g.on("error",p())):(b.g.onopen=c,b.g.onmessage=function(a){d(a.data)})},wb:function(a){if(1===a.type&&a.p)return a.Oa.length?65:0;var b=0,c=1===a.type?Y.q.oa(a,a.I,a.J):m;if(a.W.length||!c||c&&c.g.readyState===c.g.fa||c&&c.g.readyState===c.g.CLOSED)b|=65;if(!c||c&&c.g.readyState===c.g.OPEN)b|=4;if(c&&c.g.readyState===c.g.fa||c&&c.g.readyState===
|
|
c.g.CLOSED)b|=16;return b},rb:function(a,b,c){switch(b){case 21531:return b=0,a.W.length&&(b=a.W[0].data.length),L[c>>2]=b,0;default:return S.u}},close:function(a){if(a.p){try{a.p.close()}catch(b){}a.p=m}for(var c=Object.keys(a.da),d=0;d<c.length;d++){var e=a.da[c[d]];try{e.g.close()}catch(g){}Y.q.yb(a,e)}return 0},bind:function(a,b,c){("undefined"!==typeof a.Sa||"undefined"!==typeof a.Z)&&f(new U(S.u));a.Sa=b;a.Z=c||Xb();if(2===a.type){a.p&&(a.p.close(),a.p=m);try{a.Y.lc(a,0)}catch(d){d instanceof
|
|
U||f(d),d.jb!==S.Aa&&f(d)}}},De:function(a,b,c){a.p&&f(new U(ERRNO_CODS.Aa));if("undefined"!==typeof a.I&&"undefined"!==typeof a.J){var d=Y.q.oa(a,a.I,a.J);d&&(d.g.readyState===d.g.CONNECTING&&f(new U(S.Fb)),f(new U(S.Jb)))}b=Y.q.la(a,b,c);a.I=b.H;a.J=b.port;f(new U(S.Ib))},lc:function(a){u||f(new U(S.Aa));a.p&&f(new U(S.u));var b=require("ws").Server;a.p=new b({host:a.Sa,port:a.Z});a.p.on("connection",function(b){if(1===a.type){var d=Y.Xb(a.Zb,a.type,a.protocol),b=Y.q.la(d,b);d.I=b.H;d.J=b.port;
|
|
a.Oa.push(d)}else Y.q.la(a,b)});a.p.on("closed",function(){a.p=m});a.p.on("error",p())},accept:function(a){a.p||f(new U(S.u));var b=a.Oa.shift();b.G.K=a.G.K;return b},Me:function(a,b){var c,d;b?((a.I===i||a.J===i)&&f(new U(S.ia)),c=a.I,d=a.J):(c=a.Sa||0,d=a.Z||0);return{H:c,port:d}},tc:function(a,b,c,d,e,g){if(2===a.type){if(e===i||g===i)e=a.I,g=a.J;(e===i||g===i)&&f(new U(S.Gb))}else e=a.I,g=a.J;var h=Y.q.oa(a,e,g);1===a.type&&((!h||h.g.readyState===h.g.fa||h.g.readyState===h.g.CLOSED)&&f(new U(S.ia)),
|
|
h.g.readyState===h.g.CONNECTING&&f(new U(S.$)));b=b instanceof Array||b instanceof ArrayBuffer?b.slice(c,c+d):b.buffer.slice(b.byteOffset+c,b.byteOffset+c+d);if(2===a.type&&(!h||h.g.readyState!==h.g.OPEN)){if(!h||h.g.readyState===h.g.fa||h.g.readyState===h.g.CLOSED)h=Y.q.la(a,e,g);h.ma.push(b);return d}try{return h.g.send(b),d}catch(k){f(new U(S.u))}},rc:function(a,b){1===a.type&&a.p&&f(new U(S.ia));var c=a.W.shift();if(!c){if(1===a.type){var d=Y.q.oa(a,a.I,a.J);if(d){if(d.g.readyState===d.g.fa||
|
|
d.g.readyState===d.g.CLOSED)return m;f(new U(S.$))}f(new U(S.ia))}f(new U(S.$))}var d=c.data.byteLength||c.data.length,e=c.data.byteOffset||0,g=c.data.buffer||c.data,h=Math.min(b,d),k={buffer:new Uint8Array(g,e,h),H:c.H,port:c.port};1===a.type&&h<d&&(c.data=new Uint8Array(g,e+h,d-h),a.W.unshift(c));return k}}};function Yb(a,b,c){a=W[a];if(!a)return bb(S.ga),-1;try{return Qb(a,K,b,c)}catch(d){return wb(d),-1}}function Zb(a){a=W[a-1];return!a?-1:a.B}
|
|
function $b(a,b,c,d){c*=b;if(0==c)return 0;a=Yb(Zb(d),a,c);if(-1==a){if(b=W[d-1])b.error=l;return 0}return Math.floor(a/b)}r._strlen=ac;function bc(a){return 0>a||0===a&&-Infinity===1/a}
|
|
function cc(a,b){function c(a){var c;"double"===a?c=xa[b+e>>3]:"i64"==a?c=[L[b+e>>2],L[b+(e+4)>>2]]:(a="i32",c=L[b+e>>2]);e+=y.ob(a);return c}for(var d=a,e=0,g=[],h,k;;){var j=d;h=K[d>>0];if(0===h)break;k=K[d+1>>0];if(37==h){var x=n,E=n,q=n,w=n,A=n;a:for(;;){switch(k){case 43:x=l;break;case 45:E=l;break;case 35:q=l;break;case 48:if(w)break a;else{w=l;break}case 32:A=l;break;default:break a}d++;k=K[d+1>>0]}var G=0;if(42==k)G=c("i32"),d++,k=K[d+1>>0];else for(;48<=k&&57>=k;)G=10*G+(k-48),d++,k=K[d+
|
|
1>>0];var I=n,B=-1;if(46==k){B=0;I=l;d++;k=K[d+1>>0];if(42==k)B=c("i32"),d++;else for(;;){k=K[d+1>>0];if(48>k||57<k)break;B=10*B+(k-48);d++}k=K[d+1>>0]}0>B&&(B=6,I=n);var z;switch(String.fromCharCode(k)){case "h":k=K[d+2>>0];104==k?(d++,z=1):z=2;break;case "l":k=K[d+2>>0];108==k?(d++,z=8):z=4;break;case "L":case "q":case "j":z=8;break;case "z":case "t":case "I":z=4;break;default:z=m}z&&d++;k=K[d+1>>0];switch(String.fromCharCode(k)){case "d":case "i":case "u":case "o":case "x":case "X":case "p":j=
|
|
100==k||105==k;z=z||4;h=c("i"+8*z);var s;8==z&&(h=y.mc(h[0],h[1],117==k));4>=z&&(h=(j?Ua:Ta)(h&Math.pow(256,z)-1,8*z));var Z=Math.abs(h),j="";if(100==k||105==k)s=Ua(h,8*z).toString(10);else if(117==k)s=Ta(h,8*z).toString(10),h=Math.abs(h);else if(111==k)s=(q?"0":"")+Z.toString(8);else if(120==k||88==k){j=q&&0!=h?"0x":"";if(0>h){h=-h;s=(Z-1).toString(16);Z=[];for(q=0;q<s.length;q++)Z.push((15-parseInt(s[q],16)).toString(16));for(s=Z.join("");s.length<2*z;)s="f"+s}else s=Z.toString(16);88==k&&(j=j.toUpperCase(),
|
|
s=s.toUpperCase())}else 112==k&&(0===Z?s="(nil)":(j="0x",s=Z.toString(16)));if(I)for(;s.length<B;)s="0"+s;0<=h&&(x?j="+"+j:A&&(j=" "+j));"-"==s.charAt(0)&&(j="-"+j,s=s.substr(1));for(;j.length+s.length<G;)E?s+=" ":w?s="0"+s:j=" "+j;s=j+s;s.split("").forEach(function(a){g.push(a.charCodeAt(0))});break;case "f":case "F":case "e":case "E":case "g":case "G":h=c("double");if(isNaN(h))s="nan",w=n;else if(isFinite(h)){I=n;z=Math.min(B,20);if(103==k||71==k)I=l,B=B||1,z=parseInt(h.toExponential(z).split("e")[1],
|
|
10),B>z&&-4<=z?(k=(103==k?"f":"F").charCodeAt(0),B-=z+1):(k=(103==k?"e":"E").charCodeAt(0),B--),z=Math.min(B,20);if(101==k||69==k)s=h.toExponential(z),/[eE][-+]\d$/.test(s)&&(s=s.slice(0,-1)+"0"+s.slice(-1));else if(102==k||70==k)s=h.toFixed(z),0===h&&bc(h)&&(s="-"+s);j=s.split("e");if(I&&!q)for(;1<j[0].length&&-1!=j[0].indexOf(".")&&("0"==j[0].slice(-1)||"."==j[0].slice(-1));)j[0]=j[0].slice(0,-1);else for(q&&-1==s.indexOf(".")&&(j[0]+=".");B>z++;)j[0]+="0";s=j[0]+(1<j.length?"e"+j[1]:"");69==k&&
|
|
(s=s.toUpperCase());0<=h&&(x?s="+"+s:A&&(s=" "+s))}else s=(0>h?"-":"")+"inf",w=n;for(;s.length<G;)s=E?s+" ":w&&("-"==s[0]||"+"==s[0])?s[0]+"0"+s.slice(1):(w?"0":" ")+s;97>k&&(s=s.toUpperCase());s.split("").forEach(function(a){g.push(a.charCodeAt(0))});break;case "s":w=(x=c("i8*"))?ac(x):6;I&&(w=Math.min(w,B));if(!E)for(;w<G--;)g.push(32);if(x)for(q=0;q<w;q++)g.push(O[x++>>0]);else g=g.concat(J("(null)".substr(0,w),l));if(E)for(;w<G--;)g.push(32);break;case "c":for(E&&g.push(c("i8"));0<--G;)g.push(32);
|
|
E||g.push(c("i8"));break;case "n":E=c("i32*");L[E>>2]=g.length;break;case "%":g.push(h);break;default:for(q=j;q<d+2;q++)g.push(K[q>>0])}d+=2}else g.push(h),d+=1}return g}function dc(a,b,c){c=cc(b,c);b=y.Wa();a=$b(N(c,"i8",ya),1,c.length,a);y.Va(b);return a}function ec(a){ec.Vb||(H=H+4095&-4096,ec.Vb=l,C(y.ba),ec.Sb=y.ba,y.ba=function(){D("cannot dynamically allocate, sbrk now has control")});var b=H;0!=a&&ec.Sb(a);return b}function fc(){return!!fc.Bb}
|
|
function gc(a){var b=n;try{a==__ZTIi&&(b=l)}catch(c){}try{a==__ZTIj&&(b=l)}catch(d){}try{a==__ZTIl&&(b=l)}catch(e){}try{a==__ZTIm&&(b=l)}catch(g){}try{a==__ZTIx&&(b=l)}catch(h){}try{a==__ZTIy&&(b=l)}catch(k){}try{a==__ZTIf&&(b=l)}catch(j){}try{a==__ZTId&&(b=l)}catch(x){}try{a==__ZTIe&&(b=l)}catch(E){}try{a==__ZTIc&&(b=l)}catch(q){}try{a==__ZTIa&&(b=l)}catch(w){}try{a==__ZTIh&&(b=l)}catch(A){}try{a==__ZTIs&&(b=l)}catch(G){}try{a==__ZTIt&&(b=l)}catch(I){}return b}
|
|
function hc(a,b,c){if(0==c)return n;if(0==b||b==a)return l;switch(gc(b)?b:L[L[b>>2]-8>>2]){case 0:return 0==L[L[a>>2]-8>>2]?hc(L[a+8>>2],L[b+8>>2],c):n;case 1:return n;case 2:return hc(a,L[b+8>>2],c);default:return n}}var ic=0,jc=8;
|
|
function kc(a,b,c){if(!kc.fc){try{L[__ZTVN10__cxxabiv119__pointer_type_infoE>>2]=0}catch(d){}try{L[__ZTVN10__cxxabiv117__class_type_infoE>>2]=1}catch(e){}try{L[lc>>2]=2}catch(g){}kc.fc=l}var h=a-jc;L[h>>2]=b;L[h+4>>2]=c;ic=a;"uncaught_exception"in fc?fc.Bb++:fc.Bb=1;f(a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.")}r._memset=mc;var nc=n,oc=n,pc=n,qc=n,rc=i,sc=i;
|
|
function tc(a){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[a.substr(a.lastIndexOf(".")+1)]}var uc=[];function vc(){var a=r.canvas;uc.forEach(function(b){b(a.width,a.height)})}
|
|
function wc(a,b,c){b&&c?(a.xc=b,a.ec=c):(b=a.xc,c=a.ec);var d=b,e=c;r.forcedAspectRatio&&0<r.forcedAspectRatio&&(d/e<r.forcedAspectRatio?d=Math.round(e*r.forcedAspectRatio):e=Math.round(d/r.forcedAspectRatio));if((document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===
|
|
a.parentNode&&"undefined"!=typeof screen)var g=Math.min(screen.width/d,screen.height/e),d=Math.round(d*g),e=Math.round(e*g);sc?(a.width!=d&&(a.width=d),a.height!=e&&(a.height=e),"undefined"!=typeof a.style&&(a.style.removeProperty("width"),a.style.removeProperty("height"))):(a.width!=b&&(a.width=b),a.height!=c&&(a.height=c),"undefined"!=typeof a.style&&(d!=b||e!=c?(a.style.setProperty("width",d+"px","important"),a.style.setProperty("height",e+"px","important")):(a.style.removeProperty("width"),a.style.removeProperty("height"))))}
|
|
var xc,yc,zc,Ac;function Aa(a){return y.ba(a+8)+8&4294967288}r._malloc=Aa;r._memcpy=Bc;var Cc=N([N([1,0,0,0,0,0,0],"i8",M)+8,0],"i32",M);function lc(){r.printErr("missing function: _ZTVN10__cxxabiv120__si_class_type_infoE");D(-1)}Rb();tb=Array(4096);Gb(V,"/");Jb("/tmp");Jb("/dev");hb[259]={k:{N:function(){return 0},write:function(){return 0}}};Kb("/dev/null",259);
|
|
gb(1280,{qb:function(a){if(!a.input.length){var b=m;if(u){if(b=process.stdin.read(),!b){if(process.stdin._readableState&&process.stdin._readableState.ended)return m;return}}else"undefined"!=typeof window&&"function"==typeof window.prompt?(b=window.prompt("Input: "),b!==m&&(b+="\n")):"function"==typeof readline&&(b=readline(),b!==m&&(b+="\n"));if(!b)return m;a.input=J(b,l)}return a.input.shift()},sa:function(a,b){b===m||10===b?(r.print(a.R.join("")),a.R=[]):a.R.push(Dc.Pa(b))}});
|
|
gb(1536,{sa:function(a,b){b===m||10===b?(r.printErr(a.R.join("")),a.R=[]):a.R.push(Dc.Pa(b))}});Kb("/dev/tty",1280);Kb("/dev/tty1",1536);Jb("/dev/shm");Jb("/dev/shm/tmp");
|
|
Ma.unshift({V:function(){if(!r.noFSInit&&!Sb){C(!Sb,"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)");Sb=l;Rb();r.stdin=r.stdin;r.stdout=r.stdout;r.stderr=r.stderr;r.stdin?Vb("/dev","stdin",r.stdin):Lb("/dev/tty","/dev/stdin");r.stdout?Vb("/dev","stdout",m,r.stdout):Lb("/dev/tty","/dev/stdout");r.stderr?Vb("/dev","stderr",m,r.stderr):Lb("/dev/tty1","/dev/stderr");var a=Nb("/dev/stdin",
|
|
"r");L[nb>>2]=a?a.B+1:0;C(0===a.B,"invalid handle for stdin ("+a.B+")");a=Nb("/dev/stdout","w");L[ob>>2]=a?a.B+1:0;C(1===a.B,"invalid handle for stdout ("+a.B+")");a=Nb("/dev/stderr","w");L[qb>>2]=a?a.B+1:0;C(2===a.B,"invalid handle for stderr ("+a.B+")")}}});Na.push({V:function(){ub=n}});Oa.push({V:function(){Sb=n;for(var a=0;a<W.length;a++){var b=W[a];b&&Pb(b)}}});r.FS_createFolder=function(a,b,c,d){a=T(("string"===typeof a?a:xb(a))+"/"+b);return Jb(a,Tb(c,d))};
|
|
r.FS_createPath=function(a,b){for(var a="string"===typeof a?a:xb(a),c=b.split("/").reverse();c.length;){var d=c.pop();if(d){var e=T(a+"/"+d);try{Jb(e)}catch(g){}a=e}}return e};r.FS_createDataFile=Ub;
|
|
r.FS_createPreloadedFile=function(a,b,c,d,e,g,h,k,j){function x(c){function s(c){k||Ub(a,b,c,d,e,j);g&&g();Ya()}var q=n;r.preloadPlugins.forEach(function(a){!q&&a.canHandle(A)&&(a.handle(c,A,s,function(){h&&h();Ya()}),q=l)});q||s(c)}r.preloadPlugins||(r.preloadPlugins=[]);if(!xc&&!ca){xc=l;try{new Blob,yc=l}catch(E){yc=n,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}zc="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:
|
|
!yc?console.log("warning: no BlobBuilder"):m;Ac="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:i;!r.vb&&"undefined"===typeof Ac&&(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),r.vb=l);r.preloadPlugins.push({canHandle:function(a){return!r.vb&&/\.(jpg|jpeg|png|bmp)$/i.test(a)},handle:function(a,b,c,d){var e=m;if(yc)try{e=new Blob([a],{type:tc(b)}),e.size!==a.length&&(e=new Blob([(new Uint8Array(a)).buffer],
|
|
{type:tc(b)}))}catch(g){y.ea("Blob constructor present but fails: "+g+"; falling back to blob builder")}e||(e=new zc,e.append((new Uint8Array(a)).buffer),e=e.getBlob());var h=Ac.createObjectURL(e),k=new Image;k.onload=function(){C(k.complete,"Image "+b+" could not be decoded");var d=document.createElement("canvas");d.width=k.width;d.height=k.height;d.getContext("2d").drawImage(k,0,0);r.preloadedImages[b]=d;Ac.revokeObjectURL(h);c&&c(a)};k.onerror=function(){console.log("Image "+h+" could not be decoded");
|
|
d&&d()};k.src=h}});r.preloadPlugins.push({canHandle:function(a){return!r.We&&a.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(a,b,c,d){function e(d){h||(h=l,r.preloadedAudios[b]=d,c&&c(a))}function g(){h||(h=l,r.preloadedAudios[b]=new Audio,d&&d())}var h=n;if(yc){try{var k=new Blob([a],{type:tc(b)})}catch(j){return g()}var k=Ac.createObjectURL(k),q=new Audio;q.addEventListener("canplaythrough",function(){e(q)},n);q.onerror=function(){if(!h){console.log("warning: browser could not fully decode audio "+
|
|
b+", trying slower base64 approach");for(var c="",d=0,g=0,k=0;k<a.length;k++){d=d<<8|a[k];for(g+=8;6<=g;)var j=d>>g-6&63,g=g-6,c=c+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[j]}2==g?(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(d&3)<<4],c+="=="):4==g&&(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(d&15)<<2],c+="=");q.src="data:audio/x-"+b.substr(-3)+";base64,"+c;e(q)}};q.src=k;r.noExitRuntime=l;setTimeout(function(){ka||e(q)},
|
|
1E4)}else return g()}});var q=r.canvas;if(q){q.Ra=q.requestPointerLock||q.mozRequestPointerLock||q.webkitRequestPointerLock||q.msRequestPointerLock||p();q.kb=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||p();q.kb=q.kb.bind(document);var w=function(){pc=document.pointerLockElement===q||document.mozPointerLockElement===q||document.webkitPointerLockElement===q||document.msPointerLockElement===q};document.addEventListener("pointerlockchange",
|
|
w,n);document.addEventListener("mozpointerlockchange",w,n);document.addEventListener("webkitpointerlockchange",w,n);document.addEventListener("mspointerlockchange",w,n);r.elementPointerLock&&q.addEventListener("click",function(a){!pc&&q.Ra&&(q.Ra(),a.preventDefault())},n)}}var A=b?eb(T(a+"/"+b)):a;Xa();if("string"==typeof c){var G=h,I=function(){G?G():f('Loading data file "'+c+'" failed.')},B=new XMLHttpRequest;B.open("GET",c,l);B.responseType="arraybuffer";B.onload=function(){if(200==B.status||0==
|
|
B.status&&B.response){var a=B.response;C(a,'Loading data file "'+c+'" failed (no arrayBuffer).');a=new Uint8Array(a);x(a);Ya()}else I()};B.onerror=I;B.send(m);Xa()}else x(c)};
|
|
r.FS_createLazyFile=function(a,b,c,d,e){var g,h;function k(){this.Ma=n;this.ja=[]}k.prototype.get=function(a){if(!(a>this.length-1||0>a)){var b=a%this.Wb;return this.cc(Math.floor(a/this.Wb))[b]}};k.prototype.uc=function(a){this.cc=a};k.prototype.fb=function(){var a=new XMLHttpRequest;a.open("HEAD",c,n);a.send(m);200<=a.status&&300>a.status||304===a.status||f(Error("Couldn't load "+c+". Status: "+a.status));var b=Number(a.getResponseHeader("Content-length")),d,e=1048576;if(!((d=a.getResponseHeader("Accept-Ranges"))&&
|
|
"bytes"===d))e=b;var g=this;g.uc(function(a){var d=a*e,h=(a+1)*e-1,h=Math.min(h,b-1);if("undefined"===typeof g.ja[a]){var k=g.ja;d>h&&f(Error("invalid range ("+d+", "+h+") or no bytes requested!"));h>b-1&&f(Error("only "+b+" bytes available! programmer error!"));var j=new XMLHttpRequest;j.open("GET",c,n);b!==e&&j.setRequestHeader("Range","bytes="+d+"-"+h);"undefined"!=typeof Uint8Array&&(j.responseType="arraybuffer");j.overrideMimeType&&j.overrideMimeType("text/plain; charset=x-user-defined");j.send(m);
|
|
200<=j.status&&300>j.status||304===j.status||f(Error("Couldn't load "+c+". Status: "+j.status));d=j.response!==i?new Uint8Array(j.response||[]):J(j.responseText||"",l);k[a]=d}"undefined"===typeof g.ja[a]&&f(Error("doXHR failed!"));return g.ja[a]});this.Rb=b;this.Qb=e;this.Ma=l};"undefined"!==typeof XMLHttpRequest?(ca||f("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"),g=new k,Object.defineProperty(g,"length",{get:function(){this.Ma||
|
|
this.fb();return this.Rb}}),Object.defineProperty(g,"chunkSize",{get:function(){this.Ma||this.fb();return this.Qb}}),h=i):(h=c,g=i);var j,a=T(("string"===typeof a?a:xb(a))+"/"+b);j=Ib(a,Tb(d,e));g?j.o=g:h&&(j.o=m,j.url=h);var x={};Object.keys(j.k).forEach(function(a){var b=j.k[a];x[a]=function(){Wb(j)||f(new U(S.O));return b.apply(m,arguments)}});x.N=function(a,b,c,d,e){Wb(j)||f(new U(S.O));a=a.e.o;if(e>=a.length)return 0;d=Math.min(a.length-e,d);C(0<=d);if(a.slice)for(var g=0;g<d;g++)b[c+g]=a[e+
|
|
g];else for(g=0;g<d;g++)b[c+g]=a.get(e+g);return d};j.k=x;return j};r.FS_createLink=function(a,b,c){a=T(("string"===typeof a?a:xb(a))+"/"+b);return Lb(c,a)};r.FS_createDevice=Vb;ab=y.Ab(4);L[ab>>2]=0;Ma.unshift({V:p()});Oa.push({V:p()});var Dc=new y.Ca;u&&(require("fs"),process.platform.match(/^win/));Ma.push({V:function(){Y.root=Gb(Y,m)}});
|
|
r.requestFullScreen=function(a,b){function c(){oc=n;var a=d.parentNode;(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===a?(d.gb=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msExitFullscreen||document.exitFullscreen||
|
|
p(),d.gb=d.gb.bind(document),rc&&d.Ra(),oc=l,sc&&("undefined"!=typeof SDL&&(a=Ea[SDL.screen+0*y.P>>2],L[SDL.screen+0*y.P>>2]=a|8388608),vc())):(a.parentNode.insertBefore(d,a),a.parentNode.removeChild(a),sc&&("undefined"!=typeof SDL&&(a=Ea[SDL.screen+0*y.P>>2],L[SDL.screen+0*y.P>>2]=a&-8388609),vc()));if(r.onFullScreen)r.onFullScreen(oc);wc(d)}rc=a;sc=b;"undefined"===typeof rc&&(rc=l);"undefined"===typeof sc&&(sc=n);var d=r.canvas;qc||(qc=l,document.addEventListener("fullscreenchange",c,n),document.addEventListener("mozfullscreenchange",
|
|
c,n),document.addEventListener("webkitfullscreenchange",c,n),document.addEventListener("MSFullscreenChange",c,n));var e=document.createElement("div");d.parentNode.insertBefore(e,d);e.appendChild(d);e.sc=e.requestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen||(e.webkitRequestFullScreen?function(){e.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:m);e.sc()};
|
|
r.requestAnimationFrame=function(a){"undefined"===typeof window?setTimeout(a,1E3/60):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||window.setTimeout),window.requestAnimationFrame(a))};r.setCanvasSize=function(a,b,c){wc(r.canvas,a,b);c||vc()};r.pauseMainLoop=p();r.resumeMainLoop=function(){nc&&(nc=n,m())};
|
|
r.getUserMedia=function(){window.pb||(window.pb=navigator.getUserMedia||navigator.mozGetUserMedia);window.pb(i)};Ga=v=y.T(F);Ha=Ga+5242880;Ia=H=y.T(Ha);C(Ia<ja,"TOTAL_MEMORY not big enough for stack");ta=Math.min;
|
|
var $=(function(global,env,buffer) {
|
|
// EMSCRIPTEN_START_ASM
|
|
"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.STACKTOP|0;var j=env.STACK_MAX|0;var k=env.tempDoublePtr|0;var l=env.ABORT|0;var m=env.__ZTISt9exception|0;var n=env.__ZTVN10__cxxabiv120__si_class_type_infoE|0;var o=0;var p=0;var q=0;var r=0;var s=+env.NaN,t=+env.Infinity;var u=0,v=0,w=0,x=0,y=0.0,z=0,A=0,B=0,C=0.0;var D=0;var E=0;var F=0;var G=0;var H=0;var I=0;var J=0;var K=0;var L=0;var M=0;var N=global.Math.floor;var O=global.Math.abs;var P=global.Math.sqrt;var Q=global.Math.pow;var R=global.Math.cos;var S=global.Math.sin;var T=global.Math.tan;var U=global.Math.acos;var V=global.Math.asin;var W=global.Math.atan;var X=global.Math.atan2;var Y=global.Math.exp;var Z=global.Math.log;var _=global.Math.ceil;var $=global.Math.imul;var aa=env.abort;var ba=env.assert;var ca=env.asmPrintInt;var da=env.asmPrintFloat;var ea=env.min;var fa=env.invoke_ii;var ga=env.invoke_vi;var ha=env.invoke_v;var ia=env._send;var ja=env.___cxa_does_inherit;var ka=env.___setErrNo;var la=env.___cxa_is_number_type;var ma=env.___cxa_allocate_exception;var na=env.__ZSt18uncaught_exceptionv;var oa=env._fflush;var pa=env._pwrite;var qa=env.__reallyNegative;var ra=env._sbrk;var sa=env._emscripten_memcpy_big;var ta=env._fileno;var ua=env.___resumeException;var va=env.___cxa_find_matching_catch;var wa=env._sysconf;var xa=env._printf;var ya=env._write;var za=env.___errno_location;var Aa=env.__ZNSt9exceptionD2Ev;var Ba=env._mkport;var Ca=env.___cxa_throw;var Da=env._abort;var Ea=env._fwrite;var Fa=env._time;var Ga=env._fprintf;var Ha=env.__formatString;var Ia=0.0;
|
|
// EMSCRIPTEN_START_FUNCS
|
|
function Ma(a){a=a|0;var b=0;b=i;i=i+a|0;i=i+7&-8;return b|0}function Na(){return i|0}function Oa(a){a=a|0;i=a}function Pa(a,b){a=a|0;b=b|0;if((o|0)==0){o=a;p=b}}function Qa(b){b=b|0;a[k>>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0]}function Ra(b){b=b|0;a[k>>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0];a[k+4>>0]=a[b+4>>0];a[k+5>>0]=a[b+5>>0];a[k+6>>0]=a[b+6>>0];a[k+7>>0]=a[b+7>>0]}function Sa(a){a=a|0;D=a}function Ta(){return D|0}function Ua(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var h=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0,x=0.0,y=0;h=i;if((b|0)==0){i=h;return}while(1){b=b+ -1|0;j=c[e>>2]|0;l=+g[e+4>>2];m=l*+g[a+(j*48|0)>>2];r=l*+g[a+(j*48|0)+4>>2];k=l*+g[a+(j*48|0)+8>>2];o=l*+g[a+(j*48|0)+12>>2];p=l*+g[a+(j*48|0)+16>>2];s=l*+g[a+(j*48|0)+20>>2];t=l*+g[a+(j*48|0)+24>>2];u=l*+g[a+(j*48|0)+28>>2];v=l*+g[a+(j*48|0)+32>>2];q=l*+g[a+(j*48|0)+36>>2];n=l*+g[a+(j*48|0)+40>>2];l=l*+g[a+(j*48|0)+44>>2];j=e+12|0;if((c[e+8>>2]|0)==0){while(1){w=c[j>>2]|0;x=+g[e+16>>2];m=m+x*+g[a+(w*48|0)>>2];r=r+x*+g[a+(w*48|0)+4>>2];k=k+x*+g[a+(w*48|0)+8>>2];o=o+x*+g[a+(w*48|0)+12>>2];p=p+x*+g[a+(w*48|0)+16>>2];s=s+x*+g[a+(w*48|0)+20>>2];t=t+x*+g[a+(w*48|0)+24>>2];u=u+x*+g[a+(w*48|0)+28>>2];v=v+x*+g[a+(w*48|0)+32>>2];q=q+x*+g[a+(w*48|0)+36>>2];n=n+x*+g[a+(w*48|0)+40>>2];l=l+x*+g[a+(w*48|0)+44>>2];e=j+12|0;if((c[j+8>>2]|0)==0){w=j;j=e;e=w}else{j=e;break}}}e=d+4|0;y=d+8|0;g[f>>2]=o+(m*+g[d>>2]+r*+g[e>>2]+k*+g[y>>2]);g[f+4>>2]=u+(p*+g[d>>2]+s*+g[e>>2]+t*+g[y>>2]);g[f+8>>2]=l+(v*+g[d>>2]+q*+g[e>>2]+n*+g[y>>2]);y=d+16|0;e=d+20|0;w=d+24|0;g[f+16>>2]=m*+g[y>>2]+r*+g[e>>2]+k*+g[w>>2];g[f+20>>2]=p*+g[y>>2]+s*+g[e>>2]+t*+g[w>>2];g[f+24>>2]=v*+g[y>>2]+q*+g[e>>2]+n*+g[w>>2];if((b|0)==0){break}else{e=j;f=f+32|0;d=d+32|0}}i=h;return}function Va(b,d){b=b|0;d=d|0;var e=0,f=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0.0;e=i;i=i+64|0;f=e;j=e+8|0;a:do{if((b|0)>1){b=a[c[d+4>>2]>>0]|0;switch(b|0){case 50:{d=6500;b=6600;break a};case 48:{p=0;i=e;return p|0};case 51:{l=4;break a};case 52:{d=24e3;b=22e3;break a};case 53:{d=32400;b=3e4;break a};case 49:{d=1700;b=2e3;break a};default:{c[f>>2]=b+ -48;xa(8,f|0)|0;p=-1;i=e;return p|0}}}else{l=4}}while(0);if((l|0)==4){d=1e4;b=9500}n=b<<5;l=Za(n)|0;m=l+(b<<5)|0;o=l;do{g[o>>2]=0.0;g[o+4>>2]=0.0;g[o+8>>2]=0.0;g[o+12>>2]=1.0;p=o+16|0;c[p+0>>2]=0;c[p+4>>2]=0;c[p+8>>2]=0;c[p+12>>2]=0;o=o+32|0}while((o|0)!=(m|0));m=Za(b*12|0)|0;o=m+(b*12|0)|0;p=m;while(1){c[p>>2]=-1;g[p+4>>2]=0.0;c[p+8>>2]=0;p=p+12|0;if((p|0)==(o|0)){o=0;break}}do{g[l+(o<<5)+12>>2]=1.0;g[l+(o<<5)+16>>2]=0.0;g[l+(o<<5)+20>>2]=0.0;g[l+(o<<5)+24>>2]=1.0;g[l+(o<<5)+28>>2]=0.0;c[m+(o*12|0)>>2]=0;g[m+(o*12|0)+4>>2]=1.0;c[m+(o*12|0)+8>>2]=1;o=o+1|0}while((o|0)<(b|0));p=j+0|0;o=p+48|0;do{c[p>>2]=0;p=p+4|0}while((p|0)<(o|0));n=Za(n)|0;o=n+(b<<1<<4)|0;p=n;while(1){c[p+0>>2]=0;c[p+4>>2]=0;c[p+8>>2]=0;c[p+12>>2]=0;p=p+16|0;if((p|0)==(o|0)){o=0;break}}do{Ua(j,b,l,m,n);o=o+1|0}while(o>>>0<d>>>0);j=b<<1;b=0;q=0.0;do{q=q+(+g[n+(b<<4)>>2]+ +g[n+(b<<4)+4>>2]+ +g[n+(b<<4)+8>>2]+ +g[n+(b<<4)+12>>2]);b=b+1|0}while((b|0)!=(j|0));h[k>>3]=q;c[f>>2]=c[k>>2];c[f+4>>2]=c[k+4>>2];xa(24,f|0)|0;p=0;i=e;return p|0}function Wa(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;b=i;do{if(a>>>0<245){if(a>>>0<11){a=16}else{a=a+11&-8}v=a>>>3;r=c[10]|0;w=r>>>v;if((w&3|0)!=0){j=(w&1^1)+v|0;h=j<<1;f=80+(h<<2)|0;h=80+(h+2<<2)|0;d=c[h>>2]|0;e=d+8|0;g=c[e>>2]|0;do{if((f|0)!=(g|0)){if(g>>>0<(c[56>>2]|0)>>>0){Da()}k=g+12|0;if((c[k>>2]|0)==(d|0)){c[k>>2]=f;c[h>>2]=g;break}else{Da()}}else{c[10]=r&~(1<<j)}}while(0);H=j<<3;c[d+4>>2]=H|3;H=d+(H|4)|0;c[H>>2]=c[H>>2]|1;H=e;i=b;return H|0}if(a>>>0>(c[48>>2]|0)>>>0){if((w|0)!=0){f=2<<v;f=w<<v&(f|0-f);f=(f&0-f)+ -1|0;d=f>>>12&16;f=f>>>d;e=f>>>5&8;f=f>>>e;g=f>>>2&4;f=f>>>g;j=f>>>1&2;f=f>>>j;h=f>>>1&1;h=(e|d|g|j|h)+(f>>>h)|0;f=h<<1;j=80+(f<<2)|0;f=80+(f+2<<2)|0;g=c[f>>2]|0;d=g+8|0;e=c[d>>2]|0;do{if((j|0)!=(e|0)){if(e>>>0<(c[56>>2]|0)>>>0){Da()}k=e+12|0;if((c[k>>2]|0)==(g|0)){c[k>>2]=j;c[f>>2]=e;break}else{Da()}}else{c[10]=r&~(1<<h)}}while(0);h=h<<3;f=h-a|0;c[g+4>>2]=a|3;e=g+a|0;c[g+(a|4)>>2]=f|1;c[g+h>>2]=f;h=c[48>>2]|0;if((h|0)!=0){g=c[60>>2]|0;l=h>>>3;j=l<<1;h=80+(j<<2)|0;k=c[10]|0;l=1<<l;if((k&l|0)!=0){j=80+(j+2<<2)|0;k=c[j>>2]|0;if(k>>>0<(c[56>>2]|0)>>>0){Da()}else{D=j;C=k}}else{c[10]=k|l;D=80+(j+2<<2)|0;C=h}c[D>>2]=g;c[C+12>>2]=g;c[g+8>>2]=C;c[g+12>>2]=h}c[48>>2]=f;c[60>>2]=e;H=d;i=b;return H|0}r=c[44>>2]|0;if((r|0)!=0){d=(r&0-r)+ -1|0;G=d>>>12&16;d=d>>>G;F=d>>>5&8;d=d>>>F;H=d>>>2&4;d=d>>>H;h=d>>>1&2;d=d>>>h;e=d>>>1&1;e=c[344+((F|G|H|h|e)+(d>>>e)<<2)>>2]|0;d=(c[e+4>>2]&-8)-a|0;h=e;while(1){g=c[h+16>>2]|0;if((g|0)==0){g=c[h+20>>2]|0;if((g|0)==0){break}}h=(c[g+4>>2]&-8)-a|0;f=h>>>0<d>>>0;d=f?h:d;h=g;e=f?g:e}h=c[56>>2]|0;if(e>>>0<h>>>0){Da()}f=e+a|0;if(!(e>>>0<f>>>0)){Da()}g=c[e+24>>2]|0;k=c[e+12>>2]|0;do{if((k|0)==(e|0)){k=e+20|0;j=c[k>>2]|0;if((j|0)==0){k=e+16|0;j=c[k>>2]|0;if((j|0)==0){B=0;break}}while(1){l=j+20|0;m=c[l>>2]|0;if((m|0)!=0){j=m;k=l;continue}l=j+16|0;m=c[l>>2]|0;if((m|0)==0){break}else{j=m;k=l}}if(k>>>0<h>>>0){Da()}else{c[k>>2]=0;B=j;break}}else{j=c[e+8>>2]|0;if(j>>>0<h>>>0){Da()}h=j+12|0;if((c[h>>2]|0)!=(e|0)){Da()}l=k+8|0;if((c[l>>2]|0)==(e|0)){c[h>>2]=k;c[l>>2]=j;B=k;break}else{Da()}}}while(0);do{if((g|0)!=0){j=c[e+28>>2]|0;h=344+(j<<2)|0;if((e|0)==(c[h>>2]|0)){c[h>>2]=B;if((B|0)==0){c[44>>2]=c[44>>2]&~(1<<j);break}}else{if(g>>>0<(c[56>>2]|0)>>>0){Da()}h=g+16|0;if((c[h>>2]|0)==(e|0)){c[h>>2]=B}else{c[g+20>>2]=B}if((B|0)==0){break}}if(B>>>0<(c[56>>2]|0)>>>0){Da()}c[B+24>>2]=g;g=c[e+16>>2]|0;do{if((g|0)!=0){if(g>>>0<(c[56>>2]|0)>>>0){Da()}else{c[B+16>>2]=g;c[g+24>>2]=B;break}}}while(0);g=c[e+20>>2]|0;if((g|0)!=0){if(g>>>0<(c[56>>2]|0)>>>0){Da()}else{c[B+20>>2]=g;c[g+24>>2]=B;break}}}}while(0);if(d>>>0<16){H=d+a|0;c[e+4>>2]=H|3;H=e+(H+4)|0;c[H>>2]=c[H>>2]|1}else{c[e+4>>2]=a|3;c[e+(a|4)>>2]=d|1;c[e+(d+a)>>2]=d;h=c[48>>2]|0;if((h|0)!=0){g=c[60>>2]|0;j=h>>>3;k=j<<1;h=80+(k<<2)|0;l=c[10]|0;j=1<<j;if((l&j|0)!=0){k=80+(k+2<<2)|0;j=c[k>>2]|0;if(j>>>0<(c[56>>2]|0)>>>0){Da()}else{z=k;A=j}}else{c[10]=l|j;z=80+(k+2<<2)|0;A=h}c[z>>2]=g;c[A+12>>2]=g;c[g+8>>2]=A;c[g+12>>2]=h}c[48>>2]=d;c[60>>2]=f}H=e+8|0;i=b;return H|0}}}else{if(!(a>>>0>4294967231)){z=a+11|0;a=z&-8;B=c[44>>2]|0;if((B|0)!=0){A=0-a|0;z=z>>>8;if((z|0)!=0){if(a>>>0>16777215){C=31}else{G=(z+1048320|0)>>>16&8;H=z<<G;F=(H+520192|0)>>>16&4;H=H<<F;C=(H+245760|0)>>>16&2;C=14-(F|G|C)+(H<<C>>>15)|0;C=a>>>(C+7|0)&1|C<<1}}else{C=0}F=c[344+(C<<2)>>2]|0;a:do{if((F|0)==0){D=0;z=0}else{if((C|0)==31){z=0}else{z=25-(C>>>1)|0}D=0;E=a<<z;z=0;while(1){H=c[F+4>>2]&-8;G=H-a|0;if(G>>>0<A>>>0){if((H|0)==(a|0)){A=G;D=F;z=F;break a}else{A=G;z=F}}G=c[F+20>>2]|0;F=c[F+(E>>>31<<2)+16>>2]|0;D=(G|0)==0|(G|0)==(F|0)?D:G;if((F|0)==0){break}else{E=E<<1}}}}while(0);if((D|0)==0&(z|0)==0){H=2<<C;B=B&(H|0-H);if((B|0)==0){break}H=(B&0-B)+ -1|0;E=H>>>12&16;H=H>>>E;C=H>>>5&8;H=H>>>C;F=H>>>2&4;H=H>>>F;G=H>>>1&2;H=H>>>G;D=H>>>1&1;D=c[344+((C|E|F|G|D)+(H>>>D)<<2)>>2]|0}if((D|0)!=0){while(1){C=(c[D+4>>2]&-8)-a|0;B=C>>>0<A>>>0;A=B?C:A;z=B?D:z;B=c[D+16>>2]|0;if((B|0)!=0){D=B;continue}D=c[D+20>>2]|0;if((D|0)==0){break}}}if((z|0)!=0?A>>>0<((c[48>>2]|0)-a|0)>>>0:0){f=c[56>>2]|0;if(z>>>0<f>>>0){Da()}d=z+a|0;if(!(z>>>0<d>>>0)){Da()}e=c[z+24>>2]|0;g=c[z+12>>2]|0;do{if((g|0)==(z|0)){h=z+20|0;g=c[h>>2]|0;if((g|0)==0){h=z+16|0;g=c[h>>2]|0;if((g|0)==0){x=0;break}}while(1){j=g+20|0;k=c[j>>2]|0;if((k|0)!=0){g=k;h=j;continue}j=g+16|0;k=c[j>>2]|0;if((k|0)==0){break}else{g=k;h=j}}if(h>>>0<f>>>0){Da()}else{c[h>>2]=0;x=g;break}}else{h=c[z+8>>2]|0;if(h>>>0<f>>>0){Da()}j=h+12|0;if((c[j>>2]|0)!=(z|0)){Da()}f=g+8|0;if((c[f>>2]|0)==(z|0)){c[j>>2]=g;c[f>>2]=h;x=g;break}else{Da()}}}while(0);do{if((e|0)!=0){g=c[z+28>>2]|0;f=344+(g<<2)|0;if((z|0)==(c[f>>2]|0)){c[f>>2]=x;if((x|0)==0){c[44>>2]=c[44>>2]&~(1<<g);break}}else{if(e>>>0<(c[56>>2]|0)>>>0){Da()}f=e+16|0;if((c[f>>2]|0)==(z|0)){c[f>>2]=x}else{c[e+20>>2]=x}if((x|0)==0){break}}if(x>>>0<(c[56>>2]|0)>>>0){Da()}c[x+24>>2]=e;e=c[z+16>>2]|0;do{if((e|0)!=0){if(e>>>0<(c[56>>2]|0)>>>0){Da()}else{c[x+16>>2]=e;c[e+24>>2]=x;break}}}while(0);e=c[z+20>>2]|0;if((e|0)!=0){if(e>>>0<(c[56>>2]|0)>>>0){Da()}else{c[x+20>>2]=e;c[e+24>>2]=x;break}}}}while(0);b:do{if(!(A>>>0<16)){c[z+4>>2]=a|3;c[z+(a|4)>>2]=A|1;c[z+(A+a)>>2]=A;f=A>>>3;if(A>>>0<256){g=f<<1;e=80+(g<<2)|0;h=c[10]|0;f=1<<f;if((h&f|0)!=0){f=80+(g+2<<2)|0;g=c[f>>2]|0;if(g>>>0<(c[56>>2]|0)>>>0){Da()}else{w=f;v=g}}else{c[10]=h|f;w=80+(g+2<<2)|0;v=e}c[w>>2]=d;c[v+12>>2]=d;c[z+(a+8)>>2]=v;c[z+(a+12)>>2]=e;break}e=A>>>8;if((e|0)!=0){if(A>>>0>16777215){e=31}else{G=(e+1048320|0)>>>16&8;H=e<<G;F=(H+520192|0)>>>16&4;H=H<<F;e=(H+245760|0)>>>16&2;e=14-(F|G|e)+(H<<e>>>15)|0;e=A>>>(e+7|0)&1|e<<1}}else{e=0}f=344+(e<<2)|0;c[z+(a+28)>>2]=e;c[z+(a+20)>>2]=0;c[z+(a+16)>>2]=0;h=c[44>>2]|0;g=1<<e;if((h&g|0)==0){c[44>>2]=h|g;c[f>>2]=d;c[z+(a+24)>>2]=f;c[z+(a+12)>>2]=d;c[z+(a+8)>>2]=d;break}f=c[f>>2]|0;if((e|0)==31){e=0}else{e=25-(e>>>1)|0}c:do{if((c[f+4>>2]&-8|0)!=(A|0)){e=A<<e;g=f;while(1){h=g+(e>>>31<<2)+16|0;f=c[h>>2]|0;if((f|0)==0){break}if((c[f+4>>2]&-8|0)==(A|0)){r=f;break c}else{e=e<<1;g=f}}if(h>>>0<(c[56>>2]|0)>>>0){Da()}else{c[h>>2]=d;c[z+(a+24)>>2]=g;c[z+(a+12)>>2]=d;c[z+(a+8)>>2]=d;break b}}else{r=f}}while(0);f=r+8|0;e=c[f>>2]|0;g=c[56>>2]|0;if(r>>>0<g>>>0){Da()}if(e>>>0<g>>>0){Da()}else{c[e+12>>2]=d;c[f>>2]=d;c[z+(a+8)>>2]=e;c[z+(a+12)>>2]=r;c[z+(a+24)>>2]=0;break}}else{H=A+a|0;c[z+4>>2]=H|3;H=z+(H+4)|0;c[H>>2]=c[H>>2]|1}}while(0);H=z+8|0;i=b;return H|0}}}else{a=-1}}}while(0);r=c[48>>2]|0;if(!(a>>>0>r>>>0)){e=r-a|0;d=c[60>>2]|0;if(e>>>0>15){c[60>>2]=d+a;c[48>>2]=e;c[d+(a+4)>>2]=e|1;c[d+r>>2]=e;c[d+4>>2]=a|3}else{c[48>>2]=0;c[60>>2]=0;c[d+4>>2]=r|3;H=d+(r+4)|0;c[H>>2]=c[H>>2]|1}H=d+8|0;i=b;return H|0}r=c[52>>2]|0;if(a>>>0<r>>>0){G=r-a|0;c[52>>2]=G;H=c[64>>2]|0;c[64>>2]=H+a;c[H+(a+4)>>2]=G|1;c[H+4>>2]=a|3;H=H+8|0;i=b;return H|0}do{if((c[128]|0)==0){r=wa(30)|0;if((r+ -1&r|0)==0){c[520>>2]=r;c[516>>2]=r;c[524>>2]=-1;c[528>>2]=-1;c[532>>2]=0;c[484>>2]=0;c[128]=(Fa(0)|0)&-16^1431655768;break}else{Da()}}}while(0);w=a+48|0;A=c[520>>2]|0;x=a+47|0;z=A+x|0;A=0-A|0;v=z&A;if(!(v>>>0>a>>>0)){H=0;i=b;return H|0}r=c[480>>2]|0;if((r|0)!=0?(G=c[472>>2]|0,H=G+v|0,H>>>0<=G>>>0|H>>>0>r>>>0):0){H=0;i=b;return H|0}d:do{if((c[484>>2]&4|0)==0){B=c[64>>2]|0;e:do{if((B|0)!=0){r=488|0;while(1){C=c[r>>2]|0;if(!(C>>>0>B>>>0)?(y=r+4|0,(C+(c[y>>2]|0)|0)>>>0>B>>>0):0){break}r=c[r+8>>2]|0;if((r|0)==0){o=182;break e}}if((r|0)!=0){A=z-(c[52>>2]|0)&A;if(A>>>0<2147483647){o=ra(A|0)|0;B=(o|0)==((c[r>>2]|0)+(c[y>>2]|0)|0);y=o;z=A;r=B?o:-1;A=B?A:0;o=191}else{A=0}}else{o=182}}else{o=182}}while(0);do{if((o|0)==182){r=ra(0)|0;if((r|0)!=(-1|0)){A=r;y=c[516>>2]|0;z=y+ -1|0;if((z&A|0)==0){A=v}else{A=v-A+(z+A&0-y)|0}B=c[472>>2]|0;z=B+A|0;if(A>>>0>a>>>0&A>>>0<2147483647){y=c[480>>2]|0;if((y|0)!=0?z>>>0<=B>>>0|z>>>0>y>>>0:0){A=0;break}y=ra(A|0)|0;o=(y|0)==(r|0);z=A;r=o?r:-1;A=o?A:0;o=191}else{A=0}}else{A=0}}}while(0);f:do{if((o|0)==191){o=0-z|0;if((r|0)!=(-1|0)){p=A;o=202;break d}do{if((y|0)!=(-1|0)&z>>>0<2147483647&z>>>0<w>>>0?(u=c[520>>2]|0,u=x-z+u&0-u,u>>>0<2147483647):0){if((ra(u|0)|0)==(-1|0)){ra(o|0)|0;break f}else{z=u+z|0;break}}}while(0);if((y|0)!=(-1|0)){r=y;p=z;o=202;break d}}}while(0);c[484>>2]=c[484>>2]|4;o=199}else{A=0;o=199}}while(0);if((((o|0)==199?v>>>0<2147483647:0)?(s=ra(v|0)|0,t=ra(0)|0,(t|0)!=(-1|0)&(s|0)!=(-1|0)&s>>>0<t>>>0):0)?(p=t-s|0,q=p>>>0>(a+40|0)>>>0,q):0){r=s;p=q?p:A;o=202}if((o|0)==202){q=(c[472>>2]|0)+p|0;c[472>>2]=q;if(q>>>0>(c[476>>2]|0)>>>0){c[476>>2]=q}q=c[64>>2]|0;g:do{if((q|0)!=0){v=488|0;while(1){w=c[v>>2]|0;t=v+4|0;u=c[t>>2]|0;if((r|0)==(w+u|0)){o=214;break}s=c[v+8>>2]|0;if((s|0)==0){break}else{v=s}}if(((o|0)==214?(c[v+12>>2]&8|0)==0:0)?q>>>0>=w>>>0&q>>>0<r>>>0:0){c[t>>2]=u+p;d=(c[52>>2]|0)+p|0;e=q+8|0;if((e&7|0)==0){e=0}else{e=0-e&7}H=d-e|0;c[64>>2]=q+e;c[52>>2]=H;c[q+(e+4)>>2]=H|1;c[q+(d+4)>>2]=40;c[68>>2]=c[528>>2];break}if(r>>>0<(c[56>>2]|0)>>>0){c[56>>2]=r}t=r+p|0;s=488|0;while(1){if((c[s>>2]|0)==(t|0)){o=224;break}u=c[s+8>>2]|0;if((u|0)==0){break}else{s=u}}if((o|0)==224?(c[s+12>>2]&8|0)==0:0){c[s>>2]=r;h=s+4|0;c[h>>2]=(c[h>>2]|0)+p;h=r+8|0;if((h&7|0)==0){h=0}else{h=0-h&7}j=r+(p+8)|0;if((j&7|0)==0){n=0}else{n=0-j&7}o=r+(n+p)|0;j=h+a|0;k=r+j|0;m=o-(r+h)-a|0;c[r+(h+4)>>2]=a|3;h:do{if((o|0)!=(c[64>>2]|0)){if((o|0)==(c[60>>2]|0)){H=(c[48>>2]|0)+m|0;c[48>>2]=H;c[60>>2]=k;c[r+(j+4)>>2]=H|1;c[r+(H+j)>>2]=H;break}q=p+4|0;t=c[r+(q+n)>>2]|0;if((t&3|0)==1){a=t&-8;s=t>>>3;do{if(!(t>>>0<256)){l=c[r+((n|24)+p)>>2]|0;v=c[r+(p+12+n)>>2]|0;do{if((v|0)==(o|0)){u=n|16;t=r+(q+u)|0;s=c[t>>2]|0;if((s|0)==0){t=r+(u+p)|0;s=c[t>>2]|0;if((s|0)==0){g=0;break}}while(1){v=s+20|0;u=c[v>>2]|0;if((u|0)!=0){s=u;t=v;continue}v=s+16|0;u=c[v>>2]|0;if((u|0)==0){break}else{s=u;t=v}}if(t>>>0<(c[56>>2]|0)>>>0){Da()}else{c[t>>2]=0;g=s;break}}else{s=c[r+((n|8)+p)>>2]|0;if(s>>>0<(c[56>>2]|0)>>>0){Da()}t=s+12|0;if((c[t>>2]|0)!=(o|0)){Da()}u=v+8|0;if((c[u>>2]|0)==(o|0)){c[t>>2]=v;c[u>>2]=s;g=v;break}else{Da()}}}while(0);if((l|0)!=0){s=c[r+(p+28+n)>>2]|0;t=344+(s<<2)|0;if((o|0)==(c[t>>2]|0)){c[t>>2]=g;if((g|0)==0){c[44>>2]=c[44>>2]&~(1<<s);break}}else{if(l>>>0<(c[56>>2]|0)>>>0){Da()}s=l+16|0;if((c[s>>2]|0)==(o|0)){c[s>>2]=g}else{c[l+20>>2]=g}if((g|0)==0){break}}if(g>>>0<(c[56>>2]|0)>>>0){Da()}c[g+24>>2]=l;l=n|16;o=c[r+(l+p)>>2]|0;do{if((o|0)!=0){if(o>>>0<(c[56>>2]|0)>>>0){Da()}else{c[g+16>>2]=o;c[o+24>>2]=g;break}}}while(0);l=c[r+(q+l)>>2]|0;if((l|0)!=0){if(l>>>0<(c[56>>2]|0)>>>0){Da()}else{c[g+20>>2]=l;c[l+24>>2]=g;break}}}}else{q=c[r+((n|8)+p)>>2]|0;g=c[r+(p+12+n)>>2]|0;t=80+(s<<1<<2)|0;if((q|0)!=(t|0)){if(q>>>0<(c[56>>2]|0)>>>0){Da()}if((c[q+12>>2]|0)!=(o|0)){Da()}}if((g|0)==(q|0)){c[10]=c[10]&~(1<<s);break}if((g|0)!=(t|0)){if(g>>>0<(c[56>>2]|0)>>>0){Da()}s=g+8|0;if((c[s>>2]|0)==(o|0)){l=s}else{Da()}}else{l=g+8|0}c[q+12>>2]=g;c[l>>2]=q}}while(0);o=r+((a|n)+p)|0;m=a+m|0}g=o+4|0;c[g>>2]=c[g>>2]&-2;c[r+(j+4)>>2]=m|1;c[r+(m+j)>>2]=m;g=m>>>3;if(m>>>0<256){l=g<<1;d=80+(l<<2)|0;m=c[10]|0;g=1<<g;if((m&g|0)!=0){l=80+(l+2<<2)|0;g=c[l>>2]|0;if(g>>>0<(c[56>>2]|0)>>>0){Da()}else{f=l;e=g}}else{c[10]=m|g;f=80+(l+2<<2)|0;e=d}c[f>>2]=k;c[e+12>>2]=k;c[r+(j+8)>>2]=e;c[r+(j+12)>>2]=d;break}e=m>>>8;if((e|0)!=0){if(m>>>0>16777215){e=31}else{G=(e+1048320|0)>>>16&8;H=e<<G;F=(H+520192|0)>>>16&4;H=H<<F;e=(H+245760|0)>>>16&2;e=14-(F|G|e)+(H<<e>>>15)|0;e=m>>>(e+7|0)&1|e<<1}}else{e=0}f=344+(e<<2)|0;c[r+(j+28)>>2]=e;c[r+(j+20)>>2]=0;c[r+(j+16)>>2]=0;l=c[44>>2]|0;g=1<<e;if((l&g|0)==0){c[44>>2]=l|g;c[f>>2]=k;c[r+(j+24)>>2]=f;c[r+(j+12)>>2]=k;c[r+(j+8)>>2]=k;break}f=c[f>>2]|0;if((e|0)==31){e=0}else{e=25-(e>>>1)|0}i:do{if((c[f+4>>2]&-8|0)!=(m|0)){e=m<<e;while(1){g=f+(e>>>31<<2)+16|0;l=c[g>>2]|0;if((l|0)==0){break}if((c[l+4>>2]&-8|0)==(m|0)){d=l;break i}else{e=e<<1;f=l}}if(g>>>0<(c[56>>2]|0)>>>0){Da()}else{c[g>>2]=k;c[r+(j+24)>>2]=f;c[r+(j+12)>>2]=k;c[r+(j+8)>>2]=k;break h}}else{d=f}}while(0);f=d+8|0;e=c[f>>2]|0;g=c[56>>2]|0;if(d>>>0<g>>>0){Da()}if(e>>>0<g>>>0){Da()}else{c[e+12>>2]=k;c[f>>2]=k;c[r+(j+8)>>2]=e;c[r+(j+12)>>2]=d;c[r+(j+24)>>2]=0;break}}else{H=(c[52>>2]|0)+m|0;c[52>>2]=H;c[64>>2]=k;c[r+(j+4)>>2]=H|1}}while(0);H=r+(h|8)|0;i=b;return H|0}e=488|0;while(1){d=c[e>>2]|0;if(!(d>>>0>q>>>0)?(n=c[e+4>>2]|0,m=d+n|0,m>>>0>q>>>0):0){break}e=c[e+8>>2]|0}e=d+(n+ -39)|0;if((e&7|0)==0){e=0}else{e=0-e&7}d=d+(n+ -47+e)|0;d=d>>>0<(q+16|0)>>>0?q:d;e=d+8|0;f=r+8|0;if((f&7|0)==0){f=0}else{f=0-f&7}H=p+ -40-f|0;c[64>>2]=r+f;c[52>>2]=H;c[r+(f+4)>>2]=H|1;c[r+(p+ -36)>>2]=40;c[68>>2]=c[528>>2];c[d+4>>2]=27;c[e+0>>2]=c[488>>2];c[e+4>>2]=c[492>>2];c[e+8>>2]=c[496>>2];c[e+12>>2]=c[500>>2];c[488>>2]=r;c[492>>2]=p;c[500>>2]=0;c[496>>2]=e;e=d+28|0;c[e>>2]=7;if((d+32|0)>>>0<m>>>0){do{H=e;e=e+4|0;c[e>>2]=7}while((H+8|0)>>>0<m>>>0)}if((d|0)!=(q|0)){d=d-q|0;e=q+(d+4)|0;c[e>>2]=c[e>>2]&-2;c[q+4>>2]=d|1;c[q+d>>2]=d;e=d>>>3;if(d>>>0<256){f=e<<1;d=80+(f<<2)|0;g=c[10]|0;e=1<<e;if((g&e|0)!=0){f=80+(f+2<<2)|0;e=c[f>>2]|0;if(e>>>0<(c[56>>2]|0)>>>0){Da()}else{k=f;j=e}}else{c[10]=g|e;k=80+(f+2<<2)|0;j=d}c[k>>2]=q;c[j+12>>2]=q;c[q+8>>2]=j;c[q+12>>2]=d;break}e=d>>>8;if((e|0)!=0){if(d>>>0>16777215){e=31}else{G=(e+1048320|0)>>>16&8;H=e<<G;F=(H+520192|0)>>>16&4;H=H<<F;e=(H+245760|0)>>>16&2;e=14-(F|G|e)+(H<<e>>>15)|0;e=d>>>(e+7|0)&1|e<<1}}else{e=0}j=344+(e<<2)|0;c[q+28>>2]=e;c[q+20>>2]=0;c[q+16>>2]=0;f=c[44>>2]|0;g=1<<e;if((f&g|0)==0){c[44>>2]=f|g;c[j>>2]=q;c[q+24>>2]=j;c[q+12>>2]=q;c[q+8>>2]=q;break}f=c[j>>2]|0;if((e|0)==31){e=0}else{e=25-(e>>>1)|0}j:do{if((c[f+4>>2]&-8|0)!=(d|0)){e=d<<e;while(1){j=f+(e>>>31<<2)+16|0;g=c[j>>2]|0;if((g|0)==0){break}if((c[g+4>>2]&-8|0)==(d|0)){h=g;break j}else{e=e<<1;f=g}}if(j>>>0<(c[56>>2]|0)>>>0){Da()}else{c[j>>2]=q;c[q+24>>2]=f;c[q+12>>2]=q;c[q+8>>2]=q;break g}}else{h=f}}while(0);f=h+8|0;e=c[f>>2]|0;d=c[56>>2]|0;if(h>>>0<d>>>0){Da()}if(e>>>0<d>>>0){Da()}else{c[e+12>>2]=q;c[f>>2]=q;c[q+8>>2]=e;c[q+12>>2]=h;c[q+24>>2]=0;break}}}else{H=c[56>>2]|0;if((H|0)==0|r>>>0<H>>>0){c[56>>2]=r}c[488>>2]=r;c[492>>2]=p;c[500>>2]=0;c[76>>2]=c[128];c[72>>2]=-1;d=0;do{H=d<<1;G=80+(H<<2)|0;c[80+(H+3<<2)>>2]=G;c[80+(H+2<<2)>>2]=G;d=d+1|0}while((d|0)!=32);d=r+8|0;if((d&7|0)==0){d=0}else{d=0-d&7}H=p+ -40-d|0;c[64>>2]=r+d;c[52>>2]=H;c[r+(d+4)>>2]=H|1;c[r+(p+ -36)>>2]=40;c[68>>2]=c[528>>2]}}while(0);d=c[52>>2]|0;if(d>>>0>a>>>0){G=d-a|0;c[52>>2]=G;H=c[64>>2]|0;c[64>>2]=H+a;c[H+(a+4)>>2]=G|1;c[H+4>>2]=a|3;H=H+8|0;i=b;return H|0}}c[(za()|0)>>2]=12;H=0;i=b;return H|0}function Xa(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;b=i;if((a|0)==0){i=b;return}q=a+ -8|0;r=c[56>>2]|0;if(q>>>0<r>>>0){Da()}o=c[a+ -4>>2]|0;n=o&3;if((n|0)==1){Da()}j=o&-8;h=a+(j+ -8)|0;do{if((o&1|0)==0){u=c[q>>2]|0;if((n|0)==0){i=b;return}q=-8-u|0;o=a+q|0;n=u+j|0;if(o>>>0<r>>>0){Da()}if((o|0)==(c[60>>2]|0)){d=a+(j+ -4)|0;if((c[d>>2]&3|0)!=3){d=o;m=n;break}c[48>>2]=n;c[d>>2]=c[d>>2]&-2;c[a+(q+4)>>2]=n|1;c[h>>2]=n;i=b;return}t=u>>>3;if(u>>>0<256){d=c[a+(q+8)>>2]|0;m=c[a+(q+12)>>2]|0;p=80+(t<<1<<2)|0;if((d|0)!=(p|0)){if(d>>>0<r>>>0){Da()}if((c[d+12>>2]|0)!=(o|0)){Da()}}if((m|0)==(d|0)){c[10]=c[10]&~(1<<t);d=o;m=n;break}if((m|0)!=(p|0)){if(m>>>0<r>>>0){Da()}p=m+8|0;if((c[p>>2]|0)==(o|0)){s=p}else{Da()}}else{s=m+8|0}c[d+12>>2]=m;c[s>>2]=d;d=o;m=n;break}s=c[a+(q+24)>>2]|0;t=c[a+(q+12)>>2]|0;do{if((t|0)==(o|0)){u=a+(q+20)|0;t=c[u>>2]|0;if((t|0)==0){u=a+(q+16)|0;t=c[u>>2]|0;if((t|0)==0){p=0;break}}while(1){w=t+20|0;v=c[w>>2]|0;if((v|0)!=0){t=v;u=w;continue}v=t+16|0;w=c[v>>2]|0;if((w|0)==0){break}else{t=w;u=v}}if(u>>>0<r>>>0){Da()}else{c[u>>2]=0;p=t;break}}else{u=c[a+(q+8)>>2]|0;if(u>>>0<r>>>0){Da()}r=u+12|0;if((c[r>>2]|0)!=(o|0)){Da()}v=t+8|0;if((c[v>>2]|0)==(o|0)){c[r>>2]=t;c[v>>2]=u;p=t;break}else{Da()}}}while(0);if((s|0)!=0){t=c[a+(q+28)>>2]|0;r=344+(t<<2)|0;if((o|0)==(c[r>>2]|0)){c[r>>2]=p;if((p|0)==0){c[44>>2]=c[44>>2]&~(1<<t);d=o;m=n;break}}else{if(s>>>0<(c[56>>2]|0)>>>0){Da()}r=s+16|0;if((c[r>>2]|0)==(o|0)){c[r>>2]=p}else{c[s+20>>2]=p}if((p|0)==0){d=o;m=n;break}}if(p>>>0<(c[56>>2]|0)>>>0){Da()}c[p+24>>2]=s;r=c[a+(q+16)>>2]|0;do{if((r|0)!=0){if(r>>>0<(c[56>>2]|0)>>>0){Da()}else{c[p+16>>2]=r;c[r+24>>2]=p;break}}}while(0);q=c[a+(q+20)>>2]|0;if((q|0)!=0){if(q>>>0<(c[56>>2]|0)>>>0){Da()}else{c[p+20>>2]=q;c[q+24>>2]=p;d=o;m=n;break}}else{d=o;m=n}}else{d=o;m=n}}else{d=q;m=j}}while(0);if(!(d>>>0<h>>>0)){Da()}n=a+(j+ -4)|0;o=c[n>>2]|0;if((o&1|0)==0){Da()}if((o&2|0)==0){if((h|0)==(c[64>>2]|0)){w=(c[52>>2]|0)+m|0;c[52>>2]=w;c[64>>2]=d;c[d+4>>2]=w|1;if((d|0)!=(c[60>>2]|0)){i=b;return}c[60>>2]=0;c[48>>2]=0;i=b;return}if((h|0)==(c[60>>2]|0)){w=(c[48>>2]|0)+m|0;c[48>>2]=w;c[60>>2]=d;c[d+4>>2]=w|1;c[d+w>>2]=w;i=b;return}m=(o&-8)+m|0;n=o>>>3;do{if(!(o>>>0<256)){l=c[a+(j+16)>>2]|0;q=c[a+(j|4)>>2]|0;do{if((q|0)==(h|0)){o=a+(j+12)|0;n=c[o>>2]|0;if((n|0)==0){o=a+(j+8)|0;n=c[o>>2]|0;if((n|0)==0){k=0;break}}while(1){p=n+20|0;q=c[p>>2]|0;if((q|0)!=0){n=q;o=p;continue}p=n+16|0;q=c[p>>2]|0;if((q|0)==0){break}else{n=q;o=p}}if(o>>>0<(c[56>>2]|0)>>>0){Da()}else{c[o>>2]=0;k=n;break}}else{o=c[a+j>>2]|0;if(o>>>0<(c[56>>2]|0)>>>0){Da()}p=o+12|0;if((c[p>>2]|0)!=(h|0)){Da()}n=q+8|0;if((c[n>>2]|0)==(h|0)){c[p>>2]=q;c[n>>2]=o;k=q;break}else{Da()}}}while(0);if((l|0)!=0){n=c[a+(j+20)>>2]|0;o=344+(n<<2)|0;if((h|0)==(c[o>>2]|0)){c[o>>2]=k;if((k|0)==0){c[44>>2]=c[44>>2]&~(1<<n);break}}else{if(l>>>0<(c[56>>2]|0)>>>0){Da()}n=l+16|0;if((c[n>>2]|0)==(h|0)){c[n>>2]=k}else{c[l+20>>2]=k}if((k|0)==0){break}}if(k>>>0<(c[56>>2]|0)>>>0){Da()}c[k+24>>2]=l;h=c[a+(j+8)>>2]|0;do{if((h|0)!=0){if(h>>>0<(c[56>>2]|0)>>>0){Da()}else{c[k+16>>2]=h;c[h+24>>2]=k;break}}}while(0);h=c[a+(j+12)>>2]|0;if((h|0)!=0){if(h>>>0<(c[56>>2]|0)>>>0){Da()}else{c[k+20>>2]=h;c[h+24>>2]=k;break}}}}else{k=c[a+j>>2]|0;a=c[a+(j|4)>>2]|0;j=80+(n<<1<<2)|0;if((k|0)!=(j|0)){if(k>>>0<(c[56>>2]|0)>>>0){Da()}if((c[k+12>>2]|0)!=(h|0)){Da()}}if((a|0)==(k|0)){c[10]=c[10]&~(1<<n);break}if((a|0)!=(j|0)){if(a>>>0<(c[56>>2]|0)>>>0){Da()}j=a+8|0;if((c[j>>2]|0)==(h|0)){l=j}else{Da()}}else{l=a+8|0}c[k+12>>2]=a;c[l>>2]=k}}while(0);c[d+4>>2]=m|1;c[d+m>>2]=m;if((d|0)==(c[60>>2]|0)){c[48>>2]=m;i=b;return}}else{c[n>>2]=o&-2;c[d+4>>2]=m|1;c[d+m>>2]=m}h=m>>>3;if(m>>>0<256){a=h<<1;e=80+(a<<2)|0;j=c[10]|0;h=1<<h;if((j&h|0)!=0){h=80+(a+2<<2)|0;a=c[h>>2]|0;if(a>>>0<(c[56>>2]|0)>>>0){Da()}else{f=h;g=a}}else{c[10]=j|h;f=80+(a+2<<2)|0;g=e}c[f>>2]=d;c[g+12>>2]=d;c[d+8>>2]=g;c[d+12>>2]=e;i=b;return}f=m>>>8;if((f|0)!=0){if(m>>>0>16777215){f=31}else{v=(f+1048320|0)>>>16&8;w=f<<v;u=(w+520192|0)>>>16&4;w=w<<u;f=(w+245760|0)>>>16&2;f=14-(u|v|f)+(w<<f>>>15)|0;f=m>>>(f+7|0)&1|f<<1}}else{f=0}g=344+(f<<2)|0;c[d+28>>2]=f;c[d+20>>2]=0;c[d+16>>2]=0;a=c[44>>2]|0;h=1<<f;a:do{if((a&h|0)!=0){g=c[g>>2]|0;if((f|0)==31){f=0}else{f=25-(f>>>1)|0}b:do{if((c[g+4>>2]&-8|0)!=(m|0)){f=m<<f;a=g;while(1){h=a+(f>>>31<<2)+16|0;g=c[h>>2]|0;if((g|0)==0){break}if((c[g+4>>2]&-8|0)==(m|0)){e=g;break b}else{f=f<<1;a=g}}if(h>>>0<(c[56>>2]|0)>>>0){Da()}else{c[h>>2]=d;c[d+24>>2]=a;c[d+12>>2]=d;c[d+8>>2]=d;break a}}else{e=g}}while(0);g=e+8|0;f=c[g>>2]|0;h=c[56>>2]|0;if(e>>>0<h>>>0){Da()}if(f>>>0<h>>>0){Da()}else{c[f+12>>2]=d;c[g>>2]=d;c[d+8>>2]=f;c[d+12>>2]=e;c[d+24>>2]=0;break}}else{c[44>>2]=a|h;c[g>>2]=d;c[d+24>>2]=g;c[d+12>>2]=d;c[d+8>>2]=d}}while(0);w=(c[72>>2]|0)+ -1|0;c[72>>2]=w;if((w|0)==0){d=496|0}else{i=b;return}while(1){d=c[d>>2]|0;if((d|0)==0){break}else{d=d+8|0}}c[72>>2]=-1;i=b;return}function Ya(a){a=a|0;var b=0,d=0;b=i;a=(a|0)==0?1:a;while(1){d=Wa(a)|0;if((d|0)!=0){a=6;break}d=c[134]|0;c[134]=d+0;if((d|0)==0){a=5;break}La[d&0]()}if((a|0)==5){d=ma(4)|0;c[d>>2]=552;Ca(d|0,600,1)}else if((a|0)==6){i=b;return d|0}return 0}function Za(a){a=a|0;var b=0;b=i;a=Ya(a)|0;i=b;return a|0}function _a(a){a=a|0;var b=0;b=i;if((a|0)!=0){Xa(a)}i=b;return}function $a(a){a=a|0;var b=0;b=i;Aa(a|0);_a(a);i=b;return}function ab(a){a=a|0;var b=0;b=i;Aa(a|0);i=b;return}function bb(a){a=a|0;return 568}function cb(){c[150]=n;c[152]=m}function db(b){b=b|0;var c=0;c=b;while(a[c>>0]|0){c=c+1|0}return c-b|0}function eb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=b+e|0;if((e|0)>=20){d=d&255;i=b&3;h=d|d<<8|d<<16|d<<24;g=f&~3;if(i){i=b+4-i|0;while((b|0)<(i|0)){a[b>>0]=d;b=b+1|0}}while((b|0)<(g|0)){c[b>>2]=h;b=b+4|0}}while((b|0)<(f|0)){a[b>>0]=d;b=b+1|0}return b-e|0}function fb(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;if((e|0)>=4096)return sa(b|0,d|0,e|0)|0;f=b|0;if((b&3)==(d&3)){while(b&3){if((e|0)==0)return f|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}while((e|0)>=4){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0;e=e-4|0}}while((e|0)>0){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}return f|0}function gb(a,b){a=a|0;b=b|0;return Ja[a&1](b|0)|0}function hb(a,b){a=a|0;b=b|0;Ka[a&3](b|0)}function ib(a){a=a|0;La[a&0]()}function jb(a){a=a|0;aa(0);return 0}function kb(a){a=a|0;aa(1)}function lb(){aa(2)}
|
|
|
|
|
|
|
|
|
|
// EMSCRIPTEN_END_FUNCS
|
|
var Ja=[jb,bb];var Ka=[kb,ab,$a,kb];var La=[lb];return{_strlen:db,_free:Xa,_main:Va,_memset:eb,_malloc:Wa,_memcpy:fb,runPostSets:cb,stackAlloc:Ma,stackSave:Na,stackRestore:Oa,setThrew:Pa,setTempRet0:Sa,getTempRet0:Ta,dynCall_ii:gb,dynCall_vi:hb,dynCall_v:ib}
|
|
// EMSCRIPTEN_END_ASM
|
|
|
|
})({Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array},{abort:D,assert:C,asmPrintInt:function(a,b){r.print("int "+a+","+b)},asmPrintFloat:function(a,b){r.print("float "+a+","+b)},min:ta,invoke_ii:function(a,b){try{return r.dynCall_ii(a,b)}catch(c){"number"!==typeof c&&"longjmp"!==c&&f(c),$.setThrew(1,0)}},invoke_vi:function(a,
|
|
b){try{r.dynCall_vi(a,b)}catch(c){"number"!==typeof c&&"longjmp"!==c&&f(c),$.setThrew(1,0)}},invoke_v:function(a){try{r.dynCall_v(a)}catch(b){"number"!==typeof b&&"longjmp"!==b&&f(b),$.setThrew(1,0)}},_send:function(a,b,c){return!Y.ac(a)?(bb(S.ga),-1):Yb(a,b,c)},___cxa_does_inherit:hc,___setErrNo:bb,___cxa_is_number_type:gc,___cxa_allocate_exception:function(a){return Aa(a+jc)+jc},__ZSt18uncaught_exceptionv:fc,_fflush:p(),_pwrite:function(a,b,c,d){a=W[a];if(!a)return bb(S.ga),-1;try{return Qb(a,K,
|
|
b,c,d)}catch(e){return wb(e),-1}},__reallyNegative:bc,_sbrk:ec,_emscripten_memcpy_big:function(a,b,c){O.set(O.subarray(b,b+c),a);return a},_fileno:Zb,___resumeException:function(a){ic||(ic=a);f(a+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.")},___cxa_find_matching_catch:function(a,b){-1==a&&(a=ic);header=a-jc;-1==b&&(b=L[header>>2]);var c=Array.prototype.slice.call(arguments,2);0!=b&&!gc(b)&&
|
|
0==L[L[b>>2]-8>>2]&&(a=L[a>>2]);for(var d=0;d<c.length;d++)if(hc(c[d],b,a))return($.setTempRet0(c[d]),a)|0;return($.setTempRet0(b),a)|0},_sysconf:function(a){switch(a){case 30:return 4096;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 79: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 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 1}bb(S.u);return-1},_printf:function(a,b){return dc(L[ob>>2],a,b)},_write:Yb,
|
|
___errno_location:function(){return ab},__ZNSt9exceptionD2Ev:p(),_mkport:Xb,___cxa_throw:kc,_abort:function(){r.abort()},_fwrite:$b,_time:function(a){var b=Math.floor(Date.now()/1E3);a&&(L[a>>2]=b);return b},_fprintf:dc,__formatString:cc,STACKTOP:v,STACK_MAX:Ha,tempDoublePtr:Za,ABORT:ka,NaN:NaN,Infinity:Infinity,__ZTISt9exception:Cc,__ZTVN10__cxxabiv120__si_class_type_infoE:lc},Q),ac=r._strlen=$._strlen;r._free=$._free;r._main=$._main;
|
|
var mc=r._memset=$._memset,Aa=r._malloc=$._malloc,Bc=r._memcpy=$._memcpy;r.runPostSets=$.runPostSets;r.dynCall_ii=$.dynCall_ii;r.dynCall_vi=$.dynCall_vi;r.dynCall_v=$.dynCall_v;y.Ua=$.stackAlloc;y.Wa=$.stackSave;y.Va=$.stackRestore;y.vc=$.setTempRet0;y.bc=$.getTempRet0;function Ec(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}Ec.prototype=Error();var Fc,Gc=m,Wa=function Hc(){!r.calledRun&&Ic&&Jc([].concat(r.arguments));r.calledRun||(Wa=Hc)};
|
|
r.callMain=r.Ce=function(a){function b(){for(var a=0;3>a;a++)d.push(0)}C(0==R,"cannot call main when async dependencies remain! (listen on __ATMAIN__)");C(0==La.length,"cannot call main when preRun functions remain to be called");a=a||[];Qa||(Qa=l,Ka(Ma));var c=a.length+1,d=[N(J("/bin/this.program"),"i8",0)];b();for(var e=0;e<c-1;e+=1)d.push(N(J(a[e]),"i8",0)),b();d.push(0);d=N(d,"i32",0);Fc=v;try{var g=r._main(c,d,0);r.noExitRuntime||Kc(g)}catch(h){h instanceof Ec||("SimulateInfiniteLoop"==h?r.noExitRuntime=
|
|
l:(h&&("object"===typeof h&&h.stack)&&r.S("exception thrown: "+[h,h.stack]),f(h)))}finally{}};
|
|
function Jc(a){function b(){if(!r.calledRun){r.calledRun=l;Qa||(Qa=l,Ka(Ma));Ka(Na);ba&&Gc!==m&&r.S("pre-main prep time: "+(Date.now()-Gc)+" ms");r._main&&Ic&&r.callMain(a);if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)Sa(r.postRun.shift());Ka(Pa)}}a=a||r.arguments;Gc===m&&(Gc=Date.now());if(0<R)r.S("run() called, but dependencies remain, so not running");else{if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)Ra(r.preRun.shift());
|
|
Ka(La);!(0<R)&&!r.calledRun&&(r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1);ka||b()},1)):b())}}r.run=r.bf=Jc;function Kc(a){ka=l;v=Fc;Ka(Oa);f(new Ec(a))}r.exit=r.Ge=Kc;function D(a){a&&(r.print(a),r.S(a));ka=l;f("abort() at "+Ca()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.")}r.abort=r.abort=D;if(r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.pop()();
|
|
var Ic=l;r.noInitialRun&&(Ic=n);Jc([].concat(r.arguments));
|
|
|